@sankhyalabs/sankhyablocks 1.3.31-beta.7 → 1.3.31-beta.9
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/{index-532bcc28.js → index-c6671817.js} +0 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/snk-application.cjs.entry.js +67 -24
- package/dist/cjs/snk-crud.cjs.entry.js +64 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +14 -4
- package/dist/cjs/snk-form_2.cjs.entry.js +170 -0
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +2 -2
- package/dist/cjs/{taskbar-elements-9d47b416.js → taskbar-elements-7f99f0c9.js} +2 -2
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +2 -2
- package/dist/collection/components/snk-application/snk-application.js +71 -25
- package/dist/collection/components/snk-crud/snk-crud.css +5 -0
- package/dist/collection/components/snk-crud/snk-crud.js +149 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +27 -3
- package/dist/collection/components/snk-form/snk-form.js +59 -22
- package/dist/collection/components/snk-grid/snk-grid.js +33 -13
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +1 -1
- package/dist/components/snk-application2.js +66 -23
- package/dist/components/snk-crud.d.ts +11 -0
- package/dist/components/snk-crud.js +102 -0
- package/dist/components/snk-data-unit.js +13 -3
- package/dist/components/snk-form.js +1 -116
- package/dist/components/snk-form2.js +134 -0
- package/dist/components/snk-grid.js +1 -83
- package/dist/components/snk-grid2.js +91 -0
- package/dist/components/snk-taskbar2.js +1 -1
- package/dist/esm/{index-0b078db7.js → index-6a83ac96.js} +0 -3
- package/dist/esm/loader.js +2 -2
- package/dist/esm/sankhyablocks.js +2 -2
- package/dist/esm/snk-application.entry.js +67 -24
- package/dist/esm/snk-crud.entry.js +60 -0
- package/dist/esm/snk-data-unit.entry.js +14 -4
- package/dist/esm/snk-form_2.entry.js +165 -0
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +2 -2
- package/dist/esm/{taskbar-elements-3ba30bf4.js → taskbar-elements-e0b8a285.js} +2 -2
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/{p-bc14f01e.entry.js → p-18fe0469.entry.js} +2 -2
- package/dist/sankhyablocks/p-4e2fcfe4.entry.js +1 -0
- package/dist/sankhyablocks/{p-1c19b89c.entry.js → p-5e2e9334.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8f7b9a85.entry.js → p-7fe9e5c2.entry.js} +1 -1
- package/dist/sankhyablocks/p-8650ae26.entry.js +1 -0
- package/dist/sankhyablocks/p-a5439706.js +1 -0
- package/dist/sankhyablocks/p-c3d20542.entry.js +1 -0
- package/dist/sankhyablocks/p-cd1dc099.js +2 -0
- package/dist/sankhyablocks/{p-a8305c35.entry.js → p-d25637c9.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +12 -3
- package/dist/types/components.d.ts +48 -5
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/snk-form.cjs.entry.js +0 -95
- package/dist/cjs/snk-grid.cjs.entry.js +0 -64
- package/dist/esm/snk-form.entry.js +0 -91
- package/dist/esm/snk-grid.entry.js +0 -60
- package/dist/sankhyablocks/p-21c2457b.entry.js +0 -1
- package/dist/sankhyablocks/p-560fdf54.entry.js +0 -1
- package/dist/sankhyablocks/p-574764bf.js +0 -1
- package/dist/sankhyablocks/p-9c225717.entry.js +0 -1
- package/dist/sankhyablocks/p-a45dba1a.js +0 -2
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
+
import { T as TaskbarElement, d as defineCustomElement$1 } from './snk-taskbar2.js';
|
|
4
|
+
|
|
5
|
+
const snkGridCss = ".sc-snk-grid-h{display:flex;height:100%;width:100%}";
|
|
6
|
+
|
|
7
|
+
const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.actionClick = createEvent(this, "actionClick", 7);
|
|
12
|
+
this.gridDoubleClick = createEvent(this, "gridDoubleClick", 7);
|
|
13
|
+
}
|
|
14
|
+
getHeaderButtons() {
|
|
15
|
+
return this._dataState && this._dataState.selectedRecords.length > 0 ? "UPDATE,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,REFRESH" : "REFRESH";
|
|
16
|
+
}
|
|
17
|
+
actionClickHandler(evt) {
|
|
18
|
+
if (evt.detail === TaskbarElement.CONFIG_GRID && this._grid) {
|
|
19
|
+
this._grid.openGridConfig();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
saveConfig(config) {
|
|
23
|
+
const snkApplication = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
24
|
+
if (snkApplication) {
|
|
25
|
+
snkApplication.saveGridConfig(config);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
componentWillLoad() {
|
|
29
|
+
const snkApplication = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
30
|
+
if (snkApplication) {
|
|
31
|
+
snkApplication.loadGridConfig(this.configName).then(cfg => {
|
|
32
|
+
this._gridConfig = cfg;
|
|
33
|
+
this._configLoaded = true;
|
|
34
|
+
});
|
|
35
|
+
//Forçamos a carga dos acessos pra aproveitar a request inicial.
|
|
36
|
+
snkApplication.getAllAccess();
|
|
37
|
+
}
|
|
38
|
+
let parent = this._element.parentElement;
|
|
39
|
+
while (parent) {
|
|
40
|
+
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
|
41
|
+
this._snkDataUnit = parent;
|
|
42
|
+
this._dataUnit = this._snkDataUnit.dataUnit;
|
|
43
|
+
if (!this._dataUnit) {
|
|
44
|
+
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
|
45
|
+
this._dataUnit = evt.detail;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
|
|
49
|
+
this._dataState = evt.detail;
|
|
50
|
+
});
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
parent = parent.parentElement;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
if (!this._configLoaded || !this._dataUnit) {
|
|
58
|
+
return undefined;
|
|
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", null)), 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 }))));
|
|
61
|
+
}
|
|
62
|
+
get _element() { return this; }
|
|
63
|
+
static get style() { return snkGridCss; }
|
|
64
|
+
}, [6, "snk-grid", {
|
|
65
|
+
"configName": [1, "config-name"],
|
|
66
|
+
"actionsList": [16],
|
|
67
|
+
"_dataUnit": [32],
|
|
68
|
+
"_configLoaded": [32],
|
|
69
|
+
"_dataState": [32],
|
|
70
|
+
"_gridConfig": [32]
|
|
71
|
+
}]);
|
|
72
|
+
function defineCustomElement() {
|
|
73
|
+
if (typeof customElements === "undefined") {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const components = ["snk-grid", "snk-taskbar"];
|
|
77
|
+
components.forEach(tagName => { switch (tagName) {
|
|
78
|
+
case "snk-grid":
|
|
79
|
+
if (!customElements.get(tagName)) {
|
|
80
|
+
customElements.define(tagName, SnkGrid);
|
|
81
|
+
}
|
|
82
|
+
break;
|
|
83
|
+
case "snk-taskbar":
|
|
84
|
+
if (!customElements.get(tagName)) {
|
|
85
|
+
defineCustomElement$1();
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
} });
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { SnkGrid as S, defineCustomElement as d };
|
|
@@ -53,7 +53,7 @@ const buildElem = (element, className, getTitle, action, isEnabled, actions) =>
|
|
|
53
53
|
case TaskbarElement.CONFIG_GRID:
|
|
54
54
|
return iconButton("settings-inverted", element, className, getTitle, action, isEnabled);
|
|
55
55
|
case TaskbarElement.MORE_OPTIONS:
|
|
56
|
-
return h("ez-actions-button", { size: "small", class: className, enabled: isEnabled(element), onEzAction: (evt) => action(evt.detail.value), actions: actions });
|
|
56
|
+
return actions && actions.length > 0 ? h("ez-actions-button", { title: getTitle(element), size: "small", class: className, enabled: isEnabled(element), onEzAction: (evt) => action(evt.detail.value), actions: actions }) : undefined;
|
|
57
57
|
case TaskbarElement.DIVIDER:
|
|
58
58
|
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-horizontal--medium" });
|
|
59
59
|
}
|
|
@@ -1018,9 +1018,6 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1018
1018
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
1019
1019
|
const instance = hostRef.$lazyInstance$ ;
|
|
1020
1020
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1021
|
-
{
|
|
1022
|
-
safeCall(instance, 'componentDidRender');
|
|
1023
|
-
}
|
|
1024
1021
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1025
1022
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1026
1023
|
{
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-6a83ac96.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.16.1 | MIT Licensed | https://stenciljs.com
|
|
@@ -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([["
|
|
13
|
+
return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1,"config-name"],"formTitle":[1,"form-title"],"actionsList":[16],"recordsValidator":[8,"records-validator"],"_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],"messageBuilder":[16],"beforeSave":[16],"afterSave":[16],"autoLoad":[4,"auto-load"],"getDataUnit":[64]}]]],["snk-application",[[2,"snk-application",{"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],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"saveGridConfig":[64],"executeSearch":[64],"isDebugMode":[64]}]]],["snk-form_2",[[2,"snk-form",{"formTitle":[1,"form-title"],"configName":[1,"config-name"],"recordsValidator":[8,"records-validator"],"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
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-6a83ac96.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.16.1 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["
|
|
16
|
+
return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1,"config-name"],"formTitle":[1,"form-title"],"actionsList":[16],"recordsValidator":[8,"records-validator"],"_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],"messageBuilder":[16],"beforeSave":[16],"afterSave":[16],"autoLoad":[4,"auto-load"],"getDataUnit":[64]}]]],["snk-application",[[2,"snk-application",{"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],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"saveGridConfig":[64],"executeSearch":[64],"isDebugMode":[64]}]]],["snk-form_2",[[2,"snk-form",{"formTitle":[1,"form-title"],"configName":[1,"config-name"],"recordsValidator":[8,"records-validator"],"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
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-6a83ac96.js';
|
|
2
2
|
import { ErrorException, StringUtils, DataUnit, DataType, ChangeOperation, DateUtils, ObjectUtils, WaitingChangeException, WarningException, DependencyType, ApplicationContext, ErrorTracking } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
|
|
@@ -7263,7 +7263,7 @@ class SnkErrorHandler {
|
|
|
7263
7263
|
}
|
|
7264
7264
|
else {
|
|
7265
7265
|
const title = (exception === null || exception === void 0 ? void 0 : exception.title) || "Erro detectado";
|
|
7266
|
-
const message = (typeof exception === "string") ? exception : exception.message || `Erro interno "${exception}"`;
|
|
7266
|
+
const message = (typeof exception === "string") ? exception : exception.message || `Erro interno "${ObjectUtils.objectToString(exception)}"`;
|
|
7267
7267
|
this._app.error(title, message);
|
|
7268
7268
|
}
|
|
7269
7269
|
}
|
|
@@ -7281,7 +7281,9 @@ const SnkApplication = class {
|
|
|
7281
7281
|
registerInstance(this, hostRef);
|
|
7282
7282
|
this.applicationLoaded = createEvent(this, "applicationLoaded", 7);
|
|
7283
7283
|
this.applicationLoading = createEvent(this, "applicationLoading", 7);
|
|
7284
|
+
this._authPromises = [];
|
|
7284
7285
|
this._duCache = new Map();
|
|
7286
|
+
this._duPromises = new Map();
|
|
7285
7287
|
this._requestListener = new RequestListenerLoadingBar();
|
|
7286
7288
|
}
|
|
7287
7289
|
get parameters() {
|
|
@@ -7300,17 +7302,27 @@ const SnkApplication = class {
|
|
|
7300
7302
|
return this._resourceID;
|
|
7301
7303
|
}
|
|
7302
7304
|
get auth() {
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
this.
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7305
|
+
if (this._auth) {
|
|
7306
|
+
return Promise.resolve(this._auth);
|
|
7307
|
+
}
|
|
7308
|
+
else {
|
|
7309
|
+
return new Promise((resolve, reject) => {
|
|
7310
|
+
const waitingAuth = this._authPromises.length > 0;
|
|
7311
|
+
this._authPromises.push(new PendingPromise(resolve, reject));
|
|
7312
|
+
if (!waitingAuth) {
|
|
7313
|
+
this.authFetcher.getData(this._resourceID).then((authList) => {
|
|
7314
|
+
this._auth = authList;
|
|
7315
|
+
while (this._authPromises.length > 0) {
|
|
7316
|
+
this._authPromises.pop().resolve(this._auth);
|
|
7317
|
+
}
|
|
7318
|
+
}).catch(error => {
|
|
7319
|
+
while (this._authPromises.length > 0) {
|
|
7320
|
+
this._authPromises.pop().reject(error);
|
|
7321
|
+
}
|
|
7322
|
+
});
|
|
7323
|
+
}
|
|
7324
|
+
});
|
|
7325
|
+
}
|
|
7314
7326
|
}
|
|
7315
7327
|
/**
|
|
7316
7328
|
* Caso o usuário logado seja o SUP.
|
|
@@ -7478,17 +7490,45 @@ const SnkApplication = class {
|
|
|
7478
7490
|
async openApp(resourceId, pkObject) {
|
|
7479
7491
|
Workspace.openAppActivity(resourceId, pkObject);
|
|
7480
7492
|
}
|
|
7493
|
+
getDuPromissesStack(dataUnitName) {
|
|
7494
|
+
let stack;
|
|
7495
|
+
if (dataUnitName) {
|
|
7496
|
+
stack = this._duPromises.get(dataUnitName);
|
|
7497
|
+
if (!stack) {
|
|
7498
|
+
stack = [];
|
|
7499
|
+
this._duPromises.set(dataUnitName, stack);
|
|
7500
|
+
}
|
|
7501
|
+
}
|
|
7502
|
+
return stack || [];
|
|
7503
|
+
}
|
|
7481
7504
|
/**
|
|
7482
|
-
* Cria o DataUnit a partir do nome da entidade.
|
|
7505
|
+
* Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache
|
|
7506
|
+
* passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado
|
|
7483
7507
|
*/
|
|
7484
|
-
async createDataunit(entityName) {
|
|
7485
|
-
return new Promise(resolve => {
|
|
7486
|
-
const
|
|
7487
|
-
|
|
7508
|
+
async createDataunit(entityName, dataUnitName) {
|
|
7509
|
+
return new Promise((resolve, reject) => {
|
|
7510
|
+
const duPromisses = this.getDuPromissesStack(dataUnitName);
|
|
7511
|
+
const waitingDu = duPromisses.length > 0;
|
|
7512
|
+
duPromisses.push(new PendingPromise(resolve, reject));
|
|
7513
|
+
if (!waitingDu) {
|
|
7514
|
+
const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, this.resourceID);
|
|
7515
|
+
dataUnit.loadMetadata().then(() => {
|
|
7516
|
+
if (dataUnitName) {
|
|
7517
|
+
this._duCache.set(dataUnitName, dataUnit);
|
|
7518
|
+
}
|
|
7519
|
+
while (duPromisses.length > 0) {
|
|
7520
|
+
duPromisses.pop().resolve(dataUnit);
|
|
7521
|
+
}
|
|
7522
|
+
}).catch(reason => {
|
|
7523
|
+
while (duPromisses.length > 0) {
|
|
7524
|
+
duPromisses.pop().reject(reason);
|
|
7525
|
+
}
|
|
7526
|
+
});
|
|
7527
|
+
}
|
|
7488
7528
|
});
|
|
7489
7529
|
}
|
|
7490
7530
|
/**
|
|
7491
|
-
*
|
|
7531
|
+
* Obtem um DataUnit do cache ou cria um caso ainda não tenha sido criado.
|
|
7492
7532
|
*/
|
|
7493
7533
|
async getDataUnit(entityName, dataUnitName) {
|
|
7494
7534
|
return new Promise((resolve, reject) => {
|
|
@@ -7497,10 +7537,7 @@ const SnkApplication = class {
|
|
|
7497
7537
|
resolve(dataUnit);
|
|
7498
7538
|
}
|
|
7499
7539
|
else {
|
|
7500
|
-
this.createDataunit(entityName).then(dataUnit => {
|
|
7501
|
-
if (dataUnitName) {
|
|
7502
|
-
this._duCache.set(dataUnitName, dataUnit);
|
|
7503
|
-
}
|
|
7540
|
+
this.createDataunit(entityName, dataUnitName).then(dataUnit => {
|
|
7504
7541
|
resolve(dataUnit);
|
|
7505
7542
|
}).catch(reason => reject(reason));
|
|
7506
7543
|
}
|
|
@@ -7672,9 +7709,9 @@ const SnkApplication = class {
|
|
|
7672
7709
|
});
|
|
7673
7710
|
ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
|
7674
7711
|
ErrorTracking.init();
|
|
7675
|
-
ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
|
|
7676
7712
|
}
|
|
7677
7713
|
connectedCallback() {
|
|
7714
|
+
ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
|
|
7678
7715
|
DataFetcher.addRequestListener(this._requestListener);
|
|
7679
7716
|
}
|
|
7680
7717
|
disconnectedCallback() {
|
|
@@ -7713,6 +7750,12 @@ class RequestListenerLoadingBar {
|
|
|
7713
7750
|
}
|
|
7714
7751
|
;
|
|
7715
7752
|
}
|
|
7753
|
+
class PendingPromise {
|
|
7754
|
+
constructor(resolve, reject) {
|
|
7755
|
+
this.resolve = resolve;
|
|
7756
|
+
this.reject = reject;
|
|
7757
|
+
}
|
|
7758
|
+
}
|
|
7716
7759
|
SnkApplication.style = snkApplicationCss;
|
|
7717
7760
|
|
|
7718
7761
|
export { SnkApplication as snk_application };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-6a83ac96.js';
|
|
2
|
+
|
|
3
|
+
const snkCrudCss = ".sc-snk-crud-h{display:flex;height:100%;width:100%}";
|
|
4
|
+
|
|
5
|
+
const GRID_MODE = 0;
|
|
6
|
+
const FORM_MODE = 1;
|
|
7
|
+
const SnkCrud = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
}
|
|
11
|
+
async gridToForm(keepFormMode = false) {
|
|
12
|
+
this._backToGrid = !keepFormMode && await this._viewStack.getSelectedIndex() === GRID_MODE;
|
|
13
|
+
this._viewStack.show(FORM_MODE);
|
|
14
|
+
}
|
|
15
|
+
async executeAction(act) {
|
|
16
|
+
if (act === "GRID_MODE") {
|
|
17
|
+
this._viewStack.show(GRID_MODE);
|
|
18
|
+
}
|
|
19
|
+
else if (act === "FORM_MODE" || act === "UPDATE") {
|
|
20
|
+
this.gridToForm(act !== "UPDATE");
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
insertionModeHandler() {
|
|
24
|
+
this.gridToForm();
|
|
25
|
+
}
|
|
26
|
+
cancelHandler() {
|
|
27
|
+
if (this._backToGrid) {
|
|
28
|
+
this._viewStack.show(GRID_MODE);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
componentWillLoad() {
|
|
32
|
+
let parent = this._element.parentElement;
|
|
33
|
+
while (parent) {
|
|
34
|
+
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
|
35
|
+
this._snkDataUnit = parent;
|
|
36
|
+
this._snkDataUnit.addEventListener("insertionMode", () => this.insertionModeHandler());
|
|
37
|
+
this._snkDataUnit.addEventListener("cancelEdition", () => this.cancelHandler());
|
|
38
|
+
this._dataUnit = this._snkDataUnit.dataUnit;
|
|
39
|
+
this._dataState = this._snkDataUnit.dataState;
|
|
40
|
+
if (!this._dataUnit) {
|
|
41
|
+
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
|
42
|
+
this._dataUnit = evt.detail;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
|
|
46
|
+
this._dataState = evt.detail;
|
|
47
|
+
});
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
parent = parent.parentElement;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
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", null))), h("stack-item", null, h("snk-form", { formTitle: this.formTitle, configName: this.configName, actionsList: this.actionsList, onExit: () => this._viewStack.show(GRID_MODE), recordsValidator: this.recordsValidator, onActionClick: evt => this.executeAction(evt.detail) }))));
|
|
55
|
+
}
|
|
56
|
+
get _element() { return getElement(this); }
|
|
57
|
+
};
|
|
58
|
+
SnkCrud.style = snkCrudCss;
|
|
59
|
+
|
|
60
|
+
export { SnkCrud as snk_crud };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-
|
|
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
3
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
|
|
@@ -10,6 +10,7 @@ const SnkDataUnit = class {
|
|
|
10
10
|
this.dataStateChange = createEvent(this, "dataStateChange", 7);
|
|
11
11
|
this.dataUnitReady = createEvent(this, "dataUnitReady", 7);
|
|
12
12
|
this.insertionMode = createEvent(this, "insertionMode", 7);
|
|
13
|
+
this.cancelEdition = createEvent(this, "cancelEdition", 7);
|
|
13
14
|
this._onDataUnitResolve = [];
|
|
14
15
|
/**
|
|
15
16
|
* Determina quantas linhas são retornadas por página
|
|
@@ -30,12 +31,16 @@ const SnkDataUnit = class {
|
|
|
30
31
|
if (action.type === Action.RECORDS_ADDED || action.type === Action.RECORDS_COPIED) {
|
|
31
32
|
this.insertionMode.emit();
|
|
32
33
|
}
|
|
34
|
+
if (action.type === Action.EDITION_CANCELED) {
|
|
35
|
+
this.cancelEdition.emit();
|
|
36
|
+
}
|
|
33
37
|
const duState = {
|
|
34
38
|
insertionMode: false,
|
|
35
39
|
hasNext: this.dataUnit.hasNext(),
|
|
36
40
|
hasPrevious: this.dataUnit.hasPrevious(),
|
|
37
41
|
copyMode: false,
|
|
38
42
|
isDirty: this.dataUnit.isDirty(),
|
|
43
|
+
hasDirtyRecords: this.dataUnit.hasDirtyRecords(),
|
|
39
44
|
selectedRecords: this.dataUnit.getSelectedRecords()
|
|
40
45
|
};
|
|
41
46
|
this.dataUnit.records.forEach(r => {
|
|
@@ -115,8 +120,13 @@ const SnkDataUnit = class {
|
|
|
115
120
|
}
|
|
116
121
|
break;
|
|
117
122
|
case Action.EDITION_CANCELED:
|
|
118
|
-
|
|
119
|
-
.
|
|
123
|
+
if (this.dataState.hasDirtyRecords) {
|
|
124
|
+
ApplicationUtils.confirm(this.i18n("components.warning"), this.i18n("components.confirmCancelEdition"))
|
|
125
|
+
.then((result) => resolve(result ? action : undefined));
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
resolve(action);
|
|
129
|
+
}
|
|
120
130
|
break;
|
|
121
131
|
case Action.REMOVING_RECORDS:
|
|
122
132
|
let msg = undefined;
|
|
@@ -184,7 +194,7 @@ const SnkDataUnit = class {
|
|
|
184
194
|
//---------------------------------------------
|
|
185
195
|
// Lifecycle web component
|
|
186
196
|
//---------------------------------------------
|
|
187
|
-
|
|
197
|
+
componentWillLoad() {
|
|
188
198
|
this.loadDataUnit();
|
|
189
199
|
}
|
|
190
200
|
render() {
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-6a83ac96.js';
|
|
2
|
+
import { ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
+
import { T as TaskbarElement } from './taskbar-elements-e0b8a285.js';
|
|
4
|
+
|
|
5
|
+
const snkFormCss = ".sc-snk-form-h{display:block}";
|
|
6
|
+
|
|
7
|
+
const SnkForm = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.exit = createEvent(this, "exit", 7);
|
|
11
|
+
this.actionClick = createEvent(this, "actionClick", 7);
|
|
12
|
+
}
|
|
13
|
+
getFormConfig() {
|
|
14
|
+
return (this._dataState && this._dataState.insertionMode ? this._insertionFormConfig : this._editionFormConfig);
|
|
15
|
+
}
|
|
16
|
+
getInsertionHiddenFields(formConfig) {
|
|
17
|
+
const hiddenFields = [];
|
|
18
|
+
formConfig === null || formConfig === void 0 ? void 0 : formConfig.forEach(cfg => {
|
|
19
|
+
const def = this._dataUnit.getField(cfg.name);
|
|
20
|
+
if (def === null || def === void 0 ? void 0 : def.readOnly) {
|
|
21
|
+
hiddenFields.push(cfg.name);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return hiddenFields;
|
|
25
|
+
}
|
|
26
|
+
exitForm() {
|
|
27
|
+
if (this._dataUnit.isDirty()) {
|
|
28
|
+
this._dataUnit.cancelEdition({ after: () => this.exit.emit() });
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
this.exit.emit();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
getDisabledButtons() {
|
|
35
|
+
const disabled = [];
|
|
36
|
+
if (!this._dataState.hasPrevious) {
|
|
37
|
+
disabled.push("PREVIOUS");
|
|
38
|
+
}
|
|
39
|
+
if (!this._dataState.hasNext) {
|
|
40
|
+
disabled.push("NEXT");
|
|
41
|
+
}
|
|
42
|
+
return disabled;
|
|
43
|
+
}
|
|
44
|
+
loadInsertionConfig() {
|
|
45
|
+
if (this._dataUnit && this._configLoaded) {
|
|
46
|
+
this._insertionFormConfig = this._editionFormConfig.filter(fieldCfg => {
|
|
47
|
+
const def = this._dataUnit.getField(fieldCfg.name);
|
|
48
|
+
if (def === null || def === void 0 ? void 0 : def.readOnly) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
return true;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
i18n(key) {
|
|
56
|
+
const pt_br = {
|
|
57
|
+
"components.back": "Voltar"
|
|
58
|
+
};
|
|
59
|
+
return pt_br[key];
|
|
60
|
+
}
|
|
61
|
+
componentWillLoad() {
|
|
62
|
+
const snkApplication = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
63
|
+
if (snkApplication) {
|
|
64
|
+
snkApplication.loadFormConfig(this.configName).then(cfg => {
|
|
65
|
+
this._configLoaded = true;
|
|
66
|
+
this._editionFormConfig = cfg;
|
|
67
|
+
this.loadInsertionConfig();
|
|
68
|
+
});
|
|
69
|
+
//Forçamos a carga dos acessos pra aproveitar a request inicial.
|
|
70
|
+
snkApplication.getAllAccess();
|
|
71
|
+
}
|
|
72
|
+
let parent = this._element.parentElement;
|
|
73
|
+
while (parent) {
|
|
74
|
+
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
|
75
|
+
this._snkDataUnit = parent;
|
|
76
|
+
this._dataUnit = this._snkDataUnit.dataUnit;
|
|
77
|
+
this._dataState = this._snkDataUnit.dataState;
|
|
78
|
+
if (this._dataUnit) {
|
|
79
|
+
this.loadInsertionConfig();
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
|
83
|
+
this._dataUnit = evt.detail;
|
|
84
|
+
this.loadInsertionConfig();
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
|
|
88
|
+
this._dataState = evt.detail;
|
|
89
|
+
});
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
parent = parent.parentElement;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
render() {
|
|
96
|
+
if (!this._configLoaded || !this._dataUnit || !this._dataState) {
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
return (h("section", { class: "ez-padding--large" }, h("div", { class: "ez-row ez-padding-bottom--medium" }, h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6", key: "formHeader" }, h("ez-button", { title: this.i18n("components.back"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small", onClick: () => this.exitForm() }), h("h1", { class: "ez-title ez-title--primary ez-title--xlarge ez-align--middle" }, this.formTitle)), h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6 ez-align--right" }, h("snk-taskbar", { key: "formTaskbar", buttons: this._dataState.isDirty ? "CANCEL,SAVE" : "PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,INSERT", primaryButton: this._dataState.isDirty ? "SAVE" : "INSERT", disabledButtons: this.getDisabledButtons(), actionsList: this.actionsList, dataUnit: this._dataUnit }))), h("div", { class: "ez-padding--small" }), h("section", null, h("div", { class: "ez-row" }, h("div", { class: "ez-col ez-col--sd-12" }, h("ez-form", { key: "ezForm" + this._snkDataUnit.entityName, dataUnit: this._dataUnit, config: this.getFormConfig(), recordsValidator: this.recordsValidator }))))));
|
|
100
|
+
}
|
|
101
|
+
get _element() { return getElement(this); }
|
|
102
|
+
};
|
|
103
|
+
SnkForm.style = snkFormCss;
|
|
104
|
+
|
|
105
|
+
const snkGridCss = ".sc-snk-grid-h{display:flex;height:100%;width:100%}";
|
|
106
|
+
|
|
107
|
+
const SnkGrid = class {
|
|
108
|
+
constructor(hostRef) {
|
|
109
|
+
registerInstance(this, hostRef);
|
|
110
|
+
this.actionClick = createEvent(this, "actionClick", 7);
|
|
111
|
+
this.gridDoubleClick = createEvent(this, "gridDoubleClick", 7);
|
|
112
|
+
}
|
|
113
|
+
getHeaderButtons() {
|
|
114
|
+
return this._dataState && this._dataState.selectedRecords.length > 0 ? "UPDATE,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,REFRESH" : "REFRESH";
|
|
115
|
+
}
|
|
116
|
+
actionClickHandler(evt) {
|
|
117
|
+
if (evt.detail === TaskbarElement.CONFIG_GRID && this._grid) {
|
|
118
|
+
this._grid.openGridConfig();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
saveConfig(config) {
|
|
122
|
+
const snkApplication = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
123
|
+
if (snkApplication) {
|
|
124
|
+
snkApplication.saveGridConfig(config);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
componentWillLoad() {
|
|
128
|
+
const snkApplication = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
129
|
+
if (snkApplication) {
|
|
130
|
+
snkApplication.loadGridConfig(this.configName).then(cfg => {
|
|
131
|
+
this._gridConfig = cfg;
|
|
132
|
+
this._configLoaded = true;
|
|
133
|
+
});
|
|
134
|
+
//Forçamos a carga dos acessos pra aproveitar a request inicial.
|
|
135
|
+
snkApplication.getAllAccess();
|
|
136
|
+
}
|
|
137
|
+
let parent = this._element.parentElement;
|
|
138
|
+
while (parent) {
|
|
139
|
+
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
|
140
|
+
this._snkDataUnit = parent;
|
|
141
|
+
this._dataUnit = this._snkDataUnit.dataUnit;
|
|
142
|
+
if (!this._dataUnit) {
|
|
143
|
+
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
|
144
|
+
this._dataUnit = evt.detail;
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
|
|
148
|
+
this._dataState = evt.detail;
|
|
149
|
+
});
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
parent = parent.parentElement;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
render() {
|
|
156
|
+
if (!this._configLoaded || !this._dataUnit) {
|
|
157
|
+
return undefined;
|
|
158
|
+
}
|
|
159
|
+
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", null)), 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 }))));
|
|
160
|
+
}
|
|
161
|
+
get _element() { return getElement(this); }
|
|
162
|
+
};
|
|
163
|
+
SnkGrid.style = snkGridCss;
|
|
164
|
+
|
|
165
|
+
export { SnkForm as snk_form, SnkGrid as snk_grid };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-6a83ac96.js';
|
|
2
2
|
import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__content-scrollbar--background-color:var(--title--primary, #2B3A54);--snk-pesquisa__content-scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__content-scrollbar--width:var(--space--medium, 12px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);max-height:100%;height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%;overflow-y:auto;padding-right:var(--snk-pesquisa__content--padding-right)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:#f0f2f5;border-radius:var(--snk-pesquisa__content-scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__content-scrollbar--background-color);border-radius:var(--snk-pesquisa__content-scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:#f0f2f5;width:var(--snk-pesquisa__content-scrollbar--width);max-width:var(--snk-pesquisa__content-scrollbar--width);min-width:var(--snk-pesquisa__content-scrollbar--width)}.snk-pesquisa__records.sc-snk-pesquisa{font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);color:var(--snk-pesquisa__records--color);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-6a83ac96.js';
|
|
2
2
|
import { ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
-
import { A as AuthorizationElements, T as TaskbarElement, b as buildElem } from './taskbar-elements-
|
|
3
|
+
import { A as AuthorizationElements, T as TaskbarElement, b as buildElem } from './taskbar-elements-e0b8a285.js';
|
|
4
4
|
|
|
5
5
|
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex}";
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h } from './index-
|
|
1
|
+
import { h } from './index-6a83ac96.js';
|
|
2
2
|
|
|
3
3
|
var TaskbarElement;
|
|
4
4
|
(function (TaskbarElement) {
|
|
@@ -52,7 +52,7 @@ const buildElem = (element, className, getTitle, action, isEnabled, actions) =>
|
|
|
52
52
|
case TaskbarElement.CONFIG_GRID:
|
|
53
53
|
return iconButton("settings-inverted", element, className, getTitle, action, isEnabled);
|
|
54
54
|
case TaskbarElement.MORE_OPTIONS:
|
|
55
|
-
return h("ez-actions-button", { size: "small", class: className, enabled: isEnabled(element), onEzAction: (evt) => action(evt.detail.value), actions: actions });
|
|
55
|
+
return actions && actions.length > 0 ? h("ez-actions-button", { title: getTitle(element), size: "small", class: className, enabled: isEnabled(element), onEzAction: (evt) => action(evt.detail.value), actions: actions }) : undefined;
|
|
56
56
|
case TaskbarElement.DIVIDER:
|
|
57
57
|
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-horizontal--medium" });
|
|
58
58
|
}
|