@sankhyalabs/sankhyablocks 8.3.2 → 8.4.0-dev.2
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-4dd5e72c.js → ConfigStorage-0e4275f5.js} +163 -51
- package/dist/cjs/{DataFetcher-65199c00.js → DataFetcher-bd3d53a8.js} +78 -234
- package/dist/cjs/ISave-d68ce3cd.js +8 -0
- package/dist/cjs/PrintUtils-bcaeb82f.js +215 -0
- package/dist/cjs/ResourceIDUtils-5ff86aa7.js +12 -0
- package/dist/cjs/{SnkFormConfigManager-44717597.js → SnkFormConfigManager-5b485cd4.js} +19 -21
- package/dist/cjs/{auth-fetcher-7ed6d3e3.js → auth-fetcher-1583fe43.js} +2 -2
- package/dist/cjs/{dataunit-fetcher-102030d8.js → dataunit-fetcher-910be4ce.js} +1 -1
- package/dist/cjs/{form-config-fetcher-49993843.js → form-config-fetcher-f6cb55e6.js} +66 -3
- package/dist/cjs/index-f9e81701.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-23adae20.js → pesquisa-fetcher-3356b3df.js} +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button.cjs.entry.js +19 -11
- package/dist/cjs/snk-application.cjs.entry.js +60 -44
- package/dist/cjs/snk-attach.cjs.entry.js +9 -14
- package/dist/cjs/snk-configurator.cjs.entry.js +2 -1
- package/dist/cjs/snk-crud.cjs.entry.js +28 -11
- package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -2
- package/dist/cjs/{snk-data-unit-e89e07bd.js → snk-data-unit-7cc1846d.js} +5 -5
- package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +17 -13
- package/dist/cjs/snk-entity-list.cjs.entry.js +0 -4
- package/dist/cjs/snk-filter-bar.cjs.entry.js +15 -17
- package/dist/cjs/snk-filter-detail.cjs.entry.js +7 -16
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +6 -19
- package/dist/cjs/snk-form-config.cjs.entry.js +7 -17
- package/dist/cjs/snk-form-view.cjs.entry.js +6 -1
- package/dist/cjs/snk-form.cjs.entry.js +13 -8
- package/dist/cjs/snk-grid-config.cjs.entry.js +6 -6
- package/dist/cjs/snk-grid.cjs.entry.js +23 -22
- package/dist/cjs/{snk-guides-viewer-83cd2f15.js → snk-guides-viewer-5e22097d.js} +19 -8
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +10 -9
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +14 -16
- package/dist/cjs/snk-print-selector.cjs.entry.js +2 -4
- package/dist/cjs/snk-simple-crud.cjs.entry.js +43 -85
- package/dist/cjs/snk-taskbar-custom-elements.cjs.entry.js +20 -0
- package/dist/cjs/snk-taskbar.cjs.entry.js +71 -5
- package/dist/cjs/{taskbar-elements-b98dd6e9.js → taskbar-elements-39949c7a.js} +4 -4
- package/dist/collection/collection-manifest.json +1 -0
- 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 +120 -65
- package/dist/collection/components/snk-configurator/snk-configurator.js +19 -1
- package/dist/collection/components/snk-crud/snk-crud.js +44 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +60 -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 +65 -28
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +22 -6
- 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 +8 -13
- 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 +108 -16
- 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 +23 -1
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +4 -4
- package/dist/collection/components/snk-taskbar/snk-taskbar-custom-elements.js +43 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +4 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +126 -5
- package/dist/collection/lib/configs/ConfigStorage.js +33 -44
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +23 -71
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +47 -32
- 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/PrintUtils.js +18 -9
- package/dist/collection/lib/utils/urlutils.js +29 -0
- package/dist/components/ConfigStorage.js +161 -48
- package/dist/components/DataFetcher.js +79 -234
- package/dist/components/PrintUtils.js +213 -0
- 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/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-actions-button2.js +23 -9
- package/dist/components/snk-application2.js +145 -129
- package/dist/components/snk-attach2.js +1 -8
- package/dist/components/snk-configurator2.js +3 -1
- package/dist/components/snk-crud.js +27 -8
- package/dist/components/snk-data-unit2.js +6 -5
- package/dist/components/snk-detail-view2.js +26 -10
- 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 +8 -13
- 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 +24 -17
- package/dist/components/snk-personalized-filter2.js +11 -11
- package/dist/components/snk-print-selector.js +1 -1
- package/dist/components/snk-simple-crud2.js +30 -73
- package/dist/components/snk-taskbar-custom-elements.d.ts +11 -0
- package/dist/components/snk-taskbar-custom-elements.js +35 -0
- package/dist/components/snk-taskbar2.js +81 -9
- package/dist/esm/{ConfigStorage-d0e26692.js → ConfigStorage-f359573c.js} +162 -49
- package/dist/esm/{DataFetcher-4f5ad71c.js → DataFetcher-8daff9ad.js} +79 -234
- package/dist/esm/ISave-4412b20c.js +8 -0
- package/dist/esm/PrintUtils-3e4ff0f5.js +213 -0
- package/dist/esm/ResourceIDUtils-a114189a.js +10 -0
- package/dist/esm/{SnkFormConfigManager-457554ca.js → SnkFormConfigManager-35876bad.js} +19 -21
- package/dist/esm/{auth-fetcher-852e26c9.js → auth-fetcher-299fed55.js} +1 -1
- package/dist/esm/{dataunit-fetcher-97dd5148.js → dataunit-fetcher-bd8f9572.js} +1 -1
- package/dist/esm/{form-config-fetcher-ff72a867.js → form-config-fetcher-8ef7be16.js} +65 -3
- package/dist/esm/index-a7d3d3f1.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-d82df64b.js → pesquisa-fetcher-27819123.js} +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button.entry.js +19 -11
- package/dist/esm/snk-application.entry.js +60 -44
- package/dist/esm/snk-attach.entry.js +5 -10
- package/dist/esm/snk-configurator.entry.js +2 -1
- package/dist/esm/snk-crud.entry.js +30 -13
- package/dist/esm/snk-data-exporter.entry.js +3 -2
- package/dist/esm/{snk-data-unit-8c4d944d.js → snk-data-unit-1715d2f1.js} +5 -5
- package/dist/esm/snk-data-unit.entry.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +17 -13
- package/dist/esm/snk-entity-list.entry.js +0 -4
- package/dist/esm/snk-filter-bar.entry.js +15 -17
- package/dist/esm/snk-filter-detail.entry.js +8 -17
- package/dist/esm/snk-filter-modal-item.entry.js +7 -20
- package/dist/esm/snk-form-config.entry.js +8 -18
- package/dist/esm/snk-form-view.entry.js +6 -1
- package/dist/esm/snk-form.entry.js +13 -8
- package/dist/esm/snk-grid-config.entry.js +6 -6
- package/dist/esm/snk-grid.entry.js +23 -22
- package/dist/esm/{snk-guides-viewer-202c3c4d.js → snk-guides-viewer-b0e32a7d.js} +19 -8
- package/dist/esm/snk-guides-viewer.entry.js +10 -9
- package/dist/esm/snk-personalized-filter.entry.js +14 -16
- package/dist/esm/snk-print-selector.entry.js +1 -3
- package/dist/esm/snk-simple-crud.entry.js +34 -76
- package/dist/esm/snk-taskbar-custom-elements.entry.js +16 -0
- package/dist/esm/snk-taskbar.entry.js +71 -5
- package/dist/esm/{taskbar-elements-2c761819.js → taskbar-elements-0a6b8b95.js} +4 -4
- package/dist/sankhyablocks/p-0df2ead8.entry.js +11 -0
- package/dist/sankhyablocks/p-324ce41e.entry.js +1 -0
- package/dist/sankhyablocks/p-34604220.entry.js +1 -0
- package/dist/sankhyablocks/p-648a7c72.entry.js +1 -0
- package/dist/sankhyablocks/p-688dcb4c.js +1 -0
- package/dist/sankhyablocks/p-6a38bda5.entry.js +1 -0
- package/dist/sankhyablocks/p-72fc257b.entry.js +1 -0
- package/dist/sankhyablocks/p-7bcd2f89.js +56 -0
- package/dist/sankhyablocks/p-7bd5aea7.js +1 -0
- package/dist/sankhyablocks/p-8014cc25.entry.js +1 -0
- package/dist/sankhyablocks/p-8d884fab.js +1 -0
- package/dist/sankhyablocks/p-928efcaa.entry.js +1 -0
- package/dist/sankhyablocks/p-989937ee.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-a7ee0e6f.entry.js +1 -0
- package/dist/sankhyablocks/p-ac0556a3.js +1 -0
- package/dist/sankhyablocks/p-af2d9aea.entry.js +1 -0
- package/dist/sankhyablocks/{p-435259af.js → p-b13cb8b5.js} +2 -2
- package/dist/sankhyablocks/p-b244640b.js +1 -0
- package/dist/sankhyablocks/p-bba91710.entry.js +1 -0
- package/dist/sankhyablocks/p-c555075c.entry.js +1 -0
- package/dist/sankhyablocks/p-c870b530.js +26 -0
- package/dist/sankhyablocks/{p-a2493d11.js → p-c9841939.js} +1 -1
- package/dist/sankhyablocks/p-d4f9ee17.entry.js +1 -0
- package/dist/sankhyablocks/p-d708b4ab.entry.js +1 -0
- package/dist/sankhyablocks/p-d84bc5c1.js +1 -0
- package/dist/sankhyablocks/{p-7d9302e2.js → p-de76b8a8.js} +1 -1
- package/dist/sankhyablocks/p-e19014a9.entry.js +1 -0
- package/dist/sankhyablocks/p-e1cb1f0b.js +1 -0
- package/dist/sankhyablocks/p-e9b53a9a.entry.js +1 -0
- package/dist/sankhyablocks/p-ebf8c5df.entry.js +1 -0
- package/dist/sankhyablocks/p-ed5f1204.entry.js +1 -0
- package/dist/sankhyablocks/p-f94b999e.entry.js +1 -0
- package/dist/sankhyablocks/p-fb1ecd0b.entry.js +1 -0
- package/dist/sankhyablocks/p-fd15aaac.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 +9 -22
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +4 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +6 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +12 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +5 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +13 -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 +17 -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/processor/taskbar-processor.d.ts +2 -2
- package/dist/types/components/snk-taskbar/snk-taskbar-custom-elements.d.ts +7 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +27 -0
- package/dist/types/components.d.ts +203 -22
- package/dist/types/lib/configs/ConfigStorage.d.ts +11 -13
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +2 -8
- 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/PrintUtils.d.ts +1 -0
- package/dist/types/lib/utils/urlutils.d.ts +14 -0
- package/package.json +2 -2
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/filter-bar-config-fetcher-2ab64f92.js +0 -155
- package/dist/cjs/resource-fetcher-8d12fee7.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-1093db95.js +0 -153
- package/dist/esm/resource-fetcher-be4d1ba4.js +0 -66
- package/dist/sankhyablocks/p-030a2da4.entry.js +0 -1
- package/dist/sankhyablocks/p-1208becf.entry.js +0 -1
- package/dist/sankhyablocks/p-17724bee.entry.js +0 -1
- package/dist/sankhyablocks/p-216f081a.entry.js +0 -1
- package/dist/sankhyablocks/p-37b17041.js +0 -1
- package/dist/sankhyablocks/p-3916c825.entry.js +0 -1
- package/dist/sankhyablocks/p-3ffad8ca.entry.js +0 -1
- package/dist/sankhyablocks/p-44fe945a.entry.js +0 -1
- package/dist/sankhyablocks/p-4fc5a0db.entry.js +0 -1
- package/dist/sankhyablocks/p-564efc43.js +0 -1
- package/dist/sankhyablocks/p-5add4151.entry.js +0 -1
- package/dist/sankhyablocks/p-5de83141.entry.js +0 -1
- package/dist/sankhyablocks/p-6be9191f.entry.js +0 -1
- package/dist/sankhyablocks/p-6ee5d42c.js +0 -1
- package/dist/sankhyablocks/p-72d7f00c.js +0 -56
- package/dist/sankhyablocks/p-7352acf8.entry.js +0 -1
- package/dist/sankhyablocks/p-8115f7a2.js +0 -1
- package/dist/sankhyablocks/p-8903ffc6.js +0 -1
- package/dist/sankhyablocks/p-8dbb4c6c.entry.js +0 -11
- package/dist/sankhyablocks/p-935bfc1c.entry.js +0 -1
- package/dist/sankhyablocks/p-9395cf73.entry.js +0 -1
- package/dist/sankhyablocks/p-9d36d914.js +0 -17
- package/dist/sankhyablocks/p-aa6f27bd.entry.js +0 -1
- package/dist/sankhyablocks/p-aeaa5253.js +0 -10
- package/dist/sankhyablocks/p-befbc9ee.entry.js +0 -1
- package/dist/sankhyablocks/p-c1273e40.js +0 -1
- package/dist/sankhyablocks/p-c32b9d7c.entry.js +0 -1
- package/dist/sankhyablocks/p-c6380ea2.entry.js +0 -1
- package/dist/sankhyablocks/p-de69b4b0.entry.js +0 -1
- package/dist/sankhyablocks/p-f5c33da3.entry.js +0 -1
- package/dist/sankhyablocks/p-f847d53a.entry.js +0 -1
|
@@ -28,6 +28,7 @@ export class SnkFilterBar {
|
|
|
28
28
|
};
|
|
29
29
|
this.dataUnit = undefined;
|
|
30
30
|
this.configName = undefined;
|
|
31
|
+
this.resourceID = undefined;
|
|
31
32
|
this.filterConfig = undefined;
|
|
32
33
|
this.messagesBuilder = undefined;
|
|
33
34
|
this.allowDefault = undefined;
|
|
@@ -103,11 +104,11 @@ export class SnkFilterBar {
|
|
|
103
104
|
return;
|
|
104
105
|
}
|
|
105
106
|
this._loadingPending = false;
|
|
106
|
-
this.dataUnit.loadData();
|
|
107
|
+
this.dataUnit.loadData(undefined, undefined, true);
|
|
107
108
|
}
|
|
108
109
|
if (this._configUpdated) {
|
|
109
110
|
this._configUpdated = false;
|
|
110
|
-
ConfigStorage.saveFilterBarConfig(this.filterConfig, this.configName);
|
|
111
|
+
ConfigStorage.saveFilterBarConfig(this.filterConfig, this.configName, this.resourceID);
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
/**
|
|
@@ -223,15 +224,13 @@ export class SnkFilterBar {
|
|
|
223
224
|
}
|
|
224
225
|
loadConfigFromStorage() {
|
|
225
226
|
return new Promise(accept => {
|
|
226
|
-
ConfigStorage.
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
throw new ErrorException(this.getMessage("snkFilterBar.failToLoadConfig"), reason);
|
|
234
|
-
});
|
|
227
|
+
ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name })
|
|
228
|
+
.then((filters) => {
|
|
229
|
+
accept();
|
|
230
|
+
this.filterConfig = filters.map(item => this.normalizeItem(item));
|
|
231
|
+
})
|
|
232
|
+
.catch(reason => {
|
|
233
|
+
throw new ErrorException(this.getMessage("snkFilterBar.failToLoadConfig"), reason);
|
|
235
234
|
});
|
|
236
235
|
});
|
|
237
236
|
}
|
|
@@ -316,7 +315,7 @@ export class SnkFilterBar {
|
|
|
316
315
|
return undefined;
|
|
317
316
|
}
|
|
318
317
|
if (this.showPersonalizedFilter) {
|
|
319
|
-
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 });
|
|
318
|
+
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 });
|
|
320
319
|
}
|
|
321
320
|
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" }))));
|
|
322
321
|
}
|
|
@@ -371,6 +370,23 @@ export class SnkFilterBar {
|
|
|
371
370
|
"attribute": "config-name",
|
|
372
371
|
"reflect": false
|
|
373
372
|
},
|
|
373
|
+
"resourceID": {
|
|
374
|
+
"type": "string",
|
|
375
|
+
"mutable": false,
|
|
376
|
+
"complexType": {
|
|
377
|
+
"original": "string",
|
|
378
|
+
"resolved": "string",
|
|
379
|
+
"references": {}
|
|
380
|
+
},
|
|
381
|
+
"required": false,
|
|
382
|
+
"optional": false,
|
|
383
|
+
"docs": {
|
|
384
|
+
"tags": [],
|
|
385
|
+
"text": "Identificador de recursos como configura\u00E7\u00F5es e acesso."
|
|
386
|
+
},
|
|
387
|
+
"attribute": "resource-i-d",
|
|
388
|
+
"reflect": false
|
|
389
|
+
},
|
|
374
390
|
"filterConfig": {
|
|
375
391
|
"type": "unknown",
|
|
376
392
|
"mutable": true,
|
|
@@ -2,29 +2,27 @@ import { ConfigStorage } from "../../lib/configs/ConfigStorage";
|
|
|
2
2
|
import { ObjectUtils } from "@sankhyalabs/core";
|
|
3
3
|
import { FormConfigFetcher } from "../../lib/http/data-fetcher/fetchers/form-config-fetcher";
|
|
4
4
|
export class SnkFormConfigManager {
|
|
5
|
-
constructor(configName, onConfigChange) {
|
|
5
|
+
constructor(configName, resourceID, onConfigChange) {
|
|
6
|
+
this._resourceID = resourceID;
|
|
6
7
|
this._configName = configName;
|
|
7
8
|
this._onConfigChange = onConfigChange;
|
|
8
9
|
}
|
|
9
10
|
async loadConfig() {
|
|
10
11
|
return new Promise(resolve => {
|
|
11
|
-
ConfigStorage.
|
|
12
|
-
.then((
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
.catch((error) => {
|
|
19
|
-
console.warn(error);
|
|
20
|
-
});
|
|
12
|
+
ConfigStorage.loadFormConfig(this._configName, this._resourceID)
|
|
13
|
+
.then((config) => {
|
|
14
|
+
this.setConfig(config);
|
|
15
|
+
resolve(config);
|
|
16
|
+
})
|
|
17
|
+
.catch((error) => {
|
|
18
|
+
console.warn(error);
|
|
21
19
|
});
|
|
22
20
|
});
|
|
23
21
|
}
|
|
24
22
|
saveConfig(config) {
|
|
25
23
|
const configToSave = ObjectUtils.copy(config);
|
|
26
24
|
return new Promise(accept => {
|
|
27
|
-
ConfigStorage.saveFormConfig(config, this._configName)
|
|
25
|
+
ConfigStorage.saveFormConfig(config, this._configName, this._resourceID)
|
|
28
26
|
.then((response) => {
|
|
29
27
|
this.setConfig(Object.assign(Object.assign({}, configToSave), response));
|
|
30
28
|
accept(Object.assign(Object.assign({}, configToSave), response));
|
|
@@ -39,7 +37,7 @@ export class SnkFormConfigManager {
|
|
|
39
37
|
cardsState.set(cardId, propertyChanged === "fixed" ?
|
|
40
38
|
this.updateFixSequence(Object.assign(Object.assign({}, currentConfig), { fixed: cardConfig.fixed }), cardsState)
|
|
41
39
|
: Object.assign(Object.assign({}, currentConfig), { [propertyChanged]: cardConfig[propertyChanged] }));
|
|
42
|
-
ConfigStorage.saveCardState(cardsState, this._configName)
|
|
40
|
+
ConfigStorage.saveCardState(cardsState, this._configName, this._resourceID)
|
|
43
41
|
.then(savedCardConfig => {
|
|
44
42
|
this._config = Object.assign(Object.assign({}, this._config), { cardsState });
|
|
45
43
|
resolve(savedCardConfig);
|
|
@@ -115,17 +113,17 @@ export class SnkFormConfigManager {
|
|
|
115
113
|
}
|
|
116
114
|
return this._formConfigFetcher;
|
|
117
115
|
}
|
|
118
|
-
async fetchUserAvailableConfigs(
|
|
116
|
+
async fetchUserAvailableConfigs() {
|
|
119
117
|
if (this._configName != undefined) {
|
|
120
118
|
//FIXME: Precisamos preparar o backend para retornar as configurações disponíveis para details;
|
|
121
119
|
return Promise.resolve(undefined);
|
|
122
120
|
}
|
|
123
|
-
return this.getFormConfigFetcher().fetchUserAvailableConfigs(this._configName,
|
|
121
|
+
return this.getFormConfigFetcher().fetchUserAvailableConfigs(this._configName, this._resourceID);
|
|
124
122
|
}
|
|
125
|
-
async fetchLegacyConfig(
|
|
126
|
-
return this.getFormConfigFetcher().fetchLegacyConfig(this._configName,
|
|
123
|
+
async fetchLegacyConfig() {
|
|
124
|
+
return this.getFormConfigFetcher().fetchLegacyConfig(this._configName, this._resourceID);
|
|
127
125
|
}
|
|
128
|
-
async fetchDefaultConfig(
|
|
129
|
-
return this.getFormConfigFetcher().fetchDefaultConfig(this._configName,
|
|
126
|
+
async fetchDefaultConfig() {
|
|
127
|
+
return this.getFormConfigFetcher().fetchDefaultConfig(this._configName, this._resourceID);
|
|
130
128
|
}
|
|
131
129
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
2
|
import { h } from '@stencil/core';
|
|
3
3
|
import { SnkFormConfigManager } from './SnkFormConfigManager';
|
|
4
|
+
import ResourceIDUtils from '../../lib/resourceid/ResourceIDUtils';
|
|
4
5
|
export class SnkForm {
|
|
5
6
|
constructor() {
|
|
6
7
|
this._dataUnit = undefined;
|
|
@@ -10,6 +11,7 @@ export class SnkForm {
|
|
|
10
11
|
this.configName = undefined;
|
|
11
12
|
this.recordsValidator = undefined;
|
|
12
13
|
this.messagesBuilder = undefined;
|
|
14
|
+
this.resourceID = undefined;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* Exibe a janela de configurações do formulário.
|
|
@@ -30,7 +32,7 @@ export class SnkForm {
|
|
|
30
32
|
const dataInfo = { dataUnit: this._dataUnit };
|
|
31
33
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
32
34
|
}
|
|
33
|
-
componentWillLoad() {
|
|
35
|
+
async componentWillLoad() {
|
|
34
36
|
let parent = this._element.parentElement;
|
|
35
37
|
while (parent) {
|
|
36
38
|
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
|
@@ -52,7 +54,10 @@ export class SnkForm {
|
|
|
52
54
|
}
|
|
53
55
|
parent = parent.parentElement;
|
|
54
56
|
}
|
|
55
|
-
this.
|
|
57
|
+
if (this.resourceID == undefined) {
|
|
58
|
+
this.resourceID = await ResourceIDUtils.getResourceID();
|
|
59
|
+
}
|
|
60
|
+
this._configManager = new SnkFormConfigManager(this.configName, this.resourceID);
|
|
56
61
|
this._configManager.loadConfig();
|
|
57
62
|
}
|
|
58
63
|
render() {
|
|
@@ -132,6 +137,23 @@ export class SnkForm {
|
|
|
132
137
|
"tags": [],
|
|
133
138
|
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
|
134
139
|
}
|
|
140
|
+
},
|
|
141
|
+
"resourceID": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"mutable": false,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "string",
|
|
146
|
+
"resolved": "string",
|
|
147
|
+
"references": {}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": false,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": "Identificador de recursos como configura\u00E7\u00F5es e acesso."
|
|
154
|
+
},
|
|
155
|
+
"attribute": "resource-i-d",
|
|
156
|
+
"reflect": false
|
|
135
157
|
}
|
|
136
158
|
};
|
|
137
159
|
}
|
|
@@ -174,6 +196,28 @@ export class SnkForm {
|
|
|
174
196
|
"resolved": "string",
|
|
175
197
|
"references": {}
|
|
176
198
|
}
|
|
199
|
+
}, {
|
|
200
|
+
"method": "formItemsReady",
|
|
201
|
+
"name": "formItemsReady",
|
|
202
|
+
"bubbles": true,
|
|
203
|
+
"cancelable": true,
|
|
204
|
+
"composed": true,
|
|
205
|
+
"docs": {
|
|
206
|
+
"tags": [],
|
|
207
|
+
"text": "Respons\u00E1vel por notificar quando ocorrer a renderiza\u00E7\u00E3o de itens do formul\u00E1rio."
|
|
208
|
+
},
|
|
209
|
+
"complexType": {
|
|
210
|
+
"original": "Array<HTMLElement>",
|
|
211
|
+
"resolved": "HTMLElement[]",
|
|
212
|
+
"references": {
|
|
213
|
+
"Array": {
|
|
214
|
+
"location": "global"
|
|
215
|
+
},
|
|
216
|
+
"HTMLElement": {
|
|
217
|
+
"location": "global"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
177
221
|
}];
|
|
178
222
|
}
|
|
179
223
|
static get methods() {
|
package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { Sortable } from '@shopify/draggable';
|
|
3
|
-
import {
|
|
3
|
+
import { ObjectUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
4
4
|
import { ApplicationUtils, DialogType } from "@sankhyalabs/ezui/dist/collection/utils";
|
|
5
5
|
import { ACTION_CONFIG, CONFIG_EVENTS, DEFAULT_TYPE, TAB_NAMES } from "../../../../lib/utils/constants";
|
|
6
6
|
import { UserConfigType } from "../../../../lib/http/data-fetcher/fetchers/form-config-fetcher";
|
|
@@ -446,13 +446,10 @@ export class SnkFormConfig {
|
|
|
446
446
|
this._sortableGroup.on(CONFIG_EVENTS.dragStop, (evt) => this.controlStopDraggingGroup(evt));
|
|
447
447
|
}
|
|
448
448
|
loadUserConfig() {
|
|
449
|
-
if (this._applicationResourceID == undefined) {
|
|
450
|
-
return;
|
|
451
|
-
}
|
|
452
449
|
if (this.configManager == undefined) {
|
|
453
450
|
return;
|
|
454
451
|
}
|
|
455
|
-
this.configManager.fetchUserAvailableConfigs(
|
|
452
|
+
this.configManager.fetchUserAvailableConfigs()
|
|
456
453
|
.then((userConfig) => {
|
|
457
454
|
this._formConfigOptions = userConfig;
|
|
458
455
|
if (this._formConfigOptions == undefined) {
|
|
@@ -506,9 +503,6 @@ export class SnkFormConfig {
|
|
|
506
503
|
}
|
|
507
504
|
}
|
|
508
505
|
async loadConfigByUser() {
|
|
509
|
-
if (this._applicationResourceID == undefined) {
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
506
|
if (this.configManager == undefined) {
|
|
513
507
|
return;
|
|
514
508
|
}
|
|
@@ -518,10 +512,10 @@ export class SnkFormConfig {
|
|
|
518
512
|
let config;
|
|
519
513
|
switch (this._optionFormConfigSelected.origin) {
|
|
520
514
|
case UserConfigType.DEFAULT:
|
|
521
|
-
config = await this.configManager.fetchDefaultConfig(
|
|
515
|
+
config = await this.configManager.fetchDefaultConfig();
|
|
522
516
|
break;
|
|
523
517
|
case UserConfigType.DEFAULT:
|
|
524
|
-
config = await this.configManager.fetchDefaultConfig(
|
|
518
|
+
config = await this.configManager.fetchDefaultConfig();
|
|
525
519
|
break;
|
|
526
520
|
}
|
|
527
521
|
if (config != undefined) {
|
|
@@ -937,11 +931,7 @@ export class SnkFormConfig {
|
|
|
937
931
|
this.controlSortableGroup();
|
|
938
932
|
}
|
|
939
933
|
componentWillLoad() {
|
|
940
|
-
this.
|
|
941
|
-
this._application.getResourceID().then(resourceID => {
|
|
942
|
-
this._applicationResourceID = resourceID;
|
|
943
|
-
this.loadConfig();
|
|
944
|
-
});
|
|
934
|
+
this.loadConfig();
|
|
945
935
|
}
|
|
946
936
|
componentDidLoad() {
|
|
947
937
|
const dataInfo = { dataUnit: this.dataUnit };
|
|
@@ -10,7 +10,6 @@ import SnkMultiSelectionListDataSource from './filtercolumn/SnkMultiSelectionLis
|
|
|
10
10
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
11
11
|
export class SnkGrid {
|
|
12
12
|
constructor() {
|
|
13
|
-
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
|
14
13
|
this._topTaskbarProcessor = new TaskbarProcessor({
|
|
15
14
|
"snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
|
16
15
|
"snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
|
@@ -27,7 +26,9 @@ export class SnkGrid {
|
|
|
27
26
|
this._dataState = undefined;
|
|
28
27
|
this._gridConfig = undefined;
|
|
29
28
|
this._popUpGridConfig = false;
|
|
29
|
+
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
|
30
30
|
this.configName = undefined;
|
|
31
|
+
this.resourceID = undefined;
|
|
31
32
|
this.selectionToastConfig = undefined;
|
|
32
33
|
this.actionsList = undefined;
|
|
33
34
|
this.isDetail = undefined;
|
|
@@ -39,6 +40,9 @@ export class SnkGrid {
|
|
|
39
40
|
this.useEnterLikeTab = false;
|
|
40
41
|
this.recordsValidator = undefined;
|
|
41
42
|
this.canEdit = true;
|
|
43
|
+
this.taskbarCustomContainerId = undefined;
|
|
44
|
+
this.gridHeaderCustomSlotId = 'GRID_HEADER_CUSTOM_ELEMENTS';
|
|
45
|
+
this.topTaskbarCustomSlotId = 'GRID_TASKBAR_CUSTOM_ELEMENTS';
|
|
42
46
|
}
|
|
43
47
|
/**
|
|
44
48
|
* Exibe a janela de configurações da grade.
|
|
@@ -86,20 +90,17 @@ export class SnkGrid {
|
|
|
86
90
|
this._gridConfig = config;
|
|
87
91
|
}
|
|
88
92
|
loadConfig() {
|
|
89
|
-
ConfigStorage.
|
|
90
|
-
.then((
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
.catch((error) => {
|
|
96
|
-
console.warn(error);
|
|
97
|
-
});
|
|
93
|
+
ConfigStorage.loadGridConfig(this.configName, this.resourceID)
|
|
94
|
+
.then((config) => {
|
|
95
|
+
this.setGridConfig(config);
|
|
96
|
+
})
|
|
97
|
+
.catch((error) => {
|
|
98
|
+
console.warn(error);
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
gridConfigChangeHandler(evt) {
|
|
101
102
|
const config = evt.detail;
|
|
102
|
-
ConfigStorage.saveGridConfig(config, this.configName);
|
|
103
|
+
ConfigStorage.saveGridConfig(config, this.configName, this.resourceID);
|
|
103
104
|
evt.stopPropagation();
|
|
104
105
|
}
|
|
105
106
|
modalConfigChangeHandler(evt) {
|
|
@@ -212,10 +213,11 @@ export class SnkGrid {
|
|
|
212
213
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
213
214
|
}
|
|
214
215
|
finshLoading() {
|
|
216
|
+
var _a, _b;
|
|
215
217
|
this._dataUnitLoadLockerResolver = this._dataUnit.addLoadingLocker();
|
|
216
218
|
this.addElementID();
|
|
217
|
-
this.
|
|
218
|
-
this.
|
|
219
|
+
(_a = this.columnFilterDataSource) === null || _a === void 0 ? void 0 : _a.setApplication(this._application);
|
|
220
|
+
(_b = this.columnFilterDataSource) === null || _b === void 0 ? void 0 : _b.setDataUnit(this._dataUnit);
|
|
219
221
|
}
|
|
220
222
|
componentWillLoad() {
|
|
221
223
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
@@ -268,7 +270,7 @@ export class SnkGrid {
|
|
|
268
270
|
if (!this._dataUnit || this._dataUnit.records.length === 0)
|
|
269
271
|
invisibleButtons.push("DATA_EXPORTER");
|
|
270
272
|
if (this._dataState && this._dataState.selectionInfo.mode === SelectionMode.ALL_RECORDS)
|
|
271
|
-
invisibleButtons.push("ACTIONS_BUTTON");
|
|
273
|
+
invisibleButtons.push("ACTIONS_BUTTON", TaskbarElement.UPDATE);
|
|
272
274
|
return invisibleButtons;
|
|
273
275
|
}
|
|
274
276
|
componentWillRender() {
|
|
@@ -306,8 +308,8 @@ export class SnkGrid {
|
|
|
306
308
|
if (!this._dataUnit) {
|
|
307
309
|
return undefined;
|
|
308
310
|
}
|
|
309
|
-
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder }), ((_b = (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
|
310
|
-
h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton() })), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady(), columnfilterDataSource: this.
|
|
311
|
+
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID }), ((_b = (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
|
312
|
+
h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady(), columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
|
311
313
|
}
|
|
312
314
|
static get is() { return "snk-grid"; }
|
|
313
315
|
static get encapsulation() { return "scoped"; }
|
|
@@ -323,6 +325,26 @@ export class SnkGrid {
|
|
|
323
325
|
}
|
|
324
326
|
static get properties() {
|
|
325
327
|
return {
|
|
328
|
+
"columnFilterDataSource": {
|
|
329
|
+
"type": "unknown",
|
|
330
|
+
"mutable": true,
|
|
331
|
+
"complexType": {
|
|
332
|
+
"original": "SnkMultiSelectionListDataSource",
|
|
333
|
+
"resolved": "SnkMultiSelectionListDataSource",
|
|
334
|
+
"references": {
|
|
335
|
+
"SnkMultiSelectionListDataSource": {
|
|
336
|
+
"location": "global"
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"required": false,
|
|
341
|
+
"optional": false,
|
|
342
|
+
"docs": {
|
|
343
|
+
"tags": [],
|
|
344
|
+
"text": ""
|
|
345
|
+
},
|
|
346
|
+
"defaultValue": "new SnkMultiSelectionListDataSource()"
|
|
347
|
+
},
|
|
326
348
|
"configName": {
|
|
327
349
|
"type": "string",
|
|
328
350
|
"mutable": false,
|
|
@@ -340,6 +362,23 @@ export class SnkGrid {
|
|
|
340
362
|
"attribute": "config-name",
|
|
341
363
|
"reflect": false
|
|
342
364
|
},
|
|
365
|
+
"resourceID": {
|
|
366
|
+
"type": "string",
|
|
367
|
+
"mutable": false,
|
|
368
|
+
"complexType": {
|
|
369
|
+
"original": "string",
|
|
370
|
+
"resolved": "string",
|
|
371
|
+
"references": {}
|
|
372
|
+
},
|
|
373
|
+
"required": false,
|
|
374
|
+
"optional": false,
|
|
375
|
+
"docs": {
|
|
376
|
+
"tags": [],
|
|
377
|
+
"text": "Identificador de recursos como configura\u00E7\u00F5es e acesso."
|
|
378
|
+
},
|
|
379
|
+
"attribute": "resource-i-d",
|
|
380
|
+
"reflect": false
|
|
381
|
+
},
|
|
343
382
|
"selectionToastConfig": {
|
|
344
383
|
"type": "unknown",
|
|
345
384
|
"mutable": false,
|
|
@@ -559,6 +598,59 @@ export class SnkGrid {
|
|
|
559
598
|
"attribute": "can-edit",
|
|
560
599
|
"reflect": false,
|
|
561
600
|
"defaultValue": "true"
|
|
601
|
+
},
|
|
602
|
+
"taskbarCustomContainerId": {
|
|
603
|
+
"type": "string",
|
|
604
|
+
"mutable": false,
|
|
605
|
+
"complexType": {
|
|
606
|
+
"original": "string",
|
|
607
|
+
"resolved": "string",
|
|
608
|
+
"references": {}
|
|
609
|
+
},
|
|
610
|
+
"required": false,
|
|
611
|
+
"optional": false,
|
|
612
|
+
"docs": {
|
|
613
|
+
"tags": [],
|
|
614
|
+
"text": "Define o identificador do container de elementos customizados da Taskbar."
|
|
615
|
+
},
|
|
616
|
+
"attribute": "taskbar-custom-container-id",
|
|
617
|
+
"reflect": false
|
|
618
|
+
},
|
|
619
|
+
"gridHeaderCustomSlotId": {
|
|
620
|
+
"type": "string",
|
|
621
|
+
"mutable": false,
|
|
622
|
+
"complexType": {
|
|
623
|
+
"original": "string",
|
|
624
|
+
"resolved": "string",
|
|
625
|
+
"references": {}
|
|
626
|
+
},
|
|
627
|
+
"required": false,
|
|
628
|
+
"optional": false,
|
|
629
|
+
"docs": {
|
|
630
|
+
"tags": [],
|
|
631
|
+
"text": "Nome do slot de elementos customizados da Taskbar do cabe\u00E7alho da grade."
|
|
632
|
+
},
|
|
633
|
+
"attribute": "grid-header-custom-slot-id",
|
|
634
|
+
"reflect": false,
|
|
635
|
+
"defaultValue": "'GRID_HEADER_CUSTOM_ELEMENTS'"
|
|
636
|
+
},
|
|
637
|
+
"topTaskbarCustomSlotId": {
|
|
638
|
+
"type": "string",
|
|
639
|
+
"mutable": false,
|
|
640
|
+
"complexType": {
|
|
641
|
+
"original": "string",
|
|
642
|
+
"resolved": "string",
|
|
643
|
+
"references": {}
|
|
644
|
+
},
|
|
645
|
+
"required": false,
|
|
646
|
+
"optional": false,
|
|
647
|
+
"docs": {
|
|
648
|
+
"tags": [],
|
|
649
|
+
"text": "Nome do slot de elementos customizados da Taskbar principal do componente."
|
|
650
|
+
},
|
|
651
|
+
"attribute": "top-taskbar-custom-slot-id",
|
|
652
|
+
"reflect": false,
|
|
653
|
+
"defaultValue": "'GRID_TASKBAR_CUSTOM_ELEMENTS'"
|
|
562
654
|
}
|
|
563
655
|
};
|
|
564
656
|
}
|
package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js
CHANGED
|
@@ -17,6 +17,7 @@ export class SnkGridConfig {
|
|
|
17
17
|
this.columns = undefined;
|
|
18
18
|
this.config = undefined;
|
|
19
19
|
this.configName = undefined;
|
|
20
|
+
this.resourceID = undefined;
|
|
20
21
|
}
|
|
21
22
|
/* Creation Methods */
|
|
22
23
|
/**
|
|
@@ -240,7 +241,7 @@ export class SnkGridConfig {
|
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
243
|
_newConfig.columns = _newColumnConfigList;
|
|
243
|
-
ConfigStorage.saveGridConfig(_newConfig, this.configName)
|
|
244
|
+
ConfigStorage.saveGridConfig(_newConfig, this.configName, this.resourceID)
|
|
244
245
|
.then((savedConfig) => {
|
|
245
246
|
this.configChange.emit(savedConfig);
|
|
246
247
|
this._orderList.clearHistory();
|
|
@@ -571,6 +572,23 @@ export class SnkGridConfig {
|
|
|
571
572
|
},
|
|
572
573
|
"attribute": "config-name",
|
|
573
574
|
"reflect": false
|
|
575
|
+
},
|
|
576
|
+
"resourceID": {
|
|
577
|
+
"type": "string",
|
|
578
|
+
"mutable": false,
|
|
579
|
+
"complexType": {
|
|
580
|
+
"original": "string",
|
|
581
|
+
"resolved": "string",
|
|
582
|
+
"references": {}
|
|
583
|
+
},
|
|
584
|
+
"required": false,
|
|
585
|
+
"optional": false,
|
|
586
|
+
"docs": {
|
|
587
|
+
"tags": [],
|
|
588
|
+
"text": "Nome usado para salvar/recuperar a configura\u00E7\u00E3o."
|
|
589
|
+
},
|
|
590
|
+
"attribute": "resource-i-d",
|
|
591
|
+
"reflect": false
|
|
574
592
|
}
|
|
575
593
|
};
|
|
576
594
|
}
|
|
@@ -30,6 +30,7 @@ export class SnkPersonalizedFilter {
|
|
|
30
30
|
this.entityUri = undefined;
|
|
31
31
|
this.filterId = undefined;
|
|
32
32
|
this.configName = undefined;
|
|
33
|
+
this.resourceID = undefined;
|
|
33
34
|
}
|
|
34
35
|
/*
|
|
35
36
|
* Cria um novo filtro se não houver nenhum filtro existente
|
|
@@ -66,17 +67,15 @@ export class SnkPersonalizedFilter {
|
|
|
66
67
|
this._filterAssistent = ObjectUtils.copy(newPersonalizedFilter);
|
|
67
68
|
}
|
|
68
69
|
loadFilter(newValue, oldValue) {
|
|
69
|
-
if (newValue == null || oldValue == newValue) {
|
|
70
|
+
if (newValue == null || oldValue == newValue || this.resourceID == undefined) {
|
|
70
71
|
return;
|
|
71
72
|
}
|
|
72
|
-
ConfigStorage.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
this._filterAssistentMode = this._filterAssistent.hasOwnProperty("assistent") && this._filterAssistent.assistent != undefined;
|
|
79
|
-
});
|
|
73
|
+
ConfigStorage.loadPersonalizedFilter(newValue, this.resourceID, this.configName)
|
|
74
|
+
.then((resp) => {
|
|
75
|
+
const personalizedFilter = this.addLabelToItems(resp);
|
|
76
|
+
this._filterAssistent = personalizedFilter;
|
|
77
|
+
this._originalFilterAssistent = ObjectUtils.copy(personalizedFilter);
|
|
78
|
+
this._filterAssistentMode = this._filterAssistent.hasOwnProperty("assistent") && this._filterAssistent.assistent != undefined;
|
|
80
79
|
});
|
|
81
80
|
}
|
|
82
81
|
componentWillLoad() {
|
|
@@ -101,7 +100,7 @@ export class SnkPersonalizedFilter {
|
|
|
101
100
|
return this._application.messagesBuilder.getMessage(key, params);
|
|
102
101
|
}
|
|
103
102
|
saveFilter() {
|
|
104
|
-
ConfigStorage.savePersonalizedFilter(this._filterAssistent, this.configName).then((personalizedFilter) => {
|
|
103
|
+
ConfigStorage.savePersonalizedFilter(this._filterAssistent, this.resourceID, this.configName).then((personalizedFilter) => {
|
|
105
104
|
this._elButtonSave.enabled = false;
|
|
106
105
|
const messageToken = !!this._filterAssistent.id ? 'confirmEdit' : 'confirmSave';
|
|
107
106
|
ApplicationUtils.info(this.getMessage(`snkPersonalizedFilter.${messageToken}.title`), { iconName: "check" });
|
|
@@ -112,7 +111,7 @@ export class SnkPersonalizedFilter {
|
|
|
112
111
|
});
|
|
113
112
|
}
|
|
114
113
|
removeFilter() {
|
|
115
|
-
ConfigStorage.removePersonalizedFilter(this._filterAssistent, this.configName);
|
|
114
|
+
ConfigStorage.removePersonalizedFilter(this._filterAssistent, this.resourceID, this.configName);
|
|
116
115
|
}
|
|
117
116
|
hasChangesToSave() {
|
|
118
117
|
return JSON.stringify(this._filterAssistent) === JSON.stringify(this._originalFilterAssistent);
|
|
@@ -361,10 +360,27 @@ export class SnkPersonalizedFilter {
|
|
|
361
360
|
"optional": false,
|
|
362
361
|
"docs": {
|
|
363
362
|
"tags": [],
|
|
364
|
-
"text": "Nome da
|
|
363
|
+
"text": "Nome da configura\u00E7\u00E3o. Serve para distinguir v\u00E1rias inst\u00E2ncias do componente."
|
|
365
364
|
},
|
|
366
365
|
"attribute": "config-name",
|
|
367
366
|
"reflect": false
|
|
367
|
+
},
|
|
368
|
+
"resourceID": {
|
|
369
|
+
"type": "string",
|
|
370
|
+
"mutable": false,
|
|
371
|
+
"complexType": {
|
|
372
|
+
"original": "string",
|
|
373
|
+
"resolved": "string",
|
|
374
|
+
"references": {}
|
|
375
|
+
},
|
|
376
|
+
"required": false,
|
|
377
|
+
"optional": false,
|
|
378
|
+
"docs": {
|
|
379
|
+
"tags": [],
|
|
380
|
+
"text": "Nome da configura\u00E7\u00E3o. Serve para distinguir v\u00E1rias inst\u00E2ncias do componente."
|
|
381
|
+
},
|
|
382
|
+
"attribute": "resource-i-d",
|
|
383
|
+
"reflect": false
|
|
368
384
|
}
|
|
369
385
|
};
|
|
370
386
|
}
|