@sankhyalabs/sankhyablocks 8.15.0-rc.9 → 8.15.1-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-d4c99a5e.js → ConfigStorage-942ce74b.js} +70 -7
- package/dist/cjs/{DataFetcher-99f0f6ed.js → DataFetcher-313debd8.js} +13 -5
- package/dist/cjs/{SnkFormConfigManager-3621bfc4.js → SnkFormConfigManager-f9dc0d28.js} +21 -13
- package/dist/cjs/{SnkMessageBuilder-141aa18d.js → SnkMessageBuilder-66aa2557.js} +4 -0
- package/dist/cjs/SnkMultiSelectionListDataSource-303e85d1.js +140 -0
- package/dist/cjs/{auth-fetcher-5161d082.js → auth-fetcher-54f5ff9d.js} +1 -1
- package/dist/cjs/{form-config-fetcher-9f1a13ca.js → form-config-fetcher-2dd00e5b.js} +13 -1
- package/dist/cjs/index-f9e81701.js +2 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-8bbee432.js → pesquisa-fetcher-213797ec.js} +273 -50
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +519 -4
- package/dist/cjs/snk-application.cjs.entry.js +19 -11
- package/dist/cjs/snk-attach.cjs.entry.js +66 -46
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +25 -17
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +6 -2
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-6026a9f7.js → snk-data-unit-41c29713.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +8 -9
- package/dist/cjs/snk-filter-bar.cjs.entry.js +31 -7
- package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
- package/dist/cjs/snk-filter-item.cjs.entry.js +10 -6
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form-config.cjs.entry.js +8 -2
- package/dist/cjs/snk-form.cjs.entry.js +11 -4
- package/dist/cjs/snk-grid.cjs.entry.js +40 -21
- package/dist/cjs/{snk-guides-viewer-e87f01b9.js → snk-guides-viewer-4b6ecda8.js} +20 -11
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +6 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-simple-crud.cjs.entry.js +255 -21
- package/dist/cjs/snk-taskbar.cjs.entry.js +69 -8
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/snk-application/snk-application.js +55 -6
- package/dist/collection/components/snk-attach/snk-attach.js +39 -24
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +1 -1
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +29 -22
- package/dist/collection/components/snk-configurator/snk-configurator.js +1 -1
- package/dist/collection/components/snk-crud/snk-crud.js +71 -11
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +50 -7
- package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.css +1 -1
- package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.js +22 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +2 -2
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +22 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +28 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +2 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +44 -3
- package/dist/collection/components/snk-form/snk-form.js +25 -1
- package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +20 -12
- package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +11 -5
- package/dist/collection/components/snk-grid/snk-grid.js +86 -16
- package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
- package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
- package/dist/collection/components/snk-simple-crud/regular-buttons.js +3 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +10 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +421 -17
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +86 -8
- package/dist/collection/lib/configs/ConfigStorage.js +63 -3
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +9 -40
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +33 -0
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +13 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +12 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +6 -3
- package/dist/collection/lib/message/SnkMessageBuilder.js +20 -20
- package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +4 -0
- package/dist/collection/lib/utils/CrudUtils.js +13 -1
- package/dist/components/ConfigStorage.js +68 -5
- package/dist/components/DataFetcher.js +13 -5
- package/dist/components/SnkFormConfigManager.js +19 -11
- package/dist/components/SnkMessageBuilder.js +4 -0
- package/dist/components/dataunit-fetcher.js +41 -39
- package/dist/components/field-search.js +93 -3
- package/dist/components/form-config-fetcher.js +12 -0
- package/dist/components/index.d.ts +6 -6
- package/dist/components/snk-application2.js +15 -4
- package/dist/components/snk-attach2.js +115 -52
- package/dist/components/snk-configurator2.js +1 -1
- package/dist/components/snk-crud.js +23 -11
- package/dist/components/snk-custom-slot-elements.js +7 -3
- package/dist/components/snk-data-exporter2.js +2 -2
- package/dist/components/snk-detail-view2.js +48 -11
- package/dist/components/snk-filter-bar2.js +29 -4
- package/dist/components/snk-filter-detail2.js +5 -1
- package/dist/components/snk-filter-item2.js +11 -6
- package/dist/components/snk-form-config2.js +7 -1
- package/dist/components/snk-form.js +8 -0
- package/dist/components/snk-grid-config2.js +128 -102
- package/dist/components/snk-grid2.js +42 -18
- package/dist/components/snk-simple-crud2.js +317 -29
- package/dist/components/snk-taskbar2.js +75 -11
- package/dist/esm/{ConfigStorage-39ed8aeb.js → ConfigStorage-86187da3.js} +70 -7
- package/dist/esm/{DataFetcher-a650ae58.js → DataFetcher-c1baf61d.js} +13 -5
- package/dist/esm/{SnkFormConfigManager-692e20c7.js → SnkFormConfigManager-f53f9f87.js} +21 -13
- package/dist/esm/{SnkMessageBuilder-9747ddd2.js → SnkMessageBuilder-0a4becdd.js} +4 -0
- package/dist/esm/SnkMultiSelectionListDataSource-36918dbf.js +133 -0
- package/dist/esm/{auth-fetcher-17dc5b5e.js → auth-fetcher-039abba3.js} +1 -1
- package/dist/esm/{form-config-fetcher-f121f880.js → form-config-fetcher-30fb808f.js} +13 -1
- package/dist/esm/index-a7d3d3f1.js +2 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-5a8cae10.js → pesquisa-fetcher-fe6f3826.js} +262 -43
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +518 -5
- package/dist/esm/snk-application.entry.js +19 -11
- package/dist/esm/snk-attach.entry.js +65 -45
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +25 -17
- package/dist/esm/snk-custom-slot-elements.entry.js +7 -3
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-4c343635.js → snk-data-unit-de1d140d.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +8 -9
- package/dist/esm/snk-filter-bar.entry.js +31 -7
- package/dist/esm/snk-filter-detail.entry.js +4 -1
- package/dist/esm/snk-filter-item.entry.js +10 -6
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form-config.entry.js +9 -3
- package/dist/esm/snk-form.entry.js +11 -4
- package/dist/esm/snk-grid.entry.js +41 -22
- package/dist/esm/{snk-guides-viewer-ba8ce538.js → snk-guides-viewer-113be3fd.js} +20 -11
- package/dist/esm/snk-guides-viewer.entry.js +6 -7
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-simple-crud.entry.js +256 -22
- package/dist/esm/snk-taskbar.entry.js +70 -9
- package/dist/sankhyablocks/p-032fe52e.js +1 -0
- package/dist/sankhyablocks/p-07a61550.entry.js +1 -0
- package/dist/sankhyablocks/p-0899e0b5.entry.js +1 -0
- package/dist/sankhyablocks/p-14a08904.entry.js +1 -0
- package/dist/sankhyablocks/p-154a7f33.entry.js +1 -0
- package/dist/sankhyablocks/p-15802c59.entry.js +1 -0
- package/dist/sankhyablocks/p-164666b1.js +65 -0
- package/dist/sankhyablocks/p-21a81901.entry.js +1 -0
- package/dist/sankhyablocks/p-32556aa6.js +1 -0
- package/dist/sankhyablocks/p-328585d0.entry.js +1 -0
- package/dist/sankhyablocks/{p-9a5d1b39.js → p-52c8e589.js} +1 -1
- package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
- package/dist/sankhyablocks/p-5cb07080.js +1 -0
- package/dist/sankhyablocks/p-74d349c3.entry.js +1 -0
- package/dist/sankhyablocks/p-7663f597.entry.js +1 -0
- package/dist/sankhyablocks/p-7fe120b8.entry.js +11 -0
- package/dist/sankhyablocks/{p-50783a8b.js → p-913a9979.js} +1 -1
- package/dist/sankhyablocks/{p-827e4b01.entry.js → p-a1d72395.entry.js} +1 -1
- package/dist/sankhyablocks/p-add17f6a.entry.js +1 -0
- package/dist/sankhyablocks/p-af1ac81f.entry.js +1 -0
- package/dist/sankhyablocks/p-aff76a53.js +56 -0
- package/dist/sankhyablocks/p-b4525fc0.entry.js +1 -0
- package/dist/sankhyablocks/p-cce0865d.js +1 -0
- package/dist/sankhyablocks/{p-be75153c.js → p-dc7c9047.js} +1 -1
- package/dist/sankhyablocks/p-dec65f6c.entry.js +1 -0
- package/dist/sankhyablocks/p-df5451c7.js +26 -0
- package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
- package/dist/sankhyablocks/{p-9d608b62.entry.js → p-eae7a817.entry.js} +1 -1
- package/dist/sankhyablocks/{p-20b46647.entry.js → p-ee9536bc.entry.js} +1 -1
- package/dist/sankhyablocks/p-f13f7616.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +9 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +2 -1
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +10 -1
- package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +5 -4
- package/dist/types/components/snk-crud/snk-crud.d.ts +12 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +11 -1
- package/dist/types/components/snk-custom-slot-elements/snk-custom-slot-elements.d.ts +6 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +6 -2
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +8 -0
- package/dist/types/components/snk-form/snk-form.d.ts +6 -1
- package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +2 -1
- package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +4 -3
- package/dist/types/components/snk-grid/snk-grid.d.ts +14 -1
- package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
- package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
- package/dist/types/components/snk-simple-crud/regular-buttons.d.ts +3 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +76 -3
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -0
- package/dist/types/components.d.ts +172 -11
- package/dist/types/lib/configs/ConfigStorage.d.ts +21 -1
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +0 -2
- package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +2 -1
- package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/PreloadManager-84466da6.js +0 -224
- package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
- package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
- package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
- package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
- package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
- package/dist/esm/snk-grid-config.entry.js +0 -479
- package/dist/esm/snk-select-box.entry.js +0 -21
- package/dist/sankhyablocks/p-094c30cb.js +0 -1
- package/dist/sankhyablocks/p-1c55becf.entry.js +0 -1
- package/dist/sankhyablocks/p-230f5148.entry.js +0 -1
- package/dist/sankhyablocks/p-2936303b.js +0 -1
- package/dist/sankhyablocks/p-2e4eb644.entry.js +0 -1
- package/dist/sankhyablocks/p-3e2e2424.entry.js +0 -1
- package/dist/sankhyablocks/p-3e91d5ea.entry.js +0 -1
- package/dist/sankhyablocks/p-43de1258.entry.js +0 -1
- package/dist/sankhyablocks/p-4ce6cb02.entry.js +0 -11
- package/dist/sankhyablocks/p-5e681b7b.js +0 -65
- package/dist/sankhyablocks/p-5f74c859.entry.js +0 -1
- package/dist/sankhyablocks/p-67aedbe0.js +0 -56
- package/dist/sankhyablocks/p-69754d94.entry.js +0 -1
- package/dist/sankhyablocks/p-725d04ba.js +0 -1
- package/dist/sankhyablocks/p-86801b08.entry.js +0 -1
- package/dist/sankhyablocks/p-8a3a2631.entry.js +0 -1
- package/dist/sankhyablocks/p-965b79a9.js +0 -1
- package/dist/sankhyablocks/p-98674137.entry.js +0 -1
- package/dist/sankhyablocks/p-a13ccb86.js +0 -26
- package/dist/sankhyablocks/p-aba0e87f.entry.js +0 -1
- package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
- package/dist/sankhyablocks/p-d26e0a02.entry.js +0 -1
- package/dist/sankhyablocks/p-d6317851.entry.js +0 -1
- package/dist/sankhyablocks/p-d7d85fa9.entry.js +0 -1
- package/dist/sankhyablocks/p-e3bd000e.entry.js +0 -1
- package/dist/sankhyablocks/p-e7dbe53a.entry.js +0 -1
- package/dist/sankhyablocks/p-fcdcb0e2.entry.js +0 -1
- /package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
@@ -1,20 +1,19 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-a7d3d3f1.js';
|
2
2
|
import { ApplicationContext, DataType, Action, UserInterface, StringUtils, DataUnit } from '@sankhyalabs/core';
|
3
|
-
import { D as DataFetcher } from './DataFetcher-
|
4
|
-
import { D as DataUnitFetcher } from './pesquisa-fetcher-
|
3
|
+
import { D as DataFetcher } from './DataFetcher-c1baf61d.js';
|
4
|
+
import { a as PreloadManager, b as applyFilter, c as applySorting, d as buildPaginationInfo, D as DataUnitFetcher, I as InMemoryLoader } from './pesquisa-fetcher-fe6f3826.js';
|
5
5
|
import './index-0ece87a6.js';
|
6
6
|
import { S as SaveErrorsEnum } from './ISave-d8c8bc59.js';
|
7
7
|
import './filter-item-type.enum-d45e026f.js';
|
8
|
-
import './form-config-fetcher-
|
8
|
+
import './form-config-fetcher-30fb808f.js';
|
9
9
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
10
|
-
import {
|
11
|
-
import { A as AutorizationType } from './auth-fetcher-17dc5b5e.js';
|
10
|
+
import { A as AutorizationType } from './auth-fetcher-039abba3.js';
|
12
11
|
import { T as TaskbarElement } from './taskbar-elements-2473c8ac.js';
|
13
12
|
import './PrintUtils-3e4ff0f5.js';
|
14
13
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
15
14
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
16
|
-
import './ResourceIDUtils-a114189a.js';
|
17
15
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
16
|
+
import './ResourceIDUtils-a114189a.js';
|
18
17
|
import './index-bdf75557.js';
|
19
18
|
|
20
19
|
const SERVICE$1 = {
|
@@ -390,7 +389,7 @@ const attachFetcherMetadataBuilder = {
|
|
390
389
|
label: "Attach List",
|
391
390
|
fields: [
|
392
391
|
{ name: "CODATA", label: getMessage$1("snkAttach.attachMetadata.lblCode"), dataType: DataType.TEXT },
|
393
|
-
{ name: "DESCRICAO", label: getMessage$1("snkAttach.attachMetadata.lblDescription"), dataType: DataType.TEXT },
|
392
|
+
{ name: "DESCRICAO", label: getMessage$1("snkAttach.attachMetadata.lblDescription"), dataType: DataType.TEXT, readOnly: false },
|
394
393
|
{ name: "ARQUIVO", label: getMessage$1("snkAttach.attachMetadata.lblFileOrLink"), dataType: DataType.TEXT },
|
395
394
|
{ name: "USUARIO", label: getMessage$1("snkAttach.attachMetadata.lblUser"), dataType: DataType.TEXT },
|
396
395
|
{ name: "DTALTER", label: getMessage$1("snkAttach.attachMetadata.lblDate"), dataType: DataType.TEXT },
|
@@ -416,6 +415,7 @@ const SERVICE_LOAD = "Attach.load";
|
|
416
415
|
class AttachFetcherDataUnitFactory {
|
417
416
|
constructor(getMessage) {
|
418
417
|
this.getMessage = getMessage;
|
418
|
+
this._records = [];
|
419
419
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
420
420
|
}
|
421
421
|
initLoaders(dataUnit, fetcher, onSuccess) {
|
@@ -435,25 +435,30 @@ class AttachFetcherDataUnitFactory {
|
|
435
435
|
metadataLoader(_) {
|
436
436
|
return Promise.resolve(attachFetcherMetadataBuilder);
|
437
437
|
}
|
438
|
-
async dataLoader(
|
438
|
+
async dataLoader(dataUnit, request) {
|
439
439
|
if (!request.source) {
|
440
|
-
return Promise.resolve({ records:
|
440
|
+
return Promise.resolve({ records: this._records });
|
441
441
|
}
|
442
|
-
|
443
|
-
criteria
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
442
|
+
if (!Number.isNaN(Number(request.source))) {
|
443
|
+
const criteria = {
|
444
|
+
criteria: {
|
445
|
+
codata: request.source,
|
446
|
+
tipoAnexo: "N"
|
447
|
+
}
|
448
|
+
};
|
449
|
+
const applicationDataFetcher = await this._application.getDataFetcher();
|
450
|
+
const { anexos: { anexo = [] } } = await applicationDataFetcher.callServiceBroker(SERVICE_LOAD, JSON.stringify(criteria));
|
451
|
+
const records = [];
|
452
|
+
anexo.forEach((param) => {
|
453
|
+
records.push(Object.assign({ __record__id__: StringUtils.generateUUID(), CAMINHO_ARQUIVO: [{
|
454
|
+
name: param === null || param === void 0 ? void 0 : param.ARQUIVO,
|
455
|
+
}] }, param));
|
456
|
+
});
|
457
|
+
this._records = records;
|
458
|
+
}
|
459
|
+
let records = applyFilter(this._records, dataUnit, request.filters);
|
460
|
+
records = applySorting(records, dataUnit, request.sort);
|
461
|
+
return Promise.resolve({ records, paginationInfo: buildPaginationInfo(records, request.offset, request.limit) });
|
457
462
|
}
|
458
463
|
saveLoader(changes, fetcher) {
|
459
464
|
return new Promise((resolve) => {
|
@@ -632,7 +637,7 @@ const SnkAttach = class {
|
|
632
637
|
this.back.emit();
|
633
638
|
});
|
634
639
|
};
|
635
|
-
this.fetcherType =
|
640
|
+
this.fetcherType = undefined;
|
636
641
|
this.fetcher = undefined;
|
637
642
|
this.dataUnit = undefined;
|
638
643
|
this.dataUnitBuilder = undefined;
|
@@ -644,8 +649,8 @@ const SnkAttach = class {
|
|
644
649
|
this.crudConfig = undefined;
|
645
650
|
}
|
646
651
|
registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
647
|
-
var _a, _b, _c, _d;
|
648
|
-
if (this._currentDataUnit
|
652
|
+
var _a, _b, _c, _d, _e, _f;
|
653
|
+
if (!this._currentDataUnit) {
|
649
654
|
this.loadAttachmentDataUnit();
|
650
655
|
}
|
651
656
|
if (oldRegisterKey !== newRegisterKey) {
|
@@ -660,11 +665,7 @@ const SnkAttach = class {
|
|
660
665
|
if (hasMoreOneItem)
|
661
666
|
return;
|
662
667
|
}
|
663
|
-
return this._currentDataUnit
|
664
|
-
.loadMetadata()
|
665
|
-
.then(() => {
|
666
|
-
this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
667
|
-
});
|
668
|
+
return (_f = (_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadMetadata()) === null || _f === void 0 ? void 0 : _f.then(this._currentDataUnit.loadData.bind(undefined, undefined, true, this.registerKey));
|
668
669
|
}
|
669
670
|
}
|
670
671
|
/**
|
@@ -730,7 +731,7 @@ const SnkAttach = class {
|
|
730
731
|
if (!this._currentDataUnit.metadata) {
|
731
732
|
this._currentDataUnit
|
732
733
|
.loadMetadata()
|
733
|
-
.then(() => this.crudConfig = anexoSistemaCrudConfig);
|
734
|
+
.then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
|
734
735
|
}
|
735
736
|
this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
|
736
737
|
this._currentDataUnit.addFilterProvider({
|
@@ -742,25 +743,29 @@ const SnkAttach = class {
|
|
742
743
|
this._currentDataUnit.loadData().then(this.disableEditFieldsNotInForm.bind(this));
|
743
744
|
}
|
744
745
|
loadAttach() {
|
745
|
-
var _a;
|
746
|
+
var _a, _b, _c;
|
746
747
|
this._currentFetcher = new AttachFetcher();
|
747
|
-
this._currentDataUnit = new DataUnit();
|
748
|
+
this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
748
749
|
this._currentDataUnit.addInterceptor({
|
749
|
-
interceptAction: (action) =>
|
750
|
+
interceptAction: (action) => {
|
751
|
+
var _a;
|
752
|
+
if (action.type === Action.METADATA_LOADED) {
|
753
|
+
this.crudConfig = Object.assign({}, attachCrudConfig);
|
754
|
+
(_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.updateConfig();
|
755
|
+
}
|
756
|
+
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
757
|
+
}
|
750
758
|
});
|
751
759
|
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
752
760
|
(_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
753
|
-
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
754
761
|
this.returnToGridMode();
|
762
|
+
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
755
763
|
});
|
756
764
|
if (!this._currentDataUnit.metadata) {
|
757
|
-
this._currentDataUnit
|
758
|
-
|
759
|
-
.
|
760
|
-
this.
|
761
|
-
this._currentDataUnit
|
762
|
-
.loadData(undefined, undefined, true, this.registerKey)
|
763
|
-
.then(this.disableEditFieldsNotInForm.bind(this));
|
765
|
+
(_c = (_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata()) === null || _c === void 0 ? void 0 : _c.then(() => {
|
766
|
+
var _a, _b;
|
767
|
+
this.crudConfig = Object.assign({}, attachCrudConfig);
|
768
|
+
(_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData(undefined, undefined, true, this.registerKey)) === null || _b === void 0 ? void 0 : _b.then(this.disableEditFieldsNotInForm.bind(this));
|
764
769
|
});
|
765
770
|
}
|
766
771
|
}
|
@@ -778,15 +783,30 @@ const SnkAttach = class {
|
|
778
783
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
779
784
|
}
|
780
785
|
componentWillRender() {
|
786
|
+
if (!this.fetcherType) {
|
787
|
+
this.fetcherType = "AnexoSistema";
|
788
|
+
}
|
781
789
|
if (this._currentDataUnit == null) {
|
782
790
|
this.loadAttachmentDataUnit();
|
783
791
|
}
|
784
792
|
}
|
793
|
+
async handleOnDataStateChange({ detail }) {
|
794
|
+
if (this.fetcherType !== 'Attach')
|
795
|
+
return;
|
796
|
+
if (!detail.insertionMode) {
|
797
|
+
this._currentDataUnit.disableField('DESCRICAO');
|
798
|
+
}
|
799
|
+
else {
|
800
|
+
this._currentDataUnit.enableField('DESCRICAO');
|
801
|
+
}
|
802
|
+
await this._currentDataUnit.loadMetadata();
|
803
|
+
}
|
804
|
+
;
|
785
805
|
render() {
|
786
806
|
var _a, _b;
|
787
807
|
if (!this._currentDataUnit)
|
788
808
|
return null;
|
789
|
-
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, 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 }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary" }, this.getMessage("snkAttach.description")))))))));
|
809
|
+
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, 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) }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary" }, this.getMessage("snkAttach.description")))))))));
|
790
810
|
}
|
791
811
|
static get watchers() { return {
|
792
812
|
"registerKey": ["registerKeyWatcher"]
|
@@ -95,7 +95,7 @@ const SnkConfigurator = class {
|
|
95
95
|
const customElements = container === null || container === void 0 ? void 0 : container.querySelector('#SnkConfigContainerSlot');
|
96
96
|
if (!customElements)
|
97
97
|
return;
|
98
|
-
const configuratorCustomElement = customElements.
|
98
|
+
const configuratorCustomElement = customElements.firstElementChild;
|
99
99
|
if (!configuratorCustomElement)
|
100
100
|
return;
|
101
101
|
const insideCustomElementsContainer = this._element.querySelector("#slotContainer");
|
@@ -1,21 +1,20 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { StringUtils, ElementIDUtils, ApplicationContext, JSUtils, FloatingManager } from '@sankhyalabs/core';
|
3
3
|
import { T as TaskbarElement } from './taskbar-elements-2473c8ac.js';
|
4
|
-
import './DataFetcher-
|
5
|
-
import './pesquisa-fetcher-
|
4
|
+
import './DataFetcher-c1baf61d.js';
|
5
|
+
import './pesquisa-fetcher-fe6f3826.js';
|
6
6
|
import { P as PresentationMode } from './index-0ece87a6.js';
|
7
7
|
import './ISave-d8c8bc59.js';
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
-
import './PreloadManager-c1c2f2b4.js';
|
11
10
|
import './filter-item-type.enum-d45e026f.js';
|
12
|
-
import './form-config-fetcher-
|
11
|
+
import './form-config-fetcher-30fb808f.js';
|
13
12
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
14
|
-
import { A as AutorizationType } from './auth-fetcher-
|
13
|
+
import { A as AutorizationType } from './auth-fetcher-039abba3.js';
|
15
14
|
import './index-bdf75557.js';
|
16
15
|
import './PrintUtils-3e4ff0f5.js';
|
17
|
-
import './ResourceIDUtils-a114189a.js';
|
18
16
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
17
|
+
import './ResourceIDUtils-a114189a.js';
|
19
18
|
|
20
19
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
21
20
|
|
@@ -46,6 +45,9 @@ const SnkCrud = class {
|
|
46
45
|
this.presentationMode = PresentationMode.PRIMARY;
|
47
46
|
this.messagesBuilder = undefined;
|
48
47
|
this.useEnterLikeTab = false;
|
48
|
+
this.gridLegacyConfigName = undefined;
|
49
|
+
this.filterBarLegacyConfigName = undefined;
|
50
|
+
this.formLegacyConfigName = undefined;
|
49
51
|
this.disablePersonalizedFilter = undefined;
|
50
52
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
51
53
|
}
|
@@ -106,6 +108,12 @@ const SnkCrud = class {
|
|
106
108
|
setViewMode(viewMode) {
|
107
109
|
this._viewStack.show(viewMode);
|
108
110
|
this._currentViewMode = viewMode;
|
111
|
+
if (viewMode === VIEW_MODE.GRID) {
|
112
|
+
this._snkGrid.setFocus();
|
113
|
+
}
|
114
|
+
else if (viewMode === VIEW_MODE.FORM) {
|
115
|
+
this._guidesViewer.setFocus();
|
116
|
+
}
|
109
117
|
}
|
110
118
|
openConfig(viewMode) {
|
111
119
|
this._snkConfigurator.close();
|
@@ -197,34 +205,34 @@ const SnkCrud = class {
|
|
197
205
|
element.focus();
|
198
206
|
}
|
199
207
|
keyboardManager
|
200
|
-
.bind("F6", this.toggleView.bind(this), { description: "Alterna entre modo formulário e grade." })
|
201
|
-
.bind("F7", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados." })
|
202
|
-
.bind("ctrl + \\", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados." })
|
203
|
-
.bind("F8", dataUnit.addRecord.bind(dataUnit), { description: "Adiciona um novo registro." })
|
204
|
-
.bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado." })
|
205
|
-
.bind("ctrl + F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado." })
|
208
|
+
.bind("F6", this.toggleView.bind(this), { description: "Alterna entre modo formulário e grade.", element: this._element })
|
209
|
+
.bind("F7", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados.", element: this._element })
|
210
|
+
.bind("ctrl + \\", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados.", element: this._element })
|
211
|
+
.bind("F8", dataUnit.addRecord.bind(dataUnit), { description: "Adiciona um novo registro.", element: this._element })
|
212
|
+
.bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
|
213
|
+
.bind("ctrl + F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
|
206
214
|
.bind("ctrl + .", () => {
|
207
215
|
if (dataUnit.getSelectionInfo().records.length === 0) {
|
208
216
|
return dataUnit.selectFirst();
|
209
217
|
}
|
210
218
|
return dataUnit.nextRecord();
|
211
219
|
}, {
|
212
|
-
description: "Avança para o próximo registro."
|
220
|
+
description: "Avança para o próximo registro.", element: this._element
|
213
221
|
})
|
214
|
-
.bind("ctrl + ,", dataUnit.previousRecord.bind(dataUnit), { description: "Retorna ao registro anterior." })
|
222
|
+
.bind("ctrl + ,", dataUnit.previousRecord.bind(dataUnit), { description: "Retorna ao registro anterior.", element: this._element })
|
215
223
|
.bind("F5", async () => {
|
216
224
|
const currentView = await this._viewStack.getSelectedIndex();
|
217
225
|
if (VIEW_MODE.GRID === currentView) {
|
218
226
|
dataUnit.loadData();
|
219
227
|
}
|
220
|
-
}, { description: "Atualiza os dados." })
|
228
|
+
}, { description: "Atualiza os dados.", element: this._element })
|
221
229
|
.bind("Escape", () => {
|
222
230
|
if (dataUnit.isDirty()) {
|
223
231
|
dataUnit.cancelEdition();
|
224
232
|
}
|
225
233
|
}, {
|
226
234
|
debounceTime: 1000,
|
227
|
-
description: "Cancela uma ação."
|
235
|
+
description: "Cancela uma ação.", element: this._element
|
228
236
|
});
|
229
237
|
}
|
230
238
|
}
|
@@ -297,7 +305,7 @@ const SnkCrud = class {
|
|
297
305
|
return;
|
298
306
|
}
|
299
307
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
300
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
308
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
301
309
|
}
|
302
310
|
get _element() { return getElement(this); }
|
303
311
|
static get watchers() { return {
|
@@ -1,14 +1,18 @@
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-a7d3d3f1.js';
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-a7d3d3f1.js';
|
2
2
|
|
3
|
-
const snkCustomSlotElementsCss = ".
|
3
|
+
const snkCustomSlotElementsCss = ".sc-snk-custom-slot-elements-h{display:none}";
|
4
4
|
|
5
5
|
const SnkCustomSlotElements = class {
|
6
6
|
constructor(hostRef) {
|
7
7
|
registerInstance(this, hostRef);
|
8
|
+
this.snkCustomSlotElementsLoaded = createEvent(this, "snkCustomSlotElementsLoaded", 7);
|
8
9
|
this.slotName = 'CUSTOM_SLOT_ELEMENTS';
|
9
10
|
}
|
11
|
+
componentDidLoad() {
|
12
|
+
this.snkCustomSlotElementsLoaded.emit(this.slotName);
|
13
|
+
}
|
10
14
|
render() {
|
11
|
-
return (h(Host, { slot: this.slotName
|
15
|
+
return (h(Host, { slot: this.slotName, id: this.slotName, class: "custom-slot-elements-container" }, h("slot", null)));
|
12
16
|
}
|
13
17
|
};
|
14
18
|
SnkCustomSlotElements.style = snkCustomSlotElementsCss;
|
@@ -3,11 +3,11 @@ import { ApplicationContext, ObjectUtils, DataType, ElementIDUtils } from '@sank
|
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
4
|
import { D as DataExporterOption, a as DataExporterFormat, b as DataExporterType } from './index-0ece87a6.js';
|
5
5
|
import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants-8457af36.js';
|
6
|
-
import { D as DataFetcher } from './DataFetcher-
|
7
|
-
import { S as SnkDataUnit } from './snk-data-unit-
|
6
|
+
import { D as DataFetcher } from './DataFetcher-c1baf61d.js';
|
7
|
+
import { S as SnkDataUnit } from './snk-data-unit-de1d140d.js';
|
8
8
|
import './PrintUtils-3e4ff0f5.js';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
-
import './SnkMessageBuilder-
|
10
|
+
import './SnkMessageBuilder-0a4becdd.js';
|
11
11
|
|
12
12
|
class ItemBuilder {
|
13
13
|
constructor(getMessage, selectedNumber) {
|
@@ -440,14 +440,14 @@ const SnkDataExporter = class {
|
|
440
440
|
const pkObject = [];
|
441
441
|
const appId = (option === null || option === void 0 ? void 0 : option.replace(this._customPrefix, "")) || "";
|
442
442
|
(_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs().forEach(({ name, type, value }, index) => {
|
443
|
-
const fields =
|
443
|
+
const fields = {};
|
444
444
|
fields['fields'] = [];
|
445
445
|
// Se for o primeiro elemento, adiciona essa primeira PK
|
446
446
|
if (index === 0) {
|
447
447
|
pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
|
448
448
|
pkObject['pks'] = [];
|
449
449
|
}
|
450
|
-
const dataFields = { nome: name
|
450
|
+
const dataFields = { nome: `PK_${name}`, tipo: this.parseDataType(type), valor: value };
|
451
451
|
fields['fields'].push(dataFields);
|
452
452
|
pkObject['pks'].push(fields);
|
453
453
|
});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-a7d3d3f1.js';
|
2
2
|
import { Action, ObjectUtils, JSUtils, DataUnitAction, ApplicationContext, DataType } from '@sankhyalabs/core';
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
|
-
import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder-
|
4
|
+
import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder-0a4becdd.js';
|
5
5
|
|
6
6
|
const SnkDataUnit = class {
|
7
7
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export { S as snk_data_unit } from './snk-data-unit-
|
1
|
+
export { S as snk_data_unit } from './snk-data-unit-de1d140d.js';
|
2
2
|
import './index-a7d3d3f1.js';
|
3
3
|
import '@sankhyalabs/core';
|
4
4
|
import '@sankhyalabs/ezui/dist/collection/utils';
|
5
|
-
import './SnkMessageBuilder-
|
5
|
+
import './SnkMessageBuilder-0a4becdd.js';
|
@@ -1,24 +1,23 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host } from './index-a7d3d3f1.js';
|
2
2
|
import { Action } from '@sankhyalabs/core';
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-f53f9f87.js';
|
4
4
|
import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
5
|
-
import './DataFetcher-
|
6
|
-
import './pesquisa-fetcher-
|
5
|
+
import './DataFetcher-c1baf61d.js';
|
6
|
+
import './pesquisa-fetcher-fe6f3826.js';
|
7
7
|
import { P as PresentationMode } from './index-0ece87a6.js';
|
8
8
|
import './ISave-d8c8bc59.js';
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
|
-
import './PreloadManager-c1c2f2b4.js';
|
12
11
|
import './filter-item-type.enum-d45e026f.js';
|
13
|
-
import './form-config-fetcher-
|
12
|
+
import './form-config-fetcher-30fb808f.js';
|
14
13
|
import { T as TaskbarElement } from './taskbar-elements-2473c8ac.js';
|
15
14
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
16
|
-
import { S as SnkGuidesViewer } from './snk-guides-viewer-
|
17
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-
|
18
|
-
import './ConfigStorage-
|
15
|
+
import { S as SnkGuidesViewer } from './snk-guides-viewer-113be3fd.js';
|
16
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-0a4becdd.js';
|
17
|
+
import './ConfigStorage-86187da3.js';
|
19
18
|
import './PrintUtils-3e4ff0f5.js';
|
20
|
-
import './ResourceIDUtils-a114189a.js';
|
21
19
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
20
|
+
import './ResourceIDUtils-a114189a.js';
|
22
21
|
import './index-bdf75557.js';
|
23
22
|
import './field-search-efbe307f.js';
|
24
23
|
import '@sankhyalabs/core/dist/dataunit/DataUnit';
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext } from '@sankhyalabs/core';
|
3
3
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-86187da3.js';
|
5
5
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
6
6
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
7
7
|
import { F as FilterOperand } from './index-ae591a44.js';
|
8
8
|
import { F as FilterNumberVariation } from './filterNumberVariation-8cee02ea.js';
|
9
9
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
10
10
|
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-e2b38ef7.js';
|
11
|
-
import './form-config-fetcher-
|
12
|
-
import './DataFetcher-
|
11
|
+
import './form-config-fetcher-30fb808f.js';
|
12
|
+
import './DataFetcher-c1baf61d.js';
|
13
13
|
import './PrintUtils-3e4ff0f5.js';
|
14
14
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
15
15
|
|
@@ -248,7 +248,7 @@ class SnkFilterModalFactory {
|
|
248
248
|
}
|
249
249
|
}
|
250
250
|
|
251
|
-
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:8px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{
|
251
|
+
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:8px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{width:0px;height:0px}[data-mode=\"button\"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__scroller.sc-snk-filter-bar{height:calc(100% + var(--space-extra-small, 3px))}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-self:center}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
|
252
252
|
|
253
253
|
const SnkFilterBar = class {
|
254
254
|
constructor(hostRef) {
|
@@ -281,12 +281,18 @@ const SnkFilterBar = class {
|
|
281
281
|
this.filterConfig = undefined;
|
282
282
|
this.messagesBuilder = undefined;
|
283
283
|
this.disablePersonalizedFilter = undefined;
|
284
|
+
this.filterBarLegacyConfigName = undefined;
|
284
285
|
this.allowDefault = undefined;
|
285
286
|
this.scrollerLocked = false;
|
286
287
|
this.showPersonalizedFilter = false;
|
287
288
|
this.personalizedFilterId = undefined;
|
288
289
|
}
|
289
290
|
observeFilterConfig(newValue, oldValue) {
|
291
|
+
if (ObjectUtils.equals(newValue, oldValue))
|
292
|
+
return;
|
293
|
+
this.handleFilterConfigsChanged(oldValue, newValue);
|
294
|
+
}
|
295
|
+
handleFilterConfigsChanged(oldValue, newValue) {
|
290
296
|
if (oldValue != undefined && newValue == undefined) {
|
291
297
|
this._loadingPending = true;
|
292
298
|
this._configUpdated = true;
|
@@ -489,6 +495,17 @@ const SnkFilterBar = class {
|
|
489
495
|
filterActiveFilter(item) {
|
490
496
|
return item.visible || item.removalBlocked;
|
491
497
|
}
|
498
|
+
filterPersonalizedItems(item) {
|
499
|
+
return item.type === FilterItemType.PERSONALIZED;
|
500
|
+
}
|
501
|
+
getPersonalizedFilterVariableItems() {
|
502
|
+
return this.filterConfig
|
503
|
+
.filter(this.filterPersonalizedItems)
|
504
|
+
.map(item => {
|
505
|
+
const itemId = `filter-${item.id}`;
|
506
|
+
return (h("snk-filter-item", { key: item.id, id: itemId, config: Object.assign({}, item), onFocusin: () => this.itemFocused(itemId), onVisibleChanged: (evt) => this.scrollerLocked = evt.detail, onFilterChange: (event) => this.updateFilter(event.detail), getMessage: (key, props) => this.getMessage(key, props), showChips: false }));
|
507
|
+
});
|
508
|
+
}
|
492
509
|
getFilterItems() {
|
493
510
|
const pinnedItems = [];
|
494
511
|
const unpinnedItems = [];
|
@@ -548,6 +565,11 @@ const SnkFilterBar = class {
|
|
548
565
|
loadPermitions() {
|
549
566
|
this._application.isUserSup().then(value => this.allowDefault = value);
|
550
567
|
}
|
568
|
+
addFilterBarLegacyConfigName() {
|
569
|
+
if (this.filterBarLegacyConfigName && this.configName) {
|
570
|
+
ConfigStorage.addFilterBarLegacyConfig(this.configName, this.filterBarLegacyConfigName);
|
571
|
+
}
|
572
|
+
}
|
551
573
|
async loadConfigFromStorage(clearCache) {
|
552
574
|
if (clearCache) {
|
553
575
|
await ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
|
@@ -654,6 +676,7 @@ const SnkFilterBar = class {
|
|
654
676
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
655
677
|
if (this._application) {
|
656
678
|
this.loadPermitions();
|
679
|
+
this.addFilterBarLegacyConfigName();
|
657
680
|
this.loadConfigFromStorage();
|
658
681
|
}
|
659
682
|
this.attachDataUnit();
|
@@ -668,9 +691,10 @@ const SnkFilterBar = class {
|
|
668
691
|
if (this.showPersonalizedFilter) {
|
669
692
|
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
|
670
693
|
}
|
671
|
-
if (this.mode
|
672
|
-
return (h(Host, { "data-mode": this.mode }, h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) })));
|
673
|
-
|
694
|
+
if (this.mode !== "regular") {
|
695
|
+
return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }))));
|
696
|
+
}
|
697
|
+
return (h(Host, null, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
|
674
698
|
}
|
675
699
|
get _element() { return getElement(this); }
|
676
700
|
static get watchers() { return {
|
@@ -12,6 +12,7 @@ const SnkFilterDetail = class {
|
|
12
12
|
this.filterChange = createEvent(this, "filterChange", 7);
|
13
13
|
this.config = undefined;
|
14
14
|
this.getMessage = undefined;
|
15
|
+
this.showHardFixed = true;
|
15
16
|
}
|
16
17
|
/**
|
17
18
|
* Exibe o componente snk-filter-detail.
|
@@ -89,7 +90,9 @@ const SnkFilterDetail = class {
|
|
89
90
|
return Object.assign(Object.assign({}, item), { visible: false, fixed: false, value: undefined });
|
90
91
|
}
|
91
92
|
getPopUpHeaderButtons() {
|
92
|
-
return (h(Fragment, null, !this.config.removalBlocked &&
|
93
|
+
return (h(Fragment, null, !this.config.removalBlocked &&
|
94
|
+
this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), this.showHardFixed && !this.config.hardFixed &&
|
95
|
+
this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))));
|
93
96
|
}
|
94
97
|
buildIcon(title, iconName, action) {
|
95
98
|
return (h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", ref: elem => elem && this.buildIdButton(elem, title) }, h("ez-icon", Object.assign({ title: title, iconName: iconName }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`_${title}`)}` }))));
|
@@ -18,6 +18,7 @@ const SnkFilterItem = class {
|
|
18
18
|
this.detailIsVisible = undefined;
|
19
19
|
this.config = undefined;
|
20
20
|
this.getMessage = undefined;
|
21
|
+
this.showChips = true;
|
21
22
|
}
|
22
23
|
observeDetailIsVisible(value) {
|
23
24
|
this.visibleChanged.emit(value);
|
@@ -49,19 +50,22 @@ const SnkFilterItem = class {
|
|
49
50
|
autoClose: true,
|
50
51
|
innerClickTest: this.innerClickCheck,
|
51
52
|
backClickListener: () => this.onDetailCloseCallback(),
|
52
|
-
left: this.
|
53
|
-
top: this.
|
53
|
+
left: this.getOffsetLeft(),
|
54
|
+
top: this.getOffsetTop(),
|
54
55
|
useOverlay: true,
|
55
56
|
overlayClassName: 'ez-scrim ez-scrim--light',
|
56
57
|
isFixed: true
|
57
58
|
};
|
58
59
|
}
|
59
|
-
|
60
|
+
getOffsetLeft() {
|
60
61
|
const padding = getComputedStyle(this._filterItemElement).getPropertyValue("padding-left");
|
61
62
|
const rect = this._filterItemElement.getBoundingClientRect();
|
62
|
-
|
63
|
+
// Width baseado no conteudo do snk-filter-detail. Nesse momento ele retorna 0px pois ainda não foi criado em tela.
|
64
|
+
const filterDetailWidth = 430;
|
65
|
+
const adjustRightPosition = filterDetailWidth - (document.body.clientWidth - rect.left);
|
66
|
+
return `calc(${rect.x}px + ${padding} - ${adjustRightPosition > 0 ? adjustRightPosition : 0}px)`;
|
63
67
|
}
|
64
|
-
|
68
|
+
getOffsetTop() {
|
65
69
|
const rect = this._filterItemElement.getBoundingClientRect();
|
66
70
|
return (rect.y + rect.height) + "px";
|
67
71
|
}
|
@@ -293,7 +297,7 @@ const SnkFilterItem = class {
|
|
293
297
|
}
|
294
298
|
render() {
|
295
299
|
const leftIcon = this.getLeftIconName();
|
296
|
-
return (h(Host, null, h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon
|
300
|
+
return (h(Host, null, this.showChips && (h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon && (h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" })), h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" }))), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail, showHardFixed: this.showChips }))));
|
297
301
|
}
|
298
302
|
get _filterItemElement() { return getElement(this); }
|
299
303
|
static get watchers() { return {
|