@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
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue
CHANGED
|
@@ -5,6 +5,7 @@ import { format as formatDate } from "date-fns";
|
|
|
5
5
|
import { Button } from "../../../../ui/button";
|
|
6
6
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
7
7
|
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
8
|
+
import ValidationRulesField from "../../../ValidationRulesField.vue";
|
|
8
9
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
9
10
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText } from "../../../../ui/input-group";
|
|
10
11
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
@@ -410,6 +411,26 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
|
|
|
410
411
|
</Field>
|
|
411
412
|
|
|
412
413
|
<div class="grid grid-cols-3 gap-3">
|
|
414
|
+
<Field orientation="vertical">
|
|
415
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
416
|
+
<template #tooltip>
|
|
417
|
+
<Markdown
|
|
418
|
+
:source="fieldDescription('required') ?? '\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A'"
|
|
419
|
+
block
|
|
420
|
+
class="prose prose-sm prose-zinc"
|
|
421
|
+
/>
|
|
422
|
+
</template>
|
|
423
|
+
{{ fieldTitle("required") }}
|
|
424
|
+
</FieldLabel>
|
|
425
|
+
<ExpressionEditor
|
|
426
|
+
:model-value="value.required ?? ''"
|
|
427
|
+
placeholder="例:form.type == 'company'"
|
|
428
|
+
result-type="bool"
|
|
429
|
+
class="min-h-10"
|
|
430
|
+
@update:model-value="(v) => value = { ...value, required: v.length > 0 ? v : void 0 }"
|
|
431
|
+
/>
|
|
432
|
+
</Field>
|
|
433
|
+
|
|
413
434
|
<Field orientation="vertical">
|
|
414
435
|
<FieldLabel class="text-xs text-zinc-500">
|
|
415
436
|
<template #tooltip>
|
|
@@ -489,5 +510,22 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
|
|
|
489
510
|
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
490
511
|
/>
|
|
491
512
|
</Field>
|
|
513
|
+
|
|
514
|
+
<Field orientation="vertical">
|
|
515
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
516
|
+
<template #tooltip>
|
|
517
|
+
<Markdown
|
|
518
|
+
:source="fieldDescription('validations')"
|
|
519
|
+
block
|
|
520
|
+
class="prose prose-sm prose-zinc"
|
|
521
|
+
/>
|
|
522
|
+
</template>
|
|
523
|
+
{{ fieldTitle("validations") }}
|
|
524
|
+
</FieldLabel>
|
|
525
|
+
<ValidationRulesField
|
|
526
|
+
:model-value="value.validations"
|
|
527
|
+
@update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
|
|
528
|
+
/>
|
|
529
|
+
</Field>
|
|
492
530
|
</div>
|
|
493
531
|
</template>
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/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-27";
|
|
27
28
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -40,6 +41,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
40
41
|
} | undefined;
|
|
41
42
|
readonly format?: string | undefined;
|
|
42
43
|
readonly valueFormat?: string | undefined;
|
|
44
|
+
readonly validations?: readonly {
|
|
45
|
+
readonly message: readonly [{
|
|
46
|
+
readonly locale: "zh";
|
|
47
|
+
readonly message: string;
|
|
48
|
+
}, ...{
|
|
49
|
+
readonly locale: "en" | "ja" | "ko";
|
|
50
|
+
readonly message: string;
|
|
51
|
+
}[]];
|
|
52
|
+
readonly warning?: boolean | undefined;
|
|
53
|
+
readonly when: string;
|
|
54
|
+
}[] | undefined;
|
|
43
55
|
readonly presets?: readonly {
|
|
44
56
|
readonly label: readonly [{
|
|
45
57
|
readonly locale: "zh";
|
|
@@ -72,6 +84,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
72
84
|
readonly locale: "en" | "ja" | "ko";
|
|
73
85
|
readonly message: string;
|
|
74
86
|
}[]] | undefined;
|
|
87
|
+
readonly required?: string | undefined;
|
|
75
88
|
readonly displayName?: string | undefined;
|
|
76
89
|
readonly compatibilityDate: "2026-04-27";
|
|
77
90
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -90,6 +103,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
90
103
|
} | undefined;
|
|
91
104
|
readonly format?: string | undefined;
|
|
92
105
|
readonly valueFormat?: string | undefined;
|
|
106
|
+
readonly validations?: readonly {
|
|
107
|
+
readonly message: readonly [{
|
|
108
|
+
readonly locale: "zh";
|
|
109
|
+
readonly message: string;
|
|
110
|
+
}, ...{
|
|
111
|
+
readonly locale: "en" | "ja" | "ko";
|
|
112
|
+
readonly message: string;
|
|
113
|
+
}[]];
|
|
114
|
+
readonly warning?: boolean | undefined;
|
|
115
|
+
readonly when: string;
|
|
116
|
+
}[] | undefined;
|
|
93
117
|
readonly presets?: readonly {
|
|
94
118
|
readonly label: readonly [{
|
|
95
119
|
readonly locale: "zh";
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue
CHANGED
|
@@ -7,9 +7,10 @@ import { cel as _rawCel } from "../../../../../utils/cel";
|
|
|
7
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
|
-
import { Field, FieldLabel } from "../../../../ui/field";
|
|
10
|
+
import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
|
|
11
11
|
import { Markdown } from "../../../../ui/markdown";
|
|
12
12
|
import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
|
|
13
|
+
import { useFieldValidation } from "../../../utils/validation";
|
|
13
14
|
import { useFormReadonly } from "../../../utils/readonly";
|
|
14
15
|
import { useFormState } from "../../../utils/state";
|
|
15
16
|
defineOptions({ name: "ShwfedDateFieldRuntime" });
|
|
@@ -79,6 +80,12 @@ const model = computed({
|
|
|
79
80
|
setAt(path, next);
|
|
80
81
|
}
|
|
81
82
|
});
|
|
83
|
+
const { isRequired, errors, warnings, visible } = useFieldValidation({
|
|
84
|
+
fieldId: () => props.fieldId,
|
|
85
|
+
config: () => props.config,
|
|
86
|
+
$cel,
|
|
87
|
+
locale: () => locale.value
|
|
88
|
+
});
|
|
82
89
|
</script>
|
|
83
90
|
|
|
84
91
|
<template>
|
|
@@ -100,7 +107,11 @@ const model = computed({
|
|
|
100
107
|
class="prose prose-xs prose-zinc"
|
|
101
108
|
/>
|
|
102
109
|
</template>
|
|
103
|
-
{{ labelText }}
|
|
110
|
+
{{ labelText }}<span
|
|
111
|
+
v-if="isRequired"
|
|
112
|
+
aria-hidden="true"
|
|
113
|
+
class="text-red-600"
|
|
114
|
+
> *</span>
|
|
104
115
|
</FieldLabel>
|
|
105
116
|
<div
|
|
106
117
|
v-if="effectiveReadonly"
|
|
@@ -119,5 +130,10 @@ const model = computed({
|
|
|
119
130
|
:disabled="isDisabled"
|
|
120
131
|
:shortcuts="shortcuts"
|
|
121
132
|
/>
|
|
133
|
+
<FieldMessages
|
|
134
|
+
v-if="visible"
|
|
135
|
+
:errors="errors"
|
|
136
|
+
:warnings="warnings"
|
|
137
|
+
/>
|
|
122
138
|
</Field>
|
|
123
139
|
</template>
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts
CHANGED
|
@@ -73,6 +73,24 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
73
73
|
id: Schema.refine<string, typeof Schema.String>;
|
|
74
74
|
displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
75
75
|
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
|
76
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
77
|
+
validations: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
78
|
+
when: Schema.Schema<string, string, never>;
|
|
79
|
+
warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
80
|
+
message: Schema.refine<readonly [{
|
|
81
|
+
readonly locale: "zh";
|
|
82
|
+
readonly message: string;
|
|
83
|
+
}, ...{
|
|
84
|
+
readonly locale: "en" | "ja" | "ko";
|
|
85
|
+
readonly message: string;
|
|
86
|
+
}[]], Schema.TupleType<readonly [Schema.Struct<{
|
|
87
|
+
locale: Schema.Literal<["zh"]>;
|
|
88
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
89
|
+
}>], [Schema.Struct<{
|
|
90
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
91
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
92
|
+
}>]>>;
|
|
93
|
+
}>>>;
|
|
76
94
|
type: Schema.Literal<["com.shwfed.form.field.date"]>;
|
|
77
95
|
compatibilityDate: Schema.Literal<["2026-04-27"]>;
|
|
78
96
|
}>;
|
|
@@ -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-27";
|
|
27
28
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -49,6 +50,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
49
50
|
readonly locale: "en" | "ja" | "ko";
|
|
50
51
|
readonly message: string;
|
|
51
52
|
}[]] | undefined;
|
|
53
|
+
readonly validations?: readonly {
|
|
54
|
+
readonly message: readonly [{
|
|
55
|
+
readonly locale: "zh";
|
|
56
|
+
readonly message: string;
|
|
57
|
+
}, ...{
|
|
58
|
+
readonly locale: "en" | "ja" | "ko";
|
|
59
|
+
readonly message: string;
|
|
60
|
+
}[]];
|
|
61
|
+
readonly warning?: boolean | undefined;
|
|
62
|
+
readonly when: string;
|
|
63
|
+
}[] | undefined;
|
|
52
64
|
readonly presets?: readonly {
|
|
53
65
|
readonly label: readonly [{
|
|
54
66
|
readonly locale: "zh";
|
|
@@ -82,6 +94,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
82
94
|
readonly locale: "en" | "ja" | "ko";
|
|
83
95
|
readonly message: string;
|
|
84
96
|
}[]] | undefined;
|
|
97
|
+
readonly required?: string | undefined;
|
|
85
98
|
readonly displayName?: string | undefined;
|
|
86
99
|
readonly compatibilityDate: "2026-04-27";
|
|
87
100
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -109,6 +122,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
109
122
|
readonly locale: "en" | "ja" | "ko";
|
|
110
123
|
readonly message: string;
|
|
111
124
|
}[]] | undefined;
|
|
125
|
+
readonly validations?: readonly {
|
|
126
|
+
readonly message: readonly [{
|
|
127
|
+
readonly locale: "zh";
|
|
128
|
+
readonly message: string;
|
|
129
|
+
}, ...{
|
|
130
|
+
readonly locale: "en" | "ja" | "ko";
|
|
131
|
+
readonly message: string;
|
|
132
|
+
}[]];
|
|
133
|
+
readonly warning?: boolean | undefined;
|
|
134
|
+
readonly when: string;
|
|
135
|
+
}[] | undefined;
|
|
112
136
|
readonly presets?: readonly {
|
|
113
137
|
readonly label: readonly [{
|
|
114
138
|
readonly locale: "zh";
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue
CHANGED
|
@@ -5,6 +5,7 @@ import { computed } from "vue";
|
|
|
5
5
|
import { Button } from "../../../../ui/button";
|
|
6
6
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
7
7
|
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
8
|
+
import ValidationRulesField from "../../../ValidationRulesField.vue";
|
|
8
9
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
9
10
|
import { IconPicker } from "../../../../ui/icon-picker";
|
|
10
11
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupNumberField, InputGroupText } from "../../../../ui/input-group";
|
|
@@ -591,6 +592,26 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
|
|
|
591
592
|
</Field>
|
|
592
593
|
|
|
593
594
|
<div class="grid grid-cols-3 gap-3">
|
|
595
|
+
<Field orientation="vertical">
|
|
596
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
597
|
+
<template #tooltip>
|
|
598
|
+
<Markdown
|
|
599
|
+
:source="fieldDescription('required') ?? '\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A'"
|
|
600
|
+
block
|
|
601
|
+
class="prose prose-sm prose-zinc"
|
|
602
|
+
/>
|
|
603
|
+
</template>
|
|
604
|
+
{{ fieldTitle("required") }}
|
|
605
|
+
</FieldLabel>
|
|
606
|
+
<ExpressionEditor
|
|
607
|
+
:model-value="value.required ?? ''"
|
|
608
|
+
placeholder="例:form.type == 'company'"
|
|
609
|
+
result-type="bool"
|
|
610
|
+
class="min-h-10"
|
|
611
|
+
@update:model-value="(v) => value = { ...value, required: v.length > 0 ? v : void 0 }"
|
|
612
|
+
/>
|
|
613
|
+
</Field>
|
|
614
|
+
|
|
594
615
|
<Field orientation="vertical">
|
|
595
616
|
<FieldLabel class="text-xs text-zinc-500">
|
|
596
617
|
<template #tooltip>
|
|
@@ -670,5 +691,22 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
|
|
|
670
691
|
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
671
692
|
/>
|
|
672
693
|
</Field>
|
|
694
|
+
|
|
695
|
+
<Field orientation="vertical">
|
|
696
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
697
|
+
<template #tooltip>
|
|
698
|
+
<Markdown
|
|
699
|
+
:source="fieldDescription('validations')"
|
|
700
|
+
block
|
|
701
|
+
class="prose prose-sm prose-zinc"
|
|
702
|
+
/>
|
|
703
|
+
</template>
|
|
704
|
+
{{ fieldTitle("validations") }}
|
|
705
|
+
</FieldLabel>
|
|
706
|
+
<ValidationRulesField
|
|
707
|
+
:model-value="value.validations"
|
|
708
|
+
@update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
|
|
709
|
+
/>
|
|
710
|
+
</Field>
|
|
673
711
|
</div>
|
|
674
712
|
</template>
|
|
@@ -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-27";
|
|
27
28
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -49,6 +50,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
49
50
|
readonly locale: "en" | "ja" | "ko";
|
|
50
51
|
readonly message: string;
|
|
51
52
|
}[]] | undefined;
|
|
53
|
+
readonly validations?: readonly {
|
|
54
|
+
readonly message: readonly [{
|
|
55
|
+
readonly locale: "zh";
|
|
56
|
+
readonly message: string;
|
|
57
|
+
}, ...{
|
|
58
|
+
readonly locale: "en" | "ja" | "ko";
|
|
59
|
+
readonly message: string;
|
|
60
|
+
}[]];
|
|
61
|
+
readonly warning?: boolean | undefined;
|
|
62
|
+
readonly when: string;
|
|
63
|
+
}[] | undefined;
|
|
52
64
|
readonly presets?: readonly {
|
|
53
65
|
readonly label: readonly [{
|
|
54
66
|
readonly locale: "zh";
|
|
@@ -82,6 +94,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
82
94
|
readonly locale: "en" | "ja" | "ko";
|
|
83
95
|
readonly message: string;
|
|
84
96
|
}[]] | undefined;
|
|
97
|
+
readonly required?: string | undefined;
|
|
85
98
|
readonly displayName?: string | undefined;
|
|
86
99
|
readonly compatibilityDate: "2026-04-27";
|
|
87
100
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -109,6 +122,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
109
122
|
readonly locale: "en" | "ja" | "ko";
|
|
110
123
|
readonly message: string;
|
|
111
124
|
}[]] | undefined;
|
|
125
|
+
readonly validations?: readonly {
|
|
126
|
+
readonly message: readonly [{
|
|
127
|
+
readonly locale: "zh";
|
|
128
|
+
readonly message: string;
|
|
129
|
+
}, ...{
|
|
130
|
+
readonly locale: "en" | "ja" | "ko";
|
|
131
|
+
readonly message: string;
|
|
132
|
+
}[]];
|
|
133
|
+
readonly warning?: boolean | undefined;
|
|
134
|
+
readonly when: string;
|
|
135
|
+
}[] | undefined;
|
|
112
136
|
readonly presets?: readonly {
|
|
113
137
|
readonly label: readonly [{
|
|
114
138
|
readonly locale: "zh";
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue
CHANGED
|
@@ -7,9 +7,10 @@ import { cel as _rawCel } from "../../../../../utils/cel";
|
|
|
7
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
|
-
import { Field, FieldLabel } from "../../../../ui/field";
|
|
10
|
+
import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
|
|
11
11
|
import { Markdown } from "../../../../ui/markdown";
|
|
12
12
|
import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
|
|
13
|
+
import { useFieldValidation } from "../../../utils/validation";
|
|
13
14
|
import { useFormReadonly } from "../../../utils/readonly";
|
|
14
15
|
import { useFormState } from "../../../utils/state";
|
|
15
16
|
defineOptions({ name: "ShwfedDateRangeFieldRuntime" });
|
|
@@ -104,6 +105,12 @@ const model = computed({
|
|
|
104
105
|
setAt(binding[1], next?.[1]);
|
|
105
106
|
}
|
|
106
107
|
});
|
|
108
|
+
const { isRequired, errors, warnings, visible } = useFieldValidation({
|
|
109
|
+
fieldId: () => props.fieldId,
|
|
110
|
+
config: () => props.config,
|
|
111
|
+
$cel,
|
|
112
|
+
locale: () => locale.value
|
|
113
|
+
});
|
|
107
114
|
const readonlyText = computed(() => {
|
|
108
115
|
const v = model.value;
|
|
109
116
|
if (!v) return "\u2014";
|
|
@@ -130,7 +137,11 @@ const readonlyText = computed(() => {
|
|
|
130
137
|
class="prose prose-xs prose-zinc"
|
|
131
138
|
/>
|
|
132
139
|
</template>
|
|
133
|
-
{{ labelText }}
|
|
140
|
+
{{ labelText }}<span
|
|
141
|
+
v-if="isRequired"
|
|
142
|
+
aria-hidden="true"
|
|
143
|
+
class="text-red-600"
|
|
144
|
+
> *</span>
|
|
134
145
|
</FieldLabel>
|
|
135
146
|
<div
|
|
136
147
|
v-if="effectiveReadonly"
|
|
@@ -152,5 +163,10 @@ const readonlyText = computed(() => {
|
|
|
152
163
|
:disabled="isDisabled"
|
|
153
164
|
:shortcuts="shortcuts"
|
|
154
165
|
/>
|
|
166
|
+
<FieldMessages
|
|
167
|
+
v-if="visible"
|
|
168
|
+
:errors="errors"
|
|
169
|
+
:warnings="warnings"
|
|
170
|
+
/>
|
|
155
171
|
</Field>
|
|
156
172
|
</template>
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts
CHANGED
|
@@ -84,6 +84,24 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
84
84
|
id: Schema.refine<string, typeof Schema.String>;
|
|
85
85
|
displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
86
86
|
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
|
87
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
88
|
+
validations: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
89
|
+
when: Schema.Schema<string, string, never>;
|
|
90
|
+
warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
91
|
+
message: Schema.refine<readonly [{
|
|
92
|
+
readonly locale: "zh";
|
|
93
|
+
readonly message: string;
|
|
94
|
+
}, ...{
|
|
95
|
+
readonly locale: "en" | "ja" | "ko";
|
|
96
|
+
readonly message: string;
|
|
97
|
+
}[]], Schema.TupleType<readonly [Schema.Struct<{
|
|
98
|
+
locale: Schema.Literal<["zh"]>;
|
|
99
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
100
|
+
}>], [Schema.Struct<{
|
|
101
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
102
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
103
|
+
}>]>>;
|
|
104
|
+
}>>>;
|
|
87
105
|
type: Schema.Literal<["com.shwfed.form.field.daterange"]>;
|
|
88
106
|
compatibilityDate: Schema.Literal<["2026-04-27"]>;
|
|
89
107
|
}>;
|
|
@@ -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-27";
|
|
27
28
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -42,6 +43,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
42
43
|
readonly hourCycle?: 12 | 24 | undefined;
|
|
43
44
|
readonly valueFormat?: string | undefined;
|
|
44
45
|
readonly timeGranularity?: "hour" | "minute" | "second" | undefined;
|
|
46
|
+
readonly validations?: readonly {
|
|
47
|
+
readonly message: readonly [{
|
|
48
|
+
readonly locale: "zh";
|
|
49
|
+
readonly message: string;
|
|
50
|
+
}, ...{
|
|
51
|
+
readonly locale: "en" | "ja" | "ko";
|
|
52
|
+
readonly message: string;
|
|
53
|
+
}[]];
|
|
54
|
+
readonly warning?: boolean | undefined;
|
|
55
|
+
readonly when: string;
|
|
56
|
+
}[] | undefined;
|
|
45
57
|
readonly presets?: readonly {
|
|
46
58
|
readonly label: readonly [{
|
|
47
59
|
readonly locale: "zh";
|
|
@@ -74,6 +86,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
74
86
|
readonly locale: "en" | "ja" | "ko";
|
|
75
87
|
readonly message: string;
|
|
76
88
|
}[]] | undefined;
|
|
89
|
+
readonly required?: string | undefined;
|
|
77
90
|
readonly displayName?: string | undefined;
|
|
78
91
|
readonly compatibilityDate: "2026-04-27";
|
|
79
92
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -94,6 +107,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
94
107
|
readonly hourCycle?: 12 | 24 | undefined;
|
|
95
108
|
readonly valueFormat?: string | undefined;
|
|
96
109
|
readonly timeGranularity?: "hour" | "minute" | "second" | undefined;
|
|
110
|
+
readonly validations?: readonly {
|
|
111
|
+
readonly message: readonly [{
|
|
112
|
+
readonly locale: "zh";
|
|
113
|
+
readonly message: string;
|
|
114
|
+
}, ...{
|
|
115
|
+
readonly locale: "en" | "ja" | "ko";
|
|
116
|
+
readonly message: string;
|
|
117
|
+
}[]];
|
|
118
|
+
readonly warning?: boolean | undefined;
|
|
119
|
+
readonly when: string;
|
|
120
|
+
}[] | undefined;
|
|
97
121
|
readonly presets?: readonly {
|
|
98
122
|
readonly label: readonly [{
|
|
99
123
|
readonly locale: "zh";
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue
CHANGED
|
@@ -5,6 +5,7 @@ import { format as formatDate } from "date-fns";
|
|
|
5
5
|
import { Button } from "../../../../ui/button";
|
|
6
6
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
7
7
|
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
8
|
+
import ValidationRulesField from "../../../ValidationRulesField.vue";
|
|
8
9
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
9
10
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText } from "../../../../ui/input-group";
|
|
10
11
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
@@ -492,6 +493,26 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
|
|
|
492
493
|
</div>
|
|
493
494
|
|
|
494
495
|
<div class="grid grid-cols-3 gap-3">
|
|
496
|
+
<Field orientation="vertical">
|
|
497
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
498
|
+
<template #tooltip>
|
|
499
|
+
<Markdown
|
|
500
|
+
:source="fieldDescription('required') ?? '\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A'"
|
|
501
|
+
block
|
|
502
|
+
class="prose prose-sm prose-zinc"
|
|
503
|
+
/>
|
|
504
|
+
</template>
|
|
505
|
+
{{ fieldTitle("required") }}
|
|
506
|
+
</FieldLabel>
|
|
507
|
+
<ExpressionEditor
|
|
508
|
+
:model-value="value.required ?? ''"
|
|
509
|
+
placeholder="例:form.type == 'company'"
|
|
510
|
+
result-type="bool"
|
|
511
|
+
class="min-h-10"
|
|
512
|
+
@update:model-value="(v) => value = { ...value, required: v.length > 0 ? v : void 0 }"
|
|
513
|
+
/>
|
|
514
|
+
</Field>
|
|
515
|
+
|
|
495
516
|
<Field orientation="vertical">
|
|
496
517
|
<FieldLabel class="text-xs text-zinc-500">
|
|
497
518
|
<template #tooltip>
|
|
@@ -571,5 +592,22 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
|
|
|
571
592
|
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
572
593
|
/>
|
|
573
594
|
</Field>
|
|
595
|
+
|
|
596
|
+
<Field orientation="vertical">
|
|
597
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
598
|
+
<template #tooltip>
|
|
599
|
+
<Markdown
|
|
600
|
+
:source="fieldDescription('validations')"
|
|
601
|
+
block
|
|
602
|
+
class="prose prose-sm prose-zinc"
|
|
603
|
+
/>
|
|
604
|
+
</template>
|
|
605
|
+
{{ fieldTitle("validations") }}
|
|
606
|
+
</FieldLabel>
|
|
607
|
+
<ValidationRulesField
|
|
608
|
+
:model-value="value.validations"
|
|
609
|
+
@update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
|
|
610
|
+
/>
|
|
611
|
+
</Field>
|
|
574
612
|
</div>
|
|
575
613
|
</template>
|
|
@@ -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-27";
|
|
27
28
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -42,6 +43,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
42
43
|
readonly hourCycle?: 12 | 24 | undefined;
|
|
43
44
|
readonly valueFormat?: string | undefined;
|
|
44
45
|
readonly timeGranularity?: "hour" | "minute" | "second" | undefined;
|
|
46
|
+
readonly validations?: readonly {
|
|
47
|
+
readonly message: readonly [{
|
|
48
|
+
readonly locale: "zh";
|
|
49
|
+
readonly message: string;
|
|
50
|
+
}, ...{
|
|
51
|
+
readonly locale: "en" | "ja" | "ko";
|
|
52
|
+
readonly message: string;
|
|
53
|
+
}[]];
|
|
54
|
+
readonly warning?: boolean | undefined;
|
|
55
|
+
readonly when: string;
|
|
56
|
+
}[] | undefined;
|
|
45
57
|
readonly presets?: readonly {
|
|
46
58
|
readonly label: readonly [{
|
|
47
59
|
readonly locale: "zh";
|
|
@@ -74,6 +86,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
74
86
|
readonly locale: "en" | "ja" | "ko";
|
|
75
87
|
readonly message: string;
|
|
76
88
|
}[]] | undefined;
|
|
89
|
+
readonly required?: string | undefined;
|
|
77
90
|
readonly displayName?: string | undefined;
|
|
78
91
|
readonly compatibilityDate: "2026-04-27";
|
|
79
92
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -94,6 +107,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
94
107
|
readonly hourCycle?: 12 | 24 | undefined;
|
|
95
108
|
readonly valueFormat?: string | undefined;
|
|
96
109
|
readonly timeGranularity?: "hour" | "minute" | "second" | undefined;
|
|
110
|
+
readonly validations?: readonly {
|
|
111
|
+
readonly message: readonly [{
|
|
112
|
+
readonly locale: "zh";
|
|
113
|
+
readonly message: string;
|
|
114
|
+
}, ...{
|
|
115
|
+
readonly locale: "en" | "ja" | "ko";
|
|
116
|
+
readonly message: string;
|
|
117
|
+
}[]];
|
|
118
|
+
readonly warning?: boolean | undefined;
|
|
119
|
+
readonly when: string;
|
|
120
|
+
}[] | undefined;
|
|
97
121
|
readonly presets?: readonly {
|
|
98
122
|
readonly label: readonly [{
|
|
99
123
|
readonly locale: "zh";
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue
CHANGED
|
@@ -7,9 +7,10 @@ import { cel as _rawCel } from "../../../../../utils/cel";
|
|
|
7
7
|
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
8
8
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
9
9
|
import { DATE_PICKER_DEFAULT_FORMATS, DatePicker } from "../../../../ui/date-picker";
|
|
10
|
-
import { Field, FieldLabel } from "../../../../ui/field";
|
|
10
|
+
import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
|
|
11
11
|
import { Markdown } from "../../../../ui/markdown";
|
|
12
12
|
import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
|
|
13
|
+
import { useFieldValidation } from "../../../utils/validation";
|
|
13
14
|
import { useFormReadonly } from "../../../utils/readonly";
|
|
14
15
|
import { useFormState } from "../../../utils/state";
|
|
15
16
|
defineOptions({ name: "ShwfedDateTimeFieldRuntime" });
|
|
@@ -79,6 +80,12 @@ const model = computed({
|
|
|
79
80
|
setAt(path, next);
|
|
80
81
|
}
|
|
81
82
|
});
|
|
83
|
+
const { isRequired, errors, warnings, visible } = useFieldValidation({
|
|
84
|
+
fieldId: () => props.fieldId,
|
|
85
|
+
config: () => props.config,
|
|
86
|
+
$cel,
|
|
87
|
+
locale: () => locale.value
|
|
88
|
+
});
|
|
82
89
|
</script>
|
|
83
90
|
|
|
84
91
|
<template>
|
|
@@ -100,7 +107,11 @@ const model = computed({
|
|
|
100
107
|
class="prose prose-xs prose-zinc"
|
|
101
108
|
/>
|
|
102
109
|
</template>
|
|
103
|
-
{{ labelText }}
|
|
110
|
+
{{ labelText }}<span
|
|
111
|
+
v-if="isRequired"
|
|
112
|
+
aria-hidden="true"
|
|
113
|
+
class="text-red-600"
|
|
114
|
+
> *</span>
|
|
104
115
|
</FieldLabel>
|
|
105
116
|
<div
|
|
106
117
|
v-if="effectiveReadonly"
|
|
@@ -121,5 +132,10 @@ const model = computed({
|
|
|
121
132
|
:disabled="isDisabled"
|
|
122
133
|
:shortcuts="shortcuts"
|
|
123
134
|
/>
|
|
135
|
+
<FieldMessages
|
|
136
|
+
v-if="visible"
|
|
137
|
+
:errors="errors"
|
|
138
|
+
:warnings="warnings"
|
|
139
|
+
/>
|
|
124
140
|
</Field>
|
|
125
141
|
</template>
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts
CHANGED
|
@@ -85,6 +85,24 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
85
85
|
id: Schema.refine<string, typeof Schema.String>;
|
|
86
86
|
displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
87
87
|
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
|
88
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
89
|
+
validations: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
90
|
+
when: Schema.Schema<string, string, never>;
|
|
91
|
+
warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
92
|
+
message: Schema.refine<readonly [{
|
|
93
|
+
readonly locale: "zh";
|
|
94
|
+
readonly message: string;
|
|
95
|
+
}, ...{
|
|
96
|
+
readonly locale: "en" | "ja" | "ko";
|
|
97
|
+
readonly message: string;
|
|
98
|
+
}[]], Schema.TupleType<readonly [Schema.Struct<{
|
|
99
|
+
locale: Schema.Literal<["zh"]>;
|
|
100
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
101
|
+
}>], [Schema.Struct<{
|
|
102
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
103
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
104
|
+
}>]>>;
|
|
105
|
+
}>>>;
|
|
88
106
|
type: Schema.Literal<["com.shwfed.form.field.datetime"]>;
|
|
89
107
|
compatibilityDate: Schema.Literal<["2026-04-27"]>;
|
|
90
108
|
}>;
|