@shwfed/config 1.1.5 → 2.0.1
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.d.mts +2 -19
- package/dist/module.json +1 -1
- package/dist/module.mjs +15 -34
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.d.vue.ts +36 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue +45 -8
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue.d.ts +36 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue +15 -9
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.d.ts +17 -1
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.js +23 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.d.vue.ts +36 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue +39 -5
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue.d.ts +36 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue +15 -9
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.d.ts +17 -1
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.js +23 -5
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.prototype/config.vue +1 -0
- package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/config.d.vue.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/config.vue.d.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/runtime.vue +2 -3
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.d.vue.ts +1 -1
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.vue +44 -10
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.vue.d.ts +1 -1
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/runtime.vue +24 -7
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.d.ts +6 -1
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.js +6 -3
- package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/config.d.vue.ts +13 -5
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/config.vue +32 -0
- package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/config.vue.d.ts +13 -5
- package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.search → 2026-05-15/com.shwfed.actions.button.event.dispatch}/runtime.vue +5 -7
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.d.ts +17 -0
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.js +18 -0
- package/dist/runtime/components/actions/components/group.vue +2 -3
- package/dist/runtime/components/actions/components/triggers-field.d.vue.ts +17 -0
- package/dist/runtime/components/actions/components/triggers-field.vue +209 -0
- package/dist/runtime/components/actions/components/triggers-field.vue.d.ts +17 -0
- package/dist/runtime/components/actions/config.vue +51 -1
- package/dist/runtime/components/actions/schema.d.ts +4 -0
- package/dist/runtime/components/actions/schema.js +6 -0
- package/dist/runtime/components/actions/utils/resolve.d.ts +25 -1
- package/dist/runtime/components/actions/utils/resolve.js +37 -9
- package/dist/runtime/components/app.vue +1 -1
- package/dist/runtime/components/block-layout-editor/index.vue +11 -11
- package/dist/runtime/components/block-layout-editor/sidebar.vue +0 -4
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +7 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.d.vue.ts +1 -1
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue +16 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue.d.ts +1 -1
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/runtime.vue +1 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.d.ts +18 -9
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.js +8 -4
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.d.vue.ts +77 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.vue +535 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.vue.d.ts +77 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.d.vue.ts +77 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.vue +233 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.vue.d.ts +77 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/schema.d.ts +134 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/schema.js +142 -0
- package/dist/runtime/components/config/index.vue +1 -1
- package/dist/runtime/components/config/use-editor.js +4 -3
- package/dist/runtime/components/form/DerivedValueEditor.d.vue.ts +19 -0
- package/dist/runtime/components/form/DerivedValueEditor.vue +77 -0
- package/dist/runtime/components/form/DerivedValueEditor.vue.d.ts +19 -0
- package/dist/runtime/components/form/config.vue +58 -24
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +29 -31
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.js +3 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +24 -26
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.js +3 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/runtime.vue +15 -7
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +37 -38
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +33 -22
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.js +3 -2
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/runtime.vue +14 -7
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +1 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +13 -8
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue +25 -1
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +102 -44
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +14 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.js +14 -5
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +1 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/row.vue +22 -5
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +7 -4
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.js +7 -1
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.d.vue.ts +113 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +426 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue.d.ts +113 -0
- package/dist/runtime/components/{actions/buttons/2026-04-27/com.shwfed.actions.button.table.search → form/fields/2026-05-17/com.shwfed.form.field.checkbox.group}/runtime.d.vue.ts +1 -1
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +176 -0
- package/dist/runtime/components/{actions/buttons/2026-04-27/com.shwfed.actions.button.table.search → form/fields/2026-05-17/com.shwfed.form.field.checkbox.group}/runtime.vue.d.ts +1 -1
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +121 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.js +78 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.d.vue.ts +113 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +426 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue.d.ts +113 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +159 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +121 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.js +78 -0
- package/dist/runtime/components/form/index.d.vue.ts +6 -0
- package/dist/runtime/components/form/index.vue +41 -6
- package/dist/runtime/components/form/index.vue.d.ts +6 -0
- package/dist/runtime/components/form/schema.d.ts +5 -1
- package/dist/runtime/components/form/schema.js +13 -1
- package/dist/runtime/components/form/unit-config.d.vue.ts +0 -3
- package/dist/runtime/components/form/unit-config.vue +4 -10
- package/dist/runtime/components/form/unit-config.vue.d.ts +0 -3
- package/dist/runtime/components/form/utils/commit-bus.d.ts +26 -0
- package/dist/runtime/components/form/utils/commit-bus.js +27 -0
- package/dist/runtime/components/form/utils/common.d.ts +27 -0
- package/dist/runtime/components/form/utils/common.js +31 -0
- package/dist/runtime/components/form/utils/derived.d.ts +72 -0
- package/dist/runtime/components/form/utils/derived.js +116 -0
- package/dist/runtime/components/form/utils/field-value.d.ts +35 -0
- package/dist/runtime/components/form/utils/field-value.js +40 -0
- package/dist/runtime/components/form/utils/history.d.ts +36 -0
- package/dist/runtime/components/form/utils/history.js +74 -0
- package/dist/runtime/components/form/utils/readonly.d.ts +8 -0
- package/dist/runtime/components/form/utils/readonly.js +9 -0
- package/dist/runtime/components/form/utils/state.d.ts +27 -1
- package/dist/runtime/components/form/utils/state.js +16 -8
- package/dist/runtime/components/table/ai/columns-button.vue +3 -4
- package/dist/runtime/components/table/ai/data-source-button.vue +3 -4
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/runtime.vue +2 -3
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/runtime.vue +2 -3
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/runtime.vue +2 -3
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/runtime.vue +2 -3
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/runtime.vue +11 -6
- package/dist/runtime/components/table/config.vue +46 -2
- package/dist/runtime/components/table/index.d.vue.ts +4 -0
- package/dist/runtime/components/table/index.vue +28 -22
- package/dist/runtime/components/table/index.vue.d.ts +4 -0
- package/dist/runtime/components/table/schema.d.ts +33 -0
- package/dist/runtime/components/table/schema.js +21 -0
- package/dist/runtime/components/table/utils/instance.d.ts +2 -0
- package/dist/runtime/components/table/utils/instance.js +8 -0
- package/dist/runtime/components/ui/date-picker/DatePickerInput.vue +2 -2
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue +2 -2
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +13 -1
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +11 -3
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +13 -1
- package/dist/runtime/components/ui/locale/Locale.vue +2 -2
- package/dist/runtime/components/ui/radio-group/RadioGroup.d.vue.ts +22 -0
- package/dist/runtime/components/ui/radio-group/RadioGroup.vue +32 -0
- package/dist/runtime/components/ui/radio-group/RadioGroup.vue.d.ts +22 -0
- package/dist/runtime/components/ui/radio-group/RadioGroupItem.d.vue.ts +8 -0
- package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue +36 -0
- package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue.d.ts +8 -0
- package/dist/runtime/components/ui/radio-group/index.d.ts +2 -0
- package/dist/runtime/components/ui/radio-group/index.js +2 -0
- package/dist/runtime/composables/useOverlay.d.ts +1 -5
- package/dist/runtime/composables/useOverlay.js +4 -3
- package/dist/runtime/composables/useTranslateLocale.js +1 -2
- package/dist/runtime/share/event-bus.d.ts +118 -0
- package/dist/runtime/share/event-bus.js +55 -0
- package/dist/runtime/share/expression.d.ts +7 -0
- package/dist/runtime/share/expression.js +3 -1
- package/dist/runtime/share/layout.d.ts +1 -0
- package/dist/runtime/share/layout.js +3 -2
- package/dist/runtime/share/slot-renderer.vue +6 -4
- package/dist/runtime/{plugins → utils}/ai/cel-prompt.d.ts +1 -1
- package/dist/runtime/{plugins → utils}/ai/index.d.ts +1 -6
- package/dist/runtime/{plugins → utils}/ai/index.js +5 -14
- package/dist/runtime/utils/cel.d.ts +5 -0
- package/dist/runtime/utils/cel.js +42 -0
- package/dist/runtime/vendor/cel-js/CLAUDE.md +8 -2
- package/dist/runtime/vendor/cel-js/PROMPT.md +35 -10
- package/dist/runtime/vendor/cel-js/lib/functions.js +63 -1
- package/dist/runtime/vendor/cel-js/lib/http-builder.d.ts +35 -0
- package/dist/runtime/{plugins/http/builder.js → vendor/cel-js/lib/http-builder.js} +25 -23
- package/dist/runtime/vendor/cel-js/lib/http-builtins.d.ts +9 -10
- package/dist/runtime/vendor/cel-js/lib/http-builtins.js +53 -13
- package/dist/types.d.mts +7 -1
- package/package.json +1 -1
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/config.vue +0 -10
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/runtime.vue +0 -25
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/schema.d.ts +0 -13
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/schema.js +0 -16
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.d.vue.ts +0 -17
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.vue +0 -10
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.vue.d.ts +0 -17
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/schema.d.ts +0 -13
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/schema.js +0 -16
- package/dist/runtime/components/table/utils/host.d.ts +0 -9
- package/dist/runtime/components/table/utils/host.js +0 -8
- package/dist/runtime/composables/useCel.d.ts +0 -16
- package/dist/runtime/composables/useCel.js +0 -8
- package/dist/runtime/middleware/token.d.ts +0 -2
- package/dist/runtime/middleware/token.js +0 -20
- package/dist/runtime/plugins/cel/http.d.ts +0 -8
- package/dist/runtime/plugins/cel/http.js +0 -49
- package/dist/runtime/plugins/cel/index.d.ts +0 -9
- package/dist/runtime/plugins/cel/index.js +0 -59
- package/dist/runtime/plugins/http/builder.d.ts +0 -14
- package/dist/runtime/plugins/http/index.d.ts +0 -19
- package/dist/runtime/plugins/http/index.js +0 -35
- package/dist/runtime/plugins/toast/index.d.ts +0 -108
- package/dist/runtime/plugins/toast/index.js +0 -10
- package/dist/runtime/types.d.ts +0 -25
- /package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/runtime.d.vue.ts +0 -0
- /package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/runtime.vue.d.ts +0 -0
- /package/dist/runtime/{plugins → utils}/ai/cel-prompt.js +0 -0
- /package/dist/runtime/{plugins/cel/context.d.ts → utils/cel-context.d.ts} +0 -0
- /package/dist/runtime/{plugins/cel/context.js → utils/cel-context.js} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useNuxtApp } from "#app";
|
|
3
2
|
import { computed, onBeforeUnmount, provide, reactive, ref, watch } from "vue";
|
|
4
3
|
import { Icon } from "@iconify/vue";
|
|
5
4
|
import { Effect } from "effect";
|
|
@@ -12,7 +11,8 @@ import { Button } from "../../ui/button";
|
|
|
12
11
|
import { ButtonGroup } from "../../ui/button-group";
|
|
13
12
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../ui/dropdown-menu";
|
|
14
13
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../ui/tooltip";
|
|
15
|
-
import {
|
|
14
|
+
import { cel as _rawCel } from "../../../utils/cel";
|
|
15
|
+
import { celBindings, injectCELContext } from "../../../utils/cel-context";
|
|
16
16
|
import { buttonRegistryKey } from "../utils/button-registry";
|
|
17
17
|
import { findButton } from "../utils/resolve";
|
|
18
18
|
import { Fetch } from "fx-fetch";
|
|
@@ -73,7 +73,6 @@ const { locale, t } = useI18n({
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
|
-
const { $cel: _rawCel } = useNuxtApp();
|
|
77
76
|
const _inheritedCelContext = injectCELContext();
|
|
78
77
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(_inheritedCelContext), ...context });
|
|
79
78
|
const overlay = useOverlay();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type TriggerValue } from '../../../share/event-bus.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
triggers: ReadonlyArray<TriggerValue>;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:triggers": (triggers: readonly {
|
|
7
|
+
readonly target: string;
|
|
8
|
+
readonly operation: string;
|
|
9
|
+
}[]) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onUpdate:triggers"?: ((triggers: readonly {
|
|
12
|
+
readonly target: string;
|
|
13
|
+
readonly operation: string;
|
|
14
|
+
}[]) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import { useEventAncestry } from "../../../share/event-bus";
|
|
5
|
+
import {
|
|
6
|
+
useTreeDnd
|
|
7
|
+
} from "../../../composables/useTreeDnd";
|
|
8
|
+
import {
|
|
9
|
+
InputGroup,
|
|
10
|
+
InputGroupAddon,
|
|
11
|
+
InputGroupButton,
|
|
12
|
+
InputGroupCombobox,
|
|
13
|
+
InputGroupText
|
|
14
|
+
} from "../../ui/input-group";
|
|
15
|
+
import { CommandGroup, CommandItem } from "../../ui/command";
|
|
16
|
+
defineOptions({ name: "ShwfedTriggersField" });
|
|
17
|
+
const props = defineProps({
|
|
18
|
+
triggers: { type: Array, required: true }
|
|
19
|
+
});
|
|
20
|
+
const emit = defineEmits(["update:triggers"]);
|
|
21
|
+
function keyOf(target, operation) {
|
|
22
|
+
return `${target}::${operation}`;
|
|
23
|
+
}
|
|
24
|
+
const ancestry = useEventAncestry();
|
|
25
|
+
const allOptions = computed(
|
|
26
|
+
() => ancestry.value.flatMap(
|
|
27
|
+
(ancestor) => ancestor.operations.map((operation) => ({
|
|
28
|
+
key: keyOf(ancestor.instanceId, operation.id),
|
|
29
|
+
target: ancestor.instanceId,
|
|
30
|
+
operation: operation.id,
|
|
31
|
+
typeName: ancestor.typeName,
|
|
32
|
+
typeIcon: ancestor.typeIcon,
|
|
33
|
+
instanceName: ancestor.name,
|
|
34
|
+
opName: operation.name,
|
|
35
|
+
opIcon: operation.icon
|
|
36
|
+
}))
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
const optionByKey = computed(() => {
|
|
40
|
+
const map = /* @__PURE__ */ new Map();
|
|
41
|
+
for (const option of allOptions.value) map.set(option.key, option);
|
|
42
|
+
return map;
|
|
43
|
+
});
|
|
44
|
+
const rows = computed(
|
|
45
|
+
() => props.triggers.map((trigger) => ({
|
|
46
|
+
key: keyOf(trigger.target, trigger.operation),
|
|
47
|
+
trigger,
|
|
48
|
+
option: optionByKey.value.get(keyOf(trigger.target, trigger.operation))
|
|
49
|
+
}))
|
|
50
|
+
);
|
|
51
|
+
const available = computed(() => {
|
|
52
|
+
const used = new Set(props.triggers.map((t) => keyOf(t.target, t.operation)));
|
|
53
|
+
return allOptions.value.filter((option) => !used.has(option.key));
|
|
54
|
+
});
|
|
55
|
+
function searchValue(option) {
|
|
56
|
+
return [option.typeName, option.instanceName, option.opName].filter((part) => !!part).join(" ");
|
|
57
|
+
}
|
|
58
|
+
function addTrigger(option) {
|
|
59
|
+
emit("update:triggers", [
|
|
60
|
+
...props.triggers,
|
|
61
|
+
{ target: option.target, operation: option.operation }
|
|
62
|
+
]);
|
|
63
|
+
}
|
|
64
|
+
function removeTrigger(index) {
|
|
65
|
+
emit("update:triggers", props.triggers.filter((_, i) => i !== index));
|
|
66
|
+
}
|
|
67
|
+
const ROW_KIND = "shwfed-trigger-row";
|
|
68
|
+
function moveTrigger(from, to) {
|
|
69
|
+
if (from === to) return;
|
|
70
|
+
if (from < 0 || to < 0 || from >= props.triggers.length || to >= props.triggers.length) return;
|
|
71
|
+
const next = [...props.triggers];
|
|
72
|
+
const [item] = next.splice(from, 1);
|
|
73
|
+
if (!item) return;
|
|
74
|
+
next.splice(to, 0, item);
|
|
75
|
+
emit("update:triggers", next);
|
|
76
|
+
}
|
|
77
|
+
function onRowDrop(e) {
|
|
78
|
+
if (e.source.kind !== ROW_KIND || e.target.kind !== ROW_KIND) return;
|
|
79
|
+
const from = rows.value.findIndex((r) => r.key === e.source.id);
|
|
80
|
+
const to = rows.value.findIndex((r) => r.key === e.target.id);
|
|
81
|
+
if (from < 0 || to < 0) return;
|
|
82
|
+
if (e.instruction === "reorder-above") moveTrigger(from, from < to ? to - 1 : to);
|
|
83
|
+
else if (e.instruction === "reorder-below") moveTrigger(from, from <= to ? to : to + 1);
|
|
84
|
+
}
|
|
85
|
+
const dnd = useTreeDnd({ onRowDrop });
|
|
86
|
+
const pickDragHandle = (el) => el.querySelector(".drag-handle");
|
|
87
|
+
function rowConfig(rowKey) {
|
|
88
|
+
return {
|
|
89
|
+
kind: ROW_KIND,
|
|
90
|
+
canDrop: (src) => src.kind === ROW_KIND,
|
|
91
|
+
blockInstructions: (src) => {
|
|
92
|
+
const block = ["make-child", "reparent"];
|
|
93
|
+
if (src.id === rowKey) block.push("reorder-above", "reorder-below");
|
|
94
|
+
return block;
|
|
95
|
+
},
|
|
96
|
+
dragHandle: pickDragHandle
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<template>
|
|
102
|
+
<div class="flex flex-col gap-2">
|
|
103
|
+
<div
|
|
104
|
+
v-for="(row, index) in rows"
|
|
105
|
+
:key="row.key"
|
|
106
|
+
:ref="dnd.rowRef(row.key, rowConfig(row.key))"
|
|
107
|
+
class="relative"
|
|
108
|
+
:data-instruction="dnd.instructionFor(row.key) ?? void 0"
|
|
109
|
+
>
|
|
110
|
+
<InputGroup>
|
|
111
|
+
<InputGroupAddon align="inline-start">
|
|
112
|
+
<Icon
|
|
113
|
+
icon="fluent:re-order-dots-vertical-20-regular"
|
|
114
|
+
class="drag-handle size-4 shrink-0 cursor-grab text-zinc-400"
|
|
115
|
+
aria-label="拖动排序"
|
|
116
|
+
/>
|
|
117
|
+
</InputGroupAddon>
|
|
118
|
+
|
|
119
|
+
<InputGroupText class="min-w-0 pl-1 flex-1">
|
|
120
|
+
<template v-if="row.option">
|
|
121
|
+
<Icon
|
|
122
|
+
v-if="row.option.typeIcon"
|
|
123
|
+
:icon="row.option.typeIcon"
|
|
124
|
+
class="size-4 shrink-0 text-zinc-500"
|
|
125
|
+
/>
|
|
126
|
+
<span class="shrink-0 text-zinc-500">{{ row.option.typeName }}</span>
|
|
127
|
+
<span
|
|
128
|
+
v-if="row.option.instanceName"
|
|
129
|
+
class="truncate font-medium text-zinc-700"
|
|
130
|
+
>「{{ row.option.instanceName }}」</span>
|
|
131
|
+
<Icon icon="fluent:arrow-step-in-right-20-regular" />
|
|
132
|
+
<Icon
|
|
133
|
+
v-if="row.option.opIcon"
|
|
134
|
+
:icon="row.option.opIcon"
|
|
135
|
+
class="size-4 shrink-0 text-zinc-500"
|
|
136
|
+
/>
|
|
137
|
+
<span class="truncate text-zinc-700">{{ row.option.opName }}</span>
|
|
138
|
+
</template>
|
|
139
|
+
<template v-else>
|
|
140
|
+
<Icon
|
|
141
|
+
icon="fluent:warning-20-regular"
|
|
142
|
+
class="size-4 shrink-0 text-amber-500"
|
|
143
|
+
/>
|
|
144
|
+
<span class="shrink-0 text-amber-600">目标已失效</span>
|
|
145
|
+
<span class="truncate text-xs tabular-nums text-zinc-400">
|
|
146
|
+
{{ row.trigger.target.slice(0, 8) }} · {{ row.trigger.operation }}
|
|
147
|
+
</span>
|
|
148
|
+
</template>
|
|
149
|
+
</InputGroupText>
|
|
150
|
+
|
|
151
|
+
<InputGroupAddon align="inline-end">
|
|
152
|
+
<InputGroupButton
|
|
153
|
+
variant="destructive"
|
|
154
|
+
size="icon-xs"
|
|
155
|
+
as-child
|
|
156
|
+
>
|
|
157
|
+
<button
|
|
158
|
+
type="button"
|
|
159
|
+
aria-label="移除"
|
|
160
|
+
@click="removeTrigger(index)"
|
|
161
|
+
>
|
|
162
|
+
<Icon icon="fluent:delete-20-regular" />
|
|
163
|
+
</button>
|
|
164
|
+
</InputGroupButton>
|
|
165
|
+
</InputGroupAddon>
|
|
166
|
+
</InputGroup>
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
<InputGroup v-if="available.length > 0">
|
|
170
|
+
<InputGroupAddon align="inline-start">
|
|
171
|
+
<Icon icon="fluent:add-20-regular" />
|
|
172
|
+
</InputGroupAddon>
|
|
173
|
+
<InputGroupCombobox>
|
|
174
|
+
<CommandGroup>
|
|
175
|
+
<CommandItem
|
|
176
|
+
v-for="option in available"
|
|
177
|
+
:key="option.key"
|
|
178
|
+
:value="searchValue(option)"
|
|
179
|
+
@select="addTrigger(option)"
|
|
180
|
+
>
|
|
181
|
+
<Icon
|
|
182
|
+
v-if="option.typeIcon"
|
|
183
|
+
:icon="option.typeIcon"
|
|
184
|
+
class="size-4 shrink-0 text-zinc-500"
|
|
185
|
+
/>
|
|
186
|
+
<span class="text-zinc-500">{{ option.typeName }}</span>
|
|
187
|
+
<span
|
|
188
|
+
v-if="option.instanceName"
|
|
189
|
+
class="font-medium"
|
|
190
|
+
>「{{ option.instanceName }}」</span>
|
|
191
|
+
<span class="text-zinc-400">:</span>
|
|
192
|
+
<span class="flex-1">{{ option.opName }}</span>
|
|
193
|
+
</CommandItem>
|
|
194
|
+
</CommandGroup>
|
|
195
|
+
</InputGroupCombobox>
|
|
196
|
+
</InputGroup>
|
|
197
|
+
|
|
198
|
+
<p
|
|
199
|
+
v-else-if="rows.length === 0"
|
|
200
|
+
class="text-xs text-zinc-400"
|
|
201
|
+
>
|
|
202
|
+
当前位置没有可触发的祖先组件。
|
|
203
|
+
</p>
|
|
204
|
+
</div>
|
|
205
|
+
</template>
|
|
206
|
+
|
|
207
|
+
<style scoped>
|
|
208
|
+
[data-instruction=reorder-above]:before,[data-instruction=reorder-below]:after{background:var(--primary,#2563eb);content:"";height:2px;left:0;pointer-events:none;position:absolute;right:0;z-index:1}[data-instruction=reorder-above]:before{top:-5px}[data-instruction=reorder-below]:after{bottom:-5px}
|
|
209
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type TriggerValue } from '../../../share/event-bus.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
triggers: ReadonlyArray<TriggerValue>;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:triggers": (triggers: readonly {
|
|
7
|
+
readonly target: string;
|
|
8
|
+
readonly operation: string;
|
|
9
|
+
}[]) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onUpdate:triggers"?: ((triggers: readonly {
|
|
12
|
+
readonly target: string;
|
|
13
|
+
readonly operation: string;
|
|
14
|
+
}[]) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getStructFieldTitle
|
|
9
9
|
} from "./schema";
|
|
10
10
|
import { Environment } from "../../vendor/cel-js/lib/index";
|
|
11
|
-
import { provideCELContext } from "../../
|
|
11
|
+
import { provideCELContext } from "../../utils/cel-context";
|
|
12
12
|
import { BUTTONS, findButton } from "./utils/resolve";
|
|
13
13
|
import { SIDEBAR_TAKEOVER_KEY } from "../sidebar-takeover";
|
|
14
14
|
import { BREADCRUMB_EXTENSION_KEY } from "../config/breadcrumb-extension";
|
|
@@ -40,6 +40,9 @@ import { Markdown } from "../ui/markdown";
|
|
|
40
40
|
import {
|
|
41
41
|
useTreeDnd
|
|
42
42
|
} from "../../composables/useTreeDnd";
|
|
43
|
+
import {
|
|
44
|
+
provideEventAncestor
|
|
45
|
+
} from "../../share/event-bus";
|
|
43
46
|
defineOptions({ name: "ShwfedActionsConfig" });
|
|
44
47
|
const props = defineProps({
|
|
45
48
|
configure: { type: Function, required: false }
|
|
@@ -102,6 +105,7 @@ const SIZE_OPTIONS = [
|
|
|
102
105
|
const ACTION_PICKER_ENTRIES = (() => {
|
|
103
106
|
const byType = /* @__PURE__ */ new Map();
|
|
104
107
|
for (const a of BUTTONS) {
|
|
108
|
+
if (a.deprecated) continue;
|
|
105
109
|
const prev = byType.get(a.type);
|
|
106
110
|
if (!prev || a.compatibilityDate > prev.compatibilityDate) {
|
|
107
111
|
byType.set(a.type, {
|
|
@@ -234,6 +238,11 @@ function getActionConfigComponent(action) {
|
|
|
234
238
|
function getButtonMetadataLabel(action) {
|
|
235
239
|
return findButton(action.type, action.compatibilityDate)?.metadata.name ?? action.type;
|
|
236
240
|
}
|
|
241
|
+
function getButtonDeprecationNote(action) {
|
|
242
|
+
const entry = findButton(action.type, action.compatibilityDate);
|
|
243
|
+
if (!entry?.deprecated) return void 0;
|
|
244
|
+
return entry.deprecationNote ?? "\u6B64\u6309\u94AE\u7C7B\u578B\u5DF2\u5F03\u7528\u3002";
|
|
245
|
+
}
|
|
237
246
|
function patchSelectedGroup(mutate) {
|
|
238
247
|
const sel = selected.value;
|
|
239
248
|
if (sel?.kind !== "group") return;
|
|
@@ -325,6 +334,23 @@ const selectedDrillableTitle = computed(() => {
|
|
|
325
334
|
if (sub && sub.action === drilled) return sub.title;
|
|
326
335
|
return null;
|
|
327
336
|
});
|
|
337
|
+
const selectedOperationAncestor = computed(() => {
|
|
338
|
+
const node = selectedActionItem.value ?? selectedSubRef.value;
|
|
339
|
+
if (!node?.action) return null;
|
|
340
|
+
const entry = findButton(node.action.type, node.action.compatibilityDate);
|
|
341
|
+
const operations = entry?.metadata.operations;
|
|
342
|
+
if (!entry || !operations || operations.length === 0) return null;
|
|
343
|
+
return {
|
|
344
|
+
instanceId: node.id,
|
|
345
|
+
// Undefined when the button has no title — the trigger UI then shows the
|
|
346
|
+
// type name alone instead of an empty 「」.
|
|
347
|
+
name: getLocalizedText(node.title, "zh"),
|
|
348
|
+
typeName: entry.metadata.name,
|
|
349
|
+
typeIcon: entry.metadata.icon,
|
|
350
|
+
operations
|
|
351
|
+
};
|
|
352
|
+
});
|
|
353
|
+
provideEventAncestor(selectedOperationAncestor);
|
|
328
354
|
const outerTakeover = inject(SIDEBAR_TAKEOVER_KEY, null);
|
|
329
355
|
const outerTakeoverTarget = computed(() => outerTakeover?.target.value ?? null);
|
|
330
356
|
const sidebarTakeoverTarget = ref(null);
|
|
@@ -1350,6 +1376,18 @@ const newGroupZoneId = (insertIndex) => `new-group-${insertIndex}`;
|
|
|
1350
1376
|
<div class="text-xs text-zinc-400">
|
|
1351
1377
|
{{ getButtonMetadataLabel(selectedActionItem.action) }}
|
|
1352
1378
|
</div>
|
|
1379
|
+
|
|
1380
|
+
<div
|
|
1381
|
+
v-if="getButtonDeprecationNote(selectedActionItem.action)"
|
|
1382
|
+
class="flex items-start gap-2 rounded border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800"
|
|
1383
|
+
role="alert"
|
|
1384
|
+
>
|
|
1385
|
+
<Icon
|
|
1386
|
+
icon="fluent:warning-20-regular"
|
|
1387
|
+
class="mt-px size-4 shrink-0"
|
|
1388
|
+
/>
|
|
1389
|
+
<span class="flex-1">{{ getButtonDeprecationNote(selectedActionItem.action) }}</span>
|
|
1390
|
+
</div>
|
|
1353
1391
|
</template>
|
|
1354
1392
|
|
|
1355
1393
|
<component
|
|
@@ -1525,6 +1563,18 @@ const newGroupZoneId = (insertIndex) => `new-group-${insertIndex}`;
|
|
|
1525
1563
|
<div class="text-xs text-zinc-400">
|
|
1526
1564
|
{{ getButtonMetadataLabel(selectedSubRef.action) }}
|
|
1527
1565
|
</div>
|
|
1566
|
+
|
|
1567
|
+
<div
|
|
1568
|
+
v-if="getButtonDeprecationNote(selectedSubRef.action)"
|
|
1569
|
+
class="flex items-start gap-2 rounded border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800"
|
|
1570
|
+
role="alert"
|
|
1571
|
+
>
|
|
1572
|
+
<Icon
|
|
1573
|
+
icon="fluent:warning-20-regular"
|
|
1574
|
+
class="mt-px size-4 shrink-0"
|
|
1575
|
+
/>
|
|
1576
|
+
<span class="flex-1">{{ getButtonDeprecationNote(selectedSubRef.action) }}</span>
|
|
1577
|
+
</div>
|
|
1528
1578
|
</template>
|
|
1529
1579
|
|
|
1530
1580
|
<component
|
|
@@ -288,6 +288,10 @@ export declare function defaultActionsConfig(): ActionsConfigValue;
|
|
|
288
288
|
type AnySchema = Schema.Schema<any, any, any>;
|
|
289
289
|
export declare function getStructFieldTitle(schema: AnySchema, fieldName: string): string | undefined;
|
|
290
290
|
export declare function getStructFieldDescription(schema: AnySchema, fieldName: string): string | undefined;
|
|
291
|
+
/** Top-level `title` annotation of a schema, if any. */
|
|
292
|
+
export declare function getSchemaTitle(schema: AnySchema): string | undefined;
|
|
293
|
+
/** Top-level `description` annotation of a schema, if any. */
|
|
294
|
+
export declare function getSchemaDescription(schema: AnySchema): string | undefined;
|
|
291
295
|
export type ActionsConfigValue = Schema.Schema.Type<ReturnType<typeof ActionsConfig>>;
|
|
292
296
|
export type ActionGroupValue = ActionsConfigValue['groups'][number];
|
|
293
297
|
export type ActionGroupItemValue = ActionsConfigValue['items'][number];
|
|
@@ -208,3 +208,9 @@ export function getStructFieldTitle(schema, fieldName) {
|
|
|
208
208
|
export function getStructFieldDescription(schema, fieldName) {
|
|
209
209
|
return getFieldAnnotation(schema, fieldName, SchemaAST.getDescriptionAnnotation);
|
|
210
210
|
}
|
|
211
|
+
export function getSchemaTitle(schema) {
|
|
212
|
+
return Option.getOrUndefined(SchemaAST.getTitleAnnotation(schema.ast));
|
|
213
|
+
}
|
|
214
|
+
export function getSchemaDescription(schema) {
|
|
215
|
+
return Option.getOrUndefined(SchemaAST.getDescriptionAnnotation(schema.ast));
|
|
216
|
+
}
|
|
@@ -3,6 +3,7 @@ import type { Schema } from 'effect';
|
|
|
3
3
|
import { Effect } from 'effect';
|
|
4
4
|
import type { Fetch } from 'fx-fetch';
|
|
5
5
|
import type { Environment } from '../../../vendor/cel-js/lib/index.js';
|
|
6
|
+
import type { EventChannel, OperationDescriptor, TriggerValue } from '../../../share/event-bus.js';
|
|
6
7
|
type CelEvaluator = <T>(expression: string, context?: Record<string, unknown>) => Effect.Effect<T, any>;
|
|
7
8
|
type AnySchema = Schema.Schema<any, any, never>;
|
|
8
9
|
type SchemaFactory = (configure: (env: Environment) => void) => AnySchema;
|
|
@@ -10,6 +11,8 @@ export type ButtonMetadata = Readonly<{
|
|
|
10
11
|
name: string;
|
|
11
12
|
icon: string;
|
|
12
13
|
drillable?: boolean;
|
|
14
|
+
operations?: ReadonlyArray<OperationDescriptor>;
|
|
15
|
+
deprecated?: string;
|
|
13
16
|
}>;
|
|
14
17
|
export type ButtonEntry = Readonly<{
|
|
15
18
|
type: string;
|
|
@@ -18,10 +21,31 @@ export type ButtonEntry = Readonly<{
|
|
|
18
21
|
schema: SchemaFactory;
|
|
19
22
|
config: Component;
|
|
20
23
|
runtime: Component;
|
|
24
|
+
/** True when this button type is deprecated — explicit flag or newer date. */
|
|
25
|
+
deprecated: boolean;
|
|
26
|
+
/** Migration guidance shown in the inspector when `deprecated`. */
|
|
27
|
+
deprecationNote?: string;
|
|
21
28
|
}>;
|
|
22
29
|
export declare const BUTTONS: ReadonlyArray<ButtonEntry>;
|
|
23
30
|
export declare function allButtonSchemas(configure: (env: Environment) => void): ReadonlyArray<AnySchema>;
|
|
24
31
|
export declare function findButton(type: string, compatibilityDate: string): ButtonEntry | undefined;
|
|
25
32
|
export declare function interpolateMarkdown(source: string, $cel: CelEvaluator): string;
|
|
26
|
-
|
|
33
|
+
type ToastStyle = 'success' | 'error' | 'warning' | 'info';
|
|
34
|
+
/**
|
|
35
|
+
* Post-completion behaviour shared by the HTTP-request buttons. Once the
|
|
36
|
+
* request finishes, `resultExpression` classifies the outcome into one of the
|
|
37
|
+
* four `ToastStyle`s (default `success`); that single result then both styles
|
|
38
|
+
* the toast and selects which trigger list runs.
|
|
39
|
+
*/
|
|
40
|
+
export type HttpRequestOutcome = {
|
|
41
|
+
/** Toast message expression, evaluated against `json`. No toast when absent. */
|
|
42
|
+
messageExpression?: string;
|
|
43
|
+
/** Result classifier, evaluated against `json`. Defaults to `success`. */
|
|
44
|
+
resultExpression?: string;
|
|
45
|
+
/** Bubbling channel for the result-keyed trigger lists. */
|
|
46
|
+
channel?: EventChannel;
|
|
47
|
+
/** Trigger lists keyed by result — the one matching the result runs. */
|
|
48
|
+
triggers?: Partial<Record<ToastStyle, ReadonlyArray<TriggerValue>>>;
|
|
49
|
+
};
|
|
50
|
+
export declare function executeHttpRequest(expression: string, $cel: CelEvaluator, outcome?: HttpRequestOutcome): Effect.Effect<unknown, any, Fetch.Fetch>;
|
|
27
51
|
export {};
|
|
@@ -2,6 +2,7 @@ import { defineAsyncComponent } from "vue";
|
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
import { toast } from "vue-sonner";
|
|
4
4
|
import { defineRegistry } from "../../../share/define-registry.js";
|
|
5
|
+
import { dispatchTriggers } from "../../../share/event-bus.js";
|
|
5
6
|
const schemaModules = import.meta.glob(
|
|
6
7
|
"../buttons/*/*/schema.{ts,js}",
|
|
7
8
|
{ eager: true, exhaustive: true }
|
|
@@ -31,7 +32,29 @@ const registry = defineRegistry({
|
|
|
31
32
|
dirSegment: "buttons",
|
|
32
33
|
schemaModules,
|
|
33
34
|
configModules,
|
|
34
|
-
runtimeModules
|
|
35
|
+
runtimeModules,
|
|
36
|
+
// A button is deprecated when its schema declares `metadata.deprecated`
|
|
37
|
+
// (an explicit, possibly cross-type replacement note), or when a newer
|
|
38
|
+
// `compatibilityDate` of the same `type` exists (the date-versioned rule
|
|
39
|
+
// shared with form). Either way the inspector shows the migration hint.
|
|
40
|
+
deriveEntryExtras: (drafts) => {
|
|
41
|
+
const latestByType = /* @__PURE__ */ new Map();
|
|
42
|
+
for (const d of drafts) {
|
|
43
|
+
const prev = latestByType.get(d.type);
|
|
44
|
+
if (!prev || d.compatibilityDate > prev) latestByType.set(d.type, d.compatibilityDate);
|
|
45
|
+
}
|
|
46
|
+
return (draft) => {
|
|
47
|
+
const note = draft.module.metadata.deprecated;
|
|
48
|
+
if (note) return { deprecated: true, deprecationNote: note };
|
|
49
|
+
if (draft.compatibilityDate < latestByType.get(draft.type)) {
|
|
50
|
+
return {
|
|
51
|
+
deprecated: true,
|
|
52
|
+
deprecationNote: `\u5DF2\u88AB\u66F4\u65B0\u7248\u672C ${latestByType.get(draft.type)} \u53D6\u4EE3\u3002`
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
return { deprecated: false };
|
|
56
|
+
};
|
|
57
|
+
}
|
|
35
58
|
});
|
|
36
59
|
export const BUTTONS = registry.ENTRIES.map((e) => ({
|
|
37
60
|
type: e.type,
|
|
@@ -39,7 +62,9 @@ export const BUTTONS = registry.ENTRIES.map((e) => ({
|
|
|
39
62
|
metadata: e.module.metadata,
|
|
40
63
|
schema: e.module.schema,
|
|
41
64
|
config: e.config,
|
|
42
|
-
runtime: e.runtime
|
|
65
|
+
runtime: e.runtime,
|
|
66
|
+
deprecated: e.deprecated,
|
|
67
|
+
...e.deprecationNote !== void 0 ? { deprecationNote: e.deprecationNote } : {}
|
|
43
68
|
}));
|
|
44
69
|
export function allButtonSchemas(configure) {
|
|
45
70
|
return BUTTONS.map((entry) => entry.schema(configure));
|
|
@@ -65,18 +90,21 @@ function stringifyCelResult(value) {
|
|
|
65
90
|
return String(value);
|
|
66
91
|
}
|
|
67
92
|
const TOAST_STYLES = /* @__PURE__ */ new Set(["success", "error", "warning", "info"]);
|
|
68
|
-
export function executeHttpRequest(expression, $cel,
|
|
93
|
+
export function executeHttpRequest(expression, $cel, outcome = {}) {
|
|
94
|
+
const { messageExpression, resultExpression, channel, triggers } = outcome;
|
|
69
95
|
const request = Effect.flatMap(
|
|
70
96
|
$cel(expression),
|
|
71
97
|
(builder) => builder.json()
|
|
72
98
|
);
|
|
73
|
-
if (messageExpression === void 0) return request;
|
|
74
99
|
return Effect.flatMap(request, (body) => {
|
|
75
100
|
const context = { json: body };
|
|
76
|
-
const
|
|
77
|
-
return Effect.flatMap(
|
|
78
|
-
Effect.
|
|
79
|
-
|
|
80
|
-
|
|
101
|
+
const result = resultExpression === void 0 ? Effect.succeed("success") : Effect.map($cel(resultExpression, context), (s) => TOAST_STYLES.has(s) ? s : "success");
|
|
102
|
+
return Effect.flatMap(result, (kind) => {
|
|
103
|
+
const toasted = messageExpression === void 0 ? Effect.void : Effect.flatMap(
|
|
104
|
+
$cel(messageExpression, context),
|
|
105
|
+
(message) => Effect.sync(() => toast[kind](message))
|
|
106
|
+
);
|
|
107
|
+
return Effect.andThen(toasted, dispatchTriggers(channel, triggers?.[kind]));
|
|
108
|
+
});
|
|
81
109
|
});
|
|
82
110
|
}
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "../ui/input-group";
|
|
23
23
|
import { Field, FieldLabel } from "../ui/field";
|
|
24
24
|
import useInfinitePlane from "../../composables/useInfinitePlane";
|
|
25
|
-
import { findFreePlacement } from "../../share/layout";
|
|
25
|
+
import { DEFAULT_GAP, findFreePlacement } from "../../share/layout";
|
|
26
26
|
defineOptions({ name: "ShwfedBlockLayoutEditor" });
|
|
27
27
|
const layouts = defineModel({ type: Array, ...{ required: true } });
|
|
28
28
|
const activeIndex = defineModel("activeIndex", { type: Number, ...{ default: 0 } });
|
|
@@ -73,12 +73,11 @@ function emitAddNew(entry) {
|
|
|
73
73
|
const itemNoun = computed(() => props.itemNoun ?? "\u5757");
|
|
74
74
|
const CANVAS_STEP_PX = 24;
|
|
75
75
|
const activeLayout = computed(() => layouts.value[activeIndex.value]);
|
|
76
|
-
const GAP_DEFAULT = 4;
|
|
77
76
|
const editorGaps = ref(/* @__PURE__ */ new Map());
|
|
78
77
|
function getGap(i) {
|
|
79
78
|
const cached = editorGaps.value.get(i);
|
|
80
79
|
if (cached !== void 0) return cached;
|
|
81
|
-
return layouts.value[i]?.layout.gap ??
|
|
80
|
+
return layouts.value[i]?.layout.gap ?? DEFAULT_GAP;
|
|
82
81
|
}
|
|
83
82
|
const activeGap = computed(() => getGap(activeIndex.value));
|
|
84
83
|
const stepPx = computed(() => CANVAS_STEP_PX);
|
|
@@ -141,15 +140,16 @@ function writeTracks(i, nextPlacements) {
|
|
|
141
140
|
if (x2 - 1 > cols) cols = x2 - 1;
|
|
142
141
|
if (y2 - 1 > rows) rows = y2 - 1;
|
|
143
142
|
}
|
|
144
|
-
|
|
145
|
-
...ls
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
return {
|
|
144
|
+
...ls,
|
|
145
|
+
layout: {
|
|
146
|
+
...ls.layout,
|
|
147
|
+
placements,
|
|
148
|
+
columns: Math.max(1, cols),
|
|
149
|
+
rows: Math.max(1, rows),
|
|
150
|
+
gap
|
|
151
|
+
}
|
|
150
152
|
};
|
|
151
|
-
if (gap === 0 && "gap" in nextLayout) delete nextLayout.gap;
|
|
152
|
-
return { ...ls, layout: nextLayout };
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
const isSpaceHeld = ref(false);
|
|
@@ -114,10 +114,6 @@ defineExpose({ addLayout });
|
|
|
114
114
|
/>
|
|
115
115
|
|
|
116
116
|
<span class="flex-1 truncate">{{ ls.name || "\u672A\u547D\u540D\u5E03\u5C40" }}</span>
|
|
117
|
-
<span
|
|
118
|
-
v-if="ls.media"
|
|
119
|
-
class="truncate text-xs tabular-nums text-zinc-400 group-hover:hidden"
|
|
120
|
-
>{{ ls.media }}</span>
|
|
121
117
|
|
|
122
118
|
<span
|
|
123
119
|
class="ml-auto flex items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100"
|
package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.d.vue.ts
CHANGED
|
@@ -30,6 +30,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
30
30
|
};
|
|
31
31
|
readonly media?: string | undefined;
|
|
32
32
|
}[];
|
|
33
|
+
readonly readonly?: string | undefined;
|
|
33
34
|
};
|
|
34
35
|
readonly type: "com.shwfed.block.form";
|
|
35
36
|
readonly id: string;
|
|
@@ -58,6 +59,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
58
59
|
};
|
|
59
60
|
readonly media?: string | undefined;
|
|
60
61
|
}[];
|
|
62
|
+
readonly readonly?: string | undefined;
|
|
61
63
|
};
|
|
62
64
|
readonly type: "com.shwfed.block.form";
|
|
63
65
|
readonly id: string;
|
package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
30
30
|
};
|
|
31
31
|
readonly media?: string | undefined;
|
|
32
32
|
}[];
|
|
33
|
+
readonly readonly?: string | undefined;
|
|
33
34
|
};
|
|
34
35
|
readonly type: "com.shwfed.block.form";
|
|
35
36
|
readonly id: string;
|
|
@@ -58,6 +59,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
58
59
|
};
|
|
59
60
|
readonly media?: string | undefined;
|
|
60
61
|
}[];
|
|
62
|
+
readonly readonly?: string | undefined;
|
|
61
63
|
};
|
|
62
64
|
readonly type: "com.shwfed.block.form";
|
|
63
65
|
readonly id: string;
|
package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts
CHANGED
|
@@ -32,6 +32,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
32
32
|
};
|
|
33
33
|
readonly media?: string | undefined;
|
|
34
34
|
}[];
|
|
35
|
+
readonly readonly?: string | undefined;
|
|
35
36
|
};
|
|
36
37
|
readonly type: "com.shwfed.block.form";
|
|
37
38
|
readonly id: string;
|
|
@@ -61,6 +62,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
61
62
|
};
|
|
62
63
|
readonly media?: string | undefined;
|
|
63
64
|
}[];
|
|
65
|
+
readonly readonly?: string | undefined;
|
|
64
66
|
};
|
|
65
67
|
readonly type: "com.shwfed.block.form";
|
|
66
68
|
readonly id: string;
|
package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
32
32
|
};
|
|
33
33
|
readonly media?: string | undefined;
|
|
34
34
|
}[];
|
|
35
|
+
readonly readonly?: string | undefined;
|
|
35
36
|
};
|
|
36
37
|
readonly type: "com.shwfed.block.form";
|
|
37
38
|
readonly id: string;
|
|
@@ -61,6 +62,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
61
62
|
};
|
|
62
63
|
readonly media?: string | undefined;
|
|
63
64
|
}[];
|
|
65
|
+
readonly readonly?: string | undefined;
|
|
64
66
|
};
|
|
65
67
|
readonly type: "com.shwfed.block.form";
|
|
66
68
|
readonly id: string;
|