@sankhyalabs/sankhyablocks 10.1.0-dev.36 → 10.1.0-dev.38
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-d9d24844.js → ConfigStorage-a1fab5ca.js} +19 -2
- package/dist/cjs/ContinuousInsertUtils-1ae0c6ac.js +41 -0
- package/dist/cjs/{DataFetcher-3a8ea521.js → DataFetcher-384d2ce8.js} +1 -1
- package/dist/cjs/{ISave-a66bb65e.js → ISave-ecbe9336.js} +1 -1
- package/dist/cjs/{ImageUtils-5e3f406b.js → ImageUtils-c46f2d11.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-c88cf1e9.js → SnkFormConfigManager-44386305.js} +2 -2
- package/dist/cjs/{SnkMessageBuilder-d9558dba.js → SnkMessageBuilder-a9300ebe.js} +24 -0
- package/dist/cjs/{SnkMultiSelectionListDataSource-f53b60c4.js → SnkMultiSelectionListDataSource-b951ed91.js} +61 -47
- package/dist/cjs/{auth-fetcher-faa61f64.js → auth-fetcher-6b134ec4.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-6febd6c4.js → dataunit-fetcher-93f53260.js} +2 -2
- package/dist/cjs/{form-config-fetcher-72cf0e3d.js → form-config-fetcher-45d1964c.js} +19 -1
- package/dist/cjs/index-1894343a.js +8 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -5
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_8.cjs.entry.js → snk-actions-button_9.cjs.entry.js} +77 -13
- package/dist/cjs/snk-application.cjs.entry.js +7 -7
- package/dist/cjs/snk-attach.cjs.entry.js +50 -24
- package/dist/cjs/snk-crud.cjs.entry.js +349 -109
- package/dist/cjs/snk-data-exporter.cjs.entry.js +8 -7
- package/dist/cjs/{snk-data-unit-94757628.js → snk-data-unit-6abc5efc.js} +2 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
- package/dist/cjs/snk-detail-view.cjs.entry.js +11 -16
- package/dist/cjs/snk-entity-search.cjs.entry.js +211 -0
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/{snk-filter-advanced-mode_2.cjs.entry.js → snk-filter-advanced-mode_3.cjs.entry.js} +39 -1
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +106 -95
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +4 -4
- package/dist/cjs/snk-form-view.cjs.entry.js +1 -1
- package/dist/cjs/snk-form_2.cjs.entry.js +5 -5
- package/dist/cjs/snk-grid.cjs.entry.js +40 -16
- package/dist/cjs/{snk-guides-viewer-c1040c2e.js → snk-guides-viewer-b4ca3437.js} +37 -153
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -17
- package/dist/cjs/snk-image-input.cjs.entry.js +2 -2
- package/dist/cjs/snk-layout-form-config.cjs.entry.js +5 -5
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +5 -5
- package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -5
- package/dist/cjs/snk-simple-crud.cjs.entry.js +12 -12
- package/dist/cjs/snk-taskbar.cjs.entry.js +181 -124
- package/dist/cjs/taskbar-elements-80eddec8.js +152 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -3
- package/dist/collection/components/snk-attach/snk-attach.css +29 -7
- package/dist/collection/components/snk-attach/snk-attach.js +81 -18
- package/dist/collection/components/snk-crud/snk-crud.css +46 -0
- package/dist/collection/components/snk-crud/snk-crud.js +148 -94
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -5
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.css +17 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.js +330 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +22 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +35 -144
- package/dist/collection/components/snk-crud/utils/taskbarUtils.js +144 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +20 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css +2 -2
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +23 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +6 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +8 -5
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +139 -84
- package/dist/collection/components/snk-grid/snk-grid.css +12 -3
- package/dist/collection/components/snk-grid/snk-grid.js +148 -3
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +46 -1
- package/dist/collection/components/snk-image-input/utils/ImageUtils.js +1 -1
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +8 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +38 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +51 -35
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js +27 -1
- package/dist/collection/components/snk-taskbar/processor/simple-taskbar-processor.js +55 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +44 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +248 -132
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.css +12 -0
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.js +19 -0
- package/dist/collection/lib/configs/ConfigStorage.js +5 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +12 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +18 -0
- package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +8 -0
- package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +8 -0
- package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +8 -0
- package/dist/components/ConfigStorage.js +17 -0
- package/dist/components/ContinuousInsertUtils.js +1 -1
- package/dist/components/SnkMessageBuilder.js +24 -0
- package/dist/components/form-config-fetcher.js +18 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/snk-actions-button2.js +6 -3
- package/dist/components/snk-attach2.js +56 -27
- package/dist/components/snk-crud.js +427 -175
- package/dist/components/snk-data-exporter2.js +3 -1
- package/dist/components/snk-detail-view2.js +158 -258
- package/dist/components/snk-entity-search.d.ts +11 -0
- package/dist/components/snk-entity-search.js +6 -0
- package/dist/components/snk-entity-search2.js +231 -0
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-filter-bar2.js +94 -85
- package/dist/components/snk-filter-item2.js +4 -2
- package/dist/components/snk-filter-modal2.js +8 -5
- package/dist/components/snk-grid-config2.js +27 -1
- package/dist/components/snk-grid2.js +82 -46
- package/dist/components/snk-image-input2.js +1 -1
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-simple-crud2.js +29 -23
- package/dist/components/snk-taskbar-skeleton.d.ts +11 -0
- package/dist/components/snk-taskbar-skeleton.js +6 -0
- package/dist/components/snk-taskbar-skeleton2.js +29 -0
- package/dist/components/snk-taskbar2.js +253 -174
- package/dist/components/taskbar-actions-button2.js +21 -2
- package/dist/components/taskbar-split-button2.js +10 -1
- package/dist/esm/{ConfigStorage-d15d2014.js → ConfigStorage-76872695.js} +19 -2
- package/dist/esm/ContinuousInsertUtils-bce77dc1.js +39 -0
- package/dist/esm/{DataFetcher-1dd7e8c0.js → DataFetcher-e60f8d53.js} +1 -1
- package/dist/esm/{ISave-498c4831.js → ISave-4929c071.js} +1 -1
- package/dist/esm/{ImageUtils-8fc8d905.js → ImageUtils-7f3a4149.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-86befa68.js → SnkFormConfigManager-83f6b22f.js} +2 -2
- package/dist/esm/{SnkMessageBuilder-c0bc4424.js → SnkMessageBuilder-1eb7a1af.js} +24 -0
- package/dist/esm/{SnkMultiSelectionListDataSource-6e9496f0.js → SnkMultiSelectionListDataSource-7fe25a58.js} +55 -41
- package/dist/esm/{auth-fetcher-69cbda8d.js → auth-fetcher-1a31c1e4.js} +1 -1
- package/dist/esm/{dataunit-fetcher-21c43ec7.js → dataunit-fetcher-050b6d31.js} +2 -2
- package/dist/esm/{form-config-fetcher-fcc7b62f.js → form-config-fetcher-b44b2727.js} +19 -1
- package/dist/esm/index-04f73a26.js +8 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +5 -5
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_8.entry.js → snk-actions-button_9.entry.js} +78 -15
- package/dist/esm/snk-application.entry.js +7 -7
- package/dist/esm/snk-attach.entry.js +50 -24
- package/dist/esm/snk-crud.entry.js +338 -98
- package/dist/esm/snk-data-exporter.entry.js +8 -7
- package/dist/esm/{snk-data-unit-3b06a0f3.js → snk-data-unit-ca2c9858.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +4 -4
- package/dist/esm/snk-detail-view.entry.js +11 -16
- package/dist/esm/snk-entity-search.entry.js +207 -0
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/{snk-filter-advanced-mode_2.entry.js → snk-filter-advanced-mode_3.entry.js} +40 -3
- package/dist/esm/snk-filter-bar_4.entry.js +107 -96
- package/dist/esm/snk-filter-modal-item.entry.js +4 -4
- package/dist/esm/snk-form-view.entry.js +1 -1
- package/dist/esm/snk-form_2.entry.js +5 -5
- package/dist/esm/snk-grid.entry.js +37 -13
- package/dist/esm/{snk-guides-viewer-f1e9d964.js → snk-guides-viewer-cc37535b.js} +38 -154
- package/dist/esm/snk-guides-viewer.entry.js +9 -17
- package/dist/esm/snk-image-input.entry.js +2 -2
- package/dist/esm/snk-layout-form-config.entry.js +5 -5
- package/dist/esm/snk-personalized-filter.entry.js +5 -5
- package/dist/esm/snk-pesquisa.entry.js +5 -5
- package/dist/esm/snk-simple-crud.entry.js +10 -10
- package/dist/esm/snk-taskbar.entry.js +182 -125
- package/dist/esm/taskbar-elements-63651ca7.js +149 -0
- package/dist/sankhyablocks/p-09ba6bd4.js +1 -0
- package/dist/sankhyablocks/p-10f27dc6.entry.js +1 -0
- package/dist/sankhyablocks/{p-4a8d0917.entry.js → p-20af4b6a.entry.js} +1 -1
- package/dist/sankhyablocks/p-225f92cf.entry.js +1 -0
- package/dist/sankhyablocks/{p-88b0797e.entry.js → p-251aee41.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bdf0077f.js → p-2af8aca3.js} +1 -1
- package/dist/sankhyablocks/p-3072136e.js +1 -0
- package/dist/sankhyablocks/p-33492640.entry.js +1 -0
- package/dist/sankhyablocks/{p-17653b22.entry.js → p-35317d9a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e0a6818c.js → p-3704bf1b.js} +1 -1
- package/dist/sankhyablocks/p-3870748a.js +28 -0
- package/dist/sankhyablocks/{p-9114e869.js → p-3c990841.js} +2 -2
- package/dist/sankhyablocks/{p-4ff3b494.js → p-420b39b5.js} +1 -1
- package/dist/sankhyablocks/{p-8bb4e86b.entry.js → p-46f75667.entry.js} +1 -1
- package/dist/sankhyablocks/{p-32ad76cc.js → p-4f7adf97.js} +2 -2
- package/dist/sankhyablocks/p-554c0e54.js +1 -0
- package/dist/sankhyablocks/p-6ae7543b.entry.js +1 -0
- package/dist/sankhyablocks/p-771b137e.js +1 -0
- package/dist/sankhyablocks/p-77f608bc.entry.js +1 -0
- package/dist/sankhyablocks/p-7c8bf699.entry.js +1 -0
- package/dist/sankhyablocks/{p-d34a41ec.entry.js → p-8a8900a9.entry.js} +1 -1
- package/dist/sankhyablocks/{p-48c580b9.entry.js → p-95af0bb1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-10cad767.entry.js → p-98241c21.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0d15b109.entry.js → p-ab12f544.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7e9f8fa4.js → p-ab5e12fa.js} +1 -1
- package/dist/sankhyablocks/p-ac384a1e.entry.js +1 -0
- package/dist/sankhyablocks/p-ac85f011.entry.js +1 -0
- package/dist/sankhyablocks/{p-ebce5394.entry.js → p-aff2d081.entry.js} +1 -1
- package/dist/sankhyablocks/p-b3b51693.entry.js +1 -0
- package/dist/sankhyablocks/{p-c860552e.entry.js → p-bab4cde4.entry.js} +1 -1
- package/dist/sankhyablocks/p-ce3b284c.entry.js +1 -0
- package/dist/sankhyablocks/p-ce8ccd72.entry.js +1 -0
- package/dist/sankhyablocks/{p-b9970342.js → p-d972a9c1.js} +1 -1
- package/dist/sankhyablocks/p-e5a3711f.js +1 -0
- package/dist/sankhyablocks/{p-2b882835.entry.js → p-e737fd5a.entry.js} +1 -1
- package/dist/sankhyablocks/p-efd18bc2.entry.js +1 -0
- package/dist/sankhyablocks/{p-362e6e8c.js → p-f185d5ad.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +4 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +20 -4
- package/dist/types/components/snk-crud/snk-crud.d.ts +28 -10
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-entity-search.d.ts +62 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +4 -18
- package/dist/types/components/snk-crud/utils/taskbarUtils.d.ts +13 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +32 -20
- package/dist/types/components/snk-grid/snk-grid.d.ts +28 -1
- package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +7 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +6 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +29 -2
- package/dist/types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.d.ts +5 -0
- package/dist/types/components/snk-taskbar/processor/simple-taskbar-processor.d.ts +31 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +32 -21
- package/dist/types/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.d.ts +3 -0
- package/dist/types/components.d.ts +205 -4
- package/dist/types/lib/configs/ConfigStorage.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +1 -0
- package/package.json +2 -2
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +0 -45
- package/dist/cjs/taskbar-elements-a94d4318.js +0 -133
- package/dist/cjs/taskbar-processor-2fba34a8.js +0 -53
- package/dist/esm/snk-simple-bar.entry.js +0 -41
- package/dist/esm/taskbar-elements-97541bdd.js +0 -130
- package/dist/esm/taskbar-processor-3436124c.js +0 -51
- package/dist/sankhyablocks/p-07619e85.entry.js +0 -1
- package/dist/sankhyablocks/p-0bd505e4.entry.js +0 -1
- package/dist/sankhyablocks/p-1a0caadb.js +0 -1
- package/dist/sankhyablocks/p-27d6590e.js +0 -1
- package/dist/sankhyablocks/p-45a830d9.js +0 -1
- package/dist/sankhyablocks/p-4abf2838.entry.js +0 -1
- package/dist/sankhyablocks/p-4cdfa0e4.entry.js +0 -1
- package/dist/sankhyablocks/p-72d62f22.js +0 -1
- package/dist/sankhyablocks/p-73b455e1.entry.js +0 -1
- package/dist/sankhyablocks/p-9c1ff75e.entry.js +0 -1
- package/dist/sankhyablocks/p-a9667c44.entry.js +0 -1
- package/dist/sankhyablocks/p-a9839628.js +0 -26
- package/dist/sankhyablocks/p-b25777fa.entry.js +0 -1
- package/dist/sankhyablocks/p-bd1c1b49.entry.js +0 -1
- package/dist/sankhyablocks/p-c8043a53.entry.js +0 -1
- package/dist/sankhyablocks/p-f02b7963.js +0 -1
- package/dist/sankhyablocks/p-f1bf7248.entry.js +0 -1
- package/dist/sankhyablocks/p-f2472d12.entry.js +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class SnkTaskbarSkeleton {
|
|
3
|
+
render() {
|
|
4
|
+
return (h(Host, null, h("ez-skeleton", { variant: "circle", count: 12 }), h("ez-skeleton", { width: "100px" })));
|
|
5
|
+
}
|
|
6
|
+
static get is() { return "snk-taskbar-skeleton"; }
|
|
7
|
+
static get encapsulation() { return "scoped"; }
|
|
8
|
+
static get originalStyleUrls() {
|
|
9
|
+
return {
|
|
10
|
+
"$": ["snk-taskbar-skeleton.css"]
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
static get styleUrls() {
|
|
14
|
+
return {
|
|
15
|
+
"$": ["snk-taskbar-skeleton.css"]
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
;
|
|
@@ -78,6 +78,11 @@ export class ConfigStorage {
|
|
|
78
78
|
await this.deleteGridConfigCache(name, resourceID);
|
|
79
79
|
return this.gridConfigFetcher.saveConfig(config, name, resourceID);
|
|
80
80
|
}
|
|
81
|
+
static async deleteGridConfig(name, resourceID) {
|
|
82
|
+
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.grid);
|
|
83
|
+
await this.deleteGridConfigCache(name, resourceID);
|
|
84
|
+
return this.gridConfigFetcher.deleteConfig(name, resourceID);
|
|
85
|
+
}
|
|
81
86
|
static async loadDefaultFilter(filterId, resourceID, configName) {
|
|
82
87
|
const legacyConfigName = this.filterBarLegacyConfig.get(configName);
|
|
83
88
|
return this.personalizedFilterFetcher.loadDefaultFilter(resourceID, filterId, configName, legacyConfigName);
|
|
@@ -39,6 +39,18 @@ export default class GridConfigFetcher extends ResourceFetcher {
|
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
+
deleteConfig(gridName, resourceID) {
|
|
43
|
+
const completePath = this.getPath(resourceID, gridName);
|
|
44
|
+
return new Promise((resolve, reject) => {
|
|
45
|
+
this.deleteResource(completePath)
|
|
46
|
+
.then(() => {
|
|
47
|
+
resolve();
|
|
48
|
+
})
|
|
49
|
+
.catch((error) => {
|
|
50
|
+
reject(error);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
42
54
|
getPath(resourceID, name) {
|
|
43
55
|
if (name) {
|
|
44
56
|
return `cfg://grid/${this.GRID_CONFIG_VERSION}${resourceID}/${name}`;
|
|
@@ -17,6 +17,9 @@ export class ResourceFetcher {
|
|
|
17
17
|
resource
|
|
18
18
|
}
|
|
19
19
|
}`);
|
|
20
|
+
this.templateByQuery.set("deleteResource", gql `mutation($name: String!) {
|
|
21
|
+
$queryAlias$: deleteResource(name: $name)
|
|
22
|
+
}`);
|
|
20
23
|
}
|
|
21
24
|
loadResource(name) {
|
|
22
25
|
if (ResourceFetcher._loadingResource.has(name)) {
|
|
@@ -60,5 +63,20 @@ export class ResourceFetcher {
|
|
|
60
63
|
});
|
|
61
64
|
});
|
|
62
65
|
}
|
|
66
|
+
deleteResource(name) {
|
|
67
|
+
return new Promise((resolve, reject) => {
|
|
68
|
+
DataFetcher.get()
|
|
69
|
+
.callGraphQL({
|
|
70
|
+
values: { name },
|
|
71
|
+
query: this.templateByQuery.get("deleteResource")
|
|
72
|
+
})
|
|
73
|
+
.then(() => {
|
|
74
|
+
resolve();
|
|
75
|
+
})
|
|
76
|
+
.catch((error) => {
|
|
77
|
+
reject(error);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
63
81
|
}
|
|
64
82
|
ResourceFetcher._loadingResource = new Map();
|
|
@@ -31,5 +31,13 @@ export const snkCrudMessages = {
|
|
|
31
31
|
removeRecord: "Remove the selected record.",
|
|
32
32
|
refreshData: "Refresh data.",
|
|
33
33
|
cancelAction: "Cancel an action."
|
|
34
|
+
},
|
|
35
|
+
customButtons: {
|
|
36
|
+
filter: "Opens the filters panel",
|
|
37
|
+
entitySearch: "Search in entity"
|
|
38
|
+
},
|
|
39
|
+
entitySearch: {
|
|
40
|
+
label: "Search for records",
|
|
41
|
+
placeholder: "Type what you are looking for here..."
|
|
34
42
|
}
|
|
35
43
|
};
|
|
@@ -31,5 +31,13 @@ export const snkCrudMessages = {
|
|
|
31
31
|
removeRecord: "Eliminar el registro seleccionado.",
|
|
32
32
|
refreshData: "Actualizar datos.",
|
|
33
33
|
cancelAction: "Cancelar una acción."
|
|
34
|
+
},
|
|
35
|
+
customButtons: {
|
|
36
|
+
filter: "Abre el panel de filtros",
|
|
37
|
+
entitySearch: "Buscar en entidad"
|
|
38
|
+
},
|
|
39
|
+
entitySearch: {
|
|
40
|
+
label: "Búsqueda de registros",
|
|
41
|
+
placeholder: "Escribe lo que buscas aquí..."
|
|
34
42
|
}
|
|
35
43
|
};
|
|
@@ -31,5 +31,13 @@ export const snkCrudMessages = {
|
|
|
31
31
|
removeRecord: "Remove o registro selecionado.",
|
|
32
32
|
refreshData: "Atualiza os dados.",
|
|
33
33
|
cancelAction: "Cancela uma ação."
|
|
34
|
+
},
|
|
35
|
+
customButtons: {
|
|
36
|
+
filter: "Abre o painel de filtros",
|
|
37
|
+
entitySearch: "Busca na entidade"
|
|
38
|
+
},
|
|
39
|
+
entitySearch: {
|
|
40
|
+
label: "Busca por registros",
|
|
41
|
+
placeholder: "Digite o que você procura aqui..."
|
|
34
42
|
}
|
|
35
43
|
};
|
|
@@ -179,6 +179,18 @@ class GridConfigFetcher extends ResourceFetcher {
|
|
|
179
179
|
});
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
+
deleteConfig(gridName, resourceID) {
|
|
183
|
+
const completePath = this.getPath(resourceID, gridName);
|
|
184
|
+
return new Promise((resolve, reject) => {
|
|
185
|
+
this.deleteResource(completePath)
|
|
186
|
+
.then(() => {
|
|
187
|
+
resolve();
|
|
188
|
+
})
|
|
189
|
+
.catch((error) => {
|
|
190
|
+
reject(error);
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
}
|
|
182
194
|
getPath(resourceID, name) {
|
|
183
195
|
if (name) {
|
|
184
196
|
return `cfg://grid/${this.GRID_CONFIG_VERSION}${resourceID}/${name}`;
|
|
@@ -457,6 +469,11 @@ class ConfigStorage {
|
|
|
457
469
|
await this.deleteGridConfigCache(name, resourceID);
|
|
458
470
|
return this.gridConfigFetcher.saveConfig(config, name, resourceID);
|
|
459
471
|
}
|
|
472
|
+
static async deleteGridConfig(name, resourceID) {
|
|
473
|
+
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.grid);
|
|
474
|
+
await this.deleteGridConfigCache(name, resourceID);
|
|
475
|
+
return this.gridConfigFetcher.deleteConfig(name, resourceID);
|
|
476
|
+
}
|
|
460
477
|
static async loadDefaultFilter(filterId, resourceID, configName) {
|
|
461
478
|
const legacyConfigName = this.filterBarLegacyConfig.get(configName);
|
|
462
479
|
return this.personalizedFilterFetcher.loadDefaultFilter(resourceID, filterId, configName, legacyConfigName);
|
|
@@ -420,4 +420,4 @@ class ContinuousInsertUtils {
|
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
|
|
423
|
-
export {
|
|
423
|
+
export { ContinuousInsertUtils as C, RmPrecisionCustomValueFormatter as R, SnkMultiSelectionListDataSource as S, TaskbarProcessor as T, CommonsExporter as a, CrudUtils as b, ClientSideExporterProvider as c };
|
|
@@ -202,6 +202,14 @@ const snkCrudMessages$2 = {
|
|
|
202
202
|
removeRecord: "Remove o registro selecionado.",
|
|
203
203
|
refreshData: "Atualiza os dados.",
|
|
204
204
|
cancelAction: "Cancela uma ação."
|
|
205
|
+
},
|
|
206
|
+
customButtons: {
|
|
207
|
+
filter: "Abre o painel de filtros",
|
|
208
|
+
entitySearch: "Busca na entidade"
|
|
209
|
+
},
|
|
210
|
+
entitySearch: {
|
|
211
|
+
label: "Busca por registros",
|
|
212
|
+
placeholder: "Digite o que você procura aqui..."
|
|
205
213
|
}
|
|
206
214
|
};
|
|
207
215
|
|
|
@@ -1087,6 +1095,14 @@ const snkCrudMessages$1 = {
|
|
|
1087
1095
|
removeRecord: "Remove the selected record.",
|
|
1088
1096
|
refreshData: "Refresh data.",
|
|
1089
1097
|
cancelAction: "Cancel an action."
|
|
1098
|
+
},
|
|
1099
|
+
customButtons: {
|
|
1100
|
+
filter: "Opens the filters panel",
|
|
1101
|
+
entitySearch: "Search in entity"
|
|
1102
|
+
},
|
|
1103
|
+
entitySearch: {
|
|
1104
|
+
label: "Search for records",
|
|
1105
|
+
placeholder: "Type what you are looking for here..."
|
|
1090
1106
|
}
|
|
1091
1107
|
};
|
|
1092
1108
|
|
|
@@ -1973,6 +1989,14 @@ const snkCrudMessages = {
|
|
|
1973
1989
|
removeRecord: "Eliminar el registro seleccionado.",
|
|
1974
1990
|
refreshData: "Actualizar datos.",
|
|
1975
1991
|
cancelAction: "Cancelar una acción."
|
|
1992
|
+
},
|
|
1993
|
+
customButtons: {
|
|
1994
|
+
filter: "Abre el panel de filtros",
|
|
1995
|
+
entitySearch: "Buscar en entidad"
|
|
1996
|
+
},
|
|
1997
|
+
entitySearch: {
|
|
1998
|
+
label: "Búsqueda de registros",
|
|
1999
|
+
placeholder: "Escribe lo que buscas aquí..."
|
|
1976
2000
|
}
|
|
1977
2001
|
};
|
|
1978
2002
|
|
|
@@ -18,6 +18,9 @@ class ResourceFetcher {
|
|
|
18
18
|
resource
|
|
19
19
|
}
|
|
20
20
|
}`);
|
|
21
|
+
this.templateByQuery.set("deleteResource", dist.gql `mutation($name: String!) {
|
|
22
|
+
$queryAlias$: deleteResource(name: $name)
|
|
23
|
+
}`);
|
|
21
24
|
}
|
|
22
25
|
loadResource(name) {
|
|
23
26
|
if (ResourceFetcher._loadingResource.has(name)) {
|
|
@@ -61,6 +64,21 @@ class ResourceFetcher {
|
|
|
61
64
|
});
|
|
62
65
|
});
|
|
63
66
|
}
|
|
67
|
+
deleteResource(name) {
|
|
68
|
+
return new Promise((resolve, reject) => {
|
|
69
|
+
DataFetcher.get()
|
|
70
|
+
.callGraphQL({
|
|
71
|
+
values: { name },
|
|
72
|
+
query: this.templateByQuery.get("deleteResource")
|
|
73
|
+
})
|
|
74
|
+
.then(() => {
|
|
75
|
+
resolve();
|
|
76
|
+
})
|
|
77
|
+
.catch((error) => {
|
|
78
|
+
reject(error);
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
}
|
|
64
82
|
}
|
|
65
83
|
ResourceFetcher._loadingResource = new Map();
|
|
66
84
|
|
|
@@ -22,6 +22,7 @@ export { SnkDataUnit as SnkDataUnit } from '../types/components/snk-data-unit/sn
|
|
|
22
22
|
export { SnkDefaultFilter as SnkDefaultFilter } from '../types/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter';
|
|
23
23
|
export { SnkDetailView as SnkDetailView } from '../types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view';
|
|
24
24
|
export { SnkEntityList as SnkEntityList } from '../types/components/snk-entity-list/snk-entity-list';
|
|
25
|
+
export { SnkEntitySearch as SnkEntitySearch } from '../types/components/snk-crud/subcomponents/snk-entity-search';
|
|
25
26
|
export { SnkExporterEmailSender as SnkExporterEmailSender } from '../types/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender';
|
|
26
27
|
export { SnkExpressionGroup as SnkExpressionGroup } from '../types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group';
|
|
27
28
|
export { SnkExpressionItem as SnkExpressionItem } from '../types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item';
|
|
@@ -61,6 +62,7 @@ export { SnkSimpleBar as SnkSimpleBar } from '../types/components/snk-simple-bar
|
|
|
61
62
|
export { SnkSimpleCrud as SnkSimpleCrud } from '../types/components/snk-simple-crud/snk-simple-crud';
|
|
62
63
|
export { SnkSimpleFormConfig as SnkSimpleFormConfig } from '../types/components/snk-simple-form-config/snk-simple-form-config';
|
|
63
64
|
export { SnkTaskbar as SnkTaskbar } from '../types/components/snk-taskbar/snk-taskbar';
|
|
65
|
+
export { SnkTaskbarSkeleton as SnkTaskbarSkeleton } from '../types/components/snk-taskbar/subcomponents/snk-taskbar-skeleton';
|
|
64
66
|
export { SnkViewRepresentation as SnkViewRepresentation } from '../types/components/snk-layout-form-config/snk-view-representation/snk-view-representation';
|
|
65
67
|
export { TaskbarActionsButton as TaskbarActionsButton } from '../types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button';
|
|
66
68
|
export { TaskbarSplitButton as TaskbarSplitButton } from '../types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button';
|
package/dist/components/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export { SnkDataUnit, defineCustomElement as defineCustomElementSnkDataUnit } fr
|
|
|
22
22
|
export { SnkDefaultFilter, defineCustomElement as defineCustomElementSnkDefaultFilter } from './snk-default-filter.js';
|
|
23
23
|
export { SnkDetailView, defineCustomElement as defineCustomElementSnkDetailView } from './snk-detail-view.js';
|
|
24
24
|
export { SnkEntityList, defineCustomElement as defineCustomElementSnkEntityList } from './snk-entity-list.js';
|
|
25
|
+
export { SnkEntitySearch, defineCustomElement as defineCustomElementSnkEntitySearch } from './snk-entity-search.js';
|
|
25
26
|
export { SnkExporterEmailSender, defineCustomElement as defineCustomElementSnkExporterEmailSender } from './snk-exporter-email-sender.js';
|
|
26
27
|
export { SnkExpressionGroup, defineCustomElement as defineCustomElementSnkExpressionGroup } from './snk-expression-group.js';
|
|
27
28
|
export { SnkExpressionItem, defineCustomElement as defineCustomElementSnkExpressionItem } from './snk-expression-item.js';
|
|
@@ -61,6 +62,7 @@ export { SnkSimpleBar, defineCustomElement as defineCustomElementSnkSimpleBar }
|
|
|
61
62
|
export { SnkSimpleCrud, defineCustomElement as defineCustomElementSnkSimpleCrud } from './snk-simple-crud.js';
|
|
62
63
|
export { SnkSimpleFormConfig, defineCustomElement as defineCustomElementSnkSimpleFormConfig } from './snk-simple-form-config.js';
|
|
63
64
|
export { SnkTaskbar, defineCustomElement as defineCustomElementSnkTaskbar } from './snk-taskbar.js';
|
|
65
|
+
export { SnkTaskbarSkeleton, defineCustomElement as defineCustomElementSnkTaskbarSkeleton } from './snk-taskbar-skeleton.js';
|
|
64
66
|
export { SnkViewRepresentation, defineCustomElement as defineCustomElementSnkViewRepresentation } from './snk-view-representation.js';
|
|
65
67
|
export { TaskbarActionsButton, defineCustomElement as defineCustomElementTaskbarActionsButton } from './taskbar-actions-button.js';
|
|
66
68
|
export { TaskbarSplitButton, defineCustomElement as defineCustomElementTaskbarSplitButton } from './taskbar-split-button.js';
|
|
@@ -607,6 +607,7 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
607
607
|
action.execute(Object.assign({}, selectedAction));
|
|
608
608
|
this._showDropdown = false;
|
|
609
609
|
};
|
|
610
|
+
this.size = 'medium';
|
|
610
611
|
this._items = [];
|
|
611
612
|
this._showDropdown = false;
|
|
612
613
|
}
|
|
@@ -656,12 +657,13 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
656
657
|
document.addEventListener("scroll", this.positionDropdown.bind(this));
|
|
657
658
|
}
|
|
658
659
|
async componentWillLoad() {
|
|
660
|
+
var _a, _b;
|
|
659
661
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
660
662
|
await this.loadParameters();
|
|
661
663
|
const snkDataUnit = this._element.parentElement;
|
|
662
664
|
this._dataUnit = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.dataUnit;
|
|
663
665
|
this._resourceID = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.resourceID;
|
|
664
|
-
this._entityName = this._dataUnit.name.split('/')[2];
|
|
666
|
+
this._entityName = (_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.split('/')[2];
|
|
665
667
|
if (this._resourceID == undefined) {
|
|
666
668
|
this._resourceID = await ResourceIDUtils.getResourceID();
|
|
667
669
|
}
|
|
@@ -701,9 +703,9 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
701
703
|
}
|
|
702
704
|
render() {
|
|
703
705
|
return (h(Host, null, (this._actions && this._actions.length > 0) &&
|
|
704
|
-
(h("div", { class: `
|
|
706
|
+
(h("div", { class: `snk-actions-button
|
|
705
707
|
${this.canShowDropdown() ? " ez-elevation--16" : ""}
|
|
706
|
-
` }, h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "acao",
|
|
708
|
+
` }, h("ez-tooltip", { message: this._application.messagesBuilder.getMessage("snkActionsButton.title.actions", undefined) }, h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "acao", mode: "icon", onClick: () => this.controlDropdown(), size: this.size }, this.getElementID("button")))), h("div", Object.assign({ ref: (ref) => this._dropdownParent = ref, class: `${this.canShowDropdown() ?
|
|
707
709
|
"snk-actions-button__dropdown--show" :
|
|
708
710
|
"snk-actions-button__dropdown"}
|
|
709
711
|
` }, this.getElementID("dropdown")), (this.canShowDropdown()) &&
|
|
@@ -713,6 +715,7 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
713
715
|
get _element() { return this; }
|
|
714
716
|
static get style() { return snkActionsButtonCss; }
|
|
715
717
|
}, [2, "snk-actions-button", {
|
|
718
|
+
"size": [1],
|
|
716
719
|
"_items": [32],
|
|
717
720
|
"_showDropdown": [32]
|
|
718
721
|
}]);
|
|
@@ -8,7 +8,7 @@ import './form-config-fetcher.js';
|
|
|
8
8
|
import { V as VIEW_MODE } from './constants.js';
|
|
9
9
|
import { A as AutorizationType } from './auth-fetcher.js';
|
|
10
10
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder.js';
|
|
11
|
-
import { T as TaskbarElement, d as defineCustomElement$
|
|
11
|
+
import { T as TaskbarElement, d as defineCustomElement$5 } from './snk-taskbar2.js';
|
|
12
12
|
import { d as defineCustomElement$g } from './snk-actions-button2.js';
|
|
13
13
|
import { d as defineCustomElement$f } from './snk-configurator2.js';
|
|
14
14
|
import { d as defineCustomElement$e } from './snk-data-exporter2.js';
|
|
@@ -18,9 +18,9 @@ import { d as defineCustomElement$b } from './snk-grid-config2.js';
|
|
|
18
18
|
import { d as defineCustomElement$a } from './snk-layout-form-config2.js';
|
|
19
19
|
import { d as defineCustomElement$9 } from './snk-numbering-config2.js';
|
|
20
20
|
import { d as defineCustomElement$8 } from './snk-select-box2.js';
|
|
21
|
-
import { d as defineCustomElement$7 } from './snk-simple-
|
|
22
|
-
import { d as defineCustomElement$6 } from './snk-simple-
|
|
23
|
-
import { d as defineCustomElement$
|
|
21
|
+
import { d as defineCustomElement$7 } from './snk-simple-crud2.js';
|
|
22
|
+
import { d as defineCustomElement$6 } from './snk-simple-form-config2.js';
|
|
23
|
+
import { d as defineCustomElement$4 } from './snk-taskbar-skeleton2.js';
|
|
24
24
|
import { d as defineCustomElement$3 } from './snk-view-representation2.js';
|
|
25
25
|
import { d as defineCustomElement$2 } from './taskbar-actions-button2.js';
|
|
26
26
|
import { d as defineCustomElement$1 } from './taskbar-split-button2.js';
|
|
@@ -631,7 +631,7 @@ const anexoSistemaCrudConfig = {
|
|
|
631
631
|
},
|
|
632
632
|
};
|
|
633
633
|
|
|
634
|
-
const snkAttachCss = ".snk-attach__header.sc-snk-attach
|
|
634
|
+
const snkAttachCss = ".snk-attach__header.sc-snk-attach{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--space--6, 6px)}.snk-attach__header.sc-snk-attach>section.sc-snk-attach{display:flex;align-items:center}.snk-attach__file-info.sc-snk-attach{display:flex;flex-direction:column;justify-content:center;gap:var(--space--8, 8px)}.snk-attach__main.sc-snk-attach{display:flex;flex-direction:column;height:100%}.ez-box__container.sc-snk-attach{height:100%}.snk-attach__crud-section.sc-snk-attach{padding:1px;display:flex;flex-direction:column;height:100%;width:100%}";
|
|
635
635
|
|
|
636
636
|
const RESOURCE_ID = 'AnexoSistema';
|
|
637
637
|
const DATA_UNIT_NAME = 'br.com.sankhya.core.v3.anexoSistema';
|
|
@@ -641,7 +641,7 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
641
641
|
constructor() {
|
|
642
642
|
super();
|
|
643
643
|
this.__registerHost();
|
|
644
|
-
this.
|
|
644
|
+
this.ezClosePopup = createEvent(this, "ezClosePopup", 7);
|
|
645
645
|
this.handleTaskbarClick = async ({ detail: taskbar }) => {
|
|
646
646
|
if (["DOWNLOAD", "LINK"].includes(taskbar))
|
|
647
647
|
return this.downloadAttachment(this._currentDataUnit.getSelectedRecord());
|
|
@@ -652,20 +652,21 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
652
652
|
this.handleBack = () => {
|
|
653
653
|
this._currentDataUnit.cancelEdition().then((cancelationConfirmed) => {
|
|
654
654
|
if (cancelationConfirmed)
|
|
655
|
-
this.
|
|
655
|
+
this.close();
|
|
656
656
|
});
|
|
657
657
|
};
|
|
658
658
|
this.handleFinish = () => {
|
|
659
659
|
if (!this._currentDataUnit.isDirty())
|
|
660
|
-
return this.
|
|
660
|
+
return this.close();
|
|
661
661
|
if (!this.validateAnexoSistema()) {
|
|
662
662
|
return;
|
|
663
663
|
}
|
|
664
664
|
this._currentDataUnit.saveData().then(() => {
|
|
665
665
|
this.showFinishedToast();
|
|
666
|
-
this.
|
|
666
|
+
this.close();
|
|
667
667
|
});
|
|
668
668
|
};
|
|
669
|
+
this._isOpen = false;
|
|
669
670
|
this.gridLegacyConfigName = undefined;
|
|
670
671
|
this.fetcherType = undefined;
|
|
671
672
|
this.fetcher = undefined;
|
|
@@ -678,6 +679,40 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
678
679
|
this._currentDataUnit = undefined;
|
|
679
680
|
this.crudConfig = undefined;
|
|
680
681
|
}
|
|
682
|
+
// Garante que o popup só abre via método open()
|
|
683
|
+
// Não há mais caminhos alternativos de abertura
|
|
684
|
+
/**
|
|
685
|
+
* Abre o popup do SnkAttach.
|
|
686
|
+
*/
|
|
687
|
+
/**
|
|
688
|
+
* Abre o popup do SnkAttach.
|
|
689
|
+
* Inicializa o componente apenas na abertura.
|
|
690
|
+
*/
|
|
691
|
+
async open() {
|
|
692
|
+
this._isOpen = true;
|
|
693
|
+
// Inicialização só ocorre na abertura
|
|
694
|
+
if (!this._currentDataUnit) {
|
|
695
|
+
await this.initAttach();
|
|
696
|
+
}
|
|
697
|
+
if (this._refPopup) {
|
|
698
|
+
this._refPopup.opened = true;
|
|
699
|
+
}
|
|
700
|
+
if (!this.fetcherType) {
|
|
701
|
+
this.fetcherType = "AnexoSistema";
|
|
702
|
+
}
|
|
703
|
+
if (this._currentDataUnit == null) {
|
|
704
|
+
this.loadAttachmentDataUnit();
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* Fecha o popup do SnkAttach.
|
|
709
|
+
*/
|
|
710
|
+
async close() {
|
|
711
|
+
this._isOpen = false;
|
|
712
|
+
if (this._refPopup) {
|
|
713
|
+
this._refPopup.opened = false;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
681
716
|
async registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
|
682
717
|
var _a;
|
|
683
718
|
if (this._currentDataUnit == null) {
|
|
@@ -873,16 +908,9 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
873
908
|
}
|
|
874
909
|
async componentWillLoad() {
|
|
875
910
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
876
|
-
|
|
877
|
-
}
|
|
878
|
-
componentWillRender() {
|
|
879
|
-
if (!this.fetcherType) {
|
|
880
|
-
this.fetcherType = "AnexoSistema";
|
|
881
|
-
}
|
|
882
|
-
if (this._currentDataUnit == null) {
|
|
883
|
-
this.loadAttachmentDataUnit();
|
|
884
|
-
}
|
|
911
|
+
// Não inicializa DataUnit aqui, só na abertura
|
|
885
912
|
}
|
|
913
|
+
// Removido: não inicializa DataUnit no ciclo de vida, apenas na abertura
|
|
886
914
|
async handleOnDataStateChange({ detail }) {
|
|
887
915
|
if (this.fetcherType !== 'Attach')
|
|
888
916
|
return;
|
|
@@ -902,9 +930,7 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
902
930
|
}
|
|
903
931
|
render() {
|
|
904
932
|
var _a, _b;
|
|
905
|
-
|
|
906
|
-
return null;
|
|
907
|
-
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true, configName: this.entityName, ignoreReadOnlyFormFields: this.entityName ? true : false, gridLegacyConfigName: this.getGridLegacyConfigName() }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
|
933
|
+
return (h("ez-popup", { ref: (el) => this._refPopup = el, size: 'x-large', ezTitle: this.getMessage("snkAttach.title"), useHeader: false, autoClose: false, onEzClosePopup: () => this.close() }, this._isOpen && this._currentDataUnit && (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("section", null, h("ez-button", { class: "ez-padding-right--medium", title: this.getMessage('snkSimpleBar.backTitle'), mode: 'icon', iconName: "arrow_back", size: 'medium', onClick: () => this.handleBack() }), h("div", { class: "snk-attach__file-info" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary" }, this.getMessage("snkAttach.description")))), h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })), h("div", { class: "snk-attach__crud-section" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true, configName: this.entityName, ignoreReadOnlyFormFields: this.entityName ? true : false, gridLegacyConfigName: this.getGridLegacyConfigName(), outlineMode: true }))))));
|
|
908
934
|
}
|
|
909
935
|
static get watchers() { return {
|
|
910
936
|
"registerKey": ["registerKeyWatcher"]
|
|
@@ -919,15 +945,18 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
919
945
|
"registerKey": [1, "register-key"],
|
|
920
946
|
"entityName": [1, "entity-name"],
|
|
921
947
|
"messagesBuilder": [1040],
|
|
948
|
+
"_isOpen": [32],
|
|
922
949
|
"_currentFetcher": [32],
|
|
923
950
|
"_currentDataUnit": [32],
|
|
924
|
-
"crudConfig": [32]
|
|
951
|
+
"crudConfig": [32],
|
|
952
|
+
"open": [64],
|
|
953
|
+
"close": [64]
|
|
925
954
|
}]);
|
|
926
955
|
function defineCustomElement() {
|
|
927
956
|
if (typeof customElements === "undefined") {
|
|
928
957
|
return;
|
|
929
958
|
}
|
|
930
|
-
const components = ["snk-attach", "snk-actions-button", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-grid-config", "snk-layout-form-config", "snk-numbering-config", "snk-select-box", "snk-simple-
|
|
959
|
+
const components = ["snk-attach", "snk-actions-button", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-grid-config", "snk-layout-form-config", "snk-numbering-config", "snk-select-box", "snk-simple-crud", "snk-simple-form-config", "snk-taskbar", "snk-taskbar-skeleton", "snk-view-representation", "taskbar-actions-button", "taskbar-split-button"];
|
|
931
960
|
components.forEach(tagName => { switch (tagName) {
|
|
932
961
|
case "snk-attach":
|
|
933
962
|
if (!customElements.get(tagName)) {
|
|
@@ -979,22 +1008,22 @@ function defineCustomElement() {
|
|
|
979
1008
|
defineCustomElement$8();
|
|
980
1009
|
}
|
|
981
1010
|
break;
|
|
982
|
-
case "snk-simple-
|
|
1011
|
+
case "snk-simple-crud":
|
|
983
1012
|
if (!customElements.get(tagName)) {
|
|
984
1013
|
defineCustomElement$7();
|
|
985
1014
|
}
|
|
986
1015
|
break;
|
|
987
|
-
case "snk-simple-
|
|
1016
|
+
case "snk-simple-form-config":
|
|
988
1017
|
if (!customElements.get(tagName)) {
|
|
989
1018
|
defineCustomElement$6();
|
|
990
1019
|
}
|
|
991
1020
|
break;
|
|
992
|
-
case "snk-
|
|
1021
|
+
case "snk-taskbar":
|
|
993
1022
|
if (!customElements.get(tagName)) {
|
|
994
1023
|
defineCustomElement$5();
|
|
995
1024
|
}
|
|
996
1025
|
break;
|
|
997
|
-
case "snk-taskbar":
|
|
1026
|
+
case "snk-taskbar-skeleton":
|
|
998
1027
|
if (!customElements.get(tagName)) {
|
|
999
1028
|
defineCustomElement$4();
|
|
1000
1029
|
}
|