@shwfed/config 2.12.4 → 2.12.6
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.json +1 -1
- package/dist/module.mjs +5 -0
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/runtime.vue +9 -2
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.d.ts +8 -2
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.js +3 -3
- package/dist/runtime/components/actions/components/group.vue +3 -1
- package/dist/runtime/components/actions/schema.d.ts +16 -4
- package/dist/runtime/components/actions/schema.js +5 -5
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +34 -34
- package/dist/runtime/components/config/footer.d.vue.ts +4 -0
- package/dist/runtime/components/config/footer.vue +25 -12
- package/dist/runtime/components/config/footer.vue.d.ts +4 -0
- package/dist/runtime/components/config/history-picker.d.vue.ts +15 -0
- package/dist/runtime/components/config/history-picker.vue +155 -0
- package/dist/runtime/components/config/history-picker.vue.d.ts +15 -0
- package/dist/runtime/components/config/index.d.vue.ts +4 -0
- package/dist/runtime/components/config/index.vue +31 -4
- package/dist/runtime/components/config/index.vue.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +4 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +4 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +9 -3
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/runtime.vue +5 -3
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/schema.js +1 -1
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/runtime.vue +4 -3
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/schema.js +1 -1
- package/dist/runtime/components/sidebar/index.d.vue.ts +22 -3
- package/dist/runtime/components/sidebar/index.vue +66 -5
- package/dist/runtime/components/sidebar/index.vue.d.ts +22 -3
- package/dist/runtime/components/sidebar/node.d.vue.ts +1 -1
- package/dist/runtime/components/sidebar/node.vue +33 -13
- package/dist/runtime/components/sidebar/node.vue.d.ts +1 -1
- package/dist/runtime/components/sidebar/tree.vue +113 -83
- package/dist/runtime/components/sidebar/types.d.ts +8 -0
- package/dist/runtime/components/sidebar/types.js +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 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue +224 -133
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue +224 -133
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/customization.d.vue.ts +15 -0
- package/dist/runtime/components/table/customization.vue +633 -0
- package/dist/runtime/components/table/customization.vue.d.ts +15 -0
- package/dist/runtime/components/table/index.vue +69 -6
- package/dist/runtime/components/table/schema.d.ts +68 -68
- package/dist/runtime/components/table/utils/customization.d.ts +158 -0
- package/dist/runtime/components/table/utils/customization.js +315 -0
- package/dist/runtime/components/table/utils/row-reorder.d.ts +3 -2
- package/dist/runtime/components/table/utils/row-reorder.js +1 -12
- package/dist/runtime/components/tabs/index.d.vue.ts +9 -0
- package/dist/runtime/components/tabs/index.vue +92 -0
- package/dist/runtime/components/tabs/index.vue.d.ts +9 -0
- package/dist/runtime/components/tabs/tab.d.vue.ts +22 -0
- package/dist/runtime/components/tabs/tab.vue +85 -0
- package/dist/runtime/components/tabs/tab.vue.d.ts +22 -0
- package/dist/runtime/components/tabs/types.d.ts +19 -0
- package/dist/runtime/components/tabs/types.js +0 -0
- package/dist/runtime/components/tabs/use-reorder.d.ts +10 -0
- package/dist/runtime/components/tabs/use-reorder.js +90 -0
- package/dist/runtime/components/tabs/use-tabs.d.ts +46 -0
- package/dist/runtime/components/tabs/use-tabs.js +101 -0
- package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
- package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue +1 -1
- package/dist/runtime/components/ui/sidebar/index.js +2 -2
- package/dist/runtime/share/reorder.d.ts +2 -0
- package/dist/runtime/share/reorder.js +12 -0
- package/dist/runtime/utils/nav-registry.d.ts +19 -0
- package/dist/runtime/utils/nav-registry.js +14 -0
- package/dist/runtime/utils/page-title-registry.d.ts +3 -0
- package/dist/runtime/utils/page-title-registry.js +11 -0
- package/dist/runtime/vendor/cel-js/CLAUDE.md +6 -5
- package/dist/runtime/vendor/cel-js/PROMPT.md +97 -19
- package/dist/runtime/vendor/cel-js/lib/decimal.d.ts +4 -0
- package/dist/runtime/vendor/cel-js/lib/decimal.js +35 -0
- package/dist/runtime/vendor/cel-js/lib/evaluator.js +2 -0
- package/dist/runtime/vendor/cel-js/lib/functions.js +107 -134
- package/dist/runtime/vendor/cel-js/lib/macros.js +125 -16
- package/dist/runtime/vendor/cel-js/lib/math-builtins.d.ts +2 -0
- package/dist/runtime/vendor/cel-js/lib/math-builtins.js +39 -0
- package/dist/runtime/vendor/cel-js/lib/optional.d.ts +4 -0
- package/dist/runtime/vendor/cel-js/lib/optional.js +73 -21
- package/dist/runtime/vendor/cel-js/lib/parser.js +2 -6
- package/dist/runtime/vendor/cel-js/lib/registry.js +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Effect, Option } from "effect";
|
|
2
2
|
import { evaluationError, parseError } from "./errors.js";
|
|
3
3
|
import { OPERATORS as OPS } from "./operators.js";
|
|
4
|
-
import { optionalOf } from "./optional.js";
|
|
4
|
+
import { optionalOf, ensureOptional, bindOptionalValueType } from "./optional.js";
|
|
5
5
|
const identity = (x) => x;
|
|
6
6
|
function assertIdentifier(node, message) {
|
|
7
7
|
if (node.op === "id") return node.args;
|
|
@@ -34,9 +34,10 @@ function createMapExpander(hasFilter) {
|
|
|
34
34
|
}
|
|
35
35
|
function functorMap(ev, macro, ctx, recv) {
|
|
36
36
|
return Effect.gen(function* () {
|
|
37
|
-
|
|
37
|
+
const optional = ensureOptional(recv, macro.receiver, `${functionDesc} receiver`);
|
|
38
|
+
if (Option.isNone(optional)) return Option.none();
|
|
38
39
|
const iterCtx = macro.iterCtx.reuse(ctx);
|
|
39
|
-
const result = yield* ev.eval(macro.body, iterCtx.setIterValue(
|
|
40
|
+
const result = yield* ev.eval(macro.body, iterCtx.setIterValue(optional.value, ev));
|
|
40
41
|
return Option.some(result);
|
|
41
42
|
});
|
|
42
43
|
}
|
|
@@ -44,7 +45,7 @@ function createMapExpander(hasFilter) {
|
|
|
44
45
|
const recvType = chk.check(macro.receiver, ctx);
|
|
45
46
|
if (recvType.kind === "optional") {
|
|
46
47
|
macro.mode = "optional";
|
|
47
|
-
const innerType = recvType
|
|
48
|
+
const innerType = bindOptionalValueType(chk, recvType);
|
|
48
49
|
macro.iterCtx = ctx.forkWithVariable(macro.iterVarName, innerType);
|
|
49
50
|
const bodyType = chk.check(macro.body, macro.iterCtx);
|
|
50
51
|
return chk.registry.getOptionalType(bodyType);
|
|
@@ -83,10 +84,62 @@ function createMapExpander(hasFilter) {
|
|
|
83
84
|
};
|
|
84
85
|
};
|
|
85
86
|
}
|
|
87
|
+
function evaluateOptionalPredicate(ev, macro, ctx, optional, label) {
|
|
88
|
+
return Effect.gen(function* () {
|
|
89
|
+
const iterCtx = macro.iterCtx.reuse(ctx);
|
|
90
|
+
const result = yield* ev.eval(macro.body, iterCtx.setIterValue(optional.value, ev));
|
|
91
|
+
if (typeof result !== "boolean") {
|
|
92
|
+
throw evaluationError("invalid_condition_type", `${label}, got '${ev.debugRuntimeType(result)}'`, macro.body);
|
|
93
|
+
}
|
|
94
|
+
return result;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function checkOptionalPredicate(chk, macro, ctx, recvType, label) {
|
|
98
|
+
macro.iterCtx = ctx.forkWithVariable(macro.iterVarName, bindOptionalValueType(chk, recvType));
|
|
99
|
+
const bodyType = chk.check(macro.body, macro.iterCtx);
|
|
100
|
+
if (!bodyType.isDynOrBool() && bodyType.kind !== "param") {
|
|
101
|
+
throw chk.createError("invalid_condition_type", `${label}, got '${bodyType}'`, macro.body);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
86
104
|
function createFilterExpander() {
|
|
87
105
|
const functionDesc = "filter(var, predicate)";
|
|
88
106
|
const invalidMsg = `${functionDesc} invalid predicate iteration variable`;
|
|
89
107
|
const label = `${functionDesc} predicate must return bool`;
|
|
108
|
+
const invalidReceiver = `${functionDesc} receiver`;
|
|
109
|
+
function typeCheck(chk, macro, ctx) {
|
|
110
|
+
const recvType = chk.check(macro.receiver, ctx);
|
|
111
|
+
if (recvType.kind === "optional") {
|
|
112
|
+
macro.mode = "optional";
|
|
113
|
+
checkOptionalPredicate(chk, macro, ctx, recvType, label);
|
|
114
|
+
return recvType;
|
|
115
|
+
}
|
|
116
|
+
if (recvType.kind === "dyn") {
|
|
117
|
+
macro.mode = "dyn";
|
|
118
|
+
macro.iterCtx = ctx.forkWithVariable(macro.iterVarName, chk.getType("dyn"));
|
|
119
|
+
chk.check(macro.comprehension, ctx);
|
|
120
|
+
return chk.getType("dyn");
|
|
121
|
+
}
|
|
122
|
+
macro.mode = "list";
|
|
123
|
+
return chk.check(macro.comprehension, ctx);
|
|
124
|
+
}
|
|
125
|
+
function filterOptional(ev, macro, ctx, recv) {
|
|
126
|
+
return Effect.gen(function* () {
|
|
127
|
+
const optional = ensureOptional(recv, macro.receiver, invalidReceiver);
|
|
128
|
+
if (Option.isNone(optional)) return optional;
|
|
129
|
+
const keep = yield* evaluateOptionalPredicate(ev, macro, ctx, optional, label);
|
|
130
|
+
return keep ? optional : Option.none();
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function evaluate(ev, macro, ctx) {
|
|
134
|
+
if (macro.mode === "list") return ev.eval(macro.comprehension, ctx);
|
|
135
|
+
if (macro.mode === "optional") {
|
|
136
|
+
return Effect.flatMap(ev.eval(macro.receiver, ctx), (recv) => filterOptional(ev, macro, ctx, recv));
|
|
137
|
+
}
|
|
138
|
+
return Effect.flatMap(
|
|
139
|
+
ev.eval(macro.receiver, ctx),
|
|
140
|
+
(recv) => Option.isOption(recv) ? filterOptional(ev, macro, ctx, recv) : ev.eval(macro.comprehension, ctx)
|
|
141
|
+
);
|
|
142
|
+
}
|
|
90
143
|
return (opts) => {
|
|
91
144
|
const { args, receiver, ast: callAst } = opts;
|
|
92
145
|
const iterVarName = assertIdentifier(args[0], invalidMsg);
|
|
@@ -95,35 +148,89 @@ function createFilterExpander() {
|
|
|
95
148
|
const appendItem = callAst.clone(OPS.accuPush, callAst.clone(OPS.id, iterVarName));
|
|
96
149
|
const step = predicate.clone(OPS.ternary, [predicate, appendItem, accuValue]);
|
|
97
150
|
return {
|
|
98
|
-
|
|
151
|
+
ast: callAst,
|
|
152
|
+
receiver,
|
|
153
|
+
iterVarName,
|
|
154
|
+
body: predicate,
|
|
155
|
+
comprehension: callAst.clone(OPS.comprehension, {
|
|
99
156
|
errorsAreFatal: true,
|
|
100
157
|
iterable: receiver,
|
|
101
158
|
iterVarName,
|
|
102
159
|
init: callAst.clone(OPS.list, []),
|
|
103
160
|
step,
|
|
104
161
|
result: identity
|
|
105
|
-
})
|
|
162
|
+
}),
|
|
163
|
+
iterCtx: void 0,
|
|
164
|
+
mode: "list",
|
|
165
|
+
typeCheck,
|
|
166
|
+
evaluate
|
|
106
167
|
};
|
|
107
168
|
};
|
|
108
169
|
}
|
|
109
170
|
function createQuantifierExpander(opts) {
|
|
110
171
|
const invalidMsg = `${opts.name}(var, predicate) invalid predicate iteration variable`;
|
|
111
172
|
const label = `${opts.name}(var, predicate) predicate must return bool`;
|
|
173
|
+
const invalidReceiver = `${opts.name}(var, predicate) receiver`;
|
|
174
|
+
const optionalBranch = opts.optional;
|
|
175
|
+
function typeCheck(chk, macro, ctx) {
|
|
176
|
+
const recvType = chk.check(macro.receiver, ctx);
|
|
177
|
+
if (recvType.kind === "optional") {
|
|
178
|
+
macro.mode = "optional";
|
|
179
|
+
checkOptionalPredicate(chk, macro, ctx, recvType, label);
|
|
180
|
+
return chk.getType("bool");
|
|
181
|
+
}
|
|
182
|
+
if (recvType.kind === "dyn") {
|
|
183
|
+
macro.mode = "dyn";
|
|
184
|
+
macro.iterCtx = ctx.forkWithVariable(macro.iterVarName, chk.getType("dyn"));
|
|
185
|
+
chk.check(macro.comprehension, ctx);
|
|
186
|
+
return chk.getType("bool");
|
|
187
|
+
}
|
|
188
|
+
macro.mode = "list";
|
|
189
|
+
return chk.check(macro.comprehension, ctx);
|
|
190
|
+
}
|
|
191
|
+
function foldOptional(ev, macro, ctx, recv) {
|
|
192
|
+
return Effect.gen(function* () {
|
|
193
|
+
const optional = ensureOptional(recv, macro.receiver, invalidReceiver);
|
|
194
|
+
if (Option.isNone(optional)) return optionalBranch.onNone;
|
|
195
|
+
return yield* evaluateOptionalPredicate(ev, macro, ctx, optional, label);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
function evaluate(ev, macro, ctx) {
|
|
199
|
+
if (macro.mode === "list") return ev.eval(macro.comprehension, ctx);
|
|
200
|
+
if (macro.mode === "optional") {
|
|
201
|
+
return Effect.flatMap(ev.eval(macro.receiver, ctx), (recv) => foldOptional(ev, macro, ctx, recv));
|
|
202
|
+
}
|
|
203
|
+
return Effect.flatMap(
|
|
204
|
+
ev.eval(macro.receiver, ctx),
|
|
205
|
+
(recv) => Option.isOption(recv) ? foldOptional(ev, macro, ctx, recv) : ev.eval(macro.comprehension, ctx)
|
|
206
|
+
);
|
|
207
|
+
}
|
|
112
208
|
return (callOpts) => {
|
|
113
209
|
const { args, receiver, ast: callAst } = callOpts;
|
|
210
|
+
const iterVarName = assertIdentifier(args[0], invalidMsg);
|
|
114
211
|
const predicate = args[1].setMeta("label", label);
|
|
115
212
|
const transform = opts.transform({ args, ast: callAst, predicate, opts });
|
|
213
|
+
const comprehension = callAst.clone(OPS.comprehension, {
|
|
214
|
+
kind: "quantifier",
|
|
215
|
+
errorsAreFatal: opts.errorsAreFatal || false,
|
|
216
|
+
iterable: receiver,
|
|
217
|
+
iterVarName,
|
|
218
|
+
init: transform.init,
|
|
219
|
+
condition: transform.condition,
|
|
220
|
+
step: transform.step,
|
|
221
|
+
result: transform.result || identity
|
|
222
|
+
});
|
|
223
|
+
if (!optionalBranch) return { callAst: comprehension };
|
|
116
224
|
return {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
})
|
|
225
|
+
ast: callAst,
|
|
226
|
+
receiver,
|
|
227
|
+
iterVarName,
|
|
228
|
+
body: predicate,
|
|
229
|
+
comprehension,
|
|
230
|
+
iterCtx: void 0,
|
|
231
|
+
mode: "list",
|
|
232
|
+
typeCheck,
|
|
233
|
+
evaluate
|
|
127
234
|
};
|
|
128
235
|
};
|
|
129
236
|
}
|
|
@@ -231,6 +338,7 @@ export function registerMacros(registry) {
|
|
|
231
338
|
"list.all(ast, ast): bool",
|
|
232
339
|
createQuantifierExpander({
|
|
233
340
|
name: "all",
|
|
341
|
+
optional: { onNone: true },
|
|
234
342
|
transform({ ast: callAst, predicate }) {
|
|
235
343
|
return {
|
|
236
344
|
init: callAst.clone(OPS.value, true),
|
|
@@ -248,6 +356,7 @@ export function registerMacros(registry) {
|
|
|
248
356
|
"list.exists(ast, ast): bool",
|
|
249
357
|
createQuantifierExpander({
|
|
250
358
|
name: "exists",
|
|
359
|
+
optional: { onNone: false },
|
|
251
360
|
condition(accu) {
|
|
252
361
|
return !accu;
|
|
253
362
|
},
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { evaluationError } from "./errors.js";
|
|
2
|
+
import { Decimal } from "./decimal.js";
|
|
3
|
+
class MathNamespace {
|
|
4
|
+
brand = "math";
|
|
5
|
+
}
|
|
6
|
+
const MATH_INSTANCE = new MathNamespace();
|
|
7
|
+
function toDecimal(v) {
|
|
8
|
+
return Decimal.from(v);
|
|
9
|
+
}
|
|
10
|
+
function extremum(name, values) {
|
|
11
|
+
if (values.length === 0) {
|
|
12
|
+
throw evaluationError("empty_list", `math.${name}(): an empty list has no ${name === "min" ? "minimum" : "maximum"}`);
|
|
13
|
+
}
|
|
14
|
+
let best = toDecimal(values[0]);
|
|
15
|
+
for (let i = 1; i < values.length; i++) {
|
|
16
|
+
const v = toDecimal(values[i]);
|
|
17
|
+
if (name === "min" ? v.lt(best) : v.gt(best)) best = v;
|
|
18
|
+
}
|
|
19
|
+
return best;
|
|
20
|
+
}
|
|
21
|
+
export function registerMathBuiltins(registry) {
|
|
22
|
+
registry.registerType("math", MathNamespace);
|
|
23
|
+
registry.registerVariable({
|
|
24
|
+
name: "math",
|
|
25
|
+
type: "math",
|
|
26
|
+
value: MATH_INSTANCE,
|
|
27
|
+
description: "\u6570\u5B66\u51FD\u6570"
|
|
28
|
+
});
|
|
29
|
+
const overload = (sig, handler) => registry.registerFunctionOverload(sig, handler);
|
|
30
|
+
overload("math.trunc(number): number", (_r, v) => toDecimal(v).trunc());
|
|
31
|
+
overload("math.floor(number): number", (_r, v) => toDecimal(v).floor());
|
|
32
|
+
overload("math.ceil(number): number", (_r, v) => toDecimal(v).ceil());
|
|
33
|
+
overload("math.round(number): number", (_r, v) => toDecimal(v).round());
|
|
34
|
+
overload("math.abs(number): number", (_r, v) => toDecimal(v).abs());
|
|
35
|
+
overload("math.min(number, number): number", (_r, a, b) => extremum("min", [a, b]));
|
|
36
|
+
overload("math.max(number, number): number", (_r, a, b) => extremum("max", [a, b]));
|
|
37
|
+
overload("math.min(list<number>): number", (_r, values) => extremum("min", values));
|
|
38
|
+
overload("math.max(list<number>): number", (_r, values) => extremum("max", values));
|
|
39
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Option } from 'effect';
|
|
2
|
+
import type { IContextBase, ITypeCheckerBase, IASTNode, ITypeDeclaration } from './types.js.js';
|
|
2
3
|
import type { Registry } from './registry.js.js';
|
|
3
4
|
export declare function optionalOf(value: unknown): Option.None<{} | null> | Option.Some<{} | null>;
|
|
4
5
|
export declare function optionalValue(opt: Option.Option<unknown>): unknown;
|
|
6
|
+
export declare function ensureOptional(value: unknown, ast: IASTNode, description: string): Option.Option<unknown>;
|
|
7
|
+
export declare function ensureOptionalType(checker: ITypeCheckerBase, node: IASTNode, ctx: IContextBase, description: string): ITypeDeclaration;
|
|
8
|
+
export declare function bindOptionalValueType(checker: ITypeCheckerBase, type: ITypeDeclaration): ITypeDeclaration;
|
|
5
9
|
export declare function register(registry: Registry): void;
|
|
@@ -9,6 +9,20 @@ export function optionalValue(opt) {
|
|
|
9
9
|
}
|
|
10
10
|
return opt.value;
|
|
11
11
|
}
|
|
12
|
+
export function ensureOptional(value, ast, description) {
|
|
13
|
+
if (Option.isOption(value)) return value;
|
|
14
|
+
throw evaluationError("optional_expected", `${description} must be optional`, ast);
|
|
15
|
+
}
|
|
16
|
+
export function ensureOptionalType(checker, node, ctx, description) {
|
|
17
|
+
const type = checker.check(node, ctx);
|
|
18
|
+
if (type.kind === "optional") return type;
|
|
19
|
+
if (type.kind === "dyn") return checker.getType("optional");
|
|
20
|
+
throw checker.createError("optional_expected", `${description} must be optional, got '${type}'`, node);
|
|
21
|
+
}
|
|
22
|
+
export function bindOptionalValueType(checker, type) {
|
|
23
|
+
const vt = type.valueType;
|
|
24
|
+
return vt && vt.kind !== "param" ? vt : checker.getType("dyn");
|
|
25
|
+
}
|
|
12
26
|
class OptionalNamespace {
|
|
13
27
|
#kind = "optional";
|
|
14
28
|
toString() {
|
|
@@ -24,10 +38,7 @@ export function register(registry) {
|
|
|
24
38
|
functionOverload("optional<A>.value(): A", (v) => optionalValue(v));
|
|
25
39
|
registry.registerFunctionOverload("OptionalNamespace.none(): optional<T>", () => Option.none());
|
|
26
40
|
functionOverload("OptionalNamespace.of(A): optional<A>", (_, value) => optionalOf(value));
|
|
27
|
-
|
|
28
|
-
if (Option.isOption(value)) return value;
|
|
29
|
-
throw evaluationError("optional_expected", `${description} must be optional`, ast);
|
|
30
|
-
}
|
|
41
|
+
functionOverload("OptionalNamespace.ofNullable(A): optional<A>", (_, value) => value === null || value === void 0 ? Option.none() : Option.some(value));
|
|
31
42
|
function evaluateOptional(ev, macro, ctx) {
|
|
32
43
|
return Effect.gen(function* () {
|
|
33
44
|
const v = yield* ev.eval(macro.receiver, ctx);
|
|
@@ -36,12 +47,6 @@ export function register(registry) {
|
|
|
36
47
|
return yield* macro.onEmpty(ev, macro, ctx);
|
|
37
48
|
});
|
|
38
49
|
}
|
|
39
|
-
function ensureOptionalType(checker, node, ctx, description) {
|
|
40
|
-
const type = checker.check(node, ctx);
|
|
41
|
-
if (type.kind === "optional") return type;
|
|
42
|
-
if (type.kind === "dyn") return checker.getType("optional");
|
|
43
|
-
throw checker.createError("optional_expected", `${description} must be optional, got '${type}'`, node);
|
|
44
|
-
}
|
|
45
50
|
function createOptionalMacro({ functionDesc, evaluate, typeCheck, onHasValue, onEmpty }) {
|
|
46
51
|
return (opts) => {
|
|
47
52
|
const { ast, args, receiver } = opts;
|
|
@@ -112,25 +117,19 @@ export function register(registry) {
|
|
|
112
117
|
"optional<A>.flatMap(ast, ast): optional<dyn>",
|
|
113
118
|
createFlatMapExpander()
|
|
114
119
|
);
|
|
120
|
+
registry.registerFunctionOverload(
|
|
121
|
+
"optional<A>.zip(ast, ast, ast, ast): optional<dyn>",
|
|
122
|
+
createZipExpander()
|
|
123
|
+
);
|
|
115
124
|
}
|
|
116
125
|
function createFlatMapExpander() {
|
|
117
126
|
const functionDesc = "optional.flatMap(var, body)";
|
|
118
127
|
const invalidVar = `${functionDesc} invalid iteration variable`;
|
|
119
128
|
const invalidReceiver = `${functionDesc} receiver`;
|
|
120
129
|
const invalidBody = `${functionDesc} body`;
|
|
121
|
-
function ensureOptional(value, ast, description) {
|
|
122
|
-
if (Option.isOption(value)) return value;
|
|
123
|
-
throw evaluationError("optional_expected", `${description} must be optional`, ast);
|
|
124
|
-
}
|
|
125
|
-
function ensureOptionalType(checker, node, ctx, description) {
|
|
126
|
-
const type = checker.check(node, ctx);
|
|
127
|
-
if (type.kind === "optional") return type;
|
|
128
|
-
if (type.kind === "dyn") return checker.getType("optional");
|
|
129
|
-
throw checker.createError("optional_expected", `${description} must be optional, got '${type}'`, node);
|
|
130
|
-
}
|
|
131
130
|
function typeCheck(checker, macro, ctx) {
|
|
132
131
|
const receiverType = ensureOptionalType(checker, macro.receiver, ctx, invalidReceiver);
|
|
133
|
-
const innerType = receiverType
|
|
132
|
+
const innerType = bindOptionalValueType(checker, receiverType);
|
|
134
133
|
macro.iterCtx = ctx.forkWithVariable(macro.iterVarName, innerType);
|
|
135
134
|
return ensureOptionalType(checker, macro.body, macro.iterCtx, invalidBody);
|
|
136
135
|
}
|
|
@@ -160,3 +159,56 @@ function createFlatMapExpander() {
|
|
|
160
159
|
};
|
|
161
160
|
};
|
|
162
161
|
}
|
|
162
|
+
function createZipExpander() {
|
|
163
|
+
const functionDesc = "optional.zip(other, x, y, body)";
|
|
164
|
+
const invalidVarX = `${functionDesc} invalid first binding variable`;
|
|
165
|
+
const invalidVarY = `${functionDesc} invalid second binding variable`;
|
|
166
|
+
const invalidReceiver = `${functionDesc} receiver`;
|
|
167
|
+
const invalidOther = `${functionDesc} argument`;
|
|
168
|
+
function typeCheck(checker, macro, ctx) {
|
|
169
|
+
const receiverType = ensureOptionalType(checker, macro.receiver, ctx, invalidReceiver);
|
|
170
|
+
const otherType = ensureOptionalType(checker, macro.other, ctx, invalidOther);
|
|
171
|
+
const xType = bindOptionalValueType(checker, receiverType);
|
|
172
|
+
const yType = bindOptionalValueType(checker, otherType);
|
|
173
|
+
const ctxX = ctx.forkWithVariable(macro.xVarName, xType);
|
|
174
|
+
const ctxY = ctxX.forkWithVariable(macro.yVarName, yType);
|
|
175
|
+
macro.iterCtxX = ctxX;
|
|
176
|
+
macro.iterCtxY = ctxY;
|
|
177
|
+
const bodyType = checker.check(macro.body, ctxY);
|
|
178
|
+
return checker.registry.getOptionalType(bodyType);
|
|
179
|
+
}
|
|
180
|
+
function evaluate(ev, macro, ctx) {
|
|
181
|
+
return Effect.gen(function* () {
|
|
182
|
+
const recv = yield* ev.eval(macro.receiver, ctx);
|
|
183
|
+
const optRecv = ensureOptional(recv, macro.receiver, invalidReceiver);
|
|
184
|
+
if (Option.isNone(optRecv)) return Option.none();
|
|
185
|
+
const other = yield* ev.eval(macro.other, ctx);
|
|
186
|
+
const optOther = ensureOptional(other, macro.other, invalidOther);
|
|
187
|
+
if (Option.isNone(optOther)) return Option.none();
|
|
188
|
+
const ctxX = macro.iterCtxX.reuse(ctx).setIterValue(optRecv.value, ev);
|
|
189
|
+
const ctxY = macro.iterCtxY.reuse(ctxX).setIterValue(optOther.value, ev);
|
|
190
|
+
const result = yield* ev.eval(macro.body, ctxY);
|
|
191
|
+
return Option.some(result);
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
return (opts) => {
|
|
195
|
+
const { args, receiver, ast } = opts;
|
|
196
|
+
const xVar = args[1];
|
|
197
|
+
const yVar = args[2];
|
|
198
|
+
if (xVar.op !== "id") throw parseError("invalid_macro_argument", invalidVarX, xVar);
|
|
199
|
+
if (yVar.op !== "id") throw parseError("invalid_macro_argument", invalidVarY, yVar);
|
|
200
|
+
return {
|
|
201
|
+
ast,
|
|
202
|
+
receiver,
|
|
203
|
+
functionDesc,
|
|
204
|
+
other: args[0],
|
|
205
|
+
xVarName: xVar.args,
|
|
206
|
+
yVarName: yVar.args,
|
|
207
|
+
body: args[3],
|
|
208
|
+
iterCtxX: void 0,
|
|
209
|
+
iterCtxY: void 0,
|
|
210
|
+
evaluate,
|
|
211
|
+
typeCheck
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
}
|
|
@@ -304,9 +304,7 @@ class Lexer {
|
|
|
304
304
|
pos += 2;
|
|
305
305
|
while (pos < length && HEX_CODES[input[pos].charCodeAt(0)]) pos++;
|
|
306
306
|
this.pos = pos;
|
|
307
|
-
|
|
308
|
-
if (pos < length && (input[pos] === "u" || input[pos] === "U")) this.pos++;
|
|
309
|
-
return result2;
|
|
307
|
+
return this._parseAsHexNumber(start, pos);
|
|
310
308
|
}
|
|
311
309
|
pos = this._readDigits(input, length, pos);
|
|
312
310
|
if (pos + 1 < length) {
|
|
@@ -316,9 +314,7 @@ class Lexer {
|
|
|
316
314
|
if (afterpos !== pos) pos = afterpos;
|
|
317
315
|
}
|
|
318
316
|
this.pos = pos;
|
|
319
|
-
|
|
320
|
-
if (pos < length && (input[pos] === "u" || input[pos] === "U")) this.pos++;
|
|
321
|
-
return result;
|
|
317
|
+
return this._parseAsNumber(start, pos);
|
|
322
318
|
}
|
|
323
319
|
readString(del, prefix) {
|
|
324
320
|
const { input: i, pos: s } = this;
|
|
@@ -1318,13 +1318,13 @@ function protobufjsTypeToCelType(protoType, resolvedType) {
|
|
|
1318
1318
|
case "uint64":
|
|
1319
1319
|
case "fixed32":
|
|
1320
1320
|
case "fixed64":
|
|
1321
|
-
return "
|
|
1321
|
+
return "number";
|
|
1322
1322
|
default:
|
|
1323
1323
|
switch (resolvedType?.constructor?.name) {
|
|
1324
1324
|
case "Type":
|
|
1325
1325
|
return resolvedType.fullName.slice(1);
|
|
1326
1326
|
case "Enum":
|
|
1327
|
-
return "
|
|
1327
|
+
return "number";
|
|
1328
1328
|
}
|
|
1329
1329
|
if (protoType?.includes(".")) return protoType;
|
|
1330
1330
|
return "dyn";
|