@sankhyalabs/sankhyablocks 8.1.0-rc.3 → 8.2.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-73e7afff.js → ConfigStorage-12397f18.js} +163 -51
- package/dist/cjs/{DataFetcher-004811c6.js → DataFetcher-f2da1f79.js} +68 -30
- package/dist/cjs/ISave-d68ce3cd.js +8 -0
- package/dist/cjs/ResourceIDUtils-5ff86aa7.js +12 -0
- package/dist/cjs/{SnkFormConfigManager-d1f1a222.js → SnkFormConfigManager-13f79e37.js} +19 -21
- package/dist/cjs/{auth-fetcher-58237931.js → auth-fetcher-319a4cb2.js} +2 -2
- package/dist/cjs/{dataunit-fetcher-029eafbd.js → dataunit-fetcher-e72068c1.js} +1 -1
- package/dist/cjs/{form-config-fetcher-181767c9.js → form-config-fetcher-5d62ab62.js} +66 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-9a97994a.js → pesquisa-fetcher-8c363096.js} +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button.cjs.entry.js +18 -11
- package/dist/cjs/snk-application.cjs.entry.js +49 -44
- package/dist/cjs/snk-attach.cjs.entry.js +7 -13
- package/dist/cjs/snk-configurator.cjs.entry.js +2 -1
- package/dist/cjs/snk-crud.cjs.entry.js +25 -10
- package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
- package/dist/cjs/{snk-data-unit-e89e07bd.js → snk-data-unit-80a00ae4.js} +4 -3
- package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +14 -12
- package/dist/cjs/snk-entity-list.cjs.entry.js +0 -4
- package/dist/cjs/snk-filter-bar.cjs.entry.js +14 -17
- package/dist/cjs/snk-filter-detail.cjs.entry.js +1 -15
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +5 -19
- package/dist/cjs/snk-form-config.cjs.entry.js +6 -17
- package/dist/cjs/snk-form-view.cjs.entry.js +6 -1
- package/dist/cjs/snk-form.cjs.entry.js +12 -8
- package/dist/cjs/snk-grid-config.cjs.entry.js +5 -6
- package/dist/cjs/snk-grid.cjs.entry.js +17 -20
- package/dist/cjs/{snk-guides-viewer-27f87d90.js → snk-guides-viewer-a7cd6fda.js} +17 -7
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -8
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +13 -16
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +20 -72
- package/dist/cjs/snk-taskbar.cjs.entry.js +2 -1
- package/dist/collection/components/snk-actions-button/actions/index.js +3 -4
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +8 -4
- package/dist/collection/components/snk-application/snk-application.js +60 -65
- package/dist/collection/components/snk-configurator/snk-configurator.js +19 -1
- package/dist/collection/components/snk-crud/snk-crud.js +40 -6
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +42 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +27 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +47 -28
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +21 -4
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +0 -23
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +2 -12
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +21 -16
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +28 -12
- package/dist/collection/components/snk-form/SnkFormConfigManager.js +17 -19
- package/dist/collection/components/snk-form/snk-form.js +46 -2
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +5 -15
- package/dist/collection/components/snk-grid/snk-grid.js +51 -15
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +19 -1
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +28 -12
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +22 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +19 -1
- package/dist/collection/lib/configs/ConfigStorage.js +33 -44
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +2 -59
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +39 -30
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +0 -24
- package/dist/collection/lib/index.js +10 -0
- package/dist/collection/lib/resourceid/ResourceIDUtils.js +7 -0
- package/dist/collection/lib/utils/urlutils.js +29 -0
- package/dist/components/ConfigStorage.js +161 -48
- package/dist/components/DataFetcher.js +68 -30
- package/dist/components/ResourceIDUtils.js +10 -0
- package/dist/components/SnkFormConfigManager.js +17 -19
- package/dist/components/auth-fetcher.js +1 -1
- package/dist/components/form-config-fetcher.js +64 -2
- package/dist/components/snk-actions-button2.js +23 -9
- package/dist/components/snk-application2.js +134 -128
- package/dist/components/snk-attach2.js +1 -8
- package/dist/components/snk-configurator2.js +3 -1
- package/dist/components/snk-crud.js +23 -6
- package/dist/components/snk-data-unit2.js +5 -3
- package/dist/components/snk-detail-view2.js +20 -8
- package/dist/components/snk-entity-list.js +0 -4
- package/dist/components/snk-filter-bar2.js +12 -12
- package/dist/components/snk-filter-detail2.js +2 -12
- package/dist/components/snk-filter-modal-item2.js +5 -16
- package/dist/components/snk-form-config2.js +5 -15
- package/dist/components/snk-form-view2.js +6 -1
- package/dist/components/snk-form.js +9 -2
- package/dist/components/snk-grid-config2.js +4 -2
- package/dist/components/snk-grid2.js +17 -16
- package/dist/components/snk-personalized-filter2.js +11 -11
- package/dist/components/snk-simple-crud2.js +8 -60
- package/dist/components/snk-taskbar2.js +3 -1
- package/dist/esm/{ConfigStorage-19a7260b.js → ConfigStorage-932ab366.js} +162 -49
- package/dist/esm/{DataFetcher-e0fc5549.js → DataFetcher-7e18aa30.js} +68 -30
- package/dist/esm/ISave-4412b20c.js +8 -0
- package/dist/esm/ResourceIDUtils-a114189a.js +10 -0
- package/dist/esm/{SnkFormConfigManager-1a42eb02.js → SnkFormConfigManager-bb9afc3f.js} +19 -21
- package/dist/esm/{auth-fetcher-83a946f8.js → auth-fetcher-6d9664b7.js} +1 -1
- package/dist/esm/{dataunit-fetcher-6a695723.js → dataunit-fetcher-91a4eb82.js} +1 -1
- package/dist/esm/{form-config-fetcher-9e167008.js → form-config-fetcher-aaaa79a6.js} +65 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-9118eb7a.js → pesquisa-fetcher-56b30fb4.js} +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button.entry.js +18 -11
- package/dist/esm/snk-application.entry.js +49 -44
- package/dist/esm/snk-attach.entry.js +3 -9
- package/dist/esm/snk-configurator.entry.js +2 -1
- package/dist/esm/snk-crud.entry.js +25 -10
- package/dist/esm/snk-data-exporter.entry.js +2 -2
- package/dist/esm/{snk-data-unit-8c4d944d.js → snk-data-unit-3ab57d1a.js} +4 -3
- package/dist/esm/snk-data-unit.entry.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +14 -12
- package/dist/esm/snk-entity-list.entry.js +0 -4
- package/dist/esm/snk-filter-bar.entry.js +14 -17
- package/dist/esm/snk-filter-detail.entry.js +2 -16
- package/dist/esm/snk-filter-modal-item.entry.js +6 -20
- package/dist/esm/snk-form-config.entry.js +7 -18
- package/dist/esm/snk-form-view.entry.js +6 -1
- package/dist/esm/snk-form.entry.js +12 -8
- package/dist/esm/snk-grid-config.entry.js +5 -6
- package/dist/esm/snk-grid.entry.js +17 -20
- package/dist/esm/{snk-guides-viewer-c47cd45e.js → snk-guides-viewer-cc709b5f.js} +17 -7
- package/dist/esm/snk-guides-viewer.entry.js +8 -8
- package/dist/esm/snk-personalized-filter.entry.js +13 -16
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +10 -62
- package/dist/esm/snk-taskbar.entry.js +2 -1
- package/dist/sankhyablocks/p-01739b21.entry.js +1 -0
- package/dist/sankhyablocks/{p-e7e54737.entry.js → p-03bb1aea.entry.js} +1 -1
- package/dist/sankhyablocks/p-05dbc70e.entry.js +1 -0
- package/dist/sankhyablocks/{p-0a4c753d.js → p-14eac6fe.js} +1 -1
- package/dist/sankhyablocks/{p-2ac9c585.js → p-2d333d22.js} +1 -1
- package/dist/sankhyablocks/p-41e897f1.js +56 -0
- package/dist/sankhyablocks/p-48a40939.js +1 -0
- package/dist/sankhyablocks/p-611aa624.entry.js +1 -0
- package/dist/sankhyablocks/p-66bb8c20.entry.js +1 -0
- package/dist/sankhyablocks/p-688dcb4c.js +1 -0
- package/dist/sankhyablocks/p-6f154396.entry.js +1 -0
- package/dist/sankhyablocks/p-787071a8.js +1 -0
- package/dist/sankhyablocks/p-8481bb59.entry.js +1 -0
- package/dist/sankhyablocks/p-8818d8f6.entry.js +1 -0
- package/dist/sankhyablocks/p-93f6ca04.entry.js +1 -0
- package/dist/sankhyablocks/p-9a270401.entry.js +1 -0
- package/dist/sankhyablocks/p-9e7d65a4.js +1 -0
- package/dist/sankhyablocks/p-a52a6c9d.js +26 -0
- package/dist/sankhyablocks/p-b6003974.entry.js +1 -0
- package/dist/sankhyablocks/p-c555075c.entry.js +1 -0
- package/dist/sankhyablocks/{p-e5845241.entry.js → p-d13c00b6.entry.js} +1 -1
- package/dist/sankhyablocks/p-d4f9ee17.entry.js +1 -0
- package/dist/sankhyablocks/p-d53a9169.entry.js +1 -0
- package/dist/sankhyablocks/p-d7638f45.entry.js +11 -0
- package/dist/sankhyablocks/p-e086cc2a.entry.js +1 -0
- package/dist/sankhyablocks/p-e64f3e17.entry.js +1 -0
- package/dist/sankhyablocks/p-ed41b38c.js +1 -0
- package/dist/sankhyablocks/p-ed705cbb.entry.js +1 -0
- package/dist/sankhyablocks/p-efc10705.entry.js +1 -0
- package/dist/sankhyablocks/p-f74fe358.js +1 -0
- package/dist/sankhyablocks/{p-df8621b4.js → p-f8e6b97e.js} +1 -1
- package/dist/sankhyablocks/p-f91e0c5d.entry.js +1 -0
- package/dist/sankhyablocks/p-fa523d6b.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/actions/index.d.ts +2 -1
- package/dist/types/components/snk-application/snk-application.d.ts +8 -13
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +4 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +5 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +8 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +5 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +9 -2
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +4 -0
- package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +0 -4
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +0 -3
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +5 -4
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -0
- package/dist/types/components/snk-form/SnkFormConfigManager.d.ts +5 -4
- package/dist/types/components/snk-form/snk-form.d.ts +9 -1
- package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +0 -2
- package/dist/types/components/snk-grid/snk-grid.d.ts +5 -1
- package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +5 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +4 -0
- package/dist/types/components.d.ts +125 -21
- package/dist/types/lib/configs/ConfigStorage.d.ts +11 -13
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +0 -7
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +0 -1
- package/dist/types/lib/index.d.ts +11 -0
- package/dist/types/lib/resourceid/ResourceIDUtils.d.ts +3 -0
- package/dist/types/lib/utils/urlutils.d.ts +14 -0
- package/package.json +2 -2
- package/dist/cjs/filter-bar-config-fetcher-2b8ed9d0.js +0 -155
- package/dist/cjs/resource-fetcher-c0332609.js +0 -68
- package/dist/components/filter-bar-config-fetcher.js +0 -153
- package/dist/components/resource-fetcher.js +0 -66
- package/dist/esm/filter-bar-config-fetcher-06e02851.js +0 -153
- package/dist/esm/resource-fetcher-768d5556.js +0 -66
- package/dist/sankhyablocks/p-0ed0fc02.entry.js +0 -1
- package/dist/sankhyablocks/p-216f081a.entry.js +0 -1
- package/dist/sankhyablocks/p-22c6fe1a.entry.js +0 -1
- package/dist/sankhyablocks/p-34a1357a.entry.js +0 -1
- package/dist/sankhyablocks/p-4721c3db.js +0 -1
- package/dist/sankhyablocks/p-564efc43.js +0 -1
- package/dist/sankhyablocks/p-6759adae.entry.js +0 -1
- package/dist/sankhyablocks/p-7b8b8ae9.js +0 -10
- package/dist/sankhyablocks/p-7e285d6c.entry.js +0 -11
- package/dist/sankhyablocks/p-815a42c0.entry.js +0 -1
- package/dist/sankhyablocks/p-8a41172a.entry.js +0 -1
- package/dist/sankhyablocks/p-8f8184ff.js +0 -56
- package/dist/sankhyablocks/p-976e56e9.js +0 -1
- package/dist/sankhyablocks/p-98f9d076.js +0 -17
- package/dist/sankhyablocks/p-bc735728.entry.js +0 -1
- package/dist/sankhyablocks/p-be684b38.entry.js +0 -1
- package/dist/sankhyablocks/p-befbc9ee.entry.js +0 -1
- package/dist/sankhyablocks/p-c0f656af.entry.js +0 -1
- package/dist/sankhyablocks/p-c32b9d7c.entry.js +0 -1
- package/dist/sankhyablocks/p-c57bd935.entry.js +0 -1
- package/dist/sankhyablocks/p-c6380ea2.entry.js +0 -1
- package/dist/sankhyablocks/p-cfd7da4a.entry.js +0 -1
- package/dist/sankhyablocks/p-d1b89765.js +0 -1
- package/dist/sankhyablocks/p-de69b4b0.entry.js +0 -1
- package/dist/sankhyablocks/p-e28129aa.entry.js +0 -1
- package/dist/sankhyablocks/p-f31bfdee.entry.js +0 -1
- package/dist/sankhyablocks/p-f88c45bf.js +0 -1
- package/dist/sankhyablocks/p-fe010e54.entry.js +0 -1
@@ -1,23 +1,16 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
2
2
|
import { ApplicationContext, DataType, Action } from '@sankhyalabs/core';
|
3
3
|
import { D as DataFetcher } from './DataFetcher.js';
|
4
|
+
import { a as SaveErrorsEnum, d as defineCustomElement$7 } from './snk-actions-button2.js';
|
4
5
|
import { V as VIEW_MODE } from './constants.js';
|
5
6
|
import { D as DataUnitFetcher } from './dataunit-fetcher.js';
|
6
7
|
import { T as TaskbarElement, d as defineCustomElement$1 } from './snk-taskbar2.js';
|
7
|
-
import { d as defineCustomElement$7 } from './snk-actions-button2.js';
|
8
8
|
import { d as defineCustomElement$6 } from './snk-data-exporter2.js';
|
9
9
|
import { d as defineCustomElement$5 } from './snk-data-unit2.js';
|
10
10
|
import { d as defineCustomElement$4 } from './snk-exporter-email-sender2.js';
|
11
11
|
import { d as defineCustomElement$3 } from './snk-simple-bar2.js';
|
12
12
|
import { d as defineCustomElement$2 } from './snk-simple-crud2.js';
|
13
13
|
|
14
|
-
var SaveErrorsEnum;
|
15
|
-
(function (SaveErrorsEnum) {
|
16
|
-
SaveErrorsEnum["LINK_AND_FILE_AT_THE_SAME_TIME"] = "LINK_AND_FILE_AT_THE_SAME_TIME";
|
17
|
-
SaveErrorsEnum["ANY_LINK_OR_FILE_FILLED"] = "ANY_LINK_OR_FILE_FILLED";
|
18
|
-
SaveErrorsEnum["UNKNOWN"] = "UNKNOWN";
|
19
|
-
})(SaveErrorsEnum || (SaveErrorsEnum = {}));
|
20
|
-
|
21
14
|
class AttachFetcher {
|
22
15
|
constructor(entityName, registerKey, dataUnitName) {
|
23
16
|
var _a;
|
@@ -17,6 +17,7 @@ const SnkConfigurator = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
17
17
|
this._permissions = undefined;
|
18
18
|
this.showActionButtons = false;
|
19
19
|
this.configName = undefined;
|
20
|
+
this.resourceID = undefined;
|
20
21
|
this.viewMode = VIEW_MODE.GRID;
|
21
22
|
this.messagesBuilder = undefined;
|
22
23
|
}
|
@@ -81,7 +82,7 @@ const SnkConfigurator = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
81
82
|
componentWillLoad() {
|
82
83
|
this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
|
83
84
|
if (this._application) {
|
84
|
-
this._application.getAllAccess().then(access => (this._permissions = access));
|
85
|
+
this._application.getAllAccess(this.resourceID).then(access => (this._permissions = access));
|
85
86
|
}
|
86
87
|
else {
|
87
88
|
this._permissions = {};
|
@@ -94,6 +95,7 @@ const SnkConfigurator = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
94
95
|
}, [6, "snk-configurator", {
|
95
96
|
"showActionButtons": [4, "show-action-buttons"],
|
96
97
|
"configName": [1, "config-name"],
|
98
|
+
"resourceID": [1, "resource-i-d"],
|
97
99
|
"viewMode": [2, "view-mode"],
|
98
100
|
"messagesBuilder": [1040],
|
99
101
|
"_opened": [32],
|
@@ -4,9 +4,13 @@ import { T as TaskbarElement, d as defineCustomElement$2 } from './snk-taskbar2.
|
|
4
4
|
import './DataFetcher.js';
|
5
5
|
import './pesquisa-fetcher.js';
|
6
6
|
import { P as PresentationMode } from './index2.js';
|
7
|
+
import { d as defineCustomElement$v } from './snk-actions-button2.js';
|
8
|
+
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
9
|
+
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
+
import './filter-item-type.enum.js';
|
11
|
+
import './form-config-fetcher.js';
|
7
12
|
import { V as VIEW_MODE } from './constants.js';
|
8
13
|
import { A as AutorizationType } from './auth-fetcher.js';
|
9
|
-
import { d as defineCustomElement$v } from './snk-actions-button2.js';
|
10
14
|
import { d as defineCustomElement$u } from './snk-attach2.js';
|
11
15
|
import { d as defineCustomElement$t } from './snk-config-options2.js';
|
12
16
|
import { d as defineCustomElement$s } from './snk-configurator2.js';
|
@@ -44,12 +48,14 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
44
48
|
this.actionClick = createEvent(this, "actionClick", 7);
|
45
49
|
this.configuratorSave = createEvent(this, "configuratorSave", 7);
|
46
50
|
this.configuratorCancel = createEvent(this, "configuratorCancel", 7);
|
51
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
47
52
|
this._viewHistory = [];
|
48
53
|
this._dataUnit = undefined;
|
49
54
|
this._dataState = undefined;
|
50
55
|
this.attachmentRegisterKey = undefined;
|
51
56
|
this._currentViewMode = VIEW_MODE.GRID;
|
52
57
|
this._canEdit = undefined;
|
58
|
+
this._resourceID = undefined;
|
53
59
|
this.configName = undefined;
|
54
60
|
this.selectionToastConfig = undefined;
|
55
61
|
this.showActionButtons = false;
|
@@ -144,7 +150,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
144
150
|
}
|
145
151
|
componentWillLoad() {
|
146
152
|
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
147
|
-
application.hasAccess(AutorizationType.UPDATE).then(canEdit => this._canEdit = canEdit);
|
153
|
+
application.hasAccess(AutorizationType.UPDATE, this._resourceID).then(canEdit => this._canEdit = canEdit);
|
148
154
|
let parent = this._element.parentElement;
|
149
155
|
while (parent) {
|
150
156
|
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
@@ -156,11 +162,11 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
156
162
|
if (!this._dataUnit) {
|
157
163
|
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
158
164
|
this._dataUnit = evt.detail;
|
159
|
-
this.initDataUnit();
|
165
|
+
this.initDataUnit(application);
|
160
166
|
});
|
161
167
|
}
|
162
168
|
else {
|
163
|
-
this.initDataUnit();
|
169
|
+
this.initDataUnit(application);
|
164
170
|
}
|
165
171
|
this._snkDataUnit.addEventListener("dataStateChange", async ({ detail: dataState }) => {
|
166
172
|
this._dataState = dataState;
|
@@ -176,11 +182,18 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
176
182
|
this.configName = application.configName;
|
177
183
|
}
|
178
184
|
}
|
179
|
-
initDataUnit() {
|
185
|
+
async initDataUnit(application) {
|
180
186
|
this.addDataElementID();
|
181
187
|
if (!this.messagesBuilder) {
|
182
188
|
this.messagesBuilder = this._snkDataUnit.messagesBuilder;
|
183
189
|
}
|
190
|
+
if (this._resourceID == undefined) {
|
191
|
+
//Tenta pegar o resourceID do snkDataUnit;
|
192
|
+
this._resourceID = this._snkDataUnit.resourceID;
|
193
|
+
if (this._resourceID == undefined) {
|
194
|
+
this._resourceID = await application.getResourceID();
|
195
|
+
}
|
196
|
+
}
|
184
197
|
}
|
185
198
|
handleConfiguratorEvent(evt, type) {
|
186
199
|
evt.stopImmediatePropagation();
|
@@ -191,8 +204,11 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
191
204
|
this.configuratorCancel.emit();
|
192
205
|
}
|
193
206
|
render() {
|
207
|
+
if (this._resourceID == undefined) {
|
208
|
+
return;
|
209
|
+
}
|
194
210
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
195
|
-
return (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, "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, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit }, 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 }, 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') }, h("div", { slot: "SnkConfigContainerSlot" }, h("slot", { name: "SnkConfigContainerSlot" })))));
|
211
|
+
return (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, "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, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, 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, resourceID: this._resourceID }, 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 }, h("div", { slot: "SnkConfigContainerSlot" }, h("slot", { name: "SnkConfigContainerSlot" })))));
|
196
212
|
}
|
197
213
|
get _element() { return this; }
|
198
214
|
static get watchers() { return {
|
@@ -216,6 +232,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
216
232
|
"attachmentRegisterKey": [32],
|
217
233
|
"_currentViewMode": [32],
|
218
234
|
"_canEdit": [32],
|
235
|
+
"_resourceID": [32],
|
219
236
|
"goToView": [64],
|
220
237
|
"openConfigurator": [64],
|
221
238
|
"closeConfigurator": [64],
|
@@ -71,6 +71,7 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
71
71
|
this.useCancelConfirm = true;
|
72
72
|
this.ignoreSaveMessage = undefined;
|
73
73
|
this.configName = undefined;
|
74
|
+
this.resourceID = undefined;
|
74
75
|
}
|
75
76
|
observePageSize() {
|
76
77
|
if (this.dataUnit) {
|
@@ -334,10 +335,10 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
334
335
|
const cacheName = this.dataUnitName ? this.dataUnitName : this.entityName;
|
335
336
|
if (this._parentSnkDataUnit) {
|
336
337
|
this._parentDataUnit = await ((_a = this._parentSnkDataUnit) === null || _a === void 0 ? void 0 : _a.getDataUnit());
|
337
|
-
return await this._application.getDataUnit(this.entityName, cacheName, this._parentDataUnit, this.configName);
|
338
|
+
return await this._application.getDataUnit(this.entityName, cacheName, this._parentDataUnit, this.configName, this.resourceID);
|
338
339
|
}
|
339
340
|
else {
|
340
|
-
return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName);
|
341
|
+
return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName, this.resourceID);
|
341
342
|
}
|
342
343
|
}
|
343
344
|
async loadDataUnit() {
|
@@ -396,7 +397,7 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
396
397
|
//---------------------------------------------
|
397
398
|
componentWillLoad() {
|
398
399
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
399
|
-
this._application.getAllAccess().then(access => this._permissions = access);
|
400
|
+
this._application.getAllAccess(this.resourceID).then(access => this._permissions = access);
|
400
401
|
this._parentSnkDataUnit = this.getParentSnkDataUnit();
|
401
402
|
if (this.messagesBuilder == undefined) {
|
402
403
|
this.messagesBuilder = new SnkMessageBuilder(this.entityName);
|
@@ -436,6 +437,7 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
436
437
|
"useCancelConfirm": [4, "use-cancel-confirm"],
|
437
438
|
"ignoreSaveMessage": [4, "ignore-save-message"],
|
438
439
|
"configName": [1, "config-name"],
|
440
|
+
"resourceID": [1, "resource-i-d"],
|
439
441
|
"getDataUnit": [64],
|
440
442
|
"getSelectedRecordsIDsInfo": [64]
|
441
443
|
}]);
|
@@ -5,11 +5,15 @@ import './DataFetcher.js';
|
|
5
5
|
import './pesquisa-fetcher.js';
|
6
6
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
7
7
|
import { P as PresentationMode } from './index2.js';
|
8
|
+
import { d as defineCustomElement$t } from './snk-actions-button2.js';
|
9
|
+
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
|
+
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
|
+
import './filter-item-type.enum.js';
|
12
|
+
import './form-config-fetcher.js';
|
8
13
|
import { T as TaskbarElement, d as defineCustomElement$2 } from './snk-taskbar2.js';
|
9
14
|
import { V as VIEW_MODE } from './constants.js';
|
10
15
|
import { T as TaskbarProcessor } from './SnkMultiSelectionListDataSource.js';
|
11
16
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
12
|
-
import { d as defineCustomElement$t } from './snk-actions-button2.js';
|
13
17
|
import { d as defineCustomElement$s } from './snk-attach2.js';
|
14
18
|
import { d as defineCustomElement$r } from './snk-config-options2.js';
|
15
19
|
import { d as defineCustomElement$q } from './snk-configurator2.js';
|
@@ -47,6 +51,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
47
51
|
this.__registerHost();
|
48
52
|
this.exit = createEvent(this, "exit", 7);
|
49
53
|
this.actionClick = createEvent(this, "actionClick", 7);
|
54
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
50
55
|
this._guideBuilders = new Map();
|
51
56
|
this.dataUnit = undefined;
|
52
57
|
this.dataState = undefined;
|
@@ -60,6 +65,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
60
65
|
this.messagesBuilder = undefined;
|
61
66
|
this.canEdit = true;
|
62
67
|
this.presentationMode = undefined;
|
68
|
+
this.resourceID = undefined;
|
63
69
|
this._breadcrumbItems = [];
|
64
70
|
this._guides = undefined;
|
65
71
|
this._formEditorConfigManager = undefined;
|
@@ -261,7 +267,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
261
267
|
else {
|
262
268
|
detailBranch = this.selectedGuide;
|
263
269
|
}
|
264
|
-
content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail) }));
|
270
|
+
content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID }));
|
265
271
|
}
|
266
272
|
else {
|
267
273
|
const cardId = this.selectedGuide.id;
|
@@ -310,7 +316,10 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
310
316
|
return this.selectedGuide === undefined || '__main' === ((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id);
|
311
317
|
}
|
312
318
|
componentWillLoad() {
|
313
|
-
|
319
|
+
if (this.resourceID == undefined) {
|
320
|
+
throw new Error("Erro interno: resourceID não informado");
|
321
|
+
}
|
322
|
+
this._configManager = new SnkFormConfigManager(this.configName, this.resourceID, config => this.masterFormConfig = config);
|
314
323
|
this._configManager.loadConfig();
|
315
324
|
}
|
316
325
|
componentDidRender() {
|
@@ -329,7 +338,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
329
338
|
}
|
330
339
|
buildTaskBar() {
|
331
340
|
var _a;
|
332
|
-
return h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit }));
|
341
|
+
return h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID }));
|
333
342
|
}
|
334
343
|
render() {
|
335
344
|
var _a, _b;
|
@@ -348,7 +357,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
348
357
|
h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
349
358
|
h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
|
350
359
|
:
|
351
|
-
h("div", null), h("div", { class: "snk-guides-viewer__detail-container" }, SnkGuidesViewer.buildFixedForms(this.masterFormConfig, this._masterFormMetadata, (_b = this.selectedGuide) === null || _b === void 0 ? void 0 : _b.id, this.dataUnit, this.recordsValidator), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail) })));
|
360
|
+
h("div", null), h("div", { class: "snk-guides-viewer__detail-container" }, SnkGuidesViewer.buildFixedForms(this.masterFormConfig, this._masterFormMetadata, (_b = this.selectedGuide) === null || _b === void 0 ? void 0 : _b.id, this.dataUnit, this.recordsValidator), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
|
352
361
|
}
|
353
362
|
static get watchers() { return {
|
354
363
|
"dataUnit": ["observeDataUnit"],
|
@@ -357,7 +366,6 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
357
366
|
}; }
|
358
367
|
static get style() { return snkGuidesViewerCss; }
|
359
368
|
}, [2, "snk-guides-viewer", {
|
360
|
-
"_guideBuilders": [16],
|
361
369
|
"dataUnit": [16],
|
362
370
|
"dataState": [16],
|
363
371
|
"configName": [1, "config-name"],
|
@@ -370,6 +378,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
370
378
|
"messagesBuilder": [1040],
|
371
379
|
"canEdit": [4, "can-edit"],
|
372
380
|
"presentationMode": [1, "presentation-mode"],
|
381
|
+
"resourceID": [1, "resource-i-d"],
|
373
382
|
"_breadcrumbItems": [32],
|
374
383
|
"_guides": [32],
|
375
384
|
"_formEditorConfigManager": [32],
|
@@ -586,11 +595,13 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
586
595
|
this.__registerHost();
|
587
596
|
this.snkDetailGuidesChange = createEvent(this, "snkDetailGuidesChange", 7);
|
588
597
|
this.snkSwitchGuide = createEvent(this, "snkSwitchGuide", 7);
|
598
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
589
599
|
this._disabledButtons = undefined;
|
590
600
|
this._currentView = undefined;
|
591
601
|
this.attachmentRegisterKey = undefined;
|
592
602
|
this.formConfigManager = undefined;
|
593
603
|
this.dataUnitName = undefined;
|
604
|
+
this.resourceID = undefined;
|
594
605
|
this.guideItemPath = undefined;
|
595
606
|
this.entityName = undefined;
|
596
607
|
this.label = undefined;
|
@@ -760,7 +771,7 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
760
771
|
}
|
761
772
|
componentWillLoad() {
|
762
773
|
this._configName = `dynaform.${this.entityName}`;
|
763
|
-
this.formConfigManager = new SnkFormConfigManager(this._configName, () => this.loadMetadata());
|
774
|
+
this.formConfigManager = new SnkFormConfigManager(this._configName, this.resourceID, () => this.loadMetadata());
|
764
775
|
this.formConfigManager.loadConfig();
|
765
776
|
if (this.messagesBuilder == undefined) {
|
766
777
|
this.messagesBuilder = new SnkMessageBuilder(this.entityName);
|
@@ -769,7 +780,7 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
769
780
|
render() {
|
770
781
|
this.updateLabel();
|
771
782
|
//const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
|
772
|
-
return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY, canEdit: this.canEdit, isDetail: true }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
|
783
|
+
return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY, canEdit: this.canEdit, isDetail: true }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems) }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
|
773
784
|
}
|
774
785
|
static get watchers() { return {
|
775
786
|
"dataState": ["observerDataState"]
|
@@ -778,6 +789,7 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
778
789
|
}, [2, "snk-detail-view", {
|
779
790
|
"formConfigManager": [1040],
|
780
791
|
"dataUnitName": [1, "data-unit-name"],
|
792
|
+
"resourceID": [1, "resource-i-d"],
|
781
793
|
"guideItemPath": [16],
|
782
794
|
"entityName": [1, "entity-name"],
|
783
795
|
"label": [1],
|
@@ -8,7 +8,6 @@ const SnkEntityList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
8
8
|
super();
|
9
9
|
this.__registerHost();
|
10
10
|
this.valueChanged = createEvent(this, "valueChanged", 7);
|
11
|
-
this.saveConfig = createEvent(this, "saveConfig", 7);
|
12
11
|
this._searchValue = undefined;
|
13
12
|
this._ezListSource = [];
|
14
13
|
this.config = undefined;
|
@@ -17,7 +16,6 @@ const SnkEntityList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
17
16
|
}
|
18
17
|
async reloadList() {
|
19
18
|
this.loadListSource();
|
20
|
-
this.saveConfig.emit(this.config);
|
21
19
|
}
|
22
20
|
observeConfig() {
|
23
21
|
var _a, _b;
|
@@ -33,7 +31,6 @@ const SnkEntityList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
33
31
|
}
|
34
32
|
});
|
35
33
|
this.config = ObjectUtils.copy(configCopy);
|
36
|
-
this.saveConfig.emit(this.config);
|
37
34
|
this.valueChanged.emit((_b = this.config) === null || _b === void 0 ? void 0 : _b.value);
|
38
35
|
}
|
39
36
|
loadListSource() {
|
@@ -90,7 +87,6 @@ const SnkEntityList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
90
87
|
}
|
91
88
|
] });
|
92
89
|
this.loadListSource();
|
93
|
-
this.saveConfig.emit(this.config);
|
94
90
|
this.valueChanged.emit((_d = this.config) === null || _d === void 0 ? void 0 : _d.value);
|
95
91
|
}
|
96
92
|
}
|
@@ -208,6 +208,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
208
208
|
};
|
209
209
|
this.dataUnit = undefined;
|
210
210
|
this.configName = undefined;
|
211
|
+
this.resourceID = undefined;
|
211
212
|
this.filterConfig = undefined;
|
212
213
|
this.messagesBuilder = undefined;
|
213
214
|
this.allowDefault = undefined;
|
@@ -283,11 +284,11 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
283
284
|
return;
|
284
285
|
}
|
285
286
|
this._loadingPending = false;
|
286
|
-
this.dataUnit.loadData();
|
287
|
+
this.dataUnit.loadData(undefined, undefined, true);
|
287
288
|
}
|
288
289
|
if (this._configUpdated) {
|
289
290
|
this._configUpdated = false;
|
290
|
-
ConfigStorage.saveFilterBarConfig(this.filterConfig, this.configName);
|
291
|
+
ConfigStorage.saveFilterBarConfig(this.filterConfig, this.configName, this.resourceID);
|
291
292
|
}
|
292
293
|
}
|
293
294
|
/**
|
@@ -403,15 +404,13 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
403
404
|
}
|
404
405
|
loadConfigFromStorage() {
|
405
406
|
return new Promise(accept => {
|
406
|
-
ConfigStorage.
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
throw new ErrorException(this.getMessage("snkFilterBar.failToLoadConfig"), reason);
|
414
|
-
});
|
407
|
+
ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name })
|
408
|
+
.then((filters) => {
|
409
|
+
accept();
|
410
|
+
this.filterConfig = filters.map(item => this.normalizeItem(item));
|
411
|
+
})
|
412
|
+
.catch(reason => {
|
413
|
+
throw new ErrorException(this.getMessage("snkFilterBar.failToLoadConfig"), reason);
|
415
414
|
});
|
416
415
|
});
|
417
416
|
}
|
@@ -496,7 +495,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
496
495
|
return undefined;
|
497
496
|
}
|
498
497
|
if (this.showPersonalizedFilter) {
|
499
|
-
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.hidePersonalizedFilter(), entityUri: this.dataUnit.name, configName: this.configName });
|
498
|
+
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.hidePersonalizedFilter(), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
|
500
499
|
}
|
501
500
|
return (h(Host, null, 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" }))));
|
502
501
|
}
|
@@ -508,6 +507,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
508
507
|
}, [2, "snk-filter-bar", {
|
509
508
|
"dataUnit": [1040],
|
510
509
|
"configName": [1, "config-name"],
|
510
|
+
"resourceID": [1, "resource-i-d"],
|
511
511
|
"filterConfig": [1040],
|
512
512
|
"messagesBuilder": [1040],
|
513
513
|
"allowDefault": [32],
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
|
2
2
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
4
|
-
import {
|
5
|
-
import { F as FilterBarConfigFetcher } from './filter-bar-config-fetcher.js';
|
4
|
+
import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
|
6
5
|
import { E as EPresentationMode } from './presentationMode.js';
|
7
6
|
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils.js';
|
8
7
|
|
@@ -28,7 +27,6 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
28
27
|
}
|
29
28
|
componentDidLoad() {
|
30
29
|
if (this._element) {
|
31
|
-
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
32
30
|
ElementIDUtils.addIDInfo(this._element);
|
33
31
|
const dataElementIdDoFilterItem = this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
34
32
|
this._idContentEditor = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
@@ -146,20 +144,12 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
146
144
|
this.config = ObjectUtils.copy(configCopy);
|
147
145
|
}
|
148
146
|
}
|
149
|
-
saveConfig(newConfig) {
|
150
|
-
var _a;
|
151
|
-
(_a = this._application) === null || _a === void 0 ? void 0 : _a.getResourceID().then(resourceId => {
|
152
|
-
const fetcher = new FilterBarConfigFetcher();
|
153
|
-
fetcher.saveEntityListConfig(newConfig, resourceId, this._application.configName);
|
154
|
-
this.config = newConfig;
|
155
|
-
});
|
156
|
-
}
|
157
147
|
componentWillLoad() {
|
158
148
|
this.originalConfig = ObjectUtils.copy(this.config);
|
159
149
|
}
|
160
150
|
render() {
|
161
151
|
const { tag: CustomElement, props } = this.getContentEditor();
|
162
|
-
return (h(Host, null, h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, h("div", { class: "ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header" }, this.config.detailTitle), this.getPopUpHeaderButtons()), h(CustomElement, Object.assign({ maxHeightList: '240px', ref: ref => this._editor = ref, value: this.config.value, config: this.config, onKeyDown: evt => this.onKeyDonwListener(evt), "data-element-id": this._idContentEditor, getMessage: this.getMessage,
|
152
|
+
return (h(Host, null, h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, h("div", { class: "ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header" }, this.config.detailTitle), this.getPopUpHeaderButtons()), h(CustomElement, Object.assign({ maxHeightList: '240px', ref: ref => this._editor = ref, value: this.config.value, config: this.config, onKeyDown: evt => this.onKeyDonwListener(evt), "data-element-id": this._idContentEditor, getMessage: this.getMessage, rightListSlotBuilder: item => this.buildRightSlot(item) }, props)), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, this.filterCanBeCleared() && (h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" })), h("ez-button", { ref: ref => this._applyButton = ref, label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
|
163
153
|
}
|
164
154
|
get _element() { return this; }
|
165
155
|
static get watchers() { return {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
-
import { ElementIDUtils,
|
2
|
+
import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
4
4
|
import { E as EPresentationMode } from './presentationMode.js';
|
5
5
|
import { C as ConfigStorage } from './ConfigStorage.js';
|
@@ -23,14 +23,13 @@ const SnkFilterModalItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
23
23
|
this.addPersonalizedFilter = createEvent(this, "addPersonalizedFilter", 7);
|
24
24
|
this.filterItem = undefined;
|
25
25
|
this.configName = undefined;
|
26
|
+
this.resourceID = undefined;
|
26
27
|
}
|
27
28
|
observeFilterItem(newValue) {
|
28
29
|
var _a, _b;
|
29
30
|
this._editor && (this._editor["config"] = newValue);
|
30
31
|
(_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a['reloadList']) === null || _b === void 0 ? void 0 : _b.call(_a);
|
31
32
|
this.filterChange.emit(newValue);
|
32
|
-
//isso faz o filtro salvar o estado precocemente. Caso: Botão limpar filtro dispara dezenas de vezes
|
33
|
-
//this.saveConfig();
|
34
33
|
}
|
35
34
|
getContentEditorConfig() {
|
36
35
|
const props = { presentationMode: EPresentationMode.MODAL };
|
@@ -72,11 +71,10 @@ const SnkFilterModalItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
72
71
|
else {
|
73
72
|
this.filterItem = Object.assign(Object.assign({}, this.filterItem), { value: this.filterItem.type === FilterItemType.SEARCH ? data : newValue, visible: this.isVisible(newValue) });
|
74
73
|
}
|
75
|
-
this.saveConfig();
|
76
74
|
}
|
77
75
|
handleDeleteFilter(filter, filterItemType) {
|
78
76
|
if (filterItemType === FilterItemType.PERSONALIZED) {
|
79
|
-
ConfigStorage.removePersonalizedFilter(filter, this.configName);
|
77
|
+
ConfigStorage.removePersonalizedFilter(filter, this.resourceID, this.configName);
|
80
78
|
}
|
81
79
|
}
|
82
80
|
componentDidLoad() {
|
@@ -84,7 +82,6 @@ const SnkFilterModalItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
84
82
|
ElementIDUtils.addIDInfo(this._element);
|
85
83
|
const dataElementIdDoFilterItem = this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
86
84
|
this._idContentEditor = `${dataElementIdDoFilterItem}_${this.filterItem.id}`;
|
87
|
-
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
88
85
|
}
|
89
86
|
}
|
90
87
|
buildRightSlot(item) {
|
@@ -101,15 +98,6 @@ const SnkFilterModalItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
101
98
|
const { CUSTOM_FILTER, OTHER_FILTERS } = FilterType$1;
|
102
99
|
return ![CUSTOM_FILTER, OTHER_FILTERS].includes(this.filterItem.filterType) && this.filterItem.type !== FilterItemType.BINARY_SELECT;
|
103
100
|
}
|
104
|
-
saveConfig() {
|
105
|
-
//Precisa ser rediscutido... não podemos salvar configuração por conta própria. Não temos autonomia pra isso.
|
106
|
-
/*if(FilterItemType.MULTI_LIST !== this.filterItem.type) return;
|
107
|
-
|
108
|
-
this._application?.getResourceID().then(resourceId => {
|
109
|
-
const fetcher = new FilterBarConfigFetcher();
|
110
|
-
fetcher.saveEntityListConfig(this.filterItem, resourceId, this._application.configName);
|
111
|
-
});*/
|
112
|
-
}
|
113
101
|
render() {
|
114
102
|
const { tag: ContentEditor, props } = this.getContentEditorConfig();
|
115
103
|
return (h(Host, null, h("div", { class: "ez-flex ez-flex--column grow" }, this.canShowDetailModal() && (h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, h("div", { class: "ez-title ez-title--small ez-title--primary grow" }, this.filterItem.detailModal))), h(ContentEditor, Object.assign({ ref: ref => this._editor = ref, config: this.filterItem, value: this.filterItem.value, onValueChanged: (event) => this.updateFilterValue(event.detail), "data-element-id": this._idContentEditor }, props)))));
|
@@ -121,7 +109,8 @@ const SnkFilterModalItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
121
109
|
static get style() { return snkFilterModalItemCss; }
|
122
110
|
}, [0, "snk-filter-modal-item", {
|
123
111
|
"filterItem": [1040],
|
124
|
-
"configName": [1025, "config-name"]
|
112
|
+
"configName": [1025, "config-name"],
|
113
|
+
"resourceID": [1, "resource-i-d"]
|
125
114
|
}]);
|
126
115
|
function defineCustomElement() {
|
127
116
|
if (typeof customElements === "undefined") {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
2
|
import { a as draggable_bundle, d as defineCustomElement$1 } from './snk-tab-config2.js';
|
3
|
-
import { ObjectUtils, ElementIDUtils, ArrayUtils
|
3
|
+
import { ObjectUtils, ElementIDUtils, ArrayUtils } from '@sankhyalabs/core';
|
4
4
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
5
5
|
import { C as CONFIG_EVENTS, b as TAB_NAMES, A as ACTION_CONFIG, D as DEFAULT_TYPE } from './constants.js';
|
6
6
|
import { U as UserConfigType } from './form-config-fetcher.js';
|
@@ -452,13 +452,10 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
452
452
|
this._sortableGroup.on(CONFIG_EVENTS.dragStop, (evt) => this.controlStopDraggingGroup(evt));
|
453
453
|
}
|
454
454
|
loadUserConfig() {
|
455
|
-
if (this._applicationResourceID == undefined) {
|
456
|
-
return;
|
457
|
-
}
|
458
455
|
if (this.configManager == undefined) {
|
459
456
|
return;
|
460
457
|
}
|
461
|
-
this.configManager.fetchUserAvailableConfigs(
|
458
|
+
this.configManager.fetchUserAvailableConfigs()
|
462
459
|
.then((userConfig) => {
|
463
460
|
this._formConfigOptions = userConfig;
|
464
461
|
if (this._formConfigOptions == undefined) {
|
@@ -512,9 +509,6 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
512
509
|
}
|
513
510
|
}
|
514
511
|
async loadConfigByUser() {
|
515
|
-
if (this._applicationResourceID == undefined) {
|
516
|
-
return;
|
517
|
-
}
|
518
512
|
if (this.configManager == undefined) {
|
519
513
|
return;
|
520
514
|
}
|
@@ -524,10 +518,10 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
524
518
|
let config;
|
525
519
|
switch (this._optionFormConfigSelected.origin) {
|
526
520
|
case UserConfigType.DEFAULT:
|
527
|
-
config = await this.configManager.fetchDefaultConfig(
|
521
|
+
config = await this.configManager.fetchDefaultConfig();
|
528
522
|
break;
|
529
523
|
case UserConfigType.DEFAULT:
|
530
|
-
config = await this.configManager.fetchDefaultConfig(
|
524
|
+
config = await this.configManager.fetchDefaultConfig();
|
531
525
|
break;
|
532
526
|
}
|
533
527
|
if (config != undefined) {
|
@@ -943,11 +937,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
943
937
|
this.controlSortableGroup();
|
944
938
|
}
|
945
939
|
componentWillLoad() {
|
946
|
-
this.
|
947
|
-
this._application.getResourceID().then(resourceID => {
|
948
|
-
this._applicationResourceID = resourceID;
|
949
|
-
this.loadConfig();
|
950
|
-
});
|
940
|
+
this.loadConfig();
|
951
941
|
}
|
952
942
|
componentDidLoad() {
|
953
943
|
const dataInfo = { dataUnit: this.dataUnit };
|
@@ -10,6 +10,7 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
10
|
super();
|
11
11
|
this.__registerHost();
|
12
12
|
this.snkContentCardChanged = createEvent(this, "snkContentCardChanged", 7);
|
13
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
13
14
|
this.levelPath = undefined;
|
14
15
|
this.label = undefined;
|
15
16
|
this.name = undefined;
|
@@ -77,6 +78,10 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
77
78
|
this._dataBinder.bind(fields, this.dataUnit.dataUnitId, this.formMetadata, this.recordsValidator);
|
78
79
|
}
|
79
80
|
}
|
81
|
+
handleFormItemsReady(event) {
|
82
|
+
event.stopPropagation();
|
83
|
+
this.formItemsReady.emit(Object.assign(Object.assign({}, event.detail), { formId: this.name }));
|
84
|
+
}
|
80
85
|
disconnectedCallback() {
|
81
86
|
if (this._dataBinder != undefined) {
|
82
87
|
this._dataBinder.onDisconnectedCallback();
|
@@ -89,7 +94,7 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
89
94
|
?
|
90
95
|
h("snk-form-summary", { summary: this.getCardSummary() })
|
91
96
|
:
|
92
|
-
h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail) })));
|
97
|
+
h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event) })));
|
93
98
|
}
|
94
99
|
static get style() { return snkFormViewCss; }
|
95
100
|
}, [6, "snk-form-view", {
|