@sankhyalabs/sankhyablocks 2.4.9 → 2.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-c112de1d.js → ConfigStorage-91953f29.js} +6 -7
- package/dist/cjs/snk-application.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator_3.cjs.entry.js +12 -7
- package/dist/cjs/snk-exporter-email-sender_8.cjs.entry.js +16 -10
- package/dist/cjs/snk-filter-detail.cjs.entry.js +8 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-form.cjs.entry.js +14 -9
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js +7 -2
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +8 -1
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +8 -6
- package/dist/collection/components/snk-form/snk-form.js +13 -8
- package/dist/collection/components/snk-grid/snk-grid.js +11 -6
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +0 -15
- package/dist/collection/lib/configs/ConfigStorage.js +6 -7
- package/dist/collection/lib/index.js +1 -0
- package/dist/components/ConfigStorage.js +6 -7
- package/dist/components/snk-exporter-email-sender2.js +7 -2
- package/dist/components/snk-filter-detail2.js +8 -1
- package/dist/components/snk-filter-list2.js +8 -6
- package/dist/components/snk-form2.js +13 -8
- package/dist/components/snk-grid2.js +11 -6
- package/dist/components/snk-taskbar2.js +0 -1
- package/dist/esm/{ConfigStorage-99025655.js → ConfigStorage-b59461d8.js} +6 -7
- package/dist/esm/snk-application.entry.js +1 -1
- package/dist/esm/snk-configurator_3.entry.js +12 -7
- package/dist/esm/snk-exporter-email-sender_8.entry.js +16 -10
- package/dist/esm/snk-filter-detail.entry.js +8 -1
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-form.entry.js +14 -9
- package/dist/sankhyablocks/{p-9010ac54.entry.js → p-00b3c5d8.entry.js} +1 -1
- package/dist/sankhyablocks/p-12904475.entry.js +1 -0
- package/dist/sankhyablocks/{p-cd486089.entry.js → p-2664ae24.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6ba8f415.js → p-395b45a7.js} +1 -1
- package/dist/sankhyablocks/p-48bbbd2c.entry.js +1 -0
- package/dist/sankhyablocks/{p-1b7f87cf.entry.js → p-a3871147.entry.js} +1 -1
- package/dist/sankhyablocks/{p-df53643b.entry.js → p-dd6c6f3b.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +1 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +0 -4
- package/dist/types/components.d.ts +0 -4
- package/dist/types/lib/configs/ConfigStorage.d.ts +1 -1
- package/dist/types/lib/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-37f489d3.entry.js +0 -1
- package/dist/sankhyablocks/p-fb96840c.entry.js +0 -1
|
@@ -6927,17 +6927,16 @@ const CONFIG_SOURCE = {
|
|
|
6927
6927
|
grid: "grid"
|
|
6928
6928
|
};
|
|
6929
6929
|
class ConfigStorage {
|
|
6930
|
-
static get() {
|
|
6930
|
+
static async get() {
|
|
6931
6931
|
if (!ConfigStorage.instance) {
|
|
6932
6932
|
const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
6933
6933
|
if (application != undefined) {
|
|
6934
|
+
const configName = application.configName;
|
|
6935
|
+
const resourceID = await application.getResourceID();
|
|
6934
6936
|
ConfigStorage.instance = new ConfigStorage();
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
ConfigStorage.instance.loadFormConfig(configName);
|
|
6939
|
-
ConfigStorage.instance.loadGridConfig(configName);
|
|
6940
|
-
});
|
|
6937
|
+
ConfigStorage.resourceID = resourceID;
|
|
6938
|
+
ConfigStorage.instance.loadFormConfig(configName);
|
|
6939
|
+
ConfigStorage.instance.loadGridConfig(configName);
|
|
6941
6940
|
}
|
|
6942
6941
|
}
|
|
6943
6942
|
return this.instance;
|
|
@@ -4,7 +4,7 @@ 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 ConfigStorage = require('./ConfigStorage-
|
|
7
|
+
const ConfigStorage = require('./ConfigStorage-91953f29.js');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
9
|
const SnkMessageBuilder = require('./SnkMessageBuilder-370e23ae.js');
|
|
10
10
|
require('./_commonjsHelpers-537d719a.js');
|
|
@@ -7,7 +7,7 @@ const core = require('@sankhyalabs/core');
|
|
|
7
7
|
const constants = require('./constants-a47a5190.js');
|
|
8
8
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
|
9
9
|
const taskbarProcessor = require('./taskbar-processor-6f3d2a75.js');
|
|
10
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
10
|
+
const ConfigStorage = require('./ConfigStorage-91953f29.js');
|
|
11
11
|
const taskbarElements = require('./taskbar-elements-3807c809.js');
|
|
12
12
|
require('./_commonjsHelpers-537d719a.js');
|
|
13
13
|
|
|
@@ -246,13 +246,18 @@ const SnkGrid = class {
|
|
|
246
246
|
this._gridConfig = config;
|
|
247
247
|
}
|
|
248
248
|
loadConfig() {
|
|
249
|
+
if (this.configName == undefined) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
249
252
|
ConfigStorage.ConfigStorage.get()
|
|
250
|
-
.
|
|
251
|
-
.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
253
|
+
.then((instance) => {
|
|
254
|
+
instance.loadGridConfig(this.configName)
|
|
255
|
+
.then((config) => {
|
|
256
|
+
this.setGridConfig(config);
|
|
257
|
+
})
|
|
258
|
+
.catch((error) => {
|
|
259
|
+
console.warn(error);
|
|
260
|
+
});
|
|
256
261
|
});
|
|
257
262
|
}
|
|
258
263
|
saveConfig(config) {
|
|
@@ -8,7 +8,7 @@ const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
|
8
8
|
const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
|
|
9
9
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
10
10
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
11
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
11
|
+
const ConfigStorage = require('./ConfigStorage-91953f29.js');
|
|
12
12
|
const constants = require('./constants-a47a5190.js');
|
|
13
13
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
|
14
14
|
const taskbarElements = require('./taskbar-elements-3807c809.js');
|
|
@@ -62,7 +62,8 @@ const SnkExporterEmailSender = class {
|
|
|
62
62
|
secondButton: "snkExporter.emailSenderSendButton",
|
|
63
63
|
firstButtonAction: () => this.changeStep(0),
|
|
64
64
|
secondButtonAction: () => this.send(),
|
|
65
|
-
secondButtonEnabledTester: () => this.isFilled()
|
|
65
|
+
secondButtonEnabledTester: () => this.isFilled(),
|
|
66
|
+
secondButtonClass: "ez-button--primary"
|
|
66
67
|
}
|
|
67
68
|
];
|
|
68
69
|
this._opened = false;
|
|
@@ -115,13 +116,17 @@ const SnkExporterEmailSender = class {
|
|
|
115
116
|
updateConfigInfo(field, value) {
|
|
116
117
|
this._config = Object.assign(Object.assign({}, this._config), { [field]: value });
|
|
117
118
|
}
|
|
119
|
+
getSecondButtonClass() {
|
|
120
|
+
const stepInfo = this._stepInfo[this._currentStep] || {};
|
|
121
|
+
return stepInfo["secondButtonClass"] || "ez-button--secondary";
|
|
122
|
+
}
|
|
118
123
|
render() {
|
|
119
124
|
var _a;
|
|
120
125
|
core.ElementIDUtils.addIDInfoIfNotExists(this._element, 'snkExporterEmailSender');
|
|
121
126
|
return (index.h("ez-popup", { useHeader: false, size: "x-small", heightMode: "auto", opened: this._opened }, index.h("ez-modal-container", { onEzModalAction: evt => {
|
|
122
127
|
if (evt.detail === "CLOSE")
|
|
123
128
|
this.close();
|
|
124
|
-
}, modalTitle: this.getMessage("snkExporter.emailSenderTitle"), modalSubTitle: this.getStepMessage("subTitle") }, index.h("ez-view-stack", { ref: ref => this._viewStack = ref }, index.h("stack-item", null, index.h(OptionsStep, { getMessage: this.getMessage, data: this._config, changeInfo: (field, value) => this.updateConfigInfo(field, value) })), index.h("stack-item", null, index.h(EmailInfoStep, { getMessage: this.getMessage, data: (_a = this._config) === null || _a === void 0 ? void 0 : _a.email, changeInfo: (field, value) => this.updateEmailInfo(field, value) }))), index.h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, index.h("ez-button", Object.assign({ class: "ez-button--tertiary ez-padding-right--medium", label: this.getStepMessage("firstButton"), onClick: () => this.executeButtonAction(true), enabled: this.checkButtonEnabled(true) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("firstButton")}` })), index.h("ez-button", Object.assign({ class:
|
|
129
|
+
}, modalTitle: this.getMessage("snkExporter.emailSenderTitle"), modalSubTitle: this.getStepMessage("subTitle") }, index.h("ez-view-stack", { ref: ref => this._viewStack = ref }, index.h("stack-item", null, index.h(OptionsStep, { getMessage: this.getMessage, data: this._config, changeInfo: (field, value) => this.updateConfigInfo(field, value) })), index.h("stack-item", null, index.h(EmailInfoStep, { getMessage: this.getMessage, data: (_a = this._config) === null || _a === void 0 ? void 0 : _a.email, changeInfo: (field, value) => this.updateEmailInfo(field, value) }))), index.h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, index.h("ez-button", Object.assign({ class: "ez-button--tertiary ez-padding-right--medium", label: this.getStepMessage("firstButton"), onClick: () => this.executeButtonAction(true), enabled: this.checkButtonEnabled(true) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("firstButton")}` })), index.h("ez-button", Object.assign({ class: this.getSecondButtonClass(), label: this.getStepMessage("secondButton"), onClick: () => this.executeButtonAction(false), enabled: this.checkButtonEnabled(false) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("secondButton")}` }))))));
|
|
125
130
|
}
|
|
126
131
|
get _element() { return index.getElement(this); }
|
|
127
132
|
};
|
|
@@ -846,15 +851,17 @@ const SnkFilterList = class {
|
|
|
846
851
|
this._popover.remove();
|
|
847
852
|
}
|
|
848
853
|
}
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
}
|
|
854
|
+
}
|
|
855
|
+
buildIdElement(buttonElement, name) {
|
|
856
|
+
if (!buttonElement)
|
|
857
|
+
return;
|
|
858
|
+
const dataElement = { id: name };
|
|
859
|
+
buttonElement.removeAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
|
860
|
+
core.ElementIDUtils.addIDInfoIfNotExists(buttonElement, "filterItemList", dataElement);
|
|
854
861
|
}
|
|
855
862
|
buildItemElement(item) {
|
|
856
863
|
const itemId = ++this._selectableItemsCount;
|
|
857
|
-
return (index.h("button", { id: `filter-item${itemId}`, onFocusin: () => this._preselection = itemId, class: `ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item`, onClick: () => this.itemSelected(item.name), name: item.label, key: itemId }, item.iconName ? index.h("ez-icon", { iconName: item.iconName, size: "small", class: `ez-padding-right--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__icon ${item.iconClass || ""}` }) : undefined, index.h("div", { class: `ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__label ${item.labelClass || ""}` }, item.label)));
|
|
864
|
+
return (index.h("button", { ref: elem => elem && this.buildIdElement(elem, item.label), id: `filter-item${itemId}`, onFocusin: () => this._preselection = itemId, class: `ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item`, onClick: () => this.itemSelected(item.name), name: item.label, key: itemId }, item.iconName ? index.h("ez-icon", { iconName: item.iconName, size: "small", class: `ez-padding-right--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__icon ${item.iconClass || ""}` }) : undefined, index.h("div", { class: `ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__label ${item.labelClass || ""}` }, item.label)));
|
|
858
865
|
}
|
|
859
866
|
itemSelected(itemName) {
|
|
860
867
|
if (itemName === SHOW_MORE_ITEM_NAME) {
|
|
@@ -1474,7 +1481,6 @@ const SnkTaskbar = class {
|
|
|
1474
1481
|
constructor(hostRef) {
|
|
1475
1482
|
index.registerInstance(this, hostRef);
|
|
1476
1483
|
this.actionClick = index.createEvent(this, "actionClick", 7);
|
|
1477
|
-
this.actionChange = index.createEvent(this, "actionChange", 7);
|
|
1478
1484
|
this._titleKeyByElement = {
|
|
1479
1485
|
[taskbarElements.TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
|
1480
1486
|
[taskbarElements.TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
|
|
@@ -58,7 +58,14 @@ const SnkFilterDetail = class {
|
|
|
58
58
|
]);
|
|
59
59
|
}
|
|
60
60
|
buildIcon(title, iconName, action) {
|
|
61
|
-
return (index.h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button" }, index.h("ez-icon", { title: title, iconName: iconName })));
|
|
61
|
+
return (index.h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", ref: elem => elem && this.buildIdButton(elem, title) }, index.h("ez-icon", Object.assign({ title: title, iconName: iconName }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo(`_${title}`)}` }))));
|
|
62
|
+
}
|
|
63
|
+
buildIdButton(buttonElement, title) {
|
|
64
|
+
if (!buttonElement)
|
|
65
|
+
return;
|
|
66
|
+
const dataElement = { id: title };
|
|
67
|
+
buttonElement.removeAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
|
68
|
+
core.ElementIDUtils.addIDInfoIfNotExists(buttonElement, "button", dataElement);
|
|
62
69
|
}
|
|
63
70
|
getNormalizedValue(params, value) {
|
|
64
71
|
return params.reduce((arrayValues, currentParam, index) => {
|
|
@@ -7,7 +7,7 @@ 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
9
|
const constants = require('./constants-a47a5190.js');
|
|
10
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
10
|
+
const ConfigStorage = require('./ConfigStorage-91953f29.js');
|
|
11
11
|
require('./_commonjsHelpers-537d719a.js');
|
|
12
12
|
|
|
13
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))}}";
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const taskbarProcessor = require('./taskbar-processor-6f3d2a75.js');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-91953f29.js');
|
|
9
9
|
require('./_commonjsHelpers-537d719a.js');
|
|
10
10
|
|
|
11
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}";
|
|
@@ -37,15 +37,20 @@ const SnkForm = class {
|
|
|
37
37
|
this._showFormConfig = false;
|
|
38
38
|
}
|
|
39
39
|
loadConfig() {
|
|
40
|
+
if (this.configName == undefined) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
40
43
|
ConfigStorage.ConfigStorage.get()
|
|
41
|
-
.
|
|
42
|
-
.
|
|
43
|
-
|
|
44
|
-
this.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
.then((instance) => {
|
|
45
|
+
instance.loadFormConfig(this.configName)
|
|
46
|
+
.then((config) => {
|
|
47
|
+
if (!this.setConfig(config)) {
|
|
48
|
+
this.loadInsertionConfig();
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
.catch((error) => {
|
|
52
|
+
console.warn(error);
|
|
53
|
+
});
|
|
49
54
|
});
|
|
50
55
|
}
|
|
51
56
|
setConfig(config) {
|
|
@@ -18,7 +18,8 @@ export class SnkExporterEmailSender {
|
|
|
18
18
|
secondButton: "snkExporter.emailSenderSendButton",
|
|
19
19
|
firstButtonAction: () => this.changeStep(0),
|
|
20
20
|
secondButtonAction: () => this.send(),
|
|
21
|
-
secondButtonEnabledTester: () => this.isFilled()
|
|
21
|
+
secondButtonEnabledTester: () => this.isFilled(),
|
|
22
|
+
secondButtonClass: "ez-button--primary"
|
|
22
23
|
}
|
|
23
24
|
];
|
|
24
25
|
this._opened = false;
|
|
@@ -71,13 +72,17 @@ export class SnkExporterEmailSender {
|
|
|
71
72
|
updateConfigInfo(field, value) {
|
|
72
73
|
this._config = Object.assign(Object.assign({}, this._config), { [field]: value });
|
|
73
74
|
}
|
|
75
|
+
getSecondButtonClass() {
|
|
76
|
+
const stepInfo = this._stepInfo[this._currentStep] || {};
|
|
77
|
+
return stepInfo["secondButtonClass"] || "ez-button--secondary";
|
|
78
|
+
}
|
|
74
79
|
render() {
|
|
75
80
|
var _a;
|
|
76
81
|
ElementIDUtils.addIDInfoIfNotExists(this._element, 'snkExporterEmailSender');
|
|
77
82
|
return (h("ez-popup", { useHeader: false, size: "x-small", heightMode: "auto", opened: this._opened }, h("ez-modal-container", { onEzModalAction: evt => {
|
|
78
83
|
if (evt.detail === "CLOSE")
|
|
79
84
|
this.close();
|
|
80
|
-
}, modalTitle: this.getMessage("snkExporter.emailSenderTitle"), modalSubTitle: this.getStepMessage("subTitle") }, h("ez-view-stack", { ref: ref => this._viewStack = ref }, h("stack-item", null, h(OptionsStep, { getMessage: this.getMessage, data: this._config, changeInfo: (field, value) => this.updateConfigInfo(field, value) })), h("stack-item", null, h(EmailInfoStep, { getMessage: this.getMessage, data: (_a = this._config) === null || _a === void 0 ? void 0 : _a.email, changeInfo: (field, value) => this.updateEmailInfo(field, value) }))), h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, h("ez-button", Object.assign({ class: "ez-button--tertiary ez-padding-right--medium", label: this.getStepMessage("firstButton"), onClick: () => this.executeButtonAction(true), enabled: this.checkButtonEnabled(true) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("firstButton")}` })), h("ez-button", Object.assign({ class:
|
|
85
|
+
}, modalTitle: this.getMessage("snkExporter.emailSenderTitle"), modalSubTitle: this.getStepMessage("subTitle") }, h("ez-view-stack", { ref: ref => this._viewStack = ref }, h("stack-item", null, h(OptionsStep, { getMessage: this.getMessage, data: this._config, changeInfo: (field, value) => this.updateConfigInfo(field, value) })), h("stack-item", null, h(EmailInfoStep, { getMessage: this.getMessage, data: (_a = this._config) === null || _a === void 0 ? void 0 : _a.email, changeInfo: (field, value) => this.updateEmailInfo(field, value) }))), h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, h("ez-button", Object.assign({ class: "ez-button--tertiary ez-padding-right--medium", label: this.getStepMessage("firstButton"), onClick: () => this.executeButtonAction(true), enabled: this.checkButtonEnabled(true) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("firstButton")}` })), h("ez-button", Object.assign({ class: this.getSecondButtonClass(), label: this.getStepMessage("secondButton"), onClick: () => this.executeButtonAction(false), enabled: this.checkButtonEnabled(false) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("secondButton")}` }))))));
|
|
81
86
|
}
|
|
82
87
|
static get is() { return "snk-exporter-email-sender"; }
|
|
83
88
|
static get properties() {
|
|
@@ -49,7 +49,14 @@ export class SnkFilterDetail {
|
|
|
49
49
|
]);
|
|
50
50
|
}
|
|
51
51
|
buildIcon(title, iconName, action) {
|
|
52
|
-
return (h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button" }, h("ez-icon", { title: title, iconName: iconName })));
|
|
52
|
+
return (h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", ref: elem => elem && this.buildIdButton(elem, title) }, h("ez-icon", Object.assign({ title: title, iconName: iconName }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`_${title}`)}` }))));
|
|
53
|
+
}
|
|
54
|
+
buildIdButton(buttonElement, title) {
|
|
55
|
+
if (!buttonElement)
|
|
56
|
+
return;
|
|
57
|
+
const dataElement = { id: title };
|
|
58
|
+
buttonElement.removeAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
|
59
|
+
ElementIDUtils.addIDInfoIfNotExists(buttonElement, "button", dataElement);
|
|
53
60
|
}
|
|
54
61
|
getNormalizedValue(params, value) {
|
|
55
62
|
return params.reduce((arrayValues, currentParam, index) => {
|
|
@@ -57,15 +57,17 @@ export class SnkFilterList {
|
|
|
57
57
|
this._popover.remove();
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
60
|
+
}
|
|
61
|
+
buildIdElement(buttonElement, name) {
|
|
62
|
+
if (!buttonElement)
|
|
63
|
+
return;
|
|
64
|
+
const dataElement = { id: name };
|
|
65
|
+
buttonElement.removeAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
|
66
|
+
ElementIDUtils.addIDInfoIfNotExists(buttonElement, "filterItemList", dataElement);
|
|
65
67
|
}
|
|
66
68
|
buildItemElement(item) {
|
|
67
69
|
const itemId = ++this._selectableItemsCount;
|
|
68
|
-
return (h("button", { id: `filter-item${itemId}`, onFocusin: () => this._preselection = itemId, class: `ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item`, onClick: () => this.itemSelected(item.name), name: item.label, key: itemId }, item.iconName ? h("ez-icon", { iconName: item.iconName, size: "small", class: `ez-padding-right--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__icon ${item.iconClass || ""}` }) : undefined, h("div", { class: `ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__label ${item.labelClass || ""}` }, item.label)));
|
|
70
|
+
return (h("button", { ref: elem => elem && this.buildIdElement(elem, item.label), id: `filter-item${itemId}`, onFocusin: () => this._preselection = itemId, class: `ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item`, onClick: () => this.itemSelected(item.name), name: item.label, key: itemId }, item.iconName ? h("ez-icon", { iconName: item.iconName, size: "small", class: `ez-padding-right--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__icon ${item.iconClass || ""}` }) : undefined, h("div", { class: `ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__label ${item.labelClass || ""}` }, item.label)));
|
|
69
71
|
}
|
|
70
72
|
itemSelected(itemName) {
|
|
71
73
|
if (itemName === SHOW_MORE_ITEM_NAME) {
|
|
@@ -26,15 +26,20 @@ export class SnkForm {
|
|
|
26
26
|
this._showFormConfig = false;
|
|
27
27
|
}
|
|
28
28
|
loadConfig() {
|
|
29
|
+
if (this.configName == undefined) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
29
32
|
ConfigStorage.get()
|
|
30
|
-
.
|
|
31
|
-
.
|
|
32
|
-
|
|
33
|
-
this.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
.then((instance) => {
|
|
34
|
+
instance.loadFormConfig(this.configName)
|
|
35
|
+
.then((config) => {
|
|
36
|
+
if (!this.setConfig(config)) {
|
|
37
|
+
this.loadInsertionConfig();
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
.catch((error) => {
|
|
41
|
+
console.warn(error);
|
|
42
|
+
});
|
|
38
43
|
});
|
|
39
44
|
}
|
|
40
45
|
setConfig(config) {
|
|
@@ -88,13 +88,18 @@ export class SnkGrid {
|
|
|
88
88
|
this._gridConfig = config;
|
|
89
89
|
}
|
|
90
90
|
loadConfig() {
|
|
91
|
+
if (this.configName == undefined) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
91
94
|
ConfigStorage.get()
|
|
92
|
-
.
|
|
93
|
-
.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
.then((instance) => {
|
|
96
|
+
instance.loadGridConfig(this.configName)
|
|
97
|
+
.then((config) => {
|
|
98
|
+
this.setGridConfig(config);
|
|
99
|
+
})
|
|
100
|
+
.catch((error) => {
|
|
101
|
+
console.warn(error);
|
|
102
|
+
});
|
|
98
103
|
});
|
|
99
104
|
}
|
|
100
105
|
saveConfig(config) {
|
|
@@ -351,21 +351,6 @@ export class SnkTaskbar {
|
|
|
351
351
|
"resolved": "string",
|
|
352
352
|
"references": {}
|
|
353
353
|
}
|
|
354
|
-
}, {
|
|
355
|
-
"method": "actionChange",
|
|
356
|
-
"name": "actionChange",
|
|
357
|
-
"bubbles": true,
|
|
358
|
-
"cancelable": true,
|
|
359
|
-
"composed": true,
|
|
360
|
-
"docs": {
|
|
361
|
-
"tags": [],
|
|
362
|
-
"text": "Emitido sempre que houver altera\u00E7\u00E3o em algum elemento aberto pelo bot\u00E3o de a\u00E7\u00E3o."
|
|
363
|
-
},
|
|
364
|
-
"complexType": {
|
|
365
|
-
"original": "any",
|
|
366
|
-
"resolved": "any",
|
|
367
|
-
"references": {}
|
|
368
|
-
}
|
|
369
354
|
}];
|
|
370
355
|
}
|
|
371
356
|
static get elementRef() { return "_element"; }
|
|
@@ -6,17 +6,16 @@ const CONFIG_SOURCE = {
|
|
|
6
6
|
grid: "grid"
|
|
7
7
|
};
|
|
8
8
|
export class ConfigStorage {
|
|
9
|
-
static get() {
|
|
9
|
+
static async get() {
|
|
10
10
|
if (!ConfigStorage.instance) {
|
|
11
11
|
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
12
12
|
if (application != undefined) {
|
|
13
|
+
const configName = application.configName;
|
|
14
|
+
const resourceID = await application.getResourceID();
|
|
13
15
|
ConfigStorage.instance = new ConfigStorage();
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
ConfigStorage.instance.loadFormConfig(configName);
|
|
18
|
-
ConfigStorage.instance.loadGridConfig(configName);
|
|
19
|
-
});
|
|
16
|
+
ConfigStorage.resourceID = resourceID;
|
|
17
|
+
ConfigStorage.instance.loadFormConfig(configName);
|
|
18
|
+
ConfigStorage.instance.loadGridConfig(configName);
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
21
|
return this.instance;
|
|
@@ -6925,17 +6925,16 @@ const CONFIG_SOURCE = {
|
|
|
6925
6925
|
grid: "grid"
|
|
6926
6926
|
};
|
|
6927
6927
|
class ConfigStorage {
|
|
6928
|
-
static get() {
|
|
6928
|
+
static async get() {
|
|
6929
6929
|
if (!ConfigStorage.instance) {
|
|
6930
6930
|
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
6931
6931
|
if (application != undefined) {
|
|
6932
|
+
const configName = application.configName;
|
|
6933
|
+
const resourceID = await application.getResourceID();
|
|
6932
6934
|
ConfigStorage.instance = new ConfigStorage();
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
ConfigStorage.instance.loadFormConfig(configName);
|
|
6937
|
-
ConfigStorage.instance.loadGridConfig(configName);
|
|
6938
|
-
});
|
|
6935
|
+
ConfigStorage.resourceID = resourceID;
|
|
6936
|
+
ConfigStorage.instance.loadFormConfig(configName);
|
|
6937
|
+
ConfigStorage.instance.loadGridConfig(configName);
|
|
6939
6938
|
}
|
|
6940
6939
|
}
|
|
6941
6940
|
return this.instance;
|
|
@@ -50,7 +50,8 @@ const SnkExporterEmailSender = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
|
50
50
|
secondButton: "snkExporter.emailSenderSendButton",
|
|
51
51
|
firstButtonAction: () => this.changeStep(0),
|
|
52
52
|
secondButtonAction: () => this.send(),
|
|
53
|
-
secondButtonEnabledTester: () => this.isFilled()
|
|
53
|
+
secondButtonEnabledTester: () => this.isFilled(),
|
|
54
|
+
secondButtonClass: "ez-button--primary"
|
|
54
55
|
}
|
|
55
56
|
];
|
|
56
57
|
this._opened = false;
|
|
@@ -103,13 +104,17 @@ const SnkExporterEmailSender = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
|
103
104
|
updateConfigInfo(field, value) {
|
|
104
105
|
this._config = Object.assign(Object.assign({}, this._config), { [field]: value });
|
|
105
106
|
}
|
|
107
|
+
getSecondButtonClass() {
|
|
108
|
+
const stepInfo = this._stepInfo[this._currentStep] || {};
|
|
109
|
+
return stepInfo["secondButtonClass"] || "ez-button--secondary";
|
|
110
|
+
}
|
|
106
111
|
render() {
|
|
107
112
|
var _a;
|
|
108
113
|
ElementIDUtils.addIDInfoIfNotExists(this._element, 'snkExporterEmailSender');
|
|
109
114
|
return (h("ez-popup", { useHeader: false, size: "x-small", heightMode: "auto", opened: this._opened }, h("ez-modal-container", { onEzModalAction: evt => {
|
|
110
115
|
if (evt.detail === "CLOSE")
|
|
111
116
|
this.close();
|
|
112
|
-
}, modalTitle: this.getMessage("snkExporter.emailSenderTitle"), modalSubTitle: this.getStepMessage("subTitle") }, h("ez-view-stack", { ref: ref => this._viewStack = ref }, h("stack-item", null, h(OptionsStep, { getMessage: this.getMessage, data: this._config, changeInfo: (field, value) => this.updateConfigInfo(field, value) })), h("stack-item", null, h(EmailInfoStep, { getMessage: this.getMessage, data: (_a = this._config) === null || _a === void 0 ? void 0 : _a.email, changeInfo: (field, value) => this.updateEmailInfo(field, value) }))), h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, h("ez-button", Object.assign({ class: "ez-button--tertiary ez-padding-right--medium", label: this.getStepMessage("firstButton"), onClick: () => this.executeButtonAction(true), enabled: this.checkButtonEnabled(true) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("firstButton")}` })), h("ez-button", Object.assign({ class:
|
|
117
|
+
}, modalTitle: this.getMessage("snkExporter.emailSenderTitle"), modalSubTitle: this.getStepMessage("subTitle") }, h("ez-view-stack", { ref: ref => this._viewStack = ref }, h("stack-item", null, h(OptionsStep, { getMessage: this.getMessage, data: this._config, changeInfo: (field, value) => this.updateConfigInfo(field, value) })), h("stack-item", null, h(EmailInfoStep, { getMessage: this.getMessage, data: (_a = this._config) === null || _a === void 0 ? void 0 : _a.email, changeInfo: (field, value) => this.updateEmailInfo(field, value) }))), h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, h("ez-button", Object.assign({ class: "ez-button--tertiary ez-padding-right--medium", label: this.getStepMessage("firstButton"), onClick: () => this.executeButtonAction(true), enabled: this.checkButtonEnabled(true) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("firstButton")}` })), h("ez-button", Object.assign({ class: this.getSecondButtonClass(), label: this.getStepMessage("secondButton"), onClick: () => this.executeButtonAction(false), enabled: this.checkButtonEnabled(false) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("secondButton")}` }))))));
|
|
113
118
|
}
|
|
114
119
|
get _element() { return this; }
|
|
115
120
|
}, [0, "snk-exporter-email-sender", {
|
|
@@ -55,7 +55,14 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
55
55
|
]);
|
|
56
56
|
}
|
|
57
57
|
buildIcon(title, iconName, action) {
|
|
58
|
-
return (h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button" }, h("ez-icon", { title: title, iconName: iconName })));
|
|
58
|
+
return (h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", ref: elem => elem && this.buildIdButton(elem, title) }, h("ez-icon", Object.assign({ title: title, iconName: iconName }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`_${title}`)}` }))));
|
|
59
|
+
}
|
|
60
|
+
buildIdButton(buttonElement, title) {
|
|
61
|
+
if (!buttonElement)
|
|
62
|
+
return;
|
|
63
|
+
const dataElement = { id: title };
|
|
64
|
+
buttonElement.removeAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
|
65
|
+
ElementIDUtils.addIDInfoIfNotExists(buttonElement, "button", dataElement);
|
|
59
66
|
}
|
|
60
67
|
getNormalizedValue(params, value) {
|
|
61
68
|
return params.reduce((arrayValues, currentParam, index) => {
|
|
@@ -61,15 +61,17 @@ const SnkFilterList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
61
61
|
this._popover.remove();
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
64
|
+
}
|
|
65
|
+
buildIdElement(buttonElement, name) {
|
|
66
|
+
if (!buttonElement)
|
|
67
|
+
return;
|
|
68
|
+
const dataElement = { id: name };
|
|
69
|
+
buttonElement.removeAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
|
70
|
+
ElementIDUtils.addIDInfoIfNotExists(buttonElement, "filterItemList", dataElement);
|
|
69
71
|
}
|
|
70
72
|
buildItemElement(item) {
|
|
71
73
|
const itemId = ++this._selectableItemsCount;
|
|
72
|
-
return (h("button", { id: `filter-item${itemId}`, onFocusin: () => this._preselection = itemId, class: `ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item`, onClick: () => this.itemSelected(item.name), name: item.label, key: itemId }, item.iconName ? h("ez-icon", { iconName: item.iconName, size: "small", class: `ez-padding-right--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__icon ${item.iconClass || ""}` }) : undefined, h("div", { class: `ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__label ${item.labelClass || ""}` }, item.label)));
|
|
74
|
+
return (h("button", { ref: elem => elem && this.buildIdElement(elem, item.label), id: `filter-item${itemId}`, onFocusin: () => this._preselection = itemId, class: `ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item`, onClick: () => this.itemSelected(item.name), name: item.label, key: itemId }, item.iconName ? h("ez-icon", { iconName: item.iconName, size: "small", class: `ez-padding-right--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__icon ${item.iconClass || ""}` }) : undefined, h("div", { class: `ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__label ${item.labelClass || ""}` }, item.label)));
|
|
73
75
|
}
|
|
74
76
|
itemSelected(itemName) {
|
|
75
77
|
if (itemName === SHOW_MORE_ITEM_NAME) {
|
|
@@ -38,15 +38,20 @@ const SnkForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
38
38
|
this._showFormConfig = false;
|
|
39
39
|
}
|
|
40
40
|
loadConfig() {
|
|
41
|
+
if (this.configName == undefined) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
41
44
|
ConfigStorage.get()
|
|
42
|
-
.
|
|
43
|
-
.
|
|
44
|
-
|
|
45
|
-
this.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
.then((instance) => {
|
|
46
|
+
instance.loadFormConfig(this.configName)
|
|
47
|
+
.then((config) => {
|
|
48
|
+
if (!this.setConfig(config)) {
|
|
49
|
+
this.loadInsertionConfig();
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
.catch((error) => {
|
|
53
|
+
console.warn(error);
|
|
54
|
+
});
|
|
50
55
|
});
|
|
51
56
|
}
|
|
52
57
|
setConfig(config) {
|
|
@@ -103,13 +103,18 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
103
103
|
this._gridConfig = config;
|
|
104
104
|
}
|
|
105
105
|
loadConfig() {
|
|
106
|
+
if (this.configName == undefined) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
106
109
|
ConfigStorage.get()
|
|
107
|
-
.
|
|
108
|
-
.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
.then((instance) => {
|
|
111
|
+
instance.loadGridConfig(this.configName)
|
|
112
|
+
.then((config) => {
|
|
113
|
+
this.setGridConfig(config);
|
|
114
|
+
})
|
|
115
|
+
.catch((error) => {
|
|
116
|
+
console.warn(error);
|
|
117
|
+
});
|
|
113
118
|
});
|
|
114
119
|
}
|
|
115
120
|
saveConfig(config) {
|
|
@@ -104,7 +104,6 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
104
104
|
super();
|
|
105
105
|
this.__registerHost();
|
|
106
106
|
this.actionClick = createEvent(this, "actionClick", 7);
|
|
107
|
-
this.actionChange = createEvent(this, "actionChange", 7);
|
|
108
107
|
this._titleKeyByElement = {
|
|
109
108
|
[TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
|
110
109
|
[TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
|
|
@@ -6925,17 +6925,16 @@ const CONFIG_SOURCE = {
|
|
|
6925
6925
|
grid: "grid"
|
|
6926
6926
|
};
|
|
6927
6927
|
class ConfigStorage {
|
|
6928
|
-
static get() {
|
|
6928
|
+
static async get() {
|
|
6929
6929
|
if (!ConfigStorage.instance) {
|
|
6930
6930
|
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
6931
6931
|
if (application != undefined) {
|
|
6932
|
+
const configName = application.configName;
|
|
6933
|
+
const resourceID = await application.getResourceID();
|
|
6932
6934
|
ConfigStorage.instance = new ConfigStorage();
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
ConfigStorage.instance.loadFormConfig(configName);
|
|
6937
|
-
ConfigStorage.instance.loadGridConfig(configName);
|
|
6938
|
-
});
|
|
6935
|
+
ConfigStorage.resourceID = resourceID;
|
|
6936
|
+
ConfigStorage.instance.loadFormConfig(configName);
|
|
6937
|
+
ConfigStorage.instance.loadGridConfig(configName);
|
|
6939
6938
|
}
|
|
6940
6939
|
}
|
|
6941
6940
|
return this.instance;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-e4121713.js';
|
|
2
2
|
import { WaitingChangeException, WarningException, ErrorException, ObjectUtils, DataType, DataUnit, StringUtils, ChangeOperation, DateUtils, DependencyType, ElementIDUtils, ApplicationContext, ErrorTracking } from '@sankhyalabs/core';
|
|
3
|
-
import { d as dist, D as DataFetcher, R as ResourceFetcher, U as UrlUtils, F as FormConfigFetcher, G as GridConfigFetcher, C as ConfigStorage } from './ConfigStorage-
|
|
3
|
+
import { d as dist, D as DataFetcher, R as ResourceFetcher, U as UrlUtils, F as FormConfigFetcher, G as GridConfigFetcher, C as ConfigStorage } from './ConfigStorage-b59461d8.js';
|
|
4
4
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
5
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-7d583c9a.js';
|
|
6
6
|
import './_commonjsHelpers-9943807e.js';
|