@shwfed/config 1.1.5 → 2.0.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/module.d.mts +2 -19
- package/dist/module.json +1 -1
- package/dist/module.mjs +15 -34
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.d.vue.ts +36 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue +45 -8
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue.d.ts +36 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue +15 -9
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.d.ts +17 -1
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.js +23 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.d.vue.ts +36 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue +39 -5
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue.d.ts +36 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue +15 -9
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.d.ts +17 -1
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.js +23 -5
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.prototype/config.vue +1 -0
- package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/config.d.vue.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/config.vue.d.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/runtime.vue +2 -3
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.d.vue.ts +1 -1
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.vue +44 -10
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.vue.d.ts +1 -1
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/runtime.vue +24 -7
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.d.ts +6 -1
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.js +6 -3
- package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/config.d.vue.ts +13 -5
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/config.vue +32 -0
- package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/config.vue.d.ts +13 -5
- package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.search → 2026-05-15/com.shwfed.actions.button.event.dispatch}/runtime.vue +5 -7
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.d.ts +17 -0
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.js +18 -0
- package/dist/runtime/components/actions/components/group.vue +2 -3
- package/dist/runtime/components/actions/components/triggers-field.d.vue.ts +17 -0
- package/dist/runtime/components/actions/components/triggers-field.vue +209 -0
- package/dist/runtime/components/actions/components/triggers-field.vue.d.ts +17 -0
- package/dist/runtime/components/actions/config.vue +51 -1
- package/dist/runtime/components/actions/schema.d.ts +4 -0
- package/dist/runtime/components/actions/schema.js +6 -0
- package/dist/runtime/components/actions/utils/resolve.d.ts +25 -1
- package/dist/runtime/components/actions/utils/resolve.js +37 -9
- package/dist/runtime/components/app.vue +1 -1
- package/dist/runtime/components/block-layout-editor/index.vue +11 -11
- package/dist/runtime/components/block-layout-editor/sidebar.vue +0 -4
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +7 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.d.vue.ts +1 -1
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue +16 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue.d.ts +1 -1
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/runtime.vue +1 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.d.ts +18 -9
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.js +8 -4
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.d.vue.ts +77 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.vue +535 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.vue.d.ts +77 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.d.vue.ts +77 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.vue +233 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.vue.d.ts +77 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/schema.d.ts +134 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/schema.js +142 -0
- package/dist/runtime/components/config/index.vue +1 -1
- package/dist/runtime/components/config/use-editor.js +4 -3
- package/dist/runtime/components/form/DerivedValueEditor.d.vue.ts +19 -0
- package/dist/runtime/components/form/DerivedValueEditor.vue +77 -0
- package/dist/runtime/components/form/DerivedValueEditor.vue.d.ts +19 -0
- package/dist/runtime/components/form/config.vue +58 -24
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +29 -31
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.js +3 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +24 -26
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.js +3 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/runtime.vue +15 -7
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +37 -38
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +33 -22
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.js +3 -2
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/runtime.vue +14 -7
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +1 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +13 -8
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue +25 -1
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +102 -44
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +14 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.js +14 -5
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +1 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/row.vue +22 -5
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +7 -4
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.js +7 -1
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.d.vue.ts +113 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +426 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue.d.ts +113 -0
- package/dist/runtime/components/{actions/buttons/2026-04-27/com.shwfed.actions.button.table.search → form/fields/2026-05-17/com.shwfed.form.field.checkbox.group}/runtime.d.vue.ts +1 -1
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +176 -0
- package/dist/runtime/components/{actions/buttons/2026-04-27/com.shwfed.actions.button.table.search → form/fields/2026-05-17/com.shwfed.form.field.checkbox.group}/runtime.vue.d.ts +1 -1
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +121 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.js +78 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.d.vue.ts +113 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +426 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue.d.ts +113 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +159 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +121 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.js +78 -0
- package/dist/runtime/components/form/index.d.vue.ts +6 -0
- package/dist/runtime/components/form/index.vue +41 -6
- package/dist/runtime/components/form/index.vue.d.ts +6 -0
- package/dist/runtime/components/form/schema.d.ts +5 -1
- package/dist/runtime/components/form/schema.js +13 -1
- package/dist/runtime/components/form/unit-config.d.vue.ts +0 -3
- package/dist/runtime/components/form/unit-config.vue +4 -10
- package/dist/runtime/components/form/unit-config.vue.d.ts +0 -3
- package/dist/runtime/components/form/utils/commit-bus.d.ts +26 -0
- package/dist/runtime/components/form/utils/commit-bus.js +27 -0
- package/dist/runtime/components/form/utils/common.d.ts +27 -0
- package/dist/runtime/components/form/utils/common.js +31 -0
- package/dist/runtime/components/form/utils/derived.d.ts +72 -0
- package/dist/runtime/components/form/utils/derived.js +116 -0
- package/dist/runtime/components/form/utils/field-value.d.ts +35 -0
- package/dist/runtime/components/form/utils/field-value.js +40 -0
- package/dist/runtime/components/form/utils/history.d.ts +36 -0
- package/dist/runtime/components/form/utils/history.js +74 -0
- package/dist/runtime/components/form/utils/readonly.d.ts +8 -0
- package/dist/runtime/components/form/utils/readonly.js +9 -0
- package/dist/runtime/components/form/utils/state.d.ts +27 -1
- package/dist/runtime/components/form/utils/state.js +16 -8
- package/dist/runtime/components/table/ai/columns-button.vue +3 -4
- package/dist/runtime/components/table/ai/data-source-button.vue +3 -4
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/runtime.vue +2 -3
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/runtime.vue +2 -3
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/runtime.vue +2 -3
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/runtime.vue +2 -3
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/runtime.vue +11 -6
- package/dist/runtime/components/table/config.vue +46 -2
- package/dist/runtime/components/table/index.d.vue.ts +4 -0
- package/dist/runtime/components/table/index.vue +28 -22
- package/dist/runtime/components/table/index.vue.d.ts +4 -0
- package/dist/runtime/components/table/schema.d.ts +33 -0
- package/dist/runtime/components/table/schema.js +21 -0
- package/dist/runtime/components/table/utils/instance.d.ts +2 -0
- package/dist/runtime/components/table/utils/instance.js +8 -0
- package/dist/runtime/components/ui/date-picker/DatePickerInput.vue +2 -2
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue +2 -2
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +13 -1
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +11 -3
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +13 -1
- package/dist/runtime/components/ui/locale/Locale.vue +2 -2
- package/dist/runtime/components/ui/radio-group/RadioGroup.d.vue.ts +22 -0
- package/dist/runtime/components/ui/radio-group/RadioGroup.vue +32 -0
- package/dist/runtime/components/ui/radio-group/RadioGroup.vue.d.ts +22 -0
- package/dist/runtime/components/ui/radio-group/RadioGroupItem.d.vue.ts +8 -0
- package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue +36 -0
- package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue.d.ts +8 -0
- package/dist/runtime/components/ui/radio-group/index.d.ts +2 -0
- package/dist/runtime/components/ui/radio-group/index.js +2 -0
- package/dist/runtime/composables/useOverlay.d.ts +1 -5
- package/dist/runtime/composables/useOverlay.js +4 -3
- package/dist/runtime/composables/useTranslateLocale.js +1 -2
- package/dist/runtime/share/event-bus.d.ts +118 -0
- package/dist/runtime/share/event-bus.js +55 -0
- package/dist/runtime/share/expression.d.ts +7 -0
- package/dist/runtime/share/expression.js +3 -1
- package/dist/runtime/share/layout.d.ts +1 -0
- package/dist/runtime/share/layout.js +3 -2
- package/dist/runtime/share/slot-renderer.vue +6 -4
- package/dist/runtime/{plugins → utils}/ai/cel-prompt.d.ts +1 -1
- package/dist/runtime/{plugins → utils}/ai/index.d.ts +1 -6
- package/dist/runtime/{plugins → utils}/ai/index.js +5 -14
- package/dist/runtime/utils/cel.d.ts +5 -0
- package/dist/runtime/utils/cel.js +42 -0
- package/dist/runtime/vendor/cel-js/CLAUDE.md +8 -2
- package/dist/runtime/vendor/cel-js/PROMPT.md +35 -10
- package/dist/runtime/vendor/cel-js/lib/functions.js +63 -1
- package/dist/runtime/vendor/cel-js/lib/http-builder.d.ts +35 -0
- package/dist/runtime/{plugins/http/builder.js → vendor/cel-js/lib/http-builder.js} +25 -23
- package/dist/runtime/vendor/cel-js/lib/http-builtins.d.ts +9 -10
- package/dist/runtime/vendor/cel-js/lib/http-builtins.js +53 -13
- package/dist/types.d.mts +7 -1
- package/package.json +1 -1
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/config.vue +0 -10
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/runtime.vue +0 -25
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/schema.d.ts +0 -13
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/schema.js +0 -16
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.d.vue.ts +0 -17
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.vue +0 -10
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.vue.d.ts +0 -17
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/schema.d.ts +0 -13
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/schema.js +0 -16
- package/dist/runtime/components/table/utils/host.d.ts +0 -9
- package/dist/runtime/components/table/utils/host.js +0 -8
- package/dist/runtime/composables/useCel.d.ts +0 -16
- package/dist/runtime/composables/useCel.js +0 -8
- package/dist/runtime/middleware/token.d.ts +0 -2
- package/dist/runtime/middleware/token.js +0 -20
- package/dist/runtime/plugins/cel/http.d.ts +0 -8
- package/dist/runtime/plugins/cel/http.js +0 -49
- package/dist/runtime/plugins/cel/index.d.ts +0 -9
- package/dist/runtime/plugins/cel/index.js +0 -59
- package/dist/runtime/plugins/http/builder.d.ts +0 -14
- package/dist/runtime/plugins/http/index.d.ts +0 -19
- package/dist/runtime/plugins/http/index.js +0 -35
- package/dist/runtime/plugins/toast/index.d.ts +0 -108
- package/dist/runtime/plugins/toast/index.js +0 -10
- package/dist/runtime/types.d.ts +0 -25
- /package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/runtime.d.vue.ts +0 -0
- /package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/runtime.vue.d.ts +0 -0
- /package/dist/runtime/{plugins → utils}/ai/cel-prompt.js +0 -0
- /package/dist/runtime/{plugins/cel/context.d.ts → utils/cel-context.d.ts} +0 -0
- /package/dist/runtime/{plugins/cel/context.js → utils/cel-context.js} +0 -0
package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.vue
ADDED
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import { Field, FieldLabel } from "../../../../ui/field";
|
|
5
|
+
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
6
|
+
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
7
|
+
import { ColorPicker } from "../../../../ui/color-picker";
|
|
8
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
9
|
+
import {
|
|
10
|
+
Select,
|
|
11
|
+
SelectContent,
|
|
12
|
+
SelectItem,
|
|
13
|
+
SelectTrigger,
|
|
14
|
+
SelectValue
|
|
15
|
+
} from "../../../../ui/select";
|
|
16
|
+
import { Separator } from "../../../../ui/separator";
|
|
17
|
+
import { ScrollArea } from "../../../../ui/scroll-area";
|
|
18
|
+
import { Button } from "../../../../ui/button";
|
|
19
|
+
import {
|
|
20
|
+
InputGroup,
|
|
21
|
+
InputGroupButton,
|
|
22
|
+
InputGroupInput,
|
|
23
|
+
InputGroupNumberField
|
|
24
|
+
} from "../../../../ui/input-group";
|
|
25
|
+
import {
|
|
26
|
+
dataSourceSchema,
|
|
27
|
+
getStructFieldDescription,
|
|
28
|
+
getStructFieldTitle,
|
|
29
|
+
schema,
|
|
30
|
+
ySeriesSchema
|
|
31
|
+
} from "./schema";
|
|
32
|
+
defineOptions({ name: "ShwfedBlockChartLineConfig" });
|
|
33
|
+
const block = defineModel({ type: null, ...{ required: true } });
|
|
34
|
+
const blockSchema = schema(() => {
|
|
35
|
+
});
|
|
36
|
+
const dsSchema = dataSourceSchema(() => {
|
|
37
|
+
});
|
|
38
|
+
const ySchema = ySeriesSchema(() => {
|
|
39
|
+
});
|
|
40
|
+
const fieldTitle = (f) => getStructFieldTitle(blockSchema, f) ?? f;
|
|
41
|
+
const fieldDescription = (f) => getStructFieldDescription(blockSchema, f);
|
|
42
|
+
const dsTitle = (f) => getStructFieldTitle(dsSchema, f) ?? f;
|
|
43
|
+
const dsDescription = (f) => getStructFieldDescription(dsSchema, f);
|
|
44
|
+
const yTitle = (f) => getStructFieldTitle(ySchema, f) ?? f;
|
|
45
|
+
const yDescription = (f) => getStructFieldDescription(ySchema, f);
|
|
46
|
+
const CURVE_OPTIONS = [
|
|
47
|
+
{ value: "linear", label: "\u76F4\u7EBF (linear)" },
|
|
48
|
+
{ value: "monotoneX", label: "\u5355\u8C03\u5E73\u6ED1 (monotoneX)" },
|
|
49
|
+
{ value: "natural", label: "\u81EA\u7136\u6837\u6761 (natural)" },
|
|
50
|
+
{ value: "basis", label: "B \u6837\u6761 (basis)" },
|
|
51
|
+
{ value: "cardinal", label: "Cardinal" },
|
|
52
|
+
{ value: "catmullRom", label: "Catmull-Rom" },
|
|
53
|
+
{ value: "step", label: "\u9636\u68AF (step)" },
|
|
54
|
+
{ value: "stepAfter", label: "\u9636\u68AF\u540E (stepAfter)" },
|
|
55
|
+
{ value: "stepBefore", label: "\u9636\u68AF\u524D (stepBefore)" }
|
|
56
|
+
];
|
|
57
|
+
const DATA_VARS = {
|
|
58
|
+
json: { type: "optional<dyn>", label: "HTTP \u54CD\u5E94\u4F53\uFF08\u914D\u7F6E\u4E86\u8BF7\u6C42\u65F6\u53EF\u7528\uFF09" }
|
|
59
|
+
};
|
|
60
|
+
const dataSourceVars = computed(() => {
|
|
61
|
+
const out = {};
|
|
62
|
+
for (const ds of block.value.dataSources) {
|
|
63
|
+
if (ds.name) out[ds.name] = { type: "list<dyn>", label: `\u6570\u636E\u6E90\u300C${ds.name}\u300D\u7684\u7ED3\u679C\u5217\u8868` };
|
|
64
|
+
}
|
|
65
|
+
return out;
|
|
66
|
+
});
|
|
67
|
+
const selectedId = ref("");
|
|
68
|
+
const selectedDataSource = computed(
|
|
69
|
+
() => block.value.dataSources.find((d) => d.id === selectedId.value) ?? null
|
|
70
|
+
);
|
|
71
|
+
function writeDataSources(next) {
|
|
72
|
+
block.value = { ...block.value, dataSources: next };
|
|
73
|
+
}
|
|
74
|
+
function addDataSource() {
|
|
75
|
+
const existing = new Set(block.value.dataSources.map((d) => d.name));
|
|
76
|
+
let n = block.value.dataSources.length + 1;
|
|
77
|
+
let name = `source${n}`;
|
|
78
|
+
while (existing.has(name)) {
|
|
79
|
+
n += 1;
|
|
80
|
+
name = `source${n}`;
|
|
81
|
+
}
|
|
82
|
+
const ds = { id: crypto.randomUUID(), name, data: "[]" };
|
|
83
|
+
writeDataSources([...block.value.dataSources, ds]);
|
|
84
|
+
selectedId.value = ds.id;
|
|
85
|
+
}
|
|
86
|
+
function removeDataSource(id) {
|
|
87
|
+
writeDataSources(block.value.dataSources.filter((d) => d.id !== id));
|
|
88
|
+
if (selectedId.value === id) selectedId.value = "";
|
|
89
|
+
}
|
|
90
|
+
function patchDataSource(id, patch) {
|
|
91
|
+
writeDataSources(block.value.dataSources.map((d) => d.id === id ? { ...d, ...patch } : d));
|
|
92
|
+
}
|
|
93
|
+
function setDsName(id, v) {
|
|
94
|
+
patchDataSource(id, { name: String(v ?? "") });
|
|
95
|
+
}
|
|
96
|
+
function setDsData(id, v) {
|
|
97
|
+
patchDataSource(id, { data: v });
|
|
98
|
+
}
|
|
99
|
+
function setDsRequest(id, v) {
|
|
100
|
+
const ds = block.value.dataSources.find((d) => d.id === id);
|
|
101
|
+
if (!ds) return;
|
|
102
|
+
const next = v.trim() === "" ? { id: ds.id, name: ds.name, data: ds.data } : { ...ds, request: v };
|
|
103
|
+
writeDataSources(block.value.dataSources.map((d) => d.id === id ? next : d));
|
|
104
|
+
}
|
|
105
|
+
function setDisplayName(v) {
|
|
106
|
+
const s = String(v ?? "");
|
|
107
|
+
block.value = { ...block.value, displayName: s.length > 0 ? s : void 0 };
|
|
108
|
+
}
|
|
109
|
+
function setCaption(v) {
|
|
110
|
+
block.value = { ...block.value, caption: v };
|
|
111
|
+
}
|
|
112
|
+
function setX(v) {
|
|
113
|
+
block.value = { ...block.value, x: v };
|
|
114
|
+
}
|
|
115
|
+
function setCurveType(v) {
|
|
116
|
+
block.value = { ...block.value, curveType: v };
|
|
117
|
+
}
|
|
118
|
+
function setLineWidth(v) {
|
|
119
|
+
block.value = { ...block.value, lineWidth: typeof v === "number" && v > 0 ? v : 2 };
|
|
120
|
+
}
|
|
121
|
+
function writeY(next) {
|
|
122
|
+
block.value = { ...block.value, y: next };
|
|
123
|
+
}
|
|
124
|
+
function patchYItem(i, patch) {
|
|
125
|
+
writeY(block.value.y.map((s, idx) => idx === i ? { ...s, ...patch } : s));
|
|
126
|
+
}
|
|
127
|
+
function setYValue(i, v) {
|
|
128
|
+
patchYItem(i, { value: v });
|
|
129
|
+
}
|
|
130
|
+
function setYLabel(i, v) {
|
|
131
|
+
patchYItem(i, { label: v });
|
|
132
|
+
}
|
|
133
|
+
function setYColor(i, v) {
|
|
134
|
+
patchYItem(i, { color: v.length > 0 ? v : void 0 });
|
|
135
|
+
}
|
|
136
|
+
function addY() {
|
|
137
|
+
writeY([...block.value.y, { id: crypto.randomUUID(), value: "[]" }]);
|
|
138
|
+
}
|
|
139
|
+
function removeY(i) {
|
|
140
|
+
if (block.value.y.length <= 1) return;
|
|
141
|
+
writeY(block.value.y.filter((_, idx) => idx !== i));
|
|
142
|
+
}
|
|
143
|
+
</script>
|
|
144
|
+
|
|
145
|
+
<template>
|
|
146
|
+
<div class="flex min-h-96 gap-3">
|
|
147
|
+
<!-- Sidebar: general config + data sources -->
|
|
148
|
+
<div class="flex w-52 shrink-0 flex-col">
|
|
149
|
+
<ScrollArea class="flex-1">
|
|
150
|
+
<div class="flex flex-col gap-0.5">
|
|
151
|
+
<button
|
|
152
|
+
type="button"
|
|
153
|
+
class="flex items-center gap-1.5 rounded px-2 py-1.5 text-sm transition-colors"
|
|
154
|
+
:class="!selectedDataSource ? 'bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)' : 'text-zinc-700 hover:bg-zinc-50'"
|
|
155
|
+
@click="selectedId = ''"
|
|
156
|
+
>
|
|
157
|
+
<Icon
|
|
158
|
+
icon="fluent:settings-20-regular"
|
|
159
|
+
class="size-4 shrink-0"
|
|
160
|
+
/>
|
|
161
|
+
<span>通用配置</span>
|
|
162
|
+
</button>
|
|
163
|
+
|
|
164
|
+
<Separator class="my-1" />
|
|
165
|
+
|
|
166
|
+
<div
|
|
167
|
+
v-for="ds in block.dataSources"
|
|
168
|
+
:key="ds.id"
|
|
169
|
+
class="group flex cursor-pointer items-center gap-1.5 rounded px-2 py-1.5 text-sm transition-colors"
|
|
170
|
+
:class="selectedId === ds.id ? 'bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)' : 'text-zinc-700 hover:bg-zinc-50'"
|
|
171
|
+
@click="selectedId = ds.id"
|
|
172
|
+
>
|
|
173
|
+
<Icon
|
|
174
|
+
icon="fluent:database-20-regular"
|
|
175
|
+
class="size-4 shrink-0"
|
|
176
|
+
/>
|
|
177
|
+
<span class="flex-1 truncate font-mono text-xs">{{ ds.name || "\u672A\u547D\u540D" }}</span>
|
|
178
|
+
<button
|
|
179
|
+
type="button"
|
|
180
|
+
class="inline-flex size-5 shrink-0 items-center justify-center rounded text-zinc-300 opacity-0 transition-opacity group-hover:opacity-100 hover:bg-red-50 hover:text-red-500"
|
|
181
|
+
aria-label="删除数据源"
|
|
182
|
+
@click.stop="removeDataSource(ds.id)"
|
|
183
|
+
>
|
|
184
|
+
<Icon
|
|
185
|
+
icon="fluent:delete-20-regular"
|
|
186
|
+
class="size-3.5"
|
|
187
|
+
/>
|
|
188
|
+
</button>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
</ScrollArea>
|
|
192
|
+
|
|
193
|
+
<Button
|
|
194
|
+
type="button"
|
|
195
|
+
variant="ghost"
|
|
196
|
+
size="sm"
|
|
197
|
+
class="mt-1 w-full justify-center"
|
|
198
|
+
@click="addDataSource()"
|
|
199
|
+
>
|
|
200
|
+
<Icon
|
|
201
|
+
icon="fluent:add-20-regular"
|
|
202
|
+
class="size-4"
|
|
203
|
+
/>
|
|
204
|
+
<span>新增数据源</span>
|
|
205
|
+
</Button>
|
|
206
|
+
</div>
|
|
207
|
+
|
|
208
|
+
<Separator orientation="vertical" />
|
|
209
|
+
|
|
210
|
+
<!-- Right pane -->
|
|
211
|
+
<div class="min-w-0 flex-1">
|
|
212
|
+
<!-- Data source editor -->
|
|
213
|
+
<div
|
|
214
|
+
v-if="selectedDataSource"
|
|
215
|
+
class="space-y-4"
|
|
216
|
+
>
|
|
217
|
+
<Field orientation="vertical">
|
|
218
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
219
|
+
<template
|
|
220
|
+
v-if="dsDescription('name')"
|
|
221
|
+
#tooltip
|
|
222
|
+
>
|
|
223
|
+
<Markdown
|
|
224
|
+
:source="dsDescription('name')"
|
|
225
|
+
block
|
|
226
|
+
class="prose prose-sm prose-zinc"
|
|
227
|
+
/>
|
|
228
|
+
</template>
|
|
229
|
+
{{ dsTitle("name") }}
|
|
230
|
+
</FieldLabel>
|
|
231
|
+
<InputGroup>
|
|
232
|
+
<InputGroupInput
|
|
233
|
+
:model-value="selectedDataSource.name"
|
|
234
|
+
placeholder="例:btc"
|
|
235
|
+
class="font-mono"
|
|
236
|
+
@update:model-value="(v) => setDsName(selectedDataSource.id, v)"
|
|
237
|
+
/>
|
|
238
|
+
</InputGroup>
|
|
239
|
+
</Field>
|
|
240
|
+
<Field orientation="vertical">
|
|
241
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
242
|
+
<template
|
|
243
|
+
v-if="dsDescription('request')"
|
|
244
|
+
#tooltip
|
|
245
|
+
>
|
|
246
|
+
<Markdown
|
|
247
|
+
:source="dsDescription('request')"
|
|
248
|
+
block
|
|
249
|
+
class="prose prose-sm prose-zinc"
|
|
250
|
+
/>
|
|
251
|
+
</template>
|
|
252
|
+
{{ dsTitle("request") }}
|
|
253
|
+
</FieldLabel>
|
|
254
|
+
<ExpressionEditor
|
|
255
|
+
:model-value="selectedDataSource.request ?? ''"
|
|
256
|
+
placeholder="可选;如 http.get('/api/metrics')"
|
|
257
|
+
result-type="HttpRequest"
|
|
258
|
+
multiline
|
|
259
|
+
class="min-h-20"
|
|
260
|
+
@update:model-value="(v) => setDsRequest(selectedDataSource.id, v)"
|
|
261
|
+
/>
|
|
262
|
+
</Field>
|
|
263
|
+
<Field orientation="vertical">
|
|
264
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
265
|
+
<template
|
|
266
|
+
v-if="dsDescription('data')"
|
|
267
|
+
#tooltip
|
|
268
|
+
>
|
|
269
|
+
<Markdown
|
|
270
|
+
:source="dsDescription('data')"
|
|
271
|
+
block
|
|
272
|
+
class="prose prose-sm prose-zinc"
|
|
273
|
+
/>
|
|
274
|
+
</template>
|
|
275
|
+
{{ dsTitle("data") }}
|
|
276
|
+
</FieldLabel>
|
|
277
|
+
<ExpressionEditor
|
|
278
|
+
:model-value="selectedDataSource.data"
|
|
279
|
+
placeholder="返回列表的表达式,如 json.?data.orValue([])"
|
|
280
|
+
result-type="list"
|
|
281
|
+
:extra-vars="DATA_VARS"
|
|
282
|
+
@update:model-value="(v) => setDsData(selectedDataSource.id, v)"
|
|
283
|
+
/>
|
|
284
|
+
</Field>
|
|
285
|
+
</div>
|
|
286
|
+
|
|
287
|
+
<!-- General config -->
|
|
288
|
+
<div
|
|
289
|
+
v-else
|
|
290
|
+
class="space-y-5"
|
|
291
|
+
>
|
|
292
|
+
<div class="grid grid-cols-2 items-start gap-x-6">
|
|
293
|
+
<Field orientation="vertical">
|
|
294
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
295
|
+
<template
|
|
296
|
+
v-if="fieldDescription('displayName')"
|
|
297
|
+
#tooltip
|
|
298
|
+
>
|
|
299
|
+
<Markdown
|
|
300
|
+
:source="fieldDescription('displayName')"
|
|
301
|
+
block
|
|
302
|
+
class="prose prose-sm prose-zinc"
|
|
303
|
+
/>
|
|
304
|
+
</template>
|
|
305
|
+
{{ fieldTitle("displayName") }}
|
|
306
|
+
</FieldLabel>
|
|
307
|
+
<InputGroup>
|
|
308
|
+
<InputGroupInput
|
|
309
|
+
:model-value="block.displayName ?? ''"
|
|
310
|
+
placeholder="例:月度销售趋势"
|
|
311
|
+
@update:model-value="setDisplayName"
|
|
312
|
+
/>
|
|
313
|
+
</InputGroup>
|
|
314
|
+
</Field>
|
|
315
|
+
|
|
316
|
+
<Field orientation="vertical">
|
|
317
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
318
|
+
<template
|
|
319
|
+
v-if="fieldDescription('caption')"
|
|
320
|
+
#tooltip
|
|
321
|
+
>
|
|
322
|
+
<Markdown
|
|
323
|
+
:source="fieldDescription('caption')"
|
|
324
|
+
block
|
|
325
|
+
class="prose prose-sm prose-zinc"
|
|
326
|
+
/>
|
|
327
|
+
</template>
|
|
328
|
+
{{ fieldTitle("caption") }}
|
|
329
|
+
</FieldLabel>
|
|
330
|
+
<LocaleField
|
|
331
|
+
markdown
|
|
332
|
+
translate-hint="chart caption"
|
|
333
|
+
:model-value="block.caption"
|
|
334
|
+
@update:model-value="setCaption"
|
|
335
|
+
/>
|
|
336
|
+
</Field>
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
<Separator />
|
|
340
|
+
|
|
341
|
+
<Field orientation="vertical">
|
|
342
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
343
|
+
<template
|
|
344
|
+
v-if="fieldDescription('x')"
|
|
345
|
+
#tooltip
|
|
346
|
+
>
|
|
347
|
+
<Markdown
|
|
348
|
+
:source="fieldDescription('x')"
|
|
349
|
+
block
|
|
350
|
+
class="prose prose-sm prose-zinc"
|
|
351
|
+
/>
|
|
352
|
+
</template>
|
|
353
|
+
{{ fieldTitle("x") }}
|
|
354
|
+
</FieldLabel>
|
|
355
|
+
<ExpressionEditor
|
|
356
|
+
:model-value="block.x"
|
|
357
|
+
result-type="list"
|
|
358
|
+
:extra-vars="dataSourceVars"
|
|
359
|
+
placeholder="返回列表,如 range(0, 12)"
|
|
360
|
+
@update:model-value="setX"
|
|
361
|
+
/>
|
|
362
|
+
</Field>
|
|
363
|
+
|
|
364
|
+
<Separator />
|
|
365
|
+
|
|
366
|
+
<Field orientation="vertical">
|
|
367
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
368
|
+
<template
|
|
369
|
+
v-if="fieldDescription('y')"
|
|
370
|
+
#tooltip
|
|
371
|
+
>
|
|
372
|
+
<Markdown
|
|
373
|
+
:source="fieldDescription('y')"
|
|
374
|
+
block
|
|
375
|
+
class="prose prose-sm prose-zinc"
|
|
376
|
+
/>
|
|
377
|
+
</template>
|
|
378
|
+
{{ fieldTitle("y") }}
|
|
379
|
+
</FieldLabel>
|
|
380
|
+
<div class="flex flex-col gap-3 pt-1">
|
|
381
|
+
<div
|
|
382
|
+
v-for="(s, i) in block.y"
|
|
383
|
+
:key="s.id"
|
|
384
|
+
class="relative space-y-3 rounded border border-zinc-200 bg-zinc-50/40 p-3 pt-9"
|
|
385
|
+
>
|
|
386
|
+
<InputGroupButton
|
|
387
|
+
variant="destructive"
|
|
388
|
+
size="icon-xs"
|
|
389
|
+
class="absolute top-2 right-2 z-10"
|
|
390
|
+
:disabled="block.y.length <= 1"
|
|
391
|
+
aria-label="删除系列"
|
|
392
|
+
@click="removeY(i)"
|
|
393
|
+
>
|
|
394
|
+
<Icon icon="fluent:delete-20-regular" />
|
|
395
|
+
</InputGroupButton>
|
|
396
|
+
|
|
397
|
+
<Field orientation="vertical">
|
|
398
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
399
|
+
<template
|
|
400
|
+
v-if="yDescription('value')"
|
|
401
|
+
#tooltip
|
|
402
|
+
>
|
|
403
|
+
<Markdown
|
|
404
|
+
:source="yDescription('value')"
|
|
405
|
+
block
|
|
406
|
+
class="prose prose-sm prose-zinc"
|
|
407
|
+
/>
|
|
408
|
+
</template>
|
|
409
|
+
{{ yTitle("value") }}
|
|
410
|
+
</FieldLabel>
|
|
411
|
+
<ExpressionEditor
|
|
412
|
+
:model-value="s.value"
|
|
413
|
+
result-type="list"
|
|
414
|
+
:extra-vars="dataSourceVars"
|
|
415
|
+
:placeholder="`\u7B2C ${i + 1} \u6761\u7EBF\uFF0C\u5982 source1.map(r, r.value)`"
|
|
416
|
+
@update:model-value="(v) => setYValue(i, v)"
|
|
417
|
+
/>
|
|
418
|
+
</Field>
|
|
419
|
+
|
|
420
|
+
<div class="grid grid-cols-2 gap-3">
|
|
421
|
+
<Field orientation="vertical">
|
|
422
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
423
|
+
<template
|
|
424
|
+
v-if="yDescription('label')"
|
|
425
|
+
#tooltip
|
|
426
|
+
>
|
|
427
|
+
<Markdown
|
|
428
|
+
:source="yDescription('label')"
|
|
429
|
+
block
|
|
430
|
+
class="prose prose-sm prose-zinc"
|
|
431
|
+
/>
|
|
432
|
+
</template>
|
|
433
|
+
{{ yTitle("label") }}
|
|
434
|
+
</FieldLabel>
|
|
435
|
+
<LocaleField
|
|
436
|
+
translate-hint="chart series label"
|
|
437
|
+
:model-value="s.label"
|
|
438
|
+
@update:model-value="(v) => setYLabel(i, v)"
|
|
439
|
+
/>
|
|
440
|
+
</Field>
|
|
441
|
+
<Field orientation="vertical">
|
|
442
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
443
|
+
<template
|
|
444
|
+
v-if="yDescription('color')"
|
|
445
|
+
#tooltip
|
|
446
|
+
>
|
|
447
|
+
<Markdown
|
|
448
|
+
:source="yDescription('color')"
|
|
449
|
+
block
|
|
450
|
+
class="prose prose-sm prose-zinc"
|
|
451
|
+
/>
|
|
452
|
+
</template>
|
|
453
|
+
{{ yTitle("color") }}
|
|
454
|
+
</FieldLabel>
|
|
455
|
+
<ColorPicker
|
|
456
|
+
:model-value="s.color ?? ''"
|
|
457
|
+
placeholder="自动取色"
|
|
458
|
+
@update:model-value="(v) => setYColor(i, v)"
|
|
459
|
+
/>
|
|
460
|
+
</Field>
|
|
461
|
+
</div>
|
|
462
|
+
</div>
|
|
463
|
+
<Button
|
|
464
|
+
type="button"
|
|
465
|
+
class="w-full justify-center"
|
|
466
|
+
@click="addY()"
|
|
467
|
+
>
|
|
468
|
+
<Icon icon="fluent:add-20-regular" />
|
|
469
|
+
<span>新增 Y</span>
|
|
470
|
+
</Button>
|
|
471
|
+
</div>
|
|
472
|
+
</Field>
|
|
473
|
+
|
|
474
|
+
<Separator />
|
|
475
|
+
|
|
476
|
+
<div class="grid grid-cols-2 gap-x-6 gap-y-3">
|
|
477
|
+
<Field orientation="vertical">
|
|
478
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
479
|
+
<template
|
|
480
|
+
v-if="fieldDescription('curveType')"
|
|
481
|
+
#tooltip
|
|
482
|
+
>
|
|
483
|
+
<Markdown
|
|
484
|
+
:source="fieldDescription('curveType')"
|
|
485
|
+
block
|
|
486
|
+
class="prose prose-sm prose-zinc"
|
|
487
|
+
/>
|
|
488
|
+
</template>
|
|
489
|
+
{{ fieldTitle("curveType") }}
|
|
490
|
+
</FieldLabel>
|
|
491
|
+
<Select
|
|
492
|
+
:model-value="block.curveType"
|
|
493
|
+
@update:model-value="setCurveType"
|
|
494
|
+
>
|
|
495
|
+
<SelectTrigger class="w-full">
|
|
496
|
+
<SelectValue />
|
|
497
|
+
</SelectTrigger>
|
|
498
|
+
<SelectContent>
|
|
499
|
+
<SelectItem
|
|
500
|
+
v-for="opt in CURVE_OPTIONS"
|
|
501
|
+
:key="opt.value"
|
|
502
|
+
:value="opt.value"
|
|
503
|
+
>
|
|
504
|
+
{{ opt.label }}
|
|
505
|
+
</SelectItem>
|
|
506
|
+
</SelectContent>
|
|
507
|
+
</Select>
|
|
508
|
+
</Field>
|
|
509
|
+
<Field orientation="vertical">
|
|
510
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
511
|
+
<template
|
|
512
|
+
v-if="fieldDescription('lineWidth')"
|
|
513
|
+
#tooltip
|
|
514
|
+
>
|
|
515
|
+
<Markdown
|
|
516
|
+
:source="fieldDescription('lineWidth')"
|
|
517
|
+
block
|
|
518
|
+
class="prose prose-sm prose-zinc"
|
|
519
|
+
/>
|
|
520
|
+
</template>
|
|
521
|
+
{{ fieldTitle("lineWidth") }}
|
|
522
|
+
</FieldLabel>
|
|
523
|
+
<InputGroup>
|
|
524
|
+
<InputGroupNumberField
|
|
525
|
+
:model-value="block.lineWidth"
|
|
526
|
+
:min="1"
|
|
527
|
+
@update:model-value="setLineWidth"
|
|
528
|
+
/>
|
|
529
|
+
</InputGroup>
|
|
530
|
+
</Field>
|
|
531
|
+
</div>
|
|
532
|
+
</div>
|
|
533
|
+
</div>
|
|
534
|
+
</div>
|
|
535
|
+
</template>
|
package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.vue.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type Value } from './schema.js';
|
|
2
|
+
type __VLS_ModelProps = {
|
|
3
|
+
modelValue: Value;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: {
|
|
7
|
+
readonly type: "com.shwfed.block.chart.line";
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly caption?: readonly [{
|
|
10
|
+
readonly locale: "zh";
|
|
11
|
+
readonly message: string;
|
|
12
|
+
}, ...{
|
|
13
|
+
readonly locale: "en" | "ja" | "ko";
|
|
14
|
+
readonly message: string;
|
|
15
|
+
}[]] | undefined;
|
|
16
|
+
readonly x: string;
|
|
17
|
+
readonly y: readonly {
|
|
18
|
+
readonly label?: readonly [{
|
|
19
|
+
readonly locale: "zh";
|
|
20
|
+
readonly message: string;
|
|
21
|
+
}, ...{
|
|
22
|
+
readonly locale: "en" | "ja" | "ko";
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}[]] | undefined;
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly color?: string | undefined;
|
|
27
|
+
readonly value: string;
|
|
28
|
+
}[];
|
|
29
|
+
readonly displayName?: string | undefined;
|
|
30
|
+
readonly compatibilityDate: "2026-05-17";
|
|
31
|
+
readonly dataSources: readonly {
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly data: string;
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly request?: string | undefined;
|
|
36
|
+
}[];
|
|
37
|
+
readonly curveType: "linear" | "step" | "monotoneX" | "natural" | "basis" | "cardinal" | "catmullRom" | "stepAfter" | "stepBefore";
|
|
38
|
+
readonly lineWidth: number;
|
|
39
|
+
}) => any;
|
|
40
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
41
|
+
"onUpdate:modelValue"?: ((value: {
|
|
42
|
+
readonly type: "com.shwfed.block.chart.line";
|
|
43
|
+
readonly id: string;
|
|
44
|
+
readonly caption?: readonly [{
|
|
45
|
+
readonly locale: "zh";
|
|
46
|
+
readonly message: string;
|
|
47
|
+
}, ...{
|
|
48
|
+
readonly locale: "en" | "ja" | "ko";
|
|
49
|
+
readonly message: string;
|
|
50
|
+
}[]] | undefined;
|
|
51
|
+
readonly x: string;
|
|
52
|
+
readonly y: readonly {
|
|
53
|
+
readonly label?: readonly [{
|
|
54
|
+
readonly locale: "zh";
|
|
55
|
+
readonly message: string;
|
|
56
|
+
}, ...{
|
|
57
|
+
readonly locale: "en" | "ja" | "ko";
|
|
58
|
+
readonly message: string;
|
|
59
|
+
}[]] | undefined;
|
|
60
|
+
readonly id: string;
|
|
61
|
+
readonly color?: string | undefined;
|
|
62
|
+
readonly value: string;
|
|
63
|
+
}[];
|
|
64
|
+
readonly displayName?: string | undefined;
|
|
65
|
+
readonly compatibilityDate: "2026-05-17";
|
|
66
|
+
readonly dataSources: readonly {
|
|
67
|
+
readonly name: string;
|
|
68
|
+
readonly data: string;
|
|
69
|
+
readonly id: string;
|
|
70
|
+
readonly request?: string | undefined;
|
|
71
|
+
}[];
|
|
72
|
+
readonly curveType: "linear" | "step" | "monotoneX" | "natural" | "basis" | "cardinal" | "catmullRom" | "stepAfter" | "stepBefore";
|
|
73
|
+
readonly lineWidth: number;
|
|
74
|
+
}) => any) | undefined;
|
|
75
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
76
|
+
declare const _default: typeof __VLS_export;
|
|
77
|
+
export default _default;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Value } from './schema.js';
|
|
2
|
+
type __VLS_ModelProps = {
|
|
3
|
+
'block': Value;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:block": (value: {
|
|
7
|
+
readonly type: "com.shwfed.block.chart.line";
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly caption?: readonly [{
|
|
10
|
+
readonly locale: "zh";
|
|
11
|
+
readonly message: string;
|
|
12
|
+
}, ...{
|
|
13
|
+
readonly locale: "en" | "ja" | "ko";
|
|
14
|
+
readonly message: string;
|
|
15
|
+
}[]] | undefined;
|
|
16
|
+
readonly x: string;
|
|
17
|
+
readonly y: readonly {
|
|
18
|
+
readonly label?: readonly [{
|
|
19
|
+
readonly locale: "zh";
|
|
20
|
+
readonly message: string;
|
|
21
|
+
}, ...{
|
|
22
|
+
readonly locale: "en" | "ja" | "ko";
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}[]] | undefined;
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly color?: string | undefined;
|
|
27
|
+
readonly value: string;
|
|
28
|
+
}[];
|
|
29
|
+
readonly displayName?: string | undefined;
|
|
30
|
+
readonly compatibilityDate: "2026-05-17";
|
|
31
|
+
readonly dataSources: readonly {
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly data: string;
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly request?: string | undefined;
|
|
36
|
+
}[];
|
|
37
|
+
readonly curveType: "linear" | "step" | "monotoneX" | "natural" | "basis" | "cardinal" | "catmullRom" | "stepAfter" | "stepBefore";
|
|
38
|
+
readonly lineWidth: number;
|
|
39
|
+
}) => any;
|
|
40
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
41
|
+
"onUpdate:block"?: ((value: {
|
|
42
|
+
readonly type: "com.shwfed.block.chart.line";
|
|
43
|
+
readonly id: string;
|
|
44
|
+
readonly caption?: readonly [{
|
|
45
|
+
readonly locale: "zh";
|
|
46
|
+
readonly message: string;
|
|
47
|
+
}, ...{
|
|
48
|
+
readonly locale: "en" | "ja" | "ko";
|
|
49
|
+
readonly message: string;
|
|
50
|
+
}[]] | undefined;
|
|
51
|
+
readonly x: string;
|
|
52
|
+
readonly y: readonly {
|
|
53
|
+
readonly label?: readonly [{
|
|
54
|
+
readonly locale: "zh";
|
|
55
|
+
readonly message: string;
|
|
56
|
+
}, ...{
|
|
57
|
+
readonly locale: "en" | "ja" | "ko";
|
|
58
|
+
readonly message: string;
|
|
59
|
+
}[]] | undefined;
|
|
60
|
+
readonly id: string;
|
|
61
|
+
readonly color?: string | undefined;
|
|
62
|
+
readonly value: string;
|
|
63
|
+
}[];
|
|
64
|
+
readonly displayName?: string | undefined;
|
|
65
|
+
readonly compatibilityDate: "2026-05-17";
|
|
66
|
+
readonly dataSources: readonly {
|
|
67
|
+
readonly name: string;
|
|
68
|
+
readonly data: string;
|
|
69
|
+
readonly id: string;
|
|
70
|
+
readonly request?: string | undefined;
|
|
71
|
+
}[];
|
|
72
|
+
readonly curveType: "linear" | "step" | "monotoneX" | "natural" | "basis" | "cardinal" | "catmullRom" | "stepAfter" | "stepBefore";
|
|
73
|
+
readonly lineWidth: number;
|
|
74
|
+
}) => any) | undefined;
|
|
75
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
76
|
+
declare const _default: typeof __VLS_export;
|
|
77
|
+
export default _default;
|