@mono-lit/helper 0.0.0-stage → 0.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/LICENSE.md +55 -0
- package/README.md +34 -2
- package/dist/breakpoints-CAbhDUht.js +84 -0
- package/dist/checkbox-Cqpie9Ap.js +4 -0
- package/dist/chip-DBUUa2eB.js +4 -0
- package/dist/chip-limits-BMoO31JM.js +213 -0
- package/dist/chip-strip-Cw3gyz0q.js +213 -0
- package/dist/color-DHYrfXsX.js +253 -0
- package/dist/css-class-BRKRzHx-.js +60 -0
- package/dist/css-size-DhHSVZJK.js +37 -0
- package/dist/data/theme/presets.json.d.ts +140 -0
- package/dist/data-search-Bwo5bg8K.js +573 -0
- package/dist/data-source-controller-C50Qyfzh.js +178 -0
- package/dist/data-source-options-BTpfrOZ_.js +535 -0
- package/dist/data-source-options-CQSTZHPE.js +537 -0
- package/dist/data-source-read-CUX-lgrQ.js +216 -0
- package/dist/data-source-read-DL88aH8t.js +217 -0
- package/dist/decorate-DEXtNagw.js +141 -0
- package/dist/element-props-CLB6yvbm.js +114 -0
- package/dist/esm-Ptok4SQZ.js +2026 -0
- package/dist/excel-CY6zGkcx.js +608 -0
- package/dist/excel-DopRbEMK.js +608 -0
- package/dist/export-BvlBx_GZ.js +2302 -0
- package/dist/export.d.ts +1 -0
- package/dist/export.js +2302 -0
- package/dist/field-icons-BoOG6KrL.js +51 -0
- package/dist/field-path-C92eGLg3.js +251 -0
- package/dist/filter-builder-Bke3qOgJ.js +205 -0
- package/dist/filter-builder-CE4zE0V5.js +205 -0
- package/dist/filter-eval-DIfU2EAn.js +173 -0
- package/dist/filter-odata-C1vSGZaY.js +591 -0
- package/dist/form-control-core-B8d7k6vk.js +223 -0
- package/dist/form-control-core-eeRr0zLU.js +223 -0
- package/dist/hydration-flush-RB5Tz5nl.js +1001 -0
- package/dist/icon-CJkTlmTb.js +55 -0
- package/dist/icon-dVhYJUIH.js +17 -0
- package/dist/import-BgJdkwBI.js +606 -0
- package/dist/import.d.ts +1 -0
- package/dist/import.js +606 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +16 -0
- package/dist/index.node-DjvYOL-J.js +395 -0
- package/dist/index.node.d.ts +1 -0
- package/dist/index.node.js +16 -0
- package/dist/input-zGOULADt.js +4 -0
- package/dist/layout-var-CZnzMC0s.js +73 -0
- package/dist/light-slots-BVJwyg_2.js +244 -0
- package/dist/light-slots-DW1WgfgT.js +254 -0
- package/dist/markdown-DfqrfOJN.js +20146 -0
- package/dist/mono-button-CoVnBLav.js +873 -0
- package/dist/mono-button.shadow-FfP_hMH4.js +784 -0
- package/dist/mono-data-chart-ChU4Ii3p.js +738 -0
- package/dist/mono-data-dropdown-BAUl58kW.js +357 -0
- package/dist/mono-data-grid-CLBK8clE.js +4140 -0
- package/dist/mono-data-grid-Db80FzdZ.js +4142 -0
- package/dist/mono-element-B0kP_96P.js +232 -0
- package/dist/mono-event-Bi1qP9uN.js +129 -0
- package/dist/mono-form-controller-5PfsU4qa.js +409 -0
- package/dist/mono-modal-controller-BMO3n3rP.js +223 -0
- package/dist/mono-ui-CPV7rrdo.js +358 -0
- package/dist/notifier-CE4yxMUQ.js +88 -0
- package/dist/nuxt.d.ts +1 -0
- package/dist/nuxt.js +130 -0
- package/dist/popup-portal-BziRX1yG.js +465 -0
- package/dist/popup-stack-CEEMib__.js +189 -0
- package/dist/rate-limit-BBa2PO79.js +521 -0
- package/dist/reactive-BHsqVjRh.js +789 -0
- package/dist/reactive-D3EERqgO.js +47 -0
- package/dist/search.d.ts +1 -0
- package/dist/search.js +97 -0
- package/dist/src/components/accordion/accordion-core.d.ts +62 -0
- package/dist/src/components/accordion/accordion-types.d.ts +62 -0
- package/dist/src/components/accordion/index.d.ts +3 -0
- package/dist/src/components/accordion/index.shadow.d.ts +5 -0
- package/dist/src/components/accordion/mono-accordion.d.ts +55 -0
- package/dist/src/components/accordion/mono-accordion.shadow.d.ts +56 -0
- package/dist/src/components/alert/alert-core.d.ts +46 -0
- package/dist/src/components/alert/alert-types.d.ts +44 -0
- package/dist/src/components/alert/index.d.ts +3 -0
- package/dist/src/components/alert/index.shadow.d.ts +5 -0
- package/dist/src/components/alert/mono-alert.d.ts +44 -0
- package/dist/src/components/alert/mono-alert.shadow.d.ts +34 -0
- package/dist/src/components/breadcrumb/breadcrumb-core.d.ts +61 -0
- package/dist/src/components/breadcrumb/breadcrumb-list-core.d.ts +49 -0
- package/dist/src/components/breadcrumb/breadcrumb-render.d.ts +31 -0
- package/dist/src/components/breadcrumb/breadcrumb-types.d.ts +117 -0
- package/dist/src/components/breadcrumb/breadcrumb-utils.d.ts +43 -0
- package/dist/src/components/breadcrumb/index.d.ts +6 -0
- package/dist/src/components/breadcrumb/index.shadow.d.ts +8 -0
- package/dist/src/components/breadcrumb/mono-breadcrumb-list.d.ts +29 -0
- package/dist/src/components/breadcrumb/mono-breadcrumb-list.shadow.d.ts +48 -0
- package/dist/src/components/breadcrumb/mono-breadcrumb.d.ts +38 -0
- package/dist/src/components/breadcrumb/mono-breadcrumb.shadow.d.ts +73 -0
- package/dist/src/components/button/button-core.d.ts +90 -0
- package/dist/src/components/button/button-dropdown-core.d.ts +57 -0
- package/dist/src/components/button/button-dropdown-types.d.ts +129 -0
- package/dist/src/components/button/button-types.d.ts +219 -0
- package/dist/src/components/button/button-utils.d.ts +18 -0
- package/dist/src/components/button/index.button-dropdown.d.ts +4 -0
- package/dist/src/components/button/index.button-dropdown.shadow.d.ts +4 -0
- package/dist/src/components/button/index.d.ts +8 -0
- package/dist/src/components/button/index.shadow.d.ts +5 -0
- package/dist/src/components/button/mono-button-dropdown.d.ts +35 -0
- package/dist/src/components/button/mono-button-dropdown.shadow.d.ts +45 -0
- package/dist/src/components/button/mono-button.d.ts +123 -0
- package/dist/src/components/button/mono-button.shadow.d.ts +56 -0
- package/dist/src/components/card/card-core.d.ts +74 -0
- package/dist/src/components/card/card-types.d.ts +137 -0
- package/dist/src/components/card/card-utils.d.ts +23 -0
- package/dist/src/components/card/index.d.ts +4 -0
- package/dist/src/components/card/index.shadow.d.ts +6 -0
- package/dist/src/components/card/mono-card.d.ts +56 -0
- package/dist/src/components/card/mono-card.shadow.d.ts +52 -0
- package/dist/src/components/chart/chart-core.d.ts +43 -0
- package/dist/src/components/chart/chart-odata.d.ts +52 -0
- package/dist/src/components/chart/chart-types.d.ts +337 -0
- package/dist/src/components/chart/index.d.ts +8 -0
- package/dist/src/components/chart/index.shadow.d.ts +7 -0
- package/dist/src/components/chart/mono-chart-presets.d.ts +43 -0
- package/dist/src/components/chart/mono-chart-presets.shadow.d.ts +43 -0
- package/dist/src/components/chart/mono-chart.d.ts +30 -0
- package/dist/src/components/chart/mono-chart.shadow.d.ts +22 -0
- package/dist/src/components/chart/mono-data-chart.d.ts +27 -0
- package/dist/src/components/checkbox/checkbox-core.d.ts +53 -0
- package/dist/src/components/checkbox/checkbox-types.d.ts +69 -0
- package/dist/src/components/checkbox/checkbox-utils.d.ts +35 -0
- package/dist/src/components/checkbox/index.d.ts +4 -0
- package/dist/src/components/checkbox/index.shadow.d.ts +5 -0
- package/dist/src/components/checkbox/mono-checkbox.d.ts +34 -0
- package/dist/src/components/checkbox/mono-checkbox.shadow.d.ts +45 -0
- package/dist/src/components/chip/chip-core.d.ts +58 -0
- package/dist/src/components/chip/chip-types.d.ts +142 -0
- package/dist/src/components/chip/chip-utils.d.ts +24 -0
- package/dist/src/components/chip/index.d.ts +8 -0
- package/dist/src/components/chip/index.shadow.d.ts +6 -0
- package/dist/src/components/chip/mono-chip.d.ts +48 -0
- package/dist/src/components/chip/mono-chip.shadow.d.ts +33 -0
- package/dist/src/components/chip/mono-status-dot.d.ts +34 -0
- package/dist/src/components/date/date-core.d.ts +80 -0
- package/dist/src/components/date/date-types.d.ts +163 -0
- package/dist/src/components/date/index.d.ts +3 -0
- package/dist/src/components/date/index.shadow.d.ts +4 -0
- package/dist/src/components/date/mono-date.d.ts +22 -0
- package/dist/src/components/date/mono-date.shadow.d.ts +31 -0
- package/dist/src/components/drawer/drawer-core.d.ts +99 -0
- package/dist/src/components/drawer/drawer-types.d.ts +153 -0
- package/dist/src/components/drawer/index.d.ts +3 -0
- package/dist/src/components/drawer/index.shadow.d.ts +4 -0
- package/dist/src/components/drawer/mono-drawer.d.ts +45 -0
- package/dist/src/components/drawer/mono-drawer.shadow.d.ts +46 -0
- package/dist/src/components/dropdown/dropdown-core.d.ts +33 -0
- package/dist/src/components/dropdown/dropdown-types.d.ts +88 -0
- package/dist/src/components/dropdown/index.d.ts +3 -0
- package/dist/src/components/dropdown/index.shadow.d.ts +4 -0
- package/dist/src/components/dropdown/mono-dropdown.d.ts +34 -0
- package/dist/src/components/dropdown/mono-dropdown.shadow.d.ts +28 -0
- package/dist/src/components/dropdown-table/dropdown-table-core.d.ts +65 -0
- package/dist/src/components/dropdown-table/dropdown-table-types.d.ts +278 -0
- package/dist/src/components/dropdown-table/index.d.ts +5 -0
- package/dist/src/components/dropdown-table/index.shadow.d.ts +6 -0
- package/dist/src/components/dropdown-table/mono-data-dropdown.d.ts +152 -0
- package/dist/src/components/dropdown-table/mono-dropdown-table.d.ts +46 -0
- package/dist/src/components/dropdown-table/mono-dropdown-table.shadow.d.ts +22 -0
- package/dist/src/components/file-upload/file-upload-core.d.ts +60 -0
- package/dist/src/components/file-upload/file-upload-types.d.ts +145 -0
- package/dist/src/components/file-upload/file-upload-utils.d.ts +16 -0
- package/dist/src/components/file-upload/index.d.ts +4 -0
- package/dist/src/components/file-upload/index.shadow.d.ts +5 -0
- package/dist/src/components/file-upload/mono-file-upload.d.ts +33 -0
- package/dist/src/components/file-upload/mono-file-upload.shadow.d.ts +50 -0
- package/dist/src/components/filter/filter-builder-core.d.ts +36 -0
- package/dist/src/components/filter/filter-builder.d.ts +23 -0
- package/dist/src/components/filter/filter-odata.d.ts +27 -0
- package/dist/src/components/filter/filter-operators.d.ts +13 -0
- package/dist/src/components/filter/filter-types.d.ts +253 -0
- package/dist/src/components/filter/index.d.ts +6 -0
- package/dist/src/components/filter/index.shadow.d.ts +7 -0
- package/dist/src/components/filter/mono-filter-builder.d.ts +21 -0
- package/dist/src/components/filter/mono-filter-builder.shadow.d.ts +17 -0
- package/dist/src/components/form/form-control-core.d.ts +37 -0
- package/dist/src/components/form/form-rules.d.ts +25 -0
- package/dist/src/components/form/form-types.d.ts +307 -0
- package/dist/src/components/form/index.d.ts +6 -0
- package/dist/src/components/form/mono-form-controller.d.ts +16 -0
- package/dist/src/components/input/index.d.ts +6 -0
- package/dist/src/components/input/index.shadow.d.ts +8 -0
- package/dist/src/components/input/input-core.d.ts +91 -0
- package/dist/src/components/input/input-format.d.ts +118 -0
- package/dist/src/components/input/input-types.d.ts +179 -0
- package/dist/src/components/input/input-utils.d.ts +10 -0
- package/dist/src/components/input/mono-input.d.ts +46 -0
- package/dist/src/components/input/mono-input.shadow.d.ts +34 -0
- package/dist/src/components/menu/index.d.ts +6 -0
- package/dist/src/components/menu/index.shadow.d.ts +7 -0
- package/dist/src/components/menu/menu-core.d.ts +65 -0
- package/dist/src/components/menu/menu-render.d.ts +55 -0
- package/dist/src/components/menu/menu-types.d.ts +195 -0
- package/dist/src/components/menu/menu-utils.d.ts +53 -0
- package/dist/src/components/menu/mono-menu-list.d.ts +118 -0
- package/dist/src/components/menu/mono-menu.d.ts +39 -0
- package/dist/src/components/menu/mono-menu.shadow.d.ts +40 -0
- package/dist/src/components/modal/index.d.ts +4 -0
- package/dist/src/components/modal/index.shadow.d.ts +5 -0
- package/dist/src/components/modal/modal-core.d.ts +110 -0
- package/dist/src/components/modal/modal-types.d.ts +304 -0
- package/dist/src/components/modal/mono-modal-controller.d.ts +4 -0
- package/dist/src/components/modal/mono-modal.d.ts +45 -0
- package/dist/src/components/modal/mono-modal.shadow.d.ts +50 -0
- package/dist/src/components/nav/index.d.ts +4 -0
- package/dist/src/components/nav/index.shadow.d.ts +6 -0
- package/dist/src/components/nav/mono-nav.d.ts +41 -0
- package/dist/src/components/nav/mono-nav.shadow.d.ts +21 -0
- package/dist/src/components/nav/nav-core.d.ts +34 -0
- package/dist/src/components/nav/nav-types.d.ts +48 -0
- package/dist/src/components/nav/nav-utils.d.ts +12 -0
- package/dist/src/components/radio/index.d.ts +4 -0
- package/dist/src/components/radio/index.shadow.d.ts +5 -0
- package/dist/src/components/radio/mono-radio.d.ts +31 -0
- package/dist/src/components/radio/mono-radio.shadow.d.ts +35 -0
- package/dist/src/components/radio/radio-core.d.ts +45 -0
- package/dist/src/components/radio/radio-types.d.ts +58 -0
- package/dist/src/components/radio/radio-utils.d.ts +12 -0
- package/dist/src/components/rich-text-editor/index.d.ts +5 -0
- package/dist/src/components/rich-text-editor/index.shadow.d.ts +6 -0
- package/dist/src/components/rich-text-editor/mono-rich-text-editor.d.ts +31 -0
- package/dist/src/components/rich-text-editor/mono-rich-text-editor.shadow.d.ts +34 -0
- package/dist/src/components/rich-text-editor/rich-text-editor-core.d.ts +100 -0
- package/dist/src/components/rich-text-editor/rich-text-editor-loader.d.ts +17 -0
- package/dist/src/components/rich-text-editor/rich-text-editor-toolbar.d.ts +65 -0
- package/dist/src/components/rich-text-editor/rich-text-editor-types.d.ts +231 -0
- package/dist/src/components/select/index.d.ts +4 -0
- package/dist/src/components/select/index.shadow.d.ts +5 -0
- package/dist/src/components/select/mono-select.d.ts +69 -0
- package/dist/src/components/select/mono-select.shadow.d.ts +48 -0
- package/dist/src/components/select/select-core.d.ts +98 -0
- package/dist/src/components/select/select-types.d.ts +258 -0
- package/dist/src/components/select/select-utils.d.ts +7 -0
- package/dist/src/components/sidebar/index.d.ts +4 -0
- package/dist/src/components/sidebar/index.shadow.d.ts +6 -0
- package/dist/src/components/sidebar/mono-sidebar.d.ts +34 -0
- package/dist/src/components/sidebar/mono-sidebar.shadow.d.ts +27 -0
- package/dist/src/components/sidebar/sidebar-core.d.ts +51 -0
- package/dist/src/components/sidebar/sidebar-types.d.ts +119 -0
- package/dist/src/components/sidebar/sidebar-utils.d.ts +55 -0
- package/dist/src/components/switch/index.d.ts +4 -0
- package/dist/src/components/switch/index.shadow.d.ts +5 -0
- package/dist/src/components/switch/mono-switch.d.ts +31 -0
- package/dist/src/components/switch/mono-switch.shadow.d.ts +36 -0
- package/dist/src/components/switch/switch-core.d.ts +49 -0
- package/dist/src/components/switch/switch-types.d.ts +64 -0
- package/dist/src/components/switch/switch-utils.d.ts +12 -0
- package/dist/src/components/table/array-source.d.ts +44 -0
- package/dist/src/components/table/date-filter-tree.d.ts +93 -0
- package/dist/src/components/table/grouping.d.ts +55 -0
- package/dist/src/components/table/index.d.ts +33 -0
- package/dist/src/components/table/index.shadow.d.ts +47 -0
- package/dist/src/components/table/mono-data-grid.d.ts +1756 -0
- package/dist/src/components/table/mono-table-checkbox-core.d.ts +76 -0
- package/dist/src/components/table/mono-table-checkbox.d.ts +34 -0
- package/dist/src/components/table/mono-table-checkbox.shadow.d.ts +26 -0
- package/dist/src/components/table/mono-table-detail-core.d.ts +87 -0
- package/dist/src/components/table/mono-table-detail.d.ts +32 -0
- package/dist/src/components/table/mono-table-detail.shadow.d.ts +31 -0
- package/dist/src/components/table/mono-table-empty-core.d.ts +60 -0
- package/dist/src/components/table/mono-table-empty.d.ts +35 -0
- package/dist/src/components/table/mono-table-empty.shadow.d.ts +40 -0
- package/dist/src/components/table/mono-table-error-core.d.ts +84 -0
- package/dist/src/components/table/mono-table-error.d.ts +28 -0
- package/dist/src/components/table/mono-table-error.shadow.d.ts +21 -0
- package/dist/src/components/table/mono-table-info-core.d.ts +13 -0
- package/dist/src/components/table/mono-table-info.d.ts +19 -0
- package/dist/src/components/table/mono-table-info.shadow.d.ts +14 -0
- package/dist/src/components/table/mono-table-loading-core.d.ts +41 -0
- package/dist/src/components/table/mono-table-loading.d.ts +50 -0
- package/dist/src/components/table/mono-table-loading.shadow.d.ts +14 -0
- package/dist/src/components/table/mono-table-page-size-core.d.ts +14 -0
- package/dist/src/components/table/mono-table-page-size.d.ts +16 -0
- package/dist/src/components/table/mono-table-page-size.shadow.d.ts +11 -0
- package/dist/src/components/table/mono-table-paging-core.d.ts +22 -0
- package/dist/src/components/table/mono-table-paging-group-core.d.ts +18 -0
- package/dist/src/components/table/mono-table-paging-group.d.ts +20 -0
- package/dist/src/components/table/mono-table-paging-group.shadow.d.ts +13 -0
- package/dist/src/components/table/mono-table-paging.d.ts +16 -0
- package/dist/src/components/table/mono-table-paging.shadow.d.ts +11 -0
- package/dist/src/components/table/mono-table-search-core.d.ts +74 -0
- package/dist/src/components/table/mono-table-search.d.ts +34 -0
- package/dist/src/components/table/mono-table-search.shadow.d.ts +21 -0
- package/dist/src/components/table/mono-table-sort-core.d.ts +35 -0
- package/dist/src/components/table/mono-table-sort.d.ts +38 -0
- package/dist/src/components/table/mono-table-sort.shadow.d.ts +20 -0
- package/dist/src/components/table/mono-table-summary-core.d.ts +26 -0
- package/dist/src/components/table/mono-table-summary.d.ts +24 -0
- package/dist/src/components/table/mono-table-summary.shadow.d.ts +14 -0
- package/dist/src/components/table/mono-table-th-core.d.ts +56 -0
- package/dist/src/components/table/mono-table-th.d.ts +41 -0
- package/dist/src/components/table/mono-table-th.shadow.d.ts +19 -0
- package/dist/src/components/table/store-group-source.d.ts +24 -0
- package/dist/src/components/table/table-controller-core.d.ts +40 -0
- package/dist/src/components/table/table-filter-icons.d.ts +3 -0
- package/dist/src/components/table/table-menu-core.d.ts +65 -0
- package/dist/src/components/table/table-overlay.d.ts +165 -0
- package/dist/src/components/table/table-sort-icons.d.ts +4 -0
- package/dist/src/components/table/table-sort-utils.d.ts +20 -0
- package/dist/src/components/table/table-types.d.ts +475 -0
- package/dist/src/components/tabs/index.d.ts +3 -0
- package/dist/src/components/tabs/index.shadow.d.ts +4 -0
- package/dist/src/components/tabs/mono-tabs.d.ts +33 -0
- package/dist/src/components/tabs/mono-tabs.shadow.d.ts +37 -0
- package/dist/src/components/tabs/tabs-core.d.ts +57 -0
- package/dist/src/components/tabs/tabs-types.d.ts +65 -0
- package/dist/src/components/tag-input/index.d.ts +4 -0
- package/dist/src/components/tag-input/index.shadow.d.ts +5 -0
- package/dist/src/components/tag-input/mono-tag-input.d.ts +66 -0
- package/dist/src/components/tag-input/mono-tag-input.shadow.d.ts +40 -0
- package/dist/src/components/tag-input/tag-input-core.d.ts +108 -0
- package/dist/src/components/tag-input/tag-input-types.d.ts +394 -0
- package/dist/src/components/tag-input/tag-input-utils.d.ts +8 -0
- package/dist/src/components/textarea/index.d.ts +4 -0
- package/dist/src/components/textarea/index.shadow.d.ts +5 -0
- package/dist/src/components/textarea/mono-textarea.d.ts +29 -0
- package/dist/src/components/textarea/mono-textarea.shadow.d.ts +31 -0
- package/dist/src/components/textarea/textarea-core.d.ts +60 -0
- package/dist/src/components/textarea/textarea-types.d.ts +131 -0
- package/dist/src/components/textarea/textarea-utils.d.ts +7 -0
- package/dist/src/components/tooltip/control-tooltip.d.ts +36 -0
- package/dist/src/components/tooltip/index.d.ts +6 -0
- package/dist/src/components/tooltip/tooltip-config.d.ts +27 -0
- package/dist/src/components/tooltip/tooltip-declarative.d.ts +41 -0
- package/dist/src/components/tooltip/tooltip-loader.d.ts +1 -0
- package/dist/src/components/tooltip/tooltip-types.d.ts +110 -0
- package/dist/src/composables/breakpoints.d.ts +59 -0
- package/dist/src/composables/chip-limits.d.ts +48 -0
- package/dist/src/composables/chip-strip.d.ts +93 -0
- package/dist/src/composables/color.d.ts +103 -0
- package/dist/src/composables/css-class.d.ts +27 -0
- package/dist/src/composables/css-size.d.ts +40 -0
- package/dist/src/composables/data-source-controller.d.ts +84 -0
- package/dist/src/composables/element-props.d.ts +46 -0
- package/dist/src/composables/field-icons.d.ts +7 -0
- package/dist/src/composables/hybird-prop.d.ts +79 -0
- package/dist/src/composables/hydration-flush.d.ts +34 -0
- package/dist/src/composables/icon.d.ts +17 -0
- package/dist/src/composables/layout-var.d.ts +34 -0
- package/dist/src/composables/light-slots.d.ts +133 -0
- package/dist/src/composables/mdi-glyphs.d.ts +4 -0
- package/dist/src/composables/mono-element.d.ts +9 -0
- package/dist/src/composables/mono-event.d.ts +55 -0
- package/dist/src/composables/mono-pending.d.ts +8 -0
- package/dist/src/composables/mono-skeleton.d.ts +193 -0
- package/dist/src/composables/mono-ui.d.ts +58 -0
- package/dist/src/composables/notifier.d.ts +46 -0
- package/dist/src/composables/popup-portal.d.ts +226 -0
- package/dist/src/composables/popup-stack.d.ts +70 -0
- package/dist/src/composables/rate-limit.d.ts +108 -0
- package/dist/src/composables/reactive.d.ts +53 -0
- package/dist/src/composables/shadow-css.d.ts +42 -0
- package/dist/src/composables/visibility.d.ts +36 -0
- package/dist/src/data/theme/index.d.ts +30 -0
- package/dist/src/data/theme/presets.d.ts +94 -0
- package/dist/src/entries/index.d.ts +2 -0
- package/dist/src/entries/index.node.d.ts +42 -0
- package/dist/src/entries/search.d.ts +3 -0
- package/dist/src/export/detail.d.ts +29 -0
- package/dist/src/export/download.d.ts +9 -0
- package/dist/src/export/excel/index.d.ts +27 -0
- package/dist/src/export/excel/nodes.d.ts +123 -0
- package/dist/src/export/expression.d.ts +36 -0
- package/dist/src/export/helpers.d.ts +6 -0
- package/dist/src/export/index.d.ts +13 -0
- package/dist/src/export/markdown.d.ts +52 -0
- package/dist/src/export/resolve-data.d.ts +31 -0
- package/dist/src/export/sentinel.d.ts +97 -0
- package/dist/src/export/sheet-name.d.ts +45 -0
- package/dist/src/export/styles.d.ts +33 -0
- package/dist/src/export/template.d.ts +10 -0
- package/dist/src/export/types.d.ts +259 -0
- package/dist/src/import/coerce.d.ts +38 -0
- package/dist/src/import/index.d.ts +16 -0
- package/dist/src/import/match.d.ts +54 -0
- package/dist/src/import/parse.d.ts +15 -0
- package/dist/src/import/types.d.ts +153 -0
- package/dist/src/nuxt/index.d.ts +94 -0
- package/dist/src/search/data-search.d.ts +207 -0
- package/dist/src/search/field-path.d.ts +107 -0
- package/dist/src/search/filter-eval.d.ts +30 -0
- package/dist/src/search/index.d.ts +22 -0
- package/dist/src/search/odata-search.d.ts +18 -0
- package/dist/src/search/search-expr.d.ts +160 -0
- package/dist/src/utils/data-source-apply.d.ts +97 -0
- package/dist/src/utils/data-source-options.d.ts +116 -0
- package/dist/src/utils/data-source-read.d.ts +85 -0
- package/dist/src/utils/data-source-summary.d.ts +55 -0
- package/dist/src/utils/normalize-error.d.ts +60 -0
- package/dist/src/vite/index.d.ts +48 -0
- package/dist/src/vite/mono-client-only.d.ts +35 -0
- package/dist/src/vite/mono-ssr-stub.d.ts +20 -0
- package/dist/src/vite/shadow-manifest.d.ts +8 -0
- package/dist/styles-BIJ31TM4.js +20146 -0
- package/dist/tooltip-CysgRgBi.js +760 -0
- package/dist/tooltip.d.ts +1 -0
- package/dist/tooltip.js +2 -0
- package/dist/ui/accordion.d.ts +1 -0
- package/dist/ui/accordion.js +466 -0
- package/dist/ui/alert.d.ts +1 -0
- package/dist/ui/alert.js +221 -0
- package/dist/ui/breadcrumb.d.ts +1 -0
- package/dist/ui/breadcrumb.js +902 -0
- package/dist/ui/button-dropdown.d.ts +1 -0
- package/dist/ui/button-dropdown.js +679 -0
- package/dist/ui/button.d.ts +1 -0
- package/dist/ui/button.js +63 -0
- package/dist/ui/card.d.ts +1 -0
- package/dist/ui/card.js +511 -0
- package/dist/ui/chart.d.ts +1 -0
- package/dist/ui/chart.js +808 -0
- package/dist/ui/checkbox.d.ts +1 -0
- package/dist/ui/checkbox.js +413 -0
- package/dist/ui/chip.d.ts +1 -0
- package/dist/ui/chip.js +558 -0
- package/dist/ui/date.d.ts +1 -0
- package/dist/ui/date.js +686 -0
- package/dist/ui/drawer.d.ts +1 -0
- package/dist/ui/drawer.js +901 -0
- package/dist/ui/dropdown-table.d.ts +1 -0
- package/dist/ui/dropdown-table.js +1291 -0
- package/dist/ui/dropdown.d.ts +1 -0
- package/dist/ui/dropdown.js +586 -0
- package/dist/ui/file-upload.d.ts +1 -0
- package/dist/ui/file-upload.js +688 -0
- package/dist/ui/filter.d.ts +1 -0
- package/dist/ui/filter.js +400 -0
- package/dist/ui/font/files/geist-47c091c9.woff2 +0 -0
- package/dist/ui/font/files/geist-8dd77544.woff2 +0 -0
- package/dist/ui/font/files/geist-b9248b1e.woff2 +0 -0
- package/dist/ui/font/files/geist-d40d74b4.woff2 +0 -0
- package/dist/ui/font/files/geist-f493429a.woff2 +0 -0
- package/dist/ui/font/files/geistmono-03737868.woff2 +0 -0
- package/dist/ui/font/files/geistmono-421a7e38.woff2 +0 -0
- package/dist/ui/font/files/geistmono-48ef518d.woff2 +0 -0
- package/dist/ui/font/files/geistmono-5df35d39.woff2 +0 -0
- package/dist/ui/font/files/geistmono-7de289a4.woff2 +0 -0
- package/dist/ui/font/files/geistmono-e976128f.woff2 +0 -0
- package/dist/ui/font/files/inter-05cf802c.woff2 +0 -0
- package/dist/ui/font/files/inter-2b2f25a4.woff2 +0 -0
- package/dist/ui/font/files/inter-467acc7a.woff2 +0 -0
- package/dist/ui/font/files/inter-6e85163c.woff2 +0 -0
- package/dist/ui/font/files/inter-7048add3.woff2 +0 -0
- package/dist/ui/font/files/inter-9be0371e.woff2 +0 -0
- package/dist/ui/font/files/inter-a28b7e31.woff2 +0 -0
- package/dist/ui/font/files/poppins-054df55a.woff2 +0 -0
- package/dist/ui/font/files/poppins-0ee5dc9a.woff2 +0 -0
- package/dist/ui/font/files/poppins-0f44cb18.woff2 +0 -0
- package/dist/ui/font/files/poppins-0ff0d30c.woff2 +0 -0
- package/dist/ui/font/files/poppins-13045147.woff2 +0 -0
- package/dist/ui/font/files/poppins-1db57cd9.woff2 +0 -0
- package/dist/ui/font/files/poppins-2cf2a902.woff2 +0 -0
- package/dist/ui/font/files/poppins-39e7f079.woff2 +0 -0
- package/dist/ui/font/files/poppins-9607042d.woff2 +0 -0
- package/dist/ui/font/files/poppins-9a88fc1f.woff2 +0 -0
- package/dist/ui/font/files/poppins-b8f4f752.woff2 +0 -0
- package/dist/ui/font/files/poppins-f5e57db4.woff2 +0 -0
- package/dist/ui/font/geist-mono.css +104 -0
- package/dist/ui/font/geist.css +168 -0
- package/dist/ui/font/inter.css +232 -0
- package/dist/ui/font/poppins.css +104 -0
- package/dist/ui/form.d.ts +1 -0
- package/dist/ui/form.js +3 -0
- package/dist/ui/index.css +21826 -0
- package/dist/ui/input.d.ts +1 -0
- package/dist/ui/input.js +1176 -0
- package/dist/ui/menu.d.ts +1 -0
- package/dist/ui/menu.js +1289 -0
- package/dist/ui/modal.d.ts +1 -0
- package/dist/ui/modal.js +995 -0
- package/dist/ui/nav.d.ts +1 -0
- package/dist/ui/nav.js +295 -0
- package/dist/ui/radio.d.ts +1 -0
- package/dist/ui/radio.js +379 -0
- package/dist/ui/rich-text-editor.d.ts +1 -0
- package/dist/ui/rich-text-editor.js +1338 -0
- package/dist/ui/select.d.ts +1 -0
- package/dist/ui/select.js +2066 -0
- package/dist/ui/shadow/accordion.js +442 -0
- package/dist/ui/shadow/alert.js +218 -0
- package/dist/ui/shadow/breadcrumb.js +919 -0
- package/dist/ui/shadow/button-dropdown.js +696 -0
- package/dist/ui/shadow/button.js +63 -0
- package/dist/ui/shadow/card.js +524 -0
- package/dist/ui/shadow/chart.js +1569 -0
- package/dist/ui/shadow/checkbox.js +457 -0
- package/dist/ui/shadow/chip.js +559 -0
- package/dist/ui/shadow/date.js +712 -0
- package/dist/ui/shadow/drawer.js +869 -0
- package/dist/ui/shadow/dropdown-table.js +1620 -0
- package/dist/ui/shadow/dropdown.js +547 -0
- package/dist/ui/shadow/file-upload.js +731 -0
- package/dist/ui/shadow/filter.js +402 -0
- package/dist/ui/shadow/input.js +1150 -0
- package/dist/ui/shadow/menu.js +899 -0
- package/dist/ui/shadow/modal.js +1193 -0
- package/dist/ui/shadow/nav.js +240 -0
- package/dist/ui/shadow/radio.js +408 -0
- package/dist/ui/shadow/rich-text-editor.js +1344 -0
- package/dist/ui/shadow/select.js +2033 -0
- package/dist/ui/shadow/sidebar.js +606 -0
- package/dist/ui/shadow/switch.js +428 -0
- package/dist/ui/shadow/table.js +4755 -0
- package/dist/ui/shadow/tabs.js +372 -0
- package/dist/ui/shadow/tag-input.js +2846 -0
- package/dist/ui/shadow/textarea.js +816 -0
- package/dist/ui/sidebar.d.ts +1 -0
- package/dist/ui/sidebar.js +659 -0
- package/dist/ui/switch.d.ts +1 -0
- package/dist/ui/switch.js +398 -0
- package/dist/ui/table.d.ts +1 -0
- package/dist/ui/table.js +4654 -0
- package/dist/ui/tabs.d.ts +1 -0
- package/dist/ui/tabs.js +379 -0
- package/dist/ui/tag-input.d.ts +1 -0
- package/dist/ui/tag-input.js +2819 -0
- package/dist/ui/textarea.d.ts +1 -0
- package/dist/ui/textarea.js +819 -0
- package/dist/ui/theme/legacy.css +293 -0
- package/dist/ui/theme/luma.css +743 -0
- package/dist/ui/theme/lyra.css +754 -0
- package/dist/ui/theme/maia.css +673 -0
- package/dist/ui/theme/mira.css +802 -0
- package/dist/ui/theme/nova.css +662 -0
- package/dist/ui/theme/one.css +699 -0
- package/dist/ui/theme/rhea.css +742 -0
- package/dist/ui/theme/sera.css +845 -0
- package/dist/ui/theme/tokens.css +261 -0
- package/dist/ui/theme/vega.css +467 -0
- package/dist/vite-C5iUK7so.js +329 -0
- package/dist/vite.d.ts +1 -0
- package/dist/vite.js +2 -0
- package/dist/vue.d.ts +282 -0
- package/package.json +411 -3
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
import { i as odataLiteral, l as toODataSelector, n as isPath } from "./field-path-C92eGLg3.js";
|
|
2
|
+
//#region src/components/filter/filter-operators.ts
|
|
3
|
+
/** Value inputs required per operator — drives the value cell. */
|
|
4
|
+
var OPERATOR_ARITY = {
|
|
5
|
+
eq: 1,
|
|
6
|
+
ne: 1,
|
|
7
|
+
gt: 1,
|
|
8
|
+
ge: 1,
|
|
9
|
+
lt: 1,
|
|
10
|
+
le: 1,
|
|
11
|
+
contains: 1,
|
|
12
|
+
notcontains: 1,
|
|
13
|
+
startswith: 1,
|
|
14
|
+
endswith: 1,
|
|
15
|
+
in: "many",
|
|
16
|
+
between: 2,
|
|
17
|
+
isblank: 0,
|
|
18
|
+
isnotblank: 0
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Operators offered per data type. Only OData-expressible ones: string functions
|
|
22
|
+
* for text, comparisons for ordered types, equality for booleans. Every type keeps
|
|
23
|
+
* the null checks, which serialise to `eq null` / `ne null`.
|
|
24
|
+
*/
|
|
25
|
+
var BY_TYPE = {
|
|
26
|
+
string: [
|
|
27
|
+
"contains",
|
|
28
|
+
"notcontains",
|
|
29
|
+
"startswith",
|
|
30
|
+
"endswith",
|
|
31
|
+
"eq",
|
|
32
|
+
"ne",
|
|
33
|
+
"in",
|
|
34
|
+
"isblank",
|
|
35
|
+
"isnotblank"
|
|
36
|
+
],
|
|
37
|
+
number: [
|
|
38
|
+
"eq",
|
|
39
|
+
"ne",
|
|
40
|
+
"gt",
|
|
41
|
+
"ge",
|
|
42
|
+
"lt",
|
|
43
|
+
"le",
|
|
44
|
+
"between",
|
|
45
|
+
"in",
|
|
46
|
+
"isblank",
|
|
47
|
+
"isnotblank"
|
|
48
|
+
],
|
|
49
|
+
date: [
|
|
50
|
+
"eq",
|
|
51
|
+
"ne",
|
|
52
|
+
"gt",
|
|
53
|
+
"ge",
|
|
54
|
+
"lt",
|
|
55
|
+
"le",
|
|
56
|
+
"between",
|
|
57
|
+
"isblank",
|
|
58
|
+
"isnotblank"
|
|
59
|
+
],
|
|
60
|
+
datetime: [
|
|
61
|
+
"eq",
|
|
62
|
+
"ne",
|
|
63
|
+
"gt",
|
|
64
|
+
"ge",
|
|
65
|
+
"lt",
|
|
66
|
+
"le",
|
|
67
|
+
"between",
|
|
68
|
+
"isblank",
|
|
69
|
+
"isnotblank"
|
|
70
|
+
],
|
|
71
|
+
boolean: ["eq", "ne"]
|
|
72
|
+
};
|
|
73
|
+
function operatorsFor(dataType = "string") {
|
|
74
|
+
return BY_TYPE[dataType] ?? BY_TYPE.string;
|
|
75
|
+
}
|
|
76
|
+
/** The operator a field falls back to when its type has no current one. */
|
|
77
|
+
function defaultOperator(dataType = "string") {
|
|
78
|
+
return operatorsFor(dataType)[0] ?? "eq";
|
|
79
|
+
}
|
|
80
|
+
/** English defaults for every label. `texts` overrides any of these. */
|
|
81
|
+
var DEFAULT_TEXTS = {
|
|
82
|
+
matchPrefix: "Match",
|
|
83
|
+
matchSuffix: "of the following rules:",
|
|
84
|
+
addRule: "Add rule",
|
|
85
|
+
addGroup: "Add group",
|
|
86
|
+
addNested: "Add nested rule",
|
|
87
|
+
remove: "Remove",
|
|
88
|
+
apply: "Apply",
|
|
89
|
+
clear: "Clear",
|
|
90
|
+
valuePlaceholder: "Enter a value",
|
|
91
|
+
multiValuePlaceholder: "Enter one or more values (comma separated)",
|
|
92
|
+
emptyHint: "No rules yet — add one to start filtering.",
|
|
93
|
+
and: "all",
|
|
94
|
+
or: "any",
|
|
95
|
+
notAnd: "not all",
|
|
96
|
+
notOr: "none",
|
|
97
|
+
eq: "is equal to",
|
|
98
|
+
ne: "is not equal to",
|
|
99
|
+
gt: "is greater than",
|
|
100
|
+
ge: "is greater than or equal to",
|
|
101
|
+
lt: "is less than",
|
|
102
|
+
le: "is less than or equal to",
|
|
103
|
+
contains: "contains",
|
|
104
|
+
notcontains: "does not contain",
|
|
105
|
+
startswith: "starts with",
|
|
106
|
+
endswith: "ends with",
|
|
107
|
+
in: "is one of",
|
|
108
|
+
between: "is between",
|
|
109
|
+
isblank: "is blank",
|
|
110
|
+
isnotblank: "is not blank"
|
|
111
|
+
};
|
|
112
|
+
function resolveTexts(texts) {
|
|
113
|
+
return {
|
|
114
|
+
...DEFAULT_TEXTS,
|
|
115
|
+
...texts ?? {}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/** Coerce a raw input string to the field's data type for the emitted filter. */
|
|
119
|
+
function coerceValue(raw, dataType = "string") {
|
|
120
|
+
if (raw === null || raw === void 0 || raw === "") return raw;
|
|
121
|
+
if (dataType === "number") {
|
|
122
|
+
const n = Number(raw);
|
|
123
|
+
return Number.isNaN(n) ? raw : n;
|
|
124
|
+
}
|
|
125
|
+
if (dataType === "boolean") {
|
|
126
|
+
if (typeof raw === "boolean") return raw;
|
|
127
|
+
const s = String(raw).toLowerCase();
|
|
128
|
+
return s === "true" || s === "1";
|
|
129
|
+
}
|
|
130
|
+
return raw;
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/components/filter/filter-odata.ts
|
|
134
|
+
var _id = 0;
|
|
135
|
+
function nextId(prefix = "n") {
|
|
136
|
+
_id += 1;
|
|
137
|
+
return `${prefix}${_id}`;
|
|
138
|
+
}
|
|
139
|
+
function emptyGroup(operator = "and") {
|
|
140
|
+
return {
|
|
141
|
+
kind: "group",
|
|
142
|
+
id: nextId("g"),
|
|
143
|
+
operator,
|
|
144
|
+
children: []
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
/** devextreme's operator token for a builder operator (used in the array form). */
|
|
148
|
+
function dxOperator(op) {
|
|
149
|
+
switch (op) {
|
|
150
|
+
case "eq": return "=";
|
|
151
|
+
case "ne": return "<>";
|
|
152
|
+
case "gt": return ">";
|
|
153
|
+
case "ge": return ">=";
|
|
154
|
+
case "lt": return "<";
|
|
155
|
+
case "le": return "<=";
|
|
156
|
+
case "notcontains": return "notcontains";
|
|
157
|
+
default: return op;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/** Inverse of {@link dxOperator}, tolerating both spellings of each token. */
|
|
161
|
+
function fromDxOperator(op) {
|
|
162
|
+
switch (String(op).toLowerCase()) {
|
|
163
|
+
case "=":
|
|
164
|
+
case "==":
|
|
165
|
+
case "eq": return "eq";
|
|
166
|
+
case "<>":
|
|
167
|
+
case "!=":
|
|
168
|
+
case "ne": return "ne";
|
|
169
|
+
case ">":
|
|
170
|
+
case "gt": return "gt";
|
|
171
|
+
case ">=":
|
|
172
|
+
case "ge": return "ge";
|
|
173
|
+
case "<":
|
|
174
|
+
case "lt": return "lt";
|
|
175
|
+
case "<=":
|
|
176
|
+
case "le": return "le";
|
|
177
|
+
case "contains": return "contains";
|
|
178
|
+
case "notcontains": return "notcontains";
|
|
179
|
+
case "startswith": return "startswith";
|
|
180
|
+
case "endswith": return "endswith";
|
|
181
|
+
case "between": return "between";
|
|
182
|
+
case "in": return "in";
|
|
183
|
+
default: return null;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/** Is this array a `[field, op, value]` triple rather than a nested group? */
|
|
187
|
+
function isTriple(node) {
|
|
188
|
+
return Array.isArray(node) && node.length === 3 && typeof node[0] === "string" && typeof node[1] === "string" && fromDxOperator(node[1]) !== null;
|
|
189
|
+
}
|
|
190
|
+
/** One rule as a devextreme expression; `null` when it can't be expressed yet. */
|
|
191
|
+
function ruleToArray(rule) {
|
|
192
|
+
if (!rule.field) return null;
|
|
193
|
+
const arity = OPERATOR_ARITY[rule.operator];
|
|
194
|
+
if (rule.operator === "isblank") return [
|
|
195
|
+
rule.field,
|
|
196
|
+
"=",
|
|
197
|
+
null
|
|
198
|
+
];
|
|
199
|
+
if (rule.operator === "isnotblank") return [
|
|
200
|
+
rule.field,
|
|
201
|
+
"<>",
|
|
202
|
+
null
|
|
203
|
+
];
|
|
204
|
+
if (arity === "many") {
|
|
205
|
+
const values = Array.isArray(rule.value) ? rule.value : splitMulti(rule.value);
|
|
206
|
+
if (!values.length) return null;
|
|
207
|
+
const parts = [];
|
|
208
|
+
values.forEach((v, i) => {
|
|
209
|
+
if (i) parts.push("or");
|
|
210
|
+
parts.push([
|
|
211
|
+
rule.field,
|
|
212
|
+
"=",
|
|
213
|
+
v
|
|
214
|
+
]);
|
|
215
|
+
});
|
|
216
|
+
return values.length === 1 ? parts[0] : parts;
|
|
217
|
+
}
|
|
218
|
+
if (arity === 2) {
|
|
219
|
+
const [a, b] = Array.isArray(rule.value) ? rule.value : [void 0, void 0];
|
|
220
|
+
if (a === void 0 || a === "" || b === void 0 || b === "") return null;
|
|
221
|
+
return [
|
|
222
|
+
[
|
|
223
|
+
rule.field,
|
|
224
|
+
">=",
|
|
225
|
+
a
|
|
226
|
+
],
|
|
227
|
+
"and",
|
|
228
|
+
[
|
|
229
|
+
rule.field,
|
|
230
|
+
"<=",
|
|
231
|
+
b
|
|
232
|
+
]
|
|
233
|
+
];
|
|
234
|
+
}
|
|
235
|
+
if (rule.value === void 0 || rule.value === "") return null;
|
|
236
|
+
return [
|
|
237
|
+
rule.field,
|
|
238
|
+
dxOperator(rule.operator),
|
|
239
|
+
rule.value
|
|
240
|
+
];
|
|
241
|
+
}
|
|
242
|
+
/** Split a comma-separated multi-value entry, trimming and dropping blanks. */
|
|
243
|
+
function splitMulti(value) {
|
|
244
|
+
if (Array.isArray(value)) return value.filter((v) => v !== "" && v !== null && v !== void 0);
|
|
245
|
+
if (value === null || value === void 0 || value === "") return [];
|
|
246
|
+
return String(value).split(",").map((s) => s.trim()).filter(Boolean);
|
|
247
|
+
}
|
|
248
|
+
/** The node tree as a devextreme filter expression, or `null` when empty. */
|
|
249
|
+
function treeToArray(node) {
|
|
250
|
+
if (node.kind === "rule") return ruleToArray(node);
|
|
251
|
+
const parts = node.children.map((c) => treeToArray(c)).filter((p) => Array.isArray(p) && p.length > 0);
|
|
252
|
+
if (!parts.length) return null;
|
|
253
|
+
const join = node.operator === "or" || node.operator === "notOr" ? "or" : "and";
|
|
254
|
+
let out;
|
|
255
|
+
if (parts.length === 1) out = parts[0];
|
|
256
|
+
else {
|
|
257
|
+
out = [];
|
|
258
|
+
parts.forEach((p, i) => {
|
|
259
|
+
if (i) out.push(join);
|
|
260
|
+
out.push(p);
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
return node.operator === "notAnd" || node.operator === "notOr" ? ["!", out] : out;
|
|
264
|
+
}
|
|
265
|
+
/** Wrap a parsed node so the root is always a group the UI can add rules to. */
|
|
266
|
+
function asRootGroup(node) {
|
|
267
|
+
if (!node) return emptyGroup();
|
|
268
|
+
if (node.kind === "group") return node;
|
|
269
|
+
const g = emptyGroup();
|
|
270
|
+
g.children.push(node);
|
|
271
|
+
return g;
|
|
272
|
+
}
|
|
273
|
+
/** devextreme expression → node tree. Returns `null` for an empty/unusable input. */
|
|
274
|
+
function arrayToTree(filter) {
|
|
275
|
+
if (!Array.isArray(filter) || filter.length === 0) return null;
|
|
276
|
+
if (filter.length === 2 && (filter[0] === "!" || filter[0] === "not")) {
|
|
277
|
+
const inner = arrayToTree(filter[1]);
|
|
278
|
+
if (!inner) return null;
|
|
279
|
+
const g = inner.kind === "group" ? inner : asRootGroup(inner);
|
|
280
|
+
g.operator = g.operator === "or" ? "notOr" : "notAnd";
|
|
281
|
+
return g;
|
|
282
|
+
}
|
|
283
|
+
if (isTriple(filter)) {
|
|
284
|
+
const [field, rawOp, value] = filter;
|
|
285
|
+
const op = fromDxOperator(rawOp);
|
|
286
|
+
if (value === null) return {
|
|
287
|
+
kind: "rule",
|
|
288
|
+
id: nextId("r"),
|
|
289
|
+
field,
|
|
290
|
+
operator: op === "ne" ? "isnotblank" : "isblank",
|
|
291
|
+
value: null
|
|
292
|
+
};
|
|
293
|
+
return {
|
|
294
|
+
kind: "rule",
|
|
295
|
+
id: nextId("r"),
|
|
296
|
+
field,
|
|
297
|
+
operator: op,
|
|
298
|
+
value
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
const members = [];
|
|
302
|
+
let join = "and";
|
|
303
|
+
for (const part of filter) {
|
|
304
|
+
if (typeof part === "string" && (part === "and" || part === "or" || part === "&" || part === "|")) {
|
|
305
|
+
join = part === "or" || part === "|" ? "or" : "and";
|
|
306
|
+
continue;
|
|
307
|
+
}
|
|
308
|
+
members.push(part);
|
|
309
|
+
}
|
|
310
|
+
const children = members.map((m) => arrayToTree(m)).filter((n) => n !== null);
|
|
311
|
+
if (!children.length) return null;
|
|
312
|
+
if (children.length === 1) return children[0];
|
|
313
|
+
const g = emptyGroup(join);
|
|
314
|
+
g.children = children;
|
|
315
|
+
return g;
|
|
316
|
+
}
|
|
317
|
+
/** OData keyword for a comparison token. */
|
|
318
|
+
function odataKeyword(op) {
|
|
319
|
+
switch (op) {
|
|
320
|
+
case "=":
|
|
321
|
+
case "eq": return "eq";
|
|
322
|
+
case "<>":
|
|
323
|
+
case "!=":
|
|
324
|
+
case "ne": return "ne";
|
|
325
|
+
case ">":
|
|
326
|
+
case "gt": return "gt";
|
|
327
|
+
case ">=":
|
|
328
|
+
case "ge": return "ge";
|
|
329
|
+
case "<":
|
|
330
|
+
case "lt": return "lt";
|
|
331
|
+
case "<=":
|
|
332
|
+
case "le": return "le";
|
|
333
|
+
default: return null;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
/** `Job.Name` → `Job/Name`; a plain field passes through. */
|
|
337
|
+
function selector(field) {
|
|
338
|
+
if (!isPath(field)) return field;
|
|
339
|
+
return toODataSelector(field) ?? field;
|
|
340
|
+
}
|
|
341
|
+
/** Serialize a value, treating an explicit `null` as the OData `null` keyword. */
|
|
342
|
+
function literal(value) {
|
|
343
|
+
if (value === null || value === void 0) return "null";
|
|
344
|
+
if (value instanceof Date) return value.toISOString();
|
|
345
|
+
return odataLiteral(value);
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* A devextreme filter expression → an OData `$filter` string. Nested groups get
|
|
349
|
+
* parentheses; `contains`/`startswith`/`endswith` become function calls.
|
|
350
|
+
*/
|
|
351
|
+
function arrayToODataString(filter) {
|
|
352
|
+
if (!Array.isArray(filter) || filter.length === 0) return "";
|
|
353
|
+
if (filter.length === 1 && typeof filter[0] === "string") {
|
|
354
|
+
const raw = filter[0].trim();
|
|
355
|
+
return raw ? `(${raw})` : "";
|
|
356
|
+
}
|
|
357
|
+
if (filter.length === 2 && (filter[0] === "!" || filter[0] === "not")) {
|
|
358
|
+
const inner = arrayToODataString(filter[1]);
|
|
359
|
+
return inner ? `not (${inner})` : "";
|
|
360
|
+
}
|
|
361
|
+
if (isTriple(filter)) {
|
|
362
|
+
const [field, rawOp, value] = filter;
|
|
363
|
+
const sel = selector(field);
|
|
364
|
+
const kw = odataKeyword(rawOp);
|
|
365
|
+
if (kw) return `${sel} ${kw} ${literal(value)}`;
|
|
366
|
+
switch (String(rawOp).toLowerCase()) {
|
|
367
|
+
case "contains": return `contains(${sel},${literal(value)})`;
|
|
368
|
+
case "notcontains": return `not contains(${sel},${literal(value)})`;
|
|
369
|
+
case "startswith": return `startswith(${sel},${literal(value)})`;
|
|
370
|
+
case "endswith": return `endswith(${sel},${literal(value)})`;
|
|
371
|
+
default: return "";
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
const out = [];
|
|
375
|
+
for (const part of filter) {
|
|
376
|
+
if (typeof part === "string") {
|
|
377
|
+
const t = part.toLowerCase();
|
|
378
|
+
if (t === "and" || t === "&") out.push("and");
|
|
379
|
+
else if (t === "or" || t === "|") out.push("or");
|
|
380
|
+
continue;
|
|
381
|
+
}
|
|
382
|
+
const s = arrayToODataString(part);
|
|
383
|
+
if (!s) continue;
|
|
384
|
+
const rawClause = Array.isArray(part) && part.length === 1 && typeof part[0] === "string";
|
|
385
|
+
const nested = Array.isArray(part) && !isTriple(part) && !rawClause;
|
|
386
|
+
out.push(nested && !/^not \(/.test(s) ? `(${s})` : s);
|
|
387
|
+
}
|
|
388
|
+
while (out.length && (out[0] === "and" || out[0] === "or")) out.shift();
|
|
389
|
+
while (out.length && (out[out.length - 1] === "and" || out[out.length - 1] === "or")) out.pop();
|
|
390
|
+
return out.join(" ");
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Parse the subset of OData `$filter` the builder itself emits: parentheses,
|
|
394
|
+
* `and` / `or` / `not`, the six comparisons, `contains` / `startswith` /
|
|
395
|
+
* `endswith`, `in (…)`, `null`, and quoted / numeric / boolean literals.
|
|
396
|
+
*
|
|
397
|
+
* Anything outside that subset throws, and the caller (`monoFilterBuilder`) warns
|
|
398
|
+
* once and falls back to an empty tree — a wrong filter is worse than none.
|
|
399
|
+
*/
|
|
400
|
+
function odataStringToArray(input) {
|
|
401
|
+
const src = String(input ?? "").trim();
|
|
402
|
+
if (!src) return null;
|
|
403
|
+
let i = 0;
|
|
404
|
+
const ws = () => {
|
|
405
|
+
while (i < src.length && /\s/.test(src[i])) i += 1;
|
|
406
|
+
};
|
|
407
|
+
const eof = () => {
|
|
408
|
+
ws();
|
|
409
|
+
return i >= src.length;
|
|
410
|
+
};
|
|
411
|
+
const peekWord = () => {
|
|
412
|
+
ws();
|
|
413
|
+
const m = /^[A-Za-z_][A-Za-z0-9_.\/]*/.exec(src.slice(i));
|
|
414
|
+
return m ? m[0] : "";
|
|
415
|
+
};
|
|
416
|
+
const takeWord = () => {
|
|
417
|
+
const w = peekWord();
|
|
418
|
+
i += w.length;
|
|
419
|
+
return w;
|
|
420
|
+
};
|
|
421
|
+
const expect = (ch) => {
|
|
422
|
+
ws();
|
|
423
|
+
if (src[i] !== ch) throw new Error(`expected "${ch}" at ${i}`);
|
|
424
|
+
i += 1;
|
|
425
|
+
};
|
|
426
|
+
const parseLiteral = () => {
|
|
427
|
+
ws();
|
|
428
|
+
if (src[i] === "'") {
|
|
429
|
+
i += 1;
|
|
430
|
+
let out = "";
|
|
431
|
+
while (i < src.length) {
|
|
432
|
+
if (src[i] === "'") {
|
|
433
|
+
if (src[i + 1] === "'") {
|
|
434
|
+
out += "'";
|
|
435
|
+
i += 2;
|
|
436
|
+
continue;
|
|
437
|
+
}
|
|
438
|
+
i += 1;
|
|
439
|
+
return out;
|
|
440
|
+
}
|
|
441
|
+
out += src[i];
|
|
442
|
+
i += 1;
|
|
443
|
+
}
|
|
444
|
+
throw new Error("unterminated string");
|
|
445
|
+
}
|
|
446
|
+
const m = /^-?\d+(\.\d+)?/.exec(src.slice(i));
|
|
447
|
+
if (m) {
|
|
448
|
+
i += m[0].length;
|
|
449
|
+
return Number(m[0]);
|
|
450
|
+
}
|
|
451
|
+
const w = takeWord();
|
|
452
|
+
if (w === "null") return null;
|
|
453
|
+
if (w === "true") return true;
|
|
454
|
+
if (w === "false") return false;
|
|
455
|
+
if (w) return w;
|
|
456
|
+
throw new Error(`expected a literal at ${i}`);
|
|
457
|
+
};
|
|
458
|
+
const parseComparison = () => {
|
|
459
|
+
ws();
|
|
460
|
+
const w = peekWord().toLowerCase();
|
|
461
|
+
if (w === "contains" || w === "startswith" || w === "endswith") {
|
|
462
|
+
const fn = takeWord().toLowerCase();
|
|
463
|
+
expect("(");
|
|
464
|
+
const field = takeWord();
|
|
465
|
+
expect(",");
|
|
466
|
+
const value = parseLiteral();
|
|
467
|
+
expect(")");
|
|
468
|
+
return [
|
|
469
|
+
field.replace(/\//g, "."),
|
|
470
|
+
fn,
|
|
471
|
+
value
|
|
472
|
+
];
|
|
473
|
+
}
|
|
474
|
+
const field = takeWord();
|
|
475
|
+
if (!field) throw new Error(`expected a field at ${i}`);
|
|
476
|
+
const op = takeWord().toLowerCase();
|
|
477
|
+
if (op === "in") {
|
|
478
|
+
expect("(");
|
|
479
|
+
const values = [];
|
|
480
|
+
for (;;) {
|
|
481
|
+
values.push(parseLiteral());
|
|
482
|
+
ws();
|
|
483
|
+
if (src[i] === ",") {
|
|
484
|
+
i += 1;
|
|
485
|
+
continue;
|
|
486
|
+
}
|
|
487
|
+
break;
|
|
488
|
+
}
|
|
489
|
+
expect(")");
|
|
490
|
+
if (!values.length) throw new Error("empty in()");
|
|
491
|
+
const parts = [];
|
|
492
|
+
values.forEach((v, n) => {
|
|
493
|
+
if (n) parts.push("or");
|
|
494
|
+
parts.push([
|
|
495
|
+
field.replace(/\//g, "."),
|
|
496
|
+
"=",
|
|
497
|
+
v
|
|
498
|
+
]);
|
|
499
|
+
});
|
|
500
|
+
return values.length === 1 ? parts[0] : parts;
|
|
501
|
+
}
|
|
502
|
+
const kw = odataKeyword(op);
|
|
503
|
+
if (!kw) throw new Error(`unsupported operator "${op}" at ${i}`);
|
|
504
|
+
const value = parseLiteral();
|
|
505
|
+
return [
|
|
506
|
+
field.replace(/\//g, "."),
|
|
507
|
+
kw,
|
|
508
|
+
value
|
|
509
|
+
];
|
|
510
|
+
};
|
|
511
|
+
const parseOr = () => {
|
|
512
|
+
let left = parseAnd();
|
|
513
|
+
for (;;) {
|
|
514
|
+
ws();
|
|
515
|
+
if (peekWord().toLowerCase() !== "or") break;
|
|
516
|
+
takeWord();
|
|
517
|
+
const right = parseAnd();
|
|
518
|
+
left = [
|
|
519
|
+
left,
|
|
520
|
+
"or",
|
|
521
|
+
right
|
|
522
|
+
];
|
|
523
|
+
}
|
|
524
|
+
return left;
|
|
525
|
+
};
|
|
526
|
+
const parseAnd = () => {
|
|
527
|
+
let left = parseUnary();
|
|
528
|
+
for (;;) {
|
|
529
|
+
ws();
|
|
530
|
+
if (peekWord().toLowerCase() !== "and") break;
|
|
531
|
+
takeWord();
|
|
532
|
+
const right = parseUnary();
|
|
533
|
+
left = [
|
|
534
|
+
left,
|
|
535
|
+
"and",
|
|
536
|
+
right
|
|
537
|
+
];
|
|
538
|
+
}
|
|
539
|
+
return left;
|
|
540
|
+
};
|
|
541
|
+
const parseUnary = () => {
|
|
542
|
+
ws();
|
|
543
|
+
if (peekWord().toLowerCase() === "not") {
|
|
544
|
+
const save = i;
|
|
545
|
+
takeWord();
|
|
546
|
+
ws();
|
|
547
|
+
if (peekWord().toLowerCase() === "contains") {
|
|
548
|
+
const c = parseComparison();
|
|
549
|
+
return [
|
|
550
|
+
c[0],
|
|
551
|
+
"notcontains",
|
|
552
|
+
c[2]
|
|
553
|
+
];
|
|
554
|
+
}
|
|
555
|
+
if (src[i] === "(") {
|
|
556
|
+
expect("(");
|
|
557
|
+
const inner = parseOr();
|
|
558
|
+
expect(")");
|
|
559
|
+
return ["!", inner];
|
|
560
|
+
}
|
|
561
|
+
i = save;
|
|
562
|
+
}
|
|
563
|
+
ws();
|
|
564
|
+
if (src[i] === "(") {
|
|
565
|
+
expect("(");
|
|
566
|
+
const inner = parseOr();
|
|
567
|
+
expect(")");
|
|
568
|
+
return inner;
|
|
569
|
+
}
|
|
570
|
+
return parseComparison();
|
|
571
|
+
};
|
|
572
|
+
const result = parseOr();
|
|
573
|
+
if (!eof()) throw new Error(`unexpected input at ${i}: "${src.slice(i, i + 24)}"`);
|
|
574
|
+
return result;
|
|
575
|
+
}
|
|
576
|
+
/** Flatten same-operator nesting so `[[a,'and',b],'and',c]` reads as one group. */
|
|
577
|
+
function flattenTree(node) {
|
|
578
|
+
if (node.kind === "rule") return node;
|
|
579
|
+
const children = [];
|
|
580
|
+
for (const raw of node.children) {
|
|
581
|
+
const child = flattenTree(raw);
|
|
582
|
+
if (child.kind === "group" && child.operator === node.operator && child.children.length) children.push(...child.children);
|
|
583
|
+
else children.push(child);
|
|
584
|
+
}
|
|
585
|
+
return {
|
|
586
|
+
...node,
|
|
587
|
+
children
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
//#endregion
|
|
591
|
+
export { flattenTree as a, splitMulti as c, OPERATOR_ARITY as d, coerceValue as f, resolveTexts as h, emptyGroup as i, treeToArray as l, operatorsFor as m, arrayToTree as n, nextId as o, defaultOperator as p, asRootGroup as r, odataStringToArray as s, arrayToODataString as t, DEFAULT_TEXTS as u };
|