@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
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { Icon } from "@iconify/vue";
|
|
3
|
+
import { computed, ref, watch } from "vue";
|
|
4
|
+
import {
|
|
5
|
+
DropdownMenu,
|
|
6
|
+
DropdownMenuContent,
|
|
7
|
+
DropdownMenuItem,
|
|
8
|
+
DropdownMenuTrigger
|
|
9
|
+
} from "../ui/dropdown-menu";
|
|
10
|
+
import { ExpressionEditor } from "../ui/expression-editor";
|
|
11
|
+
import { InputGroupButton } from "../ui/input-group";
|
|
12
|
+
import { DERIVED_MODE_LABELS, DERIVED_MODES } from "./utils/common";
|
|
13
|
+
defineOptions({ name: "ShwfedDerivedValueEditor" });
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
modelValue: { type: Object, required: false },
|
|
16
|
+
resultType: { type: [String, Array], required: false },
|
|
17
|
+
placeholder: { type: String, required: false }
|
|
18
|
+
});
|
|
19
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
20
|
+
const MODE_ICONS = {
|
|
21
|
+
formula: "fluent:calculator-20-regular",
|
|
22
|
+
prefill: "fluent:sparkle-20-regular"
|
|
23
|
+
};
|
|
24
|
+
const mode = ref(props.modelValue?.mode ?? "formula");
|
|
25
|
+
watch(() => props.modelValue?.mode, (m) => {
|
|
26
|
+
if (m) mode.value = m;
|
|
27
|
+
});
|
|
28
|
+
const expression = computed(() => props.modelValue?.expression ?? "");
|
|
29
|
+
function emitValue(nextMode, nextExpression) {
|
|
30
|
+
emit("update:modelValue", nextExpression.length > 0 ? { mode: nextMode, expression: nextExpression } : void 0);
|
|
31
|
+
}
|
|
32
|
+
function onExpression(next) {
|
|
33
|
+
emitValue(mode.value, next);
|
|
34
|
+
}
|
|
35
|
+
function selectMode(next) {
|
|
36
|
+
mode.value = next;
|
|
37
|
+
emitValue(next, expression.value);
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<ExpressionEditor
|
|
43
|
+
:model-value="expression"
|
|
44
|
+
:result-type="resultType"
|
|
45
|
+
:placeholder="placeholder"
|
|
46
|
+
class="min-h-10"
|
|
47
|
+
@update:model-value="onExpression"
|
|
48
|
+
>
|
|
49
|
+
<template #leading>
|
|
50
|
+
<DropdownMenu>
|
|
51
|
+
<DropdownMenuTrigger as-child>
|
|
52
|
+
<InputGroupButton
|
|
53
|
+
size="xs"
|
|
54
|
+
class="gap-1 text-zinc-600"
|
|
55
|
+
>
|
|
56
|
+
<Icon :icon="MODE_ICONS[mode]" />
|
|
57
|
+
{{ DERIVED_MODE_LABELS[mode] }}
|
|
58
|
+
<Icon
|
|
59
|
+
icon="fluent:chevron-down-20-regular"
|
|
60
|
+
class="text-zinc-400"
|
|
61
|
+
/>
|
|
62
|
+
</InputGroupButton>
|
|
63
|
+
</DropdownMenuTrigger>
|
|
64
|
+
<DropdownMenuContent align="start">
|
|
65
|
+
<DropdownMenuItem
|
|
66
|
+
v-for="m in DERIVED_MODES"
|
|
67
|
+
:key="m"
|
|
68
|
+
@select="selectMode(m)"
|
|
69
|
+
>
|
|
70
|
+
<Icon :icon="MODE_ICONS[m]" />
|
|
71
|
+
{{ DERIVED_MODE_LABELS[m] }}
|
|
72
|
+
</DropdownMenuItem>
|
|
73
|
+
</DropdownMenuContent>
|
|
74
|
+
</DropdownMenu>
|
|
75
|
+
</template>
|
|
76
|
+
</ExpressionEditor>
|
|
77
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type DerivedMode } from './utils/common.js';
|
|
2
|
+
type DerivedConfig = {
|
|
3
|
+
mode: DerivedMode;
|
|
4
|
+
expression: string;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
/** The field's current `derived` config, or `undefined` when it has none. */
|
|
8
|
+
modelValue?: DerivedConfig;
|
|
9
|
+
/** Constrains the expression's CEL return type — the field's value type. */
|
|
10
|
+
resultType?: string | string[];
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (value: DerivedConfig | undefined) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((value: DerivedConfig | undefined) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
@@ -3,7 +3,7 @@ import { computed, ref } from "vue";
|
|
|
3
3
|
import { Environment } from "../../vendor/cel-js/lib/index";
|
|
4
4
|
import {
|
|
5
5
|
provideCELContext
|
|
6
|
-
} from "../../
|
|
6
|
+
} from "../../utils/cel-context";
|
|
7
7
|
import { ExpressionEditor } from "../ui/expression-editor";
|
|
8
8
|
import { Field, FieldLabel } from "../ui/field";
|
|
9
9
|
import { Markdown } from "../ui/markdown";
|
|
@@ -74,6 +74,15 @@ function updateInitial(value) {
|
|
|
74
74
|
config.value = { ...next, initial: value };
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
+
function updateReadonly(value) {
|
|
78
|
+
const next = { ...config.value };
|
|
79
|
+
if (value.trim() === "") {
|
|
80
|
+
const { readonly: _omit, ...rest } = next;
|
|
81
|
+
config.value = rest;
|
|
82
|
+
} else {
|
|
83
|
+
config.value = { ...next, readonly: value };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
77
86
|
</script>
|
|
78
87
|
|
|
79
88
|
<template>
|
|
@@ -83,29 +92,54 @@ function updateInitial(value) {
|
|
|
83
92
|
:extras="EXTRAS"
|
|
84
93
|
>
|
|
85
94
|
<template #extras-pane>
|
|
86
|
-
<
|
|
87
|
-
<
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
95
|
+
<div class="flex flex-col gap-4">
|
|
96
|
+
<Field orientation="vertical">
|
|
97
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
98
|
+
<template
|
|
99
|
+
v-if="generalFieldDescription('initial')"
|
|
100
|
+
#tooltip
|
|
101
|
+
>
|
|
102
|
+
<Markdown
|
|
103
|
+
:source="generalFieldDescription('initial')"
|
|
104
|
+
block
|
|
105
|
+
class="prose prose-sm prose-zinc"
|
|
106
|
+
/>
|
|
107
|
+
</template>
|
|
108
|
+
{{ generalFieldTitle("initial") }}
|
|
109
|
+
</FieldLabel>
|
|
110
|
+
<ExpressionEditor
|
|
111
|
+
:model-value="config.initial ?? ''"
|
|
112
|
+
placeholder="如 { 'name': '', 'age': 0 }"
|
|
113
|
+
result-type="dyn"
|
|
114
|
+
multiline
|
|
115
|
+
class="min-h-20"
|
|
116
|
+
@update:model-value="updateInitial"
|
|
117
|
+
/>
|
|
118
|
+
</Field>
|
|
119
|
+
|
|
120
|
+
<Field orientation="vertical">
|
|
121
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
122
|
+
<template
|
|
123
|
+
v-if="generalFieldDescription('readonly')"
|
|
124
|
+
#tooltip
|
|
125
|
+
>
|
|
126
|
+
<Markdown
|
|
127
|
+
:source="generalFieldDescription('readonly')"
|
|
128
|
+
block
|
|
129
|
+
class="prose prose-sm prose-zinc"
|
|
130
|
+
/>
|
|
131
|
+
</template>
|
|
132
|
+
{{ generalFieldTitle("readonly") }}
|
|
133
|
+
</FieldLabel>
|
|
134
|
+
<ExpressionEditor
|
|
135
|
+
:model-value="config.readonly ?? ''"
|
|
136
|
+
placeholder="例:form.status == 'submitted'"
|
|
137
|
+
result-type="bool"
|
|
138
|
+
class="min-h-10"
|
|
139
|
+
@update:model-value="updateReadonly"
|
|
140
|
+
/>
|
|
141
|
+
</Field>
|
|
142
|
+
</div>
|
|
109
143
|
</template>
|
|
110
144
|
</ShwfedFormUnitConfig>
|
|
111
145
|
</template>
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts
CHANGED
|
@@ -34,6 +34,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
34
34
|
}[]] | undefined;
|
|
35
35
|
readonly readonly?: string | undefined;
|
|
36
36
|
readonly binding?: string | undefined;
|
|
37
|
+
readonly derived?: {
|
|
38
|
+
readonly mode: "formula" | "prefill";
|
|
39
|
+
readonly expression: string;
|
|
40
|
+
} | undefined;
|
|
37
41
|
}) => any;
|
|
38
42
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
39
43
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -67,6 +71,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
67
71
|
}[]] | undefined;
|
|
68
72
|
readonly readonly?: string | undefined;
|
|
69
73
|
readonly binding?: string | undefined;
|
|
74
|
+
readonly derived?: {
|
|
75
|
+
readonly mode: "formula" | "prefill";
|
|
76
|
+
readonly expression: string;
|
|
77
|
+
} | undefined;
|
|
70
78
|
}) => any) | undefined;
|
|
71
79
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
72
80
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
|
+
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
5
6
|
import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
|
|
6
7
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
7
8
|
import { Markdown } from "../../../../ui/markdown";
|
|
@@ -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
|
/>
|
|
@@ -243,5 +245,24 @@ const pathText = computed({
|
|
|
243
245
|
/>
|
|
244
246
|
</Field>
|
|
245
247
|
</div>
|
|
248
|
+
|
|
249
|
+
<Field orientation="vertical">
|
|
250
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
251
|
+
<template #tooltip>
|
|
252
|
+
<Markdown
|
|
253
|
+
:source="fieldDescription('derived')"
|
|
254
|
+
block
|
|
255
|
+
class="prose prose-sm prose-zinc"
|
|
256
|
+
/>
|
|
257
|
+
</template>
|
|
258
|
+
{{ fieldTitle("derived") }}
|
|
259
|
+
</FieldLabel>
|
|
260
|
+
<DerivedValueEditor
|
|
261
|
+
:model-value="value.derived"
|
|
262
|
+
result-type="string"
|
|
263
|
+
placeholder="例:form.firstName + ' ' + form.lastName"
|
|
264
|
+
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
265
|
+
/>
|
|
266
|
+
</Field>
|
|
246
267
|
</div>
|
|
247
268
|
</template>
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts
CHANGED
|
@@ -34,6 +34,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
34
34
|
}[]] | undefined;
|
|
35
35
|
readonly readonly?: string | undefined;
|
|
36
36
|
readonly binding?: string | undefined;
|
|
37
|
+
readonly derived?: {
|
|
38
|
+
readonly mode: "formula" | "prefill";
|
|
39
|
+
readonly expression: string;
|
|
40
|
+
} | undefined;
|
|
37
41
|
}) => any;
|
|
38
42
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
39
43
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -67,6 +71,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
67
71
|
}[]] | undefined;
|
|
68
72
|
readonly readonly?: string | undefined;
|
|
69
73
|
readonly binding?: string | undefined;
|
|
74
|
+
readonly derived?: {
|
|
75
|
+
readonly mode: "formula" | "prefill";
|
|
76
|
+
readonly expression: string;
|
|
77
|
+
} | undefined;
|
|
70
78
|
}) => any) | undefined;
|
|
71
79
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
72
80
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useNuxtApp } from "#app";
|
|
3
2
|
import { Icon } from "@iconify/vue";
|
|
4
3
|
import { Effect } from "effect";
|
|
5
|
-
import { computed
|
|
4
|
+
import { computed } 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 { Field, FieldLabel } from "../../../../ui/field";
|
|
10
10
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../../../ui/input-group";
|
|
11
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
11
12
|
import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
|
|
13
|
+
import { useFieldValue } from "../../../utils/field-value";
|
|
14
|
+
import { useFormReadonly } from "../../../utils/readonly";
|
|
12
15
|
import { useFormState } from "../../../utils/state";
|
|
13
16
|
defineOptions({ name: "ShwfedTextFieldRuntime" });
|
|
14
17
|
const props = defineProps({
|
|
@@ -16,8 +19,7 @@ const props = defineProps({
|
|
|
16
19
|
config: { type: null, required: true }
|
|
17
20
|
});
|
|
18
21
|
const { locale } = useI18n();
|
|
19
|
-
const { state
|
|
20
|
-
const { $cel: _rawCel } = useNuxtApp();
|
|
22
|
+
const { state } = useFormState();
|
|
21
23
|
const inherited = injectCELContext();
|
|
22
24
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
23
25
|
const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
|
|
@@ -37,29 +39,20 @@ function evalBool(expression, label) {
|
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
set: (next) => {
|
|
50
|
-
const empty = next.length === 0;
|
|
51
|
-
const path = props.config.binding;
|
|
52
|
-
if (path == null) {
|
|
53
|
-
uncontrolled.value = empty ? void 0 : next;
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
if (empty) delAt(path);
|
|
57
|
-
else setAt(path, next);
|
|
58
|
-
}
|
|
42
|
+
const formReadonly = useFormReadonly();
|
|
43
|
+
const isReadonly = computed(
|
|
44
|
+
() => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
|
|
45
|
+
);
|
|
46
|
+
const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
|
|
47
|
+
const { draft, commit } = useFieldValue({
|
|
48
|
+
binding: () => props.config.binding,
|
|
49
|
+
fromState: (raw) => raw == null ? "" : String(raw),
|
|
50
|
+
toState: (next) => next.length === 0 ? null : next
|
|
59
51
|
});
|
|
60
|
-
const showClear = computed(() => !isDisabled.value &&
|
|
52
|
+
const showClear = computed(() => !isDisabled.value && draft.value.length > 0);
|
|
61
53
|
function handleClear() {
|
|
62
|
-
|
|
54
|
+
draft.value = "";
|
|
55
|
+
commit();
|
|
63
56
|
}
|
|
64
57
|
</script>
|
|
65
58
|
|
|
@@ -77,15 +70,18 @@ function handleClear() {
|
|
|
77
70
|
v-if="tooltipText"
|
|
78
71
|
#tooltip
|
|
79
72
|
>
|
|
80
|
-
|
|
73
|
+
<Markdown
|
|
74
|
+
:source="tooltipText"
|
|
75
|
+
class="prose prose-xs prose-zinc"
|
|
76
|
+
/>
|
|
81
77
|
</template>
|
|
82
78
|
{{ labelText }}
|
|
83
79
|
</FieldLabel>
|
|
84
80
|
<div
|
|
85
|
-
v-if="
|
|
81
|
+
v-if="effectiveReadonly"
|
|
86
82
|
class="min-h-9 py-1.5 text-sm text-zinc-700"
|
|
87
83
|
>
|
|
88
|
-
{{
|
|
84
|
+
{{ draft || "\u2014" }}
|
|
89
85
|
</div>
|
|
90
86
|
<InputGroup
|
|
91
87
|
v-else
|
|
@@ -93,14 +89,16 @@ function handleClear() {
|
|
|
93
89
|
>
|
|
94
90
|
<InputGroupInput
|
|
95
91
|
:id="fieldId"
|
|
96
|
-
v-model="
|
|
92
|
+
v-model="draft"
|
|
97
93
|
:placeholder="placeholderText"
|
|
98
94
|
:disabled="isDisabled"
|
|
95
|
+
@blur="commit"
|
|
96
|
+
@keydown.enter="commit"
|
|
99
97
|
/>
|
|
100
98
|
<InputGroupAddon
|
|
101
99
|
v-if="showClear"
|
|
102
100
|
align="inline-end"
|
|
103
|
-
class="opacity-0 transition-opacity group-hover/text-field:opacity-100 focus-within:opacity-100"
|
|
101
|
+
class="[@media(hover:hover)]:opacity-0 transition-opacity group-hover/text-field:opacity-100 focus-within:opacity-100"
|
|
104
102
|
>
|
|
105
103
|
<InputGroupButton
|
|
106
104
|
size="icon-xs"
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts
CHANGED
|
@@ -42,6 +42,10 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
42
42
|
binding: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
43
43
|
disabled: Schema.optional<Schema.Schema<string, string, never>>;
|
|
44
44
|
readonly: Schema.optional<Schema.Schema<string, string, never>>;
|
|
45
|
+
derived: Schema.optional<Schema.Struct<{
|
|
46
|
+
mode: Schema.Literal<["formula", "prefill"]>;
|
|
47
|
+
expression: Schema.Schema<string, string, never>;
|
|
48
|
+
}>>;
|
|
45
49
|
id: Schema.refine<string, typeof Schema.String>;
|
|
46
50
|
displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
47
51
|
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Expression } 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.text";
|
|
6
6
|
export const compatibilityDate = "2026-04-22";
|
|
7
7
|
export const metadata = {
|
|
@@ -40,7 +40,8 @@ export function schema(configure) {
|
|
|
40
40
|
readonly: Schema.optional(CelBool.annotations({
|
|
41
41
|
title: "\u53EA\u8BFB\u6761\u4EF6",
|
|
42
42
|
description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u503C"
|
|
43
|
-
}))
|
|
43
|
+
})),
|
|
44
|
+
derived: derivedField(configure, "string")
|
|
44
45
|
}).annotations({
|
|
45
46
|
title: "TextField",
|
|
46
47
|
description: "\u5355\u884C\u6587\u672C\u8F93\u5165"
|
|
@@ -35,6 +35,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
35
35
|
}[]] | undefined;
|
|
36
36
|
readonly readonly?: string | undefined;
|
|
37
37
|
readonly binding?: string | undefined;
|
|
38
|
+
readonly derived?: {
|
|
39
|
+
readonly mode: "formula" | "prefill";
|
|
40
|
+
readonly expression: string;
|
|
41
|
+
} | undefined;
|
|
38
42
|
}) => any;
|
|
39
43
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
40
44
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -69,6 +73,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
69
73
|
}[]] | undefined;
|
|
70
74
|
readonly readonly?: string | undefined;
|
|
71
75
|
readonly binding?: string | undefined;
|
|
76
|
+
readonly derived?: {
|
|
77
|
+
readonly mode: "formula" | "prefill";
|
|
78
|
+
readonly expression: string;
|
|
79
|
+
} | undefined;
|
|
72
80
|
}) => any) | undefined;
|
|
73
81
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
74
82
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
|
+
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
5
6
|
import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
|
|
6
7
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
7
8
|
import { Markdown } from "../../../../ui/markdown";
|
|
@@ -157,6 +158,7 @@ const rowsText = computed({
|
|
|
157
158
|
{{ fieldTitle("tooltip") }}
|
|
158
159
|
</FieldLabel>
|
|
159
160
|
<LocaleField
|
|
161
|
+
markdown
|
|
160
162
|
:model-value="value.tooltip"
|
|
161
163
|
@update:model-value="(v) => value = { ...value, tooltip: v }"
|
|
162
164
|
/>
|
|
@@ -284,5 +286,24 @@ const rowsText = computed({
|
|
|
284
286
|
/>
|
|
285
287
|
</Field>
|
|
286
288
|
</div>
|
|
289
|
+
|
|
290
|
+
<Field orientation="vertical">
|
|
291
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
292
|
+
<template #tooltip>
|
|
293
|
+
<Markdown
|
|
294
|
+
:source="fieldDescription('derived')"
|
|
295
|
+
block
|
|
296
|
+
class="prose prose-sm prose-zinc"
|
|
297
|
+
/>
|
|
298
|
+
</template>
|
|
299
|
+
{{ fieldTitle("derived") }}
|
|
300
|
+
</FieldLabel>
|
|
301
|
+
<DerivedValueEditor
|
|
302
|
+
:model-value="value.derived"
|
|
303
|
+
result-type="string"
|
|
304
|
+
placeholder="例:form.summary"
|
|
305
|
+
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
306
|
+
/>
|
|
307
|
+
</Field>
|
|
287
308
|
</div>
|
|
288
309
|
</template>
|
|
@@ -35,6 +35,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
35
35
|
}[]] | undefined;
|
|
36
36
|
readonly readonly?: string | undefined;
|
|
37
37
|
readonly binding?: string | undefined;
|
|
38
|
+
readonly derived?: {
|
|
39
|
+
readonly mode: "formula" | "prefill";
|
|
40
|
+
readonly expression: string;
|
|
41
|
+
} | undefined;
|
|
38
42
|
}) => any;
|
|
39
43
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
40
44
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -69,6 +73,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
69
73
|
}[]] | undefined;
|
|
70
74
|
readonly readonly?: string | undefined;
|
|
71
75
|
readonly binding?: string | undefined;
|
|
76
|
+
readonly derived?: {
|
|
77
|
+
readonly mode: "formula" | "prefill";
|
|
78
|
+
readonly expression: string;
|
|
79
|
+
} | undefined;
|
|
72
80
|
}) => any) | undefined;
|
|
73
81
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
74
82
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useNuxtApp } from "#app";
|
|
3
2
|
import { Effect } from "effect";
|
|
4
|
-
import { computed
|
|
3
|
+
import { computed } from "vue";
|
|
5
4
|
import { useI18n } from "vue-i18n";
|
|
6
|
-
import {
|
|
5
|
+
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
6
|
+
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
7
7
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
8
8
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
9
9
|
import { InputGroup, InputGroupTextarea } from "../../../../ui/input-group";
|
|
10
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
10
11
|
import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
|
|
12
|
+
import { useFieldValue } from "../../../utils/field-value";
|
|
13
|
+
import { useFormReadonly } from "../../../utils/readonly";
|
|
11
14
|
import { useFormState } from "../../../utils/state";
|
|
12
15
|
defineOptions({ name: "ShwfedTextareaFieldRuntime" });
|
|
13
16
|
const props = defineProps({
|
|
@@ -15,8 +18,7 @@ const props = defineProps({
|
|
|
15
18
|
config: { type: null, required: true }
|
|
16
19
|
});
|
|
17
20
|
const { locale } = useI18n();
|
|
18
|
-
const { state
|
|
19
|
-
const { $cel: _rawCel } = useNuxtApp();
|
|
21
|
+
const { state } = useFormState();
|
|
20
22
|
const inherited = injectCELContext();
|
|
21
23
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
22
24
|
const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
|
|
@@ -36,23 +38,15 @@ function evalBool(expression, label) {
|
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
set: (next) => {
|
|
49
|
-
const path = props.config.binding;
|
|
50
|
-
if (path == null) {
|
|
51
|
-
uncontrolled.value = next;
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
setAt(path, next);
|
|
55
|
-
}
|
|
41
|
+
const formReadonly = useFormReadonly();
|
|
42
|
+
const isReadonly = computed(
|
|
43
|
+
() => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
|
|
44
|
+
);
|
|
45
|
+
const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
|
|
46
|
+
const { draft, commit } = useFieldValue({
|
|
47
|
+
binding: () => props.config.binding,
|
|
48
|
+
fromState: (raw) => raw == null ? "" : String(raw),
|
|
49
|
+
toState: (next) => next
|
|
56
50
|
});
|
|
57
51
|
</script>
|
|
58
52
|
|
|
@@ -70,23 +64,27 @@ const model = computed({
|
|
|
70
64
|
v-if="tooltipText"
|
|
71
65
|
#tooltip
|
|
72
66
|
>
|
|
73
|
-
|
|
67
|
+
<Markdown
|
|
68
|
+
:source="tooltipText"
|
|
69
|
+
class="prose prose-xs prose-zinc"
|
|
70
|
+
/>
|
|
74
71
|
</template>
|
|
75
72
|
{{ labelText }}
|
|
76
73
|
</FieldLabel>
|
|
77
74
|
<div
|
|
78
|
-
v-if="
|
|
75
|
+
v-if="effectiveReadonly"
|
|
79
76
|
class="min-h-9 py-1.5 text-sm whitespace-pre-wrap text-zinc-700"
|
|
80
77
|
>
|
|
81
|
-
{{
|
|
78
|
+
{{ draft || "\u2014" }}
|
|
82
79
|
</div>
|
|
83
80
|
<InputGroup v-else>
|
|
84
81
|
<InputGroupTextarea
|
|
85
82
|
:id="fieldId"
|
|
86
|
-
v-model="
|
|
83
|
+
v-model="draft"
|
|
87
84
|
:placeholder="placeholderText"
|
|
88
85
|
:disabled="isDisabled"
|
|
89
86
|
:rows="config.rows"
|
|
87
|
+
@blur="commit"
|
|
90
88
|
/>
|
|
91
89
|
</InputGroup>
|
|
92
90
|
</Field>
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts
CHANGED
|
@@ -44,6 +44,10 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
44
44
|
binding: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
45
45
|
disabled: Schema.optional<Schema.Schema<string, string, never>>;
|
|
46
46
|
readonly: Schema.optional<Schema.Schema<string, string, never>>;
|
|
47
|
+
derived: Schema.optional<Schema.Struct<{
|
|
48
|
+
mode: Schema.Literal<["formula", "prefill"]>;
|
|
49
|
+
expression: Schema.Schema<string, string, never>;
|
|
50
|
+
}>>;
|
|
47
51
|
id: Schema.refine<string, typeof Schema.String>;
|
|
48
52
|
displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
49
53
|
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Expression } 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.textarea";
|
|
6
6
|
export const compatibilityDate = "2026-04-22";
|
|
7
7
|
export const metadata = {
|
|
@@ -44,7 +44,8 @@ export function schema(configure) {
|
|
|
44
44
|
readonly: Schema.optional(CelBool.annotations({
|
|
45
45
|
title: "\u53EA\u8BFB\u6761\u4EF6",
|
|
46
46
|
description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u503C"
|
|
47
|
-
}))
|
|
47
|
+
})),
|
|
48
|
+
derived: derivedField(configure, "string")
|
|
48
49
|
}).annotations({
|
|
49
50
|
title: "TextareaField",
|
|
50
51
|
description: "\u591A\u884C\u6587\u672C\u8F93\u5165"
|