@sankhyalabs/sankhyablocks 1.4.0-beta.1 → 1.4.0-beta.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/{SnkMessageBuilder-7717f1e4.js → SnkMessageBuilder-d8215915.js} +14 -119
- package/dist/cjs/{filter-item-type.enum-e2e1bc5b.js → filter-item-type.enum-3daf58d3.js} +2 -0
- package/dist/cjs/index-84fe3b86.js +20 -0
- package/dist/cjs/index-93965c41.js +141 -0
- package/dist/cjs/{index-02201bc9.js → index-e90ae303.js} +11 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +43 -25
- package/dist/cjs/snk-crud.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +10 -18
- package/dist/cjs/snk-filter-bar.cjs.entry.js +334 -146
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +37 -2
- package/dist/cjs/snk-filter-item.cjs.entry.js +34 -11
- package/dist/cjs/snk-filter-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-modal.cjs.entry.js +37 -0
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-personalized.cjs.entry.js +89 -0
- package/dist/cjs/snk-filter-search.cjs.entry.js +2 -2
- package/dist/cjs/snk-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid.cjs.entry.js +1 -1
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +1 -1
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/snk-application/snk-application.js +54 -7
- package/dist/collection/components/snk-crud/snk-crud.js +2 -4
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +0 -27
- package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +100 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +161 -0
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +2 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +36 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +32 -9
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +196 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +22 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +238 -139
- package/dist/collection/components/snk-grid/snk-grid.js +2 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +18 -10
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +14 -2
- package/dist/components/SnkMessageBuilder.js +15 -119
- package/dist/components/filter-item-type.enum.js +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index2.js +11 -1
- package/dist/components/index3.js +139 -0
- package/dist/components/snk-application2.js +39 -19
- package/dist/components/snk-crud.js +15 -9
- package/dist/components/snk-data-unit.js +2 -11
- package/dist/components/snk-filter-bar2.js +340 -146
- package/dist/components/snk-filter-detail2.js +36 -1
- package/dist/components/snk-filter-item2.js +32 -9
- package/dist/components/snk-filter-list2.js +1 -1
- package/dist/components/snk-filter-modal.d.ts +11 -0
- package/dist/components/snk-filter-modal.js +6 -0
- package/dist/components/snk-filter-modal2.js +73 -0
- package/dist/components/snk-filter-personalized.d.ts +11 -0
- package/dist/components/snk-filter-personalized.js +107 -0
- package/dist/components/snk-grid2.js +15 -9
- package/dist/{sankhyablocks/SnkMessageBuilder-a7da466b.js → esm/SnkMessageBuilder-35a20271.js} +15 -119
- package/dist/esm/{filter-item-type.enum-61fbf80a.js → filter-item-type.enum-a79b2fa8.js} +2 -0
- package/dist/esm/index-5992b7e6.js +139 -0
- package/dist/esm/{index-f1d3e4da.js → index-c683b2b0.js} +11 -1
- package/dist/esm/index-c71285cb.js +17 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +37 -19
- package/dist/esm/snk-crud.entry.js +1 -1
- package/dist/esm/snk-data-unit.entry.js +3 -11
- package/dist/esm/snk-filter-bar.entry.js +328 -140
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-detail.entry.js +37 -2
- package/dist/esm/snk-filter-item.entry.js +34 -11
- package/dist/esm/snk-filter-list.entry.js +1 -1
- package/dist/esm/snk-filter-modal.entry.js +33 -0
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +1 -1
- package/dist/esm/snk-filter-period.entry.js +1 -1
- package/dist/esm/snk-filter-personalized.entry.js +85 -0
- package/dist/esm/snk-filter-search.entry.js +2 -2
- package/dist/esm/snk-form.entry.js +1 -1
- package/dist/esm/snk-grid.entry.js +1 -1
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +1 -1
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/{esm/SnkMessageBuilder-a7da466b.js → sankhyablocks/SnkMessageBuilder-35a20271.js} +15 -119
- package/dist/sankhyablocks/{filter-item-type.enum-61fbf80a.js → filter-item-type.enum-a79b2fa8.js} +2 -0
- package/dist/sankhyablocks/index-5992b7e6.js +139 -0
- package/dist/sankhyablocks/{index-f1d3e4da.js → index-c683b2b0.js} +11 -1
- package/dist/sankhyablocks/index-c71285cb.js +17 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/sankhyablocks/snk-application.entry.js +37 -19
- package/dist/sankhyablocks/snk-crud.entry.js +1 -1
- package/dist/sankhyablocks/snk-data-unit.entry.js +3 -11
- package/dist/sankhyablocks/snk-filter-bar.entry.js +328 -140
- package/dist/sankhyablocks/snk-filter-binary-select.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-detail.entry.js +37 -2
- package/dist/sankhyablocks/snk-filter-item.entry.js +34 -11
- package/dist/sankhyablocks/snk-filter-list.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-modal.entry.js +33 -0
- package/dist/sankhyablocks/snk-filter-multi-select.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-number.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-period.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-personalized.entry.js +85 -0
- package/dist/sankhyablocks/snk-filter-search.entry.js +2 -2
- package/dist/sankhyablocks/snk-form.entry.js +1 -1
- package/dist/sankhyablocks/snk-grid.entry.js +1 -1
- package/dist/sankhyablocks/snk-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/snk-taskbar.entry.js +1 -1
- package/dist/sankhyablocks/teste-pesquisa.entry.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +4 -1
- package/dist/types/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +23 -0
- package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +3 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +23 -0
- package/dist/types/components.d.ts +56 -8
- package/package.json +3 -3
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +0 -51
|
@@ -20,122 +20,6 @@ function _interopNamespace(e) {
|
|
|
20
20
|
return Object.freeze(n);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
exports.DialogType = void 0;
|
|
24
|
-
(function (DialogType) {
|
|
25
|
-
DialogType["WARN"] = "warn";
|
|
26
|
-
DialogType["CRITICAL"] = "critical";
|
|
27
|
-
DialogType["DEFAULT"] = "default";
|
|
28
|
-
})(exports.DialogType || (exports.DialogType = {}));
|
|
29
|
-
|
|
30
|
-
class ApplicationUtils {
|
|
31
|
-
static async showDialog(title, message, icon = null, confirm, dialogType = exports.DialogType.DEFAULT, options) {
|
|
32
|
-
if (options) {
|
|
33
|
-
options = Object.assign(Object.assign({}, ApplicationUtils.defaultMessageOptions), options);
|
|
34
|
-
}
|
|
35
|
-
return new Promise(resolve => {
|
|
36
|
-
let dialog = document.querySelector("ez-dialog");
|
|
37
|
-
if (!dialog) {
|
|
38
|
-
dialog = document.createElement("ez-dialog");
|
|
39
|
-
window.document.body.appendChild(dialog);
|
|
40
|
-
}
|
|
41
|
-
dialog.show(title, message, dialogType, confirm, icon, options.labelCancel, options.labelConfirm, options.btnConfirmDanger).then(ok => resolve(ok));
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
static async alert(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
45
|
-
return ApplicationUtils.showDialog(title, message, icon, false, exports.DialogType.WARN, options);
|
|
46
|
-
}
|
|
47
|
-
static async error(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
48
|
-
return ApplicationUtils.showDialog(title, message, icon, false, exports.DialogType.CRITICAL, options);
|
|
49
|
-
}
|
|
50
|
-
static async confirm(title, message, icon = null, dialogType = exports.DialogType.WARN, options = ApplicationUtils.defaultMessageOptions) {
|
|
51
|
-
return ApplicationUtils.showDialog(title, message, icon, true, dialogType, options);
|
|
52
|
-
}
|
|
53
|
-
static async message(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
54
|
-
return ApplicationUtils.showDialog(title, message, icon, false, exports.DialogType.DEFAULT, options);
|
|
55
|
-
}
|
|
56
|
-
static async info(message, options = ApplicationUtils.defaultMessageOptions) {
|
|
57
|
-
let toast = document.querySelector("ez-toast");
|
|
58
|
-
if (!toast) {
|
|
59
|
-
toast = document.createElement("ez-toast");
|
|
60
|
-
const icon = document.createElement("ez-icon");
|
|
61
|
-
icon.className = "ez-margin-right--small toast__icon--color";
|
|
62
|
-
icon.slot = "icon";
|
|
63
|
-
toast.appendChild(icon);
|
|
64
|
-
window.document.body.appendChild(toast);
|
|
65
|
-
}
|
|
66
|
-
if (options.iconName) {
|
|
67
|
-
const iconElem = toast.querySelector("ez-icon");
|
|
68
|
-
if (iconElem) {
|
|
69
|
-
iconElem.iconName = options.iconName;
|
|
70
|
-
toast.useIcon = true;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
toast.useIcon = false;
|
|
75
|
-
}
|
|
76
|
-
toast.show(message, 5000, false, options.canClose);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
ApplicationUtils.defaultMessageOptions = {
|
|
80
|
-
canClose: true,
|
|
81
|
-
labelCancel: 'Não',
|
|
82
|
-
labelConfirm: 'Sim',
|
|
83
|
-
btnConfirmDanger: false
|
|
84
|
-
};
|
|
85
|
-
;
|
|
86
|
-
|
|
87
|
-
class CSSVarsUtils {
|
|
88
|
-
static applyVarsTextInput(host, child) {
|
|
89
|
-
if (child) {
|
|
90
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--background-color');
|
|
91
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--border-color');
|
|
92
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height');
|
|
93
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--background-color');
|
|
94
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--color');
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
static applyVarsButton(host, child) {
|
|
98
|
-
if (child) {
|
|
99
|
-
["--ez-button--min-width",
|
|
100
|
-
"--ez-button--height",
|
|
101
|
-
"--ez-button__icon--width",
|
|
102
|
-
"--ez-button__inline__icon--padding",
|
|
103
|
-
"--ez-button--padding-top",
|
|
104
|
-
"--ez-button--padding-bottom",
|
|
105
|
-
"--ez-button--padding-right",
|
|
106
|
-
"--ez-button--padding-left",
|
|
107
|
-
"--ez-button--color",
|
|
108
|
-
"--ez-button--font-size",
|
|
109
|
-
"--ez-button--font-family",
|
|
110
|
-
"--ez-button--font-weight",
|
|
111
|
-
"--ez-button--background-color",
|
|
112
|
-
"--ez-button--border-radius",
|
|
113
|
-
"--ez-button--border",
|
|
114
|
-
"--ez-button--hover-color",
|
|
115
|
-
"--ez-button--hover--background-color",
|
|
116
|
-
"--ez-button--disabled-color",
|
|
117
|
-
"--ez-button--disabled--background-color",
|
|
118
|
-
"--ez-button--focus--border",
|
|
119
|
-
"--ez-button--focus--box-shadow",
|
|
120
|
-
"--ez-button--active-color",
|
|
121
|
-
"--ez-button--active--background-color",
|
|
122
|
-
"--ez-button--link-color",
|
|
123
|
-
"--ez-button--link--hover-color",
|
|
124
|
-
"--ez-button--link--small--font-size",
|
|
125
|
-
"--ez-button--link--medium--font-size",
|
|
126
|
-
"--ez-button--link--large--font-size",].forEach(prop => {
|
|
127
|
-
CSSVarsUtils.applyIfExists(host, child, prop);
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
static applyIfExists(host, element, varName) {
|
|
132
|
-
const prop = getComputedStyle(host).getPropertyValue(varName);
|
|
133
|
-
if (prop) {
|
|
134
|
-
element.style.setProperty(varName, prop);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
23
|
const snkDataUnitMessages = {
|
|
140
24
|
saveInfo: {
|
|
141
25
|
clone: "Duplicação realizada!",
|
|
@@ -168,13 +52,25 @@ const snkFilterBarMessages = {
|
|
|
168
52
|
"applyFilter": "Aplicar",
|
|
169
53
|
"findFilter": "Buscar filtros...",
|
|
170
54
|
"findField": "Buscar filtros...",
|
|
55
|
+
"modalFindFilter": "Buscar filtro",
|
|
171
56
|
"emptyFiltersList": "Não há filtros disponíveis",
|
|
172
57
|
"emptyAppliedFiltersList": "Não há filtros aplicados",
|
|
173
58
|
"customFilter": "Filtro personalizado",
|
|
174
|
-
"defaultFilter": "Filtro
|
|
59
|
+
"defaultFilter": "Filtro padrão",
|
|
175
60
|
"failToLoadConfig": "Falha ao buscar configuração de filtros",
|
|
176
61
|
"clearAllFilters": "Limpar todos os filtros",
|
|
177
|
-
"successfullyCleaned": "Filtro limpo com sucesso!"
|
|
62
|
+
"successfullyCleaned": "Filtro limpo com sucesso!",
|
|
63
|
+
"activeFilter": "{{ACTIVE_FILTERS}} filtro aplicado",
|
|
64
|
+
"activeFilters": "{{ACTIVE_FILTERS}} filtros aplicados",
|
|
65
|
+
"noActiveFilters": "Nenhum filtro aplicado",
|
|
66
|
+
"modalDefaultFilterTitle": "Filtro padrão",
|
|
67
|
+
"modalInfoTextEditDefault": "Use o layout antigo para editar o seu filtro padrão, em breve traremos uma nova experiência.",
|
|
68
|
+
"modalInfoTextCreateDefault": "Use o layout antigo para criar o seu filtro padrão, em breve traremos uma nova experiência.",
|
|
69
|
+
"modalPersonalizedFilterTitle": "Filtro personalizado",
|
|
70
|
+
"modalPersonalizedFilterSubTitle": "Gerencie seus filtros",
|
|
71
|
+
"modalInfoTextCreateEditPersonalized": "Use o layout antigo para criar ou editar filtros, em breve traremos uma nova experiência",
|
|
72
|
+
"modalOkButtonLabel": "Aplicar",
|
|
73
|
+
"modalCancelButtonLabel": "Limpar"
|
|
178
74
|
};
|
|
179
75
|
|
|
180
76
|
const snkFormMessages = {
|
|
@@ -322,5 +218,4 @@ exports.OperationMap = void 0;
|
|
|
322
218
|
OperationMap["CLEAN"] = "clean";
|
|
323
219
|
})(exports.OperationMap || (exports.OperationMap = {}));
|
|
324
220
|
|
|
325
|
-
exports.ApplicationUtils = ApplicationUtils;
|
|
326
221
|
exports.SnkMessageBuilder = SnkMessageBuilder;
|
|
@@ -8,6 +8,8 @@ var FilterItemType;
|
|
|
8
8
|
FilterItemType["SEARCH"] = "SEARCH";
|
|
9
9
|
FilterItemType["TEXT"] = "TEXT";
|
|
10
10
|
FilterItemType["NUMBER"] = "NUMBER";
|
|
11
|
+
FilterItemType["DEFAULT_FILTER"] = "DEFAULT_FILTER";
|
|
12
|
+
FilterItemType["PERSONALIZED"] = "PERSONALIZED";
|
|
11
13
|
})(FilterItemType || (FilterItemType = {}));
|
|
12
14
|
const FilterItemType$1 = FilterItemType;
|
|
13
15
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ModalAction;
|
|
4
|
+
(function (ModalAction) {
|
|
5
|
+
ModalAction["CLOSE"] = "CLOSE";
|
|
6
|
+
ModalAction["OK"] = "OK";
|
|
7
|
+
ModalAction["CANCEL"] = "CANCEL";
|
|
8
|
+
})(ModalAction || (ModalAction = {}));
|
|
9
|
+
const ModalAction$1 = ModalAction;
|
|
10
|
+
|
|
11
|
+
var ModalButtonStatus;
|
|
12
|
+
(function (ModalButtonStatus) {
|
|
13
|
+
ModalButtonStatus["ENABLED"] = "ENABLED";
|
|
14
|
+
ModalButtonStatus["DISABLED"] = "DISABLED";
|
|
15
|
+
ModalButtonStatus["HIDDEN"] = "HIDDEN";
|
|
16
|
+
})(ModalButtonStatus || (ModalButtonStatus = {}));
|
|
17
|
+
const ModalButtonStatus$1 = ModalButtonStatus;
|
|
18
|
+
|
|
19
|
+
exports.ModalAction = ModalAction$1;
|
|
20
|
+
exports.ModalButtonStatus = ModalButtonStatus$1;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.DialogType = void 0;
|
|
4
|
+
(function (DialogType) {
|
|
5
|
+
DialogType["WARN"] = "warn";
|
|
6
|
+
DialogType["CRITICAL"] = "critical";
|
|
7
|
+
DialogType["SUCCESS"] = "success";
|
|
8
|
+
DialogType["DEFAULT"] = "default";
|
|
9
|
+
})(exports.DialogType || (exports.DialogType = {}));
|
|
10
|
+
|
|
11
|
+
class ApplicationUtils {
|
|
12
|
+
static async showDialog(title, message, icon = null, confirm, dialogType = exports.DialogType.DEFAULT, options) {
|
|
13
|
+
if (options) {
|
|
14
|
+
options = Object.assign(Object.assign({}, ApplicationUtils.defaultMessageOptions), options);
|
|
15
|
+
}
|
|
16
|
+
return new Promise(resolve => {
|
|
17
|
+
let dialog = document.querySelector("ez-dialog");
|
|
18
|
+
if (!dialog) {
|
|
19
|
+
dialog = document.createElement("ez-dialog");
|
|
20
|
+
window.document.body.appendChild(dialog);
|
|
21
|
+
}
|
|
22
|
+
dialog.show(title, message, dialogType, confirm, icon, options.labelCancel, options.labelConfirm, options.btnConfirmDanger).then(ok => resolve(ok));
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
static async alert(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
26
|
+
return ApplicationUtils.showDialog(title, message, icon, false, exports.DialogType.WARN, options);
|
|
27
|
+
}
|
|
28
|
+
static async error(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
29
|
+
return ApplicationUtils.showDialog(title, message, icon, false, exports.DialogType.CRITICAL, options);
|
|
30
|
+
}
|
|
31
|
+
static async success(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
32
|
+
return ApplicationUtils.showDialog(title, message, icon, false, exports.DialogType.SUCCESS, options);
|
|
33
|
+
}
|
|
34
|
+
static async confirm(title, message, icon = null, dialogType = exports.DialogType.WARN, options = ApplicationUtils.defaultMessageOptions) {
|
|
35
|
+
return ApplicationUtils.showDialog(title, message, icon, true, dialogType, options);
|
|
36
|
+
}
|
|
37
|
+
static async message(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
38
|
+
return ApplicationUtils.showDialog(title, message, icon, false, exports.DialogType.DEFAULT, options);
|
|
39
|
+
}
|
|
40
|
+
static async info(message, options = ApplicationUtils.defaultMessageOptions) {
|
|
41
|
+
let toast = document.querySelector("ez-toast");
|
|
42
|
+
if (!toast) {
|
|
43
|
+
toast = document.createElement("ez-toast");
|
|
44
|
+
const icon = document.createElement("ez-icon");
|
|
45
|
+
icon.className = "ez-margin-right--small";
|
|
46
|
+
icon.slot = "icon";
|
|
47
|
+
icon.style.setProperty('--ez-icon--color', 'var(--color--success)');
|
|
48
|
+
toast.appendChild(icon);
|
|
49
|
+
window.document.body.appendChild(toast);
|
|
50
|
+
}
|
|
51
|
+
if (options.iconName) {
|
|
52
|
+
const iconElem = toast.querySelector("ez-icon");
|
|
53
|
+
if (iconElem) {
|
|
54
|
+
iconElem.iconName = options.iconName;
|
|
55
|
+
toast.useIcon = true;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
toast.useIcon = false;
|
|
60
|
+
}
|
|
61
|
+
toast.show(message, 5000, false, options.canClose);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
ApplicationUtils.defaultMessageOptions = {
|
|
65
|
+
canClose: true,
|
|
66
|
+
labelCancel: 'Não',
|
|
67
|
+
labelConfirm: 'Sim',
|
|
68
|
+
btnConfirmDanger: false
|
|
69
|
+
};
|
|
70
|
+
;
|
|
71
|
+
|
|
72
|
+
class CSSVarsUtils {
|
|
73
|
+
static applyCSSVars(document, host, child) {
|
|
74
|
+
const isSameDomain = (styleSheet) => {
|
|
75
|
+
if (!styleSheet.href) {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
return styleSheet.href.indexOf(window.location.origin) === 0;
|
|
79
|
+
};
|
|
80
|
+
Array.from(document.styleSheets).filter(isSameDomain).forEach((sheet) => {
|
|
81
|
+
Array.from(sheet.cssRules).filter(rule => rule instanceof CSSStyleRule).forEach((rule) => {
|
|
82
|
+
Array.from(rule.style).forEach((propName) => {
|
|
83
|
+
if (propName.startsWith("--")) {
|
|
84
|
+
CSSVarsUtils.applyIfExists(host, child, propName);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
static applyVarsTextInput(host, child) {
|
|
91
|
+
if (child) {
|
|
92
|
+
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--background-color');
|
|
93
|
+
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--border-color');
|
|
94
|
+
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height');
|
|
95
|
+
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--background-color');
|
|
96
|
+
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--color');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
static applyVarsButton(host, child) {
|
|
100
|
+
if (child) {
|
|
101
|
+
["--ez-button--min-width",
|
|
102
|
+
"--ez-button--height",
|
|
103
|
+
"--ez-button__icon--width",
|
|
104
|
+
"--ez-button__inline__icon--padding",
|
|
105
|
+
"--ez-button--padding-top",
|
|
106
|
+
"--ez-button--padding-bottom",
|
|
107
|
+
"--ez-button--padding-right",
|
|
108
|
+
"--ez-button--padding-left",
|
|
109
|
+
"--ez-button--color",
|
|
110
|
+
"--ez-button--font-size",
|
|
111
|
+
"--ez-button--font-family",
|
|
112
|
+
"--ez-button--font-weight",
|
|
113
|
+
"--ez-button--background-color",
|
|
114
|
+
"--ez-button--border-radius",
|
|
115
|
+
"--ez-button--border",
|
|
116
|
+
"--ez-button--hover-color",
|
|
117
|
+
"--ez-button--hover--background-color",
|
|
118
|
+
"--ez-button--disabled-color",
|
|
119
|
+
"--ez-button--disabled--background-color",
|
|
120
|
+
"--ez-button--focus--border",
|
|
121
|
+
"--ez-button--focus--box-shadow",
|
|
122
|
+
"--ez-button--active-color",
|
|
123
|
+
"--ez-button--active--background-color",
|
|
124
|
+
"--ez-button--link-color",
|
|
125
|
+
"--ez-button--link--hover-color",
|
|
126
|
+
"--ez-button--link--small--font-size",
|
|
127
|
+
"--ez-button--link--medium--font-size",
|
|
128
|
+
"--ez-button--link--large--font-size",].forEach(prop => {
|
|
129
|
+
CSSVarsUtils.applyIfExists(host, child, prop);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
static applyIfExists(host, element, varName) {
|
|
134
|
+
const prop = getComputedStyle(host).getPropertyValue(varName);
|
|
135
|
+
if (prop) {
|
|
136
|
+
element.style.setProperty(varName, prop);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
exports.ApplicationUtils = ApplicationUtils;
|
|
@@ -270,6 +270,16 @@ NumberUtils.changeFormat = (value) => {
|
|
|
270
270
|
//Formatting output following formatnumber
|
|
271
271
|
return value.replace(/\./g, '_').replace(/\,/g, '.').replace(/\_/g, ',');
|
|
272
272
|
};
|
|
273
|
+
/**
|
|
274
|
+
* @getValueOrZero: valida se o parametro é undefined caso seja retorna zero.
|
|
275
|
+
*
|
|
276
|
+
* @param value numero a ser validado
|
|
277
|
+
*
|
|
278
|
+
* @returns o proprio numero passado ou zero
|
|
279
|
+
*/
|
|
280
|
+
NumberUtils.getValueOrZero = (value) => {
|
|
281
|
+
return value !== undefined ? value : 0;
|
|
282
|
+
};
|
|
273
283
|
|
|
274
284
|
/**
|
|
275
285
|
* `MaskFormatter` é usado para formatar strings. Seu comportamento
|
|
@@ -2394,4 +2404,5 @@ exports.ObjectUtils = ObjectUtils;
|
|
|
2394
2404
|
exports.StringUtils = StringUtils;
|
|
2395
2405
|
exports.WaitingChangeException = WaitingChangeException;
|
|
2396
2406
|
exports.WarningException = WarningException;
|
|
2407
|
+
exports.convertType = convertType;
|
|
2397
2408
|
exports.toString = toString;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -30,7 +30,7 @@ const defineCustomElements = (win, options) => {
|
|
|
30
30
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
31
31
|
return patchEsm().then(() => {
|
|
32
32
|
appGlobals.globalScripts();
|
|
33
|
-
return index.bootstrapLazy([["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[
|
|
33
|
+
return index.bootstrapLazy([["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[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],"getDataUnit":[64]}]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select.cjs",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number.cjs",[[0,"snk-filter-number",{"config":[16],"value":[2]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period.cjs",[[0,"snk-filter-period",{"config":[16],"value":[8]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized.cjs",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16]}]]],["snk-filter-search.cjs",[[0,"snk-filter-search",{"config":[16],"value":[16],"fix":[16],"unfix":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text.cjs",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-item.cjs",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[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]}]]],["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-filter-bar.cjs",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]]]],["snk-taskbar.cjs",[[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-grid.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}]]],["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],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64]}]]],["snk-form.cjs",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-filter-detail.cjs",[[0,"snk-filter-detail",{"config":[1040],"keepOpened":[1028,"keep-opened"],"getMessage":[16]}]]]], options);
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
36
|
|
|
@@ -127,5 +127,5 @@ const patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
127
127
|
|
|
128
128
|
patchBrowser().then(options => {
|
|
129
129
|
appGlobals.globalScripts();
|
|
130
|
-
return index.bootstrapLazy([["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[
|
|
130
|
+
return index.bootstrapLazy([["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[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],"getDataUnit":[64]}]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select.cjs",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number.cjs",[[0,"snk-filter-number",{"config":[16],"value":[2]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period.cjs",[[0,"snk-filter-period",{"config":[16],"value":[8]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized.cjs",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16]}]]],["snk-filter-search.cjs",[[0,"snk-filter-search",{"config":[16],"value":[16],"fix":[16],"unfix":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text.cjs",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-item.cjs",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[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]}]]],["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-filter-bar.cjs",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]]]],["snk-taskbar.cjs",[[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-grid.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}]]],["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],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64]}]]],["snk-form.cjs",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-filter-detail.cjs",[[0,"snk-filter-detail",{"config":[1040],"keepOpened":[1028,"keep-opened"],"getMessage":[16]}]]]], options);
|
|
131
131
|
});
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index$2 = require('./index-b0b676c5.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
7
|
-
const
|
|
6
|
+
const index$1 = require('./index-e90ae303.js');
|
|
7
|
+
const index$3 = require('./index-93965c41.js');
|
|
8
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-d8215915.js');
|
|
8
9
|
|
|
9
10
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
10
11
|
|
|
@@ -7519,20 +7520,28 @@ class TotalsFetcher {
|
|
|
7519
7520
|
}
|
|
7520
7521
|
|
|
7521
7522
|
function normalizeValue(value) {
|
|
7523
|
+
if (value == undefined) {
|
|
7524
|
+
return value;
|
|
7525
|
+
}
|
|
7522
7526
|
if (value instanceof Date) {
|
|
7523
7527
|
return value.toISOString();
|
|
7524
7528
|
}
|
|
7525
7529
|
if (typeof value === "object") {
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
}
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7530
|
+
if (value instanceof Array) {
|
|
7531
|
+
return value.map(item => normalizeValue(item));
|
|
7532
|
+
}
|
|
7533
|
+
else {
|
|
7534
|
+
const normalized = Object.assign({}, value);
|
|
7535
|
+
Object.keys(value).forEach(prop => {
|
|
7536
|
+
if (value[prop]) {
|
|
7537
|
+
normalized[prop] = normalizeValue(value[prop]);
|
|
7538
|
+
}
|
|
7539
|
+
else {
|
|
7540
|
+
delete normalized[prop];
|
|
7541
|
+
}
|
|
7542
|
+
});
|
|
7543
|
+
return normalized;
|
|
7544
|
+
}
|
|
7536
7545
|
}
|
|
7537
7546
|
return value;
|
|
7538
7547
|
}
|
|
@@ -7697,15 +7706,24 @@ const SnkApplication = class {
|
|
|
7697
7706
|
* Mostra o conteúdo passado em um Popup
|
|
7698
7707
|
*/
|
|
7699
7708
|
async showPopUp(content) {
|
|
7700
|
-
this.
|
|
7709
|
+
this.clearContent(this._popUp);
|
|
7701
7710
|
this._popUp.appendChild(content);
|
|
7702
7711
|
this._popUp.opened = true;
|
|
7703
7712
|
}
|
|
7713
|
+
async showModal(content) {
|
|
7714
|
+
this.clearContent(this._rightModal);
|
|
7715
|
+
this._rightModal.appendChild(content);
|
|
7716
|
+
this._rightModal.opened = true;
|
|
7717
|
+
}
|
|
7718
|
+
async closeModal() {
|
|
7719
|
+
this.clearContent(this._rightModal);
|
|
7720
|
+
this._rightModal.opened = false;
|
|
7721
|
+
}
|
|
7704
7722
|
/**
|
|
7705
7723
|
* Fecha o popup, liberando o conteúdo.
|
|
7706
7724
|
*/
|
|
7707
7725
|
async closePopUp() {
|
|
7708
|
-
this.
|
|
7726
|
+
this.clearContent(this._popUp);
|
|
7709
7727
|
this._popUp.opened = false;
|
|
7710
7728
|
}
|
|
7711
7729
|
/**
|
|
@@ -7851,37 +7869,37 @@ const SnkApplication = class {
|
|
|
7851
7869
|
* Mostra o diálogo de alerta de acordo com os parâmetros passados.
|
|
7852
7870
|
*/
|
|
7853
7871
|
async alert(title, message, icon, options) {
|
|
7854
|
-
return
|
|
7872
|
+
return index$3.ApplicationUtils.alert(title, message, icon, options);
|
|
7855
7873
|
}
|
|
7856
7874
|
/**
|
|
7857
7875
|
* Mostra o diálogo de erro de acordo com os parâmetros passados.
|
|
7858
7876
|
*/
|
|
7859
7877
|
async error(title, message, icon, options) {
|
|
7860
|
-
return
|
|
7878
|
+
return index$3.ApplicationUtils.error(title, message, icon, options);
|
|
7861
7879
|
}
|
|
7862
7880
|
/**
|
|
7863
7881
|
* Mostra o diálogo de sucesso de acordo com os parâmetros passados.
|
|
7864
7882
|
*/
|
|
7865
7883
|
async success(title, message, icon, options) {
|
|
7866
|
-
return
|
|
7884
|
+
return index$3.ApplicationUtils.success(title, message, icon, options);
|
|
7867
7885
|
}
|
|
7868
7886
|
/**
|
|
7869
7887
|
* Exibe um diálogo de mensagem comum
|
|
7870
7888
|
*/
|
|
7871
7889
|
async message(title, message, icon, options) {
|
|
7872
|
-
return
|
|
7890
|
+
return index$3.ApplicationUtils.message(title, message, icon, options);
|
|
7873
7891
|
}
|
|
7874
7892
|
/**
|
|
7875
7893
|
* Exibe um diálogo de confirmação
|
|
7876
7894
|
*/
|
|
7877
7895
|
async confirm(title, message, icon, dialogType, options) {
|
|
7878
|
-
return
|
|
7896
|
+
return index$3.ApplicationUtils.confirm(title, message, icon, dialogType, options);
|
|
7879
7897
|
}
|
|
7880
7898
|
/**
|
|
7881
7899
|
* Mostra uma informação efêmera (de segundo plano).
|
|
7882
7900
|
*/
|
|
7883
7901
|
async info(message, options) {
|
|
7884
|
-
return
|
|
7902
|
+
return index$3.ApplicationUtils.info(message, options);
|
|
7885
7903
|
}
|
|
7886
7904
|
/**
|
|
7887
7905
|
* Busca a configuração de formulário.
|
|
@@ -8048,10 +8066,10 @@ const SnkApplication = class {
|
|
|
8048
8066
|
accept(window['isDebugMode']);
|
|
8049
8067
|
});
|
|
8050
8068
|
}
|
|
8051
|
-
|
|
8052
|
-
if (
|
|
8053
|
-
Array.from(
|
|
8054
|
-
|
|
8069
|
+
clearContent(container) {
|
|
8070
|
+
if (container) {
|
|
8071
|
+
Array.from(container.children).forEach(child => {
|
|
8072
|
+
container.removeChild(child);
|
|
8055
8073
|
});
|
|
8056
8074
|
}
|
|
8057
8075
|
}
|
|
@@ -8095,7 +8113,7 @@ const SnkApplication = class {
|
|
|
8095
8113
|
});
|
|
8096
8114
|
}
|
|
8097
8115
|
render() {
|
|
8098
|
-
return (index$2.h("div", null, index$2.h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), index$2.h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() })));
|
|
8116
|
+
return (index$2.h("div", null, index$2.h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), index$2.h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), index$2.h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "col col--sd-3", closeOutsideClick: true })));
|
|
8099
8117
|
}
|
|
8100
8118
|
};
|
|
8101
8119
|
class RequestListenerLoadingBar {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b0b676c5.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-e90ae303.js');
|
|
7
7
|
|
|
8
8
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
|
9
9
|
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b0b676c5.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
7
|
-
const
|
|
6
|
+
const index$1 = require('./index-e90ae303.js');
|
|
7
|
+
const index$2 = require('./index-93965c41.js');
|
|
8
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-d8215915.js');
|
|
8
9
|
|
|
9
10
|
const snkDataUnitCss = ".sc-snk-data-unit-h{display:flex;flex-direction:column;height:100%}";
|
|
10
11
|
|
|
@@ -20,10 +21,6 @@ const SnkDataUnit = class {
|
|
|
20
21
|
* Determina quantas linhas são retornadas por página
|
|
21
22
|
*/
|
|
22
23
|
this.pageSize = 150;
|
|
23
|
-
/**
|
|
24
|
-
* Quando ativada essa propriedade faz com que haja uma carga imediata no DataUnit
|
|
25
|
-
*/
|
|
26
|
-
this.autoLoad = true;
|
|
27
24
|
this._dataUnitObserver = (action) => {
|
|
28
25
|
const duState = {
|
|
29
26
|
insertionMode: false,
|
|
@@ -116,7 +113,7 @@ const SnkDataUnit = class {
|
|
|
116
113
|
resolve(action);
|
|
117
114
|
}
|
|
118
115
|
else {
|
|
119
|
-
|
|
116
|
+
index$2.ApplicationUtils.info(this.getMessage("snkDataUnit.forbiddenInsert"));
|
|
120
117
|
}
|
|
121
118
|
break;
|
|
122
119
|
case index$1.Action.RECORDS_COPIED:
|
|
@@ -124,7 +121,7 @@ const SnkDataUnit = class {
|
|
|
124
121
|
resolve(action);
|
|
125
122
|
}
|
|
126
123
|
else {
|
|
127
|
-
|
|
124
|
+
index$2.ApplicationUtils.info(this.getMessage("snkDataUnit.forbiddenClone"));
|
|
128
125
|
}
|
|
129
126
|
break;
|
|
130
127
|
case index$1.Action.DATA_CHANGED:
|
|
@@ -134,7 +131,7 @@ const SnkDataUnit = class {
|
|
|
134
131
|
}
|
|
135
132
|
else {
|
|
136
133
|
this.dataUnit.cancelEdition();
|
|
137
|
-
|
|
134
|
+
index$2.ApplicationUtils.alert(this.getMessage("snkDataUnit.forbidden"), this.getMessage("snkDataUnit.forbiddenUpdate"));
|
|
138
135
|
}
|
|
139
136
|
break;
|
|
140
137
|
case index$1.Action.SAVING_DATA:
|
|
@@ -167,7 +164,7 @@ const SnkDataUnit = class {
|
|
|
167
164
|
}
|
|
168
165
|
else {
|
|
169
166
|
const cancelConfirmationTitle = this.getMessage("snkDataUnit.cancelConfirmationTitle");
|
|
170
|
-
|
|
167
|
+
index$2.ApplicationUtils.confirm(cancelConfirmationTitle, cancelConfirmation)
|
|
171
168
|
.then((result) => resolve(result ? action : undefined));
|
|
172
169
|
}
|
|
173
170
|
}
|
|
@@ -183,12 +180,12 @@ const SnkDataUnit = class {
|
|
|
183
180
|
}
|
|
184
181
|
else {
|
|
185
182
|
const removeConfirmationTitle = this.getMessage("snkDataUnit.removeConfirmationTitle");
|
|
186
|
-
|
|
183
|
+
index$2.ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, "delete", index$2.DialogType.CRITICAL, { btnConfirmDanger: true })
|
|
187
184
|
.then((result) => resolve(result ? action : undefined));
|
|
188
185
|
}
|
|
189
186
|
}
|
|
190
187
|
else {
|
|
191
|
-
|
|
188
|
+
index$2.ApplicationUtils.info(this.getMessage("snkDataUnit.forbiddenRemove"));
|
|
192
189
|
}
|
|
193
190
|
break;
|
|
194
191
|
default:
|
|
@@ -197,7 +194,7 @@ const SnkDataUnit = class {
|
|
|
197
194
|
});
|
|
198
195
|
}
|
|
199
196
|
showSuccessMessage(message) {
|
|
200
|
-
|
|
197
|
+
index$2.ApplicationUtils.info(message, { iconName: "check" });
|
|
201
198
|
}
|
|
202
199
|
isAllowed(flag) {
|
|
203
200
|
return this._permissions ? this._permissions.isSup || this._permissions[flag] : false;
|
|
@@ -245,11 +242,6 @@ const SnkDataUnit = class {
|
|
|
245
242
|
while (resolver = this._onDataUnitResolve.pop()) {
|
|
246
243
|
resolver(this.dataUnit);
|
|
247
244
|
}
|
|
248
|
-
if (this.autoLoad) {
|
|
249
|
-
setTimeout(() => {
|
|
250
|
-
this.dataUnit.loadData();
|
|
251
|
-
}, 500); //TODO: Ajustar para aguardar filterProvider do dataunit estar pronto.
|
|
252
|
-
}
|
|
253
245
|
}
|
|
254
246
|
}
|
|
255
247
|
}
|