@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
|
@@ -5,6 +5,7 @@ import { Button } from "../../../../ui/button";
|
|
|
5
5
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../../../ui/dropdown-menu";
|
|
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, InputGroupNumberField } from "../../../../ui/input-group";
|
|
10
11
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
@@ -343,6 +344,26 @@ function setItemTooltip(index, tooltip) {
|
|
|
343
344
|
</Field>
|
|
344
345
|
|
|
345
346
|
<div class="grid grid-cols-3 gap-3">
|
|
347
|
+
<Field orientation="vertical">
|
|
348
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
349
|
+
<template #tooltip>
|
|
350
|
+
<Markdown
|
|
351
|
+
:source="fieldDescription('required') ?? '\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A'"
|
|
352
|
+
block
|
|
353
|
+
class="prose prose-sm prose-zinc"
|
|
354
|
+
/>
|
|
355
|
+
</template>
|
|
356
|
+
{{ fieldTitle("required") }}
|
|
357
|
+
</FieldLabel>
|
|
358
|
+
<ExpressionEditor
|
|
359
|
+
:model-value="value.required ?? ''"
|
|
360
|
+
placeholder="例:form.type == 'company'"
|
|
361
|
+
result-type="bool"
|
|
362
|
+
class="min-h-10"
|
|
363
|
+
@update:model-value="(v) => value = { ...value, required: v.length > 0 ? v : void 0 }"
|
|
364
|
+
/>
|
|
365
|
+
</Field>
|
|
366
|
+
|
|
346
367
|
<Field orientation="vertical">
|
|
347
368
|
<FieldLabel class="text-xs text-zinc-500">
|
|
348
369
|
<template #tooltip>
|
|
@@ -422,5 +443,22 @@ function setItemTooltip(index, tooltip) {
|
|
|
422
443
|
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
423
444
|
/>
|
|
424
445
|
</Field>
|
|
446
|
+
|
|
447
|
+
<Field orientation="vertical">
|
|
448
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
449
|
+
<template #tooltip>
|
|
450
|
+
<Markdown
|
|
451
|
+
:source="fieldDescription('validations')"
|
|
452
|
+
block
|
|
453
|
+
class="prose prose-sm prose-zinc"
|
|
454
|
+
/>
|
|
455
|
+
</template>
|
|
456
|
+
{{ fieldTitle("validations") }}
|
|
457
|
+
</FieldLabel>
|
|
458
|
+
<ValidationRulesField
|
|
459
|
+
:model-value="value.validations"
|
|
460
|
+
@update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
|
|
461
|
+
/>
|
|
462
|
+
</Field>
|
|
425
463
|
</div>
|
|
426
464
|
</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-05-17";
|
|
27
28
|
readonly items: readonly {
|
|
@@ -54,6 +55,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
54
55
|
readonly mode: "formula" | "prefill";
|
|
55
56
|
readonly expression: string;
|
|
56
57
|
} | undefined;
|
|
58
|
+
readonly validations?: readonly {
|
|
59
|
+
readonly message: readonly [{
|
|
60
|
+
readonly locale: "zh";
|
|
61
|
+
readonly message: string;
|
|
62
|
+
}, ...{
|
|
63
|
+
readonly locale: "en" | "ja" | "ko";
|
|
64
|
+
readonly message: string;
|
|
65
|
+
}[]];
|
|
66
|
+
readonly warning?: boolean | undefined;
|
|
67
|
+
readonly when: string;
|
|
68
|
+
}[] | undefined;
|
|
57
69
|
}) => any;
|
|
58
70
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
59
71
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -75,6 +87,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
75
87
|
readonly locale: "en" | "ja" | "ko";
|
|
76
88
|
readonly message: string;
|
|
77
89
|
}[]] | undefined;
|
|
90
|
+
readonly required?: string | undefined;
|
|
78
91
|
readonly displayName?: string | undefined;
|
|
79
92
|
readonly compatibilityDate: "2026-05-17";
|
|
80
93
|
readonly items: readonly {
|
|
@@ -107,6 +120,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
107
120
|
readonly mode: "formula" | "prefill";
|
|
108
121
|
readonly expression: string;
|
|
109
122
|
} | undefined;
|
|
123
|
+
readonly validations?: readonly {
|
|
124
|
+
readonly message: readonly [{
|
|
125
|
+
readonly locale: "zh";
|
|
126
|
+
readonly message: string;
|
|
127
|
+
}, ...{
|
|
128
|
+
readonly locale: "en" | "ja" | "ko";
|
|
129
|
+
readonly message: string;
|
|
130
|
+
}[]];
|
|
131
|
+
readonly warning?: boolean | undefined;
|
|
132
|
+
readonly when: string;
|
|
133
|
+
}[] | undefined;
|
|
110
134
|
}) => any) | undefined;
|
|
111
135
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
112
136
|
declare const _default: typeof __VLS_export;
|
|
@@ -7,8 +7,9 @@ import { celBindings, injectCELContext } from "../../../../../utils/cel-context"
|
|
|
7
7
|
import { interpolateMarkdown } from "../../../../table/utils/runtime";
|
|
8
8
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
9
9
|
import { Checkbox } from "../../../../ui/checkbox";
|
|
10
|
-
import { Field, FieldLabel } from "../../../../ui/field";
|
|
10
|
+
import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
|
|
11
11
|
import { Markdown } from "../../../../ui/markdown";
|
|
12
|
+
import { useFieldValidation } from "../../../utils/validation";
|
|
12
13
|
import { useFormReadonly } from "../../../utils/readonly";
|
|
13
14
|
import { useFormState } from "../../../utils/state";
|
|
14
15
|
defineOptions({ name: "ShwfedCheckboxGroupFieldRuntime" });
|
|
@@ -40,6 +41,12 @@ function evalBool(expression, label) {
|
|
|
40
41
|
return false;
|
|
41
42
|
}
|
|
42
43
|
}
|
|
44
|
+
const { isRequired, errors, warnings, visible } = useFieldValidation({
|
|
45
|
+
fieldId: () => props.fieldId,
|
|
46
|
+
config: () => props.config,
|
|
47
|
+
$cel,
|
|
48
|
+
locale: () => locale.value
|
|
49
|
+
});
|
|
43
50
|
const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
|
|
44
51
|
const formReadonly = useFormReadonly();
|
|
45
52
|
const isReadonly = computed(
|
|
@@ -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"
|
|
@@ -172,5 +183,10 @@ const readonlyText = computed(() => {
|
|
|
172
183
|
</span>
|
|
173
184
|
</label>
|
|
174
185
|
</div>
|
|
186
|
+
<FieldMessages
|
|
187
|
+
v-if="visible"
|
|
188
|
+
:errors="errors"
|
|
189
|
+
:warnings="warnings"
|
|
190
|
+
/>
|
|
175
191
|
</Field>
|
|
176
192
|
</template>
|
|
@@ -115,6 +115,24 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
115
115
|
id: Schema.refine<string, typeof Schema.String>;
|
|
116
116
|
displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
117
117
|
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
|
118
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
119
|
+
validations: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
120
|
+
when: Schema.Schema<string, string, never>;
|
|
121
|
+
warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
122
|
+
message: Schema.refine<readonly [{
|
|
123
|
+
readonly locale: "zh";
|
|
124
|
+
readonly message: string;
|
|
125
|
+
}, ...{
|
|
126
|
+
readonly locale: "en" | "ja" | "ko";
|
|
127
|
+
readonly message: string;
|
|
128
|
+
}[]], Schema.TupleType<readonly [Schema.Struct<{
|
|
129
|
+
locale: Schema.Literal<["zh"]>;
|
|
130
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
131
|
+
}>], [Schema.Struct<{
|
|
132
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
133
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
134
|
+
}>]>>;
|
|
135
|
+
}>>>;
|
|
118
136
|
type: Schema.Literal<["com.shwfed.form.field.checkbox.group"]>;
|
|
119
137
|
compatibilityDate: Schema.Literal<["2026-05-17"]>;
|
|
120
138
|
}>;
|
|
@@ -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-05-17";
|
|
27
28
|
readonly items: readonly {
|
|
@@ -54,6 +55,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
54
55
|
readonly mode: "formula" | "prefill";
|
|
55
56
|
readonly expression: string;
|
|
56
57
|
} | undefined;
|
|
58
|
+
readonly validations?: readonly {
|
|
59
|
+
readonly message: readonly [{
|
|
60
|
+
readonly locale: "zh";
|
|
61
|
+
readonly message: string;
|
|
62
|
+
}, ...{
|
|
63
|
+
readonly locale: "en" | "ja" | "ko";
|
|
64
|
+
readonly message: string;
|
|
65
|
+
}[]];
|
|
66
|
+
readonly warning?: boolean | undefined;
|
|
67
|
+
readonly when: string;
|
|
68
|
+
}[] | undefined;
|
|
57
69
|
}) => any;
|
|
58
70
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
59
71
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -75,6 +87,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
75
87
|
readonly locale: "en" | "ja" | "ko";
|
|
76
88
|
readonly message: string;
|
|
77
89
|
}[]] | undefined;
|
|
90
|
+
readonly required?: string | undefined;
|
|
78
91
|
readonly displayName?: string | undefined;
|
|
79
92
|
readonly compatibilityDate: "2026-05-17";
|
|
80
93
|
readonly items: readonly {
|
|
@@ -107,6 +120,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
107
120
|
readonly mode: "formula" | "prefill";
|
|
108
121
|
readonly expression: string;
|
|
109
122
|
} | undefined;
|
|
123
|
+
readonly validations?: readonly {
|
|
124
|
+
readonly message: readonly [{
|
|
125
|
+
readonly locale: "zh";
|
|
126
|
+
readonly message: string;
|
|
127
|
+
}, ...{
|
|
128
|
+
readonly locale: "en" | "ja" | "ko";
|
|
129
|
+
readonly message: string;
|
|
130
|
+
}[]];
|
|
131
|
+
readonly warning?: boolean | undefined;
|
|
132
|
+
readonly when: string;
|
|
133
|
+
}[] | undefined;
|
|
110
134
|
}) => any) | undefined;
|
|
111
135
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
112
136
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue
CHANGED
|
@@ -5,6 +5,7 @@ import { Button } from "../../../../ui/button";
|
|
|
5
5
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../../../ui/dropdown-menu";
|
|
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, InputGroupNumberField } from "../../../../ui/input-group";
|
|
10
11
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
@@ -343,6 +344,26 @@ function setItemTooltip(index, tooltip) {
|
|
|
343
344
|
</Field>
|
|
344
345
|
|
|
345
346
|
<div class="grid grid-cols-3 gap-3">
|
|
347
|
+
<Field orientation="vertical">
|
|
348
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
349
|
+
<template #tooltip>
|
|
350
|
+
<Markdown
|
|
351
|
+
:source="fieldDescription('required') ?? '\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A'"
|
|
352
|
+
block
|
|
353
|
+
class="prose prose-sm prose-zinc"
|
|
354
|
+
/>
|
|
355
|
+
</template>
|
|
356
|
+
{{ fieldTitle("required") }}
|
|
357
|
+
</FieldLabel>
|
|
358
|
+
<ExpressionEditor
|
|
359
|
+
:model-value="value.required ?? ''"
|
|
360
|
+
placeholder="例:form.type == 'company'"
|
|
361
|
+
result-type="bool"
|
|
362
|
+
class="min-h-10"
|
|
363
|
+
@update:model-value="(v) => value = { ...value, required: v.length > 0 ? v : void 0 }"
|
|
364
|
+
/>
|
|
365
|
+
</Field>
|
|
366
|
+
|
|
346
367
|
<Field orientation="vertical">
|
|
347
368
|
<FieldLabel class="text-xs text-zinc-500">
|
|
348
369
|
<template #tooltip>
|
|
@@ -422,5 +443,22 @@ function setItemTooltip(index, tooltip) {
|
|
|
422
443
|
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
423
444
|
/>
|
|
424
445
|
</Field>
|
|
446
|
+
|
|
447
|
+
<Field orientation="vertical">
|
|
448
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
449
|
+
<template #tooltip>
|
|
450
|
+
<Markdown
|
|
451
|
+
:source="fieldDescription('validations')"
|
|
452
|
+
block
|
|
453
|
+
class="prose prose-sm prose-zinc"
|
|
454
|
+
/>
|
|
455
|
+
</template>
|
|
456
|
+
{{ fieldTitle("validations") }}
|
|
457
|
+
</FieldLabel>
|
|
458
|
+
<ValidationRulesField
|
|
459
|
+
:model-value="value.validations"
|
|
460
|
+
@update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
|
|
461
|
+
/>
|
|
462
|
+
</Field>
|
|
425
463
|
</div>
|
|
426
464
|
</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-05-17";
|
|
27
28
|
readonly items: readonly {
|
|
@@ -54,6 +55,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
54
55
|
readonly mode: "formula" | "prefill";
|
|
55
56
|
readonly expression: string;
|
|
56
57
|
} | undefined;
|
|
58
|
+
readonly validations?: readonly {
|
|
59
|
+
readonly message: readonly [{
|
|
60
|
+
readonly locale: "zh";
|
|
61
|
+
readonly message: string;
|
|
62
|
+
}, ...{
|
|
63
|
+
readonly locale: "en" | "ja" | "ko";
|
|
64
|
+
readonly message: string;
|
|
65
|
+
}[]];
|
|
66
|
+
readonly warning?: boolean | undefined;
|
|
67
|
+
readonly when: string;
|
|
68
|
+
}[] | undefined;
|
|
57
69
|
}) => any;
|
|
58
70
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
59
71
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -75,6 +87,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
75
87
|
readonly locale: "en" | "ja" | "ko";
|
|
76
88
|
readonly message: string;
|
|
77
89
|
}[]] | undefined;
|
|
90
|
+
readonly required?: string | undefined;
|
|
78
91
|
readonly displayName?: string | undefined;
|
|
79
92
|
readonly compatibilityDate: "2026-05-17";
|
|
80
93
|
readonly items: readonly {
|
|
@@ -107,6 +120,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
107
120
|
readonly mode: "formula" | "prefill";
|
|
108
121
|
readonly expression: string;
|
|
109
122
|
} | undefined;
|
|
123
|
+
readonly validations?: readonly {
|
|
124
|
+
readonly message: readonly [{
|
|
125
|
+
readonly locale: "zh";
|
|
126
|
+
readonly message: string;
|
|
127
|
+
}, ...{
|
|
128
|
+
readonly locale: "en" | "ja" | "ko";
|
|
129
|
+
readonly message: string;
|
|
130
|
+
}[]];
|
|
131
|
+
readonly warning?: boolean | undefined;
|
|
132
|
+
readonly when: string;
|
|
133
|
+
}[] | undefined;
|
|
110
134
|
}) => any) | undefined;
|
|
111
135
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
112
136
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue
CHANGED
|
@@ -7,8 +7,9 @@ import { celBindings, injectCELContext } from "../../../../../utils/cel-context"
|
|
|
7
7
|
import { interpolateMarkdown } from "../../../../table/utils/runtime";
|
|
8
8
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
9
9
|
import { RadioGroup, RadioGroupItem } from "../../../../ui/radio-group";
|
|
10
|
-
import { Field, FieldLabel } from "../../../../ui/field";
|
|
10
|
+
import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
|
|
11
11
|
import { Markdown } from "../../../../ui/markdown";
|
|
12
|
+
import { useFieldValidation } from "../../../utils/validation";
|
|
12
13
|
import { useFormReadonly } from "../../../utils/readonly";
|
|
13
14
|
import { useFormState } from "../../../utils/state";
|
|
14
15
|
defineOptions({ name: "ShwfedRadioGroupFieldRuntime" });
|
|
@@ -40,6 +41,12 @@ function evalBool(expression, label) {
|
|
|
40
41
|
return false;
|
|
41
42
|
}
|
|
42
43
|
}
|
|
44
|
+
const { isRequired, errors, warnings, visible } = useFieldValidation({
|
|
45
|
+
fieldId: () => props.fieldId,
|
|
46
|
+
config: () => props.config,
|
|
47
|
+
$cel,
|
|
48
|
+
locale: () => locale.value
|
|
49
|
+
});
|
|
43
50
|
const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
|
|
44
51
|
const formReadonly = useFormReadonly();
|
|
45
52
|
const isReadonly = computed(
|
|
@@ -111,7 +118,11 @@ const readonlyText = computed(() => {
|
|
|
111
118
|
class="prose prose-xs prose-zinc"
|
|
112
119
|
/>
|
|
113
120
|
</template>
|
|
114
|
-
{{ labelText }}
|
|
121
|
+
{{ labelText }}<span
|
|
122
|
+
v-if="isRequired"
|
|
123
|
+
aria-hidden="true"
|
|
124
|
+
class="text-red-600"
|
|
125
|
+
> *</span>
|
|
115
126
|
</FieldLabel>
|
|
116
127
|
<div
|
|
117
128
|
v-if="effectiveReadonly"
|
|
@@ -155,5 +166,10 @@ const readonlyText = computed(() => {
|
|
|
155
166
|
</span>
|
|
156
167
|
</label>
|
|
157
168
|
</RadioGroup>
|
|
169
|
+
<FieldMessages
|
|
170
|
+
v-if="visible"
|
|
171
|
+
:errors="errors"
|
|
172
|
+
:warnings="warnings"
|
|
173
|
+
/>
|
|
158
174
|
</Field>
|
|
159
175
|
</template>
|
package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts
CHANGED
|
@@ -115,6 +115,24 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
115
115
|
id: Schema.refine<string, typeof Schema.String>;
|
|
116
116
|
displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
117
117
|
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
|
118
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
119
|
+
validations: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
120
|
+
when: Schema.Schema<string, string, never>;
|
|
121
|
+
warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
122
|
+
message: Schema.refine<readonly [{
|
|
123
|
+
readonly locale: "zh";
|
|
124
|
+
readonly message: string;
|
|
125
|
+
}, ...{
|
|
126
|
+
readonly locale: "en" | "ja" | "ko";
|
|
127
|
+
readonly message: string;
|
|
128
|
+
}[]], Schema.TupleType<readonly [Schema.Struct<{
|
|
129
|
+
locale: Schema.Literal<["zh"]>;
|
|
130
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
131
|
+
}>], [Schema.Struct<{
|
|
132
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
133
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
134
|
+
}>]>>;
|
|
135
|
+
}>>>;
|
|
118
136
|
type: Schema.Literal<["com.shwfed.form.field.radio.group"]>;
|
|
119
137
|
compatibilityDate: Schema.Literal<["2026-05-17"]>;
|
|
120
138
|
}>;
|
package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts
CHANGED
|
@@ -61,9 +61,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
61
61
|
readonly locale: "en" | "ja" | "ko";
|
|
62
62
|
readonly message: string;
|
|
63
63
|
}[]] | undefined;
|
|
64
|
+
readonly required?: string | undefined;
|
|
64
65
|
readonly displayName?: string | undefined;
|
|
65
66
|
readonly compatibilityDate: "2026-05-18";
|
|
66
67
|
readonly binding?: string | undefined;
|
|
68
|
+
readonly validations?: readonly {
|
|
69
|
+
readonly message: readonly [{
|
|
70
|
+
readonly locale: "zh";
|
|
71
|
+
readonly message: string;
|
|
72
|
+
}, ...{
|
|
73
|
+
readonly locale: "en" | "ja" | "ko";
|
|
74
|
+
readonly message: string;
|
|
75
|
+
}[]];
|
|
76
|
+
readonly warning?: boolean | undefined;
|
|
77
|
+
readonly when: string;
|
|
78
|
+
}[] | undefined;
|
|
67
79
|
}) => any;
|
|
68
80
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
69
81
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -124,9 +136,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
124
136
|
readonly locale: "en" | "ja" | "ko";
|
|
125
137
|
readonly message: string;
|
|
126
138
|
}[]] | undefined;
|
|
139
|
+
readonly required?: string | undefined;
|
|
127
140
|
readonly displayName?: string | undefined;
|
|
128
141
|
readonly compatibilityDate: "2026-05-18";
|
|
129
142
|
readonly binding?: string | undefined;
|
|
143
|
+
readonly validations?: readonly {
|
|
144
|
+
readonly message: readonly [{
|
|
145
|
+
readonly locale: "zh";
|
|
146
|
+
readonly message: string;
|
|
147
|
+
}, ...{
|
|
148
|
+
readonly locale: "en" | "ja" | "ko";
|
|
149
|
+
readonly message: string;
|
|
150
|
+
}[]];
|
|
151
|
+
readonly warning?: boolean | undefined;
|
|
152
|
+
readonly when: string;
|
|
153
|
+
}[] | undefined;
|
|
130
154
|
}) => any) | undefined;
|
|
131
155
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
132
156
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, defineAsyncComponent, inject, onBeforeUnmount, onMounted } from "vue";
|
|
3
3
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
4
|
+
import ValidationRulesField from "../../../ValidationRulesField.vue";
|
|
4
5
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
5
6
|
import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
|
|
6
7
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
@@ -59,7 +60,7 @@ const bindingText = computed({
|
|
|
59
60
|
hide-display-name
|
|
60
61
|
hide-data-source
|
|
61
62
|
>
|
|
62
|
-
<template #general-extra>
|
|
63
|
+
<template #general-grid-extra>
|
|
63
64
|
<Field orientation="vertical">
|
|
64
65
|
<FieldLabel class="text-xs text-zinc-500">
|
|
65
66
|
<template
|
|
@@ -82,7 +83,9 @@ const bindingText = computed({
|
|
|
82
83
|
/>
|
|
83
84
|
</InputGroup>
|
|
84
85
|
</Field>
|
|
86
|
+
</template>
|
|
85
87
|
|
|
88
|
+
<template #general-extra>
|
|
86
89
|
<div class="grid grid-cols-2 gap-3">
|
|
87
90
|
<Field orientation="vertical">
|
|
88
91
|
<FieldLabel class="text-xs text-zinc-500">
|
|
@@ -126,23 +129,62 @@ const bindingText = computed({
|
|
|
126
129
|
</Field>
|
|
127
130
|
</div>
|
|
128
131
|
|
|
132
|
+
<div class="grid grid-cols-2 gap-3">
|
|
133
|
+
<Field orientation="vertical">
|
|
134
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
135
|
+
<template #tooltip>
|
|
136
|
+
<Markdown
|
|
137
|
+
:source="fieldDescription('required') ?? '\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A'"
|
|
138
|
+
block
|
|
139
|
+
class="prose prose-sm prose-zinc"
|
|
140
|
+
/>
|
|
141
|
+
</template>
|
|
142
|
+
{{ fieldTitle("required") }}
|
|
143
|
+
</FieldLabel>
|
|
144
|
+
<ExpressionEditor
|
|
145
|
+
:model-value="value.required ?? ''"
|
|
146
|
+
placeholder="例:form.type == 'company'"
|
|
147
|
+
result-type="bool"
|
|
148
|
+
class="min-h-10"
|
|
149
|
+
@update:model-value="(v) => value = { ...value, required: v.length > 0 ? v : void 0 }"
|
|
150
|
+
/>
|
|
151
|
+
</Field>
|
|
152
|
+
|
|
153
|
+
<Field orientation="vertical">
|
|
154
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
155
|
+
<template #tooltip>
|
|
156
|
+
<Markdown
|
|
157
|
+
:source="fieldDescription('hidden') ?? '\u8FD4\u56DE `true` \u65F6\u5B57\u6BB5\u5728\u6240\u6709\u5E03\u5C40\u4E2D\u90FD\u4E0D\u6E32\u67D3'"
|
|
158
|
+
block
|
|
159
|
+
class="prose prose-sm prose-zinc"
|
|
160
|
+
/>
|
|
161
|
+
</template>
|
|
162
|
+
{{ fieldTitle("hidden") }}
|
|
163
|
+
</FieldLabel>
|
|
164
|
+
<ExpressionEditor
|
|
165
|
+
:model-value="value.hidden ?? ''"
|
|
166
|
+
placeholder="例:form.role == 'guest'"
|
|
167
|
+
result-type="bool"
|
|
168
|
+
class="min-h-10"
|
|
169
|
+
@update:model-value="(v) => value = { ...value, hidden: v.length > 0 ? v : void 0 }"
|
|
170
|
+
/>
|
|
171
|
+
</Field>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
129
174
|
<Field orientation="vertical">
|
|
130
175
|
<FieldLabel class="text-xs text-zinc-500">
|
|
131
176
|
<template #tooltip>
|
|
132
177
|
<Markdown
|
|
133
|
-
:source="fieldDescription('
|
|
178
|
+
:source="fieldDescription('validations')"
|
|
134
179
|
block
|
|
135
180
|
class="prose prose-sm prose-zinc"
|
|
136
181
|
/>
|
|
137
182
|
</template>
|
|
138
|
-
{{ fieldTitle("
|
|
183
|
+
{{ fieldTitle("validations") }}
|
|
139
184
|
</FieldLabel>
|
|
140
|
-
<
|
|
141
|
-
:model-value="value.
|
|
142
|
-
|
|
143
|
-
result-type="bool"
|
|
144
|
-
class="min-h-10"
|
|
145
|
-
@update:model-value="(v) => value = { ...value, hidden: v.length > 0 ? v : void 0 }"
|
|
185
|
+
<ValidationRulesField
|
|
186
|
+
:model-value="value.validations"
|
|
187
|
+
@update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
|
|
146
188
|
/>
|
|
147
189
|
</Field>
|
|
148
190
|
</template>
|
package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts
CHANGED
|
@@ -61,9 +61,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
61
61
|
readonly locale: "en" | "ja" | "ko";
|
|
62
62
|
readonly message: string;
|
|
63
63
|
}[]] | undefined;
|
|
64
|
+
readonly required?: string | undefined;
|
|
64
65
|
readonly displayName?: string | undefined;
|
|
65
66
|
readonly compatibilityDate: "2026-05-18";
|
|
66
67
|
readonly binding?: string | undefined;
|
|
68
|
+
readonly validations?: readonly {
|
|
69
|
+
readonly message: readonly [{
|
|
70
|
+
readonly locale: "zh";
|
|
71
|
+
readonly message: string;
|
|
72
|
+
}, ...{
|
|
73
|
+
readonly locale: "en" | "ja" | "ko";
|
|
74
|
+
readonly message: string;
|
|
75
|
+
}[]];
|
|
76
|
+
readonly warning?: boolean | undefined;
|
|
77
|
+
readonly when: string;
|
|
78
|
+
}[] | undefined;
|
|
67
79
|
}) => any;
|
|
68
80
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
69
81
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -124,9 +136,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
124
136
|
readonly locale: "en" | "ja" | "ko";
|
|
125
137
|
readonly message: string;
|
|
126
138
|
}[]] | undefined;
|
|
139
|
+
readonly required?: string | undefined;
|
|
127
140
|
readonly displayName?: string | undefined;
|
|
128
141
|
readonly compatibilityDate: "2026-05-18";
|
|
129
142
|
readonly binding?: string | undefined;
|
|
143
|
+
readonly validations?: readonly {
|
|
144
|
+
readonly message: readonly [{
|
|
145
|
+
readonly locale: "zh";
|
|
146
|
+
readonly message: string;
|
|
147
|
+
}, ...{
|
|
148
|
+
readonly locale: "en" | "ja" | "ko";
|
|
149
|
+
readonly message: string;
|
|
150
|
+
}[]];
|
|
151
|
+
readonly warning?: boolean | undefined;
|
|
152
|
+
readonly when: string;
|
|
153
|
+
}[] | undefined;
|
|
130
154
|
}) => any) | undefined;
|
|
131
155
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
132
156
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/runtime.vue
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, defineAsyncComponent } from "vue";
|
|
3
3
|
import { useI18n } from "vue-i18n";
|
|
4
|
+
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
5
|
+
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
4
6
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
5
|
-
import { Field, FieldLabel } from "../../../../ui/field";
|
|
7
|
+
import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
|
|
6
8
|
import { Markdown } from "../../../../ui/markdown";
|
|
9
|
+
import { useFieldValidation } from "../../../utils/validation";
|
|
7
10
|
import { useFormState } from "../../../utils/state";
|
|
8
11
|
defineOptions({ name: "ShwfedTableFieldRuntime" });
|
|
9
12
|
const ShwfedTable = defineAsyncComponent(() => import("../../../../table/index.vue"));
|
|
@@ -13,6 +16,14 @@ const props = defineProps({
|
|
|
13
16
|
});
|
|
14
17
|
const { locale } = useI18n();
|
|
15
18
|
const formState = useFormState();
|
|
19
|
+
const inherited = injectCELContext();
|
|
20
|
+
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
21
|
+
const { isRequired, errors, warnings, visible } = useFieldValidation({
|
|
22
|
+
fieldId: () => props.fieldId,
|
|
23
|
+
config: () => props.config,
|
|
24
|
+
$cel,
|
|
25
|
+
locale: () => locale.value
|
|
26
|
+
});
|
|
16
27
|
const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
|
|
17
28
|
const tooltipText = computed(
|
|
18
29
|
() => props.config.tooltip ? getLocalizedText(props.config.tooltip, locale.value) : void 0
|
|
@@ -52,12 +63,21 @@ const rowsModel = computed({
|
|
|
52
63
|
class="prose prose-xs prose-zinc"
|
|
53
64
|
/>
|
|
54
65
|
</template>
|
|
55
|
-
{{ labelText }}
|
|
66
|
+
{{ labelText }}<span
|
|
67
|
+
v-if="isRequired"
|
|
68
|
+
aria-hidden="true"
|
|
69
|
+
class="text-red-600"
|
|
70
|
+
> *</span>
|
|
56
71
|
</FieldLabel>
|
|
57
72
|
|
|
58
73
|
<ShwfedTable
|
|
59
74
|
v-model:rows="rowsModel"
|
|
60
75
|
:config="tableConfig"
|
|
61
76
|
/>
|
|
77
|
+
<FieldMessages
|
|
78
|
+
v-if="visible"
|
|
79
|
+
:errors="errors"
|
|
80
|
+
:warnings="warnings"
|
|
81
|
+
/>
|
|
62
82
|
</Field>
|
|
63
83
|
</template>
|