@sankhyalabs/sankhyablocks 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-967176bb.js → ConfigStorage-b47fb254.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-0010f570.js → SnkFormConfigManager-b1b19f62.js} +2 -2
- package/dist/cjs/{form-config-fetcher-f57babd9.js → form-config-fetcher-0c6628d5.js} +4 -4
- package/dist/cjs/{taskbar-elements-d444d6a5.js → index-fc7ca86c.js} +0 -110
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +2 -2
- package/dist/cjs/snk-configurator.cjs.entry.js +96 -0
- package/dist/cjs/snk-crud.cjs.entry.js +3 -2
- package/dist/cjs/snk-data-exporter.cjs.entry.js +515 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +369 -0
- package/dist/cjs/snk-detail-view.cjs.entry.js +196 -0
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +132 -0
- package/dist/cjs/snk-field-config.cjs.entry.js +62 -0
- package/dist/cjs/snk-filter-bar.cjs.entry.js +498 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js +137 -0
- package/dist/cjs/snk-filter-item.cjs.entry.js +218 -0
- package/dist/cjs/snk-filter-list.cjs.entry.js +152 -0
- package/dist/cjs/snk-filter-modal.cjs.entry.js +76 -0
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-summary.cjs.entry.js +61 -0
- package/dist/cjs/snk-form-view.cjs.entry.js +95 -0
- package/dist/cjs/snk-form.cjs.entry.js +3 -3
- package/dist/cjs/snk-grid-config.cjs.entry.js +480 -0
- package/dist/cjs/snk-grid.cjs.entry.js +262 -0
- package/dist/cjs/{snk-guides-viewer-14a11f80.js → snk-guides-viewer-eb764a6b.js} +23 -54
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -5
- package/dist/cjs/snk-select-box.cjs.entry.js +25 -0
- package/dist/cjs/snk-taskbar.cjs.entry.js +216 -0
- package/dist/cjs/taskbar-elements-5e87cf44.js +115 -0
- package/dist/cjs/taskbar-processor-6f3d2a75.js +49 -0
- package/dist/collection/collection-manifest.json +100 -0
- package/dist/collection/components/snk-crud/snk-crud.js +1 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +40 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +4 -4
- package/dist/components/form-config-fetcher.js +4 -4
- package/dist/components/snk-crud.js +1 -1
- package/dist/components/snk-detail-view2.js +18 -4
- package/dist/esm/{ConfigStorage-13b5af9f.js → ConfigStorage-b6c59c8a.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-183dcdcb.js → SnkFormConfigManager-3d21511e.js} +2 -2
- package/dist/esm/{form-config-fetcher-73f3c594.js → form-config-fetcher-5b58440d.js} +4 -4
- package/dist/esm/{index-bd13bdcf.js → index-6519a79e.js} +1 -1
- package/dist/esm/{taskbar-elements-d055c168.js → index-e467ade5.js} +2 -110
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +2 -2
- package/dist/esm/snk-configurator.entry.js +92 -0
- package/dist/esm/snk-crud.entry.js +4 -3
- package/dist/esm/snk-data-exporter.entry.js +511 -0
- package/dist/esm/snk-data-unit.entry.js +365 -0
- package/dist/esm/snk-detail-view.entry.js +192 -0
- package/dist/esm/snk-exporter-email-sender.entry.js +128 -0
- package/dist/esm/snk-field-config.entry.js +58 -0
- package/dist/esm/snk-filter-bar.entry.js +494 -0
- package/dist/esm/snk-filter-detail.entry.js +133 -0
- package/dist/esm/snk-filter-item.entry.js +214 -0
- package/dist/esm/snk-filter-list.entry.js +148 -0
- package/dist/esm/snk-filter-modal.entry.js +72 -0
- package/dist/esm/snk-filter-param-config.entry.js +1 -1
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-form-summary.entry.js +57 -0
- package/dist/esm/snk-form-view.entry.js +91 -0
- package/dist/esm/snk-form.entry.js +3 -3
- package/dist/esm/snk-grid-config.entry.js +476 -0
- package/dist/esm/snk-grid.entry.js +258 -0
- package/dist/esm/{snk-guides-viewer-6e136f09.js → snk-guides-viewer-5513f260.js} +23 -53
- package/dist/esm/snk-guides-viewer.entry.js +8 -6
- package/dist/esm/snk-select-box.entry.js +21 -0
- package/dist/esm/snk-taskbar.entry.js +212 -0
- package/dist/esm/taskbar-elements-10d80c79.js +112 -0
- package/dist/esm/taskbar-processor-c2a99aba.js +47 -0
- package/dist/sankhyablocks/{p-c81ced8a.entry.js → p-0154ae58.entry.js} +1 -1
- package/dist/sankhyablocks/p-03c390a3.entry.js +1 -0
- package/dist/sankhyablocks/{p-1fe0bb83.entry.js → p-05973fd0.entry.js} +1 -1
- package/dist/sankhyablocks/p-093febff.entry.js +1 -0
- package/dist/sankhyablocks/p-0da84eaf.entry.js +1 -0
- package/dist/sankhyablocks/p-1151781b.entry.js +1 -0
- package/dist/sankhyablocks/p-1305e673.js +1 -0
- package/dist/sankhyablocks/p-18271554.entry.js +1 -0
- package/dist/sankhyablocks/p-22e44b9d.entry.js +1 -0
- package/dist/sankhyablocks/p-367136e1.js +26 -0
- package/dist/sankhyablocks/p-3a2ce158.entry.js +1 -0
- package/dist/sankhyablocks/p-3b56228a.entry.js +1 -0
- package/dist/sankhyablocks/{p-d3ad5545.entry.js → p-3fa1a1a6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0ac99531.js → p-44906842.js} +1 -1
- package/dist/sankhyablocks/p-5a3e0eb6.js +1 -0
- package/dist/sankhyablocks/p-6d9b7544.entry.js +1 -0
- package/dist/sankhyablocks/p-73e830cf.entry.js +1 -0
- package/dist/sankhyablocks/p-743b2987.entry.js +1 -0
- package/dist/sankhyablocks/p-74724fa7.js +1 -0
- package/dist/sankhyablocks/p-7610b125.entry.js +1 -0
- package/dist/sankhyablocks/{p-ca2049dd.js → p-86f10dfc.js} +1 -1
- package/dist/sankhyablocks/p-900b2889.entry.js +1 -0
- package/dist/sankhyablocks/p-976282de.entry.js +1 -0
- package/dist/sankhyablocks/p-98f7f796.js +1 -0
- package/dist/sankhyablocks/p-a9ff94e4.entry.js +1 -0
- package/dist/sankhyablocks/p-afba9bbe.entry.js +1 -0
- package/dist/sankhyablocks/{p-e8a1a8e3.entry.js → p-bba73eb1.entry.js} +1 -1
- package/dist/sankhyablocks/p-d3a30cf4.entry.js +1 -0
- package/dist/sankhyablocks/p-e1a42c20.entry.js +1 -0
- package/dist/sankhyablocks/p-eb7b2496.entry.js +1 -0
- package/dist/sankhyablocks/{p-69562bcf.js → p-f132e371.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +6 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/cjs/snk-configurator_6.cjs.entry.js +0 -1033
- package/dist/cjs/snk-data-exporter_11.cjs.entry.js +0 -2424
- package/dist/esm/snk-configurator_6.entry.js +0 -1024
- package/dist/esm/snk-data-exporter_11.entry.js +0 -2410
- package/dist/sankhyablocks/p-0f7295d0.entry.js +0 -1
- package/dist/sankhyablocks/p-498e6ec1.entry.js +0 -1
- package/dist/sankhyablocks/p-4a35cce8.js +0 -1
- package/dist/sankhyablocks/p-511fceba.js +0 -26
- package/dist/sankhyablocks/p-b368e34b.entry.js +0 -1
- package/dist/sankhyablocks/p-c311e56b.js +0 -1
- package/dist/sankhyablocks/p-f39608a9.entry.js +0 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
const core = require('@sankhyalabs/core');
|
4
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
4
|
+
const formConfigFetcher = require('./form-config-fetcher-0c6628d5.js');
|
5
5
|
|
6
6
|
class GridConfigFetcher extends formConfigFetcher.ResourceFetcher {
|
7
7
|
constructor() {
|
@@ -1,8 +1,8 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
const ConfigStorage = require('./ConfigStorage-
|
3
|
+
const ConfigStorage = require('./ConfigStorage-b47fb254.js');
|
4
4
|
const core = require('@sankhyalabs/core');
|
5
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
5
|
+
const formConfigFetcher = require('./form-config-fetcher-0c6628d5.js');
|
6
6
|
|
7
7
|
class SnkFormConfigManager {
|
8
8
|
constructor(configName, onConfigChange) {
|
@@ -104,7 +104,7 @@ class FormConfigFetcher extends ResourceFetcher {
|
|
104
104
|
.then(([configAsString, formCardState, summary, defaultValues]) => {
|
105
105
|
let config;
|
106
106
|
if (configAsString != undefined) {
|
107
|
-
config = JSON.parse(configAsString);
|
107
|
+
config = Object.assign(Object.assign({}, JSON.parse(configAsString)), { emptyConfig: false });
|
108
108
|
const { tabs, fields } = config;
|
109
109
|
if (tabs) {
|
110
110
|
const allTabs = new Map(tabs.map(t => [t.label, t]));
|
@@ -121,19 +121,19 @@ class FormConfigFetcher extends ResourceFetcher {
|
|
121
121
|
}
|
122
122
|
if (formCardState != undefined) {
|
123
123
|
if (config == undefined) {
|
124
|
-
config = { fields: [] };
|
124
|
+
config = { emptyConfig: true, fields: [] };
|
125
125
|
}
|
126
126
|
config.cardsState = new Map(JSON.parse(formCardState));
|
127
127
|
}
|
128
128
|
if (summary != undefined) {
|
129
129
|
if (config == undefined) {
|
130
|
-
config = { fields: [] };
|
130
|
+
config = { emptyConfig: true, fields: [] };
|
131
131
|
}
|
132
132
|
config.summary = new Map(Object.entries(JSON.parse(summary)));
|
133
133
|
}
|
134
134
|
if (defaultValues != undefined) {
|
135
135
|
if (config == undefined) {
|
136
|
-
config = { fields: [] };
|
136
|
+
config = { emptyConfig: true, fields: [] };
|
137
137
|
}
|
138
138
|
config.defaultVars = new Map(Object.entries(JSON.parse(defaultValues)));
|
139
139
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
const index = require('./index-21bd01e1.js');
|
4
|
-
const index$1 = require('./index-f400b1d6.js');
|
5
4
|
|
6
5
|
const appendToMap = (map, propName, value) => {
|
7
6
|
const items = map.get(propName);
|
@@ -198,113 +197,4 @@ const store = createStore({
|
|
198
197
|
exporterProviders: {}
|
199
198
|
});
|
200
199
|
|
201
|
-
exports.TaskbarElement = void 0;
|
202
|
-
(function (TaskbarElement) {
|
203
|
-
TaskbarElement["PREVIOUS"] = "PREVIOUS";
|
204
|
-
TaskbarElement["NEXT"] = "NEXT";
|
205
|
-
TaskbarElement["REFRESH"] = "REFRESH";
|
206
|
-
TaskbarElement["UPDATE"] = "UPDATE";
|
207
|
-
TaskbarElement["CLONE"] = "CLONE";
|
208
|
-
TaskbarElement["REMOVE"] = "REMOVE";
|
209
|
-
TaskbarElement["INSERT"] = "INSERT";
|
210
|
-
TaskbarElement["CANCEL"] = "CANCEL";
|
211
|
-
TaskbarElement["SAVE"] = "SAVE";
|
212
|
-
TaskbarElement["GRID_MODE"] = "GRID_MODE";
|
213
|
-
TaskbarElement["FORM_MODE"] = "FORM_MODE";
|
214
|
-
TaskbarElement["MORE_OPTIONS"] = "MORE_OPTIONS";
|
215
|
-
TaskbarElement["DIVIDER"] = "DIVIDER";
|
216
|
-
TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
|
217
|
-
TaskbarElement["DATA_EXPORTER"] = "DATA_EXPORTER";
|
218
|
-
})(exports.TaskbarElement || (exports.TaskbarElement = {}));
|
219
|
-
exports.AuthorizationElements = void 0;
|
220
|
-
(function (AuthorizationElements) {
|
221
|
-
AuthorizationElements["UPDATE"] = "UPDATE";
|
222
|
-
AuthorizationElements["CLONE"] = "CLONE";
|
223
|
-
AuthorizationElements["REMOVE"] = "REMOVE";
|
224
|
-
AuthorizationElements["INSERT"] = "INSERT";
|
225
|
-
AuthorizationElements["CONFIGURATOR"] = "CONFIGURATOR";
|
226
|
-
})(exports.AuthorizationElements || (exports.AuthorizationElements = {}));
|
227
|
-
exports.VisibleWhenForbidden = void 0;
|
228
|
-
(function (VisibleWhenForbidden) {
|
229
|
-
VisibleWhenForbidden["CONFIGURATOR"] = "CONFIGURATOR";
|
230
|
-
})(exports.VisibleWhenForbidden || (exports.VisibleWhenForbidden = {}));
|
231
|
-
const buildCustomButton = (def, className, dataElementId, action, isEnabled) => {
|
232
|
-
const { hint, text, iconName } = def;
|
233
|
-
if (iconName) {
|
234
|
-
if (text) {
|
235
|
-
return iconTextButton(iconName, def.name, className, dataElementId, hint, text, action, isEnabled);
|
236
|
-
}
|
237
|
-
else {
|
238
|
-
return iconButton(iconName, def.name, className, dataElementId, hint, action, isEnabled);
|
239
|
-
}
|
240
|
-
}
|
241
|
-
else {
|
242
|
-
return textButton(def.name, className, dataElementId, text, hint, action, isEnabled);
|
243
|
-
}
|
244
|
-
};
|
245
|
-
const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions, configName, presentationMode) => {
|
246
|
-
var _a;
|
247
|
-
const title = getTitle(element);
|
248
|
-
switch (element) {
|
249
|
-
case exports.TaskbarElement.PREVIOUS:
|
250
|
-
return iconButton("chevron-left", element, className, dataElementId, title, action, isEnabled);
|
251
|
-
case exports.TaskbarElement.NEXT:
|
252
|
-
return iconButton("chevron-right", element, className, dataElementId, title, action, isEnabled);
|
253
|
-
case exports.TaskbarElement.REFRESH:
|
254
|
-
return iconButton("sync", element, className, dataElementId, title, action, isEnabled);
|
255
|
-
case exports.TaskbarElement.UPDATE:
|
256
|
-
return iconButton("edit", element, className, dataElementId, title, action, isEnabled);
|
257
|
-
case exports.TaskbarElement.CLONE:
|
258
|
-
return iconButton("copy", element, className, dataElementId, title, action, isEnabled);
|
259
|
-
case exports.TaskbarElement.REMOVE:
|
260
|
-
return iconButton("delete", element, className, dataElementId, title, action, isEnabled);
|
261
|
-
case exports.TaskbarElement.INSERT:
|
262
|
-
if (presentationMode === index$1.PresentationMode.PRIMARY) {
|
263
|
-
return iconTextButton("plus", element, className, dataElementId, title, title, action, isEnabled);
|
264
|
-
}
|
265
|
-
else {
|
266
|
-
return iconButton("plus", element, className, dataElementId, title, action, isEnabled);
|
267
|
-
}
|
268
|
-
case exports.TaskbarElement.CANCEL:
|
269
|
-
return textButton(element, className, dataElementId, title, title, action, isEnabled);
|
270
|
-
case exports.TaskbarElement.SAVE:
|
271
|
-
if (presentationMode === index$1.PresentationMode.PRIMARY) {
|
272
|
-
return iconTextButton("save", element, className, dataElementId, title, title, action, isEnabled);
|
273
|
-
}
|
274
|
-
else {
|
275
|
-
return iconButton("save", element, className, dataElementId, title, action, isEnabled);
|
276
|
-
}
|
277
|
-
case exports.TaskbarElement.GRID_MODE:
|
278
|
-
return iconButton("table", element, className, dataElementId, title, action, isEnabled);
|
279
|
-
case exports.TaskbarElement.FORM_MODE:
|
280
|
-
return iconButton("list", element, className, dataElementId, title, action, isEnabled);
|
281
|
-
case exports.TaskbarElement.CONFIGURATOR:
|
282
|
-
return iconButton("settings-inverted", element, className, dataElementId, title, action, isEnabled);
|
283
|
-
case exports.TaskbarElement.MORE_OPTIONS:
|
284
|
-
return actionButton(element, className, dataElementId, title, action, isEnabled, actions);
|
285
|
-
case exports.TaskbarElement.DIVIDER:
|
286
|
-
return index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-horizontal--medium", "data-taskbar-divider": true });
|
287
|
-
case exports.TaskbarElement.DATA_EXPORTER:
|
288
|
-
const provider = (_a = store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
|
289
|
-
return index.h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId });
|
290
|
-
}
|
291
|
-
};
|
292
|
-
function textButton(name, className, dataElementId, text, title, action, isEnabled) {
|
293
|
-
return index.h("ez-button", { title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
|
294
|
-
}
|
295
|
-
function iconButton(iconName, name, className, dataElementId, title, action, isEnabled) {
|
296
|
-
return index.h("ez-button", { title: title, mode: "icon", size: "small", class: className, "data-element-id": dataElementId, iconName: iconName, enabled: isEnabled(name), onClick: () => action(name) });
|
297
|
-
}
|
298
|
-
function iconTextButton(iconName, name, className, dataElementId, text, title, action, isEnabled) {
|
299
|
-
return index.h("ez-button", { title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) },
|
300
|
-
index.h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
301
|
-
}
|
302
|
-
function actionButton(element, className, dataElementId, title, action, isEnabled, actions) {
|
303
|
-
return actions && actions.length > 0
|
304
|
-
? index.h("ez-actions-button", { title: title, size: "small", "data-element-id": dataElementId, arrowActive: true, class: className, enabled: isEnabled(element), onEzAction: (evt) => action(evt.detail.value), actions: actions })
|
305
|
-
: undefined;
|
306
|
-
}
|
307
|
-
|
308
|
-
exports.buildCustomButton = buildCustomButton;
|
309
|
-
exports.buildElem = buildElem;
|
310
200
|
exports.store = store;
|
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-
|
17
|
+
return index.bootstrapLazy([["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select.cjs",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number.cjs",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-param-config.cjs",[[2,"snk-filter-param-config",{"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["snk-filter-period.cjs",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized.cjs",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search.cjs",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text.cjs",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-detail-view.cjs",[[2,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"guideItem":[16],"entityName":[1,"entity-name"],"label":[1],"levelPath":[1,"level-path"],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"changeViewMode":[64],"configGrid":[64],"showUp":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-configurator.cjs",[[2,"snk-configurator",{"configName":[1,"config-name"],"viewMode":[2,"view-mode"],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["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],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["snk-taskbar.cjs",[[6,"snk-taskbar",{"configName":[1,"config-name"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"_permissions":[32]}]]],["snk-grid-config.cjs",[[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"configName":[1,"config-name"]}]]],["snk-field-config.cjs",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16]}]]],["snk-filter-detail.cjs",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-filter-item.cjs",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["snk-filter-list.cjs",[[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]]]],["snk-filter-bar.cjs",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32],"scrollerLocked":[32]},[[0,"filterChange","filterChangeListener"]]]]],["snk-grid.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}]]],["snk-config-options.cjs",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config.cjs",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-form-config.cjs",[[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["snk-exporter-email-sender.cjs",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter.cjs",[[2,"snk-data-exporter",{"provider":[16],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-guides-viewer.cjs",[[2,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"showFormConfig":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_currentViewMode":[32],"goToView":[64]}]]],["snk-form.cjs",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-application.cjs",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadGridConfig":[64],"loadTotals":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64]}]]],["snk-form-summary.cjs",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["snk-form-view.cjs",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"recordsValidator":[16],"showUp":[64]}]]],["snk-filter-modal.cjs",[[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}]]],["snk-select-box.cjs",[[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}]]]], options);
|
18
18
|
});
|
19
19
|
};
|
20
20
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
17
17
|
};
|
18
18
|
|
19
19
|
patchBrowser().then(options => {
|
20
|
-
return index.bootstrapLazy([["snk-
|
20
|
+
return index.bootstrapLazy([["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select.cjs",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number.cjs",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-param-config.cjs",[[2,"snk-filter-param-config",{"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["snk-filter-period.cjs",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized.cjs",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search.cjs",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text.cjs",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-detail-view.cjs",[[2,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"guideItem":[16],"entityName":[1,"entity-name"],"label":[1],"levelPath":[1,"level-path"],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"changeViewMode":[64],"configGrid":[64],"showUp":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-configurator.cjs",[[2,"snk-configurator",{"configName":[1,"config-name"],"viewMode":[2,"view-mode"],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["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],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["snk-taskbar.cjs",[[6,"snk-taskbar",{"configName":[1,"config-name"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"_permissions":[32]}]]],["snk-grid-config.cjs",[[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"configName":[1,"config-name"]}]]],["snk-field-config.cjs",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16]}]]],["snk-filter-detail.cjs",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-filter-item.cjs",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["snk-filter-list.cjs",[[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]]]],["snk-filter-bar.cjs",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32],"scrollerLocked":[32]},[[0,"filterChange","filterChangeListener"]]]]],["snk-grid.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}]]],["snk-config-options.cjs",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config.cjs",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-form-config.cjs",[[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["snk-exporter-email-sender.cjs",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter.cjs",[[2,"snk-data-exporter",{"provider":[16],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-guides-viewer.cjs",[[2,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"showFormConfig":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_currentViewMode":[32],"goToView":[64]}]]],["snk-form.cjs",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-application.cjs",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadGridConfig":[64],"loadTotals":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64]}]]],["snk-form-summary.cjs",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["snk-form-view.cjs",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"recordsValidator":[16],"showUp":[64]}]]],["snk-filter-modal.cjs",[[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}]]],["snk-select-box.cjs",[[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}]]]], options);
|
21
21
|
});
|
22
22
|
|
23
23
|
exports.setNonce = index.setNonce;
|
@@ -7,8 +7,8 @@ const core = require('@sankhyalabs/core');
|
|
7
7
|
const DataFetcher = require('./DataFetcher-bceeaf2d.js');
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
9
9
|
const SnkMessageBuilder = require('./SnkMessageBuilder-196c6528.js');
|
10
|
-
const ConfigStorage = require('./ConfigStorage-
|
11
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
10
|
+
const ConfigStorage = require('./ConfigStorage-b47fb254.js');
|
11
|
+
const formConfigFetcher = require('./form-config-fetcher-0c6628d5.js');
|
12
12
|
require('./_commonjsHelpers-537d719a.js');
|
13
13
|
|
14
14
|
class SnkErrorHandler {
|
@@ -0,0 +1,96 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-21bd01e1.js');
|
6
|
+
const core = require('@sankhyalabs/core');
|
7
|
+
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
8
|
+
const constants = require('./constants-450c0bb7.js');
|
9
|
+
|
10
|
+
const snkConfiguratorCss = ".sc-snk-configurator-h{--snk-configurator__button-close--padding-left:var(--space--medium, 12px);--snk-configurator__title--color:var(--title--primary, #2B3A54);--snk-configurator__title--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__title--font-size:var(--title--large, 20px);--snk-configurator__title--font-weight:var(--text-weight--extra-large, 700);--snk-configurator__subtitle--color:var(--title--primary, #2B3A54);--snk-configurator__subtitle--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__subtitle--font-size:var(--text--medium, 14px);--snk-configurator__subtitle--font-weight:var(--text-weight--large, 600);--snk-configurator__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-configurator__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-configurator__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-configurator__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-configurator__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-configurator__scrollbar--width:var(--space--medium, 12px)}.snk-configurator.sc-snk-configurator{display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}@media screen and (min-width: 480px){.snk-configurator.sc-snk-configurator{width:359px;max-width:359px}}.snk-configurator__button-config.sc-snk-configurator{--ez-button--min-width:100%}.snk-configurator__header.sc-snk-configurator{display:flex;justify-content:space-between;align-items:center;width:100%}.snk-configurator__title.sc-snk-configurator{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-configurator__title--color);font-size:var(--snk-configurator__title--font-size);font-family:var(--snk-configurator__title--font-family);font-weight:var(--snk-configurator__title--font-weight)}.snk-configurator__subtitle.sc-snk-configurator{display:flex;margin:0;padding-top:var(--space--medium);padding-bottom:var(--space--small);color:var(--snk-configurator__subtitle--color);font-size:var(--snk-configurator__subtitle--font-size);font-family:var(--snk-configurator__subtitle--font-family);font-weight:var(--snk-configurator__subtitle--font-weight)}.snk-configurator__button-close.sc-snk-configurator{padding-left:var(--snk-configurator__button-close--padding-left)}.snk-configurator__main.sc-snk-configurator{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-configurator__scrollbar--color-clicked) var(--snk-configurator__scrollbar--color-background)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar{background-color:var(--snk-configurator__scrollbar--color-background);width:var(--snk-configurator__scrollbar--width);max-width:var(--snk-configurator__scrollbar--width);min-width:var(--snk-configurator__scrollbar--width)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-track{background-color:var(--snk-configurator__scrollbar--color-background);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb{background-color:var(--snk-configurator__scrollbar--color-default);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:hover,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-configurator__scrollbar--color-hover)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:active,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-configurator__scrollbar--color-clicked)}";
|
11
|
+
|
12
|
+
const SnkConfigurator = class {
|
13
|
+
constructor(hostRef) {
|
14
|
+
index.registerInstance(this, hostRef);
|
15
|
+
this.configSelected = index.createEvent(this, "configSelected", 7);
|
16
|
+
this.openConfig = index.createEvent(this, "openConfig", 7);
|
17
|
+
this._opened = false;
|
18
|
+
this._permissions = undefined;
|
19
|
+
this.configName = undefined;
|
20
|
+
this.viewMode = constants.VIEW_MODE.GRID;
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* Exibe a janela de configuração.
|
24
|
+
*/
|
25
|
+
async open() {
|
26
|
+
this._opened = true;
|
27
|
+
this.configSelected.emit(this.getViewModeValue());
|
28
|
+
}
|
29
|
+
/**
|
30
|
+
* Fecha a janela de configuração.
|
31
|
+
*/
|
32
|
+
async close() {
|
33
|
+
this.closeConfig();
|
34
|
+
}
|
35
|
+
closeConfig() {
|
36
|
+
this._opened = false;
|
37
|
+
}
|
38
|
+
onViewModeChanged(evt) {
|
39
|
+
const value = evt === null || evt === void 0 ? void 0 : evt.detail;
|
40
|
+
this.viewMode = value;
|
41
|
+
this.configSelected.emit(this.viewMode);
|
42
|
+
}
|
43
|
+
onClickOpenConfig() {
|
44
|
+
this.openConfig.emit(this.viewMode);
|
45
|
+
}
|
46
|
+
isAllowed(configName) {
|
47
|
+
if (AuthorizationConfig.AuthorizationConfig[configName]) {
|
48
|
+
return this._permissions ? this._permissions.isSup || this._permissions[configName] : false;
|
49
|
+
}
|
50
|
+
return true;
|
51
|
+
}
|
52
|
+
enableModeConfig() {
|
53
|
+
if (!this.isAllowed(AuthorizationConfig.AuthorizationConfig.CONFIG_GRID) || !this.isAllowed(AuthorizationConfig.AuthorizationConfig.CONFIG)) {
|
54
|
+
return false;
|
55
|
+
}
|
56
|
+
return true;
|
57
|
+
}
|
58
|
+
getViewModeValue() {
|
59
|
+
if (this._permissions != undefined) {
|
60
|
+
if (!this.isAllowed(AuthorizationConfig.AuthorizationConfig.CONFIG_GRID)) {
|
61
|
+
this.viewMode = constants.VIEW_MODE.FORM;
|
62
|
+
}
|
63
|
+
else if (!this.isAllowed(AuthorizationConfig.AuthorizationConfig.CONFIG)) {
|
64
|
+
this.viewMode = constants.VIEW_MODE.GRID;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
return this.viewMode;
|
68
|
+
}
|
69
|
+
/**
|
70
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
71
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
72
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
73
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-configurator.msg.ts"
|
74
|
+
*/
|
75
|
+
getMessage(key) {
|
76
|
+
var _a, _b;
|
77
|
+
return (_b = (_a = this._application) === null || _a === void 0 ? void 0 : _a.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage(key, {});
|
78
|
+
}
|
79
|
+
componentWillLoad() {
|
80
|
+
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
81
|
+
if (this._application) {
|
82
|
+
this._application.getAllAccess().then(access => this._permissions = access);
|
83
|
+
}
|
84
|
+
else {
|
85
|
+
this._permissions = {};
|
86
|
+
}
|
87
|
+
}
|
88
|
+
render() {
|
89
|
+
return (index.h("ez-modal", { opened: this._opened, "close-esc": false, "close-outside-click": false, "modal-size": "small" }, index.h("div", { class: "snk-configurator" }, index.h("div", { class: "snk-configurator__header" }, index.h("label", { class: "snk-configurator__title" }, this.getMessage("snkConfigurator.titleConfigurations")), index.h("div", { class: "snk-configurator__button-close" }, index.h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))), index.h("div", { class: "snk-configurator__main" }, index.h("ez-radio-button", { class: "ez-margin-top--medium", label: this.getMessage("snkConfigurator.subTitleModeConfig"), value: this.getViewModeValue().toString(), onEzChange: (evt) => this.onViewModeChanged(evt), enabled: this.enableModeConfig() }, index.h("ez-radio-button-option", { label: this.getMessage("snkConfigurator.labelGrid"), value: constants.VIEW_MODE.GRID }), index.h("ez-radio-button-option", { label: this.getMessage("snkConfigurator.labelForm"), value: constants.VIEW_MODE.FORM })), index.h("ez-button", { label: this.viewMode === constants.VIEW_MODE.GRID
|
90
|
+
? this.getMessage("snkConfigurator.labelConfigGrid")
|
91
|
+
: this.getMessage("snkConfigurator.labelConfigForm"), class: "snk-configurator__button-config ez-button--primary", onClick: () => this.onClickOpenConfig(), id: "openConfigurator" }), index.h("hr", { class: "ez-divider-horizontal ez-margin-vertical--medium" })))));
|
92
|
+
}
|
93
|
+
};
|
94
|
+
SnkConfigurator.style = snkConfiguratorCss;
|
95
|
+
|
96
|
+
exports.snk_configurator = SnkConfigurator;
|
@@ -4,10 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-21bd01e1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const taskbarElements = require('./taskbar-elements-
|
7
|
+
const taskbarElements = require('./taskbar-elements-5e87cf44.js');
|
8
8
|
require('./DataFetcher-bceeaf2d.js');
|
9
9
|
const index$1 = require('./index-f400b1d6.js');
|
10
10
|
const constants = require('./constants-450c0bb7.js');
|
11
|
+
require('./index-fc7ca86c.js');
|
11
12
|
require('./_commonjsHelpers-537d719a.js');
|
12
13
|
|
13
14
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
@@ -104,7 +105,7 @@ const SnkCrud = class {
|
|
104
105
|
}
|
105
106
|
}
|
106
107
|
render() {
|
107
|
-
return (index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode }, index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, onExit: () => this.setViewMode(constants.VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), "data-element-id": "crud_form" }, index.h("slot", { name: "SnkFormTaskBar" }))), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail) })));
|
108
|
+
return (index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode }, index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, onExit: () => this.setViewMode(constants.VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form" }, index.h("slot", { name: "SnkFormTaskBar" }))), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail) })));
|
108
109
|
}
|
109
110
|
get _element() { return index.getElement(this); }
|
110
111
|
};
|