@shwfed/config 2.3.29 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp.mjs +47 -9
- package/dist/module.json +1 -1
- package/dist/preview/assets/{config-Diuyh0Ex.js → config-BovRv7Mw.js} +1 -1
- package/dist/preview/assets/{config-rpX_Mc6I.js → config-ByTxMBcK.js} +1 -1
- package/dist/preview/assets/{config-DhsbcNzx.js → config-C7xYpB3N.js} +1 -1
- package/dist/preview/assets/{config-CZOeZ8ty.js → config-CH9wsYX8.js} +1 -1
- package/dist/preview/assets/{config-aK67Rsw5.js → config-Ch5dL5lp.js} +1 -1
- package/dist/preview/assets/{config-Bl80ye-i.js → config-D50Rl2n_.js} +1 -1
- package/dist/preview/assets/{config-BJzUh1_G.js → config-DiwVK32V.js} +1 -1
- package/dist/preview/assets/{config-6IiXCmyu.js → config-EKVeWrbS.js} +1 -1
- package/dist/preview/assets/{config-DaZD4ZSa.js → config-Q86AhjHq.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-C_jU8d47.js → definition.vue_vue_type_script_setup_true_lang-D8NPPbjZ.js} +1 -1
- package/dist/preview/assets/index-65eB1l4r.css +1 -0
- package/dist/preview/assets/index-CIrlYN0M.js +1 -0
- package/dist/preview/assets/index-DUDlWaQI.js +661 -0
- package/dist/preview/assets/runtime-BP7zXnyG.js +1 -0
- package/dist/preview/assets/runtime-BQSwNpLC.js +1 -0
- package/dist/preview/assets/runtime-BwR_BbTu.js +1 -0
- package/dist/preview/assets/runtime-Ch3JIgUQ.js +1 -0
- package/dist/preview/assets/runtime-CjvZcU7X.js +1 -0
- package/dist/preview/assets/runtime-Cunk4vOs.js +1 -0
- package/dist/preview/assets/runtime-D34aQN00.js +1 -0
- package/dist/preview/assets/runtime-a9TOQRwD.js +1 -0
- package/dist/preview/assets/runtime-aPt-bW3F.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.form/config.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +3 -0
- 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/config.vue +32 -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 +16 -5
- package/dist/runtime/components/form/index.vue.d.ts +1 -0
- package/dist/runtime/components/form/schema.d.ts +4 -0
- package/dist/runtime/components/form/schema.js +6 -2
- 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/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.select/config.vue +0 -22
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/header.vue +3 -15
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.d.ts +0 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.js +0 -4
- package/dist/runtime/components/table/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/config.vue +59 -52
- package/dist/runtime/components/table/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/schema.d.ts +4 -0
- package/dist/runtime/components/table/utils/shared.js +2 -2
- 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-2eQR4s3q.css +0 -1
- package/dist/preview/assets/index-DEF3_MKr.js +0 -659
- package/dist/preview/assets/index-Df-thth9.js +0 -1
- package/dist/preview/assets/runtime-3p1K6te5.js +0 -1
- package/dist/preview/assets/runtime-BcLnafic.js +0 -1
- package/dist/preview/assets/runtime-CSaV-359.js +0 -1
- package/dist/preview/assets/runtime-CjR8Vi5N.js +0 -1
- package/dist/preview/assets/runtime-D_fJCKX_.js +0 -1
- package/dist/preview/assets/runtime-DpeCgGEG.js +0 -1
- package/dist/preview/assets/runtime-K2a1x0TJ.js +0 -1
- package/dist/preview/assets/runtime-g9Zu3VNQ.js +0 -1
- package/dist/preview/assets/runtime-jTnh_6Dm.js +0 -1
|
@@ -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
|
}>;
|
|
@@ -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;
|
|
@@ -51,6 +52,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
51
52
|
readonly locale: "en" | "ja" | "ko";
|
|
52
53
|
readonly message: string;
|
|
53
54
|
}[]] | undefined;
|
|
55
|
+
readonly validations?: readonly {
|
|
56
|
+
readonly message: readonly [{
|
|
57
|
+
readonly locale: "zh";
|
|
58
|
+
readonly message: string;
|
|
59
|
+
}, ...{
|
|
60
|
+
readonly locale: "en" | "ja" | "ko";
|
|
61
|
+
readonly message: string;
|
|
62
|
+
}[]];
|
|
63
|
+
readonly warning?: boolean | undefined;
|
|
64
|
+
readonly when: string;
|
|
65
|
+
}[] | undefined;
|
|
54
66
|
readonly presets?: readonly {
|
|
55
67
|
readonly label: readonly [{
|
|
56
68
|
readonly locale: "zh";
|
|
@@ -84,6 +96,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
84
96
|
readonly locale: "en" | "ja" | "ko";
|
|
85
97
|
readonly message: string;
|
|
86
98
|
}[]] | undefined;
|
|
99
|
+
readonly required?: string | undefined;
|
|
87
100
|
readonly displayName?: string | undefined;
|
|
88
101
|
readonly compatibilityDate: "2026-04-27";
|
|
89
102
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -113,6 +126,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
113
126
|
readonly locale: "en" | "ja" | "ko";
|
|
114
127
|
readonly message: string;
|
|
115
128
|
}[]] | undefined;
|
|
129
|
+
readonly validations?: readonly {
|
|
130
|
+
readonly message: readonly [{
|
|
131
|
+
readonly locale: "zh";
|
|
132
|
+
readonly message: string;
|
|
133
|
+
}, ...{
|
|
134
|
+
readonly locale: "en" | "ja" | "ko";
|
|
135
|
+
readonly message: string;
|
|
136
|
+
}[]];
|
|
137
|
+
readonly warning?: boolean | undefined;
|
|
138
|
+
readonly when: string;
|
|
139
|
+
}[] | undefined;
|
|
116
140
|
readonly presets?: readonly {
|
|
117
141
|
readonly label: readonly [{
|
|
118
142
|
readonly locale: "zh";
|
|
@@ -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 { IconPicker } from "../../../../ui/icon-picker";
|
|
10
11
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupNumberField, InputGroupText } from "../../../../ui/input-group";
|
|
@@ -675,6 +676,26 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
|
|
|
675
676
|
</div>
|
|
676
677
|
|
|
677
678
|
<div class="grid grid-cols-3 gap-3">
|
|
679
|
+
<Field orientation="vertical">
|
|
680
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
681
|
+
<template #tooltip>
|
|
682
|
+
<Markdown
|
|
683
|
+
:source="fieldDescription('required') ?? '\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A'"
|
|
684
|
+
block
|
|
685
|
+
class="prose prose-sm prose-zinc"
|
|
686
|
+
/>
|
|
687
|
+
</template>
|
|
688
|
+
{{ fieldTitle("required") }}
|
|
689
|
+
</FieldLabel>
|
|
690
|
+
<ExpressionEditor
|
|
691
|
+
:model-value="value.required ?? ''"
|
|
692
|
+
placeholder="例:form.type == 'company'"
|
|
693
|
+
result-type="bool"
|
|
694
|
+
class="min-h-10"
|
|
695
|
+
@update:model-value="(v) => value = { ...value, required: v.length > 0 ? v : void 0 }"
|
|
696
|
+
/>
|
|
697
|
+
</Field>
|
|
698
|
+
|
|
678
699
|
<Field orientation="vertical">
|
|
679
700
|
<FieldLabel class="text-xs text-zinc-500">
|
|
680
701
|
<template #tooltip>
|
|
@@ -754,5 +775,22 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
|
|
|
754
775
|
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
755
776
|
/>
|
|
756
777
|
</Field>
|
|
778
|
+
|
|
779
|
+
<Field orientation="vertical">
|
|
780
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
781
|
+
<template #tooltip>
|
|
782
|
+
<Markdown
|
|
783
|
+
:source="fieldDescription('validations')"
|
|
784
|
+
block
|
|
785
|
+
class="prose prose-sm prose-zinc"
|
|
786
|
+
/>
|
|
787
|
+
</template>
|
|
788
|
+
{{ fieldTitle("validations") }}
|
|
789
|
+
</FieldLabel>
|
|
790
|
+
<ValidationRulesField
|
|
791
|
+
:model-value="value.validations"
|
|
792
|
+
@update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
|
|
793
|
+
/>
|
|
794
|
+
</Field>
|
|
757
795
|
</div>
|
|
758
796
|
</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;
|
|
@@ -51,6 +52,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
51
52
|
readonly locale: "en" | "ja" | "ko";
|
|
52
53
|
readonly message: string;
|
|
53
54
|
}[]] | undefined;
|
|
55
|
+
readonly validations?: readonly {
|
|
56
|
+
readonly message: readonly [{
|
|
57
|
+
readonly locale: "zh";
|
|
58
|
+
readonly message: string;
|
|
59
|
+
}, ...{
|
|
60
|
+
readonly locale: "en" | "ja" | "ko";
|
|
61
|
+
readonly message: string;
|
|
62
|
+
}[]];
|
|
63
|
+
readonly warning?: boolean | undefined;
|
|
64
|
+
readonly when: string;
|
|
65
|
+
}[] | undefined;
|
|
54
66
|
readonly presets?: readonly {
|
|
55
67
|
readonly label: readonly [{
|
|
56
68
|
readonly locale: "zh";
|
|
@@ -84,6 +96,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
84
96
|
readonly locale: "en" | "ja" | "ko";
|
|
85
97
|
readonly message: string;
|
|
86
98
|
}[]] | undefined;
|
|
99
|
+
readonly required?: string | undefined;
|
|
87
100
|
readonly displayName?: string | undefined;
|
|
88
101
|
readonly compatibilityDate: "2026-04-27";
|
|
89
102
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -113,6 +126,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
113
126
|
readonly locale: "en" | "ja" | "ko";
|
|
114
127
|
readonly message: string;
|
|
115
128
|
}[]] | undefined;
|
|
129
|
+
readonly validations?: readonly {
|
|
130
|
+
readonly message: readonly [{
|
|
131
|
+
readonly locale: "zh";
|
|
132
|
+
readonly message: string;
|
|
133
|
+
}, ...{
|
|
134
|
+
readonly locale: "en" | "ja" | "ko";
|
|
135
|
+
readonly message: string;
|
|
136
|
+
}[]];
|
|
137
|
+
readonly warning?: boolean | undefined;
|
|
138
|
+
readonly when: string;
|
|
139
|
+
}[] | undefined;
|
|
116
140
|
readonly presets?: readonly {
|
|
117
141
|
readonly label: readonly [{
|
|
118
142
|
readonly locale: "zh";
|
|
@@ -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: "ShwfedDateTimeRangeFieldRuntime" });
|
|
@@ -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"
|
|
@@ -154,5 +165,10 @@ const readonlyText = computed(() => {
|
|
|
154
165
|
:disabled="isDisabled"
|
|
155
166
|
:shortcuts="shortcuts"
|
|
156
167
|
/>
|
|
168
|
+
<FieldMessages
|
|
169
|
+
v-if="visible"
|
|
170
|
+
:errors="errors"
|
|
171
|
+
:warnings="warnings"
|
|
172
|
+
/>
|
|
157
173
|
</Field>
|
|
158
174
|
</template>
|
|
@@ -96,6 +96,24 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
96
96
|
id: Schema.refine<string, typeof Schema.String>;
|
|
97
97
|
displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
98
98
|
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
|
99
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
100
|
+
validations: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
101
|
+
when: Schema.Schema<string, string, never>;
|
|
102
|
+
warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
103
|
+
message: Schema.refine<readonly [{
|
|
104
|
+
readonly locale: "zh";
|
|
105
|
+
readonly message: string;
|
|
106
|
+
}, ...{
|
|
107
|
+
readonly locale: "en" | "ja" | "ko";
|
|
108
|
+
readonly message: string;
|
|
109
|
+
}[]], Schema.TupleType<readonly [Schema.Struct<{
|
|
110
|
+
locale: Schema.Literal<["zh"]>;
|
|
111
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
112
|
+
}>], [Schema.Struct<{
|
|
113
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
114
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
115
|
+
}>]>>;
|
|
116
|
+
}>>>;
|
|
99
117
|
type: Schema.Literal<["com.shwfed.form.field.datetimerange"]>;
|
|
100
118
|
compatibilityDate: Schema.Literal<["2026-04-27"]>;
|
|
101
119
|
}>;
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/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-27";
|
|
27
28
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -34,6 +35,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
34
35
|
readonly hourCycle?: 12 | 24 | undefined;
|
|
35
36
|
readonly valueFormat?: string | undefined;
|
|
36
37
|
readonly timeGranularity?: "hour" | "minute" | "second" | undefined;
|
|
38
|
+
readonly validations?: readonly {
|
|
39
|
+
readonly message: readonly [{
|
|
40
|
+
readonly locale: "zh";
|
|
41
|
+
readonly message: string;
|
|
42
|
+
}, ...{
|
|
43
|
+
readonly locale: "en" | "ja" | "ko";
|
|
44
|
+
readonly message: string;
|
|
45
|
+
}[]];
|
|
46
|
+
readonly warning?: boolean | undefined;
|
|
47
|
+
readonly when: string;
|
|
48
|
+
}[] | undefined;
|
|
37
49
|
}) => any;
|
|
38
50
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
39
51
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -55,6 +67,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
55
67
|
readonly locale: "en" | "ja" | "ko";
|
|
56
68
|
readonly message: string;
|
|
57
69
|
}[]] | undefined;
|
|
70
|
+
readonly required?: string | undefined;
|
|
58
71
|
readonly displayName?: string | undefined;
|
|
59
72
|
readonly compatibilityDate: "2026-04-27";
|
|
60
73
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -67,6 +80,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
67
80
|
readonly hourCycle?: 12 | 24 | undefined;
|
|
68
81
|
readonly valueFormat?: string | undefined;
|
|
69
82
|
readonly timeGranularity?: "hour" | "minute" | "second" | undefined;
|
|
83
|
+
readonly validations?: readonly {
|
|
84
|
+
readonly message: readonly [{
|
|
85
|
+
readonly locale: "zh";
|
|
86
|
+
readonly message: string;
|
|
87
|
+
}, ...{
|
|
88
|
+
readonly locale: "en" | "ja" | "ko";
|
|
89
|
+
readonly message: string;
|
|
90
|
+
}[]];
|
|
91
|
+
readonly warning?: boolean | undefined;
|
|
92
|
+
readonly when: string;
|
|
93
|
+
}[] | undefined;
|
|
70
94
|
}) => any) | undefined;
|
|
71
95
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
72
96
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue
CHANGED
|
@@ -3,6 +3,7 @@ import { computed } from "vue";
|
|
|
3
3
|
import { format as formatDate } from "date-fns";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
5
|
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
6
|
+
import ValidationRulesField from "../../../ValidationRulesField.vue";
|
|
6
7
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
7
8
|
import { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText } from "../../../../ui/input-group";
|
|
8
9
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
@@ -299,6 +300,26 @@ const valueFormatExample = computed(() => {
|
|
|
299
300
|
</div>
|
|
300
301
|
|
|
301
302
|
<div class="grid grid-cols-3 gap-3">
|
|
303
|
+
<Field orientation="vertical">
|
|
304
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
305
|
+
<template #tooltip>
|
|
306
|
+
<Markdown
|
|
307
|
+
:source="fieldDescription('required') ?? '\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A'"
|
|
308
|
+
block
|
|
309
|
+
class="prose prose-sm prose-zinc"
|
|
310
|
+
/>
|
|
311
|
+
</template>
|
|
312
|
+
{{ fieldTitle("required") }}
|
|
313
|
+
</FieldLabel>
|
|
314
|
+
<ExpressionEditor
|
|
315
|
+
:model-value="value.required ?? ''"
|
|
316
|
+
placeholder="例:form.type == 'company'"
|
|
317
|
+
result-type="bool"
|
|
318
|
+
class="min-h-10"
|
|
319
|
+
@update:model-value="(v) => value = { ...value, required: v.length > 0 ? v : void 0 }"
|
|
320
|
+
/>
|
|
321
|
+
</Field>
|
|
322
|
+
|
|
302
323
|
<Field orientation="vertical">
|
|
303
324
|
<FieldLabel class="text-xs text-zinc-500">
|
|
304
325
|
<template #tooltip>
|
|
@@ -378,5 +399,22 @@ const valueFormatExample = computed(() => {
|
|
|
378
399
|
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
379
400
|
/>
|
|
380
401
|
</Field>
|
|
402
|
+
|
|
403
|
+
<Field orientation="vertical">
|
|
404
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
405
|
+
<template #tooltip>
|
|
406
|
+
<Markdown
|
|
407
|
+
:source="fieldDescription('validations')"
|
|
408
|
+
block
|
|
409
|
+
class="prose prose-sm prose-zinc"
|
|
410
|
+
/>
|
|
411
|
+
</template>
|
|
412
|
+
{{ fieldTitle("validations") }}
|
|
413
|
+
</FieldLabel>
|
|
414
|
+
<ValidationRulesField
|
|
415
|
+
:model-value="value.validations"
|
|
416
|
+
@update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
|
|
417
|
+
/>
|
|
418
|
+
</Field>
|
|
381
419
|
</div>
|
|
382
420
|
</template>
|
package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/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;
|
|
@@ -34,6 +35,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
34
35
|
readonly hourCycle?: 12 | 24 | undefined;
|
|
35
36
|
readonly valueFormat?: string | undefined;
|
|
36
37
|
readonly timeGranularity?: "hour" | "minute" | "second" | undefined;
|
|
38
|
+
readonly validations?: readonly {
|
|
39
|
+
readonly message: readonly [{
|
|
40
|
+
readonly locale: "zh";
|
|
41
|
+
readonly message: string;
|
|
42
|
+
}, ...{
|
|
43
|
+
readonly locale: "en" | "ja" | "ko";
|
|
44
|
+
readonly message: string;
|
|
45
|
+
}[]];
|
|
46
|
+
readonly warning?: boolean | undefined;
|
|
47
|
+
readonly when: string;
|
|
48
|
+
}[] | undefined;
|
|
37
49
|
}) => any;
|
|
38
50
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
39
51
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -55,6 +67,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
55
67
|
readonly locale: "en" | "ja" | "ko";
|
|
56
68
|
readonly message: string;
|
|
57
69
|
}[]] | undefined;
|
|
70
|
+
readonly required?: string | undefined;
|
|
58
71
|
readonly displayName?: string | undefined;
|
|
59
72
|
readonly compatibilityDate: "2026-04-27";
|
|
60
73
|
readonly orientation?: "vertical" | "floating" | undefined;
|
|
@@ -67,6 +80,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
67
80
|
readonly hourCycle?: 12 | 24 | undefined;
|
|
68
81
|
readonly valueFormat?: string | undefined;
|
|
69
82
|
readonly timeGranularity?: "hour" | "minute" | "second" | undefined;
|
|
83
|
+
readonly validations?: readonly {
|
|
84
|
+
readonly message: readonly [{
|
|
85
|
+
readonly locale: "zh";
|
|
86
|
+
readonly message: string;
|
|
87
|
+
}, ...{
|
|
88
|
+
readonly locale: "en" | "ja" | "ko";
|
|
89
|
+
readonly message: string;
|
|
90
|
+
}[]];
|
|
91
|
+
readonly warning?: boolean | undefined;
|
|
92
|
+
readonly when: string;
|
|
93
|
+
}[] | undefined;
|
|
70
94
|
}) => any) | undefined;
|
|
71
95
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
72
96
|
declare const _default: typeof __VLS_export;
|