@shwfed/config 2.12.3 → 2.12.5
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/module.json +1 -1
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/runtime.vue +9 -2
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.d.ts +8 -2
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.js +3 -3
- package/dist/runtime/components/actions/components/group.vue +3 -1
- package/dist/runtime/components/actions/schema.d.ts +16 -4
- package/dist/runtime/components/actions/schema.js +5 -5
- package/dist/runtime/components/config/footer.d.vue.ts +4 -0
- package/dist/runtime/components/config/footer.vue +25 -12
- package/dist/runtime/components/config/footer.vue.d.ts +4 -0
- package/dist/runtime/components/config/history-picker.d.vue.ts +15 -0
- package/dist/runtime/components/config/history-picker.vue +155 -0
- package/dist/runtime/components/config/history-picker.vue.d.ts +15 -0
- package/dist/runtime/components/config/index.d.vue.ts +4 -0
- package/dist/runtime/components/config/index.vue +8 -1
- package/dist/runtime/components/config/index.vue.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +24 -24
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +24 -24
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +4 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +4 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +30 -30
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +30 -30
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/row.vue +6 -1
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +9 -3
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +24 -24
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +24 -24
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +10 -10
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/schema.js +1 -1
- package/dist/runtime/components/form/index.vue +5 -1
- package/dist/runtime/components/form/utils/derived.d.ts +9 -0
- package/dist/runtime/components/form/utils/derived.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +6 -6
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +6 -6
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +6 -6
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +6 -6
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue +224 -133
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue +224 -133
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/customization.d.vue.ts +15 -0
- package/dist/runtime/components/table/customization.vue +633 -0
- package/dist/runtime/components/table/customization.vue.d.ts +15 -0
- package/dist/runtime/components/table/index.vue +69 -6
- package/dist/runtime/components/table/utils/customization.d.ts +158 -0
- package/dist/runtime/components/table/utils/customization.js +315 -0
- package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
- package/dist/runtime/vendor/cel-js/CLAUDE.md +6 -5
- package/dist/runtime/vendor/cel-js/PROMPT.md +97 -19
- package/dist/runtime/vendor/cel-js/lib/decimal.d.ts +4 -0
- package/dist/runtime/vendor/cel-js/lib/decimal.js +35 -0
- package/dist/runtime/vendor/cel-js/lib/evaluator.js +2 -0
- package/dist/runtime/vendor/cel-js/lib/functions.js +107 -134
- package/dist/runtime/vendor/cel-js/lib/macros.js +125 -16
- package/dist/runtime/vendor/cel-js/lib/math-builtins.d.ts +2 -0
- package/dist/runtime/vendor/cel-js/lib/math-builtins.js +39 -0
- package/dist/runtime/vendor/cel-js/lib/optional.d.ts +4 -0
- package/dist/runtime/vendor/cel-js/lib/optional.js +73 -21
- package/dist/runtime/vendor/cel-js/lib/parser.js +2 -6
- package/dist/runtime/vendor/cel-js/lib/registry.js +2 -2
- package/package.json +1 -1
|
@@ -28,6 +28,11 @@ import ShwfedActions from "../actions/components/group.vue";
|
|
|
28
28
|
import ShwfedForm from "../form/index.vue";
|
|
29
29
|
import { evaluateInitial } from "../form/utils/initial";
|
|
30
30
|
import { provideTableInstanceId } from "./utils/instance";
|
|
31
|
+
import {
|
|
32
|
+
mergeCustomization,
|
|
33
|
+
useTableCustomization
|
|
34
|
+
} from "./utils/customization";
|
|
35
|
+
import TableCustomization from "./customization.vue";
|
|
31
36
|
import { provideSharedFetchLayer } from "./utils/shared-fetch";
|
|
32
37
|
import { provideEventTarget } from "../../share/event-bus";
|
|
33
38
|
import { usePersistedQuery } from "../../share/use-persisted-query";
|
|
@@ -50,6 +55,8 @@ const persistedQuery = usePersistedQuery(
|
|
|
50
55
|
queryState,
|
|
51
56
|
() => config.value?.persistQuery === true
|
|
52
57
|
);
|
|
58
|
+
const customization = useTableCustomization(config.value?.id);
|
|
59
|
+
customization.load();
|
|
53
60
|
const { t, locale } = useI18n({
|
|
54
61
|
inheritLocale: true,
|
|
55
62
|
messages: {
|
|
@@ -118,9 +125,20 @@ function freezeGrowColumns() {
|
|
|
118
125
|
frozenGrowColumns.value = next;
|
|
119
126
|
}
|
|
120
127
|
function onResizeMouseDown(header, event) {
|
|
128
|
+
resizeGestureSeen = true;
|
|
121
129
|
freezeGrowColumns();
|
|
122
130
|
header.getResizeHandler()(event);
|
|
123
131
|
}
|
|
132
|
+
let resizeGestureSeen = false;
|
|
133
|
+
function restoreFrozenGrowColumns() {
|
|
134
|
+
const userSizing = customization.snapshot()?.columnSizing;
|
|
135
|
+
if (!userSizing) return;
|
|
136
|
+
const grows = (config.value?.columns ?? []).filter((c) => c.grow === true && userSizing[c.id] !== void 0);
|
|
137
|
+
if (grows.length === 0) return;
|
|
138
|
+
const next = new Set(frozenGrowColumns.value);
|
|
139
|
+
grows.forEach((c) => next.add(c.id));
|
|
140
|
+
frozenGrowColumns.value = next;
|
|
141
|
+
}
|
|
124
142
|
function growLeafCount(header) {
|
|
125
143
|
return header.getLeafHeaders().filter((h2) => isEffectiveGrow(h2.column)).length;
|
|
126
144
|
}
|
|
@@ -301,6 +319,10 @@ const tableApi = useVueTable({
|
|
|
301
319
|
getSortedRowModel: getSortedRowModel(),
|
|
302
320
|
columnResizeMode: "onChange"
|
|
303
321
|
});
|
|
322
|
+
watch(() => tableApi.getState().columnSizing, (sizing) => {
|
|
323
|
+
if (!resizeGestureSeen) return;
|
|
324
|
+
customization.persistPatch({ columnSizing: { ...sizing } });
|
|
325
|
+
});
|
|
304
326
|
provideCELContext({
|
|
305
327
|
selected: {
|
|
306
328
|
type: "list<dyn>",
|
|
@@ -519,7 +541,7 @@ const sortedRowIndexMap = computed(() => {
|
|
|
519
541
|
function getDisplayIndex(row) {
|
|
520
542
|
return sortedRowIndexMap.value.get(row.id) ?? row.index;
|
|
521
543
|
}
|
|
522
|
-
watch(config, (config2) => {
|
|
544
|
+
watch([config, customization.revision], ([config2]) => {
|
|
523
545
|
if (!config2) return;
|
|
524
546
|
const initialState = config2.initialState;
|
|
525
547
|
const hiddenSeed = {};
|
|
@@ -528,17 +550,47 @@ watch(config, (config2) => {
|
|
|
528
550
|
}
|
|
529
551
|
const hasSeed = Object.keys(hiddenSeed).length > 0;
|
|
530
552
|
const effective = initialState || hasSeed ? { ...initialState ?? {}, columnVisibility: { ...hiddenSeed, ...initialState?.columnVisibility ?? {} } } : void 0;
|
|
531
|
-
const
|
|
532
|
-
|
|
553
|
+
const { state: merged, pageSize: pageSizeOverride } = mergeCustomization(
|
|
554
|
+
effective,
|
|
555
|
+
customization.snapshot(),
|
|
556
|
+
buildCustomizationContext(config2),
|
|
557
|
+
{ explicit: customization.wasCustomized() }
|
|
558
|
+
);
|
|
559
|
+
const nextKey = merged ? JSON.stringify({ merged, pageSize: pageSizeOverride ?? null }) : "";
|
|
560
|
+
if (appliedInitialStateKey.value === nextKey || !merged) {
|
|
533
561
|
appliedInitialStateKey.value = nextKey;
|
|
534
562
|
syncPaginationPageSize();
|
|
535
563
|
return;
|
|
536
564
|
}
|
|
537
|
-
tableApi.initialState = mergeInitialState(tableApi.initialState,
|
|
565
|
+
tableApi.initialState = mergeInitialState(tableApi.initialState, merged, pageSizeOverride);
|
|
538
566
|
tableApi.reset();
|
|
567
|
+
restoreFrozenGrowColumns();
|
|
539
568
|
appliedInitialStateKey.value = nextKey;
|
|
540
569
|
syncPaginationPageSize();
|
|
541
570
|
}, { immediate: true });
|
|
571
|
+
function buildCustomizationContext(config2) {
|
|
572
|
+
return {
|
|
573
|
+
columnIds: new Set(config2.columns.map((c) => c.id)),
|
|
574
|
+
pageSizes: config2.pagination?.pageSizes ?? [],
|
|
575
|
+
paginationEnabled: config2.pagination !== void 0
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
function onCustomizationConfirm(payload) {
|
|
579
|
+
customization.persistPatch(payload);
|
|
580
|
+
if (payload.columnVisibility) tableApi.setColumnVisibility({ ...payload.columnVisibility });
|
|
581
|
+
if (payload.columnOrder) tableApi.setColumnOrder([...payload.columnOrder]);
|
|
582
|
+
if (payload.columnPinning) {
|
|
583
|
+
tableApi.setColumnPinning({
|
|
584
|
+
left: [...payload.columnPinning.left],
|
|
585
|
+
right: [...payload.columnPinning.right]
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
function resetCustomization() {
|
|
590
|
+
customization.clear();
|
|
591
|
+
resizeGestureSeen = false;
|
|
592
|
+
frozenGrowColumns.value = /* @__PURE__ */ new Set();
|
|
593
|
+
}
|
|
542
594
|
defineExpose(tableApi);
|
|
543
595
|
const rows = computed(() => isPaginationEnabled.value ? tableApi.getRowModel().rows : tableApi.getPrePaginationRowModel().rows);
|
|
544
596
|
const maxPage = computed(() => isPaginationEnabled.value ? Math.max(tableApi.getPageCount(), 1) : 1);
|
|
@@ -635,6 +687,7 @@ const currentPageSize = computed({
|
|
|
635
687
|
const nextPageSize = Number(value);
|
|
636
688
|
if (!Number.isInteger(nextPageSize) || nextPageSize <= 0) return;
|
|
637
689
|
tableApi.setPageSize(nextPageSize);
|
|
690
|
+
customization.persistPatch({ pageSize: nextPageSize });
|
|
638
691
|
}
|
|
639
692
|
});
|
|
640
693
|
function syncPaginationPageSize() {
|
|
@@ -659,7 +712,7 @@ function normalizeExpandedState(expanded, current) {
|
|
|
659
712
|
if (expanded === false) return {};
|
|
660
713
|
return expanded;
|
|
661
714
|
}
|
|
662
|
-
function mergeInitialState(current, initialState) {
|
|
715
|
+
function mergeInitialState(current, initialState, pageSizeOverride) {
|
|
663
716
|
return {
|
|
664
717
|
...current,
|
|
665
718
|
columnVisibility: initialState.columnVisibility ?? current.columnVisibility,
|
|
@@ -680,7 +733,7 @@ function mergeInitialState(current, initialState) {
|
|
|
680
733
|
columnSizing: initialState.columnSizing ?? current.columnSizing,
|
|
681
734
|
pagination: isPaginationEnabled.value ? {
|
|
682
735
|
pageIndex: paginationConfig.value?.pageIndex ?? current.pagination.pageIndex,
|
|
683
|
-
pageSize: paginationConfig.value?.pageSize ?? current.pagination.pageSize
|
|
736
|
+
pageSize: pageSizeOverride ?? paginationConfig.value?.pageSize ?? current.pagination.pageSize
|
|
684
737
|
} : current.pagination,
|
|
685
738
|
rowSelection: initialState.rowSelection ?? current.rowSelection
|
|
686
739
|
};
|
|
@@ -724,6 +777,16 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
|
|
|
724
777
|
class="absolute inset-0 bg-white/20 z-30 pointer-events-auto"
|
|
725
778
|
aria-hidden="true"
|
|
726
779
|
/>
|
|
780
|
+
<!-- User-land customization trigger: floats over the sticky thead's
|
|
781
|
+
far-right corner, outside the scroll container so it neither moves
|
|
782
|
+
on horizontal scroll nor collides with right-pinned columns. -->
|
|
783
|
+
<TableCustomization
|
|
784
|
+
v-if="config?.id"
|
|
785
|
+
:config="config"
|
|
786
|
+
:table-api="tableApi"
|
|
787
|
+
@confirm="onCustomizationConfirm"
|
|
788
|
+
@reset="resetCustomization"
|
|
789
|
+
/>
|
|
727
790
|
<ClientOnly>
|
|
728
791
|
<!-- Scrollable table container -->
|
|
729
792
|
<div
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { InitialStateValue } from '../schema.js';
|
|
2
|
+
export interface TableCustomizationSnapshot {
|
|
3
|
+
v: 1;
|
|
4
|
+
columnVisibility?: Record<string, boolean>;
|
|
5
|
+
columnOrder?: string[];
|
|
6
|
+
columnPinning?: {
|
|
7
|
+
left: string[];
|
|
8
|
+
right: string[];
|
|
9
|
+
};
|
|
10
|
+
columnSizing?: Record<string, number>;
|
|
11
|
+
pageSize?: number;
|
|
12
|
+
}
|
|
13
|
+
export type TableCustomizationPatch = Partial<Omit<TableCustomizationSnapshot, 'v'>>;
|
|
14
|
+
export interface CustomizationContext {
|
|
15
|
+
columnIds: ReadonlySet<string>;
|
|
16
|
+
pageSizes: ReadonlyArray<number>;
|
|
17
|
+
paginationEnabled: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Parse a raw localStorage value into a snapshot. Anything off — null, bad
|
|
21
|
+
* JSON, wrong version, non-object — yields `undefined` (treated as "no
|
|
22
|
+
* customization"). Slices are validated individually so one corrupted field
|
|
23
|
+
* drops alone instead of discarding the whole snapshot.
|
|
24
|
+
*/
|
|
25
|
+
export declare function parseSnapshot(raw: string | null): TableCustomizationSnapshot | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Reconcile a snapshot against the live column set: entries referencing
|
|
28
|
+
* columns the designer has since deleted are dropped, and a persisted
|
|
29
|
+
* `pageSize` survives only while it is still one of the configured
|
|
30
|
+
* `pageSizes`.
|
|
31
|
+
*
|
|
32
|
+
* Emptied-by-prune rule for the wholesale slices (`columnOrder`,
|
|
33
|
+
* `columnPinning`): a slice that was non-empty but lost every entry to
|
|
34
|
+
* pruning is removed entirely — the user's whole choice referenced dead
|
|
35
|
+
* columns, so the designer's slice should apply again. A slice the user
|
|
36
|
+
* deliberately saved empty (e.g. unpinned everything) stays authoritative.
|
|
37
|
+
*/
|
|
38
|
+
export declare function pruneSnapshot(snapshot: TableCustomizationSnapshot, ctx: CustomizationContext): TableCustomizationSnapshot;
|
|
39
|
+
export interface MergedCustomization {
|
|
40
|
+
state?: InitialStateValue;
|
|
41
|
+
pageSize?: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Fold a user snapshot over the designer's effective initial state.
|
|
45
|
+
*
|
|
46
|
+
* - Per-key slices (`columnVisibility`, `columnSizing`) merge entry-wise, user
|
|
47
|
+
* over design — an explicit user `true` re-shows a designer-hidden column.
|
|
48
|
+
* - Wholesale slices (`columnOrder`, `columnPinning`) are taken from the user
|
|
49
|
+
* when present (after pruning), else from the design.
|
|
50
|
+
* - `sorting` / `rowPinning` / `expanded` / `grouping` / `rowSelection` are
|
|
51
|
+
* designer-only and pass through untouched.
|
|
52
|
+
*
|
|
53
|
+
* With a snapshot present, every user-editable slice is emitted explicitly
|
|
54
|
+
* (empty rather than absent) so the host's `mergeInitialState` overrides stale
|
|
55
|
+
* live state instead of falling through to it. `explicit` forces that same
|
|
56
|
+
* fully-specified output when the snapshot is absent — the reset path, where
|
|
57
|
+
* previously-applied user state must not survive the fall-through. Without a
|
|
58
|
+
* snapshot and without `explicit`, the design passes through unchanged
|
|
59
|
+
* (identical to pre-customization behavior).
|
|
60
|
+
*/
|
|
61
|
+
export declare function mergeCustomization(design: InitialStateValue | undefined, snapshot: TableCustomizationSnapshot | undefined, ctx: CustomizationContext, options?: {
|
|
62
|
+
explicit?: boolean;
|
|
63
|
+
}): MergedCustomization;
|
|
64
|
+
/**
|
|
65
|
+
* Rebuild a full leaf `columnOrder` from the modal's draft. Locked columns
|
|
66
|
+
* (select / drag-handle — structural, not shown in the modal) keep their
|
|
67
|
+
* current slots; the remaining slots are filled with the draft order. Draft
|
|
68
|
+
* ids missing from the current order (shouldn't happen, but a stale draft is
|
|
69
|
+
* cheap to tolerate) append at the end.
|
|
70
|
+
*/
|
|
71
|
+
export declare function weaveLockedColumns(currentLeafOrder: ReadonlyArray<string>, lockedIds: ReadonlySet<string>, draftOrder: ReadonlyArray<string>): string[];
|
|
72
|
+
export type DraftBand = 'left' | 'main' | 'right' | 'hidden';
|
|
73
|
+
export type DraftBands = Record<DraftBand, string[]>;
|
|
74
|
+
export type GroupOf = (id: string) => string | undefined;
|
|
75
|
+
export type DraftAnchor = {
|
|
76
|
+
at: 'append';
|
|
77
|
+
} | {
|
|
78
|
+
at: 'before' | 'after';
|
|
79
|
+
ref: string;
|
|
80
|
+
};
|
|
81
|
+
export declare function bandOf(bands: DraftBands, id: string): DraftBand | undefined;
|
|
82
|
+
/** A group's members currently in the visible bands, in order. */
|
|
83
|
+
export declare function groupVisibleMembers(bands: DraftBands, groupOf: GroupOf, groupId: string): string[];
|
|
84
|
+
/** A group's members currently in the hidden band, in order. */
|
|
85
|
+
export declare function groupHiddenMembers(bands: DraftBands, groupOf: GroupOf, groupId: string): string[];
|
|
86
|
+
/** The single visible band a group occupies, or undefined when fully hidden. */
|
|
87
|
+
export declare function bandOfGroup(bands: DraftBands, groupOf: GroupOf, groupId: string): DraftBand | undefined;
|
|
88
|
+
export declare function groupEdgeMember(bands: DraftBands, groupOf: GroupOf, groupId: string, edge: 'first' | 'last'): string | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Remove `runIds` from wherever they sit, then reinsert them — contiguous, in
|
|
91
|
+
* the given order — at `anchor` within `band`.
|
|
92
|
+
*/
|
|
93
|
+
export declare function moveRun(bands: DraftBands, runIds: readonly string[], band: DraftBand, anchor: DraftAnchor): DraftBands;
|
|
94
|
+
/**
|
|
95
|
+
* Safety weld: re-collect each group's members into one contiguous run.
|
|
96
|
+
*
|
|
97
|
+
* - Visible members collapse into the group's "home" band (the first visible
|
|
98
|
+
* band holding any member) as a single run.
|
|
99
|
+
* - Hidden members are welded WITHIN the hidden band only — never merged with
|
|
100
|
+
* the visible bands (that would silently un-hide them), so a fully-hidden
|
|
101
|
+
* group still renders as one folder in the hidden pane.
|
|
102
|
+
*
|
|
103
|
+
* A no-op on already-welded input — the only state the designer or a prior
|
|
104
|
+
* confirm ever produce — it exists so a drifted / corrupted snapshot, or a
|
|
105
|
+
* multi-step drag, can't render a fragmented group.
|
|
106
|
+
*/
|
|
107
|
+
export declare function weldGroups(bands: DraftBands, groupOf: GroupOf): DraftBands;
|
|
108
|
+
export interface DraftRowDrop {
|
|
109
|
+
sourceKind: 'group' | 'column';
|
|
110
|
+
sourceId: string;
|
|
111
|
+
sourceGroupId?: string;
|
|
112
|
+
targetKind: 'group' | 'column';
|
|
113
|
+
targetId: string;
|
|
114
|
+
before: boolean;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Resolve a row-to-row drop into the next bands. Assumes the drop already
|
|
118
|
+
* passed the modal's `canDrop` gate (group↔group, group↔standalone,
|
|
119
|
+
* same-group member reorder, standalone↔standalone) — combinations outside
|
|
120
|
+
* that set return the bands unchanged. A group source carries its whole run,
|
|
121
|
+
* which is its hidden members when the group is being revived from a
|
|
122
|
+
* fully-hidden state (see `groupRun`).
|
|
123
|
+
*/
|
|
124
|
+
export declare function applyRowDrop(bands: DraftBands, groupOf: GroupOf, drop: DraftRowDrop): DraftBands;
|
|
125
|
+
export interface DraftZoneDrop {
|
|
126
|
+
sourceKind: 'group' | 'column';
|
|
127
|
+
sourceId: string;
|
|
128
|
+
band: DraftBand;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Resolve a drop onto a band zone (pin-left / pin-right / main filler /
|
|
132
|
+
* hidden). A group source carries its whole run — its visible members when
|
|
133
|
+
* hiding / re-pinning a visible group, or its hidden members when reviving a
|
|
134
|
+
* fully-hidden group back into a visible band (see `groupRun`).
|
|
135
|
+
*/
|
|
136
|
+
export declare function applyZoneDrop(bands: DraftBands, groupOf: GroupOf, drop: DraftZoneDrop): DraftBands;
|
|
137
|
+
/**
|
|
138
|
+
* Owns the localStorage-backed customization snapshot for one table.
|
|
139
|
+
*
|
|
140
|
+
* Modeled on `usePersistedQuery`: storage is keyed on the table's stable
|
|
141
|
+
* `config.id`, every access is SSR- and privacy-mode-guarded, and the feature
|
|
142
|
+
* is fully off without an id.
|
|
143
|
+
*
|
|
144
|
+
* The snapshot itself is deliberately NON-reactive; `revision` is bumped only
|
|
145
|
+
* by `load()` and `clear()`. Live captures (resize, page size) and the modal
|
|
146
|
+
* confirm go through `persistPatch`, which updates storage and the in-memory
|
|
147
|
+
* snapshot WITHOUT bumping `revision` — so they never re-trigger the host's
|
|
148
|
+
* `watch([config, revision])` and its `tableApi.reset()` (which would nuke row
|
|
149
|
+
* selection). A later config change still re-reads the fresh snapshot.
|
|
150
|
+
*/
|
|
151
|
+
export declare function useTableCustomization(tableId: string | undefined): {
|
|
152
|
+
revision: import("vue").Ref<number, number>;
|
|
153
|
+
load: () => void;
|
|
154
|
+
snapshot: () => TableCustomizationSnapshot | undefined;
|
|
155
|
+
persistPatch: (patch: TableCustomizationPatch) => void;
|
|
156
|
+
clear: () => void;
|
|
157
|
+
wasCustomized: () => boolean;
|
|
158
|
+
};
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
const STORAGE_PREFIX = "shwfed.table.customization.";
|
|
3
|
+
function isRecordOf(x, check) {
|
|
4
|
+
return typeof x === "object" && x !== null && !Array.isArray(x) && Object.values(x).every(check);
|
|
5
|
+
}
|
|
6
|
+
const isBoolean = (v) => typeof v === "boolean";
|
|
7
|
+
const isFiniteNumber = (v) => typeof v === "number" && Number.isFinite(v);
|
|
8
|
+
const isStringArray = (x) => Array.isArray(x) && x.every((v) => typeof v === "string");
|
|
9
|
+
export function parseSnapshot(raw) {
|
|
10
|
+
if (!raw) return void 0;
|
|
11
|
+
let parsed;
|
|
12
|
+
try {
|
|
13
|
+
parsed = JSON.parse(raw);
|
|
14
|
+
} catch {
|
|
15
|
+
return void 0;
|
|
16
|
+
}
|
|
17
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return void 0;
|
|
18
|
+
const record = parsed;
|
|
19
|
+
if (record.v !== 1) return void 0;
|
|
20
|
+
const snapshot = { v: 1 };
|
|
21
|
+
if (isRecordOf(record.columnVisibility, isBoolean)) snapshot.columnVisibility = record.columnVisibility;
|
|
22
|
+
if (isStringArray(record.columnOrder)) snapshot.columnOrder = record.columnOrder;
|
|
23
|
+
{
|
|
24
|
+
const pinning = record.columnPinning;
|
|
25
|
+
if (pinning && isStringArray(pinning.left) && isStringArray(pinning.right)) {
|
|
26
|
+
snapshot.columnPinning = { left: pinning.left, right: pinning.right };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (isRecordOf(record.columnSizing, isFiniteNumber)) snapshot.columnSizing = record.columnSizing;
|
|
30
|
+
if (isFiniteNumber(record.pageSize)) snapshot.pageSize = record.pageSize;
|
|
31
|
+
return snapshot;
|
|
32
|
+
}
|
|
33
|
+
function pruneRecord(record, ids) {
|
|
34
|
+
if (!record) return {};
|
|
35
|
+
return Object.fromEntries(Object.entries(record).filter(([id]) => ids.has(id)));
|
|
36
|
+
}
|
|
37
|
+
function pruneList(list, ids) {
|
|
38
|
+
return (list ?? []).filter((id) => ids.has(id));
|
|
39
|
+
}
|
|
40
|
+
export function pruneSnapshot(snapshot, ctx) {
|
|
41
|
+
const pruned = { v: 1 };
|
|
42
|
+
if (snapshot.columnVisibility) {
|
|
43
|
+
pruned.columnVisibility = pruneRecord(snapshot.columnVisibility, ctx.columnIds);
|
|
44
|
+
}
|
|
45
|
+
if (snapshot.columnSizing) {
|
|
46
|
+
pruned.columnSizing = pruneRecord(snapshot.columnSizing, ctx.columnIds);
|
|
47
|
+
}
|
|
48
|
+
if (snapshot.columnOrder) {
|
|
49
|
+
const order = pruneList(snapshot.columnOrder, ctx.columnIds);
|
|
50
|
+
if (order.length > 0 || snapshot.columnOrder.length === 0) pruned.columnOrder = order;
|
|
51
|
+
}
|
|
52
|
+
if (snapshot.columnPinning) {
|
|
53
|
+
const left = pruneList(snapshot.columnPinning.left, ctx.columnIds);
|
|
54
|
+
const right = pruneList(snapshot.columnPinning.right, ctx.columnIds);
|
|
55
|
+
const hadEntries = snapshot.columnPinning.left.length + snapshot.columnPinning.right.length > 0;
|
|
56
|
+
if (left.length + right.length > 0 || !hadEntries) pruned.columnPinning = { left, right };
|
|
57
|
+
}
|
|
58
|
+
if (snapshot.pageSize !== void 0 && ctx.paginationEnabled && Number.isInteger(snapshot.pageSize) && snapshot.pageSize > 0 && ctx.pageSizes.includes(snapshot.pageSize)) {
|
|
59
|
+
pruned.pageSize = snapshot.pageSize;
|
|
60
|
+
}
|
|
61
|
+
return pruned;
|
|
62
|
+
}
|
|
63
|
+
export function mergeCustomization(design, snapshot, ctx, options) {
|
|
64
|
+
if (!snapshot && !options?.explicit) return { state: design };
|
|
65
|
+
const pruned = snapshot ? pruneSnapshot(snapshot, ctx) : { v: 1 };
|
|
66
|
+
const designPinning = design?.columnPinning;
|
|
67
|
+
const prunedDesignPinning = designPinning ? {
|
|
68
|
+
left: pruneList(designPinning.left, ctx.columnIds),
|
|
69
|
+
right: pruneList(designPinning.right, ctx.columnIds)
|
|
70
|
+
} : void 0;
|
|
71
|
+
const state = {
|
|
72
|
+
...design,
|
|
73
|
+
columnVisibility: {
|
|
74
|
+
...pruneRecord(design?.columnVisibility, ctx.columnIds),
|
|
75
|
+
...pruned.columnVisibility
|
|
76
|
+
},
|
|
77
|
+
columnSizing: {
|
|
78
|
+
...pruneRecord(design?.columnSizing, ctx.columnIds),
|
|
79
|
+
...pruned.columnSizing
|
|
80
|
+
},
|
|
81
|
+
columnOrder: pruned.columnOrder ?? pruneList(design?.columnOrder, ctx.columnIds),
|
|
82
|
+
columnPinning: pruned.columnPinning ?? prunedDesignPinning ?? { left: [], right: [] }
|
|
83
|
+
};
|
|
84
|
+
return { state, pageSize: pruned.pageSize };
|
|
85
|
+
}
|
|
86
|
+
export function weaveLockedColumns(currentLeafOrder, lockedIds, draftOrder) {
|
|
87
|
+
const draftQueue = draftOrder.filter((id) => !lockedIds.has(id));
|
|
88
|
+
const out = [];
|
|
89
|
+
const used = /* @__PURE__ */ new Set();
|
|
90
|
+
let next = 0;
|
|
91
|
+
for (const id of currentLeafOrder) {
|
|
92
|
+
if (lockedIds.has(id)) {
|
|
93
|
+
out.push(id);
|
|
94
|
+
used.add(id);
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
while (next < draftQueue.length && used.has(draftQueue[next])) next++;
|
|
98
|
+
if (next < draftQueue.length) {
|
|
99
|
+
const draftId = draftQueue[next++];
|
|
100
|
+
out.push(draftId);
|
|
101
|
+
used.add(draftId);
|
|
102
|
+
} else if (!used.has(id)) {
|
|
103
|
+
out.push(id);
|
|
104
|
+
used.add(id);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
for (; next < draftQueue.length; next++) {
|
|
108
|
+
const draftId = draftQueue[next];
|
|
109
|
+
if (!used.has(draftId)) {
|
|
110
|
+
out.push(draftId);
|
|
111
|
+
used.add(draftId);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
for (const id of currentLeafOrder) {
|
|
115
|
+
if (!used.has(id)) {
|
|
116
|
+
out.push(id);
|
|
117
|
+
used.add(id);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return out;
|
|
121
|
+
}
|
|
122
|
+
const ALL_BANDS = ["left", "main", "right", "hidden"];
|
|
123
|
+
const VISIBLE_BANDS = ["left", "main", "right"];
|
|
124
|
+
function cloneBands(b) {
|
|
125
|
+
return { left: [...b.left], main: [...b.main], right: [...b.right], hidden: [...b.hidden] };
|
|
126
|
+
}
|
|
127
|
+
export function bandOf(bands, id) {
|
|
128
|
+
return ALL_BANDS.find((band) => bands[band].includes(id));
|
|
129
|
+
}
|
|
130
|
+
export function groupVisibleMembers(bands, groupOf, groupId) {
|
|
131
|
+
const out = [];
|
|
132
|
+
for (const band of VISIBLE_BANDS) {
|
|
133
|
+
for (const id of bands[band]) if (groupOf(id) === groupId) out.push(id);
|
|
134
|
+
}
|
|
135
|
+
return out;
|
|
136
|
+
}
|
|
137
|
+
export function groupHiddenMembers(bands, groupOf, groupId) {
|
|
138
|
+
return bands.hidden.filter((id) => groupOf(id) === groupId);
|
|
139
|
+
}
|
|
140
|
+
function groupRun(bands, groupOf, groupId) {
|
|
141
|
+
const visible = groupVisibleMembers(bands, groupOf, groupId);
|
|
142
|
+
return visible.length > 0 ? visible : groupHiddenMembers(bands, groupOf, groupId);
|
|
143
|
+
}
|
|
144
|
+
export function bandOfGroup(bands, groupOf, groupId) {
|
|
145
|
+
return VISIBLE_BANDS.find((band) => bands[band].some((id) => groupOf(id) === groupId));
|
|
146
|
+
}
|
|
147
|
+
export function groupEdgeMember(bands, groupOf, groupId, edge) {
|
|
148
|
+
const m = groupVisibleMembers(bands, groupOf, groupId);
|
|
149
|
+
return edge === "first" ? m[0] : m[m.length - 1];
|
|
150
|
+
}
|
|
151
|
+
export function moveRun(bands, runIds, band, anchor) {
|
|
152
|
+
if (runIds.length === 0) return cloneBands(bands);
|
|
153
|
+
const drop = new Set(runIds);
|
|
154
|
+
const next = {
|
|
155
|
+
left: bands.left.filter((id) => !drop.has(id)),
|
|
156
|
+
main: bands.main.filter((id) => !drop.has(id)),
|
|
157
|
+
right: bands.right.filter((id) => !drop.has(id)),
|
|
158
|
+
hidden: bands.hidden.filter((id) => !drop.has(id))
|
|
159
|
+
};
|
|
160
|
+
const list = next[band];
|
|
161
|
+
let index = list.length;
|
|
162
|
+
if (anchor.at !== "append") {
|
|
163
|
+
const i = list.indexOf(anchor.ref);
|
|
164
|
+
if (i >= 0) index = anchor.at === "before" ? i : i + 1;
|
|
165
|
+
}
|
|
166
|
+
list.splice(index, 0, ...runIds);
|
|
167
|
+
return next;
|
|
168
|
+
}
|
|
169
|
+
function weldWithin(list, groupOf) {
|
|
170
|
+
const members = /* @__PURE__ */ new Map();
|
|
171
|
+
for (const id of list) {
|
|
172
|
+
const gid = groupOf(id);
|
|
173
|
+
if (!gid) continue;
|
|
174
|
+
const run = members.get(gid);
|
|
175
|
+
if (run) run.push(id);
|
|
176
|
+
else members.set(gid, [id]);
|
|
177
|
+
}
|
|
178
|
+
if (members.size === 0) return [...list];
|
|
179
|
+
const out = [];
|
|
180
|
+
const emitted = /* @__PURE__ */ new Set();
|
|
181
|
+
for (const id of list) {
|
|
182
|
+
const gid = groupOf(id);
|
|
183
|
+
if (!gid) {
|
|
184
|
+
out.push(id);
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
if (emitted.has(gid)) continue;
|
|
188
|
+
out.push(...members.get(gid) ?? [id]);
|
|
189
|
+
emitted.add(gid);
|
|
190
|
+
}
|
|
191
|
+
return out;
|
|
192
|
+
}
|
|
193
|
+
export function weldGroups(bands, groupOf) {
|
|
194
|
+
const next = cloneBands(bands);
|
|
195
|
+
const homeBand = /* @__PURE__ */ new Map();
|
|
196
|
+
const members = /* @__PURE__ */ new Map();
|
|
197
|
+
for (const band of VISIBLE_BANDS) {
|
|
198
|
+
for (const id of bands[band]) {
|
|
199
|
+
const gid = groupOf(id);
|
|
200
|
+
if (!gid) continue;
|
|
201
|
+
if (!homeBand.has(gid)) homeBand.set(gid, band);
|
|
202
|
+
const run = members.get(gid);
|
|
203
|
+
if (run) run.push(id);
|
|
204
|
+
else members.set(gid, [id]);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
if (homeBand.size > 0) {
|
|
208
|
+
const emitted = /* @__PURE__ */ new Set();
|
|
209
|
+
for (const band of VISIBLE_BANDS) {
|
|
210
|
+
const rebuilt = [];
|
|
211
|
+
for (const id of bands[band]) {
|
|
212
|
+
const gid = groupOf(id);
|
|
213
|
+
if (!gid) {
|
|
214
|
+
rebuilt.push(id);
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
if (homeBand.get(gid) !== band || emitted.has(gid)) continue;
|
|
218
|
+
rebuilt.push(...members.get(gid) ?? [id]);
|
|
219
|
+
emitted.add(gid);
|
|
220
|
+
}
|
|
221
|
+
next[band] = rebuilt;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
next.hidden = weldWithin(bands.hidden, groupOf);
|
|
225
|
+
return next;
|
|
226
|
+
}
|
|
227
|
+
export function applyRowDrop(bands, groupOf, drop) {
|
|
228
|
+
const { sourceKind, sourceId, sourceGroupId, targetKind, targetId, before } = drop;
|
|
229
|
+
const edge = before ? "first" : "last";
|
|
230
|
+
const place = before ? "before" : "after";
|
|
231
|
+
if (sourceKind === "group") {
|
|
232
|
+
const run = groupRun(bands, groupOf, sourceId);
|
|
233
|
+
if (run.length === 0) return cloneBands(bands);
|
|
234
|
+
if (targetKind === "group") {
|
|
235
|
+
if (targetId === sourceId) return cloneBands(bands);
|
|
236
|
+
const band3 = bandOfGroup(bands, groupOf, targetId);
|
|
237
|
+
const ref2 = groupEdgeMember(bands, groupOf, targetId, edge);
|
|
238
|
+
if (!band3 || !ref2) return cloneBands(bands);
|
|
239
|
+
return moveRun(bands, run, band3, { at: place, ref: ref2 });
|
|
240
|
+
}
|
|
241
|
+
const band2 = bandOf(bands, targetId);
|
|
242
|
+
if (!band2 || band2 === "hidden" || groupOf(targetId)) return cloneBands(bands);
|
|
243
|
+
return moveRun(bands, run, band2, { at: place, ref: targetId });
|
|
244
|
+
}
|
|
245
|
+
if (targetKind === "group") {
|
|
246
|
+
const band2 = bandOfGroup(bands, groupOf, targetId);
|
|
247
|
+
const ref2 = groupEdgeMember(bands, groupOf, targetId, edge);
|
|
248
|
+
if (!band2 || !ref2) return cloneBands(bands);
|
|
249
|
+
return moveRun(bands, [sourceId], band2, { at: place, ref: ref2 });
|
|
250
|
+
}
|
|
251
|
+
if (sourceId === targetId) return cloneBands(bands);
|
|
252
|
+
const band = bandOf(bands, targetId);
|
|
253
|
+
if (!band || band === "hidden") return cloneBands(bands);
|
|
254
|
+
const tgtGid = groupOf(targetId);
|
|
255
|
+
const sameGroup = Boolean(sourceGroupId) && tgtGid === sourceGroupId;
|
|
256
|
+
const bothStandalone = !sourceGroupId && !tgtGid;
|
|
257
|
+
if (sameGroup || bothStandalone) {
|
|
258
|
+
return moveRun(bands, [sourceId], band, { at: place, ref: targetId });
|
|
259
|
+
}
|
|
260
|
+
return cloneBands(bands);
|
|
261
|
+
}
|
|
262
|
+
export function applyZoneDrop(bands, groupOf, drop) {
|
|
263
|
+
const run = drop.sourceKind === "group" ? groupRun(bands, groupOf, drop.sourceId) : [drop.sourceId];
|
|
264
|
+
return moveRun(bands, run, drop.band, { at: "append" });
|
|
265
|
+
}
|
|
266
|
+
export function useTableCustomization(tableId) {
|
|
267
|
+
let current;
|
|
268
|
+
let everCustomized = false;
|
|
269
|
+
const revision = ref(0);
|
|
270
|
+
const enabled = () => Boolean(tableId) && typeof window !== "undefined";
|
|
271
|
+
const key = () => `${STORAGE_PREFIX}${tableId}`;
|
|
272
|
+
function load() {
|
|
273
|
+
if (!enabled()) return;
|
|
274
|
+
let parsed;
|
|
275
|
+
try {
|
|
276
|
+
parsed = parseSnapshot(window.localStorage.getItem(key()));
|
|
277
|
+
} catch {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
if (parsed) {
|
|
281
|
+
current = parsed;
|
|
282
|
+
everCustomized = true;
|
|
283
|
+
revision.value++;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
function snapshot() {
|
|
287
|
+
return current;
|
|
288
|
+
}
|
|
289
|
+
function persistPatch(patch) {
|
|
290
|
+
if (!enabled()) return;
|
|
291
|
+
current = { ...current ?? { v: 1 }, ...patch, v: 1 };
|
|
292
|
+
everCustomized = true;
|
|
293
|
+
try {
|
|
294
|
+
window.localStorage.setItem(key(), JSON.stringify(current));
|
|
295
|
+
} catch {
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
function clear() {
|
|
299
|
+
if (!enabled()) return;
|
|
300
|
+
current = void 0;
|
|
301
|
+
try {
|
|
302
|
+
window.localStorage.removeItem(key());
|
|
303
|
+
} catch {
|
|
304
|
+
}
|
|
305
|
+
revision.value++;
|
|
306
|
+
}
|
|
307
|
+
return {
|
|
308
|
+
revision,
|
|
309
|
+
load,
|
|
310
|
+
snapshot,
|
|
311
|
+
persistPatch,
|
|
312
|
+
clear,
|
|
313
|
+
wasCustomized: () => everCustomized
|
|
314
|
+
};
|
|
315
|
+
}
|
|
@@ -28,8 +28,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
28
28
|
"onUpdate:modelValue"?: ((args_0: Date | undefined) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
30
|
size: "sm" | "md" | "lg";
|
|
31
|
-
clearIcon: string;
|
|
32
31
|
clearable: boolean;
|
|
32
|
+
clearIcon: string;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
@@ -28,8 +28,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
28
28
|
"onUpdate:modelValue"?: ((args_0: Date | undefined) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
30
|
size: "sm" | "md" | "lg";
|
|
31
|
-
clearIcon: string;
|
|
32
31
|
clearable: boolean;
|
|
32
|
+
clearIcon: string;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
22
22
|
size: "sm" | "md" | "lg";
|
|
23
23
|
granularity: "hour" | "minute" | "second";
|
|
24
24
|
hourCycle: 12 | 24;
|
|
25
|
-
clearIcon: string;
|
|
26
25
|
clearable: boolean;
|
|
26
|
+
clearIcon: string;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
29
29
|
export default _default;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
22
22
|
size: "sm" | "md" | "lg";
|
|
23
23
|
granularity: "hour" | "minute" | "second";
|
|
24
24
|
hourCycle: 12 | 24;
|
|
25
|
-
clearIcon: string;
|
|
26
25
|
clearable: boolean;
|
|
26
|
+
clearIcon: string;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
29
29
|
export default _default;
|
|
@@ -29,8 +29,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
29
29
|
"onUpdate:endValue"?: ((args_0: Date | undefined) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
31
|
size: "sm" | "md" | "lg";
|
|
32
|
-
clearIcon: string;
|
|
33
32
|
clearable: boolean;
|
|
33
|
+
clearIcon: string;
|
|
34
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
36
36
|
export default _default;
|