@shwfed/config 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp.mjs +128 -27
- package/dist/module.json +1 -1
- package/dist/preview/assets/{config-Bxkq2ZRm.js → config-BkytEQN5.js} +1 -1
- package/dist/preview/assets/{config-BdFIFUa_.js → config-CK011_jJ.js} +1 -1
- package/dist/preview/assets/{config-BcQQl4v6.js → config-C_bBX0wD.js} +1 -1
- package/dist/preview/assets/{config-CHHX7vhb.js → config-Cbn8o9BY.js} +1 -1
- package/dist/preview/assets/{config-CZ0f5xdI.js → config-DYL6kHr3.js} +1 -1
- package/dist/preview/assets/{config-Ddh8pxIi.js → config-Dx0zHfGt.js} +1 -1
- package/dist/preview/assets/{config-D9xGgFnF.js → config-E-DM6b5t.js} +1 -1
- package/dist/preview/assets/{config-C32yfrlg.js → config-PjseWUbC.js} +1 -1
- package/dist/preview/assets/{config-Bi9F-Jdh.js → config-dwcdYHd4.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-C_cjxvm1.js → definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js} +1 -1
- package/dist/preview/assets/index-7MVXgV5n.css +1 -0
- package/dist/preview/assets/index-CmPiZG_4.js +1 -0
- package/dist/preview/assets/index-x-77enex.js +668 -0
- package/dist/preview/assets/runtime-BRMGkqSr.js +1 -0
- package/dist/preview/assets/runtime-CHLboM_z.js +1 -0
- package/dist/preview/assets/runtime-CeHdesjP.js +1 -0
- package/dist/preview/assets/runtime-D4_9FCLy.js +1 -0
- package/dist/preview/assets/runtime-DHBTDws7.js +1 -0
- package/dist/preview/assets/runtime-DJHpCLnr.js +1 -0
- package/dist/preview/assets/runtime-DKq86fZU.js +1 -0
- package/dist/preview/assets/runtime-DjpjaNec.js +1 -0
- package/dist/preview/assets/runtime-ZQryOEKm.js +1 -0
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue +7 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +1 -1
- package/dist/runtime/components/form/ValidationRulesField.d.vue.ts +16 -0
- package/dist/runtime/components/form/ValidationRulesField.vue +207 -0
- package/dist/runtime/components/form/ValidationRulesField.vue.d.ts +16 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +30 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue +51 -9
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/runtime.vue +22 -2
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/runtime.vue +26 -0
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue +38 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +24 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +18 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +18 -0
- package/dist/runtime/components/form/index.d.vue.ts +1 -0
- package/dist/runtime/components/form/index.vue +14 -18
- package/dist/runtime/components/form/index.vue.d.ts +1 -0
- package/dist/runtime/components/form/schema.d.ts +2 -10
- package/dist/runtime/components/form/schema.js +2 -5
- package/dist/runtime/components/form/utils/cel-scope.d.ts +12 -3
- package/dist/runtime/components/form/utils/cel-scope.js +17 -18
- package/dist/runtime/components/form/utils/common.d.ts +42 -0
- package/dist/runtime/components/form/utils/common.js +40 -2
- package/dist/runtime/components/form/utils/form-vars.d.ts +19 -0
- package/dist/runtime/components/form/utils/form-vars.js +5 -0
- package/dist/runtime/components/form/utils/validation.d.ts +85 -0
- package/dist/runtime/components/form/utils/validation.js +113 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/config.vue +25 -45
- package/dist/runtime/components/table/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/index.vue +22 -2
- package/dist/runtime/components/table/schema.d.ts +4 -2
- package/dist/runtime/components/table/schema.js +69 -13
- package/dist/runtime/components/table/utils/shared.d.ts +2 -0
- package/dist/runtime/components/table/utils/shared.js +12 -4
- package/dist/runtime/components/ui/field/FieldError.vue +1 -1
- package/dist/runtime/components/ui/field/FieldMessages.d.vue.ts +9 -0
- package/dist/runtime/components/ui/field/FieldMessages.vue +21 -0
- package/dist/runtime/components/ui/field/FieldMessages.vue.d.ts +9 -0
- package/dist/runtime/components/ui/field/FieldWarning.d.vue.ts +20 -0
- package/dist/runtime/components/ui/field/FieldWarning.vue +51 -0
- package/dist/runtime/components/ui/field/FieldWarning.vue.d.ts +20 -0
- package/dist/runtime/components/ui/field/index.d.ts +2 -0
- package/dist/runtime/components/ui/field/index.js +10 -4
- package/dist/runtime/components/ui/locale/Locale.d.vue.ts +2 -0
- package/dist/runtime/components/ui/locale/Locale.vue +165 -155
- package/dist/runtime/components/ui/locale/Locale.vue.d.ts +2 -0
- package/dist/runtime/share/form-validate.d.ts +18 -0
- package/dist/runtime/share/form-validate.js +8 -0
- package/package.json +1 -1
- package/dist/preview/assets/index-BqOX70Hd.css +0 -1
- package/dist/preview/assets/index-D-VR1i8D.js +0 -659
- package/dist/preview/assets/index-ihZGlPdX.js +0 -1
- package/dist/preview/assets/runtime-Bn8mqeDH.js +0 -1
- package/dist/preview/assets/runtime-Cc_Wk3o-.js +0 -1
- package/dist/preview/assets/runtime-CttAjIgg.js +0 -1
- package/dist/preview/assets/runtime-Cx4f2UTl.js +0 -1
- package/dist/preview/assets/runtime-D1dESjXR.js +0 -1
- package/dist/preview/assets/runtime-DIEP1Xbh.js +0 -1
- package/dist/preview/assets/runtime-DKceWuBx.js +0 -1
- package/dist/preview/assets/runtime-Dhid9O5c.js +0 -1
- package/dist/preview/assets/runtime-YMiqi6WY.js +0 -1
|
@@ -95,7 +95,13 @@ function getLocaleText(value) {
|
|
|
95
95
|
return getLocalizedText(value, locale.value);
|
|
96
96
|
}
|
|
97
97
|
function mergeCelContext(local) {
|
|
98
|
-
return { ...celBindings(inheritedContext), query: queryState.value, ...local };
|
|
98
|
+
return { ...celBindings(inheritedContext), query: queryState.value, sorts: currentSorts(), ...local };
|
|
99
|
+
}
|
|
100
|
+
function currentSorts() {
|
|
101
|
+
const sortKeyById = new Map(
|
|
102
|
+
(config.value?.columns ?? []).map((c) => [c.id, c.sortKey]).filter((e) => typeof e[1] === "string" && e[1].length > 0)
|
|
103
|
+
);
|
|
104
|
+
return tableApi.getState().sorting.map((s) => ({ key: sortKeyById.get(s.id), mode: s.desc ? "desc" : "asc" })).filter((s) => s.key !== void 0);
|
|
99
105
|
}
|
|
100
106
|
function translateColumn(column) {
|
|
101
107
|
const entry = findColumn(column.type, column.compatibilityDate);
|
|
@@ -222,6 +228,11 @@ const tableApi = useVueTable({
|
|
|
222
228
|
get manualPagination() {
|
|
223
229
|
return isManualPagination.value;
|
|
224
230
|
},
|
|
231
|
+
// Defer to server order under server pagination — the page only holds one
|
|
232
|
+
// server-sorted slice, so client re-sorting it would be wrong.
|
|
233
|
+
get manualSorting() {
|
|
234
|
+
return isManualPagination.value;
|
|
235
|
+
},
|
|
225
236
|
get rowCount() {
|
|
226
237
|
return isManualPagination.value ? serverTotal.value : void 0;
|
|
227
238
|
},
|
|
@@ -256,6 +267,14 @@ provideCELContext({
|
|
|
256
267
|
get value() {
|
|
257
268
|
return queryState.value;
|
|
258
269
|
}
|
|
270
|
+
},
|
|
271
|
+
sorts: {
|
|
272
|
+
type: "list<map<string, string>>",
|
|
273
|
+
label: "\u6392\u5E8F\u72B6\u6001",
|
|
274
|
+
description: '\u5F53\u524D\u6392\u5E8F\u5217\u8868\uFF0C\u6BCF\u9879\u4E3A `{key, mode}`\uFF1B`key` \u53D6\u81EA\u5217\u7684\u300C\u6392\u5E8F\u5B57\u6BB5\u300D(sortKey)\uFF0C`mode` \u4E3A `"asc"`/`"desc"`\uFF1B\u672A\u6392\u5E8F\u65F6\u4E3A\u7A7A\u6570\u7EC4\u3002',
|
|
275
|
+
get value() {
|
|
276
|
+
return currentSorts();
|
|
277
|
+
}
|
|
259
278
|
}
|
|
260
279
|
});
|
|
261
280
|
provideSharedFetchLayer();
|
|
@@ -423,7 +442,8 @@ watch(
|
|
|
423
442
|
() => {
|
|
424
443
|
if (!isManualPagination.value) return null;
|
|
425
444
|
const { pageIndex, pageSize } = tableApi.getState().pagination;
|
|
426
|
-
|
|
445
|
+
const sorting = tableApi.getState().sorting;
|
|
446
|
+
return `${pageIndex}:${pageSize}:${JSON.stringify(sorting)}`;
|
|
427
447
|
},
|
|
428
448
|
(next, prev) => {
|
|
429
449
|
if (next !== null && next !== prev) void fetchDataSource();
|
|
@@ -96,6 +96,8 @@ export declare const ColumnGroup: Schema.Struct<{
|
|
|
96
96
|
}>]>>;
|
|
97
97
|
}>;
|
|
98
98
|
export declare function configureTableActionsScope(env: Environment, configure: (env: Environment) => void): void;
|
|
99
|
+
export declare function registerDataSourceRequestVars(env: Environment): void;
|
|
100
|
+
export declare function registerDataSourceResponseVars(env: Environment): void;
|
|
99
101
|
export declare function DataSource(configure: (env: Environment) => void, extras?: {
|
|
100
102
|
request?: (env: Environment) => void;
|
|
101
103
|
data?: (env: Environment) => void;
|
|
@@ -104,9 +106,9 @@ export declare function DataSource(configure: (env: Environment) => void, extras
|
|
|
104
106
|
data: Schema.Schema<string, string, never>;
|
|
105
107
|
}>;
|
|
106
108
|
export declare function tableDataSource(configure: (env: Environment) => void): Schema.Struct<{
|
|
107
|
-
total: Schema.optional<Schema.Schema<string, string, never>>;
|
|
108
109
|
request: Schema.optional<Schema.Schema<string, string, never>>;
|
|
109
110
|
data: Schema.Schema<string, string, never>;
|
|
111
|
+
total: Schema.optional<Schema.Schema<string, string, never>>;
|
|
110
112
|
}>;
|
|
111
113
|
export declare function TableConfig(configure: (env: Environment) => void): Schema.refine<{
|
|
112
114
|
readonly style?: string | undefined;
|
|
@@ -304,9 +306,9 @@ export declare function TableConfig(configure: (env: Environment) => void): Sche
|
|
|
304
306
|
default: () => never[];
|
|
305
307
|
}>;
|
|
306
308
|
dataSource: Schema.optional<Schema.Struct<{
|
|
307
|
-
total: Schema.optional<Schema.Schema<string, string, never>>;
|
|
308
309
|
request: Schema.optional<Schema.Schema<string, string, never>>;
|
|
309
310
|
data: Schema.Schema<string, string, never>;
|
|
311
|
+
total: Schema.optional<Schema.Schema<string, string, never>>;
|
|
310
312
|
}>>;
|
|
311
313
|
actions: Schema.optional<Schema.Struct<{
|
|
312
314
|
size: Schema.optionalWith<Schema.Literal<["default", "sm", "xs"]>, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Expression } from "../../share/expression.js";
|
|
3
3
|
import { Locale } from "../../share/locale.js";
|
|
4
|
+
import { md } from "../../share/markdown.js";
|
|
4
5
|
import { ActionSchemaFields } from "../actions/schema.js";
|
|
5
6
|
import { FormConfig } from "../form/schema.js";
|
|
6
7
|
import { allColumnSchemas } from "./utils/resolve.js";
|
|
@@ -127,6 +128,15 @@ export const ColumnGroup = Schema.Struct({
|
|
|
127
128
|
description: "\u5217\u5206\u7EC4\u5B9A\u4E49"
|
|
128
129
|
});
|
|
129
130
|
const QUERY_VAR_DESCRIPTION = "\u641C\u7D22\u6761\u4EF6\u5F53\u524D\u72B6\u6001\uFF1B\u672A\u914D\u7F6E\u641C\u7D22\u6761\u4EF6\u65F6\u4E3A\u7A7A\u5BF9\u8C61";
|
|
131
|
+
const JSON_VAR_DESCRIPTION = "\u5DF2\u89E3\u6790\u7684 JSON \u54CD\u5E94\uFF1B\u672A\u914D\u7F6E `request` \u65F6\u4E3A `none`";
|
|
132
|
+
const SORTS_VAR_DESCRIPTION = md`
|
|
133
|
+
当前的排序状态,为一个**列表**,每个元素包含两个字段:
|
|
134
|
+
|
|
135
|
+
- \`key: string\` 为该列上配置的键
|
|
136
|
+
- \`mode: 'asc' | 'desc'\` 为该列的排序状态
|
|
137
|
+
|
|
138
|
+
未排序的字段,**不会出现在这个列表中**。
|
|
139
|
+
`;
|
|
130
140
|
export function configureTableActionsScope(env, configure) {
|
|
131
141
|
configure(env);
|
|
132
142
|
env.registerVariable("selected", "list<dyn>", {
|
|
@@ -137,6 +147,38 @@ export function configureTableActionsScope(env, configure) {
|
|
|
137
147
|
label: "\u641C\u7D22\u6761\u4EF6",
|
|
138
148
|
description: QUERY_VAR_DESCRIPTION
|
|
139
149
|
});
|
|
150
|
+
env.registerVariable("sorts", "list<map<string, string>>", {
|
|
151
|
+
label: "\u6392\u5E8F\u72B6\u6001",
|
|
152
|
+
description: SORTS_VAR_DESCRIPTION
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
export function registerDataSourceRequestVars(env) {
|
|
156
|
+
env.registerVariable("pageIndex", "number", {
|
|
157
|
+
label: "\u5F53\u524D\u9875\u7801",
|
|
158
|
+
description: "\u4ECE `0` \u5F00\u59CB\uFF1B\u672A\u542F\u7528\u5206\u9875\u65F6\u4E3A `0`"
|
|
159
|
+
});
|
|
160
|
+
env.registerVariable("pageSize", "number", {
|
|
161
|
+
label: "\u6BCF\u9875\u884C\u6570",
|
|
162
|
+
description: "\u5F53\u524D\u6BCF\u9875\u884C\u6570\uFF1B\u672A\u542F\u7528\u5206\u9875\u65F6\u4E3A `0`"
|
|
163
|
+
});
|
|
164
|
+
env.registerVariable("sorts", "list<map<string, string>>", {
|
|
165
|
+
label: "\u6392\u5E8F\u72B6\u6001",
|
|
166
|
+
description: SORTS_VAR_DESCRIPTION
|
|
167
|
+
});
|
|
168
|
+
env.registerVariable("query", "dyn", {
|
|
169
|
+
label: "\u641C\u7D22\u6761\u4EF6",
|
|
170
|
+
description: QUERY_VAR_DESCRIPTION
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
export function registerDataSourceResponseVars(env) {
|
|
174
|
+
env.registerVariable("json", "optional<dyn>", {
|
|
175
|
+
label: "HTTP \u54CD\u5E94\u4F53",
|
|
176
|
+
description: JSON_VAR_DESCRIPTION
|
|
177
|
+
});
|
|
178
|
+
env.registerVariable("query", "dyn", {
|
|
179
|
+
label: "\u641C\u7D22\u6761\u4EF6",
|
|
180
|
+
description: QUERY_VAR_DESCRIPTION
|
|
181
|
+
});
|
|
140
182
|
}
|
|
141
183
|
export function DataSource(configure, extras) {
|
|
142
184
|
const CelRequest = Expression({
|
|
@@ -171,28 +213,36 @@ export function DataSource(configure, extras) {
|
|
|
171
213
|
});
|
|
172
214
|
}
|
|
173
215
|
export function tableDataSource(configure) {
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
env
|
|
177
|
-
env
|
|
178
|
-
env.registerVariable("query", "dyn", { description: QUERY_VAR_DESCRIPTION });
|
|
216
|
+
const CelRequest = Expression({
|
|
217
|
+
configure: (env) => {
|
|
218
|
+
configure(env);
|
|
219
|
+
registerDataSourceRequestVars(env);
|
|
179
220
|
},
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
221
|
+
resultType: "HttpRequest"
|
|
222
|
+
});
|
|
223
|
+
const CelRows = Expression({
|
|
224
|
+
configure: (env) => {
|
|
225
|
+
configure(env);
|
|
226
|
+
registerDataSourceResponseVars(env);
|
|
227
|
+
},
|
|
228
|
+
resultType: (type) => type.startsWith("list") || type === "dyn" || type.startsWith("optional")
|
|
183
229
|
});
|
|
184
230
|
const CelTotal = Expression({
|
|
185
231
|
configure: (env) => {
|
|
186
232
|
configure(env);
|
|
187
|
-
env
|
|
188
|
-
description: "HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09\uFF1B\u672A\u914D\u7F6E request \u65F6\u4E3A none"
|
|
189
|
-
});
|
|
190
|
-
env.registerVariable("query", "dyn", { description: QUERY_VAR_DESCRIPTION });
|
|
233
|
+
registerDataSourceResponseVars(env);
|
|
191
234
|
},
|
|
192
235
|
resultType: (type) => type === "number" || type === "dyn" || type.startsWith("optional")
|
|
193
236
|
});
|
|
194
237
|
return Schema.Struct({
|
|
195
|
-
|
|
238
|
+
request: Schema.optional(CelRequest).annotations({
|
|
239
|
+
title: "\u8BF7\u6C42",
|
|
240
|
+
description: "\u53EF\u9009\u7684 HTTP \u8BF7\u6C42\u8868\u8FBE\u5F0F\uFF1B\u672A\u914D\u7F6E\u65F6\u6570\u636E\u4ECE `data` \u8868\u8FBE\u5F0F\u4E2D\u8BFB\u53D6\uFF08\u901A\u5E38\u5F15\u7528\u4E0A\u4E0B\u6587\u53D8\u91CF\uFF09"
|
|
241
|
+
}),
|
|
242
|
+
data: CelRows.annotations({
|
|
243
|
+
title: "\u6570\u636E",
|
|
244
|
+
description: "\u8FD4\u56DE\u884C\u6570\u636E\u5217\u8868\uFF08`list<dyn>`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u5728\u914D\u7F6E\u4E86 `request` \u65F6\u53EF\u901A\u8FC7 `json` \u5F15\u7528\u54CD\u5E94\u4F53"
|
|
245
|
+
}),
|
|
196
246
|
total: Schema.optional(CelTotal).annotations({
|
|
197
247
|
title: "\u603B\u6570",
|
|
198
248
|
description: "\u8FD4\u56DE\u603B\u884C\u6570\uFF08`number`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u914D\u7F6E\u540E\u542F\u7528\u670D\u52A1\u7AEF\u5206\u9875\uFF0C\u7559\u7A7A\u5219\u8D70\u524D\u7AEF\u5206\u9875"
|
|
@@ -283,6 +333,12 @@ export function TableConfig(configure) {
|
|
|
283
333
|
if (cfg.dataSource?.total !== void 0 && cfg.pagination === void 0) {
|
|
284
334
|
return "\u914D\u7F6E\u4E86 dataSource.total \u65F6\u5FC5\u987B\u542F\u7528\u5206\u9875";
|
|
285
335
|
}
|
|
336
|
+
for (const col of cfg.columns) {
|
|
337
|
+
const c = col;
|
|
338
|
+
if (c.enableSorting === true && (c.sortKey === void 0 || c.sortKey.length === 0)) {
|
|
339
|
+
return "\u542F\u7528\u6392\u5E8F\u7684\u5217\u5FC5\u987B\u586B\u5199\u300C\u6392\u5E8F\u5B57\u6BB5\u300D(sortKey)";
|
|
340
|
+
}
|
|
341
|
+
}
|
|
286
342
|
return true;
|
|
287
343
|
})).annotations({
|
|
288
344
|
title: "TableConfig",
|
|
@@ -17,6 +17,7 @@ export declare function columnFields(configure: (env: Environment) => void): {
|
|
|
17
17
|
}>]>;
|
|
18
18
|
accessor: Schema.Schema<string, string, never>;
|
|
19
19
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
20
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
20
21
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
21
22
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
22
23
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
@@ -39,6 +40,7 @@ export declare function editableColumnFields(): {
|
|
|
39
40
|
}>]>;
|
|
40
41
|
binding: Schema.refine<string, typeof Schema.String>;
|
|
41
42
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
43
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
42
44
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
43
45
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
44
46
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
@@ -36,9 +36,13 @@ export function columnFields(configure) {
|
|
|
36
36
|
| 数据量 | **全量**,能够跨越多页 | 当前页 |
|
|
37
37
|
| 开发量 | 需要后端支持,可能影响性能 | **配置即启用,无需后端支持** |
|
|
38
38
|
|
|
39
|
-
注意:对于服务端排序,除了在这里打开排序开关,你还需要在「通用配置 → 数据源 →
|
|
39
|
+
注意:对于服务端排序,除了在这里打开排序开关,你还需要在「通用配置 → 数据源 → 请求」处,通过 \`sorts\` 变量**将各列「排序字段」(sortKey)、排序方向传给后端**。
|
|
40
40
|
`
|
|
41
41
|
})),
|
|
42
|
+
sortKey: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
|
|
43
|
+
title: "\u6392\u5E8F\u5B57\u6BB5",
|
|
44
|
+
description: "\u670D\u52A1\u7AEF\u6392\u5E8F\u65F6\u901A\u8FC7\u6570\u636E\u6E90\u8BF7\u6C42\u7684 `sorts` \u53D8\u91CF\u4F20\u7ED9\u540E\u7AEF\u7684\u5B57\u6BB5\u6807\u8BC6\uFF1B\u542F\u7528\u6392\u5E8F\u65F6\u5FC5\u586B"
|
|
45
|
+
})),
|
|
42
46
|
size: Schema.optional(Schema.Number.pipe(Schema.finite(), Schema.positive()).annotations({
|
|
43
47
|
title: "\u5217\u5BBD",
|
|
44
48
|
description: "\u6307\u5B9A\u4E00\u4E2A\u5408\u9002\u7684\u8868\u683C\u5217\u5BBD\u5EA6\uFF0C\u5F53\u5217\u5185\u5BB9\u957F\u5EA6\u5927\u4E8E\u8FD9\u91CC\u6307\u5B9A\u7684\u5BBD\u5EA6\u540E\uFF0C\u4F1A\u5BFC\u81F4\u8D85\u51FA\u7684\u90E8\u5206\u88AB\u622A\u65AD\u3002"
|
|
@@ -57,7 +61,11 @@ export function editableColumnFields() {
|
|
|
57
61
|
}),
|
|
58
62
|
enableSorting: Schema.optional(Schema.Boolean.annotations({
|
|
59
63
|
title: "\u5141\u8BB8\u6392\u5E8F",
|
|
60
|
-
description: "\u663E\u793A\u6392\u5E8F\u6309\u94AE\uFF1B\
|
|
64
|
+
description: "\u663E\u793A\u6392\u5E8F\u6309\u94AE\uFF1B\u5BA2\u6237\u7AEF\u6392\u5E8F\u6309\u5F53\u524D `binding` \u8DEF\u5F84\u4E0A\u7684\u503C\u6392\u5E8F\uFF0C\u670D\u52A1\u7AEF\u6392\u5E8F\u5219\u901A\u8FC7\u6570\u636E\u6E90\u8BF7\u6C42\u7684 `sorts` \u53D8\u91CF\u5C06\u300C\u6392\u5E8F\u5B57\u6BB5\u300D(sortKey) \u4F20\u7ED9\u540E\u7AEF"
|
|
65
|
+
})),
|
|
66
|
+
sortKey: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
|
|
67
|
+
title: "\u6392\u5E8F\u5B57\u6BB5",
|
|
68
|
+
description: "\u670D\u52A1\u7AEF\u6392\u5E8F\u65F6\u901A\u8FC7\u6570\u636E\u6E90\u8BF7\u6C42\u7684 `sorts` \u53D8\u91CF\u4F20\u7ED9\u540E\u7AEF\u7684\u5B57\u6BB5\u6807\u8BC6\uFF1B\u542F\u7528\u6392\u5E8F\u65F6\u5FC5\u586B"
|
|
61
69
|
})),
|
|
62
70
|
size: Schema.optional(Schema.Number.pipe(Schema.finite(), Schema.positive()).annotations({
|
|
63
71
|
title: "\u5217\u5BBD",
|
|
@@ -84,10 +92,10 @@ export function editableHeader(titleText) {
|
|
|
84
92
|
export function registerRowVariablesIfAbsent(env) {
|
|
85
93
|
const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
|
|
86
94
|
if (!declared.has("row")) {
|
|
87
|
-
env.registerVariable("row", "dyn", { description: "\u5F53\u524D\u884C\u6570\u636E" });
|
|
95
|
+
env.registerVariable("row", "dyn", { label: "\u5F53\u524D\u884C", description: "\u5F53\u524D\u884C\u6570\u636E" });
|
|
88
96
|
}
|
|
89
97
|
if (!declared.has("index")) {
|
|
90
|
-
env.registerVariable("index", "number", { description: "\u884C\u7D22\u5F15" });
|
|
98
|
+
env.registerVariable("index", "number", { label: "\u884C\u5E8F\u53F7", description: "\u884C\u7D22\u5F15" });
|
|
91
99
|
}
|
|
92
100
|
}
|
|
93
101
|
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, {
|