From 06b4eb74f5eb1ad6a9d0ede035f28e0e987499ed Mon Sep 17 00:00:00 2001 From: Meghea Iulian Date: Wed, 17 Jul 2024 17:39:24 +0300 Subject: [PATCH 1/2] feat(mini): hide columns settings in mini mode Hide omnitable column settings in mini mode --- cosmoz-omnitable-styles.js | 4 + lib/settings/cosmoz-omnitable-settings.js | 266 ++++++++++++---------- lib/settings/use-settings-ui.js | 14 +- package-lock.json | 253 ++++++++++++-------- package.json | 2 +- 5 files changed, 307 insertions(+), 232 deletions(-) diff --git a/cosmoz-omnitable-styles.js b/cosmoz-omnitable-styles.js index 07fcff4a..d829ae4b 100644 --- a/cosmoz-omnitable-styles.js +++ b/cosmoz-omnitable-styles.js @@ -578,4 +578,8 @@ export default css` :host([mini]) .tableContent-scroller::-webkit-scrollbar-button:increment { width: 0px; } + + :host([mini]) cosmoz-omnitable-settings::part(columns){ + display:none; + } `; diff --git a/lib/settings/cosmoz-omnitable-settings.js b/lib/settings/cosmoz-omnitable-settings.js index d14e5e55..48453c37 100644 --- a/lib/settings/cosmoz-omnitable-settings.js +++ b/lib/settings/cosmoz-omnitable-settings.js @@ -8,113 +8,114 @@ import style, { dropdown as dropdownStyle } from './style.css'; import useSettingsUi from './use-settings-ui'; import { close, pull, arrow } from '../icons'; import { when } from 'lit-html/directives/when.js'; +import { sheet } from '@neovici/cosmoz-utils'; /* eslint-disable max-lines-per-function */ -const placement = ['bottom-right', ...defaultPlacement], - renderItem = - ({ - onDragStart, - onDragEnter, - onDragOver, - onDragLeave, - onDrop, - onDown, - onToggle, - collapsed, - filters, - }) => - (column, i) => { - const indeterminate = !!collapsed?.find((c) => c.name === column.name), - checked = !column.disabled && !indeterminate; - return html`
+ (column, i) => { + const indeterminate = !!collapsed?.find((c) => c.name === column.name), + checked = !column.disabled && !indeterminate; + return html`
+ + - - - -
`; - }, - SettingsUI = (host) => { - const { - settings, - settingsId, - onSave, - onReset, - hasChanges, - opened, - setOpened, - ...thru - } = useSettingsUi(host); - return [ - html` - -
- ${_('Sort and filter')} - -
-
-
setOpened((c) => ({ ...c, columns: !c.columns }))} - > - ${_('Columns')} ${arrow} -
- -
${settings.columns?.map(renderItem(thru))}
-
+ +
`; + }; -
setOpened((c) => ({ ...c, sort: !c.sort }))} - > - ${_('Sort on')} ${arrow} -
- ${sort()} +const SettingsUI = (host) => { + const { + settings, + settingsId, + onSave, + onReset, + hasChanges, + opened, + setOpened, + ...thru + } = useSettingsUi(host); + return html`
+ ${_('Sort and filter')} + +
-
setOpened((c) => ({ ...c, group: !c.group }))} - > - ${_('Group on')} ${arrow} -
- - ${group()} - -
- `, - settingsId && +
+
setOpened((c) => ({ ...c, columns: !c.columns }))} + part="columns columns-heading" + > + ${_('Columns')} ${arrow} +
+ +
${settings.columns?.map(renderItem(thru))}
+
+ +
setOpened((c) => ({ ...c, sort: !c.sort }))} + > + ${_('Sort on')} ${arrow} +
+ ${sort()} + +
setOpened((c) => ({ ...c, group: !c.group }))} + > + ${_('Group on')} ${arrow} +
+ ${group()} +
+ + ${when( + settingsId, + () => html`
`, - ].filter(Boolean); - }, - Settings = ({ config, newLayout }) => html` - - html``} - .placement=${newLayout ? ['bottom-left', ...defaultPlacement] : placement} - > - ${newLayout ? - html`
...
` : - html` - + )}`; +}; + +customElements.define( + 'cosmoz-omnitable-settings-ui', + component(SettingsUI, { styleSheets: [sheet(style)] }), +); + +const Settings = ({ config, newLayout }) => html` + + ${when( + newLayout, + () => html`
...
`, + () => + html` - - ` - } + + + `, + )} + ${when(config?.badge, () => html`
`)} + +
+`; - ${when(config?.badge, () => html`
`)} - - `; -customElements.define('cosmoz-omnitable-settings', component(Settings)); -customElements.define('cosmoz-omnitable-settings-ui', component(SettingsUI)); +customElements.define( + 'cosmoz-omnitable-settings', + component(Settings, { styleSheets: [sheet(dropdownStyle)] }), +); diff --git a/lib/settings/use-settings-ui.js b/lib/settings/use-settings-ui.js index 11f1aefe..782baf5b 100644 --- a/lib/settings/use-settings-ui.js +++ b/lib/settings/use-settings-ui.js @@ -19,7 +19,7 @@ export default (host) => { ...cfg, columns, })), - [setSettings] + [setSettings], ), }); @@ -33,7 +33,7 @@ export default (host) => { meta.handle = e.currentTarget; }, - [meta] + [meta], ), onDragStart: useCallback( @@ -53,10 +53,10 @@ export default (host) => { target.addEventListener( 'dragend', (e) => e.target.classList.remove('drag'), - { once: true } + { once: true }, ); }, - [meta] + [meta], ), onDragEnter: useCallback((e) => { @@ -97,11 +97,11 @@ export default (host) => { newSettings.splice( to + (from >= to ? 0 : -1), 0, - newSettings.splice(from, 1)[0] + newSettings.splice(from, 1)[0], ); setSettings(newSettings); }, - [meta] + [meta], ), onToggle: useCallback( @@ -124,7 +124,7 @@ export default (host) => { }); setSettings(newSettings); }, - [meta] + [meta], ), }; }; diff --git a/package-lock.json b/package-lock.json index cda4039f..f37cc45d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,7 @@ "@semantic-release/changelog": "^6.0.0", "@semantic-release/git": "^10.0.0", "husky": "^9.0.0", - "semantic-release": "^23.0.0", + "semantic-release": "^24.0.0", "sinon": "^18.0.0" } }, @@ -1625,9 +1625,9 @@ "dev": true }, "node_modules/@neovici/cfg": { - "version": "1.53.0", - "resolved": "https://registry.npmjs.org/@neovici/cfg/-/cfg-1.53.0.tgz", - "integrity": "sha512-dj3xJSWuQkBq5EZupyXHltS69Xrf85/V6nO3BTuPcVOiaaCMmGp6xpazh88DcPCJgutgbk3Z2JTpuBRObIAQHg==", + "version": "1.55.0", + "resolved": "https://registry.npmjs.org/@neovici/cfg/-/cfg-1.55.0.tgz", + "integrity": "sha512-sme38Lhfm2wZB9L5rRnge5NLF0uVyekJ40l4hVJfeSsZCiv7eM+b5lJxd47u9GS8yQwFbqkx4F6e1NW/iTXHIw==", "dev": true, "dependencies": { "@playwright/test": "^1.40.1", @@ -1638,7 +1638,7 @@ "@web/test-runner": "^0.18.0", "@web/test-runner-commands": "^0.9.0", "@web/test-runner-playwright": "^0.11.0", - "eslint": "^8.42.0", + "eslint": "^8.0.0 || ^9.0.0", "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-alias": "^1.1.2", "eslint-import-resolver-typescript": "^3.2.7", @@ -1650,9 +1650,9 @@ } }, "node_modules/@neovici/cosmoz-autocomplete": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/@neovici/cosmoz-autocomplete/-/cosmoz-autocomplete-8.7.1.tgz", - "integrity": "sha512-HuNh5eGVsJbv3+Peg+Gj1Ifoo2IT2WpvV1qlpprMxJ68oXqJ5HG5FKJGhHacnJQCOTpBmM05vnCJgHy0vVGi1Q==", + "version": "8.9.1", + "resolved": "https://registry.npmjs.org/@neovici/cosmoz-autocomplete/-/cosmoz-autocomplete-8.9.1.tgz", + "integrity": "sha512-pdHoL/LcSN8sXV17TnRBHYqUePGlnVQMexxMsIkltXhj0Nzi24T9mkytXQ+GJgY2+NZABXNOH2YU64sdTHR7Dg==", "dependencies": { "@lit-labs/virtualizer": "^2.0.0", "@neovici/cosmoz-dropdown": "^4.4.0", @@ -1663,11 +1663,14 @@ } }, "node_modules/@neovici/cosmoz-bottom-bar": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@neovici/cosmoz-bottom-bar/-/cosmoz-bottom-bar-7.0.0.tgz", - "integrity": "sha512-WWrXl2Bh/fCQk5MNfMcvFVJXNrVcVTB9bbNUybyKsRl2fxdL5v5GD3Dl2XSjRhgE8PoW0VgCmYo+vYViFkpQ3A==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@neovici/cosmoz-bottom-bar/-/cosmoz-bottom-bar-7.2.2.tgz", + "integrity": "sha512-cwyjDJUn0AKTcWNhEe+jTx+vXMnUdRkPncY3gRTX9Eom7OfsYypo9y2kq/beF4pXJNi/QPcnwSbxtKSd1oro0A==", "dependencies": { + "@neovici/cosmoz-collapse": "^1.5.0", "@neovici/cosmoz-dropdown": "^4.0.0", + "@neovici/cosmoz-utils": "^6.8.1", + "@pionjs/pion": "^2.5.2", "@polymer/polymer": "^3.3.0", "lit-html": "^2.0.0 || ^3.0.0" } @@ -1681,19 +1684,19 @@ } }, "node_modules/@neovici/cosmoz-datetime-input": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@neovici/cosmoz-datetime-input/-/cosmoz-datetime-input-4.0.1.tgz", - "integrity": "sha512-8btpNJqTqkKEwCBwjXNThQFurvABJv/WsX86osN7m0RE9UYwY8Ndxrq/jdkL73705Vc2vdelP1C5hLh/faFq7A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@neovici/cosmoz-datetime-input/-/cosmoz-datetime-input-4.1.0.tgz", + "integrity": "sha512-QkTJxr/JZ+xawxUYeJGpusoA3P1wOKU+WylQJG9+WRVtwpcODyfNBY7DRPQimwBfWYiMKgr3Zs85Ua6qWXyL6Q==", "dependencies": { - "@neovici/cosmoz-input": "^5.0.0", - "@neovici/cosmoz-utils": "^6.0.0", - "@pionjs/pion": "^2.0.0" + "@neovici/cosmoz-input": "^5.0.1", + "@neovici/cosmoz-utils": "^6.9.0", + "@pionjs/pion": "^2.5.2" } }, "node_modules/@neovici/cosmoz-dropdown": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@neovici/cosmoz-dropdown/-/cosmoz-dropdown-4.4.0.tgz", - "integrity": "sha512-OV2w2mhlFQmGCufxTVlO59R9KeU/bln6iY4ml986VTaXa0OIaO8zF2JtwHNiL3KZP6pr8UTSdzMB6XEvCcauJg==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@neovici/cosmoz-dropdown/-/cosmoz-dropdown-4.4.1.tgz", + "integrity": "sha512-u/vudRuAewrNI9hoKP8XjTgmhnrzp1smht0CAyZF6uZLShico03it2WOfPBs/MmklwXZv0vgjmQFxXuyciZRZQ==", "dependencies": { "@neovici/cosmoz-utils": "^6.8.1", "@pionjs/pion": "^2.5.2", @@ -1722,9 +1725,9 @@ } }, "node_modules/@neovici/cosmoz-input": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@neovici/cosmoz-input/-/cosmoz-input-5.0.0.tgz", - "integrity": "sha512-/VgXn27TJ/dPJd3aUoyoso6NIMr4Q6duWR4chxPTc5m70g9fHLB1fTO7/Ph9rUYejYRNUZZ4ie+pNfTl0Cbneg==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@neovici/cosmoz-input/-/cosmoz-input-5.0.3.tgz", + "integrity": "sha512-35bl3immz7+w8FdlrSrjeLC8N/Us+hAb0ZJYliNQNdLT7u+vymxveMeEOdDQPZm0Fs8l24NbNHH4SE6VhIQD4w==", "dependencies": { "@neovici/cosmoz-utils": "^6.0.0", "@pionjs/pion": "^2.0.0", @@ -2694,14 +2697,15 @@ } }, "node_modules/@semantic-release/commit-analyzer": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-12.0.0.tgz", - "integrity": "sha512-qG+md5gdes+xa8zP7lIo1fWE17zRdO8yMCaxh9lyL65TQleoSv8WHHOqRURfghTytUh+NpkSyBprQ5hrkxOKVQ==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-13.0.0.tgz", + "integrity": "sha512-KtXWczvTAB1ZFZ6B4O+w8HkfYm/OgQb1dUGNFZtDgQ0csggrmkq8sTxhd+lwGF8kMb59/RnG9o4Tn7M/I8dQ9Q==", "dev": true, "dependencies": { - "conventional-changelog-angular": "^7.0.0", - "conventional-commits-filter": "^4.0.0", - "conventional-commits-parser": "^5.0.0", + "conventional-changelog-angular": "^8.0.0", + "conventional-changelog-writer": "^8.0.0", + "conventional-commits-filter": "^5.0.0", + "conventional-commits-parser": "^6.0.0", "debug": "^4.0.0", "import-from-esm": "^1.0.3", "lodash-es": "^4.17.21", @@ -2714,6 +2718,45 @@ "semantic-release": ">=20.1.0" } }, + "node_modules/@semantic-release/commit-analyzer/node_modules/conventional-changelog-angular": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-8.0.0.tgz", + "integrity": "sha512-CLf+zr6St0wIxos4bmaKHRXWAcsCXrJU6F4VdNDrGRK3B8LDLKoX3zuMV5GhtbGkVR/LohZ6MT6im43vZLSjmA==", + "dev": true, + "dependencies": { + "compare-func": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@semantic-release/commit-analyzer/node_modules/conventional-commits-parser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-6.0.0.tgz", + "integrity": "sha512-TbsINLp48XeMXR8EvGjTnKGsZqBemisPoyWESlpRyR8lif0lcwzqz+NMtYSj1ooF/WYjSuu7wX0CtdeeMEQAmA==", + "dev": true, + "dependencies": { + "meow": "^13.0.0" + }, + "bin": { + "conventional-commits-parser": "dist/cli/index.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@semantic-release/commit-analyzer/node_modules/meow": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@semantic-release/error": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@semantic-release/error/-/error-3.0.0.tgz", @@ -3101,21 +3144,21 @@ } }, "node_modules/@semantic-release/release-notes-generator": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/@semantic-release/release-notes-generator/-/release-notes-generator-13.0.0.tgz", - "integrity": "sha512-LEeZWb340keMYuREMyxrODPXJJ0JOL8D/mCl74B4LdzbxhtXV2LrPN2QBEcGJrlQhoqLO0RhxQb6masHytKw+A==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@semantic-release/release-notes-generator/-/release-notes-generator-14.0.1.tgz", + "integrity": "sha512-K0w+5220TM4HZTthE5dDpIuFrnkN1NfTGPidJFm04ULT1DEZ9WG89VNXN7F0c+6nMEpWgqmPvb7vY7JkB2jyyA==", "dev": true, "dependencies": { - "conventional-changelog-angular": "^7.0.0", - "conventional-changelog-writer": "^7.0.0", - "conventional-commits-filter": "^4.0.0", - "conventional-commits-parser": "^5.0.0", + "conventional-changelog-angular": "^8.0.0", + "conventional-changelog-writer": "^8.0.0", + "conventional-commits-filter": "^5.0.0", + "conventional-commits-parser": "^6.0.0", "debug": "^4.0.0", "get-stream": "^7.0.0", "import-from-esm": "^1.0.3", "into-stream": "^7.0.0", "lodash-es": "^4.17.21", - "read-pkg-up": "^11.0.0" + "read-package-up": "^11.0.0" }, "engines": { "node": ">=20.8.1" @@ -3124,6 +3167,33 @@ "semantic-release": ">=20.1.0" } }, + "node_modules/@semantic-release/release-notes-generator/node_modules/conventional-changelog-angular": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-8.0.0.tgz", + "integrity": "sha512-CLf+zr6St0wIxos4bmaKHRXWAcsCXrJU6F4VdNDrGRK3B8LDLKoX3zuMV5GhtbGkVR/LohZ6MT6im43vZLSjmA==", + "dev": true, + "dependencies": { + "compare-func": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@semantic-release/release-notes-generator/node_modules/conventional-commits-parser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-6.0.0.tgz", + "integrity": "sha512-TbsINLp48XeMXR8EvGjTnKGsZqBemisPoyWESlpRyR8lif0lcwzqz+NMtYSj1ooF/WYjSuu7wX0CtdeeMEQAmA==", + "dev": true, + "dependencies": { + "meow": "^13.0.0" + }, + "bin": { + "conventional-commits-parser": "dist/cli/index.js" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@semantic-release/release-notes-generator/node_modules/get-stream": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-7.0.1.tgz", @@ -3136,6 +3206,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@semantic-release/release-notes-generator/node_modules/meow": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@sindresorhus/is": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", @@ -4973,32 +5055,43 @@ } }, "node_modules/conventional-changelog-writer": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-7.0.1.tgz", - "integrity": "sha512-Uo+R9neH3r/foIvQ0MKcsXkX642hdm9odUp7TqgFS7BsalTcjzRlIfWZrZR1gbxOozKucaKt5KAbjW8J8xRSmA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-8.0.0.tgz", + "integrity": "sha512-TQcoYGRatlAnT2qEWDON/XSfnVG38JzA7E0wcGScu7RElQBkg9WWgZd1peCWFcWDh1xfb2CfsrcvOn1bbSzztA==", "dev": true, "dependencies": { - "conventional-commits-filter": "^4.0.0", + "@types/semver": "^7.5.5", + "conventional-commits-filter": "^5.0.0", "handlebars": "^4.7.7", - "json-stringify-safe": "^5.0.1", - "meow": "^12.0.1", - "semver": "^7.5.2", - "split2": "^4.0.0" + "meow": "^13.0.0", + "semver": "^7.5.2" }, "bin": { - "conventional-changelog-writer": "cli.mjs" + "conventional-changelog-writer": "dist/cli/index.js" }, "engines": { - "node": ">=16" + "node": ">=18" + } + }, + "node_modules/conventional-changelog-writer/node_modules/meow": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/conventional-commits-filter": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-4.0.0.tgz", - "integrity": "sha512-rnpnibcSOdFcdclpFwWa+pPlZJhXE7l+XK04zxhbWrhgpR96h33QLz8hITTXbcYICxVr3HZFtbtUAQ+4LdBo9A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-5.0.0.tgz", + "integrity": "sha512-tQMagCOC59EVgNZcC5zl7XqO30Wki9i9J3acbUvkaosCT6JX3EeFwJD7Qqp4MCikRnzS18WXV3BLIQ66ytu6+Q==", "dev": true, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/conventional-commits-parser": { @@ -7960,12 +8053,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, "node_modules/json5": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", @@ -8205,9 +8292,9 @@ } }, "node_modules/lit-html": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.1.3.tgz", - "integrity": "sha512-FwIbqDD8O/8lM4vUZ4KvQZjPPNx7V1VhT7vmRB8RBAO0AU6wuTVdoXiu2CivVjEGdugvcbPNBLtPE1y0ifplHA==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.1.4.tgz", + "integrity": "sha512-yKKO2uVv7zYFHlWMfZmqc+4hkmSbFp8jgjdZY9vvR9jr4J8fH6FUMXhr+ljfELgmjpvlF7Z1SJ5n5/Jeqtc9YA==", "dependencies": { "@types/trusted-types": "^2.0.2" } @@ -12321,36 +12408,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read-pkg-up": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-11.0.0.tgz", - "integrity": "sha512-LOVbvF1Q0SZdjClSefZ0Nz5z8u+tIE7mV5NibzmE9VYmDe9CaBbAVtz1veOSZbofrdsilxuDAYnFenukZVp8/Q==", - "deprecated": "Renamed to read-package-up", - "dev": true, - "dependencies": { - "find-up-simple": "^1.0.0", - "read-pkg": "^9.0.0", - "type-fest": "^4.6.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.18.2.tgz", - "integrity": "sha512-+suCYpfJLAe4OXS6+PPXjW3urOS4IoP9waSiLuXfLgqZODKw/aWwASvzqE886wA0kQgGy0mIWyhd87VpqIy6Xg==", - "dev": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/read-pkg/node_modules/parse-json": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.1.0.tgz", @@ -12710,16 +12767,16 @@ "dev": true }, "node_modules/semantic-release": { - "version": "23.1.1", - "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-23.1.1.tgz", - "integrity": "sha512-qqJDBhbtHsjUEMsojWKGuL5lQFCJuPtiXKEIlFKyTzDDGTAE/oyvznaP8GeOr5PvcqBJ6LQz4JCENWPLeehSpA==", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-24.0.0.tgz", + "integrity": "sha512-v46CRPw+9eI3ZuYGF2oAjqPqsfbnfFTwLBgQsv/lch4goD09ytwOTESMN4QIrx/wPLxUGey60/NMx+ANQtWRsA==", "dev": true, "dependencies": { - "@semantic-release/commit-analyzer": "^12.0.0", + "@semantic-release/commit-analyzer": "^13.0.0-beta.1", "@semantic-release/error": "^4.0.0", "@semantic-release/github": "^10.0.0", "@semantic-release/npm": "^12.0.0", - "@semantic-release/release-notes-generator": "^13.0.0", + "@semantic-release/release-notes-generator": "^14.0.0-beta.1", "aggregate-error": "^5.0.0", "cosmiconfig": "^9.0.0", "debug": "^4.0.0", @@ -13965,9 +14022,9 @@ } }, "node_modules/uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "version": "3.18.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.18.0.tgz", + "integrity": "sha512-SyVVbcNBCk0dzr9XL/R/ySrmYf0s372K6/hFklzgcp2lBFyXtw4I7BOdDjlLhE1aVqaI/SHWXWmYdlZxuyF38A==", "dev": true, "optional": true, "bin": { diff --git a/package.json b/package.json index 00fc4aae..7a4ebf2f 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "@semantic-release/changelog": "^6.0.0", "@semantic-release/git": "^10.0.0", "husky": "^9.0.0", - "semantic-release": "^23.0.0", + "semantic-release": "^24.0.0", "sinon": "^18.0.0" } } From 9fc4b01dcbd36db2f44e169ed070f9e5f923dcd7 Mon Sep 17 00:00:00 2001 From: Meghea Iulian Date: Wed, 17 Jul 2024 17:43:28 +0300 Subject: [PATCH 2/2] feat(settings): export parts for groups --- cosmoz-omnitable-styles.js | 2 +- lib/settings/cosmoz-omnitable-settings.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cosmoz-omnitable-styles.js b/cosmoz-omnitable-styles.js index d829ae4b..a159088a 100644 --- a/cosmoz-omnitable-styles.js +++ b/cosmoz-omnitable-styles.js @@ -579,7 +579,7 @@ export default css` width: 0px; } - :host([mini]) cosmoz-omnitable-settings::part(columns){ + :host([mini]) cosmoz-omnitable-settings::part(columns) { display:none; } `; diff --git a/lib/settings/cosmoz-omnitable-settings.js b/lib/settings/cosmoz-omnitable-settings.js index 48453c37..a65a8cfa 100644 --- a/lib/settings/cosmoz-omnitable-settings.js +++ b/lib/settings/cosmoz-omnitable-settings.js @@ -107,10 +107,13 @@ const SettingsUI = (host) => { class="heading" ?data-opened=${opened.group} @click=${() => setOpened((c) => ({ ...c, group: !c.group }))} + part="groups groups-heading" > ${_('Group on')} ${arrow} - ${group()} + ${group()} ${when( @@ -157,7 +160,7 @@ const Settings = ({ config, newLayout }) => html` )} ${when(config?.badge, () => html`
`)}