@sankhyalabs/sankhyablocks 1.3.31-beta.11 → 1.3.31-beta.12
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/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +15 -6
- package/dist/cjs/snk-crud.cjs.entry.js +2 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
- package/dist/cjs/snk-form_2.cjs.entry.js +1 -1
- package/dist/collection/components/snk-application/snk-application.js +45 -3
- package/dist/collection/components/snk-crud/snk-crud.css +1 -0
- package/dist/collection/components/snk-crud/snk-crud.js +4 -5
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +2 -2
- package/dist/collection/components/snk-form/snk-form.js +2 -4
- package/dist/collection/components/snk-grid/snk-grid.js +4 -2
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +7 -4
- package/dist/collection/lib/index.js +1 -0
- package/dist/components/snk-application2.js +16 -6
- package/dist/components/snk-crud.js +3 -3
- package/dist/components/snk-data-unit.js +2 -2
- package/dist/components/snk-form2.js +1 -1
- package/dist/components/snk-grid2.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +15 -6
- package/dist/esm/snk-crud.entry.js +2 -2
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-form_2.entry.js +1 -1
- package/dist/sankhyablocks/{p-f4d0394b.entry.js → p-2df33095.entry.js} +1 -1
- package/dist/sankhyablocks/{p-5e1b7e51.entry.js → p-56a32417.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e942c604.entry.js → p-962d9bdd.entry.js} +2 -2
- package/dist/sankhyablocks/p-9b427c4c.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +6 -2
- package/dist/types/components.d.ts +6 -2
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +5 -6
- package/dist/types/lib/index.d.ts +1 -0
- package/package.json +2 -2
- package/dist/sankhyablocks/p-8c74d163.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["snk-crud.cjs",[[6,"snk-crud",{"configName":[1,"config-name"],"actionsList":[16],"recordsValidator":[
|
|
17
|
+
return index.bootstrapLazy([["snk-crud.cjs",[[6,"snk-crud",{"configName":[1,"config-name"],"actionsList":[16],"recordsValidator":[16],"_dataUnit":[32],"_dataState":[32]}]]],["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-data-unit.cjs",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"autoLoad":[4,"auto-load"],"getDataUnit":[64]}]]],["snk-application.cjs",[[2,"snk-application",{"messagesBuilder":[1040],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"saveGridConfig":[64],"executeSearch":[64],"isDebugMode":[64]}]]],["snk-form_2.cjs",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}],[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-taskbar.cjs",[[6,"snk-taskbar",{"buttons":[1],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["snk-crud.cjs",[[6,"snk-crud",{"configName":[1,"config-name"],"actionsList":[16],"recordsValidator":[
|
|
18
|
+
return index.bootstrapLazy([["snk-crud.cjs",[[6,"snk-crud",{"configName":[1,"config-name"],"actionsList":[16],"recordsValidator":[16],"_dataUnit":[32],"_dataState":[32]}]]],["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-data-unit.cjs",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"autoLoad":[4,"auto-load"],"getDataUnit":[64]}]]],["snk-application.cjs",[[2,"snk-application",{"messagesBuilder":[1040],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"saveGridConfig":[64],"executeSearch":[64],"isDebugMode":[64]}]]],["snk-form_2.cjs",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}],[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-taskbar.cjs",[[6,"snk-taskbar",{"buttons":[1],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -6515,20 +6515,23 @@ class DataFetcher {
|
|
|
6515
6515
|
resolveURL() {
|
|
6516
6516
|
return UrlUtils.getUrlBase();
|
|
6517
6517
|
}
|
|
6518
|
-
getContext() {
|
|
6518
|
+
getContext(module) {
|
|
6519
6519
|
const urlParams = UrlUtils.getQueryParams(location.search);
|
|
6520
6520
|
return {
|
|
6521
|
-
baseUrl: `${this.resolveURL()}/
|
|
6521
|
+
baseUrl: `${this.resolveURL()}/${module}/service.sbr`,
|
|
6522
6522
|
appName: "SankhyaBlocks",
|
|
6523
6523
|
mgeSession: `${window['skw_session'] || urlParams.mgeSession}`,
|
|
6524
6524
|
globalID: "85C0093DFA240EAB699B4E47A10215BD",
|
|
6525
|
+
//FIXME: Precisamos ajustar para buscar o resourceId pela aplicação
|
|
6525
6526
|
resourceID: "br.com.sankhya.mov.bancaria"
|
|
6526
6527
|
};
|
|
6527
6528
|
}
|
|
6528
6529
|
async callServiceBroker(serviceName, payload) {
|
|
6529
6530
|
return new Promise((accept, reject) => {
|
|
6530
|
-
const
|
|
6531
|
-
const
|
|
6531
|
+
const parts = serviceName.split("@");
|
|
6532
|
+
const [module, name] = parts.length === 2 ? parts : ['mge', serviceName];
|
|
6533
|
+
const ctx = this.getContext(module);
|
|
6534
|
+
const url = `${ctx.baseUrl}?serviceName=${name}&counter=21&application=${ctx.appName}&outputType=json&preventTransform=false&mgeSession=${ctx.mgeSession}&resourceID=${ctx.resourceID}&globalID=${ctx.globalID}&allowConcurrentCalls=true`;
|
|
6532
6535
|
document.cookie = `JSESSIONID=${ctx.mgeSession};`;
|
|
6533
6536
|
const http = new XMLHttpRequest();
|
|
6534
6537
|
DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url }));
|
|
@@ -7566,11 +7569,17 @@ const SnkApplication = class {
|
|
|
7566
7569
|
async error(title, message, icon, options) {
|
|
7567
7570
|
return utils.ApplicationUtils.error(title, message, icon, options);
|
|
7568
7571
|
}
|
|
7572
|
+
/**
|
|
7573
|
+
* Exibe um diálogo de mensagem comum
|
|
7574
|
+
*/
|
|
7575
|
+
async message(title, message, icon, options) {
|
|
7576
|
+
return utils.ApplicationUtils.message(title, message, icon, options);
|
|
7577
|
+
}
|
|
7569
7578
|
/**
|
|
7570
7579
|
* Exibe um diálogo de confirmação
|
|
7571
7580
|
*/
|
|
7572
|
-
async confirm(title, message, icon,
|
|
7573
|
-
return utils.ApplicationUtils.confirm(title, message, icon,
|
|
7581
|
+
async confirm(title, message, icon, dialogType, options) {
|
|
7582
|
+
return utils.ApplicationUtils.confirm(title, message, icon, dialogType, options);
|
|
7574
7583
|
}
|
|
7575
7584
|
/**
|
|
7576
7585
|
* Mostra uma informação efêmera (de segundo plano).
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-c6671817.js');
|
|
6
6
|
|
|
7
|
-
const snkCrudCss = ".sc-snk-crud-h{display:flex;height:100%;width:100%}";
|
|
7
|
+
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
|
8
8
|
|
|
9
9
|
const GRID_MODE = 0;
|
|
10
10
|
const FORM_MODE = 1;
|
|
@@ -55,7 +55,7 @@ const SnkCrud = class {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
|
-
return (index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref }, index.h("stack-item", null, index.h("snk-grid", { configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList }, index.h("slot",
|
|
58
|
+
return (index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref }, index.h("stack-item", null, index.h("snk-grid", { configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList }, index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }))), index.h("stack-item", null, index.h("snk-form", { configName: this.configName, actionsList: this.actionsList, onExit: () => this._viewStack.show(GRID_MODE), recordsValidator: this.recordsValidator, onActionClick: evt => this.executeAction(evt.detail) }))));
|
|
59
59
|
}
|
|
60
60
|
get _element() { return index.getElement(this); }
|
|
61
61
|
};
|
|
@@ -184,7 +184,7 @@ const SnkDataUnit = class {
|
|
|
184
184
|
}
|
|
185
185
|
else {
|
|
186
186
|
const removeConfirmationTitle = this.getMessage("snkDataUnit.removeConfirmationTitle");
|
|
187
|
-
utils.ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, "delete",
|
|
187
|
+
utils.ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, "delete", utils.DialogType.CRITICAL, { btnConfirmDanger: true })
|
|
188
188
|
.then((result) => resolve(result ? action : undefined));
|
|
189
189
|
}
|
|
190
190
|
}
|
|
@@ -167,7 +167,7 @@ const SnkGrid = class {
|
|
|
167
167
|
if (!this._configLoaded || !this._dataUnit) {
|
|
168
168
|
return undefined;
|
|
169
169
|
}
|
|
170
|
-
return (index.h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "ez-row ez-padding-bottom--medium ez-margin-bottom--medium" }, index.h("div", { class: "ez-col ez-col--sd-9 ez-col--tb-9 ez-align--bottom" }, index.h("slot",
|
|
170
|
+
return (index.h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "ez-row ez-padding-bottom--medium ez-margin-bottom--medium" }, index.h("div", { class: "ez-col ez-col--sd-9 ez-col--tb-9 ez-align--bottom" }, index.h("slot", { name: "SnkGridHeader" })), index.h("div", { class: "ez-col ez-col--sd-3 ez-col--tb-3 ez-align--right" }, index.h("snk-taskbar", { onActionClick: evt => this.actionClickHandler(evt), key: "topTaskbar", dataUnit: this._dataUnit, buttons: "FORM_MODE,CONFIG_GRID,INSERT", primaryButton: "INSERT" }))), index.h("ez-grid", { ref: ref => this._grid = ref, dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: evt => { this.saveConfig(evt.detail); }, onEzDoubleClick: () => this.gridDoubleClick.emit() }, index.h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this.getHeaderButtons(), slot: "leftButtons", actionsList: this.actionsList })), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" }))));
|
|
171
171
|
}
|
|
172
172
|
get _element() { return index.getElement(this); }
|
|
173
173
|
};
|
|
@@ -303,11 +303,17 @@ export class SnkApplication {
|
|
|
303
303
|
async error(title, message, icon, options) {
|
|
304
304
|
return ApplicationUtils.error(title, message, icon, options);
|
|
305
305
|
}
|
|
306
|
+
/**
|
|
307
|
+
* Exibe um diálogo de mensagem comum
|
|
308
|
+
*/
|
|
309
|
+
async message(title, message, icon, options) {
|
|
310
|
+
return ApplicationUtils.message(title, message, icon, options);
|
|
311
|
+
}
|
|
306
312
|
/**
|
|
307
313
|
* Exibe um diálogo de confirmação
|
|
308
314
|
*/
|
|
309
|
-
async confirm(title, message, icon,
|
|
310
|
-
return ApplicationUtils.confirm(title, message, icon,
|
|
315
|
+
async confirm(title, message, icon, dialogType, options) {
|
|
316
|
+
return ApplicationUtils.confirm(title, message, icon, dialogType, options);
|
|
311
317
|
}
|
|
312
318
|
/**
|
|
313
319
|
* Mostra uma informação efêmera (de segundo plano).
|
|
@@ -965,9 +971,41 @@ export class SnkApplication {
|
|
|
965
971
|
"tags": []
|
|
966
972
|
}
|
|
967
973
|
},
|
|
974
|
+
"message": {
|
|
975
|
+
"complexType": {
|
|
976
|
+
"signature": "(title: string, message: string, icon?: string, options?: MessageOptions) => Promise<boolean>",
|
|
977
|
+
"parameters": [{
|
|
978
|
+
"tags": [],
|
|
979
|
+
"text": ""
|
|
980
|
+
}, {
|
|
981
|
+
"tags": [],
|
|
982
|
+
"text": ""
|
|
983
|
+
}, {
|
|
984
|
+
"tags": [],
|
|
985
|
+
"text": ""
|
|
986
|
+
}, {
|
|
987
|
+
"tags": [],
|
|
988
|
+
"text": ""
|
|
989
|
+
}],
|
|
990
|
+
"references": {
|
|
991
|
+
"Promise": {
|
|
992
|
+
"location": "global"
|
|
993
|
+
},
|
|
994
|
+
"MessageOptions": {
|
|
995
|
+
"location": "import",
|
|
996
|
+
"path": "@sankhyalabs/ezui/dist/collection/utils"
|
|
997
|
+
}
|
|
998
|
+
},
|
|
999
|
+
"return": "Promise<boolean>"
|
|
1000
|
+
},
|
|
1001
|
+
"docs": {
|
|
1002
|
+
"text": "Exibe um di\u00E1logo de mensagem comum",
|
|
1003
|
+
"tags": []
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
968
1006
|
"confirm": {
|
|
969
1007
|
"complexType": {
|
|
970
|
-
"signature": "(title: string, message: string, icon?: string,
|
|
1008
|
+
"signature": "(title: string, message: string, icon?: string, dialogType?: DialogType, options?: MessageOptions) => Promise<boolean>",
|
|
971
1009
|
"parameters": [{
|
|
972
1010
|
"tags": [],
|
|
973
1011
|
"text": ""
|
|
@@ -988,6 +1026,10 @@ export class SnkApplication {
|
|
|
988
1026
|
"Promise": {
|
|
989
1027
|
"location": "global"
|
|
990
1028
|
},
|
|
1029
|
+
"DialogType": {
|
|
1030
|
+
"location": "import",
|
|
1031
|
+
"path": "@sankhyalabs/ezui/dist/collection/utils"
|
|
1032
|
+
},
|
|
991
1033
|
"MessageOptions": {
|
|
992
1034
|
"location": "import",
|
|
993
1035
|
"path": "@sankhyalabs/ezui/dist/collection/utils"
|
|
@@ -53,7 +53,8 @@ export class SnkCrud {
|
|
|
53
53
|
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref },
|
|
54
54
|
h("stack-item", null,
|
|
55
55
|
h("snk-grid", { configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList },
|
|
56
|
-
h("slot",
|
|
56
|
+
h("slot", { name: "SnkGridHeader" }),
|
|
57
|
+
h("slot", { name: "SnkGridFooter" }))),
|
|
57
58
|
h("stack-item", null,
|
|
58
59
|
h("snk-form", { configName: this.configName, actionsList: this.actionsList, onExit: () => this._viewStack.show(GRID_MODE), recordsValidator: this.recordsValidator, onActionClick: evt => this.executeAction(evt.detail) }))));
|
|
59
60
|
}
|
|
@@ -107,7 +108,7 @@ export class SnkCrud {
|
|
|
107
108
|
}
|
|
108
109
|
},
|
|
109
110
|
"recordsValidator": {
|
|
110
|
-
"type": "
|
|
111
|
+
"type": "unknown",
|
|
111
112
|
"mutable": false,
|
|
112
113
|
"complexType": {
|
|
113
114
|
"original": "RecordValidator",
|
|
@@ -124,9 +125,7 @@ export class SnkCrud {
|
|
|
124
125
|
"docs": {
|
|
125
126
|
"tags": [],
|
|
126
127
|
"text": "Validador respons\u00E1vel por checar a integridade das informa\u00E7\u00F5es do registro"
|
|
127
|
-
}
|
|
128
|
-
"attribute": "records-validator",
|
|
129
|
-
"reflect": false
|
|
128
|
+
}
|
|
130
129
|
}
|
|
131
130
|
}; }
|
|
132
131
|
static get states() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, Host, h, Event, Element, Prop, Watch, Method } from '@stencil/core';
|
|
2
2
|
import { Action, ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
-
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
3
|
+
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { OperationMap } from '../../lib/message/SnkMessageBuilder';
|
|
5
5
|
export class SnkDataUnit {
|
|
6
6
|
constructor() {
|
|
@@ -172,7 +172,7 @@ export class SnkDataUnit {
|
|
|
172
172
|
}
|
|
173
173
|
else {
|
|
174
174
|
const removeConfirmationTitle = this.getMessage("snkDataUnit.removeConfirmationTitle");
|
|
175
|
-
ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, "delete",
|
|
175
|
+
ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, "delete", DialogType.CRITICAL, { btnConfirmDanger: true })
|
|
176
176
|
.then((result) => resolve(result ? action : undefined));
|
|
177
177
|
}
|
|
178
178
|
}
|
|
@@ -133,7 +133,7 @@ export class SnkForm {
|
|
|
133
133
|
"reflect": false
|
|
134
134
|
},
|
|
135
135
|
"recordsValidator": {
|
|
136
|
-
"type": "
|
|
136
|
+
"type": "unknown",
|
|
137
137
|
"mutable": false,
|
|
138
138
|
"complexType": {
|
|
139
139
|
"original": "RecordValidator",
|
|
@@ -150,9 +150,7 @@ export class SnkForm {
|
|
|
150
150
|
"docs": {
|
|
151
151
|
"tags": [],
|
|
152
152
|
"text": "Validador respons\u00E1vel por checar a integridade das informa\u00E7\u00F5es do registro"
|
|
153
|
-
}
|
|
154
|
-
"attribute": "records-validator",
|
|
155
|
-
"reflect": false
|
|
153
|
+
}
|
|
156
154
|
},
|
|
157
155
|
"actionsList": {
|
|
158
156
|
"type": "unknown",
|
|
@@ -51,11 +51,13 @@ export class SnkGrid {
|
|
|
51
51
|
return (h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" },
|
|
52
52
|
h("div", { class: "ez-row ez-padding-bottom--medium ez-margin-bottom--medium" },
|
|
53
53
|
h("div", { class: "ez-col ez-col--sd-9 ez-col--tb-9 ez-align--bottom" },
|
|
54
|
-
h("slot",
|
|
54
|
+
h("slot", { name: "SnkGridHeader" })),
|
|
55
55
|
h("div", { class: "ez-col ez-col--sd-3 ez-col--tb-3 ez-align--right" },
|
|
56
56
|
h("snk-taskbar", { onActionClick: evt => this.actionClickHandler(evt), key: "topTaskbar", dataUnit: this._dataUnit, buttons: "FORM_MODE,CONFIG_GRID,INSERT", primaryButton: "INSERT" }))),
|
|
57
57
|
h("ez-grid", { ref: ref => this._grid = ref, dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: evt => { this.saveConfig(evt.detail); }, onEzDoubleClick: () => this.gridDoubleClick.emit() },
|
|
58
|
-
h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this.getHeaderButtons(), slot: "leftButtons", actionsList: this.actionsList }))
|
|
58
|
+
h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this.getHeaderButtons(), slot: "leftButtons", actionsList: this.actionsList })),
|
|
59
|
+
h("div", { class: "ez-col ez-col--sd-12" },
|
|
60
|
+
h("slot", { name: "SnkGridFooter" }))));
|
|
59
61
|
}
|
|
60
62
|
static get is() { return "snk-grid"; }
|
|
61
63
|
static get encapsulation() { return "scoped"; }
|
|
@@ -60,20 +60,23 @@ export class DataFetcher {
|
|
|
60
60
|
resolveURL() {
|
|
61
61
|
return UrlUtils.getUrlBase();
|
|
62
62
|
}
|
|
63
|
-
getContext() {
|
|
63
|
+
getContext(module) {
|
|
64
64
|
const urlParams = UrlUtils.getQueryParams(location.search);
|
|
65
65
|
return {
|
|
66
|
-
baseUrl: `${this.resolveURL()}/
|
|
66
|
+
baseUrl: `${this.resolveURL()}/${module}/service.sbr`,
|
|
67
67
|
appName: "SankhyaBlocks",
|
|
68
68
|
mgeSession: `${window['skw_session'] || urlParams.mgeSession}`,
|
|
69
69
|
globalID: "85C0093DFA240EAB699B4E47A10215BD",
|
|
70
|
+
//FIXME: Precisamos ajustar para buscar o resourceId pela aplicação
|
|
70
71
|
resourceID: "br.com.sankhya.mov.bancaria"
|
|
71
72
|
};
|
|
72
73
|
}
|
|
73
74
|
async callServiceBroker(serviceName, payload) {
|
|
74
75
|
return new Promise((accept, reject) => {
|
|
75
|
-
const
|
|
76
|
-
const
|
|
76
|
+
const parts = serviceName.split("@");
|
|
77
|
+
const [module, name] = parts.length === 2 ? parts : ['mge', serviceName];
|
|
78
|
+
const ctx = this.getContext(module);
|
|
79
|
+
const url = `${ctx.baseUrl}?serviceName=${name}&counter=21&application=${ctx.appName}&outputType=json&preventTransform=false&mgeSession=${ctx.mgeSession}&resourceID=${ctx.resourceID}&globalID=${ctx.globalID}&allowConcurrentCalls=true`;
|
|
77
80
|
document.cookie = `JSESSIONID=${ctx.mgeSession};`;
|
|
78
81
|
const http = new XMLHttpRequest();
|
|
79
82
|
DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url }));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DataFetcher } from './http/data-fetcher/DataFetcher';
|
|
@@ -6512,20 +6512,23 @@ class DataFetcher {
|
|
|
6512
6512
|
resolveURL() {
|
|
6513
6513
|
return UrlUtils.getUrlBase();
|
|
6514
6514
|
}
|
|
6515
|
-
getContext() {
|
|
6515
|
+
getContext(module) {
|
|
6516
6516
|
const urlParams = UrlUtils.getQueryParams(location.search);
|
|
6517
6517
|
return {
|
|
6518
|
-
baseUrl: `${this.resolveURL()}/
|
|
6518
|
+
baseUrl: `${this.resolveURL()}/${module}/service.sbr`,
|
|
6519
6519
|
appName: "SankhyaBlocks",
|
|
6520
6520
|
mgeSession: `${window['skw_session'] || urlParams.mgeSession}`,
|
|
6521
6521
|
globalID: "85C0093DFA240EAB699B4E47A10215BD",
|
|
6522
|
+
//FIXME: Precisamos ajustar para buscar o resourceId pela aplicação
|
|
6522
6523
|
resourceID: "br.com.sankhya.mov.bancaria"
|
|
6523
6524
|
};
|
|
6524
6525
|
}
|
|
6525
6526
|
async callServiceBroker(serviceName, payload) {
|
|
6526
6527
|
return new Promise((accept, reject) => {
|
|
6527
|
-
const
|
|
6528
|
-
const
|
|
6528
|
+
const parts = serviceName.split("@");
|
|
6529
|
+
const [module, name] = parts.length === 2 ? parts : ['mge', serviceName];
|
|
6530
|
+
const ctx = this.getContext(module);
|
|
6531
|
+
const url = `${ctx.baseUrl}?serviceName=${name}&counter=21&application=${ctx.appName}&outputType=json&preventTransform=false&mgeSession=${ctx.mgeSession}&resourceID=${ctx.resourceID}&globalID=${ctx.globalID}&allowConcurrentCalls=true`;
|
|
6529
6532
|
document.cookie = `JSESSIONID=${ctx.mgeSession};`;
|
|
6530
6533
|
const http = new XMLHttpRequest();
|
|
6531
6534
|
DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url }));
|
|
@@ -7564,11 +7567,17 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
7564
7567
|
async error(title, message, icon, options) {
|
|
7565
7568
|
return ApplicationUtils.error(title, message, icon, options);
|
|
7566
7569
|
}
|
|
7570
|
+
/**
|
|
7571
|
+
* Exibe um diálogo de mensagem comum
|
|
7572
|
+
*/
|
|
7573
|
+
async message(title, message, icon, options) {
|
|
7574
|
+
return ApplicationUtils.message(title, message, icon, options);
|
|
7575
|
+
}
|
|
7567
7576
|
/**
|
|
7568
7577
|
* Exibe um diálogo de confirmação
|
|
7569
7578
|
*/
|
|
7570
|
-
async confirm(title, message, icon,
|
|
7571
|
-
return ApplicationUtils.confirm(title, message, icon,
|
|
7579
|
+
async confirm(title, message, icon, dialogType, options) {
|
|
7580
|
+
return ApplicationUtils.confirm(title, message, icon, dialogType, options);
|
|
7572
7581
|
}
|
|
7573
7582
|
/**
|
|
7574
7583
|
* Mostra uma informação efêmera (de segundo plano).
|
|
@@ -7753,6 +7762,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
7753
7762
|
"getResourceID": [64],
|
|
7754
7763
|
"alert": [64],
|
|
7755
7764
|
"error": [64],
|
|
7765
|
+
"message": [64],
|
|
7756
7766
|
"confirm": [64],
|
|
7757
7767
|
"info": [64],
|
|
7758
7768
|
"loadFormConfig": [64],
|
|
@@ -3,7 +3,7 @@ import { d as defineCustomElement$4 } from './snk-form2.js';
|
|
|
3
3
|
import { d as defineCustomElement$3 } from './snk-grid2.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './snk-taskbar2.js';
|
|
5
5
|
|
|
6
|
-
const snkCrudCss = ".sc-snk-crud-h{display:flex;height:100%;width:100%}";
|
|
6
|
+
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
|
7
7
|
|
|
8
8
|
const GRID_MODE = 0;
|
|
9
9
|
const FORM_MODE = 1;
|
|
@@ -55,14 +55,14 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
|
-
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref }, h("stack-item", null, h("snk-grid", { configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList }, h("slot",
|
|
58
|
+
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref }, h("stack-item", null, h("snk-grid", { configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }))), h("stack-item", null, h("snk-form", { configName: this.configName, actionsList: this.actionsList, onExit: () => this._viewStack.show(GRID_MODE), recordsValidator: this.recordsValidator, onActionClick: evt => this.executeAction(evt.detail) }))));
|
|
59
59
|
}
|
|
60
60
|
get _element() { return this; }
|
|
61
61
|
static get style() { return snkCrudCss; }
|
|
62
62
|
}, [6, "snk-crud", {
|
|
63
63
|
"configName": [1, "config-name"],
|
|
64
64
|
"actionsList": [16],
|
|
65
|
-
"recordsValidator": [
|
|
65
|
+
"recordsValidator": [16],
|
|
66
66
|
"_dataUnit": [32],
|
|
67
67
|
"_dataState": [32]
|
|
68
68
|
}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { Action, ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
-
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
3
|
+
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { O as OperationMap } from './SnkMessageBuilder.js';
|
|
5
5
|
|
|
6
6
|
const snkDataUnitCss = ".sc-snk-data-unit-h{display:flex;flex-direction:column;height:100%}";
|
|
@@ -181,7 +181,7 @@ const SnkDataUnit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
181
181
|
}
|
|
182
182
|
else {
|
|
183
183
|
const removeConfirmationTitle = this.getMessage("snkDataUnit.removeConfirmationTitle");
|
|
184
|
-
ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, "delete",
|
|
184
|
+
ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, "delete", DialogType.CRITICAL, { btnConfirmDanger: true })
|
|
185
185
|
.then((result) => resolve(result ? action : undefined));
|
|
186
186
|
}
|
|
187
187
|
}
|
|
@@ -110,7 +110,7 @@ const SnkForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
110
110
|
static get style() { return snkFormCss; }
|
|
111
111
|
}, [2, "snk-form", {
|
|
112
112
|
"configName": [1, "config-name"],
|
|
113
|
-
"recordsValidator": [
|
|
113
|
+
"recordsValidator": [16],
|
|
114
114
|
"actionsList": [16],
|
|
115
115
|
"_dataUnit": [32],
|
|
116
116
|
"_configLoaded": [32],
|
|
@@ -57,7 +57,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
57
57
|
if (!this._configLoaded || !this._dataUnit) {
|
|
58
58
|
return undefined;
|
|
59
59
|
}
|
|
60
|
-
return (h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "ez-row ez-padding-bottom--medium ez-margin-bottom--medium" }, h("div", { class: "ez-col ez-col--sd-9 ez-col--tb-9 ez-align--bottom" }, h("slot",
|
|
60
|
+
return (h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "ez-row ez-padding-bottom--medium ez-margin-bottom--medium" }, h("div", { class: "ez-col ez-col--sd-9 ez-col--tb-9 ez-align--bottom" }, h("slot", { name: "SnkGridHeader" })), h("div", { class: "ez-col ez-col--sd-3 ez-col--tb-3 ez-align--right" }, h("snk-taskbar", { onActionClick: evt => this.actionClickHandler(evt), key: "topTaskbar", dataUnit: this._dataUnit, buttons: "FORM_MODE,CONFIG_GRID,INSERT", primaryButton: "INSERT" }))), h("ez-grid", { ref: ref => this._grid = ref, dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: evt => { this.saveConfig(evt.detail); }, onEzDoubleClick: () => this.gridDoubleClick.emit() }, h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this.getHeaderButtons(), slot: "leftButtons", actionsList: this.actionsList })), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" }))));
|
|
61
61
|
}
|
|
62
62
|
get _element() { return this; }
|
|
63
63
|
static get style() { return snkGridCss; }
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1,"config-name"],"actionsList":[16],"recordsValidator":[
|
|
13
|
+
return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1,"config-name"],"actionsList":[16],"recordsValidator":[16],"_dataUnit":[32],"_dataState":[32]}]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"autoLoad":[4,"auto-load"],"getDataUnit":[64]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"saveGridConfig":[64],"executeSearch":[64],"isDebugMode":[64]}]]],["snk-form_2",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}],[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-taskbar",[[6,"snk-taskbar",{"buttons":[1],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1,"config-name"],"actionsList":[16],"recordsValidator":[
|
|
16
|
+
return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1,"config-name"],"actionsList":[16],"recordsValidator":[16],"_dataUnit":[32],"_dataState":[32]}]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"autoLoad":[4,"auto-load"],"getDataUnit":[64]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"saveGridConfig":[64],"executeSearch":[64],"isDebugMode":[64]}]]],["snk-form_2",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}],[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-taskbar",[[6,"snk-taskbar",{"buttons":[1],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -6511,20 +6511,23 @@ class DataFetcher {
|
|
|
6511
6511
|
resolveURL() {
|
|
6512
6512
|
return UrlUtils.getUrlBase();
|
|
6513
6513
|
}
|
|
6514
|
-
getContext() {
|
|
6514
|
+
getContext(module) {
|
|
6515
6515
|
const urlParams = UrlUtils.getQueryParams(location.search);
|
|
6516
6516
|
return {
|
|
6517
|
-
baseUrl: `${this.resolveURL()}/
|
|
6517
|
+
baseUrl: `${this.resolveURL()}/${module}/service.sbr`,
|
|
6518
6518
|
appName: "SankhyaBlocks",
|
|
6519
6519
|
mgeSession: `${window['skw_session'] || urlParams.mgeSession}`,
|
|
6520
6520
|
globalID: "85C0093DFA240EAB699B4E47A10215BD",
|
|
6521
|
+
//FIXME: Precisamos ajustar para buscar o resourceId pela aplicação
|
|
6521
6522
|
resourceID: "br.com.sankhya.mov.bancaria"
|
|
6522
6523
|
};
|
|
6523
6524
|
}
|
|
6524
6525
|
async callServiceBroker(serviceName, payload) {
|
|
6525
6526
|
return new Promise((accept, reject) => {
|
|
6526
|
-
const
|
|
6527
|
-
const
|
|
6527
|
+
const parts = serviceName.split("@");
|
|
6528
|
+
const [module, name] = parts.length === 2 ? parts : ['mge', serviceName];
|
|
6529
|
+
const ctx = this.getContext(module);
|
|
6530
|
+
const url = `${ctx.baseUrl}?serviceName=${name}&counter=21&application=${ctx.appName}&outputType=json&preventTransform=false&mgeSession=${ctx.mgeSession}&resourceID=${ctx.resourceID}&globalID=${ctx.globalID}&allowConcurrentCalls=true`;
|
|
6528
6531
|
document.cookie = `JSESSIONID=${ctx.mgeSession};`;
|
|
6529
6532
|
const http = new XMLHttpRequest();
|
|
6530
6533
|
DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url }));
|
|
@@ -7562,11 +7565,17 @@ const SnkApplication = class {
|
|
|
7562
7565
|
async error(title, message, icon, options) {
|
|
7563
7566
|
return ApplicationUtils.error(title, message, icon, options);
|
|
7564
7567
|
}
|
|
7568
|
+
/**
|
|
7569
|
+
* Exibe um diálogo de mensagem comum
|
|
7570
|
+
*/
|
|
7571
|
+
async message(title, message, icon, options) {
|
|
7572
|
+
return ApplicationUtils.message(title, message, icon, options);
|
|
7573
|
+
}
|
|
7565
7574
|
/**
|
|
7566
7575
|
* Exibe um diálogo de confirmação
|
|
7567
7576
|
*/
|
|
7568
|
-
async confirm(title, message, icon,
|
|
7569
|
-
return ApplicationUtils.confirm(title, message, icon,
|
|
7577
|
+
async confirm(title, message, icon, dialogType, options) {
|
|
7578
|
+
return ApplicationUtils.confirm(title, message, icon, dialogType, options);
|
|
7570
7579
|
}
|
|
7571
7580
|
/**
|
|
7572
7581
|
* Mostra uma informação efêmera (de segundo plano).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-6a83ac96.js';
|
|
2
2
|
|
|
3
|
-
const snkCrudCss = ".sc-snk-crud-h{display:flex;height:100%;width:100%}";
|
|
3
|
+
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
|
4
4
|
|
|
5
5
|
const GRID_MODE = 0;
|
|
6
6
|
const FORM_MODE = 1;
|
|
@@ -51,7 +51,7 @@ const SnkCrud = class {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref }, h("stack-item", null, h("snk-grid", { configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList }, h("slot",
|
|
54
|
+
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref }, h("stack-item", null, h("snk-grid", { configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }))), h("stack-item", null, h("snk-form", { configName: this.configName, actionsList: this.actionsList, onExit: () => this._viewStack.show(GRID_MODE), recordsValidator: this.recordsValidator, onActionClick: evt => this.executeAction(evt.detail) }))));
|
|
55
55
|
}
|
|
56
56
|
get _element() { return getElement(this); }
|
|
57
57
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-6a83ac96.js';
|
|
2
2
|
import { Action, ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
-
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
3
|
+
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { O as OperationMap } from './SnkMessageBuilder-3835f9d8.js';
|
|
5
5
|
|
|
6
6
|
const snkDataUnitCss = ".sc-snk-data-unit-h{display:flex;flex-direction:column;height:100%}";
|
|
@@ -180,7 +180,7 @@ const SnkDataUnit = class {
|
|
|
180
180
|
}
|
|
181
181
|
else {
|
|
182
182
|
const removeConfirmationTitle = this.getMessage("snkDataUnit.removeConfirmationTitle");
|
|
183
|
-
ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, "delete",
|
|
183
|
+
ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, "delete", DialogType.CRITICAL, { btnConfirmDanger: true })
|
|
184
184
|
.then((result) => resolve(result ? action : undefined));
|
|
185
185
|
}
|
|
186
186
|
}
|
|
@@ -163,7 +163,7 @@ const SnkGrid = class {
|
|
|
163
163
|
if (!this._configLoaded || !this._dataUnit) {
|
|
164
164
|
return undefined;
|
|
165
165
|
}
|
|
166
|
-
return (h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "ez-row ez-padding-bottom--medium ez-margin-bottom--medium" }, h("div", { class: "ez-col ez-col--sd-9 ez-col--tb-9 ez-align--bottom" }, h("slot",
|
|
166
|
+
return (h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "ez-row ez-padding-bottom--medium ez-margin-bottom--medium" }, h("div", { class: "ez-col ez-col--sd-9 ez-col--tb-9 ez-align--bottom" }, h("slot", { name: "SnkGridHeader" })), h("div", { class: "ez-col ez-col--sd-3 ez-col--tb-3 ez-align--right" }, h("snk-taskbar", { onActionClick: evt => this.actionClickHandler(evt), key: "topTaskbar", dataUnit: this._dataUnit, buttons: "FORM_MODE,CONFIG_GRID,INSERT", primaryButton: "INSERT" }))), h("ez-grid", { ref: ref => this._grid = ref, dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: evt => { this.saveConfig(evt.detail); }, onEzDoubleClick: () => this.gridDoubleClick.emit() }, h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this.getHeaderButtons(), slot: "leftButtons", actionsList: this.actionsList })), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" }))));
|
|
167
167
|
}
|
|
168
168
|
get _element() { return getElement(this); }
|
|
169
169
|
};
|