@ibiz-template/vue3-components 0.7.31-alpha.0 → 0.7.37-alpha.5
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/chart-IZpj2cdX.js +1 -0
- package/dist/index-2J-iBLG-.js +1 -0
- package/dist/index-Yhyr5LJS.js +1 -0
- package/dist/index-p59-xI3J.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-OUxT4A8O.js → xlsx-util-rAKH_Qlc.js} +1 -1
- package/es/_virtual/_dayjs.mjs +1 -0
- package/es/_virtual/zh-cn.mjs +3 -0
- package/es/common/action-toolbar/action-toolbar.css +1 -1
- package/es/common/action-toolbar/action-toolbar.mjs +2 -2
- package/es/common/coop-alert/coop-alert.d.ts +3 -3
- package/es/common/custom-filter-condition/custom-filter-condition.css +1 -0
- package/es/common/custom-filter-condition/custom-filter-condition.d.ts +998 -0
- package/es/common/custom-filter-condition/custom-filter-condition.mjs +286 -0
- package/es/common/custom-theme/custom-theme-model.mjs +62 -0
- package/es/common/custom-theme/custom-theme.controller.mjs +6 -5
- package/es/common/custom-theme/custom-theme.css +1 -1
- package/es/common/emoji-select/emoji-select.d.ts +1 -1
- package/es/common/index.mjs +2 -0
- package/es/common/pagination/pagination.css +1 -1
- package/es/common/pagination/pagination.mjs +1 -1
- package/es/common/pql-editor/components/pql-editor-suggestion/pql-editor-suggestion.css +1 -1
- package/es/common/pql-editor/components/pql-editor-suggestion/pql-editor-suggestion.mjs +4 -1
- package/es/common/pql-editor/pql-editor.d.ts +6 -0
- package/es/common/pql-editor/pql-editor.mjs +229 -130
- package/es/common/pql-editor/utils/index.d.ts +8 -4
- package/es/common/pql-editor/utils/index.mjs +193 -69
- package/es/common/rawitem/rawitem.mjs +16 -0
- package/es/common/split/split.d.ts +1 -1
- package/es/control/app-menu/app-menu.css +1 -1
- package/es/control/app-menu/app-menu.mjs +3 -2
- package/es/control/caption-bar/caption-bar.css +1 -1
- package/es/control/caption-bar/caption-bar.d.ts +1 -0
- package/es/control/caption-bar/caption-bar.mjs +12 -3
- package/es/control/caption-bar/index.d.ts +1 -0
- package/es/control/chart/chart.mjs +1 -1
- package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +21 -3
- package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.mjs +35 -10
- package/es/control/dashboard/dashboard-design/dashboard-design.css +1 -1
- package/es/control/dashboard/dashboard-design/dashboard-design.mjs +2 -2
- package/es/control/dashboard/dashboard.d.ts +2 -2
- package/es/control/dashboard/dashboard.mjs +41 -7
- package/es/control/dashboard/index.d.ts +1 -1
- package/es/control/dashboard/index.mjs +4 -1
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.css +1 -0
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.d.ts +64 -0
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.mjs +341 -0
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/index.d.ts +0 -0
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/index.mjs +1 -0
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet-item/filter-portlet-item.css +1 -0
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet-item/filter-portlet-item.d.ts +41 -0
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet-item/filter-portlet-item.mjs +130 -0
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet.css +1 -0
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet.d.ts +30 -0
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet.mjs +87 -0
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet.provider.d.ts +15 -0
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet.provider.mjs +21 -0
- package/es/control/dashboard/portlet/filter-portlet/index.d.ts +28 -0
- package/es/control/dashboard/portlet/filter-portlet/index.mjs +14 -0
- package/es/control/dashboard/portlet/index.d.ts +1 -0
- package/es/control/dashboard/portlet/index.mjs +2 -0
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +1 -1
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/form/form-detail/form-druipart/form-druipart.css +1 -1
- package/es/control/form/form-detail/form-group-panel/form-group-panel.css +1 -1
- package/es/control/form/form-detail/form-group-panel/form-group-panel.mjs +6 -2
- package/es/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
- package/es/control/form/form-detail/form-item/form-item.mjs +8 -3
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +6 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +4 -3
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.mjs +6 -12
- package/es/control/form/form-detail/form-rawitem/form-rawitem.css +1 -1
- package/es/control/form/form-detail/form-rawitem/form-rawitem.mjs +8 -1
- package/es/control/grid/grid/grid-control.util.mjs +1 -1
- package/es/control/grid/grid/grid.css +1 -1
- package/es/control/grid/grid/grid.mjs +5 -1
- package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.mjs +2 -2
- package/es/control/index.mjs +2 -0
- package/es/control/search-bar/filter-tree/filter-tree.d.ts +16 -1
- package/es/control/search-bar/filter-tree/filter-tree.mjs +12 -4
- package/es/control/search-bar/quick-search-select/quick-search-select.css +1 -1
- package/es/control/search-bar/quick-search-select/quick-search-select.mjs +1 -0
- package/es/control/search-bar/search-bar.css +1 -1
- package/es/control/search-bar/search-bar.mjs +2 -0
- package/es/control/search-bar/search-groups/search-groups.mjs +8 -5
- package/es/control/toolbar/export-excel/export-excel.css +1 -1
- package/es/control/toolbar/toolbar.css +1 -1
- package/es/control/tree/tree.css +1 -1
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/tree-grid-ex-edit-column.mjs +2 -2
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +1 -1
- package/es/control/wizard-panel/wizard-panel.css +1 -1
- package/es/editor/cascader/ibiz-cascader/ibiz-cascader.d.ts +1 -1
- package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.d.ts +35 -1
- package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.mjs +26 -55
- package/es/editor/date-range-select/date-range-select-picker/components/quarter-range-select/quarter-range-select.css +1 -0
- package/es/editor/date-range-select/date-range-select-picker/components/quarter-range-select/quarter-range-select.d.ts +51 -0
- package/es/editor/date-range-select/date-range-select-picker/components/quarter-range-select/quarter-range-select.mjs +335 -0
- package/es/editor/date-range-select/date-range-select-picker/components/week-range-select/week-range-select.css +1 -0
- package/es/editor/date-range-select/date-range-select-picker/components/week-range-select/week-range-select.d.ts +65 -0
- package/es/editor/date-range-select/date-range-select-picker/components/week-range-select/week-range-select.mjs +260 -0
- package/es/editor/date-range-select/date-range-select-picker/components/year-range-select/year-range-select.css +1 -0
- package/es/editor/date-range-select/date-range-select-picker/components/year-range-select/year-range-select.d.ts +52 -0
- package/es/editor/date-range-select/date-range-select-picker/components/year-range-select/year-range-select.mjs +258 -0
- package/es/editor/date-range-select/date-range-select-picker/date-range-select.css +1 -0
- package/es/editor/date-range-select/date-range-select-picker/date-range-select.d.ts +64 -0
- package/es/editor/date-range-select/date-range-select-picker/date-range-select.mjs +339 -0
- package/es/editor/date-range-select/date-range-select.controller.d.ts +328 -0
- package/es/editor/date-range-select/date-range-select.controller.mjs +859 -0
- package/es/editor/date-range-select/date-range-select.provider.d.ts +8 -0
- package/es/editor/date-range-select/date-range-select.provider.mjs +25 -0
- package/es/editor/date-range-select/index.d.ts +3 -0
- package/es/editor/date-range-select/index.mjs +5 -0
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.d.ts +3 -0
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +48 -22
- package/es/editor/index.mjs +8 -0
- package/es/editor/list-box/ibiz-list-box/ibiz-list-box.mjs +32 -32
- package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.css +1 -1
- package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.mjs +17 -2
- package/es/editor/raw/ibiz-raw/ibiz-raw.mjs +6 -7
- package/es/editor/span/span/span.css +1 -1
- package/es/editor/span/span/span.mjs +2 -0
- package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.d.ts +1 -0
- package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.d.ts +1 -0
- package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.mjs +4 -2
- package/es/editor/upload/use/use-iview-upload.d.ts +1 -0
- package/es/editor/upload/use/use-iview-upload.mjs +37 -0
- package/es/index.mjs +2 -0
- package/es/interface/i-field.d.ts +66 -0
- package/es/interface/i-field.mjs +1 -0
- package/es/interface/i-filter-condition.d.ts +52 -0
- package/es/interface/i-filter-condition.mjs +1 -0
- package/es/interface/i-pql-item.d.ts +1 -0
- package/es/interface/i-pql-node-item.d.ts +35 -0
- package/es/interface/i-pql-node-item.mjs +1 -0
- package/es/interface/index.d.ts +3 -0
- package/es/interface/index.mjs +3 -0
- package/es/locale/en/index.d.ts +78 -1
- package/es/locale/en/index.mjs +74 -3
- package/es/locale/zh-CN/index.d.ts +78 -1
- package/es/locale/zh-CN/index.mjs +74 -3
- package/es/node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +15 -0
- package/es/panel-component/auth-userinfo/auth-userinfo.css +1 -1
- package/es/panel-component/coop-pos/coop-pos.controller.d.ts +17 -4
- package/es/panel-component/coop-pos/coop-pos.controller.mjs +48 -4
- package/es/panel-component/coop-pos/coop-pos.css +1 -1
- package/es/panel-component/coop-pos/coop-pos.d.ts +12 -0
- package/es/panel-component/coop-pos/coop-pos.mjs +20 -4
- package/es/panel-component/coop-pos/coop-pos.state.d.ts +14 -0
- package/es/panel-component/coop-pos/coop-pos.state.mjs +14 -0
- package/es/panel-component/coop-pos/index.d.ts +1 -0
- package/es/panel-component/nav-tabs/nav-tabs.css +1 -1
- package/es/panel-component/panel-app-login-view/panel-app-login-view.css +1 -1
- package/es/panel-component/panel-app-title/panel-app-title.controller.d.ts +18 -3
- package/es/panel-component/panel-app-title/panel-app-title.controller.mjs +28 -0
- package/es/panel-component/panel-app-title/panel-app-title.css +1 -1
- package/es/panel-component/panel-app-title/panel-app-title.mjs +46 -3
- package/es/panel-component/panel-button/index.d.ts +1 -1
- package/es/panel-component/panel-button/panel-button.d.ts +1 -1
- package/es/panel-component/panel-exp-header/panel-exp-header.css +1 -1
- package/es/panel-component/panel-index-view-search/panel-index-view-search.css +1 -1
- package/es/panel-component/short-cut/short-cut.css +1 -1
- package/es/util/app-modal/app-modal-component.css +1 -1
- package/es/util/fullscreen/fullscreen-util.d.ts +7 -0
- package/es/util/fullscreen/fullscreen-util.mjs +9 -0
- package/es/util/open-view-util/open-view-util.d.ts +11 -0
- package/es/util/open-view-util/open-view-util.mjs +21 -0
- package/es/util/wang-editor-util/wang-editor-util.d.ts +1 -0
- package/es/util/wang-editor-util/wang-editor-util.mjs +12 -7
- package/es/view/login-view/login-view.css +1 -1
- package/es/view/share-view/share-view.css +1 -1
- package/es/view-engine/edit-view.engine.d.ts +17 -0
- package/es/view-engine/edit-view.engine.mjs +73 -36
- package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +1 -1
- package/es/web-app/create-vue-app.mjs +8 -0
- package/lib/_virtual/_dayjs.cjs +9 -0
- package/lib/_virtual/zh-cn.cjs +5 -0
- package/lib/common/action-toolbar/action-toolbar.cjs +2 -2
- package/lib/common/action-toolbar/action-toolbar.css +1 -1
- package/lib/common/custom-filter-condition/custom-filter-condition.cjs +288 -0
- package/lib/common/custom-filter-condition/custom-filter-condition.css +1 -0
- package/lib/common/custom-theme/custom-theme-model.cjs +62 -0
- package/lib/common/custom-theme/custom-theme.controller.cjs +6 -5
- package/lib/common/custom-theme/custom-theme.css +1 -1
- package/lib/common/index.cjs +2 -0
- package/lib/common/pagination/pagination.cjs +1 -1
- package/lib/common/pagination/pagination.css +1 -1
- package/lib/common/pql-editor/components/pql-editor-suggestion/pql-editor-suggestion.cjs +4 -1
- package/lib/common/pql-editor/components/pql-editor-suggestion/pql-editor-suggestion.css +1 -1
- package/lib/common/pql-editor/pql-editor.cjs +228 -129
- package/lib/common/pql-editor/utils/index.cjs +195 -68
- package/lib/common/rawitem/rawitem.cjs +16 -0
- package/lib/control/app-menu/app-menu.cjs +3 -2
- package/lib/control/app-menu/app-menu.css +1 -1
- package/lib/control/caption-bar/caption-bar.cjs +11 -2
- package/lib/control/caption-bar/caption-bar.css +1 -1
- package/lib/control/chart/chart.cjs +1 -1
- package/lib/control/dashboard/custom-dashboard-container/custom-dashboard-container.cjs +34 -9
- package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +2 -2
- package/lib/control/dashboard/dashboard-design/dashboard-design.css +1 -1
- package/lib/control/dashboard/dashboard.cjs +40 -6
- package/lib/control/dashboard/index.cjs +5 -0
- package/lib/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.cjs +343 -0
- package/lib/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.css +1 -0
- package/lib/control/dashboard/portlet/filter-portlet/filter-portlet-design/index.cjs +3 -0
- package/lib/control/dashboard/portlet/filter-portlet/filter-portlet-item/filter-portlet-item.cjs +132 -0
- package/lib/control/dashboard/portlet/filter-portlet/filter-portlet-item/filter-portlet-item.css +1 -0
- package/lib/control/dashboard/portlet/filter-portlet/filter-portlet.cjs +89 -0
- package/lib/control/dashboard/portlet/filter-portlet/filter-portlet.css +1 -0
- package/lib/control/dashboard/portlet/filter-portlet/filter-portlet.provider.cjs +23 -0
- package/lib/control/dashboard/portlet/filter-portlet/index.cjs +20 -0
- package/lib/control/dashboard/portlet/index.cjs +4 -0
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +1 -1
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/form/form-detail/form-druipart/form-druipart.css +1 -1
- package/lib/control/form/form-detail/form-group-panel/form-group-panel.cjs +6 -2
- package/lib/control/form/form-detail/form-group-panel/form-group-panel.css +1 -1
- package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
- package/lib/control/form/form-detail/form-item/form-item.cjs +8 -3
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +3 -2
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.cjs +5 -11
- package/lib/control/form/form-detail/form-rawitem/form-rawitem.cjs +8 -1
- package/lib/control/form/form-detail/form-rawitem/form-rawitem.css +1 -1
- package/lib/control/grid/grid/grid-control.util.cjs +1 -1
- package/lib/control/grid/grid/grid.cjs +5 -1
- package/lib/control/grid/grid/grid.css +1 -1
- package/lib/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.cjs +2 -2
- package/lib/control/index.cjs +22 -18
- package/lib/control/search-bar/filter-tree/filter-tree.cjs +12 -4
- package/lib/control/search-bar/quick-search-select/quick-search-select.cjs +1 -0
- package/lib/control/search-bar/quick-search-select/quick-search-select.css +1 -1
- package/lib/control/search-bar/search-bar.cjs +2 -0
- package/lib/control/search-bar/search-bar.css +1 -1
- package/lib/control/search-bar/search-groups/search-groups.cjs +8 -5
- package/lib/control/toolbar/export-excel/export-excel.css +1 -1
- package/lib/control/toolbar/toolbar.css +1 -1
- package/lib/control/tree/tree.css +1 -1
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/tree-grid-ex-edit-column.cjs +2 -2
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +1 -1
- package/lib/control/wizard-panel/wizard-panel.css +1 -1
- package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.cjs +26 -55
- package/lib/editor/date-range-select/date-range-select-picker/components/quarter-range-select/quarter-range-select.cjs +339 -0
- package/lib/editor/date-range-select/date-range-select-picker/components/quarter-range-select/quarter-range-select.css +1 -0
- package/lib/editor/date-range-select/date-range-select-picker/components/week-range-select/week-range-select.cjs +264 -0
- package/lib/editor/date-range-select/date-range-select-picker/components/week-range-select/week-range-select.css +1 -0
- package/lib/editor/date-range-select/date-range-select-picker/components/year-range-select/year-range-select.cjs +262 -0
- package/lib/editor/date-range-select/date-range-select-picker/components/year-range-select/year-range-select.css +1 -0
- package/lib/editor/date-range-select/date-range-select-picker/date-range-select.cjs +341 -0
- package/lib/editor/date-range-select/date-range-select-picker/date-range-select.css +1 -0
- package/lib/editor/date-range-select/date-range-select.controller.cjs +861 -0
- package/lib/editor/date-range-select/date-range-select.provider.cjs +27 -0
- package/lib/editor/date-range-select/index.cjs +11 -0
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +47 -21
- package/lib/editor/index.cjs +8 -0
- package/lib/editor/list-box/ibiz-list-box/ibiz-list-box.cjs +32 -32
- package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.cjs +17 -2
- package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.css +1 -1
- package/lib/editor/raw/ibiz-raw/ibiz-raw.cjs +6 -7
- package/lib/editor/span/span/span.cjs +2 -0
- package/lib/editor/span/span/span.css +1 -1
- package/lib/editor/upload/ibiz-image-upload/ibiz-image-upload.cjs +4 -2
- package/lib/editor/upload/use/use-iview-upload.cjs +37 -0
- package/lib/index.cjs +52 -48
- package/lib/interface/i-field.cjs +3 -0
- package/lib/interface/i-filter-condition.cjs +3 -0
- package/lib/interface/i-pql-node-item.cjs +3 -0
- package/lib/interface/index.cjs +3 -0
- package/lib/locale/en/index.cjs +74 -3
- package/lib/locale/zh-CN/index.cjs +74 -3
- package/lib/node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.cjs +19 -0
- package/lib/panel-component/auth-userinfo/auth-userinfo.css +1 -1
- package/lib/panel-component/coop-pos/coop-pos.cjs +19 -3
- package/lib/panel-component/coop-pos/coop-pos.controller.cjs +48 -4
- package/lib/panel-component/coop-pos/coop-pos.css +1 -1
- package/lib/panel-component/coop-pos/coop-pos.state.cjs +14 -0
- package/lib/panel-component/nav-tabs/nav-tabs.css +1 -1
- package/lib/panel-component/panel-app-login-view/panel-app-login-view.css +1 -1
- package/lib/panel-component/panel-app-title/panel-app-title.cjs +46 -3
- package/lib/panel-component/panel-app-title/panel-app-title.controller.cjs +28 -0
- package/lib/panel-component/panel-app-title/panel-app-title.css +1 -1
- package/lib/panel-component/panel-exp-header/panel-exp-header.css +1 -1
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.css +1 -1
- package/lib/panel-component/short-cut/short-cut.css +1 -1
- package/lib/util/app-modal/app-modal-component.css +1 -1
- package/lib/util/fullscreen/fullscreen-util.cjs +9 -0
- package/lib/util/open-view-util/open-view-util.cjs +21 -0
- package/lib/util/wang-editor-util/wang-editor-util.cjs +12 -7
- package/lib/view/login-view/login-view.css +1 -1
- package/lib/view/share-view/share-view.css +1 -1
- package/lib/view-engine/edit-view.engine.cjs +72 -35
- package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +1 -1
- package/lib/web-app/create-vue-app.cjs +8 -0
- package/package.json +9 -8
- package/dist/chart-0UV2FAN6.js +0 -1
- package/dist/index-YQyitjSg.js +0 -1
- package/dist/index-maJGu4b8.js +0 -4
- package/dist/index-trS6uS3E.js +0 -1
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.30_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.35-alpha.1_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
- /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.30_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.35-alpha.1_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
|
@@ -4,7 +4,7 @@ import { listenJSEvent } from '@ibiz-template/core';
|
|
|
4
4
|
import { DomEditor, SlatePath, SlateEditor, Boot, createEditor } from '@wangeditor/editor';
|
|
5
5
|
import { PqlModule } from './pql-editor.module.mjs';
|
|
6
6
|
import './components/index.mjs';
|
|
7
|
-
import { FilterModes, ExcludeOPs, parseCustomCond, pqlItemsToPqlNodes, pqlNodesToHtml,
|
|
7
|
+
import { isMove, generateNodeItems, InOPs, FilterModes, InputOPs, ExcludeOPs, parseCustomCond, pqlItemsToPqlNodes, pqlNodesToHtml, generateCustomCond } from './utils/index.mjs';
|
|
8
8
|
import './pql-editor.css';
|
|
9
9
|
import { IBizPqlEditorSuggestion } from './components/pql-editor-suggestion/pql-editor-suggestion.mjs';
|
|
10
10
|
|
|
@@ -32,6 +32,9 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
type: Object,
|
|
33
33
|
required: true
|
|
34
34
|
},
|
|
35
|
+
params: {
|
|
36
|
+
type: Object
|
|
37
|
+
},
|
|
35
38
|
renderItem: {
|
|
36
39
|
type: Function
|
|
37
40
|
}
|
|
@@ -95,20 +98,95 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
95
98
|
}
|
|
96
99
|
}
|
|
97
100
|
};
|
|
101
|
+
const getEntitySuggestionItems = async (field) => {
|
|
102
|
+
if (!field || !field.appDataEntityId) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const service = await ibiz.hub.getAppDEService(props.context.srfappid, field.appDataEntityId, props.context);
|
|
106
|
+
const data = await service.fetchDefault(props.context, props.params);
|
|
107
|
+
if (data && Array.isArray(data.data)) {
|
|
108
|
+
const items = data.data;
|
|
109
|
+
if (items.length) {
|
|
110
|
+
return items.map((item) => {
|
|
111
|
+
return {
|
|
112
|
+
type: "pql-field-value",
|
|
113
|
+
label: item.srfmajortext,
|
|
114
|
+
value: item.srfkey
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return [{
|
|
119
|
+
_msg: ibiz.i18n.t("control.common.currentNoData")
|
|
120
|
+
}];
|
|
121
|
+
}
|
|
122
|
+
};
|
|
98
123
|
const getSuggestionItems = async () => {
|
|
99
|
-
var _a, _b, _c, _d, _e;
|
|
124
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
100
125
|
if (!editor) {
|
|
101
126
|
return [];
|
|
102
127
|
}
|
|
103
128
|
const currenNode = getCurrentNode();
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
129
|
+
const {
|
|
130
|
+
selection
|
|
131
|
+
} = editor;
|
|
132
|
+
if (!selection) {
|
|
107
133
|
return [];
|
|
108
134
|
}
|
|
135
|
+
if (selection && ((_b = (_a = selection.focus) == null ? void 0 : _a.path) == null ? void 0 : _b[0]) !== 0) {
|
|
136
|
+
return [];
|
|
137
|
+
}
|
|
138
|
+
if (!currenNode) {
|
|
139
|
+
if (selection && ((_c = selection.focus) == null ? void 0 : _c.offset) === 0) {
|
|
140
|
+
const node = SlateEditor.node(editor, selection)[0];
|
|
141
|
+
if (node) {
|
|
142
|
+
const el = editor.toDOMNode(node);
|
|
143
|
+
if (isMove(el)) {
|
|
144
|
+
return [];
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
109
149
|
if (editor.selection) {
|
|
110
150
|
const node = SlateEditor.node(editor, editor.selection);
|
|
111
|
-
if (node && ((
|
|
151
|
+
if (node && ((_d = node[0]) == null ? void 0 : _d.type)) {
|
|
152
|
+
return [];
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const nodeItems = generateNodeItems(currenNode, getPreviousNode);
|
|
156
|
+
const nodeItem = nodeItems[nodeItems.length - 1];
|
|
157
|
+
if (nodeItem && nodeItem.type === "condition") {
|
|
158
|
+
if (((_e = nodeItem.operator) == null ? void 0 : _e.value) && InOPs.includes(nodeItem.operator.value)) {
|
|
159
|
+
if (nodeItem.value) {
|
|
160
|
+
if (currenNode === nodeItem.value[nodeItem.value.length - 1] && currenNode.text) {
|
|
161
|
+
const text = currenNode.text.slice(0, selection.focus.offset).trim();
|
|
162
|
+
if (text === "," || text === "[") {
|
|
163
|
+
const field = props.fields.find((item) => {
|
|
164
|
+
var _a2;
|
|
165
|
+
return item.appDEFieldId === ((_a2 = nodeItem.key) == null ? void 0 : _a2.value);
|
|
166
|
+
});
|
|
167
|
+
if (field && field.appCodeListId) {
|
|
168
|
+
const items = await getCodeListItems(field.appCodeListId);
|
|
169
|
+
return items.map((item) => {
|
|
170
|
+
return {
|
|
171
|
+
type: "pql-field-value",
|
|
172
|
+
label: item.text,
|
|
173
|
+
value: item.value
|
|
174
|
+
};
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
const entitySuggestionItems = await getEntitySuggestionItems(field);
|
|
178
|
+
if (entitySuggestionItems) {
|
|
179
|
+
return entitySuggestionItems;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (text === "]" || text === "[]") {
|
|
183
|
+
return connectionList;
|
|
184
|
+
}
|
|
185
|
+
if (nodeItem.value.length === 1 && text) {
|
|
186
|
+
return connectionList;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
112
190
|
return [];
|
|
113
191
|
}
|
|
114
192
|
}
|
|
@@ -131,6 +209,9 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
131
209
|
if (currenNode && currenNode.type === "pql-field-operator") {
|
|
132
210
|
const mode = FilterModes.find((_mode) => _mode.valueOP === currenNode.value);
|
|
133
211
|
if (mode) {
|
|
212
|
+
if (InputOPs.includes(mode.valueOP)) {
|
|
213
|
+
return [];
|
|
214
|
+
}
|
|
134
215
|
if (ExcludeOPs.includes(mode.valueOP)) {
|
|
135
216
|
return connectionList;
|
|
136
217
|
}
|
|
@@ -147,6 +228,10 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
147
228
|
};
|
|
148
229
|
});
|
|
149
230
|
}
|
|
231
|
+
const entitySuggestionItems = await getEntitySuggestionItems(field);
|
|
232
|
+
if (entitySuggestionItems) {
|
|
233
|
+
return entitySuggestionItems;
|
|
234
|
+
}
|
|
150
235
|
}
|
|
151
236
|
}
|
|
152
237
|
return [];
|
|
@@ -163,13 +248,13 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
163
248
|
if (currenNode && !currenNode.type) {
|
|
164
249
|
const previousNode = getPreviousNode(currenNode);
|
|
165
250
|
if (previousNode && previousNode.type === "pql-field-operator") {
|
|
166
|
-
if (((
|
|
251
|
+
if (((_f = editor.selection) == null ? void 0 : _f.focus.offset) !== 0) {
|
|
167
252
|
return connectionList;
|
|
168
253
|
}
|
|
169
254
|
return [];
|
|
170
255
|
}
|
|
171
256
|
if (previousNode && previousNode.type === "pql-field") {
|
|
172
|
-
if (((
|
|
257
|
+
if (((_g = editor.selection) == null ? void 0 : _g.focus.offset) !== 0) {
|
|
173
258
|
return connectionList;
|
|
174
259
|
}
|
|
175
260
|
const field = props.fields.find((item) => item.appDEFieldId === previousNode.value);
|
|
@@ -184,7 +269,7 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
184
269
|
}
|
|
185
270
|
}
|
|
186
271
|
if (previousNode && previousNode.type === "pql-field-connection") {
|
|
187
|
-
if (((
|
|
272
|
+
if (((_h = editor.selection) == null ? void 0 : _h.focus.offset) !== 0) {
|
|
188
273
|
return connectionList;
|
|
189
274
|
}
|
|
190
275
|
return props.fields.map((item) => {
|
|
@@ -227,6 +312,10 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
227
312
|
};
|
|
228
313
|
editor.insertNode(node);
|
|
229
314
|
editor.move(1);
|
|
315
|
+
if (item.type === "pql-field-operator" && InOPs.includes(item.value)) {
|
|
316
|
+
editor.insertText("[]");
|
|
317
|
+
editor.moveReverse(1);
|
|
318
|
+
}
|
|
230
319
|
};
|
|
231
320
|
const showSuggestion = async () => {
|
|
232
321
|
if (!editor) {
|
|
@@ -246,6 +335,9 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
246
335
|
return;
|
|
247
336
|
}
|
|
248
337
|
const items = await getSuggestionItems();
|
|
338
|
+
if (overlayPopover || !editor.isFocused()) {
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
249
341
|
if (!items || !items.length) {
|
|
250
342
|
return;
|
|
251
343
|
}
|
|
@@ -268,7 +360,7 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
268
360
|
const errorMsg = ref();
|
|
269
361
|
const errorMsgEl = ref();
|
|
270
362
|
const verifyNode = () => {
|
|
271
|
-
var _a;
|
|
363
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
272
364
|
if (!editor) {
|
|
273
365
|
return;
|
|
274
366
|
}
|
|
@@ -277,137 +369,139 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
277
369
|
if (!children.length) {
|
|
278
370
|
return;
|
|
279
371
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
} else if (child.type === "pql-field-operator") {
|
|
289
|
-
return {
|
|
290
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8868\u8FBE\u5F0F\u7F3A\u5931\u5DE6\u503C\u3002",
|
|
291
|
-
child
|
|
292
|
-
};
|
|
293
|
-
} else if (child.type === "pql-field-value" || child.text) {
|
|
294
|
-
return {
|
|
295
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8868\u8FBE\u5F0F\u7F3A\u5931\u5DE6\u503C\u3002",
|
|
296
|
-
child
|
|
297
|
-
};
|
|
298
|
-
} else if (child.type === "pql-field-connection") {
|
|
299
|
-
return {
|
|
300
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8FDE\u63A5\u7B26\u7F3A\u5931\u8868\u8FBE\u5F0F",
|
|
301
|
-
child
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
} else if (last.type === "pql-field") {
|
|
305
|
-
if (child.type === "pql-field") {
|
|
306
|
-
return {
|
|
307
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8868\u8FBE\u5F0F\u7F3A\u5931\u64CD\u4F5C\u7B26\u3002",
|
|
308
|
-
child: children[i - 1] || child
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
if (child.type === "pql-field-operator") {
|
|
312
|
-
last = child;
|
|
313
|
-
} else if (child.type === "pql-field-value" || child.text) {
|
|
314
|
-
return {
|
|
315
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8868\u8FBE\u5F0F\u7F3A\u5931\u64CD\u4F5C\u7B26\u3002",
|
|
316
|
-
child
|
|
317
|
-
};
|
|
318
|
-
} else if (child.type === "pql-field-connection") {
|
|
319
|
-
return {
|
|
320
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8868\u8FBE\u5F0F\u7F3A\u5931\u64CD\u4F5C\u7B26\u3002",
|
|
321
|
-
child: children[i - 1] || child
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
} else if (last.type === "pql-field-operator") {
|
|
325
|
-
if (last.value && ExcludeOPs.includes(last.value)) {
|
|
326
|
-
if (child.type === "pql-field") {
|
|
327
|
-
return {
|
|
328
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8868\u8FBE\u5F0F\u7F3A\u5931\u8FDE\u63A5\u7B26\u3002",
|
|
329
|
-
child
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
if (child.type === "pql-field-operator") {
|
|
333
|
-
return {
|
|
334
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8868\u8FBE\u5F0F\u7F3A\u5931\u8FDE\u63A5\u7B26\u3002",
|
|
335
|
-
child
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
if (child.type === "pql-field-value" || child.text) {
|
|
339
|
-
return {
|
|
340
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8868\u8FBE\u5F0F\u7F3A\u5931\u8FDE\u63A5\u7B26\u3002",
|
|
341
|
-
child
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
if (child.type === "pql-field-connection") {
|
|
345
|
-
last = child;
|
|
346
|
-
}
|
|
347
|
-
} else if (child.type === "pql-field") {
|
|
348
|
-
return {
|
|
349
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8868\u8FBE\u5F0F\u7F3A\u5931\u53F3\u503C\u3002",
|
|
350
|
-
child: children[i - 1] || child
|
|
351
|
-
};
|
|
352
|
-
} else if (child.type === "pql-field-operator") {
|
|
353
|
-
return {
|
|
354
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8868\u8FBE\u5F0F\u7F3A\u5931\u53F3\u503C\u3002",
|
|
355
|
-
child: children[i - 1] || child
|
|
356
|
-
};
|
|
357
|
-
} else if (child.type === "pql-field-value" || child.text) {
|
|
358
|
-
last = child;
|
|
359
|
-
} else if (child.type === "pql-field-connection") {
|
|
360
|
-
return {
|
|
361
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8868\u8FBE\u5F0F\u7F3A\u5931\u53F3\u503C\u3002",
|
|
362
|
-
child: children[i - 1] || child
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
} else if (last.type === "pql-field-value" || last.text) {
|
|
366
|
-
if (child.type === "pql-field") {
|
|
367
|
-
return {
|
|
368
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8868\u8FBE\u5F0F\u7F3A\u5931\u8FDE\u63A5\u7B26\u3002",
|
|
369
|
-
child
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
if (child.type === "pql-field-operator") {
|
|
373
|
-
return {
|
|
374
|
-
msg: "\u9519\u8BEF\u7684\u8868\u8FBE\u5F0F\u3002\u8868\u8FBE\u5F0F\u7F3A\u5931\u8FDE\u63A5\u7B26\u3002",
|
|
375
|
-
child
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
if (child.type === "pql-field-value" || child.text) {
|
|
372
|
+
const items = generateNodeItems(children[children.length - 1], getPreviousNode);
|
|
373
|
+
if (!items.length) {
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
for (let i = 0; i < items.length; i++) {
|
|
377
|
+
const item = items[i];
|
|
378
|
+
if (item.type === "connection") {
|
|
379
|
+
if (((_b = items[i - 1]) == null ? void 0 : _b.type) === "connection" || i === 0 || i === items.length - 1) {
|
|
379
380
|
return {
|
|
380
|
-
msg: "
|
|
381
|
-
child
|
|
381
|
+
msg: ibiz.i18n.t("component.pqlEditor.noExpression"),
|
|
382
|
+
child: (_c = item.value) == null ? void 0 : _c[0]
|
|
382
383
|
};
|
|
383
384
|
}
|
|
384
|
-
|
|
385
|
-
|
|
385
|
+
continue;
|
|
386
|
+
}
|
|
387
|
+
if (item.type === "condition" && ((_d = items[i - 1]) == null ? void 0 : _d.type) === "condition") {
|
|
388
|
+
let child;
|
|
389
|
+
if (item.key) {
|
|
390
|
+
child = item.key;
|
|
391
|
+
} else if (item.operator) {
|
|
392
|
+
child = item.operator;
|
|
393
|
+
} else if (item.value) {
|
|
394
|
+
child = (_e = item.value) == null ? void 0 : _e[0];
|
|
386
395
|
}
|
|
396
|
+
return {
|
|
397
|
+
msg: ibiz.i18n.t("component.pqlEditor.noConnection"),
|
|
398
|
+
child
|
|
399
|
+
};
|
|
387
400
|
}
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
401
|
+
if (!item.key) {
|
|
402
|
+
let child;
|
|
403
|
+
if (item.operator) {
|
|
404
|
+
child = item.operator;
|
|
405
|
+
} else if (item.value) {
|
|
406
|
+
child = (_f = item.value) == null ? void 0 : _f[0];
|
|
407
|
+
}
|
|
391
408
|
return {
|
|
392
|
-
msg: "
|
|
393
|
-
child
|
|
409
|
+
msg: ibiz.i18n.t("component.pqlEditor.noKey"),
|
|
410
|
+
child
|
|
394
411
|
};
|
|
395
412
|
}
|
|
396
|
-
if (
|
|
397
|
-
|
|
398
|
-
|
|
413
|
+
if (!item.operator) {
|
|
414
|
+
let child = item.key;
|
|
415
|
+
if (item.value) {
|
|
416
|
+
child = item.value[0];
|
|
417
|
+
} else if (items[i + 1]) {
|
|
418
|
+
if (items[i + 1].type === "connection") {
|
|
419
|
+
child = (_g = items[i + 1].value) == null ? void 0 : _g[0];
|
|
420
|
+
} else if (items[i + 1].key) {
|
|
421
|
+
child = items[i + 1].key;
|
|
422
|
+
} else if (items[i + 1].operator) {
|
|
423
|
+
child = items[i + 1].operator;
|
|
424
|
+
} else if (items[i + 1].value) {
|
|
425
|
+
child = (_h = items[i + 1].value) == null ? void 0 : _h[0];
|
|
426
|
+
}
|
|
399
427
|
}
|
|
400
428
|
return {
|
|
401
|
-
msg: "
|
|
402
|
-
child
|
|
429
|
+
msg: ibiz.i18n.t("component.pqlEditor.noOperator"),
|
|
430
|
+
child
|
|
403
431
|
};
|
|
404
432
|
}
|
|
405
|
-
if (
|
|
433
|
+
if (item.operator.value && !ExcludeOPs.includes(item.operator.value) && !item.value) {
|
|
434
|
+
let child = item.operator;
|
|
435
|
+
if (items[i + 1]) {
|
|
436
|
+
if (items[i + 1].type === "connection") {
|
|
437
|
+
child = (_i = items[i + 1].value) == null ? void 0 : _i[0];
|
|
438
|
+
} else if (items[i + 1].key) {
|
|
439
|
+
child = items[i + 1].key;
|
|
440
|
+
} else if (items[i + 1].operator) {
|
|
441
|
+
child = items[i + 1].operator;
|
|
442
|
+
} else if (items[i + 1].value) {
|
|
443
|
+
child = (_j = items[i + 1].value) == null ? void 0 : _j[0];
|
|
444
|
+
}
|
|
445
|
+
}
|
|
406
446
|
return {
|
|
407
|
-
msg: "
|
|
408
|
-
child
|
|
447
|
+
msg: ibiz.i18n.t("component.pqlEditor.noValue"),
|
|
448
|
+
child
|
|
409
449
|
};
|
|
410
450
|
}
|
|
451
|
+
if (item.operator.value && InOPs.includes(item.operator.value)) {
|
|
452
|
+
const value = item.value;
|
|
453
|
+
if (Array.isArray(value)) {
|
|
454
|
+
if (value.length > 1 && ((_k = value[0].text) == null ? void 0 : _k.trim()) !== "[") {
|
|
455
|
+
return {
|
|
456
|
+
msg: ibiz.i18n.t("component.pqlEditor.errorCombination"),
|
|
457
|
+
child: value[0]
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
let type = "value";
|
|
461
|
+
for (let j = 1; j < value.length; j++) {
|
|
462
|
+
if (j === value.length - 1) {
|
|
463
|
+
if (((_l = value[value.length - 1].text) == null ? void 0 : _l.trim()) !== "]") {
|
|
464
|
+
let child = value[value.length - 1];
|
|
465
|
+
if (child.type === "pql-field-value") {
|
|
466
|
+
if (items[i + 1]) {
|
|
467
|
+
if (items[i + 1].type === "connection") {
|
|
468
|
+
child = (_m = items[i + 1].value) == null ? void 0 : _m[0];
|
|
469
|
+
} else if (items[i + 1].key) {
|
|
470
|
+
child = items[i + 1].key;
|
|
471
|
+
} else if (items[i + 1].operator) {
|
|
472
|
+
child = items[i + 1].operator;
|
|
473
|
+
} else if (items[i + 1].value) {
|
|
474
|
+
child = (_n = items[i + 1].value) == null ? void 0 : _n[0];
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
return {
|
|
479
|
+
msg: ibiz.i18n.t("component.pqlEditor.errorCombination"),
|
|
480
|
+
child
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
continue;
|
|
484
|
+
}
|
|
485
|
+
if (type === "value") {
|
|
486
|
+
if (value[j].type !== "pql-field-value") {
|
|
487
|
+
return {
|
|
488
|
+
msg: ibiz.i18n.t("component.pqlEditor.errorDelimiter"),
|
|
489
|
+
child: value[j]
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
type = "text";
|
|
493
|
+
} else if (type === "text") {
|
|
494
|
+
if (value[j].type || ((_o = value[j].text) == null ? void 0 : _o.trim()) !== ",") {
|
|
495
|
+
return {
|
|
496
|
+
msg: ibiz.i18n.t("component.pqlEditor.noDelimiter"),
|
|
497
|
+
child: value[j]
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
type = "value";
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
411
505
|
}
|
|
412
506
|
};
|
|
413
507
|
const verify = () => {
|
|
@@ -430,7 +524,7 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
430
524
|
}
|
|
431
525
|
const pqlItems = parseCustomCond(props.value);
|
|
432
526
|
if (pqlItems) {
|
|
433
|
-
const nodes = await pqlItemsToPqlNodes(pqlItems
|
|
527
|
+
const nodes = await pqlItemsToPqlNodes(pqlItems);
|
|
434
528
|
if (nodes && nodes.length) {
|
|
435
529
|
const html = pqlNodesToHtml(nodes);
|
|
436
530
|
currentValue.value = props.value;
|
|
@@ -454,7 +548,7 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
454
548
|
}
|
|
455
549
|
const pqlItems = parseCustomCond(props.value);
|
|
456
550
|
if (pqlItems) {
|
|
457
|
-
const nodes = await pqlItemsToPqlNodes(pqlItems
|
|
551
|
+
const nodes = await pqlItemsToPqlNodes(pqlItems);
|
|
458
552
|
if (nodes && nodes.length) {
|
|
459
553
|
const html = pqlNodesToHtml(nodes);
|
|
460
554
|
currentValue.value = props.value;
|
|
@@ -496,7 +590,7 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
496
590
|
}
|
|
497
591
|
if (!msg) {
|
|
498
592
|
try {
|
|
499
|
-
const items =
|
|
593
|
+
const items = generateNodeItems(children[children.length - 1], getPreviousNode);
|
|
500
594
|
const customCond = generateCustomCond(items, props.fields);
|
|
501
595
|
currentValue.value = customCond;
|
|
502
596
|
emit("change", customCond);
|
|
@@ -542,6 +636,11 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
542
636
|
editor.setHtml(htmlText.value);
|
|
543
637
|
cleanupKeydown = listenJSEvent(editorRef.value, "keydown", (event) => {
|
|
544
638
|
setTimeout(() => {
|
|
639
|
+
if ((event.key === "ArrowUp" || event.key === "ArrowDown") && editor) {
|
|
640
|
+
setTimeout(() => {
|
|
641
|
+
showSuggestion();
|
|
642
|
+
}, 10);
|
|
643
|
+
}
|
|
545
644
|
if ((event.key === "ArrowLeft" || event.key === "ArrowRight") && editor) {
|
|
546
645
|
const {
|
|
547
646
|
selection
|
|
@@ -565,7 +664,7 @@ const IBizPqlEditor = /* @__PURE__ */ defineComponent({
|
|
|
565
664
|
}, 10);
|
|
566
665
|
}
|
|
567
666
|
}, 10);
|
|
568
|
-
if (event.key === "Escape") {
|
|
667
|
+
if (event.key === "Escape" || event.key === "Enter") {
|
|
569
668
|
event.stopPropagation();
|
|
570
669
|
overlayPopover == null ? void 0 : overlayPopover.dismiss();
|
|
571
670
|
}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ValueOP } from '@ibiz-template/runtime';
|
|
2
|
+
import { SlateNode } from '@wangeditor/editor';
|
|
3
|
+
import { IPqlItem, IPqlNode, IPqlNodeItem, ISchemaField } from '../../../interface';
|
|
3
4
|
export declare const FilterModes: {
|
|
4
5
|
valueOP: ValueOP;
|
|
5
6
|
label: string;
|
|
6
7
|
sqlOP: string;
|
|
7
8
|
}[];
|
|
9
|
+
export declare const InputOPs: string[];
|
|
8
10
|
export declare const ExcludeOPs: string[];
|
|
11
|
+
export declare const InOPs: string[];
|
|
9
12
|
export declare const generateItems: (children: IData[]) => IPqlItem[];
|
|
10
|
-
export declare const
|
|
13
|
+
export declare const generateNodeItems: (currentNode?: IData, getPreviousNode?: ((node?: SlateNode) => SlateNode | undefined) | undefined) => IPqlNodeItem[];
|
|
14
|
+
export declare const generateCustomCond: (items: IPqlNodeItem[], fields: ISchemaField[]) => string;
|
|
11
15
|
export declare const parseCustomCond: (cond: string) => IData[] | undefined;
|
|
12
|
-
export declare const pqlItemsToPqlNodes: (items: IPqlItem[]
|
|
16
|
+
export declare const pqlItemsToPqlNodes: (items: IPqlItem[]) => Promise<IPqlNode[]>;
|
|
13
17
|
export declare const pqlNodeToHtml: (node: IPqlNode) => string;
|
|
14
18
|
export declare const pqlNodesToHtml: (nodes: IPqlNode[]) => string;
|
|
15
19
|
export declare function isMove(el?: HTMLElement | null): boolean;
|