improvements to collapsible section container

This commit is contained in:
zadam 2020-11-19 23:02:25 +01:00
parent c737a3adc9
commit af1fd5bd06
8 changed files with 209 additions and 139 deletions

File diff suppressed because one or more lines are too long

198
package-lock.json generated
View File

@ -610,9 +610,9 @@
"dev": true
},
"@types/eslint": {
"version": "7.2.4",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.4.tgz",
"integrity": "sha512-YCY4kzHMsHoyKspQH+nwSe+70Kep7Vjt2X+dZe5Vs2vkRudqtoFoUIv1RlJmZB8Hbp7McneupoZij4PadxsK5Q==",
"version": "7.2.5",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.5.tgz",
"integrity": "sha512-Dc6ar9x16BdaR3NSxSF7T4IjL9gxxViJq8RmFd+2UAyA+K6ck2W+gUwfgpG/y9TPyUuBL35109bbULpEynvltA==",
"dev": true,
"requires": {
"@types/estree": "*",
@ -898,18 +898,18 @@
}
},
"@webpack-cli/info": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.0.2.tgz",
"integrity": "sha512-FEfLQwmN4pXZSYSrtp+KC84rFanoCIxXFpS2wUvviDCE2fnajwxw2GXzbj83IlH4Dl8Wq8kJjavVwvxv3YJmnw==",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.1.0.tgz",
"integrity": "sha512-uNWSdaYHc+f3LdIZNwhdhkjjLDDl3jP2+XBqAq9H8DjrJUvlOKdP8TNruy1yEaDfgpAIgbSAN7pye4FEHg9tYQ==",
"dev": true,
"requires": {
"envinfo": "^7.7.3"
}
},
"@webpack-cli/serve": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.0.1.tgz",
"integrity": "sha512-WGMaTMTK6NOe29Hw1WBEok9vGLfKg5C6jWzNOS/6HH1YadR+RL+TRWRcSyc81Dzulljhk/Ree9mrDM4Np9GGOQ==",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.1.0.tgz",
"integrity": "sha512-7RfnMXCpJ/NThrhq4gYQYILB18xWyoQcBey81oIyVbmgbc6m5ZHHyFK+DyH7pLHJf0p14MxL4mTsoPAgBSTpIg==",
"dev": true
},
"@xtuc/ieee754": {
@ -1037,23 +1037,6 @@
"integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
"dev": true
},
"ansi-escapes": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
"integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==",
"dev": true,
"requires": {
"type-fest": "^0.11.0"
},
"dependencies": {
"type-fest": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
"integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==",
"dev": true
}
}
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
@ -1602,15 +1585,16 @@
"integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow=="
},
"browserslist": {
"version": "4.14.5",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.5.tgz",
"integrity": "sha512-Z+vsCZIvCBvqLoYkBFTwEYH3v5MCQbsAjp50ERycpOjnPmolg1Gjy4+KaWWpm8QOJt9GHkhdqAl14NpCX73CWA==",
"version": "4.14.7",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.7.tgz",
"integrity": "sha512-BSVRLCeG3Xt/j/1cCGj1019Wbty0H+Yvu2AOuZSuoaUWn3RatbL33Cxk+Q4jRMRAbOm0p7SLravLjpnT6s0vzQ==",
"dev": true,
"requires": {
"caniuse-lite": "^1.0.30001135",
"electron-to-chromium": "^1.3.571",
"escalade": "^3.1.0",
"node-releases": "^1.1.61"
"caniuse-lite": "^1.0.30001157",
"colorette": "^1.2.1",
"electron-to-chromium": "^1.3.591",
"escalade": "^3.1.1",
"node-releases": "^1.1.66"
}
},
"buffer": {
@ -1824,9 +1808,9 @@
"dev": true
},
"caniuse-lite": {
"version": "1.0.30001154",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001154.tgz",
"integrity": "sha512-y9DvdSti8NnYB9Be92ddMZQrcOe04kcQtcxtBx4NkB04+qZ+JUWotnXBJTmxlKudhxNTQ3RRknMwNU2YQl/Org==",
"version": "1.0.30001159",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001159.tgz",
"integrity": "sha512-w9Ph56jOsS8RL20K9cLND3u/+5WASWdhC/PPrf+V3/HsM3uHOavWOR1Xzakbv4Puo/srmPHudkmCRWM7Aq+/UA==",
"dev": true
},
"caseless": {
@ -2042,14 +2026,14 @@
}
},
"command-line-usage": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.0.tgz",
"integrity": "sha512-Ew1clU4pkUeo6AFVDFxCbnN7GIZfXl48HIOQeFQnkO3oOqvpI7wdqtLRwv9iOCZ/7A+z4csVZeiDdEcj8g6Wiw==",
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.1.tgz",
"integrity": "sha512-F59pEuAR9o1SF/bD0dQBDluhpT4jJQNWUHEuVBqpDmCUo6gPjCi+m9fCWnWZVR/oG6cMTUms4h+3NPl74wGXvA==",
"dev": true,
"requires": {
"array-back": "^4.0.0",
"array-back": "^4.0.1",
"chalk": "^2.4.2",
"table-layout": "^1.0.0",
"table-layout": "^1.0.1",
"typical": "^5.2.0"
}
},
@ -2380,9 +2364,9 @@
}
},
"dayjs": {
"version": "1.9.4",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.9.4.tgz",
"integrity": "sha512-ABSF3alrldf7nM9sQ2U+Ln67NRwmzlLOqG7kK03kck0mw3wlSSEKv/XhKGGxUjQcS57QeiCyNdrFgtj9nWlrng=="
"version": "1.9.6",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.9.6.tgz",
"integrity": "sha512-HngNLtPEBWRo8EFVmHFmSXAjtCX8rGNqeXQI0Gh7wCTSqwaKgPIDqu9m07wABVopNwzvOeCb+2711vQhDlcIXw=="
},
"debug": {
"version": "4.1.1",
@ -3228,9 +3212,9 @@
}
},
"electron-to-chromium": {
"version": "1.3.584",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.584.tgz",
"integrity": "sha512-NB3DzrTzJFhWkUp+nl2KtUtoFzrfGXTir2S+BU4tXGyXH9vlluPuFpE3pTKeH7+PY460tHLjKzh6K2+TWwW+Ww==",
"version": "1.3.602",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.602.tgz",
"integrity": "sha512-+JbC10U8vpKAqAtrEqORdzaWewRgEj5DY+QQNyP/dxDTshPqqgpjrvt6smewKS/5F3vT5prYgg7/VTxb5FROjw==",
"dev": true
},
"electron-window-state": {
@ -3421,9 +3405,9 @@
"dev": true
},
"execa": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz",
"integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
"integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==",
"dev": true,
"requires": {
"cross-spawn": "^7.0.0",
@ -4146,9 +4130,9 @@
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
},
"helmet": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-4.1.1.tgz",
"integrity": "sha512-Avg4XxSBrehD94mkRwEljnO+6RZx7AGfk8Wa6K1nxaU+hbXlFOhlOIMgPfFqOYQB/dBCsTpootTGuiOG+CHiQA=="
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-4.2.0.tgz",
"integrity": "sha512-aoiSxXMd0ks1ojYpSCFoCRzgv4rY/uB9jKStaw8PkXwsdLYa/Gq+Nc5l0soH0cwBIsLAlujPnx4HLQs+LaXCrQ=="
},
"hosted-git-info": {
"version": "2.8.5",
@ -4565,9 +4549,9 @@
"dev": true
},
"jest-worker": {
"version": "26.6.1",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.1.tgz",
"integrity": "sha512-R5IE3qSGz+QynJx8y+ICEkdI2OJ3RJjRQVEyCcFAd3yVhQSEtquziPO29Mlzgn07LOVE8u8jhJ1FqcwegiXWOw==",
"version": "26.6.2",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz",
"integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==",
"dev": true,
"requires": {
"@types/node": "*",
@ -4829,6 +4813,12 @@
"integrity": "sha512-u93kb2fPbIrfzBuLjZE+w+fJbUUMhNDXxNmMfaqNgpfQf1CO5ZSe2LfsnBqVAk7i/2NF48OSoRj+Xe2VT+lE8Q==",
"dev": true
},
"leven": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
"integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==",
"dev": true
},
"levn": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
@ -5267,9 +5257,9 @@
"dev": true
},
"nanoid": {
"version": "3.1.12",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz",
"integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A=="
"version": "3.1.16",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.16.tgz",
"integrity": "sha512-+AK8MN0WHji40lj8AEuwLOvLSbWYApQpre/aFJZD71r43wVRLrOYS4FmJOPQYon1TqB462RzrrxlfA74XRES8w=="
},
"napi-build-utils": {
"version": "1.0.2",
@ -5316,9 +5306,9 @@
"dev": true
},
"node-abi": {
"version": "2.19.1",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.19.1.tgz",
"integrity": "sha512-HbtmIuByq44yhAzK7b9j/FelKlHYISKQn0mtvcBrU5QBkhoCMp5bu8Hv5AI34DcKfOAcJBcOEMwLlwO62FFu9A==",
"version": "2.19.3",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.19.3.tgz",
"integrity": "sha512-9xZrlyfvKhWme2EXFKQhZRp1yNWT/uI1luYPr3sFl+H4keYY4xR+1jO7mvTTijIsHf1M+QDe9uWuKeEpLInIlg==",
"requires": {
"semver": "^5.4.1"
},
@ -5431,9 +5421,9 @@
}
},
"node-releases": {
"version": "1.1.65",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.65.tgz",
"integrity": "sha512-YpzJOe2WFIW0V4ZkJQd/DGR/zdVwc/pI4Nl1CZrBO19FdRcSTmsuhdttw9rsTzzJLrNcSloLiBbEYx1C4f6gpA==",
"version": "1.1.67",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz",
"integrity": "sha512-V5QF9noGFl3EymEwUYzO+3NTDpGfQB4ve6Qfnzf3UNydMhjQRVPR1DZTuvWiLzaFJYw2fmDwAfnRNEVb64hSIg==",
"dev": true
},
"noop-logger": {
@ -5949,13 +5939,13 @@
}
},
"postcss": {
"version": "8.1.2",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.1.2.tgz",
"integrity": "sha512-mToqEVFq8jF9TFhlIK4HhE34zknFJuNTgqtsr60vUvrWn+9TIYugCwiV1JZRxCuOrej2jjstun1bn4Bc7/1HkA==",
"version": "8.1.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.1.6.tgz",
"integrity": "sha512-JuifSl4h8dJ70SiMXKjzCxhalE6p2TnMHuq9G8ftyXj2jg6SXzqCsEuxMj9RkmJoO5D+Z9YrWunNkxqpRT02qg==",
"requires": {
"colorette": "^1.2.1",
"line-column": "^1.0.2",
"nanoid": "^3.1.12",
"nanoid": "^3.1.16",
"source-map": "^0.6.1"
}
},
@ -6469,9 +6459,9 @@
}
},
"sanitize-html": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.1.1.tgz",
"integrity": "sha512-yb+I+K25cn6PzsRJb+kGdlOBC3SkvEwJrr/Xl+6YR42oDZDeu61yWeEMSEi0hCKlRSYlWWE4tUnF2Ds+c/M1Vg==",
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.1.2.tgz",
"integrity": "sha512-i/h+fJal+609o6GlWFpQmAL7E5ZL4rrb0QwbDKQue2uift+4WKMe/HViRGawP4Q/UgswdDKxMqjDRrKPtCpBMg==",
"requires": {
"deepmerge": "^4.2.2",
"escape-string-regexp": "^4.0.0",
@ -7034,9 +7024,9 @@
"dev": true
},
"tapable": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.0.0.tgz",
"integrity": "sha512-bjzn0C0RWoffnNdTzNi7rNDhs1Zlwk2tRXgk8EiHKAOX1Mag3d6T0Y5zNa7l9CJ+EoUne/0UHdwS8tMbkh9zDg==",
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.1.1.tgz",
"integrity": "sha512-Wib1S8m2wdpLbmQz0RBEVosIyvb/ykfKXf3ZIDqvWoMg/zTNm6G/tDSuUM61J1kNCDXWJrLHGSFeMhAG+gAGpQ==",
"dev": true
},
"tar": {
@ -7166,9 +7156,9 @@
"dev": true
},
"terser": {
"version": "5.3.8",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.3.8.tgz",
"integrity": "sha512-zVotuHoIfnYjtlurOouTazciEfL7V38QMAOhGqpXDEg6yT13cF4+fEP9b0rrCEQTn+tT46uxgFsTZzhygk+CzQ==",
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.5.0.tgz",
"integrity": "sha512-eopt1Gf7/AQyPhpygdKePTzaet31TvQxXvrf7xYUvD/d8qkCJm4SKPDzu+GHK5ZaYTn8rvttfqaZc3swK21e5g==",
"dev": true,
"requires": {
"commander": "^2.20.0",
@ -7566,9 +7556,9 @@
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
},
"v8-compile-cache": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz",
"integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==",
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz",
"integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==",
"dev": true
},
"validate-npm-package-license": {
@ -7613,9 +7603,9 @@
}
},
"watchpack": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.0.0.tgz",
"integrity": "sha512-xSdCxxYZWNk3VK13bZRYhsQpfa8Vg63zXG+3pyU8ouqSLRCv4IGXIp9Kr226q6GBkGRlZrST2wwKtjfKz2m7Cg==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.0.1.tgz",
"integrity": "sha512-vO8AKGX22ZRo6PiOFM9dC0re8IcKh8Kd/aH2zeqUc6w4/jBGlTy2P7fTC6ekT0NjVeGjgU2dGC5rNstKkeLEQg==",
"dev": true,
"requires": {
"glob-to-regexp": "^0.4.1",
@ -7637,9 +7627,9 @@
"integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w=="
},
"webpack": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.3.2.tgz",
"integrity": "sha512-DXsfHoI6lQAR3KnQh7+FsRfs9fs+TEvzXCA35UbKv4kVuzslg7QCMAcpFRZNDMjdtm9N/PoO54XEzGN9TeacQg==",
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.6.0.tgz",
"integrity": "sha512-SIeFuBhuheKElRbd84O35UhKc0nxlgSwtzm2ksZ0BVhRJqxVJxEguT/pYhfiR0le/pxTa1VsCp7EOYyTsa6XOA==",
"dev": true,
"requires": {
"@types/eslint-scope": "^3.7.0",
@ -7683,30 +7673,30 @@
}
},
"webpack-cli": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.1.0.tgz",
"integrity": "sha512-NdhxXMZmoik62Y05t0h1y65LjBM7BwFPq311ihXuMM3RY6dlc4KkCTyHLzTuBEc+bqq6d3xh+CWmU0xRexNJBA==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.2.0.tgz",
"integrity": "sha512-EIl3k88vaF4fSxWSgtAQR+VwicfLMTZ9amQtqS4o+TDPW9HGaEpbFBbAZ4A3ZOT5SOnMxNOzROsSTPiE8tBJPA==",
"dev": true,
"requires": {
"@webpack-cli/info": "^1.0.2",
"@webpack-cli/serve": "^1.0.1",
"ansi-escapes": "^4.3.1",
"@webpack-cli/info": "^1.1.0",
"@webpack-cli/serve": "^1.1.0",
"colorette": "^1.2.1",
"command-line-usage": "^6.1.0",
"commander": "^6.0.0",
"enquirer": "^2.3.4",
"execa": "^4.0.0",
"commander": "^6.2.0",
"enquirer": "^2.3.6",
"execa": "^4.1.0",
"import-local": "^3.0.2",
"interpret": "^2.0.0",
"interpret": "^2.2.0",
"leven": "^3.1.0",
"rechoir": "^0.7.0",
"v8-compile-cache": "^2.1.0",
"v8-compile-cache": "^2.2.0",
"webpack-merge": "^4.2.2"
},
"dependencies": {
"commander": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-6.1.0.tgz",
"integrity": "sha512-wl7PNrYWd2y5mp1OK/LhTlv8Ff4kQJQRXXAvF+uU/TPNiVJUxZLRYGj/B0y/lPGAVcSbJqH2Za/cvHmrPMC8mA==",
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz",
"integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==",
"dev": true
}
}
@ -7916,9 +7906,9 @@
}
},
"ws": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz",
"integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA=="
"version": "7.4.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.0.tgz",
"integrity": "sha512-kyFwXuV/5ymf+IXhS6f0+eAFvydbaBW3zjpT6hUdAh/hbVjTIB5EHBGi0bPoCLSK2wcuz3BrEkB9LrYv1Nm4NQ=="
},
"xdg-basedir": {
"version": "4.0.0",

View File

@ -32,7 +32,7 @@
"commonmark": "0.29.2",
"cookie-parser": "1.4.5",
"csurf": "1.11.0",
"dayjs": "1.9.4",
"dayjs": "1.9.6",
"ejs": "3.1.5",
"electron-debug": "3.1.0",
"electron-dl": "3.0.2",
@ -41,7 +41,7 @@
"express": "4.17.1",
"express-session": "1.17.1",
"fs-extra": "9.0.1",
"helmet": "4.1.1",
"helmet": "4.2.0",
"html": "1.0.0",
"html2plaintext": "2.1.2",
"http-proxy-agent": "4.0.1",
@ -53,14 +53,14 @@
"jsdom": "^16.4.0",
"mime-types": "2.1.27",
"multer": "1.4.2",
"node-abi": "2.19.1",
"node-abi": "2.19.3",
"open": "7.3.0",
"portscanner": "2.2.0",
"rand-token": "1.0.1",
"request": "^2.88.2",
"rimraf": "3.0.2",
"sanitize-filename": "1.6.3",
"sanitize-html": "2.1.1",
"sanitize-html": "2.1.2",
"sax": "1.2.4",
"semver": "7.3.2",
"serve-favicon": "2.5.0",
@ -71,7 +71,7 @@
"turndown": "7.0.0",
"turndown-plugin-gfm": "1.0.2",
"unescape": "1.0.1",
"ws": "7.3.1",
"ws": "7.4.0",
"yauzl": "2.10.0",
"yazl": "2.5.1"
},
@ -86,8 +86,8 @@
"jsdoc": "3.6.6",
"lorem-ipsum": "2.0.3",
"rcedit": "2.2.0",
"webpack": "5.3.2",
"webpack-cli": "4.1.0"
"webpack": "5.6.0",
"webpack-cli": "4.2.0"
},
"optionalDependencies": {
"electron-installer-debian": "2.0.1"

View File

@ -34,7 +34,7 @@ const TPL = `
.save-attributes-button {
color: var(--muted-text-color);
position: absolute;
bottom: 3px;
bottom: 14px;
right: 25px;
cursor: pointer;
border: 1px solid transparent;
@ -44,7 +44,7 @@ const TPL = `
.add-new-attribute-button {
color: var(--muted-text-color);
position: absolute;
bottom: 2px;
bottom: 13px;
right: 0;
cursor: pointer;
border: 1px solid transparent;

View File

@ -4,7 +4,7 @@ const TPL = `
<div class="section-container">
<style>
.section-container {
margin-bottom: 10px;
margin-bottom: 10px;
}
.section-title-container {
@ -12,6 +12,8 @@ const TPL = `
flex-direction: row;
justify-content: center;
margin-top: 7px;
margin-left: 10px;
margin-right: 10px;
}
.section-title {
@ -42,6 +44,8 @@ const TPL = `
.section-body {
display: none;
border-bottom: 1px solid var(--main-border-color);
margin-left: 10px;
margin-right: 10px;
}
.section-body.active {
@ -88,17 +92,7 @@ export default class CollapsibleSectionContainer extends TabAwareWidget {
this.$titleContainer = this.$widget.find('.section-title-container');
this.$bodyContainer = this.$widget.find('.section-body-container');
this.$titleContainer.append('<div class="section-title section-title-empty">');
for (const widget of this.children) {
this.$titleContainer.append(
$('<div class="section-title section-title-real">')
.attr('data-section-component-id', widget.componentId)
.append(widget.renderTitle())
);
this.$titleContainer.append('<div class="section-title section-title-empty">');
this.$bodyContainer.append(
$('<div class="section-body">')
.attr('data-section-component-id', widget.componentId)
@ -115,13 +109,56 @@ export default class CollapsibleSectionContainer extends TabAwareWidget {
this.$bodyContainer.find('.section-body').removeClass("active");
if (activate) {
this.$titleContainer.find(`.section-title-real[data-section-component-id="${$sectionTitle.attr('data-section-component-id')}"]`).addClass("active");
this.$bodyContainer.find(`.section-body[data-section-component-id="${$sectionTitle.attr('data-section-component-id')}"]`).addClass("active");
const sectionComponentId = $sectionTitle.attr('data-section-component-id');
this.lastActiveComponentId = sectionComponentId;
this.$titleContainer.find(`.section-title-real[data-section-component-id="${sectionComponentId}"]`).addClass("active");
this.$bodyContainer.find(`.section-body[data-section-component-id="${sectionComponentId}"]`).addClass("active");
}
else {
this.lastActiveComponentId = null;
}
});
}
async refreshWithNote(note) {
this.$titleContainer.find('.section-title-real:first').trigger('click');
let $sectionToActivate, $lastActiveSection;
this.$titleContainer.empty().append('<div class="section-title section-title-empty">');
for (const widget of this.children) {
const ret = widget.renderTitle(note);
if (!ret.show) {
continue;
}
const $sectionTitle = $('<div class="section-title section-title-real">')
.attr('data-section-component-id', widget.componentId)
.append(ret.$title);
this.$titleContainer.append($sectionTitle);
this.$titleContainer.append('<div class="section-title section-title-empty">');
if (ret.activate && !$sectionToActivate) {
$sectionToActivate = $sectionTitle;
}
if (this.lastActiveComponentId === widget.componentId) {
$lastActiveSection = $sectionTitle;
}
}
if (!$sectionToActivate) {
$sectionToActivate = $lastActiveSection;
}
if ($sectionToActivate) {
$sectionToActivate.trigger('click');
}
else {
this.$bodyContainer.find('.section-body').removeClass("active");
}
}
}

View File

@ -16,7 +16,7 @@ const TPL = `
</style>
<div class="inherited-attributes-container"></div>
</div>`
</div>`;
export default class InheritedAttributesWidget extends TabAwareWidget {
constructor() {
@ -26,9 +26,15 @@ export default class InheritedAttributesWidget extends TabAwareWidget {
this.child(this.attributeDetailWidget);
}
renderTitle() {
this.$title = $('<div>').text('Inherited attributes');
return this.$title;
renderTitle(note) {
const inheritedAttributes = this.getInheritedAttributes(note);
this.$title.text(`Inherited attrs (${inheritedAttributes.length})`);
return {
show: true,
$title: this.$title
};
}
doRender() {
@ -37,12 +43,19 @@ export default class InheritedAttributesWidget extends TabAwareWidget {
this.$container = this.$widget.find('.inherited-attributes-container');
this.$widget.append(this.attributeDetailWidget.render());
this.$title = $('<div>');
}
async refreshWithNote(note) {
this.$container.empty();
const inheritedAttributes = note.getAttributes().filter(attr => attr.noteId !== this.noteId);
const inheritedAttributes = this.getInheritedAttributes(note);
if (inheritedAttributes.length === 0) {
this.$container.append("No inherited attributes.");
return;
}
for (const attribute of inheritedAttributes) {
const $attr = (await attributeRenderer.renderAttribute(attribute, false))
@ -63,4 +76,8 @@ export default class InheritedAttributesWidget extends TabAwareWidget {
.append(" ");
}
}
getInheritedAttributes(note) {
return note.getAttributes().filter(attr => attr.noteId !== this.noteId);
}
}

View File

@ -8,6 +8,7 @@ const TPL = `
.attribute-list {
margin-left: 7px;
margin-right: 7px;
margin-top: 3px;
position: relative;
}
@ -30,9 +31,15 @@ export default class OwnedAttributeListWidget extends TabAwareWidget {
this.child(this.attributeEditorWidget, this.attributeDetailWidget);
}
renderTitle() {
this.$title = $('<div>').text('Owned attributes');
return this.$title;
renderTitle(note) {
const ownedNotes = note.getAttributes().filter(attr => attr.noteId === this.noteId)
this.$title.text(`Owned attrs (${ownedNotes.length})`);
return {
show: true,
$title: this.$title
};
}
doRender() {
@ -41,6 +48,8 @@ export default class OwnedAttributeListWidget extends TabAwareWidget {
this.$widget.find('.attr-editor-placeholder').replaceWith(this.attributeEditorWidget.render());
this.$widget.append(this.attributeDetailWidget.render());
this.$title = $('<div>');
}
async saveAttributesCommand() {
@ -58,6 +67,8 @@ export default class OwnedAttributeListWidget extends TabAwareWidget {
entitiesReloadedEvent({loadResults}) {
if (loadResults.getAttributes(this.componentId).find(attr => attr.isAffecting(this.note))) {
this.refreshWithNote(this.note, true);
this.renderTitle(this.note);
}
}
}

View File

@ -39,11 +39,24 @@ export default class PromotedAttributesWidget extends TabAwareWidget {
this.$widget = $(TPL);
this.overflowing();
this.$container = this.$widget.find(".promoted-attributes-container");
this.$title = $('<div>');
}
renderTitle() {
this.$title = $('<div>').text('Promoted attributes');
return this.$title;
renderTitle(note) {
const promotedDefAttrs = this.getPromotedDefinitionAttributes();
if (promotedDefAttrs.length === 0) {
return { show: false };
}
this.$title.text(`Promoted attrs (${promotedDefAttrs.length})`);
return {
show: true,
activate: true,
$title: this.$title
};
}
async refreshWithNote(note) {
@ -292,6 +305,8 @@ export default class PromotedAttributesWidget extends TabAwareWidget {
entitiesReloadedEvent({loadResults}) {
if (loadResults.getAttributes(this.componentId).find(attr => attr.isAffecting(this.note))) {
this.refresh();
this.renderTitle(this.note);
}
}
}