@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,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
4
|
+
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
4
5
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
5
6
|
import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
|
|
6
7
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
@@ -14,7 +15,7 @@ import {
|
|
|
14
15
|
} from "../../../../ui/select";
|
|
15
16
|
import { getStructFieldDescription, getStructFieldTitle } from "../../../schema";
|
|
16
17
|
import { DEFAULT_FIELD_ORIENTATION, FIELD_ORIENTATION_OPTIONS } from "../../../utils/common";
|
|
17
|
-
import { schema } from "./schema";
|
|
18
|
+
import { JSON_VAR, OPTION_VAR, schema } from "./schema";
|
|
18
19
|
defineOptions({ name: "ShwfedComboboxSingleRemoteFieldConfig" });
|
|
19
20
|
const value = defineModel({ type: null, ...{ required: true } });
|
|
20
21
|
const fieldSchema = schema(() => {
|
|
@@ -141,6 +142,7 @@ const pathText = computed({
|
|
|
141
142
|
{{ fieldTitle("tooltip") }}
|
|
142
143
|
</FieldLabel>
|
|
143
144
|
<LocaleField
|
|
145
|
+
markdown
|
|
144
146
|
:model-value="value.tooltip"
|
|
145
147
|
@update:model-value="(v) => value = { ...value, tooltip: v }"
|
|
146
148
|
/>
|
|
@@ -220,6 +222,7 @@ const pathText = computed({
|
|
|
220
222
|
:model-value="value.options"
|
|
221
223
|
placeholder="例:json.data"
|
|
222
224
|
result-type="list"
|
|
225
|
+
:extra-vars="{ json: JSON_VAR }"
|
|
223
226
|
class="min-h-10"
|
|
224
227
|
@update:model-value="(v) => value = { ...value, options: v }"
|
|
225
228
|
/>
|
|
@@ -242,6 +245,7 @@ const pathText = computed({
|
|
|
242
245
|
:model-value="value.optionValue"
|
|
243
246
|
placeholder="例:option["value"]"
|
|
244
247
|
result-type="dyn"
|
|
248
|
+
:extra-vars="{ option: OPTION_VAR }"
|
|
245
249
|
class="min-h-10"
|
|
246
250
|
@update:model-value="(v) => value = { ...value, optionValue: v }"
|
|
247
251
|
/>
|
|
@@ -259,6 +263,7 @@ const pathText = computed({
|
|
|
259
263
|
{{ fieldTitle("optionLabel") }}
|
|
260
264
|
</FieldLabel>
|
|
261
265
|
<LocaleField
|
|
266
|
+
markdown
|
|
262
267
|
:model-value="value.optionLabel"
|
|
263
268
|
@update:model-value="(v) => value = { ...value, optionLabel: v }"
|
|
264
269
|
/>
|
|
@@ -326,5 +331,24 @@ const pathText = computed({
|
|
|
326
331
|
/>
|
|
327
332
|
</Field>
|
|
328
333
|
</div>
|
|
334
|
+
|
|
335
|
+
<Field orientation="vertical">
|
|
336
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
337
|
+
<template #tooltip>
|
|
338
|
+
<Markdown
|
|
339
|
+
:source="fieldDescription('derived')"
|
|
340
|
+
block
|
|
341
|
+
class="prose prose-sm prose-zinc"
|
|
342
|
+
/>
|
|
343
|
+
</template>
|
|
344
|
+
{{ fieldTitle("derived") }}
|
|
345
|
+
</FieldLabel>
|
|
346
|
+
<DerivedValueEditor
|
|
347
|
+
:model-value="value.derived"
|
|
348
|
+
result-type="dyn"
|
|
349
|
+
placeholder="例:form.category"
|
|
350
|
+
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
351
|
+
/>
|
|
352
|
+
</Field>
|
|
329
353
|
</div>
|
|
330
354
|
</template>
|
|
@@ -33,9 +33,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
33
33
|
readonly message: string;
|
|
34
34
|
}[]] | undefined;
|
|
35
35
|
readonly readonly?: string | undefined;
|
|
36
|
+
readonly binding?: string | undefined;
|
|
37
|
+
readonly derived?: {
|
|
38
|
+
readonly mode: "formula" | "prefill";
|
|
39
|
+
readonly expression: string;
|
|
40
|
+
} | undefined;
|
|
36
41
|
readonly request: string;
|
|
37
42
|
readonly options: string;
|
|
38
|
-
readonly binding?: string | undefined;
|
|
39
43
|
readonly optionValue: string;
|
|
40
44
|
readonly optionLabel: readonly [{
|
|
41
45
|
readonly locale: "zh";
|
|
@@ -76,9 +80,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
76
80
|
readonly message: string;
|
|
77
81
|
}[]] | undefined;
|
|
78
82
|
readonly readonly?: string | undefined;
|
|
83
|
+
readonly binding?: string | undefined;
|
|
84
|
+
readonly derived?: {
|
|
85
|
+
readonly mode: "formula" | "prefill";
|
|
86
|
+
readonly expression: string;
|
|
87
|
+
} | undefined;
|
|
79
88
|
readonly request: string;
|
|
80
89
|
readonly options: string;
|
|
81
|
-
readonly binding?: string | undefined;
|
|
82
90
|
readonly optionValue: string;
|
|
83
91
|
readonly optionLabel: readonly [{
|
|
84
92
|
readonly locale: "zh";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useNuxtApp } from "#app";
|
|
3
2
|
import { Icon } from "@iconify/vue";
|
|
4
3
|
import { watchDebounced } from "@vueuse/core";
|
|
5
4
|
import { Effect } from "effect";
|
|
6
5
|
import { Fetch } from "fx-fetch";
|
|
7
6
|
import { computed, nextTick, ref } from "vue";
|
|
8
7
|
import { useI18n } from "vue-i18n";
|
|
9
|
-
import {
|
|
8
|
+
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
9
|
+
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
10
10
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
11
11
|
import { interpolateMarkdown } from "../../../../table/utils/runtime";
|
|
12
12
|
import {
|
|
@@ -18,9 +18,11 @@ import {
|
|
|
18
18
|
CommandList
|
|
19
19
|
} from "../../../../ui/command";
|
|
20
20
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
21
|
-
import { InputGroup, InputGroupAddon, InputGroupButton
|
|
21
|
+
import { InputGroup, InputGroupAddon, InputGroupButton } from "../../../../ui/input-group";
|
|
22
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
22
23
|
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "../../../../ui/popover";
|
|
23
24
|
import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
|
|
25
|
+
import { useFormReadonly } from "../../../utils/readonly";
|
|
24
26
|
import { useFormState } from "../../../utils/state";
|
|
25
27
|
defineOptions({ name: "ShwfedComboboxSingleRemoteFieldRuntime" });
|
|
26
28
|
const props = defineProps({
|
|
@@ -31,32 +33,28 @@ const { locale, t } = useI18n({
|
|
|
31
33
|
inheritLocale: true,
|
|
32
34
|
messages: {
|
|
33
35
|
zh: {
|
|
34
|
-
"combobox-single-placeholder": "\u8BF7\u9009\u62E9",
|
|
35
36
|
"combobox-single-search-placeholder": "\u641C\u7D22\u2026",
|
|
36
37
|
"combobox-single-empty": "\u65E0\u5339\u914D\u9879",
|
|
37
38
|
"combobox-single-loading": "\u52A0\u8F7D\u4E2D\u2026"
|
|
38
39
|
},
|
|
39
40
|
en: {
|
|
40
|
-
"combobox-single-placeholder": "Select\u2026",
|
|
41
41
|
"combobox-single-search-placeholder": "Search\u2026",
|
|
42
42
|
"combobox-single-empty": "No matches",
|
|
43
43
|
"combobox-single-loading": "Loading\u2026"
|
|
44
44
|
},
|
|
45
45
|
ja: {
|
|
46
|
-
"combobox-single-placeholder": "\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
47
46
|
"combobox-single-search-placeholder": "\u691C\u7D22\u2026",
|
|
48
47
|
"combobox-single-empty": "\u4E00\u81F4\u306A\u3057",
|
|
49
48
|
"combobox-single-loading": "\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026"
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
});
|
|
53
|
-
const { state, getAt, setAt } = useFormState();
|
|
54
|
-
const { $cel: _rawCel } = useNuxtApp();
|
|
52
|
+
const { state, getAt, setAt, setAtSilent } = useFormState();
|
|
55
53
|
const inherited = injectCELContext();
|
|
56
54
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
57
55
|
const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
|
|
58
56
|
const placeholderText = computed(
|
|
59
|
-
() => props.config.placeholder ? getLocalizedText(props.config.placeholder, locale.value) :
|
|
57
|
+
() => props.config.placeholder ? getLocalizedText(props.config.placeholder, locale.value) : void 0
|
|
60
58
|
);
|
|
61
59
|
const tooltipText = computed(
|
|
62
60
|
() => props.config.tooltip ? getLocalizedText(props.config.tooltip, locale.value) : void 0
|
|
@@ -71,7 +69,11 @@ function evalBool(expression, label) {
|
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
71
|
const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
|
|
74
|
-
const
|
|
72
|
+
const formReadonly = useFormReadonly();
|
|
73
|
+
const isReadonly = computed(
|
|
74
|
+
() => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
|
|
75
|
+
);
|
|
76
|
+
const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
|
|
75
77
|
function valueOf(option) {
|
|
76
78
|
try {
|
|
77
79
|
return Effect.runSync($cel(props.config.optionValue, { form: state.value ?? {}, option }));
|
|
@@ -87,30 +89,39 @@ function labelOf(option) {
|
|
|
87
89
|
}
|
|
88
90
|
const json = ref(null);
|
|
89
91
|
const isLoading = ref(false);
|
|
92
|
+
const requestSignature = computed(() => {
|
|
93
|
+
const expr = props.config.request;
|
|
94
|
+
if (!expr) return null;
|
|
95
|
+
try {
|
|
96
|
+
const builder = Effect.runSync($cel(expr, { form: state.value ?? {} }));
|
|
97
|
+
return JSON.stringify(builder.describe());
|
|
98
|
+
} catch {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
let fetchSeq = 0;
|
|
90
103
|
async function fetchOptions() {
|
|
104
|
+
const seq = ++fetchSeq;
|
|
105
|
+
if (requestSignature.value == null) {
|
|
106
|
+
json.value = null;
|
|
107
|
+
isLoading.value = false;
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
91
110
|
const expr = props.config.request;
|
|
92
|
-
if (!expr) return;
|
|
93
111
|
isLoading.value = true;
|
|
94
112
|
const program = Effect.gen(function* () {
|
|
95
113
|
const builder = yield* $cel(expr, { form: state.value ?? {} });
|
|
96
114
|
return yield* builder.json();
|
|
97
115
|
});
|
|
98
116
|
try {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
json.value = null;
|
|
117
|
+
const result = await Effect.runPromise(Effect.provide(program, Fetch.layer));
|
|
118
|
+
if (seq === fetchSeq) json.value = result;
|
|
119
|
+
} catch {
|
|
120
|
+
if (seq === fetchSeq) json.value = null;
|
|
103
121
|
} finally {
|
|
104
|
-
isLoading.value = false;
|
|
122
|
+
if (seq === fetchSeq) isLoading.value = false;
|
|
105
123
|
}
|
|
106
124
|
}
|
|
107
|
-
watchDebounced(
|
|
108
|
-
[() => state.value, () => props.config.request],
|
|
109
|
-
() => {
|
|
110
|
-
void fetchOptions();
|
|
111
|
-
},
|
|
112
|
-
{ deep: true, debounce: 200, immediate: true }
|
|
113
|
-
);
|
|
114
125
|
const entries = computed(() => {
|
|
115
126
|
let raw;
|
|
116
127
|
try {
|
|
@@ -142,6 +153,20 @@ const model = computed({
|
|
|
142
153
|
setAt(path, next);
|
|
143
154
|
}
|
|
144
155
|
});
|
|
156
|
+
let lastRequestSignature;
|
|
157
|
+
watchDebounced(
|
|
158
|
+
requestSignature,
|
|
159
|
+
() => {
|
|
160
|
+
if (lastRequestSignature != null) {
|
|
161
|
+
const path = props.config.binding;
|
|
162
|
+
if (path == null) uncontrolled.value = void 0;
|
|
163
|
+
else setAtSilent(path, void 0);
|
|
164
|
+
}
|
|
165
|
+
lastRequestSignature = requestSignature.value;
|
|
166
|
+
void fetchOptions();
|
|
167
|
+
},
|
|
168
|
+
{ debounce: 200, immediate: true }
|
|
169
|
+
);
|
|
145
170
|
function isEqual(a, b) {
|
|
146
171
|
if (a === b) return true;
|
|
147
172
|
if (a == null || b == null) return false;
|
|
@@ -192,15 +217,24 @@ function handleClear() {
|
|
|
192
217
|
v-if="tooltipText"
|
|
193
218
|
#tooltip
|
|
194
219
|
>
|
|
195
|
-
|
|
220
|
+
<Markdown
|
|
221
|
+
:source="tooltipText"
|
|
222
|
+
class="prose prose-xs prose-zinc"
|
|
223
|
+
/>
|
|
196
224
|
</template>
|
|
197
225
|
{{ labelText }}
|
|
198
226
|
</FieldLabel>
|
|
199
227
|
<div
|
|
200
|
-
v-if="
|
|
228
|
+
v-if="effectiveReadonly"
|
|
201
229
|
class="min-h-9 py-1.5 text-sm text-zinc-700"
|
|
202
230
|
>
|
|
203
|
-
|
|
231
|
+
<Markdown
|
|
232
|
+
v-if="selectedLabel"
|
|
233
|
+
:source="selectedLabel"
|
|
234
|
+
/>
|
|
235
|
+
<template v-else>
|
|
236
|
+
—
|
|
237
|
+
</template>
|
|
204
238
|
</div>
|
|
205
239
|
<Popover
|
|
206
240
|
v-else
|
|
@@ -212,14 +246,24 @@ function handleClear() {
|
|
|
212
246
|
:data-disabled="isDisabled ? 'true' : void 0"
|
|
213
247
|
>
|
|
214
248
|
<PopoverTrigger as-child>
|
|
215
|
-
<
|
|
249
|
+
<button
|
|
216
250
|
:id="fieldId"
|
|
217
|
-
|
|
251
|
+
type="button"
|
|
218
252
|
:disabled="isDisabled"
|
|
219
|
-
:
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
253
|
+
:data-value="!!selectedLabel"
|
|
254
|
+
data-slot="input-group-control"
|
|
255
|
+
class="peer flex h-9 min-w-0 flex-1 cursor-default items-center overflow-hidden rounded-none border-0 bg-transparent px-3 py-1 text-left text-sm text-zinc-700 outline-none disabled:cursor-not-allowed"
|
|
256
|
+
>
|
|
257
|
+
<Markdown
|
|
258
|
+
v-if="selectedLabel"
|
|
259
|
+
:source="selectedLabel"
|
|
260
|
+
class="block truncate"
|
|
261
|
+
/>
|
|
262
|
+
<span
|
|
263
|
+
v-else-if="placeholderText"
|
|
264
|
+
class="block truncate text-zinc-300"
|
|
265
|
+
>{{ placeholderText }}</span>
|
|
266
|
+
</button>
|
|
223
267
|
</PopoverTrigger>
|
|
224
268
|
<InputGroupAddon
|
|
225
269
|
v-if="isLoading"
|
|
@@ -234,7 +278,7 @@ function handleClear() {
|
|
|
234
278
|
<InputGroupAddon
|
|
235
279
|
v-else-if="showClear"
|
|
236
280
|
align="inline-end"
|
|
237
|
-
class="opacity-0 transition-opacity group-hover/combobox-single-remote:opacity-100 focus-within:opacity-100"
|
|
281
|
+
class="[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-single-remote:opacity-100 focus-within:opacity-100"
|
|
238
282
|
>
|
|
239
283
|
<InputGroupButton
|
|
240
284
|
size="icon-xs"
|
|
@@ -261,18 +305,32 @@ function handleClear() {
|
|
|
261
305
|
>
|
|
262
306
|
<CommandInput :placeholder="t('combobox-single-search-placeholder')" />
|
|
263
307
|
<CommandList>
|
|
264
|
-
|
|
308
|
+
<!-- Zero candidates: still loading, the fetch failed, or the
|
|
309
|
+
endpoint returned nothing. `CommandEmpty` cannot cover this
|
|
310
|
+
— it only renders once a search query has filtered a
|
|
311
|
+
non-empty list down to zero — so the empty list is given an
|
|
312
|
+
explicit placeholder here. -->
|
|
313
|
+
<div
|
|
314
|
+
v-if="entries.length === 0"
|
|
315
|
+
data-slot="combobox-single-remote-empty"
|
|
316
|
+
class="py-6 text-center text-sm text-zinc-500"
|
|
317
|
+
>
|
|
265
318
|
{{ isLoading ? t("combobox-single-loading") : t("combobox-single-empty") }}
|
|
266
|
-
</
|
|
267
|
-
<
|
|
268
|
-
<
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
319
|
+
</div>
|
|
320
|
+
<template v-else>
|
|
321
|
+
<CommandEmpty class="py-6 text-center text-sm text-zinc-500">
|
|
322
|
+
{{ t("combobox-single-empty") }}
|
|
323
|
+
</CommandEmpty>
|
|
324
|
+
<CommandGroup>
|
|
325
|
+
<CommandItem
|
|
326
|
+
v-for="entry in entries"
|
|
327
|
+
:key="entry.key"
|
|
328
|
+
:value="entry.key"
|
|
329
|
+
>
|
|
330
|
+
<Markdown :source="entry.label" />
|
|
331
|
+
</CommandItem>
|
|
332
|
+
</CommandGroup>
|
|
333
|
+
</template>
|
|
276
334
|
</CommandList>
|
|
277
335
|
</Command>
|
|
278
336
|
</PopoverContent>
|
|
@@ -16,6 +16,16 @@ export declare const metadata: {
|
|
|
16
16
|
readonly max: 2;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
+
export declare const OPTION_VAR: {
|
|
20
|
+
readonly type: "dyn";
|
|
21
|
+
readonly label: "当前选项";
|
|
22
|
+
readonly description: "`选项` 表达式产出的数组中迭代到的单个元素";
|
|
23
|
+
};
|
|
24
|
+
export declare const JSON_VAR: {
|
|
25
|
+
readonly type: "dyn";
|
|
26
|
+
readonly label: "HTTP 响应体";
|
|
27
|
+
readonly description: "HTTP 响应体(已解析 JSON);请求失败或尚未完成时为 `null`";
|
|
28
|
+
};
|
|
19
29
|
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
20
30
|
label: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
21
31
|
locale: Schema.Literal<["zh"]>;
|
|
@@ -42,6 +52,10 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
42
52
|
binding: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
43
53
|
disabled: Schema.optional<Schema.Schema<string, string, never>>;
|
|
44
54
|
readonly: Schema.optional<Schema.Schema<string, string, never>>;
|
|
55
|
+
derived: Schema.optional<Schema.Struct<{
|
|
56
|
+
mode: Schema.Literal<["formula", "prefill"]>;
|
|
57
|
+
expression: Schema.Schema<string, string, never>;
|
|
58
|
+
}>>;
|
|
45
59
|
request: Schema.Schema<string, string, never>;
|
|
46
60
|
options: Schema.Schema<string, string, never>;
|
|
47
61
|
optionValue: Schema.optionalWith<Schema.Schema<string, string, never>, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Expression, LocaleMarkdown } from "../../../../../share/expression.js";
|
|
3
3
|
import { Locale } from "../../../../../share/locale.js";
|
|
4
|
-
import { commonFieldFields, FieldOrientationSchema } from "../../../utils/common.js";
|
|
4
|
+
import { commonFieldFields, derivedField, FieldOrientationSchema } from "../../../utils/common.js";
|
|
5
5
|
export const type = "com.shwfed.form.field.combobox.single.remote";
|
|
6
6
|
export const compatibilityDate = "2026-05-13";
|
|
7
7
|
export const metadata = {
|
|
@@ -10,18 +10,26 @@ export const metadata = {
|
|
|
10
10
|
w: { initial: 8, min: 4, max: Infinity },
|
|
11
11
|
h: { initial: 2, min: 2, max: 2 }
|
|
12
12
|
};
|
|
13
|
+
export const OPTION_VAR = {
|
|
14
|
+
type: "dyn",
|
|
15
|
+
label: "\u5F53\u524D\u9009\u9879",
|
|
16
|
+
description: "`\u9009\u9879` \u8868\u8FBE\u5F0F\u4EA7\u51FA\u7684\u6570\u7EC4\u4E2D\u8FED\u4EE3\u5230\u7684\u5355\u4E2A\u5143\u7D20"
|
|
17
|
+
};
|
|
18
|
+
export const JSON_VAR = {
|
|
19
|
+
type: "dyn",
|
|
20
|
+
label: "HTTP \u54CD\u5E94\u4F53",
|
|
21
|
+
description: "HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09\uFF1B\u8BF7\u6C42\u5931\u8D25\u6216\u5C1A\u672A\u5B8C\u6210\u65F6\u4E3A `null`"
|
|
22
|
+
};
|
|
13
23
|
function configureWithOption(configure) {
|
|
14
24
|
return (env) => {
|
|
15
25
|
configure(env);
|
|
16
|
-
env.registerVariable("option",
|
|
26
|
+
env.registerVariable("option", OPTION_VAR.type, { description: OPTION_VAR.description });
|
|
17
27
|
};
|
|
18
28
|
}
|
|
19
29
|
function configureWithJson(configure) {
|
|
20
30
|
return (env) => {
|
|
21
31
|
configure(env);
|
|
22
|
-
env.registerVariable("json",
|
|
23
|
-
description: "HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09\uFF1B\u8BF7\u6C42\u5931\u8D25\u6216\u5C1A\u672A\u5B8C\u6210\u65F6\u4E3A `null`"
|
|
24
|
-
});
|
|
32
|
+
env.registerVariable("json", JSON_VAR.type, { description: JSON_VAR.description });
|
|
25
33
|
};
|
|
26
34
|
}
|
|
27
35
|
const isListType = (actual) => actual === "dyn" || actual.startsWith("list");
|
|
@@ -60,6 +68,7 @@ export function schema(configure) {
|
|
|
60
68
|
title: "\u53EA\u8BFB\u6761\u4EF6",
|
|
61
69
|
description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u9009\u9879\u7684\u6807\u7B7E"
|
|
62
70
|
})),
|
|
71
|
+
derived: derivedField(configure, "dyn"),
|
|
63
72
|
request: CelHttpRequest.annotations({
|
|
64
73
|
title: "\u8BF7\u6C42",
|
|
65
74
|
description: "\u8FD4\u56DE `HttpRequest` \u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u53EF\u8BBF\u95EE `form` \u5F53\u524D\u72B6\u6001\u3002\u8868\u5355\u72B6\u6001\u53D8\u5316\u540E\u4F1A\u91CD\u65B0\u62C9\u53D6\u9009\u9879"
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
2
|
+
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
3
3
|
import { Effect } from "effect";
|
|
4
4
|
import { computed, onMounted, ref, watch } from "vue";
|
|
5
|
-
import { celBindings, injectCELContext } from "../../../../../
|
|
5
|
+
import { celBindings, injectCELContext, provideCELContext } from "../../../../../utils/cel-context";
|
|
6
|
+
import { DEFAULT_GAP } from "../../../schema";
|
|
7
|
+
import { useDerived, useDerivedQuiescence } from "../../../utils/derived";
|
|
6
8
|
import { findField } from "../../../utils/resolve";
|
|
7
9
|
import { provideFormState } from "../../../utils/state";
|
|
8
10
|
defineOptions({ name: "ShwfedListFieldRow" });
|
|
@@ -10,10 +12,24 @@ const state = defineModel({ type: Object, ...{ required: true } });
|
|
|
10
12
|
const props = defineProps({
|
|
11
13
|
unit: { type: Object, required: true }
|
|
12
14
|
});
|
|
13
|
-
provideFormState(state);
|
|
14
|
-
|
|
15
|
+
const formState = provideFormState(state);
|
|
16
|
+
provideCELContext({
|
|
17
|
+
item: {
|
|
18
|
+
type: "dyn",
|
|
19
|
+
label: "item",
|
|
20
|
+
description: "\u5F53\u524D\u5217\u8868\u9879",
|
|
21
|
+
value: () => state.value ?? {}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
15
24
|
const inherited = injectCELContext();
|
|
16
25
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
26
|
+
useDerived({
|
|
27
|
+
fields: () => props.unit.fields,
|
|
28
|
+
evaluate: (expression) => $cel(expression),
|
|
29
|
+
ready: Promise.resolve(),
|
|
30
|
+
formState,
|
|
31
|
+
quiescence: useDerivedQuiescence()
|
|
32
|
+
});
|
|
17
33
|
function pickLayout(sets) {
|
|
18
34
|
for (const set of sets) {
|
|
19
35
|
if (!set.media) return set;
|
|
@@ -73,7 +89,8 @@ const gridStyle = computed(() => {
|
|
|
73
89
|
"display: grid",
|
|
74
90
|
`grid-template-columns: ${colTemplate}`,
|
|
75
91
|
rowTemplate ? `grid-template-rows: ${rowTemplate}` : "",
|
|
76
|
-
|
|
92
|
+
// Missing `gap` falls back to `DEFAULT_GAP`; see ../../../index.vue.
|
|
93
|
+
`gap: calc(${l.gap ?? DEFAULT_GAP} * 0.25rem)`,
|
|
77
94
|
l.style ?? ""
|
|
78
95
|
].filter(Boolean);
|
|
79
96
|
return parts.join("; ");
|
package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useNuxtApp } from "#app";
|
|
3
2
|
import { Icon } from "@iconify/vue";
|
|
4
3
|
import { Effect } from "effect";
|
|
5
4
|
import { computed, ref, watch } from "vue";
|
|
6
5
|
import { useI18n } from "vue-i18n";
|
|
7
|
-
import {
|
|
6
|
+
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
7
|
+
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
8
8
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
9
9
|
import {
|
|
10
10
|
useTreeDnd
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
import { Button } from "../../../../ui/button";
|
|
13
13
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
14
14
|
import { InputGroupButton } from "../../../../ui/input-group";
|
|
15
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
15
16
|
import { useFormState } from "../../../utils/state";
|
|
16
17
|
import Row from "./row.vue";
|
|
17
18
|
defineOptions({ name: "ShwfedListFieldRuntime" });
|
|
@@ -21,7 +22,6 @@ const props = defineProps({
|
|
|
21
22
|
});
|
|
22
23
|
const { locale } = useI18n();
|
|
23
24
|
const { state, getAt, setAt } = useFormState();
|
|
24
|
-
const { $cel: _rawCel } = useNuxtApp();
|
|
25
25
|
const inherited = injectCELContext();
|
|
26
26
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
27
27
|
const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
|
|
@@ -156,7 +156,10 @@ function rowConfig(i) {
|
|
|
156
156
|
v-if="tooltipText"
|
|
157
157
|
#tooltip
|
|
158
158
|
>
|
|
159
|
-
|
|
159
|
+
<Markdown
|
|
160
|
+
:source="tooltipText"
|
|
161
|
+
class="prose prose-xs prose-zinc"
|
|
162
|
+
/>
|
|
160
163
|
</template>
|
|
161
164
|
{{ labelText }}
|
|
162
165
|
</FieldLabel>
|
|
@@ -13,7 +13,13 @@ export const metadata = {
|
|
|
13
13
|
};
|
|
14
14
|
export function schema(configure) {
|
|
15
15
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
16
|
-
const
|
|
16
|
+
const unitConfigure = (env) => {
|
|
17
|
+
configure(env);
|
|
18
|
+
if (!env.getDefinitions().variables.some((v) => v.name === "item")) {
|
|
19
|
+
env.registerVariable("item", "dyn", { description: "\u5F53\u524D\u5217\u8868\u9879" });
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const Unit = Schema.suspend(() => FormUnit(unitConfigure));
|
|
17
23
|
return Schema.Struct({
|
|
18
24
|
type: Schema.Literal(type),
|
|
19
25
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { type Value } from './schema.js';
|
|
2
|
+
type __VLS_ModelProps = {
|
|
3
|
+
modelValue: Value;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: {
|
|
7
|
+
readonly label?: readonly [{
|
|
8
|
+
readonly locale: "zh";
|
|
9
|
+
readonly message: string;
|
|
10
|
+
}, ...{
|
|
11
|
+
readonly locale: "en" | "ja" | "ko";
|
|
12
|
+
readonly message: string;
|
|
13
|
+
}[]] | undefined;
|
|
14
|
+
readonly disabled?: string | undefined;
|
|
15
|
+
readonly type: "com.shwfed.form.field.checkbox.group";
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly hidden?: string | undefined;
|
|
18
|
+
readonly tooltip?: readonly [{
|
|
19
|
+
readonly locale: "zh";
|
|
20
|
+
readonly message: string;
|
|
21
|
+
}, ...{
|
|
22
|
+
readonly locale: "en" | "ja" | "ko";
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}[]] | undefined;
|
|
25
|
+
readonly displayName?: string | undefined;
|
|
26
|
+
readonly compatibilityDate: "2026-05-17";
|
|
27
|
+
readonly items: readonly {
|
|
28
|
+
readonly label: readonly [{
|
|
29
|
+
readonly locale: "zh";
|
|
30
|
+
readonly message: string;
|
|
31
|
+
}, ...{
|
|
32
|
+
readonly locale: "en" | "ja" | "ko";
|
|
33
|
+
readonly message: string;
|
|
34
|
+
}[]];
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly tooltip?: readonly [{
|
|
37
|
+
readonly locale: "zh";
|
|
38
|
+
readonly message: string;
|
|
39
|
+
}, ...{
|
|
40
|
+
readonly locale: "en" | "ja" | "ko";
|
|
41
|
+
readonly message: string;
|
|
42
|
+
}[]] | undefined;
|
|
43
|
+
readonly value: {
|
|
44
|
+
readonly value: string;
|
|
45
|
+
readonly kind: "text";
|
|
46
|
+
} | {
|
|
47
|
+
readonly value: number;
|
|
48
|
+
readonly kind: "number";
|
|
49
|
+
};
|
|
50
|
+
}[];
|
|
51
|
+
readonly readonly?: string | undefined;
|
|
52
|
+
readonly binding?: string | undefined;
|
|
53
|
+
readonly derived?: {
|
|
54
|
+
readonly mode: "formula" | "prefill";
|
|
55
|
+
readonly expression: string;
|
|
56
|
+
} | undefined;
|
|
57
|
+
}) => any;
|
|
58
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
59
|
+
"onUpdate:modelValue"?: ((value: {
|
|
60
|
+
readonly label?: readonly [{
|
|
61
|
+
readonly locale: "zh";
|
|
62
|
+
readonly message: string;
|
|
63
|
+
}, ...{
|
|
64
|
+
readonly locale: "en" | "ja" | "ko";
|
|
65
|
+
readonly message: string;
|
|
66
|
+
}[]] | undefined;
|
|
67
|
+
readonly disabled?: string | undefined;
|
|
68
|
+
readonly type: "com.shwfed.form.field.checkbox.group";
|
|
69
|
+
readonly id: string;
|
|
70
|
+
readonly hidden?: string | undefined;
|
|
71
|
+
readonly tooltip?: readonly [{
|
|
72
|
+
readonly locale: "zh";
|
|
73
|
+
readonly message: string;
|
|
74
|
+
}, ...{
|
|
75
|
+
readonly locale: "en" | "ja" | "ko";
|
|
76
|
+
readonly message: string;
|
|
77
|
+
}[]] | undefined;
|
|
78
|
+
readonly displayName?: string | undefined;
|
|
79
|
+
readonly compatibilityDate: "2026-05-17";
|
|
80
|
+
readonly items: readonly {
|
|
81
|
+
readonly label: readonly [{
|
|
82
|
+
readonly locale: "zh";
|
|
83
|
+
readonly message: string;
|
|
84
|
+
}, ...{
|
|
85
|
+
readonly locale: "en" | "ja" | "ko";
|
|
86
|
+
readonly message: string;
|
|
87
|
+
}[]];
|
|
88
|
+
readonly id: string;
|
|
89
|
+
readonly tooltip?: readonly [{
|
|
90
|
+
readonly locale: "zh";
|
|
91
|
+
readonly message: string;
|
|
92
|
+
}, ...{
|
|
93
|
+
readonly locale: "en" | "ja" | "ko";
|
|
94
|
+
readonly message: string;
|
|
95
|
+
}[]] | undefined;
|
|
96
|
+
readonly value: {
|
|
97
|
+
readonly value: string;
|
|
98
|
+
readonly kind: "text";
|
|
99
|
+
} | {
|
|
100
|
+
readonly value: number;
|
|
101
|
+
readonly kind: "number";
|
|
102
|
+
};
|
|
103
|
+
}[];
|
|
104
|
+
readonly readonly?: string | undefined;
|
|
105
|
+
readonly binding?: string | undefined;
|
|
106
|
+
readonly derived?: {
|
|
107
|
+
readonly mode: "formula" | "prefill";
|
|
108
|
+
readonly expression: string;
|
|
109
|
+
} | undefined;
|
|
110
|
+
}) => any) | undefined;
|
|
111
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
112
|
+
declare const _default: typeof __VLS_export;
|
|
113
|
+
export default _default;
|