@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-86600.1 → 0.0.0-bugfix-dev-5562683.0
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-a2753c93.js → ClientSideExporterProvider-a9ac4ced.js} +6 -6
- package/dist/cjs/{ConfigStorage-df09fb78.js → ConfigStorage-cdc3e499.js} +47 -19
- package/dist/cjs/{DataFetcher-1afdb18e.js → DataFetcher-73ecd756.js} +1 -1
- package/dist/cjs/FormConfigHelper-c664dbae.js +260 -0
- package/dist/cjs/{ISave-c76e2c51.js → ISave-14bf4a17.js} +1 -1
- package/dist/cjs/{PersonalizedFilterUtils-0184ffbb.js → PersonalizedFilterUtils-7259cf65.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-45a8d7b7.js → SnkFormConfigManager-ac1a9df7.js} +4 -5
- package/dist/cjs/{SnkMessageBuilder-aecd7c18.js → SnkMessageBuilder-221cc88d.js} +42 -8
- package/dist/cjs/{auth-fetcher-1687ac0a.js → auth-fetcher-aac507be.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-77c1b8bd.js → constants-6d82e405.js} +8 -38
- package/dist/cjs/{dataunit-fetcher-a723f0dc.js → dataunit-fetcher-ed652ef5.js} +1 -1
- 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-40d3f752.js → form-config-fetcher-2be34347.js} +1 -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 +8 -8
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/{snk-actions-button_7.cjs.entry.js → snk-actions-button_8.cjs.entry.js} +124 -204
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +13 -13
- package/dist/cjs/snk-attach.cjs.entry.js +52 -23
- package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +2 -2
- package/dist/cjs/snk-crud.cjs.entry.js +11 -35
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-exporter.cjs.entry.js +8 -8
- package/dist/cjs/{snk-data-unit-ebfdb9ba.js → snk-data-unit-23fb8852.js} +3 -3
- 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 +66 -14
- package/dist/cjs/snk-entity-list.cjs.entry.js +3 -8
- 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 +86 -32
- 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 +1 -1
- 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 +36 -35
- package/dist/cjs/{snk-guides-viewer-401c4854.js → snk-guides-viewer-39f1c38d.js} +43 -31
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +13 -12
- 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 +13 -7
- 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 +83 -95
- package/dist/cjs/snk-taskbar.cjs.entry.js +9 -5
- package/dist/cjs/sortable.esm-9a110bb7.js +2668 -0
- package/dist/cjs/{taskbar-elements-21f0370c.js → taskbar-elements-3b74cd21.js} +10 -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 +9 -14
- package/dist/collection/components/snk-application/snk-application.js +4 -4
- package/dist/collection/components/snk-attach/snk-attach.js +27 -1
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +17 -13
- package/dist/collection/components/snk-crud/snk-crud.js +21 -45
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +58 -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 +36 -40
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +2 -7
- package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +1 -1
- 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.css +1 -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 +88 -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 +125 -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 +42 -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/snk-grid.css +1 -0
- package/dist/collection/components/snk-grid/snk-grid.js +97 -43
- package/dist/collection/components/snk-grid-config/snk-grid-config.css +7 -41
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +58 -193
- package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.css +1 -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-pesquisa/pesquisa-grid/pesquisa-grid.js +2 -2
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +9 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +75 -85
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +1 -0
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +1 -1
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +8 -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 +28 -2
- package/dist/collection/lib/configs/ConfigStorage.js +16 -8
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +29 -9
- package/dist/collection/lib/message/resources/snk-crud.msg.js +1 -1
- 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 +11 -3
- 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/utils/constants.js +7 -1
- package/dist/components/ConfigStorage.js +45 -17
- package/dist/components/ContinuousInsertUtils.js +2 -33
- package/dist/components/DataFetcher.js +1 -1
- package/dist/components/PersonalizedFilterUtils.js +6 -1
- package/dist/components/SnkFormConfigManager.js +2 -3
- package/dist/components/SnkMessageBuilder.js +42 -8
- 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 +8 -34
- 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/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 +9 -3
- package/dist/components/index.js +9 -3
- package/dist/components/pesquisa-grid2.js +2 -2
- package/dist/components/snk-application2.js +5 -5
- package/dist/components/snk-attach2.js +77 -42
- package/dist/components/snk-crud.js +65 -59
- 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 +168 -68
- package/dist/components/snk-entity-list.js +2 -7
- 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 +30 -21
- package/dist/components/snk-filter-modal-item2.js +1 -0
- package/dist/components/snk-filter-modal.js +59 -8
- 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 +56 -195
- package/dist/components/snk-grid2.js +71 -61
- package/dist/components/snk-personalized-filter2.js +50 -14
- package/dist/components/snk-pesquisa2.js +9 -2
- package/dist/components/snk-select-box2.js +1 -1
- package/dist/components/snk-simple-crud2.js +104 -109
- package/dist/components/snk-simple-form-config2.js +2 -2
- package/dist/components/snk-taskbar2.js +29 -10
- package/dist/components/sortable.esm.js +2666 -0
- 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-b3871edb.js → ClientSideExporterProvider-d9e1f06a.js} +6 -6
- package/dist/esm/{ConfigStorage-71e6766f.js → ConfigStorage-523106df.js} +47 -19
- package/dist/esm/{DataFetcher-88e56266.js → DataFetcher-7d1d7572.js} +1 -1
- package/dist/esm/FormConfigHelper-49fe72ca.js +248 -0
- package/dist/esm/{ISave-5efafc97.js → ISave-be72330c.js} +1 -1
- package/dist/esm/{PersonalizedFilterUtils-e2b38ef7.js → PersonalizedFilterUtils-2db38ff2.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-be490a33.js → SnkFormConfigManager-34540c46.js} +4 -5
- package/dist/esm/{SnkMessageBuilder-12f5fe1a.js → SnkMessageBuilder-da87a821.js} +42 -8
- package/dist/esm/{auth-fetcher-3510520e.js → auth-fetcher-c17e8322.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-7db1128a.js → constants-7b422de0.js} +8 -34
- package/dist/esm/{dataunit-fetcher-0e025732.js → dataunit-fetcher-020f7b9c.js} +1 -1
- 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-fa208a6c.js → form-config-fetcher-b0ef1639.js} +1 -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 +8 -8
- package/dist/esm/sankhyablocks.js +3 -3
- package/dist/esm/{snk-actions-button_7.entry.js → snk-actions-button_8.entry.js} +124 -205
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +13 -13
- package/dist/esm/snk-attach.entry.js +52 -23
- package/dist/esm/snk-client-confirm.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +2 -2
- package/dist/esm/snk-crud.entry.js +12 -36
- package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
- package/dist/esm/snk-data-exporter.entry.js +8 -8
- package/dist/esm/{snk-data-unit-03654813.js → snk-data-unit-3df26dac.js} +3 -3
- 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 +67 -15
- package/dist/esm/snk-entity-list.entry.js +3 -8
- 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 +86 -32
- 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 +1 -1
- 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 +34 -33
- package/dist/esm/{snk-guides-viewer-e17ff4ec.js → snk-guides-viewer-f4ca46e4.js} +43 -31
- package/dist/esm/snk-guides-viewer.entry.js +13 -12
- 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 +13 -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 +84 -96
- package/dist/esm/snk-taskbar.entry.js +9 -5
- package/dist/esm/sortable.esm-842f85a3.js +2666 -0
- package/dist/esm/{taskbar-elements-08cf25e8.js → taskbar-elements-171476d4.js} +10 -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-0e28ff4b.entry.js +1 -0
- package/dist/sankhyablocks/{p-9531fd46.entry.js → p-180716b2.entry.js} +1 -1
- package/dist/sankhyablocks/p-1a0caadb.js +1 -0
- package/dist/sankhyablocks/p-1ef1c728.js +56 -0
- package/dist/sankhyablocks/p-21107f0d.entry.js +1 -0
- package/dist/sankhyablocks/p-23b20add.entry.js +1 -0
- package/dist/sankhyablocks/p-25ce2f4e.entry.js +1 -0
- package/dist/sankhyablocks/{p-118e769b.entry.js → p-27482793.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ad07f0c5.entry.js → p-2d71bfcb.entry.js} +1 -1
- package/dist/sankhyablocks/{p-26b0ce3e.entry.js → p-2fdac5e6.entry.js} +1 -1
- 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-434817f0.entry.js → p-3d41f5a8.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8002dcd0.entry.js → p-471b34f4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-fbba7e3d.js → p-485e7917.js} +1 -1
- package/dist/sankhyablocks/p-49d644f3.entry.js +1 -0
- package/dist/sankhyablocks/{p-7e2ded86.entry.js → p-49d968e2.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f4d5bb7f.js → p-4c699e80.js} +1 -1
- package/dist/sankhyablocks/p-4d2ff2fb.entry.js +1 -0
- package/dist/sankhyablocks/{p-885802c3.js → p-511341c0.js} +1 -1
- package/dist/sankhyablocks/p-51833248.js +7 -0
- package/dist/sankhyablocks/{p-6dd38d7b.js → p-53be2cfb.js} +1 -1
- package/dist/sankhyablocks/{p-4a93daef.entry.js → p-5661a96e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-165cde3b.entry.js → p-59e84644.entry.js} +1 -1
- package/dist/sankhyablocks/p-60dd1d27.entry.js +1 -0
- package/dist/sankhyablocks/{p-21a81901.entry.js → p-667cab42.entry.js} +1 -1
- package/dist/sankhyablocks/p-6a4b21dd.js +1 -0
- package/dist/sankhyablocks/p-71a05822.entry.js +1 -0
- package/dist/sankhyablocks/p-72c8c847.entry.js +1 -0
- package/dist/sankhyablocks/{p-ac8d1cd6.entry.js → p-7345782c.entry.js} +1 -1
- package/dist/sankhyablocks/p-7ced2cf4.entry.js +1 -0
- package/dist/sankhyablocks/p-7d0012a4.entry.js +1 -0
- package/dist/sankhyablocks/p-7de79adf.js +1 -0
- package/dist/sankhyablocks/p-7e250432.entry.js +1 -0
- package/dist/sankhyablocks/{p-2c08fa3e.entry.js → p-80b15a59.entry.js} +3 -3
- package/dist/sankhyablocks/p-8331fc49.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-91d8a5bc.entry.js +1 -0
- package/dist/sankhyablocks/p-93475700.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-90684a75.entry.js → p-9ad3557c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b6200d32.entry.js → p-9fd87bfd.entry.js} +1 -1
- package/dist/sankhyablocks/{p-5e9fbd76.js → p-a349689a.js} +1 -1
- package/dist/sankhyablocks/{p-8c235d4c.entry.js → p-a76e6d51.entry.js} +1 -1
- package/dist/sankhyablocks/p-ab3f6efe.js +1 -0
- package/dist/sankhyablocks/p-b30f68dd.entry.js +1 -0
- package/dist/sankhyablocks/p-b568c1d4.js +1 -0
- package/dist/sankhyablocks/p-ba31c931.entry.js +1 -0
- package/dist/sankhyablocks/{p-bf2acf72.entry.js → p-c6a8a8bc.entry.js} +1 -1
- package/dist/sankhyablocks/p-cc06aaa3.entry.js +1 -0
- package/dist/sankhyablocks/p-cfc219f6.entry.js +1 -0
- package/dist/sankhyablocks/p-d3d125bc.entry.js +1 -0
- package/dist/sankhyablocks/{p-7993b2e3.js → p-d4ba9239.js} +1 -1
- package/dist/sankhyablocks/{p-79f823f3.entry.js → p-d67526b6.entry.js} +1 -1
- package/dist/sankhyablocks/p-d7fcf327.entry.js +1 -0
- package/dist/sankhyablocks/{p-d2d301a6.js → p-d8d8169b.js} +1 -1
- package/dist/sankhyablocks/{p-5f157b09.entry.js → p-dff65083.entry.js} +1 -1
- package/dist/sankhyablocks/{p-33718dfc.entry.js → p-e824d565.entry.js} +1 -1
- package/dist/sankhyablocks/p-e8dca0ba.entry.js +1 -0
- package/dist/sankhyablocks/p-ebfc0c98.entry.js +1 -0
- package/dist/sankhyablocks/{p-601b252b.js → p-f3e60dd1.js} +1 -1
- package/dist/sankhyablocks/p-fc4eac32.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +4 -7
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +12 -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 +6 -6
- 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/snk-grid.d.ts +21 -7
- package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +7 -20
- 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-pesquisa/snk-pesquisa.d.ts +1 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -10
- 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 +5 -0
- package/dist/types/components.d.ts +407 -211
- package/dist/types/lib/configs/ConfigStorage.d.ts +4 -2
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +8 -4
- package/dist/types/lib/utils/constants.d.ts +6 -0
- package/package.json +8 -6
- package/react/components.d.ts +9 -3
- package/react/components.js +9 -3
- package/react/components.js.map +1 -1
- package/dist/cjs/Sortable-fb1c4cbb.js +0 -2853
- package/dist/cjs/snk-config-options_3.cjs.entry.js +0 -1390
- package/dist/cjs/snk-field-config.cjs.entry.js +0 -60
- package/dist/cjs/snk-tab-config.cjs.entry.js +0 -332
- 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.js +0 -346
- 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.js +0 -184
- 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.js +0 -527
- package/dist/collection/components/snk-taskbar/subcomponents/field-search.js +0 -31
- package/dist/components/snk-config-options.js +0 -6
- package/dist/components/snk-config-options2.js +0 -257
- package/dist/components/snk-field-config.js +0 -6
- package/dist/components/snk-field-config2.js +0 -76
- package/dist/components/snk-tab-config.js +0 -6
- package/dist/components/snk-tab-config2.js +0 -3202
- package/dist/esm/Sortable-83960219.js +0 -2851
- package/dist/esm/snk-config-options_3.entry.js +0 -1384
- package/dist/esm/snk-field-config.entry.js +0 -56
- package/dist/esm/snk-tab-config.entry.js +0 -328
- package/dist/sankhyablocks/p-03b68a74.js +0 -56
- package/dist/sankhyablocks/p-1db45d26.entry.js +0 -1
- package/dist/sankhyablocks/p-1ee379ce.entry.js +0 -1
- package/dist/sankhyablocks/p-23736d75.js +0 -1
- package/dist/sankhyablocks/p-3749dffb.entry.js +0 -1
- package/dist/sankhyablocks/p-3ab6df3d.entry.js +0 -1
- package/dist/sankhyablocks/p-3c9794dc.entry.js +0 -1
- package/dist/sankhyablocks/p-42dd1346.js +0 -1
- package/dist/sankhyablocks/p-5ffa0493.entry.js +0 -1
- package/dist/sankhyablocks/p-60137b7a.entry.js +0 -1
- package/dist/sankhyablocks/p-6a0c8ce0.entry.js +0 -1
- package/dist/sankhyablocks/p-73285a8a.js +0 -1
- package/dist/sankhyablocks/p-7b920eb8.entry.js +0 -1
- package/dist/sankhyablocks/p-80f8c22c.js +0 -1
- package/dist/sankhyablocks/p-847449f8.entry.js +0 -1
- package/dist/sankhyablocks/p-9261d8a0.js +0 -1
- package/dist/sankhyablocks/p-933c0c0b.js +0 -1
- package/dist/sankhyablocks/p-979ecc40.entry.js +0 -1
- package/dist/sankhyablocks/p-a3f5ebb6.entry.js +0 -1
- package/dist/sankhyablocks/p-aadd3911.entry.js +0 -1
- package/dist/sankhyablocks/p-bfdf92e9.entry.js +0 -1
- package/dist/sankhyablocks/p-c0eb761b.entry.js +0 -1
- package/dist/sankhyablocks/p-c8b3cb54.js +0 -1
- package/dist/sankhyablocks/p-d31a701e.entry.js +0 -1
- package/dist/sankhyablocks/p-d9804798.js +0 -1
- package/dist/sankhyablocks/p-dc6ad9a6.entry.js +0 -1
- package/dist/sankhyablocks/p-dce8e631.entry.js +0 -1
- package/dist/sankhyablocks/p-ebdb9d89.js +0 -1
- package/dist/sankhyablocks/p-fa816fb2.js +0 -1
- 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
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-1cf293c1.js');
|
|
6
|
+
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
7
|
+
|
|
8
|
+
const configHeaderCss = ".sc-config-header-h{display:flex;padding-top:12px;padding-left:12px;align-items:center;width:100%;justify-content:space-between}.left-group.sc-config-header{display:flex;gap:8px}.right-group.sc-config-header{padding-right:18px;display:flex}";
|
|
9
|
+
|
|
10
|
+
const ConfigHeader = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.configClose = index.createEvent(this, "configClose", 7);
|
|
14
|
+
this.saveConfig = index.createEvent(this, "saveConfig", 7);
|
|
15
|
+
this.isEditingGuide = false;
|
|
16
|
+
this.isEditingGroup = false;
|
|
17
|
+
this.configOptions = [];
|
|
18
|
+
this.selectedConfig = undefined;
|
|
19
|
+
this.messagesBuilder = undefined;
|
|
20
|
+
this.hasChanges = false;
|
|
21
|
+
this.optionConfigChanged = false;
|
|
22
|
+
}
|
|
23
|
+
handleIsEditingGuideName({ detail }) {
|
|
24
|
+
this.isEditingGuide = detail;
|
|
25
|
+
}
|
|
26
|
+
handleIsEditingGroupName({ detail }) {
|
|
27
|
+
this.isEditingGroup = detail;
|
|
28
|
+
}
|
|
29
|
+
saveFormConfig() {
|
|
30
|
+
if (this.isEditingGuide || this.isEditingGroup) {
|
|
31
|
+
const title = this.getMessage('snkFormConfig.confirm.title');
|
|
32
|
+
const message = this.isEditingGuide
|
|
33
|
+
? this.getMessage('snkFormConfig.alert.titleGuideEditing')
|
|
34
|
+
: this.getMessage('snkFormConfig.alert.titleGroupEditing');
|
|
35
|
+
utils.ApplicationUtils.alert(title, message);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.saveConfig.emit();
|
|
39
|
+
}
|
|
40
|
+
async closeFormConfig() {
|
|
41
|
+
if (this.hasChanges) {
|
|
42
|
+
const title = this.getMessage('snkFormConfig.confirm.title');
|
|
43
|
+
const msg = this.getMessage('snkFormConfig.confirm.cancel');
|
|
44
|
+
const confirm = await utils.ApplicationUtils.confirm(title, msg);
|
|
45
|
+
if (!confirm)
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
this.configClose.emit();
|
|
49
|
+
}
|
|
50
|
+
getMessage(key, params) {
|
|
51
|
+
return this.messagesBuilder.getMessage(key, params);
|
|
52
|
+
}
|
|
53
|
+
openConfirmDialog(msg = '', title = this.getMessage('snkFormConfig.confirm.title')) {
|
|
54
|
+
return utils.ApplicationUtils.confirm(title, msg);
|
|
55
|
+
}
|
|
56
|
+
async applyOptionConfig() {
|
|
57
|
+
var _a, _b;
|
|
58
|
+
const name = (_b = (_a = this.selectedConfig) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : this.getMessage('snkFormConfig.configs.selectedConfig');
|
|
59
|
+
const msg = this.getMessage('snkFormConfig.confirm.apply').replace('{0}', name);
|
|
60
|
+
const confirm = await this.openConfirmDialog(msg);
|
|
61
|
+
if (confirm) {
|
|
62
|
+
this.saveConfig.emit();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
renderSaveActions() {
|
|
66
|
+
if (!this.hasChanges && !this.optionConfigChanged)
|
|
67
|
+
return;
|
|
68
|
+
if (this.hasChanges) {
|
|
69
|
+
return (index.h("div", { class: "right-group" }, index.h("ez-button", { title: 'Cancelar', label: 'Cancelar', onClick: this.closeFormConfig.bind(this), size: "medium" }), index.h("ez-button", { title: 'Salvar', label: 'Salvar', class: 'ez-button--primary ez-padding-left--medium', onClick: () => this.saveFormConfig(), size: "medium" })));
|
|
70
|
+
}
|
|
71
|
+
return (index.h("div", { class: "right-group" }, index.h("ez-button", { title: 'Cancelar', label: 'Cancelar', onClick: this.closeFormConfig.bind(this), size: "medium" }), index.h("ez-button", { title: 'Salvar', label: this.getMessage('snkFormConfig.applyConfig'), class: 'ez-button--primary ez-padding-left--medium', onClick: async () => await this.applyOptionConfig(), size: "medium" })));
|
|
72
|
+
}
|
|
73
|
+
render() {
|
|
74
|
+
return (index.h(index.Host, null, index.h("div", { class: 'left-group' }, index.h("ez-button", { mode: "icon", title: this.getMessage('snkFormConfig.goBackTitle'), iconName: "arrow_back", class: "ez-padding--small", size: "small", onClick: this.closeFormConfig.bind(this), id: "formConfigToBack" }), index.h("h1", { class: "ez-title ez-title--primary ez-title--extra-large ez-padding--small" }, this.getMessage('snkFormConfig.title')), index.h("configs-button", { hasChanges: this.hasChanges, configOptions: this.configOptions, selectedConfig: this.selectedConfig, messagesBuilder: this.messagesBuilder })), this.renderSaveActions()));
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
ConfigHeader.style = configHeaderCss;
|
|
78
|
+
|
|
79
|
+
exports.config_header = ConfigHeader;
|
|
@@ -0,0 +1,61 @@
|
|
|
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 utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
|
+
|
|
9
|
+
const configsButtonCss = ".dropdown-container.sc-configs-button{font-family:'Roboto';font-size:12px;font-weight:400;display:flex;flex-direction:column;color:#2b3a54;width:200px}.main-item.sc-configs-button{padding:12px;font-size:14px;cursor:pointer;transition:all .2s ease-in-out;display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:start}.main-item.sc-configs-button ez-icon.sc-configs-button{--ez-icon--color:#008561}.main-item.sc-configs-button:nth-of-type(1){padding-bottom:6px}.main-item.sc-configs-button:nth-of-type(2){padding-top:6px}.main-item.sc-configs-button:hover{background-color:#FAFCFF}.item-label.sc-configs-button{display:flex}";
|
|
10
|
+
|
|
11
|
+
const ConfigsButton = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.formConfigOptionSelected = index.createEvent(this, "formConfigOptionSelected", 7);
|
|
15
|
+
this.configOptions = [];
|
|
16
|
+
this.selectedConfig = undefined;
|
|
17
|
+
this.hasChanges = false;
|
|
18
|
+
this.messagesBuilder = undefined;
|
|
19
|
+
}
|
|
20
|
+
getMessage(key, params) {
|
|
21
|
+
return this.messagesBuilder.getMessage(key, params);
|
|
22
|
+
}
|
|
23
|
+
async showShareConfigOptions() {
|
|
24
|
+
if (this._refOptionsPopover && this._refShareConfigBtn) {
|
|
25
|
+
await this._refOptionsPopover.showUnder(this._refShareConfigBtn);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
async handleSelectOption(option) {
|
|
29
|
+
if (core.ObjectUtils.equals(option, this.selectedConfig))
|
|
30
|
+
return;
|
|
31
|
+
if (this.hasChanges) {
|
|
32
|
+
const title = this.getMessage('snkFormConfig.confirm.title');
|
|
33
|
+
const msg = this.getMessage('snkFormConfig.confirm.cancel');
|
|
34
|
+
const confirm = await utils.ApplicationUtils.confirm(title, msg);
|
|
35
|
+
if (!confirm)
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.selectedConfig = option;
|
|
39
|
+
this.formConfigOptionSelected.emit(option);
|
|
40
|
+
await this._refOptionsPopover.hide();
|
|
41
|
+
}
|
|
42
|
+
getButtonLabel() {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
return (_b = (_a = this.selectedConfig) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : this.getMessage('snkFormConfig.configs.buttonLabel');
|
|
45
|
+
}
|
|
46
|
+
renderConfigOptions() {
|
|
47
|
+
return this.configOptions.map((option) => {
|
|
48
|
+
return (index.h("div", { class: `main-item`, onClick: async () => await this.handleSelectOption(option) }, index.h("span", { class: 'item-label' }, " ", option.name), this.renderCheckIcon(option)));
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
renderCheckIcon(option) {
|
|
52
|
+
if (this.selectedConfig && this.selectedConfig.origin === option.origin)
|
|
53
|
+
return index.h("ez-icon", { iconName: "check" });
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
return (index.h(index.Host, null, index.h("ez-button", { ref: ref => this._refShareConfigBtn = ref, label: this.getButtonLabel(), onClick: async () => await this.showShareConfigOptions() }, index.h("ez-icon", { slot: "rightIcon", iconName: "chevron-down" })), index.h("ez-popover-plus", { ref: ref => this._refOptionsPopover = ref, autoClose: true, overlayType: "none" }, index.h("div", { class: 'dropdown-container' }, this.renderConfigOptions()))));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
ConfigsButton.style = configsButtonCss;
|
|
60
|
+
|
|
61
|
+
exports.configs_button = ConfigsButton;
|
|
@@ -7,11 +7,6 @@ exports.VIEW_MODE = void 0;
|
|
|
7
7
|
VIEW_MODE[VIEW_MODE["FORM"] = 1] = "FORM";
|
|
8
8
|
VIEW_MODE[VIEW_MODE["ATTACHMENT"] = 2] = "ATTACHMENT";
|
|
9
9
|
})(exports.VIEW_MODE || (exports.VIEW_MODE = {}));
|
|
10
|
-
const ACTION_CONFIG = {
|
|
11
|
-
add: 'ADD',
|
|
12
|
-
remove: 'REMOVE',
|
|
13
|
-
configuration: 'CONFIGURATION'
|
|
14
|
-
};
|
|
15
10
|
const VARS_BY_TYPE = {
|
|
16
11
|
UserInterface: {
|
|
17
12
|
DATE: [{ label: "Data atual", value: "${data}" }],
|
|
@@ -28,35 +23,14 @@ const DEFAULT_TYPE = {
|
|
|
28
23
|
fixed: "F",
|
|
29
24
|
variable: "V"
|
|
30
25
|
};
|
|
31
|
-
const CONFIG_EVENTS = {
|
|
32
|
-
closeModal: "ezCloseModal",
|
|
33
|
-
cancelConfig: "cancelConfig",
|
|
34
|
-
changeConfig: "changeConfig",
|
|
35
|
-
configChanged: "configChanged",
|
|
36
|
-
fieldChanged: "ezChange",
|
|
37
|
-
dragStartDistance: 40
|
|
38
|
-
};
|
|
39
|
-
const CONFIG_SORTABLE_EVENTS = {
|
|
40
|
-
dragStart: "sortable:start",
|
|
41
|
-
dragSort: "sortable:sort",
|
|
42
|
-
dragSorted: "sortable:sorted",
|
|
43
|
-
dragStop: "sortable:stop"
|
|
44
|
-
};
|
|
45
|
-
const KEY_EVENTS = {
|
|
46
|
-
enter: "Enter",
|
|
47
|
-
arrowLeft: "ArrowLeft",
|
|
48
|
-
arrowRight: "ArrowRight",
|
|
49
|
-
tab: "Tab",
|
|
50
|
-
escape: "Escape"
|
|
51
|
-
};
|
|
52
|
-
const TYPE_ACTIONS = {
|
|
53
|
-
rename: "RENAME",
|
|
54
|
-
hide: "HIDE",
|
|
55
|
-
show: "SHOW",
|
|
56
|
-
delete: "DELETE"
|
|
57
|
-
};
|
|
58
26
|
const TAB_NAMES = {
|
|
59
|
-
main: "__main"
|
|
27
|
+
main: "__main",
|
|
28
|
+
general: "Geral",
|
|
29
|
+
newGuide: "Nova guia",
|
|
30
|
+
};
|
|
31
|
+
const GROUP_NAMES = {
|
|
32
|
+
noGroup: "__no_group",
|
|
33
|
+
newGroup: "Novo Grupo",
|
|
60
34
|
};
|
|
61
35
|
const TAGS_BY_TYPE = {
|
|
62
36
|
LONGTEXT: "ez-text-area",
|
|
@@ -102,14 +76,10 @@ exports.TEMPLATES_SKELETON = void 0;
|
|
|
102
76
|
TEMPLATES_SKELETON[TEMPLATES_SKELETON["FORM_WITH_SIDEBAR"] = 4] = "FORM_WITH_SIDEBAR";
|
|
103
77
|
})(exports.TEMPLATES_SKELETON || (exports.TEMPLATES_SKELETON = {}));
|
|
104
78
|
|
|
105
|
-
exports.ACTION_CONFIG = ACTION_CONFIG;
|
|
106
|
-
exports.CONFIG_EVENTS = CONFIG_EVENTS;
|
|
107
|
-
exports.CONFIG_SORTABLE_EVENTS = CONFIG_SORTABLE_EVENTS;
|
|
108
79
|
exports.DEFAULT_TYPE = DEFAULT_TYPE;
|
|
109
|
-
exports.
|
|
80
|
+
exports.GROUP_NAMES = GROUP_NAMES;
|
|
110
81
|
exports.ORDER_VALUES = ORDER_VALUES;
|
|
111
82
|
exports.REPORT_LAUNCHER_RESOURCE_ID = REPORT_LAUNCHER_RESOURCE_ID;
|
|
112
83
|
exports.TAB_NAMES = TAB_NAMES;
|
|
113
84
|
exports.TAGS_BY_TYPE = TAGS_BY_TYPE;
|
|
114
|
-
exports.TYPE_ACTIONS = TYPE_ACTIONS;
|
|
115
85
|
exports.VARS_BY_TYPE = VARS_BY_TYPE;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const core = require('@sankhyalabs/core');
|
|
4
|
-
const DataFetcher = require('./DataFetcher-
|
|
4
|
+
const DataFetcher = require('./DataFetcher-73ecd756.js');
|
|
5
5
|
const constants = require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
6
6
|
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.ActionDefaultFilter = void 0;
|
|
4
|
+
(function (ActionDefaultFilter) {
|
|
5
|
+
ActionDefaultFilter["EDIT"] = "edit";
|
|
6
|
+
ActionDefaultFilter["REMOVE"] = "remove";
|
|
7
|
+
ActionDefaultFilter["CREATE"] = "create";
|
|
8
|
+
})(exports.ActionDefaultFilter || (exports.ActionDefaultFilter = {}));
|
|
@@ -0,0 +1,324 @@
|
|
|
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 constants = require('./constants-6d82e405.js');
|
|
8
|
+
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
9
|
+
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
10
|
+
const FormConfigHelper = require('./FormConfigHelper-c664dbae.js');
|
|
11
|
+
|
|
12
|
+
const fieldConfigCss = ".field-config-container.sc-field-config{font-family:'Roboto';color:#2b3a54;display:flex;flex-direction:column;gap:10px;width:330px;justify-content:space-between}.header.sc-field-config{display:flex;font-weight:500;font-size:16px}.actions.sc-field-config{display:flex;align-items:flex-end;gap:12px}";
|
|
13
|
+
|
|
14
|
+
const FieldConfig = class {
|
|
15
|
+
constructor(hostRef) {
|
|
16
|
+
index.registerInstance(this, hostRef);
|
|
17
|
+
this.fieldConfigChanged = index.createEvent(this, "fieldConfigChanged", 7);
|
|
18
|
+
this.fieldLabel = undefined;
|
|
19
|
+
this.fieldLabelErrorMessage = undefined;
|
|
20
|
+
this.fieldDefaultValue = undefined;
|
|
21
|
+
this.fieldCleanOnCopy = undefined;
|
|
22
|
+
this.fieldRequired = undefined;
|
|
23
|
+
this.fieldReadOnly = undefined;
|
|
24
|
+
this._defaultType = undefined;
|
|
25
|
+
this.dataUnit = undefined;
|
|
26
|
+
this.fieldConfig = undefined;
|
|
27
|
+
this.fieldDescriptor = undefined;
|
|
28
|
+
this.messagesBuilder = undefined;
|
|
29
|
+
}
|
|
30
|
+
observeFieldLabel() {
|
|
31
|
+
if (this.validateFieldLabel) {
|
|
32
|
+
this.fieldLabelErrorMessage = undefined;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async show(_anchorElement) {
|
|
36
|
+
this._popoupElement.opened = true;
|
|
37
|
+
this.initializeValues();
|
|
38
|
+
index.forceUpdate(this);
|
|
39
|
+
}
|
|
40
|
+
validateFieldLabel() {
|
|
41
|
+
var _a;
|
|
42
|
+
if ((_a = this.fieldLabel) === null || _a === void 0 ? void 0 : _a.trim())
|
|
43
|
+
return true;
|
|
44
|
+
this.applyErrorMessage();
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
getMessage(key, params) {
|
|
48
|
+
return this.messagesBuilder.getMessage(key, params);
|
|
49
|
+
}
|
|
50
|
+
isAllowDefault() {
|
|
51
|
+
var _a;
|
|
52
|
+
const allowDefault = (_a = this.fieldDescriptor.properties) === null || _a === void 0 ? void 0 : _a.allowDefault;
|
|
53
|
+
if (allowDefault == undefined) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
return allowDefault === 'true';
|
|
57
|
+
}
|
|
58
|
+
enabledValueDefault() {
|
|
59
|
+
var _a, _b, _c;
|
|
60
|
+
const allowDefault = (_a = this.fieldDescriptor.properties) === null || _a === void 0 ? void 0 : _a.allowDefault;
|
|
61
|
+
const hasVariableVar = (constants.VARS_BY_TYPE.UserInterface.hasOwnProperty((_b = this.fieldDescriptor) === null || _b === void 0 ? void 0 : _b.userInterface)
|
|
62
|
+
|| ((_c = this.fieldDescriptor) === null || _c === void 0 ? void 0 : _c.userInterface) === core.UserInterface.SEARCH);
|
|
63
|
+
return hasVariableVar && (allowDefault == undefined || allowDefault === 'true');
|
|
64
|
+
}
|
|
65
|
+
getDefaultType() {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
return (_b = (_a = this.fieldDefaultValue) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : constants.DEFAULT_TYPE.fixed;
|
|
68
|
+
}
|
|
69
|
+
emitFieldChanged() {
|
|
70
|
+
this.fieldConfigChanged.emit(this.fieldConfig);
|
|
71
|
+
}
|
|
72
|
+
handleLabelChanged({ detail }) {
|
|
73
|
+
this.fieldLabel = detail;
|
|
74
|
+
}
|
|
75
|
+
handleDefaultTypeChanged({ detail }) {
|
|
76
|
+
const optionSelected = detail.value;
|
|
77
|
+
if (optionSelected == undefined)
|
|
78
|
+
return;
|
|
79
|
+
this._defaultType = optionSelected;
|
|
80
|
+
this.fieldDefaultValue = { type: this._defaultType };
|
|
81
|
+
}
|
|
82
|
+
handleDefaultValueChanged({ detail }) {
|
|
83
|
+
this.fieldDefaultValue.value = detail === null || detail === void 0 ? void 0 : detail.value;
|
|
84
|
+
}
|
|
85
|
+
onChangeDefaultValue(fieldValue) {
|
|
86
|
+
this.fieldDefaultValue.value = FormConfigHelper.getValidatedFieldValue(fieldValue, this.dataUnit, this.fieldConfig.name);
|
|
87
|
+
}
|
|
88
|
+
handleClearDuplicateChanged({ detail }) {
|
|
89
|
+
this.fieldCleanOnCopy = detail;
|
|
90
|
+
}
|
|
91
|
+
handleRequiredChanged({ detail }) {
|
|
92
|
+
this.fieldRequired = detail;
|
|
93
|
+
}
|
|
94
|
+
handleReadOnlyChanged({ detail }) {
|
|
95
|
+
this.fieldReadOnly = detail;
|
|
96
|
+
}
|
|
97
|
+
loadDefaultValue() {
|
|
98
|
+
var _a;
|
|
99
|
+
if ((_a = this.fieldConfig.defaultValue) === null || _a === void 0 ? void 0 : _a.type) {
|
|
100
|
+
this._defaultType = this.fieldConfig.defaultValue.type;
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
this._defaultType = constants.DEFAULT_TYPE.fixed;
|
|
104
|
+
this.fieldConfig.defaultValue = { type: this._defaultType };
|
|
105
|
+
}
|
|
106
|
+
buildOptions() {
|
|
107
|
+
let interfaceField = this.fieldDescriptor.userInterface;
|
|
108
|
+
if (interfaceField === core.UserInterface.SEARCH) {
|
|
109
|
+
interfaceField = core.UserInterface.INTEGERNUMBER;
|
|
110
|
+
}
|
|
111
|
+
return constants.VARS_BY_TYPE.UserInterface[interfaceField];
|
|
112
|
+
}
|
|
113
|
+
renderDefaultValueEditor() {
|
|
114
|
+
if (this._defaultType === constants.DEFAULT_TYPE.variable) {
|
|
115
|
+
return (index.h("ez-combo-box", { label: this.getMessage('snkConfigOptions.label.valueDefault'), enabled: this.isAllowDefault(), onEzChange: (e) => this.handleDefaultValueChanged(e), value: this.fieldDefaultValue.value, options: this.buildOptions() }));
|
|
116
|
+
}
|
|
117
|
+
return this.fieldDescriptor.userInterface &&
|
|
118
|
+
this.buildFieldDefaultValueElement();
|
|
119
|
+
}
|
|
120
|
+
buildFieldDefaultValueElement() {
|
|
121
|
+
var _a;
|
|
122
|
+
const { userInterface, properties, dataType } = this.fieldDescriptor;
|
|
123
|
+
const allowDefault = properties === null || properties === void 0 ? void 0 : properties.allowDefault;
|
|
124
|
+
let value;
|
|
125
|
+
let enabled = core.StringUtils.getBooleanValue(allowDefault, !this.fieldReadOnly);
|
|
126
|
+
if (userInterface === core.UserInterface.FILE) {
|
|
127
|
+
enabled = false;
|
|
128
|
+
}
|
|
129
|
+
if (enabled) {
|
|
130
|
+
value = (_a = this.fieldDefaultValue) === null || _a === void 0 ? void 0 : _a.value;
|
|
131
|
+
if (value != undefined) {
|
|
132
|
+
value = DataType.getConvertedValue(dataType, value);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const configField = {
|
|
136
|
+
value,
|
|
137
|
+
enabled,
|
|
138
|
+
label: this.fieldConfig.label,
|
|
139
|
+
name: this.fieldConfig.name,
|
|
140
|
+
required: this.fieldRequired,
|
|
141
|
+
userInterface,
|
|
142
|
+
};
|
|
143
|
+
switch (userInterface) {
|
|
144
|
+
case core.UserInterface.SWITCH:
|
|
145
|
+
return this.buildInputDefault(configField, undefined, utils.CheckMode.SWITCH);
|
|
146
|
+
case core.UserInterface.CHECKBOX:
|
|
147
|
+
return this.buildInputDefault(configField, undefined, utils.CheckMode.REGULAR);
|
|
148
|
+
case core.UserInterface.OPTIONSELECTOR:
|
|
149
|
+
case core.UserInterface.DECIMALNUMBER:
|
|
150
|
+
return this.buildInputDefault(configField, properties);
|
|
151
|
+
default:
|
|
152
|
+
return this.buildInputDefault(configField);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
buildInputDefault({ value, enabled, label, name, required, userInterface }, properties = undefined, mode = undefined) {
|
|
156
|
+
let options;
|
|
157
|
+
let precision = 0;
|
|
158
|
+
let prettyPrecision = 0;
|
|
159
|
+
const TagName = userInterface == undefined || constants.TAGS_BY_TYPE[userInterface] == undefined
|
|
160
|
+
? constants.TAGS_BY_TYPE.DEFAULT
|
|
161
|
+
: constants.TAGS_BY_TYPE[userInterface];
|
|
162
|
+
if (userInterface === core.UserInterface.OPTIONSELECTOR) {
|
|
163
|
+
const prop = properties === null || properties === void 0 ? void 0 : properties.options;
|
|
164
|
+
if (typeof prop === 'string') {
|
|
165
|
+
const parsed = core.ObjectUtils.stringToObject(prop);
|
|
166
|
+
options = Object.keys(parsed).map(key => {
|
|
167
|
+
return { value: key, label: parsed[key] };
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
options = prop;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
else if (userInterface === core.UserInterface.DECIMALNUMBER) {
|
|
175
|
+
precision = Number((properties === null || properties === void 0 ? void 0 : properties.precision) || 2);
|
|
176
|
+
prettyPrecision = Number((properties === null || properties === void 0 ? void 0 : properties.prettyPrecision) || precision);
|
|
177
|
+
}
|
|
178
|
+
return index.h(TagName, Object.assign({ value: value, enabled: enabled, label: label, "data-field-name": name, key: name, onEzChange: (evt) => this.onChangeDefaultValue(evt === null || evt === void 0 ? void 0 : evt.detail) }, (this.getConditionalAttributes(userInterface, required, options, precision, prettyPrecision, mode))));
|
|
179
|
+
}
|
|
180
|
+
getConditionalAttributes(userInterface, required, options, precision, prettyPrecision, mode) {
|
|
181
|
+
const useSearchPlus = userInterface == core.UserInterface.SEARCHPLUS;
|
|
182
|
+
switch (userInterface) {
|
|
183
|
+
case core.UserInterface.SEARCH:
|
|
184
|
+
case core.UserInterface.SEARCHPLUS:
|
|
185
|
+
return {
|
|
186
|
+
suppressEmptyOption: required,
|
|
187
|
+
optionLoader: (searchArgument) => this.onSearchDefaultValue(searchArgument, { useSearchPlus }),
|
|
188
|
+
};
|
|
189
|
+
case core.UserInterface.OPTIONSELECTOR:
|
|
190
|
+
return {
|
|
191
|
+
suppressEmptyOption: required,
|
|
192
|
+
options,
|
|
193
|
+
};
|
|
194
|
+
case core.UserInterface.CHECKBOX:
|
|
195
|
+
case core.UserInterface.SWITCH:
|
|
196
|
+
return {
|
|
197
|
+
mode,
|
|
198
|
+
};
|
|
199
|
+
case core.UserInterface.INTEGERNUMBER:
|
|
200
|
+
case core.UserInterface.DECIMALNUMBER:
|
|
201
|
+
return {
|
|
202
|
+
precision,
|
|
203
|
+
prettyPrecision,
|
|
204
|
+
onEzStartChange: (evt) => this.onChangeDefaultValue(evt === null || evt === void 0 ? void 0 : evt.detail),
|
|
205
|
+
};
|
|
206
|
+
case core.UserInterface.DATE:
|
|
207
|
+
case core.UserInterface.DATETIME:
|
|
208
|
+
case core.UserInterface.TIME:
|
|
209
|
+
return {
|
|
210
|
+
onEzStartChange: (evt) => this.onChangeDefaultValue(evt === null || evt === void 0 ? void 0 : evt.detail),
|
|
211
|
+
};
|
|
212
|
+
default:
|
|
213
|
+
return {};
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
onSearchDefaultValue(searchArgument, ctxOptions) {
|
|
217
|
+
if (this._application && this.fieldConfig) {
|
|
218
|
+
return this._application.executeSearch(searchArgument, this.fieldConfig.name, this.dataUnit, ctxOptions);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
initializeValues() {
|
|
222
|
+
this.fieldLabel = this.fieldConfig.label;
|
|
223
|
+
this.fieldDefaultValue = this.fieldConfig.defaultValue;
|
|
224
|
+
this.fieldRequired = this.fieldConfig.required;
|
|
225
|
+
this.fieldReadOnly = this.fieldConfig.readOnly;
|
|
226
|
+
this.fieldCleanOnCopy = this.fieldConfig.cleanOnCopy;
|
|
227
|
+
}
|
|
228
|
+
handleApplyChanges() {
|
|
229
|
+
if (!this.validateFieldLabel())
|
|
230
|
+
return;
|
|
231
|
+
this.fieldConfig.label = this.fieldLabel;
|
|
232
|
+
this.fieldConfig.defaultValue = this.fieldDefaultValue;
|
|
233
|
+
this.fieldConfig.required = this.fieldRequired;
|
|
234
|
+
this.fieldConfig.readOnly = this.fieldReadOnly;
|
|
235
|
+
this.fieldConfig.cleanOnCopy = this.fieldCleanOnCopy;
|
|
236
|
+
this.emitFieldChanged();
|
|
237
|
+
this._popoupElement.opened = false;
|
|
238
|
+
}
|
|
239
|
+
applyErrorMessage() {
|
|
240
|
+
this.fieldLabelErrorMessage = `Informe um valor para ${this.getMessage('snkConfigOptions.label.nameField')}`;
|
|
241
|
+
}
|
|
242
|
+
handleDiscardChanges() {
|
|
243
|
+
this.initializeValues();
|
|
244
|
+
this._popoupElement.opened = false;
|
|
245
|
+
}
|
|
246
|
+
componentWillLoad() {
|
|
247
|
+
this.loadDefaultValue();
|
|
248
|
+
this._application = core.ApplicationContext.getContextValue('__SNK__APPLICATION__');
|
|
249
|
+
}
|
|
250
|
+
render() {
|
|
251
|
+
return (index.h("ez-popup", { heightMode: 'auto', size: 'auto', "ez-title": 'Configuração do campo', onEzClosePopup: () => this.handleDiscardChanges(), ref: ref => this._popoupElement = ref }, index.h("div", { class: 'field-config-container' }, index.h("ez-text-input", { label: this.getMessage('snkConfigOptions.label.nameField'), value: this.fieldLabel, errorMessage: this.fieldLabelErrorMessage, hasInvalid: !!this.fieldLabelErrorMessage, onEzChange: (e) => this.handleLabelChanged(e) }), index.h("ez-combo-box", { label: this.getMessage('snkConfigOptions.label.typeValueDefault'), suppressEmptyOption: true, enabled: this.enabledValueDefault(), onEzChange: (e) => this.handleDefaultTypeChanged(e), value: this.getDefaultType() }, index.h("option", { value: constants.DEFAULT_TYPE.fixed }, this.getMessage('snkConfigOptions.options.valueFixed')), index.h("option", { value: constants.DEFAULT_TYPE.variable }, this.getMessage('snkConfigOptions.options.variable'))), this.renderDefaultValueEditor(), index.h("ez-check", { label: this.getMessage('snkConfigOptions.label.clearDuplicate'), value: this.fieldCleanOnCopy, onEzChange: (e) => this.handleClearDuplicateChanged(e) }), index.h("ez-check", { label: this.getMessage('snkConfigOptions.label.requiredField'), enabled: FormConfigHelper.getEnabledByProperty('required', 'systemRequired', this.fieldDescriptor), value: FormConfigHelper.getValueByProperty('required', this.fieldDescriptor, this.fieldRequired), onEzChange: (e) => this.handleRequiredChanged(e) }), index.h("ez-check", { label: this.getMessage('snkConfigOptions.label.protectedField'), enabled: FormConfigHelper.getEnabledByProperty('readOnly', 'systemReadOnly', this.fieldDescriptor), value: FormConfigHelper.getValueByProperty('readOnly', this.fieldDescriptor, this.fieldReadOnly), onEzChange: (e) => this.handleReadOnlyChanged(e) }), index.h("div", { class: 'actions' }, index.h("ez-button", { label: 'Cancelar', onClick: () => this.handleDiscardChanges() }), index.h("ez-button", { label: 'Confirmar', class: "ez-button--primary", onClick: () => this.handleApplyChanges() })))));
|
|
252
|
+
}
|
|
253
|
+
static get watchers() { return {
|
|
254
|
+
"fieldLabel": ["observeFieldLabel"]
|
|
255
|
+
}; }
|
|
256
|
+
};
|
|
257
|
+
FieldConfig.style = fieldConfigCss;
|
|
258
|
+
|
|
259
|
+
const fieldItemCss = ".sc-field-item-h{width:100%;display:flex;padding:12px 8px;border-radius:var(--border--radius-small, 4px);border:1px solid #dce0e8;cursor:grab;align-items:center;height:42px;max-height:42px;background:#FAFCFF}.full-width.sc-field-item-h{width:100%}ez-icon.sc-field-item{--ez-icon--color:#A2ABB9}.icons.sc-field-item{display:flex}.label.sc-field-item{display:flex;flex-grow:1;padding-left:8px;font-size:14px;align-items:center;gap:4px;height:22px}.label-text.sc-field-item{overflow:hidden;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;display:-webkit-box;-o-text-overflow:ellipsis;text-overflow:ellipsis;word-break:break-word}.required-mark.sc-field-item{color:#cf3105;background:#F7E0E5;width:12px;height:12px;border-radius:50%;display:flex;align-items:center;justify-content:center;padding-top:5px;font-size:16px;align-self:self-start}.actions.sc-field-item{display:flex;flex-direction:row;align-content:center;gap:4px}ez-button.sc-field-item{width:24px;align-items:center;justify-content:center;display:flex}.sc-field-item-h .hiddeble.sc-field-item{transition:0.2s ease-in-out;visibility:hidden;opacity:0}.sc-field-item-h:hover .hiddeble.sc-field-item{visibility:visible;opacity:1}";
|
|
260
|
+
|
|
261
|
+
const FieldItem = class {
|
|
262
|
+
constructor(hostRef) {
|
|
263
|
+
index.registerInstance(this, hostRef);
|
|
264
|
+
this.setFieldAsAvailable = index.createEvent(this, "setFieldAsAvailable", 7);
|
|
265
|
+
this.addFieldToGuide = index.createEvent(this, "addFieldToGuide", 7);
|
|
266
|
+
this.fieldDescriptor = undefined;
|
|
267
|
+
this.fieldConfig = undefined;
|
|
268
|
+
this.onLayoutConfig = false;
|
|
269
|
+
this.dataUnit = undefined;
|
|
270
|
+
this.messagesBuilder = undefined;
|
|
271
|
+
}
|
|
272
|
+
observeDataUnit() {
|
|
273
|
+
this.loadFieldDescriptor();
|
|
274
|
+
}
|
|
275
|
+
isRequired() {
|
|
276
|
+
var _a, _b;
|
|
277
|
+
const fieldMD = this.dataUnit && this.dataUnit.getField((_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.name);
|
|
278
|
+
return (fieldMD === null || fieldMD === void 0 ? void 0 : fieldMD.required) === true || ((_b = this.fieldConfig) === null || _b === void 0 ? void 0 : _b.required) === true;
|
|
279
|
+
}
|
|
280
|
+
async showFieldConfig() {
|
|
281
|
+
var _a;
|
|
282
|
+
await ((_a = this._refFieldConfig) === null || _a === void 0 ? void 0 : _a.show(this._editIconRef));
|
|
283
|
+
}
|
|
284
|
+
renderFieldConfig() {
|
|
285
|
+
if (this.onLayoutConfig && this.dataUnit && this.messagesBuilder) {
|
|
286
|
+
return (index.h("field-config", { ref: ref => this._refFieldConfig = ref, fieldConfig: this.fieldConfig, dataUnit: this.dataUnit, fieldDescriptor: this.fieldDescriptor, messagesBuilder: this.messagesBuilder, onFieldConfigChanged: () => index.forceUpdate(this) }));
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
renderActions() {
|
|
290
|
+
if (this.onLayoutConfig) {
|
|
291
|
+
return (index.h("div", { class: 'actions hiddeble' }, index.h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: () => this.setFieldAsAvailable.emit(this.fieldConfig), size: "medium", iconName: 'minus', title: 'Remover' }), index.h("ez-button", { ref: ref => this._editIconRef = ref, mode: "icon", class: "ez-button--tertiary", onClick: this.showFieldConfig.bind(this), iconName: 'edit', size: "medium", title: 'Editar' })));
|
|
292
|
+
}
|
|
293
|
+
return (index.h("div", { class: 'actions hiddeble' }, index.h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: () => this.addFieldToGuide.emit(this.fieldConfig), iconName: 'plus', size: "medium", title: 'Adicionar ao Layout' })));
|
|
294
|
+
}
|
|
295
|
+
loadFieldDescriptor() {
|
|
296
|
+
if (this.dataUnit) {
|
|
297
|
+
this.fieldDescriptor = this.dataUnit.getField(this.fieldConfig.name);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
renderRequiredMark() {
|
|
301
|
+
if (this.isRequired())
|
|
302
|
+
return index.h("span", { class: 'required-mark' }, "*");
|
|
303
|
+
}
|
|
304
|
+
componentWillLoad() {
|
|
305
|
+
this.loadFieldDescriptor();
|
|
306
|
+
}
|
|
307
|
+
getFieldLabel() {
|
|
308
|
+
var _a, _b;
|
|
309
|
+
if ((_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.label)
|
|
310
|
+
return this.fieldConfig.label;
|
|
311
|
+
return (_b = this.fieldDescriptor) === null || _b === void 0 ? void 0 : _b.label;
|
|
312
|
+
}
|
|
313
|
+
render() {
|
|
314
|
+
var _a;
|
|
315
|
+
return (index.h(index.Host, { class: !this.onLayoutConfig ? 'full-width' : "" }, index.h("div", { class: 'icons' }, index.h("ez-icon", { iconName: "drag-indicator" }), index.h("ez-icon", { iconName: FormConfigHelper.getIconName((_a = this.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.userInterface) })), index.h("span", { class: 'label' }, index.h("span", { class: 'label-text', title: this.getFieldLabel() }, this.getFieldLabel()), this.renderRequiredMark()), this.renderActions(), this.renderFieldConfig()));
|
|
316
|
+
}
|
|
317
|
+
static get watchers() { return {
|
|
318
|
+
"dataUnit": ["observeDataUnit"]
|
|
319
|
+
}; }
|
|
320
|
+
};
|
|
321
|
+
FieldItem.style = fieldItemCss;
|
|
322
|
+
|
|
323
|
+
exports.field_config = FieldConfig;
|
|
324
|
+
exports.field_item = FieldItem;
|