@shwfed/config 2.4.0 → 2.5.0
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/mcp.mjs +128 -27
- package/dist/module.json +1 -1
- package/dist/preview/assets/{config-Bxkq2ZRm.js → config-BkytEQN5.js} +1 -1
- package/dist/preview/assets/{config-BdFIFUa_.js → config-CK011_jJ.js} +1 -1
- package/dist/preview/assets/{config-BcQQl4v6.js → config-C_bBX0wD.js} +1 -1
- package/dist/preview/assets/{config-CHHX7vhb.js → config-Cbn8o9BY.js} +1 -1
- package/dist/preview/assets/{config-CZ0f5xdI.js → config-DYL6kHr3.js} +1 -1
- package/dist/preview/assets/{config-Ddh8pxIi.js → config-Dx0zHfGt.js} +1 -1
- package/dist/preview/assets/{config-D9xGgFnF.js → config-E-DM6b5t.js} +1 -1
- package/dist/preview/assets/{config-C32yfrlg.js → config-PjseWUbC.js} +1 -1
- package/dist/preview/assets/{config-Bi9F-Jdh.js → config-dwcdYHd4.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-C_cjxvm1.js → definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js} +1 -1
- package/dist/preview/assets/index-7MVXgV5n.css +1 -0
- package/dist/preview/assets/index-CmPiZG_4.js +1 -0
- package/dist/preview/assets/index-x-77enex.js +668 -0
- package/dist/preview/assets/runtime-BRMGkqSr.js +1 -0
- package/dist/preview/assets/runtime-CHLboM_z.js +1 -0
- package/dist/preview/assets/runtime-CeHdesjP.js +1 -0
- package/dist/preview/assets/runtime-D4_9FCLy.js +1 -0
- package/dist/preview/assets/runtime-DHBTDws7.js +1 -0
- package/dist/preview/assets/runtime-DJHpCLnr.js +1 -0
- package/dist/preview/assets/runtime-DKq86fZU.js +1 -0
- package/dist/preview/assets/runtime-DjpjaNec.js +1 -0
- package/dist/preview/assets/runtime-ZQryOEKm.js +1 -0
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue +7 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +1 -1
- package/dist/runtime/components/form/ValidationRulesField.d.vue.ts +16 -0
- package/dist/runtime/components/form/ValidationRulesField.vue +207 -0
- package/dist/runtime/components/form/ValidationRulesField.vue.d.ts +16 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +30 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue +51 -9
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/runtime.vue +22 -2
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/runtime.vue +26 -0
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/index.d.vue.ts +1 -0
- package/dist/runtime/components/form/index.vue +14 -18
- package/dist/runtime/components/form/index.vue.d.ts +1 -0
- package/dist/runtime/components/form/schema.d.ts +2 -10
- package/dist/runtime/components/form/schema.js +2 -5
- package/dist/runtime/components/form/utils/cel-scope.d.ts +12 -3
- package/dist/runtime/components/form/utils/cel-scope.js +17 -18
- package/dist/runtime/components/form/utils/common.d.ts +42 -0
- package/dist/runtime/components/form/utils/common.js +40 -2
- package/dist/runtime/components/form/utils/form-vars.d.ts +19 -0
- package/dist/runtime/components/form/utils/form-vars.js +5 -0
- package/dist/runtime/components/form/utils/validation.d.ts +85 -0
- package/dist/runtime/components/form/utils/validation.js +113 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/config.vue +25 -45
- package/dist/runtime/components/table/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/index.vue +22 -2
- package/dist/runtime/components/table/schema.d.ts +4 -2
- package/dist/runtime/components/table/schema.js +69 -13
- package/dist/runtime/components/table/utils/shared.d.ts +2 -0
- package/dist/runtime/components/table/utils/shared.js +12 -4
- package/dist/runtime/components/ui/field/FieldError.vue +1 -1
- package/dist/runtime/components/ui/field/FieldMessages.d.vue.ts +9 -0
- package/dist/runtime/components/ui/field/FieldMessages.vue +21 -0
- package/dist/runtime/components/ui/field/FieldMessages.vue.d.ts +9 -0
- package/dist/runtime/components/ui/field/FieldWarning.d.vue.ts +20 -0
- package/dist/runtime/components/ui/field/FieldWarning.vue +51 -0
- package/dist/runtime/components/ui/field/FieldWarning.vue.d.ts +20 -0
- package/dist/runtime/components/ui/field/index.d.ts +2 -0
- package/dist/runtime/components/ui/field/index.js +10 -4
- package/dist/runtime/components/ui/locale/Locale.d.vue.ts +2 -0
- package/dist/runtime/components/ui/locale/Locale.vue +165 -155
- package/dist/runtime/components/ui/locale/Locale.vue.d.ts +2 -0
- package/dist/runtime/share/form-validate.d.ts +18 -0
- package/dist/runtime/share/form-validate.js +8 -0
- package/package.json +1 -1
- package/dist/preview/assets/index-BqOX70Hd.css +0 -1
- package/dist/preview/assets/index-D-VR1i8D.js +0 -659
- package/dist/preview/assets/index-ihZGlPdX.js +0 -1
- package/dist/preview/assets/runtime-Bn8mqeDH.js +0 -1
- package/dist/preview/assets/runtime-Cc_Wk3o-.js +0 -1
- package/dist/preview/assets/runtime-CttAjIgg.js +0 -1
- package/dist/preview/assets/runtime-Cx4f2UTl.js +0 -1
- package/dist/preview/assets/runtime-D1dESjXR.js +0 -1
- package/dist/preview/assets/runtime-DIEP1Xbh.js +0 -1
- package/dist/preview/assets/runtime-DKceWuBx.js +0 -1
- package/dist/preview/assets/runtime-Dhid9O5c.js +0 -1
- package/dist/preview/assets/runtime-YMiqi6WY.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as s}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";import{d as c,aq as o,aE as i,e as r,u as f,ap as u,o as p}from"./index-x-77enex.js";const g=c({name:"ShwfedEventDispatchActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const n=e,t=u(),a=o(()=>i(t,n.config.triggers));return(m,d)=>(p(),r(s,{"action-id":e.buttonId,effect:f(a)},null,8,["action-id","effect"]))}});export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as i,aq as f,as as r,au as u,e as d,u as m,al as l,am as p,ao as _,o as g}from"./index-x-77enex.js";import{_ as h}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";const B=i({name:"ShwfedNavigationActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const t=e,o=_(),c=(n,a)=>l(n,{...p(o),...a}),s=f(()=>r(c(t.config.url),n=>u(()=>{window.open(n,t.config.mode)})));return(n,a)=>(g(),d(h,{"action-id":e.buttonId,effect:m(s)},null,8,["action-id","effect"]))}});export{B as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as u,ae as i,e as l,u as p,$ as m,o as d,k as f,ah as _,ai as k,al as w,am as x,ao as g}from"./index-x-77enex.js";const B=u({name:"ShwfedMarkdownItemRuntime",__name:"runtime",props:{config:{}},setup(n){const o=n,{locale:s}=i(),t=g(),c=(e,a)=>w(e,{...x(t),...a}),r=m(()=>{const e=_(o.config.content,s.value)??"";return k(e,c)});return(e,a)=>(d(),l(p(f),{"data-slot":"buttons-markdown",source:r.value,class:"prose prose-sm prose-zinc px-1"},null,8,["source"]))}});export{B as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as s,ae as p,av as x,af as M,ah as c,aw as T,ax as N,e as b,w as d,u,a0 as k,a1 as w,ap as L,au as S,o as A,f as I,ay as z,g as f,az as F,aA as H,a7 as V,ao as $,aB as r,aC as m,aD as j}from"./index-x-77enex.js";import{_ as K}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";const D=s({name:"ShwfedModalLayoutActionRuntime",__name:"runtime",props:{buttonId:{},config:{},buttonTitle:{}},setup(t){const n=t,{locale:l}=p(),v=e=>{},h=$(),i=w(r,void 0),g=L(),o=k(null),C=x(n.buttonId,{close:()=>S(()=>{o.value?.()})},g),y=s({name:"ModalBoundaryBridge",setup(e,{slots:a}){return H(h),m(j,C),i&&m(r,i),()=>a.default?.()}}),E=(e,a)=>V()?.(e,a),_=M(function*(){const e=c(n.config.modalTitle,l.value)??c(n.buttonTitle,l.value)??"",{modal:a,close:B}=yield*T({title:e,width:n.config.modalWidth});o.value=()=>N(B()),yield*a,o.value=null});return(e,a)=>(A(),b(K,{"action-id":t.buttonId,effect:u(_)},{default:d(()=>[I("div",{style:z(t.config.modalMinHeight?`min-height: ${t.config.modalMinHeight}`:void 0)},[f(u(y),null,{default:d(()=>[f(F,{"slot-value":t.config.slot,configure:v,"find-entry":E},null,8,["slot-value"])]),_:1})],4)]),_:1},8,["action-id","effect"]))}});export{D as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as l,ae as u,af as g,ag as m,ah as d,ai as p,aj as x,ak as k,e as E,u as _,al as h,am as w,an as C,ao as I,ap as j,o as v}from"./index-x-77enex.js";import{_ as y}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";const q=l({name:"ShwfedHttpRequestConfirmActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(s){const e=s,{locale:c}=u(),i=I(),t=(n,o)=>h(n,{...w(i),...o}),r=j(),a=C(),f=g(function*(){if(a&&!(yield*m(()=>a())))return;const n=d(e.config.markdown,c.value)??"",o=p(n,t);(yield*x({content:o,icon:e.config.icon,color:e.config.color}))||(yield*k(e.config.expression,t,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:r,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}}))});return(n,o)=>(v(),E(y,{"action-id":s.buttonId,effect:_(f)},null,8,["action-id","effect"]))}});export{q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as o}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";import{d as n,e as a,u as c,o as f,at as i}from"./index-x-77enex.js";const _=n({name:"ShwfedPrototypeActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const e=i;return(r,s)=>(f(),a(o,{"action-id":t.buttonId,effect:c(e)},null,8,["action-id","effect"]))}});export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as l,aH as g,aq as A,as as y,aE as _,e as h,u as S,al as b,am as j,ap as k,aI as C,o as B,ao as E}from"./index-x-77enex.js";import{_ as I}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";const F=l({name:"ShwfedStateWriteActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(r){const s=r,i=E(),f=(e,t)=>b(e,{...j(i),...t}),n=g(),o=n.kind==="form"&&n.parent?n.parent:n,u=k(),m=C((e,t,a)=>{if(Array.isArray(e[t])&&Array.isArray(a))return e[t]=a,!0});function c(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function p(e,t){return c(e)&&c(t)?m({...t},e):t}const d=A(()=>y(f(s.config.expression),e=>{for(const t of Object.keys(e)){const a=p(o.getAt(t),e[t]);o.setAt(t,a)}return _(u,s.config.onSuccess)}));return(e,t)=>(B(),h(I,{"action-id":r.buttonId,effect:S(d)},null,8,["action-id","effect"]))}});export{F as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as E,aq as _,af as S,au as r,aE as m,aF as j,aG as v,e as x,u as B,al as L,am as b,ap as k,ao as C,o as R}from"./index-x-77enex.js";import{_ as T}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";const O=E({name:"ShwfedHttpDownloadActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(d){const c=d,g=C(),t=(e,n)=>L(e,{...b(g),...n}),l=k(),p=new Set(["success","error","warning","info"]);function f(e){const n=URL.createObjectURL(e),o=document.createElement("a");o.href=n,o.download=e.name,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(n)}const y=_(()=>S(function*(){const{template:e,messageExpression:n,resultExpression:o}=c.config,u=yield*t(e.request);if(!e.download){const s=yield*u.file();return yield*r(()=>f(s)),yield*m(l,c.config.onSuccess)}const a={json:yield*u.json()},i=o===void 0?"success":yield*j(t(o,a),s=>p.has(s)?s:"success");if(n!==void 0){const s=yield*t(n,a);yield*r(()=>v[i](s))}if(i==="success"||i==="info"){const h=yield*(yield*t(e.download,a)).file();yield*r(()=>f(h))}const w={success:c.config.onSuccess,warning:c.config.onWarning,error:c.config.onError,info:c.config.onInfo};return yield*m(l,w[i])}));return(e,n)=>(R(),x(T,{"action-id":d.buttonId,effect:B(y)},null,8,["action-id","effect"]))}});export{O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as u,aq as p,ag as g,ar as a,as as m,ak as l,e as d,u as x,al as E,am as _,an as h,ao as C,ap as k,o as q}from"./index-x-77enex.js";import{_ as v}from"./definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js";const R=u({name:"ShwfedHttpRequestActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(o){const e=o,c=C(),i=(n,s)=>E(n,{..._(c),...s}),r=k(),t=h(),f=p(()=>{const n=t?g(()=>t()):a(!0);return m(n,s=>s?l(e.config.expression,i,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:r,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}}):a(void 0))});return(n,s)=>(q(),d(v,{"action-id":o.buttonId,effect:x(f)},null,8,["action-id","effect"]))}});export{R as default};
|
package/dist/preview/index.html
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
`--primary`, the primary button variant renders as transparent. */
|
|
11
11
|
body { --primary: #009689; }
|
|
12
12
|
</style>
|
|
13
|
-
<script type="module" crossorigin src="./assets/index-
|
|
14
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
13
|
+
<script type="module" crossorigin src="./assets/index-x-77enex.js"></script>
|
|
14
|
+
<link rel="stylesheet" crossorigin href="./assets/index-7MVXgV5n.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="app"></div>
|
|
@@ -3,6 +3,7 @@ import { Effect } from "effect";
|
|
|
3
3
|
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
4
4
|
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
5
5
|
import { useEventChannel } from "../../../../../share/event-bus";
|
|
6
|
+
import { useFormValidate } from "../../../../../share/form-validate";
|
|
6
7
|
import ShwfedActionDefinition from "../../../components/definition.vue";
|
|
7
8
|
import { executeHttpRequest } from "../../../utils/resolve";
|
|
8
9
|
defineOptions({ name: "ShwfedHttpRequestActionRuntime" });
|
|
@@ -13,8 +14,10 @@ const props = defineProps({
|
|
|
13
14
|
const inherited = injectCELContext();
|
|
14
15
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
15
16
|
const channel = useEventChannel();
|
|
16
|
-
const
|
|
17
|
-
|
|
17
|
+
const validateForm = useFormValidate();
|
|
18
|
+
const effect = Effect.suspend(() => {
|
|
19
|
+
const gate = validateForm ? Effect.promise(() => validateForm()) : Effect.succeed(true);
|
|
20
|
+
return Effect.flatMap(gate, (ok) => ok ? executeHttpRequest(props.config.expression, $cel, {
|
|
18
21
|
messageExpression: props.config.messageExpression,
|
|
19
22
|
resultExpression: props.config.resultExpression,
|
|
20
23
|
channel,
|
|
@@ -24,8 +27,8 @@ const effect = Effect.suspend(
|
|
|
24
27
|
error: props.config.onError,
|
|
25
28
|
info: props.config.onInfo
|
|
26
29
|
}
|
|
27
|
-
})
|
|
28
|
-
);
|
|
30
|
+
}) : Effect.succeed(void 0));
|
|
31
|
+
});
|
|
29
32
|
</script>
|
|
30
33
|
|
|
31
34
|
<template>
|
|
@@ -6,6 +6,7 @@ import { reject } from "../../../../../composables/useOverlay";
|
|
|
6
6
|
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
7
7
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
8
8
|
import { useEventChannel } from "../../../../../share/event-bus";
|
|
9
|
+
import { useFormValidate } from "../../../../../share/form-validate";
|
|
9
10
|
import ShwfedActionDefinition from "../../../components/definition.vue";
|
|
10
11
|
import { executeHttpRequest, interpolateMarkdown } from "../../../utils/resolve";
|
|
11
12
|
defineOptions({ name: "ShwfedHttpRequestConfirmActionRuntime" });
|
|
@@ -17,7 +18,12 @@ const { locale } = useI18n();
|
|
|
17
18
|
const inherited = injectCELContext();
|
|
18
19
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
19
20
|
const channel = useEventChannel();
|
|
21
|
+
const validateForm = useFormValidate();
|
|
20
22
|
const effect = Effect.gen(function* () {
|
|
23
|
+
if (validateForm) {
|
|
24
|
+
const ok = yield* Effect.promise(() => validateForm());
|
|
25
|
+
if (!ok) return;
|
|
26
|
+
}
|
|
21
27
|
const raw = getLocalizedText(props.config.markdown, locale.value) ?? "";
|
|
22
28
|
const content = interpolateMarkdown(raw, $cel);
|
|
23
29
|
if (yield* reject({ content, icon: props.config.icon, color: props.config.color })) return;
|
|
@@ -217,9 +217,9 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
|
|
|
217
217
|
default: () => never[];
|
|
218
218
|
}>;
|
|
219
219
|
dataSource: Schema.optional<Schema.Struct<{
|
|
220
|
-
total: Schema.optional<Schema.Schema<string, string, never>>;
|
|
221
220
|
request: Schema.optional<Schema.Schema<string, string, never>>;
|
|
222
221
|
data: Schema.Schema<string, string, never>;
|
|
222
|
+
total: Schema.optional<Schema.Schema<string, string, never>>;
|
|
223
223
|
}>>;
|
|
224
224
|
actions: Schema.optional<Schema.Struct<{
|
|
225
225
|
size: Schema.optionalWith<Schema.Literal<["default", "sm", "xs"]>, {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LocaleValue } from '../../share/locale.js';
|
|
2
|
+
type Rule = {
|
|
3
|
+
when: string;
|
|
4
|
+
warning?: boolean;
|
|
5
|
+
message: LocaleValue;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
modelValue?: ReadonlyArray<Rule>;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (rules: readonly Rule[]) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((rules: readonly Rule[]) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref, watch } from "vue";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import {
|
|
5
|
+
useTreeDnd
|
|
6
|
+
} from "../../composables/useTreeDnd";
|
|
7
|
+
import { Button } from "../ui/button";
|
|
8
|
+
import { ExpressionEditor } from "../ui/expression-editor";
|
|
9
|
+
import { Field, FieldLabel } from "../ui/field";
|
|
10
|
+
import { Switch } from "../ui/switch";
|
|
11
|
+
import { Locale as LocaleField } from "../ui/locale";
|
|
12
|
+
import { Markdown } from "../ui/markdown";
|
|
13
|
+
import { getStructFieldDescription, getStructFieldTitle } from "./utils/schema-meta";
|
|
14
|
+
import { validationRuleStruct } from "./utils/common";
|
|
15
|
+
defineOptions({ name: "ShwfedValidationRulesField" });
|
|
16
|
+
const RULE_META = validationRuleStruct(() => {
|
|
17
|
+
});
|
|
18
|
+
const whenTitle = getStructFieldTitle(RULE_META, "when") ?? "\u6821\u9A8C\u6761\u4EF6";
|
|
19
|
+
const whenDescription = getStructFieldDescription(RULE_META, "when");
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
modelValue: { type: Array, required: false }
|
|
22
|
+
});
|
|
23
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
24
|
+
const rules = computed(() => props.modelValue ?? []);
|
|
25
|
+
const EMPTY_MESSAGE = [{ locale: "zh", message: "" }];
|
|
26
|
+
function makeId() {
|
|
27
|
+
if (typeof crypto !== "undefined" && "randomUUID" in crypto) return crypto.randomUUID();
|
|
28
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
29
|
+
const r = Math.random() * 16 | 0;
|
|
30
|
+
return (c === "x" ? r : r & 3 | 8).toString(16);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
const rowKeys = ref([]);
|
|
34
|
+
watch(
|
|
35
|
+
() => rules.value.length,
|
|
36
|
+
(len) => {
|
|
37
|
+
if (len === rowKeys.value.length) return;
|
|
38
|
+
rowKeys.value = Array.from({ length: len }, () => makeId());
|
|
39
|
+
},
|
|
40
|
+
{ immediate: true }
|
|
41
|
+
);
|
|
42
|
+
function addRule() {
|
|
43
|
+
emit("update:modelValue", [...rules.value, { when: "", message: EMPTY_MESSAGE }]);
|
|
44
|
+
rowKeys.value = [...rowKeys.value, makeId()];
|
|
45
|
+
}
|
|
46
|
+
function removeRule(index) {
|
|
47
|
+
emit("update:modelValue", rules.value.filter((_, i) => i !== index));
|
|
48
|
+
rowKeys.value = rowKeys.value.filter((_, i) => i !== index);
|
|
49
|
+
}
|
|
50
|
+
function updateWhen(index, when) {
|
|
51
|
+
emit("update:modelValue", rules.value.map((rule, i) => i === index ? { ...rule, when } : rule));
|
|
52
|
+
}
|
|
53
|
+
function updateWarning(index, warning) {
|
|
54
|
+
emit("update:modelValue", rules.value.map((rule, i) => i === index ? { ...rule, warning } : rule));
|
|
55
|
+
}
|
|
56
|
+
function updateMessage(index, message) {
|
|
57
|
+
emit("update:modelValue", rules.value.map((rule, i) => i === index ? { ...rule, message } : rule));
|
|
58
|
+
}
|
|
59
|
+
function move(from, to) {
|
|
60
|
+
if (from === to) return;
|
|
61
|
+
if (from < 0 || to < 0 || from >= rules.value.length || to >= rules.value.length) return;
|
|
62
|
+
const next = [...rules.value];
|
|
63
|
+
const [rule] = next.splice(from, 1);
|
|
64
|
+
if (!rule) return;
|
|
65
|
+
next.splice(to, 0, rule);
|
|
66
|
+
emit("update:modelValue", next);
|
|
67
|
+
const keys = [...rowKeys.value];
|
|
68
|
+
const [key] = keys.splice(from, 1);
|
|
69
|
+
if (!key) return;
|
|
70
|
+
keys.splice(to, 0, key);
|
|
71
|
+
rowKeys.value = keys;
|
|
72
|
+
}
|
|
73
|
+
const ROW_KIND = "shwfed-validation-rule";
|
|
74
|
+
const rowId = (i) => rowKeys.value[i] ?? `idx-${i}`;
|
|
75
|
+
function onRowDrop(e) {
|
|
76
|
+
if (e.source.kind !== ROW_KIND || e.target.kind !== ROW_KIND) return;
|
|
77
|
+
const from = rowKeys.value.findIndex((k) => k === e.source.id);
|
|
78
|
+
const to = rowKeys.value.findIndex((k) => k === e.target.id);
|
|
79
|
+
if (from < 0 || to < 0) return;
|
|
80
|
+
if (e.instruction === "reorder-above") move(from, from < to ? to - 1 : to);
|
|
81
|
+
else if (e.instruction === "reorder-below") move(from, from <= to ? to : to + 1);
|
|
82
|
+
}
|
|
83
|
+
const dnd = useTreeDnd({ onRowDrop });
|
|
84
|
+
const pickDragHandle = (el) => el.querySelector(".drag-handle");
|
|
85
|
+
function rowConfig(i) {
|
|
86
|
+
return {
|
|
87
|
+
kind: ROW_KIND,
|
|
88
|
+
canDrop: (src) => src.kind === ROW_KIND,
|
|
89
|
+
blockInstructions: (src) => {
|
|
90
|
+
const block = ["make-child", "reparent"];
|
|
91
|
+
if (src.id === rowId(i)) block.push("reorder-above", "reorder-below");
|
|
92
|
+
return block;
|
|
93
|
+
},
|
|
94
|
+
dragHandle: pickDragHandle
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
</script>
|
|
98
|
+
|
|
99
|
+
<template>
|
|
100
|
+
<div class="flex flex-col gap-2">
|
|
101
|
+
<div
|
|
102
|
+
v-for="(rule, index) in rules"
|
|
103
|
+
:key="rowKeys[index]"
|
|
104
|
+
:ref="dnd.rowRef(rowId(index), rowConfig(index))"
|
|
105
|
+
data-slot="validation-rule"
|
|
106
|
+
class="relative flex items-start gap-2 rounded border border-zinc-200 bg-zinc-50/40 p-2"
|
|
107
|
+
:data-instruction="dnd.instructionFor(rowId(index)) ?? void 0"
|
|
108
|
+
>
|
|
109
|
+
<Icon
|
|
110
|
+
icon="fluent:re-order-dots-vertical-20-regular"
|
|
111
|
+
class="drag-handle mt-2.5 size-4 shrink-0 cursor-grab text-zinc-400"
|
|
112
|
+
data-slot="validation-rule-drag-handle"
|
|
113
|
+
/>
|
|
114
|
+
|
|
115
|
+
<!--
|
|
116
|
+
`items-start` keeps each Field at its own content height — without it the
|
|
117
|
+
grid stretches both cells to the taller (multi-row message) and the
|
|
118
|
+
floating label centers on that inflated height instead of its control.
|
|
119
|
+
With the natural height restored, the standard floating behaviour is
|
|
120
|
+
what we want: the label rests centered (acting as the placeholder) while
|
|
121
|
+
the field is empty + inactive, and floats up to the top-border notch on
|
|
122
|
+
focus or once a value is present. The `when` editor therefore carries no
|
|
123
|
+
explicit placeholder — the label IS the placeholder (the syntax contract
|
|
124
|
+
lives in its tooltip); a separate placeholder would sit under the
|
|
125
|
+
resting label and double up.
|
|
126
|
+
-->
|
|
127
|
+
<div class="grid min-w-0 flex-1 grid-cols-2 items-start gap-2">
|
|
128
|
+
<Field orientation="floating">
|
|
129
|
+
<FieldLabel>
|
|
130
|
+
<template
|
|
131
|
+
v-if="whenDescription"
|
|
132
|
+
#tooltip
|
|
133
|
+
>
|
|
134
|
+
<Markdown
|
|
135
|
+
:source="whenDescription"
|
|
136
|
+
block
|
|
137
|
+
class="prose prose-sm prose-zinc"
|
|
138
|
+
/>
|
|
139
|
+
</template>
|
|
140
|
+
{{ whenTitle }}
|
|
141
|
+
</FieldLabel>
|
|
142
|
+
<ExpressionEditor
|
|
143
|
+
:model-value="rule.when"
|
|
144
|
+
result-type="bool"
|
|
145
|
+
class="min-h-10"
|
|
146
|
+
@update:model-value="(v) => updateWhen(index, v)"
|
|
147
|
+
/>
|
|
148
|
+
</Field>
|
|
149
|
+
|
|
150
|
+
<!--
|
|
151
|
+
The message is a multi-row Locale — one row per language — so a single
|
|
152
|
+
shared label can't center over the stack. `floating` gives each row
|
|
153
|
+
its own per-language floating label instead; the "消息" semantic is
|
|
154
|
+
carried by the column position opposite 校验条件.
|
|
155
|
+
-->
|
|
156
|
+
<LocaleField
|
|
157
|
+
floating
|
|
158
|
+
markdown
|
|
159
|
+
translate-hint="form field validation message"
|
|
160
|
+
:model-value="rule.message"
|
|
161
|
+
@update:model-value="(v) => updateMessage(index, v)"
|
|
162
|
+
/>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<!--
|
|
166
|
+
Severity switch — off (default) is error (blocks submit, reds the
|
|
167
|
+
field), on is warning (yellow hint, never blocks). Stacked label keeps
|
|
168
|
+
it self-describing in the narrow action column.
|
|
169
|
+
-->
|
|
170
|
+
<label
|
|
171
|
+
class="mt-1 flex shrink-0 cursor-pointer flex-col items-center gap-1 text-xs text-zinc-600 select-none"
|
|
172
|
+
data-slot="validation-rule-severity"
|
|
173
|
+
>
|
|
174
|
+
<Switch
|
|
175
|
+
size="sm"
|
|
176
|
+
:model-value="rule.warning ?? false"
|
|
177
|
+
@update:model-value="(v) => updateWarning(index, v)"
|
|
178
|
+
/>
|
|
179
|
+
仅警告
|
|
180
|
+
</label>
|
|
181
|
+
|
|
182
|
+
<Button
|
|
183
|
+
variant="ghost"
|
|
184
|
+
size="sm"
|
|
185
|
+
class="mt-1.5 text-red-600 hover:text-red-700"
|
|
186
|
+
aria-label="移除"
|
|
187
|
+
@click="removeRule(index)"
|
|
188
|
+
>
|
|
189
|
+
<Icon icon="fluent:delete-20-regular" />
|
|
190
|
+
</Button>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
<Button
|
|
194
|
+
type="button"
|
|
195
|
+
data-slot="validation-add"
|
|
196
|
+
class="w-full justify-center"
|
|
197
|
+
@click="addRule"
|
|
198
|
+
>
|
|
199
|
+
<Icon icon="fluent:add-20-regular" />
|
|
200
|
+
<span>添加校验规则</span>
|
|
201
|
+
</Button>
|
|
202
|
+
</div>
|
|
203
|
+
</template>
|
|
204
|
+
|
|
205
|
+
<style scoped>
|
|
206
|
+
[data-instruction=reorder-above]:before,[data-instruction=reorder-below]:after{background:var(--primary,#2563eb);content:"";height:2px;left:0;pointer-events:none;position:absolute;right:0;z-index:1}[data-instruction=reorder-above]:before{top:-5px}[data-instruction=reorder-below]:after{bottom:-5px}
|
|
207
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LocaleValue } from '../../share/locale.js';
|
|
2
|
+
type Rule = {
|
|
3
|
+
when: string;
|
|
4
|
+
warning?: boolean;
|
|
5
|
+
message: LocaleValue;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
modelValue?: ReadonlyArray<Rule>;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (rules: readonly Rule[]) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((rules: readonly Rule[]) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -14,8 +14,20 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
14
14
|
readonly locale: "en" | "ja" | "ko";
|
|
15
15
|
readonly message: string;
|
|
16
16
|
}[]];
|
|
17
|
+
readonly required?: string | undefined;
|
|
17
18
|
readonly displayName?: string | undefined;
|
|
18
19
|
readonly compatibilityDate: "2026-04-22";
|
|
20
|
+
readonly validations?: readonly {
|
|
21
|
+
readonly message: readonly [{
|
|
22
|
+
readonly locale: "zh";
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}, ...{
|
|
25
|
+
readonly locale: "en" | "ja" | "ko";
|
|
26
|
+
readonly message: string;
|
|
27
|
+
}[]];
|
|
28
|
+
readonly warning?: boolean | undefined;
|
|
29
|
+
readonly when: string;
|
|
30
|
+
}[] | undefined;
|
|
19
31
|
}) => any;
|
|
20
32
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
21
33
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -29,8 +41,20 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
29
41
|
readonly locale: "en" | "ja" | "ko";
|
|
30
42
|
readonly message: string;
|
|
31
43
|
}[]];
|
|
44
|
+
readonly required?: string | undefined;
|
|
32
45
|
readonly displayName?: string | undefined;
|
|
33
46
|
readonly compatibilityDate: "2026-04-22";
|
|
47
|
+
readonly validations?: readonly {
|
|
48
|
+
readonly message: readonly [{
|
|
49
|
+
readonly locale: "zh";
|
|
50
|
+
readonly message: string;
|
|
51
|
+
}, ...{
|
|
52
|
+
readonly locale: "en" | "ja" | "ko";
|
|
53
|
+
readonly message: string;
|
|
54
|
+
}[]];
|
|
55
|
+
readonly warning?: boolean | undefined;
|
|
56
|
+
readonly when: string;
|
|
57
|
+
}[] | undefined;
|
|
34
58
|
}) => any) | undefined;
|
|
35
59
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
60
|
declare const _default: typeof __VLS_export;
|
|
@@ -14,8 +14,20 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
14
14
|
readonly locale: "en" | "ja" | "ko";
|
|
15
15
|
readonly message: string;
|
|
16
16
|
}[]];
|
|
17
|
+
readonly required?: string | undefined;
|
|
17
18
|
readonly displayName?: string | undefined;
|
|
18
19
|
readonly compatibilityDate: "2026-04-22";
|
|
20
|
+
readonly validations?: readonly {
|
|
21
|
+
readonly message: readonly [{
|
|
22
|
+
readonly locale: "zh";
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}, ...{
|
|
25
|
+
readonly locale: "en" | "ja" | "ko";
|
|
26
|
+
readonly message: string;
|
|
27
|
+
}[]];
|
|
28
|
+
readonly warning?: boolean | undefined;
|
|
29
|
+
readonly when: string;
|
|
30
|
+
}[] | undefined;
|
|
19
31
|
}) => any;
|
|
20
32
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
21
33
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -29,8 +41,20 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
29
41
|
readonly locale: "en" | "ja" | "ko";
|
|
30
42
|
readonly message: string;
|
|
31
43
|
}[]];
|
|
44
|
+
readonly required?: string | undefined;
|
|
32
45
|
readonly displayName?: string | undefined;
|
|
33
46
|
readonly compatibilityDate: "2026-04-22";
|
|
47
|
+
readonly validations?: readonly {
|
|
48
|
+
readonly message: readonly [{
|
|
49
|
+
readonly locale: "zh";
|
|
50
|
+
readonly message: string;
|
|
51
|
+
}, ...{
|
|
52
|
+
readonly locale: "en" | "ja" | "ko";
|
|
53
|
+
readonly message: string;
|
|
54
|
+
}[]];
|
|
55
|
+
readonly warning?: boolean | undefined;
|
|
56
|
+
readonly when: string;
|
|
57
|
+
}[] | undefined;
|
|
34
58
|
}) => any) | undefined;
|
|
35
59
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
60
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts
CHANGED
|
@@ -27,6 +27,24 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
27
27
|
id: Schema.refine<string, typeof Schema.String>;
|
|
28
28
|
displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
29
29
|
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
|
30
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
31
|
+
validations: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
32
|
+
when: Schema.Schema<string, string, never>;
|
|
33
|
+
warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
34
|
+
message: Schema.refine<readonly [{
|
|
35
|
+
readonly locale: "zh";
|
|
36
|
+
readonly message: string;
|
|
37
|
+
}, ...{
|
|
38
|
+
readonly locale: "en" | "ja" | "ko";
|
|
39
|
+
readonly message: string;
|
|
40
|
+
}[]], Schema.TupleType<readonly [Schema.Struct<{
|
|
41
|
+
locale: Schema.Literal<["zh"]>;
|
|
42
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
43
|
+
}>], [Schema.Struct<{
|
|
44
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
45
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
46
|
+
}>]>>;
|
|
47
|
+
}>>>;
|
|
30
48
|
type: Schema.Literal<["com.shwfed.form.field.markdown"]>;
|
|
31
49
|
compatibilityDate: Schema.Literal<["2026-04-22"]>;
|
|
32
50
|
}>;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts
CHANGED
|
@@ -22,6 +22,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
22
22
|
readonly locale: "en" | "ja" | "ko";
|
|
23
23
|
readonly message: string;
|
|
24
24
|
}[]] | undefined;
|
|
25
|
+
readonly required?: string | undefined;
|
|
25
26
|
readonly displayName?: string | undefined;
|
|
26
27
|
readonly compatibilityDate: "2026-04-22";
|
|
27
28
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -38,6 +39,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
38
39
|
readonly mode: "formula" | "prefill";
|
|
39
40
|
readonly expression: string;
|
|
40
41
|
} | undefined;
|
|
42
|
+
readonly validations?: readonly {
|
|
43
|
+
readonly message: readonly [{
|
|
44
|
+
readonly locale: "zh";
|
|
45
|
+
readonly message: string;
|
|
46
|
+
}, ...{
|
|
47
|
+
readonly locale: "en" | "ja" | "ko";
|
|
48
|
+
readonly message: string;
|
|
49
|
+
}[]];
|
|
50
|
+
readonly warning?: boolean | undefined;
|
|
51
|
+
readonly when: string;
|
|
52
|
+
}[] | undefined;
|
|
41
53
|
}) => any;
|
|
42
54
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
43
55
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -59,6 +71,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
59
71
|
readonly locale: "en" | "ja" | "ko";
|
|
60
72
|
readonly message: string;
|
|
61
73
|
}[]] | undefined;
|
|
74
|
+
readonly required?: string | undefined;
|
|
62
75
|
readonly displayName?: string | undefined;
|
|
63
76
|
readonly compatibilityDate: "2026-04-22";
|
|
64
77
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -75,6 +88,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
75
88
|
readonly mode: "formula" | "prefill";
|
|
76
89
|
readonly expression: string;
|
|
77
90
|
} | undefined;
|
|
91
|
+
readonly validations?: readonly {
|
|
92
|
+
readonly message: readonly [{
|
|
93
|
+
readonly locale: "zh";
|
|
94
|
+
readonly message: string;
|
|
95
|
+
}, ...{
|
|
96
|
+
readonly locale: "en" | "ja" | "ko";
|
|
97
|
+
readonly message: string;
|
|
98
|
+
}[]];
|
|
99
|
+
readonly warning?: boolean | undefined;
|
|
100
|
+
readonly when: string;
|
|
101
|
+
}[] | undefined;
|
|
78
102
|
}) => any) | undefined;
|
|
79
103
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
80
104
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue
CHANGED
|
@@ -3,6 +3,7 @@ import { computed } from "vue";
|
|
|
3
3
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
5
|
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
6
|
+
import ValidationRulesField from "../../../ValidationRulesField.vue";
|
|
6
7
|
import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
|
|
7
8
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
8
9
|
import { Markdown } from "../../../../ui/markdown";
|
|
@@ -185,6 +186,26 @@ const pathText = computed({
|
|
|
185
186
|
</div>
|
|
186
187
|
|
|
187
188
|
<div class="grid grid-cols-3 gap-3">
|
|
189
|
+
<Field orientation="vertical">
|
|
190
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
191
|
+
<template #tooltip>
|
|
192
|
+
<Markdown
|
|
193
|
+
:source="fieldDescription('required') ?? '\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A'"
|
|
194
|
+
block
|
|
195
|
+
class="prose prose-sm prose-zinc"
|
|
196
|
+
/>
|
|
197
|
+
</template>
|
|
198
|
+
{{ fieldTitle("required") }}
|
|
199
|
+
</FieldLabel>
|
|
200
|
+
<ExpressionEditor
|
|
201
|
+
:model-value="value.required ?? ''"
|
|
202
|
+
placeholder="例:form.type == 'company'"
|
|
203
|
+
result-type="bool"
|
|
204
|
+
class="min-h-10"
|
|
205
|
+
@update:model-value="(v) => value = { ...value, required: v.length > 0 ? v : void 0 }"
|
|
206
|
+
/>
|
|
207
|
+
</Field>
|
|
208
|
+
|
|
188
209
|
<Field orientation="vertical">
|
|
189
210
|
<FieldLabel class="text-xs text-zinc-500">
|
|
190
211
|
<template #tooltip>
|
|
@@ -264,5 +285,22 @@ const pathText = computed({
|
|
|
264
285
|
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
265
286
|
/>
|
|
266
287
|
</Field>
|
|
288
|
+
|
|
289
|
+
<Field orientation="vertical">
|
|
290
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
291
|
+
<template #tooltip>
|
|
292
|
+
<Markdown
|
|
293
|
+
:source="fieldDescription('validations')"
|
|
294
|
+
block
|
|
295
|
+
class="prose prose-sm prose-zinc"
|
|
296
|
+
/>
|
|
297
|
+
</template>
|
|
298
|
+
{{ fieldTitle("validations") }}
|
|
299
|
+
</FieldLabel>
|
|
300
|
+
<ValidationRulesField
|
|
301
|
+
:model-value="value.validations"
|
|
302
|
+
@update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
|
|
303
|
+
/>
|
|
304
|
+
</Field>
|
|
267
305
|
</div>
|
|
268
306
|
</template>
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
22
22
|
readonly locale: "en" | "ja" | "ko";
|
|
23
23
|
readonly message: string;
|
|
24
24
|
}[]] | undefined;
|
|
25
|
+
readonly required?: string | undefined;
|
|
25
26
|
readonly displayName?: string | undefined;
|
|
26
27
|
readonly compatibilityDate: "2026-04-22";
|
|
27
28
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -38,6 +39,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
38
39
|
readonly mode: "formula" | "prefill";
|
|
39
40
|
readonly expression: string;
|
|
40
41
|
} | undefined;
|
|
42
|
+
readonly validations?: readonly {
|
|
43
|
+
readonly message: readonly [{
|
|
44
|
+
readonly locale: "zh";
|
|
45
|
+
readonly message: string;
|
|
46
|
+
}, ...{
|
|
47
|
+
readonly locale: "en" | "ja" | "ko";
|
|
48
|
+
readonly message: string;
|
|
49
|
+
}[]];
|
|
50
|
+
readonly warning?: boolean | undefined;
|
|
51
|
+
readonly when: string;
|
|
52
|
+
}[] | undefined;
|
|
41
53
|
}) => any;
|
|
42
54
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
43
55
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -59,6 +71,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
59
71
|
readonly locale: "en" | "ja" | "ko";
|
|
60
72
|
readonly message: string;
|
|
61
73
|
}[]] | undefined;
|
|
74
|
+
readonly required?: string | undefined;
|
|
62
75
|
readonly displayName?: string | undefined;
|
|
63
76
|
readonly compatibilityDate: "2026-04-22";
|
|
64
77
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -75,6 +88,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
75
88
|
readonly mode: "formula" | "prefill";
|
|
76
89
|
readonly expression: string;
|
|
77
90
|
} | undefined;
|
|
91
|
+
readonly validations?: readonly {
|
|
92
|
+
readonly message: readonly [{
|
|
93
|
+
readonly locale: "zh";
|
|
94
|
+
readonly message: string;
|
|
95
|
+
}, ...{
|
|
96
|
+
readonly locale: "en" | "ja" | "ko";
|
|
97
|
+
readonly message: string;
|
|
98
|
+
}[]];
|
|
99
|
+
readonly warning?: boolean | undefined;
|
|
100
|
+
readonly when: string;
|
|
101
|
+
}[] | undefined;
|
|
78
102
|
}) => any) | undefined;
|
|
79
103
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
80
104
|
declare const _default: typeof __VLS_export;
|