@shwfed/config 2.12.4 → 2.12.6
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/module.mjs +5 -0
- 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/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +34 -34
- 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 +31 -4
- 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/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/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/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 +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +6 -6
- 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 +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +2 -2
- 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 +8 -8
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +8 -8
- 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 +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +2 -2
- 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 +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +2 -2
- 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/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/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/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 +18 -18
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +18 -18
- 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/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 +6 -6
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +6 -6
- 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/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 +18 -18
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +18 -18
- 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 +18 -18
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +18 -18
- 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 +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +18 -18
- 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 +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +18 -18
- 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 +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +18 -18
- 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 +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +18 -18
- 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/sidebar/index.d.vue.ts +22 -3
- package/dist/runtime/components/sidebar/index.vue +66 -5
- package/dist/runtime/components/sidebar/index.vue.d.ts +22 -3
- package/dist/runtime/components/sidebar/node.d.vue.ts +1 -1
- package/dist/runtime/components/sidebar/node.vue +33 -13
- package/dist/runtime/components/sidebar/node.vue.d.ts +1 -1
- package/dist/runtime/components/sidebar/tree.vue +113 -83
- package/dist/runtime/components/sidebar/types.d.ts +8 -0
- package/dist/runtime/components/sidebar/types.js +1 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/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 +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/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 +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- 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-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- 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.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- 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/schema.d.ts +68 -68
- 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/table/utils/row-reorder.d.ts +3 -2
- package/dist/runtime/components/table/utils/row-reorder.js +1 -12
- package/dist/runtime/components/tabs/index.d.vue.ts +9 -0
- package/dist/runtime/components/tabs/index.vue +92 -0
- package/dist/runtime/components/tabs/index.vue.d.ts +9 -0
- package/dist/runtime/components/tabs/tab.d.vue.ts +22 -0
- package/dist/runtime/components/tabs/tab.vue +85 -0
- package/dist/runtime/components/tabs/tab.vue.d.ts +22 -0
- package/dist/runtime/components/tabs/types.d.ts +19 -0
- package/dist/runtime/components/tabs/types.js +0 -0
- package/dist/runtime/components/tabs/use-reorder.d.ts +10 -0
- package/dist/runtime/components/tabs/use-reorder.js +90 -0
- package/dist/runtime/components/tabs/use-tabs.d.ts +46 -0
- package/dist/runtime/components/tabs/use-tabs.js +101 -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/components/ui/sidebar/SidebarMenuAction.vue +1 -1
- package/dist/runtime/components/ui/sidebar/index.js +2 -2
- package/dist/runtime/share/reorder.d.ts +2 -0
- package/dist/runtime/share/reorder.js +12 -0
- package/dist/runtime/utils/nav-registry.d.ts +19 -0
- package/dist/runtime/utils/nav-registry.js +14 -0
- package/dist/runtime/utils/page-title-registry.d.ts +3 -0
- package/dist/runtime/utils/page-title-registry.js +11 -0
- 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
|
@@ -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
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import type { ReorderInstruction as RowReorderInstruction } from '../../../share/reorder.js';
|
|
2
|
+
export type { ReorderInstruction as RowReorderInstruction } from '../../../share/reorder.js';
|
|
3
|
+
export { applyReorder } from '../../../share/reorder.js';
|
|
3
4
|
export interface UseRowReorderOptions {
|
|
4
5
|
onReorder: (sourceId: string, targetId: string, position: RowReorderInstruction) => void;
|
|
5
6
|
isEnabled: () => boolean;
|
|
@@ -9,18 +9,7 @@ import {
|
|
|
9
9
|
attachInstruction,
|
|
10
10
|
extractInstruction
|
|
11
11
|
} from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";
|
|
12
|
-
export
|
|
13
|
-
if (sourceIndex === targetIndex) return rows;
|
|
14
|
-
if (sourceIndex < 0 || sourceIndex >= rows.length) return rows;
|
|
15
|
-
if (targetIndex < 0 || targetIndex >= rows.length) return rows;
|
|
16
|
-
let insertIdx = targetIndex + (position === "reorder-below" ? 1 : 0);
|
|
17
|
-
if (sourceIndex < targetIndex) insertIdx -= 1;
|
|
18
|
-
if (insertIdx === sourceIndex) return rows;
|
|
19
|
-
const next = rows.slice();
|
|
20
|
-
const [moved] = next.splice(sourceIndex, 1);
|
|
21
|
-
next.splice(insertIdx, 0, moved);
|
|
22
|
-
return next;
|
|
23
|
-
}
|
|
12
|
+
export { applyReorder } from "../../../share/reorder.js";
|
|
24
13
|
const SOURCE_KIND = "shwfed-table-row";
|
|
25
14
|
export function useRowReorder(options) {
|
|
26
15
|
const instruction = ref(null);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
storageKey?: string;
|
|
3
|
+
home?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
home: string;
|
|
7
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { onBeforeUnmount, onMounted } from "vue";
|
|
3
|
+
import { useI18n } from "vue-i18n";
|
|
4
|
+
import { navigateTo, useHead, useRoute, useRouter, useRuntimeConfig } from "#app";
|
|
5
|
+
import ShwfedTab from "./tab.vue";
|
|
6
|
+
import { useTabStore } from "./use-tabs";
|
|
7
|
+
import { useTabReorder } from "./use-reorder";
|
|
8
|
+
defineOptions({ name: "ShwfedTabs" });
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
storageKey: { type: String, required: false },
|
|
11
|
+
home: { type: String, required: false, default: "/" }
|
|
12
|
+
});
|
|
13
|
+
const runtimeConfig = useRuntimeConfig();
|
|
14
|
+
const job = runtimeConfig.public.shwfed.ci.job;
|
|
15
|
+
const store = useTabStore(props.storageKey ?? `shwfed:tabs:${job ?? "default"}`);
|
|
16
|
+
const tabs = store.tabs;
|
|
17
|
+
const activePath = store.activePath;
|
|
18
|
+
const router = useRouter();
|
|
19
|
+
const route = useRoute();
|
|
20
|
+
const { locale } = useI18n({ useScope: "global", inheritLocale: true });
|
|
21
|
+
useHead(() => {
|
|
22
|
+
const tab = tabs.value.find((t) => t.path === activePath.value);
|
|
23
|
+
return tab ? { title: store.resolveTitle(tab, locale.value) } : {};
|
|
24
|
+
});
|
|
25
|
+
let stopAfterEach;
|
|
26
|
+
onMounted(() => {
|
|
27
|
+
store.openOrFocus(route.path, route.fullPath);
|
|
28
|
+
stopAfterEach = router.afterEach((to) => {
|
|
29
|
+
store.openOrFocus(to.path, to.fullPath);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
onBeforeUnmount(() => stopAfterEach?.());
|
|
33
|
+
const reorder = useTabReorder({
|
|
34
|
+
onReorder: (sourcePath, targetPath, edge) => {
|
|
35
|
+
store.reorder(sourcePath, targetPath, edge === "left" ? "reorder-above" : "reorder-below");
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
function onActivate(tab) {
|
|
39
|
+
if (tab.path !== activePath.value) void navigateTo(tab.fullPath);
|
|
40
|
+
}
|
|
41
|
+
function onClose(path) {
|
|
42
|
+
const dest = store.close(path, props.home);
|
|
43
|
+
if (dest) void navigateTo(dest);
|
|
44
|
+
}
|
|
45
|
+
function onCloseOthers(path) {
|
|
46
|
+
const dest = store.closeOthers(path);
|
|
47
|
+
if (dest) void navigateTo(dest);
|
|
48
|
+
}
|
|
49
|
+
function onCloseRight(path) {
|
|
50
|
+
const dest = store.closeToRight(path);
|
|
51
|
+
if (dest) void navigateTo(dest);
|
|
52
|
+
}
|
|
53
|
+
function onWheel(event) {
|
|
54
|
+
const el = event.currentTarget;
|
|
55
|
+
if (!el) return;
|
|
56
|
+
if (Math.abs(event.deltaY) <= Math.abs(event.deltaX)) return;
|
|
57
|
+
el.scrollLeft += event.deltaY;
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
}
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<template>
|
|
63
|
+
<ClientOnly>
|
|
64
|
+
<div
|
|
65
|
+
v-if="tabs.length"
|
|
66
|
+
class="w-full border-b border-zinc-200 bg-zinc-50"
|
|
67
|
+
>
|
|
68
|
+
<!-- Scroller: overflow-x with the native scrollbar hidden (Firefox +
|
|
69
|
+
WebKit). The vertical-wheel handler drives horizontal scroll, so no
|
|
70
|
+
scrollbar is shown at all. -->
|
|
71
|
+
<div
|
|
72
|
+
class="flex h-9 overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
|
73
|
+
@wheel="onWheel"
|
|
74
|
+
>
|
|
75
|
+
<ShwfedTab
|
|
76
|
+
v-for="tab in tabs"
|
|
77
|
+
:key="tab.path"
|
|
78
|
+
:title="store.resolveTitle(tab, locale)"
|
|
79
|
+
:active="tab.path === activePath"
|
|
80
|
+
:edge="reorder.edgeFor(tab.path)"
|
|
81
|
+
:dragging="reorder.isDragging(tab.path)"
|
|
82
|
+
:closable="tabs.length > 1"
|
|
83
|
+
:register="(el) => reorder.setTab(tab.path, el)"
|
|
84
|
+
@activate="onActivate(tab)"
|
|
85
|
+
@close="onClose(tab.path)"
|
|
86
|
+
@close-others="onCloseOthers(tab.path)"
|
|
87
|
+
@close-right="onCloseRight(tab.path)"
|
|
88
|
+
/>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</ClientOnly>
|
|
92
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
storageKey?: string;
|
|
3
|
+
home?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
home: string;
|
|
7
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { TabEdge } from './use-reorder.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
title: string;
|
|
4
|
+
active: boolean;
|
|
5
|
+
edge: TabEdge | null;
|
|
6
|
+
dragging: boolean;
|
|
7
|
+
closable: boolean;
|
|
8
|
+
register: (el: HTMLElement | null) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
close: () => any;
|
|
12
|
+
activate: () => any;
|
|
13
|
+
closeOthers: () => any;
|
|
14
|
+
closeRight: () => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onClose?: (() => any) | undefined;
|
|
17
|
+
onActivate?: (() => any) | undefined;
|
|
18
|
+
onCloseOthers?: (() => any) | undefined;
|
|
19
|
+
onCloseRight?: (() => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { onBeforeUnmount, onMounted, ref } from "vue";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
5
|
+
import {
|
|
6
|
+
ContextMenu,
|
|
7
|
+
ContextMenuContent,
|
|
8
|
+
ContextMenuItem,
|
|
9
|
+
ContextMenuTrigger
|
|
10
|
+
} from "../ui/context-menu";
|
|
11
|
+
defineOptions({ name: "ShwfedTab" });
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
title: { type: String, required: true },
|
|
14
|
+
active: { type: Boolean, required: true },
|
|
15
|
+
edge: { type: [String, null], required: true },
|
|
16
|
+
dragging: { type: Boolean, required: true },
|
|
17
|
+
closable: { type: Boolean, required: true },
|
|
18
|
+
register: { type: Function, required: true }
|
|
19
|
+
});
|
|
20
|
+
const emit = defineEmits(["activate", "close", "closeOthers", "closeRight"]);
|
|
21
|
+
const { t } = useI18n({
|
|
22
|
+
inheritLocale: true,
|
|
23
|
+
useScope: "global",
|
|
24
|
+
messages: {
|
|
25
|
+
zh: { close: "\u5173\u95ED", closeOthers: "\u5173\u95ED\u5176\u4ED6", closeRight: "\u5173\u95ED\u53F3\u4FA7" },
|
|
26
|
+
en: { close: "Close", closeOthers: "Close others", closeRight: "Close to the right" },
|
|
27
|
+
ja: { close: "\u9589\u3058\u308B", closeOthers: "\u4ED6\u3092\u9589\u3058\u308B", closeRight: "\u53F3\u5074\u3092\u9589\u3058\u308B" },
|
|
28
|
+
ko: { close: "\uB2EB\uAE30", closeOthers: "\uB2E4\uB978 \uD0ED \uB2EB\uAE30", closeRight: "\uC624\uB978\uCABD \uD0ED \uB2EB\uAE30" }
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const root = ref(null);
|
|
32
|
+
onMounted(() => props.register(root.value));
|
|
33
|
+
onBeforeUnmount(() => props.register(null));
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<ContextMenu>
|
|
38
|
+
<ContextMenuTrigger
|
|
39
|
+
as-child
|
|
40
|
+
:disabled="!closable"
|
|
41
|
+
>
|
|
42
|
+
<!-- Fixed width so consecutive closes keep every close button in the same
|
|
43
|
+
spot (Chrome-style). The close button stays in layout (`opacity-0`, not
|
|
44
|
+
hidden) and only reveals on hover / focus-within, so nothing reflows. -->
|
|
45
|
+
<div
|
|
46
|
+
ref="root"
|
|
47
|
+
class="group relative flex h-full w-40 shrink-0 cursor-default select-none items-center gap-1.5 border-r border-zinc-200 px-3 text-sm outline-none transition-colors"
|
|
48
|
+
:class="[
|
|
49
|
+
active ? 'bg-white text-zinc-900' : 'bg-zinc-50 text-zinc-400 hover:bg-zinc-100 hover:text-zinc-600',
|
|
50
|
+
dragging ? 'opacity-50' : ''
|
|
51
|
+
]"
|
|
52
|
+
@click="emit('activate')"
|
|
53
|
+
>
|
|
54
|
+
<span class="flex-1 truncate">{{ title }}</span>
|
|
55
|
+
<button
|
|
56
|
+
v-if="closable"
|
|
57
|
+
type="button"
|
|
58
|
+
class="flex size-4 shrink-0 items-center justify-center rounded-sm text-zinc-400 opacity-0 outline-none transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 hover:bg-zinc-200 hover:text-zinc-700"
|
|
59
|
+
@click.stop="emit('close')"
|
|
60
|
+
>
|
|
61
|
+
<Icon icon="fluent:dismiss-12-regular" />
|
|
62
|
+
</button>
|
|
63
|
+
<span
|
|
64
|
+
v-if="edge"
|
|
65
|
+
class="absolute inset-y-0 z-10 w-0.5 bg-(--primary)"
|
|
66
|
+
:class="edge === 'left' ? '-left-px' : '-right-px'"
|
|
67
|
+
/>
|
|
68
|
+
</div>
|
|
69
|
+
</ContextMenuTrigger>
|
|
70
|
+
<ContextMenuContent class="min-w-44">
|
|
71
|
+
<ContextMenuItem @select="emit('close')">
|
|
72
|
+
<Icon icon="fluent:dismiss-20-regular" />
|
|
73
|
+
{{ t("close") }}
|
|
74
|
+
</ContextMenuItem>
|
|
75
|
+
<ContextMenuItem @select="emit('closeOthers')">
|
|
76
|
+
<Icon icon="fluent:dismiss-circle-20-regular" />
|
|
77
|
+
{{ t("closeOthers") }}
|
|
78
|
+
</ContextMenuItem>
|
|
79
|
+
<ContextMenuItem @select="emit('closeRight')">
|
|
80
|
+
<Icon icon="fluent:panel-right-20-regular" />
|
|
81
|
+
{{ t("closeRight") }}
|
|
82
|
+
</ContextMenuItem>
|
|
83
|
+
</ContextMenuContent>
|
|
84
|
+
</ContextMenu>
|
|
85
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { TabEdge } from './use-reorder.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
title: string;
|
|
4
|
+
active: boolean;
|
|
5
|
+
edge: TabEdge | null;
|
|
6
|
+
dragging: boolean;
|
|
7
|
+
closable: boolean;
|
|
8
|
+
register: (el: HTMLElement | null) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
close: () => any;
|
|
12
|
+
activate: () => any;
|
|
13
|
+
closeOthers: () => any;
|
|
14
|
+
closeRight: () => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onClose?: (() => any) | undefined;
|
|
17
|
+
onActivate?: (() => any) | undefined;
|
|
18
|
+
onCloseOthers?: (() => any) | undefined;
|
|
19
|
+
onCloseRight?: (() => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One open tab in the app-level MDI strip.
|
|
3
|
+
*
|
|
4
|
+
* Identity is `path` alone — `/orders?status=open` and `/orders?status=closed`
|
|
5
|
+
* are the SAME `/orders` tab. Dedupe, ordering, persistence, and the context
|
|
6
|
+
* menu all key off `path`. The query is page state (read by the page via CEL
|
|
7
|
+
* `location`), never a tab-identity dimension.
|
|
8
|
+
*
|
|
9
|
+
* `fullPath` is the last full URL (path + query) the tab was navigated to, so
|
|
10
|
+
* returning to a tab restores its query view rather than dropping the query.
|
|
11
|
+
*
|
|
12
|
+
* `pinned` (no UI yet) marks a tab that bulk-close operations spare and that
|
|
13
|
+
* `close` refuses to remove — reserved for a future home / pinned-tab feature.
|
|
14
|
+
*/
|
|
15
|
+
export interface Tab {
|
|
16
|
+
path: string;
|
|
17
|
+
fullPath: string;
|
|
18
|
+
pinned?: boolean;
|
|
19
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type TabEdge = 'left' | 'right';
|
|
2
|
+
export interface UseTabReorderOptions {
|
|
3
|
+
onReorder: (sourcePath: string, targetPath: string, edge: TabEdge) => void;
|
|
4
|
+
}
|
|
5
|
+
export interface TabReorderApi {
|
|
6
|
+
setTab: (path: string, el: HTMLElement | null) => void;
|
|
7
|
+
edgeFor: (path: string) => TabEdge | null;
|
|
8
|
+
isDragging: (path: string) => boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function useTabReorder(options: UseTabReorderOptions): TabReorderApi;
|