@sankhyalabs/sankhyablocks 10.1.0-dev.6 → 10.1.0-dev.60
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 +4 -1
- package/dist/cjs/{ConfigStorage-72f34bd4.js → ConfigStorage-156bfcac.js} +19 -2
- package/dist/cjs/ContinuousInsertUtils-1ae0c6ac.js +41 -0
- package/dist/cjs/{DataFetcher-991b0349.js → DataFetcher-d13b4637.js} +121 -69
- package/dist/cjs/{FormConfigHelper-e253a418.js → FormConfigHelper-28fe4668.js} +3 -1
- package/dist/cjs/FormConfigHelper-c5f5473a.js +342 -0
- package/dist/cjs/{ISave-ebf6b4ed.js → ISave-55d9dcc3.js} +1 -1
- package/dist/cjs/ImageUtils-d6139911.js +144 -0
- package/dist/cjs/{PersonalizedFilterUtils-7259cf65.js → PersonalizedFilterUtils-263e4d24.js} +65 -5
- package/dist/cjs/{SnkFormConfigManager-cdbb29d4.js → SnkFormConfigManager-5cb9a39c.js} +5 -5
- package/dist/cjs/{SnkMultiSelectionListDataSource-011bec79.js → SnkMultiSelectionListDataSource-5c5badfc.js} +146 -74
- package/dist/cjs/{auth-fetcher-c3cac878.js → auth-fetcher-d1715459.js} +1 -1
- package/dist/cjs/config-header.cjs.entry.js +1 -1
- package/dist/cjs/configs-button.cjs.entry.js +1 -1
- package/dist/cjs/css-shim-a27d231b.js +6 -0
- package/dist/cjs/{dataunit-fetcher-8bf469e7.js → dataunit-fetcher-fae710c5.js} +91 -110
- package/dist/cjs/dom-ff96a4bc.js +75 -0
- package/dist/cjs/field-config_2.cjs.entry.js +3 -3
- package/dist/cjs/fields-layout.cjs.entry.js +6 -6
- package/dist/cjs/fields-selector.cjs.entry.js +3 -3
- package/dist/cjs/{filter-type.enum-2bb46d2a.js → filter-type.enum-b3b388af.js} +7 -0
- package/dist/cjs/{form-config-fetcher-c7af90d8.js → form-config-fetcher-bbebdcb8.js} +41 -5
- package/dist/cjs/guides-configurator.cjs.entry.js +3 -3
- package/dist/cjs/{index-1cf293c1.js → index-1894343a.js} +1547 -207
- package/dist/cjs/{index-e3e39724.js → index-bc950921.js} +6 -0
- package/dist/cjs/{index-13d05f03.js → index-f0fe7e6e.js} +90 -21
- package/dist/cjs/loader.cjs.js +16 -2
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +6 -6
- package/dist/cjs/sankhyablocks.cjs.js +132 -4
- package/dist/cjs/shadow-css-7e3e0ab1.js +389 -0
- package/dist/cjs/snk-actions-button_9.cjs.entry.js +169 -120
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +28 -9
- package/dist/cjs/snk-attach_11.cjs.entry.js +2952 -0
- package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +3 -1
- package/dist/cjs/snk-crud.cjs.entry.js +149 -102
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
- package/dist/cjs/snk-custom-slot-guide.cjs.entry.js +40 -0
- package/dist/cjs/snk-data-exporter.cjs.entry.js +62 -16
- package/dist/cjs/{snk-data-unit-7d587ad5.js → snk-data-unit-32237a2d.js} +12 -3
- package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
- package/dist/cjs/snk-detail-view.cjs.entry.js +32 -20
- package/dist/cjs/snk-dynaform-config-header_5.cjs.entry.js +739 -0
- package/dist/cjs/snk-dynaform-detail-view_2.cjs.entry.js +961 -0
- package/dist/cjs/snk-dynaform-field-config_2.cjs.entry.js +327 -0
- package/dist/cjs/snk-dynaform-guides-view-2c7c6ce4.js +1094 -0
- package/dist/cjs/snk-dynaform-guides-view.cjs.entry.js +23 -0
- package/dist/cjs/snk-dynaform.cjs.entry.js +679 -0
- package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-entity-search.cjs.entry.js +211 -0
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +2 -2
- package/dist/cjs/{snk-expression-group_2.cjs.entry.js → snk-expression-group_4.cjs.entry.js} +422 -19
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +170 -120
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +11 -7
- package/dist/cjs/snk-filter-period.cjs.entry.js +14 -7
- package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-text.cjs.entry.js +2 -2
- package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +70 -8
- package/dist/cjs/snk-form_2.cjs.entry.js +21 -11
- package/dist/cjs/snk-grid.cjs.entry.js +91 -36
- package/dist/cjs/{snk-guides-viewer-366d5c32.js → snk-guides-viewer-67b9cca9.js} +78 -214
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +10 -18
- package/dist/cjs/snk-layout-form-config.cjs.entry.js +71 -0
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-pesquisa.cjs.entry.js +6 -7
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +184 -127
- package/dist/cjs/{sortable.esm-9a110bb7.js → sortable.esm-b87669ab.js} +76 -90
- package/dist/cjs/taskbar-elements-25f800b3.js +152 -0
- package/dist/cjs/taskbarUtils-99aaa01f.js +236 -0
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +26 -0
- package/dist/collection/components/snk-actions-button/actions/executor/launch-screen.executor.js +6 -3
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +30 -6
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +1 -0
- package/dist/collection/components/snk-application/snk-application.js +20 -2
- package/dist/collection/components/snk-attach/snk-attach.css +29 -7
- package/dist/collection/components/snk-attach/snk-attach.js +93 -18
- package/dist/collection/components/snk-configurator/snk-configurator.js +2 -0
- package/dist/collection/components/snk-crud/snk-crud.css +55 -0
- package/dist/collection/components/snk-crud/snk-crud.js +169 -98
- package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js +1 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css +4 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +21 -7
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.css +17 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.js +330 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +90 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +22 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +89 -204
- package/dist/collection/components/snk-crud/utils/taskbarUtils.js +163 -0
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.css +3 -0
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.js +95 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js +1 -1
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +2 -2
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +78 -23
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +28 -5
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +43 -2
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +9 -0
- package/dist/collection/components/snk-dynaform/interfaces/PropsCustomEditor.js +1 -0
- package/dist/collection/components/snk-dynaform/interfaces/PropsCustomRender.js +1 -0
- package/dist/collection/components/snk-dynaform/snk-dynaform.css +69 -0
- package/dist/collection/components/snk-dynaform/snk-dynaform.js +1661 -0
- package/dist/collection/components/snk-dynaform/subcomponents/CardFormResizeObserver.js +26 -0
- package/dist/collection/components/snk-dynaform/subcomponents/GuideBuilder.js +51 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.css +182 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.js +1015 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.css +98 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.js +590 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.css +321 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.js +1587 -0
- package/dist/collection/components/snk-dynaform-form-config/FormConfigHelper.js +325 -0
- package/dist/collection/components/snk-dynaform-form-config/SnkFormConfigManager.js +219 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.css +17 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.js +236 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.css +41 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.js +170 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.css +22 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.js +408 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-item.css +88 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-item.js +209 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.css +167 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.js +655 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.css +42 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.js +171 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-form-config.css +66 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-form-config.js +557 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.css +80 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.js +326 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +12 -8
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +14 -7
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css +5 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +28 -2
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +7 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +22 -8
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +166 -78
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +3 -1
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +3 -3
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +1 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +16 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +4 -4
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +3 -4
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +2 -2
- package/dist/collection/components/snk-form-config/snk-form-config.js +15 -5
- package/dist/collection/components/snk-grid/snk-grid.css +33 -5
- package/dist/collection/components/snk-grid/snk-grid.js +199 -24
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +153 -51
- package/dist/collection/components/snk-image-input/snk-image-input.css +3 -0
- package/dist/collection/components/snk-image-input/snk-image-input.js +338 -0
- package/dist/collection/components/snk-image-input/utils/ImageUtils.js +135 -0
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +1 -1
- package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +1 -1
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +13 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +0 -4
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +34 -22
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +8 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +38 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +54 -37
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js +27 -1
- package/dist/collection/components/snk-taskbar/processor/simple-taskbar-processor.js +55 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +44 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +248 -132
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.css +12 -0
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.js +19 -0
- package/dist/collection/lib/@types/index.js +6 -0
- package/dist/collection/lib/configs/ConfigStorage.js +5 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +51 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +24 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js +15 -104
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +22 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +12 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +18 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +11 -2
- package/dist/collection/lib/message/messageResourceEnUSUtils.js +2 -0
- package/dist/collection/lib/message/messageResourceEsESUtils.js +2 -0
- package/dist/collection/lib/message/messageResourcePtBRUtils.js +2 -0
- package/dist/collection/lib/message/resources/en-us/dataUnitDataLoaderHelper.msg.js +0 -13
- package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +13 -1
- package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +1 -0
- package/dist/collection/lib/message/resources/en-us/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js +10 -2
- package/dist/collection/lib/message/resources/es-es/dataUnitDataLoaderHelper.msg.js +0 -13
- package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +13 -1
- package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +1 -0
- package/dist/collection/lib/message/resources/es-es/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js +8 -0
- package/dist/collection/lib/message/resources/pt-br/dataUnitDataLoaderHelper.msg.js +0 -13
- package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js +1 -1
- package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +13 -1
- package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +1 -0
- package/dist/collection/lib/message/resources/pt-br/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js +10 -2
- package/dist/collection/lib/utils/CrudUtils.js +7 -4
- package/dist/components/ConfigStorage.js +17 -0
- package/dist/components/ContinuousInsertUtils.js +86 -28
- package/dist/components/DataFetcher.js +3 -2731
- package/dist/components/ISave.js +6 -0
- package/dist/components/PersonalizedFilterUtils.js +13 -0
- package/dist/components/SnkFormConfigManager.js +3 -3
- package/dist/components/SnkMessageBuilder.js +2804 -0
- package/dist/components/dataunit-fetcher.js +91 -110
- package/dist/components/field-config2.js +4 -2
- package/dist/components/fields-layout2.js +4 -4
- package/dist/components/form-config-fetcher.js +40 -4
- package/dist/components/guides-configurator2.js +2 -2
- package/dist/components/index.d.ts +16 -0
- package/dist/components/index.js +16 -0
- package/dist/components/index2.js +90 -21
- package/dist/components/snk-actions-button2.js +15 -9
- package/dist/components/snk-application2.js +22 -2
- package/dist/components/snk-attach2.js +69 -27
- package/dist/components/snk-configurator2.js +2 -0
- package/dist/components/snk-crud.js +240 -176
- package/dist/components/snk-custom-slot-guide.d.ts +11 -0
- package/dist/components/snk-custom-slot-guide.js +55 -0
- package/dist/components/snk-data-exporter2.js +56 -9
- package/dist/components/snk-data-unit2.js +10 -1
- package/dist/components/snk-detail-view2.js +227 -318
- package/dist/components/snk-dynaform-config-header.d.ts +11 -0
- package/dist/components/snk-dynaform-config-header.js +6 -0
- package/dist/components/snk-dynaform-config-header2.js +103 -0
- package/dist/components/snk-dynaform-configs-button.d.ts +11 -0
- package/dist/components/snk-dynaform-configs-button.js +6 -0
- package/dist/components/snk-dynaform-configs-button2.js +76 -0
- package/dist/components/snk-dynaform-detail-view.d.ts +11 -0
- package/dist/components/snk-dynaform-detail-view.js +6 -0
- package/dist/components/snk-dynaform-detail-view2.js +2213 -0
- package/dist/components/snk-dynaform-field-config.d.ts +11 -0
- package/dist/components/snk-dynaform-field-config.js +6 -0
- package/dist/components/snk-dynaform-field-config2.js +605 -0
- package/dist/components/snk-dynaform-field-item.d.ts +11 -0
- package/dist/components/snk-dynaform-field-item.js +6 -0
- package/dist/components/snk-dynaform-field-item2.js +96 -0
- package/dist/components/snk-dynaform-fields-layout.d.ts +11 -0
- package/dist/components/snk-dynaform-fields-layout.js +6 -0
- package/dist/components/snk-dynaform-fields-layout2.js +428 -0
- package/dist/components/snk-dynaform-fields-selector.d.ts +11 -0
- package/dist/components/snk-dynaform-fields-selector.js +6 -0
- package/dist/components/snk-dynaform-fields-selector2.js +104 -0
- package/dist/components/snk-dynaform-form-config.d.ts +11 -0
- package/dist/components/snk-dynaform-form-config.js +6 -0
- package/dist/components/snk-dynaform-form-config2.js +430 -0
- package/dist/components/snk-dynaform-form-view.d.ts +11 -0
- package/dist/components/snk-dynaform-form-view.js +6 -0
- package/dist/components/snk-dynaform-form-view2.js +272 -0
- package/dist/components/snk-dynaform-guides-configurator.d.ts +11 -0
- package/dist/components/snk-dynaform-guides-configurator.js +6 -0
- package/dist/components/snk-dynaform-guides-configurator2.js +173 -0
- package/dist/components/snk-dynaform-guides-view.d.ts +11 -0
- package/dist/components/snk-dynaform-guides-view.js +6 -0
- package/dist/components/snk-dynaform.d.ts +11 -0
- package/dist/components/snk-dynaform.js +1007 -0
- package/dist/components/snk-entity-search.d.ts +11 -0
- package/dist/components/snk-entity-search.js +6 -0
- package/dist/components/snk-entity-search2.js +231 -0
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-filter-bar2.js +116 -80
- package/dist/components/snk-filter-detail2.js +1 -1
- package/dist/components/snk-filter-item2.js +9 -3
- package/dist/components/snk-filter-modal2.js +22 -9
- package/dist/components/snk-filter-number.js +11 -7
- package/dist/components/snk-filter-period.js +13 -6
- package/dist/components/snk-filter-text.js +1 -1
- package/dist/components/snk-form-config2.js +15 -5
- package/dist/components/snk-form-view2.js +79 -10
- package/dist/components/snk-grid-config2.js +109 -50
- package/dist/components/snk-grid2.js +132 -65
- package/dist/components/snk-image-input.d.ts +11 -0
- package/dist/components/snk-image-input.js +6 -0
- package/dist/components/snk-image-input2.js +316 -0
- package/dist/components/snk-layout-form-config2.js +1 -1
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-pesquisa2.js +0 -1
- package/dist/components/snk-simple-crud2.js +46 -45
- package/dist/components/snk-taskbar-skeleton.d.ts +11 -0
- package/dist/components/snk-taskbar-skeleton.js +6 -0
- package/dist/components/snk-taskbar-skeleton2.js +29 -0
- package/dist/components/snk-taskbar2.js +256 -176
- package/dist/components/snk-view-representation2.js +1 -1
- package/dist/components/sortable.esm.js +76 -90
- package/dist/components/taskbar-actions-button2.js +21 -2
- package/dist/components/taskbar-split-button2.js +10 -1
- package/dist/components/taskbarUtils.js +229 -0
- package/dist/esm/{ConfigStorage-22324b6b.js → ConfigStorage-0d1c0695.js} +19 -2
- package/dist/esm/ContinuousInsertUtils-bce77dc1.js +39 -0
- package/dist/esm/{DataFetcher-450828a0.js → DataFetcher-70de9419.js} +121 -49
- package/dist/esm/{FormConfigHelper-e89ca25c.js → FormConfigHelper-d09669f3.js} +3 -1
- package/dist/esm/FormConfigHelper-efc29480.js +328 -0
- package/dist/esm/{ISave-61153166.js → ISave-f5704813.js} +1 -1
- package/dist/esm/ImageUtils-efbea0e4.js +138 -0
- package/dist/esm/{PersonalizedFilterUtils-2db38ff2.js → PersonalizedFilterUtils-45b5803c.js} +62 -2
- package/dist/esm/{SnkFormConfigManager-b5a92e12.js → SnkFormConfigManager-e7f05f79.js} +5 -5
- package/dist/esm/{SnkMultiSelectionListDataSource-d7ce2e54.js → SnkMultiSelectionListDataSource-6ac291a9.js} +141 -69
- package/dist/esm/{auth-fetcher-eef9d01e.js → auth-fetcher-e34880e5.js} +1 -1
- package/dist/esm/config-header.entry.js +1 -1
- package/dist/esm/configs-button.entry.js +1 -1
- package/dist/esm/css-shim-9f2d321e.js +4 -0
- package/dist/esm/{dataunit-fetcher-da9596f6.js → dataunit-fetcher-d26e4a08.js} +91 -110
- package/dist/esm/dom-64053c71.js +73 -0
- package/dist/esm/field-config_2.entry.js +3 -3
- package/dist/esm/fields-layout.entry.js +6 -6
- package/dist/esm/fields-selector.entry.js +3 -3
- package/dist/esm/{filter-type.enum-f6a8fe23.js → filter-type.enum-62b7fe88.js} +8 -1
- package/dist/esm/{form-config-fetcher-8d0a5e1c.js → form-config-fetcher-98c42169.js} +41 -5
- package/dist/esm/guides-configurator.entry.js +3 -3
- package/dist/esm/{index-479e1293.js → index-04f73a26.js} +1539 -207
- package/dist/esm/{index-b40568ff.js → index-c6721886.js} +6 -0
- package/dist/esm/{index-446f9341.js → index-ea250be6.js} +90 -21
- package/dist/esm/loader.js +17 -3
- package/dist/esm/pesquisa-grid_2.entry.js +6 -6
- package/dist/esm/sankhyablocks.js +133 -5
- package/dist/esm/shadow-css-98135883.js +387 -0
- package/dist/esm/snk-actions-button_9.entry.js +170 -121
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +28 -9
- package/dist/esm/snk-attach_11.entry.js +2938 -0
- package/dist/esm/snk-client-confirm.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +3 -1
- package/dist/esm/snk-crud.entry.js +149 -102
- package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
- package/dist/esm/snk-custom-slot-guide.entry.js +36 -0
- package/dist/esm/snk-data-exporter.entry.js +62 -16
- package/dist/esm/{snk-data-unit-99616a07.js → snk-data-unit-ff57ac90.js} +12 -3
- package/dist/esm/snk-data-unit.entry.js +4 -4
- package/dist/esm/snk-detail-view.entry.js +32 -20
- package/dist/esm/snk-dynaform-config-header_5.entry.js +731 -0
- package/dist/esm/snk-dynaform-detail-view_2.entry.js +956 -0
- package/dist/esm/snk-dynaform-field-config_2.entry.js +322 -0
- package/dist/esm/snk-dynaform-guides-view-0dfbefc1.js +1091 -0
- package/dist/esm/snk-dynaform-guides-view.entry.js +15 -0
- package/dist/esm/snk-dynaform.entry.js +675 -0
- package/dist/esm/snk-entity-list.entry.js +1 -1
- package/dist/esm/snk-entity-search.entry.js +207 -0
- package/dist/esm/snk-exporter-email-sender.entry.js +2 -2
- package/dist/esm/{snk-expression-group_2.entry.js → snk-expression-group_4.entry.js} +407 -6
- package/dist/esm/snk-filter-bar_4.entry.js +148 -98
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +11 -7
- package/dist/esm/snk-filter-period.entry.js +14 -7
- package/dist/esm/snk-filter-search.entry.js +1 -1
- package/dist/esm/snk-filter-text.entry.js +2 -2
- package/dist/esm/snk-form-summary.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +71 -9
- package/dist/esm/snk-form_2.entry.js +21 -11
- package/dist/esm/snk-grid.entry.js +89 -34
- package/dist/esm/{snk-guides-viewer-240de636.js → snk-guides-viewer-31a0a23d.js} +79 -215
- package/dist/esm/snk-guides-viewer.entry.js +10 -18
- package/dist/esm/snk-layout-form-config.entry.js +67 -0
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-pesquisa.entry.js +6 -7
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +185 -128
- package/dist/esm/{sortable.esm-842f85a3.js → sortable.esm-bc277c12.js} +76 -90
- package/dist/esm/taskbar-elements-ba9d6889.js +149 -0
- package/dist/esm/taskbarUtils-cb9db0d9.js +230 -0
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/{p-840fb68c.js → p-097d75b3.js} +2 -2
- package/dist/sankhyablocks/{p-7f7fe6c4.entry.js → p-0a160fb5.entry.js} +1 -1
- package/dist/sankhyablocks/p-0dbd53d9.js +1 -0
- package/dist/sankhyablocks/p-12579574.entry.js +1 -0
- package/dist/sankhyablocks/p-129a4906.entry.js +1 -0
- package/dist/sankhyablocks/{p-162bddae.entry.js → p-175c9576.entry.js} +1 -1
- package/dist/sankhyablocks/p-1d31aec3.entry.js +1 -0
- package/dist/sankhyablocks/p-24b059ee.entry.js +1 -0
- package/dist/sankhyablocks/{p-f5e942b7.entry.js → p-250b273e.entry.js} +1 -1
- package/dist/sankhyablocks/p-26f1919e.entry.js +1 -0
- package/dist/sankhyablocks/p-2a83f20e.entry.js +1 -0
- package/dist/sankhyablocks/p-2c4f7fdd.entry.js +1 -0
- package/dist/sankhyablocks/p-2c9d0870.js +2 -0
- package/dist/sankhyablocks/{p-cb4343c4.entry.js → p-2cc2526e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-75af335e.entry.js → p-2ebda226.entry.js} +1 -1
- package/dist/sankhyablocks/p-2ec98523.js +1 -0
- package/dist/sankhyablocks/p-3a35917e.entry.js +1 -0
- package/dist/sankhyablocks/p-449dfe55.entry.js +1 -0
- package/dist/sankhyablocks/p-46d7e2de.js +1 -0
- package/dist/sankhyablocks/p-4dd574d6.js +1 -0
- package/dist/sankhyablocks/p-541c72ec.entry.js +1 -0
- package/dist/sankhyablocks/p-58709cf9.js +1 -0
- package/dist/sankhyablocks/{p-27482793.entry.js → p-5aae5c74.entry.js} +1 -1
- package/dist/sankhyablocks/p-5aeae67f.js +1 -0
- package/dist/sankhyablocks/p-5d50f59a.entry.js +1 -0
- package/dist/sankhyablocks/p-5ef0e9a8.entry.js +1 -0
- package/dist/sankhyablocks/p-6f60df43.js +1 -0
- package/dist/sankhyablocks/{p-825098c1.entry.js → p-752c57f4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e258de96.entry.js → p-76729994.entry.js} +1 -1
- package/dist/sankhyablocks/{p-62e9b9b8.entry.js → p-846d8f79.entry.js} +1 -1
- package/dist/sankhyablocks/p-855ccf64.entry.js +1 -0
- package/dist/sankhyablocks/p-885262ce.entry.js +1 -0
- package/dist/sankhyablocks/{p-118c221e.js → p-8b4d6719.js} +1 -1
- package/dist/sankhyablocks/p-8d1ef77a.js +60 -0
- package/dist/sankhyablocks/{p-7d6f1285.js → p-8d81c8d3.js} +2 -2
- package/dist/sankhyablocks/{p-3d41f5a8.entry.js → p-8d946600.entry.js} +1 -1
- package/dist/sankhyablocks/p-8f5dd87d.entry.js +1 -0
- package/dist/sankhyablocks/p-90037547.js +1 -0
- package/dist/sankhyablocks/{p-96d45943.entry.js → p-90ae6c2e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0b9a42ad.entry.js → p-9742ea0e.entry.js} +1 -1
- package/dist/sankhyablocks/p-9e02a785.js +1 -0
- package/dist/sankhyablocks/{p-2fdac5e6.entry.js → p-9e109f5e.entry.js} +1 -1
- package/dist/sankhyablocks/p-9e7dc97d.entry.js +1 -0
- package/dist/sankhyablocks/p-a25ab2ff.entry.js +1 -0
- package/dist/sankhyablocks/p-a2a9f520.entry.js +1 -0
- package/dist/sankhyablocks/p-a46ac091.js +1 -0
- package/dist/sankhyablocks/p-a696bbcd.entry.js +1 -0
- package/dist/sankhyablocks/p-a73b6b00.js +1 -0
- package/dist/sankhyablocks/p-a9012341.entry.js +11 -0
- package/dist/sankhyablocks/p-abcb646d.js +1 -0
- package/dist/sankhyablocks/{p-180716b2.entry.js → p-ae326d06.entry.js} +1 -1
- package/dist/sankhyablocks/p-af673291.js +1 -0
- package/dist/sankhyablocks/p-b555ce38.entry.js +1 -0
- package/dist/sankhyablocks/p-bd2a845c.js +1 -0
- package/dist/sankhyablocks/p-bfce617e.entry.js +1 -0
- package/dist/sankhyablocks/p-c3ec6642.js +19 -0
- package/dist/sankhyablocks/p-c4b34e2b.entry.js +1 -0
- package/dist/sankhyablocks/{p-92cfc028.js → p-c9440c8a.js} +1 -1
- package/dist/sankhyablocks/p-ca3728c0.entry.js +1 -0
- package/dist/sankhyablocks/p-cbb8e351.js +7 -0
- package/dist/sankhyablocks/p-cd153f71.entry.js +1 -0
- package/dist/sankhyablocks/p-ce8ccd72.entry.js +1 -0
- package/dist/sankhyablocks/{p-4c763b10.entry.js → p-d657f71f.entry.js} +1 -1
- package/dist/sankhyablocks/p-da455c82.js +12 -0
- package/dist/sankhyablocks/p-e5a3711f.js +1 -0
- package/dist/sankhyablocks/{p-9a63f3f7.entry.js → p-e737fd5a.entry.js} +1 -1
- package/dist/sankhyablocks/p-eac48627.js +1 -0
- package/dist/sankhyablocks/p-ec7c87bb.js +28 -0
- package/dist/sankhyablocks/p-ee56dda6.entry.js +1 -0
- package/dist/sankhyablocks/{p-667cab42.entry.js → p-f152ef98.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7e250432.entry.js → p-f7170e10.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7345782c.entry.js → p-f921270b.entry.js} +1 -1
- package/dist/sankhyablocks/p-fb6e3c65.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +4 -0
- package/dist/types/components/snk-application/snk-application.d.ts +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +22 -4
- package/dist/types/components/snk-crud/snk-crud.d.ts +33 -11
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +3 -2
- package/dist/types/components/snk-crud/subcomponents/snk-entity-search.d.ts +62 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +12 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +13 -25
- package/dist/types/components/snk-crud/utils/taskbarUtils.d.ts +13 -0
- package/dist/types/components/snk-custom-slot-guide/snk-custom-slot-guide.d.ts +16 -0
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +8 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +4 -0
- package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +16 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +1 -0
- package/dist/types/components/snk-dynaform/interfaces/PropsCustomEditor.d.ts +4 -0
- package/dist/types/components/snk-dynaform/interfaces/PropsCustomRender.d.ts +4 -0
- package/dist/types/components/snk-dynaform/subcomponents/CardFormResizeObserver.d.ts +1 -0
- package/dist/types/components/snk-dynaform/subcomponents/GuideBuilder.d.ts +14 -0
- package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.d.ts +169 -0
- package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.d.ts +108 -0
- package/dist/types/components/snk-dynaform-form-config/FormConfigHelper.d.ts +36 -0
- package/dist/types/components/snk-dynaform-form-config/SnkFormConfigManager.d.ts +35 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.d.ts +23 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.d.ts +19 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.d.ts +56 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.d.ts +74 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.d.ts +21 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-form-config.d.ts +95 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.d.ts +35 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +5 -1
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +2 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +33 -16
- package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +1 -1
- package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +2 -2
- package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +1 -1
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +2 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +37 -1
- package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +11 -0
- package/dist/types/components/snk-image-input/snk-image-input.d.ts +57 -0
- package/dist/types/components/snk-image-input/utils/ImageUtils.d.ts +15 -0
- package/dist/types/components/snk-personalized-filter/interfaces/IParameter.d.ts +1 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +0 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -1
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +6 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +29 -2
- package/dist/types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.d.ts +5 -0
- package/dist/types/components/snk-taskbar/processor/simple-taskbar-processor.d.ts +31 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +32 -21
- package/dist/types/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.d.ts +3 -0
- package/dist/types/components.d.ts +2638 -1183
- package/dist/types/lib/@types/index.d.ts +6 -0
- package/dist/types/lib/configs/ConfigStorage.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.d.ts +3 -1
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/snk-image-input.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-image-input.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-image-input.msg.d.ts +1 -0
- package/package.json +11 -8
- package/react/components.d.ts +16 -0
- package/react/components.js +16 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/default-filters-a09bf82b.js +0 -8
- package/dist/cjs/index-62760a9c.js +0 -49
- package/dist/cjs/index-8d94b7e0.js +0 -7
- package/dist/cjs/snk-attach.cjs.entry.js +0 -910
- package/dist/cjs/snk-default-filter.cjs.entry.js +0 -77
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +0 -61
- package/dist/cjs/snk-filter-detail.cjs.entry.js +0 -198
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +0 -408
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +0 -108
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +0 -357
- package/dist/cjs/snk-simple-bar.cjs.entry.js +0 -45
- package/dist/cjs/snk-simple-crud.cjs.entry.js +0 -870
- package/dist/cjs/taskbar-elements-fb5d1e08.js +0 -132
- package/dist/cjs/taskbar-processor-2fba34a8.js +0 -53
- package/dist/esm/default-filters-50105e43.js +0 -8
- package/dist/esm/index-620ac460.js +0 -7
- package/dist/esm/index-8acbae97.js +0 -49
- package/dist/esm/snk-attach.entry.js +0 -906
- package/dist/esm/snk-default-filter.entry.js +0 -73
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +0 -56
- package/dist/esm/snk-filter-detail.entry.js +0 -194
- package/dist/esm/snk-filter-field-search_2.entry.js +0 -403
- package/dist/esm/snk-filter-modal-item.entry.js +0 -104
- package/dist/esm/snk-personalized-filter.entry.js +0 -353
- package/dist/esm/snk-simple-bar.entry.js +0 -41
- package/dist/esm/snk-simple-crud.entry.js +0 -866
- package/dist/esm/taskbar-elements-faaf5d8f.js +0 -129
- package/dist/esm/taskbar-processor-3436124c.js +0 -51
- package/dist/sankhyablocks/p-002d4d2b.js +0 -1
- package/dist/sankhyablocks/p-093f58fa.entry.js +0 -1
- package/dist/sankhyablocks/p-0948dc0a.entry.js +0 -11
- package/dist/sankhyablocks/p-0f3698af.js +0 -1
- package/dist/sankhyablocks/p-1a0caadb.js +0 -1
- package/dist/sankhyablocks/p-1a9c5684.entry.js +0 -1
- package/dist/sankhyablocks/p-1d589380.entry.js +0 -1
- package/dist/sankhyablocks/p-21107f0d.entry.js +0 -1
- package/dist/sankhyablocks/p-28f50632.js +0 -1
- package/dist/sankhyablocks/p-39be771c.js +0 -1
- package/dist/sankhyablocks/p-3ed04f0d.entry.js +0 -1
- package/dist/sankhyablocks/p-471b34f4.entry.js +0 -1
- package/dist/sankhyablocks/p-4963dd2a.entry.js +0 -1
- package/dist/sankhyablocks/p-49ddc27a.entry.js +0 -1
- package/dist/sankhyablocks/p-51833248.js +0 -7
- package/dist/sankhyablocks/p-55798617.js +0 -1
- package/dist/sankhyablocks/p-55f6fef2.entry.js +0 -1
- package/dist/sankhyablocks/p-56f16390.entry.js +0 -1
- package/dist/sankhyablocks/p-58683e28.js +0 -60
- package/dist/sankhyablocks/p-5ea893c5.entry.js +0 -1
- package/dist/sankhyablocks/p-60dd1d27.entry.js +0 -1
- package/dist/sankhyablocks/p-62aef37a.js +0 -1
- package/dist/sankhyablocks/p-669bb869.entry.js +0 -1
- package/dist/sankhyablocks/p-6a4b21dd.js +0 -1
- package/dist/sankhyablocks/p-6ee2ca7a.entry.js +0 -1
- package/dist/sankhyablocks/p-7cac3870.entry.js +0 -1
- package/dist/sankhyablocks/p-84345e7a.js +0 -1
- package/dist/sankhyablocks/p-86e54841.entry.js +0 -1
- package/dist/sankhyablocks/p-88b337fe.entry.js +0 -1
- package/dist/sankhyablocks/p-91005a00.entry.js +0 -1
- package/dist/sankhyablocks/p-91a9abb6.entry.js +0 -1
- package/dist/sankhyablocks/p-988afe78.js +0 -1
- package/dist/sankhyablocks/p-ada013c0.entry.js +0 -1
- package/dist/sankhyablocks/p-b568c1d4.js +0 -1
- package/dist/sankhyablocks/p-b7e891cc.entry.js +0 -1
- package/dist/sankhyablocks/p-b987e15d.js +0 -1
- package/dist/sankhyablocks/p-c35fc941.js +0 -26
- package/dist/sankhyablocks/p-c3dbf441.entry.js +0 -1
- package/dist/sankhyablocks/p-c4fcf1fb.entry.js +0 -1
- package/dist/sankhyablocks/p-c98c79c3.entry.js +0 -1
- package/dist/sankhyablocks/p-cadf4846.entry.js +0 -1
- package/dist/sankhyablocks/p-d8d8169b.js +0 -2
- package/dist/sankhyablocks/p-e91c3c57.entry.js +0 -1
- package/dist/sankhyablocks/p-ea729922.entry.js +0 -1
- package/dist/sankhyablocks/p-ec5fbad8.js +0 -1
- package/dist/sankhyablocks/p-f4184ce7.js +0 -1
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const DataFetcher = require('./DataFetcher-
|
|
4
|
-
require('./ISave-
|
|
3
|
+
const DataFetcher = require('./DataFetcher-d13b4637.js');
|
|
4
|
+
require('./ISave-55d9dcc3.js');
|
|
5
5
|
const core = require('@sankhyalabs/core');
|
|
6
|
-
const index
|
|
6
|
+
const index = require('./index-bc950921.js');
|
|
7
7
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
8
8
|
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
9
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
9
|
+
const dataunitFetcher = require('./dataunit-fetcher-fae710c5.js');
|
|
10
10
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
11
|
-
require('./form-config-fetcher-
|
|
11
|
+
require('./form-config-fetcher-bbebdcb8.js');
|
|
12
12
|
require('./constants-6d82e405.js');
|
|
13
|
-
const index = require('./index-1cf293c1.js');
|
|
14
13
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
15
14
|
const IFetchDataExporterParams = require('./IFetchDataExporterParams-e78ec415.js');
|
|
16
15
|
const InMemoryFilterColumnDataSource = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
@@ -26,10 +25,13 @@ class CrudUtils {
|
|
|
26
25
|
.columns
|
|
27
26
|
.filter(col => col.ascending != undefined)
|
|
28
27
|
.sort((colA, colB) => colA.orderIndex - colB.orderIndex)
|
|
29
|
-
.
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
.reduce((sortings, { name: field, ascending }) => {
|
|
29
|
+
const fieldMD = dataUnit.getField(field);
|
|
30
|
+
if (fieldMD) {
|
|
31
|
+
sortings.push({ field, dataType: fieldMD.dataType, mode: ascending ? core.SortMode.ASC : core.SortMode.DESC });
|
|
32
|
+
}
|
|
33
|
+
return sortings;
|
|
34
|
+
}, []);
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
static parseCrudResults(entities, onlyFirst) {
|
|
@@ -152,41 +154,6 @@ class RmPrecisionCustomValueFormatter {
|
|
|
152
154
|
}
|
|
153
155
|
}
|
|
154
156
|
|
|
155
|
-
class ContinuousInsertUtils {
|
|
156
|
-
constructor(snkApplication, resourceID, configName) {
|
|
157
|
-
this.snkApplication = snkApplication;
|
|
158
|
-
this.keyConfigEnableContinuousInsert = `${resourceID}enableContinuousInsert${configName ? configName : ''}`;
|
|
159
|
-
}
|
|
160
|
-
handleSaveConfig(enableContinuousInsert) {
|
|
161
|
-
return this.snkApplication.saveConfig(this.keyConfigEnableContinuousInsert, enableContinuousInsert);
|
|
162
|
-
}
|
|
163
|
-
getConfig() {
|
|
164
|
-
return this.snkApplication.getConfig(this.keyConfigEnableContinuousInsert).then(value => {
|
|
165
|
-
if (value) {
|
|
166
|
-
return value == "true" ? true : false;
|
|
167
|
-
}
|
|
168
|
-
return false;
|
|
169
|
-
}).catch(() => {
|
|
170
|
-
return false;
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
getMessage(key, params) {
|
|
174
|
-
var _a, _b;
|
|
175
|
-
return (_b = (_a = this.snkApplication) === null || _a === void 0 ? void 0 : _a.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage(key, params);
|
|
176
|
-
}
|
|
177
|
-
actionContinuousInsert(enableContinuousInsert, handleEnableContinuousInsert) {
|
|
178
|
-
return {
|
|
179
|
-
value: core.StringUtils.generateUUID(),
|
|
180
|
-
label: enableContinuousInsert ? this.getMessage('continuousInsertUtils.actions.disable') : this.getMessage('continuousInsertUtils.actions.enable'),
|
|
181
|
-
enabled: true,
|
|
182
|
-
itemBuilder: () => {
|
|
183
|
-
return (index.h("div", { class: "ez-dropdown__item-wrapper", onClick: handleEnableContinuousInsert },
|
|
184
|
-
index.h("span", { class: "ez-dropdown__item-label" }, enableContinuousInsert ? this.getMessage('continuousInsertUtils.actions.disable') : this.getMessage('continuousInsertUtils.actions.enable'))));
|
|
185
|
-
},
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
157
|
class CommonsExporter {
|
|
191
158
|
constructor(dataUnit, grid) {
|
|
192
159
|
this.MAX_WIDTH_COD = 60;
|
|
@@ -204,44 +171,46 @@ class CommonsExporter {
|
|
|
204
171
|
return this.columnsState;
|
|
205
172
|
}
|
|
206
173
|
async buildColumnsMetadata(gridColumns) {
|
|
207
|
-
var _a
|
|
174
|
+
var _a;
|
|
208
175
|
const columnsMetadata = [];
|
|
176
|
+
const searchPlusDescriptionIds = this.collectSearchPlusDescriptionIds(gridColumns);
|
|
177
|
+
const gridColumnsByName = new Map(gridColumns.map(column => [column.name, column]));
|
|
209
178
|
for (const column of gridColumns) {
|
|
179
|
+
if (this.isHiddenColumn(column)) {
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
210
182
|
/**
|
|
211
|
-
*
|
|
183
|
+
* A grid adiciona uma coluna auxiliar para a descrição de campos SEARCHPLUS
|
|
184
|
+
* (ex.: "ENTITYNAME.DESCRIPTIONFIELD"). A descrição já é emitida ao processar
|
|
185
|
+
* o próprio SEARCHPLUS, então pulamos a auxiliar para evitar duplicar a coluna.
|
|
212
186
|
*/
|
|
213
|
-
if (
|
|
187
|
+
if (searchPlusDescriptionIds.has(column.name)) {
|
|
214
188
|
continue;
|
|
215
189
|
}
|
|
216
190
|
const fieldData = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(column.name);
|
|
217
191
|
const customFormatter = await this.grid.getCustomValueFormatter(column.name);
|
|
218
|
-
const
|
|
219
|
-
const
|
|
220
|
-
const labelColumn = isUserInterfaceSEARCH ? "Cód. " : column.label;
|
|
221
|
-
let descriptionColumn = undefined;
|
|
192
|
+
const isSearchField = this.isSearchUserInterface(fieldData);
|
|
193
|
+
const labelColumn = isSearchField ? "Cód. " : column.label;
|
|
222
194
|
let columnData = {
|
|
223
195
|
id: column.name,
|
|
224
196
|
label: labelColumn,
|
|
225
|
-
width:
|
|
197
|
+
width: isSearchField ? (labelColumn.length * this.DEFAULT_FONT_SIZE) : column.width,
|
|
226
198
|
type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
|
|
227
199
|
userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface,
|
|
228
200
|
customFormatter
|
|
229
201
|
};
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
const newWidth = this.getWidthByMetaData(column === null || column === void 0 ? void 0 : column.width, columnData === null || columnData === void 0 ? void 0 : columnData.width, descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.width);
|
|
243
|
-
columnData = Object.assign(Object.assign({}, columnData), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.codWidth });
|
|
244
|
-
descriptionColumn = Object.assign(Object.assign({}, descriptionColumn), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.descWidth, label: (descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.label) || (column === null || column === void 0 ? void 0 : column.label) });
|
|
202
|
+
let descriptionColumn = isSearchField ? this.buildDescriptionColumn(fieldData, column) : undefined;
|
|
203
|
+
if (descriptionColumn) {
|
|
204
|
+
const realDescriptionColumn = gridColumnsByName.get(descriptionColumn.id);
|
|
205
|
+
if (realDescriptionColumn === null || realDescriptionColumn === void 0 ? void 0 : realDescriptionColumn.width) {
|
|
206
|
+
columnData = Object.assign(Object.assign({}, columnData), { width: Math.min(columnData.width, this.MAX_WIDTH_COD) });
|
|
207
|
+
descriptionColumn = Object.assign(Object.assign({}, descriptionColumn), { width: realDescriptionColumn.width, label: (descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.label) || (column === null || column === void 0 ? void 0 : column.label) });
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
const newWidth = this.getWidthByMetaData(column === null || column === void 0 ? void 0 : column.width, columnData === null || columnData === void 0 ? void 0 : columnData.width, descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.width);
|
|
211
|
+
columnData = Object.assign(Object.assign({}, columnData), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.codWidth });
|
|
212
|
+
descriptionColumn = Object.assign(Object.assign({}, descriptionColumn), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.descWidth, label: (descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.label) || (column === null || column === void 0 ? void 0 : column.label) });
|
|
213
|
+
}
|
|
245
214
|
}
|
|
246
215
|
columnsMetadata.push(columnData);
|
|
247
216
|
if (descriptionColumn)
|
|
@@ -249,6 +218,59 @@ class CommonsExporter {
|
|
|
249
218
|
}
|
|
250
219
|
return columnsMetadata || [];
|
|
251
220
|
}
|
|
221
|
+
collectSearchPlusDescriptionIds(gridColumns) {
|
|
222
|
+
var _a;
|
|
223
|
+
const descriptionIds = new Set();
|
|
224
|
+
for (const column of gridColumns) {
|
|
225
|
+
if (this.isHiddenColumn(column)) {
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
const fieldData = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(column.name);
|
|
229
|
+
if (!this.isSearchUserInterface(fieldData)) {
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
const descriptionId = this.buildDescriptionColumnId(fieldData);
|
|
233
|
+
if (descriptionId) {
|
|
234
|
+
descriptionIds.add(descriptionId);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return descriptionIds;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* TODO: Analisar e criar uma melhor forma de tratar essa validação do "RECDESP".
|
|
241
|
+
*/
|
|
242
|
+
isHiddenColumn(column) {
|
|
243
|
+
return column.hidden && column.name !== "RECDESP";
|
|
244
|
+
}
|
|
245
|
+
isSearchUserInterface(fieldData) {
|
|
246
|
+
return (fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface) === UnitMetadata.UserInterface.SEARCH
|
|
247
|
+
|| (fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface) === UnitMetadata.UserInterface.SEARCHPLUS;
|
|
248
|
+
}
|
|
249
|
+
buildDescriptionColumnId(fieldData) {
|
|
250
|
+
const properties = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties;
|
|
251
|
+
if ((properties === null || properties === void 0 ? void 0 : properties.DESCRIPTIONFIELD) == undefined) {
|
|
252
|
+
return undefined;
|
|
253
|
+
}
|
|
254
|
+
const descriptionField = `${properties.ENTITYNAME}.${properties.DESCRIPTIONFIELD}`;
|
|
255
|
+
return properties.mergedFrom ? `${properties.mergedFrom}.${descriptionField}` : descriptionField;
|
|
256
|
+
}
|
|
257
|
+
buildDescriptionColumn(fieldData, column) {
|
|
258
|
+
var _a;
|
|
259
|
+
const id = this.buildDescriptionColumnId(fieldData);
|
|
260
|
+
if (!id) {
|
|
261
|
+
return undefined;
|
|
262
|
+
}
|
|
263
|
+
const labelDescription = (_a = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _a === void 0 ? void 0 : _a.DESCRIPTIONENTITY;
|
|
264
|
+
const widthColumnDefault = 60;
|
|
265
|
+
return {
|
|
266
|
+
id,
|
|
267
|
+
label: labelDescription,
|
|
268
|
+
width: labelDescription ? (labelDescription.length * this.DEFAULT_FONT_SIZE - widthColumnDefault) : column.width,
|
|
269
|
+
type: core.DataType.TEXT,
|
|
270
|
+
userInterface: UnitMetadata.UserInterface.LONGTEXT,
|
|
271
|
+
descriptionFrom: fieldData.name
|
|
272
|
+
};
|
|
273
|
+
}
|
|
252
274
|
getWidthByMetaData(maxWidth, widthCod, widthDescription) {
|
|
253
275
|
const totalCurrentWidth = widthCod + widthDescription;
|
|
254
276
|
const codPercentage = widthCod / totalCurrentWidth;
|
|
@@ -310,11 +332,11 @@ class ClientSideExporterProvider extends CommonsExporter {
|
|
|
310
332
|
}
|
|
311
333
|
getHiddenOptions() {
|
|
312
334
|
return [
|
|
313
|
-
index
|
|
314
|
-
index
|
|
315
|
-
index
|
|
316
|
-
index
|
|
317
|
-
index
|
|
335
|
+
index.DataExporterOption.EXPORT_BY_EMAIL,
|
|
336
|
+
index.DataExporterOption.EXPORT_PDF_TO_EMAIL,
|
|
337
|
+
index.DataExporterOption.EXPORT_XLS_TO_EMAIL,
|
|
338
|
+
index.DataExporterOption.EXPORT_PAGE_TO_PDF,
|
|
339
|
+
index.DataExporterOption.EXPORT_PAGE_TO_XLS
|
|
318
340
|
];
|
|
319
341
|
}
|
|
320
342
|
formatValue(record, column) {
|
|
@@ -339,6 +361,56 @@ class ClientSideExporterProvider extends CommonsExporter {
|
|
|
339
361
|
}
|
|
340
362
|
}
|
|
341
363
|
|
|
364
|
+
class TaskbarProcessor {
|
|
365
|
+
constructor(defaultButtons) {
|
|
366
|
+
this._defaultButtons = defaultButtons;
|
|
367
|
+
}
|
|
368
|
+
process(taskbarId, taskbarManager, dataState, disabledButtons = [], invisibleButtons = []) {
|
|
369
|
+
var _a;
|
|
370
|
+
this.customButtons = new Map();
|
|
371
|
+
this.buttons = "";
|
|
372
|
+
this.disabledButtons = [].concat(disabledButtons);
|
|
373
|
+
(_a = this.getButtonsArray(taskbarId, taskbarManager, dataState)) === null || _a === void 0 ? void 0 : _a.forEach(btnDef => {
|
|
374
|
+
let buttonName;
|
|
375
|
+
if (typeof btnDef === "string") {
|
|
376
|
+
buttonName = btnDef;
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
const customBtn = btnDef;
|
|
380
|
+
this.customButtons.set(customBtn.name, customBtn);
|
|
381
|
+
buttonName = customBtn.name;
|
|
382
|
+
}
|
|
383
|
+
if (!invisibleButtons.includes(buttonName)) {
|
|
384
|
+
if (!this.isEnabled(taskbarId, taskbarManager, buttonName, dataState, disabledButtons)) {
|
|
385
|
+
this.disabledButtons.push(buttonName);
|
|
386
|
+
}
|
|
387
|
+
if (this.buttons.length > 0) {
|
|
388
|
+
this.buttons += ",";
|
|
389
|
+
}
|
|
390
|
+
this.buttons += buttonName;
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
getButtonsArray(taskbarId, taskbarManager, dataState) {
|
|
395
|
+
const defaults = this.getButtonsFromKey(taskbarId);
|
|
396
|
+
if (taskbarManager) {
|
|
397
|
+
return taskbarManager.getButtons(taskbarId, dataState, [...defaults]);
|
|
398
|
+
}
|
|
399
|
+
return defaults;
|
|
400
|
+
}
|
|
401
|
+
getButtonsFromKey(taskbarId) {
|
|
402
|
+
const btnsValue = this._defaultButtons[taskbarId];
|
|
403
|
+
return typeof btnsValue === 'function' ? btnsValue() : btnsValue;
|
|
404
|
+
}
|
|
405
|
+
isEnabled(taskbarId, taskbarManager, buttonName, dataState, disabled) {
|
|
406
|
+
const originalValue = disabled.includes(buttonName) ? false : true;
|
|
407
|
+
if (taskbarManager && taskbarManager.isEnabled) {
|
|
408
|
+
return taskbarManager.isEnabled(taskbarId, dataState, buttonName, originalValue);
|
|
409
|
+
}
|
|
410
|
+
return originalValue;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
342
414
|
class SnkMultiSelectionListDataSource {
|
|
343
415
|
setDataUnit(dataUnit) {
|
|
344
416
|
this._dataUnit = dataUnit;
|
|
@@ -379,7 +451,7 @@ class SnkMultiSelectionListDataSource {
|
|
|
379
451
|
|
|
380
452
|
exports.ClientSideExporterProvider = ClientSideExporterProvider;
|
|
381
453
|
exports.CommonsExporter = CommonsExporter;
|
|
382
|
-
exports.ContinuousInsertUtils = ContinuousInsertUtils;
|
|
383
454
|
exports.CrudUtils = CrudUtils;
|
|
384
455
|
exports.RmPrecisionCustomValueFormatter = RmPrecisionCustomValueFormatter;
|
|
385
456
|
exports.SnkMultiSelectionListDataSource = SnkMultiSelectionListDataSource;
|
|
457
|
+
exports.TaskbarProcessor = TaskbarProcessor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const core = require('@sankhyalabs/core');
|
|
4
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
4
|
+
const formConfigFetcher = require('./form-config-fetcher-bbebdcb8.js');
|
|
5
5
|
|
|
6
6
|
class AuthFetcher extends formConfigFetcher.ResourceFetcher {
|
|
7
7
|
getData(resourceID) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
7
7
|
|
|
8
8
|
const configHeaderCss = ".sc-config-header-h{display:flex;padding-top:12px;padding-left:12px;align-items:center;width:100%;justify-content:space-between}.left-group.sc-config-header{display:flex;gap:8px}.right-group.sc-config-header{padding-right:18px;display:flex}";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
5
|
+
*/
|
|
6
|
+
var __assign=function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector="";};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r);}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE;}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return "\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return {start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return {start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t);}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else {if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s);}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value;}));}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0);})),!t)return "break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return [];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t});})),t++;})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o});}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement;}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors);})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return ":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return {original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return !1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t));}));}function reScope(e,t){var r=e.template.map((function(r){return "string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t);}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t);})).observe(document.head,{childList:!0});}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove();}})).catch((function(e){console.error(e);}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1;}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}));}));})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal();}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal();},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e);},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n);}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes);},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document));}("undefined"!=typeof window&&window);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const core = require('@sankhyalabs/core');
|
|
4
|
-
const DataFetcher = require('./DataFetcher-
|
|
4
|
+
const DataFetcher = require('./DataFetcher-d13b4637.js');
|
|
5
5
|
const constants = require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
6
6
|
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -141,6 +141,9 @@ class PreloadManager {
|
|
|
141
141
|
const columnFilters = utils.ColumnFilterManager.getColumnFilters(request.filters, fieldName);
|
|
142
142
|
filterFunction = utils.ColumnFilterManager.getFilterFunction(dataUnit, Array.from(columnFilters.values()));
|
|
143
143
|
}
|
|
144
|
+
if (onlyLabel) {
|
|
145
|
+
return Promise.resolve(this.compileDistinctByLabel(dataUnit, fieldName, filterFunction));
|
|
146
|
+
}
|
|
144
147
|
return new Promise((accept, reject) => {
|
|
145
148
|
PreloadManager.getRepository(dataUnit).distict(record => {
|
|
146
149
|
if (filterFunction != undefined && !filterFunction(record)) {
|
|
@@ -151,9 +154,6 @@ class PreloadManager {
|
|
|
151
154
|
return { key: null, value: null };
|
|
152
155
|
}
|
|
153
156
|
let value = fieldValue.value != undefined ? fieldValue.value : fieldValue;
|
|
154
|
-
if ((fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.label) && onlyLabel) {
|
|
155
|
-
return { key: fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.label, value: dataUnit.getFormattedValue(fieldName, value) };
|
|
156
|
-
}
|
|
157
157
|
return { key: dataUnit.getFormattedValue(fieldName, fieldValue), value };
|
|
158
158
|
})
|
|
159
159
|
.then(result => {
|
|
@@ -166,6 +166,43 @@ class PreloadManager {
|
|
|
166
166
|
.catch(reason => reject(reason));
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
+
static compileDistinctByLabel(dataUnit, fieldName, filterFunction) {
|
|
170
|
+
const groupedOptions = new Map();
|
|
171
|
+
const cachedRecords = PreloadManager.getRepository(dataUnit).getFromCache();
|
|
172
|
+
cachedRecords.forEach(record => {
|
|
173
|
+
if (filterFunction != undefined && !filterFunction(record)) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const fieldValue = record[fieldName];
|
|
177
|
+
if (fieldValue == undefined) {
|
|
178
|
+
const nullKey = '';
|
|
179
|
+
if (!groupedOptions.has(nullKey)) {
|
|
180
|
+
groupedOptions.set(nullKey, {
|
|
181
|
+
values: new Set([null]),
|
|
182
|
+
option: { label: null, value: null, check: true },
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const value = fieldValue.value != undefined ? fieldValue.value : fieldValue;
|
|
188
|
+
const label = (fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.label) ? fieldValue.label : dataUnit.getFormattedValue(fieldName, fieldValue);
|
|
189
|
+
const key = String(label !== null && label !== void 0 ? label : '');
|
|
190
|
+
let grouped = groupedOptions.get(key);
|
|
191
|
+
if (!grouped) {
|
|
192
|
+
grouped = {
|
|
193
|
+
values: new Set(),
|
|
194
|
+
option: { label, value, check: true },
|
|
195
|
+
};
|
|
196
|
+
groupedOptions.set(key, grouped);
|
|
197
|
+
}
|
|
198
|
+
grouped.values.add(value);
|
|
199
|
+
});
|
|
200
|
+
return Array.from(groupedOptions.values()).map(grouped => {
|
|
201
|
+
const option = grouped.option;
|
|
202
|
+
option.__multiValues = Array.from(grouped.values.values());
|
|
203
|
+
return grouped.option;
|
|
204
|
+
});
|
|
205
|
+
}
|
|
169
206
|
static async loadData(dataUnit, request, loadFromServer) {
|
|
170
207
|
try {
|
|
171
208
|
if (PreloadManager.isCacheEnabled(dataUnit)) {
|
|
@@ -241,7 +278,17 @@ class PreloadManager {
|
|
|
241
278
|
});
|
|
242
279
|
}
|
|
243
280
|
static getCachedRecords(dataUnit) {
|
|
244
|
-
|
|
281
|
+
const records = PreloadManager.getRepository(dataUnit).getFromCache();
|
|
282
|
+
const request = dataUnit.getLastLoadRequest();
|
|
283
|
+
if (request == undefined) {
|
|
284
|
+
return records;
|
|
285
|
+
}
|
|
286
|
+
const columnFilters = utils.ColumnFilterManager.getColumnFilters(request.filters, "");
|
|
287
|
+
const filterFunction = utils.ColumnFilterManager.getFilterFunction(dataUnit, Array.from(columnFilters.values()));
|
|
288
|
+
if (filterFunction == undefined) {
|
|
289
|
+
return records;
|
|
290
|
+
}
|
|
291
|
+
return records.filter(filterFunction);
|
|
245
292
|
}
|
|
246
293
|
}
|
|
247
294
|
PreloadManager._repositories = new Map();
|
|
@@ -518,115 +565,27 @@ class DatasetStrategy {
|
|
|
518
565
|
}
|
|
519
566
|
}
|
|
520
567
|
|
|
521
|
-
|
|
522
|
-
return new Promise((resolve) => {
|
|
523
|
-
const messagesBuilder = new DataFetcher.SnkMessageBuilder();
|
|
524
|
-
const { checkboxContainer, checkbox } = buildCheckboxContainer(messagesBuilder);
|
|
525
|
-
const popup = builPopup(resolve, checkbox, messagesBuilder);
|
|
526
|
-
const contentContainer = buildContentContainer();
|
|
527
|
-
const actionsContainer = buildActionsContainer();
|
|
528
|
-
contentContainer.appendChild(checkboxContainer);
|
|
529
|
-
contentContainer.appendChild(buildMessage(messagesBuilder));
|
|
530
|
-
actionsContainer.appendChild(buildContinuePaginationBtn(popup, checkbox, resolve, messagesBuilder));
|
|
531
|
-
actionsContainer.appendChild(buildCancelPaginationBtn(popup, resolve, messagesBuilder));
|
|
532
|
-
contentContainer.appendChild(actionsContainer);
|
|
533
|
-
popup.appendChild(contentContainer);
|
|
534
|
-
document.body.appendChild(popup);
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
function buildCheckboxContainer(messagesBuilder) {
|
|
538
|
-
const checkboxContainer = document.createElement('div');
|
|
539
|
-
checkboxContainer.style.marginBottom = '14px';
|
|
540
|
-
checkboxContainer.style.display = 'flex';
|
|
541
|
-
checkboxContainer.style.alignItems = 'center';
|
|
542
|
-
const { checkbox, checkboxLabel } = buildCheckbox(messagesBuilder);
|
|
543
|
-
checkboxContainer.appendChild(checkbox);
|
|
544
|
-
checkboxContainer.appendChild(checkboxLabel);
|
|
545
|
-
return { checkboxContainer, checkbox };
|
|
546
|
-
}
|
|
547
|
-
function buildCheckbox(messagesBuilder) {
|
|
548
|
-
const checkbox = document.createElement('input');
|
|
549
|
-
checkbox.type = 'checkbox';
|
|
550
|
-
checkbox.id = 'loadAll';
|
|
551
|
-
const checkboxLabel = document.createElement('label');
|
|
552
|
-
checkboxLabel.htmlFor = 'loadAll';
|
|
553
|
-
checkboxLabel.textContent = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.checkbox.loadAll");
|
|
554
|
-
checkboxLabel.style.marginLeft = '5px';
|
|
555
|
-
return { checkbox, checkboxLabel };
|
|
556
|
-
}
|
|
557
|
-
function buildActionsContainer() {
|
|
558
|
-
const actionsContainer = document.createElement('div');
|
|
559
|
-
actionsContainer.style.display = 'flex';
|
|
560
|
-
actionsContainer.style.flexDirection = 'row';
|
|
561
|
-
actionsContainer.style.justifyContent = 'end';
|
|
562
|
-
actionsContainer.style.gap = '5px';
|
|
563
|
-
return actionsContainer;
|
|
564
|
-
}
|
|
565
|
-
function buildContentContainer() {
|
|
566
|
-
const contentContainer = document.createElement('div');
|
|
567
|
-
contentContainer.style.display = 'flex';
|
|
568
|
-
contentContainer.style.flexDirection = 'column';
|
|
569
|
-
contentContainer.style.fontFamily = 'var(--font-pattern, Roboto)';
|
|
570
|
-
contentContainer.style.fontSize = 'var(--text--medium)';
|
|
571
|
-
return contentContainer;
|
|
572
|
-
}
|
|
573
|
-
function buildMessage(messagesBuilder) {
|
|
574
|
-
const message = document.createElement('div');
|
|
575
|
-
const line1 = document.createElement('p');
|
|
576
|
-
const line2 = document.createElement('p');
|
|
577
|
-
const line3 = document.createElement('p');
|
|
578
|
-
line3.style.fontWeight = 'var(--text-weight--large, 600)';
|
|
579
|
-
line1.textContent = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.pagination.line1");
|
|
580
|
-
line2.textContent = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.pagination.line2");
|
|
581
|
-
line3.textContent = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.pagination.line3");
|
|
582
|
-
message.appendChild(line1);
|
|
583
|
-
message.appendChild(line2);
|
|
584
|
-
message.appendChild(line3);
|
|
585
|
-
return message;
|
|
586
|
-
}
|
|
587
|
-
function buildCancelPaginationBtn(popup, resolve, messagesBuilder) {
|
|
588
|
-
const cancelPaginationBtn = document.createElement('ez-button');
|
|
589
|
-
cancelPaginationBtn.label = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.buttons.cancel");
|
|
590
|
-
cancelPaginationBtn.size = 'medium';
|
|
591
|
-
cancelPaginationBtn.classList.add('ez-button--primary');
|
|
592
|
-
cancelPaginationBtn.onclick = () => {
|
|
593
|
-
document.body.removeChild(popup);
|
|
594
|
-
resolve(CancelPaginationResponse.CANCEL);
|
|
595
|
-
};
|
|
596
|
-
return cancelPaginationBtn;
|
|
597
|
-
}
|
|
598
|
-
function buildContinuePaginationBtn(popup, checkBox, resolve, messagesBuilder) {
|
|
599
|
-
const continuePaginationBtn = document.createElement('ez-button');
|
|
600
|
-
continuePaginationBtn.label = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.buttons.continue");
|
|
601
|
-
continuePaginationBtn.size = 'medium';
|
|
602
|
-
continuePaginationBtn.onclick = () => {
|
|
603
|
-
document.body.removeChild(popup);
|
|
604
|
-
resolve(checkBox.checked ? CancelPaginationResponse.LOAD_ALL : CancelPaginationResponse.CONTINUE);
|
|
605
|
-
};
|
|
606
|
-
return continuePaginationBtn;
|
|
607
|
-
}
|
|
608
|
-
function builPopup(resolve, checkBox, messagesBuilder) {
|
|
609
|
-
const popup = document.createElement('ez-popup');
|
|
610
|
-
popup.opened = true;
|
|
611
|
-
popup.size = 'x-small';
|
|
612
|
-
popup.ezTitle = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.pagination.title");
|
|
613
|
-
popup.heightMode = "auto";
|
|
614
|
-
popup.addEventListener('ezClosePopup', () => {
|
|
615
|
-
document.body.removeChild(popup);
|
|
616
|
-
resolve(checkBox.checked ? CancelPaginationResponse.LOAD_ALL : CancelPaginationResponse.CONTINUE);
|
|
617
|
-
}, { once: true });
|
|
618
|
-
popup.addEventListener('ezPopupAction', () => {
|
|
619
|
-
document.body.removeChild(popup);
|
|
620
|
-
resolve(CancelPaginationResponse.CANCEL);
|
|
621
|
-
}, { once: true });
|
|
622
|
-
return popup;
|
|
623
|
-
}
|
|
568
|
+
const ASK_CANCEL_PAGINATION_EVENT = 'ez-grid-pagination:ask-cancel';
|
|
624
569
|
var CancelPaginationResponse;
|
|
625
570
|
(function (CancelPaginationResponse) {
|
|
626
571
|
CancelPaginationResponse["CANCEL"] = "CANCEL";
|
|
627
572
|
CancelPaginationResponse["CONTINUE"] = "CONTINUE";
|
|
628
573
|
CancelPaginationResponse["LOAD_ALL"] = "LOAD_ALL";
|
|
629
574
|
})(CancelPaginationResponse || (CancelPaginationResponse = {}));
|
|
575
|
+
async function showAskCancelPaginationPopup(dataUnit) {
|
|
576
|
+
return new Promise((resolve) => {
|
|
577
|
+
const detail = {
|
|
578
|
+
dataUnitName: dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.name,
|
|
579
|
+
resolve,
|
|
580
|
+
};
|
|
581
|
+
const event = new CustomEvent(ASK_CANCEL_PAGINATION_EVENT, {
|
|
582
|
+
detail,
|
|
583
|
+
bubbles: false,
|
|
584
|
+
composed: false,
|
|
585
|
+
});
|
|
586
|
+
document.dispatchEvent(event);
|
|
587
|
+
});
|
|
588
|
+
}
|
|
630
589
|
|
|
631
590
|
class DataUnitDataLoader {
|
|
632
591
|
constructor() { }
|
|
@@ -691,7 +650,7 @@ class DataUnitDataLoader {
|
|
|
691
650
|
let newLoadingInfo = this.buildNewLoadingInfo(responseLoadingInfo);
|
|
692
651
|
if (this.canProceedPagination(responseLoadingInfo))
|
|
693
652
|
return this.recallLoader(dataUnit, newRequest, newLoadingInfo, dataLoader, result);
|
|
694
|
-
const confirm = await showAskCancelPaginationPopup();
|
|
653
|
+
const confirm = await showAskCancelPaginationPopup(dataUnit);
|
|
695
654
|
if (confirm === CancelPaginationResponse.CANCEL)
|
|
696
655
|
return this.handlePaginationCanceled(dataUnit, result);
|
|
697
656
|
if (confirm === CancelPaginationResponse.LOAD_ALL) {
|
|
@@ -925,7 +884,7 @@ class DataUnitFetcher {
|
|
|
925
884
|
}
|
|
926
885
|
metadata.fields.push(Object.assign(Object.assign({}, source), { properties }));
|
|
927
886
|
});
|
|
928
|
-
metadata.fields.sort((a, b) => a
|
|
887
|
+
metadata.fields.sort((a, b) => this.sortFieldsByGroup(a, b));
|
|
929
888
|
resolve(metadata);
|
|
930
889
|
})
|
|
931
890
|
.catch((error) => {
|
|
@@ -933,6 +892,28 @@ class DataUnitFetcher {
|
|
|
933
892
|
});
|
|
934
893
|
});
|
|
935
894
|
}
|
|
895
|
+
// Os campos devem ser separados em dois grupos: campos da própria entidade e campos que representam ligação com outra entidade.
|
|
896
|
+
// Além do grupo, a ordenação deve respeitar o atributo "order" de cada campo.
|
|
897
|
+
// Para saber se é um campo de relação, verificamos se o nome contém '.' (ex: 'Parceiro.CODPAR').
|
|
898
|
+
sortFieldsByGroup(a, b) {
|
|
899
|
+
const aIsRelation = a.name.includes('.');
|
|
900
|
+
const bIsRelation = b.name.includes('.');
|
|
901
|
+
// Se um é relação e outro não, campos próprios vêm primeiro
|
|
902
|
+
if (aIsRelation !== bIsRelation) {
|
|
903
|
+
return aIsRelation ? 1 : -1;
|
|
904
|
+
}
|
|
905
|
+
// Se ambos são relações, ordena por nome da entidade primeiro
|
|
906
|
+
if (aIsRelation && bIsRelation) {
|
|
907
|
+
const aEntity = a.name.split('.')[0];
|
|
908
|
+
const bEntity = b.name.split('.')[0];
|
|
909
|
+
if (aEntity !== bEntity) {
|
|
910
|
+
return aEntity.localeCompare(bEntity);
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
// Dentro do mesmo grupo (próprios ou mesma entidade de relação), ordena por order
|
|
914
|
+
return a.order - b.order;
|
|
915
|
+
}
|
|
916
|
+
;
|
|
936
917
|
loadSelectDistinct(dataUnit, fieldName, argument) {
|
|
937
918
|
const { parentRecordId, filters } = dataUnit.getLastLoadRequest() || {};
|
|
938
919
|
const filteredFilters = filters.filter(f => f.name !== `${constants.DISTINCT_FILTER_NAME_PREFIX}${fieldName}`);
|