sit-onyx 1.0.0-beta.331 → 1.0.0-beta.333
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm-bundler.js +9 -4
- package/dist/index.esm-bundler.js.map +1 -1
- package/dist/index.js +278 -274
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/styles/variables/density-compact.css +1 -1
- package/src/styles/variables/density-cozy.css +1 -1
- package/src/styles/variables/density-default.css +1 -1
- package/src/styles/variables/spacing.css +1 -1
- package/src/styles/variables/themes/onyx.css +1 -1
- package/src/styles/variables/themes/value.css +13 -1
|
@@ -7114,8 +7114,12 @@ const useSelection = (options) => createFeature((ctx) => {
|
|
|
7114
7114
|
selectionState.value.contingent.delete(id);
|
|
7115
7115
|
}
|
|
7116
7116
|
};
|
|
7117
|
-
const
|
|
7118
|
-
const
|
|
7117
|
+
const isHeaderIndeterminate = () => selectionState.value.contingent.size !== 0 && selectionState.value.contingent.size !== rowsCount.value;
|
|
7118
|
+
const isHeaderChecked = () => {
|
|
7119
|
+
const { contingent, selectMode } = selectionState.value;
|
|
7120
|
+
if (selectMode === "exclude") return contingent.size === 0;
|
|
7121
|
+
return contingent.size > 0 && contingent.size === rowsCount.value;
|
|
7122
|
+
};
|
|
7119
7123
|
const modifyColumns = {
|
|
7120
7124
|
func: (cols) => {
|
|
7121
7125
|
if (!isEnabled.value()) return [...cols];
|
|
@@ -7149,9 +7153,10 @@ const useSelection = (options) => createFeature((ctx) => {
|
|
|
7149
7153
|
label: selectionState.value.selectMode === "include" ? ctx.i18n.t.value("dataGrid.head.selection.selectAll") : ctx.i18n.t.value("dataGrid.head.selection.deselectAll"),
|
|
7150
7154
|
value: `selection-all-rows`,
|
|
7151
7155
|
hideLabel: true,
|
|
7152
|
-
indeterminate:
|
|
7156
|
+
indeterminate: isHeaderIndeterminate(),
|
|
7157
|
+
disabled: rowsCount.value === 0,
|
|
7153
7158
|
"onUpdate:modelValue": (checked) => updateSelectMode(checked),
|
|
7154
|
-
modelValue:
|
|
7159
|
+
modelValue: isHeaderChecked()
|
|
7155
7160
|
})
|
|
7156
7161
|
},
|
|
7157
7162
|
cell: {
|