@sankhyalabs/sankhyablocks 2.1.3 → 2.1.5
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/AuthorizationConfig-79ffae4b.js +7 -0
- package/dist/cjs/{form-config-fetcher-2de7c16a.js → ConfigStorage-c112de1d.js} +101 -1
- package/dist/cjs/{SnkMessageBuilder-89482d28.js → SnkMessageBuilder-61f00e7f.js} +33 -5
- package/dist/cjs/{constants-9056ca9e.js → constants-a47a5190.js} +15 -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 +30 -64
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/{snk-field-config_2.cjs.entry.js → snk-configurator_3.cjs.entry.js} +134 -13
- package/dist/cjs/snk-crud.cjs.entry.js +23 -6
- package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
- package/dist/cjs/{snk-configurator_6.cjs.entry.js → snk-filter-bar_7.cjs.entry.js} +498 -188
- package/dist/cjs/snk-form-config.cjs.entry.js +32 -26
- package/dist/cjs/snk-form.cjs.entry.js +30 -17
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/{taskbar-elements-d762e436.js → taskbar-elements-997af1c9.js} +9 -8
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/snk-application/snk-application.js +3 -2
- package/dist/collection/components/snk-configurator/AuthorizationConfig.js +5 -0
- package/dist/collection/components/snk-configurator/snk-configurator.css +124 -0
- package/dist/collection/components/snk-configurator/snk-configurator.js +126 -181
- package/dist/collection/components/snk-crud/snk-crud.js +23 -5
- package/dist/collection/components/snk-form/snk-form.js +37 -54
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.css +1 -1
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +48 -29
- package/dist/collection/components/snk-grid/snk-grid.js +69 -20
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.css +166 -0
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +605 -0
- package/dist/collection/components/snk-grid/subcomponents/snk-select-box/snk-select-box.css +9 -0
- package/dist/collection/components/snk-grid/subcomponents/snk-select-box/snk-select-box.js +70 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +9 -8
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +9 -1
- package/dist/collection/lib/configs/ConfigStorage.js +15 -15
- package/dist/collection/lib/message/SnkMessageBuilder.js +5 -3
- package/dist/collection/lib/message/resources/snk-configurator.msg.js +0 -3
- package/dist/collection/lib/message/resources/snk-form.msg.js +3 -0
- package/dist/collection/lib/message/resources/snk-grid.msg.js +26 -0
- package/dist/collection/lib/utils/constants.js +14 -0
- package/dist/components/AuthorizationConfig.js +7 -0
- package/dist/components/{form-config-fetcher.js → ConfigStorage.js} +100 -2
- package/dist/components/SnkMessageBuilder.js +33 -5
- package/dist/components/constants.js +15 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +2 -1
- package/dist/components/snk-application2.js +2 -36
- package/dist/components/snk-configurator2.js +63 -165
- package/dist/components/snk-crud.js +53 -29
- package/dist/components/snk-form-config2.js +27 -21
- package/dist/components/snk-form2.js +33 -32
- package/dist/components/{snk-config-modal.d.ts → snk-grid-config.d.ts} +4 -4
- package/dist/components/snk-grid-config.js +6 -0
- package/dist/components/snk-grid-config2.js +497 -0
- package/dist/components/snk-grid2.js +65 -27
- package/dist/components/snk-select-box.d.ts +11 -0
- package/dist/components/snk-select-box.js +6 -0
- package/dist/components/snk-select-box2.js +38 -0
- package/dist/components/snk-taskbar2.js +19 -22
- package/dist/esm/AuthorizationConfig-dcbd207a.js +7 -0
- package/dist/esm/{form-config-fetcher-96c6c2dc.js → ConfigStorage-99025655.js} +100 -2
- package/dist/esm/{SnkMessageBuilder-a27fc561.js → SnkMessageBuilder-f5ef87df.js} +33 -5
- package/dist/esm/{constants-c6039d3d.js → constants-babe1a08.js} +15 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +3 -37
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/{snk-field-config_2.entry.js → snk-configurator_3.entry.js} +134 -14
- package/dist/esm/snk-crud.entry.js +23 -6
- package/dist/esm/snk-data-unit.entry.js +1 -1
- package/dist/esm/{snk-configurator_6.entry.js → snk-filter-bar_7.entry.js} +499 -190
- package/dist/esm/snk-form-config.entry.js +27 -21
- package/dist/esm/snk-form.entry.js +30 -17
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/{taskbar-elements-1092b0b7.js → taskbar-elements-a0a8b106.js} +9 -8
- package/dist/sankhyablocks/p-09720dd1.js +1 -0
- package/dist/sankhyablocks/p-105cd4a8.entry.js +1 -0
- package/dist/sankhyablocks/p-133cf71d.entry.js +1 -0
- package/dist/sankhyablocks/p-341b2ceb.entry.js +1 -0
- package/dist/sankhyablocks/p-395d5e42.entry.js +1 -0
- package/dist/sankhyablocks/{p-8706fe65.entry.js → p-43aff8f5.entry.js} +1 -1
- package/dist/sankhyablocks/p-53f33e9d.entry.js +1 -0
- package/dist/sankhyablocks/p-639b8f6e.entry.js +76 -0
- package/dist/sankhyablocks/{p-a5b26df2.js → p-6673c77c.js} +1 -1
- package/dist/sankhyablocks/p-6ba8f415.js +26 -0
- package/dist/sankhyablocks/{p-2517529d.js → p-877bd6cf.js} +1 -1
- package/dist/sankhyablocks/{p-f37cdeb5.entry.js → p-cd03ea9e.entry.js} +1 -1
- package/dist/sankhyablocks/p-dc36cfbf.js +1 -0
- package/dist/sankhyablocks/{p-92782503.entry.js → p-eb94df0b.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +0 -1
- package/dist/types/components/snk-configurator/AuthorizationConfig.d.ts +4 -0
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +21 -24
- package/dist/types/components/snk-crud/snk-crud.d.ts +6 -0
- package/dist/types/components/snk-form/snk-form.d.ts +6 -9
- package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +7 -3
- package/dist/types/components/snk-grid/snk-grid.d.ts +13 -3
- package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +66 -0
- package/dist/types/components/snk-grid/subcomponents/snk-select-box/snk-select-box.d.ts +7 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +3 -4
- package/dist/types/components.d.ts +104 -74
- package/dist/types/lib/configs/ConfigStorage.d.ts +3 -3
- package/dist/types/lib/message/resources/snk-configurator.msg.d.ts +0 -1
- package/dist/types/lib/message/resources/snk-grid.msg.d.ts +2 -0
- package/dist/types/lib/utils/constants.d.ts +14 -0
- package/package.json +1 -1
- package/react/components.d.ts +2 -1
- package/react/components.js +2 -1
- package/react/components.js.map +1 -1
- package/dist/cjs/configurableElementsStorage-93459c72.js +0 -20
- package/dist/cjs/snk-config-modal.cjs.entry.js +0 -62
- package/dist/collection/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.js +0 -16
- package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.css +0 -122
- package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.js +0 -137
- package/dist/components/snk-config-modal.js +0 -6
- package/dist/components/snk-config-modal2.js +0 -91
- package/dist/esm/configurableElementsStorage-cdc144b5.js +0 -18
- package/dist/esm/snk-config-modal.entry.js +0 -58
- package/dist/sankhyablocks/p-361299e8.js +0 -26
- package/dist/sankhyablocks/p-429c5e3f.entry.js +0 -1
- package/dist/sankhyablocks/p-4fab64ec.js +0 -1
- package/dist/sankhyablocks/p-60eef7cd.entry.js +0 -1
- package/dist/sankhyablocks/p-626cf022.entry.js +0 -1
- package/dist/sankhyablocks/p-6511d132.entry.js +0 -1
- package/dist/sankhyablocks/p-8c14bbfb.entry.js +0 -76
- package/dist/sankhyablocks/p-c4ae984b.entry.js +0 -1
- package/dist/sankhyablocks/p-ce7c38a1.entry.js +0 -1
- package/dist/sankhyablocks/p-d50651a3.js +0 -1
- package/dist/types/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.d.ts +0 -8
- package/dist/types/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.d.ts +0 -38
|
@@ -6,11 +6,11 @@ const index = require('./index-20e8b68a.js');
|
|
|
6
6
|
const draggable_bundle = require('./draggable.bundle-82a25c06.js');
|
|
7
7
|
const core = require('@sankhyalabs/core');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
|
-
const constants = require('./constants-
|
|
10
|
-
const
|
|
9
|
+
const constants = require('./constants-a47a5190.js');
|
|
10
|
+
const ConfigStorage = require('./ConfigStorage-c112de1d.js');
|
|
11
11
|
require('./_commonjsHelpers-537d719a.js');
|
|
12
12
|
|
|
13
|
-
const snkFormConfigCss = ".sc-snk-form-config-h{--snk-form-config__title--font-pattern:var(--font-pattern, \"Roboto\");--snk-form-config__title--weight--large:var(--text-weight--large, 600);display:flex;flex-direction:column;position:absolute;top:0;left:0;width:100%;height:100%;z-index:var(--more-visible, 2);background-color:var(--background--xlight)}.form-config__title.sc-snk-form-config{display:flex;margin:0;line-height:1.3;font-family:var(--snk-form-config__title--font-pattern);font-weight:var(--snk-form-config__title--weight--large)}.form-config__header-container.sc-snk-form-config{display:flex}.form-config__field-container.sc-snk-form-config{width:32%;padding:6px}.form-config__hide-content.sc-snk-form-config{display:none}ez-icon.sc-snk-form-config .left-icon.sc-snk-form-config{--ez-icon--color:var(--text--disable)}.ez-box__label-counter.sc-snk-form-config{font-weight:var(--text-weight--extra-small);margin-top:-7px}.form-config__btn-options.sc-snk-form-config{--ez-button--min-width:300px;--ez-button--background-color:#FFFFFF}[data-draggable-parent].sc-snk-form-config{position:relative}.form-config__field-config--selected.sc-snk-form-config{position:static}.form-config__field-config--dragged.sc-snk-form-config .draggable-mirror.sc-snk-form-config{z-index:var(--more-visible, 2)}.form-config__config-options.sc-snk-form-config{position:relative;margin-top:-3px;min-width:100%;z-index:1}.form-config__tab-container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config{position:relative;height:100%;max-height:calc(100vh - 92px)}.form-config__tab-container.sc-snk-form-config .ez-box__container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config .ez-box__container.sc-snk-form-config{align-content:flex-start;height:100%}.form-config__fields-available.sc-snk-form-config [data-draggable-parent].sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:100%;max-height:calc(100% - 122px)}.form-config__tab-content.sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:auto;max-height:calc(100% - 128px)}[data-draggable-element].sc-snk-form-config{cursor:grab}.form-config__actions-button.sc-snk-form-config{--ez-actions-button__btn-action--min-width:
|
|
13
|
+
const snkFormConfigCss = ".sc-snk-form-config-h{--snk-form-config__title--font-pattern:var(--font-pattern, \"Roboto\");--snk-form-config__title--weight--large:var(--text-weight--large, 600);display:flex;flex-direction:column;position:absolute;top:0;left:0;width:100%;height:100%;z-index:var(--more-visible, 2);background-color:var(--background--xlight)}.form-config__title.sc-snk-form-config{display:flex;margin:0;line-height:1.3;font-family:var(--snk-form-config__title--font-pattern);font-weight:var(--snk-form-config__title--weight--large)}.form-config__header-container.sc-snk-form-config{display:flex}.form-config__field-container.sc-snk-form-config{width:32%;padding:6px}.form-config__hide-content.sc-snk-form-config{display:none}ez-icon.sc-snk-form-config .left-icon.sc-snk-form-config{--ez-icon--color:var(--text--disable)}.ez-box__label-counter.sc-snk-form-config{font-weight:var(--text-weight--extra-small);margin-top:-7px}.form-config__btn-options.sc-snk-form-config{--ez-button--min-width:300px;--ez-button--background-color:#FFFFFF}[data-draggable-parent].sc-snk-form-config{position:relative}.form-config__field-config--selected.sc-snk-form-config{position:static}.form-config__field-config--dragged.sc-snk-form-config .draggable-mirror.sc-snk-form-config{z-index:var(--more-visible, 2)}.form-config__config-options.sc-snk-form-config{position:relative;margin-top:-3px;min-width:100%;z-index:1}.form-config__tab-container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config{position:relative;height:100%;max-height:calc(100vh - 92px)}.form-config__tab-container.sc-snk-form-config .ez-box__container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config .ez-box__container.sc-snk-form-config{align-content:flex-start;height:100%}.form-config__fields-available.sc-snk-form-config [data-draggable-parent].sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:100%;max-height:calc(100% - 122px)}.form-config__tab-content.sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:auto;max-height:calc(100% - 128px)}[data-draggable-element].sc-snk-form-config{cursor:grab}.form-config__actions-button.sc-snk-form-config{--ez-actions-button__btn-action--min-width:235px}.form-config__add-group.sc-snk-form-config{position:relative;min-height:120px;margin-bottom:10px}.form-config__add-group-container.sc-snk-form-config{position:absolute;display:flex;flex-wrap:wrap;width:100%;box-sizing:border-box;border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #d2dce9);padding:var(--space--small, 6px)}.form-config__add-group-content.sc-snk-form-config{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;box-sizing:border-box;border:2px dashed var(--color-strokes, #DCE0E8);border-radius:var(--border--radius-small, 6px)}.form-config__add-group-label.sc-snk-form-config{display:flex;justify-content:center;box-sizing:border-box;padding:var(--space--large, 24px)}.form-config__btn-add-group.sc-snk-form-config{position:relative;padding:var(--space--large, 24px) var(--space--medium, 12px) 0}.form-config__btn-add-group-container.sc-snk-form-config{padding:var(--space--medium, 12px);border-radius:var(--border--radius-medium, 12px);border:2px solid var(--color-strokes, #DCE0E8);background-color:var(--background--body, #fafcff)}.form-config__left-icon--eye-off.sc-snk-form-config{padding-top:var(--space--medium, 8px)}ez-collapsible-box.draggable-mirror.sc-snk-form-config{display:table;background-color:#FFFFFF}ez-collapsible-box.sc-snk-form-config{margin-bottom:10px}@media screen and (min-width: 480px){.form-config__field-config--selected.sc-snk-form-config .ez-flex.form-config__config-options.sc-snk-form-config{min-width:calc(300% + 12px)}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+2) .ez-flex.form-config__config-options.sc-snk-form-config{transform:translate(calc(100% / 3 * -1))}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+3) .ez-flex.form-config__config-options.sc-snk-form-config{transform:translate(calc(100% / 3 * -2))}}";
|
|
14
14
|
|
|
15
15
|
const CONTAINER_ID = {
|
|
16
16
|
collapsibleBox: "EZ-COLLAPSIBLE-BOX",
|
|
@@ -22,6 +22,7 @@ const SnkFormConfig = class {
|
|
|
22
22
|
constructor(hostRef) {
|
|
23
23
|
index.registerInstance(this, hostRef);
|
|
24
24
|
this.configChange = index.createEvent(this, "configChange", 7);
|
|
25
|
+
this.configClose = index.createEvent(this, "configClose", 7);
|
|
25
26
|
this._listEnabledFields = [];
|
|
26
27
|
this._renderTimer = 500;
|
|
27
28
|
this._sortableTimer = 100;
|
|
@@ -161,18 +162,13 @@ const SnkFormConfig = class {
|
|
|
161
162
|
isDefaultConfiguration() {
|
|
162
163
|
var _a;
|
|
163
164
|
const optionSelected = (_a = this._optionFormConfigSelected) === null || _a === void 0 ? void 0 : _a.origin;
|
|
164
|
-
return optionSelected ===
|
|
165
|
+
return optionSelected === ConfigStorage.UserConfigType.DEFAULT
|
|
165
166
|
&& this._optionFormConfigChanged === true
|
|
166
167
|
&& this._formConfigChanged === false;
|
|
167
168
|
}
|
|
168
|
-
|
|
169
|
-
var _a;
|
|
170
|
-
if (((_a = this._tempGroups) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
171
|
-
utils.ApplicationUtils.alert(this.getMessage("snkFormConfig.confirm.title"), this.getMessage("snkFormConfig.confirm.group"));
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
const isDefault = this.isDefaultConfiguration();
|
|
169
|
+
buildConfigToSave() {
|
|
175
170
|
let formConfig = {};
|
|
171
|
+
const isDefault = this.isDefaultConfiguration();
|
|
176
172
|
if (isDefault) {
|
|
177
173
|
formConfig = core.ObjectUtils.copy(this.formConfig);
|
|
178
174
|
}
|
|
@@ -190,14 +186,29 @@ const SnkFormConfig = class {
|
|
|
190
186
|
}
|
|
191
187
|
}
|
|
192
188
|
formConfig.defaultConfiguration = isDefault;
|
|
193
|
-
|
|
189
|
+
return formConfig;
|
|
190
|
+
}
|
|
191
|
+
saveConfig() {
|
|
192
|
+
var _a;
|
|
193
|
+
if (((_a = this._tempGroups) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
194
|
+
utils.ApplicationUtils.alert(this.getMessage("snkFormConfig.confirm.title"), this.getMessage("snkFormConfig.confirm.group"));
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const formConfig = this.buildConfigToSave();
|
|
194
198
|
this._formConfigChanged = false;
|
|
195
199
|
this._optionFormConfigChanged = false;
|
|
200
|
+
ConfigStorage.ConfigStorage.saveFormConfig(formConfig, this.configName)
|
|
201
|
+
.then((response) => {
|
|
202
|
+
if ((response === null || response === void 0 ? void 0 : response.resource) != undefined) {
|
|
203
|
+
utils.ApplicationUtils.info(this.getMessage("snkFormConfig.info.successfullyConfigSaved"), { iconName: "check" });
|
|
204
|
+
this.configChange.emit(formConfig);
|
|
205
|
+
}
|
|
206
|
+
});
|
|
196
207
|
}
|
|
197
208
|
applyOptionConfig() {
|
|
198
209
|
if (this._optionFormConfigChanged === true && this._optionFormConfigSelected != undefined) {
|
|
199
210
|
const name = this._optionFormConfigSelected.name || "configuração selecionada";
|
|
200
|
-
const origin = this._optionFormConfigSelected.origin ===
|
|
211
|
+
const origin = this._optionFormConfigSelected.origin === ConfigStorage.UserConfigType.DEFAULT ? "pessoal" : "padrão";
|
|
201
212
|
const msg = this.getMessage("snkFormConfig.confirm.apply").replace('{0}', name).replace('{1}', origin);
|
|
202
213
|
this.openConfirmDialog(msg).then((canCancel) => {
|
|
203
214
|
if (canCancel) {
|
|
@@ -246,12 +257,12 @@ const SnkFormConfig = class {
|
|
|
246
257
|
this.openConfirmDialog(this.getMessage("snkFormConfig.confirm.exit")).then((canClose) => {
|
|
247
258
|
if (canClose) {
|
|
248
259
|
this._formConfigChanged = false;
|
|
249
|
-
this.
|
|
260
|
+
this.configClose.emit();
|
|
250
261
|
}
|
|
251
262
|
});
|
|
252
263
|
}
|
|
253
264
|
else {
|
|
254
|
-
this.
|
|
265
|
+
this.configClose.emit();
|
|
255
266
|
}
|
|
256
267
|
}
|
|
257
268
|
openConfirmDialog(msg = "", title = this.getMessage("snkFormConfig.confirm.title")) {
|
|
@@ -455,15 +466,14 @@ const SnkFormConfig = class {
|
|
|
455
466
|
this._sortableGroup.on(constants.CONFIG_EVENTS.dragStop, (evt) => this.controlStopDraggingGroup(evt));
|
|
456
467
|
}
|
|
457
468
|
loadUserConfig() {
|
|
458
|
-
var _a;
|
|
459
469
|
if (this._application != undefined) {
|
|
460
|
-
this._application.fetchUserAvailableConfigs(
|
|
470
|
+
this._application.fetchUserAvailableConfigs(this.configName)
|
|
461
471
|
.then((userConfig) => {
|
|
462
472
|
this._formConfigOptions = userConfig;
|
|
463
473
|
let isDefault = this._formConfig != undefined ? this._formConfig.defaultConfiguration : true;
|
|
464
474
|
const selectedOption = userConfig
|
|
465
475
|
.find((config) => {
|
|
466
|
-
return config.origin === (isDefault ?
|
|
476
|
+
return config.origin === (isDefault ? ConfigStorage.UserConfigType.DEFAULT : ConfigStorage.UserConfigType.USER);
|
|
467
477
|
});
|
|
468
478
|
this.setFormConfig(selectedOption);
|
|
469
479
|
});
|
|
@@ -509,14 +519,13 @@ const SnkFormConfig = class {
|
|
|
509
519
|
}
|
|
510
520
|
}
|
|
511
521
|
loadConfigByUser() {
|
|
512
|
-
var _a;
|
|
513
522
|
if (this._application != undefined) {
|
|
514
523
|
const option = this._optionFormConfigSelected;
|
|
515
|
-
const fetchActionName = (option === null || option === void 0 ? void 0 : option.origin) ===
|
|
516
|
-
(option === null || option === void 0 ? void 0 : option.origin) ===
|
|
524
|
+
const fetchActionName = (option === null || option === void 0 ? void 0 : option.origin) === ConfigStorage.UserConfigType.DEFAULT ? "fetchDefaultConfig" :
|
|
525
|
+
(option === null || option === void 0 ? void 0 : option.origin) === ConfigStorage.UserConfigType.USER ? "fetchLegacyConfig" :
|
|
517
526
|
undefined;
|
|
518
527
|
if (fetchActionName != undefined) {
|
|
519
|
-
this._application[fetchActionName](
|
|
528
|
+
this._application[fetchActionName](this.configName)
|
|
520
529
|
.then((formConfig) => {
|
|
521
530
|
if (formConfig != undefined) {
|
|
522
531
|
this._formConfig = formConfig;
|
|
@@ -773,9 +782,6 @@ const SnkFormConfig = class {
|
|
|
773
782
|
this.onFilterChange(filterValue);
|
|
774
783
|
}
|
|
775
784
|
}
|
|
776
|
-
setShowFormConfig(value) {
|
|
777
|
-
this.parentForm.setShowFormConfig(value);
|
|
778
|
-
}
|
|
779
785
|
changeTabSelected(tabSelected) {
|
|
780
786
|
this._tabSelected = tabSelected.index;
|
|
781
787
|
const selectorTab = this._formContainer.querySelector("div#tab" + tabSelected.index);
|
|
@@ -941,7 +947,7 @@ const SnkFormConfig = class {
|
|
|
941
947
|
const configOptions = this._formConfigOptions.map((option) => {
|
|
942
948
|
return { value: option.origin, label: option.name };
|
|
943
949
|
});
|
|
944
|
-
return (index.h(index.Host, null, index.h("div", { class: "ez-row ez-padding--medium" }, index.h("div", { class: "ez-col ez-col--sd-7 ez-col--tb-9 ez-align--middle" }, index.h("ez-button", { mode: "icon", iconName: "arrow_back", class: "ez-padding--small", size: "small", onClick: () => this.closeFormConfig() }), index.h("h1", { class: "ez-title ez-title--extra-large ez-padding--small" }, this.getMessage("snkFormConfig.title")), index.h("ez-actions-button", { class: "form-config__actions-button ez-margin-left--medium", value: (_a = this._optionFormConfigSelected) === null || _a === void 0 ? void 0 : _a.origin, showLabel: true,
|
|
950
|
+
return (index.h(index.Host, null, index.h("div", { class: "ez-row ez-padding--medium" }, index.h("div", { class: "ez-col ez-col--sd-7 ez-col--tb-9 ez-align--middle" }, index.h("ez-button", { mode: "icon", iconName: "arrow_back", class: "ez-padding--small", size: "small", onClick: () => this.closeFormConfig() }), index.h("h1", { class: "ez-title ez-title--extra-large ez-padding--small" }, this.getMessage("snkFormConfig.title")), index.h("ez-actions-button", { class: "form-config__actions-button ez-margin-left--medium", value: (_a = this._optionFormConfigSelected) === null || _a === void 0 ? void 0 : _a.origin, showLabel: true, displayIcon: "chevron-down", checkOption: true, size: "small", actions: configOptions, onEzAction: (evt) => this.controlSelectFormConfig(evt) })), index.h("div", { class: "ez-col ez-col--sd-5 ez-col--tb-3 ez-align--middle ez-align--right" }, this._formConfigChanged === true && this._optionFormConfigChanged === false &&
|
|
945
951
|
index.h("div", { class: "ez-row ez-align--middle ez-align--right" }, index.h("ez-button", { label: "Cancelar", class: "ez-padding-left--medium", size: "small", onClick: () => this.cancelChangeConfig() }), index.h("ez-button", { label: "Salvar", class: "ez-button--primary ez-padding-left--medium", size: "small", onClick: () => this.saveConfig() }, index.h("ez-icon", { class: "ez-margin-right--small", slot: "leftIcon", iconName: "save" }))), this._optionFormConfigChanged === true &&
|
|
946
952
|
index.h("div", { class: "ez-row ez-align--middle ez-align--right" }, index.h("ez-button", { label: "Cancelar", class: "ez-padding-left--medium", size: "small", onClick: () => this.cancelChangeOptionConfig() }), index.h("ez-button", { label: this.getMessage("snkFormConfig.applyConfig"), class: "ez-button--primary ez-padding-left--medium", size: "small", onClick: () => this.applyOptionConfig() })))), index.h("div", { class: "ez-row ez-padding--medium", ref: ref => this._sortableContainer = ref }, index.h("div", { class: "form-config__tab-container ez-col ez-col--sd-9 ez-col--tb-9 ez-padding-right--medium" }, ((_b = this._layoutFormConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
|
947
953
|
index.h("section", { class: "ez-box__container", ref: ref => this._formContainer = ref }, index.h("snk-tab-config", { ref: ref => this._tabConfig = ref, selectedIndex: this._tabSelected, onEzTabChange: (ev) => this.changeTabSelected(ev.detail), onEzOrderChange: (ev) => this.changeTabOrder(ev.detail), onEditionTitleTab: (ev) => this.changeTabLabel(ev), onDeleteTab: (ev) => this.handleDeleteTab(ev), onHideTab: (ev) => this.changeHideTab(ev), onCanStartDrag: () => this.handleCanStartDragTab() }, this._layoutFormConfig.map((tab) => index.h("snk-tab", { tabKey: tab.tab || "Geral", label: tab.tab || this.getMessage("snkFormConfig.form.tabGeneral"), visible: tab.visible }))), this._layoutFormConfig.map((tab, indexTab) => index.h("div", { id: "tab" + indexTab, "data-draggable-parent": "group", class: this._tabSelected === indexTab
|
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const configurableElementsStorage = require('./configurableElementsStorage-93459c72.js');
|
|
8
7
|
const taskbarProcessor = require('./taskbar-processor-6bd0d35c.js');
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-c112de1d.js');
|
|
9
|
+
require('./_commonjsHelpers-537d719a.js');
|
|
9
10
|
|
|
10
11
|
const snkFormCss = ".sc-snk-form-h{display:block}.snk-form.sc-snk-form{position:relative;padding:var(--space--large);padding-top:var(--space--medium)}.snk-form__header.sc-snk-form{position:relative;padding-top:var(--space--medium);padding-bottom:var(--space--medium);margin-bottom:var(--space--medium)}.snk-form__header--fixed.sc-snk-form{position:sticky;top:0;background:var(--background--body);z-index:var(--more-visible, 2);padding-left:var(--space--large);padding-right:var(--space--large);margin-left:calc(var(--space--large) * -1);margin-right:calc(var(--space--large) * -1);width:calc(100% + (var(--space--large) * 2))}.snk-form__form--hidden.sc-snk-form{display:none}";
|
|
11
12
|
|
|
@@ -14,7 +15,6 @@ const SnkForm = class {
|
|
|
14
15
|
index.registerInstance(this, hostRef);
|
|
15
16
|
this.exit = index.createEvent(this, "exit", 7);
|
|
16
17
|
this.actionClick = index.createEvent(this, "actionClick", 7);
|
|
17
|
-
this.configChanged = index.createEvent(this, "configChanged", 7);
|
|
18
18
|
this._renderTimer = 500;
|
|
19
19
|
this._taskbarProcessor = new taskbarProcessor.TaskbarProcessor({
|
|
20
20
|
"snkForm.regular": ["PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "GRID_MODE", "CONFIGURATOR", "INSERT"],
|
|
@@ -25,21 +25,30 @@ const SnkForm = class {
|
|
|
25
25
|
this._showFormConfig = false;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* Método responsável em abrir
|
|
28
|
+
* Método responsável em abrir o modal de configurações do form.
|
|
29
29
|
*/
|
|
30
|
-
async
|
|
31
|
-
this._showFormConfig =
|
|
30
|
+
async showConfig() {
|
|
31
|
+
this._showFormConfig = true;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* Método responsável
|
|
34
|
+
* Método responsável em fechar o modal de configurações do form.
|
|
35
35
|
*/
|
|
36
|
-
async
|
|
37
|
-
this.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
async hideConfig() {
|
|
37
|
+
this._showFormConfig = false;
|
|
38
|
+
}
|
|
39
|
+
loadConfig() {
|
|
40
|
+
ConfigStorage.ConfigStorage.get()
|
|
41
|
+
.loadFormConfig(this.configName)
|
|
42
|
+
.then((config) => {
|
|
43
|
+
if (!this.setConfig(config)) {
|
|
44
|
+
this.loadInsertionConfig();
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
.catch((error) => {
|
|
48
|
+
console.warn(error);
|
|
49
|
+
});
|
|
41
50
|
}
|
|
42
|
-
|
|
51
|
+
setConfig(config) {
|
|
43
52
|
if ((config === null || config === void 0 ? void 0 : config.fields) == undefined) {
|
|
44
53
|
return false;
|
|
45
54
|
}
|
|
@@ -117,7 +126,13 @@ const SnkForm = class {
|
|
|
117
126
|
return ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectedRecords) ? this._dataState.selectedRecords[0] : undefined;
|
|
118
127
|
}
|
|
119
128
|
changeConfig(config) {
|
|
120
|
-
this.
|
|
129
|
+
this._editionFormConfig = {};
|
|
130
|
+
if (!this.setConfig(config)) {
|
|
131
|
+
this.loadInsertionConfig();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
closeConfig() {
|
|
135
|
+
this.hideConfig();
|
|
121
136
|
}
|
|
122
137
|
getDisabledButtons() {
|
|
123
138
|
const disabled = [];
|
|
@@ -129,9 +144,6 @@ const SnkForm = class {
|
|
|
129
144
|
}
|
|
130
145
|
return disabled;
|
|
131
146
|
}
|
|
132
|
-
componentDidRender() {
|
|
133
|
-
configurableElementsStorage.ConfigurableElementsStorage.setForm(this.configName, this._element);
|
|
134
|
-
}
|
|
135
147
|
componentWillLoad() {
|
|
136
148
|
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
137
149
|
let parent = this._element.parentElement;
|
|
@@ -156,6 +168,7 @@ const SnkForm = class {
|
|
|
156
168
|
}
|
|
157
169
|
parent = parent.parentElement;
|
|
158
170
|
}
|
|
171
|
+
this.loadConfig();
|
|
159
172
|
}
|
|
160
173
|
componentWillRender() {
|
|
161
174
|
var _a;
|
|
@@ -175,7 +188,7 @@ const SnkForm = class {
|
|
|
175
188
|
return undefined;
|
|
176
189
|
}
|
|
177
190
|
return (index.h("section", { class: "snk-form" }, index.h("div", { class: "snk-form__header snk-form__header--fixed ez-row" }, index.h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6", key: "formHeader" }, index.h("ez-button", { title: this.getMessage("snkForm.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small", onClick: () => this.exitForm() }), index.h("h1", { class: "ez-title ez-title--primary ez-title--xlarge ez-align--middle" }, this.getMessage("snkForm.title"))), index.h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6 ez-align--right" }, index.h("snk-taskbar", { key: "formTaskbar", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, primaryButton: ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", dataUnit: this._dataUnit }))), index.h("section", null, index.h("div", { class: "ez-row" }, index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("ez-form", { key: "ezForm" + this._snkDataUnit.entityName, dataUnit: this._dataUnit, config: this.getFormConfig(), recordsValidator: this.recordsValidator, class: this._showFormConfig ? 'snk-form__form--hidden' : '' }), this._showFormConfig &&
|
|
178
|
-
index.h("snk-form-config", { dataUnit: this._dataUnit, formConfig: this.getFormConfig(),
|
|
191
|
+
index.h("snk-form-config", { dataUnit: this._dataUnit, formConfig: this.getFormConfig(), configName: this.configName, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigClose: () => this.closeConfig() }))))));
|
|
179
192
|
}
|
|
180
193
|
get _element() { return index.getElement(this); }
|
|
181
194
|
};
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
6
|
const draggable_bundle = require('./draggable.bundle-82a25c06.js');
|
|
7
7
|
const core = require('@sankhyalabs/core');
|
|
8
|
-
const constants = require('./constants-
|
|
8
|
+
const constants = require('./constants-a47a5190.js');
|
|
9
9
|
require('./_commonjsHelpers-537d719a.js');
|
|
10
10
|
|
|
11
11
|
const snkTabConfigCss = "@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}.sc-snk-tab-config-h{--snk-tab-config--backward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--snk-tab-config--forward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');display:flex;position:relative;width:100%;overflow:hidden}.tab-config__scroll.sc-snk-tab-config{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.tab-config__scroll--start-hidden.sc-snk-tab-config{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.tab-config__scroll--middle.sc-snk-tab-config{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab-config__scroll--end-hidden.sc-snk-tab-config{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab-config__lower-bar.sc-snk-tab-config{position:absolute;left:0%;right:0%;top:91%;bottom:0%;border-radius:2px;background:var(--color--disable-primary);border:2px solid var(--color--disable-primary)}.tab-config__tab.sc-snk-tab-config{display:flex;border:none;background-color:unset;cursor:pointer;align-items:center;justify-content:center;min-width:fit-content;color:var(--text--primary, #626e82);font-family:var(--font-pattern, \"Roboto\");font-size:var(--title--small, 14px);padding:var(--space--small, 6px) var(--space--medium, 12px)}.tab-config__tab.sc-snk-tab-config:focus,.tab-config__forward-button.sc-snk-tab-config,.tab-config__backward-button.sc-snk-tab-config{outline:none}.tab-config__tab--is-active.sc-snk-tab-config{position:relative;color:var(--color--primary, #008561)}.tab-config__tab.sc-snk-tab-config:hover{color:var(--color--secondary, #383c45)}.tab-config__tab--is-active.sc-snk-tab-config:hover{color:var(--color--primary, #008561)}.tab-config__tab--is-active.sc-snk-tab-config::after{content:\"\";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.tab-config__tab--is-focused.sc-snk-tab-config{border:1px dashed var(--color--primary, #000000c5)}.tab-config__tab-label.sc-snk-tab-config{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.tab-config__forward-button.sc-snk-tab-config,.tab-config__backward-button.sc-snk-tab-config{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.tab-config__new-button.sc-snk-tab-config{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.tab-config__new-button.sc-snk-tab-config ez-icon.sc-snk-tab-config{--ez-icon--color:var(--color--secondary-700, #1C1D22)}.tab-config__backward-button.sc-snk-tab-config{left:0px;box-shadow:10px 10px 5px 5px white;background:white}.tab-config__forward-button.sc-snk-tab-config{box-shadow:10px 10px 5px 20px white;background:white}.tab-config__forward-button.sc-snk-tab-config::after,.tab-config__backward-button.sc-snk-tab-config::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.tab-config__forward-button.sc-snk-tab-config::after{-webkit-mask-image:var(--snk-tab-config--forward-icon);mask-image:var(--snk-tab-config--forward-icon)}.tab-config__backward-button.sc-snk-tab-config::after{-webkit-mask-image:var(--snk-tab-config--backward-icon);mask-image:var(--snk-tab-config--backward-icon)}.tab-config__forward-button.sc-snk-tab-config:hover::after,.tab-config__backward-button.sc-snk-tab-config:hover::after{background-color:var(--color--primary, #4e4e4e)}.tab-config__new-button.sc-snk-tab-config:hover ez-icon.sc-snk-tab-config{--ez-icon--color:var(--color--primary, #4e4e4e)}.tab-config__hidden.sc-snk-tab-config{display:none}.tab-config__scroll.sc-snk-tab-config::-webkit-scrollbar{display:none}.tab-config__left-icon.sc-snk-tab-config{padding-right:var(--space--small);--ez-icon--color:var(--text--disable)}.tab-config__left-icon--eye-off.sc-snk-tab-config{--ez-icon--color:var(--text--disable, #AFB6C0)}.tab-config__right-icon.sc-snk-tab-config{visibility:hidden;padding-left:var(--space--small)}.tab-config__tab.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{visibility:visible}.tab-config__tab--is-active.sc-snk-tab-config .tab-config__right-icon.sc-snk-tab-config{visibility:visible;--ez-icon--color:var(--color--primary)}.tab-config__tab.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{--ez-icon--color:var(--color--secondary, #383c45)}.tab-config__tab--is-active.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{--ez-icon--color:var(--color--primary)}.tab-config__actions-button.sc-snk-tab-config{--ez-actions-button__btn-action--min-width:100px;visibility:hidden;opacity:0;transition:visibility 1s linear,opacity 0.3s linear}.tab-config__tab.sc-snk-tab-config:hover .tab-config__actions-button.sc-snk-tab-config{visibility:visible;opacity:1;transition:visibility 0.2s linear, opacity 0.10s linear}[data-draggable-element].sc-snk-tab-config{cursor:grab}.tab-config__tab-label-disabled.sc-snk-tab-config{color:var(--text--disable, #AFB6C0)}.tab-config__slot.sc-snk-tab-config{margin-left:var(--space--small, 6px)}";
|
|
@@ -15,7 +15,6 @@ exports.TaskbarElement = void 0;
|
|
|
15
15
|
TaskbarElement["SAVE"] = "SAVE";
|
|
16
16
|
TaskbarElement["GRID_MODE"] = "GRID_MODE";
|
|
17
17
|
TaskbarElement["FORM_MODE"] = "FORM_MODE";
|
|
18
|
-
TaskbarElement["CONFIG_GRID"] = "CONFIG_GRID";
|
|
19
18
|
TaskbarElement["MORE_OPTIONS"] = "MORE_OPTIONS";
|
|
20
19
|
TaskbarElement["DIVIDER"] = "DIVIDER";
|
|
21
20
|
TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
|
|
@@ -26,11 +25,11 @@ exports.AuthorizationElements = void 0;
|
|
|
26
25
|
AuthorizationElements["CLONE"] = "CLONE";
|
|
27
26
|
AuthorizationElements["REMOVE"] = "REMOVE";
|
|
28
27
|
AuthorizationElements["INSERT"] = "INSERT";
|
|
29
|
-
AuthorizationElements["
|
|
28
|
+
AuthorizationElements["CONFIGURATOR"] = "CONFIGURATOR";
|
|
30
29
|
})(exports.AuthorizationElements || (exports.AuthorizationElements = {}));
|
|
31
30
|
exports.VisibleWhenForbidden = void 0;
|
|
32
31
|
(function (VisibleWhenForbidden) {
|
|
33
|
-
VisibleWhenForbidden["
|
|
32
|
+
VisibleWhenForbidden["CONFIGURATOR"] = "CONFIGURATOR";
|
|
34
33
|
})(exports.VisibleWhenForbidden || (exports.VisibleWhenForbidden = {}));
|
|
35
34
|
const buildCustomButton = (def, className, action, isEnabled) => {
|
|
36
35
|
const { hint, text, iconName } = def;
|
|
@@ -46,7 +45,7 @@ const buildCustomButton = (def, className, action, isEnabled) => {
|
|
|
46
45
|
return textButton(def.name, className, text, hint, action, isEnabled);
|
|
47
46
|
}
|
|
48
47
|
};
|
|
49
|
-
const buildElem = (element, className, getTitle, action, isEnabled, actions
|
|
48
|
+
const buildElem = (element, className, getTitle, action, isEnabled, actions) => {
|
|
50
49
|
const title = getTitle(element);
|
|
51
50
|
switch (element) {
|
|
52
51
|
case exports.TaskbarElement.PREVIOUS:
|
|
@@ -72,9 +71,9 @@ const buildElem = (element, className, getTitle, action, isEnabled, actions, con
|
|
|
72
71
|
case exports.TaskbarElement.FORM_MODE:
|
|
73
72
|
return iconButton("list", element, className, title, action, isEnabled);
|
|
74
73
|
case exports.TaskbarElement.CONFIGURATOR:
|
|
75
|
-
return
|
|
74
|
+
return iconButton("settings-inverted", element, className, title, action, isEnabled);
|
|
76
75
|
case exports.TaskbarElement.MORE_OPTIONS:
|
|
77
|
-
return
|
|
76
|
+
return actionButton(element, className, title, action, isEnabled, actions);
|
|
78
77
|
case exports.TaskbarElement.DIVIDER:
|
|
79
78
|
return index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-horizontal--medium", "data-taskbar-divider": true });
|
|
80
79
|
}
|
|
@@ -89,8 +88,10 @@ function iconTextButton(iconName, name, className, text, title, action, isEnable
|
|
|
89
88
|
return index.h("ez-button", { name: iconName, title: title, label: text, size: "small", class: className, enabled: isEnabled(name), onClick: () => action(name) },
|
|
90
89
|
index.h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
|
91
90
|
}
|
|
92
|
-
function
|
|
93
|
-
return
|
|
91
|
+
function actionButton(element, className, title, action, isEnabled, actions) {
|
|
92
|
+
return actions && actions.length > 0
|
|
93
|
+
? index.h("ez-actions-button", { title: title, size: "small", arrowActive: true, class: className, enabled: isEnabled(element), onEzAction: (evt) => action(evt.detail.value), actions: actions })
|
|
94
|
+
: undefined;
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
exports.buildCustomButton = buildCustomButton;
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
"entries": [
|
|
3
3
|
"./components/snk-filter-bar/filter-item/snk-filter-item.js",
|
|
4
4
|
"./components/snk-application/snk-application.js",
|
|
5
|
-
"./components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.js",
|
|
6
5
|
"./components/snk-data-unit/snk-data-unit.js",
|
|
7
6
|
"./components/snk-taskbar/snk-taskbar.js",
|
|
8
7
|
"./components/snk-filter-bar/filter-list/snk-filter-list.js",
|
|
8
|
+
"./components/snk-filter-bar/filter-modal/snk-filter-modal.js",
|
|
9
9
|
"./components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js",
|
|
10
10
|
"./components/snk-configurator/snk-configurator.js",
|
|
11
11
|
"./components/snk-crud/snk-crud.js",
|
|
12
|
-
"./components/snk-filter-bar/filter-modal/snk-filter-modal.js",
|
|
13
12
|
"./components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js",
|
|
14
13
|
"./components/snk-filter-bar/snk-filter-bar.js",
|
|
15
14
|
"./components/snk-filter-bar/filter-item/snk-filter-detail.js",
|
|
@@ -24,6 +23,8 @@
|
|
|
24
23
|
"./components/snk-form/subcomponents/snk-field-config/snk-field-config.js",
|
|
25
24
|
"./components/snk-form/subcomponents/snk-form-config/snk-form-config.js",
|
|
26
25
|
"./components/snk-grid/snk-grid.js",
|
|
26
|
+
"./components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js",
|
|
27
|
+
"./components/snk-grid/subcomponents/snk-select-box/snk-select-box.js",
|
|
27
28
|
"./components/snk-pesquisa/snk-pesquisa.js",
|
|
28
29
|
"./components/teste-pesquisa/teste-pesquisa.js"
|
|
29
30
|
],
|
|
@@ -8,6 +8,7 @@ import { PesquisaFetcher } from "../../lib/http/data-fetcher/fetchers/pesquisa-f
|
|
|
8
8
|
import { agGridLicense } from '../../lib/licenses/sankhyalicense.module';
|
|
9
9
|
import { TotalsFetcher } from "../../lib/http/data-fetcher/fetchers/totals-fetcher";
|
|
10
10
|
import { SnkMessageBuilder } from "../../lib/message/SnkMessageBuilder";
|
|
11
|
+
import { ConfigStorage } from "../../lib/configs/ConfigStorage";
|
|
11
12
|
import DataUnitFetcher from "../../lib/http/data-fetcher/fetchers/dataunit-fetcher";
|
|
12
13
|
import UrlUtils from "../../lib/utils/urlutils";
|
|
13
14
|
import Workspace from "../../lib/workspace/workspace";
|
|
@@ -196,7 +197,6 @@ export class SnkApplication {
|
|
|
196
197
|
}
|
|
197
198
|
/**
|
|
198
199
|
* Retorna a configuração de um recurso por service broker
|
|
199
|
-
* Veja também o método "loadConfig"
|
|
200
200
|
*/
|
|
201
201
|
async getConfig(key) {
|
|
202
202
|
let payload = {
|
|
@@ -588,6 +588,7 @@ export class SnkApplication {
|
|
|
588
588
|
});
|
|
589
589
|
}
|
|
590
590
|
ErrorTracking.init();
|
|
591
|
+
ConfigStorage.get();
|
|
591
592
|
this.getDefaultValues().then((defaultValues) => {
|
|
592
593
|
this._defaultValues = defaultValues;
|
|
593
594
|
});
|
|
@@ -962,7 +963,7 @@ export class SnkApplication {
|
|
|
962
963
|
"return": "Promise<any>"
|
|
963
964
|
},
|
|
964
965
|
"docs": {
|
|
965
|
-
"text": "Retorna a configura\u00E7\u00E3o de um recurso por service broker
|
|
966
|
+
"text": "Retorna a configura\u00E7\u00E3o de um recurso por service broker",
|
|
966
967
|
"tags": []
|
|
967
968
|
}
|
|
968
969
|
},
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
/*@doc Define o espaçamento utilizado à esquerda do botão de fechar do componente.*/
|
|
3
|
+
--snk-configurator__button-close--padding-left: var(--space--medium, 12px);
|
|
4
|
+
|
|
5
|
+
/*@doc Define a cor do texto utilizado para o titulo do componente.*/
|
|
6
|
+
--snk-configurator__title--color: var(--title--primary, #2B3A54);
|
|
7
|
+
|
|
8
|
+
/*@doc Define o estilo da fonte utilizada para o titulo do componente.*/
|
|
9
|
+
--snk-configurator__title--font-family: var(--font-pattern, "Roboto");
|
|
10
|
+
|
|
11
|
+
/*@doc Define o tamanho da fonte utilizada para o titulo do componente.*/
|
|
12
|
+
--snk-configurator__title--font-size: var(--title--large, 20px);
|
|
13
|
+
|
|
14
|
+
/*@doc Define o peso da fonte utilizada para o titulo do componente.*/
|
|
15
|
+
--snk-configurator__title--font-weight: var(--text-weight--extra-large, 700);
|
|
16
|
+
|
|
17
|
+
/*@doc Define a cor do texto utilizado para o subtitulo do componente.*/
|
|
18
|
+
--snk-configurator__subtitle--color: var(--title--primary, #2B3A54);
|
|
19
|
+
|
|
20
|
+
/*@doc Define o estilo da fonte utilizada para o subtitulo do componente.*/
|
|
21
|
+
--snk-configurator__subtitle--font-family: var(--font-pattern, "Roboto");
|
|
22
|
+
|
|
23
|
+
/*@doc Define o tamanho da fonte utilizada para o subtitulo do componente.*/
|
|
24
|
+
--snk-configurator__subtitle--font-size: var(--text--medium, 14px);
|
|
25
|
+
|
|
26
|
+
/*@doc Define o peso da fonte utilizada para o subtitulo do componente.*/
|
|
27
|
+
--snk-configurator__subtitle--font-weight: var(--text-weight--large, 600);
|
|
28
|
+
|
|
29
|
+
/*@doc Define o raio da borda da barra de rolagem do componente.*/
|
|
30
|
+
--snk-configurator__scrollbar--border-radius: var(--border--radius-small, 6px);
|
|
31
|
+
|
|
32
|
+
/*@doc Define a largura da barra de rolagem do componente.*/
|
|
33
|
+
--snk-configurator__scrollbar--width: var(--space--medium, 12px);
|
|
34
|
+
|
|
35
|
+
/*@doc Define a cor da barra de rolagem do componente.*/
|
|
36
|
+
--snk-configurator__scrollbar--background-color-primary: var(--scrollbar--primary, #2B3A54);
|
|
37
|
+
|
|
38
|
+
/*@doc Define a cor de fundo da barra de rolagem do componente.*/
|
|
39
|
+
--snk-configurator__scrollbar--background-color-secondary: var(--scrollbar--secondary, #E5EAF0);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.snk-configurator {
|
|
43
|
+
display: grid;
|
|
44
|
+
grid-template-rows: auto 1fr auto;
|
|
45
|
+
max-height: 100%;
|
|
46
|
+
width: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media screen and (min-width: 480px) {
|
|
50
|
+
.snk-configurator {
|
|
51
|
+
width: 359px;
|
|
52
|
+
max-width: 359px;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.snk-configurator__button-config {
|
|
57
|
+
--ez-button--min-width: 100%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.snk-configurator__header {
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: space-between;
|
|
63
|
+
align-items: center;
|
|
64
|
+
width: 100%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.snk-configurator__title {
|
|
68
|
+
display: flex;
|
|
69
|
+
margin: 0;
|
|
70
|
+
line-height: normal;
|
|
71
|
+
letter-spacing: 0em;
|
|
72
|
+
text-align: left;
|
|
73
|
+
|
|
74
|
+
/*public*/
|
|
75
|
+
color: var(--snk-configurator__title--color);
|
|
76
|
+
font-size: var(--snk-configurator__title--font-size);
|
|
77
|
+
font-family: var(--snk-configurator__title--font-family);
|
|
78
|
+
font-weight: var(--snk-configurator__title--font-weight);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.snk-configurator__subtitle {
|
|
82
|
+
display: flex;
|
|
83
|
+
margin: 0;
|
|
84
|
+
|
|
85
|
+
/*public*/
|
|
86
|
+
padding-top: var(--space--medium);
|
|
87
|
+
padding-bottom: var(--space--small);
|
|
88
|
+
color: var(--snk-configurator__subtitle--color);
|
|
89
|
+
font-size: var(--snk-configurator__subtitle--font-size);
|
|
90
|
+
font-family: var(--snk-configurator__subtitle--font-family);
|
|
91
|
+
font-weight: var(--snk-configurator__subtitle--font-weight);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.snk-configurator__button-close {
|
|
95
|
+
/*public*/
|
|
96
|
+
padding-left: var(--snk-configurator__button-close--padding-left);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.snk-configurator__main {
|
|
100
|
+
overflow-y: auto;
|
|
101
|
+
scrollbar-width: thin;
|
|
102
|
+
|
|
103
|
+
/*public*/
|
|
104
|
+
scrollbar-color: var(--snk-configurator__scrollbar--background-color-primary) var(--snk-configurator__scrollbar--background-color-secondary);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.snk-configurator__main::-webkit-scrollbar-track {
|
|
108
|
+
/*public*/
|
|
109
|
+
background-color: var(--snk-configurator__scrollbar--background-color-secondary);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.snk-configurator__main::-webkit-scrollbar-thumb {
|
|
113
|
+
/*public*/
|
|
114
|
+
background-color: var(--snk-configurator__scrollbar--background-color-primary);
|
|
115
|
+
border-radius: var(--snk-configurator__scrollbar--border-radius);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.snk-configurator__main::-webkit-scrollbar {
|
|
119
|
+
/*public*/
|
|
120
|
+
background-color: var(--snk-configurator__scrollbar--background-color-secondary);
|
|
121
|
+
width: var(--snk-configurator__scrollbar--width);
|
|
122
|
+
max-width: var(--snk-configurator__scrollbar--width);
|
|
123
|
+
min-width: var(--snk-configurator__scrollbar--width);
|
|
124
|
+
}
|