@sankhyalabs/sankhyablocks 2.9.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-9c584423.js +7 -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 +19 -8
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator_3.cjs.entry.js +24 -9
- package/dist/cjs/snk-crud.cjs.entry.js +19 -5
- package/dist/cjs/snk-data-exporter_8.cjs.entry.js +21 -7
- package/dist/cjs/snk-data-unit.cjs.entry.js +49 -10
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-form.cjs.entry.js +58 -22
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/{taskbar-elements-bbb89cdb.js → taskbar-elements-89bf9399.js} +14 -3
- package/dist/collection/components/snk-application/snk-application.js +12 -6
- package/dist/collection/components/snk-crud/snk-crud.js +41 -4
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.css +3 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +4 -2
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +49 -10
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +1 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -1
- package/dist/collection/components/snk-form/snk-form.css +1 -1
- package/dist/collection/components/snk-form/snk-form.js +80 -21
- package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.css +8 -1
- package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.css +42 -19
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.css +92 -40
- package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.css +96 -45
- package/dist/collection/components/snk-grid/snk-grid.js +44 -6
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +14 -3
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +37 -2
- package/dist/collection/lib/@types/index.js +5 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +15 -4
- package/dist/components/snk-application2.js +19 -8
- package/dist/components/snk-config-options2.js +1 -1
- package/dist/components/snk-crud.js +20 -6
- package/dist/components/snk-data-exporter2.js +5 -3
- package/dist/components/snk-data-unit.js +49 -10
- package/dist/components/snk-field-config2.js +1 -1
- package/dist/components/snk-filter-bar2.js +1 -1
- package/dist/components/snk-filter-item2.js +1 -1
- package/dist/components/snk-form-config2.js +1 -1
- package/dist/components/snk-form2.js +59 -23
- package/dist/components/snk-grid2.js +23 -8
- package/dist/components/snk-tab-config2.js +1 -1
- package/dist/components/snk-taskbar2.js +33 -5
- package/dist/esm/index-de5f37a6.js +7 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +19 -8
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator_3.entry.js +22 -7
- package/dist/esm/snk-crud.entry.js +20 -6
- package/dist/esm/snk-data-exporter_8.entry.js +21 -7
- package/dist/esm/snk-data-unit.entry.js +49 -10
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-form.entry.js +58 -22
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/{taskbar-elements-beec3b27.js → taskbar-elements-c8966343.js} +14 -3
- package/dist/sankhyablocks/p-01c361bb.entry.js +1 -0
- package/dist/sankhyablocks/p-05fadb77.js +1 -0
- package/dist/sankhyablocks/p-3ee68d78.entry.js +1 -0
- package/dist/sankhyablocks/p-420d07c4.js +1 -0
- package/dist/sankhyablocks/p-4a5c1d36.entry.js +1 -0
- package/dist/sankhyablocks/{p-3cb9f3ad.entry.js → p-4c759619.entry.js} +1 -1
- package/dist/sankhyablocks/p-9b858e3a.entry.js +1 -0
- package/dist/sankhyablocks/p-a65d6ba3.entry.js +1 -0
- package/dist/sankhyablocks/p-b84c7c61.entry.js +90 -0
- package/dist/sankhyablocks/p-c32cfc29.entry.js +1 -0
- package/dist/sankhyablocks/p-cd19bd29.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +2 -2
- package/dist/types/components/snk-crud/snk-crud.d.ts +8 -1
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +6 -0
- package/dist/types/components/snk-form/snk-form.d.ts +10 -1
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +6 -0
- package/dist/types/components.d.ts +37 -4
- package/dist/types/lib/@types/index.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +1 -1
- package/dist/types/lib/store/index.d.ts +4 -3
- package/package.json +1 -1
- package/dist/sankhyablocks/p-13116d05.entry.js +0 -1
- package/dist/sankhyablocks/p-1faef46c.entry.js +0 -83
- package/dist/sankhyablocks/p-3480f2fa.entry.js +0 -1
- package/dist/sankhyablocks/p-4ca32c86.entry.js +0 -1
- package/dist/sankhyablocks/p-6617d349.entry.js +0 -1
- package/dist/sankhyablocks/p-82e20fc0.entry.js +0 -1
- package/dist/sankhyablocks/p-9d474bc0.entry.js +0 -1
- package/dist/sankhyablocks/p-c8327a5c.js +0 -1
- package/dist/sankhyablocks/p-fc77347c.entry.js +0 -1
|
@@ -4,11 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const taskbarProcessor = require('./taskbar-processor-6f3d2a75.js');
|
|
8
7
|
const ConfigStorage = require('./ConfigStorage-8b5e3261.js');
|
|
8
|
+
const index$1 = require('./index-9c584423.js');
|
|
9
|
+
const taskbarProcessor = require('./taskbar-processor-6f3d2a75.js');
|
|
9
10
|
require('./_commonjsHelpers-537d719a.js');
|
|
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(--
|
|
12
|
+
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(--visible);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}";
|
|
12
13
|
|
|
13
14
|
const SnkForm = class {
|
|
14
15
|
constructor(hostRef) {
|
|
@@ -16,13 +17,13 @@ const SnkForm = class {
|
|
|
16
17
|
this.exit = index.createEvent(this, "exit", 7);
|
|
17
18
|
this.actionClick = index.createEvent(this, "actionClick", 7);
|
|
18
19
|
this._renderTimer = 500;
|
|
19
|
-
this._taskbarProcessor = new taskbarProcessor.TaskbarProcessor({
|
|
20
|
-
"snkForm.regular": ["PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "GRID_MODE", "CONFIGURATOR", "INSERT"],
|
|
21
|
-
"snkForm.finish_edition": ["CANCEL", "SAVE"]
|
|
22
|
-
});
|
|
23
20
|
this._editionFormConfig = {};
|
|
24
21
|
this._insertionFormConfig = {};
|
|
25
22
|
this._showFormConfig = false;
|
|
23
|
+
/**
|
|
24
|
+
* Altera o modo de apresentação dos botões do snk-taskbar.
|
|
25
|
+
*/
|
|
26
|
+
this.presentationMode = index$1.PresentationMode.PRIMARY;
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* Exibe a janela de configurações do formulário.
|
|
@@ -36,6 +37,22 @@ const SnkForm = class {
|
|
|
36
37
|
async hideConfig() {
|
|
37
38
|
this._showFormConfig = false;
|
|
38
39
|
}
|
|
40
|
+
getFinishEditionTaskbarButtons() {
|
|
41
|
+
if (this.presentationMode === index$1.PresentationMode.PRIMARY) {
|
|
42
|
+
return ["CANCEL", "SAVE"];
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
return ["SAVE", "CANCEL"];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
getRegularTaskbarButtons() {
|
|
49
|
+
if (this.presentationMode === index$1.PresentationMode.PRIMARY) {
|
|
50
|
+
return ["PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "GRID_MODE", "CONFIGURATOR", "INSERT"];
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
return ["INSERT", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "GRID_MODE", "CONFIGURATOR"];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
39
56
|
loadConfig() {
|
|
40
57
|
if (this.configName == undefined) {
|
|
41
58
|
return;
|
|
@@ -139,6 +156,33 @@ const SnkForm = class {
|
|
|
139
156
|
closeConfig() {
|
|
140
157
|
this.hideConfig();
|
|
141
158
|
}
|
|
159
|
+
validatePresentationMode() {
|
|
160
|
+
if (Object.values(index$1.PresentationMode).includes(this.presentationMode)) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
this.presentationMode = index$1.PresentationMode.PRIMARY;
|
|
164
|
+
}
|
|
165
|
+
dataunitReady() {
|
|
166
|
+
this.loadInsertionConfig();
|
|
167
|
+
const dataInfo = { dataUnit: this._dataUnit };
|
|
168
|
+
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
169
|
+
}
|
|
170
|
+
loadTaskbarProcessor() {
|
|
171
|
+
var _a;
|
|
172
|
+
const taskbarId = ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "snkForm.finish_edition" : "snkForm.regular";
|
|
173
|
+
const disabledButtons = [];
|
|
174
|
+
if (!this._dataState || !this._dataState.hasPrevious) {
|
|
175
|
+
disabledButtons.push("PREVIOUS");
|
|
176
|
+
}
|
|
177
|
+
if (!this._dataState || !this._dataState.hasNext) {
|
|
178
|
+
disabledButtons.push("NEXT");
|
|
179
|
+
}
|
|
180
|
+
this._taskbarProcessor = new taskbarProcessor.TaskbarProcessor({
|
|
181
|
+
"snkForm.regular": this.getRegularTaskbarButtons(),
|
|
182
|
+
"snkForm.finish_edition": this.getFinishEditionTaskbarButtons(),
|
|
183
|
+
});
|
|
184
|
+
this._taskbarProcessor.process(taskbarId, this.taskbarManager, this._dataState, disabledButtons);
|
|
185
|
+
}
|
|
142
186
|
getDisabledButtons() {
|
|
143
187
|
const disabled = [];
|
|
144
188
|
if (!this._dataState.hasPrevious) {
|
|
@@ -149,11 +193,6 @@ const SnkForm = class {
|
|
|
149
193
|
}
|
|
150
194
|
return disabled;
|
|
151
195
|
}
|
|
152
|
-
dataunitReady() {
|
|
153
|
-
this.loadInsertionConfig();
|
|
154
|
-
const dataInfo = { dataUnit: this._dataUnit };
|
|
155
|
-
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
156
|
-
}
|
|
157
196
|
componentWillLoad() {
|
|
158
197
|
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
159
198
|
let parent = this._element.parentElement;
|
|
@@ -181,23 +220,20 @@ const SnkForm = class {
|
|
|
181
220
|
this.loadConfig();
|
|
182
221
|
}
|
|
183
222
|
componentWillRender() {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
const disabledButtons = [];
|
|
187
|
-
if (!this._dataState || !this._dataState.hasPrevious) {
|
|
188
|
-
disabledButtons.push("PREVIOUS");
|
|
189
|
-
}
|
|
190
|
-
if (!this._dataState || !this._dataState.hasNext) {
|
|
191
|
-
disabledButtons.push("NEXT");
|
|
192
|
-
}
|
|
193
|
-
this._taskbarProcessor.process(taskbarId, this.taskbarManager, this._dataState, disabledButtons);
|
|
223
|
+
this.validatePresentationMode();
|
|
224
|
+
this.loadTaskbarProcessor();
|
|
194
225
|
}
|
|
195
226
|
render() {
|
|
196
227
|
var _a;
|
|
197
228
|
if (!this._dataUnit || !this._dataState) {
|
|
198
229
|
return undefined;
|
|
199
230
|
}
|
|
200
|
-
return (index.h("section", { class: "snk-form" }, index.h("div", { class:
|
|
231
|
+
return (index.h("section", { class: "snk-form" }, index.h("div", { class: `snk-form__header ez-row
|
|
232
|
+
${this.presentationMode === index$1.PresentationMode.PRIMARY ? 'snk-form__header--fixed' : ''}
|
|
233
|
+
` }, this.presentationMode === index$1.PresentationMode.PRIMARY &&
|
|
234
|
+
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(), "data-element-id": "formToBack" }), 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
|
|
235
|
+
${this.presentationMode === index$1.PresentationMode.PRIMARY ? "ez-col--sd-6 ez-col--tb-6 ez-align--right" : ""}
|
|
236
|
+
` }, index.h("snk-taskbar", { key: "formTaskbar", "data-element-id": "form", 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, presentationMode: this.presentationMode }))), 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, "data-element-id": "embedded", dataUnit: this._dataUnit, config: this.getFormConfig(), recordsValidator: this.recordsValidator, class: this._showFormConfig ? 'snk-form__form--hidden' : '' }), this._showFormConfig &&
|
|
201
237
|
index.h("snk-form-config", { dataUnit: this._dataUnit, formConfig: this.getFormConfig(), configName: this.configName, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigClose: () => this.closeConfig() }))))));
|
|
202
238
|
}
|
|
203
239
|
get _element() { return index.getElement(this); }
|
|
@@ -8,7 +8,7 @@ const core = require('@sankhyalabs/core');
|
|
|
8
8
|
const constants = require('./constants-a47a5190.js');
|
|
9
9
|
require('./_commonjsHelpers-537d719a.js');
|
|
10
10
|
|
|
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>')
|
|
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>');--snk-tab-config__lower-bar--background-color:var(--color--disable-primary, #e5eaf0);--snk-tab-config__lower-bar--border:2px solid var(--color--disable-primary, #e5eaf0);--snk-tab-config__tab--color:var(--text--primary, #626e82);--snk-tab-config__tab--font-family:var(--font-pattern, \"Roboto\");--snk-tab-config__tab--font-size:var(--title--small, 14px);--snk-tab-config__tab--padding:var(--space--small, 6px) var(--space--medium, 12px);--snk-tab-config__tab-is-active--color:var(--color--primary, #008561);--snk-tab-config__tab-hover--color:var(--color--secondary, #383c45);--snk-tab-config__tab-is-focused--border:1px dashed var(--color--primary, #008561);--snk-tab-config__tab-label--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--snk-tab-config__tab-label--margin-bottom:var(--space--extra-small, 3px);--snk-tab-config__new-button-icon--color:var(--color--secondary-700, #1C1D22);--snk-tab-config__forward-button--background-color:var(--text--primary, #626e82);--snk-tab-config__forward-button-hover--background-color:var(--color--primary, #008561);--snk-tab-config__left-icon--padding-right:var(--space--small, 6px);--snk-tab-config__left-icon--color:var(--text--disable, #AFB6C0);--snk-tab-config__tab-label-disabled--color:var(--text--disable, #AFB6C0);--snk-tab-config__slot--margin-left:var(--space--small, 6px);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__lower-bar.sc-snk-tab-config{position:absolute;left:0%;right:0%;top:91%;bottom:0%;border-radius:2px;background-color:var(--snk-tab-config__lower-bar--background-color);border:var(--snk-tab-config__lower-bar--border)}.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(--snk-tab-config__tab--color);font-family:var(--snk-tab-config__tab--font-family);font-size:var(--snk-tab-config__tab--font-size);padding:var(--snk-tab-config__tab--padding)}.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(--snk-tab-config__tab-is-active--color)}.tab-config__tab.sc-snk-tab-config:hover{color:var(--snk-tab-config__tab-hover--color)}.tab-config__tab--is-active.sc-snk-tab-config:hover{color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab--is-active.sc-snk-tab-config::after{content:\"\";position:absolute;width:100%;height:100%;clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out;background-color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab--is-focused.sc-snk-tab-config{border:var(--snk-tab-config__tab-is-focused--border)}.tab-config__tab-label.sc-snk-tab-config{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--snk-tab-config__tab-label--text-shadow);margin-bottom:var(--snk-tab-config__tab-label--margin-bottom)}.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(--snk-tab-config__new-button-icon--color)}.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;width:10px;height:16px;background-color:var(--snk-tab-config__forward-button--background-color)}.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(--snk-tab-config__forward-button-hover--background-color)}.tab-config__new-button.sc-snk-tab-config:hover ez-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__forward-button-hover--background-color)}.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(--snk-tab-config__left-icon--padding-right);--ez-icon--color:var(--snk-tab-config__left-icon--color)}.tab-config__left-icon--eye-off.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__left-icon--color)}.tab-config__right-icon.sc-snk-tab-config{visibility:hidden;padding-left:var(--snk-tab-config__left-icon--padding-right)}.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(--snk-tab-config__tab-is-active--color)}.tab-config__tab.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__tab-hover--color)}.tab-config__tab--is-active.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__tab-is-active--color)}.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(--snk-tab-config__tab-label-disabled--color)}.tab-config__slot.sc-snk-tab-config{margin-left:var(--snk-tab-config__slot--margin-left)}";
|
|
12
12
|
|
|
13
13
|
const SnkTabConfig = class {
|
|
14
14
|
constructor(hostRef) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-2cd6f753.js');
|
|
4
|
+
const index$2 = require('./index-9c584423.js');
|
|
4
5
|
const index$1 = require('./index-696b5c3b.js');
|
|
5
6
|
|
|
6
7
|
exports.TaskbarElement = void 0;
|
|
@@ -47,7 +48,7 @@ const buildCustomButton = (def, className, dataElementId, action, isEnabled) =>
|
|
|
47
48
|
return textButton(def.name, className, dataElementId, text, hint, action, isEnabled);
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
|
-
const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions, configName) => {
|
|
51
|
+
const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions, configName, presentationMode) => {
|
|
51
52
|
var _a;
|
|
52
53
|
const title = getTitle(element);
|
|
53
54
|
switch (element) {
|
|
@@ -64,11 +65,21 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
|
64
65
|
case exports.TaskbarElement.REMOVE:
|
|
65
66
|
return iconButton("delete", element, className, dataElementId, title, action, isEnabled);
|
|
66
67
|
case exports.TaskbarElement.INSERT:
|
|
67
|
-
|
|
68
|
+
if (presentationMode === index$2.PresentationMode.PRIMARY) {
|
|
69
|
+
return iconTextButton("plus", element, className, dataElementId, title, title, action, isEnabled);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
return iconButton("plus", element, className, dataElementId, title, action, isEnabled);
|
|
73
|
+
}
|
|
68
74
|
case exports.TaskbarElement.CANCEL:
|
|
69
75
|
return textButton(element, className, dataElementId, title, title, action, isEnabled);
|
|
70
76
|
case exports.TaskbarElement.SAVE:
|
|
71
|
-
|
|
77
|
+
if (presentationMode === index$2.PresentationMode.PRIMARY) {
|
|
78
|
+
return iconTextButton("save", element, className, dataElementId, title, title, action, isEnabled);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
return iconButton("save", element, className, dataElementId, title, action, isEnabled);
|
|
82
|
+
}
|
|
72
83
|
case exports.TaskbarElement.GRID_MODE:
|
|
73
84
|
return iconButton("table", element, className, dataElementId, title, action, isEnabled);
|
|
74
85
|
case exports.TaskbarElement.FORM_MODE:
|
|
@@ -270,13 +270,13 @@ export class SnkApplication {
|
|
|
270
270
|
* Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache
|
|
271
271
|
* passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado.
|
|
272
272
|
*/
|
|
273
|
-
async createDataunit(entityName, dataUnitName) {
|
|
273
|
+
async createDataunit(entityName, dataUnitName, parentDataUnit) {
|
|
274
274
|
return new Promise((resolve, reject) => {
|
|
275
275
|
const duPromisses = this.getDuPromissesStack(dataUnitName);
|
|
276
276
|
const waitingDu = duPromisses.length > 0;
|
|
277
277
|
duPromisses.push(new PendingPromise(resolve, reject));
|
|
278
278
|
if (!waitingDu) {
|
|
279
|
-
const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, this.resourceID);
|
|
279
|
+
const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, this.resourceID, parentDataUnit);
|
|
280
280
|
dataUnit.loadMetadata().then(() => {
|
|
281
281
|
if (dataUnitName) {
|
|
282
282
|
this._duCache.set(dataUnitName, dataUnit);
|
|
@@ -295,14 +295,14 @@ export class SnkApplication {
|
|
|
295
295
|
/**
|
|
296
296
|
* Obtem um DataUnit do cache ou cria um caso ainda não tenha sido criado.
|
|
297
297
|
*/
|
|
298
|
-
async getDataUnit(entityName, dataUnitName) {
|
|
298
|
+
async getDataUnit(entityName, dataUnitName, parentDataUnit) {
|
|
299
299
|
return new Promise((resolve, reject) => {
|
|
300
300
|
const dataUnit = this._duCache.get(dataUnitName);
|
|
301
301
|
if (dataUnit) {
|
|
302
302
|
resolve(dataUnit);
|
|
303
303
|
}
|
|
304
304
|
else {
|
|
305
|
-
this.createDataunit(entityName, dataUnitName).then(dataUnit => {
|
|
305
|
+
this.createDataunit(entityName, dataUnitName, parentDataUnit).then(dataUnit => {
|
|
306
306
|
resolve(dataUnit);
|
|
307
307
|
}).catch(reason => reject(reason));
|
|
308
308
|
}
|
|
@@ -1075,13 +1075,16 @@ export class SnkApplication {
|
|
|
1075
1075
|
},
|
|
1076
1076
|
"createDataunit": {
|
|
1077
1077
|
"complexType": {
|
|
1078
|
-
"signature": "(entityName: string, dataUnitName?: string) => Promise<DataUnit>",
|
|
1078
|
+
"signature": "(entityName: string, dataUnitName?: string, parentDataUnit?: DataUnit) => Promise<DataUnit>",
|
|
1079
1079
|
"parameters": [{
|
|
1080
1080
|
"tags": [],
|
|
1081
1081
|
"text": ""
|
|
1082
1082
|
}, {
|
|
1083
1083
|
"tags": [],
|
|
1084
1084
|
"text": ""
|
|
1085
|
+
}, {
|
|
1086
|
+
"tags": [],
|
|
1087
|
+
"text": ""
|
|
1085
1088
|
}],
|
|
1086
1089
|
"references": {
|
|
1087
1090
|
"Promise": {
|
|
@@ -1101,13 +1104,16 @@ export class SnkApplication {
|
|
|
1101
1104
|
},
|
|
1102
1105
|
"getDataUnit": {
|
|
1103
1106
|
"complexType": {
|
|
1104
|
-
"signature": "(entityName: string, dataUnitName: string) => Promise<DataUnit>",
|
|
1107
|
+
"signature": "(entityName: string, dataUnitName: string, parentDataUnit?: DataUnit) => Promise<DataUnit>",
|
|
1105
1108
|
"parameters": [{
|
|
1106
1109
|
"tags": [],
|
|
1107
1110
|
"text": ""
|
|
1108
1111
|
}, {
|
|
1109
1112
|
"tags": [],
|
|
1110
1113
|
"text": ""
|
|
1114
|
+
}, {
|
|
1115
|
+
"tags": [],
|
|
1116
|
+
"text": ""
|
|
1111
1117
|
}],
|
|
1112
1118
|
"references": {
|
|
1113
1119
|
"Promise": {
|
|
@@ -2,6 +2,7 @@ import { h } from '@stencil/core';
|
|
|
2
2
|
import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { VIEW_MODE } from '../../lib/utils/constants';
|
|
4
4
|
import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
|
|
5
|
+
import { PresentationMode } from '../../lib/@types';
|
|
5
6
|
const GRID_MODE = VIEW_MODE.grid;
|
|
6
7
|
const FORM_MODE = VIEW_MODE.form;
|
|
7
8
|
/**
|
|
@@ -20,6 +21,10 @@ export class SnkCrud {
|
|
|
20
21
|
* Determina se haverá exportação de dados
|
|
21
22
|
*/
|
|
22
23
|
this.enableDataExporter = false;
|
|
24
|
+
/**
|
|
25
|
+
* Altera o modo de apresentação dos botões do snk-taskbar.
|
|
26
|
+
*/
|
|
27
|
+
this.presentationMode = PresentationMode.PRIMARY;
|
|
23
28
|
}
|
|
24
29
|
/**
|
|
25
30
|
* Usado para alternar a visão entre GRID e FORM externamente.
|
|
@@ -55,6 +60,16 @@ export class SnkCrud {
|
|
|
55
60
|
this._snkForm.showConfig();
|
|
56
61
|
}
|
|
57
62
|
}
|
|
63
|
+
validatePresentationMode() {
|
|
64
|
+
if (Object.values(PresentationMode).includes(this.presentationMode)) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this.presentationMode = PresentationMode.PRIMARY;
|
|
68
|
+
}
|
|
69
|
+
addDataElementID() {
|
|
70
|
+
const dataInfo = { dataUnit: this._dataUnit };
|
|
71
|
+
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
72
|
+
}
|
|
58
73
|
insertionModeHandler() {
|
|
59
74
|
this.gridToForm();
|
|
60
75
|
}
|
|
@@ -93,12 +108,11 @@ export class SnkCrud {
|
|
|
93
108
|
this.configName = application.configName;
|
|
94
109
|
}
|
|
95
110
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
111
|
+
componentWillRender() {
|
|
112
|
+
this.validatePresentationMode();
|
|
99
113
|
}
|
|
100
114
|
render() {
|
|
101
|
-
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, enableDataExporter: this.enableDataExporter }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-form", { ref: (ref) => this._snkForm = ref, "data-element-id": "crud_form", configName: this.configName, actionsList: this.actionsList, onExit: () => this.setViewMode(GRID_MODE), recordsValidator: this.recordsValidator, taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail) }, h("slot", { name: "SnkFormTaskBar" }))), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._viewMode, onConfigSelected: (evt) => this.executeAction(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail) })));
|
|
115
|
+
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, enableDataExporter: this.enableDataExporter, presentationMode: this.presentationMode }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-form", { ref: (ref) => this._snkForm = ref, "data-element-id": "crud_form", configName: this.configName, actionsList: this.actionsList, onExit: () => this.setViewMode(GRID_MODE), recordsValidator: this.recordsValidator, taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode }, h("slot", { name: "SnkFormTaskBar" }))), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._viewMode, onConfigSelected: (evt) => this.executeAction(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail) })));
|
|
102
116
|
}
|
|
103
117
|
static get is() { return "snk-crud"; }
|
|
104
118
|
static get encapsulation() { return "scoped"; }
|
|
@@ -249,6 +263,29 @@ export class SnkCrud {
|
|
|
249
263
|
"attribute": "enable-data-exporter",
|
|
250
264
|
"reflect": false,
|
|
251
265
|
"defaultValue": "false"
|
|
266
|
+
},
|
|
267
|
+
"presentationMode": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"mutable": false,
|
|
270
|
+
"complexType": {
|
|
271
|
+
"original": "PresentationMode",
|
|
272
|
+
"resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY",
|
|
273
|
+
"references": {
|
|
274
|
+
"PresentationMode": {
|
|
275
|
+
"location": "import",
|
|
276
|
+
"path": "../../lib/@types"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"required": false,
|
|
281
|
+
"optional": false,
|
|
282
|
+
"docs": {
|
|
283
|
+
"tags": [],
|
|
284
|
+
"text": "Altera o modo de apresenta\u00E7\u00E3o dos bot\u00F5es do snk-taskbar."
|
|
285
|
+
},
|
|
286
|
+
"attribute": "presentation-mode",
|
|
287
|
+
"reflect": false,
|
|
288
|
+
"defaultValue": "PresentationMode.PRIMARY"
|
|
252
289
|
}
|
|
253
290
|
};
|
|
254
291
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
/*@doc Define o posicionamento de z-index do componente.*/
|
|
3
|
-
--snk-data-exporter--z-index: var(--
|
|
3
|
+
--snk-data-exporter--z-index: var(--most-visible, 3);
|
|
4
4
|
|
|
5
5
|
/*private*/
|
|
6
6
|
display: flex;
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
display: flex;
|
|
14
14
|
width: fit-content;
|
|
15
15
|
height: fit-content;
|
|
16
|
+
}
|
|
16
17
|
|
|
18
|
+
.snk-data-exporter--overlap {
|
|
17
19
|
/*public*/
|
|
18
20
|
z-index: var(--snk-data-exporter--z-index);
|
|
19
21
|
}
|
|
@@ -148,9 +148,11 @@ export class SnkDataExporter {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
render() {
|
|
151
|
-
return (h(Host, null, h("div", { class:
|
|
151
|
+
return (h(Host, null, h("div", { class: `snk-data-exporter
|
|
152
|
+
${this._showDropdown ? " snk-data-exporter--overlap" : ""}
|
|
153
|
+
` }, h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "file-download", size: "small", mode: "icon", onClick: () => this.controlDropdown() }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("button")}` })), this._showDropdown &&
|
|
152
154
|
h("ez-dropdown", Object.assign({ ref: (ref) => this._ezDropdown = ref, items: this._items, onEzClick: (evt) => this.processExporter(evt) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("dropdown")}` }))), this._showDropdown &&
|
|
153
|
-
h("div", Object.assign({ class: "ez-scrim ez-scrim
|
|
155
|
+
h("div", Object.assign({ class: "ez-scrim ez-scrim--light" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("ezScrim")}` })), h("snk-exporter-email-sender", { ref: ref => this._snkEmailSender = ref, getMessage: (key, params) => this.getMessage(key, params) })));
|
|
154
156
|
}
|
|
155
157
|
static get is() { return "snk-data-exporter"; }
|
|
156
158
|
static get encapsulation() { return "scoped"; }
|
|
@@ -17,12 +17,13 @@ export class SnkDataUnit {
|
|
|
17
17
|
copyMode: false,
|
|
18
18
|
isDirty: this.dataUnit.isDirty(),
|
|
19
19
|
hasDirtyRecords: this.dataUnit.hasDirtyRecords(),
|
|
20
|
-
selectedRecords: this.dataUnit.getSelectedRecords()
|
|
20
|
+
selectedRecords: this.dataUnit.getSelectedRecords(),
|
|
21
|
+
selectedRecord: this.dataUnit.getSelectedRecord()
|
|
21
22
|
};
|
|
22
|
-
this.dataUnit.records.forEach(
|
|
23
|
-
if (
|
|
23
|
+
this.dataUnit.records.forEach(record => {
|
|
24
|
+
if (record.__record__id__.startsWith('NEW_')) {
|
|
24
25
|
duState.insertionMode = true;
|
|
25
|
-
duState.copyMode || (duState.copyMode =
|
|
26
|
+
duState.copyMode || (duState.copyMode = record['__record__source__id__'] != undefined);
|
|
26
27
|
}
|
|
27
28
|
});
|
|
28
29
|
this.dataState = duState;
|
|
@@ -76,6 +77,7 @@ export class SnkDataUnit {
|
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
observeDataUnit() {
|
|
80
|
+
this.handlerLinkFields();
|
|
79
81
|
this.dataUnitReady.emit(this.dataUnit);
|
|
80
82
|
}
|
|
81
83
|
/**
|
|
@@ -221,11 +223,21 @@ export class SnkDataUnit {
|
|
|
221
223
|
}
|
|
222
224
|
return OperationMap.CLEAN;
|
|
223
225
|
}
|
|
226
|
+
async getDataUnitParentOrChild() {
|
|
227
|
+
var _a;
|
|
228
|
+
const cacheName = this.dataUnitName ? this.dataUnitName : this.entityName;
|
|
229
|
+
if (this._parentSnkDataUnit) {
|
|
230
|
+
this._parentDataUnit = await ((_a = this._parentSnkDataUnit) === null || _a === void 0 ? void 0 : _a.getDataUnit());
|
|
231
|
+
return await this._application.getDataUnit(this.entityName, undefined, this._parentDataUnit);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
return await this._application.getDataUnit(this.entityName, cacheName);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
224
237
|
async loadDataUnit() {
|
|
225
238
|
if (!this.dataUnit) {
|
|
226
239
|
if (this._application && this.entityName) {
|
|
227
|
-
|
|
228
|
-
this.dataUnit = await this._application.getDataUnit(this.entityName, cacheName);
|
|
240
|
+
this.dataUnit = await this.getDataUnitParentOrChild();
|
|
229
241
|
this.dataUnit.pageSize = this.pageSize;
|
|
230
242
|
this.dataUnit.unsubscribe(this._dataUnitObserver);
|
|
231
243
|
this.dataUnit.addInterceptor(this);
|
|
@@ -237,12 +249,39 @@ export class SnkDataUnit {
|
|
|
237
249
|
}
|
|
238
250
|
}
|
|
239
251
|
}
|
|
252
|
+
getParentSnkDataUnit() {
|
|
253
|
+
let currentElement = this.element;
|
|
254
|
+
while (currentElement.parentNode) {
|
|
255
|
+
if (currentElement.parentNode.nodeName === 'SNK-DATA-UNIT') {
|
|
256
|
+
return currentElement.parentNode;
|
|
257
|
+
}
|
|
258
|
+
currentElement = currentElement.parentNode;
|
|
259
|
+
}
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
handlerLinkFields() {
|
|
263
|
+
var _a, _b;
|
|
264
|
+
const metadata = Object.assign({}, this.dataUnit.metadata);
|
|
265
|
+
if (!this._parentDataUnit)
|
|
266
|
+
return;
|
|
267
|
+
const child = this._parentDataUnit.getChildInfo(this.entityName);
|
|
268
|
+
if (!child)
|
|
269
|
+
return;
|
|
270
|
+
const fieldsLink = (_a = child === null || child === void 0 ? void 0 : child.links) === null || _a === void 0 ? void 0 : _a.map(link => link.target);
|
|
271
|
+
(_b = metadata === null || metadata === void 0 ? void 0 : metadata.fields) === null || _b === void 0 ? void 0 : _b.forEach(field => {
|
|
272
|
+
if (fieldsLink === null || fieldsLink === void 0 ? void 0 : fieldsLink.includes(field.name)) {
|
|
273
|
+
field.visible = false;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
this.dataUnit.metadata = metadata;
|
|
277
|
+
}
|
|
240
278
|
//---------------------------------------------
|
|
241
279
|
// Lifecycle web component
|
|
242
280
|
//---------------------------------------------
|
|
243
281
|
componentWillLoad() {
|
|
244
282
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
245
283
|
this._application.getAllAccess().then(access => this._permissions = access);
|
|
284
|
+
this._parentSnkDataUnit = this.getParentSnkDataUnit();
|
|
246
285
|
}
|
|
247
286
|
componentDidLoad() {
|
|
248
287
|
this.loadDataUnit();
|
|
@@ -404,7 +443,7 @@ export class SnkDataUnit {
|
|
|
404
443
|
return [{
|
|
405
444
|
"method": "dataStateChange",
|
|
406
445
|
"name": "dataStateChange",
|
|
407
|
-
"bubbles":
|
|
446
|
+
"bubbles": false,
|
|
408
447
|
"cancelable": true,
|
|
409
448
|
"composed": true,
|
|
410
449
|
"docs": {
|
|
@@ -423,7 +462,7 @@ export class SnkDataUnit {
|
|
|
423
462
|
}, {
|
|
424
463
|
"method": "dataUnitReady",
|
|
425
464
|
"name": "dataUnitReady",
|
|
426
|
-
"bubbles":
|
|
465
|
+
"bubbles": false,
|
|
427
466
|
"cancelable": true,
|
|
428
467
|
"composed": true,
|
|
429
468
|
"docs": {
|
|
@@ -443,7 +482,7 @@ export class SnkDataUnit {
|
|
|
443
482
|
}, {
|
|
444
483
|
"method": "insertionMode",
|
|
445
484
|
"name": "insertionMode",
|
|
446
|
-
"bubbles":
|
|
485
|
+
"bubbles": false,
|
|
447
486
|
"cancelable": true,
|
|
448
487
|
"composed": true,
|
|
449
488
|
"docs": {
|
|
@@ -458,7 +497,7 @@ export class SnkDataUnit {
|
|
|
458
497
|
}, {
|
|
459
498
|
"method": "cancelEdition",
|
|
460
499
|
"name": "cancelEdition",
|
|
461
|
-
"bubbles":
|
|
500
|
+
"bubbles": false,
|
|
462
501
|
"cancelable": true,
|
|
463
502
|
"composed": true,
|
|
464
503
|
"docs": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
min-width: 265px;
|
|
20
20
|
|
|
21
21
|
/*public*/
|
|
22
|
-
z-index: var(--
|
|
22
|
+
z-index: var(--most-visible, 3);
|
|
23
23
|
background-color: var(--background--xlight, #fff);
|
|
24
24
|
border-radius: var(--border--radius-medium, 12px);
|
|
25
25
|
box-shadow: var(--shadow, 0px 0px 16px 0px #000);
|