@ouestfrance/sipa-bms-ui 8.16.0 → 8.17.0
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/components/table/BmsTable.vue.d.ts +3 -1
- package/dist/components/table/UiBmsTable.vue.d.ts +1 -1
- package/dist/helpers/table.helper.d.ts +1 -0
- package/dist/models/table.model.d.ts +2 -1
- package/dist/sipa-bms-ui.css +48 -54
- package/dist/sipa-bms-ui.es.js +106 -97
- package/dist/sipa-bms-ui.es.js.map +1 -1
- package/dist/sipa-bms-ui.umd.js +106 -96
- package/dist/sipa-bms-ui.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/table/BmsTable.stories.js +47 -0
- package/src/components/table/BmsTable.vue +22 -3
- package/src/components/table/UiBmsTable.spec.ts +47 -3
- package/src/components/table/UiBmsTable.stories.js +43 -0
- package/src/components/table/UiBmsTable.vue +51 -91
- package/src/components/table/UiBmsTableRow.vue +18 -3
- package/src/documentation/principles.mdx +73 -7
- package/src/helpers/table.helper.ts +19 -0
- package/src/models/table.model.ts +1 -0
- package/src/showroom/pages/server-table.vue +1 -4
- package/src/showroom/pages/table.vue +3 -0
package/dist/sipa-bms-ui.es.js
CHANGED
|
@@ -50,6 +50,7 @@ var ColumnType = /* @__PURE__ */ ((ColumnType2) => {
|
|
|
50
50
|
var SelectMode = /* @__PURE__ */ ((SelectMode2) => {
|
|
51
51
|
SelectMode2["ALL"] = "all";
|
|
52
52
|
SelectMode2["DEFAULT"] = "default";
|
|
53
|
+
SelectMode2["SINGLE"] = "single";
|
|
53
54
|
return SelectMode2;
|
|
54
55
|
})(SelectMode || {});
|
|
55
56
|
|
|
@@ -308,6 +309,23 @@ const enforceActionsColumnHeader = (headers) => {
|
|
|
308
309
|
console.error("Table component cannot have multiple action columns ");
|
|
309
310
|
return headers.filter((h) => !h?.action).concat(actionsHeaders.length ? actionsHeaders[0] : []);
|
|
310
311
|
};
|
|
312
|
+
const getAlignClass = (header) => {
|
|
313
|
+
const align = !header.align ? "start" : header.align;
|
|
314
|
+
return `u-text-align-${align}`;
|
|
315
|
+
};
|
|
316
|
+
const getHeaderClasses = (header, sort) => {
|
|
317
|
+
const classes = [getAlignClass(header), "bms-table__header-cell"];
|
|
318
|
+
if (header.class) {
|
|
319
|
+
classes.push(header.class);
|
|
320
|
+
}
|
|
321
|
+
if (header.sortable) {
|
|
322
|
+
classes.push("sortable");
|
|
323
|
+
}
|
|
324
|
+
if (sort.key === header.key) {
|
|
325
|
+
classes.push("sorted");
|
|
326
|
+
}
|
|
327
|
+
return classes;
|
|
328
|
+
};
|
|
311
329
|
|
|
312
330
|
const _hoisted_1$$ = ["href", "target"];
|
|
313
331
|
const _hoisted_2$G = ["href", "onClick", "target"];
|
|
@@ -95735,6 +95753,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
95735
95753
|
setup(__props, { emit: __emit }) {
|
|
95736
95754
|
const props = __props;
|
|
95737
95755
|
const emits = __emit;
|
|
95756
|
+
const currentItem = computed(
|
|
95757
|
+
() => props.isChildElement ? props.item.childElement : props.item
|
|
95758
|
+
);
|
|
95738
95759
|
const isItemSelected = (item) => {
|
|
95739
95760
|
return props.selectMode === SelectMode.ALL || !!props.selectedItems.find((it) => _isEqual(item, it));
|
|
95740
95761
|
};
|
|
@@ -95745,7 +95766,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
95745
95766
|
return (_ctx, _cache) => {
|
|
95746
95767
|
return openBlock(), createElementBlock("tr", {
|
|
95747
95768
|
class: normalizeClass(["bms-table__row", {
|
|
95748
|
-
"bms-table__row--selected": isItemSelected(
|
|
95769
|
+
"bms-table__row--selected": isItemSelected(currentItem.value),
|
|
95749
95770
|
"bms-table__row--disabled": __props.isChildElement,
|
|
95750
95771
|
"bms-table__row--dense": __props.dense
|
|
95751
95772
|
}])
|
|
@@ -95757,12 +95778,20 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
95757
95778
|
activated: __props.selectMode === unref(SelectMode).ALL
|
|
95758
95779
|
}, {
|
|
95759
95780
|
default: withCtx(() => [
|
|
95760
|
-
|
|
95781
|
+
__props.selectMode === unref(SelectMode).SINGLE ? (openBlock(), createBlock(BmsInputRadio, {
|
|
95782
|
+
key: 0,
|
|
95783
|
+
name: unref(v4)(),
|
|
95784
|
+
disabled: __props.selectableDisabled,
|
|
95785
|
+
value: currentItem.value,
|
|
95786
|
+
"model-value": isItemSelected(currentItem.value) ? currentItem.value : null,
|
|
95787
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emits("select", currentItem.value))
|
|
95788
|
+
}, null, 8, ["name", "disabled", "value", "model-value"])) : (openBlock(), createBlock(UiBmsInputCheckbox, {
|
|
95789
|
+
key: 1,
|
|
95761
95790
|
name: unref(v4)(),
|
|
95762
95791
|
disabled: __props.selectMode === unref(SelectMode).ALL || __props.selectableDisabled,
|
|
95763
|
-
"model-value": isItemSelected(
|
|
95764
|
-
"onUpdate:modelValue": _cache[
|
|
95765
|
-
}, null, 8, ["name", "disabled", "model-value"])
|
|
95792
|
+
"model-value": isItemSelected(currentItem.value),
|
|
95793
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => emits("select", currentItem.value))
|
|
95794
|
+
}, null, 8, ["name", "disabled", "model-value"]))
|
|
95766
95795
|
]),
|
|
95767
95796
|
_: 1
|
|
95768
95797
|
}, 8, ["direction", "activated"])
|
|
@@ -95810,7 +95839,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
95810
95839
|
}
|
|
95811
95840
|
});
|
|
95812
95841
|
|
|
95813
|
-
const UiBmsTableRow = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
95842
|
+
const UiBmsTableRow = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-2ab3888f"]]);
|
|
95814
95843
|
|
|
95815
95844
|
const _hoisted_1$b = { class: "bms-table" };
|
|
95816
95845
|
const _hoisted_2$9 = { class: "bms-table__actions" };
|
|
@@ -95828,16 +95857,20 @@ const _hoisted_10$1 = {
|
|
|
95828
95857
|
key: 0,
|
|
95829
95858
|
class: "bms-table__loader"
|
|
95830
95859
|
};
|
|
95831
|
-
const _hoisted_11$1 = {
|
|
95832
|
-
|
|
95833
|
-
|
|
95834
|
-
|
|
95835
|
-
const
|
|
95836
|
-
const
|
|
95860
|
+
const _hoisted_11$1 = {
|
|
95861
|
+
ref: "thead",
|
|
95862
|
+
class: "bms-table__header"
|
|
95863
|
+
};
|
|
95864
|
+
const _hoisted_12$1 = { class: "bms-table__headers bms-table__row" };
|
|
95865
|
+
const _hoisted_13$1 = { key: 0 };
|
|
95866
|
+
const _hoisted_14$1 = ["onClick"];
|
|
95867
|
+
const _hoisted_15$1 = { class: "header-content" };
|
|
95868
|
+
const _hoisted_16$1 = { class: "bms-table__body" };
|
|
95869
|
+
const _hoisted_17 = {
|
|
95837
95870
|
key: 1,
|
|
95838
95871
|
class: "bms-table__row"
|
|
95839
95872
|
};
|
|
95840
|
-
const
|
|
95873
|
+
const _hoisted_18 = ["colspan"];
|
|
95841
95874
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
95842
95875
|
__name: "UiBmsTable",
|
|
95843
95876
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -95868,31 +95901,23 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
95868
95901
|
const selectedItems = useModel(__props, "selectedItems");
|
|
95869
95902
|
const emits = __emit;
|
|
95870
95903
|
const pagination = ref(null);
|
|
95871
|
-
const
|
|
95872
|
-
|
|
95873
|
-
|
|
95874
|
-
|
|
95875
|
-
|
|
95904
|
+
const isFocusOnPagination = () => pagination.value?.contains(document.activeElement);
|
|
95905
|
+
watch(
|
|
95906
|
+
() => props.items,
|
|
95907
|
+
async function keepFocusOnPaginationWhenUsed(newVal, oldVal) {
|
|
95908
|
+
if (oldVal.length > 0 && newVal.length > 0 && isFocusOnPagination()) {
|
|
95909
|
+
await nextTick();
|
|
95910
|
+
pagination.value?.focus();
|
|
95911
|
+
}
|
|
95912
|
+
},
|
|
95913
|
+
{ deep: true }
|
|
95914
|
+
);
|
|
95915
|
+
const filteredHeaders = computed(
|
|
95916
|
+
() => enforceActionsColumnHeader(props.headers)
|
|
95917
|
+
);
|
|
95876
95918
|
const tableClass = computed(
|
|
95877
95919
|
() => `bms-table__table bms-table__table--${props.mode}`
|
|
95878
95920
|
);
|
|
95879
|
-
const getAlignClass = (header) => {
|
|
95880
|
-
const align = !header.align ? "start" : header.align;
|
|
95881
|
-
return `u-text-align-${align}`;
|
|
95882
|
-
};
|
|
95883
|
-
const getHeaderClasses = (header) => {
|
|
95884
|
-
const classes = [getAlignClass(header), "bms-table__header-cell"];
|
|
95885
|
-
if (header.class) {
|
|
95886
|
-
classes.push(header.class);
|
|
95887
|
-
}
|
|
95888
|
-
if (header.sortable) {
|
|
95889
|
-
classes.push("sortable");
|
|
95890
|
-
}
|
|
95891
|
-
if (props.sort.key === header.key) {
|
|
95892
|
-
classes.push("sorted");
|
|
95893
|
-
}
|
|
95894
|
-
return classes;
|
|
95895
|
-
};
|
|
95896
95921
|
const getSortComponent = (header) => {
|
|
95897
95922
|
if (!props.sort.key || header.key !== props.sort.key) {
|
|
95898
95923
|
return ChevronsUpDown;
|
|
@@ -95906,41 +95931,19 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
95906
95931
|
return ChevronsUpDown;
|
|
95907
95932
|
}
|
|
95908
95933
|
};
|
|
95909
|
-
const
|
|
95910
|
-
return pagination.value?.contains(document.activeElement);
|
|
95911
|
-
};
|
|
95912
|
-
watch(
|
|
95913
|
-
() => props.items,
|
|
95914
|
-
async (newVal, oldVal) => {
|
|
95915
|
-
if (oldVal.length > 0 && newVal.length > 0 && isFocusOnPagination()) {
|
|
95916
|
-
await nextTick();
|
|
95917
|
-
pagination.value?.focus();
|
|
95918
|
-
}
|
|
95919
|
-
},
|
|
95920
|
-
{ deep: true }
|
|
95921
|
-
);
|
|
95922
|
-
onscroll = () => {
|
|
95923
|
-
if (thead.value) {
|
|
95924
|
-
const { top: theadTop } = thead.value.getBoundingClientRect();
|
|
95925
|
-
const headers = document.getElementsByTagName("header");
|
|
95926
|
-
if (headers.length > 0) {
|
|
95927
|
-
const header = headers[0];
|
|
95928
|
-
const { height: headerHeight } = header.getBoundingClientRect();
|
|
95929
|
-
isHeaderStuck.value = headerHeight === theadTop;
|
|
95930
|
-
}
|
|
95931
|
-
}
|
|
95932
|
-
};
|
|
95933
|
-
const isItemSelected = (item) => {
|
|
95934
|
-
return props.selectMode === SelectMode.ALL || !!selectedItems.value.find((it) => _isEqual(item, it));
|
|
95935
|
-
};
|
|
95934
|
+
const isItemSelected = (item) => props.selectMode === SelectMode.ALL || !!selectedItems.value.find((it) => _isEqual(item, it));
|
|
95936
95935
|
const onItemSelect = (item) => {
|
|
95937
|
-
if (
|
|
95938
|
-
selectedItems.value =
|
|
95939
|
-
(it) => !_isEqual(item, it)
|
|
95940
|
-
);
|
|
95941
|
-
areAllCurrentItemsSelected.value = false;
|
|
95936
|
+
if (props.selectMode === SelectMode.SINGLE) {
|
|
95937
|
+
selectedItems.value = [item];
|
|
95942
95938
|
} else {
|
|
95943
|
-
|
|
95939
|
+
if (isItemSelected(item)) {
|
|
95940
|
+
selectedItems.value = selectedItems.value.filter(
|
|
95941
|
+
(it) => !_isEqual(item, it)
|
|
95942
|
+
);
|
|
95943
|
+
areAllCurrentItemsSelected.value = false;
|
|
95944
|
+
} else {
|
|
95945
|
+
selectedItems.value.push(item);
|
|
95946
|
+
}
|
|
95944
95947
|
}
|
|
95945
95948
|
};
|
|
95946
95949
|
const areAllCurrentItemsSelected = ref(props.selectMode === SelectMode.ALL);
|
|
@@ -95952,7 +95955,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
95952
95955
|
if (props.selectMode === SelectMode.ALL) {
|
|
95953
95956
|
emits("clearSelection");
|
|
95954
95957
|
}
|
|
95955
|
-
if (selectedItems.value.length > props.
|
|
95958
|
+
if (selectedItems.value.length > props.totalSize) {
|
|
95956
95959
|
selectedItems.value = [];
|
|
95957
95960
|
} else {
|
|
95958
95961
|
if (!areAllCurrentItemsSelected.value) {
|
|
@@ -95960,11 +95963,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
95960
95963
|
if (!isItemSelected(item)) {
|
|
95961
95964
|
selectedItems.value.push(item);
|
|
95962
95965
|
}
|
|
95966
|
+
if (item?.childElement && !isItemSelected(item?.childElement)) {
|
|
95967
|
+
selectedItems.value.push(item.childElement);
|
|
95968
|
+
}
|
|
95963
95969
|
});
|
|
95964
95970
|
} else {
|
|
95965
|
-
selectedItems.value =
|
|
95966
|
-
(selectedItem) => !props.items.find((item) => _isEqual(item, selectedItem))
|
|
95967
|
-
);
|
|
95971
|
+
selectedItems.value = [];
|
|
95968
95972
|
}
|
|
95969
95973
|
}
|
|
95970
95974
|
};
|
|
@@ -96037,7 +96041,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
96037
96041
|
_cache[1] || (_cache[1] = createElementVNode("strong", null, "1", -1)),
|
|
96038
96042
|
_cache[2] || (_cache[2] = createTextVNode(" élément du tableau est sélectionné. ", -1))
|
|
96039
96043
|
], 64)) : (openBlock(), createElementBlock("strong", _hoisted_8$2, toDisplayString(selectedItems.value.length) + " éléments du tableau sont sélectionnés. ", 1)),
|
|
96040
|
-
__props.totalSize < __props.maxSelectedSize ? (openBlock(), createElementBlock("span", {
|
|
96044
|
+
__props.totalSize < __props.maxSelectedSize && __props.selectMode !== unref(SelectMode).SINGLE ? (openBlock(), createElementBlock("span", {
|
|
96041
96045
|
key: 2,
|
|
96042
96046
|
class: "select-mode-all",
|
|
96043
96047
|
onClick: selectAll
|
|
@@ -96071,14 +96075,11 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
96071
96075
|
ref_key: "mainComponent",
|
|
96072
96076
|
ref: mainComponent
|
|
96073
96077
|
}, [
|
|
96074
|
-
createElementVNode("thead",
|
|
96075
|
-
|
|
96076
|
-
|
|
96077
|
-
|
|
96078
|
-
|
|
96079
|
-
createElementVNode("tr", _hoisted_11$1, [
|
|
96080
|
-
__props.selectable ? (openBlock(), createElementBlock("th", _hoisted_12$1, [
|
|
96081
|
-
createVNode(UiBmsInputCheckbox, {
|
|
96078
|
+
createElementVNode("thead", _hoisted_11$1, [
|
|
96079
|
+
createElementVNode("tr", _hoisted_12$1, [
|
|
96080
|
+
__props.selectable ? (openBlock(), createElementBlock("th", _hoisted_13$1, [
|
|
96081
|
+
__props.selectMode !== unref(SelectMode).SINGLE ? (openBlock(), createBlock(UiBmsInputCheckbox, {
|
|
96082
|
+
key: 0,
|
|
96082
96083
|
name: "select-all",
|
|
96083
96084
|
disabled: __props.items.length === 0 || __props.selectableDisabled,
|
|
96084
96085
|
"onUpdate:modelValue": [
|
|
@@ -96086,18 +96087,18 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
96086
96087
|
_cache[0] || (_cache[0] = ($event) => areAllCurrentItemsSelected.value = $event)
|
|
96087
96088
|
],
|
|
96088
96089
|
modelValue: areAllCurrentItemsSelected.value
|
|
96089
|
-
}, null, 8, ["disabled", "modelValue"])
|
|
96090
|
+
}, null, 8, ["disabled", "modelValue"])) : createCommentVNode("", true)
|
|
96090
96091
|
])) : createCommentVNode("", true),
|
|
96091
96092
|
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredHeaders.value, (header) => {
|
|
96092
96093
|
return openBlock(), createElementBlock("th", {
|
|
96093
96094
|
style: normalizeStyle({
|
|
96094
96095
|
"--table-cell-width": header?.width || void 0
|
|
96095
96096
|
}),
|
|
96096
|
-
class: normalizeClass(getHeaderClasses(header)),
|
|
96097
|
+
class: normalizeClass(unref(getHeaderClasses)(header, __props.sort)),
|
|
96097
96098
|
key: header.label,
|
|
96098
96099
|
onClick: ($event) => emits("clickHeader", header)
|
|
96099
96100
|
}, [
|
|
96100
|
-
createElementVNode("span",
|
|
96101
|
+
createElementVNode("span", _hoisted_15$1, [
|
|
96101
96102
|
createTextVNode(toDisplayString(header.label) + " ", 1),
|
|
96102
96103
|
header.sortable ? (openBlock(), createBlock(resolveDynamicComponent(getSortComponent(header)), {
|
|
96103
96104
|
key: 0,
|
|
@@ -96105,11 +96106,11 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
96105
96106
|
class: "header-content-sort"
|
|
96106
96107
|
})) : createCommentVNode("", true)
|
|
96107
96108
|
])
|
|
96108
|
-
], 14,
|
|
96109
|
+
], 14, _hoisted_14$1);
|
|
96109
96110
|
}), 128))
|
|
96110
96111
|
])
|
|
96111
|
-
],
|
|
96112
|
-
createElementVNode("tbody",
|
|
96112
|
+
], 512),
|
|
96113
|
+
createElementVNode("tbody", _hoisted_16$1, [
|
|
96113
96114
|
__props.items.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.items, (item) => {
|
|
96114
96115
|
return openBlock(), createElementBlock(Fragment, { key: item }, [
|
|
96115
96116
|
createVNode(UiBmsTableRow, {
|
|
@@ -96144,7 +96145,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
96144
96145
|
selectable: __props.selectable,
|
|
96145
96146
|
headers: filteredHeaders.value,
|
|
96146
96147
|
"select-mode": __props.selectMode,
|
|
96147
|
-
"selectable-disabled": __props.selectableDisabled
|
|
96148
|
+
"selectable-disabled": __props.selectableDisabled,
|
|
96149
|
+
onSelect: onItemSelect
|
|
96148
96150
|
}, createSlots({ _: 2 }, [
|
|
96149
96151
|
renderList(__props.headers, (cell) => {
|
|
96150
96152
|
return {
|
|
@@ -96157,7 +96159,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
96157
96159
|
]), 1032, ["item", "selected-items", "selectable", "headers", "select-mode", "selectable-disabled"])
|
|
96158
96160
|
], true) : createCommentVNode("", true)
|
|
96159
96161
|
], 64);
|
|
96160
|
-
}), 128)) : (openBlock(), createElementBlock("tr",
|
|
96162
|
+
}), 128)) : (openBlock(), createElementBlock("tr", _hoisted_17, [
|
|
96161
96163
|
createElementVNode("td", {
|
|
96162
96164
|
colspan: __props.selectable ? filteredHeaders.value.length + 1 : filteredHeaders.value.length,
|
|
96163
96165
|
class: "bms-table__cell bms-table__cell--empty"
|
|
@@ -96165,7 +96167,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
96165
96167
|
!props.loading ? renderSlot(_ctx.$slots, "empty", { key: 0 }, () => [
|
|
96166
96168
|
_cache[3] || (_cache[3] = createTextVNode("Aucune donnée", -1))
|
|
96167
96169
|
], true) : createCommentVNode("", true)
|
|
96168
|
-
], 8,
|
|
96170
|
+
], 8, _hoisted_18)
|
|
96169
96171
|
]))
|
|
96170
96172
|
])
|
|
96171
96173
|
], 2)) : createCommentVNode("", true),
|
|
@@ -96183,7 +96185,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
96183
96185
|
}
|
|
96184
96186
|
});
|
|
96185
96187
|
|
|
96186
|
-
const UiBmsTable = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-
|
|
96188
|
+
const UiBmsTable = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-45f34152"]]);
|
|
96187
96189
|
|
|
96188
96190
|
const _hoisted_1$a = { class: "filter-button-container" };
|
|
96189
96191
|
const _hoisted_2$8 = {
|
|
@@ -102801,7 +102803,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
102801
102803
|
value: SortValue.default
|
|
102802
102804
|
}) },
|
|
102803
102805
|
selectable: { type: Boolean, default: false },
|
|
102804
|
-
selectableDisabled: { type: Boolean, default: false }
|
|
102806
|
+
selectableDisabled: { type: Boolean, default: false },
|
|
102807
|
+
selectMode: { default: SelectMode.DEFAULT }
|
|
102805
102808
|
}, {
|
|
102806
102809
|
"selectedItems": {
|
|
102807
102810
|
required: false,
|
|
@@ -102934,9 +102937,14 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
102934
102937
|
const onClickHeader = (header) => {
|
|
102935
102938
|
changeSort(header);
|
|
102936
102939
|
};
|
|
102940
|
+
const elementsAndChildElements = computed(() => {
|
|
102941
|
+
const childElements = items.value.map((item) => item.childElement).filter((childElement) => !!childElement);
|
|
102942
|
+
return [...items.value, ...childElements];
|
|
102943
|
+
});
|
|
102937
102944
|
const onSelectAll = () => {
|
|
102938
|
-
selectedItems.value =
|
|
102945
|
+
selectedItems.value = elementsAndChildElements.value;
|
|
102939
102946
|
};
|
|
102947
|
+
const totalSize = computed(() => elementsAndChildElements.value.length);
|
|
102940
102948
|
return (_ctx, _cache) => {
|
|
102941
102949
|
return openBlock(), createBlock(UiBmsTable, {
|
|
102942
102950
|
selectedItems: selectedItems.value,
|
|
@@ -102949,7 +102957,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
102949
102957
|
sort: unref(sort),
|
|
102950
102958
|
selectable: __props.selectable,
|
|
102951
102959
|
selectableDisabled: __props.selectableDisabled,
|
|
102952
|
-
totalSize:
|
|
102960
|
+
totalSize: totalSize.value,
|
|
102961
|
+
selectMode: __props.selectMode,
|
|
102953
102962
|
onClickHeader,
|
|
102954
102963
|
onSelectAll
|
|
102955
102964
|
}, createSlots({
|
|
@@ -103044,12 +103053,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
103044
103053
|
])
|
|
103045
103054
|
};
|
|
103046
103055
|
})
|
|
103047
|
-
]), 1032, ["selectedItems", "loading", "items", "headers", "mode", "hasFilters", "sort", "selectable", "selectableDisabled", "totalSize"]);
|
|
103056
|
+
]), 1032, ["selectedItems", "loading", "items", "headers", "mode", "hasFilters", "sort", "selectable", "selectableDisabled", "totalSize", "selectMode"]);
|
|
103048
103057
|
};
|
|
103049
103058
|
}
|
|
103050
103059
|
});
|
|
103051
103060
|
|
|
103052
|
-
const BmsTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
103061
|
+
const BmsTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-704a7453"]]);
|
|
103053
103062
|
|
|
103054
103063
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
103055
103064
|
__name: "BmsCocarde",
|
|
@@ -105954,5 +105963,5 @@ const createBmsUi = () => ({
|
|
|
105954
105963
|
}
|
|
105955
105964
|
});
|
|
105956
105965
|
|
|
105957
|
-
export { BMS_FORM_VALID_URL_REGEX, BmsAlert, BmsAutocomplete, BmsBackButton, BmsBadge, BmsBetweenInput, BmsBreadcrumb, _sfc_main$1n as BmsButton, BmsCaption, BmsCard, BmsChip, BmsCircularProgress, BmsCocarde, BmsContentPageLayout, BmsDraggableList, BmsEmptyScreen, BmsFilePicker, BmsFixedMenu, BmsFloatingWindow, BmsForm, BmsHeader, BmsHeaderTitle, _sfc_main$1m as BmsIconButton, _sfc_main$15 as BmsInputBooleanCheckbox, BmsInputCheckboxCaption, BmsInputCheckboxCaptionGroup, BmsInputCheckboxGroup, BmsInputCode, _sfc_main$$ as BmsInputDateTime, BmsInputFile, _sfc_main$Z as BmsInputNumber, BmsInputRadio, BmsInputRadioCaption, BmsInputRadioCaptionGroup, BmsInputRadioGroup, _sfc_main$10 as BmsInputText, BmsInputToggle, _sfc_main$1q as BmsLink, BmsLoader, BmsMenu, BmsMenuNav, BmsModal, BmsMultiSelect, BmsNotificationsInstance, BmsOverlay, BmsPagination, BmsProblem, _sfc_main$g as BmsRelativeTime, BmsSearch, BmsSection, BmsSelect, BmsServerAutocomplete, BmsServerTable, BmsShortLinkMenu, BmsSplitWindow, BmsStep, BmsStepper, BmsTable, BmsTabs, BmsTag, BmsTenantSwitcher, BmsTextArea, BmsTooltip, ChipColor, CocardeBorder, ColumnType, ConfirmInstance, InputType, KeycloakAuthAdapterInstance, RuntimeEnv, SelectMode, SortValue, StatusType, TooltipDirection, confirmPlugin, convertStringToCaption, createBmsUi, createRuntimeEnv, defaultSortFunction, enforceActionsColumnHeader, featureFlipperPlugin, fetchRuntimeEnv, field, getCurrentHistory, getCurrentLocation, getFiltersAsQueryParams, getImageFromFile, getNumberFromPathQuery, getStringFromPathQuery, getUserPrefFromLocalStorage, getValueByPath, handleValueInSearchParams, isEmptyStringOrNotDefined, isExternalLink, isFileImage, isProblem, keycloakAuthAdapter, keycloakAuthAdapterInit, notifications, readableDate, reflectFiltersToPath, reflectSearchToPath, relativeDate, relativeDateDefaultFormatFunction, routerHistoryPlugin, sanitizeHtml, sanitizeString, saveValuesToPathQuery, searchString, setUserPrefFromLocalStorage, useClipboard, useConfirm, useFeatureFlipper, useKeycloakAuthAdapter, useNotifications, usePagination, useRouterHistory, useRuntimeEnv, useSearch, useSort, useUserPref, writeLocation };
|
|
105966
|
+
export { BMS_FORM_VALID_URL_REGEX, BmsAlert, BmsAutocomplete, BmsBackButton, BmsBadge, BmsBetweenInput, BmsBreadcrumb, _sfc_main$1n as BmsButton, BmsCaption, BmsCard, BmsChip, BmsCircularProgress, BmsCocarde, BmsContentPageLayout, BmsDraggableList, BmsEmptyScreen, BmsFilePicker, BmsFixedMenu, BmsFloatingWindow, BmsForm, BmsHeader, BmsHeaderTitle, _sfc_main$1m as BmsIconButton, _sfc_main$15 as BmsInputBooleanCheckbox, BmsInputCheckboxCaption, BmsInputCheckboxCaptionGroup, BmsInputCheckboxGroup, BmsInputCode, _sfc_main$$ as BmsInputDateTime, BmsInputFile, _sfc_main$Z as BmsInputNumber, BmsInputRadio, BmsInputRadioCaption, BmsInputRadioCaptionGroup, BmsInputRadioGroup, _sfc_main$10 as BmsInputText, BmsInputToggle, _sfc_main$1q as BmsLink, BmsLoader, BmsMenu, BmsMenuNav, BmsModal, BmsMultiSelect, BmsNotificationsInstance, BmsOverlay, BmsPagination, BmsProblem, _sfc_main$g as BmsRelativeTime, BmsSearch, BmsSection, BmsSelect, BmsServerAutocomplete, BmsServerTable, BmsShortLinkMenu, BmsSplitWindow, BmsStep, BmsStepper, BmsTable, BmsTabs, BmsTag, BmsTenantSwitcher, BmsTextArea, BmsTooltip, ChipColor, CocardeBorder, ColumnType, ConfirmInstance, InputType, KeycloakAuthAdapterInstance, RuntimeEnv, SelectMode, SortValue, StatusType, TooltipDirection, confirmPlugin, convertStringToCaption, createBmsUi, createRuntimeEnv, defaultSortFunction, enforceActionsColumnHeader, featureFlipperPlugin, fetchRuntimeEnv, field, getCurrentHistory, getCurrentLocation, getFiltersAsQueryParams, getHeaderClasses, getImageFromFile, getNumberFromPathQuery, getStringFromPathQuery, getUserPrefFromLocalStorage, getValueByPath, handleValueInSearchParams, isEmptyStringOrNotDefined, isExternalLink, isFileImage, isProblem, keycloakAuthAdapter, keycloakAuthAdapterInit, notifications, readableDate, reflectFiltersToPath, reflectSearchToPath, relativeDate, relativeDateDefaultFormatFunction, routerHistoryPlugin, sanitizeHtml, sanitizeString, saveValuesToPathQuery, searchString, setUserPrefFromLocalStorage, useClipboard, useConfirm, useFeatureFlipper, useKeycloakAuthAdapter, useNotifications, usePagination, useRouterHistory, useRuntimeEnv, useSearch, useSort, useUserPref, writeLocation };
|
|
105958
105967
|
//# sourceMappingURL=sipa-bms-ui.es.js.map
|