@shwfed/config 2.4.0 → 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 +43 -5
- package/dist/module.json +1 -1
- package/dist/preview/assets/{config-CZ0f5xdI.js → config-BovRv7Mw.js} +1 -1
- package/dist/preview/assets/{config-BcQQl4v6.js → config-ByTxMBcK.js} +1 -1
- package/dist/preview/assets/{config-Ddh8pxIi.js → config-C7xYpB3N.js} +1 -1
- package/dist/preview/assets/{config-Bi9F-Jdh.js → config-CH9wsYX8.js} +1 -1
- package/dist/preview/assets/{config-C32yfrlg.js → config-Ch5dL5lp.js} +1 -1
- package/dist/preview/assets/{config-D9xGgFnF.js → config-D50Rl2n_.js} +1 -1
- package/dist/preview/assets/{config-CHHX7vhb.js → config-DiwVK32V.js} +1 -1
- package/dist/preview/assets/{config-BdFIFUa_.js → config-EKVeWrbS.js} +1 -1
- package/dist/preview/assets/{config-Bxkq2ZRm.js → config-Q86AhjHq.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-C_cjxvm1.js → definition.vue_vue_type_script_setup_true_lang-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/form/ValidationRulesField.d.vue.ts +16 -0
- package/dist/runtime/components/form/ValidationRulesField.vue +207 -0
- package/dist/runtime/components/form/ValidationRulesField.vue.d.ts +16 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +30 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue +51 -9
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/runtime.vue +22 -2
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/runtime.vue +26 -0
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/index.d.vue.ts +1 -0
- package/dist/runtime/components/form/index.vue +9 -0
- package/dist/runtime/components/form/index.vue.d.ts +1 -0
- package/dist/runtime/components/form/schema.js +2 -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/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/config.vue +5 -0
- package/dist/runtime/components/table/config.vue.d.ts +4 -2
- 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-BqOX70Hd.css +0 -1
- package/dist/preview/assets/index-D-VR1i8D.js +0 -659
- package/dist/preview/assets/index-ihZGlPdX.js +0 -1
- package/dist/preview/assets/runtime-Bn8mqeDH.js +0 -1
- package/dist/preview/assets/runtime-Cc_Wk3o-.js +0 -1
- package/dist/preview/assets/runtime-CttAjIgg.js +0 -1
- package/dist/preview/assets/runtime-Cx4f2UTl.js +0 -1
- package/dist/preview/assets/runtime-D1dESjXR.js +0 -1
- package/dist/preview/assets/runtime-DIEP1Xbh.js +0 -1
- package/dist/preview/assets/runtime-DKceWuBx.js +0 -1
- package/dist/preview/assets/runtime-Dhid9O5c.js +0 -1
- package/dist/preview/assets/runtime-YMiqi6WY.js +0 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { computed, inject, nextTick, onScopeDispose, provide, ref } from "vue";
|
|
3
|
+
import { getLocalizedText } from "../../../share/locale.js";
|
|
4
|
+
import { interpolate } from "../../../utils/interpolate.js";
|
|
5
|
+
import { useFormState } from "./state.js";
|
|
6
|
+
const VALIDATION_KEY = Symbol("shwfed-form-validation");
|
|
7
|
+
export function provideValidation(host) {
|
|
8
|
+
const revealed = ref(false);
|
|
9
|
+
const entries = /* @__PURE__ */ new Map();
|
|
10
|
+
function union() {
|
|
11
|
+
const out = [];
|
|
12
|
+
for (const entry of entries.values()) out.push(...entry.results());
|
|
13
|
+
return out;
|
|
14
|
+
}
|
|
15
|
+
const provider = {
|
|
16
|
+
revealed,
|
|
17
|
+
reveal: () => {
|
|
18
|
+
revealed.value = true;
|
|
19
|
+
},
|
|
20
|
+
register: (fieldId, results) => {
|
|
21
|
+
const token = Symbol("field");
|
|
22
|
+
entries.set(token, { fieldId, results });
|
|
23
|
+
return () => {
|
|
24
|
+
entries.delete(token);
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
async validate() {
|
|
28
|
+
host.flush();
|
|
29
|
+
await host.seeded;
|
|
30
|
+
await host.settled();
|
|
31
|
+
await nextTick();
|
|
32
|
+
const results = union();
|
|
33
|
+
provider.reveal();
|
|
34
|
+
return results.every((r) => r.severity !== "error");
|
|
35
|
+
},
|
|
36
|
+
resultsFor(fieldIds) {
|
|
37
|
+
const wanted = new Set(fieldIds);
|
|
38
|
+
const out = [];
|
|
39
|
+
for (const entry of entries.values()) {
|
|
40
|
+
if (wanted.has(entry.fieldId())) out.push(...entry.results());
|
|
41
|
+
}
|
|
42
|
+
return out;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
provide(VALIDATION_KEY, provider);
|
|
46
|
+
return provider;
|
|
47
|
+
}
|
|
48
|
+
export function useValidationProvider() {
|
|
49
|
+
return inject(VALIDATION_KEY, void 0);
|
|
50
|
+
}
|
|
51
|
+
const DEFAULT_REQUIRED_MESSAGE = {
|
|
52
|
+
zh: "\u8BF7\u586B\u5199\u6B64\u5B57\u6BB5",
|
|
53
|
+
ja: "\u3053\u306E\u9805\u76EE\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
54
|
+
en: "Please fill in this field",
|
|
55
|
+
ko: "\uC774 \uD56D\uBAA9\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694"
|
|
56
|
+
};
|
|
57
|
+
function defaultRequiredMessage(locale) {
|
|
58
|
+
return DEFAULT_REQUIRED_MESSAGE[locale] ?? DEFAULT_REQUIRED_MESSAGE.zh;
|
|
59
|
+
}
|
|
60
|
+
function isEmptyValue(value) {
|
|
61
|
+
return value == null || value === "" || Array.isArray(value) && value.length === 0;
|
|
62
|
+
}
|
|
63
|
+
export function useFieldValidation(options) {
|
|
64
|
+
const { getAt, dirty } = useFormState();
|
|
65
|
+
const provider = useValidationProvider();
|
|
66
|
+
function evalBool(expression) {
|
|
67
|
+
if (!expression) return false;
|
|
68
|
+
try {
|
|
69
|
+
return Effect.runSync(options.$cel(expression));
|
|
70
|
+
} catch {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const isRequired = computed(() => evalBool(options.config().required));
|
|
75
|
+
function resolveMessage(message) {
|
|
76
|
+
const template = getLocalizedText(message, options.locale()) ?? "";
|
|
77
|
+
if (!template) return "";
|
|
78
|
+
return interpolate(template, (expression) => {
|
|
79
|
+
try {
|
|
80
|
+
const out = Effect.runSync(options.$cel(expression));
|
|
81
|
+
return out == null ? "" : String(out);
|
|
82
|
+
} catch {
|
|
83
|
+
return "";
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
const results = computed(() => {
|
|
88
|
+
const config = options.config();
|
|
89
|
+
const out = [];
|
|
90
|
+
if (typeof config.binding === "string" && isRequired.value && isEmptyValue(getAt(config.binding))) {
|
|
91
|
+
out.push({ severity: "error", message: defaultRequiredMessage(options.locale()), ruleIndex: -1 });
|
|
92
|
+
}
|
|
93
|
+
const rules = config.validations ?? [];
|
|
94
|
+
rules.forEach((rule, ruleIndex) => {
|
|
95
|
+
if (!evalBool(rule.when)) return;
|
|
96
|
+
const severity = rule.warning ? "warning" : "error";
|
|
97
|
+
out.push({ severity, message: resolveMessage(rule.message), ruleIndex });
|
|
98
|
+
});
|
|
99
|
+
return out;
|
|
100
|
+
});
|
|
101
|
+
if (provider) {
|
|
102
|
+
const unregister = provider.register(options.fieldId, () => results.value);
|
|
103
|
+
onScopeDispose(unregister);
|
|
104
|
+
}
|
|
105
|
+
const errors = computed(() => results.value.filter((r) => r.severity === "error").map((r) => r.message));
|
|
106
|
+
const warnings = computed(() => results.value.filter((r) => r.severity === "warning").map((r) => r.message));
|
|
107
|
+
const visible = computed(() => {
|
|
108
|
+
if (provider?.revealed.value) return true;
|
|
109
|
+
const binding = options.config().binding;
|
|
110
|
+
return typeof binding === "string" && dirty.value.has(binding);
|
|
111
|
+
});
|
|
112
|
+
return { isRequired, errors, warnings, visible };
|
|
113
|
+
}
|
|
@@ -9,9 +9,11 @@ type __VLS_ModelProps = {
|
|
|
9
9
|
modelValue: AnyRecord;
|
|
10
10
|
};
|
|
11
11
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare var __VLS_219: {};
|
|
12
|
+
declare var __VLS_219: {}, __VLS_221: {};
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
|
-
'general-extra'?: (props: typeof __VLS_219) => any;
|
|
14
|
+
'general-grid-extra'?: (props: typeof __VLS_219) => any;
|
|
15
|
+
} & {
|
|
16
|
+
'general-extra'?: (props: typeof __VLS_221) => any;
|
|
15
17
|
};
|
|
16
18
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
19
|
"update:modelValue": (value: AnyRecord) => any;
|
|
@@ -1319,6 +1319,11 @@ const tableQueryValue = computed({
|
|
|
1319
1319
|
{{ getError("rowKey") }}
|
|
1320
1320
|
</p>
|
|
1321
1321
|
</Field>
|
|
1322
|
+
|
|
1323
|
+
<!-- Host slot inside the general grid: a wrapping editor (e.g. the
|
|
1324
|
+
`table` form field, which hides 内部名称) drops a field into
|
|
1325
|
+
the cell next to 行唯一标识 so the two sit on one row. -->
|
|
1326
|
+
<slot name="general-grid-extra" />
|
|
1322
1327
|
</div>
|
|
1323
1328
|
|
|
1324
1329
|
<!-- Host extension slot: a wrapping editor (e.g. the `table` form
|
|
@@ -9,9 +9,11 @@ type __VLS_ModelProps = {
|
|
|
9
9
|
modelValue: AnyRecord;
|
|
10
10
|
};
|
|
11
11
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare var __VLS_219: {};
|
|
12
|
+
declare var __VLS_219: {}, __VLS_221: {};
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
|
-
'general-extra'?: (props: typeof __VLS_219) => any;
|
|
14
|
+
'general-grid-extra'?: (props: typeof __VLS_219) => any;
|
|
15
|
+
} & {
|
|
16
|
+
'general-extra'?: (props: typeof __VLS_221) => any;
|
|
15
17
|
};
|
|
16
18
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
19
|
"update:modelValue": (value: AnyRecord) => any;
|
|
@@ -84,10 +84,10 @@ export function editableHeader(titleText) {
|
|
|
84
84
|
export function registerRowVariablesIfAbsent(env) {
|
|
85
85
|
const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
|
|
86
86
|
if (!declared.has("row")) {
|
|
87
|
-
env.registerVariable("row", "dyn", { description: "\u5F53\u524D\u884C\u6570\u636E" });
|
|
87
|
+
env.registerVariable("row", "dyn", { label: "\u5F53\u524D\u884C", description: "\u5F53\u524D\u884C\u6570\u636E" });
|
|
88
88
|
}
|
|
89
89
|
if (!declared.has("index")) {
|
|
90
|
-
env.registerVariable("index", "number", { description: "\u884C\u7D22\u5F15" });
|
|
90
|
+
env.registerVariable("index", "number", { label: "\u884C\u5E8F\u53F7", description: "\u884C\u7D22\u5F15" });
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
function configureWithRow(configure) {
|
|
@@ -28,7 +28,7 @@ const content = computed(() => {
|
|
|
28
28
|
v-if="$slots.default || content"
|
|
29
29
|
role="alert"
|
|
30
30
|
data-slot="field-error"
|
|
31
|
-
:class="cn('
|
|
31
|
+
:class="cn('max-w-full pt-0.25 text-red-600 text-xs leading-tight font-normal', props.class)"
|
|
32
32
|
>
|
|
33
33
|
<slot v-if="$slots.default" />
|
|
34
34
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
errors?: ReadonlyArray<string>;
|
|
5
|
+
warnings?: ReadonlyArray<string>;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { cn } from "../../../utils/cn";
|
|
3
|
+
import FieldError from "./FieldError.vue";
|
|
4
|
+
import FieldWarning from "./FieldWarning.vue";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
7
|
+
errors: { type: Array, required: false },
|
|
8
|
+
warnings: { type: Array, required: false }
|
|
9
|
+
});
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div
|
|
14
|
+
v-if="errors && errors.length || warnings && warnings.length"
|
|
15
|
+
data-slot="field-messages"
|
|
16
|
+
:class="cn('absolute left-0 top-full z-10 flex w-full flex-col gap-0.5', props.class)"
|
|
17
|
+
>
|
|
18
|
+
<FieldError :errors="errors ? [...errors] : void 0" />
|
|
19
|
+
<FieldWarning :errors="warnings ? [...warnings] : void 0" />
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
errors?: ReadonlyArray<string>;
|
|
5
|
+
warnings?: ReadonlyArray<string>;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
errors?: Array<string | {
|
|
5
|
+
message: string | undefined;
|
|
6
|
+
} | undefined>;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_1: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_1) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { cn } from "../../../utils/cn";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
6
|
+
errors: { type: Array, required: false }
|
|
7
|
+
});
|
|
8
|
+
const content = computed(() => {
|
|
9
|
+
if (!props.errors || props.errors.length === 0)
|
|
10
|
+
return null;
|
|
11
|
+
const unique = [
|
|
12
|
+
...new Map(
|
|
13
|
+
props.errors.filter(Boolean).map((error) => {
|
|
14
|
+
const message = typeof error === "string" ? error : error?.message;
|
|
15
|
+
return [message, error];
|
|
16
|
+
})
|
|
17
|
+
).values()
|
|
18
|
+
];
|
|
19
|
+
if (unique.length === 1 && unique[0]) {
|
|
20
|
+
return typeof unique[0] === "string" ? unique[0] : unique[0].message;
|
|
21
|
+
}
|
|
22
|
+
return unique.map((error) => typeof error === "string" ? error : error?.message);
|
|
23
|
+
});
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div
|
|
28
|
+
v-if="$slots.default || content"
|
|
29
|
+
role="status"
|
|
30
|
+
data-slot="field-warning"
|
|
31
|
+
:class="cn('max-w-full pt-0.25 text-amber-600 text-xs leading-tight font-normal', props.class)"
|
|
32
|
+
>
|
|
33
|
+
<slot v-if="$slots.default" />
|
|
34
|
+
|
|
35
|
+
<template v-else-if="typeof content === 'string'">
|
|
36
|
+
{{ content }}
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<ul
|
|
40
|
+
v-else-if="Array.isArray(content)"
|
|
41
|
+
class="ml-3 flex list-disc flex-col gap-0.5"
|
|
42
|
+
>
|
|
43
|
+
<li
|
|
44
|
+
v-for="(warning, index) in content"
|
|
45
|
+
:key="index"
|
|
46
|
+
>
|
|
47
|
+
{{ warning }}
|
|
48
|
+
</li>
|
|
49
|
+
</ul>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
errors?: Array<string | {
|
|
5
|
+
message: string | undefined;
|
|
6
|
+
} | undefined>;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_1: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_1) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -10,6 +10,8 @@ export { default as FieldError } from './FieldError.vue.js';
|
|
|
10
10
|
export { default as FieldGroup } from './FieldGroup.vue.js';
|
|
11
11
|
export { default as FieldLabel } from './FieldLabel.vue.js';
|
|
12
12
|
export { default as FieldLegend } from './FieldLegend.vue.js';
|
|
13
|
+
export { default as FieldMessages } from './FieldMessages.vue.js';
|
|
13
14
|
export { default as FieldSeparator } from './FieldSeparator.vue.js';
|
|
15
|
+
export { default as FieldWarning } from './FieldWarning.vue.js';
|
|
14
16
|
export { default as FieldSet } from './FieldSet.vue.js';
|
|
15
17
|
export { default as FieldTitle } from './FieldTitle.vue.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
export const fieldVariants = cva(
|
|
3
|
-
"group/field flex w-full gap-2 data-[invalid=true]:text-red-400",
|
|
3
|
+
"group/field relative flex w-full gap-2 data-[invalid=true]:text-red-400",
|
|
4
4
|
{
|
|
5
5
|
variants: {
|
|
6
6
|
orientation: {
|
|
@@ -25,11 +25,15 @@ export const fieldVariants = cva(
|
|
|
25
25
|
"**:data-[slot=field-label]:px-1",
|
|
26
26
|
"**:data-[slot=field-label]:text-sm",
|
|
27
27
|
"has-data-[value=true]:**:data-[slot=field-label]:text-[0.625rem]",
|
|
28
|
-
|
|
28
|
+
// Float on focus via `focus-within`, NOT `[data-slot=input-group-control]:focus`:
|
|
29
|
+
// `InputGroupInput`/`InputGroupTextarea` forward that slot to `Input`/`Textarea`,
|
|
30
|
+
// which hard-code `data-slot=input`/`textarea` on the focusable element, so the
|
|
31
|
+
// forwarded slot never lands there and the focus selector would never match.
|
|
32
|
+
"focus-within:**:data-[slot=field-label]:top-0",
|
|
29
33
|
"has-data-[state=open]:**:data-[slot=field-label]:top-0",
|
|
30
|
-
"
|
|
34
|
+
"focus-within:**:data-[slot=field-label]:text-[0.625rem]",
|
|
31
35
|
"has-data-[state=open]:**:data-[slot=field-label]:text-[0.625rem]",
|
|
32
|
-
"
|
|
36
|
+
"focus-within:**:data-[slot=field-label]:text-zinc-700",
|
|
33
37
|
"has-data-[state=open]:**:data-[slot=field-label]:text-zinc-700",
|
|
34
38
|
"has-data-[value=true]:**:data-[slot=field-label]:text-zinc-700",
|
|
35
39
|
"data-[disabled=true]:**:data-[slot=field-label]:text-zinc-400",
|
|
@@ -61,6 +65,8 @@ export { default as FieldError } from "./FieldError.vue";
|
|
|
61
65
|
export { default as FieldGroup } from "./FieldGroup.vue";
|
|
62
66
|
export { default as FieldLabel } from "./FieldLabel.vue";
|
|
63
67
|
export { default as FieldLegend } from "./FieldLegend.vue";
|
|
68
|
+
export { default as FieldMessages } from "./FieldMessages.vue";
|
|
64
69
|
export { default as FieldSeparator } from "./FieldSeparator.vue";
|
|
70
|
+
export { default as FieldWarning } from "./FieldWarning.vue";
|
|
65
71
|
export { default as FieldSet } from "./FieldSet.vue";
|
|
66
72
|
export { default as FieldTitle } from "./FieldTitle.vue";
|
|
@@ -5,6 +5,8 @@ type __VLS_Props = {
|
|
|
5
5
|
class?: HTMLAttributes['class'];
|
|
6
6
|
multiline?: boolean;
|
|
7
7
|
markdown?: boolean;
|
|
8
|
+
floating?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
8
10
|
translateHint?: string;
|
|
9
11
|
};
|
|
10
12
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|