@sankhyalabs/sankhyablocks 1.4.0-beta.7 → 1.4.0-beta.8
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-b54dfb89.js → SnkMessageBuilder-6c2f7bcd.js} +87 -11
- package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
- package/dist/cjs/configurableElementsStorage-93459c72.js +20 -0
- package/dist/cjs/constants-aebcc2f5.js +69 -0
- package/dist/cjs/draggable.bundle-82a25c06.js +6886 -0
- package/dist/cjs/form-config-fetcher-2de7c16a.js +6895 -0
- package/dist/cjs/{index-6fcf07f3.js → index-188190ee.js} +2 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/snk-application.cjs.entry.js +209 -6976
- package/dist/cjs/snk-config-modal.cjs.entry.js +62 -0
- package/dist/cjs/snk-config-options.cjs.entry.js +163 -0
- package/dist/cjs/{snk-filter-bar_5.cjs.entry.js → snk-configurator_6.cjs.entry.js} +193 -6
- package/dist/cjs/snk-crud.cjs.entry.js +13 -11
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-field-config_2.cjs.entry.js +135 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +957 -0
- package/dist/cjs/snk-form.cjs.entry.js +146 -0
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-tab-config.cjs.entry.js +321 -0
- package/dist/cjs/{taskbar-elements-aedfeae6.js → taskbar-elements-4c2c6704.js} +10 -6
- package/dist/cjs/taskbar-processor-6bd0d35c.js +47 -0
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +27 -1
- package/dist/collection/components/snk-application/snk-application.js +144 -23
- package/dist/collection/components/snk-configurator/snk-configurator.js +261 -0
- package/dist/collection/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.js +16 -0
- package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.css +122 -0
- package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.js +137 -0
- package/dist/collection/components/snk-crud/snk-crud.js +15 -13
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +33 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +3 -3
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -1
- package/dist/collection/components/snk-form/snk-form.css +4 -0
- package/dist/collection/components/snk-form/snk-form.js +108 -30
- package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.css +9 -0
- package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js +248 -0
- package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.css +164 -0
- package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js +140 -0
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.css +185 -0
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +1062 -0
- package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.css +272 -0
- package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +476 -0
- package/dist/collection/components/snk-grid/snk-grid.js +92 -22
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +9 -5
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +35 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +106 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +9 -1
- package/dist/collection/lib/message/SnkMessageBuilder.js +8 -1
- package/dist/collection/lib/message/resources/snk-configurator.msg.js +11 -0
- package/dist/collection/lib/message/resources/snk-form.msg.js +59 -2
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +1 -1
- package/dist/collection/lib/utils/constants.js +58 -0
- package/dist/components/SnkMessageBuilder.js +87 -11
- package/dist/components/_commonjsHelpers.js +17 -0
- package/dist/components/constants.js +60 -0
- package/dist/components/form-config-fetcher.js +6889 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +6 -0
- package/dist/components/snk-application2.js +221 -6985
- package/dist/components/snk-config-modal.d.ts +11 -0
- package/dist/components/snk-config-modal.js +6 -0
- package/dist/components/snk-config-modal2.js +91 -0
- package/dist/components/snk-config-options.d.ts +11 -0
- package/dist/components/snk-config-options.js +6 -0
- package/dist/components/snk-config-options2.js +178 -0
- package/dist/components/snk-configurator.d.ts +11 -0
- package/dist/components/snk-configurator.js +6 -0
- package/dist/components/snk-configurator2.js +212 -0
- package/dist/components/snk-crud.js +62 -25
- package/dist/components/snk-field-config.d.ts +11 -0
- package/dist/components/snk-field-config.js +6 -0
- package/dist/components/snk-field-config2.js +70 -0
- package/dist/components/snk-filter-bar2.js +1 -1
- package/dist/components/snk-filter-personalized.js +2 -0
- package/dist/components/snk-form-config.d.ts +11 -0
- package/dist/components/snk-form-config.js +6 -0
- package/dist/components/snk-form-config2.js +996 -0
- package/dist/components/snk-form2.js +79 -29
- package/dist/components/snk-grid2.js +43 -24
- package/dist/components/snk-tab-config.d.ts +11 -0
- package/dist/components/snk-tab-config.js +6 -0
- package/dist/components/snk-tab-config2.js +7220 -0
- package/dist/components/snk-taskbar2.js +27 -9
- package/dist/esm/{SnkMessageBuilder-d440381c.js → SnkMessageBuilder-5792c260.js} +87 -11
- package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
- package/dist/esm/configurableElementsStorage-cdc144b5.js +18 -0
- package/dist/esm/constants-c4e3341e.js +60 -0
- package/dist/esm/draggable.bundle-41d56f06.js +6884 -0
- package/dist/esm/form-config-fetcher-96c6c2dc.js +6889 -0
- package/dist/esm/{index-81dda3cf.js → index-bafb2cef.js} +2 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/sankhyablocks.js +2 -2
- package/dist/esm/snk-application.entry.js +220 -6987
- package/dist/esm/snk-config-modal.entry.js +58 -0
- package/dist/esm/snk-config-options.entry.js +159 -0
- package/dist/esm/{snk-filter-bar_5.entry.js → snk-configurator_6.entry.js} +194 -8
- package/dist/esm/snk-crud.entry.js +13 -11
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-field-config_2.entry.js +130 -0
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-detail.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/snk-filter-search.entry.js +1 -1
- package/dist/esm/snk-filter-text.entry.js +1 -1
- package/dist/esm/snk-form-config.entry.js +953 -0
- package/dist/esm/snk-form.entry.js +142 -0
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-tab-config.entry.js +317 -0
- package/dist/esm/{taskbar-elements-38eb5d51.js → taskbar-elements-2035b1c7.js} +10 -6
- package/dist/esm/taskbar-processor-aa6772c9.js +45 -0
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/p-03f9c407.js +1 -0
- package/dist/sankhyablocks/{p-ba426ea9.entry.js → p-04ad681a.entry.js} +1 -1
- package/dist/sankhyablocks/p-112455b1.js +1 -0
- package/dist/sankhyablocks/p-1963b46f.entry.js +1 -0
- package/dist/sankhyablocks/p-21c8929b.js +1 -0
- package/dist/sankhyablocks/p-26c503a6.entry.js +1 -0
- package/dist/sankhyablocks/{p-2e49afef.entry.js → p-31631fb6.entry.js} +1 -1
- package/dist/sankhyablocks/p-361299e8.js +26 -0
- package/dist/sankhyablocks/p-434e0dcf.entry.js +1 -0
- package/dist/sankhyablocks/{p-aecf3e0a.entry.js → p-6c61416a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-49580cdd.entry.js → p-857c4735.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4574a955.entry.js → p-8cd8977c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6386d720.entry.js → p-916068ff.entry.js} +1 -1
- package/dist/sankhyablocks/p-9f2c5fac.entry.js +1 -0
- package/dist/sankhyablocks/p-ad658f44.js +1 -0
- package/dist/sankhyablocks/p-ae302037.entry.js +75 -0
- package/dist/sankhyablocks/p-af11b0e7.js +1 -0
- package/dist/sankhyablocks/p-af306302.entry.js +1 -0
- package/dist/sankhyablocks/p-b6d6b172.js +1 -0
- package/dist/sankhyablocks/{p-40b27004.entry.js → p-cc85ba53.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0352c0e2.entry.js → p-ccdf59eb.entry.js} +1 -1
- package/dist/sankhyablocks/p-ce789145.entry.js +1 -0
- package/dist/sankhyablocks/p-cf81e313.entry.js +1 -0
- package/dist/sankhyablocks/{p-0ea25487.entry.js → p-d1ae76ec.entry.js} +1 -1
- package/dist/sankhyablocks/p-d50651a3.js +1 -0
- package/dist/sankhyablocks/{p-fac2b6a9.js → p-ddb03141.js} +2 -2
- package/dist/sankhyablocks/p-ee906940.entry.js +1 -0
- package/dist/sankhyablocks/{p-5bdb8452.entry.js → p-f9084ecb.entry.js} +1 -1
- package/dist/sankhyablocks/p-fa75fba5.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +29 -14
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +46 -0
- package/dist/types/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.d.ts +8 -0
- package/dist/types/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.d.ts +38 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +50 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +92 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +8 -6
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +3 -3
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +40 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +65 -0
- package/dist/types/components/snk-form/snk-form.d.ts +71 -0
- package/dist/types/components/snk-form/subcomponents/snk-config-options/snk-config-options.d.ts +41 -0
- package/dist/types/components/snk-form/subcomponents/snk-field-config/snk-field-config.d.ts +32 -0
- package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +139 -0
- package/dist/types/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.d.ts +97 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +59 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +6 -5
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -3
- package/dist/types/components.d.ts +358 -13
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +21 -3
- package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +1 -0
- package/dist/types/lib/message/resources/snk-configurator.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-form.msg.d.ts +5 -2
- package/dist/types/lib/utils/constants.d.ts +62 -0
- package/dist/types/lib/utils/pesquisa.d.ts +2 -1
- package/package.json +4 -3
- package/react/components.d.ts +6 -0
- package/react/components.js +6 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/snk-form_2.cjs.entry.js +0 -247
- package/dist/esm/snk-form_2.entry.js +0 -242
- package/dist/sankhyablocks/p-21e940aa.entry.js +0 -1
- package/dist/sankhyablocks/p-2eea7eea.js +0 -1
- package/dist/sankhyablocks/p-42036db1.entry.js +0 -84
- package/dist/sankhyablocks/p-77216252.entry.js +0 -1
- package/dist/sankhyablocks/p-86f15ffe.js +0 -1
- package/dist/sankhyablocks/p-97009a2c.entry.js +0 -1
- package/dist/sankhyablocks/p-a14c49db.entry.js +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
+
import { d as defineCustomElement$2 } from './snk-config-modal2.js';
|
|
4
|
+
import { d as defineCustomElement$1 } from './snk-configurator2.js';
|
|
3
5
|
|
|
4
6
|
var TaskbarElement;
|
|
5
7
|
(function (TaskbarElement) {
|
|
@@ -14,9 +16,9 @@ var TaskbarElement;
|
|
|
14
16
|
TaskbarElement["SAVE"] = "SAVE";
|
|
15
17
|
TaskbarElement["GRID_MODE"] = "GRID_MODE";
|
|
16
18
|
TaskbarElement["FORM_MODE"] = "FORM_MODE";
|
|
17
|
-
TaskbarElement["CONFIG_GRID"] = "CONFIG_GRID";
|
|
18
19
|
TaskbarElement["MORE_OPTIONS"] = "MORE_OPTIONS";
|
|
19
20
|
TaskbarElement["DIVIDER"] = "DIVIDER";
|
|
21
|
+
TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
|
|
20
22
|
})(TaskbarElement || (TaskbarElement = {}));
|
|
21
23
|
var AuthorizationElements;
|
|
22
24
|
(function (AuthorizationElements) {
|
|
@@ -24,11 +26,12 @@ var AuthorizationElements;
|
|
|
24
26
|
AuthorizationElements["CLONE"] = "CLONE";
|
|
25
27
|
AuthorizationElements["REMOVE"] = "REMOVE";
|
|
26
28
|
AuthorizationElements["INSERT"] = "INSERT";
|
|
27
|
-
AuthorizationElements["
|
|
29
|
+
AuthorizationElements["CONFIGURATOR"] = "CONFIGURATOR";
|
|
28
30
|
})(AuthorizationElements || (AuthorizationElements = {}));
|
|
29
31
|
var VisibleWhenForbidden;
|
|
30
32
|
(function (VisibleWhenForbidden) {
|
|
31
33
|
VisibleWhenForbidden["CONFIG_GRID"] = "CONFIG_GRID";
|
|
34
|
+
VisibleWhenForbidden["CONFIGURATOR"] = "CONFIGURATOR";
|
|
32
35
|
})(VisibleWhenForbidden || (VisibleWhenForbidden = {}));
|
|
33
36
|
const buildCustomButton = (def, className, action, isEnabled) => {
|
|
34
37
|
const { hint, text, iconName } = def;
|
|
@@ -44,7 +47,7 @@ const buildCustomButton = (def, className, action, isEnabled) => {
|
|
|
44
47
|
return textButton(def.name, className, text, hint, action, isEnabled);
|
|
45
48
|
}
|
|
46
49
|
};
|
|
47
|
-
const buildElem = (element, className, getTitle, action, isEnabled, actions) => {
|
|
50
|
+
const buildElem = (element, className, getTitle, action, isEnabled, actions, configName) => {
|
|
48
51
|
const title = getTitle(element);
|
|
49
52
|
switch (element) {
|
|
50
53
|
case TaskbarElement.PREVIOUS:
|
|
@@ -69,8 +72,8 @@ const buildElem = (element, className, getTitle, action, isEnabled, actions) =>
|
|
|
69
72
|
return iconButton("table", element, className, title, action, isEnabled);
|
|
70
73
|
case TaskbarElement.FORM_MODE:
|
|
71
74
|
return iconButton("list", element, className, title, action, isEnabled);
|
|
72
|
-
case TaskbarElement.
|
|
73
|
-
return
|
|
75
|
+
case TaskbarElement.CONFIGURATOR:
|
|
76
|
+
return configButton(element, className, getTitle, action, isEnabled, configName);
|
|
74
77
|
case TaskbarElement.MORE_OPTIONS:
|
|
75
78
|
return actions && actions.length > 0 ? h("ez-actions-button", { title: title, size: "small", class: className, enabled: isEnabled(element), onEzAction: (evt) => action(evt.detail.value), actions: actions }) : undefined;
|
|
76
79
|
case TaskbarElement.DIVIDER:
|
|
@@ -87,6 +90,9 @@ function iconTextButton(iconName, name, className, text, title, action, isEnable
|
|
|
87
90
|
return h("ez-button", { name: iconName, title: title, label: text, size: "small", class: className, enabled: isEnabled(name), onClick: () => action(name) },
|
|
88
91
|
h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
|
89
92
|
}
|
|
93
|
+
function configButton(element, className, getTitle, action, isEnabled, configName) {
|
|
94
|
+
return h("snk-configurator", { key: "configurator", configName: configName, title: getTitle(element), class: className, enabled: isEnabled(element), onChangeViewMode: (evt) => action(evt === null || evt === void 0 ? void 0 : evt.detail) });
|
|
95
|
+
}
|
|
90
96
|
|
|
91
97
|
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex}";
|
|
92
98
|
|
|
@@ -95,6 +101,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
95
101
|
super();
|
|
96
102
|
this.__registerHost();
|
|
97
103
|
this.actionClick = createEvent(this, "actionClick", 7);
|
|
104
|
+
this.actionChange = createEvent(this, "actionChange", 7);
|
|
98
105
|
this._titleKeyByElement = {
|
|
99
106
|
[TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
|
100
107
|
[TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
|
|
@@ -107,8 +114,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
107
114
|
[TaskbarElement.CANCEL]: "snkTaskbar.titleCancel",
|
|
108
115
|
[TaskbarElement.SAVE]: "snkTaskbar.titleSave",
|
|
109
116
|
[TaskbarElement.GRID_MODE]: "snkTaskbar.titleGridMode",
|
|
110
|
-
[TaskbarElement.
|
|
111
|
-
[TaskbarElement.
|
|
117
|
+
[TaskbarElement.FORM_MODE]: "snkTaskbar.titleFormMode",
|
|
118
|
+
[TaskbarElement.CONFIGURATOR]: "snkTaskbar.titleConfigurator"
|
|
112
119
|
};
|
|
113
120
|
}
|
|
114
121
|
observeButtons() {
|
|
@@ -192,7 +199,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
192
199
|
className += "ez-padding-left--medium";
|
|
193
200
|
}
|
|
194
201
|
if (TaskbarElement[def.toString()]) {
|
|
195
|
-
return buildElem(def, className, elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.actionsList);
|
|
202
|
+
return buildElem(def, className, elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.actionsList, this.configName);
|
|
196
203
|
}
|
|
197
204
|
else {
|
|
198
205
|
return buildCustomButton(def, className, elem => this.elementClick(elem), elem => this.isEnabled(elem));
|
|
@@ -239,6 +246,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
239
246
|
}; }
|
|
240
247
|
static get style() { return snkTaskbarCss; }
|
|
241
248
|
}, [6, "snk-taskbar", {
|
|
249
|
+
"configName": [1, "config-name"],
|
|
242
250
|
"buttons": [1],
|
|
243
251
|
"customButtons": [16],
|
|
244
252
|
"actionsList": [16],
|
|
@@ -251,13 +259,23 @@ function defineCustomElement() {
|
|
|
251
259
|
if (typeof customElements === "undefined") {
|
|
252
260
|
return;
|
|
253
261
|
}
|
|
254
|
-
const components = ["snk-taskbar"];
|
|
262
|
+
const components = ["snk-taskbar", "snk-config-modal", "snk-configurator"];
|
|
255
263
|
components.forEach(tagName => { switch (tagName) {
|
|
256
264
|
case "snk-taskbar":
|
|
257
265
|
if (!customElements.get(tagName)) {
|
|
258
266
|
customElements.define(tagName, SnkTaskbar);
|
|
259
267
|
}
|
|
260
268
|
break;
|
|
269
|
+
case "snk-config-modal":
|
|
270
|
+
if (!customElements.get(tagName)) {
|
|
271
|
+
defineCustomElement$2();
|
|
272
|
+
}
|
|
273
|
+
break;
|
|
274
|
+
case "snk-configurator":
|
|
275
|
+
if (!customElements.get(tagName)) {
|
|
276
|
+
defineCustomElement$1();
|
|
277
|
+
}
|
|
278
|
+
break;
|
|
261
279
|
} });
|
|
262
280
|
}
|
|
263
281
|
|
|
@@ -51,16 +51,6 @@ const snkFilterBarMessages = {
|
|
|
51
51
|
"modalCancelButtonLabel": "Limpar"
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
const snkFormMessages = {
|
|
55
|
-
title: {
|
|
56
|
-
clone: "Duplicar registro",
|
|
57
|
-
insert: "Cadastrar registro",
|
|
58
|
-
update: "Alterar registro",
|
|
59
|
-
clean: "{{ENTITY_NAME}}"
|
|
60
|
-
},
|
|
61
|
-
goBackTitle: "Voltar"
|
|
62
|
-
};
|
|
63
|
-
|
|
64
54
|
const snkTaskbarMessages = {
|
|
65
55
|
titleUpdate: "Editar",
|
|
66
56
|
titlePrevious: "Anterior",
|
|
@@ -74,7 +64,7 @@ const snkTaskbarMessages = {
|
|
|
74
64
|
titleSave: "Salvar",
|
|
75
65
|
titleGridMode: "Modo Grade",
|
|
76
66
|
titleFormMode: "Modo Formulário",
|
|
77
|
-
|
|
67
|
+
titleConfigurator: "Configurações",
|
|
78
68
|
forbidden: "Permissão não liberada"
|
|
79
69
|
};
|
|
80
70
|
|
|
@@ -82,13 +72,99 @@ const crudUtilsMessages = {
|
|
|
82
72
|
errorArray: "CrudUtils.find deve receber um array de fields, ou uma lista separada por virgula.",
|
|
83
73
|
};
|
|
84
74
|
|
|
75
|
+
const snkFormMessages = {
|
|
76
|
+
title: {
|
|
77
|
+
clone: "Duplicar registro",
|
|
78
|
+
insert: "Cadastrar registro",
|
|
79
|
+
update: "Alterar registro",
|
|
80
|
+
clean: "{{ENTITY_NAME}}"
|
|
81
|
+
},
|
|
82
|
+
goBackTitle: "Voltar"
|
|
83
|
+
};
|
|
84
|
+
const snkConfigOptionsMessages = {
|
|
85
|
+
label: {
|
|
86
|
+
nameField: "Nome do Campo *",
|
|
87
|
+
typeValueDefault: "Tipo de valor padrão *",
|
|
88
|
+
valueDefault: "Valor Padrão",
|
|
89
|
+
clearDuplicate: "Limpar ao Duplicar",
|
|
90
|
+
requiredField: "Campo Obrigatório",
|
|
91
|
+
protectedField: "Campo Protegido"
|
|
92
|
+
},
|
|
93
|
+
options: {
|
|
94
|
+
valueFixed: "Valor Fixo",
|
|
95
|
+
variable: "Variável"
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
const snkFormConfigMessages = {
|
|
99
|
+
title: "Configuração do formulário",
|
|
100
|
+
applyConfig: "Aplicar configuração",
|
|
101
|
+
availableFields: {
|
|
102
|
+
title: "Campos disponíveis",
|
|
103
|
+
labelNoFields: "Nenhum campo disponível",
|
|
104
|
+
labelOneField: "1 campo disponível",
|
|
105
|
+
labelAvailableFields: "Campos disponíveis",
|
|
106
|
+
labelSearchField: "Procurar campo"
|
|
107
|
+
},
|
|
108
|
+
form: {
|
|
109
|
+
subTitleInfo: "Inclua estes campos nos grupos ou deixe-os separados no topo do formulário!",
|
|
110
|
+
labelDropField: "Arraste e solte um campo aqui",
|
|
111
|
+
labelNewGroup: "Adicionar novo grupo",
|
|
112
|
+
mainArea: "Área principal",
|
|
113
|
+
tabGeneral: "Geral"
|
|
114
|
+
},
|
|
115
|
+
confirm: {
|
|
116
|
+
title: "Aviso",
|
|
117
|
+
deleteTab: "A aba selecionada será excluída.<br/><br/> Tem certeza que deseja excluir aba",
|
|
118
|
+
cancel: "As alterações realizadas serão descartadas.<br/><br/><b>Gostaria de continuar?</b>",
|
|
119
|
+
exit: "Ao sair as alterações serão descartadas.<br/><br/><b>Você realmente gostaria de sair?</b>",
|
|
120
|
+
apply: "A <b>{0}</b> irá substituir a sua configuração {1}!<br/><br/><b>Deseja continuar?</b>",
|
|
121
|
+
group: "Não é possível salvar as configurações com um grupo vazio!",
|
|
122
|
+
labelYes: "Sim",
|
|
123
|
+
labelNo: "Não"
|
|
124
|
+
},
|
|
125
|
+
alert: {
|
|
126
|
+
titleGroupExists: "Já existe um grupo com título",
|
|
127
|
+
infoValidTitle: "Por favor, digite um título válido.",
|
|
128
|
+
inTab: "na aba"
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
const snkFieldConfigMessages = {
|
|
132
|
+
titleRemove: "Remover",
|
|
133
|
+
titleConfigurations: "Configurações",
|
|
134
|
+
titleAdd: "Adicionar"
|
|
135
|
+
};
|
|
136
|
+
const snkTabConfigMessages = {
|
|
137
|
+
labelRename: "Renomear",
|
|
138
|
+
labelHide: "Ocultar",
|
|
139
|
+
labelShow: "Exibir",
|
|
140
|
+
labelDelete: "Excluir"
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const snkConfiguratorMessages = {
|
|
144
|
+
msgSaveSuccessfully: "As configurações foram salvas com sucesso!"
|
|
145
|
+
};
|
|
146
|
+
const snkConfigModalMessages = {
|
|
147
|
+
titleConfigurations: "Configurações",
|
|
148
|
+
subTitleModeConfig: "Modo de visualização",
|
|
149
|
+
labelConfigGrid: "Configurar grade",
|
|
150
|
+
labelConfigForm: "Configurar formulário",
|
|
151
|
+
labelGrid: "Grade",
|
|
152
|
+
labelForm: "Formulário"
|
|
153
|
+
};
|
|
154
|
+
|
|
85
155
|
class SnkMessageBuilder {
|
|
86
156
|
constructor() {
|
|
87
157
|
this._defaults = {
|
|
88
158
|
snkDataUnit: snkDataUnitMessages,
|
|
89
159
|
snkForm: snkFormMessages,
|
|
160
|
+
snkFormConfig: snkFormConfigMessages,
|
|
161
|
+
snkConfigOptions: snkConfigOptionsMessages,
|
|
90
162
|
snkTaskbar: snkTaskbarMessages,
|
|
163
|
+
snkConfigModal: snkConfigModalMessages,
|
|
164
|
+
snkFieldConfig: snkFieldConfigMessages,
|
|
91
165
|
snkFilterBar: snkFilterBarMessages,
|
|
166
|
+
snkConfigurator: snkConfiguratorMessages,
|
|
167
|
+
snkTabConfig: snkTabConfigMessages,
|
|
92
168
|
crudUtils: crudUtilsMessages
|
|
93
169
|
};
|
|
94
170
|
this._currentOperation = OperationMap.CLEAN;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
|
+
|
|
3
|
+
function createCommonjsModule(fn, basedir, module) {
|
|
4
|
+
return module = {
|
|
5
|
+
path: basedir,
|
|
6
|
+
exports: {},
|
|
7
|
+
require: function (path, base) {
|
|
8
|
+
return commonjsRequire();
|
|
9
|
+
}
|
|
10
|
+
}, fn(module, module.exports), module.exports;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function commonjsRequire () {
|
|
14
|
+
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { commonjsGlobal as a, createCommonjsModule as c };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
class ConfigurableElementsStorage {
|
|
2
|
+
static setGrid(id, grid) {
|
|
3
|
+
this._gridById.set(id, grid);
|
|
4
|
+
}
|
|
5
|
+
static setForm(id, form) {
|
|
6
|
+
this._formById.set(id, form);
|
|
7
|
+
}
|
|
8
|
+
static getGrid(id) {
|
|
9
|
+
return this._gridById.get(id);
|
|
10
|
+
}
|
|
11
|
+
static getForm(id) {
|
|
12
|
+
return this._formById.get(id);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
ConfigurableElementsStorage._gridById = new Map();
|
|
16
|
+
ConfigurableElementsStorage._formById = new Map();
|
|
17
|
+
|
|
18
|
+
export { ConfigurableElementsStorage as C };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const VIEW_MODE = {
|
|
2
|
+
grid: {
|
|
3
|
+
index: 0,
|
|
4
|
+
name: "GRID_MODE"
|
|
5
|
+
},
|
|
6
|
+
form: {
|
|
7
|
+
index: 1,
|
|
8
|
+
name: "FORM_MODE"
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const ACTION_CONFIG = {
|
|
12
|
+
add: 'ADD',
|
|
13
|
+
remove: 'REMOVE',
|
|
14
|
+
configuration: 'CONFIGURATION'
|
|
15
|
+
};
|
|
16
|
+
const VARS_BY_TYPE = {
|
|
17
|
+
UserInterface: {
|
|
18
|
+
DATE: [{ label: "Data atual", value: "${data}" }],
|
|
19
|
+
DATETIME: [{ label: "Data e hora atuais", value: "${datahora}" }],
|
|
20
|
+
INTEGERNUMBER: [
|
|
21
|
+
{ label: "Código do usuário logado", value: "${usuario}" },
|
|
22
|
+
{ label: "Empresa do usuário logado", value: "${usuario.empresa}" },
|
|
23
|
+
{ label: "Vendedor para o usuário logado", value: "${usuario.vendedor}" },
|
|
24
|
+
{ label: "Cent. Resultado usuário logado", value: "${usuario.centroresultado}" }
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const DEFAULT_TYPE = {
|
|
29
|
+
fixed: "F",
|
|
30
|
+
variable: "V"
|
|
31
|
+
};
|
|
32
|
+
const CONFIG_EVENTS = {
|
|
33
|
+
closeModal: "ezCloseModal",
|
|
34
|
+
cancelConfig: "cancelConfig",
|
|
35
|
+
changeConfig: "changeConfig",
|
|
36
|
+
configChanged: "configChanged",
|
|
37
|
+
fieldChanged: "ezChange",
|
|
38
|
+
dragStart: "sortable:start",
|
|
39
|
+
dragSort: "sortable:sort",
|
|
40
|
+
dragSorted: "sortable:sorted",
|
|
41
|
+
dragStop: "sortable:stop"
|
|
42
|
+
};
|
|
43
|
+
const KEY_EVENTS = {
|
|
44
|
+
enter: "Enter",
|
|
45
|
+
arrowLeft: "ArrowLeft",
|
|
46
|
+
arrowRight: "ArrowRight",
|
|
47
|
+
tab: "Tab",
|
|
48
|
+
escape: "Escape"
|
|
49
|
+
};
|
|
50
|
+
const TYPE_ACTIONS = {
|
|
51
|
+
rename: "RENAME",
|
|
52
|
+
hide: "HIDE",
|
|
53
|
+
show: "SHOW",
|
|
54
|
+
delete: "DELETE"
|
|
55
|
+
};
|
|
56
|
+
const TAB_NAMES = {
|
|
57
|
+
main: "__main"
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export { ACTION_CONFIG as A, CONFIG_EVENTS as C, DEFAULT_TYPE as D, KEY_EVENTS as K, TAB_NAMES as T, VARS_BY_TYPE as V, TYPE_ACTIONS as a, VIEW_MODE as b };
|