@sankhyalabs/sankhyablocks 9.0.1 → 9.1.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ClientSideExporterProvider-fe52f7cf.js → ClientSideExporterProvider-0ce2bcd9.js} +23 -28
- package/dist/cjs/{ConfigStorage-6b633b10.js → ConfigStorage-48ba265b.js} +47 -19
- package/dist/cjs/{DataFetcher-875371e9.js → DataFetcher-1afdb18e.js} +14 -2
- package/dist/cjs/FormConfigHelper-c664dbae.js +260 -0
- package/dist/cjs/{pesquisa-fetcher-30cab386.js → ISave-c76e2c51.js} +35 -3
- package/dist/cjs/{PersonalizedFilterUtils-0184ffbb.js → PersonalizedFilterUtils-7259cf65.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-d680be08.js → SnkFormConfigManager-aa4631bd.js} +4 -5
- package/dist/cjs/{SnkMessageBuilder-bae64d0d.js → SnkMessageBuilder-e3b7850b.js} +63 -30
- package/dist/cjs/{auth-fetcher-24ba4135.js → auth-fetcher-1687ac0a.js} +1 -1
- package/dist/cjs/config-header.cjs.entry.js +79 -0
- package/dist/cjs/configs-button.cjs.entry.js +61 -0
- package/dist/cjs/{constants-241934b3.js → constants-6d82e405.js} +9 -38
- package/dist/cjs/{dataunit-fetcher-b95768e8.js → dataunit-fetcher-a723f0dc.js} +12 -8
- package/dist/cjs/default-filters-a09bf82b.js +8 -0
- package/dist/cjs/field-config_2.cjs.entry.js +324 -0
- package/dist/cjs/fields-layout.cjs.entry.js +341 -0
- package/dist/cjs/fields-selector.cjs.entry.js +74 -0
- package/dist/cjs/{filter-type.enum-b14ce507.js → filter-type.enum-2bb46d2a.js} +1 -0
- package/dist/cjs/{form-config-fetcher-e0a512c3.js → form-config-fetcher-40d3f752.js} +15 -1
- package/dist/cjs/guides-configurator.cjs.entry.js +164 -0
- package/dist/cjs/{index-ab1cfb44.js → index-0ad2baeb.js} +1 -1
- package/dist/cjs/{index-f9e81701.js → index-1cf293c1.js} +34 -12
- package/dist/cjs/{index-c5771aba.js → index-62760a9c.js} +5 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +7 -8
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/{snk-actions-button_5.cjs.entry.js → snk-actions-button_8.cjs.entry.js} +132 -10
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +183 -23
- package/dist/cjs/snk-attach.cjs.entry.js +9 -10
- package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +10 -3
- package/dist/cjs/snk-crud.cjs.entry.js +48 -76
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-exporter.cjs.entry.js +8 -9
- package/dist/cjs/{snk-data-unit-33937ffe.js → snk-data-unit-3684c96e.js} +227 -13
- package/dist/cjs/snk-data-unit.cjs.entry.js +5 -5
- package/dist/cjs/snk-default-filter.cjs.entry.js +77 -0
- package/dist/cjs/snk-detail-view.cjs.entry.js +68 -16
- package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +10 -8
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +5 -4
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +84 -30
- 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 +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +5 -5
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-search.cjs.entry.js +19 -6
- package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +20 -8
- package/dist/cjs/snk-form_2.cjs.entry.js +433 -0
- package/dist/cjs/snk-grid.cjs.entry.js +52 -39
- package/dist/cjs/{snk-guides-viewer-b6002ea7.js → snk-guides-viewer-edc0a00a.js} +139 -73
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +13 -13
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +55 -20
- package/dist/cjs/snk-pesquisa.cjs.entry.js +14 -15
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +148 -114
- package/dist/cjs/snk-taskbar.cjs.entry.js +10 -5
- package/dist/cjs/sortable.esm-9a110bb7.js +2668 -0
- package/dist/cjs/{taskbar-elements-ebddaef4.js → taskbar-elements-3b74cd21.js} +13 -2
- package/dist/cjs/{field-search-68e34bf4.js → taskbar-processor-2fba34a8.js} +0 -35
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +11 -14
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +5 -2
- package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +107 -0
- package/dist/collection/components/snk-application/snk-application.js +131 -12
- package/dist/collection/components/snk-configurator/snk-configurator.js +26 -1
- package/dist/collection/components/snk-crud/snk-crud.js +76 -67
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css +10 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +82 -4
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +54 -7
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +152 -82
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +15 -19
- package/dist/collection/components/snk-data-unit/MultipleUpdateHelper.js +128 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +107 -12
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +18 -5
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +80 -12
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.css +34 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.js +142 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +24 -15
- package/dist/collection/components/snk-filter-bar/types/default-filters.js +6 -0
- package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js +1 -0
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +4 -4
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +245 -0
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +4 -5
- package/dist/collection/components/snk-form-config/config-header/config-header.css +18 -0
- package/dist/collection/components/snk-form-config/config-header/config-header.js +236 -0
- package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.css +41 -0
- package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.js +170 -0
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +21 -0
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.js +408 -0
- package/dist/collection/components/snk-form-config/field-item/field-item.css +108 -0
- package/dist/collection/components/snk-form-config/field-item/field-item.js +206 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +133 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +578 -0
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.css +38 -0
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js +146 -0
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +132 -0
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +317 -0
- package/dist/collection/components/snk-form-config/snk-form-config.css +16 -229
- package/dist/collection/components/snk-form-config/snk-form-config.js +288 -980
- package/dist/collection/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.js +2 -2
- package/dist/collection/components/snk-grid/snk-grid.js +93 -42
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +2 -0
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.css +3 -0
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +73 -0
- package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.css +78 -0
- package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +57 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/index.js +5 -0
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +67 -13
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css +3 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +20 -1
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +22 -3
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js +20 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +177 -104
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +13 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +1 -1
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +11 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.css +0 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js +220 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +30 -4
- package/dist/collection/lib/configs/ConfigStorage.js +16 -8
- package/dist/collection/lib/configs/LayoutFormConfig.js +25 -0
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +14 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +5 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +6 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +14 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +29 -9
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +26 -2
- package/dist/collection/lib/message/SnkMessageBuilder.js +1 -0
- package/dist/collection/lib/message/resources/snk-crud.msg.js +1 -1
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +28 -23
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +6 -0
- package/dist/collection/lib/message/resources/snk-form.msg.js +16 -2
- package/dist/collection/lib/message/resources/snk-grid.msg.js +1 -1
- package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +6 -1
- package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +2 -1
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +1 -0
- package/dist/collection/lib/utils/constants.js +8 -1
- package/dist/components/ConfigStorage.js +45 -17
- package/dist/components/ContinuousInsertUtils.js +19 -54
- package/dist/components/DataFetcher.js +14 -2
- package/dist/components/ISave.js +26 -2
- package/dist/components/PersonalizedFilterUtils.js +6 -1
- package/dist/components/SnkFormConfigManager.js +2 -3
- package/dist/components/SnkMessageBuilder.js +63 -30
- package/dist/components/{snk-tab-config.d.ts → config-header.d.ts} +4 -4
- package/dist/components/config-header.js +6 -0
- package/dist/components/config-header2.js +103 -0
- package/dist/components/configs-button.d.ts +11 -0
- package/dist/components/configs-button.js +6 -0
- package/dist/components/configs-button2.js +76 -0
- package/dist/components/constants.js +9 -34
- package/dist/components/dataunit-fetcher.js +11 -7
- package/dist/components/field-config.d.ts +11 -0
- package/dist/components/field-config.js +6 -0
- package/dist/components/field-config2.js +525 -0
- package/dist/components/field-item.d.ts +11 -0
- package/dist/components/field-item.js +6 -0
- package/dist/components/field-item2.js +93 -0
- package/dist/components/fields-layout.d.ts +11 -0
- package/dist/components/fields-layout.js +6 -0
- package/dist/components/fields-layout2.js +370 -0
- package/dist/components/{snk-field-config.d.ts → fields-selector.d.ts} +4 -4
- package/dist/components/fields-selector.js +6 -0
- package/dist/components/fields-selector2.js +98 -0
- package/dist/components/form-config-fetcher.js +14 -0
- package/dist/components/guides-configurator.d.ts +11 -0
- package/dist/components/guides-configurator.js +6 -0
- package/dist/components/guides-configurator2.js +182 -0
- package/dist/components/index.d.ts +11 -3
- package/dist/components/index.js +11 -3
- package/dist/components/snk-application2.js +180 -15
- package/dist/components/snk-attach2.js +42 -24
- package/dist/components/snk-configurator2.js +22 -2
- package/dist/components/snk-crud.js +145 -128
- package/dist/components/snk-data-unit2.js +225 -11
- package/dist/components/{snk-config-options.d.ts → snk-default-filter.d.ts} +4 -4
- package/dist/components/snk-default-filter.js +6 -0
- package/dist/components/snk-default-filter2.js +97 -0
- package/dist/components/snk-detail-view2.js +331 -152
- package/dist/components/snk-expression-group2.js +4 -2
- package/dist/components/snk-expression-item2.js +5 -3
- package/dist/components/snk-filter-assistent-mode2.js +4 -2
- package/dist/components/snk-filter-bar2.js +28 -19
- package/dist/components/snk-filter-modal-item2.js +1 -0
- package/dist/components/snk-filter-modal.js +59 -8
- package/dist/components/snk-filter-search.js +18 -5
- package/dist/components/snk-form-config2.js +253 -953
- package/dist/components/snk-form-view2.js +22 -8
- package/dist/components/snk-form.js +33 -9
- package/dist/components/snk-grid-config2.js +2 -0
- package/dist/components/snk-grid2.js +85 -63
- package/dist/components/snk-layout-form-config.d.ts +11 -0
- package/dist/components/snk-layout-form-config.js +6 -0
- package/dist/components/snk-layout-form-config2.js +73 -0
- package/dist/components/snk-personalized-filter2.js +50 -14
- package/dist/components/snk-simple-crud2.js +180 -124
- package/dist/components/snk-taskbar2.js +33 -10
- package/dist/components/snk-view-representation.d.ts +11 -0
- package/dist/components/snk-view-representation.js +6 -0
- package/dist/components/snk-view-representation2.js +41 -0
- package/dist/components/sortable.esm.js +2666 -0
- package/dist/components/taskbar-actions-button2.js +2 -2
- package/dist/components/taskbar-split-button.d.ts +11 -0
- package/dist/components/taskbar-split-button.js +6 -0
- package/dist/components/taskbar-split-button2.js +87 -0
- package/dist/esm/{ClientSideExporterProvider-bd24a4b3.js → ClientSideExporterProvider-3ed744fd.js} +23 -28
- package/dist/esm/{ConfigStorage-e5c1f4c0.js → ConfigStorage-79b9e180.js} +47 -19
- package/dist/esm/{DataFetcher-ecf5f903.js → DataFetcher-88e56266.js} +14 -2
- package/dist/esm/FormConfigHelper-49fe72ca.js +248 -0
- package/dist/esm/{pesquisa-fetcher-e26c3295.js → ISave-5efafc97.js} +36 -4
- package/dist/esm/{PersonalizedFilterUtils-e2b38ef7.js → PersonalizedFilterUtils-2db38ff2.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-1efd102b.js → SnkFormConfigManager-b4b93298.js} +4 -5
- package/dist/esm/{SnkMessageBuilder-6fff4a4c.js → SnkMessageBuilder-9c269caf.js} +63 -30
- package/dist/esm/{auth-fetcher-9987c66e.js → auth-fetcher-3510520e.js} +1 -1
- package/dist/esm/config-header.entry.js +75 -0
- package/dist/esm/configs-button.entry.js +57 -0
- package/dist/esm/{constants-75abb876.js → constants-7b422de0.js} +9 -34
- package/dist/esm/{dataunit-fetcher-ed6e65ef.js → dataunit-fetcher-0e025732.js} +12 -8
- package/dist/esm/default-filters-50105e43.js +8 -0
- package/dist/esm/field-config_2.entry.js +319 -0
- package/dist/esm/fields-layout.entry.js +337 -0
- package/dist/esm/fields-selector.entry.js +70 -0
- package/dist/esm/{filter-type.enum-a80c1b6b.js → filter-type.enum-f6a8fe23.js} +1 -0
- package/dist/esm/{form-config-fetcher-34becd23.js → form-config-fetcher-fa208a6c.js} +15 -1
- package/dist/esm/guides-configurator.entry.js +160 -0
- package/dist/esm/{index-a7d3d3f1.js → index-479e1293.js} +34 -12
- package/dist/esm/{index-ae591a44.js → index-8acbae97.js} +6 -1
- package/dist/esm/{index-c57e49af.js → index-b72af127.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pesquisa-grid_2.entry.js +6 -7
- package/dist/esm/sankhyablocks.js +3 -3
- package/dist/esm/{snk-actions-button_5.entry.js → snk-actions-button_8.entry.js} +131 -12
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +183 -23
- package/dist/esm/snk-attach.entry.js +9 -10
- package/dist/esm/snk-client-confirm.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +10 -3
- package/dist/esm/snk-crud.entry.js +49 -77
- package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
- package/dist/esm/snk-data-exporter.entry.js +8 -9
- package/dist/esm/{snk-data-unit-6258b8ae.js → snk-data-unit-027bca56.js} +227 -13
- package/dist/esm/snk-data-unit.entry.js +5 -5
- package/dist/esm/snk-default-filter.entry.js +73 -0
- package/dist/esm/snk-detail-view.entry.js +69 -17
- package/dist/esm/snk-entity-list.entry.js +1 -1
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-expression-group_2.entry.js +10 -8
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +5 -4
- package/dist/esm/snk-filter-bar_4.entry.js +84 -30
- 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 +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +5 -5
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +1 -1
- package/dist/esm/snk-filter-period.entry.js +1 -1
- package/dist/esm/snk-filter-search.entry.js +19 -6
- package/dist/esm/snk-filter-text.entry.js +1 -1
- package/dist/esm/snk-form-summary.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +20 -8
- package/dist/esm/snk-form_2.entry.js +428 -0
- package/dist/esm/snk-grid.entry.js +50 -37
- package/dist/esm/{snk-guides-viewer-39fae8d5.js → snk-guides-viewer-32f3d3ab.js} +140 -74
- package/dist/esm/snk-guides-viewer.entry.js +13 -13
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-personalized-filter.entry.js +55 -20
- package/dist/esm/snk-pesquisa.entry.js +6 -7
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-bar.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +150 -116
- package/dist/esm/snk-taskbar.entry.js +10 -5
- package/dist/esm/sortable.esm-842f85a3.js +2666 -0
- package/dist/esm/{taskbar-elements-ed51e143.js → taskbar-elements-171476d4.js} +13 -2
- package/dist/esm/{field-search-f8b1d91e.js → taskbar-processor-3436124c.js} +1 -34
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/p-0024d3fd.entry.js +1 -0
- package/dist/sankhyablocks/p-09e60995.entry.js +11 -0
- package/dist/sankhyablocks/p-0cb295c1.entry.js +1 -0
- package/dist/sankhyablocks/p-1456d7cb.entry.js +1 -0
- package/dist/sankhyablocks/{p-9531fd46.entry.js → p-180716b2.entry.js} +1 -1
- package/dist/sankhyablocks/p-19156e59.entry.js +1 -0
- package/dist/sankhyablocks/p-1a0caadb.js +1 -0
- package/dist/sankhyablocks/p-21107f0d.entry.js +1 -0
- package/dist/sankhyablocks/{p-118e769b.entry.js → p-27482793.entry.js} +1 -1
- package/dist/sankhyablocks/p-2bde486e.js +1 -0
- package/dist/sankhyablocks/{p-26b0ce3e.entry.js → p-2fdac5e6.entry.js} +1 -1
- package/dist/sankhyablocks/p-349d1968.entry.js +1 -0
- package/dist/sankhyablocks/p-35e73c5d.js +1 -0
- package/dist/sankhyablocks/{p-89c92727.entry.js → p-398cdd67.entry.js} +1 -1
- package/dist/sankhyablocks/p-3a48bff3.entry.js +1 -0
- package/dist/sankhyablocks/{p-434817f0.entry.js → p-3d41f5a8.entry.js} +1 -1
- package/dist/sankhyablocks/p-3f24c9b2.js +1 -0
- package/dist/sankhyablocks/{p-8002dcd0.entry.js → p-471b34f4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7e2ded86.entry.js → p-49d968e2.entry.js} +1 -1
- package/dist/sankhyablocks/p-4d2ff2fb.entry.js +1 -0
- package/dist/sankhyablocks/p-51833248.js +7 -0
- package/dist/sankhyablocks/p-601b252b.js +26 -0
- package/dist/sankhyablocks/p-60dd1d27.entry.js +1 -0
- package/dist/sankhyablocks/p-6416975c.js +56 -0
- package/dist/sankhyablocks/p-65c5d430.entry.js +1 -0
- package/dist/sankhyablocks/{p-21a81901.entry.js → p-667cab42.entry.js} +1 -1
- package/dist/sankhyablocks/p-67d6d0c8.entry.js +1 -0
- package/dist/sankhyablocks/p-6a4b21dd.js +1 -0
- package/dist/sankhyablocks/p-6dd38d7b.js +6 -0
- package/dist/sankhyablocks/p-71a05822.entry.js +1 -0
- package/dist/sankhyablocks/p-72c8c847.entry.js +1 -0
- package/dist/sankhyablocks/{p-a77bdadc.js → p-73285a8a.js} +1 -1
- package/dist/sankhyablocks/{p-ac8d1cd6.entry.js → p-7345782c.entry.js} +1 -1
- package/dist/sankhyablocks/p-763b04fa.js +1 -0
- package/dist/sankhyablocks/p-7993b2e3.js +60 -0
- package/dist/sankhyablocks/p-7de79adf.js +1 -0
- package/dist/sankhyablocks/p-7e250432.entry.js +1 -0
- package/dist/sankhyablocks/{p-47178038.entry.js → p-83c100f2.entry.js} +1 -1
- package/dist/sankhyablocks/p-84345e7a.js +1 -0
- package/dist/sankhyablocks/p-86bd4478.entry.js +1 -0
- package/dist/sankhyablocks/p-9019a32f.js +1 -0
- package/dist/sankhyablocks/{p-54a5d52a.entry.js → p-90805683.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c2e468c9.entry.js → p-91a9abb6.entry.js} +1 -1
- package/dist/sankhyablocks/p-9751c42f.entry.js +1 -0
- package/dist/sankhyablocks/{p-057fad05.js → p-988afe78.js} +1 -1
- package/dist/sankhyablocks/{p-16a1dd18.entry.js → p-9a63f3f7.entry.js} +1 -1
- package/dist/sankhyablocks/p-9ad3557c.entry.js +1 -0
- package/dist/sankhyablocks/p-9fd87bfd.entry.js +1 -0
- package/dist/sankhyablocks/p-a06bf7b9.entry.js +1 -0
- package/dist/sankhyablocks/{p-5e9fbd76.js → p-a349689a.js} +1 -1
- package/dist/sankhyablocks/p-a5bb2f93.entry.js +1 -0
- package/dist/sankhyablocks/{p-3ce68be5.js → p-a6513fcb.js} +1 -1
- package/dist/sankhyablocks/{p-8c235d4c.entry.js → p-a76e6d51.entry.js} +1 -1
- package/dist/sankhyablocks/p-b568c1d4.js +1 -0
- package/dist/sankhyablocks/p-bd665460.entry.js +1 -0
- package/dist/sankhyablocks/p-c3324d79.entry.js +1 -0
- package/dist/sankhyablocks/{p-bf2acf72.entry.js → p-c6a8a8bc.entry.js} +1 -1
- package/dist/sankhyablocks/{p-d3b9b377.entry.js → p-c926cf6b.entry.js} +1 -1
- package/dist/sankhyablocks/p-cfd0a4c6.entry.js +1 -0
- package/dist/sankhyablocks/{p-79f823f3.entry.js → p-d67526b6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-d2d301a6.js → p-d8d8169b.js} +1 -1
- package/dist/sankhyablocks/p-d9491f6f.entry.js +1 -0
- package/dist/sankhyablocks/{p-5f157b09.entry.js → p-dff65083.entry.js} +1 -1
- package/dist/sankhyablocks/{p-2746d606.entry.js → p-e3521eae.entry.js} +1 -1
- package/dist/sankhyablocks/p-e7cccc45.entry.js +1 -0
- package/dist/sankhyablocks/{p-59e5d5d1.entry.js → p-e824d565.entry.js} +1 -1
- package/dist/sankhyablocks/{p-5a7e18f4.js → p-fbba7e3d.js} +1 -1
- package/dist/sankhyablocks/p-fc0b609e.js +1 -0
- package/dist/sankhyablocks/p-ff7060bc.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/search-strategy/exec-prepared-search-plus.d.ts +5 -0
- package/dist/types/components/snk-application/snk-application.d.ts +17 -2
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +6 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +9 -3
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +17 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +11 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +16 -7
- package/dist/types/components/snk-data-unit/MultipleUpdateHelper.d.ts +9 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +17 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +5 -3
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +16 -4
- package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.d.ts +27 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -3
- package/dist/types/components/snk-filter-bar/types/default-filters.d.ts +5 -0
- package/dist/types/components/snk-filter-bar/types/filter-type.enum.d.ts +2 -1
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -3
- package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +31 -0
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +3 -3
- package/dist/types/components/snk-form-config/config-header/config-header.d.ts +23 -0
- package/dist/types/components/snk-form-config/config-header/configs-button/configs-button.d.ts +19 -0
- package/dist/types/components/snk-form-config/field-item/field-config/field-config.d.ts +56 -0
- package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +63 -0
- package/dist/types/components/snk-form-config/fields-selector/fields-selector.d.ts +18 -0
- package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +42 -0
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +51 -120
- package/dist/types/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.d.ts +2 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +16 -5
- package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +1 -0
- package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +15 -0
- package/dist/types/components/snk-layout-form-config/snk-view-representation/snk-view-representation.d.ts +10 -0
- package/dist/types/components/snk-personalized-filter/interfaces/index.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +7 -1
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.d.ts +4 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +24 -12
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -1
- package/dist/types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.d.ts +44 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +6 -0
- package/dist/types/components.d.ts +502 -212
- package/dist/types/lib/configs/ConfigStorage.d.ts +4 -2
- package/dist/types/lib/configs/LayoutFormConfig.d.ts +11 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +6 -0
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +8 -4
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +4 -1
- package/dist/types/lib/message/SnkMessageBuilder.d.ts +2 -1
- package/dist/types/lib/utils/constants.d.ts +7 -0
- package/package.json +4 -2
- package/react/components.d.ts +11 -3
- package/react/components.js +11 -3
- package/react/components.js.map +1 -1
- package/dist/cjs/AuthorizationConfig-79ffae4b.js.gz +0 -0
- package/dist/cjs/ClientSideExporterProvider-fe52f7cf.js.gz +0 -0
- package/dist/cjs/ConfigStorage-6b633b10.js.gz +0 -0
- package/dist/cjs/DataFetcher-875371e9.js.gz +0 -0
- package/dist/cjs/GetSelectedRecordsIDsInfo-bd50caf1.js.gz +0 -0
- package/dist/cjs/IFetchDataExporterParams-e78ec415.js.gz +0 -0
- package/dist/cjs/ISave-e91b70a7.js +0 -9
- package/dist/cjs/ISave-e91b70a7.js.gz +0 -0
- package/dist/cjs/ParamType-90b440a0.js.gz +0 -0
- package/dist/cjs/PersonalizedFilterUtils-0184ffbb.js.gz +0 -0
- package/dist/cjs/PrintUtils-bcaeb82f.js.gz +0 -0
- package/dist/cjs/ResourceIDUtils-5ff86aa7.js.gz +0 -0
- package/dist/cjs/SnkFormConfigManager-d680be08.js.gz +0 -0
- package/dist/cjs/SnkMessageBuilder-bae64d0d.js.gz +0 -0
- package/dist/cjs/Sortable-fb1c4cbb.js +0 -2853
- package/dist/cjs/Sortable-fb1c4cbb.js.gz +0 -0
- package/dist/cjs/auth-fetcher-24ba4135.js.gz +0 -0
- package/dist/cjs/constants-241934b3.js.gz +0 -0
- package/dist/cjs/dataunit-fetcher-b95768e8.js.gz +0 -0
- package/dist/cjs/field-search-68e34bf4.js.gz +0 -0
- package/dist/cjs/filter-item-type.enum-a7ffdaa6.js.gz +0 -0
- package/dist/cjs/filter-type.enum-b14ce507.js.gz +0 -0
- package/dist/cjs/filterNumberVariation-d65332da.js.gz +0 -0
- package/dist/cjs/form-config-fetcher-e0a512c3.js.gz +0 -0
- package/dist/cjs/index-8d94b7e0.js.gz +0 -0
- package/dist/cjs/index-ab1cfb44.js.gz +0 -0
- package/dist/cjs/index-c5771aba.js.gz +0 -0
- package/dist/cjs/index-e3e39724.js.gz +0 -0
- package/dist/cjs/index-f9e81701.js.gz +0 -0
- package/dist/cjs/index.cjs.js.gz +0 -0
- package/dist/cjs/loader.cjs.js.gz +0 -0
- package/dist/cjs/pesquisa-fetcher-30cab386.js.gz +0 -0
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js.gz +0 -0
- package/dist/cjs/presentationMode-52ec3bdd.js.gz +0 -0
- package/dist/cjs/sankhyablocks.cjs.js.gz +0 -0
- package/dist/cjs/snk-actions-button_5.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-actions-form.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-application.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-attach.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-client-confirm.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-config-options_3.cjs.entry.js +0 -1388
- package/dist/cjs/snk-config-options_3.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-configurator.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-crud.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-data-exporter.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-data-unit-33937ffe.js.gz +0 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-detail-view.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-entity-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-expression-group_2.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-field-config.cjs.entry.js +0 -60
- package/dist/cjs/snk-field-config.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-filter-number.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-filter-period.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-filter-search.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-filter-text.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-form-summary.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-form-view.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-grid.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-guides-viewer-b6002ea7.js.gz +0 -0
- package/dist/cjs/snk-guides-viewer.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-personalized-filter.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-pesquisa.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-print-selector.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-simple-bar.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-simple-crud.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-tab-config.cjs.entry.js +0 -332
- package/dist/cjs/snk-tab-config.cjs.entry.js.gz +0 -0
- package/dist/cjs/snk-taskbar.cjs.entry.js.gz +0 -0
- package/dist/cjs/taskbar-elements-ebddaef4.js.gz +0 -0
- package/dist/cjs/teste-pesquisa.cjs.entry.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/enum/ActionsType.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/enum/ParamType.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/enum/RefreshType.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/executor/java.executor.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/executor/javascript.executor.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/executor/launch-screen.executor.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/executor/procedure.executor.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/factory/executor.factory.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/index.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IAction.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IExecSource.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActions.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActionsProps.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IResultParam.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/clientEvent/index.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/clientEvent/interfaces/IClientEventConfirm.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/interfaces/index.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/snk-actions-button.css.gz +0 -0
- package/dist/collection/components/snk-actions-button/snk-actions-button.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/subcomponents/snk-actions-form.js.gz +0 -0
- package/dist/collection/components/snk-actions-button/subcomponents/snk-client-confirm.js.gz +0 -0
- package/dist/collection/components/snk-application/__mocks__/snk-application.js.gz +0 -0
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js.gz +0 -0
- package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js.gz +0 -0
- package/dist/collection/components/snk-application/request-listener/RequestListenerFactory.js.gz +0 -0
- package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js.gz +0 -0
- package/dist/collection/components/snk-application/snk-application.css.gz +0 -0
- package/dist/collection/components/snk-application/snk-application.js.gz +0 -0
- package/dist/collection/components/snk-attach/interfaces/ICrudConfig.js.gz +0 -0
- package/dist/collection/components/snk-attach/interfaces/TFetcherType.js.gz +0 -0
- package/dist/collection/components/snk-attach/interfaces/index.js.gz +0 -0
- package/dist/collection/components/snk-attach/snk-attach.css.gz +0 -0
- package/dist/collection/components/snk-attach/snk-attach.js.gz +0 -0
- package/dist/collection/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.js.gz +0 -0
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js.gz +0 -0
- package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js.gz +0 -0
- package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js.gz +0 -0
- package/dist/collection/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.js.gz +0 -0
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js.gz +0 -0
- package/dist/collection/components/snk-attach/structure/index.js.gz +0 -0
- package/dist/collection/components/snk-configurator/AuthorizationConfig.js.gz +0 -0
- package/dist/collection/components/snk-configurator/snk-configurator.css.gz +0 -0
- package/dist/collection/components/snk-configurator/snk-configurator.js.gz +0 -0
- package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js.gz +0 -0
- package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js.gz +0 -0
- package/dist/collection/components/snk-crud/snk-crud.css.gz +0 -0
- package/dist/collection/components/snk-crud/snk-crud.js.gz +0 -0
- package/dist/collection/components/snk-crud/subcomponents/CardFormResizeObserver.js.gz +0 -0
- package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js.gz +0 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css.gz +0 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js.gz +0 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-summary.css.gz +0 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-summary.js.gz +0 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.css.gz +0 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js.gz +0 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css.gz +0 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js.gz +0 -0
- package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.css.gz +0 -0
- package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/data/attachment.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/data/email.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/data/export-config.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/data/export-result.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/data/report.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/email-info-step.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/interfaces/IRecordID.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/interfaces/ISelectedID.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.css.gz +0 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js.gz +0 -0
- package/dist/collection/components/snk-data-exporter/utils/ParserExport.js.gz +0 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js.gz +0 -0
- package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js.gz +0 -0
- package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js.gz +0 -0
- package/dist/collection/components/snk-entity-list/snk-entity-list.css.gz +0 -0
- package/dist/collection/components/snk-entity-list/snk-entity-list.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/filterNumberVariation.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/presentationMode.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.css.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.css.gz +0 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css.gz +0 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/types/custom-element-filter.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js.gz +0 -0
- package/dist/collection/components/snk-filter-bar/utils/filters-mock.js.gz +0 -0
- package/dist/collection/components/snk-filter-field-search/interfaces/index.js.gz +0 -0
- package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.css.gz +0 -0
- package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.js.gz +0 -0
- package/dist/collection/components/snk-filter-field-search/subcomponents/index.js.gz +0 -0
- package/dist/collection/components/snk-filter-field-search/subcomponents/list-item.js.gz +0 -0
- package/dist/collection/components/snk-form/snk-form.css.gz +0 -0
- package/dist/collection/components/snk-form/snk-form.js.gz +0 -0
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js.gz +0 -0
- package/dist/collection/components/snk-form-config/snk-form-config.css.gz +0 -0
- package/dist/collection/components/snk-form-config/snk-form-config.js.gz +0 -0
- package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.css +0 -16
- package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.css.gz +0 -0
- package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js +0 -344
- package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js.gz +0 -0
- package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.css +0 -219
- package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.css.gz +0 -0
- package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.js +0 -184
- package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.js.gz +0 -0
- package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.css +0 -323
- package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.css.gz +0 -0
- package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js +0 -527
- package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js.gz +0 -0
- package/dist/collection/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.js.gz +0 -0
- package/dist/collection/components/snk-grid/snk-grid.css.gz +0 -0
- package/dist/collection/components/snk-grid/snk-grid.js.gz +0 -0
- package/dist/collection/components/snk-grid-config/snk-grid-config.css.gz +0 -0
- package/dist/collection/components/snk-grid-config/snk-grid-config.js.gz +0 -0
- package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.css.gz +0 -0
- package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/IExpressionGroup.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/IExpressionItem.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/IParameter.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/IPersonalizedFilter.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/ISystemFilterConfig.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/IUserFilterConfig.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/index.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.css.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.css.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.css.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.css.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.css.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js.gz +0 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js.gz +0 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css.gz +0 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js.gz +0 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css.gz +0 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js.gz +0 -0
- package/dist/collection/components/snk-pesquisa/pesquisaHelper.js.gz +0 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css.gz +0 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js.gz +0 -0
- package/dist/collection/components/snk-print-selector/snk-print-selector.css.gz +0 -0
- package/dist/collection/components/snk-print-selector/snk-print-selector.js.gz +0 -0
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.css.gz +0 -0
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.js.gz +0 -0
- package/dist/collection/components/snk-simple-crud/regular-buttons.js.gz +0 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css.gz +0 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js.gz +0 -0
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css.gz +0 -0
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js.gz +0 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css.gz +0 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js.gz +0 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js.gz +0 -0
- package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js.gz +0 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css.gz +0 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js.gz +0 -0
- package/dist/collection/components/snk-taskbar/subcomponents/field-search.js +0 -31
- package/dist/collection/components/snk-taskbar/subcomponents/field-search.js.gz +0 -0
- package/dist/collection/components/teste-pesquisa/teste-pesquisa.css.gz +0 -0
- package/dist/collection/components/teste-pesquisa/teste-pesquisa.js.gz +0 -0
- package/dist/collection/index.js.gz +0 -0
- package/dist/collection/lib/@types/index.js.gz +0 -0
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js.gz +0 -0
- package/dist/collection/lib/applet-caller/applet-caller.js.gz +0 -0
- package/dist/collection/lib/auth/mgeauthorization.module.js.gz +0 -0
- package/dist/collection/lib/configs/ConfigStorage.js.gz +0 -0
- package/dist/collection/lib/dataUnit/InMemoryLoader.js.gz +0 -0
- package/dist/collection/lib/dataUnit/ValueFormatter.js.gz +0 -0
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js.gz +0 -0
- package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/ISave.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/index.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/application-config-fetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/auth-fetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataResult.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataStrategy.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadingInfo.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRecordField.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IResponseRecord.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DataUnitStrategy.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterResponse.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IPersonalizedReport.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/permission-export-pdf.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/totals-fetcher.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/interfaces/IClientEventResponse.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/recaller/GraphQLRecaller.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/recaller/IDataFetcherRecaller.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/recaller/ServiceBrokerRecaller.js.gz +0 -0
- package/dist/collection/lib/http/data-fetcher/state/LoadStateManager.js.gz +0 -0
- package/dist/collection/lib/index.js.gz +0 -0
- package/dist/collection/lib/licenses/sankhyalicense.module.js.gz +0 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js.gz +0 -0
- package/dist/collection/lib/message/resources/crud-utils.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/file-viewer.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-actions-button.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-application.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-attach.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-configurator.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-crud.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-entity-list.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-exporter.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-filter-field-search.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-filter-param-config.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-form.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-grid.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-print-selector.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-simple-bar.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-simple-crud.msg.js.gz +0 -0
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js.gz +0 -0
- package/dist/collection/lib/resourceid/ResourceIDUtils.js.gz +0 -0
- package/dist/collection/lib/store/index.js.gz +0 -0
- package/dist/collection/lib/utils/ContinuousInsertUtils.js.gz +0 -0
- package/dist/collection/lib/utils/CrudUtils.js.gz +0 -0
- package/dist/collection/lib/utils/GetSelectedRecordsIDsInfo.js.gz +0 -0
- package/dist/collection/lib/utils/PrintUtils.js.gz +0 -0
- package/dist/collection/lib/utils/constants.js.gz +0 -0
- package/dist/collection/lib/utils/fileViewer/index.js.gz +0 -0
- package/dist/collection/lib/utils/fileViewer/interfaces/IFileViewerParams.js.gz +0 -0
- package/dist/collection/lib/utils/pesquisa.js.gz +0 -0
- package/dist/collection/lib/utils/urlutils.js.gz +0 -0
- package/dist/collection/lib/workspace/workspace.js.gz +0 -0
- package/dist/collection/sw.js.gz +0 -0
- package/dist/components/AuthorizationConfig.js.gz +0 -0
- package/dist/components/ConfigStorage.js.gz +0 -0
- package/dist/components/ContinuousInsertUtils.js.gz +0 -0
- package/dist/components/DataFetcher.js.gz +0 -0
- package/dist/components/GetSelectedRecordsIDsInfo.js.gz +0 -0
- package/dist/components/ISave.js.gz +0 -0
- package/dist/components/ParamType.js.gz +0 -0
- package/dist/components/PersonalizedFilterUtils.js.gz +0 -0
- package/dist/components/PrintUtils.js.gz +0 -0
- package/dist/components/ResourceIDUtils.js.gz +0 -0
- package/dist/components/SnkFormConfigManager.js.gz +0 -0
- package/dist/components/SnkMessageBuilder.js.gz +0 -0
- package/dist/components/auth-fetcher.js.gz +0 -0
- package/dist/components/constants.js.gz +0 -0
- package/dist/components/dataunit-fetcher.js.gz +0 -0
- package/dist/components/filter-item-type.enum.js.gz +0 -0
- package/dist/components/filterNumberVariation.js.gz +0 -0
- package/dist/components/form-config-fetcher.js.gz +0 -0
- package/dist/components/index.js.gz +0 -0
- package/dist/components/index2.js.gz +0 -0
- package/dist/components/pesquisa-grid.js.gz +0 -0
- package/dist/components/pesquisa-grid2.js.gz +0 -0
- package/dist/components/pesquisa-tree.js.gz +0 -0
- package/dist/components/pesquisa-tree2.js.gz +0 -0
- package/dist/components/presentationMode.js.gz +0 -0
- package/dist/components/snk-actions-button.js.gz +0 -0
- package/dist/components/snk-actions-button2.js.gz +0 -0
- package/dist/components/snk-actions-form.js.gz +0 -0
- package/dist/components/snk-application.js.gz +0 -0
- package/dist/components/snk-application2.js.gz +0 -0
- package/dist/components/snk-attach.js.gz +0 -0
- package/dist/components/snk-attach2.js.gz +0 -0
- package/dist/components/snk-client-confirm.js.gz +0 -0
- package/dist/components/snk-config-options.js +0 -6
- package/dist/components/snk-config-options.js.gz +0 -0
- package/dist/components/snk-config-options2.js +0 -255
- package/dist/components/snk-config-options2.js.gz +0 -0
- package/dist/components/snk-configurator.js.gz +0 -0
- package/dist/components/snk-configurator2.js.gz +0 -0
- package/dist/components/snk-crud.js.gz +0 -0
- package/dist/components/snk-custom-slot-elements.js.gz +0 -0
- package/dist/components/snk-data-exporter.js.gz +0 -0
- package/dist/components/snk-data-exporter2.js.gz +0 -0
- package/dist/components/snk-data-unit.js.gz +0 -0
- package/dist/components/snk-data-unit2.js.gz +0 -0
- package/dist/components/snk-detail-view.js.gz +0 -0
- package/dist/components/snk-detail-view2.js.gz +0 -0
- package/dist/components/snk-entity-list.js.gz +0 -0
- package/dist/components/snk-exporter-email-sender.js.gz +0 -0
- package/dist/components/snk-exporter-email-sender2.js.gz +0 -0
- package/dist/components/snk-expression-group.js.gz +0 -0
- package/dist/components/snk-expression-group2.js.gz +0 -0
- package/dist/components/snk-expression-item.js.gz +0 -0
- package/dist/components/snk-expression-item2.js.gz +0 -0
- package/dist/components/snk-field-config.js +0 -6
- package/dist/components/snk-field-config.js.gz +0 -0
- package/dist/components/snk-field-config2.js +0 -76
- package/dist/components/snk-field-config2.js.gz +0 -0
- package/dist/components/snk-filter-advanced-mode.js.gz +0 -0
- package/dist/components/snk-filter-advanced-mode2.js.gz +0 -0
- package/dist/components/snk-filter-assistent-mode.js.gz +0 -0
- package/dist/components/snk-filter-assistent-mode2.js.gz +0 -0
- package/dist/components/snk-filter-bar.js.gz +0 -0
- package/dist/components/snk-filter-bar2.js.gz +0 -0
- package/dist/components/snk-filter-binary-select.js.gz +0 -0
- package/dist/components/snk-filter-checkbox-list.js.gz +0 -0
- package/dist/components/snk-filter-detail.js.gz +0 -0
- package/dist/components/snk-filter-detail2.js.gz +0 -0
- package/dist/components/snk-filter-field-search.js.gz +0 -0
- package/dist/components/snk-filter-field-search2.js.gz +0 -0
- package/dist/components/snk-filter-item.js.gz +0 -0
- package/dist/components/snk-filter-item2.js.gz +0 -0
- package/dist/components/snk-filter-list.js.gz +0 -0
- package/dist/components/snk-filter-modal-item.js.gz +0 -0
- package/dist/components/snk-filter-modal-item2.js.gz +0 -0
- package/dist/components/snk-filter-modal.js.gz +0 -0
- package/dist/components/snk-filter-multi-select.js.gz +0 -0
- package/dist/components/snk-filter-number.js.gz +0 -0
- package/dist/components/snk-filter-param-config.js.gz +0 -0
- package/dist/components/snk-filter-param-config2.js.gz +0 -0
- package/dist/components/snk-filter-period.js.gz +0 -0
- package/dist/components/snk-filter-search.js.gz +0 -0
- package/dist/components/snk-filter-text.js.gz +0 -0
- package/dist/components/snk-form-config.js.gz +0 -0
- package/dist/components/snk-form-config2.js.gz +0 -0
- package/dist/components/snk-form-summary.js.gz +0 -0
- package/dist/components/snk-form-summary2.js.gz +0 -0
- package/dist/components/snk-form-view.js.gz +0 -0
- package/dist/components/snk-form-view2.js.gz +0 -0
- package/dist/components/snk-form.js.gz +0 -0
- package/dist/components/snk-grid-config.js.gz +0 -0
- package/dist/components/snk-grid-config2.js.gz +0 -0
- package/dist/components/snk-grid.js.gz +0 -0
- package/dist/components/snk-grid2.js.gz +0 -0
- package/dist/components/snk-guides-viewer.js.gz +0 -0
- package/dist/components/snk-personalized-filter-editor.js.gz +0 -0
- package/dist/components/snk-personalized-filter.js.gz +0 -0
- package/dist/components/snk-personalized-filter2.js.gz +0 -0
- package/dist/components/snk-pesquisa.js.gz +0 -0
- package/dist/components/snk-pesquisa2.js.gz +0 -0
- package/dist/components/snk-print-selector.js.gz +0 -0
- package/dist/components/snk-select-box.js.gz +0 -0
- package/dist/components/snk-select-box2.js.gz +0 -0
- package/dist/components/snk-simple-bar.js.gz +0 -0
- package/dist/components/snk-simple-bar2.js.gz +0 -0
- package/dist/components/snk-simple-crud.js.gz +0 -0
- package/dist/components/snk-simple-crud2.js.gz +0 -0
- package/dist/components/snk-simple-form-config.js.gz +0 -0
- package/dist/components/snk-simple-form-config2.js.gz +0 -0
- package/dist/components/snk-tab-config.js +0 -6
- package/dist/components/snk-tab-config.js.gz +0 -0
- package/dist/components/snk-tab-config2.js +0 -3202
- package/dist/components/snk-tab-config2.js.gz +0 -0
- package/dist/components/snk-taskbar.js.gz +0 -0
- package/dist/components/snk-taskbar2.js.gz +0 -0
- package/dist/components/taskbar-actions-button.js.gz +0 -0
- package/dist/components/taskbar-actions-button2.js.gz +0 -0
- package/dist/components/teste-pesquisa.js.gz +0 -0
- package/dist/esm/AuthorizationConfig-dcbd207a.js.gz +0 -0
- package/dist/esm/ClientSideExporterProvider-bd24a4b3.js.gz +0 -0
- package/dist/esm/ConfigStorage-e5c1f4c0.js.gz +0 -0
- package/dist/esm/DataFetcher-ecf5f903.js.gz +0 -0
- package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js.gz +0 -0
- package/dist/esm/IFetchDataExporterParams-d73bed3d.js.gz +0 -0
- package/dist/esm/ISave-d8c8bc59.js +0 -9
- package/dist/esm/ISave-d8c8bc59.js.gz +0 -0
- package/dist/esm/ParamType-d5152b06.js.gz +0 -0
- package/dist/esm/PersonalizedFilterUtils-e2b38ef7.js.gz +0 -0
- package/dist/esm/PrintUtils-3e4ff0f5.js.gz +0 -0
- package/dist/esm/ResourceIDUtils-a114189a.js.gz +0 -0
- package/dist/esm/SnkFormConfigManager-1efd102b.js.gz +0 -0
- package/dist/esm/SnkMessageBuilder-6fff4a4c.js.gz +0 -0
- package/dist/esm/Sortable-83960219.js +0 -2851
- package/dist/esm/Sortable-83960219.js.gz +0 -0
- package/dist/esm/auth-fetcher-9987c66e.js.gz +0 -0
- package/dist/esm/constants-75abb876.js.gz +0 -0
- package/dist/esm/dataunit-fetcher-ed6e65ef.js.gz +0 -0
- package/dist/esm/field-search-f8b1d91e.js.gz +0 -0
- package/dist/esm/filter-item-type.enum-d45e026f.js.gz +0 -0
- package/dist/esm/filter-type.enum-a80c1b6b.js.gz +0 -0
- package/dist/esm/filterNumberVariation-8cee02ea.js.gz +0 -0
- package/dist/esm/form-config-fetcher-34becd23.js.gz +0 -0
- package/dist/esm/index-620ac460.js.gz +0 -0
- package/dist/esm/index-a7d3d3f1.js.gz +0 -0
- package/dist/esm/index-ae591a44.js.gz +0 -0
- package/dist/esm/index-b40568ff.js.gz +0 -0
- package/dist/esm/index-c57e49af.js.gz +0 -0
- package/dist/esm/index.js.gz +0 -0
- package/dist/esm/loader.js.gz +0 -0
- package/dist/esm/pesquisa-fetcher-e26c3295.js.gz +0 -0
- package/dist/esm/pesquisa-grid_2.entry.js.gz +0 -0
- package/dist/esm/polyfills/core-js.js.gz +0 -0
- package/dist/esm/polyfills/css-shim.js.gz +0 -0
- package/dist/esm/polyfills/dom.js.gz +0 -0
- package/dist/esm/polyfills/es5-html-element.js.gz +0 -0
- package/dist/esm/polyfills/index.js.gz +0 -0
- package/dist/esm/polyfills/system.js.gz +0 -0
- package/dist/esm/presentationMode-783bbf9d.js.gz +0 -0
- package/dist/esm/sankhyablocks.js.gz +0 -0
- package/dist/esm/snk-actions-button_5.entry.js.gz +0 -0
- package/dist/esm/snk-actions-form.entry.js.gz +0 -0
- package/dist/esm/snk-application.entry.js.gz +0 -0
- package/dist/esm/snk-attach.entry.js.gz +0 -0
- package/dist/esm/snk-client-confirm.entry.js.gz +0 -0
- package/dist/esm/snk-config-options_3.entry.js +0 -1382
- package/dist/esm/snk-config-options_3.entry.js.gz +0 -0
- package/dist/esm/snk-configurator.entry.js.gz +0 -0
- package/dist/esm/snk-crud.entry.js.gz +0 -0
- package/dist/esm/snk-custom-slot-elements.entry.js.gz +0 -0
- package/dist/esm/snk-data-exporter.entry.js.gz +0 -0
- package/dist/esm/snk-data-unit-6258b8ae.js.gz +0 -0
- package/dist/esm/snk-data-unit.entry.js.gz +0 -0
- package/dist/esm/snk-detail-view.entry.js.gz +0 -0
- package/dist/esm/snk-entity-list.entry.js.gz +0 -0
- package/dist/esm/snk-exporter-email-sender.entry.js.gz +0 -0
- package/dist/esm/snk-expression-group_2.entry.js.gz +0 -0
- package/dist/esm/snk-field-config.entry.js +0 -56
- package/dist/esm/snk-field-config.entry.js.gz +0 -0
- package/dist/esm/snk-filter-advanced-mode_2.entry.js.gz +0 -0
- package/dist/esm/snk-filter-bar_4.entry.js.gz +0 -0
- package/dist/esm/snk-filter-binary-select.entry.js.gz +0 -0
- package/dist/esm/snk-filter-checkbox-list.entry.js.gz +0 -0
- package/dist/esm/snk-filter-detail.entry.js.gz +0 -0
- package/dist/esm/snk-filter-field-search_2.entry.js.gz +0 -0
- package/dist/esm/snk-filter-modal-item.entry.js.gz +0 -0
- package/dist/esm/snk-filter-multi-select.entry.js.gz +0 -0
- package/dist/esm/snk-filter-number.entry.js.gz +0 -0
- package/dist/esm/snk-filter-period.entry.js.gz +0 -0
- package/dist/esm/snk-filter-search.entry.js.gz +0 -0
- package/dist/esm/snk-filter-text.entry.js.gz +0 -0
- package/dist/esm/snk-form-summary.entry.js.gz +0 -0
- package/dist/esm/snk-form-view.entry.js.gz +0 -0
- package/dist/esm/snk-grid.entry.js.gz +0 -0
- package/dist/esm/snk-guides-viewer-39fae8d5.js.gz +0 -0
- package/dist/esm/snk-guides-viewer.entry.js.gz +0 -0
- package/dist/esm/snk-personalized-filter-editor.entry.js.gz +0 -0
- package/dist/esm/snk-personalized-filter.entry.js.gz +0 -0
- package/dist/esm/snk-pesquisa.entry.js.gz +0 -0
- package/dist/esm/snk-print-selector.entry.js.gz +0 -0
- package/dist/esm/snk-simple-bar.entry.js.gz +0 -0
- package/dist/esm/snk-simple-crud.entry.js.gz +0 -0
- package/dist/esm/snk-tab-config.entry.js +0 -328
- package/dist/esm/snk-tab-config.entry.js.gz +0 -0
- package/dist/esm/snk-taskbar.entry.js.gz +0 -0
- package/dist/esm/taskbar-elements-ed51e143.js.gz +0 -0
- package/dist/esm/teste-pesquisa.entry.js.gz +0 -0
- package/dist/index.cjs.js.gz +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/sankhyablocks/index.esm.js.gz +0 -0
- package/dist/sankhyablocks/p-057fad05.js.gz +0 -0
- package/dist/sankhyablocks/p-0f3698af.js.gz +0 -0
- package/dist/sankhyablocks/p-118e769b.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-11afea24.entry.js +0 -1
- package/dist/sankhyablocks/p-11afea24.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-16a1dd18.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-17425c72.js +0 -1
- package/dist/sankhyablocks/p-17425c72.js.gz +0 -0
- package/dist/sankhyablocks/p-18389343.entry.js +0 -1
- package/dist/sankhyablocks/p-18389343.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-1a68fb59.js.gz +0 -0
- package/dist/sankhyablocks/p-1d19a5b0.js +0 -1
- package/dist/sankhyablocks/p-1d19a5b0.js.gz +0 -0
- package/dist/sankhyablocks/p-1db45d26.entry.js +0 -1
- package/dist/sankhyablocks/p-1db45d26.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-21749402.js +0 -1
- package/dist/sankhyablocks/p-21749402.js.gz +0 -0
- package/dist/sankhyablocks/p-21a81901.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-22ddc147.js +0 -26
- package/dist/sankhyablocks/p-22ddc147.js.gz +0 -0
- package/dist/sankhyablocks/p-23736d75.js +0 -1
- package/dist/sankhyablocks/p-23736d75.js.gz +0 -0
- package/dist/sankhyablocks/p-23cd6abf.entry.js +0 -1
- package/dist/sankhyablocks/p-23cd6abf.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-240ac47f.entry.js +0 -1
- package/dist/sankhyablocks/p-240ac47f.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-26b0ce3e.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-2746d606.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-2953c481.entry.js +0 -1
- package/dist/sankhyablocks/p-2953c481.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-3ab6df3d.entry.js +0 -1
- package/dist/sankhyablocks/p-3ab6df3d.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-3ce68be5.js.gz +0 -0
- package/dist/sankhyablocks/p-3fcb90d6.js +0 -56
- package/dist/sankhyablocks/p-3fcb90d6.js.gz +0 -0
- package/dist/sankhyablocks/p-434817f0.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-43769aa9.js +0 -1
- package/dist/sankhyablocks/p-43769aa9.js.gz +0 -0
- package/dist/sankhyablocks/p-47178038.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-4c9adf1c.entry.js +0 -1
- package/dist/sankhyablocks/p-4c9adf1c.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-517efc93.js +0 -1
- package/dist/sankhyablocks/p-517efc93.js.gz +0 -0
- package/dist/sankhyablocks/p-54a5d52a.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-59e5d5d1.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-5a7e18f4.js.gz +0 -0
- package/dist/sankhyablocks/p-5e9fbd76.js.gz +0 -0
- package/dist/sankhyablocks/p-5f157b09.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-688dcb4c.js.gz +0 -0
- package/dist/sankhyablocks/p-6b898a51.entry.js +0 -1
- package/dist/sankhyablocks/p-6b898a51.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-77168ab4.entry.js +0 -1
- package/dist/sankhyablocks/p-77168ab4.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-79f823f3.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-7dd49d15.js.gz +0 -0
- package/dist/sankhyablocks/p-7e0a0aae.js +0 -60
- package/dist/sankhyablocks/p-7e0a0aae.js.gz +0 -0
- package/dist/sankhyablocks/p-7e2ded86.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-8002dcd0.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-81f5e44b.entry.js +0 -11
- package/dist/sankhyablocks/p-81f5e44b.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-89c92727.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-8c235d4c.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-8d884fab.js.gz +0 -0
- package/dist/sankhyablocks/p-8f3f2306.js.gz +0 -0
- package/dist/sankhyablocks/p-91708c3d.entry.js +0 -1
- package/dist/sankhyablocks/p-91708c3d.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-933c0c0b.js +0 -1
- package/dist/sankhyablocks/p-933c0c0b.js.gz +0 -0
- package/dist/sankhyablocks/p-9523fc40.entry.js +0 -1
- package/dist/sankhyablocks/p-9523fc40.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-9531fd46.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-9887a437.entry.js +0 -1
- package/dist/sankhyablocks/p-9887a437.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-a5bdcb3f.entry.js +0 -1
- package/dist/sankhyablocks/p-a5bdcb3f.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-a61bbe18.entry.js +0 -1
- package/dist/sankhyablocks/p-a61bbe18.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-a77bdadc.js.gz +0 -0
- package/dist/sankhyablocks/p-abd9681c.js +0 -1
- package/dist/sankhyablocks/p-abd9681c.js.gz +0 -0
- package/dist/sankhyablocks/p-ac8d1cd6.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-bf2acf72.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-bfdf92e9.entry.js +0 -1
- package/dist/sankhyablocks/p-bfdf92e9.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-c2e468c9.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-c8622597.entry.js +0 -1
- package/dist/sankhyablocks/p-c8622597.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-cb1e77e0.entry.js +0 -1
- package/dist/sankhyablocks/p-cb1e77e0.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-d2d301a6.js.gz +0 -0
- package/dist/sankhyablocks/p-d3b9b377.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-d9804798.js +0 -1
- package/dist/sankhyablocks/p-d9804798.js.gz +0 -0
- package/dist/sankhyablocks/p-dc36cfbf.js.gz +0 -0
- package/dist/sankhyablocks/p-e289826a.js +0 -1
- package/dist/sankhyablocks/p-e289826a.js.gz +0 -0
- package/dist/sankhyablocks/p-e51c52cf.entry.js +0 -1
- package/dist/sankhyablocks/p-e51c52cf.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-e66bcb5c.entry.js +0 -1
- package/dist/sankhyablocks/p-e66bcb5c.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-eaad0aa8.js.gz +0 -0
- package/dist/sankhyablocks/p-ef076eea.js +0 -6
- package/dist/sankhyablocks/p-ef076eea.js.gz +0 -0
- package/dist/sankhyablocks/p-f4184ce7.js.gz +0 -0
- package/dist/sankhyablocks/p-fa80e546.js.gz +0 -0
- package/dist/sankhyablocks/p-fa816fb2.js +0 -1
- package/dist/sankhyablocks/p-fa816fb2.js.gz +0 -0
- package/dist/sankhyablocks/p-fde71e26.entry.js +0 -1
- package/dist/sankhyablocks/p-fde71e26.entry.js.gz +0 -0
- package/dist/sankhyablocks/p-ff1990ad.js.gz +0 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js.gz +0 -0
- package/dist/types/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.d.ts +0 -57
- package/dist/types/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.d.ts +0 -43
- package/dist/types/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -105
- package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +0 -4
@@ -1 +0,0 @@
|
|
1
|
-
import{r as i,c as t,h as s,g as e}from"./p-d2d301a6.js";import{StringUtils as n,ApplicationContext as o,ObjectUtils as h,DataType as a,UserInterface as r,JSUtils as d,FloatingManager as l,KeyboardManager as u,ElementIDUtils as c}from"@sankhyalabs/core";import{CSSVarsUtils as m}from"@sankhyalabs/ezui/dist/collection/utils";import{V as p,S as v}from"./p-1d19a5b0.js";import{T as f}from"./p-517efc93.js";import"./p-5a7e18f4.js";import"./p-ef076eea.js";import{S as g,R as C,b,a as k,c as S}from"./p-e289826a.js";import{P as y}from"./p-0f3698af.js";import"./p-21749402.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import{I as w}from"./p-7e0a0aae.js";import"./p-ff1990ad.js";import{F as E}from"./p-22ddc147.js";import{T as _,b as T,o as I}from"./p-23736d75.js";import{C as F}from"./p-3fcb90d6.js";import{S as R}from"./p-3ce68be5.js";import{s as z}from"./p-5e9fbd76.js";import"./p-8d884fab.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource";import"./p-7dd49d15.js";import"./p-8f3f2306.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";const M=["INSERT","REFRESH","PREVIOUS","NEXT","DIVIDER","MORE_OPTIONS"],D=["INSERT","REFRESH","PREVIOUS","NEXT","DIVIDER","CLONE","REMOVE","DIVIDER","MORE_OPTIONS"],O=class{constructor(s){i(this,s),this.dataStateChange=t(this,"dataStateChange",3),this.dataUnitReady=t(this,"dataUnitReady",3),this.actionClick=t(this,"actionClick",7),this.formItemsReady=t(this,"formItemsReady",7),this.configuratorSave=t(this,"configuratorSave",7),this.configuratorCancel=t(this,"configuratorCancel",7),this._multiSelectionListDataSource=new g,this._keyDownHandler=i=>this.keyDownListener(i),this._formConfigFetcher=new E,this._customEditors=new Map,this._customRenders=new Map,this._taskbarProcessor=new _({"snkSimpleCrudTaskbar.form_regular":this.getButtons(!1,[f.GRID_MODE],!0),"snkSimpleCrudTaskbar.grid_regular":this.getButtons(!1,[f.DATA_EXPORTER,f.FORM_MODE]),"snkSimpleCrudTaskbar.form_selected":this.getButtons(!0,[f.GRID_MODE],!0),"snkSimpleCrudTaskbar.grid_selected":this.getButtons(!0,[f.DATA_EXPORTER,f.FORM_MODE]),"snkSimpleCrudTaskbar.finish_edition":this.getFinishEditionButtonsCallback.bind(this)}),this._showPopUpGridConfig=!1,this._currentViewMode=p.GRID,this._config=void 0,this._fieldToGetFocus=void 0,this._customContainerId=`SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${n.generateUUID()}`,this.enableLockManagerLoadingComp=!1,this.enableLockManagerTaskbarClick=!1,this.dataState=void 0,this.dataUnit=void 0,this.entityName=void 0,this.mode=v.SERVER,this.gridConfig=void 0,this.formConfig=void 0,this._formFields=[],this._fieldsProps=new Map,this.enableContinuousInsert=!1,this.multipleSelection=void 0,this.useCancelConfirm=!0,this.pageSize=150,this.resourceID=void 0,this.enableGridInsert=!1,this.paginationCounterMode="auto",this.taskbarManager=void 0,this.messagesBuilder=void 0,this.useEnterLikeTab=!1,this.actionsList=void 0,this.configName=void 0,this.showConfiguratorButtons=void 0,this.gridLegacyConfigName=void 0,this.formLegacyConfigName=void 0,this.ignoreReadOnlyFormFields=!1,this.autoFocus=!0,this.domainMessagesBuilder=void 0,this.autoLoad=void 0,this.outlineMode=!1}async addCustomEditor(i,t){if(this._grid&&this._form)return this._grid.addCustomEditor(i,t),void this._form.addCustomEditor(i,t);const s=new Map(this._customEditors);s.set(i,t),this._customEditors=s}async addGridCustomRender(i,t){if(this._grid)return void this._grid.addGridCustomRender(i,t);const s=new Map(this._customRenders);s.set(i,t),this._customRenders=s}handleResourceIDChanged(i,t){n.isEmpty(i)||i!==t&&(this.loadFormConfig(!0),this.loadGridConfig(!0))}async addCustomValueFormatter(i,t){this._grid.addCustomValueFormatter(i,t)}async removeCustomValueFormatter(i){this._grid.removeCustomValueFormatter(i)}async setFieldProp(i,t,s){const e=new Map(this._fieldsProps),n=this._fieldsProps.get(i);e.set(i,Object.assign(Object.assign({},n),{[t]:s})),this._fieldsProps=e}getFinishEditionButtonsCallback(){const i=["CANCEL","SAVE"];return this.enableGridInsert&&this._currentViewMode!==p.ATTACHMENT&&i.push(this._currentViewMode===p.GRID?f.FORM_MODE:f.GRID_MODE),i}getButtons(i,t,s){let e=i?D:M;return s&&(e=e.filter((i=>i!==f.REFRESH))),this.addConfigButton(this.resolveInMemoryBtns(e).concat(t))}addConfigButton(i){return void 0===this.configName?i:i.concat(f.CONFIGURATOR)}get application(){return o.getContextValue("__SNK__APPLICATION__")}resolveInMemoryBtns(i){const t=[...i];return this.mode===v.IN_MEMORY&&t.splice(1,1),t}async goToView(i){this._currentViewMode=i,this._viewStack&&this._viewStack.show(i)}actionClickListener(i){const t=i.detail;t===f.CONFIGURATOR?this._snkConfigurator.open():t===f.GRID_MODE?this.goToView(p.GRID):t===f.FORM_MODE&&this.goToView(p.FORM),i.stopPropagation()}async onChangeEntityName(i){if(this.dataUnit)return;const t=o.getContextValue("__SNK__APPLICATION__");this.dataUnit=await t.getDataUnit(i,null,null,this.configName)}onModeChange(){this.mode==v.IN_MEMORY&&this.initInMemoryDataUnit()}observeDataState(i,t){this.handleDataStateChange(i,t)}async observeFormLegacy(i,t){await this.handleUpdateFormLegacyConfig(i,t)}async observeGridLegacy(i,t){await this.handleUpdateGridLegacyConfig(i,t)}async handleDataStateChange(i,t){h.objectToString(t)!=h.objectToString(i)&&this.dataStateChange.emit(i),await this.processRmPrecision()}async processRmPrecision(){var i,t;const s=await this._snkDataUnit.getFieldsWithRmPrecision();for(const e of s||[]){if(!e)continue;const s=null===(t=null===(i=this.dataState)||void 0===i?void 0:i.rowMetadata)||void 0===t?void 0:t.getProp("rm_precision",e);(s||0===s)&&(await this.setFieldProp(e,"precision",s),await this.setFieldProp(e,"prettyPrecision",s))}this._rmPrecisionCustomValueFormatter.setDataState(this.dataState)}async handleUpdateGridLegacyConfig(i,t){null!=i&&i!=t&&this._gridConfigAlreadyLoaded&&await this.loadGridConfig(!0)}async handleUpdateFormLegacyConfig(i,t){null!=i&&i!=t&&this._formConfigAlreadyLoaded&&this.loadFormConfig(!0)}openConfig(i){this._snkConfigurator.close(),i===p.GRID?this.openGridConfig():i===p.FORM&&this.openFormConfig()}openGridConfig(){this._grid.getColumnsState().then((i=>{this._snkGridConfig.columns=i.filter((i=>i.name)),this._snkGridConfig.selectedIndex=0,this._showPopUpGridConfig=!0}))}async openFormConfig(){(this.formLegacyConfigName||this.configName)&&await this._snkSimpleFormConfig.show()}addGridLegacyConfigName(){this.gridLegacyConfigName&&this.configName&&F.addGridLegacyConfig(this.configName,this.gridLegacyConfigName)}loadGridConfig(i){if(void 0!==this.configName&&(null==this.gridConfig&&!this._gridConfigAlreadyLoaded||i))return this.addGridLegacyConfigName(),this._gridConfigAlreadyLoaded=!0,new Promise(((i,t)=>{F.loadGridConfig(this.configName,this.resolveResourceID()).then((t=>{this.setGridConfig(t),i()})).catch((i=>{t(i)}))}))}formConfigIsLoaded(){return null!=this.formConfig||this._formConfigAlreadyLoaded}async loadFormConfig(i=!1,t=!1){if(void 0===this.configName)return;if(null==this._formConfigManager&&(this._formConfigManager=new R(this.configName,this.resolveResourceID(),void 0,this.dataUnit),this._formConfigManager.setConfig(this.formConfig)),this.formConfigIsLoaded()&&!i)return;this._formConfigAlreadyLoaded=!0;let s=await this._formConfigFetcher.fetchLegacyConfigurableForm(this.formLegacyConfigName);if(null!=s)return this._formConfigManager.setConfig(s),void this.setFormConfig(s,t);this.setFormConfig(await this._formConfigManager.loadConfig())}async componentWillRender(){this._resourceID=await this.application.getResourceID(),this.dataExporterProviderStore(),this._taskbarProcessor.process(this.getTaskBarId(),this.taskbarManager,this.dataState,this.getTaskBarDisabledButtons()),void 0!==this.configName&&(null!=this.gridConfig||this._gridConfigAlreadyLoaded||(await this.addGridLegacyConfigName(),this.loadGridConfig(),this.loadFormConfig()))}componentDidRender(){this._rmPrecisionCustomValueFormatter.setGrid(this._grid),this.addGridCustomValueFormattters(),this.setFieldsProps(),this.setCustomRenders(),this.setCustomEditors()}componentWillLoad(){this.processMetadata(),this.onModeChange(),this.configDatasource(),this._rmPrecisionCustomValueFormatter=new C,this._continuousInsertUtils=new b(this.application,this.resolveResourceID(),this.configName),this.enableGridInsert&&this._continuousInsertUtils.getConfig().then((i=>this.enableContinuousInsert=i))}componentDidLoad(){m.applyVarsGrid(this._element,this._grid),this.initKeyboardManager()}setCustomRenders(){if(this._grid)for(const[i,t]of this._customRenders)this._grid.addGridCustomRender(i,t),this._customRenders.delete(i)}setCustomEditors(){if(this._grid&&this._form)for(const[i,t]of this._customEditors)this._grid.addCustomEditor(i,t),this._form.addCustomEditor(i,t),this._customEditors.delete(i)}configDatasource(){this._multiSelectionListDataSource.setApplication(this.application),this._multiSelectionListDataSource.setDataUnit(this.dataUnit)}setFieldsProps(){if(this._form)for(const[i,t]of this._fieldsProps){for(const s in t)this._form.setFieldProp(i,s,t[s]);this._fieldsProps.delete(i)}}getTaskBarId(){var i,t;return(null===(i=this.dataState)||void 0===i?void 0:i.isDirty)?"snkSimpleCrudTaskbar.finish_edition":(null===(t=this.dataState)||void 0===t?void 0:t.selectionInfo)&&!this.dataState.selectionInfo.isAllRecords()&&this.dataState.selectionInfo.length>0?this._currentViewMode===p.GRID?"snkSimpleCrudTaskbar.grid_selected":"snkSimpleCrudTaskbar.form_selected":this._currentViewMode===p.GRID?"snkSimpleCrudTaskbar.grid_regular":"snkSimpleCrudTaskbar.form_regular"}initInMemoryDataUnit(){this._inMemoryLoader=new w(this._metadata,void 0,{autoLoad:this.autoLoad}),this.dataUnit=this._inMemoryLoader.dataUnit,this.dataUnitReady.emit(this.dataUnit)}setMetadata(i){return this._inMemoryLoader?this._inMemoryLoader.metadata=i:this.dataUnit&&(this.dataUnit.metadata=i),Promise.resolve()}setRecords(i){return this._inMemoryLoader?this._inMemoryLoader.records=i:this.dataUnit&&(this.dataUnit.records=i),Promise.resolve()}getRecords(){return Promise.resolve(this.dataUnit.records)}async openConfigurator(){var i;null===(i=this._snkConfigurator)||void 0===i||i.open()}async closeConfigurator(){var i;null===(i=this._snkConfigurator)||void 0===i||i.close()}async updateConfig(){null==this._formConfigManager&&(this._formConfigManager=new R(this.configName,this.resolveResourceID())),this._formConfigManager.setConfig(this.formConfig)}processMetadata(){const i=this._element.querySelectorAll("snk-field-metadata"),t=[],s={fields:[],emptyConfig:!1};i.forEach((i=>{const e={name:i.getAttribute("name")||i.getAttribute("label"),label:i.getAttribute("label"),dataType:a[i.getAttribute("dataType")]||a.TEXT,userInterface:r[i.getAttribute("userInterface")]||r.SHORTTEXT,readOnly:"true"==i.getAttribute("readOnly"),required:"true"==i.getAttribute("required"),tab:i.getAttribute("tab")||void 0,visible:"false"!=i.getAttribute("visible")};s.fields.push({name:e.name,tab:e.tab,visible:e.visible}),t.push(e)})),t.length>0&&(this.formConfig||(this.formConfig=s),this._metadata={name:"SimpleCrud",label:"SimpleCrud",fields:t})}addGridCustomValueFormattters(){var i,t,s;const e=(null===(i=this._metadata)||void 0===i?void 0:i.fields)||(null===(s=null===(t=this.dataUnit)||void 0===t?void 0:t.metadata)||void 0===s?void 0:s.fields);if(!e)return;const n=[];e.forEach((i=>{var t;(null===(t=i.properties)||void 0===t?void 0:t.rm_precision)&&!n.includes(i.name)&&n.push(i.name)})),n.forEach((i=>{this.addCustomValueFormatter(i,this._rmPrecisionCustomValueFormatter)}))}onDataStateChange(i){this.dataState=Object.assign({},i.detail)}getTaskBarDisabledButtons(){var i,t,s,e,n,o;const h=[];return(null===(i=this.dataState)||void 0===i?void 0:i.hasNext)||h.push(f.NEXT),(null===(t=this.dataState)||void 0===t?void 0:t.hasPrevious)||h.push(f.PREVIOUS),(null===(e=null===(s=this.dataState)||void 0===s?void 0:s.selectionInfo)||void 0===e?void 0:e.isEmpty())&&h.push(f.FORM_MODE),(null===(o=null===(n=this.dataState)||void 0===n?void 0:n.selectionInfo)||void 0===o?void 0:o.length)>1&&h.push(f.CLONE),h}handleCancelEdit(){var i;(null===(i=this.dataState)||void 0===i?void 0:i.recordsIsEmpty)&&(this.goToView(p.GRID),this.dataUnit.clearSelection())}handleConfiguratorEvent(i,t){i.stopImmediatePropagation(),"SAVE"!==t?this.configuratorCancel.emit():this.configuratorSave.emit()}getColumnSearch(i,t){return null!=this._columnSearch||(this._moreOptions=i,this._columnSearch=T(t,(({argument:i})=>new Promise((t=>{this._grid.filterColumns(i).then((i=>{t(i.filter((i=>!i.hidden)).map((i=>({label:i.label,value:i.name}))))}))}))),(t=>{var s;null!=t&&(this._grid.locateColumn(t.value),null===(s=i.hideActions)||void 0===s||s.call(i))}))),this._columnSearch}onSelectField(i,t){null!=i&&(this._fieldToGetFocus=i.value,t.hideActions())}getFieldSearch(i,t){return null!=this._fieldSearch||(this._moreOptions=i,i.addEventListener("ezPopoverOpen",(()=>this.findField())),this._fieldSearch=T(t,(({argument:i})=>this.fieldsOptionLoader(i)),(t=>this.onSelectField(t,i)))),this._fieldSearch}getFormFields(){var i,t;return null!==(t=null===(i=this.formConfig)||void 0===i?void 0:i.fields)&&void 0!==t?t:this._formFields}handleFormSetFields(i){h.equals(this._formFields,i)||(this._formFields=null!=i?i:[])}fieldsOptionLoader(i){const t=null==i?void 0:i.toLowerCase(),s=this.getFormFields().map((i=>{var t;return null===(t=this.dataUnit)||void 0===t?void 0:t.getField(i.name)})).filter((i=>{var s,e;return(null===(s=i.name)||void 0===s?void 0:s.toLowerCase().includes(t))||(null===(e=i.label)||void 0===e?void 0:e.toLowerCase().includes(t))})).map((i=>({value:i.name,label:i.label})));return Promise.resolve(s)}isGridInsertActive(){return this.enableGridInsert&&this.dataUnit.hasNewRecord()}getActionsList(){var i,t;const s=[{value:n.generateUUID(),label:null!==(t=null===(i=this.messagesBuilder)||void 0===i?void 0:i.getMessage("snkSimpleCrud.findColumn",void 0))&&void 0!==t?t:"Buscar",disableCloseOnSelect:!0,eagerInitialize:!0,itemBuilder:(i,t)=>this._currentViewMode===p.GRID?this.getColumnSearch(i,t):this.getFieldSearch(i,t)}];if(this.enableGridInsert&&s.push(this._continuousInsertUtils.actionContinuousInsert(this.enableContinuousInsert,(()=>{this.enableContinuousInsert=!this.enableContinuousInsert,this._continuousInsertUtils.handleSaveConfig(this.enableContinuousInsert)}))),this.isGridInsertActive())return s;if(null!=this.taskbarManager&&null!=this.taskbarManager.getMoreOptions){const i=this.getTopTaskBarId();return s.concat(this.taskbarManager.getMoreOptions(i,this.configName,this.dataState,this.actionsList))}return this.actionsList?s.concat(this.actionsList):s}getTopTaskBarId(){var i;return(null===(i=this.dataState)||void 0===i?void 0:i.isDirty)?`snkGridTopTaskbar.finish_edition${y.PRIMARY}`:`snkGridTopTaskbar.regular${y.PRIMARY}`}async keyDownListener(i){i.ctrlKey&&null!=i.key&&"F"===i.key.toUpperCase()&&null!=this._element&&(d.isHiddenElement(this._element)||(l.closeAll(),this._currentViewMode===p.GRID?await this.findColumn():await this.findField(),i.preventDefault()))}async findField(){await this.openSeach(this._fieldSearch)}async findColumn(){await this.openSeach(this._columnSearch)}async openSeach(i){await I(this._moreOptions,i)}clearFieldToFocusHandler(){this._fieldToGetFocus=void 0}connectedCallback(){window.addEventListener("keydown",this._keyDownHandler,{capture:!0})}disconnectedCallback(){window.removeEventListener("keydown",this._keyDownHandler)}gridConfigChangeHandler(i){i.stopPropagation(),this.configName&&F.saveGridConfig(i.detail,this.configName,this.resolveResourceID())}modalConfigChangeHandler(i){const t=i.detail;this._grid.setColumnsState(t.columns).then((()=>{this.setGridConfig(t),this.closeGridConfig(),this.dataExporterProviderStore()})),i.stopPropagation()}async dataExporterProviderStore(){if(null==this.dataUnit)return;if(null==this._grid)return;const i=new S(this.dataUnit,this._grid);z.set("exporterProviders",Object.assign(Object.assign({},z.get("exporterProviders")),{[this.getDataExporterStoreKey()]:i}))}getDataExporterStoreKey(){return`SnkSimpleCrudDataExporter:${null==this.configName?this.dataUnit.name:this.configName}`}setGridConfig(i){this.gridConfig=i,k.assertDefaultSorting(this.gridConfig,this.dataUnit)}setFormConfig(i,t){this.formConfig&&!t||(this.formConfig=i)}closeGridConfig(){this._showPopUpGridConfig=!1}getPageSize(){return this.mode===v.IN_MEMORY?0:null==this.pageSize?150:this.pageSize}resolveResourceID(){return n.isEmpty(this.resourceID)?this._resourceID:this.resourceID}getFormConfig(){var i;const t=null===(i=this._formConfigManager)||void 0===i?void 0:i.getConfig(this.dataUnit,this.ignoreReadOnlyFormFields);return this.configName||t?t:this.formConfig}updateFormConfig(){let i=this.formConfig;null==this.formLegacyConfigName&&(i=Object.assign(Object.assign({},this.formConfig),{fields:this.dataUnit.metadata.fields})),this.setFormConfig(i,!0),null==this._formConfigManager&&(this._formConfigManager=new R(this.configName,this.resolveResourceID())),this._formConfigManager.setConfig(this.formConfig)}handleDataUnitOnInsertionMode(){this.enableGridInsert||this.goToView(p.FORM)}async initKeyboardManager(){var i;const t=new u,s=this.dataUnit||await(null===(i=this._snkDataUnit)||void 0===i?void 0:i.getDataUnit());null!=s&&t.bind("F7",(()=>s.saveData()),{description:"Salva os dados.",element:this._element}).bind("F8",s.addRecord.bind(s),{description:"Adiciona um novo registro.",element:this._element}).bind("F9",s.removeSelectedRecords.bind(s),{description:"Remove o registro selecionado.",element:this._element}).bind("Escape",(()=>{s.isDirty()&&s.cancelEdition()}),{debounceTime:1e3,description:"Cancela uma ação.",element:this._element})}async handleFormConfigSaved(){await this.loadFormConfig(!0,!0)}renderTaskbarContent(){var i;return s("snk-taskbar",{class:this._currentViewMode===p.FORM&&`ez-box ${this.outlineMode?"ez-box--outline":"ez-box--shadow-xsmall"} ez-padding--small`,dataUnit:this.dataUnit,primaryButton:(null===(i=this.dataState)||void 0===i?void 0:i.isDirty)?"SAVE":"INSERT","data-element-id":"grid_left",messagesBuilder:this.messagesBuilder,buttons:this._taskbarProcessor.buttons,actionsList:this.getActionsList(),disabledButtons:this._taskbarProcessor.disabledButtons,customButtons:this._taskbarProcessor.customButtons,"data-exporter-store-key":this.getDataExporterStoreKey(),slot:"leftButtons",presentationMode:y.SECONDARY},s("slot",{name:"TASKBAR_CUSTOM_ELEMENTS"}))}render(){var i;if(null!=this.dataUnit)return s("snk-data-unit",{ref:i=>this._snkDataUnit=i,class:"simple-crud__container",dataUnit:this.dataUnit,useCancelConfirm:this.useCancelConfirm,onDataStateChange:i=>this.onDataStateChange(i),onCancelEdition:this.handleCancelEdit.bind(this),pageSize:this.getPageSize(),onInsertionMode:this.handleDataUnitOnInsertionMode.bind(this),onDataUnitReady:i=>this.dataUnitReady.emit(i.detail),onMessagesBuilderUpdated:i=>this.messagesBuilder=i.detail,onDataUnitFieldsHidded:this.updateFormConfig.bind(this),domainMessagesBuilder:this.domainMessagesBuilder},s("header",null,s("slot",{name:"snkSimpleCrudHeader"})),s("section",{class:`ez-box ${this.outlineMode?"ez-box--outline":"ez-box--shadow"} simple-crud__container-section`},s("ez-view-stack",{ref:i=>this._viewStack=i,"data-element-id":"simple-crud"},s("stack-item",null,s("ez-grid",{class:"ez-margin-bottom--large",ref:i=>this._grid=i,dataUnit:this.dataUnit,config:this.gridConfig,"no-header":!0,multipleSelection:this.multipleSelection,onEzDoubleClick:()=>this.goToView(p.FORM),onConfigChange:i=>this.gridConfigChangeHandler(i),columnfilterDataSource:this.dataUnit.name&&this.dataUnit.name.includes(w.IN_MEMORY_DATA_UNIT_NAME)?void 0:this._multiSelectionListDataSource,useEnterLikeTab:this.useEnterLikeTab,autoFocus:this.autoFocus,enableGridInsert:this.enableGridInsert,enableContinuousInsert:this.enableContinuousInsert,enableLockManagerTaskbarClick:this.enableLockManagerTaskbarClick,enableLockManagerLoadingComp:this.enableLockManagerLoadingComp,outlineMode:this.outlineMode,paginationCounterMode:this.paginationCounterMode},this.renderTaskbarContent(),s("div",{slot:"footer"},s("slot",{name:"snkSimpleCrudFooter"})))),s("stack-item",null,this.renderTaskbarContent(),s("ez-form",{ref:i=>this._form=i,class:"ez-margin-top--large",dataUnit:this.dataUnit,config:this.getFormConfig(),fieldToFocus:this._fieldToGetFocus,onEzFormSetFields:i=>this.handleFormSetFields(i.detail),onEzFormRequestClearFieldToFocus:this.clearFieldToFocusHandler.bind(this)}),s("snk-simple-form-config",{ref:i=>this._snkSimpleFormConfig=i,dataUnit:this.dataUnit,onSnkConfigSaved:this.handleFormConfigSaved.bind(this),configName:null!==(i=this.formLegacyConfigName)&&void 0!==i?i:this.configName})),this.messagesBuilder&&s("snk-configurator",{ref:i=>this._snkConfigurator=i,viewMode:this._currentViewMode,messagesBuilder:this.messagesBuilder,onConfigSelected:i=>this.goToView(i.detail),onOpenConfig:i=>this.openConfig(i.detail),showActionButtons:this.showConfiguratorButtons,onSave:i=>this.handleConfiguratorEvent(i,"SAVE"),onCancel:i=>this.handleConfiguratorEvent(i,"CANCEL"),resourceID:this.resolveResourceID(),customContainerId:this._customContainerId})),s("div",{id:`${this._customContainerId}`},s("slot",{name:"SnkConfigContainerSlot"}))),s("ez-modal",{modalSize:"small",closeEsc:!1,closeOutsideClick:!1,opened:this._showPopUpGridConfig,onEzCloseModal:()=>this.closeGridConfig()},s("snk-grid-config",{ref:i=>this._snkGridConfig=i,config:this.gridConfig,"data-element-id":this._element.getAttribute(c.DATA_ELEMENT_ID_ATTRIBUTE_NAME),selectedIndex:0,configName:this.configName,onConfigChange:i=>this.modalConfigChangeHandler(i),onConfigCancel:()=>this.closeGridConfig(),resourceID:this.resolveResourceID()})))}get _element(){return e(this)}static get watchers(){return{resourceID:["handleResourceIDChanged"],entityName:["onChangeEntityName"],mode:["onModeChange"],dataState:["observeDataState"],formLegacyConfigName:["observeFormLegacy"],gridLegacyConfigName:["observeGridLegacy"]}}};O.style=".sc-snk-simple-crud-h{display:flex;height:100%;width:100%;--snk-simple-crud-grid--min-height:300px}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:auto 1fr;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}.simple-crud__form--hidden.sc-snk-simple-crud{display:none}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;--ez-grid__container--shadow--outline:none;--ez-grid--min-height:var(--snk-simple-crud-grid--min-height)}ez-form.sc-snk-simple-crud{min-height:300px}";export{O as snk_simple_crud}
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as i,c as o,h as t,H as n,g as s}from"./p-d2d301a6.js";import{UserInterface as e,ObjectUtils as l,StringUtils as a,ApplicationContext as r,ElementIDUtils as d,ArrayUtils as h}from"@sankhyalabs/core";import{DataType as c,getConvertedValue as f}from"@sankhyalabs/core/dist/dataunit/metadata/DataType";import{CheckMode as u,ApplicationUtils as g,DialogType as v}from"@sankhyalabs/ezui/dist/collection/utils";import{d as m,D as b,e as p,C as z,a as _,c as k,A as C}from"./p-1d19a5b0.js";import{S as x}from"./p-3ce68be5.js";import{R as y}from"./p-688dcb4c.js";import{S as F}from"./p-fa816fb2.js";import{U as w}from"./p-22ddc147.js";import{buildFormConfigFromDataUnit as D}from"@sankhyalabs/ezui/dist/collection/utils/form";import"./p-3fcb90d6.js";import"./p-ff1990ad.js";import"./p-5a7e18f4.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";const E=class{constructor(t){i(this,t),this.configOptionsChanged=o(this,"configOptionsChanged",7),this._defaultType=void 0,this.fieldConfig={},this.idConfig=void 0,this.dataUnit=void 0,this.messagesBuilder=void 0}onConfigDefault(i){null!=i&&(this._defaultType=i,this.fieldConfig.defaultValue={type:this._defaultType},this.configOptionsChanged.emit(this.fieldConfig))}buildOptions(){var i,o,t;let n=null===(t=null===(i=this.dataUnit)||void 0===i?void 0:i.getField(null===(o=this.fieldConfig)||void 0===o?void 0:o.name))||void 0===t?void 0:t.userInterface;return n===e.SEARCH&&(n=e.INTEGERNUMBER),m.UserInterface[n]}enabledValueDefault(){var i,o,t;const n=null===(i=this.dataUnit)||void 0===i?void 0:i.getField(null===(o=this.fieldConfig)||void 0===o?void 0:o.name),s=null===(t=null==n?void 0:n.properties)||void 0===t?void 0:t.allowDefault,l=m.UserInterface.hasOwnProperty(null==n?void 0:n.userInterface)||(null==n?void 0:n.userInterface)===e.SEARCH;return!(null!=s&&"true"!==s||!l)}isAllowDefault(){var i,o;const t=null===(o=null===(i=this._fieldProperties)||void 0===i?void 0:i.properties)||void 0===o?void 0:o.allowDefault;return null==t||"true"===t}loadDefaultValue(){var i;null==this.fieldConfig?(this._defaultType=b.fixed,this.fieldConfig={defaultValue:{type:this._defaultType}}):null==(null===(i=this.fieldConfig.defaultValue)||void 0===i?void 0:i.type)?(this._defaultType=b.fixed,this.fieldConfig.defaultValue={type:this._defaultType}):this._defaultType=this.fieldConfig.defaultValue.type}getFieldProperties(i){var o;if(null!=i)return null===(o=this.dataUnit)||void 0===o?void 0:o.getField(i)}getMessage(i,o){return this.messagesBuilder.getMessage(i,o)}getDefaultType(){var i;return null!==(i=this.fieldConfig.defaultValue.type)&&void 0!==i?i:b.fixed}getEnabledByProperty(i,o){const t=this._fieldProperties;if(null==t)return!0;const n=t.properties||{};return n.hasOwnProperty(o)?"S"!==n[o]:!0!==t[i]}getValueByProperty(i){const o=this._fieldProperties;return null!=o&&!0===o[i]||this.fieldConfig[i]}getValidatedValue(i){var o,t;if(null==i)return;const n=null===(o=this.dataUnit)||void 0===o?void 0:o.getField(null===(t=this.fieldConfig)||void 0===t?void 0:t.name),s=null==n?void 0:n.dataType;if(null==s)return;const e=null!=(null==i?void 0:i.waitmessage)?void 0:s!==c.OBJECT&&s!==c.DATE&&"object"==typeof i?i.value:i;return s===c.OBJECT?JSON.stringify(e):e}buildInputDefault({value:i,enabled:o,label:n,name:s,required:a,userInterface:r},d,h){let c,f=0,u=0;const g=null==r||null==p[r]?p.DEFAULT:p[r];if(r===e.OPTIONSELECTOR){const i=null==d?void 0:d.options;if("string"==typeof i){const o=l.stringToObject(i);c=Object.keys(o).map((i=>({value:i,label:o[i]})))}else c=i}else r===e.DECIMALNUMBER&&(f=Number((null==d?void 0:d.precision)||2),u=Number((null==d?void 0:d.prettyPrecision)||f));return t(g,Object.assign({value:i,enabled:o,label:n,"data-field-name":s,key:s,onEzChange:i=>this.onChange(null==i?void 0:i.detail)},this.getConditionalAttributes(r,a,c,f,u,h)))}getConditionalAttributes(i,o,t,n,s,l){switch(i){case e.SEARCH:return{suppressEmptyOption:o,optionLoader:i=>this.onSearch(i)};case e.OPTIONSELECTOR:return{suppressEmptyOption:o,options:t};case e.CHECKBOX:case e.SWITCH:return{mode:l};case e.INTEGERNUMBER:case e.DECIMALNUMBER:return{precision:n,prettyPrecision:s,onEzStartChange:i=>this.onChange(null==i?void 0:i.detail)};case e.DATE:case e.DATETIME:case e.TIME:return{onEzStartChange:i=>this.onChange(null==i?void 0:i.detail)};default:return{}}}onChange(i){this.fieldConfig.defaultValue.value=this.getValidatedValue(i),this.configOptionsChanged.emit(this.fieldConfig)}onSearch(i){if(null!=this._application&&null!=this.fieldConfig)return this._application.executeSearch(i,this.fieldConfig.name,this.dataUnit)}buildField(i,o){const{name:t,label:n,readOnly:s,required:l,defaultValue:r}=o,{userInterface:d,properties:h}=i;let c,g=a.getBooleanValue(null==h?void 0:h.allowDefault,!s);d===e.FILE&&(g=!1),g&&(c=null==r?void 0:r.value,null!=c&&(c=f(null==i?void 0:i.dataType,c)));const v={value:c,enabled:g,label:n,name:t,required:l,userInterface:d};switch(d){case e.SWITCH:return this.buildInputDefault(v,void 0,u.SWITCH);case e.CHECKBOX:return this.buildInputDefault(v,void 0,u.REGULAR);case e.OPTIONSELECTOR:case e.DECIMALNUMBER:return this.buildInputDefault(v,h);default:return this.buildInputDefault(v)}}componentWillLoad(){var i;this.loadDefaultValue(),this._application=r.getContextValue("__SNK__APPLICATION__"),this._fieldProperties=this.getFieldProperties(null===(i=this.fieldConfig)||void 0===i?void 0:i.name)}componentDidLoad(){d.addIDInfo(this._element,this.fieldConfig.name)}render(){var i,o;return t(n,null,t("div",{id:this.idConfig},t("div",{class:"ez-row ez-padding--medium"},t("div",{class:"ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small"},t("ez-text-input",{label:this.getMessage("snkConfigOptions.label.nameField"),value:null===(i=this.fieldConfig)||void 0===i?void 0:i.label,onEzChange:i=>{this.fieldConfig.label=i.detail,this.configOptionsChanged.emit(this.fieldConfig)}})),t("div",{class:"ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small"},t("ez-combo-box",{label:this.getMessage("snkConfigOptions.label.typeValueDefault"),suppressEmptyOption:!0,enabled:this.enabledValueDefault(),onEzChange:i=>{var o;return this.onConfigDefault(null===(o=i.detail)||void 0===o?void 0:o.value)},value:this.getDefaultType()},t("option",{value:b.fixed},this.getMessage("snkConfigOptions.options.valueFixed")),t("option",{value:b.variable},this.getMessage("snkConfigOptions.options.variable")))),t("div",{class:"ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small"},this._defaultType===b.variable?t("ez-combo-box",{label:this.getMessage("snkConfigOptions.label.valueDefault"),enabled:this.isAllowDefault(),onEzChange:i=>{var o;this.fieldConfig.defaultValue.value=null===(o=i.detail)||void 0===o?void 0:o.value,this.configOptionsChanged.emit(this.fieldConfig)},value:this.fieldConfig.defaultValue.value,options:this.buildOptions()}):(null===(o=this._fieldProperties)||void 0===o?void 0:o.userInterface)&&this.buildField(this._fieldProperties,this.fieldConfig))),t("div",{class:"ez-row ez-padding--medium config-options__switch-row"},t("div",{class:"ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small"},t("ez-check",{mode:u.SWITCH,label:this.getMessage("snkConfigOptions.label.clearDuplicate"),value:this.fieldConfig.cleanOnCopy,onEzChange:i=>{this.fieldConfig.cleanOnCopy=i.detail,this.configOptionsChanged.emit(this.fieldConfig)}})),t("div",{class:"ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small"},t("ez-check",{mode:u.SWITCH,label:this.getMessage("snkConfigOptions.label.requiredField"),enabled:this.getEnabledByProperty("required","systemRequired"),value:this.getValueByProperty("required"),onEzChange:i=>{this.fieldConfig.required=i.detail,this.configOptionsChanged.emit(this.fieldConfig)}})),t("div",{class:"ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small"},t("ez-check",{mode:u.SWITCH,label:this.getMessage("snkConfigOptions.label.protectedField"),enabled:this.getEnabledByProperty("readOnly","systemReadOnly"),value:this.getValueByProperty("readOnly"),onEzChange:i=>{this.fieldConfig.readOnly=i.detail,this.configOptionsChanged.emit(this.fieldConfig)}})))))}get _element(){return s(this)}};E.style=".sc-snk-config-options-h{--snk-config-options--border:2px solid var(--color--secondary-200, #D2D3DA);width:100%;border-radius:15px;border:var(--snk-config-options--border)}.config-options__switch-row.sc-snk-config-options{margin-top:-30px}";const T=class{constructor(t){i(this,t),this.exit=o(this,"exit",7),this.actionClick=o(this,"actionClick",7),this.formItemsReady=o(this,"formItemsReady",7),this._customEditors=new Map,this._dataUnit=void 0,this._dataState=void 0,this._showFormConfig=!1,this._configManager=void 0,this.configName=void 0,this.recordsValidator=void 0,this.messagesBuilder=void 0,this.formLegacyConfigName=void 0,this.resourceID=void 0}async showConfig(){this._showFormConfig=!0}async hideConfig(){this._showFormConfig=!1}async addCustomEditor(i,o){if(this._form)return void this._form.addCustomEditor(i,o);const t=new Map(this._customEditors);t.set(i,o),this._customEditors=t}async setFieldProp(i,o,t){await this._form.setFieldProp(i,o,t)}closeConfig(){this.hideConfig()}dataunitReady(){d.addIDInfo(this._element,null,{dataUnit:this._dataUnit})}setCustomEditors(){if(this._form)for(const[i,o]of this._customEditors)this._form.addCustomEditor(i,o),this._customEditors.delete(i)}async componentDidRender(){this.setCustomEditors()}async componentWillLoad(){let i=this._element.parentElement;for(;i;){if("SNK-DATA-UNIT"===i.tagName.toUpperCase()){this._snkDataUnit=i,this._dataUnit=this._snkDataUnit.dataUnit,this._dataState=this._snkDataUnit.dataState,this._dataUnit?this.dataunitReady():this._snkDataUnit.addEventListener("dataUnitReady",(i=>{this._dataUnit=i.detail})),this._snkDataUnit.addEventListener("dataStateChange",this.handleDataStateChange.bind(this));break}i=i.parentElement}null==this.resourceID&&(this.resourceID=await y.getResourceID()),this._configManager=new x(this.configName,this.resourceID,void 0,this._dataUnit),this.addFormLegacyConfig(),await this._configManager.loadConfig()}async handleDataStateChange(i){var o;this._dataState=i.detail;const t=await this._snkDataUnit.getFieldsWithRmPrecision();for(const i of t||[]){if(!i)continue;const t=null===(o=this._dataState.rowMetadata)||void 0===o?void 0:o.getProp("rm_precision",i);(t||0===t)&&(await this.setFieldProp(i,"precision",t),await this.setFieldProp(i,"prettyPrecision",t))}}addFormLegacyConfig(){this.formLegacyConfigName&&this._configManager.addFormLegacyConfig(this.formLegacyConfigName)}render(){if(this._dataUnit&&this._dataState)return t("section",null,t("div",{class:"ez-row"},t("div",{class:"ez-col ez-col--sd-12"},t("ez-form",{ref:i=>this._form=i,key:"ezForm"+this._snkDataUnit.entityName,"data-element-id":"embedded",dataUnit:this._dataUnit,config:this._configManager.getConfig(this._dataUnit),recordsValidator:this.recordsValidator,class:this._showFormConfig?"snk-form__form--hidden":""}),this._showFormConfig&&t("snk-form-config",{messagesBuilder:this.messagesBuilder,dataUnit:this._dataUnit,configManager:this._configManager,onConfigClose:()=>this.closeConfig()}))))}get _element(){return s(this)}};T.style=".sc-snk-form-h{--snk-form__header--min-height:94px;display:block}.snk-form__form--hidden.sc-snk-form{display:none}";const O="EZ-COLLAPSIBLE-BOX",S="fieldsWithoutGroupContainer",A="fieldsAvailableContainer",L="addNewGroupContainer",I=class{constructor(t){i(this,t),this.configChange=o(this,"configChange",7),this.configClose=o(this,"configClose",7),this._listEnabledFields=[],this._renderTimer=500,this._tabSelected=1,this._labelNewGroup="Novo grupo",this._mouseOnFieldConfig=!1,this._mouseOnConfigOptions=!1,this._editingTitleGroup=!1,this._newGroupBoxes=[],this._currentGroupBoxes=[],this._formFieldsStyle="ez-col ez-col--sd-12 ez-col--tb-4 ez-padding-right--small ez-padding-bottom--medium sc-snk-form-config",this._fieldsAvailableStyle="ez-col ez-col--sd-12 ez-col--tb-12 ez-margin-bottom--medium ez-margin-right--medium sc-snk-form-config",this._fieldFloatingStyle="form-config__field-config--dragged",this._sortableTimer=100,this._formConfigOptions=[],this._fieldConfigSelected=void 0,this._layoutFormConfig=void 0,this._fieldsAvailable=void 0,this._formConfig={},this._formConfigChanged=!1,this._optionFormConfigSelected=void 0,this._optionFormConfigChanged=!1,this._tempGroups=[],this.dataUnit=void 0,this.configManager=void 0,this.messagesBuilder=void 0,this.ignoreReadOnlyFormFields=void 0}observeConfigManager(){this.loadConfig(this._sortableTimer)}loadFields(i=0){this._layoutFormConfig=[],i>0?setTimeout((()=>{this.buildFields()}),i):this.buildFields()}buildFields(){this.buildFormConfig(),this.buildAvailableFields()}loadFormConfig(i){var o;this._formConfig=this.getConfig(),this.loadFields(i),this.controlFieldConfig(),null!=(null===(o=this._filterFieldsAvailable)||void 0===o?void 0:o.value)&&(this._filterFieldsAvailable.value="")}getConfig(){let i=this.configManager.getConfig(this.dataUnit,this.ignoreReadOnlyFormFields);return i.fields&&0===i.fields.length&&(i=void 0),null==i&&(i=D(this.dataUnit)),l.copy(i)}cancelChangeConfig(){!0===this._formConfigChanged?this.openConfirmDialog(this.getMessage("snkFormConfig.confirm.cancel")).then((i=>{i&&(this._formConfigChanged=!1,this.resetChangeConfig())})):this.resetChangeConfig()}cancelChangeOptionConfig(){!0===this._optionFormConfigChanged?this.openConfirmDialog(this.getMessage("snkFormConfig.confirm.cancel")).then((i=>{i&&(this._optionFormConfigChanged=!1,this.resetChangeOptionConfig())})):this.resetChangeOptionConfig()}resetChangeConfig(){this.loadFormConfig(this._sortableTimer),this.clearTempGroups()}resetChangeOptionConfig(){this._formConfigChanged=!1,this.loadConfig(this._sortableTimer),this.clearTempGroups()}getTabsToSave(){return this._layoutFormConfig.map(((i,o)=>({label:i.tab,order:o,visible:i.visible})))}getFieldsToSave(){const i=[];return this._formContainer.querySelectorAll("snk-field-config").forEach((o=>{const t=o.fieldConfig;if(null==t)return;const n={cleanOnCopy:t.cleanOnCopy||!1,group:t.group,label:t.label,name:t.name,required:t.required,readOnly:t.readOnly,tab:t.tab};null!=t.defaultValue&&(n.defaultValue=null==t.defaultValue.type?{type:b.fixed,value:t.defaultValue}:t.defaultValue),i.push(n)})),i}isDefaultConfiguration(){var i;return(null===(i=this._optionFormConfigSelected)||void 0===i?void 0:i.origin)===w.DEFAULT&&!0===this._optionFormConfigChanged&&!1===this._formConfigChanged}buildConfigToSave(){let i={};const o=this.isDefaultConfiguration();if(i=o?this.getConfig():l.copy(this._formConfig),!1===o){const o=this.getTabsToSave();(null==o?void 0:o.length)>0&&(i.tabs=o);const t=this.getFieldsToSave();(null==t?void 0:t.length)>0&&(i.fields=t)}return i.defaultConfiguration=o,i}saveConfig(){var i;(null===(i=this._tempGroups)||void 0===i?void 0:i.length)>0?g.alert(this.getMessage("snkFormConfig.confirm.title"),this.getMessage("snkFormConfig.confirm.group")):(this._formConfigChanged=!1,this._optionFormConfigChanged=!1,this.configManager.saveConfig(this.buildConfigToSave()).then((i=>{var o;g.info(this.getMessage("snkFormConfig.info.successfullyConfigSaved"),{iconName:"check"});const t=null===(o=this._formConfigOptions)||void 0===o?void 0:o.find((i=>i.origin===w.USER));this.setFormConfig(t),this.configChange.emit(i)})))}applyOptionConfig(){if(!0===this._optionFormConfigChanged&&null!=this._optionFormConfigSelected){const i=this._optionFormConfigSelected.name||"configuração selecionada",o=this._optionFormConfigSelected.origin===w.DEFAULT?"pessoal":"padrão",t=this.getMessage("snkFormConfig.confirm.apply").replace("{0}",i).replace("{1}",o);this.openConfirmDialog(t).then((i=>{i&&this.saveConfig()}))}else this.saveConfig()}controlFieldConfig(i){var o;this._fieldConfigSelected=null!=i?(null===(o=this._fieldConfigSelected)||void 0===o?void 0:o.name)===(null==i?void 0:i.name)?void 0:i:void 0}getFieldConfigStyle(i){var o;return this._formFieldsStyle+((null===(o=this._fieldConfigSelected)||void 0===o?void 0:o.name)===i.name?" form-config__field-config--selected":"")}getFieldsByGroup(i){var o;return(null===(o=i.fields)||void 0===o?void 0:o.length)?i.fields.map((i=>{var o,n;return t("div",{key:i.name,class:this.getFieldConfigStyle(i),"data-draggable-element":"field",onMouseDown:i=>this.controlMoveField(i)},t("snk-field-config",{messagesBuilder:this.messagesBuilder,onEzClickIcon:i=>{this.handleFieldConfigChange(i)},modeInsertion:!1,fieldConfig:i,dataUnit:this.dataUnit,isConfigActive:(null===(o=this._fieldConfigSelected)||void 0===o?void 0:o.name)===i.name,id:i.name,key:i.name}),(null===(n=this._fieldConfigSelected)||void 0===n?void 0:n.name)===i.name&&t("div",{class:"ez-flex form-config__config-options"},t("snk-config-options",{idConfig:i.name,messagesBuilder:this.messagesBuilder,dataUnit:this.dataUnit,fieldConfig:this._fieldConfigSelected,"data-element-id":this._element.getAttribute(d.DATA_ELEMENT_ID_ATTRIBUTE_NAME),onConfigOptionsChanged:i=>this.handleconfigOptionsChanged(i.detail)})))})):t("div",{class:"form-config__add-group-container"},t("div",{class:"form-config__add-group-content"},t("div",{class:"form-config__add-group-label"},t("label",{class:"ez-text ez-text--center ez-text--medium ez-text--primary ez-text--bold"},this.getMessage("snkFormConfig.form.labelDropField")))))}handleconfigOptionsChanged(i){var o;null===(o=this._formConfig.fields)||void 0===o||o.forEach((()=>{})),this._formConfigChanged=!0}closeFormConfig(){!0===this._formConfigChanged||!0===this._optionFormConfigChanged?this.openConfirmDialog(this.getMessage("snkFormConfig.confirm.exit")).then((i=>{i&&(this._formConfigChanged=!1,this.configClose.emit())})):this.configClose.emit()}openConfirmDialog(i="",o=this.getMessage("snkFormConfig.confirm.title")){return g.confirm(o,i)}controlMoveField(i){const o=null==i?void 0:i.target;null!=(null==o?void 0:o.closest('[data-draggable-element="field"]'))&&(this._mouseOnFieldConfig=!0,null!=(null==o?void 0:o.closest(".form-config__config-options"))||null!=(null==o?void 0:o.closest(".field-config__options"))?this._mouseOnConfigOptions=!0:!1===["minus","settings-inverted","chevron-up"].includes(null==o?void 0:o.iconName)&&this.controlFieldConfig())}controlStartDraggingField(i){var o,t,n;if(this._mouseOnConfigOptions)null==i||i.cancel(),this._mouseOnConfigOptions=!1;else{const s=null===(n=null===(t=null===(o=null==i?void 0:i.data)||void 0===o?void 0:o.dragEvent)||void 0===t?void 0:t.data)||void 0===n?void 0:n.sourceContainer;null!=s&&s.classList.add(this._fieldFloatingStyle)}}controlSortedDraggingField(i){var o,t,n,s,e,l,a,r;const d=null===(o=null==i?void 0:i.data)||void 0===o?void 0:o.oldContainer,h=null===(t=null==i?void 0:i.data)||void 0===t?void 0:t.newContainer,c=null===(e=null===(s=null===(n=null==i?void 0:i.data)||void 0===n?void 0:n.dragEvent)||void 0===s?void 0:s.data)||void 0===e?void 0:e.source,f=null===(r=null===(a=null===(l=null==i?void 0:i.data)||void 0===l?void 0:l.dragEvent)||void 0===a?void 0:a.data)||void 0===r?void 0:r.originalSource;null!=d&&null!=h&&null!=c&&null!=f&&(h.tagName!==O&&h.id!==S||d.id!==A?d.tagName!==O&&d.id!==S||h.id!==A||(c.className=this._fieldsAvailableStyle,c.querySelector("snk-field-config").modeInsertion=!0,f.className=this._fieldsAvailableStyle,f.querySelector("snk-field-config").modeInsertion=!0):(c.className=this._formFieldsStyle,c.querySelector("snk-field-config").modeInsertion=!1,f.className=this._formFieldsStyle,f.querySelector("snk-field-config").modeInsertion=!1))}isCancelDragAvailableField(i,o,t){var n,s;return null!=i&&null!=o&&null!=t&&(null===(n=t.data)||void 0===n?void 0:n.newIndex)!==(null===(s=t.data)||void 0===s?void 0:s.oldIndex)&&i.id===A&&o.id===i.id&&(t.cancel(),this._fieldsAvailable=[],setTimeout((()=>{this.buildAvailableFields()}),this._sortableTimer),!0)}isRemoveField(i,o,t){if(null==i||null==o||null==t)return!1;if((o.tagName===O||o.id===S)&&i.id===A){const i={detail:{field:t,type:C.remove}};return setTimeout((()=>{this.handleFieldConfigChange(i)}),this._renderTimer),!0}return!1}isAddOrMoveField(i,o,t,n){var s;return null!=i&&null!=o&&null!=t&&null!=n&&(n.newIndex!==n.oldIndex||o.dataset.groupName!==i.dataset.groupName||i.id===S&&o.id===A)&&(this.isFieldAvailable(i,o)&&(t.tab=null===(s=this._tabConfig)||void 0===s?void 0:s.selectedTab),t.group=i.dataset.groupName,setTimeout((()=>{i.id.includes(L)&&this.clearTempGroups(!0),this.updateFieldsToSave(o.dataset.groupName!==i.dataset.groupName||i.id===S&&o.id===A?this._sortableTimer:0)}),this._renderTimer),!0)}isFieldAvailable(i,o){return null!=i&&null!=o&&(i.tagName===O||i.id===S)&&o.id===A}controlStopDraggingField(i){var o,t,n,s,e,l;const a=null===(o=null==i?void 0:i.data)||void 0===o?void 0:o.oldContainer,r=null===(t=null==i?void 0:i.data)||void 0===t?void 0:t.newContainer;if(this.isCancelDragAvailableField(r,a,i))return;const d=null===(e=null===(s=null===(n=null==i?void 0:i.data)||void 0===n?void 0:n.dragEvent)||void 0===s?void 0:s.data)||void 0===e?void 0:e.originalSource,h=null===(l=null==d?void 0:d.querySelector("snk-field-config"))||void 0===l?void 0:l.fieldConfig;this.isRemoveField(r,a,h)||this.isAddOrMoveField(r,a,h,null==i?void 0:i.data)}updateFieldsToSave(i=0){const o=this.getFieldsToSave();(null==o?void 0:o.length)>0&&(this._formConfig.fields=o),this.loadFields(i),this._formConfigChanged=!0}controlSortableField(){null!=this._sortableContainer&&(this._sortableField&&this._sortableField.destroy(),this._sortableField=new F(this._sortableContainer.querySelectorAll('[data-draggable-parent="field"]'),{draggable:'[data-draggable-element="field"]',mirror:{constrainDimensions:!0},distance:z.dragStartDistance}),this._sortableField.on(_.dragStart,(i=>this.controlStartDraggingField(i))),this._sortableField.on(_.dragSorted,(i=>this.controlSortedDraggingField(i))),this._sortableField.on(_.dragStop,(i=>this.controlStopDraggingField(i))))}controlStartDraggingGroup(i){(this._mouseOnFieldConfig||this._editingTitleGroup)&&(null==i||i.cancel(),this._mouseOnFieldConfig=!1)}controlStopDraggingGroup(i){i.data.newIndex!==i.data.oldIndex&&setTimeout((()=>{this.updateFieldsToSave(this._sortableTimer)}),this._renderTimer)}controlSortableGroup(){null!=this._sortableContainer&&(this._sortableGroup&&this._sortableGroup.destroy(),this._sortableGroup=new F(this._sortableContainer.querySelectorAll('[data-draggable-parent="group"]'),{draggable:'[data-draggable-element="group"]',mirror:{constrainDimensions:!0},distance:z.dragStartDistance}),this._sortableGroup.on(_.dragStart,(i=>this.controlStartDraggingGroup(i))),this._sortableGroup.on(_.dragStop,(i=>this.controlStopDraggingGroup(i))))}loadUserConfig(){null!=this.configManager&&this.configManager.fetchUserAvailableConfigs().then((i=>{if(this._formConfigOptions=i,null==this._formConfigOptions)return;let o=null==this._formConfig||this._formConfig.defaultConfiguration;const t=i.find((i=>i.origin===(o?w.DEFAULT:w.USER)));this.setFormConfig(t)}))}setFormConfig(i){this._optionFormConfigSelected=i}controlSelectFormConfig(i){const o=null==i?void 0:i.detail,t=this._formConfigOptions.find((i=>i.origin===(null==o?void 0:o.value)));this.setFormConfig(t),this._optionFormConfigChanged=!0,this.loadConfigByUser()}changeTabOrder(i){const o=[],t=this._tabConfig.querySelectorAll(".tab-config__tab");this._tabSelected=i,t.forEach(((i,t)=>{var n;if(t){const s=null===(n=i.querySelector(".tab-config__tab-label"))||void 0===n?void 0:n.getAttribute("title");o.push({label:s,order:t-1})}})),this._layoutFormConfig.map((i=>{o.forEach((o=>{o.label===i.tab&&(o.visible=i.visible)}))})),o.length>0&&(this._formConfig.tabs=o,this.loadFields(this._sortableTimer),this.controlFieldConfig(),this._formConfigChanged=!0)}async loadConfigByUser(){if(null==this.configManager)return;if(null==this._optionFormConfigSelected)return;let i;this._optionFormConfigSelected.origin===w.DEFAULT?(i=await this.configManager.fetchDefaultConfig(),i||(i=this.configManager.getEmptyConfig())):i=this.getConfig(),null!=i&&(this._formConfig=i,this._tabSelected=1,this.loadFields(this._sortableTimer),this.controlFieldConfig(),this.clearTempGroups())}loadConfig(i=0){this.loadFormConfig(i),this.loadUserConfig()}addNewGroup(){var i,o;const t=null===(i=this._tabConfig)||void 0===i?void 0:i.selectedTab;null==(null===(o=this._tempGroups)||void 0===o?void 0:o.find((i=>i.tab===t&&i.group.includes(this._labelNewGroup))))&&(this._tempGroups.push({tab:t,group:this.handleDuplicateGroups(this._labelNewGroup,this._tabConfig.selectedTab)}),this.loadFields(),this.controlFieldConfig(),this._formConfigChanged=!0)}clearTempGroups(i=!1){var o;(null===(o=this._tempGroups)||void 0===o?void 0:o.length)>0&&(this._tempGroups=i?this._tempGroups.filter((i=>i.tab!==this._tabConfig.selectedTab)):[])}removeGroup(i){null!=i?this._tempGroups=this._tempGroups.filter(((o,t)=>t!==i&&o.tab===this._tabConfig.selectedTab||o.tab!==this._tabConfig.selectedTab)):this.updateFieldsToSave(this._sortableTimer)}checkGroupExists(i,o,t=!1){var n,s,e;const l=null===(n=this._tabConfig)||void 0===n?void 0:n.selectedTab,a=null===(s=this._layoutFormConfig)||void 0===s?void 0:s.find((i=>i.tab===l)),r=null===(e=null==a?void 0:a.groups)||void 0===e?void 0:e.map((i=>{var o;return null===(o=i.group)||void 0===o?void 0:o.toLowerCase()}));if(null==r?void 0:r.includes(null==i?void 0:i.toLowerCase())){const n=this.getMessage("snkFormConfig.confirm.title"),s=`\n ${this.getMessage("snkFormConfig.alert.titleGroupExists")}\n <b>${i}</b>\n ${this.getMessage("snkFormConfig.alert.inTab")}\n <b>${l===k.main?this.getMessage("snkFormConfig.form.mainArea"):l}</b>.\n <br/><br/>\n ${this.getMessage("snkFormConfig.alert.infoValidTitle")}\n `;return g.alert(n,s).then((()=>{var i,n;t?null===(i=this._newGroupBoxes[o])||void 0===i||i.applyFocusTextEdit():null===(n=this._currentGroupBoxes[l][o])||void 0===n||n.applyFocusTextEdit()})),!1}return!0}saveEditLabelTempGroup(i,o){const{newValue:t}=i.detail;null!=this._newGroupBoxes&&null!=this._newGroupBoxes[o]&&(this._newGroupBoxes[o].dataset.groupName=t)}saveEditLabelGroup(i){var o;const{value:t,newValue:n}=i.detail;null===(o=this._formConfig.fields)||void 0===o||o.forEach((i=>{i.group===t&&(i.group=n)})),this.loadFields(this._sortableTimer),this.controlFieldConfig(),this._formConfigChanged=!0}renderTempGroupByTab(i){return this._tempGroups.map(((o,n)=>{if(o.tab===i)return t("ez-collapsible-box",{ref:i=>this._newGroupBoxes[n]=i,id:`${L}-${n}`,editable:!0,removable:!0,"header-size":"large",label:o.group,"icon-placement":"left","data-group-name":o.group,"data-draggable-parent":"field",class:"form-config__add-group",onEzRemove:()=>this.removeGroup(n),onEzSaveEditLabel:i=>this.saveEditLabelTempGroup(i,n),onEzEditLabelMode:i=>this._editingTitleGroup=i.detail,conditionalSave:i=>this.checkGroupExists(i,n,!0)},this.getFieldsByGroup(o))}))}handleDuplicateGroups(i,o){var t;const n=this._layoutFormConfig[this._tabConfig.selectedIndex].groups.map((i=>i.group));return null!=n&&(null===(t=this._layoutFormConfig)||void 0===t||t.map((t=>{t.tab===o&&t.groups.some((o=>o.group===i))&&(i+=`${this.captureHighestValueTitle(n)}`)}))),i}captureHighestValueTitle(i){let o=[];return null==i||i.map((i=>{null!=i&&o.push(i.replace(/[^0-9]/g,""))})),Math.max.apply(null,o)>0?` (${Math.max.apply(null,o)+1})`:" (1)"}getLayoutFormConfig(){var i,o,t;if(null==(null===(i=this._formConfig)||void 0===i?void 0:i.fields))return;let n=[],s=[];for(const i of this._formConfig.fields)if(null==s.find((o=>i.name===o.name&&i.tab===o.tab))){s.push(i);const e=this.dataUnit.getField(i.name),l=!0===(null===(o=null==e?void 0:e.properties)||void 0===o?void 0:o.visibleOnConfig)&&!1===(null==e?void 0:e.visible);if((null==e?void 0:e.visible)||l){null!=i.label&&""!==i.label||(i.label=e.label),null!=i.tab&&""!==i.tab||(i.tab=this.getMessage("snkFormConfig.form.tabGeneral"));let o=n.find((o=>o.tab===i.tab));if(null==o){let s=null;if(null!=this._formConfig.tabs){const o=this._formConfig.tabs.filter((o=>o.label===i.tab));o.length>0&&(s=o[0].visible)}const e=(null===(t=i.tab)||void 0===t?void 0:t.label)||i.tab;o=null!==s?{tab:e,groups:[],visible:s}:{tab:e,groups:[],visible:!0},n.push(o)}const s=o.groups.find((o=>o.group===i.group));if(s)s.fields.push(i);else{const t={group:i.group,fields:[i]};void 0===i.group?o.groups.unshift(t):o.groups.push(t)}}}return n}configureTabs(i){var o;return null==(null===(o=this._formConfig)||void 0===o?void 0:o.tabs)?i:(null==i&&(i=[]),this._formConfig.defaultConfiguration?i:this._formConfig.tabs.map((o=>i.find((i=>{var t,n;return(null===(t=o.label)||void 0===t?void 0:t.toLowerCase())===(null===(n=i.tab)||void 0===n?void 0:n.toLowerCase())}))||{tab:o.label,groups:[],visible:o.visible})))}configureTabMain(i){return null==i&&(i=[]),null==i.find((i=>i.tab===k.main))&&i.unshift({tab:k.main,groups:[],visible:!0}),i}updateTabs(){const i=this.getTabsToSave();(null==i?void 0:i.length)>0&&(this._formConfig.tabs=i,1===i.length&&(this._tabSelected=0))}buildFormConfig(){var i;if(null==(null===(i=this._formConfig)||void 0===i?void 0:i.fields))return;let o=this.getLayoutFormConfig();o=this.configureTabs(o),o=this.configureTabMain(o),this._layoutFormConfig=o,this.updateTabs()}buildAvailableFields(){var i,o;if(null==(null===(i=this._formConfig)||void 0===i?void 0:i.fields))return;let t=[],n=this.dataUnit.metadata.fields;for(const i of this._formConfig.fields)t.push(i);const s=n.filter((({name:i,visible:o,properties:n})=>{const s=t.some((({name:o})=>o===i));return s||!0!==n.visibleOnConfig||o?!0===o&&!1===s:n.visibleOnConfig}));this._fieldsAvailable=s,this._listEnabledFields=s,null!=(null===(o=this._filterFieldsAvailable)||void 0===o?void 0:o.value)&&this.onFilterChange(this._filterFieldsAvailable.value)}changeTabSelected(i){this._tabSelected=i.index;const o=this._formContainer.querySelector("div#tab"+i.index);this._formContainer.querySelectorAll(".form-config__tab-content").forEach((i=>i.className="form-config__hide-content sc-snk-form-config")),o&&(o.className="form-config__tab-content ez-flex ez-flex--column ez-size-width--full ez-padding--medium sc-snk-form-config")}onFilterChange(i){this._fieldsAvailable=h.applyStringFilter(i,this._listEnabledFields,!0,"label")}orderFieldsAvailable(i){return h.sortAlphabetically(i)}handleLabelCounter(i){const o=[this.getMessage("snkFormConfig.availableFields.labelNoFields"),this.getMessage("snkFormConfig.availableFields.labelOneField")];return i>1?`${i} ${this.getMessage("snkFormConfig.availableFields.labelAvailableFields")}`:o[i]}controlAddFieldConfig(i){var o;if(this._formConfigChanged=!1,null==i)return;null==this._formConfig.fields&&(this._formConfig.fields=[]);const t=this._formConfig.fields.filter((o=>o.name===i.name&&o.tab&&i.tab));t.length>0?t.forEach((o=>{o.name=i.name,o.label=i.label,o.required=i.required,o.readOnly=i.readOnly,o.group=i.group})):this._formConfig.fields.push({name:i.name,label:i.label,required:i.required,readOnly:i.readOnly,group:i.group,tab:null===(o=this._tabConfig)||void 0===o?void 0:o.selectedTab}),this.loadFields(),this.controlFieldConfig(),this._formConfigChanged=!0,this.resetSortables()}controlRemoveFieldConfig(i,o){var t;this._formConfigChanged=!1,null!=i&&(this._formConfig.fields=null===(t=this._formConfig.fields)||void 0===t?void 0:t.filter((o=>o.name!==i.name)),this.loadFields(o),this.controlFieldConfig(),this._formConfigChanged=!0,this.resetSortables())}resetSortables(){this.controlSortableField(),this.controlSortableGroup()}handleFieldConfigChange(i,o=0){const{field:t,type:n}=i.detail;n!==C.configuration?n!==C.remove?n!==C.add||this.controlAddFieldConfig(t):this.controlRemoveFieldConfig(t,o):this.controlFieldConfig(t)}changeTabLabel(i){var o,t;const{value:n,newValue:s}=i.detail.detail;null===(o=this._formConfig.fields)||void 0===o||o.forEach((i=>{i.tab===n&&(i.tab=s)})),null===(t=this._formConfig.tabs)||void 0===t||t.forEach((i=>{i.label===n&&(i.label=s)})),this.loadFields(this._sortableTimer),this.controlFieldConfig(),this._formConfigChanged=!0}handleDeleteTab(i){let o={canClose:!1,labelCancel:this.getMessage("snkFormConfig.confirm.labelCancel"),labelConfirm:this.getMessage("snkFormConfig.confirm.labelDelete"),btnConfirmDanger:!1};const t=this.getMessage("snkFormConfig.confirm.title"),n=this.getMessage("snkFormConfig.confirm.deleteTab")+` <b>${i.detail.label}</b>?`;g.confirm(t,n,null,v.WARN,o).then((o=>{var t;o&&(this._formConfig.tabs=null===(t=this._formConfig.tabs)||void 0===t?void 0:t.filter((o=>o.label!==i.detail.label)),this.loadFields(this._sortableTimer),this.controlFieldConfig(),this._formConfigChanged=!0)}))}changeHideTab(i){var o;null===(o=this._formConfig.tabs)||void 0===o||o.forEach((o=>{o.label===i.detail.label&&(o.visible=!o.visible)})),this.loadFields(this._sortableTimer),this.controlFieldConfig(),this._formConfigChanged=!0}handleCanStartDragTab(){var i,o;const t=this._layoutFormConfig.map((i=>i.tab));for(const o of t)null===(i=this._currentGroupBoxes[o])||void 0===i||i.map((i=>null==i?void 0:i.cancelEdition()));null===(o=this._newGroupBoxes)||void 0===o||o.map((i=>null==i?void 0:i.cancelEdition()))}getMessage(i,o){return this.messagesBuilder.getMessage(i,o)}componentDidRender(){this.controlSortableField(),this.controlSortableGroup()}async componentWillRender(){if(null==this.messagesBuilder){const i=r.getContextValue("__SNK__APPLICATION__");this.messagesBuilder=i.messagesBuilder}}componentWillLoad(){this.loadConfig()}componentDidLoad(){d.addIDInfo(this._element,null,{dataUnit:this.dataUnit})}render(){var i,o,s,e;return t(n,null,t("div",{class:"ez-row ez-padding--medium"},t("div",{class:"ez-col ez-col--sd-7 ez-col--tb-9 ez-align--middle"},t("ez-button",{mode:"icon",title:this.getMessage("snkFormConfig.goBackTitle"),iconName:"arrow_back",class:"ez-padding--small",size:"small",onClick:()=>this.closeFormConfig(),id:"formConfigToBack"}),t("h1",{class:"ez-title ez-title--primary ez-title--extra-large ez-padding--small"},this.getMessage("snkFormConfig.title")),this._formConfigOptions&&t("ez-actions-button",{class:"form-config__actions-button ez-margin-left--medium",value:null===(i=this._optionFormConfigSelected)||void 0===i?void 0:i.origin,showLabel:!0,displayIcon:"chevron-down",checkOption:!0,size:"small",actions:this._formConfigOptions.map((i=>({value:i.origin,label:i.name}))),onEzAction:i=>this.controlSelectFormConfig(i),id:"selectConfig"})),t("div",{class:"ez-col ez-col--sd-5 ez-col--tb-3 ez-align--middle ez-align--right"},!0===this._formConfigChanged&&!1===this._optionFormConfigChanged&&t("div",{class:"ez-row ez-align--middle ez-align--right"},t("ez-button",{label:"Cancelar",class:"ez-padding-left--medium",size:"small",onClick:()=>this.cancelChangeConfig()}),t("ez-button",{label:"Salvar",class:"ez-button--primary ez-padding-left--medium",size:"small",onClick:()=>this.saveConfig()},t("ez-icon",{class:"ez-margin-right--small",slot:"leftIcon",iconName:"save"}))),!0===this._optionFormConfigChanged&&t("div",{class:"ez-row ez-align--middle ez-align--right"},t("ez-button",{label:"Cancelar",class:"ez-padding-left--medium",size:"small",onClick:()=>this.cancelChangeOptionConfig()}),t("ez-button",{label:this.getMessage("snkFormConfig.applyConfig"),class:"ez-button--primary ez-padding-left--medium",size:"small",onClick:()=>this.applyOptionConfig()})))),t("div",{class:"ez-row ez-padding--medium",ref:i=>this._sortableContainer=i},t("div",{class:"form-config__tab-container ez-col ez-col--sd-9 ez-col--tb-9 ez-padding-right--medium"},(null===(o=this._layoutFormConfig)||void 0===o?void 0:o.length)>0&&t("section",{class:"ez-box__container",ref:i=>this._formContainer=i},t("snk-tab-config",{ref:i=>this._tabConfig=i,selectedIndex:this._tabSelected,messagesBuilder:this.messagesBuilder,onEzTabChange:i=>this.changeTabSelected(i.detail),onEzOrderChange:i=>this.changeTabOrder(i.detail),onEditionTitleTab:i=>this.changeTabLabel(i),onDeleteTab:i=>this.handleDeleteTab(i),onHideTab:i=>this.changeHideTab(i),onCanStartDrag:()=>this.handleCanStartDragTab(),tabItems:this._layoutFormConfig.map((i=>({tabKey:i.tab,label:i.tab,visible:i.visible})))}),this._layoutFormConfig.map(((i,o)=>t("div",{id:"tab"+o,"data-draggable-parent":"group",class:this._tabSelected===o?"form-config__tab-content ez-flex ez-flex--column ez-size-width--full ez-padding--medium":"form-config__hide-content"},i.groups.map(((o,n)=>o.group?(null==this._currentGroupBoxes[i.tab]&&(this._currentGroupBoxes[i.tab]=[]),t("ez-collapsible-box",{ref:o=>this._currentGroupBoxes[i.tab][n]=o,editable:!0,removable:!0,"header-size":"large",label:o.group,"icon-placement":"left","data-group-name":o.group,"data-draggable-parent":"field","data-draggable-element":"group",onEzRemove:()=>this.removeGroup(),onEzSaveEditLabel:i=>this.saveEditLabelGroup(i),onEzEditLabelMode:i=>this._editingTitleGroup=i.detail,conditionalSave:i=>this.checkGroupExists(i,n)},this.getFieldsByGroup(o))):t("div",{class:"ez-flex ez-flex--column ez-size-width--full"},t("label",{class:"ez-text ez-text--secondary ez-margin-vertical--small"},this.getMessage("snkFormConfig.form.subTitleInfo")),t("div",{id:S,class:"ez-row","data-draggable-parent":"field"},this.getFieldsByGroup(o)),t("hr",{class:"ez-divider-horizontal ez-margin-vertical--medium"})))),this.renderTempGroupByTab(i.tab)))),t("div",{class:"form-config__btn-add-group ez-row"},t("div",{class:"form-config__btn-add-group-container ez-col ez-col--sd-12 ez-col--tb-12 ez-align--center"},t("ez-button",{label:this.getMessage("snkFormConfig.form.labelNewGroup"),class:"ez-padding-horizontal--small ez-button--primary",size:"small",onClick:()=>this.addNewGroup()},t("ez-icon",{class:"ez-margin-right--small",slot:"leftIcon",iconName:"plus"})))))),t("div",{class:"form-config__fields-available ez-col ez-col--sd-3 ez-col--tb-3"},t("section",{class:"ez-box__container ez-col ez-col--pn-12"},t("h1",{class:"ez-title ez-title--large ez-title--primary ez-padding-bottom--medium"},this.getMessage("snkFormConfig.availableFields.title")),t("ez-filter-input",{id:"searchFields",ref:i=>this._filterFieldsAvailable=i,label:this.getMessage("snkFormConfig.availableFields.labelSearchField"),onEzChange:i=>this.onFilterChange(i.detail)}),t("span",{class:"ez-box__label-counter ez-text ez-text--medium ez-text--primary ez-margin-bottom--medium"},this.handleLabelCounter(null===(s=this._fieldsAvailable)||void 0===s?void 0:s.length)),(null===(e=this._layoutFormConfig)||void 0===e?void 0:e.length)>0&&t("div",{id:A,class:"ez-row","data-draggable-parent":"field"},this.orderFieldsAvailable(this._fieldsAvailable).map((i=>t("div",{key:i.name,class:this._fieldsAvailableStyle,"data-draggable-element":"field",onMouseDown:i=>this.controlMoveField(i)},t("snk-field-config",{messagesBuilder:this.messagesBuilder,onEzClickIcon:i=>{this.handleFieldConfigChange(i)},dataUnit:this.dataUnit,fieldConfig:i,id:i.name})))))))))}get _element(){return s(this)}static get watchers(){return{configManager:["observeConfigManager"]}}};I.style=".sc-snk-form-config-h{--snk-form-config--z-index:var(--more-visible, 2);--snk-form-config--background-color:var(--background--xlight, #fff);--snk-form-config__icon--color:var(--text--disable, #AFB6C0);--snk-form-config__label-counter--font-weight:var(--text-weight--extra-small, 200);--snk-form-config__add-group-container--border-radius:var(--border--radius-medium, 12px);--snk-form-config__add-group-container--background-color:var(--background--medium, #d2dce9);--snk-form-config__add-group-container--padding:var(--space--small, 6px);--snk-form-config__add-group-content--border:2px dashed var(--color-strokes, #DCE0E8);--snk-form-config__add-group-content--border-radius:var(--border--radius-small, 6px);--snk-form-config__add-group-label--padding:var(--space--large, 24px);--snk-form-config__btn-add-group--padding:var(--space--large, 24px) var(--space--medium, 12px) 0;--snk-form-config__btn-add-group-container--padding:var(--space--medium, 12px);--snk-form-config__btn-add-group-container--border-radius:var(--border--radius-medium, 12px);--snk-form-config__btn-add-group-container--border:2px solid var(--color-strokes, #DCE0E8);--snk-form-config__btn-add-group-container--background-color:var(--background--body, #fafcff);display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--snk-form-config--z-index);background-color:var(--snk-form-config--background-color)}div.sc-snk-form-config:focus-visible,div.sc-snk-form-config:focus{outline:none}.form-config__header-container.sc-snk-form-config{display:flex}.form-config__field-container.sc-snk-form-config{width:32%;padding:6px}.form-config__hide-content.sc-snk-form-config{display:none}ez-icon.sc-snk-form-config .left-icon.sc-snk-form-config{--ez-icon--color:var(--snk-form-config__icon--color)}.ez-box__label-counter.sc-snk-form-config{margin-top:-7px;font-weight:var(--snk-form-config__label-counter--font-weight)}.form-config__btn-options.sc-snk-form-config{--ez-button--min-width:300px;--ez-button--background-color:var(--snk-form-config--background-color)}[data-draggable-parent].sc-snk-form-config{position:relative}.form-config__field-config--selected.sc-snk-form-config{position:static}.form-config__field-config--dragged.sc-snk-form-config .draggable-mirror.sc-snk-form-config{z-index:var(--snk-form-config--z-index)}.form-config__config-options.sc-snk-form-config{position:relative;margin-top:-3px;min-width:100%;z-index:1}.form-config__tab-container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config{position:relative;height:100%;max-height:calc(100vh - 92px)}.form-config__tab-container.sc-snk-form-config .ez-box__container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config .ez-box__container.sc-snk-form-config{align-content:flex-start;height:100%}.form-config__fields-available.sc-snk-form-config [data-draggable-parent].sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:100%;max-height:calc(100% - 122px)}.form-config__tab-content.sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:auto;max-height:calc(100% - 128px)}[data-draggable-element].sc-snk-form-config{cursor:grab}.form-config__actions-button.sc-snk-form-config{--ez-actions-button__btn-action--min-width:235px}.form-config__add-group.sc-snk-form-config{position:relative;min-height:120px;margin-bottom:10px}.form-config__add-group-container.sc-snk-form-config{position:absolute;display:flex;flex-wrap:wrap;width:100%;box-sizing:border-box;border-radius:var(--snk-form-config__add-group-container--border-radius);background-color:var(--snk-form-config__add-group-container--background-color);padding:var(--snk-form-config__add-group-container--padding)}.form-config__add-group-content.sc-snk-form-config{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;box-sizing:border-box;border:var(--snk-form-config__add-group-content--border);border-radius:var(--snk-form-config__add-group-content--border-radius)}.form-config__add-group-label.sc-snk-form-config{display:flex;justify-content:center;box-sizing:border-box;padding:var(--snk-form-config__add-group-label--padding)}.form-config__btn-add-group.sc-snk-form-config{position:relative;padding:var(--snk-form-config__btn-add-group--padding)}.form-config__btn-add-group-container.sc-snk-form-config{padding:var(--snk-form-config__btn-add-group-container--padding);border-radius:var(--snk-form-config__btn-add-group-container--border-radius);border:var(--snk-form-config__btn-add-group-container--border);background-color:var(--snk-form-config__btn-add-group-container--background-color)}ez-collapsible-box.draggable-mirror.sc-snk-form-config{display:table;background-color:var(--snk-form-config--background-color)}ez-collapsible-box.sc-snk-form-config{margin-bottom:10px}@media screen and (min-width: 480px){.form-config__field-config--selected.sc-snk-form-config .ez-flex.form-config__config-options.sc-snk-form-config{min-width:calc(300% + 12px)}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+2) .ez-flex.form-config__config-options.sc-snk-form-config{left:calc(100% / 1 * -1)}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+3) .ez-flex.form-config__config-options.sc-snk-form-config{left:calc(100% / 1 * -2)}}";export{E as snk_config_options,T as snk_form,I as snk_form_config}
|
Binary file
|
Binary file
|
@@ -1,6 +0,0 @@
|
|
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-5a7e18f4.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;!function(e){e[e.GRID=0]="GRID",e[e.CARDS=1]="CARDS",e[e.TREE=2]="TREE"}(d||(d={}));class f{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
|
-
$queryAlias$: search(entityName: $entityName argument: $argument criteria: $criteria options: $options){
|
3
|
-
value
|
4
|
-
label
|
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)}))}))}loadAdvancedSearch(e,o,a,s){var l,u,c,d,f;const g=this.applySearchListener(v.beforeSearch,e,o,a,s),p={argument:(null==g?void 0:g.argument)||o,criteria:(null==g?void 0:g.criteria)||a,searchOptions:Object.assign(Object.assign({},s),null==g?void 0:g.searchOptions)},h={query:{$:null===(l=p.criteria)||void 0===l?void 0:l.expression}};(null===(c=null===(u=p.criteria)||void 0===u?void 0:u.params)||void 0===c?void 0:c.length)>0&&(h.params={param:p.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=m(e.dataType),{$:o,type:r}}))});const S=null!=s?Object.assign(Object.assign({},null==p?void 0:p.searchOptions),{pkFieldName:s.codeFieldName,label:s.descriptionFieldName,fieldName:s.codeFieldName,useDescriptionOptions:!1,enableRowsCounter:!0}):void 0,y={serviceName:"PesquisaSP.getSuggestion",requestBody:{criteria:Object.assign({entityName:e,compacted:!1,ignoreEntityCriteria:null!==(d=null==S?void 0:S.ignoreEntityCriteria)&&void 0!==d&&d,limit:this._defaultPageSize,query:{$:p.argument},orderByDesc:!1,externalCriteria:h,localEntityName:null===(f=p.searchOptions)||void 0===f?void 0:f.rootEntity},{options:S}),clientEventList:{clientEvent:[]}}},O={urlParams:{quietMode:!0}};return new Promise(((e,t)=>{r.get().callServiceBroker("PesquisaSP.getSuggestion",JSON.stringify(y),O).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:m(e.dataType),$:e.value}))),i}}function m(e){switch(e){case t.NUMBER:return"I";case t.DATE:return"D";default:return"S"}}!function(e){e.beforeSearch="beforeSearch"}(v||(v={}));export{f as P,d as a,a as b}
|
Binary file
|
Binary file
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
class t{constructor(t){this._canceled=!1,this.data=t}get type(){return this.constructor.type}get cancelable(){return this.constructor.cancelable}cancel(){this._canceled=!0}canceled(){return this._canceled}clone(t){return new this.constructor({...this.data,...t})}}t.type="event",t.cancelable=!1;class e{constructor(t){this.draggable=t}attach(){throw new Error("Not Implemented")}detach(){throw new Error("Not Implemented")}}const s={mouse:0,drag:0,touch:100};class i{constructor(t=[],e={}){this.containers=[...t],this.options={...e},this.dragging=!1,this.currentContainer=null,this.originalSource=null,this.startEvent=null,this.delay=function(t){const e={};if(void 0===t)return{...s};if("number"==typeof t){for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=t);return e}for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=void 0===t[i]?s[i]:t[i]);return e}(e.delay)}attach(){return this}detach(){return this}addContainer(...t){this.containers=[...this.containers,...t]}removeContainer(...t){this.containers=this.containers.filter((e=>!t.includes(e)))}trigger(t,e){const s=document.createEvent("Event");return s.detail=e,s.initEvent(e.type,!0,!0),t.dispatchEvent(s),this.lastEvent=e,e}}function r(t,e){if(null==t)return null;let s=t;do{if(s=s.correspondingUseElement||s.correspondingElement||s,null!=(i=s)&&null!=e&&(function(t){return Boolean("string"==typeof t)}(e)?Element.prototype.matches.call(i,e):function(t){return Boolean(t instanceof NodeList||t instanceof Array)}(e)?[...e].includes(i):function(t){return Boolean(t instanceof Node)}(e)?e===i:function(t){return Boolean("function"==typeof t)}(e)&&e(i)))return s;s=s?.parentNode||null}while(null!=s&&s!==document.body&&s!==document);var i;return null}function n(t,e,s,i){return Math.sqrt((s-t)**2+(i-e)**2)}class o extends t{get originalEvent(){return this.data.originalEvent}get clientX(){return this.data.clientX}get clientY(){return this.data.clientY}get target(){return this.data.target}get container(){return this.data.container}get originalSource(){return this.data.originalSource}get pressure(){return this.data.pressure}}class h extends o{}h.type="drag:start";class a extends o{}a.type="drag:move";class c extends o{}c.type="drag:stop";const u=Symbol("onContextMenuWhileDragging"),l=Symbol("onMouseDown"),d=Symbol("onMouseMove"),g=Symbol("onMouseUp"),m=Symbol("startDrag"),f=Symbol("onDistanceChange");function v(t){t.preventDefault()}function p(t){const{touches:e,changedTouches:s}=t;return e&&e[0]||s&&s[0]}const b=Symbol("onTouchStart"),w=Symbol("onTouchEnd"),y=Symbol("onTouchMove"),x=Symbol("startDrag"),S=Symbol("onDistanceChange");let C=!1;function E(t){t.preventDefault(),t.stopPropagation()}function M(t,e){return function(s){(function(t){if(t.v)throw new Error("attempted to call addInitializer after decoration was finished")})(e),O(s,"An initializer"),t.push(s)}}function D(t,e){if(!t(e))throw new TypeError("Attempted to access private element on non-instance")}function T(t,e,s,i,r,n,o,h,a,c,u){var l;switch(n){case 1:l="accessor";break;case 2:l="method";break;case 3:l="getter";break;case 4:l="setter";break;default:l="field"}var d,g,m={kind:l,name:h?"#"+s:s,static:o,private:h,metadata:u},f={v:!1};if(0!==n&&(m.addInitializer=M(r,f)),h||0!==n&&2!==n)if(2===n)d=function(t){return D(c,t),i.value};else{var v=0===n||1===n;(v||3===n)&&(d=h?function(t){return D(c,t),i.get.call(t)}:function(t){return i.get.call(t)}),(v||4===n)&&(g=h?function(t,e){D(c,t),i.set.call(t,e)}:function(t,e){i.set.call(t,e)})}else d=function(t){return t[s]},0===n&&(g=function(t,e){t[s]=e});var p=h?c.bind():function(t){return s in t};m.access=d&&g?{get:d,set:g,has:p}:d?{get:d,has:p}:{set:g,has:p};try{return t.call(e,a,m)}finally{f.v=!0}}function O(t,e){if("function"!=typeof t)throw new TypeError(e+" must be a function")}function X(t,e){var s=typeof e;if(1===t){if("object"!==s||null===e)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==e.get&&O(e.get,"accessor.get"),void 0!==e.set&&O(e.set,"accessor.set"),void 0!==e.init&&O(e.init,"accessor.init")}else if("function"!==s)throw new TypeError((0===t?"field":5===t?"class":"method")+" decorators must return a function or void 0")}function Y(t){return function(){return t(this)}}function A(t){return function(e){t(this,e)}}function F(t,e,s,i,r,n,o,h,a,c,u){var l,d,g,m,f=s[0];i||Array.isArray(f)||(f=[f]),h?l=0===n||1===n?{get:Y(s[3]),set:A(s[4])}:3===n?{get:s[3]}:4===n?{set:s[3]}:{value:s[3]}:0!==n&&(l=Object.getOwnPropertyDescriptor(e,r)),1===n?g={get:l.get,set:l.set}:2===n?g=l.value:3===n?g=l.get:4===n&&(g=l.set);for(var v=i?2:1,p=f.length-1;p>=0;p-=v){var b;void 0!==(m=T(f[p],i?f[p-1]:void 0,r,l,a,n,o,h,g,c,u))&&(X(n,m),0===n?b=m:1===n?(b=m.init,g={get:m.get||g.get,set:m.set||g.set}):g=m,void 0!==b&&(void 0===d?d=b:"function"==typeof d?d=[d,b]:d.push(b)))}if(0===n||1===n){if(void 0===d)d=function(t,e){return e};else if("function"!=typeof d){var w=d;d=function(t,e){for(var s=e,i=w.length-1;i>=0;i--)s=w[i].call(t,s);return s}}else{var y=d;d=function(t,e){return y.call(t,e)}}t.push(d)}0!==n&&(1===n?(l.get=g.get,l.set=g.set):2===n?l.value=g:3===n?l.get=g:4===n&&(l.set=g),h?1===n?(t.push((function(t,e){return g.get.call(t,e)})),t.push((function(t,e){return g.set.call(t,e)}))):t.push(2===n?g:function(t,e){return g.call(t,e)}):Object.defineProperty(e,r,l))}function I(t,e,s,i){for(var r,n,o,h=[],a=new Map,c=new Map,u=0;u<e.length;u++){var l=e[u];if(Array.isArray(l)){var d,g,m=l[1],f=l[2],v=l.length>3,p=16&m,b=!!(8&m),w=s;if(m&=7,b?(d=t,0!==m&&(g=n=n||[]),v&&!o&&(o=function(e){return P(e)===t}),w=o):(d=t.prototype,0!==m&&(g=r=r||[])),0!==m&&!v){var y=b?c:a,x=y.get(f)||0;if(!0===x||3===x&&4!==m||4===x&&3!==m)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+f);y.set(f,!(!x&&m>2)||m)}F(h,d,l,p,f,m,b,v,g,w,i)}}return $(h,r),$(h,n),h}function $(t,e){e&&t.push((function(t){for(var s=0;s<e.length;s++)e[s].call(t);return t}))}function j(t,e,s,i){if(e.length){for(var r=[],n=t,o=t.name,h=s?2:1,a=e.length-1;a>=0;a-=h){var c={v:!1};try{var u=e[a].call(s?e[a-1]:void 0,n,{kind:"class",name:o,addInitializer:M(r,c),metadata:i})}finally{c.v=!0}void 0!==u&&(X(5,u),n=u)}return[q(n,i),function(){for(var t=0;t<r.length;t++)r[t].call(n)}]}}function q(t,e){return Object.defineProperty(t,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:e})}function z(t,e,s,i,r,n){if(arguments.length>=6)var o=n[Symbol.metadata||Symbol.for("Symbol.metadata")];var h=Object.create(void 0===o?null:o),a=I(t,e,r,h);return s.length||q(t,h),{e:a,get c(){return j(t,s,i,h)}}}function P(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}function N(t,{name:e,addInitializer:s}){s((function(){this[e]=t.bind(this)}))}window.addEventListener("touchmove",(t=>{C&&t.preventDefault()}),{passive:!1});class B extends t{constructor(t){super(t),this.data=t}get source(){return this.data.source}get originalSource(){return this.data.originalSource}get mirror(){return this.data.mirror}get sourceContainer(){return this.data.sourceContainer}get sensorEvent(){return this.data.sensorEvent}get originalEvent(){return this.sensorEvent?this.sensorEvent.originalEvent:null}}B.type="drag";class L extends B{}L.type="drag:start",L.cancelable=!0;class k extends B{}k.type="drag:move";class H extends B{get overContainer(){return this.data.overContainer}get over(){return this.data.over}}H.type="drag:over",H.cancelable=!0;class R extends B{get overContainer(){return this.data.overContainer}get over(){return this.data.over}}R.type="drag:out";class W extends B{get overContainer(){return this.data.overContainer}}W.type="drag:over:container";class U extends B{get overContainer(){return this.data.overContainer}}U.type="drag:out:container";class G extends B{get pressure(){return this.data.pressure}}G.type="drag:pressure";class J extends B{}J.type="drag:stop",J.cancelable=!0;class K extends B{}var Q,V,Z,_;K.type="drag:stopped",V=class extends e{constructor(t){Q(super(t)),this.lastWidth=0,this.lastHeight=0,this.mirror=null}attach(){this.draggable.on("mirror:created",this.onMirrorCreated).on("drag:over",this.onDragOver).on("drag:over:container",this.onDragOver)}detach(){this.draggable.off("mirror:created",this.onMirrorCreated).off("mirror:destroy",this.onMirrorDestroy).off("drag:over",this.onDragOver).off("drag:over:container",this.onDragOver)}getOptions(){return this.draggable.options.resizeMirror||{}}onMirrorCreated({mirror:t}){this.mirror=t}onMirrorDestroy(){this.mirror=null}onDragOver(t){this.resize(t)}resize(t){requestAnimationFrame((()=>{let e=null;const{overContainer:s}=t;if(null==this.mirror||null==this.mirror.parentNode)return;this.mirror.parentNode!==s&&s.appendChild(this.mirror),t.type===H.type&&(e=t.over);const i=e||this.draggable.getDraggableElementsForContainer(s)[0];var r;i&&(r=()=>{const t=i.getBoundingClientRect();null==this.mirror||this.lastHeight===t.height&&this.lastWidth===t.width||(this.mirror.style.width=`${t.width}px`,this.mirror.style.height=`${t.height}px`,this.lastWidth=t.width,this.lastHeight=t.height)},requestAnimationFrame((()=>{requestAnimationFrame(r)})))}))}},[Q]=z(V,[[N,2,"onMirrorCreated"],[N,2,"onMirrorDestroy"],[N,2,"onDragOver"]],[],0,void 0,e).e;const tt={duration:150,easingFunction:"ease-in-out",horizontal:!1};function et(t,e,{duration:s,easingFunction:i,horizontal:r}){for(const s of[t,e])s.style.pointerEvents="none";if(r){const s=t.offsetWidth;t.style.transform=`translate3d(${s}px, 0, 0)`,e.style.transform=`translate3d(-${s}px, 0, 0)`}else{const s=t.offsetHeight;t.style.transform=`translate3d(0, ${s}px, 0)`,e.style.transform=`translate3d(0, -${s}px, 0)`}requestAnimationFrame((()=>{for(const r of[t,e])r.addEventListener("transitionend",st),r.style.transition=`transform ${s}ms ${i}`,r.style.transform=""}))}function st(t){null!=t.target&&Boolean("style"in t.target)&&(t.target.style.transition="",t.target.style.pointerEvents="",t.target.removeEventListener("transitionend",st))}_=class extends e{constructor(t){Z(super(t)),this.options={...tt,...this.getOptions()},this.lastAnimationFrame=null}attach(){this.draggable.on("sortable:sorted",this.onSortableSorted)}detach(){this.draggable.off("sortable:sorted",this.onSortableSorted)}getOptions(){return this.draggable.options.swapAnimation||{}}onSortableSorted({oldIndex:t,newIndex:e,dragEvent:s}){const{source:i,over:r}=s;this.lastAnimationFrame&&cancelAnimationFrame(this.lastAnimationFrame),this.lastAnimationFrame=requestAnimationFrame((()=>{t>=e?et(i,r,this.options):et(r,i,this.options)}))}},[Z]=z(_,[[N,2,"onSortableSorted"]],[],0,void 0,e).e;const it=Symbol("onInitialize"),rt=Symbol("onDestroy"),nt=Symbol("announceEvent"),ot=Symbol("announceMessage"),ht={expire:7e3},at=function(){const t=document.createElement("div");return t.setAttribute("id","draggable-live-region"),t.setAttribute("aria-relevant","additions"),t.setAttribute("aria-atomic","true"),t.setAttribute("aria-live","assertive"),t.setAttribute("role","log"),t.style.position="fixed",t.style.width="1px",t.style.height="1px",t.style.top="-1px",t.style.overflow="hidden",t}();document.addEventListener("DOMContentLoaded",(()=>{document.body.appendChild(at)}));const ct=Symbol("onInitialize"),ut=Symbol("onDestroy"),lt={},dt=[];class gt extends t{constructor(t){super(t),this.data=t}get source(){return this.data.source}get originalSource(){return this.data.originalSource}get sourceContainer(){return this.data.sourceContainer}get sensorEvent(){return this.data.sensorEvent}get dragEvent(){return this.data.dragEvent}get originalEvent(){return this.sensorEvent?this.sensorEvent.originalEvent:null}}class mt extends gt{}mt.type="mirror:create";class ft extends gt{get mirror(){return this.data.mirror}}ft.type="mirror:created";class vt extends gt{get mirror(){return this.data.mirror}}vt.type="mirror:attached";class pt extends gt{get mirror(){return this.data.mirror}get passedThreshX(){return this.data.passedThreshX}get passedThreshY(){return this.data.passedThreshY}}pt.type="mirror:move",pt.cancelable=!0;class bt extends gt{get mirror(){return this.data.mirror}get passedThreshX(){return this.data.passedThreshX}get passedThreshY(){return this.data.passedThreshY}}bt.type="mirror:moved";class wt extends gt{get mirror(){return this.data.mirror}}wt.type="mirror:destroy",wt.cancelable=!0;const yt=Symbol("onDragStart"),xt=Symbol("onDragMove"),St=Symbol("onDragStop"),Ct=Symbol("onMirrorCreated"),Et=Symbol("onMirrorMove"),Mt=Symbol("onScroll"),Dt=Symbol("getAppendableContainer"),Tt={constrainDimensions:!1,xAxis:!0,yAxis:!0,cursorOffsetX:null,cursorOffsetY:null,thresholdX:null,thresholdY:null};function Ot({source:t,...e}){return $t((s=>{const i=t.getBoundingClientRect();s({source:t,sourceRect:i,...e})}))}function Xt({sensorEvent:t,sourceRect:e,options:s,...i}){return $t((r=>{r({sensorEvent:t,sourceRect:e,mirrorOffset:{top:null===s.cursorOffsetY?t.clientY-e.top:s.cursorOffsetY,left:null===s.cursorOffsetX?t.clientX-e.left:s.cursorOffsetX},options:s,...i})}))}function Yt({mirror:t,source:e,options:s,...i}){return $t((r=>{let n,o;if(s.constrainDimensions){const t=getComputedStyle(e);n=t.getPropertyValue("height"),o=t.getPropertyValue("width")}t.style.display=null,t.style.position="fixed",t.style.pointerEvents="none",t.style.top=0,t.style.left=0,t.style.margin=0,s.constrainDimensions&&(t.style.height=n,t.style.width=o),r({mirror:t,source:e,options:s,...i})}))}function At({mirror:t,mirrorClasses:e,...s}){return $t((i=>{t.classList.add(...e),i({mirror:t,mirrorClasses:e,...s})}))}function Ft({mirror:t,...e}){return $t((s=>{t.removeAttribute("id"),delete t.id,s({mirror:t,...e})}))}function It({withFrame:t=!1,initial:e=!1}={}){return({mirror:s,sensorEvent:i,mirrorOffset:r,initialY:n,initialX:o,scrollOffset:h,options:a,passedThreshX:c,passedThreshY:u,lastMovedX:l,lastMovedY:d,...g})=>$t((t=>{const m={mirror:s,sensorEvent:i,mirrorOffset:r,options:a,...g};if(r){const t=c?Math.round((i.clientX-r.left-h.x)/(a.thresholdX||1))*(a.thresholdX||1):Math.round(l),g=u?Math.round((i.clientY-r.top-h.y)/(a.thresholdY||1))*(a.thresholdY||1):Math.round(d);a.xAxis&&a.yAxis||e?s.style.transform=`translate3d(${t}px, ${g}px, 0)`:a.xAxis&&!a.yAxis?s.style.transform=`translate3d(${t}px, ${n}px, 0)`:a.yAxis&&!a.xAxis&&(s.style.transform=`translate3d(${o}px, ${g}px, 0)`),e&&(m.initialX=t,m.initialY=g),m.lastMovedX=t,m.lastMovedY=g}t(m)}),{frame:t})}function $t(t,{raf:e=!1}={}){return new Promise(((s,i)=>{e?requestAnimationFrame((()=>{t(s,i)})):t(s,i)}))}const jt=Symbol("onDragStart"),qt=Symbol("onDragMove"),zt=Symbol("onDragStop"),Pt=Symbol("scroll"),Nt={speed:6,sensitivity:50,scrollableElements:[]};function Bt(){return document.scrollingElement||document.documentElement}class Lt{constructor(){this.callbacks={}}on(t,...e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(...e),this}off(t,e){if(!this.callbacks[t])return null;const s=this.callbacks[t].slice(0);for(let i=0;i<s.length;i++)e===s[i]&&this.callbacks[t].splice(i,1);return this}trigger(t){if(!this.callbacks[t.type])return null;const e=[...this.callbacks[t.type]],s=[];for(let i=e.length-1;i>=0;i--){const r=e[i];try{r(t)}catch(t){s.push(t)}}return s.length&&console.error(`Draggable caught errors while triggering '${t.type}'`,s),this}}class kt extends t{get draggable(){return this.data.draggable}}kt.type="draggable";class Ht extends kt{}Ht.type="draggable:initialize";class Rt extends kt{}Rt.type="draggable:destroy";const Wt=Symbol("onDragStart"),Ut=Symbol("onDragMove"),Gt=Symbol("onDragStop"),Jt=Symbol("onDragPressure"),Kt=Symbol("dragStop"),Qt={"drag:start":t=>`Picked up ${t.source.textContent.trim()||t.source.id||"draggable element"}`,"drag:stop":t=>`Released ${t.source.textContent.trim()||t.source.id||"draggable element"}`},Vt={"container:dragging":"draggable-container--is-dragging","source:dragging":"draggable-source--is-dragging","source:placed":"draggable-source--placed","container:placed":"draggable-container--placed","body:dragging":"draggable--is-dragging","draggable:over":"draggable--over","container:over":"draggable-container--over","source:original":"draggable--original",mirror:"draggable-mirror"},Zt={draggable:".draggable-source",handle:null,delay:{},distance:0,placedTimeout:800,plugins:[],sensors:[],exclude:{plugins:[],sensors:[]}};class _t{constructor(t=[document.body],e={}){if(t instanceof NodeList||t instanceof Array)this.containers=[...t];else{if(!(t instanceof HTMLElement))throw new Error("Draggable containers are expected to be of type `NodeList`, `HTMLElement[]` or `HTMLElement`");this.containers=[t]}this.options={...Zt,...e,classes:{...Vt,...e.classes||{}},announcements:{...Qt,...e.announcements||{}},exclude:{plugins:e.exclude&&e.exclude.plugins||[],sensors:e.exclude&&e.exclude.sensors||[]}},this.emitter=new Lt,this.dragging=!1,this.plugins=[],this.sensors=[],this[Wt]=this[Wt].bind(this),this[Ut]=this[Ut].bind(this),this[Gt]=this[Gt].bind(this),this[Jt]=this[Jt].bind(this),this[Kt]=this[Kt].bind(this),document.addEventListener("drag:start",this[Wt],!0),document.addEventListener("drag:move",this[Ut],!0),document.addEventListener("drag:stop",this[Gt],!0),document.addEventListener("drag:pressure",this[Jt],!0);const s=Object.values(_t.Plugins).filter((t=>!this.options.exclude.plugins.includes(t))),i=Object.values(_t.Sensors).filter((t=>!this.options.exclude.sensors.includes(t)));this.addPlugin(...s,...this.options.plugins),this.addSensor(...i,...this.options.sensors);const r=new Ht({draggable:this});this.on("mirror:created",(({mirror:t})=>this.mirror=t)),this.on("mirror:destroy",(()=>this.mirror=null)),this.trigger(r)}destroy(){document.removeEventListener("drag:start",this[Wt],!0),document.removeEventListener("drag:move",this[Ut],!0),document.removeEventListener("drag:stop",this[Gt],!0),document.removeEventListener("drag:pressure",this[Jt],!0);const t=new Rt({draggable:this});this.trigger(t),this.removePlugin(...this.plugins.map((t=>t.constructor))),this.removeSensor(...this.sensors.map((t=>t.constructor)))}addPlugin(...t){const e=t.map((t=>new t(this)));return e.forEach((t=>t.attach())),this.plugins=[...this.plugins,...e],this}removePlugin(...t){return this.plugins.filter((e=>t.includes(e.constructor))).forEach((t=>t.detach())),this.plugins=this.plugins.filter((e=>!t.includes(e.constructor))),this}addSensor(...t){const e=t.map((t=>new t(this.containers,this.options)));return e.forEach((t=>t.attach())),this.sensors=[...this.sensors,...e],this}removeSensor(...t){return this.sensors.filter((e=>t.includes(e.constructor))).forEach((t=>t.detach())),this.sensors=this.sensors.filter((e=>!t.includes(e.constructor))),this}addContainer(...t){return this.containers=[...this.containers,...t],this.sensors.forEach((e=>e.addContainer(...t))),this}removeContainer(...t){return this.containers=this.containers.filter((e=>!t.includes(e))),this.sensors.forEach((e=>e.removeContainer(...t))),this}on(t,...e){return this.emitter.on(t,...e),this}off(t,e){return this.emitter.off(t,e),this}trigger(t){return this.emitter.trigger(t),this}getClassNameFor(t){return this.getClassNamesFor(t)[0]}getClassNamesFor(t){const e=this.options.classes[t];return e instanceof Array?e:"string"==typeof e||e instanceof String?[e]:[]}isDragging(){return Boolean(this.dragging)}getDraggableElements(){return this.containers.reduce(((t,e)=>[...t,...this.getDraggableElementsForContainer(e)]),[])}getDraggableElementsForContainer(t){return[...t.querySelectorAll(this.options.draggable)].filter((t=>t!==this.originalSource&&t!==this.mirror))}cancel(){this[Kt]()}[Wt](t){const e=te(t),{target:s,container:i,originalSource:n}=e;if(!this.containers.includes(i))return;if(this.options.handle&&s&&!r(s,this.options.handle))return void e.cancel();this.originalSource=n,this.sourceContainer=i,this.lastPlacedSource&&this.lastPlacedContainer&&(clearTimeout(this.placedTimeoutID),this.lastPlacedSource.classList.remove(...this.getClassNamesFor("source:placed")),this.lastPlacedContainer.classList.remove(...this.getClassNamesFor("container:placed"))),this.source=this.originalSource.cloneNode(!0),this.originalSource.parentNode.insertBefore(this.source,this.originalSource),this.originalSource.style.display="none";const o=new L({source:this.source,originalSource:this.originalSource,sourceContainer:i,sensorEvent:e});if(this.trigger(o),this.dragging=!o.canceled(),o.canceled())return this.source.remove(),void(this.originalSource.style.display=null);this.originalSource.classList.add(...this.getClassNamesFor("source:original")),this.source.classList.add(...this.getClassNamesFor("source:dragging")),this.sourceContainer.classList.add(...this.getClassNamesFor("container:dragging")),document.body.classList.add(...this.getClassNamesFor("body:dragging")),ee(document.body,"none"),requestAnimationFrame((()=>{const e=te(t).clone({target:this.source});this[Ut]({...t,detail:e})}))}[Ut](t){if(!this.dragging)return;const e=te(t),{container:s}=e;let i=e.target;const n=new k({source:this.source,originalSource:this.originalSource,sourceContainer:s,sensorEvent:e});this.trigger(n),n.canceled()&&e.cancel(),i=r(i,this.options.draggable);const o=r(e.target,this.containers),h=e.overContainer||o,a=this.currentOverContainer&&h!==this.currentOverContainer,c=h&&this.currentOverContainer!==h,u=o&&i&&this.currentOver!==i;if(this.currentOver&&i!==this.currentOver){const t=new R({source:this.source,originalSource:this.originalSource,sourceContainer:s,sensorEvent:e,over:this.currentOver,overContainer:this.currentOverContainer});this.currentOver.classList.remove(...this.getClassNamesFor("draggable:over")),this.currentOver=null,this.trigger(t)}if(a){const t=new U({source:this.source,originalSource:this.originalSource,sourceContainer:s,sensorEvent:e,overContainer:this.currentOverContainer});this.currentOverContainer.classList.remove(...this.getClassNamesFor("container:over")),this.currentOverContainer=null,this.trigger(t)}if(c){h.classList.add(...this.getClassNamesFor("container:over"));const t=new W({source:this.source,originalSource:this.originalSource,sourceContainer:s,sensorEvent:e,overContainer:h});this.currentOverContainer=h,this.trigger(t)}if(u){i.classList.add(...this.getClassNamesFor("draggable:over"));const t=new H({source:this.source,originalSource:this.originalSource,sourceContainer:s,sensorEvent:e,overContainer:h,over:i});this.currentOver=i,this.trigger(t)}}[Kt](t){if(!this.dragging)return;this.dragging=!1;const e=new J({source:this.source,originalSource:this.originalSource,sensorEvent:t?t.sensorEvent:null,sourceContainer:this.sourceContainer});this.trigger(e),e.canceled()||this.source.parentNode.insertBefore(this.originalSource,this.source),this.source.remove(),this.originalSource.style.display="",this.source.classList.remove(...this.getClassNamesFor("source:dragging")),this.originalSource.classList.remove(...this.getClassNamesFor("source:original")),this.originalSource.classList.add(...this.getClassNamesFor("source:placed")),this.sourceContainer.classList.add(...this.getClassNamesFor("container:placed")),this.sourceContainer.classList.remove(...this.getClassNamesFor("container:dragging")),document.body.classList.remove(...this.getClassNamesFor("body:dragging")),ee(document.body,""),this.currentOver&&this.currentOver.classList.remove(...this.getClassNamesFor("draggable:over")),this.currentOverContainer&&this.currentOverContainer.classList.remove(...this.getClassNamesFor("container:over")),this.lastPlacedSource=this.originalSource,this.lastPlacedContainer=this.sourceContainer,this.placedTimeoutID=setTimeout((()=>{this.lastPlacedSource&&this.lastPlacedSource.classList.remove(...this.getClassNamesFor("source:placed")),this.lastPlacedContainer&&this.lastPlacedContainer.classList.remove(...this.getClassNamesFor("container:placed")),this.lastPlacedSource=null,this.lastPlacedContainer=null}),this.options.placedTimeout);const s=new K({source:this.source,originalSource:this.originalSource,sensorEvent:t?t.sensorEvent:null,sourceContainer:this.sourceContainer});this.trigger(s),this.source=null,this.originalSource=null,this.currentOverContainer=null,this.currentOver=null,this.sourceContainer=null}[Gt](t){this[Kt](t)}[Jt](t){if(!this.dragging)return;const e=te(t),s=this.source||r(e.originalEvent.target,this.options.draggable),i=new G({sensorEvent:e,source:s,pressure:e.pressure});this.trigger(i)}}function te(t){return t.detail}function ee(t,e){t.style.webkitUserSelect=e,t.style.mozUserSelect=e,t.style.msUserSelect=e,t.style.oUserSelect=e,t.style.userSelect=e}_t.Plugins={Announcement:class extends e{constructor(t){super(t),this.options={...ht,...this.getOptions()},this.originalTriggerMethod=this.draggable.trigger,this[it]=this[it].bind(this),this[rt]=this[rt].bind(this)}attach(){this.draggable.on("draggable:initialize",this[it])}detach(){this.draggable.off("draggable:destroy",this[rt])}getOptions(){return this.draggable.options.announcements||{}}[nt](t){const e=this.options[t.type];e&&"string"==typeof e&&this[ot](e),e&&"function"==typeof e&&this[ot](e(t))}[ot](t){!function(t,{expire:e}){const s=document.createElement("div");s.textContent=t,at.appendChild(s),setTimeout((()=>{at.removeChild(s)}),e)}(t,{expire:this.options.expire})}[it](){this.draggable.trigger=t=>{try{this[nt](t)}finally{this.originalTriggerMethod.call(this.draggable,t)}}}[rt](){this.draggable.trigger=this.originalTriggerMethod}},Focusable:class extends e{constructor(t){super(t),this.options={...lt,...this.getOptions()},this[ct]=this[ct].bind(this),this[ut]=this[ut].bind(this)}attach(){this.draggable.on("draggable:initialize",this[ct]).on("draggable:destroy",this[ut])}detach(){this.draggable.off("draggable:initialize",this[ct]).off("draggable:destroy",this[ut]),this[ut]()}getOptions(){return this.draggable.options.focusable||{}}getElements(){return[...this.draggable.containers,...this.draggable.getDraggableElements()]}[ct](){requestAnimationFrame((()=>{this.getElements().forEach((t=>function(t){Boolean(!t.getAttribute("tabindex")&&-1===t.tabIndex)&&(dt.push(t),t.tabIndex=0)}(t)))}))}[ut](){requestAnimationFrame((()=>{this.getElements().forEach((t=>function(t){const e=dt.indexOf(t);-1!==e&&(t.tabIndex=-1,dt.splice(e,1))}(t)))}))}},Mirror:class extends e{constructor(t){super(t),this.options={...Tt,...this.getOptions()},this.scrollOffset={x:0,y:0},this.initialScrollOffset={x:window.scrollX,y:window.scrollY},this[yt]=this[yt].bind(this),this[xt]=this[xt].bind(this),this[St]=this[St].bind(this),this[Ct]=this[Ct].bind(this),this[Et]=this[Et].bind(this),this[Mt]=this[Mt].bind(this)}attach(){this.draggable.on("drag:start",this[yt]).on("drag:move",this[xt]).on("drag:stop",this[St]).on("mirror:created",this[Ct]).on("mirror:move",this[Et])}detach(){this.draggable.off("drag:start",this[yt]).off("drag:move",this[xt]).off("drag:stop",this[St]).off("mirror:created",this[Ct]).off("mirror:move",this[Et])}getOptions(){return this.draggable.options.mirror||{}}[yt](t){if(t.canceled())return;"ontouchstart"in window&&document.addEventListener("scroll",this[Mt],!0),this.initialScrollOffset={x:window.scrollX,y:window.scrollY};const{source:e,originalSource:s,sourceContainer:i,sensorEvent:r}=t;this.lastMirrorMovedClient={x:r.clientX,y:r.clientY};const n=new mt({source:e,originalSource:s,sourceContainer:i,sensorEvent:r,dragEvent:t});if(this.draggable.trigger(n),function(t){return/^drag/.test(t.originalEvent.type)}(r)||n.canceled())return;const o=this[Dt](e)||i;this.mirror=e.cloneNode(!0);const h=new ft({source:e,originalSource:s,sourceContainer:i,sensorEvent:r,dragEvent:t,mirror:this.mirror}),a=new vt({source:e,originalSource:s,sourceContainer:i,sensorEvent:r,dragEvent:t,mirror:this.mirror});this.draggable.trigger(h),o.appendChild(this.mirror),this.draggable.trigger(a)}[xt](t){if(!this.mirror||t.canceled())return;const{source:e,originalSource:s,sourceContainer:i,sensorEvent:r}=t;let n=!0,o=!0;if(this.options.thresholdX||this.options.thresholdY){const{x:t,y:e}=this.lastMirrorMovedClient;if(Math.abs(t-r.clientX)<this.options.thresholdX?n=!1:this.lastMirrorMovedClient.x=r.clientX,Math.abs(e-r.clientY)<this.options.thresholdY?o=!1:this.lastMirrorMovedClient.y=r.clientY,!n&&!o)return}const h=new pt({source:e,originalSource:s,sourceContainer:i,sensorEvent:r,dragEvent:t,mirror:this.mirror,passedThreshX:n,passedThreshY:o});this.draggable.trigger(h)}[St](t){if("ontouchstart"in window&&document.removeEventListener("scroll",this[Mt],!0),this.initialScrollOffset={x:0,y:0},this.scrollOffset={x:0,y:0},!this.mirror)return;const{source:e,sourceContainer:s,sensorEvent:i}=t,r=new wt({source:e,mirror:this.mirror,sourceContainer:s,sensorEvent:i,dragEvent:t});this.draggable.trigger(r),r.canceled()||this.mirror.remove()}[Mt](){this.scrollOffset={x:window.scrollX-this.initialScrollOffset.x,y:window.scrollY-this.initialScrollOffset.y}}[Ct]({mirror:t,source:e,sensorEvent:s}){const i=this.draggable.getClassNamesFor("mirror");return t.style.display="none",Promise.resolve({mirror:t,source:e,sensorEvent:s,mirrorClasses:i,scrollOffset:this.scrollOffset,options:this.options,passedThreshX:!0,passedThreshY:!0}).then(Ot).then(Xt).then(Yt).then(At).then(It({initial:!0})).then(Ft).then((({mirrorOffset:t,initialX:e,initialY:s,...i})=>(this.mirrorOffset=t,this.initialX=e,this.initialY=s,this.lastMovedX=e,this.lastMovedY=s,{mirrorOffset:t,initialX:e,initialY:s,...i})))}[Et](t){return t.canceled()?null:Promise.resolve({mirror:t.mirror,sensorEvent:t.sensorEvent,mirrorOffset:this.mirrorOffset,options:this.options,initialX:this.initialX,initialY:this.initialY,scrollOffset:this.scrollOffset,passedThreshX:t.passedThreshX,passedThreshY:t.passedThreshY,lastMovedX:this.lastMovedX,lastMovedY:this.lastMovedY}).then(It({raf:!0})).then((({lastMovedX:t,lastMovedY:e,...s})=>(this.lastMovedX=t,this.lastMovedY=e,{lastMovedX:t,lastMovedY:e,...s}))).then((e=>{const s=new bt({source:t.source,originalSource:t.originalSource,sourceContainer:t.sourceContainer,sensorEvent:t.sensorEvent,dragEvent:t.dragEvent,mirror:this.mirror,passedThreshX:t.passedThreshX,passedThreshY:t.passedThreshY});return this.draggable.trigger(s),e}))}[Dt](t){const e=this.options.appendTo;return"string"==typeof e?document.querySelector(e):e instanceof HTMLElement?e:"function"==typeof e?e(t):t.parentNode}},Scrollable:class extends e{constructor(t){super(t),this.options={...Nt,...this.getOptions()},this.currentMousePosition=null,this.scrollAnimationFrame=null,this.scrollableElement=null,this.findScrollableElementFrame=null,this[jt]=this[jt].bind(this),this[qt]=this[qt].bind(this),this[zt]=this[zt].bind(this),this[Pt]=this[Pt].bind(this)}attach(){this.draggable.on("drag:start",this[jt]).on("drag:move",this[qt]).on("drag:stop",this[zt])}detach(){this.draggable.off("drag:start",this[jt]).off("drag:move",this[qt]).off("drag:stop",this[zt])}getOptions(){return this.draggable.options.scrollable||{}}getScrollableElement(t){return this.hasDefinedScrollableElements()?r(t,this.options.scrollableElements)||document.documentElement:function(t){if(!t)return Bt();const e=getComputedStyle(t).getPropertyValue("position"),s="absolute"===e,i=r(t,(t=>(!s||!function(t){return"static"===getComputedStyle(t).getPropertyValue("position")}(t))&&function(t){const e=getComputedStyle(t,null),s=e.getPropertyValue("overflow")+e.getPropertyValue("overflow-y")+e.getPropertyValue("overflow-x");return/(auto|scroll)/.test(s)}(t)));return"fixed"!==e&&i?i:Bt()}(t)}hasDefinedScrollableElements(){return Boolean(0!==this.options.scrollableElements.length)}[jt](t){this.findScrollableElementFrame=requestAnimationFrame((()=>{this.scrollableElement=this.getScrollableElement(t.source)}))}[qt](t){if(this.findScrollableElementFrame=requestAnimationFrame((()=>{this.scrollableElement=this.getScrollableElement(t.sensorEvent.target)})),!this.scrollableElement)return;const e=t.sensorEvent,s={x:0,y:0};"ontouchstart"in window&&(s.y=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,s.x=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),this.currentMousePosition={clientX:e.clientX-s.x,clientY:e.clientY-s.y},this.scrollAnimationFrame=requestAnimationFrame(this[Pt])}[zt](){cancelAnimationFrame(this.scrollAnimationFrame),cancelAnimationFrame(this.findScrollableElementFrame),this.scrollableElement=null,this.scrollAnimationFrame=null,this.findScrollableElementFrame=null,this.currentMousePosition=null}[Pt](){if(!this.scrollableElement||!this.currentMousePosition)return;cancelAnimationFrame(this.scrollAnimationFrame);const{speed:t,sensitivity:e}=this.options,s=this.scrollableElement.getBoundingClientRect(),i=s.bottom>window.innerHeight,r=s.top<0||i,n=Bt(),o=this.scrollableElement,h=this.currentMousePosition.clientX,a=this.currentMousePosition.clientY;if(o===document.body||o===document.documentElement||r){const{innerHeight:s,innerWidth:i}=window;a<e?n.scrollTop-=t:s-a<e&&(n.scrollTop+=t),h<e?n.scrollLeft-=t:i-h<e&&(n.scrollLeft+=t)}else{const{offsetHeight:i,offsetWidth:r}=o;s.top+i-a<e?o.scrollTop+=t:a-s.top<e&&(o.scrollTop-=t),s.left+r-h<e?o.scrollLeft+=t:h-s.left<e&&(o.scrollLeft-=t)}this.scrollAnimationFrame=requestAnimationFrame(this[Pt])}}},_t.Sensors={MouseSensor:class extends i{constructor(t=[],e={}){super(t,e),this.mouseDownTimeout=null,this.pageX=null,this.pageY=null,this[u]=this[u].bind(this),this[l]=this[l].bind(this),this[d]=this[d].bind(this),this[g]=this[g].bind(this),this[m]=this[m].bind(this),this[f]=this[f].bind(this)}attach(){document.addEventListener("mousedown",this[l],!0)}detach(){document.removeEventListener("mousedown",this[l],!0)}[l](t){if(0!==t.button||t.ctrlKey||t.metaKey)return;const e=r(t.target,this.containers);if(!e)return;if(this.options.handle&&t.target&&!r(t.target,this.options.handle))return;const s=r(t.target,this.options.draggable);if(!s)return;const{delay:i}=this,{pageX:n,pageY:o}=t;Object.assign(this,{pageX:n,pageY:o}),this.onMouseDownAt=Date.now(),this.startEvent=t,this.currentContainer=e,this.originalSource=s,document.addEventListener("mouseup",this[g]),document.addEventListener("dragstart",v),document.addEventListener("mousemove",this[f]),this.mouseDownTimeout=window.setTimeout((()=>{this[f]({pageX:this.pageX,pageY:this.pageY})}),i.mouse)}[m](){const t=this.startEvent,e=new h({clientX:t.clientX,clientY:t.clientY,target:t.target,container:this.currentContainer,originalSource:this.originalSource,originalEvent:t});this.trigger(this.currentContainer,e),this.dragging=!e.canceled(),this.dragging&&(document.addEventListener("contextmenu",this[u],!0),document.addEventListener("mousemove",this[d]))}[f](t){const{pageX:e,pageY:s}=t,{distance:i}=this.options,{startEvent:r,delay:o}=this;if(Object.assign(this,{pageX:e,pageY:s}),!this.currentContainer)return;const h=Date.now()-this.onMouseDownAt,a=n(r.pageX,r.pageY,e,s)||0;clearTimeout(this.mouseDownTimeout),h<o.mouse?document.removeEventListener("mousemove",this[f]):a>=i&&(document.removeEventListener("mousemove",this[f]),this[m]())}[d](t){if(!this.dragging)return;const e=document.elementFromPoint(t.clientX,t.clientY),s=new a({clientX:t.clientX,clientY:t.clientY,target:e,container:this.currentContainer,originalEvent:t});this.trigger(this.currentContainer,s)}[g](t){if(clearTimeout(this.mouseDownTimeout),0!==t.button)return;if(document.removeEventListener("mouseup",this[g]),document.removeEventListener("dragstart",v),document.removeEventListener("mousemove",this[f]),!this.dragging)return;const e=document.elementFromPoint(t.clientX,t.clientY),s=new c({clientX:t.clientX,clientY:t.clientY,target:e,container:this.currentContainer,originalEvent:t});this.trigger(this.currentContainer,s),document.removeEventListener("contextmenu",this[u],!0),document.removeEventListener("mousemove",this[d]),this.currentContainer=null,this.dragging=!1,this.startEvent=null}[u](t){t.preventDefault()}},TouchSensor:class extends i{constructor(t=[],e={}){super(t,e),this.currentScrollableParent=null,this.tapTimeout=null,this.touchMoved=!1,this.pageX=null,this.pageY=null,this[b]=this[b].bind(this),this[w]=this[w].bind(this),this[y]=this[y].bind(this),this[x]=this[x].bind(this),this[S]=this[S].bind(this)}attach(){document.addEventListener("touchstart",this[b])}detach(){document.removeEventListener("touchstart",this[b])}[b](t){const e=r(t.target,this.containers);if(!e)return;if(this.options.handle&&t.target&&!r(t.target,this.options.handle))return;const s=r(t.target,this.options.draggable);if(!s)return;const{distance:i=0}=this.options,{delay:n}=this,{pageX:o,pageY:h}=p(t);Object.assign(this,{pageX:o,pageY:h}),this.onTouchStartAt=Date.now(),this.startEvent=t,this.currentContainer=e,this.originalSource=s,document.addEventListener("touchend",this[w]),document.addEventListener("touchcancel",this[w]),document.addEventListener("touchmove",this[S]),e.addEventListener("contextmenu",E),i&&(C=!0),this.tapTimeout=window.setTimeout((()=>{this[S]({touches:[{pageX:this.pageX,pageY:this.pageY}]})}),n.touch)}[x](){const t=this.startEvent,e=this.currentContainer,s=p(t),i=new h({clientX:s.pageX,clientY:s.pageY,target:t.target,container:e,originalSource:this.originalSource,originalEvent:t});this.trigger(this.currentContainer,i),this.dragging=!i.canceled(),this.dragging&&document.addEventListener("touchmove",this[y]),C=this.dragging}[S](t){const{distance:e}=this.options,{startEvent:s,delay:i}=this,r=p(s),o=p(t),h=Date.now()-this.onTouchStartAt,a=n(r.pageX,r.pageY,o.pageX,o.pageY);Object.assign(this,o),clearTimeout(this.tapTimeout),h<i.touch?document.removeEventListener("touchmove",this[S]):a>=e&&(document.removeEventListener("touchmove",this[S]),this[x]())}[y](t){if(!this.dragging)return;const{pageX:e,pageY:s}=p(t),i=document.elementFromPoint(e-window.scrollX,s-window.scrollY),r=new a({clientX:e,clientY:s,target:i,container:this.currentContainer,originalEvent:t});this.trigger(this.currentContainer,r)}[w](t){if(clearTimeout(this.tapTimeout),C=!1,document.removeEventListener("touchend",this[w]),document.removeEventListener("touchcancel",this[w]),document.removeEventListener("touchmove",this[S]),this.currentContainer&&this.currentContainer.removeEventListener("contextmenu",E),!this.dragging)return;document.removeEventListener("touchmove",this[y]);const{pageX:e,pageY:s}=p(t),i=document.elementFromPoint(e-window.scrollX,s-window.scrollY);t.preventDefault();const r=new c({clientX:e,clientY:s,target:i,container:this.currentContainer,originalEvent:t});this.trigger(this.currentContainer,r),this.currentContainer=null,this.dragging=!1,this.startEvent=null}}};class se extends t{constructor(t){super(t),this.data=t}get dragEvent(){return this.data.dragEvent}}se.type="sortable";class ie extends se{get startIndex(){return this.data.startIndex}get startContainer(){return this.data.startContainer}}ie.type="sortable:start",ie.cancelable=!0;class re extends se{get currentIndex(){return this.data.currentIndex}get over(){return this.data.over}get overContainer(){return this.data.dragEvent.overContainer}}re.type="sortable:sort",re.cancelable=!0;class ne extends se{get oldIndex(){return this.data.oldIndex}get newIndex(){return this.data.newIndex}get oldContainer(){return this.data.oldContainer}get newContainer(){return this.data.newContainer}}ne.type="sortable:sorted";class oe extends se{get oldIndex(){return this.data.oldIndex}get newIndex(){return this.data.newIndex}get oldContainer(){return this.data.oldContainer}get newContainer(){return this.data.newContainer}}oe.type="sortable:stop";const he=Symbol("onDragStart"),ae=Symbol("onDragOverContainer"),ce=Symbol("onDragOver"),ue=Symbol("onDragStop"),le={"sortable:sorted":function({dragEvent:t}){const e=t.source.textContent.trim()||t.source.id||"sortable element";if(t.over){const s=t.over.textContent.trim()||t.over.id||"sortable element";return t.source.compareDocumentPosition(t.over)&Node.DOCUMENT_POSITION_FOLLOWING?`Placed ${e} after ${s}`:`Placed ${e} before ${s}`}return`Placed ${e} into a different container`}};class de extends _t{constructor(t=[],e={}){super(t,{...e,announcements:{...le,...e.announcements||{}}}),this.startIndex=null,this.startContainer=null,this[he]=this[he].bind(this),this[ae]=this[ae].bind(this),this[ce]=this[ce].bind(this),this[ue]=this[ue].bind(this),this.on("drag:start",this[he]).on("drag:over:container",this[ae]).on("drag:over",this[ce]).on("drag:stop",this[ue])}destroy(){super.destroy(),this.off("drag:start",this[he]).off("drag:over:container",this[ae]).off("drag:over",this[ce]).off("drag:stop",this[ue])}index(t){return this.getSortableElementsForContainer(t.parentNode).indexOf(t)}getSortableElementsForContainer(t){return[...t.querySelectorAll(this.options.draggable)].filter((e=>e!==this.originalSource&&e!==this.mirror&&e.parentNode===t))}[he](t){this.startContainer=t.source.parentNode,this.startIndex=this.index(t.source);const e=new ie({dragEvent:t,startIndex:this.startIndex,startContainer:this.startContainer});this.trigger(e),e.canceled()&&t.cancel()}[ae](t){if(t.canceled())return;const{source:e,over:s,overContainer:i}=t,r=this.index(e),n=new re({dragEvent:t,currentIndex:r,source:e,over:s});if(this.trigger(n),n.canceled())return;const o=me({source:e,over:s,overContainer:i,children:this.getSortableElementsForContainer(i)});if(!o)return;const{oldContainer:h,newContainer:a}=o,c=this.index(t.source),u=new ne({dragEvent:t,oldIndex:r,newIndex:c,oldContainer:h,newContainer:a});this.trigger(u)}[ce](t){if(t.over===t.originalSource||t.over===t.source)return;const{source:e,over:s,overContainer:i}=t,r=this.index(e),n=new re({dragEvent:t,currentIndex:r,source:e,over:s});if(this.trigger(n),n.canceled())return;const o=me({source:e,over:s,overContainer:i,children:this.getDraggableElementsForContainer(i)});if(!o)return;const{oldContainer:h,newContainer:a}=o,c=this.index(e),u=new ne({dragEvent:t,oldIndex:r,newIndex:c,oldContainer:h,newContainer:a});this.trigger(u)}[ue](t){const e=new oe({dragEvent:t,oldIndex:this.startIndex,newIndex:this.index(t.source),oldContainer:this.startContainer,newContainer:t.source.parentNode});this.trigger(e),this.startIndex=null,this.startContainer=null}}function ge(t){return Array.prototype.indexOf.call(t.parentNode.children,t)}function me({source:t,over:e,overContainer:s,children:i}){const r=t.parentNode!==s;return i.length?e&&t.parentNode===e.parentNode?function(t,e){const s=ge(t),i=ge(e);return t.parentNode.insertBefore(t,s<i?e.nextElementSibling:e),{oldContainer:t.parentNode,newContainer:t.parentNode}}(t,e):r?function(t,e,s){const i=t.parentNode;return e?e.parentNode.insertBefore(t,e):s.appendChild(t),{oldContainer:i,newContainer:t.parentNode}}(t,e,s):null:function(t,e){const s=t.parentNode;return e.appendChild(t),{oldContainer:s,newContainer:e}}(t,s)}export{de as S}
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as r}from"./p-d2d301a6.js";import{DataType as l,StringUtils as n,ObjectUtils as a,ElementIDUtils as o,ErrorException as h,ApplicationContext as d,LockManager as c,LockManagerOperation as u,FloatingManager as m,DateUtils as f,MaskFormatter as p,ArrayUtils as v}from"@sankhyalabs/core";import{EzScrollDirection as b}from"@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection";import{C as k}from"./p-3fcb90d6.js";import{toString as g}from"@sankhyalabs/core/dist/dataunit/metadata/DataType";import{F as _}from"./p-ff1990ad.js";import{F}from"./p-933c0c0b.js";import{F as z}from"./p-fa80e546.js";import{ApplicationUtils as x}from"@sankhyalabs/ezui/dist/collection/utils";import{P as y}from"./p-057fad05.js";import{ModalAction as w}from"@sankhyalabs/ezui/dist/collection/components/ez-modal-container";import{F as C}from"./p-d9804798.js";import"./p-22ddc147.js";import"./p-5a7e18f4.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";function $(t){let i="";return t.forEach(((t,e)=>{var s;i+=` ${e>0?null!==(s=t.operand)&&void 0!==s?s:"OR":""} ${t.expression}`})),i.trim()}class I{constructor({filterConfig:t,configName:i,onComplete:e,getMessage:s,disablePersonalizedFilter:r,onAddPersonalizedFilter:l,onEditPersonalizedFilter:n,onDeletePersonalizedFilter:a}){this._filterConfig=t,this._configName=i,this._onComplete=e,this._getMessage=s,this._disablePersonalizedFilter=r,this._addPersonalizedFilterFn=l,this._editPersonalizedFilterFn=n,this._onDeletePersonalizedFilter=a}applyFilters(t){this._onComplete(t),this._closeModal()}buildFilterModal(){const t=document.createElement("snk-filter-modal");return t.className="ez-size-height--full",t.filters=this._filterConfig,t.configName=this._configName,t.disablePersonalizedFilter=this._disablePersonalizedFilter,t.getMessage=this._getMessage.bind(this),t.applyFilters=this.applyFilters.bind(this),t.closeModal=()=>this._closeModal(),t.addPersonalizedFilter=()=>this._addPersonalizedFilterFn(),t.editPersonalizedFilter=t=>this._editPersonalizedFilterFn(t),t.deletePersonalizedFilter=(t,i)=>this._onDeletePersonalizedFilter(t,i),t}async showModal(){const t={content:this.buildFilterModal(),position:"left",heightMode:"full",closeOutsideClick:!1,useScrimLight:!0};this._closeModal=await x.showModal(t)}async closeModal(){this._closeModal()}}const L=class{constructor(e){t(this,e),this.configUpdated=i(this,"configUpdated",7),this._updateSequence=[],this._loadingPending=!1,this._configUpdated=!1,this._firstLoad=!0,this._pendingVariables=!1,this._customfiltersToBeUpdated=[],this._resolveLoading=void 0,this._calculateSortIndex=t=>{if(!t.visible)return 0;if(t.hardFixed)return 1e6;let i=t.fixed?1e5:0;return i+=this.hasValidValue(t)?1e4:0,i+=this._updateSequence.lastIndexOf(t.id)+1,i},this._filtersComparator=(t,i)=>this._calculateSortIndex(i)-this._calculateSortIndex(t),this.enableLockManagerLoadingComp=!1,this.customFilterBarConfig=void 0,this.dataUnit=void 0,this.title=void 0,this.configName=void 0,this.resourceID=void 0,this.mode="regular",this.filterConfig=void 0,this.messagesBuilder=void 0,this.disablePersonalizedFilter=void 0,this.filterBarLegacyConfigName=void 0,this.autoLoad=void 0,this.afterApplyConfig=void 0,this.allowDefault=void 0,this.scrollerLocked=!1,this.showPersonalizedFilter=!1,this.personalizedFilterId=void 0}hasValidValue(t){return null!=t.value&&(!Array.isArray(t.value)||t.value.some((t=>!0===t.check)))}observeFilterConfig(t,i){a.equals(t,i)||this.handleFilterConfigsChanged(i,t)}handleFilterConfigsChanged(t,i){if(null!=t&&null==i)this._loadingPending=!0,this._configUpdated=!0;else{const e=new Map(t?t.map((t=>[t.id,t])):void 0);0===e.size&&i.length>0?(this._loadingPending=!0,this._configUpdated=!1):i.forEach((t=>{const i=e.get(t.id);if(null!=i){if(this._configUpdated=this._configUpdated||a.objectToString(i)!=a.objectToString(t),this._loadingPending=this._loadingPending||a.objectToString(i.value)!==a.objectToString(t.value),!this._loadingPending){const e=a.objectToString(i.groupedItems)!=a.objectToString(t.groupedItems);this._configUpdated=this._configUpdated||e,this._loadingPending=this._loadingPending||e}}else this._configUpdated=!0,this._loadingPending=this._loadingPending||null!=t.value}))}(this._loadingPending||this._configUpdated)&&this.configUpdated.emit(i),this.processAfterUpdateConfig()}async reload(){this.loadConfigFromStorage(!0)}async getFilterItem(t){const i=this.filterConfig.find((i=>i.id===t));return Promise.resolve(a.copy(i))}async updateFilterItem(t){return-1==this.filterConfig.findIndex((i=>i.id===t.id))?(console.warn("[SnkFilterBar.updateFilterItem] FilterItem não encontrado, o mesmo não será atualizado."),Promise.resolve()):(this._loadingPending=!0,this.updateFilter(t),Promise.resolve())}async addFilterItem(t){return this.filterConfig.findIndex((i=>i.id===t.id))>-1?(console.warn("[SnkFilterBar.addFilterItem] FilterItem já existe , o mesmo não será adicionado novamente."),Promise.resolve()):(this.filterConfig.push(t),this._loadingPending=!0,this.updateFilter(t),Promise.resolve())}async removeFilterItem(t){const i=this.filterConfig.findIndex((i=>i.id===t));if(-1==i)return console.warn("[SnkFilterBar.removeFilterItem] FilterItem não encontrado"),Promise.resolve(void 0);const e=this.filterConfig[i];return this.filterConfig=this.filterConfig.filter((i=>i.id!==t)),Promise.resolve(e)}componentDidLoad(){this._element&&o.addIDInfo(this._element,null,{dataUnit:this.dataUnit})}processPendingFilter(){if(this._pendingVariables){const t=this._element.querySelector("#filter-PERSONALIZED_FILTER_GROUP");t&&t.showUp(!0).then((()=>{this.processAfterUpdateConfig()}))}else this.processAfterUpdateConfig()}getPersonalizedFilterItem(){return this.filterConfig.find((t=>t.type===_.PERSONALIZED))}async processAfterUpdateConfig(){var t;if(this._loadingPending){if(await this._application.isLoadedByPk()&&!this._configUpdated)return;const t=this.getPersonalizedFilterItem();if(this._pendingVariables=!y.validateVariableValues(t),this._pendingVariables)return;this._loadingPending=!1,this.doLoadData(null!=this.dataUnit.getLastLoadRequest())}this._configUpdated&&(this._configUpdated=!1,k.saveFilterBarConfig(this.filterConfig,this.configName,this.resourceID),null===(t=this.afterApplyConfig)||void 0===t||t.call(this))}async doLoadData(t=!1){try{if(this._firstLoad&&!1===this.autoLoad)return;if(this._firstLoad&&!t&&void 0===this.autoLoad&&!await this._application.getBooleanParam("global.carregar.registros.iniciar.tela"))return;this.dataUnit.loadData(void 0,void 0,!0)}finally{this._firstLoad=!1}}getMessage(t,i,e){var s;return null==this.messagesBuilder&&this._application&&(this.messagesBuilder=this._application.messagesBuilder),(null===(s=this.messagesBuilder)||void 0===s?void 0:s.getMessage(t,i))||e}getFilter(t){var i;const e=[];return null===(i=this.filterConfig)||void 0===i||i.filter((t=>this.isActiveFilter(t))).forEach((t=>{const i=(t=>{switch(t.type){case _.DEFAULT_FILTER:return function(t){return{name:t.id,expression:t.props.expression,params:[]}}(t);case _.BINARY_SELECT:return function(t){const{id:i,value:e,props:s}=t;return{name:i,expression:s.options.find((t=>t.name===e)).expression,params:[]}}(t);case _.MULTI_SELECT:return function(t){const{id:i,value:e,props:s}=t;return{name:i,expression:s.expression,params:[{name:i,dataType:l.TEXT,value:e}]}}(t);case _.MULTI_LIST:return function(t){const{id:i,value:e,props:s}=t,r=(null!==(o=null!==(a=null==(n=e)?void 0:n.elements)&&void 0!==a?a:null==n?void 0:n.members)&&void 0!==o?o:n).filter((t=>null==t?void 0:t.check)).map((({id:t})=>Number.isNaN(+t)?String(t):Number(t)));var n,a,o;if(r.length>0)return{name:i,expression:s.expression,params:[{name:i,dataType:l.TEXT,value:JSON.stringify(r)}]}}(t);case _.PERIOD:return function(t){const{id:i,value:e,props:s}=t;let{end:r,start:n}=e;"string"==typeof r&&(r=new Date(r)),"string"==typeof n&&(n=new Date(n));const a=[];let o;return r&&n?(o=s.expression.fullfill,a.push({name:`${i}.START`,dataType:l.DATE,value:g(l.DATE,n)},{name:`${i}.END`,dataType:l.DATE,value:g(l.DATE,r)})):n?(o=s.expression.onlystart,a.push({name:i,dataType:l.DATE,value:g(l.DATE,n)})):(o=s.expression.onlyend,a.push({name:i,dataType:l.DATE,value:g(l.DATE,r)})),{name:i,expression:o,params:a}}(t);case _.SEARCH:return function(t){const{id:i,value:e,props:s}=t;return{name:i,expression:s.expression,params:[{name:i,dataType:l.TEXT,value:g(l.TEXT,null==e?void 0:e.value)}]}}(t);case _.TEXT:return function(t){let{id:i,value:e,props:s}=t;const r=s.expression;var a,o;return n.isEmpty(s.likeAs)||(a=e,e="CONTANIS"===(o=s.likeAs)?`%${a}%`:"STARTS_WITH"===o?`${a}%`:"ENDS_WITH"===o?`%${a}`:a),{name:i,expression:r,params:[{name:i,dataType:l.TEXT,value:g(l.TEXT,e)}]}}(t);case _.NUMBER:return function(t){const{id:i,value:e,props:s}=t;if(s.variation===z.INTERVAL){const{start:t,end:r}=null!=e?e:{start:0,end:0};if(!isNaN(t)&&!isNaN(r))return{name:i,expression:s.intervalExpression.fullfill,params:[{name:`${i}.START`,dataType:l.NUMBER,value:g(l.NUMBER,t)},{name:`${i}.END`,dataType:l.NUMBER,value:g(l.NUMBER,r)}]};if(!isNaN(t))return{name:i,expression:s.intervalExpression.onlystart,params:[{name:i,dataType:l.NUMBER,value:g(l.NUMBER,t)}]};if(!isNaN(r))return{name:i,expression:s.intervalExpression.onlyend,params:[{name:i,dataType:l.NUMBER,value:g(l.NUMBER,r)}]}}return{name:i,expression:s.expression,params:[{name:i,dataType:l.NUMBER,value:g(l.NUMBER,e)}]}}(t);case _.PERSONALIZED:return function(t){const{id:i,groupedItems:e=[]}=t,s=e.filter((t=>!!t.visible)).map((t=>{var i;const e=t.props.expression,s=((null===(i=t.props.personalizedFilter)||void 0===i?void 0:i.parameters)||[]).map(((i,e)=>{const s=Array.from(t.value||0),r=i.dataType;let n=e>=0&&e<s.length?s[e]:null;return null!=n&&"object"==typeof n&&"value"in n&&(n=n.value),null==n&&r===l.BOOLEAN&&(n=!1),{name:i.name,dataType:r,value:"string"==typeof n?n:g(r,n)}}));return{expression:e,name:t.id,params:s}}));return{name:i,expression:s.map((t=>`(${t.expression})`)).join(` ${F.AND} `),params:s.flatMap((t=>t.params))}}(t);case _.CHECK_BOX_LIST:return function(t){var i;const{id:e,value:s,props:r}=t,l=Object.entries(null!=s?s:{}).filter((([t,i])=>!0===i)).map((([t,i])=>t));return{name:e,expression:$(null===(i=r.options)||void 0===i?void 0:i.filter((t=>l.includes(t.name)))),params:[]}}(t);default:return}})(t);i&&e.push(i)})),e}isActiveFilter(t){return t.type===_.DEFAULT_FILTER||this.filterActiveFilter(t)&&(t.groupedItems||null!=t.value)}registryFilterProvider(){this.dataUnit.addFilterProvider(this),this.filterConfig&&this.doLoadData()}itemFocused(t){this._element.querySelectorAll("snk-filter-item,snk-filter-list").forEach((i=>{i.id===t?"snk-filter-item"===i.tagName.toLowerCase()&&i.getClientRects()[0].x<0&&i.scrollIntoView({behavior:"auto",inline:"nearest"}):i.hideDetail()}))}filterActiveFilter(t){return t.visible||t.removalBlocked}filterPersonalizedItems(t){return t.type===_.PERSONALIZED}getPersonalizedFilterVariableItems(){return this.filterConfig.filter(this.filterPersonalizedItems).map((t=>{const i=`filter-${t.id}`;return e("snk-filter-item",{key:t.id,id:i,config:Object.assign({},t),onFocusin:()=>this.itemFocused(i),onVisibleChanged:t=>this.scrollerLocked=t.detail,onFilterChange:t=>this.updateFilter(t.detail),getMessage:(t,i)=>this.getMessage(t,i),showChips:!1})}))}getFilterItems(){const t=[],i=[];this.filterConfig.sort(((t,i)=>this._filtersComparator(t,i))).filter(this.filterActiveFilter).forEach(((s,r)=>{const l=`filter-${(s=a.copy(s)).id}`,n=e("snk-filter-item",{onVisibleChanged:t=>this.scrollerLocked=t.detail,onFilterChange:t=>this.updateFilter(t.detail),onFocusin:()=>this.itemFocused(l),id:l,config:s,class:r>0?"ez-padding-left--medium":"",getMessage:(t,i)=>this.getMessage(t,i),key:s.id});return s.fixed||s.hardFixed?t.push(n):i.push(n),n}));const s=[];return s.push(...t),t.length>0&&i.length>0&&s.push(e("hr",{class:"ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-filter-bar__divider"})),s.push(...i),s}calculateUpdateSequence(t){t&&(this._updateSequence=this._updateSequence.filter((i=>t.id!==i)),this._updateSequence.push(t.id))}normalizeItem(t){const i=Object.assign({},t);return["props","value","hardFixed","fixed"].forEach((t=>{null==i[t]&&delete i[t]})),""===t.value&&delete t.value,i}updateFilter(t){this.filterConfig=this.filterConfig.map((i=>(t=this.normalizeItem(t),i.id===t.id?(a.objectToString(i)!=a.objectToString(t)&&this.calculateUpdateSequence(t),t):i))).sort(((t,i)=>this._filtersComparator(t,i)))}loadPermitions(){this._application.isUserSup().then((t=>this.allowDefault=t))}addFilterBarLegacyConfigName(){this.filterBarLegacyConfigName&&this.configName&&k.addFilterBarLegacyConfig(this.configName,this.filterBarLegacyConfigName)}async loadConfigFromStorage(t){try{let i;t&&await k.deleteFilterBarConfigCache(this.configName,this.resourceID),i=this.customFilterBarConfig?await this.customFilterBarConfig(this.configName,this.resourceID,{contextURI:this.dataUnit.name}):await k.loadFilterBarConfig(this.configName,this.resourceID,{contextURI:this.dataUnit.name}),this.filterConfig=i.map((t=>this.normalizeItem(t))),this.filterConfig.sort(((t,i)=>this._filtersComparator(t,i)))}catch(t){throw new h(this.getMessage("snkFilterBar.failToLoadConfig"),t)}}attachDataUnit(){if(null==this.dataUnit){let t=this._element.parentElement;for(;t;)if("SNK-DATA-UNIT"===t.tagName.toUpperCase()){const i=t;this.dataUnit=i.dataUnit,this.dataUnit?this.registryFilterProvider():i.addEventListener("dataUnitReady",(t=>{this.dataUnit=t.detail,this.registryFilterProvider()}));break}t=t.parentElement}else this.registryFilterProvider()}filterChangeListener(t){this.updateFilter(t.detail)}async showFilterModal(){let t=a.copy(this.filterConfig);t=t.sort(((t,i)=>t.originOrder-i.originOrder)),this._filterModalFactory=new I({filterConfig:t,configName:this.configName,onComplete:t=>{var i;this.filterConfig=t.map(this.normalizeItem).sort(((t,i)=>this._filtersComparator(t,i))),null===(i=this.afterApplyConfig)||void 0===i||i.call(this)},disablePersonalizedFilter:this.disablePersonalizedFilter,getMessage:(t,i)=>this.getMessage(t,i),onAddPersonalizedFilter:()=>this.addPersonalizedFilter(),onEditPersonalizedFilter:t=>this.editPersonalizedFilter(t),onDeletePersonalizedFilter:(t,i)=>this.deletePersonalizedFilter(t,_.PERSONALIZED,i)}),await this._filterModalFactory.showModal()}addPersonalizedFilter(){this._filterModalFactory.closeModal(),this.personalizedFilterId=void 0,this.showPersonalizedFilter=!0,window.requestAnimationFrame((()=>{this._elPersonalizedFilter.createPersonalizedFilter()}))}editPersonalizedFilter(t){this._filterModalFactory.closeModal(),this.showPersonalizedFilter=!0,this.personalizedFilterId=t}deletePersonalizedFilter(t,i,e){i===_.PERSONALIZED&&k.removePersonalizedFilter(t,this.resourceID,e)}handleHidePersonalizedFilter(t){t?this.loadConfigFromStorage().then((()=>{this.hidePersonalizedFilter()})):this.hidePersonalizedFilter()}hidePersonalizedFilter(){this.personalizedFilterId=void 0,this.showPersonalizedFilter=!1}async componentWillLoad(){var t;try{if(this._application=d.getContextValue("__SNK__APPLICATION__"),await this.attachDataUnit(),this._application){if(this._application.enableLockManagerLoadingApp&&this.enableLockManagerLoadingComp){const t=c.addLockManagerCtxId(this._element);this._resolveLoading=c.lock(t,u.APP_LOADING)}await Promise.all([this.loadPermitions(),this.addFilterBarLegacyConfigName(),this.loadConfigFromStorage()])}}finally{null===(t=this._resolveLoading)||void 0===t||t.call(this)}}componentDidRender(){this.processPendingFilter()}render(){if(this.dataUnit&&this.filterConfig&&0!==this.filterConfig.length)return this.showPersonalizedFilter?e("snk-personalized-filter",{class:"filter-bar__personalized-filter",filterId:this.personalizedFilterId,ref:t=>this._elPersonalizedFilter=t,onEzCancel:()=>this.handleHidePersonalizedFilter(!1),onEzAfterSave:()=>this.handleHidePersonalizedFilter(!0),entityUri:this.dataUnit.name,configName:this.configName,resourceID:this.resourceID}):"regular"!==this.mode?e(s,{"data-mode":this.mode},this.getPersonalizedFilterVariableItems(),"button"===this.mode&&e("ez-button",{class:"ez-margin-left--medium",size:"small",label:this.getMessage("snkFilterBar.filters",void 0,"Filtros"),onClick:this.showFilterModal.bind(this)})):e(s,null,e("div",null,e("span",{class:"snk-filter-bar__title",title:this.title,"data-tooltip":this.title,"data-flow":"bottom"},this.title)),e("ez-scroller",{class:"snk-filter-bar__scroller",direction:b.HORIZONTAL,activeShadow:!0,locked:this.scrollerLocked},e("section",{class:"snk-filter-bar__filter-item-container"},this.getFilterItems())),e("ez-button",{class:"ez-padding-left--medium ez-margin-top--extra-small",size:"small",label:this.getMessage("snkFilterBar.filters",void 0,"Filtros"),onClick:this.showFilterModal.bind(this)},e("ez-icon",{slot:"leftIcon",iconName:"plus",class:"ez-padding-right--small"})))}get _element(){return r(this)}static get watchers(){return{filterConfig:["observeFilterConfig"]}}};L.style='.sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:12px}[data-mode="hidden"].sc-snk-filter-bar-h{width:0px;height:0px}[data-mode="button"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small);height:80%}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-items:start}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:"";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}';const N=class{constructor(e){t(this,e),this.visibleChanged=i(this,"visibleChanged",7),this.filterChange=i(this,"filterChange",3),this.innerClickCheck=(t,i)=>i.id!=m.MODAL_ELEMENT_ID||(this.detailIsVisible=!1,!1),this.detailIsVisible=void 0,this.config=void 0,this.getMessage=void 0,this.showChips=!0}observeDetailIsVisible(t){this.visibleChanged.emit(t)}async showUp(t=!1){return new Promise((i=>{var e;this._filterItemElement.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}),t&&(this._closeCallback=i,null===(e=this._chipElement)||void 0===e||e.blur(),window.requestAnimationFrame((()=>{this._floatingID=m.float(this._popover,this._popoverContainer,this.getFloatOptions()),this._popover.show(),this.detailIsVisible=!0})))}))}updatePosition(){null!=this._floatingID&&m.updateFloatPosition(this._popover,this._popoverContainer,this.getFloatOptions())}getFloatOptions(){return{autoClose:!0,innerClickTest:this.innerClickCheck,backClickListener:()=>this.onDetailCloseCallback(),left:this.getOffsetLeft(),top:this.getOffsetTop(),useOverlay:!0,overlayClassName:"ez-scrim ez-scrim--light",isFixed:!0}}getOffsetLeft(){const t=getComputedStyle(this._filterItemElement).getPropertyValue("padding-left"),i=this._filterItemElement.getBoundingClientRect(),e=430-(document.body.clientWidth-i.left);return`calc(${i.x}px + ${t} - ${e>0?e:0}px)`}getOffsetTop(){const t=this._filterItemElement.getBoundingClientRect();return t.y+t.height+"px"}controlScrollPage(){window.removeEventListener("scroll",this.updatePosition.bind(this)),window.addEventListener("scroll",this.updatePosition.bind(this))}getConfigChanges(){var t;const i=this.config;(null===(t=i.groupedItems)||void 0===t?void 0:t.length)&&(i.visible=!1,i.groupedItems=i.groupedItems.map((t=>Object.assign(Object.assign({},t),{visible:!1}))));const e=i.type===_.MULTI_LIST&&Array.isArray(i.value)?i.value.map((t=>Object.assign(Object.assign({},t),{check:!1}))):void 0;return Object.assign(Object.assign({},i),{value:e})}async hideDetail(){this.detailIsVisible&&null!=this._floatingID&&m.close(this._floatingID)}onDetailCloseCallback(){this._floatingID=void 0,this.detailIsVisible=!1,this._closeCallback&&(this._closeCallback(),this._closeCallback=void 0)}clickListener(t){if([this._chipElement,this._leftIconElement,this._rightIconElement].includes(t.target)){if(t.target===this._rightIconElement&&this.canClearFilter()){const t=this.getConfigChanges();this.filterChange.emit(t)}else this.detailIsVisible?this.hideDetail():this.showUp(!0);t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation()}}mouseDownListener(t){this.detailIsVisible&&[this._chipElement,this._leftIconElement,this._rightIconElement].includes(t.target)&&(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation())}getLabel(t=!1){var i,e;const{type:s,value:r,label:l,props:n,groupedItems:a=[]}=this.config;if(r||a.length){if(s===_.BINARY_SELECT){const[i,e]=n.options,s=this.getMessage("snkFilterBar.binarySelectTooltip");if(i.name===r)return t?`${s} ${String(i.label).toLowerCase()}`:i.label;if(e.name===r)return t?`${s} ${String(e.label).toLowerCase()}`:e.label}if(s===_.MULTI_SELECT)return`${l}: ${n.options.find((t=>t.value===r)).label}`;if(s===_.PERIOD){let{end:i,start:e}=r;"string"==typeof i&&(i=new Date(i),i.setMinutes(i.getMinutes()+i.getTimezoneOffset())),"string"==typeof e&&(e=new Date(e),e.setMinutes(e.getMinutes()+e.getTimezoneOffset()));const s=new Intl.DateTimeFormat("pt-BR");if(i&&e){const s=e.getFullYear()===i.getFullYear(),r=Object.assign({day:"2-digit",month:"2-digit"},(!s||t)&&{year:"2-digit"}),n=f.formatDate(e,r),a=f.formatDate(i,r);return t?this.getMessage("snkFilterBar.fullPeriodTooltip",{LABEL:l,START_LABEL:n,END_LABEL:a}):`${l}: ${n} → ${a}`}return e?`${l}: ${this.getMessage("snkFilterBar.onlyStartToltip")} ${s.format(e)}`:i?`${l}: ${this.getMessage("snkFilterBar.onlyEndToltip")} ${s.format(i)}`:l}if(s===_.SEARCH)return`${l}: ${r.value} - ${r.label}`;if(s===_.PERSONALIZED){const t=this.calculateActiveCount(a);return t<=0?l:`${l}: ${this.getMessage("snkFilterBar.personalizedCount",{activeCount:t})}`}if(s===_.MULTI_LIST){const e=(null!==(i=r.elements)&&void 0!==i?i:r).filter((t=>null==t?void 0:t.check));return this.getLabelFromCheckedOptions(e,l,t)}if(s===_.CHECK_BOX_LIST){const i=Object.entries(null!=r?r:{}).filter((([t,i])=>!0===i)).map((([t,i])=>t)),s=(null!==(e=n.options)&&void 0!==e?e:[]).filter((t=>i.includes(t.name)));return this.getLabelFromCheckedOptions(s,l,t)}if(s===_.NUMBER&&n.variation===z.INTERVAL){const{start:t,end:i}=r;if(!isNaN(t)&&!isNaN(i))return this.getMessage("snkFilterBar.fullIntervalTooltip",{LABEL:l,START_LABEL:t,END_LABEL:i});if(!isNaN(t))return`${l}: ${this.getMessage("snkFilterBar.onlyStartToltip")} ${Number(t)}`;if(!isNaN(i))return`${l}: ${this.getMessage("snkFilterBar.onlyEndToltip")} ${Number(i)}`}return this.config.mask?`${l}: ${new p(this.config.mask).format(r)}`:`${l}: ${r}`}return l}getLabelFromCheckedOptions(t,i,e){const s=t.length;return 0===s?`${i}`:s>1?e?`${i}: ${t.map((t=>t.label)).join(",")}`:`${i}: ${s} ${this.getMessage("snkFilterBar.multiListToltip")}`:`${i}: ${t[0].label}`}calculateActiveCount(t){return t.reduce(((t,i)=>i.visible?t+1:t),0)}componentDidLoad(){this._filterItemElement&&(o.addIDInfo(this._filterItemElement),this._idSnkFilterDetail=`filterDetail_${this.config.id}`),this.controlScrollPage()}componentDidRender(){null==this._floatingID&&this._popover&&this._popover.remove()}filterChangeListener(){this.hideDetail()}canClearFilter(){const{value:t,groupedItems:i=[]}=this.config;return null!=t&&this.config.type===_.MULTI_LIST?t.some((t=>t.check)):void 0!==t||i.some((t=>t.visible))}getRightIconName(){return this.canClearFilter()?"close":this.detailIsVisible?"chevron-up":"chevron-down"}getLeftIconName(){switch(this.config.type){case _.PERIOD:return"calendar";case _.PERSONALIZED:return"tune"}}hasActiveElements(t){var i,e,s;return(null===(s=null===(e=null!==(i=null==t?void 0:t.elements)&&void 0!==i?i:t)||void 0===e?void 0:e.filter((t=>null==t?void 0:t.check)))||void 0===s?void 0:s.length)>0}hasActiveValue(t){return t.type!==_.MULTI_LIST&&void 0!==t.value||this.hasActiveElements(t.value)}getEnabledChip(){if(this.config.type===_.PERSONALIZED){const{groupedItems:t=[]}=this.config;return t.some((t=>t.visible))}return this.hasActiveValue(this.config)}render(){const t=this.getLeftIconName();return e(s,null,this.showChips&&e("ez-chip",{id:this.config.id,ref:t=>this._chipElement=t,label:this.getLabel(),value:this.getEnabledChip()},t&&e("ez-icon",{ref:t=>this._leftIconElement=t,iconName:t,class:"ez-padding-right--small",slot:"leftIcon"}),e("ez-icon",{ref:t=>this._rightIconElement=t,iconName:this.getRightIconName(),class:"ez-padding-left--small",slot:"rightIcon",id:"removeFilter"})),e("section",{class:"ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container",ref:t=>this._popoverContainer=t},e("snk-filter-detail",{config:this.config,getMessage:this.getMessage,class:"sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16",ref:t=>this._popover=t,key:this.config.id,"data-element-id":this._idSnkFilterDetail,showHardFixed:this.showChips})))}get _filterItemElement(){return r(this)}static get watchers(){return{detailIsVisible:["observeDetailIsVisible"]}}},T="__SHOWMORE__",A=class{constructor(e){t(this,e),this.snkItemSelected=i(this,"snkItemSelected",7),this._preselection=-1,this.innerClickCheck=(t,i)=>i.id!=m.MODAL_ELEMENT_ID||(this._detailIsVisible=!1,!1),this._filterArgument=void 0,this._showAll=void 0,this.label=void 0,this.iconName=void 0,this.items=void 0,this.getMessage=void 0,this.emptyText=void 0,this.findFilterText=void 0,this.buttonClass=void 0}showDetail(){this._preselection=-1,this._floatingID=m.float(this._popover,this._popoverContainer,{autoClose:!0,innerClickTest:this.innerClickCheck,backClickListener:()=>this.onListCloseCallback(),useOverlay:!0}),this._detailIsVisible=!0,this._showAll=!1,this._filterArgument="",this._filterInput.setFocus()}async hideDetail(){null!=this._floatingID&&m.close(this._floatingID)}onListCloseCallback(){this._floatingID=void 0,this._detailIsVisible=!1}buttonClick(){this._detailIsVisible?this.hideDetail():this.showDetail()}componentDidLoad(){this._element&&o.addIDInfo(this._element)}componentDidRender(){null==this._floatingID&&this._popover&&this._popover.remove()}buildIdElement(t,i){if(!t)return;const e={id:i};t.removeAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME),o.addIDInfoIfNotExists(t,"filterItemList",e)}buildItemElement(t){const i=++this._selectableItemsCount;return e("button",{ref:i=>i&&this.buildIdElement(i,t.label),id:`filter-item${i}`,onFocusin:()=>this._preselection=i,class:"ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item",onClick:()=>this.itemSelected(t.name),name:t.label,key:i},t.iconName?e("ez-icon",{iconName:t.iconName,size:"small",class:`ez-padding-right--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__icon ${t.iconClass||""}`}):void 0,e("div",{class:`ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__label ${t.labelClass||""}`},t.label))}itemSelected(t){t===T?this._showAll=!0:(this.hideDetail(),this.snkItemSelected.emit(t))}getFilterItems(){const t=this.items?v.applyStringFilter(this._filterArgument,this.items.filter((t=>"FILTER"===t.kind))):[];return 0===t.length?e("div",{class:"ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-items-container--empty"},this.emptyText):(!this._filterArgument&&!this._showAll&&t.length>6&&(t.splice(5),t.push({kind:"INTERNAL",label:"Mostrar mais",iconName:"dots-horizontal",name:T,iconClass:"snk-filter-bar__filter-list-item__icon--secondary",labelClass:"snk-filter-bar__filter-list-item__label--secondary"})),this._selectableItemsCount=0,e("div",{class:"sc-snk-filter-bar snk-filter-bar__filter-list-items-container"},t.map((t=>this.buildItemElement(t)))))}getFooterItems(){return this.items.filter((t=>"FOOTER"===t.kind))}keyDownHandler(t){switch(t.key){case"ArrowDown":this.changePreselection(this._preselection+1),t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault();break;case"ArrowUp":this.changePreselection(this._preselection-1),t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()}}changePreselection(t){if(t<0&&(t=this._selectableItemsCount),this._preselection=t>this._selectableItemsCount?0:t,0===this._preselection)this._filterInput.setFocus();else{const t=this._element.querySelector(`#filter-item${this._preselection}`);t&&t.focus()}}render(){return e(s,{class:"ez-flex ez-flex--column"},e("ez-button",{class:this.buttonClass,label:this.label,onClick:()=>this.buttonClick(),mode:this.iconName?"icon":void 0,iconName:this.iconName,size:"small"},e("slot",{name:"leftIcon"})),e("section",{class:"ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container",ref:t=>this._popoverContainer=t},e("div",{class:"sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--4",ref:t=>this._popover=t},e("ez-filter-input",{ref:t=>this._filterInput=t,"data-element-id":"serachFilters",mode:"slim",label:this.findFilterText,value:this._filterArgument,onEzChange:t=>this._filterArgument=t.detail,onFocus:()=>this._preselection=0}),this.getFilterItems(),e("hr",{class:"sc-snk-filter-bar snk-filter__popover-rule"}),this.items?this.getFooterItems().map((t=>this.buildItemElement(t))):void 0)))}get _element(){return r(this)}},P=class{constructor(i){t(this,i),this.getMessage=void 0,this.configName=void 0,this.filters=void 0,this.applyFilters=void 0,this.closeModal=void 0,this.addPersonalizedFilter=void 0,this.editPersonalizedFilter=void 0,this.deletePersonalizedFilter=void 0,this.filtersToDelete=[],this.disablePersonalizedFilter=void 0}deletePersonalizedFilterListener(t){this.filtersToDelete.push(t.detail)}getCustomMessage(t,i){var e;return null===(e=this.getMessage)||void 0===e?void 0:e.call(this,`snkFilterBar.filterModal.${t}`,i)}handleClearAll(){const{customFilters:t,quickFilters:i,otherFilters:e,multiListFilters:s}=this.filters.reduce(((t,i)=>i.type===_.MULTI_LIST?(t.multiListFilters.push(i),t):i.filterType===C.QUICK_FILTER?(t.quickFilters.push(i),t):i.filterType===C.CUSTOM_FILTER?(t.customFilters.push(i),t):i.filterType===C.OTHER_FILTERS?(t.otherFilters.push(i),t):t),{quickFilters:[],customFilters:[],otherFilters:[],multiListFilters:[]});this.handleClearFilterList(i),this.handleClearCustomFilters(t),this.handleClearOthersFilters(e),s.forEach((t=>this.handleClearSigleFilter(t)))}handleClearOthersFilters(t){this.filters=this.filters.map((i=>t.includes(i)?Object.assign(Object.assign({},i),{value:void 0}):i))}handleClearCustomFilters(t){this.filters.forEach(((i,e)=>{i.filterType===C.CUSTOM_FILTER&&(this.filters[e]=this.clearAllCustomFilter(t).shift())}))}clearAllCustomFilter(t){return t.map((t=>{const i=Object.assign({},t);return delete i.value,i.visible=!1,i.groupedItems&&(i.groupedItems=this.clearAllCustomFilter(i.groupedItems)),i}))}handleClose(){if(a.objectToString(this.filters)!==a.objectToString(this._originalFilterConfig))return x.confirm(this.getCustomMessage("validations.notSaved.title"),this.getCustomMessage("validations.notSaved.message")).then((t=>{t&&this.closeModal()}));this.closeModal()}handleApplyFilters(){const t=this.filters.find((t=>t.filterType===C.CUSTOM_FILTER));this.isValidCustomFilter(t)&&this.applyFilters(this.filters),this.filtersToDelete.length>0&&(this.filtersToDelete.forEach((t=>{this.deletePersonalizedFilter(t,this.configName)})),this.filtersToDelete=[])}isValidCustomFilter(t){return!!y.validateVariableValues(t)||(x.alert(this.getCustomMessage("validations.notFullFilled.title"),this.getCustomMessage("validations.notFullFilled.message")),!1)}modalActionListener(t){switch(t.detail){case w.CANCEL:this.handleClearAll();break;case w.OK:this.handleApplyFilters();break;case w.CLOSE:this.handleClose()}}handleFilterChange(t){this.filters=this.filters.map((i=>i.id===t.id?t:i))}handleClearFilterList(t){this.filters=this.filters.map((i=>t.includes(i)?Object.assign(Object.assign({},i),{value:void 0}):i))}handleClearSigleFilter(t){if(_.MULTI_LIST===t.type){let i=a.copy(t);this.uncheckFilterValues(i.value);const e=a.copy(this.filters),s=e.findIndex((i=>i.id===t.id));return e.splice(s,1,i),void(this.filters=a.copy(e))}if(_.CHECK_BOX_LIST===t.type){const i=a.copy(this.filters);return i.find((i=>i.id===t.id)).value=void 0,void(this.filters=a.copy(i))}this.filters.find((i=>i.id===t.id)).value=void 0,this.filters=a.copy(this.filters)}uncheckFilterValues(t){return t.forEach((t=>{t&&(t.check=!1)})),t}renderFilterItem(t,i){return e("snk-filter-modal-item",{class:i?"ez-col ez-col--sd-12":"ez-col ez-col--sd-6 ez-padding--small",filterItem:t,configName:this.configName,onFilterChange:t=>this.handleFilterChange(t.detail),onEditPersonalizedFilter:t=>this.editPersonalizedFilter(t.detail),onAddPersonalizedFilter:()=>this.addPersonalizedFilter()})}isDefaultFilterNumberVariation(t){var i;return t.type===_.NUMBER&&(!t.props.variation||(null===(i=t.props)||void 0===i?void 0:i.variation)===z.DEFAULT)}mountFiltersLines(t){let i=0,e=!1;const s={};for(let r=0;r<t.length;r++){s[i]=s[i]||[];const l=t[r],n=r===t.length-1,a=l.type===_.TEXT||this.isDefaultFilterNumberVariation(l),o=!n&&(t[r+1].type===_.TEXT||this.isDefaultFilterNumberVariation(t[r+1]));a&&o||e?(s[i].push(l),e=s[i].length<2,2===s[i].length&&++i):(s[i]=s[i]||[],s[i].push(l),++i)}return Object.values(s)}renderFilterLine(t){const i=1===t.length;return t.map((t=>this.renderFilterItem(t,i)))}getIformedFiltersCount(t){let i=0;return t.forEach((t=>{var e,s,r,l,n,a;_.MULTI_LIST!==t.type?_.CHECK_BOX_LIST!==t.type?null==t.groupedItems?t.value&&i++:i=t.groupedItems.filter((t=>t.visible)).length:i+=Object.entries(null!==(a=t.value)&&void 0!==a?a:{}).filter((([t,i])=>!0===i)).map((([t,i])=>t)).length:i+=null!==(n=null===(l=null===(r=null!==(s=null===(e=t.value)||void 0===e?void 0:e.elements)&&void 0!==s?s:t.value)||void 0===r?void 0:r.filter((t=>null==t?void 0:t.check)))||void 0===l?void 0:l.length)&&void 0!==n?n:0})),i}renderCollapsibleFilterBox(t,i,s,r=!0){if(!i.length)return null;const l=this.getIformedFiltersCount(i),n=this.mountFiltersLines(i);return e("ez-collapsible-box",{class:"snk-filter-modal__collapsible-box",headerSize:"medium",value:!0,label:t},!!l&&e("ez-badge",{class:"ez-badge--primary-subtle",slot:"rightSlot",label:null==l?void 0:l.toString()}),e("div",{class:"ez-row snk-filter-modal__rendered-items"},n.map(this.renderFilterLine.bind(this))),r&&e("div",{class:"ez-flex ez-flex--justify-end grow"},e("ez-button",{class:"ez-button--tertiary",size:"medium",label:"Limpar",onClick:()=>s?this.handleClearSigleFilter(i[0]):this.handleClearFilterList(i)})))}componentWillRender(){this._modalTitle=this.getCustomMessage("title"),this._okButtonLabel=this.getCustomMessage("okButtonLabel"),this._cancelButtonLabel=this.getCustomMessage("cancelButtonLabel")}componentDidLoad(){this._originalFilterConfig||(this._originalFilterConfig=this.filters)}render(){const t=this.filters.filter((t=>t.filterType===C.CUSTOM_FILTER)),i=this.filters.filter((t=>t.filterType===C.QUICK_FILTER)),s=this.filters.filter((t=>t.filterType===C.OTHER_FILTERS));return e("ez-modal-container",{class:"snk-filter-modal__container",modalTitle:this._modalTitle,cancelButtonLabel:this._cancelButtonLabel,okButtonLabel:this._okButtonLabel,onEzModalAction:this.modalActionListener.bind(this)},e("div",{class:"snk-filter-modal__content ez-col--sd-12"},!this.disablePersonalizedFilter&&this.renderCollapsibleFilterBox(this.getCustomMessage("customFilters"),t,!1,!1),this.renderCollapsibleFilterBox(this.getCustomMessage("quickFilters"),i,!1),s.map((t=>this.renderCollapsibleFilterBox(t.label,[t],!0)))))}};P.style="ez-modal{--ez-modal-content-padding:24px 12px}.snk-filter-modal__container{width:344px;max-width:344px;min-width:344px;overflow:hidden}.snk-filter-modal__content{display:flex;flex-direction:column;gap:var(--space--medium, 12px);padding-right:var(--space--3xs, 4px)}.snk-filter-modal__collapsible-box{border:var(--border--small, 1px solid) var(--color--strokes, #DCE0E8);border-radius:var(--border--radius-medium);padding:var(--space--medium, 12px) var(--space--small, 6px)}.snk-filter-modal__rendered-items{max-height:760px;overflow-x:hidden;overflow-y:auto}.snk-filter-modal__rendered-items::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";export{L as snk_filter_bar,N as snk_filter_item,A as snk_filter_list,P as snk_filter_modal}
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import { EventEmitter } from "../../../../stencil-public-runtime";
|
2
|
-
import { DataUnit, UserInterface } from '@sankhyalabs/core';
|
3
|
-
import { IFieldConfig } from "@sankhyalabs/ezui/dist/types/utils/form/interfaces";
|
4
|
-
import { SnkMessageBuilder } from "../../../../lib/message/SnkMessageBuilder";
|
5
|
-
export declare class SnkConfigOptions {
|
6
|
-
private _application;
|
7
|
-
private _fieldProperties;
|
8
|
-
_element: HTMLSnkConfigOptionsElement;
|
9
|
-
private _defaultType;
|
10
|
-
/**
|
11
|
-
* Armazena as propriedades do campo.
|
12
|
-
*/
|
13
|
-
fieldConfig: IFieldConfig;
|
14
|
-
/**
|
15
|
-
* Armazena a chave de opções de configuração.
|
16
|
-
*/
|
17
|
-
idConfig: string;
|
18
|
-
/**
|
19
|
-
* Repositório de dados responsável por controlar a manipulação dos dados.
|
20
|
-
*/
|
21
|
-
dataUnit: DataUnit;
|
22
|
-
/**
|
23
|
-
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
24
|
-
*/
|
25
|
-
messagesBuilder: SnkMessageBuilder;
|
26
|
-
/**
|
27
|
-
* Emitido ao realizar alguma alteração nos campos.
|
28
|
-
*/
|
29
|
-
configOptionsChanged: EventEmitter<any>;
|
30
|
-
private onConfigDefault;
|
31
|
-
private buildOptions;
|
32
|
-
private enabledValueDefault;
|
33
|
-
private isAllowDefault;
|
34
|
-
private loadDefaultValue;
|
35
|
-
private getFieldProperties;
|
36
|
-
private getMessage;
|
37
|
-
private getDefaultType;
|
38
|
-
private getEnabledByProperty;
|
39
|
-
private getValueByProperty;
|
40
|
-
private getValidatedValue;
|
41
|
-
private buildInputDefault;
|
42
|
-
private getConditionalAttributes;
|
43
|
-
private onChange;
|
44
|
-
private onSearch;
|
45
|
-
private buildField;
|
46
|
-
componentWillLoad(): void;
|
47
|
-
componentDidLoad(): void;
|
48
|
-
render(): any;
|
49
|
-
}
|
50
|
-
export interface IConfigFieldBuilder {
|
51
|
-
name: string;
|
52
|
-
label: string;
|
53
|
-
value: any;
|
54
|
-
enabled: boolean;
|
55
|
-
userInterface: UserInterface;
|
56
|
-
required?: boolean;
|
57
|
-
}
|
package/dist/types/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.d.ts
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
import { DataUnit } from "@sankhyalabs/core";
|
2
|
-
import { EventEmitter } from "../../../../stencil-public-runtime";
|
3
|
-
import { IFieldConfig } from "@sankhyalabs/ezui/dist/types/utils/form/interfaces";
|
4
|
-
import { SnkMessageBuilder } from "../../../../lib/message/SnkMessageBuilder";
|
5
|
-
export declare class SnkFieldConfig {
|
6
|
-
private _lang;
|
7
|
-
private _element;
|
8
|
-
/**
|
9
|
-
* Define se o popover de configuração está ativo.
|
10
|
-
*/
|
11
|
-
isConfigActive: Boolean;
|
12
|
-
/**
|
13
|
-
* Armazena as propriedades do campo.
|
14
|
-
*/
|
15
|
-
fieldConfig: IFieldConfig;
|
16
|
-
/**
|
17
|
-
* Define se o componente está em modo de inserção.
|
18
|
-
*/
|
19
|
-
modeInsertion: boolean;
|
20
|
-
/**
|
21
|
-
* Repositório de dados, controla a manipulação dos dados.
|
22
|
-
*/
|
23
|
-
dataUnit: DataUnit;
|
24
|
-
/**
|
25
|
-
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
26
|
-
*/
|
27
|
-
messagesBuilder: SnkMessageBuilder;
|
28
|
-
/**
|
29
|
-
* Emitido ao clicar no ícone do botão.
|
30
|
-
*/
|
31
|
-
ezClickIcon: EventEmitter<Object>;
|
32
|
-
handleAction(evt: MouseEvent, type: string): void;
|
33
|
-
/**
|
34
|
-
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
35
|
-
* através de um pequeno modulo na estrutura da aplicação:
|
36
|
-
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
37
|
-
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-form.msg.ts".
|
38
|
-
*/
|
39
|
-
private getMessage;
|
40
|
-
private isRequired;
|
41
|
-
componentDidLoad(): void;
|
42
|
-
render(): any;
|
43
|
-
}
|