@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
|
@@ -33,8 +33,12 @@ 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 options: string;
|
|
37
36
|
readonly binding?: string | undefined;
|
|
37
|
+
readonly derived?: {
|
|
38
|
+
readonly mode: "formula" | "prefill";
|
|
39
|
+
readonly expression: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
readonly options: string;
|
|
38
42
|
readonly optionValue: string;
|
|
39
43
|
readonly optionLabel: readonly [{
|
|
40
44
|
readonly locale: "zh";
|
|
@@ -75,8 +79,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
75
79
|
readonly message: string;
|
|
76
80
|
}[]] | undefined;
|
|
77
81
|
readonly readonly?: string | undefined;
|
|
78
|
-
readonly options: string;
|
|
79
82
|
readonly binding?: string | undefined;
|
|
83
|
+
readonly derived?: {
|
|
84
|
+
readonly mode: "formula" | "prefill";
|
|
85
|
+
readonly expression: string;
|
|
86
|
+
} | undefined;
|
|
87
|
+
readonly options: string;
|
|
80
88
|
readonly optionValue: string;
|
|
81
89
|
readonly optionLabel: readonly [{
|
|
82
90
|
readonly locale: "zh";
|
|
@@ -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";
|
|
@@ -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
|
/>
|
|
@@ -304,5 +306,24 @@ const pathText = computed({
|
|
|
304
306
|
/>
|
|
305
307
|
</Field>
|
|
306
308
|
</div>
|
|
309
|
+
|
|
310
|
+
<Field orientation="vertical">
|
|
311
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
312
|
+
<template #tooltip>
|
|
313
|
+
<Markdown
|
|
314
|
+
:source="fieldDescription('derived')"
|
|
315
|
+
block
|
|
316
|
+
class="prose prose-sm prose-zinc"
|
|
317
|
+
/>
|
|
318
|
+
</template>
|
|
319
|
+
{{ fieldTitle("derived") }}
|
|
320
|
+
</FieldLabel>
|
|
321
|
+
<DerivedValueEditor
|
|
322
|
+
:model-value="value.derived"
|
|
323
|
+
result-type="dyn"
|
|
324
|
+
placeholder="例:form.category"
|
|
325
|
+
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
326
|
+
/>
|
|
327
|
+
</Field>
|
|
307
328
|
</div>
|
|
308
329
|
</template>
|
|
@@ -33,8 +33,12 @@ 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 options: string;
|
|
37
36
|
readonly binding?: string | undefined;
|
|
37
|
+
readonly derived?: {
|
|
38
|
+
readonly mode: "formula" | "prefill";
|
|
39
|
+
readonly expression: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
readonly options: string;
|
|
38
42
|
readonly optionValue: string;
|
|
39
43
|
readonly optionLabel: readonly [{
|
|
40
44
|
readonly locale: "zh";
|
|
@@ -75,8 +79,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
75
79
|
readonly message: string;
|
|
76
80
|
}[]] | undefined;
|
|
77
81
|
readonly readonly?: string | undefined;
|
|
78
|
-
readonly options: string;
|
|
79
82
|
readonly binding?: string | undefined;
|
|
83
|
+
readonly derived?: {
|
|
84
|
+
readonly mode: "formula" | "prefill";
|
|
85
|
+
readonly expression: string;
|
|
86
|
+
} | undefined;
|
|
87
|
+
readonly options: string;
|
|
80
88
|
readonly optionValue: string;
|
|
81
89
|
readonly optionLabel: readonly [{
|
|
82
90
|
readonly locale: "zh";
|
|
@@ -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, nextTick, ref } 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 { interpolateMarkdown } from "../../../../table/utils/runtime";
|
|
9
9
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
10
10
|
import {
|
|
@@ -17,8 +17,10 @@ import {
|
|
|
17
17
|
} from "../../../../ui/command";
|
|
18
18
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
19
19
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../../../ui/input-group";
|
|
20
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
20
21
|
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "../../../../ui/popover";
|
|
21
22
|
import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
|
|
23
|
+
import { useFormReadonly } from "../../../utils/readonly";
|
|
22
24
|
import { useFormState } from "../../../utils/state";
|
|
23
25
|
defineOptions({ name: "ShwfedComboboxSingleFieldRuntime" });
|
|
24
26
|
const props = defineProps({
|
|
@@ -46,7 +48,6 @@ const { locale, t } = useI18n({
|
|
|
46
48
|
}
|
|
47
49
|
});
|
|
48
50
|
const { state, getAt, setAt } = useFormState();
|
|
49
|
-
const { $cel: _rawCel } = useNuxtApp();
|
|
50
51
|
const inherited = injectCELContext();
|
|
51
52
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
52
53
|
const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
|
|
@@ -66,7 +67,11 @@ function evalBool(expression, label) {
|
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
|
|
69
|
-
const
|
|
70
|
+
const formReadonly = useFormReadonly();
|
|
71
|
+
const isReadonly = computed(
|
|
72
|
+
() => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
|
|
73
|
+
);
|
|
74
|
+
const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
|
|
70
75
|
function valueOf(option) {
|
|
71
76
|
try {
|
|
72
77
|
return Effect.runSync($cel(props.config.optionValue, { form: state.value ?? {}, option }));
|
|
@@ -161,12 +166,15 @@ function handleClear() {
|
|
|
161
166
|
v-if="tooltipText"
|
|
162
167
|
#tooltip
|
|
163
168
|
>
|
|
164
|
-
|
|
169
|
+
<Markdown
|
|
170
|
+
:source="tooltipText"
|
|
171
|
+
class="prose prose-xs prose-zinc"
|
|
172
|
+
/>
|
|
165
173
|
</template>
|
|
166
174
|
{{ labelText }}
|
|
167
175
|
</FieldLabel>
|
|
168
176
|
<div
|
|
169
|
-
v-if="
|
|
177
|
+
v-if="effectiveReadonly"
|
|
170
178
|
class="min-h-9 py-1.5 text-sm text-zinc-700"
|
|
171
179
|
>
|
|
172
180
|
{{ selectedLabel || "\u2014" }}
|
|
@@ -193,7 +201,7 @@ function handleClear() {
|
|
|
193
201
|
<InputGroupAddon
|
|
194
202
|
v-if="showClear"
|
|
195
203
|
align="inline-end"
|
|
196
|
-
class="opacity-0 transition-opacity group-hover/combobox-single:opacity-100 focus-within:opacity-100"
|
|
204
|
+
class="[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-single:opacity-100 focus-within:opacity-100"
|
|
197
205
|
>
|
|
198
206
|
<InputGroupButton
|
|
199
207
|
size="icon-xs"
|
|
@@ -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
|
options: Schema.optionalWith<Schema.Schema<string, string, never>, {
|
|
46
50
|
default: () => string;
|
|
47
51
|
}>;
|
|
@@ -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";
|
|
6
6
|
export const compatibilityDate = "2026-04-24";
|
|
7
7
|
export const metadata = {
|
|
@@ -51,6 +51,7 @@ export function schema(configure) {
|
|
|
51
51
|
title: "\u53EA\u8BFB\u6761\u4EF6",
|
|
52
52
|
description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u9009\u9879\u7684\u6807\u7B7E"
|
|
53
53
|
})),
|
|
54
|
+
derived: derivedField(configure, "dyn"),
|
|
54
55
|
options: Schema.optionalWith(CelOptions.annotations({
|
|
55
56
|
title: "\u9009\u9879",
|
|
56
57
|
description: "\u8FD4\u56DE\u9009\u9879\u6570\u7EC4\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u53EF\u8BBF\u95EE `form` \u5F53\u524D\u72B6\u6001\uFF1B\u4F8B\uFF1A`[{value: 'a', label: 'A'}]`"
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts
CHANGED
|
@@ -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 format?: string | undefined;
|
|
37
42
|
readonly valueFormat?: string | undefined;
|
|
38
|
-
readonly binding?: string | undefined;
|
|
39
43
|
readonly presets?: readonly {
|
|
40
44
|
readonly label: readonly [{
|
|
41
45
|
readonly locale: "zh";
|
|
@@ -79,9 +83,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
79
83
|
readonly message: string;
|
|
80
84
|
}[]] | undefined;
|
|
81
85
|
readonly readonly?: string | undefined;
|
|
86
|
+
readonly binding?: string | undefined;
|
|
87
|
+
readonly derived?: {
|
|
88
|
+
readonly mode: "formula" | "prefill";
|
|
89
|
+
readonly expression: string;
|
|
90
|
+
} | undefined;
|
|
82
91
|
readonly format?: string | undefined;
|
|
83
92
|
readonly valueFormat?: string | undefined;
|
|
84
|
-
readonly binding?: string | undefined;
|
|
85
93
|
readonly presets?: readonly {
|
|
86
94
|
readonly label: readonly [{
|
|
87
95
|
readonly locale: "zh";
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue
CHANGED
|
@@ -4,6 +4,7 @@ import { computed } from "vue";
|
|
|
4
4
|
import { format as formatDate } from "date-fns";
|
|
5
5
|
import { Button } from "../../../../ui/button";
|
|
6
6
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
7
|
+
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
7
8
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
9
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText } from "../../../../ui/input-group";
|
|
9
10
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
@@ -218,6 +219,7 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
|
|
|
218
219
|
{{ fieldTitle("tooltip") }}
|
|
219
220
|
</FieldLabel>
|
|
220
221
|
<LocaleField
|
|
222
|
+
markdown
|
|
221
223
|
:model-value="value.tooltip"
|
|
222
224
|
@update:model-value="(v) => value = { ...value, tooltip: v }"
|
|
223
225
|
/>
|
|
@@ -468,5 +470,24 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
|
|
|
468
470
|
/>
|
|
469
471
|
</Field>
|
|
470
472
|
</div>
|
|
473
|
+
|
|
474
|
+
<Field orientation="vertical">
|
|
475
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
476
|
+
<template #tooltip>
|
|
477
|
+
<Markdown
|
|
478
|
+
:source="fieldDescription('derived')"
|
|
479
|
+
block
|
|
480
|
+
class="prose prose-sm prose-zinc"
|
|
481
|
+
/>
|
|
482
|
+
</template>
|
|
483
|
+
{{ fieldTitle("derived") }}
|
|
484
|
+
</FieldLabel>
|
|
485
|
+
<DerivedValueEditor
|
|
486
|
+
:model-value="value.derived"
|
|
487
|
+
result-type="string"
|
|
488
|
+
placeholder="例:form.startDate"
|
|
489
|
+
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
490
|
+
/>
|
|
491
|
+
</Field>
|
|
471
492
|
</div>
|
|
472
493
|
</template>
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts
CHANGED
|
@@ -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 format?: string | undefined;
|
|
37
42
|
readonly valueFormat?: string | undefined;
|
|
38
|
-
readonly binding?: string | undefined;
|
|
39
43
|
readonly presets?: readonly {
|
|
40
44
|
readonly label: readonly [{
|
|
41
45
|
readonly locale: "zh";
|
|
@@ -79,9 +83,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
79
83
|
readonly message: string;
|
|
80
84
|
}[]] | undefined;
|
|
81
85
|
readonly readonly?: string | undefined;
|
|
86
|
+
readonly binding?: string | undefined;
|
|
87
|
+
readonly derived?: {
|
|
88
|
+
readonly mode: "formula" | "prefill";
|
|
89
|
+
readonly expression: string;
|
|
90
|
+
} | undefined;
|
|
82
91
|
readonly format?: string | undefined;
|
|
83
92
|
readonly valueFormat?: string | undefined;
|
|
84
|
-
readonly binding?: string | undefined;
|
|
85
93
|
readonly presets?: readonly {
|
|
86
94
|
readonly label: readonly [{
|
|
87
95
|
readonly locale: "zh";
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useNuxtApp } from "#app";
|
|
3
2
|
import { format as formatDate } from "date-fns";
|
|
4
3
|
import { Effect } from "effect";
|
|
5
4
|
import { computed, ref } 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 { DatePicker, DATE_PICKER_DEFAULT_FORMATS } from "../../../../ui/date-picker";
|
|
10
10
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
11
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
11
12
|
import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
|
|
13
|
+
import { useFormReadonly } from "../../../utils/readonly";
|
|
12
14
|
import { useFormState } from "../../../utils/state";
|
|
13
15
|
defineOptions({ name: "ShwfedDateFieldRuntime" });
|
|
14
16
|
const props = defineProps({
|
|
@@ -17,7 +19,6 @@ const props = defineProps({
|
|
|
17
19
|
});
|
|
18
20
|
const { locale } = useI18n();
|
|
19
21
|
const { state, getAt, setAt } = useFormState();
|
|
20
|
-
const { $cel: _rawCel } = useNuxtApp();
|
|
21
22
|
const inherited = injectCELContext();
|
|
22
23
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
23
24
|
const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
|
|
@@ -37,7 +38,11 @@ function evalBool(expression, label) {
|
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
|
|
40
|
-
const
|
|
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");
|
|
41
46
|
const resolvedValueFormat = computed(
|
|
42
47
|
() => props.config.valueFormat ?? DATE_PICKER_DEFAULT_FORMATS.date.value
|
|
43
48
|
);
|
|
@@ -90,12 +95,15 @@ const model = computed({
|
|
|
90
95
|
v-if="tooltipText"
|
|
91
96
|
#tooltip
|
|
92
97
|
>
|
|
93
|
-
|
|
98
|
+
<Markdown
|
|
99
|
+
:source="tooltipText"
|
|
100
|
+
class="prose prose-xs prose-zinc"
|
|
101
|
+
/>
|
|
94
102
|
</template>
|
|
95
103
|
{{ labelText }}
|
|
96
104
|
</FieldLabel>
|
|
97
105
|
<div
|
|
98
|
-
v-if="
|
|
106
|
+
v-if="effectiveReadonly"
|
|
99
107
|
class="min-h-9 py-1.5 text-sm text-zinc-700"
|
|
100
108
|
>
|
|
101
109
|
{{ model || "\u2014" }}
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts
CHANGED
|
@@ -53,6 +53,10 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
53
53
|
binding: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
54
54
|
disabled: Schema.optional<Schema.Schema<string, string, never>>;
|
|
55
55
|
readonly: Schema.optional<Schema.Schema<string, string, never>>;
|
|
56
|
+
derived: Schema.optional<Schema.Struct<{
|
|
57
|
+
mode: Schema.Literal<["formula", "prefill"]>;
|
|
58
|
+
expression: Schema.Schema<string, string, never>;
|
|
59
|
+
}>>;
|
|
56
60
|
format: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
57
61
|
valueFormat: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
58
62
|
presets: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
@@ -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.date";
|
|
6
6
|
export const compatibilityDate = "2026-04-27";
|
|
7
7
|
export const metadata = {
|
|
@@ -58,6 +58,7 @@ export function schema(configure) {
|
|
|
58
58
|
title: "\u53EA\u8BFB\u6761\u4EF6",
|
|
59
59
|
description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u503C"
|
|
60
60
|
})),
|
|
61
|
+
derived: derivedField(configure, "string"),
|
|
61
62
|
format: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
|
|
62
63
|
title: "\u5C55\u793A\u683C\u5F0F",
|
|
63
64
|
description: "\u8F93\u5165\u6846\u4E2D\u5C55\u793A\u65E5\u671F\u7684 `date-fns` \u683C\u5F0F\u4E32\uFF1B\u7559\u7A7A\u65F6\u4F7F\u7528\u9ED8\u8BA4 `yyyy-MM-dd`"
|
|
@@ -26,6 +26,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
26
26
|
readonly compatibilityDate: "2026-04-27";
|
|
27
27
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
28
28
|
readonly readonly?: string | undefined;
|
|
29
|
+
readonly binding?: string | readonly [string, string] | undefined;
|
|
30
|
+
readonly derived?: {
|
|
31
|
+
readonly mode: "formula" | "prefill";
|
|
32
|
+
readonly expression: string;
|
|
33
|
+
} | undefined;
|
|
29
34
|
readonly format?: string | undefined;
|
|
30
35
|
readonly numberOfMonths?: number | undefined;
|
|
31
36
|
readonly valueFormat?: string | undefined;
|
|
@@ -44,7 +49,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
44
49
|
readonly locale: "en" | "ja" | "ko";
|
|
45
50
|
readonly message: string;
|
|
46
51
|
}[]] | undefined;
|
|
47
|
-
readonly binding?: string | readonly [string, string] | undefined;
|
|
48
52
|
readonly presets?: readonly {
|
|
49
53
|
readonly label: readonly [{
|
|
50
54
|
readonly locale: "zh";
|
|
@@ -82,6 +86,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
82
86
|
readonly compatibilityDate: "2026-04-27";
|
|
83
87
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
84
88
|
readonly readonly?: string | undefined;
|
|
89
|
+
readonly binding?: string | readonly [string, string] | undefined;
|
|
90
|
+
readonly derived?: {
|
|
91
|
+
readonly mode: "formula" | "prefill";
|
|
92
|
+
readonly expression: string;
|
|
93
|
+
} | undefined;
|
|
85
94
|
readonly format?: string | undefined;
|
|
86
95
|
readonly numberOfMonths?: number | undefined;
|
|
87
96
|
readonly valueFormat?: string | undefined;
|
|
@@ -100,7 +109,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
100
109
|
readonly locale: "en" | "ja" | "ko";
|
|
101
110
|
readonly message: string;
|
|
102
111
|
}[]] | undefined;
|
|
103
|
-
readonly binding?: string | readonly [string, string] | undefined;
|
|
104
112
|
readonly presets?: readonly {
|
|
105
113
|
readonly label: readonly [{
|
|
106
114
|
readonly locale: "zh";
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue
CHANGED
|
@@ -4,6 +4,7 @@ import { format as formatDate } from "date-fns";
|
|
|
4
4
|
import { computed } from "vue";
|
|
5
5
|
import { Button } from "../../../../ui/button";
|
|
6
6
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
7
|
+
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
7
8
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
9
|
import { IconPicker } from "../../../../ui/icon-picker";
|
|
9
10
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupNumberField, InputGroupText } from "../../../../ui/input-group";
|
|
@@ -295,6 +296,7 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
|
|
|
295
296
|
{{ fieldTitle("tooltip") }}
|
|
296
297
|
</FieldLabel>
|
|
297
298
|
<LocaleField
|
|
299
|
+
markdown
|
|
298
300
|
:model-value="value.tooltip"
|
|
299
301
|
@update:model-value="(v) => value = { ...value, tooltip: v }"
|
|
300
302
|
/>
|
|
@@ -649,5 +651,24 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
|
|
|
649
651
|
/>
|
|
650
652
|
</Field>
|
|
651
653
|
</div>
|
|
654
|
+
|
|
655
|
+
<Field orientation="vertical">
|
|
656
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
657
|
+
<template #tooltip>
|
|
658
|
+
<Markdown
|
|
659
|
+
:source="fieldDescription('derived')"
|
|
660
|
+
block
|
|
661
|
+
class="prose prose-sm prose-zinc"
|
|
662
|
+
/>
|
|
663
|
+
</template>
|
|
664
|
+
{{ fieldTitle("derived") }}
|
|
665
|
+
</FieldLabel>
|
|
666
|
+
<DerivedValueEditor
|
|
667
|
+
:model-value="value.derived"
|
|
668
|
+
result-type="dyn"
|
|
669
|
+
placeholder="例:[form.from, form.to]"
|
|
670
|
+
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
671
|
+
/>
|
|
672
|
+
</Field>
|
|
652
673
|
</div>
|
|
653
674
|
</template>
|
|
@@ -26,6 +26,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
26
26
|
readonly compatibilityDate: "2026-04-27";
|
|
27
27
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
28
28
|
readonly readonly?: string | undefined;
|
|
29
|
+
readonly binding?: string | readonly [string, string] | undefined;
|
|
30
|
+
readonly derived?: {
|
|
31
|
+
readonly mode: "formula" | "prefill";
|
|
32
|
+
readonly expression: string;
|
|
33
|
+
} | undefined;
|
|
29
34
|
readonly format?: string | undefined;
|
|
30
35
|
readonly numberOfMonths?: number | undefined;
|
|
31
36
|
readonly valueFormat?: string | undefined;
|
|
@@ -44,7 +49,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
44
49
|
readonly locale: "en" | "ja" | "ko";
|
|
45
50
|
readonly message: string;
|
|
46
51
|
}[]] | undefined;
|
|
47
|
-
readonly binding?: string | readonly [string, string] | undefined;
|
|
48
52
|
readonly presets?: readonly {
|
|
49
53
|
readonly label: readonly [{
|
|
50
54
|
readonly locale: "zh";
|
|
@@ -82,6 +86,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
82
86
|
readonly compatibilityDate: "2026-04-27";
|
|
83
87
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
84
88
|
readonly readonly?: string | undefined;
|
|
89
|
+
readonly binding?: string | readonly [string, string] | undefined;
|
|
90
|
+
readonly derived?: {
|
|
91
|
+
readonly mode: "formula" | "prefill";
|
|
92
|
+
readonly expression: string;
|
|
93
|
+
} | undefined;
|
|
85
94
|
readonly format?: string | undefined;
|
|
86
95
|
readonly numberOfMonths?: number | undefined;
|
|
87
96
|
readonly valueFormat?: string | undefined;
|
|
@@ -100,7 +109,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
100
109
|
readonly locale: "en" | "ja" | "ko";
|
|
101
110
|
readonly message: string;
|
|
102
111
|
}[]] | undefined;
|
|
103
|
-
readonly binding?: string | readonly [string, string] | undefined;
|
|
104
112
|
readonly presets?: readonly {
|
|
105
113
|
readonly label: readonly [{
|
|
106
114
|
readonly locale: "zh";
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useNuxtApp } from "#app";
|
|
3
2
|
import { format as formatDate } from "date-fns";
|
|
4
3
|
import { Effect } from "effect";
|
|
5
4
|
import { computed, ref } 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 { DATE_RANGE_PICKER_DEFAULT_FORMATS, DateRangePicker } from "../../../../ui/date-range-picker";
|
|
10
10
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
11
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
11
12
|
import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
|
|
13
|
+
import { useFormReadonly } from "../../../utils/readonly";
|
|
12
14
|
import { useFormState } from "../../../utils/state";
|
|
13
15
|
defineOptions({ name: "ShwfedDateRangeFieldRuntime" });
|
|
14
16
|
const props = defineProps({
|
|
@@ -17,7 +19,6 @@ const props = defineProps({
|
|
|
17
19
|
});
|
|
18
20
|
const { locale } = useI18n();
|
|
19
21
|
const { state, getAt, setAt } = useFormState();
|
|
20
|
-
const { $cel: _rawCel } = useNuxtApp();
|
|
21
22
|
const inherited = injectCELContext();
|
|
22
23
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
23
24
|
const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
|
|
@@ -40,7 +41,11 @@ function evalBool(expression, label) {
|
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
|
|
43
|
-
const
|
|
44
|
+
const formReadonly = useFormReadonly();
|
|
45
|
+
const isReadonly = computed(
|
|
46
|
+
() => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
|
|
47
|
+
);
|
|
48
|
+
const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
|
|
44
49
|
const resolvedValueFormat = computed(
|
|
45
50
|
() => props.config.valueFormat ?? DATE_RANGE_PICKER_DEFAULT_FORMATS.daterange.value
|
|
46
51
|
);
|
|
@@ -120,12 +125,15 @@ const readonlyText = computed(() => {
|
|
|
120
125
|
v-if="tooltipText"
|
|
121
126
|
#tooltip
|
|
122
127
|
>
|
|
123
|
-
|
|
128
|
+
<Markdown
|
|
129
|
+
:source="tooltipText"
|
|
130
|
+
class="prose prose-xs prose-zinc"
|
|
131
|
+
/>
|
|
124
132
|
</template>
|
|
125
133
|
{{ labelText }}
|
|
126
134
|
</FieldLabel>
|
|
127
135
|
<div
|
|
128
|
-
v-if="
|
|
136
|
+
v-if="effectiveReadonly"
|
|
129
137
|
class="min-h-9 py-1.5 text-sm text-zinc-700"
|
|
130
138
|
>
|
|
131
139
|
{{ readonlyText }}
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts
CHANGED
|
@@ -61,6 +61,10 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
61
61
|
binding: Schema.optional<Schema.Union<[Schema.filter<typeof Schema.String>, Schema.filter<Schema.Tuple2<Schema.filter<typeof Schema.String>, Schema.filter<typeof Schema.String>>>]>>;
|
|
62
62
|
disabled: Schema.optional<Schema.Schema<string, string, never>>;
|
|
63
63
|
readonly: Schema.optional<Schema.Schema<string, string, never>>;
|
|
64
|
+
derived: Schema.optional<Schema.Struct<{
|
|
65
|
+
mode: Schema.Literal<["formula", "prefill"]>;
|
|
66
|
+
expression: Schema.Schema<string, string, never>;
|
|
67
|
+
}>>;
|
|
64
68
|
format: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
65
69
|
valueFormat: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
66
70
|
rangeSeparatorIcon: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/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.daterange";
|
|
6
6
|
export const compatibilityDate = "2026-04-27";
|
|
7
7
|
const BindingPath = Schema.String.pipe(Schema.minLength(1));
|
|
@@ -73,6 +73,7 @@ export function schema(configure) {
|
|
|
73
73
|
title: "\u53EA\u8BFB\u6761\u4EF6",
|
|
74
74
|
description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u503C"
|
|
75
75
|
})),
|
|
76
|
+
derived: derivedField(configure, "dyn"),
|
|
76
77
|
format: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
|
|
77
78
|
title: "\u5C55\u793A\u683C\u5F0F",
|
|
78
79
|
description: "\u8F93\u5165\u6846\u4E2D\u5C55\u793A\u65E5\u671F\u7684 `date-fns` \u683C\u5F0F\u4E32\uFF1B\u7559\u7A7A\u65F6\u4F7F\u7528\u9ED8\u8BA4 `yyyy-MM-dd`"
|
|
@@ -33,11 +33,15 @@ 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 format?: string | undefined;
|
|
37
42
|
readonly hourCycle?: 12 | 24 | undefined;
|
|
38
43
|
readonly valueFormat?: string | undefined;
|
|
39
|
-
readonly timeGranularity?: "
|
|
40
|
-
readonly binding?: string | undefined;
|
|
44
|
+
readonly timeGranularity?: "hour" | "minute" | "second" | undefined;
|
|
41
45
|
readonly presets?: readonly {
|
|
42
46
|
readonly label: readonly [{
|
|
43
47
|
readonly locale: "zh";
|
|
@@ -81,11 +85,15 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
81
85
|
readonly message: string;
|
|
82
86
|
}[]] | undefined;
|
|
83
87
|
readonly readonly?: string | undefined;
|
|
88
|
+
readonly binding?: string | undefined;
|
|
89
|
+
readonly derived?: {
|
|
90
|
+
readonly mode: "formula" | "prefill";
|
|
91
|
+
readonly expression: string;
|
|
92
|
+
} | undefined;
|
|
84
93
|
readonly format?: string | undefined;
|
|
85
94
|
readonly hourCycle?: 12 | 24 | undefined;
|
|
86
95
|
readonly valueFormat?: string | undefined;
|
|
87
|
-
readonly timeGranularity?: "
|
|
88
|
-
readonly binding?: string | undefined;
|
|
96
|
+
readonly timeGranularity?: "hour" | "minute" | "second" | undefined;
|
|
89
97
|
readonly presets?: readonly {
|
|
90
98
|
readonly label: readonly [{
|
|
91
99
|
readonly locale: "zh";
|