@sankhyalabs/sankhyablocks 10.1.0-dev.4 → 10.1.0-dev.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-b29e31be.js → ConfigStorage-a1fab5ca.js} +19 -2
- package/dist/cjs/ContinuousInsertUtils-1ae0c6ac.js +41 -0
- package/dist/cjs/{DataFetcher-ed9d97ea.js → DataFetcher-384d2ce8.js} +2 -2733
- package/dist/cjs/{FormConfigHelper-ebb77625.js → FormConfigHelper-28fe4668.js} +44 -0
- package/dist/cjs/{ISave-81eb2fbc.js → ISave-ecbe9336.js} +1 -1
- package/dist/cjs/ImageUtils-c46f2d11.js +142 -0
- package/dist/cjs/{PersonalizedFilterUtils-7259cf65.js → PersonalizedFilterUtils-eccb267a.js} +13 -0
- package/dist/cjs/{SnkFormConfigManager-6838389c.js → SnkFormConfigManager-44386305.js} +7 -7
- package/dist/cjs/SnkMessageBuilder-a9300ebe.js +2833 -0
- package/dist/cjs/{SnkMultiSelectionListDataSource-1e804147.js → SnkMultiSelectionListDataSource-b951ed91.js} +61 -47
- package/dist/cjs/{auth-fetcher-cc28d847.js → auth-fetcher-6b134ec4.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-ab1cc071.js → dataunit-fetcher-93f53260.js} +26 -3
- 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 +8 -5
- package/dist/cjs/fields-selector.cjs.entry.js +3 -3
- package/dist/cjs/{form-config-fetcher-f0897eb5.js → form-config-fetcher-45d1964c.js} +19 -1
- package/dist/cjs/guides-configurator.cjs.entry.js +6 -4
- package/dist/cjs/{index-1cf293c1.js → index-1894343a.js} +1529 -177
- 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 -5
- 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 +160 -113
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +29 -9
- package/dist/cjs/snk-attach.cjs.entry.js +53 -26
- package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +351 -108
- 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 +9 -7
- package/dist/cjs/{snk-data-unit-68992932.js → snk-data-unit-6abc5efc.js} +21 -12
- package/dist/cjs/snk-data-unit.cjs.entry.js +5 -4
- package/dist/cjs/snk-default-filter.cjs.entry.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +19 -20
- 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 +2 -2
- package/dist/cjs/{snk-filter-advanced-mode_2.cjs.entry.js → snk-filter-advanced-mode_3.cjs.entry.js} +41 -3
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +147 -94
- 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-detail.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +5 -4
- 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 +34 -10
- package/dist/cjs/snk-grid.cjs.entry.js +63 -30
- package/dist/cjs/{snk-guides-viewer-8b841753.js → snk-guides-viewer-b4ca3437.js} +114 -188
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +11 -18
- package/dist/cjs/snk-image-input.cjs.entry.js +148 -0
- package/dist/cjs/snk-layout-form-config.cjs.entry.js +72 -0
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +8 -7
- package/dist/cjs/snk-pesquisa.cjs.entry.js +6 -6
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +30 -35
- package/dist/cjs/snk-taskbar.cjs.entry.js +237 -168
- package/dist/cjs/{sortable.esm-9a110bb7.js → sortable.esm-b87669ab.js} +76 -90
- package/dist/cjs/taskbar-elements-80eddec8.js +152 -0
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +10 -1
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -3
- 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 +82 -19
- package/dist/collection/components/snk-crud/snk-crud.css +46 -0
- package/dist/collection/components/snk-crud/snk-crud.js +190 -96
- package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js +1 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +5 -5
- 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 +165 -179
- package/dist/collection/components/snk-crud/utils/taskbarUtils.js +144 -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/snk-data-exporter.js +20 -1
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +9 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +13 -9
- 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 +42 -0
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -6
- 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 +6 -3
- 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 +5 -3
- package/dist/collection/components/snk-form-config/snk-form-config.js +53 -6
- package/dist/collection/components/snk-grid/snk-grid.css +24 -3
- package/dist/collection/components/snk-grid/snk-grid.js +170 -18
- 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 +326 -0
- package/dist/collection/components/snk-image-input/utils/ImageUtils.js +133 -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 +35 -23
- 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 +304 -174
- 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/configs/ConfigStorage.js +5 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +24 -2
- 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/snk-crud.msg.js +9 -1
- package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +7 -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/snk-crud.msg.js +9 -1
- package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +7 -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/snk-configurator.msg.js +1 -1
- package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +9 -1
- package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +8 -1
- 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/components/ConfigStorage.js +17 -0
- package/dist/components/ContinuousInsertUtils.js +1 -1
- package/dist/components/DataFetcher.js +3 -2713
- package/dist/components/PersonalizedFilterUtils.js +13 -0
- package/dist/components/SnkFormConfigManager.js +6 -6
- package/dist/components/SnkMessageBuilder.js +2831 -0
- package/dist/components/dataunit-fetcher.js +25 -2
- package/dist/components/field-config2.js +44 -2
- package/dist/components/fields-layout2.js +6 -3
- package/dist/components/form-config-fetcher.js +18 -0
- package/dist/components/guides-configurator2.js +5 -3
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +4 -0
- package/dist/components/index2.js +90 -21
- package/dist/components/snk-actions-button2.js +6 -3
- package/dist/components/snk-application2.js +22 -2
- package/dist/components/snk-attach2.js +59 -29
- package/dist/components/snk-crud.js +435 -174
- 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 +3 -1
- package/dist/components/snk-data-unit2.js +10 -1
- package/dist/components/snk-detail-view2.js +250 -292
- 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 +12 -8
- 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 +29 -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 +103 -59
- 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 +302 -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 +47 -46
- 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 +310 -218
- 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/esm/{ConfigStorage-13d80e36.js → ConfigStorage-76872695.js} +19 -2
- package/dist/esm/ContinuousInsertUtils-bce77dc1.js +39 -0
- package/dist/esm/{DataFetcher-f4ccd9f3.js → DataFetcher-e60f8d53.js} +3 -2713
- package/dist/esm/{FormConfigHelper-4e42f0b6.js → FormConfigHelper-d09669f3.js} +43 -1
- package/dist/esm/{ISave-288fa9df.js → ISave-4929c071.js} +1 -1
- package/dist/esm/ImageUtils-7f3a4149.js +136 -0
- package/dist/esm/{PersonalizedFilterUtils-2db38ff2.js → PersonalizedFilterUtils-d2439a9a.js} +13 -0
- package/dist/esm/{SnkFormConfigManager-3ee2937b.js → SnkFormConfigManager-83f6b22f.js} +7 -7
- package/dist/esm/SnkMessageBuilder-1eb7a1af.js +2831 -0
- package/dist/esm/{SnkMultiSelectionListDataSource-5d3a93f2.js → SnkMultiSelectionListDataSource-7fe25a58.js} +55 -41
- package/dist/esm/{auth-fetcher-59ab0c67.js → auth-fetcher-1a31c1e4.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-c4f9f222.js → dataunit-fetcher-050b6d31.js} +25 -2
- 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 +8 -5
- package/dist/esm/fields-selector.entry.js +3 -3
- package/dist/esm/{form-config-fetcher-6a00fe9e.js → form-config-fetcher-b44b2727.js} +19 -1
- package/dist/esm/guides-configurator.entry.js +6 -4
- package/dist/esm/{index-479e1293.js → index-04f73a26.js} +1521 -177
- 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 -5
- 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 +161 -114
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +28 -8
- package/dist/esm/snk-attach.entry.js +52 -25
- package/dist/esm/snk-client-confirm.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +343 -100
- 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 +9 -7
- package/dist/esm/{snk-data-unit-0edeb967.js → snk-data-unit-ca2c9858.js} +12 -3
- package/dist/esm/snk-data-unit.entry.js +5 -4
- package/dist/esm/snk-default-filter.entry.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +17 -18
- 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 +2 -2
- package/dist/esm/{snk-filter-advanced-mode_2.entry.js → snk-filter-advanced-mode_3.entry.js} +41 -4
- package/dist/esm/snk-filter-bar_4.entry.js +148 -95
- 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-detail.entry.js +3 -3
- package/dist/esm/snk-filter-field-search_2.entry.js +2 -2
- package/dist/esm/snk-filter-modal-item.entry.js +5 -4
- 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 +34 -10
- package/dist/esm/snk-grid.entry.js +60 -27
- package/dist/esm/{snk-guides-viewer-9cd4d20f.js → snk-guides-viewer-cc37535b.js} +115 -189
- package/dist/esm/snk-guides-viewer.entry.js +11 -18
- package/dist/esm/snk-image-input.entry.js +144 -0
- package/dist/esm/snk-layout-form-config.entry.js +68 -0
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-personalized-filter.entry.js +8 -7
- package/dist/esm/snk-pesquisa.entry.js +6 -6
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +28 -33
- package/dist/esm/snk-taskbar.entry.js +238 -169
- package/dist/esm/{sortable.esm-842f85a3.js → sortable.esm-bc277c12.js} +76 -90
- package/dist/esm/taskbar-elements-63651ca7.js +149 -0
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/p-09ba6bd4.js +1 -0
- package/dist/sankhyablocks/{p-7f7fe6c4.entry.js → p-0a160fb5.entry.js} +1 -1
- package/dist/sankhyablocks/p-10f27dc6.entry.js +1 -0
- package/dist/sankhyablocks/{p-162bddae.entry.js → p-175c9576.entry.js} +1 -1
- package/dist/sankhyablocks/p-20af4b6a.entry.js +1 -0
- package/dist/sankhyablocks/p-251aee41.entry.js +11 -0
- package/dist/sankhyablocks/{p-c4fcf1fb.entry.js → p-27e0cd68.entry.js} +1 -1
- package/dist/sankhyablocks/p-2af815bb.entry.js +1 -0
- package/dist/sankhyablocks/p-2af8aca3.js +1 -0
- package/dist/sankhyablocks/p-2b3c284c.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-3072136e.js +1 -0
- package/dist/sankhyablocks/p-33492640.entry.js +1 -0
- package/dist/sankhyablocks/p-35317d9a.entry.js +1 -0
- package/dist/sankhyablocks/{p-1c2971e4.js → p-3704bf1b.js} +1 -1
- package/dist/sankhyablocks/p-3870748a.js +28 -0
- package/dist/sankhyablocks/p-3a35917e.entry.js +1 -0
- package/dist/sankhyablocks/{p-78ff8734.js → p-3c990841.js} +2 -2
- package/dist/sankhyablocks/p-420b39b5.js +1 -0
- package/dist/sankhyablocks/{p-49ddc27a.entry.js → p-438a225f.entry.js} +1 -1
- package/dist/sankhyablocks/p-46f75667.entry.js +1 -0
- package/dist/sankhyablocks/{p-53599b26.js → p-4f7adf97.js} +2 -2
- package/dist/sankhyablocks/p-554c0e54.js +1 -0
- package/dist/sankhyablocks/{p-27482793.entry.js → p-5aae5c74.entry.js} +1 -1
- package/dist/sankhyablocks/p-68c1a093.js +1 -0
- package/dist/sankhyablocks/p-6ae7543b.entry.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-771b137e.js +1 -0
- package/dist/sankhyablocks/p-77f608bc.entry.js +1 -0
- package/dist/sankhyablocks/p-7c8bf699.entry.js +1 -0
- package/dist/sankhyablocks/p-855ccf64.entry.js +1 -0
- package/dist/sankhyablocks/p-8a8900a9.entry.js +1 -0
- package/dist/sankhyablocks/p-8b4d6719.js +1 -0
- package/dist/sankhyablocks/{p-3d41f5a8.entry.js → p-8d946600.entry.js} +1 -1
- package/dist/sankhyablocks/{p-96d45943.entry.js → p-90ae6c2e.entry.js} +1 -1
- package/dist/sankhyablocks/p-95af0bb1.entry.js +1 -0
- package/dist/sankhyablocks/{p-7b3ca294.entry.js → p-9742ea0e.entry.js} +1 -1
- package/dist/sankhyablocks/p-98241c21.entry.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-a2a9f520.entry.js +1 -0
- package/dist/sankhyablocks/p-a46ac091.js +1 -0
- package/dist/sankhyablocks/p-a73b6b00.js +1 -0
- package/dist/sankhyablocks/p-ab12f544.entry.js +1 -0
- package/dist/sankhyablocks/p-ab5e12fa.js +1 -0
- package/dist/sankhyablocks/p-ac384a1e.entry.js +1 -0
- package/dist/sankhyablocks/{p-180716b2.entry.js → p-ae326d06.entry.js} +1 -1
- package/dist/sankhyablocks/p-aff2d081.entry.js +1 -0
- package/dist/sankhyablocks/p-b3b51693.entry.js +1 -0
- package/dist/sankhyablocks/p-b555ce38.entry.js +1 -0
- package/dist/sankhyablocks/p-bab4cde4.entry.js +1 -0
- package/dist/sankhyablocks/p-c3ec6642.js +19 -0
- package/dist/sankhyablocks/p-cbb8e351.js +7 -0
- package/dist/sankhyablocks/{p-c3dbf441.entry.js → p-cc64239c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-471b34f4.entry.js → p-cd00a3d1.entry.js} +1 -1
- package/dist/sankhyablocks/p-ce3b284c.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-d972a9c1.js +60 -0
- 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-ee56dda6.entry.js +1 -0
- package/dist/sankhyablocks/p-ef9343c3.entry.js +1 -0
- package/dist/sankhyablocks/p-efd18bc2.entry.js +1 -0
- package/dist/sankhyablocks/{p-667cab42.entry.js → p-f152ef98.entry.js} +1 -1
- package/dist/sankhyablocks/p-f185d5ad.js +1 -0
- 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/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 +20 -4
- package/dist/types/components/snk-crud/snk-crud.d.ts +37 -9
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
- 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 +28 -18
- 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/snk-data-exporter.d.ts +4 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +1 -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 +6 -1
- package/dist/types/components/snk-form-config/SnkFormConfigManager.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 +9 -2
- package/dist/types/components/snk-grid/snk-grid.d.ts +29 -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 +56 -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 +37 -23
- package/dist/types/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.d.ts +3 -0
- package/dist/types/components.d.ts +377 -5
- package/dist/types/lib/configs/ConfigStorage.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/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 +6 -7
- package/react/components.d.ts +4 -0
- package/react/components.js +4 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +0 -45
- package/dist/cjs/taskbar-elements-fb5d1e08.js +0 -132
- package/dist/cjs/taskbar-processor-2fba34a8.js +0 -53
- package/dist/esm/snk-simple-bar.entry.js +0 -41
- package/dist/esm/taskbar-elements-faaf5d8f.js +0 -129
- package/dist/esm/taskbar-processor-3436124c.js +0 -51
- package/dist/sankhyablocks/p-093f58fa.entry.js +0 -1
- package/dist/sankhyablocks/p-0e279e7a.js +0 -1
- package/dist/sankhyablocks/p-11346b8d.entry.js +0 -1
- package/dist/sankhyablocks/p-1858c023.entry.js +0 -1
- package/dist/sankhyablocks/p-1a0caadb.js +0 -1
- package/dist/sankhyablocks/p-21107f0d.entry.js +0 -1
- package/dist/sankhyablocks/p-26e0f63c.entry.js +0 -1
- package/dist/sankhyablocks/p-34df7eca.entry.js +0 -1
- package/dist/sankhyablocks/p-34f447ba.entry.js +0 -1
- package/dist/sankhyablocks/p-38e56b68.entry.js +0 -1
- package/dist/sankhyablocks/p-3abeeefa.entry.js +0 -1
- package/dist/sankhyablocks/p-3d021bef.entry.js +0 -1
- package/dist/sankhyablocks/p-3ed04f0d.entry.js +0 -1
- package/dist/sankhyablocks/p-44939a0e.entry.js +0 -1
- package/dist/sankhyablocks/p-51833248.js +0 -7
- package/dist/sankhyablocks/p-5304753a.js +0 -60
- package/dist/sankhyablocks/p-557368df.entry.js +0 -1
- package/dist/sankhyablocks/p-55798617.js +0 -1
- package/dist/sankhyablocks/p-583151c5.entry.js +0 -1
- package/dist/sankhyablocks/p-60dd1d27.entry.js +0 -1
- package/dist/sankhyablocks/p-6180de07.entry.js +0 -1
- package/dist/sankhyablocks/p-80014119.entry.js +0 -1
- package/dist/sankhyablocks/p-8f73da95.js +0 -1
- package/dist/sankhyablocks/p-91a9abb6.entry.js +0 -1
- package/dist/sankhyablocks/p-9317942f.js +0 -26
- package/dist/sankhyablocks/p-988afe78.js +0 -1
- package/dist/sankhyablocks/p-a2ed1ebd.entry.js +0 -1
- package/dist/sankhyablocks/p-a5108625.entry.js +0 -1
- package/dist/sankhyablocks/p-a644a956.js +0 -1
- package/dist/sankhyablocks/p-ae108ffd.entry.js +0 -11
- package/dist/sankhyablocks/p-b4322b87.entry.js +0 -1
- package/dist/sankhyablocks/p-b7e891cc.entry.js +0 -1
- package/dist/sankhyablocks/p-b987e15d.js +0 -1
- package/dist/sankhyablocks/p-bb2f5f38.js +0 -1
- package/dist/sankhyablocks/p-d8d8169b.js +0 -2
- package/dist/sankhyablocks/p-d9c54991.js +0 -1
- package/dist/sankhyablocks/p-dc851b6e.entry.js +0 -1
- package/dist/sankhyablocks/p-e9021f79.entry.js +0 -1
- package/dist/sankhyablocks/p-f15478a1.js +0 -1
- package/dist/sankhyablocks/p-f8f29e1a.entry.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e="sankhyablocks",t={allRenderFn:!0,appendChildSlotFix:!1,asyncLoading:!0,asyncQueue:!1,attachStyles:!0,cloneNodeFix:!1,cmpDidLoad:!0,cmpDidRender:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpShouldUpdate:!0,cmpWillLoad:!0,cmpWillRender:!0,cmpWillUpdate:!0,connectedCallback:!0,constructableCSS:!0,cssAnnotations:!0,cssVarShim:!1,devTools:!1,disconnectedCallback:!0,dynamicImportShim:!1,element:!1,event:!0,hasRenderFn:!0,hostListener:!0,hostListenerTarget:!0,hostListenerTargetBody:!0,hostListenerTargetDocument:!1,hostListenerTargetParent:!1,hostListenerTargetWindow:!0,hotModuleReplacement:!1,hydrateClientSide:!1,hydrateServerSide:!1,hydratedAttribute:!1,hydratedClass:!0,initializeNextTick:!1,invisiblePrehydration:!1,isDebug:!1,isDev:!1,isTesting:!1,lazyLoad:!0,lifecycle:!0,lifecycleDOMEvents:!1,member:!0,method:!0,mode:!1,observeAttribute:!0,profile:!1,prop:!0,propBoolean:!0,propMutable:!0,propNumber:!0,propString:!0,reflect:!0,safari10:!1,scoped:!0,scopedSlotTextContentFix:!1,scriptDataOpts:!1,shadowDelegatesFocus:!1,shadowDom:!0,shadowDomShim:!1,slot:!0,slotChildNodesFix:!1,slotRelocation:!0,state:!0,style:!0,svg:!1,taskQueue:!0,transformTagName:!1,updatable:!0,vdomAttribute:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomPropOrAttr:!0,vdomRef:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,vdomXlink:!0,watchCallback:!0};let n,o,s,l,r=0,i=!1,c=!1,a=!1,d=!1,u=null,f=0,p=!1;const m={isDev:!!t.isDev,isBrowser:!0,isServer:!1,isTesting:!!t.isTesting},h={},$=e=>{const t=new URL(e,ht.t);return t.origin!==ut.location.origin?t.href:t.pathname},y=(e,n="")=>{if(t.profile&&performance.mark){const t=`st:${e}:${n}:${r++}`;return performance.mark(t),()=>performance.measure(`[Stencil] ${e}() <${n}>`,t)}return()=>{}},b="s-id",v="sty-id",g="c-id",w="http://www.w3.org/1999/xlink",C={},S=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,o;return null!==(o=null===(n=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===n?void 0:n.getAttribute("content"))&&void 0!==o?o:void 0}const x=(e,n,...o)=>{let s=null,l=null,r=null,i=!1,c=!1;const a=[],d=n=>{for(let o=0;o<n.length;o++)s=n[o],Array.isArray(s)?d(s):null!=s&&"boolean"!=typeof s&&((i="function"!=typeof e&&!S(s))?s+="":t.isDev&&"function"!=typeof e&&void 0===s.o&&st("vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects."),i&&c?a[a.length-1].l+=s:a.push(i?T(null,s):s),c=i)};if(d(o),n&&(t.isDev&&"input"===e&&D(n),t.vdomKey&&n.key&&(l=n.key),t.slotRelocation&&n.name&&(r=n.name),t.vdomClass)){const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}if(t.isDev&&a.some(R)&&st("The <Host> must be the single root component. Make sure:\n- You are NOT using hostData() and <Host> in the same component.\n- <Host> is used once, and it's the single root component of the render() function."),t.vdomFunctional&&"function"==typeof e)return e(null===n?{}:n,a,j);const u=T(e,null);return u.i=n,a.length>0&&(u.u=a),t.vdomKey&&(u.p=l),t.slotRelocation&&(u.m=r),u},T=(e,n)=>{const o={o:0,$:e,l:n,v:null,u:null};return t.vdomAttribute&&(o.i=null),t.vdomKey&&(o.p=null),t.slotRelocation&&(o.m=null),o},L={},R=e=>e&&e.$===L,j={forEach:(e,t)=>e.map(E).forEach(t),map:(e,t)=>e.map(E).map(t).map(O)},E=e=>({vattrs:e.i,vchildren:e.u,vkey:e.p,vname:e.m,vtag:e.$,vtext:e.l}),O=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),x(e.vtag,t,...e.vchildren||[])}const t=T(e.vtag,e.vtext);return t.i=e.vattrs,t.u=e.vchildren,t.p=e.vkey,t.m=e.vname,t},D=e=>{const t=Object.keys(e),n=t.indexOf("value");if(-1===n)return;const o=t.indexOf("type"),s=t.indexOf("min"),l=t.indexOf("max"),r=t.indexOf("step");(n<o||n<s||n<l||n<r)&<('The "value" prop of <input> should be set after "min", "max", "type" and "step"')},M=(e,n,o,s,l,r,i)=>{let c,a,d,u;if(1===r.nodeType){for(c=r.getAttribute(g),c&&(a=c.split("."),a[0]!==i&&"0"!==a[0]||(d={o:0,g:a[0],C:a[1],S:a[2],k:a[3],$:r.tagName.toLowerCase(),v:r,i:null,u:null,p:null,m:null,l:null},n.push(d),r.removeAttribute(g),e.u||(e.u=[]),e.u[d.k]=d,e=d,s&&"0"===d.S&&(s[d.k]=d.v))),u=r.childNodes.length-1;u>=0;u--)M(e,n,o,s,l,r.childNodes[u],i);if(r.shadowRoot)for(u=r.shadowRoot.childNodes.length-1;u>=0;u--)M(e,n,o,s,l,r.shadowRoot.childNodes[u],i)}else if(8===r.nodeType)a=r.nodeValue.split("."),a[1]!==i&&"0"!==a[1]||(c=a[0],d={o:0,g:a[1],C:a[2],S:a[3],k:a[4],v:r,i:null,u:null,p:null,m:null,$:null,l:null},"t"===c?(d.v=r.nextSibling,d.v&&3===d.v.nodeType&&(d.l=d.v.textContent,n.push(d),r.remove(),e.u||(e.u=[]),e.u[d.k]=d,s&&"0"===d.S&&(s[d.k]=d.v))):d.g===i&&("s"===c?(d.$="slot",r["s-sn"]=a[5]?d.m=a[5]:"",r["s-sr"]=!0,t.shadowDom&&s&&(d.v=pt.createElement(d.$),d.m&&d.v.setAttribute("name",d.m),r.parentNode.insertBefore(d.v,r),r.remove(),"0"===d.S&&(s[d.k]=d.v)),o.push(d),e.u||(e.u=[]),e.u[d.k]=d):"r"===c&&(t.shadowDom&&s?r.remove():t.slotRelocation&&(l["s-cr"]=r,r["s-cn"]=!0))));else if(e&&"style"===e.$){const t=T(null,r.textContent);t.v=r,t.k="0",e.u=[t]}},N=(e,t)=>{if(1===e.nodeType){let n=0;for(;n<e.childNodes.length;n++)N(e.childNodes[n],t);if(e.shadowRoot)for(n=0;n<e.shadowRoot.childNodes.length;n++)N(e.shadowRoot.childNodes[n],t)}else if(8===e.nodeType){const n=e.nodeValue.split(".");"o"===n[0]&&(t.set(n[1]+"."+n[2],e),e.nodeValue="",e["s-en"]=n[3])}},P=e=>dt.map((t=>t(e))).find((e=>!!e)),I=(e,n)=>null==e||S(e)?e:t.propBoolean&&4&n?"false"!==e&&(""===e||!!e):t.propNumber&&2&n?parseFloat(e):t.propString&&1&n?e+"":e,U=e=>t.lazyLoad?Ge(e).T:e,H=(e,n,o)=>{const s=U(e);return{emit:e=>(t.isDev&&!s.isConnected&<(`The "${n}" event was emitted, but the dispatcher node is no longer connected to the dom.`),F(s,n,{bubbles:!!(4&o),composed:!!(2&o),cancelable:!!(1&o),detail:e}))}},F=(e,t,n)=>{const o=ht.ce(t,n);return e.dispatchEvent(o),o},W=new WeakMap,A=(e,t,n)=>{let o=at.get(e);bt&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,at.set(e,o)},_=(e,n,o)=>{var s;let l=z(n,o);const r=at.get(l);if(!t.attachStyles)return l;if(e=11===e.nodeType?e:pt,r)if("string"==typeof r){let n,o=W.get(e=e.head||e);if(o||W.set(e,o=new Set),!o.has(l)){if(t.hydrateClientSide&&e.host&&(n=e.querySelector(`[${v}="${l}"]`)))n.innerHTML=r;else{n=pt.createElement("style"),n.innerHTML=r;const o=null!==(s=ht.L)&&void 0!==s?s:k(pt);null!=o&&n.setAttribute("nonce",o),(t.hydrateServerSide||t.hotModuleReplacement)&&n.setAttribute(v,l),e.insertBefore(n,e.querySelector("link"))}o&&o.add(l)}}else t.constructableCSS&&!e.adoptedStyleSheets.includes(r)&&(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]);return l},V=e=>{const n=e.R,o=e.T,s=n.o,l=y("attachStyles",n.j),r=_(t.shadowDom&&$t&&o.shadowRoot?o.shadowRoot:o.getRootNode(),n,e.O);(t.shadowDom||t.scoped)&&t.cssAnnotations&&10&s&&(o["s-sc"]=r,o.classList.add(r+"-h"),t.scoped&&2&s&&o.classList.add(r+"-s")),l()},z=(e,n)=>"sc-"+(t.mode&&n&&32&e.o?e.j+"-"+n:e.j),B=e=>e.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),X=(e,n,o,s,l,r)=>{if(o!==s){let i=tt(e,n),c=n.toLowerCase();if(t.vdomClass&&"class"===n){const t=e.classList,n=J(o),l=J(s);t.remove(...n.filter((e=>e&&!l.includes(e)))),t.add(...l.filter((e=>e&&!n.includes(e))))}else if(t.vdomStyle&&"style"===n){if(t.updatable)for(const n in o)s&&null!=s[n]||(!t.hydrateServerSide&&n.includes("-")?e.style.removeProperty(n):e.style[n]="");for(const n in s)o&&s[n]===o[n]||(!t.hydrateServerSide&&n.includes("-")?e.style.setProperty(n,s[n]):e.style[n]=s[n])}else if(t.vdomKey&&"key"===n);else if(t.vdomRef&&"ref"===n)s&&s(e);else if(!t.vdomListener||(t.lazyLoad?i:e.__lookupSetter__(n))||"o"!==n[0]||"n"!==n[1]){if(t.vdomPropOrAttr){const a=S(s);if((i||a&&null!==s)&&!l)try{if(e.tagName.includes("-"))e[n]=s;else{const t=null==s?"":s;"list"===n?i=!1:null!=o&&e[n]==t||(e[n]=t)}}catch(e){}let d=!1;t.vdomXlink&&c!==(c=c.replace(/^xlink\:?/,""))&&(n=c,d=!0),null==s||!1===s?!1===s&&""!==e.getAttribute(n)||(t.vdomXlink&&d?e.removeAttributeNS(w,n):e.removeAttribute(n)):(!i||4&r||l)&&!a&&(s=!0===s?"":s,t.vdomXlink&&d?e.setAttributeNS(w,n,s):e.setAttribute(n,s))}}else n="-"===n[2]?n.slice(3):tt(ut,c)?c.slice(2):c[2]+n.slice(3),o&&ht.rel(e,n,o,!1),s&&ht.ael(e,n,s,!1)}},q=/\s/,J=e=>e?e.split(q):[],Q=(e,n,o,s)=>{const l=11===n.v.nodeType&&n.v.host?n.v.host:n.v,r=e&&e.i||C,i=n.i||C;if(t.updatable)for(s in r)s in i||X(l,s,r[s],void 0,o,n.o);for(s in i)X(l,s,r[s],i[s],o,n.o)},Y=(e,l,r,c)=>{const u=l.u[r];let f,p,m,h=0;if(t.slotRelocation&&!i&&(a=!0,"slot"===u.$&&(n&&c.classList.add(n+"-s"),u.o|=u.u?2:1)),t.isDev&&u.v&&st(`The JSX ${null!==u.l?`"${u.l}" text`:`"${u.$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`),t.vdomText&&null!==u.l)f=u.v=pt.createTextNode(u.l);else if(t.slotRelocation&&1&u.o)f=u.v=t.isDebug||t.hydrateServerSide?de(u):pt.createTextNode("");else{if(t.svg&&!d&&(d="svg"===u.$),f=u.v=t.svg?pt.createElementNS(d?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",t.slotRelocation&&2&u.o?"slot-fb":u.$):pt.createElement(t.slotRelocation&&2&u.o?"slot-fb":u.$),t.svg&&d&&"foreignObject"===u.$&&(d=!1),t.vdomAttribute&&Q(null,u,d),(t.shadowDom||t.scoped)&&null!=n&&f["s-si"]!==n&&f.classList.add(f["s-si"]=n),u.u)for(h=0;h<u.u.length;++h)p=Y(e,u,h,f),p&&f.appendChild(p);t.svg&&("svg"===u.$?d=!1:"foreignObject"===f.tagName&&(d=!0))}return t.slotRelocation&&(f["s-hn"]=s,3&u.o&&(f["s-sr"]=!0,f["s-cr"]=o,f["s-sn"]=u.m||"",m=e&&e.u&&e.u[r],m&&m.$===u.$&&e.v&&K(e.v,!1))),f},K=(e,t)=>{ht.o|=1;const n=e.childNodes;for(let e=n.length-1;e>=0;e--){const o=n[e];o["s-hn"]!==s&&o["s-ol"]&&(ne(o).insertBefore(o,te(o)),o["s-ol"].remove(),o["s-ol"]=void 0,a=!0),t&&K(o,t)}ht.o&=-2},G=(e,n,o,l,r,i)=>{let c,a=t.slotRelocation&&e["s-cr"]&&e["s-cr"].parentNode||e;for(t.shadowDom&&a.shadowRoot&&a.tagName===s&&(a=a.shadowRoot);r<=i;++r)l[r]&&(c=Y(null,o,r,e),c&&(l[r].v=c,a.insertBefore(c,t.slotRelocation?te(n):n)))},Z=(e,n,o,s,l)=>{for(;n<=o;++n)(s=e[n])&&(l=s.v,ce(s),t.slotRelocation&&(c=!0,l["s-ol"]?l["s-ol"].remove():K(l,!0)),l.remove())},ee=(e,n)=>e.$===n.$&&(t.slotRelocation&&"slot"===e.$?e.m===n.m:!t.vdomKey||e.p===n.p),te=e=>e&&e["s-ol"]||e,ne=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,oe=(e,n)=>{const o=n.v=e.v,s=e.u,l=n.u,r=n.$,i=n.l;let c;t.vdomText&&null!==i?t.vdomText&&t.slotRelocation&&(c=o["s-cr"])?c.parentNode.textContent=i:t.vdomText&&e.l!==i&&(o.data=i):(t.svg&&(d="svg"===r||"foreignObject"!==r&&d),(t.vdomAttribute||t.reflect)&&(t.slot&&"slot"===r||Q(e,n,d)),t.updatable&&null!==s&&null!==l?((e,n,o,s)=>{let l,r,i=0,c=0,a=0,d=0,u=n.length-1,f=n[0],p=n[u],m=s.length-1,h=s[0],$=s[m];for(;i<=u&&c<=m;)if(null==f)f=n[++i];else if(null==p)p=n[--u];else if(null==h)h=s[++c];else if(null==$)$=s[--m];else if(ee(f,h))oe(f,h),f=n[++i],h=s[++c];else if(ee(p,$))oe(p,$),p=n[--u],$=s[--m];else if(ee(f,$))!t.slotRelocation||"slot"!==f.$&&"slot"!==$.$||K(f.v.parentNode,!1),oe(f,$),e.insertBefore(f.v,p.v.nextSibling),f=n[++i],$=s[--m];else if(ee(p,h))!t.slotRelocation||"slot"!==f.$&&"slot"!==$.$||K(p.v.parentNode,!1),oe(p,h),e.insertBefore(p.v,f.v),p=n[--u],h=s[++c];else{if(a=-1,t.vdomKey)for(d=i;d<=u;++d)if(n[d]&&null!==n[d].p&&n[d].p===h.p){a=d;break}t.vdomKey&&a>=0?(r=n[a],r.$!==h.$?l=Y(n&&n[c],o,a,e):(oe(r,h),n[a]=void 0,l=r.v),h=s[++c]):(l=Y(n&&n[c],o,c,e),h=s[++c]),l&&(t.slotRelocation?ne(f.v).insertBefore(l,te(f.v)):f.v.parentNode.insertBefore(l,f.v))}i>u?G(e,null==s[m+1]?null:s[m+1].v,o,s,c,m):t.updatable&&c>m&&Z(n,i,u)})(o,s,n,l):null!==l?(t.updatable&&t.vdomText&&null!==e.l&&(o.textContent=""),G(o,null,n,l,0,l.length-1)):t.updatable&&null!==s&&Z(s,0,s.length-1),t.svg&&d&&"svg"===r&&(d=!1))},se=e=>{const t=e.childNodes;let n,o,s,l,r,i;for(o=0,s=t.length;o<s;o++)if(n=t[o],1===n.nodeType){if(n["s-sr"])for(r=n["s-sn"],n.hidden=!1,l=0;l<s;l++)if(i=t[l].nodeType,t[l]["s-hn"]!==n["s-hn"]||""!==r){if(1===i&&r===t[l].getAttribute("slot")){n.hidden=!0;break}}else if(1===i||3===i&&""!==t[l].textContent.trim()){n.hidden=!0;break}se(n)}},le=[],re=e=>{let t,n,o,s,l,r,i=0;const a=e.childNodes,d=a.length;for(;i<d;i++){if(t=a[i],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(o=n.parentNode.childNodes,s=t["s-sn"],r=o.length-1;r>=0;r--)n=o[r],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(ie(n,s)?(l=le.find((e=>e.D===n)),c=!0,n["s-sn"]=n["s-sn"]||s,l?l.M=t:le.push({M:t,D:n}),n["s-sr"]&&le.map((e=>{ie(e.D,n["s-sn"])&&(l=le.find((e=>e.D===n)),l&&!e.M&&(e.M=l.M))}))):le.some((e=>e.D===n))||le.push({D:n}));1===t.nodeType&&re(t)}},ie=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,ce=e=>{t.vdomRef&&(e.i&&e.i.ref&&e.i.ref(null),e.u&&e.u.map(ce))},ae=(e,l)=>{const r=e.T,d=e.R,u=e.N||T(null,null),f=R(l)?l:x(null,null,l);if(s=r.tagName,t.isDev&&Array.isArray(l)&&l.some(R))throw Error(`The <Host> must be the single root component.\nLooks like the render() function of "${s.toLowerCase()}" is returning an array that contains the <Host>.\n\nThe render() function should look like this instead:\n\nrender() {\n // Do not return an array\n return (\n <Host>{content}</Host>\n );\n}\n `);if(t.reflect&&d.P&&(f.i=f.i||{},d.P.map((([e,t])=>f.i[t]=r[e]))),f.$=null,f.o|=4,e.N=f,f.v=u.v=t.shadowDom&&r.shadowRoot||r,(t.scoped||t.shadowDom)&&(n=r["s-sc"]),t.slotRelocation&&(o=r["s-cr"],i=$t&&0!=(1&d.o),c=!1),oe(u,f),t.slotRelocation){if(ht.o|=1,a){let e,n,o,s,l,r;re(f.v);let i=0;for(;i<le.length;i++)e=le[i],n=e.D,n["s-ol"]||(o=t.isDebug||t.hydrateServerSide?ue(n):pt.createTextNode(""),o["s-nr"]=n,n.parentNode.insertBefore(n["s-ol"]=o,n));for(i=0;i<le.length;i++)if(e=le[i],n=e.D,e.M){for(s=e.M.parentNode,l=e.M.nextSibling,o=n["s-ol"];o=o.previousSibling;)if(r=o["s-nr"],r&&r["s-sn"]===n["s-sn"]&&s===r.parentNode&&(r=r.nextSibling,!r||!r["s-nr"])){l=r;break}(!l&&s!==n.parentNode||n.nextSibling!==l)&&n!==l&&(!n["s-hn"]&&n["s-ol"]&&(n["s-hn"]=n["s-ol"].parentNode.nodeName),s.insertBefore(n,l))}else 1===n.nodeType&&(n.hidden=!0)}c&&se(f.v),ht.o&=-2,le.length=0}},de=e=>pt.createComment(`<slot${e.m?' name="'+e.m+'"':""}> (host=${s.toLowerCase()})`),ue=e=>pt.createComment("org-location for "+(e.localName?`<${e.localName}> (host=${e["s-hn"]})`:`[${e.textContent}]`)),fe=(e,n)=>{t.asyncLoading&&n&&!e.I&&n["s-p"]&&n["s-p"].push(new Promise((t=>e.I=t)))},pe=(e,n)=>{if(t.taskQueue&&t.updatable&&(e.o|=16),t.asyncLoading&&4&e.o)return void(e.o|=512);fe(e,e.U);const o=()=>me(e,n);return t.taskQueue?Rt(o):o()},me=(e,n)=>{const o=e.T,s=y("scheduleUpdate",e.R.j),l=t.lazyLoad?e.F:o;let r;return n?(t.lazyLoad&&t.hostListener&&(e.o|=256,e.W&&(e.W.map((([e,t])=>ge(l,e,t))),e.W=null)),Ce(o,"componentWillLoad"),t.cmpWillLoad&&(r=ge(l,"componentWillLoad"))):(Ce(o,"componentWillUpdate"),t.cmpWillUpdate&&(r=ge(l,"componentWillUpdate"))),Ce(o,"componentWillRender"),t.cmpWillRender&&(r=we(r,(()=>ge(l,"componentWillRender")))),s(),we(r,(()=>he(e,l,n)))},he=async(e,n,o)=>{const s=e.T,l=y("update",e.R.j),r=s["s-rc"];t.style&&o&&V(e);const i=y("render",e.R.j);if(t.isDev&&(e.o|=1024),t.hydrateServerSide?await $e(e,n,s):$e(e,n,s),t.isDev&&(e.A++,e.o&=-1025),t.hydrateServerSide)try{ke(s),o&&(1&e.R.o?s["s-en"]="":2&e.R.o&&(s["s-en"]="c"))}catch(e){nt(e,s)}if(t.asyncLoading&&r&&(r.map((e=>e())),s["s-rc"]=void 0),i(),l(),t.asyncLoading){const t=s["s-p"],n=()=>ye(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}else ye(e)},$e=(e,n,o)=>{const s=!!t.allRenderFn,l=!!t.lazyLoad,r=!!t.taskQueue,i=!!t.updatable;try{if(u=n,n=(s||n.render)&&n.render(),i&&r&&(e.o&=-17),(i||l)&&(e.o|=2),t.hasRenderFn||t.reflect)if(t.vdomRender||t.reflect){if(t.hydrateServerSide)return Promise.resolve(n).then((t=>ae(e,t)));ae(e,n)}else o.textContent=n}catch(t){nt(t,e.T)}return u=null,null},ye=e=>{const n=e.R.j,o=e.T,s=y("postUpdate",n),l=t.lazyLoad?e.F:o,r=e.U;t.cmpDidRender&&(t.isDev&&(e.o|=1024),ge(l,"componentDidRender"),t.isDev&&(e.o&=-1025)),Ce(o,"componentDidRender"),64&e.o?(t.cmpDidUpdate&&(t.isDev&&(e.o|=1024),ge(l,"componentDidUpdate"),t.isDev&&(e.o&=-1025)),Ce(o,"componentDidUpdate"),s()):(e.o|=64,t.asyncLoading&&t.cssAnnotations&&Se(o),t.cmpDidLoad&&(t.isDev&&(e.o|=2048),ge(l,"componentDidLoad"),t.isDev&&(e.o&=-2049)),Ce(o,"componentDidLoad"),s(),t.asyncLoading&&(e._(o),r||ve(n))),t.hotModuleReplacement&&o["s-hmr-load"]&&o["s-hmr-load"](),t.method&&t.lazyLoad&&e.V(o),t.asyncLoading&&(e.I&&(e.I(),e.I=void 0),512&e.o&&Tt((()=>pe(e,!1))),e.o&=-517)},be=e=>{if(t.updatable){const t=Ge(e),n=t.T.isConnected;return n&&2==(18&t.o)&&pe(t,!1),n}return!1},ve=n=>{t.cssAnnotations&&Se(pt.documentElement),t.asyncQueue&&(ht.o|=2),Tt((()=>F(ut,"appload",{detail:{namespace:e}}))),t.profile&&performance.measure&&performance.measure(`[Stencil] ${e} initial load (by ${n})`,"st:app:start")},ge=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){nt(e)}},we=(e,t)=>e&&e.then?e.then(t):t(),Ce=(n,o)=>{t.lifecycleDOMEvents&&F(n,"stencil_"+o,{bubbles:!0,composed:!0,detail:{namespace:e}})},Se=e=>t.hydratedClass?e.classList.add("hydrated"):t.hydratedAttribute?e.setAttribute("hydrated",""):void 0,ke=e=>{const t=e.children;if(null!=t)for(let e=0,n=t.length;e<n;e++){const n=t[e];"function"==typeof n.connectedCallback&&n.connectedCallback(),ke(n)}},xe=(e,t)=>Ge(e).B.get(t),Te=(e,n,o,s)=>{const l=Ge(e),r=t.lazyLoad?l.T:e,i=l.B.get(n),c=l.o,a=t.lazyLoad?l.F:r;if(o=I(o,s.X[n][0]),(!t.lazyLoad||!(8&c)||void 0===i)&&o!==i&&(!Number.isNaN(i)||!Number.isNaN(o))&&(l.B.set(n,o),t.isDev&&(1024&l.o?lt(`The state/prop "${n}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,"\nElement",r,"\nNew value",o,"\nOld value",i):2048&l.o&<(`The state/prop "${n}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`,"\nElement",r,"\nNew value",o,"\nOld value",i)),!t.lazyLoad||a)){if(t.watchCallback&&s.q&&128&c){const e=s.q[n];e&&e.map((e=>{try{a[e](o,i,n)}catch(e){nt(e,r)}}))}if(t.updatable&&2==(18&c)){if(t.cmpShouldUpdate&&a.componentShouldUpdate&&!1===a.componentShouldUpdate(o,i,n))return;pe(l,!1)}}},Le=(e,n,o)=>{if(t.member&&n.X){t.watchCallback&&e.watchers&&(n.q=e.watchers);const s=Object.entries(n.X),l=e.prototype;if(s.map((([e,[s]])=>{(t.prop||t.state)&&(31&s||(!t.lazyLoad||2&o)&&32&s)?Object.defineProperty(l,e,{get(){return xe(this,e)},set(l){t.isDev&&0==(1&o)&&0==(8&Ge(this).o)&&0!=(31&s)&&0==(1024&s)&<(`@Prop() "${e}" on <${n.j}> is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability`),Te(this,e,l,n)},configurable:!0,enumerable:!0}):t.lazyLoad&&t.method&&1&o&&64&s&&Object.defineProperty(l,e,{value(...t){const n=Ge(this);return n.J.then((()=>n.F[e](...t)))}})})),t.observeAttribute&&(!t.lazyLoad||1&o)){const o=new Map;l.attributeChangedCallback=function(e,t,n){ht.jmp((()=>{const t=o.get(e);if(this.hasOwnProperty(t))n=this[t],delete this[t];else if(l.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==n)return;this[t]=(null!==n||"boolean"!=typeof this[t])&&n}))},e.observedAttributes=s.filter((([e,t])=>15&t[0])).map((([e,s])=>{const l=s[1]||e;return o.set(l,e),t.reflect&&512&s[0]&&n.P.push([e,l]),l}))}}return e},Re=async(e,n,o,s,l)=>{if((t.lazyLoad||t.hydrateServerSide||t.style)&&0==(32&n.o)){if(t.lazyLoad||t.hydrateClientSide){if(n.o|=32,(l=ct(o,n,s)).then){const e=((e,n)=>t.profile&&performance.mark?(0===performance.getEntriesByName(e,"mark").length&&performance.mark(e),()=>{0===performance.getEntriesByName(n,"measure").length&&performance.measure(n,e)}):()=>{})(`st:load:${o.j}:${n.O}`,`[Stencil] Load module for <${o.j}>`);l=await l,e()}if((t.isDev||t.isDebug)&&!l)throw Error(`Constructor for "${o.j}#${n.O}" was not found`);t.member&&!l.isProxied&&(t.watchCallback&&(o.q=l.watchers),Le(l,o,2),l.isProxied=!0);const e=y("createInstance",o.j);t.member&&(n.o|=8);try{new l(n)}catch(e){nt(e)}t.member&&(n.o&=-9),t.watchCallback&&(n.o|=128),e(),je(n.F)}else l=e.constructor,n.o|=32,customElements.whenDefined(o.j).then((()=>n.o|=128));if(t.style&&l.style){let s=l.style;t.mode&&"string"!=typeof s&&(s=s[n.O=P(e)],t.hydrateServerSide&&n.O&&e.setAttribute("s-mode",n.O));const r=z(o,n.O);if(!at.has(r)){const e=y("registerStyles",o.j);!t.hydrateServerSide&&t.shadowDom&&t.shadowDomShim&&8&o.o&&(s=await import("./p-da455c82.js").then((e=>e.scopeCss(s,r,!1)))),A(r,s,!!(1&o.o)),e()}}}const r=n.U,i=()=>pe(n,!0);t.asyncLoading&&r&&r["s-rc"]?r["s-rc"].push(i):i()},je=e=>{t.lazyLoad&&t.connectedCallback&&ge(e,"connectedCallback")},Ee=e=>{if(0==(1&ht.o)){const n=Ge(e),o=n.R,s=y("connectedCallback",o.j);if(t.hostListenerTargetParent&&Ve(e,n,o.Y,!0),1&n.o)Ve(e,n,o.Y,!1),je(n.F);else{let s;if(n.o|=1,t.hydrateClientSide&&(s=e.getAttribute(b),s)){if(t.shadowDom&&$t&&1&o.o){const n=t.mode?_(e.shadowRoot,o,e.getAttribute("s-mode")):_(e.shadowRoot,o);e.classList.remove(n+"-h",n+"-s")}((e,n,o,s)=>{const l=y("hydrateClient",n),r=e.shadowRoot,i=[],c=t.shadowDom&&r?[]:null,a=s.N=T(n,null);ht.K||N(pt.body,ht.K=new Map),e[b]=o,e.removeAttribute(b),M(a,i,[],c,e,e,o),i.map((e=>{const t=e.g+"."+e.C,o=ht.K.get(t),s=e.v;o&&$t&&""===o["s-en"]&&o.parentNode.insertBefore(s,o.nextSibling),r||(s["s-hn"]=n,o&&(s["s-ol"]=o,s["s-ol"]["s-nr"]=s)),ht.K.delete(t)})),t.shadowDom&&r&&c.map((e=>{e&&r.appendChild(e)})),l()})(e,o.j,s,n)}if(t.slotRelocation&&!s&&(t.hydrateServerSide||(t.slot||t.shadowDom)&&12&o.o)&&Oe(e),t.asyncLoading){let o=e;for(;o=o.parentNode||o.host;)if(t.hydrateClientSide&&1===o.nodeType&&o.hasAttribute("s-id")&&o["s-p"]||o["s-p"]){fe(n,n.U=o);break}}t.prop&&!t.hydrateServerSide&&o.X&&Object.entries(o.X).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),t.initializeNextTick?Tt((()=>Re(e,n,o))):Re(e,n,o)}s()}},Oe=e=>{const n=e["s-cr"]=pt.createComment(t.isDebug?`content-ref (host=${e.localName})`:"");n["s-cn"]=!0,e.insertBefore(n,e.firstChild)},De=e=>{if(0==(1&ht.o)){const n=Ge(e),o=t.lazyLoad?n.F:e;t.hostListener&&n.G&&(n.G.map((e=>e())),n.G=void 0),t.lazyLoad&&t.disconnectedCallback&&ge(o,"disconnectedCallback"),t.cmpDidUnload&&ge(o,"componentDidUnload")}},Me=(e,n)=>{const o={o:n[0],j:n[1]};t.member&&(o.X=n[2]),t.hostListener&&(o.Y=n[3]),t.watchCallback&&(o.q=e.q),t.reflect&&(o.P=[]),t.shadowDom&&!$t&&1&o.o&&(o.o|=8);const s=e.prototype.connectedCallback,l=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){et(this,o)},connectedCallback(){Ee(this),t.connectedCallback&&s&&s.call(this)},disconnectedCallback(){De(this),t.disconnectedCallback&&l&&l.call(this)},__attachShadow(){$t?this.attachShadow(t.shadowDelegatesFocus?{mode:"open",delegatesFocus:!!(16&o.o)}:{mode:"open"}):this.shadowRoot=this}}),e.is=o.j,Le(e,o,3)},Ne=e=>{const n=e.cloneNode;e.cloneNode=function(e){const o=this,s=!!t.shadowDom&&o.shadowRoot&&$t,l=n.call(o,!!s&&e);if(t.slot&&!s&&e){let e,n,s=0;const r=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si"];for(;s<o.childNodes.length;s++)e=o.childNodes[s]["s-nr"],n=r.every((e=>!o.childNodes[s][e])),e&&(t.appendChildSlotFix&&l.__appendChild?l.__appendChild(e.cloneNode(!0)):l.appendChild(e.cloneNode(!0))),n&&l.appendChild(o.childNodes[s].cloneNode(!0))}return l}},Pe=e=>{e.__appendChild=e.appendChild,e.appendChild=function(e){const t=e["s-sn"]=He(e),n=Fe(this.childNodes,t);if(n){const o=We(n,t),s=o[o.length-1];return s.parentNode.insertBefore(e,s.nextSibling)}return this.__appendChild(e)}},Ie=(e,n)=>{if(t.scoped&&2&n.o){const t=Object.getOwnPropertyDescriptor(Node.prototype,"textContent");Object.defineProperty(e,"__textContent",t),Object.defineProperty(e,"textContent",{get(){var e;const t=Fe(this.childNodes,"");return 3===(null===(e=null==t?void 0:t.nextSibling)||void 0===e?void 0:e.nodeType)?t.nextSibling.textContent:t?t.textContent:this.__textContent},set(e){var t;const n=Fe(this.childNodes,"");if(3===(null===(t=null==n?void 0:n.nextSibling)||void 0===t?void 0:t.nodeType))n.nextSibling.textContent=e;else if(n)n.textContent=e;else{this.__textContent=e;const t=this["s-cr"];t&&this.insertBefore(t,this.firstChild)}}})}},Ue=(e,t)=>{class n extends Array{item(e){return this[e]}}if(8&t.o){const t=e.__lookupGetter__("childNodes");Object.defineProperty(e,"children",{get(){return this.childNodes.map((e=>1===e.nodeType))}}),Object.defineProperty(e,"childElementCount",{get:()=>e.children.length}),Object.defineProperty(e,"childNodes",{get(){const e=t.call(this);if(0==(1&ht.o)&&2&Ge(this).o){const t=new n;for(let n=0;n<e.length;n++){const o=e[n]["s-nr"];o&&t.push(o)}return t}return n.from(e)}})}},He=e=>e["s-sn"]||1===e.nodeType&&e.getAttribute("slot")||"",Fe=(e,t)=>{let n,o=0;for(;o<e.length;o++){if(n=e[o],n["s-sr"]&&n["s-sn"]===t)return n;if(n=Fe(n.childNodes,t),n)return n}return null},We=(e,t)=>{const n=[e];for(;(e=e.nextSibling)&&e["s-sn"]===t;)n.push(e);return n},Ae=(e,n={})=>{var o;t.profile&&performance.mark&&performance.mark("st:app:start"),(()=>{if(t.devTools){const e=ut.stencil=ut.stencil||{},t=e.inspect;e.inspect=e=>{let n=(e=>{const t=Ge(e);if(!t)return;const n=t.o,o=t.T;return{renderCount:t.A,flags:{hasRendered:!!(2&n),hasConnected:!!(1&n),isWaitingForChildren:!!(4&n),isConstructingInstance:!!(8&n),isQueuedForUpdate:!!(16&n),hasInitializedComponent:!!(32&n),hasLoadedComponent:!!(64&n),isWatchReady:!!(128&n),isListenReady:!!(256&n),needsRerender:!!(512&n)},instanceValues:t.B,ancestorComponent:t.U,hostElement:o,lazyInstance:t.F,vnode:t.N,modeName:t.O,onReadyPromise:t.Z,onReadyResolve:t._,onInstancePromise:t.J,onInstanceResolve:t.V,onRenderResolve:t.I,queuedListeners:t.W,rmListeners:t.G,"s-id":o["s-id"],"s-cr":o["s-cr"],"s-lr":o["s-lr"],"s-p":o["s-p"],"s-rc":o["s-rc"],"s-sc":o["s-sc"]}})(e);return n||"function"!=typeof t||(n=t(e)),n}}})();const s=y("bootstrapLazy"),l=[],r=n.exclude||[],i=ut.customElements,c=pt.head,a=c.querySelector("meta[charset]"),d=pt.createElement("style"),u=[],f=pt.querySelectorAll(`[${v}]`);let p,m=!0,h=0;if(Object.assign(ht,n),ht.t=new URL(n.resourcesUrl||"./",pt.baseURI).href,t.asyncQueue&&n.syncQueue&&(ht.o|=4),t.hydrateClientSide&&(ht.o|=2),t.hydrateClientSide&&t.shadowDom)for(;h<f.length;h++)A(f[h].getAttribute(v),B(f[h].innerHTML),!0);if(e.map((e=>{e[1].map((o=>{const s={o:o[0],j:o[1],X:o[2],Y:o[3]};t.member&&(s.X=o[2]),t.hostListener&&(s.Y=o[3]),t.reflect&&(s.P=[]),t.watchCallback&&(s.q={}),t.shadowDom&&!$t&&1&s.o&&(s.o|=8);const c=t.transformTagName&&n.transformTagName?n.transformTagName(s.j):s.j,a=class extends HTMLElement{constructor(e){super(e),et(e=this,s),t.shadowDom&&1&s.o&&($t?e.attachShadow(t.shadowDelegatesFocus?{mode:"open",delegatesFocus:!!(16&s.o)}:{mode:"open"}):t.hydrateServerSide||"shadowRoot"in e||(e.shadowRoot=e)),t.slotChildNodesFix&&Ue(e,s)}connectedCallback(){p&&(clearTimeout(p),p=null),m?u.push(this):ht.jmp((()=>Ee(this)))}disconnectedCallback(){ht.jmp((()=>De(this)))}componentOnReady(){return Ge(this).Z}};t.cloneNodeFix&&Ne(a.prototype),t.appendChildSlotFix&&Pe(a.prototype),t.hotModuleReplacement&&(a.prototype["s-hmr"]=function(e){((e,t,n)=>{const o=Ge(e);o.o=1,e["s-hmr-load"]=()=>{delete e["s-hmr-load"]},Re(e,o,t,n)})(this,s,e)}),t.scopedSlotTextContentFix&&Ie(a.prototype,s),s.ee=e[0],r.includes(c)||i.get(c)||(l.push(c),i.define(c,Le(a,s,1)))}))})),t.invisiblePrehydration&&(t.hydratedClass||t.hydratedAttribute)){d.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles","");const e=null!==(o=ht.L)&&void 0!==o?o:k(pt);null!=e&&d.setAttribute("nonce",e),c.insertBefore(d,a?a.nextSibling:c.firstChild)}m=!1,u.length?u.map((e=>e.connectedCallback())):ht.jmp(t.profile?()=>p=setTimeout(ve,30,"timeout"):()=>p=setTimeout(ve,30)),s()},_e=(e,t)=>t,Ve=(e,n,o,s)=>{t.hostListener&&o&&(t.hostListenerTargetParent&&(o=o.filter(s?([e])=>32&e:([e])=>!(32&e))),o.map((([o,s,l])=>{const r=t.hostListenerTarget?Be(e,o):e,i=ze(n,l),c=Xe(o);ht.ael(r,s,i,c),(n.G=n.G||[]).push((()=>ht.rel(r,s,i,c)))})))},ze=(e,n)=>o=>{try{t.lazyLoad?256&e.o?e.F[n](o):(e.W=e.W||[]).push([n,o]):e.T[n](o)}catch(e){nt(e)}},Be=(e,n)=>t.hostListenerTargetDocument&&4&n?pt:t.hostListenerTargetWindow&&8&n?ut:t.hostListenerTargetBody&&16&n?pt.body:t.hostListenerTargetParent&&32&n?e.parentElement:e,Xe=e=>({passive:0!=(1&e),capture:0!=(2&e)}),qe=e=>ht.L=e,Je=(e,t,n,o)=>{null!=t&&(null!=t["s-nr"]&&o.push(t),1===t.nodeType&&t.childNodes.forEach((t=>{const s=Ge(t);null==s||n.staticComponents.has(t.nodeName.toLowerCase())||Qe(e,t,s.N,n,{nodeIds:0}),Je(e,t,n,o)})))},Qe=(e,t,n,o,s)=>{if(null!=n){const l=++o.hostIds;if(t.setAttribute(b,l),null!=t["s-cr"]&&(t["s-cr"].nodeValue="r."+l),null!=n.u){const t=0;n.u.forEach(((n,o)=>{Ye(e,n,s,l,t,o)}))}if(t&&n&&n.v&&!t.hasAttribute("c-id")){const e=t.parentElement;if(e&&e.childNodes){const o=Array.from(e.childNodes),s=o.find((e=>8===e.nodeType&&e["s-sr"]));if(s){const e=o.indexOf(t)-1;n.v.setAttribute(g,`${s["s-host-id"]}.${s["s-node-id"]}.0.${e}`)}}}}},Ye=(e,t,n,o,s,l)=>{const r=t.v;if(null==r)return;const i=n.nodeIds++,c=`${o}.${i}.${s}.${l}`;if(r["s-host-id"]=o,r["s-node-id"]=i,1===r.nodeType)r.setAttribute(g,c);else if(3===r.nodeType){const t=r.parentNode,n=t.nodeName;if("STYLE"!==n&&"SCRIPT"!==n){const n=e.createComment("t."+c);t.insertBefore(n,r)}}else 8===r.nodeType&&r["s-sr"]&&(r.nodeValue=`s.${c}.${r["s-sn"]||""}`);if(null!=t.u){const l=s+1;t.u.forEach(((t,s)=>{Ye(e,t,n,o,l,s)}))}},Ke=new WeakMap,Ge=e=>Ke.get(e),Ze=(e,t)=>Ke.set(t.F=e,t),et=(e,n)=>{const o={o:0,T:e,R:n,B:new Map};return t.isDev&&(o.A=0),t.method&&t.lazyLoad&&(o.J=new Promise((e=>o.V=e))),t.asyncLoading&&(o.Z=new Promise((e=>o._=e)),e["s-p"]=[],e["s-rc"]=[]),Ve(e,o,n.Y,!1),Ke.set(e,o)},tt=(e,t)=>t in e,nt=(e,t)=>(l||console.error)(e,t),ot=t.isTesting?["STENCIL:"]:["%cstencil","color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"],st=(...e)=>console.error(...ot,...e),lt=(...e)=>console.warn(...ot,...e),rt=(...e)=>console.info(...ot,...e),it=new Map,ct=(e,n,o)=>{const s=e.j.replace(/-/g,"_"),l=e.ee;if(t.isDev&&"string"!=typeof l)return void st(`Trying to lazily load component <${e.j}> with style mode "${n.O}", but it does not exist.`);const r=!t.hotModuleReplacement&&it.get(l);return r?r[s]:import(`./${l}.entry.js${t.hotModuleReplacement&&o?"?s-hmr="+o:""}`).then((e=>(t.hotModuleReplacement||it.set(l,e),e[s])),nt)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},at=new Map,dt=[],ut="undefined"!=typeof window?window:{},ft=t.cssVarShim?ut.CSS:null,pt=ut.document||{head:{}},mt=ut.HTMLElement||class{},ht={o:0,t:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},$t=!t.shadowDomShim||!t.shadowDom||(()=>(pt.head.attachShadow+"").indexOf("[native")>-1)(),yt=e=>Promise.resolve(e),bt=!!t.constructableCSS&&(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),vt=[],gt=[],wt=[],Ct=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&ht.o?Tt(xt):ht.raf(xt))},St=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){nt(e)}e.length=0},kt=(e,t)=>{let n=0,o=0;for(;n<e.length&&(o=performance.now())<t;)try{e[n++](o)}catch(e){nt(e)}n===e.length?e.length=0:0!==n&&e.splice(0,n)},xt=()=>{if(t.asyncQueue&&f++,St(vt),t.asyncQueue){const e=2==(6&ht.o)?performance.now()+14*Math.ceil(.1*f):1/0;kt(gt,e),kt(wt,e),gt.length>0&&(wt.push(...gt),gt.length=0),(p=vt.length+gt.length+wt.length>0)?ht.raf(xt):f=0}else St(gt),(p=vt.length>0)&&ht.raf(xt)},Tt=e=>yt().then(e),Lt=Ct(vt,!1),Rt=Ct(gt,!0),jt=Object.freeze({__proto__:null,Build:m,CSS:ft,Context:h,Fragment:_e,H:mt,HTMLElement:mt,Host:L,STENCIL_DEV_MODE:ot,addHostEventListeners:Ve,bootstrapLazy:Ae,cmpModules:it,connectedCallback:Ee,consoleDevError:st,consoleDevInfo:rt,consoleDevWarn:lt,consoleError:nt,createEvent:H,defineCustomElement:(e,t)=>{customElements.define(t[1],Me(e,t))},disconnectedCallback:De,doc:pt,forceModeUpdate:e=>{if(t.style&&t.mode&&!t.lazyLoad){const t=P(e),n=Ge(e);if(n.O!==t){const o=n.R,s=e["s-sc"],l=z(o,t),r=e.constructor.style[t],i=o.o;r&&(at.has(l)||A(l,r,!!(1&i)),n.O=t,e.classList.remove(s+"-h",s+"-s"),V(n),be(e))}}},forceUpdate:be,getAssetPath:$,getConnect:(e,t)=>{const n=()=>{let e=pt.querySelector(t);return e||(e=pt.createElement(t),pt.body.appendChild(e)),"function"==typeof e.componentOnReady?e.componentOnReady():Promise.resolve(e)};return{create:(...e)=>n().then((t=>t.create(...e))),componentOnReady:n}},getContext:(e,n)=>n in h?h[n]:"window"===n?ut:"document"===n?pt:"isServer"===n||"isPrerender"===n?!!t.hydrateServerSide:"isClient"===n?!t.hydrateServerSide:"resourcesUrl"===n||"publicPath"===n?$("."):"queue"===n?{write:Rt,read:Lt,tick:{then:e=>Tt(e)}}:void 0,getElement:U,getHostRef:Ge,getMode:e=>Ge(e).O,getRenderingRef:()=>u,getValue:xe,h:x,insertVdomAnnotations:(e,t)=>{if(null!=e){const n={hostIds:0,rootLevelIds:0,staticComponents:new Set(t)},o=[];Je(e,e.body,n,o),o.forEach((t=>{if(null!=t){const o=t["s-nr"];let s=o["s-host-id"],l=o["s-node-id"],r=`${s}.${l}`;if(null==s)if(s=0,n.rootLevelIds++,l=n.rootLevelIds,r=`${s}.${l}`,1===o.nodeType)o.setAttribute(g,r);else if(3===o.nodeType){if(0===s&&""===o.nodeValue.trim())return void t.remove();const n=e.createComment(r);n.nodeValue="t."+r,o.parentNode.insertBefore(n,o)}let i="o."+r;const c=t.parentElement;c&&(""===c["s-en"]?i+=".":"c"===c["s-en"]&&(i+=".c")),t.nodeValue=i}}))}},isMemberInElement:tt,loadModule:ct,modeResolutionChain:dt,nextTick:Tt,parsePropertyValue:I,plt:ht,postUpdateComponent:ye,promiseResolve:yt,proxyComponent:Le,proxyCustomElement:Me,readTask:Lt,registerHost:et,registerInstance:Ze,renderVdom:ae,setAssetPath:e=>ht.t=e,setErrorHandler:e=>l=e,setMode:e=>dt.push(e),setNonce:qe,setPlatformHelpers:e=>{Object.assign(ht,e)},setPlatformOptions:e=>Object.assign(ht,e),setValue:Te,styles:at,supportsConstructableStylesheets:bt,supportsListenerOptions:!0,supportsShadow:$t,win:ut,writeTask:Rt,BUILD:t,Env:{},NAMESPACE:e});export{t as B,ft as C,_e as F,mt as H,e as N,jt as S,ht as a,Ae as b,rt as c,pt as d,H as e,L as f,U as g,x as h,be as i,yt as p,Ze as r,qe as s,ut as w}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,
|
|
1
|
+
import{r as t,e as s,h as i,g as e}from"./p-2c9d0870.js";import{ElementIDUtils as h,ApplicationContext as r}from"@sankhyalabs/core";import{F as a}from"./p-ff1990ad.js";const o=class{constructor(i){t(this,i),this.valueChanged=s(this,"valueChanged",7),this._isSearchPlus=!1,this.config=void 0,this.value=void 0,this.errorMessage=void 0}async ezChangeListener(t){this.errorMessage=void 0,this.value=this._isSearchPlus?await this._searchInput.getValueAsync():this._searchInput.value,this.valueChanged.emit(this.value)}componentDidLoad(){this._element&&h.addIDInfo(this._element,"filterContentEditor")}doSearch(t,s,i=!1){const e=r.getContextValue("__SNK__APPLICATION__"),h=i?e.executePreparedSearchPlus:e.executePreparedSearch;return new Promise(((i,r)=>{h.bind(e)(t,s,this.config.props.searchContext).then((t=>{i(t)})).catch((t=>{r(t)}))}))}async setFocus(){this._searchInput.setFocus()}async clearValue(){this.value=this.config.value,this._searchInput&&(this._searchInput.value=this.config.value)}getInputItem(){var t;return this._isSearchPlus=1==(null===(t=this.config.props)||void 0===t?void 0:t.useSearchPlus),i("ez-tooltip",{active:!1===this.config.enabled,message:this.config.disabledMessage,type:"warning"},i(this._isSearchPlus?"ez-search-plus":"ez-search",{id:this.config.id,suppressEmptyOption:!0,value:this.config.value,label:this.config.label,enabled:this.config.enabled,ref:t=>this._searchInput=t,optionLoader:({mode:t,argument:s})=>this.doSearch(t,s,this._isSearchPlus),errorMessage:this.errorMessage}))}render(){if(this.config&&this.config.type===a.SEARCH)return this.getInputItem()}get _element(){return e(this)}};export{o as snk_filter_search}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,
|
|
1
|
+
import{r as i,e as t,h as s,f as n}from"./p-2c9d0870.js";import{ApplicationUtils as e}from"@sankhyalabs/ezui/dist/collection/utils";const o=class{constructor(s){i(this,s),this.configClose=t(this,"configClose",7),this.saveConfig=t(this,"saveConfig",7),this.isEditingGuide=!1,this.isEditingGroup=!1,this.configOptions=[],this.selectedConfig=void 0,this.messagesBuilder=void 0,this.hasChanges=!1,this.optionConfigChanged=!1}handleIsEditingGuideName({detail:i}){this.isEditingGuide=i}handleIsEditingGroupName({detail:i}){this.isEditingGroup=i}saveFormConfig(){if(this.isEditingGuide||this.isEditingGroup){const i=this.getMessage("snkFormConfig.confirm.title"),t=this.getMessage(this.isEditingGuide?"snkFormConfig.alert.titleGuideEditing":"snkFormConfig.alert.titleGroupEditing");e.alert(i,t)}else this.saveConfig.emit()}async closeFormConfig(){if(this.hasChanges){const i=this.getMessage("snkFormConfig.confirm.title"),t=this.getMessage("snkFormConfig.confirm.cancel");if(!await e.confirm(i,t))return}this.configClose.emit()}getMessage(i,t){return this.messagesBuilder.getMessage(i,t)}openConfirmDialog(i="",t=this.getMessage("snkFormConfig.confirm.title")){return e.confirm(t,i)}async applyOptionConfig(){var i,t;const s=null!==(t=null===(i=this.selectedConfig)||void 0===i?void 0:i.name)&&void 0!==t?t:this.getMessage("snkFormConfig.configs.selectedConfig"),n=this.getMessage("snkFormConfig.confirm.apply").replace("{0}",s);await this.openConfirmDialog(n)&&this.saveConfig.emit()}renderSaveActions(){if(this.hasChanges||this.optionConfigChanged)return s("div",{class:"right-group"},s("ez-button",{title:this.getMessage("snkFormConfig.actions.cancel"),label:this.getMessage("snkFormConfig.actions.cancel"),onClick:this.closeFormConfig.bind(this),size:"medium"}),s("ez-button",this.hasChanges?{title:this.getMessage("snkFormConfig.actions.save"),label:this.getMessage("snkFormConfig.actions.save"),class:"ez-button--primary ez-padding-left--medium",onClick:()=>this.saveFormConfig(),size:"medium"}:{title:this.getMessage("snkFormConfig.actions.save"),label:this.getMessage("snkFormConfig.applyConfig"),class:"ez-button--primary ez-padding-left--medium",onClick:async()=>await this.applyOptionConfig(),size:"medium"}))}render(){return s(n,null,s("div",{class:"left-group"},s("ez-button",{mode:"icon",title:this.getMessage("snkFormConfig.goBackTitle"),iconName:"arrow_back",class:"ez-padding--small",size:"small",onClick:this.closeFormConfig.bind(this),id:"formConfigToBack"}),s("h1",{class:"ez-title ez-title--primary ez-title--extra-large ez-padding--small"},this.getMessage("snkFormConfig.title")),s("configs-button",{hasChanges:this.hasChanges,configOptions:this.configOptions,selectedConfig:this.selectedConfig,messagesBuilder:this.messagesBuilder})),this.renderSaveActions())}};o.style=".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}";export{o as config_header}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e}from"./p-2c9d0870.js";import{P as a}from"./p-0f3698af.js";import{s as t}from"./p-a73b6b00.js";var n,i,s;!function(e){e.PREVIOUS="PREVIOUS",e.NEXT="NEXT",e.REFRESH="REFRESH",e.UPDATE="UPDATE",e.CLONE="CLONE",e.REMOVE="REMOVE",e.INSERT="INSERT",e.CANCEL="CANCEL",e.SAVE="SAVE",e.GRID_MODE="GRID_MODE",e.FORM_MODE="FORM_MODE",e.MORE_OPTIONS="MORE_OPTIONS",e.DIVIDER="DIVIDER",e.SPACER="SPACER",e.CONFIGURATOR="CONFIGURATOR",e.DATA_EXPORTER="DATA_EXPORTER",e.ATTACH="ATTACH",e.ACTIONS_BUTTON="ACTIONS_BUTTON",e.UPDATE_MULTIPLE="UPDATE_MULTIPLE"}(n||(n={})),function(e){e.UPDATE="UPDATE",e.CLONE="CLONE",e.REMOVE="REMOVE",e.INSERT="INSERT",e.CONFIGURATOR="CONFIGURATOR"}(i||(i={})),function(e){e.CONFIGURATOR="CONFIGURATOR"}(s||(s={}));const c=({def:e,className:a,dataElementId:t,action:n,isEnabled:i,size:s})=>{const{hint:c,text:l,iconName:o}=e;return o?l?m({iconName:o,element:e.name,className:a,dataElementId:t,title:c,action:n,isEnabled:i,size:s}):d({iconName:o,element:e.name,className:a,dataElementId:t,title:c,action:n,isEnabled:i,size:s}):r({element:e.name,className:a,dataElementId:t,title:c,action:n,isEnabled:i,size:s})},l=({element:i,className:s,dataElementId:c,getTitle:l,action:o,isEnabled:b,actions:E,dataExporterStoreKey:u,presentationMode:N,variant:O,size:v})=>{var z,k;const j={element:i,className:s,dataElementId:c,title:l(i),action:o,isEnabled:b,actions:E,variant:O,size:v};switch(i){case n.PREVIOUS:return d(Object.assign({iconName:"chevron-left"},j));case n.NEXT:return d(Object.assign({iconName:"chevron-right"},j));case n.REFRESH:return d(Object.assign({iconName:"sync"},j));case n.UPDATE:return d(Object.assign({iconName:"edit"},j));case n.UPDATE_MULTIPLE:return d(Object.assign({iconName:"edit-table"},j));case n.CLONE:return d(Object.assign({iconName:"copy"},j));case n.REMOVE:return d(Object.assign({iconName:"delete"},j));case n.INSERT:return N===a.PRIMARY?r(Object.assign({},j)):d(Object.assign({iconName:"plus"},j));case n.CANCEL:return r(Object.assign({},j));case n.SAVE:return N===a.PRIMARY?m(Object.assign(Object.assign({iconName:"save"},j),{variant:"primary"})):d(Object.assign(Object.assign({iconName:"save"},j),{variant:"primary"}));case n.GRID_MODE:return d(Object.assign({iconName:"table"},j));case n.FORM_MODE:return d(Object.assign({iconName:"list"},j));case n.CONFIGURATOR:return(null==E?void 0:E.length)>0?function({iconName:a,element:t,className:n,title:i,dataElementId:s,isEnabled:c,actions:l,action:r,size:o}){return l&&l.length>0?e("taskbar-split-button",{key:s,class:n,iconName:a,"data-taskbar-icon":a,"data-taskbar-label":i,title:i,"data-taskbar-element":t,"data-element-id":s,enabled:c(t),actions:l,action:()=>r(t),size:o}):void 0}(Object.assign({iconName:"settings-inverted"},j)):d(Object.assign({iconName:"settings-inverted"},j));case n.MORE_OPTIONS:const l=null!==(z=null==E?void 0:E.filter((e=>void 0!==e)))&&void 0!==z?z:[];return function({element:a,className:t,dataElementId:n,title:i,isEnabled:s,actions:c,action:l,size:r}){return c&&c.length>0?e("taskbar-actions-button",{class:t,key:n,title:i,"data-taskbar-element":a,"data-element-id":n,enabled:s(a),actions:c,onTaskbarActionSelected:e=>l(e.detail.value),size:r}):void 0}(Object.assign(Object.assign({},j),{actions:l}));case n.DIVIDER:return e("hr",{class:"ez-divider-vertical ez-divider--dark ez-margin--none ez-margin-left--medium","data-taskbar-divider":!0});case n.DATA_EXPORTER:const o=null===(k=t.get("exporterProviders"))||void 0===k?void 0:k[u];return e("snk-data-exporter",{class:s,provider:o,"data-element-id":c,"data-taskbar-element":i,size:v});case n.ATTACH:return d(Object.assign({iconName:"anexo"},j));case n.ACTIONS_BUTTON:return e("snk-actions-button",{"data-element-id":c,"data-taskbar-element":i,class:s,size:v})}};function r({action:a,className:t,dataElementId:n,title:i,element:s,isEnabled:c,variant:l,size:r}){return e("ez-tooltip",{key:n,message:i,class:t},e("ez-button",{label:i,"data-taskbar-label":i,"data-taskbar-element":s,"data-element-id":n,isDisabled:!c(s),onClick:()=>a(s),variant:l,size:r}))}function o(e){return"string"==typeof e?e:Object.keys(e).filter((a=>e[a])).join(" ")}function d({iconName:a,element:t,className:n,dataElementId:i,title:s,action:c,isEnabled:l,variant:r,size:d}){return e("ez-tooltip",{key:i,message:s,class:{[o(n)]:!0,[`icon-button--${d}`]:!0}},e("ez-button",{mode:"icon","data-taskbar-label":s,"data-taskbar-element":t,"data-taskbar-icon":a,"data-element-id":i,iconName:a,isDisabled:!l(t),onClick:()=>c(t),variant:r,size:d}))}function m({iconName:a,element:t,className:n,dataElementId:i,title:s,action:c,isEnabled:l,variant:r,size:o}){return e("ez-tooltip",{key:i,message:s,class:n},e("ez-button",{label:s,"data-taskbar-label":s,"data-taskbar-icon":a,"data-taskbar-element":t,"data-element-id":i,isDisabled:!l(t),onClick:()=>c(t),variant:r,size:o},e("ez-icon",{class:"ez-padding-right--small",slot:"leftIcon",iconName:a})))}export{i as A,n as T,s as V,c as a,l as b}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{S as snk_guides_viewer}from"./p-771b137e.js";import"./p-2c9d0870.js";import"@sankhyalabs/core";import"@sankhyalabs/ezui/dist/collection/utils";import"@sankhyalabs/ezui/dist/collection/utils/form";import"./p-9019a32f.js";import"./p-ab5e12fa.js";import"./p-3c990841.js";import"./p-3870748a.js";import"./p-2af8aca3.js";import"./p-8d884fab.js";import"./p-554c0e54.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-ff1990ad.js";import"./p-3072136e.js";import"./p-0f3698af.js";import"./p-a73b6b00.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,h as i,f as e,g as t}from"./p-2c9d0870.js";import{ObjectUtils as a,StringUtils as r,ApplicationContext as n,ElementIDUtils as o}from"@sankhyalabs/core";import{P as l,b as c,a as h}from"./p-4f7adf97.js";import"./p-2af8aca3.js";import"./p-0f3698af.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-d972a9c1.js";import"./p-ff1990ad.js";import"./p-3870748a.js";import"./p-9019a32f.js";import"./p-8d884fab.js";import"./p-554c0e54.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";const u=class{constructor(i){s(this,i),this._mdByName={},this._startHighlightTag="<span class='card-item__highlight'>",this._endHighlightTag="</span>",this._specialCharsRegex=/[[.\-\$\+\*,_\&\(\)%\/\\#@!:\|\=\'\"]/gim,this._charsWithAccentuation="ÁÉÍÓÚ_ÃÕ_ÂÊÎÔÛ_ÀÈÌÒÙ_Ü_Ç_áéíóú_ãõ_âêîôû_àèìòù_ü_ç",this._charsWithoutAccentuation="AEIOU_AO_AEIOU_AEIOU_U_C_aeiou_ao_aeiou_aeiou_u_c",this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=450,this._gridDataSource=[],this.pesquisaFetcher=new l,this._itemList=void 0,this._startLoading=!1,this._presentationMode="list",this._currentView=void 0,this._valideDataSource=!1,this.searchLoader=void 0,this.treeLoader=void 0,this.selectItem=void 0,this.entityName=void 0,this.argument=void 0,this.isHierarchyEntity=!1,this.allowsNonAnalytic=!1}observeArgument(){this._textInput&&(this._textInput.value=this.argument)}async executeSearch(s){this.argument=s,this.onChangeValue({detail:s})}clearSearch(){this.argument="",this._itemList=void 0}buildDetails(s,i){let e={};for(let t=0;t<s.length;t++){const a=s[t],r=i[a.fieldName];e[a.description]=this.highlightValue(i.__matchFields,a.options&&a.options[r]||r,s,!0)}return e}buildFirstFields(s,i,e=6){return s&&Array.isArray(s)&&s.forEach((s=>{let e=this.removeReference(i,this._mdByName[s]);e&&i.unshift(e)})),i=i.slice(0,e)}doSearch(s){this.searchLoader&&"function"==typeof this.searchLoader&&(this._startLoading=!0,this.searchLoader(s).then((s=>{s&&this.processSearchResponse(s)})).finally((()=>{this._startLoading=!1})))}processSearchResponse(s){let i=(s=a.stringToObject(s.json.$)).descriptionField,e=s.pkField;e&&(this._gridMetadata=c(s),this._gridDataSource=[...s.data],this._pkField=e,this._descriptionField=i,this._itemList=this.buildCardItemList(s,e,i))}buildCardItemList(s,i,e){var t;return null===(t=s.data)||void 0===t?void 0:t.map((t=>{var a;let r=this.filterFieldsMetadata(s,t),n=this.buildFirstFields(t.__matchFields,r);return{key:this.highlightValue(t.__matchFields,null===(a=t[i])||void 0===a?void 0:a.toString(),n,!0),title:e?this.highlightValue(t.__matchFields,t[e],n,!0):"",details:this.buildDetails(n,t)}}))}filterFieldsMetadata(s,i){return s.fieldsMetadata.filter((e=>{let t=!r.isEmpty(i[e.fieldName])&&!1!==e.visible&&"B"!==e.type&&s.pkField!==e.fieldName&&s.descriptionField!==e.fieldName&&(e.isPrimaryKey||!e.isLinkField)&&!("S"===e.type&&"H"===e.presentationType);return t&&(this._mdByName[e.fieldName]=e),("string"!=typeof i[e.fieldName]||!(i[e.fieldName].indexOf("<img")>-1||i[e.fieldName].indexOf("<svg")>-1))&&t}))}removeAtIndex(s,i){if(i>=0&&i<s.length)return s.splice(i,1)[0]}removeReference(s,i){let e=this.indexOf(s,i);return this.removeAtIndex(s,e)}indexOf(s,i){let e=-1;return Array.isArray(s)&&this.find(s,((s,t)=>(e=t,this.equals(i,s)))),e}equals(s,i){return a.objectToString(s)===a.objectToString(i)}find(s,i){if(s)for(let e=0,t=s.length;e<t;e++)if(i(s[e],e,s))return s[e]}highlightValue(s,i,e,t){let a=this.replaceHtmlEntities(i);if(this.argument&&(t||this.isIn(s,e.fieldName))){const s=this.getArgumentNumber();let i=(isNaN(s)?this.argument:s.toString()).split(/%|,|\s+/),t=0,r=this.replaceAccentuatedChars(a);i.forEach((s=>{if(s){s=this.replaceAccentuatedChars(s);let i=this.getSpecialCharacters(s);null!=i&&i.length>0&&(s=this.removeSpecialCharacters(s)),(e.mask||"CGC_CPF"===e.uiType||"Phone"===e.uiType)&&(s=s.split("").join("\\.?\\-?\\/?\\(?\\)?"));let n=new RegExp(s,"ig");n.lastIndex=t;let o=n.exec(r);if(o&&o.length>0){t=o.index;let s=o[0].length,i=a.substring(t,t+s),e=(null==i?void 0:i.trim())?this._startHighlightTag+i+this._endHighlightTag:"",n=a.substring(0,t),l=a.substring(t+s);a=n+e+l,t+=e.length,r=this.replaceAccentuatedChars(a)}}}))}return a}replaceHtmlEntities(s){return null==s?s:String(s).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}replaceAccentuatedChars(s){return null==s?s:this.replaceToSpace(s,["&","<",">","""]).replace(/[^\w ]/g,(s=>{let i=this._charsWithAccentuation.indexOf(s);return i>-1&&(s=this._charsWithoutAccentuation.charAt(i)),s||""}))}replaceToSpace(s,i=[]){return null==s||i.forEach((i=>{const e=new RegExp(i,"g");let t="";for(let s=0;s<i.length;s++)t+=" ";s=String(s).replace(e,t)})),s}isIn(s,i){return this.indexOf(s,i)>-1}getSpecialCharacters(s){let i,e=[];for(;i=this._specialCharsRegex.exec(s);)e.push(s[i.index]);return e}removeSpecialCharacters(s){return this.getSpecialCharacters(s).forEach((i=>{s=this.replaceAll(s,i,"")})),s}replaceAll(s,i,e){let t=(null!=s?s:"").indexOf(i);for(;t>-1;)t=(s=s.replace(i,e)).indexOf(i);return s}getArgumentNumber(){return Number(this.argument||void 0)}createOption(s){let{key:i,title:e}=s;const t=new RegExp(this._startHighlightTag,"g"),a=new RegExp(this._endHighlightTag,"g");e=r.decodeHtmlEntities(e);const n={value:null==i?void 0:i.replace(t,"").replace(a,""),label:null==e?void 0:e.replace(t,"").replace(a,"")};this.selectItem(n)}onChangeValue(s){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=setTimeout((()=>{this.onChangeValue(s)}),this._deboucingTime));if(this.argument=(s.detail||"").trim(),this.isHierarchyEntity&&"list"===this._presentationMode)return void(null===(i=this._pesquisaTree)||void 0===i||i.applyFilter());const e=this.getArgumentNumber();this.argument&&(!isNaN(e)||this.argument.length>=this._limitCharsToSearch)?this._changeDeboucingTimeout=setTimeout((()=>{this.doSearch(this.argument),this._valideDataSource=!0}),this._deboucingTime):(this._itemList=void 0,this._gridDataSource=[],this._valideDataSource=!1)}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=void 0)}onClickSearch(){this.doSearch((this.argument||"").trim()),this._valideDataSource=!0}getMessageView(){if(this._startLoading)return this.getMessage("snkPesquisa.search.waitMessage");if(!this._itemList)return this.getMessage("snkPesquisa.search.initialMessage");const s=this._itemList.length;return s<1?this.getMessage("snkPesquisa.search.noResultsMessage"):1===s?this.getMessage("snkPesquisa.search.resultsFoundSingular"):this.getMessage("snkPesquisa.search.resultsFoundPlural",{COUNT:s})}async componentWillLoad(){var s;this._application=n.getContextValue("__SNK__APPLICATION__"),this._messagesBuilder=null===(s=this._application)||void 0===s?void 0:s.messagesBuilder;const i=await this.pesquisaFetcher.loadPresentationConfig(this.entityName);this._presentationMode="list"===i?"list":"table"}async componentDidLoad(){o.addIDInfo(this._element),await this.chooseViewMode()}getMessage(s,i){return this._messagesBuilder.getMessage(s,i)}async handleChangeViewMode(){this._presentationMode="list"===this._presentationMode?"table":"list",await this.chooseViewMode(),await this.pesquisaFetcher.savePresentationConfig(this.entityName,this._presentationMode)}async chooseViewMode(){var s,i;if("list"!==this._presentationMode)return await(null===(s=this._viewStack)||void 0===s?void 0:s.show(h.GRID)),void(this._currentView=h.GRID);const e=this.isHierarchyEntity?h.TREE:h.CARDS;await(null===(i=this._viewStack)||void 0===i?void 0:i.show(e)),this._currentView=e}hideLimitMessage(){return!this._itemList||this._itemList.length<100}hideRecordsMessage(){return"list"===this._presentationMode&&this.isHierarchyEntity}getButtonModeInfo(){return"list"===this._presentationMode?{iconName:"table",title:this.getMessage("snkPesquisa.viewMode.tableMode")}:this.isHierarchyEntity?{iconName:"hierarchical-tree",title:this.getMessage("snkPesquisa.viewMode.tableMode")}:{iconName:"list",title:this.getMessage("snkPesquisa.viewMode.listMode")}}render(){var s,t;return i(e,null,i("div",{class:"snk-pesquisa"},i("div",{class:"snk-pesquisa__input"},i("ez-text-input",{label:this.getMessage("snkPesquisa.search.label"),class:"ez-margin-right--medium",canShowError:!1,ref:s=>this._textInput=s,onEzChange:s=>this.onChangeValue(s),value:this.argument,"data-element-id":"searchInput"},i("ez-icon",{slot:"leftIcon",iconName:"search"}),this.argument&&(null===(s=this._textInput)||void 0===s?void 0:s.value)?i("button",{slot:"rightIcon",class:"snk-pesquisa__btn",onClick:()=>this.clearSearch()},i("ez-icon",{iconName:"close"})):void 0),i("ez-button",{class:"ez-button--primary",label:this.getMessage("snkPesquisa.search.button"),onClick:()=>this.onClickSearch()}),i("ez-button",{class:"ez-margin-left--medium",mode:"icon",iconName:this.getButtonModeInfo().iconName,title:this.getButtonModeInfo().title,onClick:async()=>await this.handleChangeViewMode()})),i("div",{class:"snk-pesquisa__records-label "+(this._currentView===h.TREE?"hidden":"")},i("label",{class:"snk-pesquisa__records "+(this.hideRecordsMessage()?"hidden":"")},this.getMessageView()),i("label",{class:"snk-pesquisa__records-limit "+(this.hideLimitMessage()?"hidden":"")},this.getMessage("snkPesquisa.search.limitMessage"))),i("div",{class:"snk-pesquisa__content"},i("ez-view-stack",{ref:s=>this._viewStack=s,"data-element-id":"simple-crud"},i("stack-item",null,this._valideDataSource&&i("pesquisa-grid",{metadata:this._gridMetadata,dataSource:this._gridDataSource,pkField:this._pkField,descriptionField:this._descriptionField,entityName:this.entityName,shouldLoadConfig:this._currentView===h.GRID,onPesquisaGridSelectItem:({detail:s})=>this.selectItem(s)})),i("stack-item",null,i("div",{class:"snk-pesquisa__cards-container"},null===(t=this._itemList)||void 0===t?void 0:t.map((s=>i("ez-card-item",{onEzClick:s=>this.createOption(s.detail),item:s}))))),i("stack-item",null,i("pesquisa-tree",{ref:s=>this._pesquisaTree=s,argument:this.argument,treeLoader:this.treeLoader,allowsNonAnalytic:this.allowsNonAnalytic,shouldLoadTree:this._currentView===h.TREE,onPesquisaTreeSelectItem:({detail:s})=>this.selectItem(s),messagesBuilder:this._messagesBuilder}))))))}get _element(){return t(this)}static get watchers(){return{argument:["observeArgument"]}}};u.style=".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--color-secondary:var(--text--secondary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--small, 6px);--snk-pesquisa__scrollable-content--height:calc(100vh - 300px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right);height:var(--snk-pesquisa__scrollable-content--height)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records-label.sc-snk-pesquisa{display:flex;flex-direction:row;justify-content:space-between;font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__records-label.hidden.sc-snk-pesquisa{display:none}.snk-pesquisa__records.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color)}.snk-pesquisa__records-limit.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color-secondary)}.snk-pesquisa__records-limit.hidden.sc-snk-pesquisa,.snk-pesquisa__records.hidden.sc-snk-pesquisa{visibility:hidden}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}.snk-pesquisa__cards-container.sc-snk-pesquisa{height:100%;overflow-y:auto}";export{u as snk_pesquisa}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ObjectUtils as t}from"@sankhyalabs/core";import{R as a}from"./p-
|
|
1
|
+
import{ObjectUtils as t}from"@sankhyalabs/core";import{R as a}from"./p-3870748a.js";class s extends a{getData(a){const s=`cfg://auth/${a}`;return new Promise(((a,e)=>{this.loadResource(s).then((s=>{let e=t.stringToObject(s);e&&"object"==typeof e&&a(e)})).catch((t=>{e(t)}))}))}}var e;!function(t){t.INSERT="I",t.UPDATE="A",t.REMOVE="E",t.SHOW="C",t.CONFIG="F",t.CONFIG_NUMBER="N",t.CLONE="D",t.CONFIG_GRID="G"}(e||(e={}));export{e as A,s as a}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{d as e,D as t}from"./p-2af8aca3.js";import{ObjectUtils as n}from"@sankhyalabs/core";class r{constructor(){this.templateByQuery=new Map,this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchResource",e.gql`query($name: String!) {
|
|
2
|
+
$queryAlias$: fetchResource(name: $name){
|
|
3
|
+
resource
|
|
4
|
+
}
|
|
5
|
+
}`),this.templateByQuery.set("saveResource",e.gql`mutation($resource: InputResource!) {
|
|
6
|
+
$queryAlias$: saveResource(resource: $resource){
|
|
7
|
+
name
|
|
8
|
+
resource
|
|
9
|
+
}
|
|
10
|
+
}`),this.templateByQuery.set("deleteResource",e.gql`mutation($name: String!) {
|
|
11
|
+
$queryAlias$: deleteResource(name: $name)
|
|
12
|
+
}`)}loadResource(e){if(r._loadingResource.has(e))return r._loadingResource.get(e);const n=new Promise(((n,o)=>{t.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchResource")}).then((t=>{n(null==t?void 0:t.resource),r._loadingResource.delete(e)})).catch((t=>{o(t),r._loadingResource.delete(e)}))}));return r._loadingResource.set(e,n),n}saveResource(e,n){return new Promise(((r,o)=>{t.get().callGraphQL({values:{resource:{name:n,resource:JSON.stringify(e)}},query:this.templateByQuery.get("saveResource")}).then((e=>{r(e)})).catch((e=>{o(e)}))}))}deleteResource(e){return new Promise(((n,r)=>{t.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("deleteResource")}).then((()=>{n()})).catch((e=>{r(e)}))}))}}r._loadingResource=new Map;class o extends r{constructor(){super(),this.queryConfig=new Map,this.buildTemplatesConfig()}buildTemplatesConfig(){this.queryConfig.set("fetchUserAvailableConfigs",e.gql`query($name: String!) {
|
|
13
|
+
$queryAlias$: fetchUserAvailableConfigs(name: $name){
|
|
14
|
+
name
|
|
15
|
+
origin
|
|
16
|
+
key
|
|
17
|
+
}
|
|
18
|
+
}`),this.queryConfig.set("fetchLegacyConfig",e.gql`query($name: String!) {
|
|
19
|
+
$queryAlias$: fetchLegacyConfig(name: $name){
|
|
20
|
+
name
|
|
21
|
+
resource
|
|
22
|
+
}
|
|
23
|
+
}`),this.queryConfig.set("fetchDefaultConfig",e.gql`query($name: String!) {
|
|
24
|
+
$queryAlias$: fetchDefaultConfig(name: $name){
|
|
25
|
+
name
|
|
26
|
+
resource
|
|
27
|
+
}
|
|
28
|
+
}`)}loadFormConfig(e,t){return new Promise(((n,r)=>{Promise.all([this.loadResource(this.getPath(t,e)),this.loadResource(this.getPath(`FormCardState:${t}`,e,"form-card")),this.loadResource(this.getPath(t,e,"summary")),this.loadResource(this.getPath(t,e,"defaultValues"))]).then((([e,t,r,o])=>{let s;if(null!=e){s=Object.assign(Object.assign({},JSON.parse(e)),{emptyConfig:!1});const{tabs:t,fields:n}=s;if(t){const e=new Map(t.map((e=>[e.label,e])));null==n||n.forEach((t=>{var n;return t.tab=(null===(n=e.get(this.getTabName(t.tab)))||void 0===n?void 0:n.label)||e.get(this.getTabName(t.tab))}))}s.fields=null==n?void 0:n.map((e=>{if("readonly"in e){const t=!0===e.readonly;delete e.readonly,e.readOnly=t}return e}))}null!=t&&(null==s&&(s={emptyConfig:!0,fields:[]}),s.cardsState=new Map(JSON.parse(t))),null!=r&&(null==s&&(s={emptyConfig:!0,fields:[]}),s.summary=new Map(Object.entries(JSON.parse(r)))),null!=o&&(null==s&&(s={emptyConfig:!0,fields:[]}),s.defaultVars=new Map(Object.entries(JSON.parse(o)))),n(s)})).catch((e=>{r(e)}))}))}getTabName(e){return"object"==typeof e?e.label:e}saveCardState(e,t,n){const r=this.getPath(`FormCardState:${n}`,t,"form-card");return new Promise(((t,n)=>{this.saveResource(Array.from(e.entries()),r).then((e=>{t(new Map(JSON.parse(e.resource)))})).catch((e=>{n(e)}))}))}saveConfig(e,t,n){delete e.cardsState,delete e.defaultVars,delete e.summary;const r=this.getPath(n,t);return new Promise(((t,n)=>{this.saveResource(e,r).then((e=>{t(JSON.parse(e.resource))})).catch((e=>{n(e)}))}))}fetchUserAvailableConfigs(e,n){const r=this.getPath(n,e);return new Promise(((e,n)=>{t.get().callGraphQL({values:{name:r},query:this.queryConfig.get("fetchUserAvailableConfigs")}).then((t=>{e(t)})).catch((e=>{n(e)}))}))}fetchLegacyConfig(e,r){const o=this.getPath(r,e);return new Promise(((e,r)=>{t.get().callGraphQL({values:{name:o},query:this.queryConfig.get("fetchLegacyConfig")}).then((t=>{e(n.stringToObject((null==t?void 0:t.resource)||""))})).catch((e=>{r(e)}))}))}fetchDefaultConfig(e,r){const o=this.getPath(r,e);return new Promise(((e,r)=>{t.get().callGraphQL({values:{name:o},query:this.queryConfig.get("fetchDefaultConfig")}).then((t=>{(null==t?void 0:t.resource)||e(null),e(n.stringToObject(null==t?void 0:t.resource))})).catch((e=>{r(e)}))}))}getPath(e,t,n="form"){return t?`cfg://${n}/${e}/${t}`:`cfg://${n}/${e}`}async fetchLegacyConfigurableForm(e){const r={requestBody:{config:{chave:e,tipo:"T"}}},o=await t.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(r));if(!n.isEmpty(o))return this.buildLegacyConfigurableForm(o)}async fetchSimpleFormConfig(e){const n={requestBody:{formConfig:{configName:e}}},r=await t.get().callServiceBroker("FormConfig.getFormConfig",JSON.stringify(n));return this.processConfig(r)}async saveSimpleFormConfig(e,n){const r=this.buildSaveSimpleFormConfigPayload(e,n),o=await t.get().callServiceBroker("FormConfig.saveFormConfig",JSON.stringify(r));this.processConfig(o)}processConfig(e){return n.isEmpty(e)?[]:this.getResponseAsArray(e).map((e=>e.name))}getResponseAsArray(e){var t,n,r;const o=null!==(r=null===(n=null===(t=null==e?void 0:e.formConfig)||void 0===t?void 0:t.layout)||void 0===n?void 0:n.field)&&void 0!==r?r:[];return Array.isArray(o)?o:[o]}buildSaveSimpleFormConfigPayload(e,t){return{formConfig:{configName:e,layout:{field:t.map((e=>({name:e})))},metadata:{field:[]}}}}async restoreFormConfig(e){const n={requestBody:{formConfig:{configName:e}}};await t.get().callServiceBroker("FormConfig.restoreFormConfig",JSON.stringify(n))}buildLegacyConfigurableForm(e){var t,n,r;const o=null!==(r=null===(n=null===(t=null==e?void 0:e.formConfig)||void 0===t?void 0:t.layout)||void 0===n?void 0:n.field)&&void 0!==r?r:[];return{emptyConfig:!1,fields:Array.isArray(o)?o:[o]}}async fetchLayoutFormConfig(e){const r={requestBody:{config:{chave:e,tipo:"T"}}},o=await t.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(r));if(!n.isEmpty(o))return o.config}async saveLayoutFormConfig(e,r){const o={requestBody:{config:Object.assign(Object.assign({},r),{chave:e,tipo:"T"})}},s=await t.get().callServiceBroker("SystemUtilsSP.saveConf",JSON.stringify(o));if(!n.isEmpty(s))return s}}var s;!function(e){e.USER="USER",e.DEFAULT="DEFAULT",e.SHARED="SHARED"}(s||(s={}));export{o as F,r as R,s as U}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,e as t,h as i,f as o,g as n}from"./p-2c9d0870.js";const e=class{constructor(i){s(this,i),this.snkCustomSlotGuideLoaded=t(this,"snkCustomSlotGuideLoaded",7),this.slotName="CUSTOM_SLOT_GUIDE"}onGuideChange(s){this._element.style.setProperty("display",s.detail===this.slotName?"block":"none")}onFormConfigVisibilityChange(s){s.detail&&this._element.style.setProperty("display","none")}componentDidLoad(){this.snkCustomSlotGuideLoaded.emit(this.slotName)}render(){return i(o,{slot:this.slotName,id:this.slotName,class:"custom-slot-guide-container"},i("slot",null))}get _element(){return n(this)}};e.style=".sc-snk-custom-slot-guide-h{display:none}";export{e as snk_custom_slot_guide}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as e,F as t}from"./p-
|
|
1
|
+
import{R as e,F as t}from"./p-3870748a.js";import{D as i,d as s}from"./p-2af8aca3.js";import{F as r}from"./p-ff1990ad.js";import{ObjectUtils as a}from"@sankhyalabs/core";var n;function l(e,t){if(null==e)return e;if(e instanceof Date)return e.toISOString();if("object"==typeof e){if(e instanceof Array)return e.map((e=>l(r.MULTI_LIST===t?function(e,t){var i={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(i[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(i[s[r]]=e[s[r]])}return i}(e,["label"]):e)));{const i=Object.assign({},e);return Object.keys(e).forEach((s=>{void 0!==e[s]?i[s]=l(e[s],t):delete i[s]})),i}}return e}class o{constructor(){this.DEFAULT_RESOURCE="_default",this.templateByQuery=new Map,this.buildTemplates()}resolveURI(e,t,i){let s="filter-assistent-config://"+e;return t&&(s+="."+t),i&&(s+=this.DEFAULT_RESOURCE),s}resolveLegacyConfigName(e,t){if(!e)return"";let i=`?legacyResourceID=${e}`;return t&&(i+=this.DEFAULT_RESOURCE),i}buildTemplates(){this.templateByQuery.set("fetchFilterFields",s.gql`
|
|
2
2
|
query($name: String!) {
|
|
3
3
|
$queryAlias$: fetchFilterFields(name: $name){
|
|
4
4
|
currentLink {
|
|
@@ -53,4 +53,4 @@ import{R as e,F as t}from"./p-9317942f.js";import{D as i,d as s}from"./p-bb2f5f3
|
|
|
53
53
|
valid
|
|
54
54
|
message
|
|
55
55
|
}
|
|
56
|
-
}`)}async loadDefaultFilter(e,t,i,s){return this.loadPersonalizedFilter(e,t,i,s,!0)}async loadPersonalizedFilter(e,t,s,r,a){return new Promise(((n,l)=>{i.get().callGraphQL({values:{name:this.resolveURI(e,s,a)+"/"+t+this.resolveLegacyConfigName(r,a)},query:this.templateByQuery.get("fetchFilterAssistent")}).then((e=>{e.assistent=JSON.parse(e.assistent),n(e)})).catch((e=>{l(e)}))}))}async saveDefaultFilter(e,t,i){return this.savePersonalizedFilter(e,t,i,!0)}async savePersonalizedFilter(e,t,s,r){if(!e||0==Object.keys(e).length)return Promise.reject(new Error("personalizedFilter não pode ser vazio"));let a=JSON.parse(JSON.stringify(e));return a.assistent=JSON.stringify(a.assistent),new Promise(((e,n)=>{i.get().callGraphQL({values:{name:this.resolveURI(t,s,r),filterAssistent:a},query:this.templateByQuery.get("savePersonalizedFilter")}).then((t=>{e(t)})).catch((e=>{n(e)}))}))}removeDefaultFilter(e,t,i){return this.removePersonalizedFilter(e,t,i,!0)}async removePersonalizedFilter(e,t,s,r){return new Promise(((a,n)=>{i.get().callGraphQL({values:{name:this.resolveURI(t,s,r),filterId:e.id},query:this.templateByQuery.get("deletePersonalizedFilter")}).then((e=>{a(e)})).catch((e=>{n(e)}))}))}async validatePersonalizedFilter(e,t){return new Promise(((s,r)=>{i.get().callGraphQL({values:{dataUnitName:e,expression:t},query:this.templateByQuery.get("validateExpression")}).then((e=>{s(e)})).catch((e=>{r(e)}))}))}loadFields(e){return new Promise(((t,s)=>{i.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchFilterFields")}).then((e=>{var i;let s=e.fields;for(const e of s){if(Array.isArray(e.properties)&&e.properties.length>0){const t=e.properties.reduce(((e,t)=>(e[t.name]=t.value,e)),{});e.properties=t}(null===(i=null==e?void 0:e.properties)||void 0===i?void 0:i.options)&&(e.properties.options=JSON.parse(e.properties.options))}t(Object.assign(Object.assign({},e),{fields:s}))})).catch((e=>{s(e)}))}))}}!function(e){e.form="form",e.grid="grid",e.filterBar="filterBar"}(n||(n={}));class c{static addFilterBarLegacyConfig(e,t){this.validateResourceId(t),this.filterBarLegacyConfig.set(e,t)}static addFormLegacyConfig(e,t){this.validateResourceId(t),this.formLegacyConfig.set(e,t)}static addGridLegacyConfig(e,t){this.validateResourceId(t),this.gridLegacyConfig.set(e,t)}static preload(e,t,i){t&&(null==i?void 0:i.gridLegacyConfig)&&c.addGridLegacyConfig(t,i.gridLegacyConfig),t&&(null==i?void 0:i.formLegacyConfig)&&c.addFormLegacyConfig(t,i.formLegacyConfig),c.loadFormConfig(t,e),c.loadGridConfig(t,e)}static async loadFilterBarConfig(e,t,i){i=this.handleLegacyConfig(e,n.filterBar,i);const s=c.buildCacheID(e,n.filterBar,t);return c.configById.has(s)||c.configById.set(s,c.filterBarConfigFetcher.getConfig(t,e,i)),c.configById.get(s)}static async loadFormConfig(e,t){e=this.handleLegacyConfigAsString(e,n.form);const i=c.buildCacheID(e,n.form,t);return c.configById.has(i)||c.configById.set(i,c.formConfigFetcher.loadFormConfig(e,t)),c.configById.get(i)}static async loadGridConfig(e,t){e=this.handleLegacyConfigAsString(e,n.grid);const i=c.buildCacheID(e,n.grid,t);return c.configById.has(i)||c.configById.set(i,c.gridConfigFetcher.getConfig(e,t)),c.configById.get(i)}static async saveFilterBarConfig(e,t,i){return await this.deleteFilterBarConfigCache(t,i),this.filterBarConfigFetcher.saveConfig(e,i,t)}static async saveFormConfig(e,t,i){return t=this.handleLegacyConfigAsString(t,n.form),await this.deleteFormConfigCache(t,i),this.formConfigFetcher.saveConfig(e,t,i)}static async saveCardState(e,t,i){return this.formConfigFetcher.saveCardState(e,t,i)}static async getDefaultGridConfig(e){return await this.gridConfigFetcher.getDefaultConfig(e)}static async saveGridConfig(e,t,i){if(null!=e)return t=this.handleLegacyConfigAsString(t,n.grid),await this.deleteGridConfigCache(t,i),this.gridConfigFetcher.saveConfig(e,t,i)}static async loadDefaultFilter(e,t,i){const s=this.filterBarLegacyConfig.get(i);return this.personalizedFilterFetcher.loadDefaultFilter(t,e,i,s)}static async loadPersonalizedFilter(e,t,i){const s=this.filterBarLegacyConfig.get(i);return this.personalizedFilterFetcher.loadPersonalizedFilter(t,e,i,s)}static async savePersonalizedFilter(e,t,i){return await this.deleteFilterBarConfigCache(i,t),this.personalizedFilterFetcher.savePersonalizedFilter(e,t,i)}static async saveDefaultFilter(e,t,i){return await this.deleteFilterBarConfigCache(i,t),this.personalizedFilterFetcher.saveDefaultFilter(e,t,i)}static async removeDefaultFilter(e,t,i){return this.personalizedFilterFetcher.removeDefaultFilter(e,t,i)}static async removePersonalizedFilter(e,t,i){return this.personalizedFilterFetcher.removePersonalizedFilter(e,t,i)}static async validatePersonalizedFilter(e,t){return this.personalizedFilterFetcher.validatePersonalizedFilter(e,t)}static async deleteGridConfigCache(e,t){await this.deleteConfigCache(e,t,n.grid)}static async deleteFormConfigCache(e,t){await this.deleteConfigCache(e,t,n.form)}static async deleteFilterBarConfigCache(e,t){await this.deleteConfigCache(e,t,n.filterBar)}static validateResourceId(e){if(!e)throw Error(this.LEGACY_CONFIG_NAME_ERROR_MESSAGE)}static handleLegacyConfig(e,t,i){let s;switch(t){case n.filterBar:s=this.filterBarLegacyConfig.get(e);break;case n.grid:s=this.gridLegacyConfig.get(e);break;case n.form:s=this.formLegacyConfig.get(e)}const r=i?Object.assign({},i):{};return s&&(r.legacyResourceID=s),r}static handleLegacyConfigAsString(e,t){const i=this.handleLegacyConfig(e,t).legacyResourceID;return i&&(e+=`?legacyResourceID=${i}`),e}static async deleteConfigCache(e,t,i){const s=c.buildCacheID(e,i,t);this.configById.delete(s)}static buildCacheID(e,t,i){return null==e?`req_${t}_${i}`:`req_${t}_${e}_${i}`}}c.LEGACY_CONFIG_NAME_ERROR_MESSAGE="LegacyConfigName precisa ser informado.",c.filterBarLegacyConfig=new Map,c.formLegacyConfig=new Map,c.gridLegacyConfig=new Map,c.configById=new Map,c.filterBarConfigFetcher=new class extends e{normalize(e){return e.map((e=>{const{id:t,value:i,fixed:s,visible:r,type:a,groupedItems:n}=e,o={id:t};if(i&&(o.value=l(i,a)),s&&(o.fixed=s),n){if(0===n.length)return;n.filter((e=>e.visible)).length>0&&(o.visible=!0),o.groupedItems=this.normalize(n)}else r&&(o.visible=!0);return o})).filter((e=>null!=e))}saveConfig(e,t,i){return this.saveResource(this.normalize(e),this.getPath(t,i))}getConfig(e,t,i){return new Promise(((s,r)=>{this.loadResource(this.getPath(e,t,i)).then((e=>{let t;if(e){const i=JSON.parse(e);t=this.buildFieldList(i.items)}s(t||[])})).catch((e=>{r(e)}))}))}buildFieldList(e){return e.map((e=>{var t,i;if(e.type===r.MULTI_LIST){const s=e.value;let r=null!==(i=null!==(t=null==s?void 0:s.elements)&&void 0!==t?t:null==s?void 0:s.members)&&void 0!==i?i:s;r=null!=r?r:[],r=Array.isArray(r)?r:[r],r=r.map((e=>Object.assign(Object.assign({},e),{id:void 0!==e.id?e.id:e.value}))),e.value=a.copy(r)}return e}))}getPath(e,t,i){let s=`cfg://filter/FilterBarState:${e}`;return t&&(s+=`.${t}`),i&&(s+=this.buildQueryString(i)),s}buildQueryString(e){let t="?";for(let i in e)e.hasOwnProperty(i)&&(t.length>1&&(t+="&"),t+=i+"="+e[i]);return t}},c.formConfigFetcher=new t,c.gridConfigFetcher=new class extends e{constructor(){super(...arguments),this.GRID_CONFIG_VERSION="V3:"}async getDefaultConfig(e){var t,s;const r={requestBody:{gridConfig:{configName:`GrdCfgHtml5:${e}`}}},a=await i.get().callServiceBroker("GridConfig.restoreGridConfigFromJson",JSON.stringify(r));return{columns:null!==(s=null===(t=null==a?void 0:a.gridConfig)||void 0===t?void 0:t.field)&&void 0!==s?s:[]}}getConfig(e,t){const i=this.getPath(t,e);return new Promise(((e,t)=>{this.loadResource(i).then((t=>{let i;t&&(i=JSON.parse(t)),e(i)})).catch((e=>{t(e)}))}))}saveConfig(e,t,i){const s=this.getPath(i,t);return new Promise(((t,i)=>{this.saveResource(e,s).then((e=>{t(JSON.parse(e.resource))})).catch((e=>{i(e)}))}))}getPath(e,t){return t?`cfg://grid/${this.GRID_CONFIG_VERSION}${e}/${t}`:`cfg://grid/${this.GRID_CONFIG_VERSION}${e}`}},c.personalizedFilterFetcher=new o;export{c as C,o as P}
|
|
56
|
+
}`)}async loadDefaultFilter(e,t,i,s){return this.loadPersonalizedFilter(e,t,i,s,!0)}async loadPersonalizedFilter(e,t,s,r,a){return new Promise(((n,l)=>{i.get().callGraphQL({values:{name:this.resolveURI(e,s,a)+"/"+t+this.resolveLegacyConfigName(r,a)},query:this.templateByQuery.get("fetchFilterAssistent")}).then((e=>{e.assistent=JSON.parse(e.assistent),n(e)})).catch((e=>{l(e)}))}))}async saveDefaultFilter(e,t,i){return this.savePersonalizedFilter(e,t,i,!0)}async savePersonalizedFilter(e,t,s,r){if(!e||0==Object.keys(e).length)return Promise.reject(new Error("personalizedFilter não pode ser vazio"));let a=JSON.parse(JSON.stringify(e));return a.assistent=JSON.stringify(a.assistent),new Promise(((e,n)=>{i.get().callGraphQL({values:{name:this.resolveURI(t,s,r),filterAssistent:a},query:this.templateByQuery.get("savePersonalizedFilter")}).then((t=>{e(t)})).catch((e=>{n(e)}))}))}removeDefaultFilter(e,t,i){return this.removePersonalizedFilter(e,t,i,!0)}async removePersonalizedFilter(e,t,s,r){return new Promise(((a,n)=>{i.get().callGraphQL({values:{name:this.resolveURI(t,s,r),filterId:e.id},query:this.templateByQuery.get("deletePersonalizedFilter")}).then((e=>{a(e)})).catch((e=>{n(e)}))}))}async validatePersonalizedFilter(e,t){return new Promise(((s,r)=>{i.get().callGraphQL({values:{dataUnitName:e,expression:t},query:this.templateByQuery.get("validateExpression")}).then((e=>{s(e)})).catch((e=>{r(e)}))}))}loadFields(e){return new Promise(((t,s)=>{i.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchFilterFields")}).then((e=>{var i;let s=e.fields;for(const e of s){if(Array.isArray(e.properties)&&e.properties.length>0){const t=e.properties.reduce(((e,t)=>(e[t.name]=t.value,e)),{});e.properties=t}(null===(i=null==e?void 0:e.properties)||void 0===i?void 0:i.options)&&(e.properties.options=JSON.parse(e.properties.options))}t(Object.assign(Object.assign({},e),{fields:s}))})).catch((e=>{s(e)}))}))}}!function(e){e.form="form",e.grid="grid",e.filterBar="filterBar"}(n||(n={}));class c{static addFilterBarLegacyConfig(e,t){this.validateResourceId(t),this.filterBarLegacyConfig.set(e,t)}static addFormLegacyConfig(e,t){this.validateResourceId(t),this.formLegacyConfig.set(e,t)}static addGridLegacyConfig(e,t){this.validateResourceId(t),this.gridLegacyConfig.set(e,t)}static preload(e,t,i){t&&(null==i?void 0:i.gridLegacyConfig)&&c.addGridLegacyConfig(t,i.gridLegacyConfig),t&&(null==i?void 0:i.formLegacyConfig)&&c.addFormLegacyConfig(t,i.formLegacyConfig),c.loadFormConfig(t,e),c.loadGridConfig(t,e)}static async loadFilterBarConfig(e,t,i){i=this.handleLegacyConfig(e,n.filterBar,i);const s=c.buildCacheID(e,n.filterBar,t);return c.configById.has(s)||c.configById.set(s,c.filterBarConfigFetcher.getConfig(t,e,i)),c.configById.get(s)}static async loadFormConfig(e,t){e=this.handleLegacyConfigAsString(e,n.form);const i=c.buildCacheID(e,n.form,t);return c.configById.has(i)||c.configById.set(i,c.formConfigFetcher.loadFormConfig(e,t)),c.configById.get(i)}static async loadGridConfig(e,t){e=this.handleLegacyConfigAsString(e,n.grid);const i=c.buildCacheID(e,n.grid,t);return c.configById.has(i)||c.configById.set(i,c.gridConfigFetcher.getConfig(e,t)),c.configById.get(i)}static async saveFilterBarConfig(e,t,i){return await this.deleteFilterBarConfigCache(t,i),this.filterBarConfigFetcher.saveConfig(e,i,t)}static async saveFormConfig(e,t,i){return t=this.handleLegacyConfigAsString(t,n.form),await this.deleteFormConfigCache(t,i),this.formConfigFetcher.saveConfig(e,t,i)}static async saveCardState(e,t,i){return this.formConfigFetcher.saveCardState(e,t,i)}static async getDefaultGridConfig(e){return await this.gridConfigFetcher.getDefaultConfig(e)}static async saveGridConfig(e,t,i){if(null!=e)return t=this.handleLegacyConfigAsString(t,n.grid),await this.deleteGridConfigCache(t,i),this.gridConfigFetcher.saveConfig(e,t,i)}static async deleteGridConfig(e,t){return e=this.handleLegacyConfigAsString(e,n.grid),await this.deleteGridConfigCache(e,t),this.gridConfigFetcher.deleteConfig(e,t)}static async loadDefaultFilter(e,t,i){const s=this.filterBarLegacyConfig.get(i);return this.personalizedFilterFetcher.loadDefaultFilter(t,e,i,s)}static async loadPersonalizedFilter(e,t,i){const s=this.filterBarLegacyConfig.get(i);return this.personalizedFilterFetcher.loadPersonalizedFilter(t,e,i,s)}static async savePersonalizedFilter(e,t,i){return await this.deleteFilterBarConfigCache(i,t),this.personalizedFilterFetcher.savePersonalizedFilter(e,t,i)}static async saveDefaultFilter(e,t,i){return await this.deleteFilterBarConfigCache(i,t),this.personalizedFilterFetcher.saveDefaultFilter(e,t,i)}static async removeDefaultFilter(e,t,i){return this.personalizedFilterFetcher.removeDefaultFilter(e,t,i)}static async removePersonalizedFilter(e,t,i){return this.personalizedFilterFetcher.removePersonalizedFilter(e,t,i)}static async validatePersonalizedFilter(e,t){return this.personalizedFilterFetcher.validatePersonalizedFilter(e,t)}static async deleteGridConfigCache(e,t){await this.deleteConfigCache(e,t,n.grid)}static async deleteFormConfigCache(e,t){await this.deleteConfigCache(e,t,n.form)}static async deleteFilterBarConfigCache(e,t){await this.deleteConfigCache(e,t,n.filterBar)}static validateResourceId(e){if(!e)throw Error(this.LEGACY_CONFIG_NAME_ERROR_MESSAGE)}static handleLegacyConfig(e,t,i){let s;switch(t){case n.filterBar:s=this.filterBarLegacyConfig.get(e);break;case n.grid:s=this.gridLegacyConfig.get(e);break;case n.form:s=this.formLegacyConfig.get(e)}const r=i?Object.assign({},i):{};return s&&(r.legacyResourceID=s),r}static handleLegacyConfigAsString(e,t){const i=this.handleLegacyConfig(e,t).legacyResourceID;return i&&(e+=`?legacyResourceID=${i}`),e}static async deleteConfigCache(e,t,i){const s=c.buildCacheID(e,i,t);this.configById.delete(s)}static buildCacheID(e,t,i){return null==e?`req_${t}_${i}`:`req_${t}_${e}_${i}`}}c.LEGACY_CONFIG_NAME_ERROR_MESSAGE="LegacyConfigName precisa ser informado.",c.filterBarLegacyConfig=new Map,c.formLegacyConfig=new Map,c.gridLegacyConfig=new Map,c.configById=new Map,c.filterBarConfigFetcher=new class extends e{normalize(e){return e.map((e=>{const{id:t,value:i,fixed:s,visible:r,type:a,groupedItems:n}=e,o={id:t};if(i&&(o.value=l(i,a)),s&&(o.fixed=s),n){if(0===n.length)return;n.filter((e=>e.visible)).length>0&&(o.visible=!0),o.groupedItems=this.normalize(n)}else r&&(o.visible=!0);return o})).filter((e=>null!=e))}saveConfig(e,t,i){return this.saveResource(this.normalize(e),this.getPath(t,i))}getConfig(e,t,i){return new Promise(((s,r)=>{this.loadResource(this.getPath(e,t,i)).then((e=>{let t;if(e){const i=JSON.parse(e);t=this.buildFieldList(i.items)}s(t||[])})).catch((e=>{r(e)}))}))}buildFieldList(e){return e.map((e=>{var t,i;if(e.type===r.MULTI_LIST){const s=e.value;let r=null!==(i=null!==(t=null==s?void 0:s.elements)&&void 0!==t?t:null==s?void 0:s.members)&&void 0!==i?i:s;r=null!=r?r:[],r=Array.isArray(r)?r:[r],r=r.map((e=>Object.assign(Object.assign({},e),{id:void 0!==e.id?e.id:e.value}))),e.value=a.copy(r)}return e}))}getPath(e,t,i){let s=`cfg://filter/FilterBarState:${e}`;return t&&(s+=`.${t}`),i&&(s+=this.buildQueryString(i)),s}buildQueryString(e){let t="?";for(let i in e)e.hasOwnProperty(i)&&(t.length>1&&(t+="&"),t+=i+"="+e[i]);return t}},c.formConfigFetcher=new t,c.gridConfigFetcher=new class extends e{constructor(){super(...arguments),this.GRID_CONFIG_VERSION="V3:"}async getDefaultConfig(e){var t,s;const r={requestBody:{gridConfig:{configName:`GrdCfgHtml5:${e}`}}},a=await i.get().callServiceBroker("GridConfig.restoreGridConfigFromJson",JSON.stringify(r));return{columns:null!==(s=null===(t=null==a?void 0:a.gridConfig)||void 0===t?void 0:t.field)&&void 0!==s?s:[]}}getConfig(e,t){const i=this.getPath(t,e);return new Promise(((e,t)=>{this.loadResource(i).then((t=>{let i;t&&(i=JSON.parse(t)),e(i)})).catch((e=>{t(e)}))}))}saveConfig(e,t,i){const s=this.getPath(i,t);return new Promise(((t,i)=>{this.saveResource(e,s).then((e=>{t(JSON.parse(e.resource))})).catch((e=>{i(e)}))}))}deleteConfig(e,t){const i=this.getPath(t,e);return new Promise(((e,t)=>{this.deleteResource(i).then((()=>{e()})).catch((e=>{t(e)}))}))}getPath(e,t){return t?`cfg://grid/${this.GRID_CONFIG_VERSION}${e}/${t}`:`cfg://grid/${this.GRID_CONFIG_VERSION}${e}`}},c.personalizedFilterFetcher=new o;export{c as C,o as P}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ApplicationContext as n}from"@sankhyalabs/core";async function e(n){const e=await fetch(n);return await e.blob()}function r(n,e){return n?`${n}_${e}`:e}async function t(e,t,o,a){const i=r(t,o),s=function(e){let r=function(e,r="mge"){let t=`/${r}/sessionUpload.${r}?sessionkey=${e}`;return async function(e){var r;const t=n.getContextValue("__SNK__APPLICATION__");if(!t)return!1;const o=await(null===(r=t.getResourceID)||void 0===r?void 0:r.call(t))||"";return"mge"===e&&o.startsWith("br.com.sankhya.menu.adicional")}(r)&&/[ !@#$%^&*()+\-=\[\]{};':"\\|,.<>\/?]/.test(e)&&(t+=`&encodedKey=${btoa(encodeURI(e))}`),t}(e);return r+="&fitem=S&salvar=S&useCache=N",r}(i);return new Promise(((n,r)=>{const t=new FormData;t.append("arquivo",e);const o=new XMLHttpRequest;o.addEventListener("load",(()=>{o.status>=200&&o.status<300?n(`/mge/UPLOADING_${i}.dbimage`):r(new Error(`Upload failed: ${o.statusText}`))})),o.addEventListener("error",(()=>{r(new Error("Upload error"))})),a&&o.upload.addEventListener("progress",a),o.open("POST",s),o.send(t)}))}function o(n){if(!n)return;const e={},r=n.metadata.fields,t=n.getSelectedRecord();return r.forEach((n=>{n.properties.isPrimaryKey&&t&&(e[n.name]=t[n.name])})),e}async function a(n,e,r){const t=function(n,e,r){if(!n)return;let t=`${window.location.origin}/mge/${e}@${r}`;for(const e in n)t+=`@${e}=${n[e]}`;return t+=".dbimage",t}(n,r,e);if(t)try{const n=await fetch(t);if(n.ok){const e=await n.blob();return await async function(n){return new Promise(((e,r)=>{const t=new FileReader;t.onloadend=()=>{e(t.result)},t.onerror=r,t.readAsDataURL(n)}))}(e)}}catch(n){console.error("Error downloading image:",n)}}export{r as a,e as b,a as d,o as g,t as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,
|
|
1
|
+
import{r as t,e as i,h as e,F as s,f as l,g as r}from"./p-2c9d0870.js";import{ElementIDUtils as n,ObjectUtils as a}from"@sankhyalabs/core";import{ApplicationUtils as h}from"@sankhyalabs/ezui/dist/collection/utils";import{P as o}from"./p-68c1a093.js";import{E as c}from"./p-1a68fb59.js";import{F as d}from"./p-ff1990ad.js";import"./p-84345e7a.js";const u=class{constructor(e){t(this,e),this.filterChange=i(this,"filterChange",7),this.config=void 0,this.getMessage=void 0,this.showHardFixed=!0,this.removalBlocked=!1}async setFocusField(){var t,i,e,s;this._editor&&(this._editor.setFocus?null===(i=null===(t=this._editor)||void 0===t?void 0:t.setFocus)||void 0===i||i.call(t):this._editor.focus&&(null===(s=null===(e=this._editor)||void 0===e?void 0:e.focus)||void 0===s||s.call(e)))}async clearValue(){this._editor&&this._editor.clearValue&&await this._editor.clearValue()}observeConfig(t){var i,e;this._editor&&(this._editor.config=t),null===(e=null===(i=this._editor)||void 0===i?void 0:i.reloadList)||void 0===e||e.call(i),this._customElementObject=this.getContentEditor()}componentDidLoad(){if(this._element){n.addIDInfo(this._element);const t=this._element.getAttribute(n.DATA_ELEMENT_ID_ATTRIBUTE_NAME);this._idContentEditor=`${t}_${this.config.id}`}}changeConfig(t){this.filterChange.emit(t)}getContentEditor(){switch(this.config.type){case d.BINARY_SELECT:return{tag:"snk-filter-binary-select"};case d.MULTI_SELECT:return{tag:"snk-filter-multi-select"};case d.PERIOD:return{tag:"snk-filter-period"};case d.SEARCH:return{tag:"snk-filter-search"};case d.NUMBER:return{tag:"snk-filter-number"};case d.PERSONALIZED:return{tag:"snk-personalized-filter-editor",props:{presentationMode:c.CHIP,onValueChanged:t=>this.handleValueChanged(t)}};case d.CHECK_BOX_LIST:return{tag:"snk-filter-checkbox-list",props:{onValueChanged:t=>this.config=Object.assign(Object.assign({},this.config),{value:t.detail})}};case d.MULTI_LIST:return{tag:"snk-entity-list",props:{onValueChanged:t=>this.config=Object.assign(Object.assign({},this.config),{value:t.detail})}}}return{tag:"snk-filter-text"}}handleValueChanged({detail:t}){const i=(null==t?void 0:t.items)||this.config.groupedItems;this.config=Object.assign(Object.assign({},this.config),{groupedItems:i,visible:(i||[]).filter((t=>t.visible)).length>0})}removeItem(){const t=this.config.type===d.MULTI_LIST&&Array.isArray(this.config.value)?this.config.value.map((t=>Object.assign(Object.assign({},t),{check:!1}))):void 0,i=Object.assign(Object.assign({},this.config),{visible:!1,fixed:!1,value:t});null!=i.groupedItems&&(i.groupedItems=i.groupedItems.map((t=>Object.assign(Object.assign({},t),{visible:!1,fixed:!1,value:void 0})))),this.changeConfig(i)}removeItemFromGroup(t){return Object.assign(Object.assign({},t),{visible:!1,fixed:!1,value:void 0})}getPopUpHeaderButtons(){return e(s,null,!this.removalBlocked&&!this.config.removalBlocked&&this.buildIcon(this.getMessage("snkFilterBar.removeFilter"),"delete",(()=>this.removeItem())),this.showHardFixed&&!this.config.hardFixed&&this.buildIcon(this.getMessage(this.config.fixed?"snkFilterBar.unpinFilter":"snkFilterBar.pinFilter"),this.config.fixed?"un-pin":"push-pin",(()=>this.changeConfig(Object.assign(Object.assign({},this.config),{fixed:!this.config.fixed})))))}buildIcon(t,i,s){return e("button",{onClick:()=>s(),class:"sc-snk-filter-bar snk-filter-item__editor-header-button",ref:i=>i&&this.buildIdButton(i,t)},e("ez-icon",Object.assign({title:t,iconName:i},{[n.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${n.getInternalIDInfo(`_${t}`)}`})))}buildIdButton(t,i){if(!t)return;const e={id:i};t.removeAttribute(n.DATA_ELEMENT_ID_ATTRIBUTE_NAME),n.addIDInfoIfNotExists(t,"button",e)}clearBinarySelectValues(){var t;const i=this._editor||{};null===(t=i.resetValues)||void 0===t||t.call(i),this.config=a.copy(this.originalConfig),this.changeConfig(Object.assign(Object.assign({},this.config),{value:void 0}))}apply(){if(!o.validateVariableValues(this.config,this._editor.value))return h.alert(this.getMessage("snkFilterBar.filterModal.validations.notFullFilled.title"),this.getMessage("snkFilterBar.filterModal.validations.notFullFilled.message"));const t=void 0!==this._editor.value?this._editor.value:this.config.value;this.changeConfig(Object.assign(Object.assign({},this.config),{visible:this.isVisible(),value:t}))}isVisible(){return!(this.config.groupedItems&&this.config.groupedItems.length>0)||this.config.groupedItems.filter((t=>t.visible)).length>0}clear(){var t;if(this.config.type!==d.BINARY_SELECT){if(d.MULTI_LIST===this.config.type){const i=a.copy(this.config);return null===(t=i.value)||void 0===t||t.forEach((t=>!!t&&(t.check=!1))),void(this.config=a.copy(i))}this.changeConfig(Object.assign(Object.assign({},this.config),{value:void 0}))}else this.clearBinarySelectValues()}filterCanBeCleared(){return this.config.type!==d.PERSONALIZED}onKeyDonwListener(t){"Enter"===t.key&&this.apply()}buildRightSlot(t){return e("ez-icon",{iconName:"delete",onClick:()=>this.removeValueFromConfig(t)})}removeValueFromConfig(t){var i,e;if(this.config){const s=a.copy(this.config),l=null===(i=s.value)||void 0===i?void 0:i.findIndex((i=>(null==i?void 0:i.id)===t.id));null===(e=s.value)||void 0===e||e.splice(l,1),this.config=a.copy(s)}}componentWillLoad(){this.originalConfig=a.copy(this.config),this._customElementObject=this.getContentEditor()}render(){const{tag:t,props:i}=this._customElementObject;return e(l,null,e("div",{class:"col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center"},e("div",{class:"ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header"},this.config.detailTitle),this.getPopUpHeaderButtons()),e(t,Object.assign({maxHeightList:"240px",ref:t=>this._editor=t,value:this.config.value,config:this.config,onKeyDown:t=>this.onKeyDonwListener(t),"data-element-id":this._idContentEditor,getMessage:this.getMessage,rightListSlotBuilder:t=>this.buildRightSlot(t)},i)),e("hr",{class:"sc-snk-filter-bar snk-filter__popover-rule"}),e("div",{class:"ez-col ez-col--sd-12 ez-align--right"},this.filterCanBeCleared()&&e("ez-button",{label:this.getMessage("snkFilterBar.cleanFilter"),onClick:()=>this.clear(),size:"small"}),e("ez-button",{ref:t=>this._applyButton=t,label:this.getMessage("snkFilterBar.applyFilter"),onClick:()=>this.apply(),size:"small",class:"ez-button--primary ez-padding-left--medium"})))}get _element(){return r(this)}static get watchers(){return{config:["observeConfig"]}}};export{u as snk_filter_detail}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{S as snk_data_unit}from"./p-f185d5ad.js";import"./p-2c9d0870.js";import"@sankhyalabs/core";import"@sankhyalabs/ezui/dist/collection/utils";import"./p-554c0e54.js";import"./p-d972a9c1.js";import"./p-2af8aca3.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";import"@sankhyalabs/core/dist/dataunit/metadata/DataType";import"./p-7dd49d15.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{UserInterface as e,DataType as t,ApplicationContext as n,ErrorException as i}from"@sankhyalabs/core";import{d as o,D as r}from"./p-
|
|
1
|
+
import{UserInterface as e,DataType as t,ApplicationContext as n,ErrorException as i}from"@sankhyalabs/core";import{d as o,D as r}from"./p-2af8aca3.js";function a(e){const t=(n=e.fieldsMetadata)&&n.length?n.map((e=>({name:e.fieldName,label:e.description,dataType:u(e.type),userInterface:l(e),properties:s(e)}))):[];var n;return{label:e.entityDescription,name:e.descriptionField,fields:t}}function s(e){const t={};return t.options=function(e){const t=e.options;if(!t)return;const n=[];return Object.keys(t).forEach((e=>{n.push({label:e,value:t[e]})})),n}(e),t.mask=function(e){const t=e.uiType;return t?String(t).toLowerCase():void 0}(e),t}function l(t){const n=t.options;return n&&Object.keys(n).length>0?e.OPTIONSELECTOR:"D"===t.type?e.DATE:"H"===t.type?e.DATETIME:"T"===t.type?e.TIME:"I"===t.type?e.INTEGERNUMBER:void 0}function u(e){switch(e){case"F":case"I":return t.NUMBER;case"D":case"H":return t.DATE;case"B":return t.OBJECT;default:return t.TEXT}}function c(e){return Object.assign({id:e.codigo,label:`${e.caminho} - ${e.descricao}`,bold:"N"===e.analitico,props:{analitico:"S"===e.analitico}},e.no&&{children:e.no.map(c)})}var d,v,f;!function(e){e[e.GRID=0]="GRID",e[e.CARDS=1]="CARDS",e[e.TREE=2]="TREE"}(d||(d={}));class m{constructor(){this._defaultPageSize=100,this._templateByQuery=new Map,this._searchListenersByDataUnit=new Map,this.buldTemplates()}buldTemplates(){this._templateByQuery.set("search",o.gql`query($entityName: String! $argument: String $criteria: InputSearchCriteria $options: InputSearchOptions) {
|
|
2
2
|
$queryAlias$: search(entityName: $entityName argument: $argument criteria: $criteria options: $options){
|
|
3
3
|
value
|
|
4
4
|
label
|
|
5
5
|
}
|
|
6
|
-
}`)}loadSearchOptions(e,n,i,o){var a;const s=(null==n?void 0:n.toString().trim())||void 0;n=isNaN(Number(s))&&s?`%${s}`:s,null==i||i.params.forEach((e=>{e.dataType===t.OBJECT&&(e.value=JSON.stringify(e.value))}));const l=this.applySearchListener(v.beforeSearch,e,n,i,o),u={argument:(null==l?void 0:l.argument)||n,entityName:e,criteria:(null==l?void 0:l.criteria)||i,options:(null==l?void 0:l.searchOptions)||o};return u.options&&(null===(a=u.options)||void 0===a||delete a.dataUnitId),new Promise(((e,t)=>{r.get().callGraphQL({values:u,query:this._templateByQuery.get("search")}).then((t=>{e(t)})).catch((e=>{t(e)}))}))}buildDescriptionCacheKey(e,t){return`${e}__${t}`}async loadByCode(e,t,n,i){const o=this.buildDescriptionCacheKey(e,t),r=m.DESCRIPTIONS_BY_CODE[o];if(r)return Promise.resolve(r);const a=await this.loadAdvancedSearch(e,void 0,n,i,t);return m.DESCRIPTIONS_BY_CODE[o]=a,a}loadAdvancedSearch(e,o,a,s,l){var u,c,d,f,m,p;const h=this.applySearchListener(v.beforeSearch,e,o,a,s),N={argument:(null==h?void 0:h.argument)||o,criteria:(null==h?void 0:h.criteria)||a,searchOptions:Object.assign(Object.assign({},s),null==h?void 0:h.searchOptions)},S={query:{$:null===(u=N.criteria)||void 0===u?void 0:u.expression}};(null===(d=null===(c=N.criteria)||void 0===c?void 0:c.params)||void 0===d?void 0:d.length)>0&&(S.params={param:N.criteria.params.map((e=>{let o=e.value;if("string"==typeof o){const e=/CTX\{([^}]+)\}/.exec(o);e&&(o=n.getContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${e[1]})__`))}if(e.dataType===t.NUMBER&&void 0===o)throw new i("Falha detectada",`O campo ${e.name} deve ser informado.`);let r=e.dataType;return r===t.OBJECT?(o=o.value,r="S"):r=g(e.dataType),{$:o,type:r}}))});const y=null!=s?Object.assign(Object.assign({},null==N?void 0:N.searchOptions),{pkFieldName:s.codeFieldName,label:s.descriptionFieldName,fieldName:s.codeFieldName,useDescriptionOptions:!1,enableRowsCounter:!0,limit:s.limit}):void 0,O={serviceName:"PesquisaSP.getSuggestion",requestBody:{criteria:Object.assign({entityName:e,compacted:!1,ignoreEntityCriteria:null!==(f=null==y?void 0:y.ignoreEntityCriteria)&&void 0!==f&&f,limit:null!==(m=null==y?void 0:y.limit)&&void 0!==m?m:this._defaultPageSize,orderByDesc:!1,externalCriteria:S,localEntityName:null===(p=N.searchOptions)||void 0===p?void 0:p.rootEntity},{options:y}),clientEventList:{clientEvent:[]}}};null==l?O.requestBody.criteria.query={$:o}:O.requestBody.criteria.pk={$:l};const
|
|
6
|
+
}`)}loadSearchOptions(e,n,i,o){var a;const s=(null==n?void 0:n.toString().trim())||void 0;n=isNaN(Number(s))&&s?`%${s}`:s,null==i||i.params.forEach((e=>{e.dataType===t.OBJECT&&(e.value=JSON.stringify(e.value))}));const l=this.applySearchListener(v.beforeSearch,e,n,i,o),u={argument:(null==l?void 0:l.argument)||n,entityName:e,criteria:(null==l?void 0:l.criteria)||i,options:(null==l?void 0:l.searchOptions)||o};return u.options&&(null===(a=u.options)||void 0===a||delete a.dataUnitId),new Promise(((e,t)=>{r.get().callGraphQL({values:u,query:this._templateByQuery.get("search")}).then((t=>{e(t)})).catch((e=>{t(e)}))}))}buildDescriptionCacheKey(e,t){return`${e}__${t}`}async loadByCode(e,t,n,i){const o=this.buildDescriptionCacheKey(e,t),r=m.DESCRIPTIONS_BY_CODE[o];if(r)return Promise.resolve(r);const a=await this.loadAdvancedSearch(e,void 0,n,i,t);return m.DESCRIPTIONS_BY_CODE[o]=a,a}loadAdvancedSearch(e,o,a,s,l){var u,c,d,f,m,p;const h=this.applySearchListener(v.beforeSearch,e,o,a,s),N={argument:(null==h?void 0:h.argument)||o,criteria:(null==h?void 0:h.criteria)||a,searchOptions:Object.assign(Object.assign({},s),null==h?void 0:h.searchOptions)},S={query:{$:null===(u=N.criteria)||void 0===u?void 0:u.expression}};(null===(d=null===(c=N.criteria)||void 0===c?void 0:c.params)||void 0===d?void 0:d.length)>0&&(S.params={param:N.criteria.params.map((e=>{let o=e.value;if("string"==typeof o){const e=/CTX\{([^}]+)\}/.exec(o);e&&(o=n.getContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${e[1]})__`))}if(e.dataType===t.NUMBER&&void 0===o)throw new i("Falha detectada",`O campo ${e.name} deve ser informado.`);let r=e.dataType;return r===t.OBJECT?(o=o.value,r="S"):r=g(e.dataType),{$:o,type:r}}))});const y=null!=s?Object.assign(Object.assign({},null==N?void 0:N.searchOptions),{pkFieldName:s.codeFieldName,label:s.descriptionFieldName,fieldName:s.codeFieldName,useDescriptionOptions:!1,enableRowsCounter:!0,limit:s.limit}):void 0,O={serviceName:"PesquisaSP.getSuggestion",requestBody:{criteria:Object.assign({entityName:e,compacted:!1,ignoreEntityCriteria:null!==(f=null==y?void 0:y.ignoreEntityCriteria)&&void 0!==f&&f,limit:null!==(m=null==y?void 0:y.limit)&&void 0!==m?m:this._defaultPageSize,orderByDesc:!1,externalCriteria:S,localEntityName:null===(p=N.searchOptions)||void 0===p?void 0:p.rootEntity},{options:y}),clientEventList:{clientEvent:[]}}};null==l?O.requestBody.criteria.query={$:o}:O.requestBody.criteria.pk={$:l};const C={urlParams:{quietMode:!0}};return new Promise(((e,t)=>{r.get().callServiceBroker("PesquisaSP.getSuggestion",JSON.stringify(O),C).then((t=>e(t))).catch((e=>t(e)))}))}addSearchListener(e,t,n){var i;const o=this._searchListenersByDataUnit.get(t)||[],r=o.find((t=>t.entity===e));if(r){for(const e of Object.keys(n))if(e in r.listener){if((null===(i=r.listener[e])||void 0===i?void 0:i.toString())===n[e].toString())continue;r.listener[e]=n[e]}}else this._searchListenersByDataUnit.set(t,[...o,{entity:e,listener:n}]);return()=>{const n=o.filter((t=>t.entity!==e));n.length?this._searchListenersByDataUnit.set(t,n):this._searchListenersByDataUnit.delete(t)}}applySearchListener(e,t,n,i,o){var r;const a=null==o?void 0:o.dataUnitId;if(!a)return;const s=null===(r=this._searchListenersByDataUnit.get(a))||void 0===r?void 0:r.find((({entity:e})=>e===t));if(!s)return;const{listener:l}=s;return e in l?l[e]({argument:n,criteria:i,searchOptions:o}):void 0}async loadPresentationConfig(e){var t,n;let i=function(e){return{config:{chave:`PesquisaContent:${e}`,tipo:"T"}}}(e);const o=await r.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(i));return null!==(n=null===(t=null==o?void 0:o.config)||void 0===t?void 0:t.lastUsedMode)&&void 0!==n?n:"list"}async savePresentationConfig(e,t){let n=function(e,t){return{config:{lastUsedMode:t,chave:`PesquisaContent:${e}`,tipo:"T"}}}(e,t);await r.get().callServiceBroker("SystemUtilsSP.saveConf",JSON.stringify(n))}async loadPesquisaGridConfig(e){const t=function(e){return{gridConfig:{configName:`GrdCfgHtml5:grdcfg.dynaform.pesquisa.${e}`}}}(e);return function(e){var t,n;const i=[],o=null!==(n=null===(t=null==e?void 0:e.gridConfig)||void 0===t?void 0:t.field)&&void 0!==n?n:{};if(Object.keys(o).forEach((e=>i.push(o[e]))),i.length)return{columns:i}}(await r.get().callServiceBroker("GridConfig.getGridConfigFromJson",JSON.stringify(t)))}async savePesquisaGridConfig(e,t){const n=function(e,t){const n={};return null==t||t.forEach(((e,t)=>n[`field${t}`]=e)),{gridConfig:{compactMode:!0,configName:`GrdCfgHtml5:grdcfg.dynaform.pesquisa.${e}`,field:n}}}(e,t);await r.get().callServiceBroker("GridConfig.saveGridConfigFromJSON",JSON.stringify(n))}async loadTree(e,t,n,i){const o=this.buildLoadTreeRequestBody(e,t,n,i);return(null!==(s=null===(a=(await r.get().callServiceBroker("Pesquisa.getStructuredData",JSON.stringify(o))).arvore)||void 0===a?void 0:a.no)&&void 0!==s?s:[]).map(c);var a,s}buildLoadTreeRequestBody(e,t,n,i){var o,r;const a=this.applySearchListener(v.beforeSearch,e,t,n,i),s=null!==(o=null==a?void 0:a.searchOptions)&&void 0!==o?o:i,l=null==s?void 0:s.rootEntity,u=null==s?void 0:s.codeFieldName,c=null===(r=null==a?void 0:a.criteria)||void 0===r?void 0:r.expression,d=this.buildParams(a),f={nome:e,nomeInstanciaLocal:l,codeFieldName:u};return c&&(f.criterioLiteral={expressao:{$:c},parametro:d}),{instancia:f}}buildParams(e){var t,n;let i=null!==(n=null===(t=null==e?void 0:e.criteria)||void 0===t?void 0:t.params)&&void 0!==n?n:[];return i=i.map((e=>Object.assign(Object.assign({},e),{tipo:g(e.dataType),$:e.value}))),i}}function g(e){switch(e){case t.NUMBER:return"I";case t.DATE:return"D";default:return"S"}}m.DESCRIPTIONS_BY_CODE={},function(e){e.beforeSearch="beforeSearch"}(v||(v={})),function(e){e.LINK_AND_FILE_AT_THE_SAME_TIME="LINK_AND_FILE_AT_THE_SAME_TIME",e.ANY_LINK_OR_FILE_FILLED="ANY_LINK_OR_FILE_FILLED",e.UNKNOWN="UNKNOWN",e.DESCRIPTION_CANNOT_BE_CHANGED="DESCRIPTION_CANNOT_BE_CHANGED"}(f||(f={}));export{m as P,f as S,d as a,a as b}
|