@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
package/dist/module.d.mts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
|
-
interface ModuleOptions {
|
|
4
|
-
api?: {
|
|
5
|
-
expired?: string;
|
|
6
|
-
interception?: string;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
3
|
interface Env {
|
|
10
4
|
git: Readonly<{
|
|
11
5
|
commit?: string;
|
|
@@ -15,14 +9,6 @@ interface Env {
|
|
|
15
9
|
job?: string;
|
|
16
10
|
build?: number;
|
|
17
11
|
}>;
|
|
18
|
-
api: Readonly<{
|
|
19
|
-
host?: string;
|
|
20
|
-
logout?: string;
|
|
21
|
-
interception?: string;
|
|
22
|
-
}>;
|
|
23
|
-
headers: Readonly<{
|
|
24
|
-
token?: string;
|
|
25
|
-
}>;
|
|
26
12
|
}
|
|
27
13
|
declare module 'nuxt/schema' {
|
|
28
14
|
interface PublicRuntimeConfig {
|
|
@@ -33,12 +19,9 @@ declare global {
|
|
|
33
19
|
interface ImportMetaEnv {
|
|
34
20
|
readonly GIT_COMMIT?: string;
|
|
35
21
|
readonly GIT_LOCAL_BRANCH?: string;
|
|
36
|
-
readonly NUXT_PUBLIC_API_URI?: string;
|
|
37
|
-
readonly NUXT_PUBLIC_SSO_LOGOUT_URI?: string;
|
|
38
|
-
readonly NUXT_PUBLIC_TOKEN_HEADER_NAME?: string;
|
|
39
22
|
}
|
|
40
23
|
}
|
|
41
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
24
|
+
declare const _default: _nuxt_schema.NuxtModule<_nuxt_schema.ModuleOptions, _nuxt_schema.ModuleOptions, false>;
|
|
42
25
|
|
|
43
26
|
export { _default as default };
|
|
44
|
-
export type { Env
|
|
27
|
+
export type { Env };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { readdirSync } from 'node:fs';
|
|
2
|
-
import { defineNuxtModule, createResolver, addVitePlugin, extendViteConfig, addPlugin,
|
|
2
|
+
import { defineNuxtModule, createResolver, addVitePlugin, extendViteConfig, addPlugin, addComponent, addImports } from '@nuxt/kit';
|
|
3
3
|
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
|
4
4
|
import TailwindCSS from '@tailwindcss/vite';
|
|
5
|
-
import { defu } from 'defu';
|
|
6
5
|
|
|
7
6
|
const EXPOSED_UI_FOLDERS = [
|
|
8
7
|
"alert-dialog",
|
|
@@ -66,10 +65,9 @@ const module$1 = defineNuxtModule({
|
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
67
|
},
|
|
69
|
-
|
|
70
|
-
setup(options, nuxt) {
|
|
68
|
+
setup(_options, nuxt) {
|
|
71
69
|
const resolver = createResolver(import.meta.url);
|
|
72
|
-
const resolvedConfig =
|
|
70
|
+
const resolvedConfig = {
|
|
73
71
|
git: {
|
|
74
72
|
commit: process.env.GIT_COMMIT,
|
|
75
73
|
branch: process.env.GIT_LOCAL_BRANCH
|
|
@@ -77,16 +75,8 @@ const module$1 = defineNuxtModule({
|
|
|
77
75
|
ci: {
|
|
78
76
|
job: process.env.JOB_NAME,
|
|
79
77
|
build: process.env.BUILD_NUMBER ? Number.parseInt(process.env.BUILD_NUMBER) : void 0
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
host: process.env.NUXT_PUBLIC_API_URI,
|
|
83
|
-
logout: process.env.NUXT_PUBLIC_SSO_LOGOUT_URI
|
|
84
|
-
},
|
|
85
|
-
headers: {
|
|
86
|
-
token: process.env.NUXT_PUBLIC_TOKEN_HEADER_NAME
|
|
87
|
-
},
|
|
88
|
-
config: options
|
|
89
|
-
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
90
80
|
nuxt.options.runtimeConfig.public.shwfed = resolvedConfig;
|
|
91
81
|
addVitePlugin(VueI18nPlugin({
|
|
92
82
|
ssr: true
|
|
@@ -120,27 +110,16 @@ const module$1 = defineNuxtModule({
|
|
|
120
110
|
"vaul-vue",
|
|
121
111
|
"dot-prop",
|
|
122
112
|
"@internationalized/date",
|
|
123
|
-
"reka-ui/date"
|
|
113
|
+
"reka-ui/date",
|
|
114
|
+
"@unovis/ts",
|
|
115
|
+
"@unovis/vue"
|
|
124
116
|
);
|
|
125
117
|
});
|
|
126
118
|
addPlugin(resolver.resolve("./runtime/plugins/i18n"));
|
|
127
|
-
addPlugin(resolver.resolve("./runtime/plugins/http"));
|
|
128
|
-
addPlugin(resolver.resolve("./runtime/plugins/cel"));
|
|
129
|
-
addPlugin(resolver.resolve("./runtime/plugins/toast"));
|
|
130
|
-
addPlugin(resolver.resolve("./runtime/plugins/ai"));
|
|
131
|
-
addRouteMiddleware({
|
|
132
|
-
path: resolver.resolve("./runtime/middleware/token"),
|
|
133
|
-
name: "shwfed-token",
|
|
134
|
-
global: true
|
|
135
|
-
});
|
|
136
119
|
addComponent({
|
|
137
120
|
name: "ShwfedApp",
|
|
138
121
|
filePath: resolver.resolve("./runtime/components/app.vue")
|
|
139
122
|
});
|
|
140
|
-
addComponent({
|
|
141
|
-
name: "ShwfedModal",
|
|
142
|
-
filePath: resolver.resolve("./runtime/components/modal.vue")
|
|
143
|
-
});
|
|
144
123
|
addComponent({
|
|
145
124
|
name: "ShwfedConfig",
|
|
146
125
|
filePath: resolver.resolve("./runtime/components/config/index.vue")
|
|
@@ -160,11 +139,13 @@ const module$1 = defineNuxtModule({
|
|
|
160
139
|
// Type-only auto-import: hosts binding `<ShwfedConfig v-model:config>`
|
|
161
140
|
// get `PageConfigValue` globally without reaching into `runtime/`.
|
|
162
141
|
{ name: "PageConfigValue", from: resolver.resolve("./runtime/components/config/schema"), type: true },
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
{ name: "
|
|
166
|
-
|
|
167
|
-
|
|
142
|
+
// `provideCELContext` lets the host app inject CEL variables (e.g. an
|
|
143
|
+
// auth token) into the config-driven components.
|
|
144
|
+
{ name: "provideCELContext", from: resolver.resolve("./runtime/utils/cel-context") },
|
|
145
|
+
// `md` lets the host app author Markdown text (with shared trimming /
|
|
146
|
+
// de-indenting) for config-driven components; `Markdown` is its type.
|
|
147
|
+
{ name: "md", from: resolver.resolve("./runtime/share/markdown") },
|
|
148
|
+
{ name: "Markdown", from: resolver.resolve("./runtime/share/markdown"), type: true }
|
|
168
149
|
]);
|
|
169
150
|
}
|
|
170
151
|
});
|
|
@@ -4,19 +4,51 @@ type __VLS_ModelProps = {
|
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
6
|
"update:modelValue": (value: {
|
|
7
|
+
readonly onError?: readonly {
|
|
8
|
+
readonly target: string;
|
|
9
|
+
readonly operation: string;
|
|
10
|
+
}[] | undefined;
|
|
7
11
|
readonly type: "com.shwfed.actions.button.http.request.json";
|
|
8
12
|
readonly compatibilityDate: "2026-04-18";
|
|
9
|
-
readonly expression: string;
|
|
10
13
|
readonly messageExpression?: string | undefined;
|
|
11
|
-
readonly
|
|
14
|
+
readonly resultExpression?: string | undefined;
|
|
15
|
+
readonly expression: string;
|
|
16
|
+
readonly onSuccess?: readonly {
|
|
17
|
+
readonly target: string;
|
|
18
|
+
readonly operation: string;
|
|
19
|
+
}[] | undefined;
|
|
20
|
+
readonly onWarning?: readonly {
|
|
21
|
+
readonly target: string;
|
|
22
|
+
readonly operation: string;
|
|
23
|
+
}[] | undefined;
|
|
24
|
+
readonly onInfo?: readonly {
|
|
25
|
+
readonly target: string;
|
|
26
|
+
readonly operation: string;
|
|
27
|
+
}[] | undefined;
|
|
12
28
|
}) => any;
|
|
13
29
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
14
30
|
"onUpdate:modelValue"?: ((value: {
|
|
31
|
+
readonly onError?: readonly {
|
|
32
|
+
readonly target: string;
|
|
33
|
+
readonly operation: string;
|
|
34
|
+
}[] | undefined;
|
|
15
35
|
readonly type: "com.shwfed.actions.button.http.request.json";
|
|
16
36
|
readonly compatibilityDate: "2026-04-18";
|
|
17
|
-
readonly expression: string;
|
|
18
37
|
readonly messageExpression?: string | undefined;
|
|
19
|
-
readonly
|
|
38
|
+
readonly resultExpression?: string | undefined;
|
|
39
|
+
readonly expression: string;
|
|
40
|
+
readonly onSuccess?: readonly {
|
|
41
|
+
readonly target: string;
|
|
42
|
+
readonly operation: string;
|
|
43
|
+
}[] | undefined;
|
|
44
|
+
readonly onWarning?: readonly {
|
|
45
|
+
readonly target: string;
|
|
46
|
+
readonly operation: string;
|
|
47
|
+
}[] | undefined;
|
|
48
|
+
readonly onInfo?: readonly {
|
|
49
|
+
readonly target: string;
|
|
50
|
+
readonly operation: string;
|
|
51
|
+
}[] | undefined;
|
|
20
52
|
}) => any) | undefined;
|
|
21
53
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
54
|
declare const _default: typeof __VLS_export;
|
|
@@ -3,6 +3,7 @@ import { Field, FieldLabel } from "../../../../ui/field";
|
|
|
3
3
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
4
4
|
import { Markdown } from "../../../../ui/markdown";
|
|
5
5
|
import { getStructFieldDescription, getStructFieldTitle } from "../../../schema";
|
|
6
|
+
import TriggersField from "../../../components/triggers-field.vue";
|
|
6
7
|
import { schema } from "./schema";
|
|
7
8
|
defineOptions({ name: "ShwfedHttpRequestActionConfig" });
|
|
8
9
|
const value = defineModel({ type: null, ...{ required: true } });
|
|
@@ -10,18 +11,25 @@ const actionSchema = schema(() => {
|
|
|
10
11
|
});
|
|
11
12
|
const fieldTitle = (f) => getStructFieldTitle(actionSchema, f) ?? f;
|
|
12
13
|
const fieldDescription = (f) => getStructFieldDescription(actionSchema, f);
|
|
14
|
+
const RESULT_FIELDS = ["onSuccess", "onWarning", "onError", "onInfo"];
|
|
13
15
|
function updateMessageExpression(v) {
|
|
14
16
|
const next = { ...value.value };
|
|
15
17
|
if (v.length === 0) delete next.messageExpression;
|
|
16
18
|
else next.messageExpression = v;
|
|
17
19
|
value.value = next;
|
|
18
20
|
}
|
|
19
|
-
function
|
|
21
|
+
function updateResultExpression(v) {
|
|
20
22
|
const next = { ...value.value };
|
|
21
|
-
if (v.length === 0) delete next.
|
|
22
|
-
else next.
|
|
23
|
+
if (v.length === 0) delete next.resultExpression;
|
|
24
|
+
else next.resultExpression = v;
|
|
23
25
|
value.value = next;
|
|
24
26
|
}
|
|
27
|
+
function updateTriggers(key, next) {
|
|
28
|
+
const draft = { ...value.value };
|
|
29
|
+
if (next.length === 0) Reflect.deleteProperty(draft, key);
|
|
30
|
+
else draft[key] = next;
|
|
31
|
+
value.value = draft;
|
|
32
|
+
}
|
|
25
33
|
</script>
|
|
26
34
|
|
|
27
35
|
<template>
|
|
@@ -83,23 +91,52 @@ function updateStyleExpression(v) {
|
|
|
83
91
|
>
|
|
84
92
|
<FieldLabel class="text-xs text-zinc-500">
|
|
85
93
|
<template
|
|
86
|
-
v-if="fieldDescription('
|
|
94
|
+
v-if="fieldDescription('resultExpression')"
|
|
87
95
|
#tooltip
|
|
88
96
|
>
|
|
89
97
|
<Markdown
|
|
90
|
-
:source="fieldDescription('
|
|
98
|
+
:source="fieldDescription('resultExpression')"
|
|
91
99
|
block
|
|
92
100
|
class="prose prose-sm prose-zinc"
|
|
93
101
|
/>
|
|
94
102
|
</template>
|
|
95
|
-
{{ fieldTitle("
|
|
103
|
+
{{ fieldTitle("resultExpression") }}
|
|
96
104
|
</FieldLabel>
|
|
97
105
|
<ExpressionEditor
|
|
98
|
-
:model-value="value.
|
|
106
|
+
:model-value="value.resultExpression ?? ''"
|
|
99
107
|
placeholder="例:json.code == 0 ? 'success' : 'error'"
|
|
100
108
|
result-type="string"
|
|
101
109
|
:extra-vars="{ json: { type: 'dyn', label: 'HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09' } }"
|
|
102
|
-
@update:model-value="
|
|
110
|
+
@update:model-value="updateResultExpression"
|
|
111
|
+
/>
|
|
112
|
+
</Field>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<!-- One trigger list per 「执行结果」: the request completes, the result
|
|
116
|
+
classifies the outcome, and the matching cell's operations run. -->
|
|
117
|
+
<div class="grid grid-cols-2 gap-3">
|
|
118
|
+
<Field
|
|
119
|
+
v-for="key in RESULT_FIELDS"
|
|
120
|
+
:key="key"
|
|
121
|
+
orientation="vertical"
|
|
122
|
+
class="min-w-0"
|
|
123
|
+
>
|
|
124
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
125
|
+
<template
|
|
126
|
+
v-if="fieldDescription(key)"
|
|
127
|
+
#tooltip
|
|
128
|
+
>
|
|
129
|
+
<Markdown
|
|
130
|
+
:source="fieldDescription(key)"
|
|
131
|
+
block
|
|
132
|
+
class="prose prose-sm prose-zinc"
|
|
133
|
+
/>
|
|
134
|
+
</template>
|
|
135
|
+
{{ fieldTitle(key) }}
|
|
136
|
+
</FieldLabel>
|
|
137
|
+
<TriggersField
|
|
138
|
+
:triggers="value[key] ?? []"
|
|
139
|
+
@update:triggers="(v) => updateTriggers(key, v)"
|
|
103
140
|
/>
|
|
104
141
|
</Field>
|
|
105
142
|
</div>
|
|
@@ -4,19 +4,51 @@ type __VLS_ModelProps = {
|
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
6
|
"update:modelValue": (value: {
|
|
7
|
+
readonly onError?: readonly {
|
|
8
|
+
readonly target: string;
|
|
9
|
+
readonly operation: string;
|
|
10
|
+
}[] | undefined;
|
|
7
11
|
readonly type: "com.shwfed.actions.button.http.request.json";
|
|
8
12
|
readonly compatibilityDate: "2026-04-18";
|
|
9
|
-
readonly expression: string;
|
|
10
13
|
readonly messageExpression?: string | undefined;
|
|
11
|
-
readonly
|
|
14
|
+
readonly resultExpression?: string | undefined;
|
|
15
|
+
readonly expression: string;
|
|
16
|
+
readonly onSuccess?: readonly {
|
|
17
|
+
readonly target: string;
|
|
18
|
+
readonly operation: string;
|
|
19
|
+
}[] | undefined;
|
|
20
|
+
readonly onWarning?: readonly {
|
|
21
|
+
readonly target: string;
|
|
22
|
+
readonly operation: string;
|
|
23
|
+
}[] | undefined;
|
|
24
|
+
readonly onInfo?: readonly {
|
|
25
|
+
readonly target: string;
|
|
26
|
+
readonly operation: string;
|
|
27
|
+
}[] | undefined;
|
|
12
28
|
}) => any;
|
|
13
29
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
14
30
|
"onUpdate:modelValue"?: ((value: {
|
|
31
|
+
readonly onError?: readonly {
|
|
32
|
+
readonly target: string;
|
|
33
|
+
readonly operation: string;
|
|
34
|
+
}[] | undefined;
|
|
15
35
|
readonly type: "com.shwfed.actions.button.http.request.json";
|
|
16
36
|
readonly compatibilityDate: "2026-04-18";
|
|
17
|
-
readonly expression: string;
|
|
18
37
|
readonly messageExpression?: string | undefined;
|
|
19
|
-
readonly
|
|
38
|
+
readonly resultExpression?: string | undefined;
|
|
39
|
+
readonly expression: string;
|
|
40
|
+
readonly onSuccess?: readonly {
|
|
41
|
+
readonly target: string;
|
|
42
|
+
readonly operation: string;
|
|
43
|
+
}[] | undefined;
|
|
44
|
+
readonly onWarning?: readonly {
|
|
45
|
+
readonly target: string;
|
|
46
|
+
readonly operation: string;
|
|
47
|
+
}[] | undefined;
|
|
48
|
+
readonly onInfo?: readonly {
|
|
49
|
+
readonly target: string;
|
|
50
|
+
readonly operation: string;
|
|
51
|
+
}[] | undefined;
|
|
20
52
|
}) => any) | undefined;
|
|
21
53
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
54
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useNuxtApp } from "#app";
|
|
3
2
|
import { Effect } from "effect";
|
|
4
|
-
import {
|
|
3
|
+
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
4
|
+
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
5
|
+
import { useEventChannel } from "../../../../../share/event-bus";
|
|
5
6
|
import ShwfedActionDefinition from "../../../components/definition.vue";
|
|
6
7
|
import { executeHttpRequest } from "../../../utils/resolve";
|
|
7
8
|
defineOptions({ name: "ShwfedHttpRequestActionRuntime" });
|
|
@@ -9,16 +10,21 @@ const props = defineProps({
|
|
|
9
10
|
buttonId: { type: String, required: true },
|
|
10
11
|
config: { type: null, required: true }
|
|
11
12
|
});
|
|
12
|
-
const { $cel: _rawCel } = useNuxtApp();
|
|
13
13
|
const inherited = injectCELContext();
|
|
14
14
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
15
|
+
const channel = useEventChannel();
|
|
15
16
|
const effect = Effect.suspend(
|
|
16
|
-
() => executeHttpRequest(
|
|
17
|
-
props.config.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
() => executeHttpRequest(props.config.expression, $cel, {
|
|
18
|
+
messageExpression: props.config.messageExpression,
|
|
19
|
+
resultExpression: props.config.resultExpression,
|
|
20
|
+
channel,
|
|
21
|
+
triggers: {
|
|
22
|
+
success: props.config.onSuccess,
|
|
23
|
+
warning: props.config.onWarning,
|
|
24
|
+
error: props.config.onError,
|
|
25
|
+
info: props.config.onInfo
|
|
26
|
+
}
|
|
27
|
+
})
|
|
22
28
|
);
|
|
23
29
|
</script>
|
|
24
30
|
|
|
@@ -11,6 +11,22 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
11
11
|
compatibilityDate: Schema.Literal<["2026-04-18"]>;
|
|
12
12
|
expression: Schema.Schema<string, string, never>;
|
|
13
13
|
messageExpression: Schema.optional<Schema.Schema<string, string, never>>;
|
|
14
|
-
|
|
14
|
+
resultExpression: Schema.optional<Schema.Schema<string, string, never>>;
|
|
15
|
+
onSuccess: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
16
|
+
target: Schema.refine<string, typeof Schema.String>;
|
|
17
|
+
operation: Schema.SchemaClass<string, string, never>;
|
|
18
|
+
}>>>;
|
|
19
|
+
onWarning: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
20
|
+
target: Schema.refine<string, typeof Schema.String>;
|
|
21
|
+
operation: Schema.SchemaClass<string, string, never>;
|
|
22
|
+
}>>>;
|
|
23
|
+
onError: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
24
|
+
target: Schema.refine<string, typeof Schema.String>;
|
|
25
|
+
operation: Schema.SchemaClass<string, string, never>;
|
|
26
|
+
}>>>;
|
|
27
|
+
onInfo: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
28
|
+
target: Schema.refine<string, typeof Schema.String>;
|
|
29
|
+
operation: Schema.SchemaClass<string, string, never>;
|
|
30
|
+
}>>>;
|
|
15
31
|
}>;
|
|
16
32
|
export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Expression } from "../../../../../share/expression.js";
|
|
3
|
+
import { Triggers } from "../../../../../share/event-bus.js";
|
|
3
4
|
import { md } from "../../../../../share/markdown.js";
|
|
4
5
|
export const type = "com.shwfed.actions.button.http.request.json";
|
|
5
6
|
export const compatibilityDate = "2026-04-18";
|
|
@@ -34,12 +35,30 @@ export function schema(configure) {
|
|
|
34
35
|
不配置则不显示。
|
|
35
36
|
`
|
|
36
37
|
})),
|
|
37
|
-
|
|
38
|
-
title: "\
|
|
38
|
+
resultExpression: Schema.optional(CelMessage.annotations({
|
|
39
|
+
title: "\u6267\u884C\u7ED3\u679C",
|
|
39
40
|
description: md`
|
|
40
|
-
|
|
41
|
-
支持 \`'success' | '
|
|
41
|
+
在响应体解析为 JSON 后对其求值,返回 \`string\`。
|
|
42
|
+
支持 \`'success' | 'warning' | 'error' | 'info'\`;其他值按 \`success\` 处理。不配置则按 \`success\` 处理。
|
|
43
|
+
|
|
44
|
+
它同时决定 toast 的样式,以及请求完成后执行下方哪一组操作。
|
|
42
45
|
`
|
|
46
|
+
})),
|
|
47
|
+
onSuccess: Schema.optional(Triggers.annotations({
|
|
48
|
+
title: "\u6210\u529F",
|
|
49
|
+
description: "\u300C\u6267\u884C\u7ED3\u679C\u300D\u4E3A `success` \u65F6\uFF0C\u8BF7\u6C42\u5B8C\u6210\u540E\u6267\u884C\u7684\u64CD\u4F5C"
|
|
50
|
+
})),
|
|
51
|
+
onWarning: Schema.optional(Triggers.annotations({
|
|
52
|
+
title: "\u8B66\u544A",
|
|
53
|
+
description: "\u300C\u6267\u884C\u7ED3\u679C\u300D\u4E3A `warning` \u65F6\uFF0C\u8BF7\u6C42\u5B8C\u6210\u540E\u6267\u884C\u7684\u64CD\u4F5C"
|
|
54
|
+
})),
|
|
55
|
+
onError: Schema.optional(Triggers.annotations({
|
|
56
|
+
title: "\u9519\u8BEF",
|
|
57
|
+
description: "\u300C\u6267\u884C\u7ED3\u679C\u300D\u4E3A `error` \u65F6\uFF0C\u8BF7\u6C42\u5B8C\u6210\u540E\u6267\u884C\u7684\u64CD\u4F5C"
|
|
58
|
+
})),
|
|
59
|
+
onInfo: Schema.optional(Triggers.annotations({
|
|
60
|
+
title: "\u4FE1\u606F",
|
|
61
|
+
description: "\u300C\u6267\u884C\u7ED3\u679C\u300D\u4E3A `info` \u65F6\uFF0C\u8BF7\u6C42\u5B8C\u6210\u540E\u6267\u884C\u7684\u64CD\u4F5C"
|
|
43
62
|
}))
|
|
44
63
|
}).annotations({
|
|
45
64
|
title: "HttpRequestAction",
|
|
@@ -4,10 +4,16 @@ type __VLS_ModelProps = {
|
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
6
|
"update:modelValue": (value: {
|
|
7
|
+
readonly onError?: readonly {
|
|
8
|
+
readonly target: string;
|
|
9
|
+
readonly operation: string;
|
|
10
|
+
}[] | undefined;
|
|
7
11
|
readonly type: "com.shwfed.actions.button.http.request.json.confirm";
|
|
8
12
|
readonly icon?: string | undefined;
|
|
9
13
|
readonly color?: string | undefined;
|
|
10
14
|
readonly compatibilityDate: "2026-04-18";
|
|
15
|
+
readonly messageExpression?: string | undefined;
|
|
16
|
+
readonly resultExpression?: string | undefined;
|
|
11
17
|
readonly markdown: readonly [{
|
|
12
18
|
readonly locale: "zh";
|
|
13
19
|
readonly message: string;
|
|
@@ -16,15 +22,31 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
16
22
|
readonly message: string;
|
|
17
23
|
}[]];
|
|
18
24
|
readonly expression: string;
|
|
19
|
-
readonly
|
|
20
|
-
|
|
25
|
+
readonly onSuccess?: readonly {
|
|
26
|
+
readonly target: string;
|
|
27
|
+
readonly operation: string;
|
|
28
|
+
}[] | undefined;
|
|
29
|
+
readonly onWarning?: readonly {
|
|
30
|
+
readonly target: string;
|
|
31
|
+
readonly operation: string;
|
|
32
|
+
}[] | undefined;
|
|
33
|
+
readonly onInfo?: readonly {
|
|
34
|
+
readonly target: string;
|
|
35
|
+
readonly operation: string;
|
|
36
|
+
}[] | undefined;
|
|
21
37
|
}) => any;
|
|
22
38
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
23
39
|
"onUpdate:modelValue"?: ((value: {
|
|
40
|
+
readonly onError?: readonly {
|
|
41
|
+
readonly target: string;
|
|
42
|
+
readonly operation: string;
|
|
43
|
+
}[] | undefined;
|
|
24
44
|
readonly type: "com.shwfed.actions.button.http.request.json.confirm";
|
|
25
45
|
readonly icon?: string | undefined;
|
|
26
46
|
readonly color?: string | undefined;
|
|
27
47
|
readonly compatibilityDate: "2026-04-18";
|
|
48
|
+
readonly messageExpression?: string | undefined;
|
|
49
|
+
readonly resultExpression?: string | undefined;
|
|
28
50
|
readonly markdown: readonly [{
|
|
29
51
|
readonly locale: "zh";
|
|
30
52
|
readonly message: string;
|
|
@@ -33,8 +55,18 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
33
55
|
readonly message: string;
|
|
34
56
|
}[]];
|
|
35
57
|
readonly expression: string;
|
|
36
|
-
readonly
|
|
37
|
-
|
|
58
|
+
readonly onSuccess?: readonly {
|
|
59
|
+
readonly target: string;
|
|
60
|
+
readonly operation: string;
|
|
61
|
+
}[] | undefined;
|
|
62
|
+
readonly onWarning?: readonly {
|
|
63
|
+
readonly target: string;
|
|
64
|
+
readonly operation: string;
|
|
65
|
+
}[] | undefined;
|
|
66
|
+
readonly onInfo?: readonly {
|
|
67
|
+
readonly target: string;
|
|
68
|
+
readonly operation: string;
|
|
69
|
+
}[] | undefined;
|
|
38
70
|
}) => any) | undefined;
|
|
39
71
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
40
72
|
declare const _default: typeof __VLS_export;
|
|
@@ -6,6 +6,7 @@ import { Locale as LocaleField } from "../../../../ui/locale";
|
|
|
6
6
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
7
7
|
import { Markdown } from "../../../../ui/markdown";
|
|
8
8
|
import { getStructFieldDescription, getStructFieldTitle } from "../../../schema";
|
|
9
|
+
import TriggersField from "../../../components/triggers-field.vue";
|
|
9
10
|
import { schema } from "./schema";
|
|
10
11
|
defineOptions({ name: "ShwfedHttpRequestConfirmActionConfig" });
|
|
11
12
|
const value = defineModel({ type: null, ...{ required: true } });
|
|
@@ -20,6 +21,10 @@ function patch(patchValue) {
|
|
|
20
21
|
}
|
|
21
22
|
value.value = next;
|
|
22
23
|
}
|
|
24
|
+
const RESULT_FIELDS = ["onSuccess", "onWarning", "onError", "onInfo"];
|
|
25
|
+
function updateTriggers(key, next) {
|
|
26
|
+
patch({ [key]: next.length === 0 ? void 0 : next });
|
|
27
|
+
}
|
|
23
28
|
</script>
|
|
24
29
|
|
|
25
30
|
<template>
|
|
@@ -146,23 +151,52 @@ function patch(patchValue) {
|
|
|
146
151
|
>
|
|
147
152
|
<FieldLabel class="text-xs text-zinc-500">
|
|
148
153
|
<template
|
|
149
|
-
v-if="fieldDescription('
|
|
154
|
+
v-if="fieldDescription('resultExpression')"
|
|
150
155
|
#tooltip
|
|
151
156
|
>
|
|
152
157
|
<Markdown
|
|
153
|
-
:source="fieldDescription('
|
|
158
|
+
:source="fieldDescription('resultExpression')"
|
|
154
159
|
block
|
|
155
160
|
class="prose prose-sm prose-zinc"
|
|
156
161
|
/>
|
|
157
162
|
</template>
|
|
158
|
-
{{ fieldTitle("
|
|
163
|
+
{{ fieldTitle("resultExpression") }}
|
|
159
164
|
</FieldLabel>
|
|
160
165
|
<ExpressionEditor
|
|
161
|
-
:model-value="value.
|
|
166
|
+
:model-value="value.resultExpression ?? ''"
|
|
162
167
|
placeholder="例:json.code == 0 ? 'success' : 'error'"
|
|
163
168
|
result-type="string"
|
|
164
169
|
:extra-vars="{ json: { type: 'dyn', label: 'HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09' } }"
|
|
165
|
-
@update:model-value="(v) => patch({
|
|
170
|
+
@update:model-value="(v) => patch({ resultExpression: v === '' ? void 0 : v })"
|
|
171
|
+
/>
|
|
172
|
+
</Field>
|
|
173
|
+
</div>
|
|
174
|
+
|
|
175
|
+
<!-- One trigger list per 「执行结果」: the request completes, the result
|
|
176
|
+
classifies the outcome, and the matching cell's operations run. -->
|
|
177
|
+
<div class="grid grid-cols-2 gap-3">
|
|
178
|
+
<Field
|
|
179
|
+
v-for="key in RESULT_FIELDS"
|
|
180
|
+
:key="key"
|
|
181
|
+
orientation="vertical"
|
|
182
|
+
class="min-w-0"
|
|
183
|
+
>
|
|
184
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
185
|
+
<template
|
|
186
|
+
v-if="fieldDescription(key)"
|
|
187
|
+
#tooltip
|
|
188
|
+
>
|
|
189
|
+
<Markdown
|
|
190
|
+
:source="fieldDescription(key)"
|
|
191
|
+
block
|
|
192
|
+
class="prose prose-sm prose-zinc"
|
|
193
|
+
/>
|
|
194
|
+
</template>
|
|
195
|
+
{{ fieldTitle(key) }}
|
|
196
|
+
</FieldLabel>
|
|
197
|
+
<TriggersField
|
|
198
|
+
:triggers="value[key] ?? []"
|
|
199
|
+
@update:triggers="(v) => updateTriggers(key, v)"
|
|
166
200
|
/>
|
|
167
201
|
</Field>
|
|
168
202
|
</div>
|