@sankhyalabs/sankhyablocks 10.1.0-dev.6 → 10.1.0-dev.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +4 -1
- package/dist/cjs/{ConfigStorage-72f34bd4.js → ConfigStorage-156bfcac.js} +19 -2
- package/dist/cjs/ContinuousInsertUtils-1ae0c6ac.js +41 -0
- package/dist/cjs/{DataFetcher-991b0349.js → DataFetcher-d13b4637.js} +121 -69
- package/dist/cjs/{FormConfigHelper-e253a418.js → FormConfigHelper-28fe4668.js} +3 -1
- package/dist/cjs/FormConfigHelper-c5f5473a.js +342 -0
- package/dist/cjs/{ISave-ebf6b4ed.js → ISave-55d9dcc3.js} +1 -1
- package/dist/cjs/ImageUtils-d6139911.js +144 -0
- package/dist/cjs/{PersonalizedFilterUtils-7259cf65.js → PersonalizedFilterUtils-263e4d24.js} +65 -5
- package/dist/cjs/{SnkFormConfigManager-cdbb29d4.js → SnkFormConfigManager-5cb9a39c.js} +5 -5
- package/dist/cjs/{SnkMultiSelectionListDataSource-011bec79.js → SnkMultiSelectionListDataSource-5c5badfc.js} +146 -74
- package/dist/cjs/{auth-fetcher-c3cac878.js → auth-fetcher-d1715459.js} +1 -1
- package/dist/cjs/config-header.cjs.entry.js +1 -1
- package/dist/cjs/configs-button.cjs.entry.js +1 -1
- package/dist/cjs/css-shim-a27d231b.js +6 -0
- package/dist/cjs/{dataunit-fetcher-8bf469e7.js → dataunit-fetcher-fae710c5.js} +91 -110
- package/dist/cjs/dom-ff96a4bc.js +75 -0
- package/dist/cjs/field-config_2.cjs.entry.js +3 -3
- package/dist/cjs/fields-layout.cjs.entry.js +6 -6
- package/dist/cjs/fields-selector.cjs.entry.js +3 -3
- package/dist/cjs/{filter-type.enum-2bb46d2a.js → filter-type.enum-b3b388af.js} +7 -0
- package/dist/cjs/{form-config-fetcher-c7af90d8.js → form-config-fetcher-bbebdcb8.js} +41 -5
- package/dist/cjs/guides-configurator.cjs.entry.js +3 -3
- package/dist/cjs/{index-1cf293c1.js → index-1894343a.js} +1547 -207
- package/dist/cjs/{index-e3e39724.js → index-bc950921.js} +6 -0
- package/dist/cjs/{index-13d05f03.js → index-f0fe7e6e.js} +90 -21
- package/dist/cjs/loader.cjs.js +16 -2
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +6 -6
- package/dist/cjs/sankhyablocks.cjs.js +132 -4
- package/dist/cjs/shadow-css-7e3e0ab1.js +389 -0
- package/dist/cjs/snk-actions-button_9.cjs.entry.js +169 -120
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +28 -9
- package/dist/cjs/snk-attach_11.cjs.entry.js +2952 -0
- package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +3 -1
- package/dist/cjs/snk-crud.cjs.entry.js +149 -102
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
- package/dist/cjs/snk-custom-slot-guide.cjs.entry.js +40 -0
- package/dist/cjs/snk-data-exporter.cjs.entry.js +62 -16
- package/dist/cjs/{snk-data-unit-7d587ad5.js → snk-data-unit-32237a2d.js} +12 -3
- package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
- package/dist/cjs/snk-detail-view.cjs.entry.js +32 -20
- package/dist/cjs/snk-dynaform-config-header_5.cjs.entry.js +739 -0
- package/dist/cjs/snk-dynaform-detail-view_2.cjs.entry.js +961 -0
- package/dist/cjs/snk-dynaform-field-config_2.cjs.entry.js +327 -0
- package/dist/cjs/snk-dynaform-guides-view-2c7c6ce4.js +1094 -0
- package/dist/cjs/snk-dynaform-guides-view.cjs.entry.js +23 -0
- package/dist/cjs/snk-dynaform.cjs.entry.js +679 -0
- package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-entity-search.cjs.entry.js +211 -0
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +2 -2
- package/dist/cjs/{snk-expression-group_2.cjs.entry.js → snk-expression-group_4.cjs.entry.js} +422 -19
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +170 -120
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +11 -7
- package/dist/cjs/snk-filter-period.cjs.entry.js +14 -7
- package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-text.cjs.entry.js +2 -2
- package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +70 -8
- package/dist/cjs/snk-form_2.cjs.entry.js +21 -11
- package/dist/cjs/snk-grid.cjs.entry.js +91 -36
- package/dist/cjs/{snk-guides-viewer-366d5c32.js → snk-guides-viewer-67b9cca9.js} +78 -214
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +10 -18
- package/dist/cjs/snk-layout-form-config.cjs.entry.js +71 -0
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-pesquisa.cjs.entry.js +6 -7
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +184 -127
- package/dist/cjs/{sortable.esm-9a110bb7.js → sortable.esm-b87669ab.js} +76 -90
- package/dist/cjs/taskbar-elements-25f800b3.js +152 -0
- package/dist/cjs/taskbarUtils-99aaa01f.js +236 -0
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +26 -0
- package/dist/collection/components/snk-actions-button/actions/executor/launch-screen.executor.js +6 -3
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +30 -6
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +1 -0
- package/dist/collection/components/snk-application/snk-application.js +20 -2
- package/dist/collection/components/snk-attach/snk-attach.css +29 -7
- package/dist/collection/components/snk-attach/snk-attach.js +93 -18
- package/dist/collection/components/snk-configurator/snk-configurator.js +2 -0
- package/dist/collection/components/snk-crud/snk-crud.css +55 -0
- package/dist/collection/components/snk-crud/snk-crud.js +169 -98
- package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js +1 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css +4 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +21 -7
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.css +17 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.js +330 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +90 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +22 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +89 -204
- package/dist/collection/components/snk-crud/utils/taskbarUtils.js +163 -0
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.css +3 -0
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.js +95 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js +1 -1
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +2 -2
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +78 -23
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +28 -5
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +43 -2
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +9 -0
- package/dist/collection/components/snk-dynaform/interfaces/PropsCustomEditor.js +1 -0
- package/dist/collection/components/snk-dynaform/interfaces/PropsCustomRender.js +1 -0
- package/dist/collection/components/snk-dynaform/snk-dynaform.css +69 -0
- package/dist/collection/components/snk-dynaform/snk-dynaform.js +1661 -0
- package/dist/collection/components/snk-dynaform/subcomponents/CardFormResizeObserver.js +26 -0
- package/dist/collection/components/snk-dynaform/subcomponents/GuideBuilder.js +51 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.css +182 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.js +1015 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.css +98 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.js +590 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.css +321 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.js +1587 -0
- package/dist/collection/components/snk-dynaform-form-config/FormConfigHelper.js +325 -0
- package/dist/collection/components/snk-dynaform-form-config/SnkFormConfigManager.js +219 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.css +17 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.js +236 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.css +41 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.js +170 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.css +22 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.js +408 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-item.css +88 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-item.js +209 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.css +167 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.js +655 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.css +42 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.js +171 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-form-config.css +66 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-form-config.js +557 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.css +80 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.js +326 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +12 -8
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +14 -7
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css +5 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +28 -2
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +7 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +22 -8
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +166 -78
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +3 -1
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +3 -3
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +1 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +16 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +4 -4
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +3 -4
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +2 -2
- package/dist/collection/components/snk-form-config/snk-form-config.js +15 -5
- package/dist/collection/components/snk-grid/snk-grid.css +33 -5
- package/dist/collection/components/snk-grid/snk-grid.js +199 -24
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +153 -51
- package/dist/collection/components/snk-image-input/snk-image-input.css +3 -0
- package/dist/collection/components/snk-image-input/snk-image-input.js +338 -0
- package/dist/collection/components/snk-image-input/utils/ImageUtils.js +135 -0
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +1 -1
- package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +1 -1
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +13 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +0 -4
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +34 -22
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +8 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +38 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +54 -37
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js +27 -1
- package/dist/collection/components/snk-taskbar/processor/simple-taskbar-processor.js +55 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +44 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +248 -132
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.css +12 -0
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.js +19 -0
- package/dist/collection/lib/@types/index.js +6 -0
- package/dist/collection/lib/configs/ConfigStorage.js +5 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +51 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +24 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js +15 -104
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +22 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +12 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +18 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +11 -2
- package/dist/collection/lib/message/messageResourceEnUSUtils.js +2 -0
- package/dist/collection/lib/message/messageResourceEsESUtils.js +2 -0
- package/dist/collection/lib/message/messageResourcePtBRUtils.js +2 -0
- package/dist/collection/lib/message/resources/en-us/dataUnitDataLoaderHelper.msg.js +0 -13
- package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +13 -1
- package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +1 -0
- package/dist/collection/lib/message/resources/en-us/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js +10 -2
- package/dist/collection/lib/message/resources/es-es/dataUnitDataLoaderHelper.msg.js +0 -13
- package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +13 -1
- package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +1 -0
- package/dist/collection/lib/message/resources/es-es/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js +8 -0
- package/dist/collection/lib/message/resources/pt-br/dataUnitDataLoaderHelper.msg.js +0 -13
- package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js +1 -1
- package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +13 -1
- package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +1 -0
- package/dist/collection/lib/message/resources/pt-br/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js +10 -2
- package/dist/collection/lib/utils/CrudUtils.js +7 -4
- package/dist/components/ConfigStorage.js +17 -0
- package/dist/components/ContinuousInsertUtils.js +86 -28
- package/dist/components/DataFetcher.js +3 -2731
- package/dist/components/ISave.js +6 -0
- package/dist/components/PersonalizedFilterUtils.js +13 -0
- package/dist/components/SnkFormConfigManager.js +3 -3
- package/dist/components/SnkMessageBuilder.js +2804 -0
- package/dist/components/dataunit-fetcher.js +91 -110
- package/dist/components/field-config2.js +4 -2
- package/dist/components/fields-layout2.js +4 -4
- package/dist/components/form-config-fetcher.js +40 -4
- package/dist/components/guides-configurator2.js +2 -2
- package/dist/components/index.d.ts +16 -0
- package/dist/components/index.js +16 -0
- package/dist/components/index2.js +90 -21
- package/dist/components/snk-actions-button2.js +15 -9
- package/dist/components/snk-application2.js +22 -2
- package/dist/components/snk-attach2.js +69 -27
- package/dist/components/snk-configurator2.js +2 -0
- package/dist/components/snk-crud.js +240 -176
- package/dist/components/snk-custom-slot-guide.d.ts +11 -0
- package/dist/components/snk-custom-slot-guide.js +55 -0
- package/dist/components/snk-data-exporter2.js +56 -9
- package/dist/components/snk-data-unit2.js +10 -1
- package/dist/components/snk-detail-view2.js +227 -318
- package/dist/components/snk-dynaform-config-header.d.ts +11 -0
- package/dist/components/snk-dynaform-config-header.js +6 -0
- package/dist/components/snk-dynaform-config-header2.js +103 -0
- package/dist/components/snk-dynaform-configs-button.d.ts +11 -0
- package/dist/components/snk-dynaform-configs-button.js +6 -0
- package/dist/components/snk-dynaform-configs-button2.js +76 -0
- package/dist/components/snk-dynaform-detail-view.d.ts +11 -0
- package/dist/components/snk-dynaform-detail-view.js +6 -0
- package/dist/components/snk-dynaform-detail-view2.js +2213 -0
- package/dist/components/snk-dynaform-field-config.d.ts +11 -0
- package/dist/components/snk-dynaform-field-config.js +6 -0
- package/dist/components/snk-dynaform-field-config2.js +605 -0
- package/dist/components/snk-dynaform-field-item.d.ts +11 -0
- package/dist/components/snk-dynaform-field-item.js +6 -0
- package/dist/components/snk-dynaform-field-item2.js +96 -0
- package/dist/components/snk-dynaform-fields-layout.d.ts +11 -0
- package/dist/components/snk-dynaform-fields-layout.js +6 -0
- package/dist/components/snk-dynaform-fields-layout2.js +428 -0
- package/dist/components/snk-dynaform-fields-selector.d.ts +11 -0
- package/dist/components/snk-dynaform-fields-selector.js +6 -0
- package/dist/components/snk-dynaform-fields-selector2.js +104 -0
- package/dist/components/snk-dynaform-form-config.d.ts +11 -0
- package/dist/components/snk-dynaform-form-config.js +6 -0
- package/dist/components/snk-dynaform-form-config2.js +430 -0
- package/dist/components/snk-dynaform-form-view.d.ts +11 -0
- package/dist/components/snk-dynaform-form-view.js +6 -0
- package/dist/components/snk-dynaform-form-view2.js +272 -0
- package/dist/components/snk-dynaform-guides-configurator.d.ts +11 -0
- package/dist/components/snk-dynaform-guides-configurator.js +6 -0
- package/dist/components/snk-dynaform-guides-configurator2.js +173 -0
- package/dist/components/snk-dynaform-guides-view.d.ts +11 -0
- package/dist/components/snk-dynaform-guides-view.js +6 -0
- package/dist/components/snk-dynaform.d.ts +11 -0
- package/dist/components/snk-dynaform.js +1007 -0
- package/dist/components/snk-entity-search.d.ts +11 -0
- package/dist/components/snk-entity-search.js +6 -0
- package/dist/components/snk-entity-search2.js +231 -0
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-filter-bar2.js +116 -80
- package/dist/components/snk-filter-detail2.js +1 -1
- package/dist/components/snk-filter-item2.js +9 -3
- package/dist/components/snk-filter-modal2.js +22 -9
- package/dist/components/snk-filter-number.js +11 -7
- package/dist/components/snk-filter-period.js +13 -6
- package/dist/components/snk-filter-text.js +1 -1
- package/dist/components/snk-form-config2.js +15 -5
- package/dist/components/snk-form-view2.js +79 -10
- package/dist/components/snk-grid-config2.js +109 -50
- package/dist/components/snk-grid2.js +132 -65
- package/dist/components/snk-image-input.d.ts +11 -0
- package/dist/components/snk-image-input.js +6 -0
- package/dist/components/snk-image-input2.js +316 -0
- package/dist/components/snk-layout-form-config2.js +1 -1
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-pesquisa2.js +0 -1
- package/dist/components/snk-simple-crud2.js +46 -45
- package/dist/components/snk-taskbar-skeleton.d.ts +11 -0
- package/dist/components/snk-taskbar-skeleton.js +6 -0
- package/dist/components/snk-taskbar-skeleton2.js +29 -0
- package/dist/components/snk-taskbar2.js +256 -176
- package/dist/components/snk-view-representation2.js +1 -1
- package/dist/components/sortable.esm.js +76 -90
- package/dist/components/taskbar-actions-button2.js +21 -2
- package/dist/components/taskbar-split-button2.js +10 -1
- package/dist/components/taskbarUtils.js +229 -0
- package/dist/esm/{ConfigStorage-22324b6b.js → ConfigStorage-0d1c0695.js} +19 -2
- package/dist/esm/ContinuousInsertUtils-bce77dc1.js +39 -0
- package/dist/esm/{DataFetcher-450828a0.js → DataFetcher-70de9419.js} +121 -49
- package/dist/esm/{FormConfigHelper-e89ca25c.js → FormConfigHelper-d09669f3.js} +3 -1
- package/dist/esm/FormConfigHelper-efc29480.js +328 -0
- package/dist/esm/{ISave-61153166.js → ISave-f5704813.js} +1 -1
- package/dist/esm/ImageUtils-efbea0e4.js +138 -0
- package/dist/esm/{PersonalizedFilterUtils-2db38ff2.js → PersonalizedFilterUtils-45b5803c.js} +62 -2
- package/dist/esm/{SnkFormConfigManager-b5a92e12.js → SnkFormConfigManager-e7f05f79.js} +5 -5
- package/dist/esm/{SnkMultiSelectionListDataSource-d7ce2e54.js → SnkMultiSelectionListDataSource-6ac291a9.js} +141 -69
- package/dist/esm/{auth-fetcher-eef9d01e.js → auth-fetcher-e34880e5.js} +1 -1
- package/dist/esm/config-header.entry.js +1 -1
- package/dist/esm/configs-button.entry.js +1 -1
- package/dist/esm/css-shim-9f2d321e.js +4 -0
- package/dist/esm/{dataunit-fetcher-da9596f6.js → dataunit-fetcher-d26e4a08.js} +91 -110
- package/dist/esm/dom-64053c71.js +73 -0
- package/dist/esm/field-config_2.entry.js +3 -3
- package/dist/esm/fields-layout.entry.js +6 -6
- package/dist/esm/fields-selector.entry.js +3 -3
- package/dist/esm/{filter-type.enum-f6a8fe23.js → filter-type.enum-62b7fe88.js} +8 -1
- package/dist/esm/{form-config-fetcher-8d0a5e1c.js → form-config-fetcher-98c42169.js} +41 -5
- package/dist/esm/guides-configurator.entry.js +3 -3
- package/dist/esm/{index-479e1293.js → index-04f73a26.js} +1539 -207
- package/dist/esm/{index-b40568ff.js → index-c6721886.js} +6 -0
- package/dist/esm/{index-446f9341.js → index-ea250be6.js} +90 -21
- package/dist/esm/loader.js +17 -3
- package/dist/esm/pesquisa-grid_2.entry.js +6 -6
- package/dist/esm/sankhyablocks.js +133 -5
- package/dist/esm/shadow-css-98135883.js +387 -0
- package/dist/esm/snk-actions-button_9.entry.js +170 -121
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +28 -9
- package/dist/esm/snk-attach_11.entry.js +2938 -0
- package/dist/esm/snk-client-confirm.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +3 -1
- package/dist/esm/snk-crud.entry.js +149 -102
- package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
- package/dist/esm/snk-custom-slot-guide.entry.js +36 -0
- package/dist/esm/snk-data-exporter.entry.js +62 -16
- package/dist/esm/{snk-data-unit-99616a07.js → snk-data-unit-ff57ac90.js} +12 -3
- package/dist/esm/snk-data-unit.entry.js +4 -4
- package/dist/esm/snk-detail-view.entry.js +32 -20
- package/dist/esm/snk-dynaform-config-header_5.entry.js +731 -0
- package/dist/esm/snk-dynaform-detail-view_2.entry.js +956 -0
- package/dist/esm/snk-dynaform-field-config_2.entry.js +322 -0
- package/dist/esm/snk-dynaform-guides-view-0dfbefc1.js +1091 -0
- package/dist/esm/snk-dynaform-guides-view.entry.js +15 -0
- package/dist/esm/snk-dynaform.entry.js +675 -0
- package/dist/esm/snk-entity-list.entry.js +1 -1
- package/dist/esm/snk-entity-search.entry.js +207 -0
- package/dist/esm/snk-exporter-email-sender.entry.js +2 -2
- package/dist/esm/{snk-expression-group_2.entry.js → snk-expression-group_4.entry.js} +407 -6
- package/dist/esm/snk-filter-bar_4.entry.js +148 -98
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +11 -7
- package/dist/esm/snk-filter-period.entry.js +14 -7
- package/dist/esm/snk-filter-search.entry.js +1 -1
- package/dist/esm/snk-filter-text.entry.js +2 -2
- package/dist/esm/snk-form-summary.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +71 -9
- package/dist/esm/snk-form_2.entry.js +21 -11
- package/dist/esm/snk-grid.entry.js +89 -34
- package/dist/esm/{snk-guides-viewer-240de636.js → snk-guides-viewer-31a0a23d.js} +79 -215
- package/dist/esm/snk-guides-viewer.entry.js +10 -18
- package/dist/esm/snk-layout-form-config.entry.js +67 -0
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-pesquisa.entry.js +6 -7
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +185 -128
- package/dist/esm/{sortable.esm-842f85a3.js → sortable.esm-bc277c12.js} +76 -90
- package/dist/esm/taskbar-elements-ba9d6889.js +149 -0
- package/dist/esm/taskbarUtils-cb9db0d9.js +230 -0
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/{p-840fb68c.js → p-097d75b3.js} +2 -2
- package/dist/sankhyablocks/{p-7f7fe6c4.entry.js → p-0a160fb5.entry.js} +1 -1
- package/dist/sankhyablocks/p-0dbd53d9.js +1 -0
- package/dist/sankhyablocks/p-12579574.entry.js +1 -0
- package/dist/sankhyablocks/p-129a4906.entry.js +1 -0
- package/dist/sankhyablocks/{p-162bddae.entry.js → p-175c9576.entry.js} +1 -1
- package/dist/sankhyablocks/p-1d31aec3.entry.js +1 -0
- package/dist/sankhyablocks/p-24b059ee.entry.js +1 -0
- package/dist/sankhyablocks/{p-f5e942b7.entry.js → p-250b273e.entry.js} +1 -1
- package/dist/sankhyablocks/p-26f1919e.entry.js +1 -0
- package/dist/sankhyablocks/p-2a83f20e.entry.js +1 -0
- package/dist/sankhyablocks/p-2c4f7fdd.entry.js +1 -0
- package/dist/sankhyablocks/p-2c9d0870.js +2 -0
- package/dist/sankhyablocks/{p-cb4343c4.entry.js → p-2cc2526e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-75af335e.entry.js → p-2ebda226.entry.js} +1 -1
- package/dist/sankhyablocks/p-2ec98523.js +1 -0
- package/dist/sankhyablocks/p-3a35917e.entry.js +1 -0
- package/dist/sankhyablocks/p-449dfe55.entry.js +1 -0
- package/dist/sankhyablocks/p-46d7e2de.js +1 -0
- package/dist/sankhyablocks/p-4dd574d6.js +1 -0
- package/dist/sankhyablocks/p-541c72ec.entry.js +1 -0
- package/dist/sankhyablocks/p-58709cf9.js +1 -0
- package/dist/sankhyablocks/{p-27482793.entry.js → p-5aae5c74.entry.js} +1 -1
- package/dist/sankhyablocks/p-5aeae67f.js +1 -0
- package/dist/sankhyablocks/p-5d50f59a.entry.js +1 -0
- package/dist/sankhyablocks/p-5ef0e9a8.entry.js +1 -0
- package/dist/sankhyablocks/p-6f60df43.js +1 -0
- package/dist/sankhyablocks/{p-825098c1.entry.js → p-752c57f4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e258de96.entry.js → p-76729994.entry.js} +1 -1
- package/dist/sankhyablocks/{p-62e9b9b8.entry.js → p-846d8f79.entry.js} +1 -1
- package/dist/sankhyablocks/p-855ccf64.entry.js +1 -0
- package/dist/sankhyablocks/p-885262ce.entry.js +1 -0
- package/dist/sankhyablocks/{p-118c221e.js → p-8b4d6719.js} +1 -1
- package/dist/sankhyablocks/p-8d1ef77a.js +60 -0
- package/dist/sankhyablocks/{p-7d6f1285.js → p-8d81c8d3.js} +2 -2
- package/dist/sankhyablocks/{p-3d41f5a8.entry.js → p-8d946600.entry.js} +1 -1
- package/dist/sankhyablocks/p-8f5dd87d.entry.js +1 -0
- package/dist/sankhyablocks/p-90037547.js +1 -0
- package/dist/sankhyablocks/{p-96d45943.entry.js → p-90ae6c2e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0b9a42ad.entry.js → p-9742ea0e.entry.js} +1 -1
- package/dist/sankhyablocks/p-9e02a785.js +1 -0
- package/dist/sankhyablocks/{p-2fdac5e6.entry.js → p-9e109f5e.entry.js} +1 -1
- package/dist/sankhyablocks/p-9e7dc97d.entry.js +1 -0
- package/dist/sankhyablocks/p-a25ab2ff.entry.js +1 -0
- package/dist/sankhyablocks/p-a2a9f520.entry.js +1 -0
- package/dist/sankhyablocks/p-a46ac091.js +1 -0
- package/dist/sankhyablocks/p-a696bbcd.entry.js +1 -0
- package/dist/sankhyablocks/p-a73b6b00.js +1 -0
- package/dist/sankhyablocks/p-a9012341.entry.js +11 -0
- package/dist/sankhyablocks/p-abcb646d.js +1 -0
- package/dist/sankhyablocks/{p-180716b2.entry.js → p-ae326d06.entry.js} +1 -1
- package/dist/sankhyablocks/p-af673291.js +1 -0
- package/dist/sankhyablocks/p-b555ce38.entry.js +1 -0
- package/dist/sankhyablocks/p-bd2a845c.js +1 -0
- package/dist/sankhyablocks/p-bfce617e.entry.js +1 -0
- package/dist/sankhyablocks/p-c3ec6642.js +19 -0
- package/dist/sankhyablocks/p-c4b34e2b.entry.js +1 -0
- package/dist/sankhyablocks/{p-92cfc028.js → p-c9440c8a.js} +1 -1
- package/dist/sankhyablocks/p-ca3728c0.entry.js +1 -0
- package/dist/sankhyablocks/p-cbb8e351.js +7 -0
- package/dist/sankhyablocks/p-cd153f71.entry.js +1 -0
- package/dist/sankhyablocks/p-ce8ccd72.entry.js +1 -0
- package/dist/sankhyablocks/{p-4c763b10.entry.js → p-d657f71f.entry.js} +1 -1
- package/dist/sankhyablocks/p-da455c82.js +12 -0
- package/dist/sankhyablocks/p-e5a3711f.js +1 -0
- package/dist/sankhyablocks/{p-9a63f3f7.entry.js → p-e737fd5a.entry.js} +1 -1
- package/dist/sankhyablocks/p-eac48627.js +1 -0
- package/dist/sankhyablocks/p-ec7c87bb.js +28 -0
- package/dist/sankhyablocks/p-ee56dda6.entry.js +1 -0
- package/dist/sankhyablocks/{p-667cab42.entry.js → p-f152ef98.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7e250432.entry.js → p-f7170e10.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7345782c.entry.js → p-f921270b.entry.js} +1 -1
- package/dist/sankhyablocks/p-fb6e3c65.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +4 -0
- package/dist/types/components/snk-application/snk-application.d.ts +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +22 -4
- package/dist/types/components/snk-crud/snk-crud.d.ts +33 -11
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +3 -2
- package/dist/types/components/snk-crud/subcomponents/snk-entity-search.d.ts +62 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +12 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +13 -25
- package/dist/types/components/snk-crud/utils/taskbarUtils.d.ts +13 -0
- package/dist/types/components/snk-custom-slot-guide/snk-custom-slot-guide.d.ts +16 -0
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +8 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +4 -0
- package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +16 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +1 -0
- package/dist/types/components/snk-dynaform/interfaces/PropsCustomEditor.d.ts +4 -0
- package/dist/types/components/snk-dynaform/interfaces/PropsCustomRender.d.ts +4 -0
- package/dist/types/components/snk-dynaform/subcomponents/CardFormResizeObserver.d.ts +1 -0
- package/dist/types/components/snk-dynaform/subcomponents/GuideBuilder.d.ts +14 -0
- package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.d.ts +169 -0
- package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.d.ts +108 -0
- package/dist/types/components/snk-dynaform-form-config/FormConfigHelper.d.ts +36 -0
- package/dist/types/components/snk-dynaform-form-config/SnkFormConfigManager.d.ts +35 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.d.ts +23 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.d.ts +19 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.d.ts +56 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.d.ts +74 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.d.ts +21 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-form-config.d.ts +95 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.d.ts +35 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +5 -1
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +2 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +33 -16
- package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +1 -1
- package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +2 -2
- package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +1 -1
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +2 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +37 -1
- package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +11 -0
- package/dist/types/components/snk-image-input/snk-image-input.d.ts +57 -0
- package/dist/types/components/snk-image-input/utils/ImageUtils.d.ts +15 -0
- package/dist/types/components/snk-personalized-filter/interfaces/IParameter.d.ts +1 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +0 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -1
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +6 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +29 -2
- package/dist/types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.d.ts +5 -0
- package/dist/types/components/snk-taskbar/processor/simple-taskbar-processor.d.ts +31 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +32 -21
- package/dist/types/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.d.ts +3 -0
- package/dist/types/components.d.ts +2638 -1183
- package/dist/types/lib/@types/index.d.ts +6 -0
- package/dist/types/lib/configs/ConfigStorage.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.d.ts +3 -1
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/snk-image-input.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-image-input.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-image-input.msg.d.ts +1 -0
- package/package.json +11 -8
- package/react/components.d.ts +16 -0
- package/react/components.js +16 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/default-filters-a09bf82b.js +0 -8
- package/dist/cjs/index-62760a9c.js +0 -49
- package/dist/cjs/index-8d94b7e0.js +0 -7
- package/dist/cjs/snk-attach.cjs.entry.js +0 -910
- package/dist/cjs/snk-default-filter.cjs.entry.js +0 -77
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +0 -61
- package/dist/cjs/snk-filter-detail.cjs.entry.js +0 -198
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +0 -408
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +0 -108
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +0 -357
- package/dist/cjs/snk-simple-bar.cjs.entry.js +0 -45
- package/dist/cjs/snk-simple-crud.cjs.entry.js +0 -870
- package/dist/cjs/taskbar-elements-fb5d1e08.js +0 -132
- package/dist/cjs/taskbar-processor-2fba34a8.js +0 -53
- package/dist/esm/default-filters-50105e43.js +0 -8
- package/dist/esm/index-620ac460.js +0 -7
- package/dist/esm/index-8acbae97.js +0 -49
- package/dist/esm/snk-attach.entry.js +0 -906
- package/dist/esm/snk-default-filter.entry.js +0 -73
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +0 -56
- package/dist/esm/snk-filter-detail.entry.js +0 -194
- package/dist/esm/snk-filter-field-search_2.entry.js +0 -403
- package/dist/esm/snk-filter-modal-item.entry.js +0 -104
- package/dist/esm/snk-personalized-filter.entry.js +0 -353
- package/dist/esm/snk-simple-bar.entry.js +0 -41
- package/dist/esm/snk-simple-crud.entry.js +0 -866
- package/dist/esm/taskbar-elements-faaf5d8f.js +0 -129
- package/dist/esm/taskbar-processor-3436124c.js +0 -51
- package/dist/sankhyablocks/p-002d4d2b.js +0 -1
- package/dist/sankhyablocks/p-093f58fa.entry.js +0 -1
- package/dist/sankhyablocks/p-0948dc0a.entry.js +0 -11
- package/dist/sankhyablocks/p-0f3698af.js +0 -1
- package/dist/sankhyablocks/p-1a0caadb.js +0 -1
- package/dist/sankhyablocks/p-1a9c5684.entry.js +0 -1
- package/dist/sankhyablocks/p-1d589380.entry.js +0 -1
- package/dist/sankhyablocks/p-21107f0d.entry.js +0 -1
- package/dist/sankhyablocks/p-28f50632.js +0 -1
- package/dist/sankhyablocks/p-39be771c.js +0 -1
- package/dist/sankhyablocks/p-3ed04f0d.entry.js +0 -1
- package/dist/sankhyablocks/p-471b34f4.entry.js +0 -1
- package/dist/sankhyablocks/p-4963dd2a.entry.js +0 -1
- package/dist/sankhyablocks/p-49ddc27a.entry.js +0 -1
- package/dist/sankhyablocks/p-51833248.js +0 -7
- package/dist/sankhyablocks/p-55798617.js +0 -1
- package/dist/sankhyablocks/p-55f6fef2.entry.js +0 -1
- package/dist/sankhyablocks/p-56f16390.entry.js +0 -1
- package/dist/sankhyablocks/p-58683e28.js +0 -60
- package/dist/sankhyablocks/p-5ea893c5.entry.js +0 -1
- package/dist/sankhyablocks/p-60dd1d27.entry.js +0 -1
- package/dist/sankhyablocks/p-62aef37a.js +0 -1
- package/dist/sankhyablocks/p-669bb869.entry.js +0 -1
- package/dist/sankhyablocks/p-6a4b21dd.js +0 -1
- package/dist/sankhyablocks/p-6ee2ca7a.entry.js +0 -1
- package/dist/sankhyablocks/p-7cac3870.entry.js +0 -1
- package/dist/sankhyablocks/p-84345e7a.js +0 -1
- package/dist/sankhyablocks/p-86e54841.entry.js +0 -1
- package/dist/sankhyablocks/p-88b337fe.entry.js +0 -1
- package/dist/sankhyablocks/p-91005a00.entry.js +0 -1
- package/dist/sankhyablocks/p-91a9abb6.entry.js +0 -1
- package/dist/sankhyablocks/p-988afe78.js +0 -1
- package/dist/sankhyablocks/p-ada013c0.entry.js +0 -1
- package/dist/sankhyablocks/p-b568c1d4.js +0 -1
- package/dist/sankhyablocks/p-b7e891cc.entry.js +0 -1
- package/dist/sankhyablocks/p-b987e15d.js +0 -1
- package/dist/sankhyablocks/p-c35fc941.js +0 -26
- package/dist/sankhyablocks/p-c3dbf441.entry.js +0 -1
- package/dist/sankhyablocks/p-c4fcf1fb.entry.js +0 -1
- package/dist/sankhyablocks/p-c98c79c3.entry.js +0 -1
- package/dist/sankhyablocks/p-cadf4846.entry.js +0 -1
- package/dist/sankhyablocks/p-d8d8169b.js +0 -2
- package/dist/sankhyablocks/p-e91c3c57.entry.js +0 -1
- package/dist/sankhyablocks/p-ea729922.entry.js +0 -1
- package/dist/sankhyablocks/p-ec5fbad8.js +0 -1
- package/dist/sankhyablocks/p-f4184ce7.js +0 -1
|
@@ -1,910 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-1cf293c1.js');
|
|
6
|
-
const core = require('@sankhyalabs/core');
|
|
7
|
-
const DataFetcher = require('./DataFetcher-991b0349.js');
|
|
8
|
-
const ISave = require('./ISave-ebf6b4ed.js');
|
|
9
|
-
require('./index-e3e39724.js');
|
|
10
|
-
const dataunitFetcher = require('./dataunit-fetcher-8bf469e7.js');
|
|
11
|
-
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
12
|
-
require('./form-config-fetcher-c7af90d8.js');
|
|
13
|
-
const constants = require('./constants-6d82e405.js');
|
|
14
|
-
const authFetcher = require('./auth-fetcher-c3cac878.js');
|
|
15
|
-
const taskbarElements = require('./taskbar-elements-fb5d1e08.js');
|
|
16
|
-
require('./PrintUtils-bcaeb82f.js');
|
|
17
|
-
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
18
|
-
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
19
|
-
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
20
|
-
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
21
|
-
require('./ResourceIDUtils-5ff86aa7.js');
|
|
22
|
-
require('./index-13d05f03.js');
|
|
23
|
-
|
|
24
|
-
const SERVICE$1 = {
|
|
25
|
-
save: "Attach.save",
|
|
26
|
-
delete: "Attach.remove",
|
|
27
|
-
view: "Attach.view",
|
|
28
|
-
repository: "RepositorioArquivoSP.abreArquivo"
|
|
29
|
-
};
|
|
30
|
-
class AttachFetcher {
|
|
31
|
-
constructor(dataUnitName) {
|
|
32
|
-
this.dataUnitName = dataUnitName;
|
|
33
|
-
}
|
|
34
|
-
async save({ dataUnit: dataUnitName, record, updatingFields: fields, operation }) {
|
|
35
|
-
var _a, _b;
|
|
36
|
-
const isInsert = operation == "INSERT";
|
|
37
|
-
const dataBody = isInsert ? fields : record;
|
|
38
|
-
if (!isInsert && (fields === null || fields === void 0 ? void 0 : fields.DESCRICAO) && (fields === null || fields === void 0 ? void 0 : fields.DESCRICAO) !== (record === null || record === void 0 ? void 0 : record.DESCRICAO)) {
|
|
39
|
-
throw new Error(ISave.SaveErrorsEnum.DESCRIPTION_CANNOT_BE_CHANGED);
|
|
40
|
-
}
|
|
41
|
-
const reqBody = {
|
|
42
|
-
"anexo": {
|
|
43
|
-
"codata": isInsert ? fields === null || fields === void 0 ? void 0 : fields.REGISTER_KEY : record === null || record === void 0 ? void 0 : record.CODATA,
|
|
44
|
-
"sequencia": (dataBody === null || dataBody === void 0 ? void 0 : dataBody.SEQUENCIA) || "0",
|
|
45
|
-
"tipo": (dataBody === null || dataBody === void 0 ? void 0 : dataBody.TIPO) || "N",
|
|
46
|
-
"descricao": dataBody === null || dataBody === void 0 ? void 0 : dataBody.DESCRICAO,
|
|
47
|
-
"arquivo": (_b = (_a = fields.CAMINHO_ARQUIVO) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.name,
|
|
48
|
-
"ehInclusao": isInsert ? "S" : "N",
|
|
49
|
-
"ehArquivoRepositorio": "N"
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
return new Promise((resolve, reject) => {
|
|
53
|
-
DataFetcher.DataFetcher.get().callServiceBroker(SERVICE$1.save, JSON.stringify(reqBody))
|
|
54
|
-
.then(result => {
|
|
55
|
-
var _a;
|
|
56
|
-
return resolve([Object.assign(Object.assign(Object.assign({}, result), fields), { __owner__dataunit__name__: (_a = this.dataUnitName) !== null && _a !== void 0 ? _a : dataUnitName })]);
|
|
57
|
-
})
|
|
58
|
-
.catch(error => reject(error));
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
async edit(change) {
|
|
62
|
-
throw new Error("Method not implemented.");
|
|
63
|
-
}
|
|
64
|
-
async delete(record) {
|
|
65
|
-
var request = {
|
|
66
|
-
anexo: {
|
|
67
|
-
codata: record.CODATA,
|
|
68
|
-
tipo: record.TIPO,
|
|
69
|
-
descricao: record.DESCRICAO,
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
const result = await DataFetcher.DataFetcher.get().callServiceBroker(SERVICE$1.delete, JSON.stringify(request));
|
|
73
|
-
return Promise.resolve(result);
|
|
74
|
-
}
|
|
75
|
-
async getDownloadKey(record) {
|
|
76
|
-
var _a, _b, _c;
|
|
77
|
-
if (record.EHARQUIVOREPOSITORIO == 'S') {
|
|
78
|
-
const request = {
|
|
79
|
-
config: {
|
|
80
|
-
path: record.ARQUIVO,
|
|
81
|
-
tipoconteudo: record.TIPOCONTEUDO
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
const result = await DataFetcher.DataFetcher.get().callServiceBroker(SERVICE$1.repository, JSON.stringify(request));
|
|
85
|
-
return Promise.resolve({
|
|
86
|
-
chave: {
|
|
87
|
-
valor: (_b = (_a = result === null || result === void 0 ? void 0 : result.responseBody) === null || _a === void 0 ? void 0 : _a.chave) === null || _b === void 0 ? void 0 : _b.valor
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
const criteria = {
|
|
92
|
-
anexo: {
|
|
93
|
-
codata: record.CODATA,
|
|
94
|
-
codemp: record.CODEMP,
|
|
95
|
-
sequencia: record.SEQUENCIA,
|
|
96
|
-
tipo: record.TIPO,
|
|
97
|
-
descricao: record.DESCRICAO,
|
|
98
|
-
tipoConteudo: record.TIPOCONTEUDO
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
const result = await DataFetcher.DataFetcher.get().callServiceBroker(SERVICE$1.view, JSON.stringify(criteria));
|
|
102
|
-
if (result === null || result === void 0 ? void 0 : result.chaveAnexo) {
|
|
103
|
-
return Promise.resolve({
|
|
104
|
-
chave: {
|
|
105
|
-
valor: (_c = result === null || result === void 0 ? void 0 : result.chaveAnexo) === null || _c === void 0 ? void 0 : _c.idChaveAnexo
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
return Promise.reject(new Error("File not found."));
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const SERVICE = {
|
|
114
|
-
save: "AnexoSistemaSP.salvar",
|
|
115
|
-
delete: "AnexoSistemaSP.excluir",
|
|
116
|
-
download: "AnexoSistemaSP.baixar",
|
|
117
|
-
};
|
|
118
|
-
class AnexoSistemaFetcher {
|
|
119
|
-
constructor(entityName, dataUnitName) {
|
|
120
|
-
var _a;
|
|
121
|
-
this.entityName = entityName;
|
|
122
|
-
this.dataUnitName = dataUnitName;
|
|
123
|
-
this.validateFields = (fields) => {
|
|
124
|
-
if (!!fields.LINK && !!fields.NOMEARQUIVO)
|
|
125
|
-
throw new Error(ISave.SaveErrorsEnum.LINK_AND_FILE_AT_THE_SAME_TIME);
|
|
126
|
-
if (!fields.LINK && !fields.NOMEARQUIVO)
|
|
127
|
-
throw new Error(ISave.SaveErrorsEnum.ANY_LINK_OR_FILE_FILLED);
|
|
128
|
-
if (!this._registerKey)
|
|
129
|
-
throw new Error('Register key can not be null');
|
|
130
|
-
};
|
|
131
|
-
this.resourceID = (window["resourceID"] || ((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID));
|
|
132
|
-
}
|
|
133
|
-
set registerKey(registerKey) {
|
|
134
|
-
this._registerKey = registerKey;
|
|
135
|
-
}
|
|
136
|
-
async save(change) {
|
|
137
|
-
var _a, _b;
|
|
138
|
-
let { updatingFields: fields } = change;
|
|
139
|
-
fields = Object.assign(Object.assign({}, fields), { NOMEARQUIVO: (_a = fields.NOMEARQUIVO) === null || _a === void 0 ? void 0 : _a[0] });
|
|
140
|
-
try {
|
|
141
|
-
this.validateFields(fields);
|
|
142
|
-
const fileInfo = !fields.LINK ? fields.NOMEARQUIVO : null;
|
|
143
|
-
const reqBody = {
|
|
144
|
-
serviceName: SERVICE.save,
|
|
145
|
-
requestBody: {
|
|
146
|
-
params: {
|
|
147
|
-
resourceID: this.resourceID,
|
|
148
|
-
description: fields.DESCRICAO,
|
|
149
|
-
fileSelect: fileInfo ? 1 : 0,
|
|
150
|
-
keySession: (_b = fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.properties) === null || _b === void 0 ? void 0 : _b.fileNameTmp,
|
|
151
|
-
nameAttach: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name,
|
|
152
|
-
link: fields.LINK,
|
|
153
|
-
nameEntity: this.entityName,
|
|
154
|
-
pkEntity: this._registerKey,
|
|
155
|
-
typeAcess: fields.TIPOACESSO,
|
|
156
|
-
typeApres: fields.TIPOAPRES,
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
const result = await DataFetcher.DataFetcher.get().callServiceBroker(SERVICE.save, JSON.stringify(reqBody));
|
|
161
|
-
return Promise.resolve([Object.assign(Object.assign(Object.assign({}, result), fields), { ARQUIVOOULINK: !!fields.LINK ? fields.LINK : fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name, __owner__dataunit__name__: this.dataUnitName })]);
|
|
162
|
-
}
|
|
163
|
-
catch (error) {
|
|
164
|
-
return Promise.reject(error);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
async edit(change) {
|
|
168
|
-
var _a, _b, _c;
|
|
169
|
-
let { updatingFields: fields, record } = change;
|
|
170
|
-
const getFieldValue = (fieldValue) => {
|
|
171
|
-
if (fields[fieldValue] !== undefined)
|
|
172
|
-
return fields[fieldValue];
|
|
173
|
-
return record[fieldValue];
|
|
174
|
-
};
|
|
175
|
-
const attachField = getFieldValue('NOMEARQUIVO');
|
|
176
|
-
const hasNewAttachment = (_b = (_a = fields.NOMEARQUIVO) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.downloadURL;
|
|
177
|
-
fields = Object.assign(Object.assign({}, fields), { DESCRICAO: getFieldValue('DESCRICAO'), LINK: getFieldValue('LINK'), TIPOACESSO: getFieldValue('TIPOACESSO'), TIPOAPRES: getFieldValue('TIPOAPRES'), CHAVEARQUIVO: record.CHAVEARQUIVO, NOMEARQUIVO: attachField === null || attachField === void 0 ? void 0 : attachField[0] });
|
|
178
|
-
const fileInfo = !fields.LINK ? fields.NOMEARQUIVO : null;
|
|
179
|
-
try {
|
|
180
|
-
this.validateFields(fields);
|
|
181
|
-
const reqBody = {
|
|
182
|
-
serviceName: SERVICE.save,
|
|
183
|
-
requestBody: {
|
|
184
|
-
params: {
|
|
185
|
-
resourceID: this.resourceID,
|
|
186
|
-
nuAttach: record === null || record === void 0 ? void 0 : record.NUATTACH,
|
|
187
|
-
description: fields.DESCRICAO,
|
|
188
|
-
fileSelect: hasNewAttachment ? 1 : 0,
|
|
189
|
-
keySession: (_c = fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.properties) === null || _c === void 0 ? void 0 : _c.fileNameTmp,
|
|
190
|
-
keyAttach: fields.CHAVEARQUIVO,
|
|
191
|
-
nameAttach: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name,
|
|
192
|
-
link: fields.LINK,
|
|
193
|
-
nameEntity: this.entityName,
|
|
194
|
-
pkEntity: this._registerKey,
|
|
195
|
-
typeAcess: fields.TIPOACESSO,
|
|
196
|
-
typeApres: fields.TIPOAPRES,
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
const result = await DataFetcher.DataFetcher.get().callServiceBroker(SERVICE.save, JSON.stringify(reqBody));
|
|
201
|
-
return Promise.resolve([Object.assign(Object.assign(Object.assign({}, result), fields), { ARQUIVOOULINK: !!fields.LINK ? fields.LINK : fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name, __owner__dataunit__name__: this.dataUnitName })]);
|
|
202
|
-
}
|
|
203
|
-
catch (error) {
|
|
204
|
-
return Promise.reject(error);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
delete(record) {
|
|
208
|
-
var _a;
|
|
209
|
-
const attachField = ((_a = record.NOMEARQUIVO) === null || _a === void 0 ? void 0 : _a[0]) || {};
|
|
210
|
-
const reqBody = {
|
|
211
|
-
serviceName: SERVICE.delete,
|
|
212
|
-
requestBody: {
|
|
213
|
-
paramsDelete: {
|
|
214
|
-
keyAttach: record.CHAVEARQUIVO,
|
|
215
|
-
nameAttach: attachField === null || attachField === void 0 ? void 0 : attachField.name,
|
|
216
|
-
nameEntity: record.NOMEINSTANCIA,
|
|
217
|
-
nuAttach: record.NUATTACH,
|
|
218
|
-
pkEntity: record.PKREGISTRO
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
return new Promise((resolve, reject) => {
|
|
223
|
-
DataFetcher.DataFetcher.get().callServiceBroker(SERVICE.delete, JSON.stringify(reqBody))
|
|
224
|
-
.then(result => resolve(result))
|
|
225
|
-
.catch(error => reject(error));
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
getDownloadKey(record) {
|
|
229
|
-
var _a;
|
|
230
|
-
const attachField = ((_a = record.NOMEARQUIVO) === null || _a === void 0 ? void 0 : _a[0]) || {};
|
|
231
|
-
const reqBody = {
|
|
232
|
-
serviceName: SERVICE.download,
|
|
233
|
-
requestBody: {
|
|
234
|
-
paramsDown: {
|
|
235
|
-
nameAttach: attachField === null || attachField === void 0 ? void 0 : attachField.name,
|
|
236
|
-
nameEntity: record.NOMEINSTANCIA,
|
|
237
|
-
nuAttach: record.NUATTACH,
|
|
238
|
-
pkEntity: record.PKREGISTRO,
|
|
239
|
-
keyAttach: record.CHAVEARQUIVO,
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
return new Promise((resolve, reject) => {
|
|
244
|
-
DataFetcher.DataFetcher.get().callServiceBroker(SERVICE.download, JSON.stringify(reqBody))
|
|
245
|
-
.then(result => resolve(result))
|
|
246
|
-
.catch(error => reject(error));
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
class AnexoSistemaDataUnitFactory {
|
|
252
|
-
constructor(entityName, getMessage) {
|
|
253
|
-
this.entityName = entityName;
|
|
254
|
-
this.getMessage = getMessage;
|
|
255
|
-
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
256
|
-
}
|
|
257
|
-
initLoaders(dataUnit, fetcher, onSuccess) {
|
|
258
|
-
if (!this.loader)
|
|
259
|
-
this.loader = dataUnit.dataLoader;
|
|
260
|
-
dataUnit.dataLoader = (dataUnit, request) => this.dataLoader(dataUnit, request);
|
|
261
|
-
dataUnit.saveLoader = (_, changes) => this.saveLoader(changes, fetcher).then((recordIds) => {
|
|
262
|
-
if (recordIds.length)
|
|
263
|
-
onSuccess();
|
|
264
|
-
return recordIds;
|
|
265
|
-
});
|
|
266
|
-
dataUnit.removeLoader = (dataUnit, ids) => this.removeLoader(dataUnit, ids, fetcher).then((recordIds) => {
|
|
267
|
-
if (recordIds.length)
|
|
268
|
-
onSuccess();
|
|
269
|
-
return recordIds;
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
metadataLoader(dataUnit) {
|
|
273
|
-
throw new Error("Method not implemented.");
|
|
274
|
-
}
|
|
275
|
-
dataLoader(dataUnit, request) {
|
|
276
|
-
return new Promise(resolve => {
|
|
277
|
-
this.loader(dataUnit, request).then(response => {
|
|
278
|
-
const records = ((response === null || response === void 0 ? void 0 : response.records) || []).map(record => {
|
|
279
|
-
let fileInfo;
|
|
280
|
-
if (!record.LINK)
|
|
281
|
-
fileInfo = [{
|
|
282
|
-
name: record.NOMEARQUIVO,
|
|
283
|
-
}];
|
|
284
|
-
return Object.assign(Object.assign({}, record), { ARQUIVOOULINK: !!record.LINK ? record.LINK : record.NOMEARQUIVO, NOMEARQUIVO: fileInfo });
|
|
285
|
-
});
|
|
286
|
-
resolve(Object.assign(Object.assign({}, response), { records }));
|
|
287
|
-
});
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
saveLoader(changes, fetcher) {
|
|
291
|
-
return new Promise((resolve) => {
|
|
292
|
-
var _a;
|
|
293
|
-
const change = Array.isArray(changes) ? changes[0] : {};
|
|
294
|
-
const savePromise = ((_a = change === null || change === void 0 ? void 0 : change.record) === null || _a === void 0 ? void 0 : _a.NUATTACH) >= 0 ? fetcher.edit.bind(fetcher) : fetcher.save.bind(fetcher);
|
|
295
|
-
savePromise(change).then((records) => {
|
|
296
|
-
resolve(records);
|
|
297
|
-
}).catch((error) => {
|
|
298
|
-
if (error.message === ISave.SaveErrorsEnum.LINK_AND_FILE_AT_THE_SAME_TIME) {
|
|
299
|
-
this._application.alert(this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.title'), this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.message'));
|
|
300
|
-
return resolve([]);
|
|
301
|
-
}
|
|
302
|
-
if (error.message === ISave.SaveErrorsEnum.ANY_LINK_OR_FILE_FILLED) {
|
|
303
|
-
this._application.alert(this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.title'), this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.message'));
|
|
304
|
-
return resolve([]);
|
|
305
|
-
}
|
|
306
|
-
if (error.message) {
|
|
307
|
-
this._application.error((error.title || error.name), error.message);
|
|
308
|
-
return resolve([]);
|
|
309
|
-
}
|
|
310
|
-
resolve([]);
|
|
311
|
-
});
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
removeLoader(dataUnit, ids, fetcher) {
|
|
315
|
-
return new Promise((resolve) => {
|
|
316
|
-
const { records } = dataUnit.getSelectionInfo();
|
|
317
|
-
const recordToDelete = records[0];
|
|
318
|
-
fetcher.delete(recordToDelete).then(() => {
|
|
319
|
-
dataunitFetcher.PreloadManager.removeRecords(dataUnit, [recordToDelete]);
|
|
320
|
-
return resolve(ids);
|
|
321
|
-
});
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
getFilters(registerKey) {
|
|
325
|
-
return [
|
|
326
|
-
{
|
|
327
|
-
name: 'AttachmentsByPK',
|
|
328
|
-
expression: 'this.PKREGISTRO = :PKREGISTRO',
|
|
329
|
-
params: [{
|
|
330
|
-
name: "PKREGISTRO",
|
|
331
|
-
dataType: core.DataType.TEXT,
|
|
332
|
-
value: `${registerKey}_${this.entityName}`
|
|
333
|
-
}]
|
|
334
|
-
}
|
|
335
|
-
];
|
|
336
|
-
}
|
|
337
|
-
getInterceptions(dataUnit, action, crudRef) {
|
|
338
|
-
return new Promise((resolve) => {
|
|
339
|
-
if (action.type === core.Action.EDITION_CANCELED) {
|
|
340
|
-
if (!dataUnit.isDirty())
|
|
341
|
-
return resolve(action);
|
|
342
|
-
return this._application.confirm(this.getMessage('snkAttach.cancelConfirmation.title'), this.getMessage('snkAttach.cancelConfirmation.message')).then((cancellationConfirmed) => {
|
|
343
|
-
if (cancellationConfirmed) {
|
|
344
|
-
crudRef.goToView(constants.VIEW_MODE.GRID);
|
|
345
|
-
return resolve(action);
|
|
346
|
-
}
|
|
347
|
-
return resolve(undefined);
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
if (action.type === core.Action.DATA_SAVED) {
|
|
351
|
-
dataUnit.loadData();
|
|
352
|
-
return resolve(action);
|
|
353
|
-
}
|
|
354
|
-
resolve(action);
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
let messageBuilderInstance;
|
|
360
|
-
const getMessage$1 = (key) => {
|
|
361
|
-
if (!messageBuilderInstance) {
|
|
362
|
-
messageBuilderInstance = new DataFetcher.SnkMessageBuilder();
|
|
363
|
-
}
|
|
364
|
-
return messageBuilderInstance.getMessage(key);
|
|
365
|
-
};
|
|
366
|
-
const attachCrudConfig = {
|
|
367
|
-
grid: {
|
|
368
|
-
columns: [
|
|
369
|
-
{ name: "CODATA", orderIndex: 0, width: 0 },
|
|
370
|
-
{ name: "DESCRICAO", orderIndex: 1, width: 0 },
|
|
371
|
-
{ name: "ARQUIVO", orderIndex: 2, width: 0 },
|
|
372
|
-
{ name: "DTALTER", orderIndex: 3, width: 0 },
|
|
373
|
-
{ name: "USUARIO", orderIndex: 4, width: 0 },
|
|
374
|
-
],
|
|
375
|
-
},
|
|
376
|
-
form: {
|
|
377
|
-
emptyConfig: false,
|
|
378
|
-
fields: [
|
|
379
|
-
{
|
|
380
|
-
name: "DESCRICAO",
|
|
381
|
-
label: getMessage$1("snkAttach.attachMetadata.lblDescription"),
|
|
382
|
-
visible: true,
|
|
383
|
-
readOnly: false,
|
|
384
|
-
required: true,
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
name: "CAMINHO_ARQUIVO",
|
|
388
|
-
label: getMessage$1("snkAttach.attachMetadata.lblFile"),
|
|
389
|
-
visible: true,
|
|
390
|
-
readOnly: false,
|
|
391
|
-
required: true,
|
|
392
|
-
},
|
|
393
|
-
],
|
|
394
|
-
},
|
|
395
|
-
};
|
|
396
|
-
const attachFetcherMetadataBuilder = {
|
|
397
|
-
name: "Attach",
|
|
398
|
-
label: "Attach List",
|
|
399
|
-
fields: [
|
|
400
|
-
{ name: "CODATA", label: getMessage$1("snkAttach.attachMetadata.lblCode"), dataType: core.DataType.TEXT },
|
|
401
|
-
{ name: "DESCRICAO", label: getMessage$1("snkAttach.attachMetadata.lblDescription"), dataType: core.DataType.TEXT, readOnly: false },
|
|
402
|
-
{ name: "ARQUIVO", label: getMessage$1("snkAttach.attachMetadata.lblFileOrLink"), dataType: core.DataType.TEXT },
|
|
403
|
-
{ name: "USUARIO", label: getMessage$1("snkAttach.attachMetadata.lblUser"), dataType: core.DataType.TEXT },
|
|
404
|
-
{ name: "DTALTER", label: getMessage$1("snkAttach.attachMetadata.lblDate"), dataType: core.DataType.TEXT },
|
|
405
|
-
{
|
|
406
|
-
name: "CAMINHO_ARQUIVO",
|
|
407
|
-
label: getMessage$1("snkAttach.attachMetadata.lblFileUpload"),
|
|
408
|
-
dataType: core.DataType.OBJECT,
|
|
409
|
-
userInterface: core.UserInterface.FILE,
|
|
410
|
-
readOnly: false,
|
|
411
|
-
required: true,
|
|
412
|
-
visible: true,
|
|
413
|
-
properties: {
|
|
414
|
-
subTitle: getMessage$1("snkAttach.attachMetadata.lblSubTitle"),
|
|
415
|
-
MAX_FILES: 1,
|
|
416
|
-
STORAGESTRATEGY: "SESSION",
|
|
417
|
-
INTERNAL_FILENAME: "Attach.upload",
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
],
|
|
421
|
-
};
|
|
422
|
-
|
|
423
|
-
const SERVICE_LOAD = "Attach.load";
|
|
424
|
-
class AttachFetcherDataUnitFactory {
|
|
425
|
-
constructor(getMessage) {
|
|
426
|
-
this.getMessage = getMessage;
|
|
427
|
-
this._records = [];
|
|
428
|
-
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
429
|
-
}
|
|
430
|
-
initLoaders(dataUnit, fetcher, onSuccess) {
|
|
431
|
-
dataUnit.metadataLoader = (dataUnit) => this.metadataLoader(dataUnit);
|
|
432
|
-
dataUnit.dataLoader = (dataUnit, request) => this.dataLoader(dataUnit, request);
|
|
433
|
-
dataUnit.saveLoader = (_, changes) => this.saveLoader(changes, fetcher).then((recordIds) => {
|
|
434
|
-
if (recordIds.length)
|
|
435
|
-
onSuccess();
|
|
436
|
-
return recordIds;
|
|
437
|
-
});
|
|
438
|
-
dataUnit.removeLoader = (dataUnit, ids) => this.removeLoader(dataUnit, ids, fetcher).then((recordIds) => {
|
|
439
|
-
if (recordIds.length)
|
|
440
|
-
onSuccess();
|
|
441
|
-
return recordIds;
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
metadataLoader(_) {
|
|
445
|
-
return Promise.resolve(attachFetcherMetadataBuilder);
|
|
446
|
-
}
|
|
447
|
-
async dataLoader(dataUnit, request) {
|
|
448
|
-
if (!request.source) {
|
|
449
|
-
return Promise.resolve({ records: this._records });
|
|
450
|
-
}
|
|
451
|
-
if (!Number.isNaN(Number(request.source))) {
|
|
452
|
-
const criteria = {
|
|
453
|
-
criteria: {
|
|
454
|
-
codata: request.source,
|
|
455
|
-
tipoAnexo: "N"
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
const applicationDataFetcher = await this._application.getDataFetcher();
|
|
459
|
-
const { anexos: { anexo = [] } } = await applicationDataFetcher.callServiceBroker(SERVICE_LOAD, JSON.stringify(criteria));
|
|
460
|
-
const records = [];
|
|
461
|
-
anexo.forEach((param) => {
|
|
462
|
-
records.push(Object.assign({ __record__id__: core.StringUtils.generateUUID(), CAMINHO_ARQUIVO: [{
|
|
463
|
-
name: param === null || param === void 0 ? void 0 : param.ARQUIVO,
|
|
464
|
-
}] }, param));
|
|
465
|
-
});
|
|
466
|
-
this._records = records;
|
|
467
|
-
}
|
|
468
|
-
return core.DataUnitLoaderUtils.buildLoadDataResponse(this._records, dataUnit, request);
|
|
469
|
-
}
|
|
470
|
-
saveLoader(changes, fetcher) {
|
|
471
|
-
return new Promise((resolve) => {
|
|
472
|
-
const change = Array.isArray(changes) ? changes[0] : {};
|
|
473
|
-
fetcher.save(change)
|
|
474
|
-
.then(resolve)
|
|
475
|
-
.catch((error) => {
|
|
476
|
-
if (error.message === ISave.SaveErrorsEnum.DESCRIPTION_CANNOT_BE_CHANGED) {
|
|
477
|
-
this._application.alert(this.getMessage('snkAttach.alertValidation.descriptionCannotBeChanged.title'), this.getMessage('snkAttach.alertValidation.descriptionCannotBeChanged.message'));
|
|
478
|
-
return resolve([]);
|
|
479
|
-
}
|
|
480
|
-
if (error.message === ISave.SaveErrorsEnum.LINK_AND_FILE_AT_THE_SAME_TIME) {
|
|
481
|
-
this._application.alert(this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.title'), this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.message'));
|
|
482
|
-
return resolve([]);
|
|
483
|
-
}
|
|
484
|
-
if (error.message === ISave.SaveErrorsEnum.ANY_LINK_OR_FILE_FILLED) {
|
|
485
|
-
this._application.alert(this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.title'), this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.message'));
|
|
486
|
-
return resolve([]);
|
|
487
|
-
}
|
|
488
|
-
if (error.message) {
|
|
489
|
-
this._application.error((error.title || error.name), error.message);
|
|
490
|
-
return resolve([]);
|
|
491
|
-
}
|
|
492
|
-
resolve([]);
|
|
493
|
-
});
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
removeLoader(dataUnit, ids, fetcher) {
|
|
497
|
-
return new Promise((resolve) => {
|
|
498
|
-
dataUnit.getSelectionInfo().records.forEach(async (record) => {
|
|
499
|
-
this._application.hasAccess(authFetcher.AutorizationType.REMOVE)
|
|
500
|
-
.then(async (hasAccess) => {
|
|
501
|
-
if (hasAccess) {
|
|
502
|
-
await fetcher.delete(record);
|
|
503
|
-
resolve(ids);
|
|
504
|
-
}
|
|
505
|
-
});
|
|
506
|
-
});
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
getFilters() {
|
|
510
|
-
throw new Error('Method not implemented.');
|
|
511
|
-
}
|
|
512
|
-
getInterceptions(dataUnit, action, crudRef) {
|
|
513
|
-
return new Promise((resolve) => {
|
|
514
|
-
var _a, _b, _c, _d, _e, _f;
|
|
515
|
-
switch (action.type) {
|
|
516
|
-
case core.Action.EDITION_CANCELED:
|
|
517
|
-
if (!dataUnit.isDirty())
|
|
518
|
-
return resolve(action);
|
|
519
|
-
return this._application.confirm(this.getMessage('snkAttach.cancelConfirmation.title'), this.getMessage('snkAttach.cancelConfirmation.message')).then((cancellationConfirmed) => {
|
|
520
|
-
if (cancellationConfirmed) {
|
|
521
|
-
crudRef.goToView(constants.VIEW_MODE.GRID);
|
|
522
|
-
return resolve(action);
|
|
523
|
-
}
|
|
524
|
-
return resolve(undefined);
|
|
525
|
-
});
|
|
526
|
-
case core.Action.DATA_SAVED:
|
|
527
|
-
dataUnit.loadData(undefined, undefined, false, (_c = (_b = (_a = action === null || action === void 0 ? void 0 : action.payload) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.REGISTER_KEY);
|
|
528
|
-
return resolve(action);
|
|
529
|
-
case core.Action.RECORDS_REMOVED:
|
|
530
|
-
dataUnit.loadData(undefined, undefined, false, (_f = (_e = (_d = action === null || action === void 0 ? void 0 : action.payload) === null || _d === void 0 ? void 0 : _d.cachedRecords) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.CODATA);
|
|
531
|
-
return resolve(action);
|
|
532
|
-
}
|
|
533
|
-
resolve(action);
|
|
534
|
-
});
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
let messagesBuilder;
|
|
539
|
-
const getMessage = (key) => {
|
|
540
|
-
var _a;
|
|
541
|
-
if (!messagesBuilder) {
|
|
542
|
-
const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
543
|
-
messagesBuilder = application === null || application === void 0 ? void 0 : application.messagesBuilder;
|
|
544
|
-
}
|
|
545
|
-
return (_a = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage) === null || _a === void 0 ? void 0 : _a.call(messagesBuilder, key, null);
|
|
546
|
-
};
|
|
547
|
-
const TaskbarAttachButtons = {
|
|
548
|
-
DOWNLOAD: {
|
|
549
|
-
hint: getMessage("snkAttach.taskbar.titleDownload"),
|
|
550
|
-
name: "DOWNLOAD",
|
|
551
|
-
iconName: 'file-download'
|
|
552
|
-
},
|
|
553
|
-
LINK: {
|
|
554
|
-
hint: getMessage("snkAttach.taskbar.titleLink"),
|
|
555
|
-
name: "LINK",
|
|
556
|
-
iconName: "launch"
|
|
557
|
-
}
|
|
558
|
-
};
|
|
559
|
-
const buildTaskBarManager = () => {
|
|
560
|
-
const disabledButtonsWithoutSelection = [
|
|
561
|
-
taskbarElements.TaskbarElement.REMOVE,
|
|
562
|
-
"DOWNLOAD",
|
|
563
|
-
"LINK"
|
|
564
|
-
];
|
|
565
|
-
return {
|
|
566
|
-
getButtons: (_, dataState, currentButtons) => {
|
|
567
|
-
const refreshBtnIndex = currentButtons.indexOf(taskbarElements.TaskbarElement.REFRESH);
|
|
568
|
-
if ((dataState === null || dataState === void 0 ? void 0 : dataState.insertionMode) || (dataState === null || dataState === void 0 ? void 0 : dataState.isDirty)) {
|
|
569
|
-
return currentButtons.reverse();
|
|
570
|
-
}
|
|
571
|
-
else if (refreshBtnIndex !== -1) {
|
|
572
|
-
currentButtons.splice(refreshBtnIndex, 1);
|
|
573
|
-
}
|
|
574
|
-
const { selectedRecord } = dataState || {};
|
|
575
|
-
const taskbarTobeAdded = !!(selectedRecord === null || selectedRecord === void 0 ? void 0 : selectedRecord.LINK) ? TaskbarAttachButtons.LINK : TaskbarAttachButtons.DOWNLOAD;
|
|
576
|
-
currentButtons.splice(currentButtons.indexOf(taskbarElements.TaskbarElement.DIVIDER) + 1, 0, taskbarElements.TaskbarElement.REMOVE, taskbarTobeAdded, taskbarElements.TaskbarElement.DIVIDER);
|
|
577
|
-
const buttonsToRemove = [taskbarElements.TaskbarElement.CLONE, taskbarElements.TaskbarElement.DATA_EXPORTER];
|
|
578
|
-
const updatedButtons = Array.from(new Set(currentButtons.filter((button) => !buttonsToRemove.includes(button))));
|
|
579
|
-
updatedButtons.splice(updatedButtons.indexOf(taskbarTobeAdded) + 1, 0, taskbarElements.TaskbarElement.DIVIDER);
|
|
580
|
-
return updatedButtons;
|
|
581
|
-
},
|
|
582
|
-
isEnabled: (_, dataState, currentButton) => {
|
|
583
|
-
const hasSelectedRecord = (dataState === null || dataState === void 0 ? void 0 : dataState.selectedRecord) !== undefined;
|
|
584
|
-
const disabledButton = disabledButtonsWithoutSelection.includes(currentButton);
|
|
585
|
-
if (disabledButton && !hasSelectedRecord)
|
|
586
|
-
return false;
|
|
587
|
-
return true;
|
|
588
|
-
}
|
|
589
|
-
};
|
|
590
|
-
};
|
|
591
|
-
|
|
592
|
-
const anexoSistemaCrudConfig = {
|
|
593
|
-
grid: {
|
|
594
|
-
columns: [
|
|
595
|
-
{ name: "ARQUIVOOULINK", orderIndex: 0, width: 0 },
|
|
596
|
-
{ name: "DESCRICAO", orderIndex: 1, width: 0 },
|
|
597
|
-
{ name: "DHCAD", orderIndex: 2, width: 0 },
|
|
598
|
-
{ name: "DHALTER", orderIndex: 3, width: 0 },
|
|
599
|
-
{ name: "TIPOAPRES", orderIndex: 4, width: 0 },
|
|
600
|
-
{ name: "TIPOACESSO", orderIndex: 5, width: 0 },
|
|
601
|
-
{ name: "CODUSU", orderIndex: 6, width: 0 },
|
|
602
|
-
{ name: "CODUSUALT", orderIndex: 7, width: 0 }
|
|
603
|
-
]
|
|
604
|
-
},
|
|
605
|
-
form: {
|
|
606
|
-
emptyConfig: false,
|
|
607
|
-
fields: [
|
|
608
|
-
{
|
|
609
|
-
name: "DESCRICAO",
|
|
610
|
-
required: true
|
|
611
|
-
},
|
|
612
|
-
{
|
|
613
|
-
name: "TIPOAPRES",
|
|
614
|
-
required: true,
|
|
615
|
-
},
|
|
616
|
-
{
|
|
617
|
-
name: "TIPOACESSO",
|
|
618
|
-
required: true,
|
|
619
|
-
},
|
|
620
|
-
{
|
|
621
|
-
name: "LINK"
|
|
622
|
-
},
|
|
623
|
-
{
|
|
624
|
-
name: "NOMEARQUIVO"
|
|
625
|
-
}
|
|
626
|
-
]
|
|
627
|
-
},
|
|
628
|
-
};
|
|
629
|
-
|
|
630
|
-
const snkAttachCss = ".snk-attach__header.sc-snk-attach,.snk-attach__crud-section.sc-snk-attach{padding:0 var(--space--lg)}.snk-attach__file-info.sc-snk-attach{padding:var(--space--small);max-width:50%}.snk-attach__main.sc-snk-attach{height:85%}.ez-box__container.sc-snk-attach{height:100%}";
|
|
631
|
-
|
|
632
|
-
const RESOURCE_ID = 'AnexoSistema';
|
|
633
|
-
const DATA_UNIT_NAME = 'br.com.sankhya.core.v3.anexoSistema';
|
|
634
|
-
const GRID_LEGACY_CONFIG_NAME = 'GrdCfgHtml5:grdcfg.dynaform.anexo';
|
|
635
|
-
const LINKORFILE_COLUMN_NAME = "ARQUIVOOULINK";
|
|
636
|
-
const SnkAttach = class {
|
|
637
|
-
constructor(hostRef) {
|
|
638
|
-
index.registerInstance(this, hostRef);
|
|
639
|
-
this.back = index.createEvent(this, "back", 7);
|
|
640
|
-
this.handleTaskbarClick = async ({ detail: taskbar }) => {
|
|
641
|
-
if (["DOWNLOAD", "LINK"].includes(taskbar))
|
|
642
|
-
return this.downloadAttachment(this._currentDataUnit.getSelectedRecord());
|
|
643
|
-
if (this.fetcherType === "Attach" && ["SAVE"].includes(taskbar) && this._currentDataUnit.isDirty()) {
|
|
644
|
-
await this._currentDataUnit.setFieldValue("REGISTER_KEY", this.registerKey);
|
|
645
|
-
}
|
|
646
|
-
};
|
|
647
|
-
this.handleBack = () => {
|
|
648
|
-
this._currentDataUnit.cancelEdition().then((cancelationConfirmed) => {
|
|
649
|
-
if (cancelationConfirmed)
|
|
650
|
-
this.back.emit();
|
|
651
|
-
});
|
|
652
|
-
};
|
|
653
|
-
this.handleFinish = () => {
|
|
654
|
-
if (!this._currentDataUnit.isDirty())
|
|
655
|
-
return this.back.emit();
|
|
656
|
-
if (!this.validateAnexoSistema()) {
|
|
657
|
-
return;
|
|
658
|
-
}
|
|
659
|
-
this._currentDataUnit.saveData().then(() => {
|
|
660
|
-
this.showFinishedToast();
|
|
661
|
-
this.back.emit();
|
|
662
|
-
});
|
|
663
|
-
};
|
|
664
|
-
this.gridLegacyConfigName = undefined;
|
|
665
|
-
this.fetcherType = undefined;
|
|
666
|
-
this.fetcher = undefined;
|
|
667
|
-
this.dataUnit = undefined;
|
|
668
|
-
this.dataUnitBuilder = undefined;
|
|
669
|
-
this.registerKey = undefined;
|
|
670
|
-
this.entityName = undefined;
|
|
671
|
-
this.messagesBuilder = undefined;
|
|
672
|
-
this._currentFetcher = undefined;
|
|
673
|
-
this._currentDataUnit = undefined;
|
|
674
|
-
this.crudConfig = undefined;
|
|
675
|
-
}
|
|
676
|
-
async registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
|
677
|
-
var _a;
|
|
678
|
-
if (this._currentDataUnit == null) {
|
|
679
|
-
this.loadAttachmentDataUnit();
|
|
680
|
-
}
|
|
681
|
-
if (oldRegisterKey !== newRegisterKey) {
|
|
682
|
-
if (this._currentFetcher instanceof AnexoSistemaFetcher) {
|
|
683
|
-
this._currentFetcher.registerKey = newRegisterKey;
|
|
684
|
-
}
|
|
685
|
-
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData());
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
getAnexoSistemaFetcherInstance() {
|
|
689
|
-
var _a;
|
|
690
|
-
const anexoSistemaFetcher = new AnexoSistemaFetcher(this.entityName, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
|
691
|
-
anexoSistemaFetcher.registerKey = this.registerKey;
|
|
692
|
-
return anexoSistemaFetcher;
|
|
693
|
-
}
|
|
694
|
-
async initAttach() {
|
|
695
|
-
var _a, _b, _c, _d, _e;
|
|
696
|
-
if (!this.fetcherType && !this.registerKey)
|
|
697
|
-
return;
|
|
698
|
-
if (!this.fetcherType) {
|
|
699
|
-
this.fetcherType = "AnexoSistema";
|
|
700
|
-
}
|
|
701
|
-
this.returnToGridMode();
|
|
702
|
-
if (this.fetcherType === "AnexoSistema") {
|
|
703
|
-
this._currentFetcher = this.getAnexoSistemaFetcherInstance();
|
|
704
|
-
(_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
|
705
|
-
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
|
|
706
|
-
return;
|
|
707
|
-
}
|
|
708
|
-
if (this.fetcherType === "Attach") {
|
|
709
|
-
const hasMoreOneItem = ((_c = this.registerKey) === null || _c === void 0 ? void 0 : _c.split("_").length) > 1;
|
|
710
|
-
if (hasMoreOneItem)
|
|
711
|
-
return;
|
|
712
|
-
}
|
|
713
|
-
await ((_d = this._currentDataUnit) === null || _d === void 0 ? void 0 : _d.loadMetadata());
|
|
714
|
-
await ((_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadData(undefined, undefined, true, this.registerKey));
|
|
715
|
-
}
|
|
716
|
-
/**
|
|
717
|
-
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
718
|
-
* através de um pequeno modulo na estrutura da aplicação:
|
|
719
|
-
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
720
|
-
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-attach.msg.ts"
|
|
721
|
-
*/
|
|
722
|
-
getMessage(key, params) {
|
|
723
|
-
if (this.messagesBuilder)
|
|
724
|
-
return this.messagesBuilder.getMessage(key, params);
|
|
725
|
-
}
|
|
726
|
-
showFinishedToast() {
|
|
727
|
-
this._application.info(this.getMessage('snkAttach.finishedMessage'), { iconName: "check" });
|
|
728
|
-
}
|
|
729
|
-
downloadAttachment(selectedRecord) {
|
|
730
|
-
if (!selectedRecord)
|
|
731
|
-
throw new Error(this.getMessage("snkAttach.alertValidation.noRecordSelected.message"));
|
|
732
|
-
if (selectedRecord.LINK) {
|
|
733
|
-
window.open(`${selectedRecord.LINK}`);
|
|
734
|
-
return;
|
|
735
|
-
}
|
|
736
|
-
this._currentFetcher
|
|
737
|
-
.getDownloadKey(selectedRecord)
|
|
738
|
-
.then(({ chave }) => {
|
|
739
|
-
var _a;
|
|
740
|
-
let forceDownload = false;
|
|
741
|
-
if (!((_a = selectedRecord === null || selectedRecord === void 0 ? void 0 : selectedRecord.ARQUIVO) === null || _a === void 0 ? void 0 : _a.endsWith(".pdf"))) {
|
|
742
|
-
forceDownload = true;
|
|
743
|
-
}
|
|
744
|
-
window.open(`/mge/visualizadorArquivos.mge?chaveArquivo=${chave.valor}${forceDownload ? "&forcarDownload=S" : ""}`);
|
|
745
|
-
});
|
|
746
|
-
}
|
|
747
|
-
returnToGridMode() {
|
|
748
|
-
var _a;
|
|
749
|
-
(_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.clearSelection();
|
|
750
|
-
if (this._crudElement)
|
|
751
|
-
this._crudElement.goToView(constants.VIEW_MODE.GRID);
|
|
752
|
-
}
|
|
753
|
-
async loadAttachmentDataUnit() {
|
|
754
|
-
try {
|
|
755
|
-
switch (this.fetcherType) {
|
|
756
|
-
case "AnexoSistema":
|
|
757
|
-
await this.loadAnexoSistema();
|
|
758
|
-
break;
|
|
759
|
-
case "Attach":
|
|
760
|
-
await this.loadAttach();
|
|
761
|
-
break;
|
|
762
|
-
default:
|
|
763
|
-
this._currentFetcher = this.fetcher;
|
|
764
|
-
this._currentDataUnit = this.dataUnit;
|
|
765
|
-
this._currentDataUnitBuilder = this.dataUnitBuilder;
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
catch (error) {
|
|
769
|
-
throw new Error('There was an error while creating the data unit');
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
async loadAnexoSistema() {
|
|
773
|
-
var _a, _b;
|
|
774
|
-
this._currentDataUnit = new dataunitFetcher.DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
|
775
|
-
this._currentFetcher = this.getAnexoSistemaFetcherInstance();
|
|
776
|
-
let gridValidateForm;
|
|
777
|
-
if (!this._currentDataUnit.metadata) {
|
|
778
|
-
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
|
779
|
-
this.crudConfig = this.entityName ? { form: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.form } : Object.assign({}, anexoSistemaCrudConfig);
|
|
780
|
-
gridValidateForm = { grid: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.grid };
|
|
781
|
-
}
|
|
782
|
-
this.initDataUnitLoaders();
|
|
783
|
-
this._currentDataUnit.addFilterProvider({
|
|
784
|
-
getFilter: () => this._currentDataUnitBuilder.getFilters(this.registerKey)
|
|
785
|
-
});
|
|
786
|
-
this._currentDataUnit.addInterceptor({
|
|
787
|
-
interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
|
|
788
|
-
});
|
|
789
|
-
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
|
|
790
|
-
this.disableEditFieldsNotInForm(gridValidateForm);
|
|
791
|
-
}
|
|
792
|
-
async loadAttach() {
|
|
793
|
-
var _a, _b;
|
|
794
|
-
this._currentFetcher = new AttachFetcher();
|
|
795
|
-
this._currentDataUnit = new core.DataUnit(dataunitFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
|
796
|
-
this._currentDataUnit.pageSize = 150;
|
|
797
|
-
let gridValidateForm;
|
|
798
|
-
this.initDataUnitLoaders();
|
|
799
|
-
this._currentDataUnit.addInterceptor({
|
|
800
|
-
interceptAction: (action) => {
|
|
801
|
-
var _a;
|
|
802
|
-
if (action.type === core.Action.METADATA_LOADED) {
|
|
803
|
-
this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
|
|
804
|
-
gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
|
|
805
|
-
(_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.updateConfig();
|
|
806
|
-
}
|
|
807
|
-
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
|
808
|
-
}
|
|
809
|
-
});
|
|
810
|
-
if (!this._currentDataUnit.metadata) {
|
|
811
|
-
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
|
812
|
-
this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
|
|
813
|
-
gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
|
|
814
|
-
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData(undefined, undefined, true, this.registerKey));
|
|
815
|
-
this.disableEditFieldsNotInForm(gridValidateForm);
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
initDataUnitLoaders() {
|
|
819
|
-
var _a, _b;
|
|
820
|
-
if (this.fetcherType === "AnexoSistema") {
|
|
821
|
-
this._currentFetcher = this.getAnexoSistemaFetcherInstance();
|
|
822
|
-
this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
|
|
823
|
-
(_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
|
824
|
-
}
|
|
825
|
-
if (this.fetcherType === "Attach") {
|
|
826
|
-
this._currentFetcher = new AttachFetcher();
|
|
827
|
-
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
|
828
|
-
(_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
|
829
|
-
this.returnToGridMode();
|
|
830
|
-
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
|
831
|
-
});
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
disableEditFieldsNotInForm(gridValidateForm) {
|
|
835
|
-
var _a, _b, _c, _d, _e;
|
|
836
|
-
const gridColumns = ((_b = (_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.gridConfig) === null || _b === void 0 ? void 0 : _b.columns) || ((_c = gridValidateForm === null || gridValidateForm === void 0 ? void 0 : gridValidateForm.grid) === null || _c === void 0 ? void 0 : _c.columns) || ((_e = (_d = this.crudConfig) === null || _d === void 0 ? void 0 : _d.grid) === null || _e === void 0 ? void 0 : _e.columns);
|
|
837
|
-
if (!!this.getGridLegacyConfigName()) {
|
|
838
|
-
this._currentDataUnit.disableField(LINKORFILE_COLUMN_NAME);
|
|
839
|
-
}
|
|
840
|
-
gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach(column => {
|
|
841
|
-
var _a, _b;
|
|
842
|
-
const fieldName = column.name;
|
|
843
|
-
if (!((_b = (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.fields.some(field => (field === null || field === void 0 ? void 0 : field.name) === fieldName))) {
|
|
844
|
-
this._currentDataUnit.disableField(fieldName);
|
|
845
|
-
}
|
|
846
|
-
});
|
|
847
|
-
}
|
|
848
|
-
validateAnexoSistema() {
|
|
849
|
-
var _a;
|
|
850
|
-
if (this._currentFetcher instanceof AnexoSistemaFetcher) {
|
|
851
|
-
try {
|
|
852
|
-
let fields = this._currentDataUnit.getSelectedRecord();
|
|
853
|
-
fields = Object.assign(Object.assign({}, fields), { NOMEARQUIVO: (_a = fields.NOMEARQUIVO) === null || _a === void 0 ? void 0 : _a[0] });
|
|
854
|
-
this._currentFetcher.validateFields(fields);
|
|
855
|
-
}
|
|
856
|
-
catch (error) {
|
|
857
|
-
if (error.message === ISave.SaveErrorsEnum.LINK_AND_FILE_AT_THE_SAME_TIME) {
|
|
858
|
-
this._application.alert(this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.title'), this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.message'));
|
|
859
|
-
return false;
|
|
860
|
-
}
|
|
861
|
-
if (error.message === ISave.SaveErrorsEnum.ANY_LINK_OR_FILE_FILLED) {
|
|
862
|
-
this._application.alert(this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.title'), this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.message'));
|
|
863
|
-
return false;
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
return true;
|
|
868
|
-
}
|
|
869
|
-
async componentWillLoad() {
|
|
870
|
-
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
871
|
-
await this.initAttach();
|
|
872
|
-
}
|
|
873
|
-
componentWillRender() {
|
|
874
|
-
if (!this.fetcherType) {
|
|
875
|
-
this.fetcherType = "AnexoSistema";
|
|
876
|
-
}
|
|
877
|
-
if (this._currentDataUnit == null) {
|
|
878
|
-
this.loadAttachmentDataUnit();
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
async handleOnDataStateChange({ detail }) {
|
|
882
|
-
if (this.fetcherType !== 'Attach')
|
|
883
|
-
return;
|
|
884
|
-
if (!detail.insertionMode) {
|
|
885
|
-
this._currentDataUnit.disableField('DESCRICAO');
|
|
886
|
-
}
|
|
887
|
-
else {
|
|
888
|
-
this._currentDataUnit.enableField('DESCRICAO');
|
|
889
|
-
}
|
|
890
|
-
await this._currentDataUnit.loadMetadata();
|
|
891
|
-
}
|
|
892
|
-
;
|
|
893
|
-
getGridLegacyConfigName() {
|
|
894
|
-
if (this.gridLegacyConfigName)
|
|
895
|
-
return this.gridLegacyConfigName;
|
|
896
|
-
return this.entityName ? GRID_LEGACY_CONFIG_NAME + "." + this.entityName : this.entityName;
|
|
897
|
-
}
|
|
898
|
-
render() {
|
|
899
|
-
var _a, _b;
|
|
900
|
-
if (!this._currentDataUnit)
|
|
901
|
-
return null;
|
|
902
|
-
return (index.h("main", { class: "snk-attach__main" }, index.h("header", { class: "snk-attach__header" }, index.h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, index.h("div", { slot: "rightSlot" }, index.h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), index.h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, index.h("div", { class: "ez-box__container" }, index.h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true, configName: this.entityName, ignoreReadOnlyFormFields: this.entityName ? true : false, gridLegacyConfigName: this.getGridLegacyConfigName() }, index.h("div", { slot: "snkSimpleCrudHeader" }, index.h("div", { class: "ez-flex ez-flex--column" }, index.h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), index.h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
|
903
|
-
}
|
|
904
|
-
static get watchers() { return {
|
|
905
|
-
"registerKey": ["registerKeyWatcher"]
|
|
906
|
-
}; }
|
|
907
|
-
};
|
|
908
|
-
SnkAttach.style = snkAttachCss;
|
|
909
|
-
|
|
910
|
-
exports.snk_attach = SnkAttach;
|