@sankhyalabs/sankhyablocks 10.1.0-dev.37 → 10.1.0-dev.39
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-e384fb7b.js → ConfigStorage-a1fab5ca.js} +2 -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-73df0f8b.js → SnkFormConfigManager-44386305.js} +2 -2
- package/dist/cjs/{SnkMessageBuilder-d9558dba.js → SnkMessageBuilder-a9300ebe.js} +24 -0
- package/dist/cjs/{SnkMultiSelectionListDataSource-016393f3.js → SnkMultiSelectionListDataSource-b951ed91.js} +61 -47
- package/dist/cjs/{auth-fetcher-80e608b0.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-81cbd405.js → form-config-fetcher-45d1964c.js} +1 -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} +52 -12
- 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 +344 -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 -17
- package/dist/cjs/{snk-guides-viewer-688c4398.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 +143 -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 -4
- 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/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/ContinuousInsertUtils.js +1 -1
- package/dist/components/SnkMessageBuilder.js +24 -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 +422 -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-grid2.js +82 -47
- 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-82ff76fb.js → ConfigStorage-76872695.js} +2 -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-e8ae1561.js → SnkFormConfigManager-83f6b22f.js} +2 -2
- package/dist/esm/{SnkMessageBuilder-c0bc4424.js → SnkMessageBuilder-1eb7a1af.js} +24 -0
- package/dist/esm/{SnkMultiSelectionListDataSource-ec783ded.js → SnkMultiSelectionListDataSource-7fe25a58.js} +55 -41
- package/dist/esm/{auth-fetcher-38a83f5e.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-24eb587c.js → form-config-fetcher-b44b2727.js} +1 -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} +52 -13
- 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 +333 -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 -14
- package/dist/esm/{snk-guides-viewer-6ddc7e6a.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-54f5c36d.entry.js → p-20af4b6a.entry.js} +1 -1
- package/dist/sankhyablocks/p-225f92cf.entry.js +1 -0
- package/dist/sankhyablocks/{p-605a2a99.entry.js → p-251aee41.entry.js} +1 -1
- package/dist/sankhyablocks/p-2af815bb.entry.js +1 -0
- 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-f208ec52.entry.js → p-35317d9a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6753f16e.js → p-3704bf1b.js} +1 -1
- package/dist/sankhyablocks/{p-2d606189.js → p-3870748a.js} +1 -1
- package/dist/sankhyablocks/{p-e057ecb6.js → p-3c990841.js} +1 -1
- 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-e484913b.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-f5b929c2.entry.js → p-ab12f544.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ef8cf0e2.js → p-ab5e12fa.js} +1 -1
- package/dist/sankhyablocks/p-ac384a1e.entry.js +1 -0
- package/dist/sankhyablocks/{p-3a98c337.entry.js → p-aff2d081.entry.js} +1 -1
- package/dist/sankhyablocks/p-b3b51693.entry.js +1 -0
- package/dist/sankhyablocks/{p-08415ef7.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-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 +197 -4
- 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-07aa8192.entry.js +0 -1
- package/dist/sankhyablocks/p-1a0caadb.js +0 -1
- package/dist/sankhyablocks/p-27aea149.entry.js +0 -1
- package/dist/sankhyablocks/p-27d6590e.js +0 -1
- package/dist/sankhyablocks/p-449e36d2.entry.js +0 -1
- package/dist/sankhyablocks/p-615655bd.entry.js +0 -1
- package/dist/sankhyablocks/p-62e17eea.entry.js +0 -1
- package/dist/sankhyablocks/p-6e1a7929.entry.js +0 -1
- package/dist/sankhyablocks/p-72d62f22.js +0 -1
- package/dist/sankhyablocks/p-9c1ff75e.entry.js +0 -1
- package/dist/sankhyablocks/p-a8c5ebf1.entry.js +0 -1
- package/dist/sankhyablocks/p-b25777fa.entry.js +0 -1
- package/dist/sankhyablocks/p-b6d47f08.entry.js +0 -1
- package/dist/sankhyablocks/p-b8453e18.js +0 -1
- package/dist/sankhyablocks/p-c8043a53.entry.js +0 -1
- package/dist/sankhyablocks/p-f0c9969e.entry.js +0 -1
- package/dist/sankhyablocks/p-fc5938fb.js +0 -1
|
@@ -16,6 +16,7 @@ export class SnkActionsButton {
|
|
|
16
16
|
action.execute(Object.assign({}, selectedAction));
|
|
17
17
|
this._showDropdown = false;
|
|
18
18
|
};
|
|
19
|
+
this.size = 'medium';
|
|
19
20
|
this._items = [];
|
|
20
21
|
this._showDropdown = false;
|
|
21
22
|
}
|
|
@@ -65,12 +66,13 @@ export class SnkActionsButton {
|
|
|
65
66
|
document.addEventListener("scroll", this.positionDropdown.bind(this));
|
|
66
67
|
}
|
|
67
68
|
async componentWillLoad() {
|
|
69
|
+
var _a, _b;
|
|
68
70
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
69
71
|
await this.loadParameters();
|
|
70
72
|
const snkDataUnit = this._element.parentElement;
|
|
71
73
|
this._dataUnit = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.dataUnit;
|
|
72
74
|
this._resourceID = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.resourceID;
|
|
73
|
-
this._entityName = this._dataUnit.name.split('/')[2];
|
|
75
|
+
this._entityName = (_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.split('/')[2];
|
|
74
76
|
if (this._resourceID == undefined) {
|
|
75
77
|
this._resourceID = await ResourceIDUtils.getResourceID();
|
|
76
78
|
}
|
|
@@ -110,9 +112,9 @@ export class SnkActionsButton {
|
|
|
110
112
|
}
|
|
111
113
|
render() {
|
|
112
114
|
return (h(Host, null, (this._actions && this._actions.length > 0) &&
|
|
113
|
-
(h("div", { class: `
|
|
115
|
+
(h("div", { class: `snk-actions-button
|
|
114
116
|
${this.canShowDropdown() ? " ez-elevation--16" : ""}
|
|
115
|
-
` }, h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "acao",
|
|
117
|
+
` }, 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() ?
|
|
116
118
|
"snk-actions-button__dropdown--show" :
|
|
117
119
|
"snk-actions-button__dropdown"}
|
|
118
120
|
` }, this.getElementID("dropdown")), (this.canShowDropdown()) &&
|
|
@@ -131,6 +133,28 @@ export class SnkActionsButton {
|
|
|
131
133
|
"$": ["snk-actions-button.css"]
|
|
132
134
|
};
|
|
133
135
|
}
|
|
136
|
+
static get properties() {
|
|
137
|
+
return {
|
|
138
|
+
"size": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"mutable": false,
|
|
141
|
+
"complexType": {
|
|
142
|
+
"original": "'small' | 'medium' | 'large'",
|
|
143
|
+
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
144
|
+
"references": {}
|
|
145
|
+
},
|
|
146
|
+
"required": false,
|
|
147
|
+
"optional": false,
|
|
148
|
+
"docs": {
|
|
149
|
+
"tags": [],
|
|
150
|
+
"text": "Define o tamanho do bot\u00E3o, podendo ser 'small', 'medium' ou 'large'."
|
|
151
|
+
},
|
|
152
|
+
"attribute": "size",
|
|
153
|
+
"reflect": false,
|
|
154
|
+
"defaultValue": "'medium'"
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|
|
134
158
|
static get states() {
|
|
135
159
|
return {
|
|
136
160
|
"_items": {},
|
|
@@ -1,14 +1,36 @@
|
|
|
1
|
-
.snk-attach__header
|
|
2
|
-
|
|
1
|
+
.snk-attach__header {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
align-items: center;
|
|
5
|
+
margin-bottom: var(--space--6, 6px);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.snk-attach__header > section {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
3
11
|
}
|
|
4
12
|
|
|
5
13
|
.snk-attach__file-info {
|
|
6
|
-
|
|
7
|
-
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
gap: var(--space--8, 8px);
|
|
8
18
|
}
|
|
9
|
-
|
|
10
|
-
|
|
19
|
+
|
|
20
|
+
.snk-attach__main {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
height: 100%;
|
|
11
24
|
}
|
|
12
|
-
|
|
25
|
+
|
|
26
|
+
.ez-box__container {
|
|
13
27
|
height: 100%;
|
|
14
28
|
}
|
|
29
|
+
|
|
30
|
+
.snk-attach__crud-section {
|
|
31
|
+
padding: 1px;
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
height: 100%;
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
@@ -21,20 +21,21 @@ export class SnkAttach {
|
|
|
21
21
|
this.handleBack = () => {
|
|
22
22
|
this._currentDataUnit.cancelEdition().then((cancelationConfirmed) => {
|
|
23
23
|
if (cancelationConfirmed)
|
|
24
|
-
this.
|
|
24
|
+
this.close();
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
27
|
this.handleFinish = () => {
|
|
28
28
|
if (!this._currentDataUnit.isDirty())
|
|
29
|
-
return this.
|
|
29
|
+
return this.close();
|
|
30
30
|
if (!this.validateAnexoSistema()) {
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
this._currentDataUnit.saveData().then(() => {
|
|
34
34
|
this.showFinishedToast();
|
|
35
|
-
this.
|
|
35
|
+
this.close();
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
+
this._isOpen = false;
|
|
38
39
|
this.gridLegacyConfigName = undefined;
|
|
39
40
|
this.fetcherType = undefined;
|
|
40
41
|
this.fetcher = undefined;
|
|
@@ -47,6 +48,40 @@ export class SnkAttach {
|
|
|
47
48
|
this._currentDataUnit = undefined;
|
|
48
49
|
this.crudConfig = undefined;
|
|
49
50
|
}
|
|
51
|
+
// Garante que o popup só abre via método open()
|
|
52
|
+
// Não há mais caminhos alternativos de abertura
|
|
53
|
+
/**
|
|
54
|
+
* Abre o popup do SnkAttach.
|
|
55
|
+
*/
|
|
56
|
+
/**
|
|
57
|
+
* Abre o popup do SnkAttach.
|
|
58
|
+
* Inicializa o componente apenas na abertura.
|
|
59
|
+
*/
|
|
60
|
+
async open() {
|
|
61
|
+
this._isOpen = true;
|
|
62
|
+
// Inicialização só ocorre na abertura
|
|
63
|
+
if (!this._currentDataUnit) {
|
|
64
|
+
await this.initAttach();
|
|
65
|
+
}
|
|
66
|
+
if (this._refPopup) {
|
|
67
|
+
this._refPopup.opened = true;
|
|
68
|
+
}
|
|
69
|
+
if (!this.fetcherType) {
|
|
70
|
+
this.fetcherType = "AnexoSistema";
|
|
71
|
+
}
|
|
72
|
+
if (this._currentDataUnit == null) {
|
|
73
|
+
this.loadAttachmentDataUnit();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Fecha o popup do SnkAttach.
|
|
78
|
+
*/
|
|
79
|
+
async close() {
|
|
80
|
+
this._isOpen = false;
|
|
81
|
+
if (this._refPopup) {
|
|
82
|
+
this._refPopup.opened = false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
50
85
|
async registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
|
51
86
|
var _a;
|
|
52
87
|
if (this._currentDataUnit == null) {
|
|
@@ -242,16 +277,9 @@ export class SnkAttach {
|
|
|
242
277
|
}
|
|
243
278
|
async componentWillLoad() {
|
|
244
279
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
componentWillRender() {
|
|
248
|
-
if (!this.fetcherType) {
|
|
249
|
-
this.fetcherType = "AnexoSistema";
|
|
250
|
-
}
|
|
251
|
-
if (this._currentDataUnit == null) {
|
|
252
|
-
this.loadAttachmentDataUnit();
|
|
253
|
-
}
|
|
280
|
+
// Não inicializa DataUnit aqui, só na abertura
|
|
254
281
|
}
|
|
282
|
+
// Removido: não inicializa DataUnit no ciclo de vida, apenas na abertura
|
|
255
283
|
async handleOnDataStateChange({ detail }) {
|
|
256
284
|
if (this.fetcherType !== 'Attach')
|
|
257
285
|
return;
|
|
@@ -271,9 +299,7 @@ export class SnkAttach {
|
|
|
271
299
|
}
|
|
272
300
|
render() {
|
|
273
301
|
var _a, _b;
|
|
274
|
-
|
|
275
|
-
return null;
|
|
276
|
-
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")))))))));
|
|
302
|
+
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 }))))));
|
|
277
303
|
}
|
|
278
304
|
static get is() { return "snk-attach"; }
|
|
279
305
|
static get encapsulation() { return "scoped"; }
|
|
@@ -446,6 +472,7 @@ export class SnkAttach {
|
|
|
446
472
|
}
|
|
447
473
|
static get states() {
|
|
448
474
|
return {
|
|
475
|
+
"_isOpen": {},
|
|
449
476
|
"_currentFetcher": {},
|
|
450
477
|
"_currentDataUnit": {},
|
|
451
478
|
"crudConfig": {}
|
|
@@ -453,14 +480,14 @@ export class SnkAttach {
|
|
|
453
480
|
}
|
|
454
481
|
static get events() {
|
|
455
482
|
return [{
|
|
456
|
-
"method": "
|
|
457
|
-
"name": "
|
|
483
|
+
"method": "ezClosePopup",
|
|
484
|
+
"name": "ezClosePopup",
|
|
458
485
|
"bubbles": true,
|
|
459
486
|
"cancelable": true,
|
|
460
487
|
"composed": true,
|
|
461
488
|
"docs": {
|
|
462
489
|
"tags": [],
|
|
463
|
-
"text": "Evento
|
|
490
|
+
"text": "Evento emitido ao clicar no bot\u00E3o de fechar (onEzClosePopup)."
|
|
464
491
|
},
|
|
465
492
|
"complexType": {
|
|
466
493
|
"original": "void",
|
|
@@ -469,6 +496,42 @@ export class SnkAttach {
|
|
|
469
496
|
}
|
|
470
497
|
}];
|
|
471
498
|
}
|
|
499
|
+
static get methods() {
|
|
500
|
+
return {
|
|
501
|
+
"open": {
|
|
502
|
+
"complexType": {
|
|
503
|
+
"signature": "() => Promise<void>",
|
|
504
|
+
"parameters": [],
|
|
505
|
+
"references": {
|
|
506
|
+
"Promise": {
|
|
507
|
+
"location": "global"
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
"return": "Promise<void>"
|
|
511
|
+
},
|
|
512
|
+
"docs": {
|
|
513
|
+
"text": "Abre o popup do SnkAttach.\nInicializa o componente apenas na abertura.",
|
|
514
|
+
"tags": []
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
"close": {
|
|
518
|
+
"complexType": {
|
|
519
|
+
"signature": "() => Promise<void>",
|
|
520
|
+
"parameters": [],
|
|
521
|
+
"references": {
|
|
522
|
+
"Promise": {
|
|
523
|
+
"location": "global"
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"return": "Promise<void>"
|
|
527
|
+
},
|
|
528
|
+
"docs": {
|
|
529
|
+
"text": "Fecha o popup do SnkAttach.",
|
|
530
|
+
"tags": []
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
}
|
|
472
535
|
static get watchers() {
|
|
473
536
|
return [{
|
|
474
537
|
"propName": "registerKey",
|
|
@@ -3,4 +3,50 @@
|
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
height: 100%;
|
|
5
5
|
width: 100%;
|
|
6
|
+
overflow-y: auto;
|
|
7
|
+
scrollbar-gutter: stable both-edges;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
snk-grid {
|
|
11
|
+
--snk-grid-padding: 0 var(--space--6, 6px) var(--space--6, 6px) var(--space--6, 6px);
|
|
12
|
+
}
|
|
13
|
+
stack-item.sc-snk-crud {
|
|
14
|
+
display: grid;
|
|
15
|
+
min-height: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.snk-crud__grid-stack-item {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
height: 100%;
|
|
22
|
+
width: 100%;
|
|
23
|
+
padding: 0 var(--space--2, 2px);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.snk-crud__header-top {
|
|
27
|
+
display: flex;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
align-items: center;
|
|
30
|
+
padding: var(--space--8, 8px);
|
|
31
|
+
padding-top: var(--space--12, 12px);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.snk-crud__header-bottom {
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: space-between;
|
|
37
|
+
align-items: center;
|
|
38
|
+
padding: 0 var(--space--8, 8px) 0 var(--space--6, 6px);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.snk-crud__header-bottom > snk-taskbar {
|
|
42
|
+
padding-bottom: var(--space--8, 8px);
|
|
43
|
+
margin-left: var(--space--12, 12px);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.snk-crud--hidden {
|
|
47
|
+
display: none !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
ez-record-navigation, ez-grid-pagination {
|
|
51
|
+
margin-bottom: var(--space--8, 8px);
|
|
6
52
|
}
|