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

View File

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

View File

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

View File

@ -4,7 +4,7 @@ const TPL = `
<div class="section-container"> <div class="section-container">
<style> <style>
.section-container { .section-container {
margin-bottom: 10px; margin-bottom: 10px;
} }
.section-title-container { .section-title-container {
@ -12,6 +12,8 @@ const TPL = `
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
margin-top: 7px; margin-top: 7px;
margin-left: 10px;
margin-right: 10px;
} }
.section-title { .section-title {
@ -42,6 +44,8 @@ const TPL = `
.section-body { .section-body {
display: none; display: none;
border-bottom: 1px solid var(--main-border-color); border-bottom: 1px solid var(--main-border-color);
margin-left: 10px;
margin-right: 10px;
} }
.section-body.active { .section-body.active {
@ -88,17 +92,7 @@ export default class CollapsibleSectionContainer extends TabAwareWidget {
this.$titleContainer = this.$widget.find('.section-title-container'); this.$titleContainer = this.$widget.find('.section-title-container');
this.$bodyContainer = this.$widget.find('.section-body-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) { 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( this.$bodyContainer.append(
$('<div class="section-body">') $('<div class="section-body">')
.attr('data-section-component-id', widget.componentId) .attr('data-section-component-id', widget.componentId)
@ -115,13 +109,56 @@ export default class CollapsibleSectionContainer extends TabAwareWidget {
this.$bodyContainer.find('.section-body').removeClass("active"); this.$bodyContainer.find('.section-body').removeClass("active");
if (activate) { if (activate) {
this.$titleContainer.find(`.section-title-real[data-section-component-id="${$sectionTitle.attr('data-section-component-id')}"]`).addClass("active"); const sectionComponentId = $sectionTitle.attr('data-section-component-id');
this.$bodyContainer.find(`.section-body[data-section-component-id="${$sectionTitle.attr('data-section-component-id')}"]`).addClass("active");
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) { 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> </style>
<div class="inherited-attributes-container"></div> <div class="inherited-attributes-container"></div>
</div>` </div>`;
export default class InheritedAttributesWidget extends TabAwareWidget { export default class InheritedAttributesWidget extends TabAwareWidget {
constructor() { constructor() {
@ -26,9 +26,15 @@ export default class InheritedAttributesWidget extends TabAwareWidget {
this.child(this.attributeDetailWidget); this.child(this.attributeDetailWidget);
} }
renderTitle() { renderTitle(note) {
this.$title = $('<div>').text('Inherited attributes'); const inheritedAttributes = this.getInheritedAttributes(note);
return this.$title;
this.$title.text(`Inherited attrs (${inheritedAttributes.length})`);
return {
show: true,
$title: this.$title
};
} }
doRender() { doRender() {
@ -37,12 +43,19 @@ export default class InheritedAttributesWidget extends TabAwareWidget {
this.$container = this.$widget.find('.inherited-attributes-container'); this.$container = this.$widget.find('.inherited-attributes-container');
this.$widget.append(this.attributeDetailWidget.render()); this.$widget.append(this.attributeDetailWidget.render());
this.$title = $('<div>');
} }
async refreshWithNote(note) { async refreshWithNote(note) {
this.$container.empty(); 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) { for (const attribute of inheritedAttributes) {
const $attr = (await attributeRenderer.renderAttribute(attribute, false)) const $attr = (await attributeRenderer.renderAttribute(attribute, false))
@ -63,4 +76,8 @@ export default class InheritedAttributesWidget extends TabAwareWidget {
.append(" "); .append(" ");
} }
} }
getInheritedAttributes(note) {
return note.getAttributes().filter(attr => attr.noteId !== this.noteId);
}
} }

View File

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