@sankhyalabs/sankhyablocks 5.4.3 → 5.5.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/{SnkMessageBuilder-115e8a80.js → SnkMessageBuilder-26da04f7.js} +35 -1
- package/dist/cjs/{constants-ae0ed870.js → constants-3787fa32.js} +1 -0
- package/dist/cjs/dataunit-fetcher-8f5ade55.js +319 -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 +3 -315
- package/dist/cjs/snk-attach.cjs.entry.js +449 -0
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +22 -13
- package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -3
- package/dist/cjs/{snk-data-unit-aa613f3b.js → snk-data-unit-c43df27b.js} +4 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +4 -5
- package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid.cjs.entry.js +11 -4
- package/dist/cjs/{snk-guides-viewer-7db960c2.js → snk-guides-viewer-e6a65393.js} +2 -2
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -4
- package/dist/cjs/snk-select-box.cjs.entry.js +1 -1
- package/dist/cjs/{snk-simple-crud.cjs.entry.js → snk-simple-bar_2.cjs.entry.js} +47 -5
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +5 -4
- package/dist/cjs/taskbar-elements-80285601.js +313 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/snk-attach/interfaces/index.js +1 -0
- package/dist/collection/components/snk-attach/snk-attach.css +8 -0
- package/dist/collection/components/snk-attach/snk-attach.js +202 -0
- package/dist/collection/components/snk-attach/structure/crud-config-builder.js +37 -0
- package/dist/collection/components/snk-attach/structure/data-unit-builder.js +106 -0
- package/dist/collection/components/snk-attach/structure/index.js +3 -0
- package/dist/collection/components/snk-attach/structure/taskbar-builder.js +47 -0
- package/dist/collection/components/snk-configurator/snk-configurator.js +3 -3
- package/dist/collection/components/snk-crud/snk-crud.js +22 -11
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +21 -0
- package/dist/collection/components/snk-grid/snk-grid.js +11 -3
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +37 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +65 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +3 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +4 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/attach-fetcher.js +136 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/ISave.js +6 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/index.js +3 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +5 -1
- package/dist/collection/lib/message/resources/snk-attach.msg.js +27 -0
- package/dist/collection/lib/message/resources/snk-simple-bar.msg.js +3 -0
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +1 -0
- package/dist/collection/lib/utils/constants.js +1 -0
- package/dist/components/SnkMessageBuilder.js +35 -1
- package/dist/components/constants.js +1 -0
- package/dist/components/dataunit-fetcher.js +317 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-application2.js +2 -314
- package/dist/components/snk-attach.d.ts +11 -0
- package/dist/components/snk-attach.js +6 -0
- package/dist/components/snk-attach2.js +498 -0
- package/dist/components/snk-crud.js +77 -48
- package/dist/components/snk-data-unit2.js +4 -0
- package/dist/components/snk-grid2.js +11 -4
- package/dist/components/snk-simple-bar.js +1 -41
- package/dist/components/snk-simple-bar2.js +59 -0
- package/dist/components/snk-simple-crud.js +1 -328
- package/dist/{esm/snk-simple-crud.entry.js → components/snk-simple-crud2.js} +73 -18
- package/dist/components/snk-taskbar2.js +7 -2
- package/dist/esm/{SnkMessageBuilder-a15d22f8.js → SnkMessageBuilder-7a9392e6.js} +35 -1
- package/dist/esm/{constants-15617e7d.js → constants-e916ccc3.js} +1 -0
- package/dist/esm/dataunit-fetcher-d32c6a47.js +317 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +3 -315
- package/dist/esm/snk-attach.entry.js +445 -0
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +23 -14
- package/dist/esm/snk-data-exporter.entry.js +3 -3
- package/dist/esm/{snk-data-unit-5ed93c0e.js → snk-data-unit-f9e4c694.js} +4 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +4 -5
- package/dist/esm/snk-field-config.entry.js +1 -1
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-grid-config.entry.js +1 -1
- package/dist/esm/snk-grid.entry.js +11 -4
- package/dist/esm/{snk-guides-viewer-1e7c21f6.js → snk-guides-viewer-62a9f74d.js} +2 -2
- package/dist/esm/snk-guides-viewer.entry.js +3 -4
- package/dist/esm/snk-select-box.entry.js +1 -1
- package/dist/esm/snk-simple-bar_2.entry.js +324 -0
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +5 -4
- package/dist/esm/taskbar-elements-055ba1ad.js +309 -0
- package/dist/sankhyablocks/p-17375123.js +1 -0
- package/dist/sankhyablocks/{p-b80cf644.entry.js → p-1c0ee011.entry.js} +1 -1
- package/dist/sankhyablocks/p-4512cc6c.entry.js +1 -0
- package/dist/sankhyablocks/p-5cbbe1f7.entry.js +1 -0
- package/dist/sankhyablocks/p-63d01871.entry.js +1 -0
- package/dist/sankhyablocks/{p-0a1e7f75.entry.js → p-6ac29569.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f4d36823.entry.js → p-6f0b3cc0.entry.js} +1 -1
- package/dist/sankhyablocks/p-741b00ef.entry.js +1 -0
- package/dist/sankhyablocks/{p-6516f35a.entry.js → p-86f75e7a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-32599159.entry.js → p-8b02b276.entry.js} +1 -1
- package/dist/sankhyablocks/p-92a0fca4.js +1 -0
- package/dist/sankhyablocks/p-999d1953.entry.js +1 -0
- package/dist/sankhyablocks/{p-9bfa3cfb.entry.js → p-a412992c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-703dddb9.js → p-aeffd219.js} +1 -1
- package/dist/sankhyablocks/p-b2523981.entry.js +11 -0
- package/dist/sankhyablocks/p-c3efd4eb.entry.js +1 -0
- package/dist/sankhyablocks/{p-3169584f.entry.js → p-e0b4aec3.entry.js} +1 -1
- package/dist/sankhyablocks/p-ebe876f5.entry.js +1 -0
- package/dist/sankhyablocks/p-ed438690.js +1 -0
- package/dist/sankhyablocks/p-f2223502.js +1 -0
- package/dist/sankhyablocks/p-f3d0c744.entry.js +1 -0
- package/dist/sankhyablocks/p-f821768b.js +74 -0
- package/dist/sankhyablocks/{p-f29caa0a.entry.js → p-f8c66aa3.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-attach/interfaces/index.d.ts +10 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +45 -0
- package/dist/types/components/snk-attach/structure/crud-config-builder.d.ts +7 -0
- package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +16 -0
- package/dist/types/components/snk-attach/structure/index.d.ts +3 -0
- package/dist/types/components/snk-attach/structure/taskbar-builder.d.ts +8 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +5 -0
- package/dist/types/components/snk-simple-bar/snk-simple-bar.d.ts +14 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +1 -0
- package/dist/types/components.d.ts +67 -0
- package/dist/types/global.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +8 -2
- package/dist/types/lib/http/data-fetcher/fetchers/attach-fetcher.d.ts +14 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.d.ts +13 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/ISave.d.ts +26 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/index.d.ts +3 -0
- package/dist/types/lib/message/resources/snk-attach.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-simple-bar.msg.d.ts +1 -0
- package/dist/types/lib/utils/constants.d.ts +2 -1
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/index-fc7ca86c.js +0 -200
- package/dist/cjs/snk-simple-bar.cjs.entry.js +0 -30
- package/dist/cjs/taskbar-elements-5e87cf44.js +0 -115
- package/dist/esm/index-e467ade5.js +0 -198
- package/dist/esm/snk-simple-bar.entry.js +0 -26
- package/dist/esm/taskbar-elements-10d80c79.js +0 -112
- package/dist/sankhyablocks/p-1393dc00.entry.js +0 -1
- package/dist/sankhyablocks/p-1c17eecf.entry.js +0 -1
- package/dist/sankhyablocks/p-2ecf14ff.js +0 -1
- package/dist/sankhyablocks/p-340d6fb0.entry.js +0 -84
- package/dist/sankhyablocks/p-74724fa7.js +0 -1
- package/dist/sankhyablocks/p-79f01b63.entry.js +0 -1
- package/dist/sankhyablocks/p-81e85890.entry.js +0 -1
- package/dist/sankhyablocks/p-94e6fc90.entry.js +0 -1
- package/dist/sankhyablocks/p-98f7f796.js +0 -1
- package/dist/sankhyablocks/p-b3e71248.entry.js +0 -1
- package/dist/sankhyablocks/p-bc281de0.js +0 -1
- package/dist/sankhyablocks/p-d61759a5.entry.js +0 -1
- package/dist/sankhyablocks/p-d65809d5.entry.js +0 -1
- package/dist/sankhyablocks/p-f587a454.js +0 -1
- package/dist/types/components/snk-application/snk-application.d.ts +0 -259
- package/dist/types/components/snk-crud/snk-crud.d.ts +0 -73
- package/dist/types/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.d.ts +0 -40
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +0 -27
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +0 -23
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +0 -23
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +0 -29
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +0 -25
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +0 -19
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +0 -38
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +0 -74
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +0 -53
- package/dist/types/components/snk-grid/snk-grid.d.ts +0 -95
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +0 -59
@@ -1,331 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { DataUnit, StringUtils, SortMode, DataType, ChangeOperation, ObjectUtils, UserInterface } from '@sankhyalabs/core';
|
3
|
-
import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants.js';
|
4
|
-
import { T as TaskbarElement, d as defineCustomElement$2 } from './snk-taskbar2.js';
|
5
|
-
import './DataFetcher.js';
|
6
|
-
import './pesquisa-fetcher.js';
|
7
|
-
import { P as PresentationMode } from './index2.js';
|
8
|
-
import { T as TaskbarProcessor } from './taskbar-processor.js';
|
9
|
-
import { d as defineCustomElement$5 } from './snk-data-exporter2.js';
|
10
|
-
import { d as defineCustomElement$4 } from './snk-data-unit2.js';
|
11
|
-
import { d as defineCustomElement$3 } from './snk-exporter-email-sender2.js';
|
12
|
-
|
13
|
-
class InMemoryLoader {
|
14
|
-
constructor(metadata, records) {
|
15
|
-
this.records = records || [];
|
16
|
-
this.metadata = metadata;
|
17
|
-
this._dataUnit = new DataUnit("InMemoryDataUnit");
|
18
|
-
this._dataUnit.metadataLoader = () => this.metadaLoader();
|
19
|
-
this._dataUnit.dataLoader = (_dataUnit, request) => this.dataLoader(_dataUnit, request);
|
20
|
-
this._dataUnit.saveLoader = (_dataUnit, changes) => this.saveLoader(_dataUnit, changes);
|
21
|
-
this._dataUnit.removeLoader = (_dataUnit, recordIds) => this.removeLoader(_dataUnit, recordIds);
|
22
|
-
this.dataUnit.loadMetadata().then(() => this.dataUnit.loadData());
|
23
|
-
}
|
24
|
-
get dataUnit() {
|
25
|
-
return this._dataUnit;
|
26
|
-
}
|
27
|
-
get records() {
|
28
|
-
return this._records;
|
29
|
-
}
|
30
|
-
set records(records) {
|
31
|
-
this._records = records === null || records === void 0 ? void 0 : records.map(record => {
|
32
|
-
if (!record["__record__id__"]) {
|
33
|
-
record["__record__id__"] = this.generateUniqueId();
|
34
|
-
}
|
35
|
-
return record;
|
36
|
-
});
|
37
|
-
if (this._dataUnit) {
|
38
|
-
this._dataUnit.records = [...this._records];
|
39
|
-
}
|
40
|
-
}
|
41
|
-
get metadata() {
|
42
|
-
return this._metadata;
|
43
|
-
}
|
44
|
-
set metadata(metadata) {
|
45
|
-
this._metadata = metadata;
|
46
|
-
if (this._dataUnit) {
|
47
|
-
this._dataUnit.metadata = this._metadata;
|
48
|
-
}
|
49
|
-
}
|
50
|
-
generateUniqueId() {
|
51
|
-
return StringUtils.generateUUID();
|
52
|
-
}
|
53
|
-
metadaLoader() {
|
54
|
-
return Promise.resolve(this._metadata);
|
55
|
-
}
|
56
|
-
dataLoader(_dataUnit, request) {
|
57
|
-
let records = [...this._records];
|
58
|
-
if (request.sort) {
|
59
|
-
request.sort.forEach(sort => {
|
60
|
-
records = records.sort((recordA, recordB) => {
|
61
|
-
const fieldA = recordA[sort.field];
|
62
|
-
const fieldB = recordB[sort.field];
|
63
|
-
const sortFn = this.getSortFn(sort.dataType);
|
64
|
-
return sortFn(fieldA, fieldB) * (sort.mode == SortMode.ASC ? 1 : -1);
|
65
|
-
});
|
66
|
-
});
|
67
|
-
}
|
68
|
-
return Promise.resolve({ records: records });
|
69
|
-
}
|
70
|
-
getSortFn(type) {
|
71
|
-
switch (type) {
|
72
|
-
case DataType.NUMBER:
|
73
|
-
return this.sortNumber;
|
74
|
-
case DataType.DATE:
|
75
|
-
return this.sortDate;
|
76
|
-
case DataType.OBJECT:
|
77
|
-
return this.sortObject;
|
78
|
-
default:
|
79
|
-
return StringUtils.compare;
|
80
|
-
}
|
81
|
-
}
|
82
|
-
sortObject(a, b) {
|
83
|
-
return StringUtils.compare(a["label"], b["label"]);
|
84
|
-
}
|
85
|
-
sortNumber(a, b) {
|
86
|
-
return a - b;
|
87
|
-
}
|
88
|
-
sortDate(a, b) {
|
89
|
-
let timeA = a.getTime(), timeB = b.getTime();
|
90
|
-
return timeA === timeB ? 0 : (timeA < timeB ? -1 : 1);
|
91
|
-
}
|
92
|
-
saveLoader(_dataUnit, changes) {
|
93
|
-
return new Promise((resolve) => {
|
94
|
-
let dataUnitRecords = [];
|
95
|
-
changes.forEach(change => {
|
96
|
-
let { record, updatingFields, operation } = change;
|
97
|
-
let isAdd = false;
|
98
|
-
if (operation === ChangeOperation.INSERT ||
|
99
|
-
operation === ChangeOperation.COPY) {
|
100
|
-
record["__old__id__"] = record["__record__id__"];
|
101
|
-
record["__record__id__"] = this.generateUniqueId();
|
102
|
-
isAdd = true;
|
103
|
-
}
|
104
|
-
const changedRecord = Object.assign(Object.assign({}, record), updatingFields);
|
105
|
-
if (isAdd) {
|
106
|
-
this.records.push(changedRecord);
|
107
|
-
}
|
108
|
-
else {
|
109
|
-
const recordIndex = this.records.findIndex(r => r["__record__id__"] == changedRecord["__record__id__"]);
|
110
|
-
this.records[recordIndex] = changedRecord;
|
111
|
-
}
|
112
|
-
dataUnitRecords.push(changedRecord);
|
113
|
-
});
|
114
|
-
resolve(dataUnitRecords);
|
115
|
-
});
|
116
|
-
}
|
117
|
-
removeLoader(_dataUnit, recordIds) {
|
118
|
-
return new Promise((resolve) => {
|
119
|
-
this._records = this._records.filter(record => !recordIds.includes(record["__record__id__"]));
|
120
|
-
resolve(recordIds);
|
121
|
-
});
|
122
|
-
}
|
123
|
-
}
|
124
|
-
|
125
|
-
const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:auto;row-gap:12px;height:100%;width:100%}.simple-crud__taskbar.sc-snk-simple-crud{z-index:var(--more-visible, 2);margin-bottom:var(--space--medium)}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;min-height:300px}ez-form.sc-snk-simple-crud{min-height:300px}";
|
126
|
-
|
127
|
-
const SnkSimpleCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
128
|
-
constructor() {
|
129
|
-
super();
|
130
|
-
this.__registerHost();
|
131
|
-
this.dataStateChange = createEvent(this, "dataStateChange", 3);
|
132
|
-
this.dataUnitReady = createEvent(this, "dataUnitReady", 3);
|
133
|
-
this.REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER"];
|
134
|
-
this.REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER"];
|
135
|
-
this._taskbarProcessor = new TaskbarProcessor({
|
136
|
-
"snkSimpleCrudTaskbar.form_regular": this.resolveInMemoryBtns(this.REGULAR_DEFAULT_BTNS).concat(TaskbarElement.GRID_MODE),
|
137
|
-
"snkSimpleCrudTaskbar.grid_regular": this.resolveInMemoryBtns(this.REGULAR_DEFAULT_BTNS).concat(TaskbarElement.FORM_MODE),
|
138
|
-
"snkSimpleCrudTaskbar.form_selected": this.resolveInMemoryBtns(this.REGULAR_SELECTED_BTNS).concat(TaskbarElement.GRID_MODE),
|
139
|
-
"snkSimpleCrudTaskbar.grid_selected": this.resolveInMemoryBtns(this.REGULAR_SELECTED_BTNS).concat(TaskbarElement.FORM_MODE),
|
140
|
-
"snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
141
|
-
});
|
142
|
-
this._currentViewMode = VIEW_MODE.GRID;
|
143
|
-
this._config = undefined;
|
144
|
-
this.dataState = undefined;
|
145
|
-
this.dataUnit = undefined;
|
146
|
-
this.mode = SIMPLE_CRUD_MODE.SERVER;
|
147
|
-
this.taskbarManager = undefined;
|
148
|
-
this.messagesBuilder = undefined;
|
149
|
-
}
|
150
|
-
resolveInMemoryBtns(taskbarButtons) {
|
151
|
-
const newTaskBarConfig = [...taskbarButtons];
|
152
|
-
if (this.mode === SIMPLE_CRUD_MODE.IN_MEMORY) {
|
153
|
-
newTaskBarConfig.splice(1, 1);
|
154
|
-
}
|
155
|
-
return newTaskBarConfig;
|
156
|
-
}
|
157
|
-
/**
|
158
|
-
* Usado para alternar a visão entre GRID e FORM externamente.
|
159
|
-
*/
|
160
|
-
async goToView(view) {
|
161
|
-
this._currentViewMode = view;
|
162
|
-
if (this._viewStack) {
|
163
|
-
this._viewStack.show(view);
|
164
|
-
}
|
165
|
-
}
|
166
|
-
actionClickListener(evt) {
|
167
|
-
const act = evt.detail;
|
168
|
-
if (act === TaskbarElement.GRID_MODE) {
|
169
|
-
this.goToView(VIEW_MODE.GRID);
|
170
|
-
}
|
171
|
-
else if (act === TaskbarElement.FORM_MODE) {
|
172
|
-
this.goToView(VIEW_MODE.FORM);
|
173
|
-
}
|
174
|
-
evt.stopPropagation();
|
175
|
-
}
|
176
|
-
onModeChange() {
|
177
|
-
if (this.mode == SIMPLE_CRUD_MODE.IN_MEMORY) {
|
178
|
-
this.initInMemoryDataUnit();
|
179
|
-
}
|
180
|
-
}
|
181
|
-
observeDataState(newValue, oldValue) {
|
182
|
-
if (ObjectUtils.objectToString(oldValue) != ObjectUtils.objectToString(newValue)) {
|
183
|
-
this.dataStateChange.emit(newValue);
|
184
|
-
}
|
185
|
-
}
|
186
|
-
componentWillRender() {
|
187
|
-
this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
|
188
|
-
}
|
189
|
-
componentWillLoad() {
|
190
|
-
this.processMetadata();
|
191
|
-
this.onModeChange();
|
192
|
-
}
|
193
|
-
getTaskBarId() {
|
194
|
-
var _a, _b, _c;
|
195
|
-
if ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
|
196
|
-
return "snkSimpleCrudTaskbar.finish_edition";
|
197
|
-
}
|
198
|
-
if (((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.selectionInfo) &&
|
199
|
-
!this.dataState.selectionInfo.isAllRecords() &&
|
200
|
-
((_c = this.dataState.selectionInfo.records) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
201
|
-
return this._currentViewMode === VIEW_MODE.GRID ? "snkSimpleCrudTaskbar.grid_selected" : "snkSimpleCrudTaskbar.form_selected";
|
202
|
-
}
|
203
|
-
return this._currentViewMode === VIEW_MODE.GRID ? "snkSimpleCrudTaskbar.grid_regular" : "snkSimpleCrudTaskbar.form_regular";
|
204
|
-
}
|
205
|
-
initInMemoryDataUnit() {
|
206
|
-
this._inMemoryLoader = new InMemoryLoader(this._metadata);
|
207
|
-
this.dataUnit = this._inMemoryLoader.dataUnit;
|
208
|
-
this.dataUnitReady.emit(this.dataUnit);
|
209
|
-
}
|
210
|
-
setMetadata(metadata) {
|
211
|
-
if (this._inMemoryLoader) {
|
212
|
-
this._inMemoryLoader.metadata = metadata;
|
213
|
-
}
|
214
|
-
else if (this.dataUnit) {
|
215
|
-
this.dataUnit.metadata = metadata;
|
216
|
-
}
|
217
|
-
return Promise.resolve();
|
218
|
-
}
|
219
|
-
setRecords(records) {
|
220
|
-
if (this._inMemoryLoader) {
|
221
|
-
this._inMemoryLoader.records = records;
|
222
|
-
}
|
223
|
-
else if (this.dataUnit) {
|
224
|
-
this.dataUnit.records = records;
|
225
|
-
}
|
226
|
-
return Promise.resolve();
|
227
|
-
}
|
228
|
-
getRecords() {
|
229
|
-
return Promise.resolve(this.dataUnit.records);
|
230
|
-
}
|
231
|
-
processMetadata() {
|
232
|
-
const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
|
233
|
-
const fieldMetadata = [];
|
234
|
-
const formConfig = { fields: [], emptyConfig: false };
|
235
|
-
fieldsMetadataElem.forEach(fieldElem => {
|
236
|
-
const field = {
|
237
|
-
name: fieldElem.getAttribute("name") || fieldElem.getAttribute("label"),
|
238
|
-
label: fieldElem.getAttribute("label"),
|
239
|
-
dataType: DataType[fieldElem.getAttribute("dataType")] || DataType.TEXT,
|
240
|
-
userInterface: UserInterface[fieldElem.getAttribute("userInterface")] || UserInterface.SHORTTEXT,
|
241
|
-
readOnly: fieldElem.getAttribute("readOnly") == "true",
|
242
|
-
required: fieldElem.getAttribute("required") == "true",
|
243
|
-
tab: fieldElem.getAttribute("tab") || undefined,
|
244
|
-
visible: fieldElem.getAttribute("visible") != "false"
|
245
|
-
};
|
246
|
-
const fieldConfig = { name: field.name, tab: field.tab, visible: field.visible };
|
247
|
-
formConfig.fields.push(fieldConfig);
|
248
|
-
fieldMetadata.push(field);
|
249
|
-
});
|
250
|
-
if (fieldMetadata.length > 0) {
|
251
|
-
this._config = formConfig;
|
252
|
-
this._metadata = {
|
253
|
-
name: "SimpleCrud",
|
254
|
-
label: "SimpleCrud",
|
255
|
-
fields: fieldMetadata
|
256
|
-
};
|
257
|
-
}
|
258
|
-
}
|
259
|
-
onDataStateChange(evt) {
|
260
|
-
this.dataState = Object.assign({}, evt.detail);
|
261
|
-
}
|
262
|
-
getTaskBarDisabledButtons() {
|
263
|
-
var _a, _b;
|
264
|
-
const disabledButtons = [];
|
265
|
-
if (!((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.hasNext)) {
|
266
|
-
disabledButtons.push(TaskbarElement.NEXT);
|
267
|
-
}
|
268
|
-
if (!((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.hasPrevious)) {
|
269
|
-
disabledButtons.push(TaskbarElement.PREVIOUS);
|
270
|
-
}
|
271
|
-
return disabledButtons;
|
272
|
-
}
|
273
|
-
render() {
|
274
|
-
var _a;
|
275
|
-
return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, onDataStateChange: evt => this.onDataStateChange(evt), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-flex ez-box ez-box--shadow" }, h("snk-taskbar", { class: "simple-crud__taskbar ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }), h("ez-view-stack", { class: "ez-flex ez-flex--column", ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { dataUnit: this.dataUnit, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), "no-header": true }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { dataUnit: this.dataUnit, config: this._config }))))));
|
276
|
-
}
|
277
|
-
get _element() { return this; }
|
278
|
-
static get watchers() { return {
|
279
|
-
"mode": ["onModeChange"],
|
280
|
-
"dataState": ["observeDataState"]
|
281
|
-
}; }
|
282
|
-
static get style() { return snkSimpleCrudCss; }
|
283
|
-
}, [6, "snk-simple-crud", {
|
284
|
-
"dataState": [16],
|
285
|
-
"dataUnit": [16],
|
286
|
-
"mode": [2],
|
287
|
-
"taskbarManager": [16],
|
288
|
-
"messagesBuilder": [1040],
|
289
|
-
"_currentViewMode": [32],
|
290
|
-
"_config": [32],
|
291
|
-
"goToView": [64],
|
292
|
-
"setMetadata": [64],
|
293
|
-
"setRecords": [64],
|
294
|
-
"getRecords": [64]
|
295
|
-
}, [[0, "actionClick", "actionClickListener"]]]);
|
296
|
-
function defineCustomElement$1() {
|
297
|
-
if (typeof customElements === "undefined") {
|
298
|
-
return;
|
299
|
-
}
|
300
|
-
const components = ["snk-simple-crud", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-taskbar"];
|
301
|
-
components.forEach(tagName => { switch (tagName) {
|
302
|
-
case "snk-simple-crud":
|
303
|
-
if (!customElements.get(tagName)) {
|
304
|
-
customElements.define(tagName, SnkSimpleCrud$1);
|
305
|
-
}
|
306
|
-
break;
|
307
|
-
case "snk-data-exporter":
|
308
|
-
if (!customElements.get(tagName)) {
|
309
|
-
defineCustomElement$5();
|
310
|
-
}
|
311
|
-
break;
|
312
|
-
case "snk-data-unit":
|
313
|
-
if (!customElements.get(tagName)) {
|
314
|
-
defineCustomElement$4();
|
315
|
-
}
|
316
|
-
break;
|
317
|
-
case "snk-exporter-email-sender":
|
318
|
-
if (!customElements.get(tagName)) {
|
319
|
-
defineCustomElement$3();
|
320
|
-
}
|
321
|
-
break;
|
322
|
-
case "snk-taskbar":
|
323
|
-
if (!customElements.get(tagName)) {
|
324
|
-
defineCustomElement$2();
|
325
|
-
}
|
326
|
-
break;
|
327
|
-
} });
|
328
|
-
}
|
1
|
+
import { S as SnkSimpleCrud$1, d as defineCustomElement$1 } from './snk-simple-crud2.js';
|
329
2
|
|
330
3
|
const SnkSimpleCrud = SnkSimpleCrud$1;
|
331
4
|
const defineCustomElement = defineCustomElement$1;
|
@@ -1,13 +1,14 @@
|
|
1
|
-
import {
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
2
2
|
import { DataUnit, StringUtils, SortMode, DataType, ChangeOperation, ObjectUtils, UserInterface } from '@sankhyalabs/core';
|
3
|
-
import {
|
4
|
-
import { T as TaskbarElement } from './
|
5
|
-
import './DataFetcher
|
6
|
-
import './pesquisa-fetcher
|
7
|
-
import { P as PresentationMode } from './
|
8
|
-
import { T as TaskbarProcessor } from './taskbar-processor
|
9
|
-
import './
|
10
|
-
import './
|
3
|
+
import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants.js';
|
4
|
+
import { T as TaskbarElement, d as defineCustomElement$1 } from './snk-taskbar2.js';
|
5
|
+
import './DataFetcher.js';
|
6
|
+
import './pesquisa-fetcher.js';
|
7
|
+
import { P as PresentationMode } from './index2.js';
|
8
|
+
import { T as TaskbarProcessor } from './taskbar-processor.js';
|
9
|
+
import { d as defineCustomElement$4 } from './snk-data-exporter2.js';
|
10
|
+
import { d as defineCustomElement$3 } from './snk-data-unit2.js';
|
11
|
+
import { d as defineCustomElement$2 } from './snk-exporter-email-sender2.js';
|
11
12
|
|
12
13
|
class InMemoryLoader {
|
13
14
|
constructor(metadata, records) {
|
@@ -123,9 +124,10 @@ class InMemoryLoader {
|
|
123
124
|
|
124
125
|
const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:auto;row-gap:12px;height:100%;width:100%}.simple-crud__taskbar.sc-snk-simple-crud{z-index:var(--more-visible, 2);margin-bottom:var(--space--medium)}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;min-height:300px}ez-form.sc-snk-simple-crud{min-height:300px}";
|
125
126
|
|
126
|
-
const SnkSimpleCrud = class {
|
127
|
-
constructor(
|
128
|
-
|
127
|
+
const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
128
|
+
constructor() {
|
129
|
+
super();
|
130
|
+
this.__registerHost();
|
129
131
|
this.dataStateChange = createEvent(this, "dataStateChange", 3);
|
130
132
|
this.dataUnitReady = createEvent(this, "dataUnitReady", 3);
|
131
133
|
this.REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER"];
|
@@ -142,6 +144,9 @@ const SnkSimpleCrud = class {
|
|
142
144
|
this.dataState = undefined;
|
143
145
|
this.dataUnit = undefined;
|
144
146
|
this.mode = SIMPLE_CRUD_MODE.SERVER;
|
147
|
+
this.gridConfig = undefined;
|
148
|
+
this.formConfig = undefined;
|
149
|
+
this.useCancelConfirm = true;
|
145
150
|
this.taskbarManager = undefined;
|
146
151
|
this.messagesBuilder = undefined;
|
147
152
|
}
|
@@ -246,7 +251,9 @@ const SnkSimpleCrud = class {
|
|
246
251
|
fieldMetadata.push(field);
|
247
252
|
});
|
248
253
|
if (fieldMetadata.length > 0) {
|
249
|
-
this.
|
254
|
+
if (!this.formConfig) {
|
255
|
+
this.formConfig = formConfig;
|
256
|
+
}
|
250
257
|
this._metadata = {
|
251
258
|
name: "SimpleCrud",
|
252
259
|
label: "SimpleCrud",
|
@@ -270,14 +277,62 @@ const SnkSimpleCrud = class {
|
|
270
277
|
}
|
271
278
|
render() {
|
272
279
|
var _a;
|
273
|
-
return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, onDataStateChange: evt => this.onDataStateChange(evt), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-flex ez-box ez-box--shadow" }, h("snk-taskbar", { class: "simple-crud__taskbar ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }), h("ez-view-stack", { class: "ez-flex ez-flex--column", ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { dataUnit: this.dataUnit, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), "no-header": true }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { dataUnit: this.dataUnit, config: this.
|
280
|
+
return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-flex ez-box ez-box--shadow" }, h("snk-taskbar", { class: "simple-crud__taskbar ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }), h("ez-view-stack", { class: "ez-flex ez-flex--column", ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { dataUnit: this.dataUnit, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), config: this.gridConfig, "no-header": true }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { dataUnit: this.dataUnit, config: this.formConfig }))))));
|
274
281
|
}
|
275
|
-
get _element() { return
|
282
|
+
get _element() { return this; }
|
276
283
|
static get watchers() { return {
|
277
284
|
"mode": ["onModeChange"],
|
278
285
|
"dataState": ["observeDataState"]
|
279
286
|
}; }
|
280
|
-
}
|
281
|
-
|
287
|
+
static get style() { return snkSimpleCrudCss; }
|
288
|
+
}, [6, "snk-simple-crud", {
|
289
|
+
"dataState": [16],
|
290
|
+
"dataUnit": [16],
|
291
|
+
"mode": [2],
|
292
|
+
"gridConfig": [16],
|
293
|
+
"formConfig": [16],
|
294
|
+
"useCancelConfirm": [4, "use-cancel-confirm"],
|
295
|
+
"taskbarManager": [16],
|
296
|
+
"messagesBuilder": [1040],
|
297
|
+
"_currentViewMode": [32],
|
298
|
+
"_config": [32],
|
299
|
+
"goToView": [64],
|
300
|
+
"setMetadata": [64],
|
301
|
+
"setRecords": [64],
|
302
|
+
"getRecords": [64]
|
303
|
+
}, [[0, "actionClick", "actionClickListener"]]]);
|
304
|
+
function defineCustomElement() {
|
305
|
+
if (typeof customElements === "undefined") {
|
306
|
+
return;
|
307
|
+
}
|
308
|
+
const components = ["snk-simple-crud", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-taskbar"];
|
309
|
+
components.forEach(tagName => { switch (tagName) {
|
310
|
+
case "snk-simple-crud":
|
311
|
+
if (!customElements.get(tagName)) {
|
312
|
+
customElements.define(tagName, SnkSimpleCrud);
|
313
|
+
}
|
314
|
+
break;
|
315
|
+
case "snk-data-exporter":
|
316
|
+
if (!customElements.get(tagName)) {
|
317
|
+
defineCustomElement$4();
|
318
|
+
}
|
319
|
+
break;
|
320
|
+
case "snk-data-unit":
|
321
|
+
if (!customElements.get(tagName)) {
|
322
|
+
defineCustomElement$3();
|
323
|
+
}
|
324
|
+
break;
|
325
|
+
case "snk-exporter-email-sender":
|
326
|
+
if (!customElements.get(tagName)) {
|
327
|
+
defineCustomElement$2();
|
328
|
+
}
|
329
|
+
break;
|
330
|
+
case "snk-taskbar":
|
331
|
+
if (!customElements.get(tagName)) {
|
332
|
+
defineCustomElement$1();
|
333
|
+
}
|
334
|
+
break;
|
335
|
+
} });
|
336
|
+
}
|
282
337
|
|
283
|
-
export { SnkSimpleCrud as
|
338
|
+
export { SnkSimpleCrud as S, defineCustomElement as d };
|
@@ -217,6 +217,7 @@ var TaskbarElement;
|
|
217
217
|
TaskbarElement["DIVIDER"] = "DIVIDER";
|
218
218
|
TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
|
219
219
|
TaskbarElement["DATA_EXPORTER"] = "DATA_EXPORTER";
|
220
|
+
TaskbarElement["ATTACH"] = "ATTACH";
|
220
221
|
})(TaskbarElement || (TaskbarElement = {}));
|
221
222
|
var AuthorizationElements;
|
222
223
|
(function (AuthorizationElements) {
|
@@ -289,6 +290,8 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
289
290
|
case TaskbarElement.DATA_EXPORTER:
|
290
291
|
const provider = (_a = store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
|
291
292
|
return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId });
|
293
|
+
case TaskbarElement.ATTACH:
|
294
|
+
return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
|
292
295
|
}
|
293
296
|
};
|
294
297
|
function textButton(name, className, dataElementId, text, title, action, isEnabled) {
|
@@ -327,7 +330,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
327
330
|
[TaskbarElement.SAVE]: "snkTaskbar.titleSave",
|
328
331
|
[TaskbarElement.GRID_MODE]: "snkTaskbar.titleGridMode",
|
329
332
|
[TaskbarElement.FORM_MODE]: "snkTaskbar.titleFormMode",
|
330
|
-
[TaskbarElement.CONFIGURATOR]: "snkTaskbar.titleConfigurator"
|
333
|
+
[TaskbarElement.CONFIGURATOR]: "snkTaskbar.titleConfigurator",
|
334
|
+
[TaskbarElement.ATTACH]: "snkTaskbar.titleAttach",
|
331
335
|
};
|
332
336
|
this._permissions = undefined;
|
333
337
|
this.configName = undefined;
|
@@ -434,7 +438,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
434
438
|
if (index > 1) {
|
435
439
|
className += "ez-padding-left--medium";
|
436
440
|
}
|
437
|
-
|
441
|
+
const taskbarElement = TaskbarElement[def.toString()];
|
442
|
+
if (taskbarElement) {
|
438
443
|
return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.actionsList, this.configName, this.presentationMode);
|
439
444
|
}
|
440
445
|
else {
|
@@ -73,6 +73,7 @@ const snkTaskbarMessages = {
|
|
73
73
|
titleGridMode: "Modo Grade",
|
74
74
|
titleFormMode: "Modo Formulário",
|
75
75
|
titleConfigurator: "Configurações",
|
76
|
+
titleAttach: "Anexar",
|
76
77
|
forbidden: "Permissão não liberada"
|
77
78
|
};
|
78
79
|
|
@@ -278,6 +279,37 @@ const snkFilterFieldSearchMessages = {
|
|
278
279
|
linkLabel: "Categorias de {{link}}",
|
279
280
|
};
|
280
281
|
|
282
|
+
const snkSimpleBarMessages = {
|
283
|
+
backTitle: "Voltar"
|
284
|
+
};
|
285
|
+
|
286
|
+
const snkAttachMessages = {
|
287
|
+
title: "Anexar arquivos",
|
288
|
+
description: "Faça o upload dos arquivos ou informe links que deseja anexar ao título",
|
289
|
+
attachHint: "Fazer download do arquivo",
|
290
|
+
breadcrumbTitle: "Anexar",
|
291
|
+
finishedMessage: "O anexo foi finalizado com sucesso",
|
292
|
+
finish: "Finalizar",
|
293
|
+
cancelConfirmation: {
|
294
|
+
title: "Atenção",
|
295
|
+
message: "As alterações realizadas não serão aplicadas.<br/><br/><b>Deseja mesmo continuar?</b>",
|
296
|
+
},
|
297
|
+
alertValidation: {
|
298
|
+
fileAndLinkAtTheSameTime: {
|
299
|
+
title: "Atenção",
|
300
|
+
message: "Não é permitido inserir o arquivo e o link ao mesmo tempo."
|
301
|
+
},
|
302
|
+
anyLinkOrFileFilled: {
|
303
|
+
title: "Atenção",
|
304
|
+
message: `É necessário preencher o campo "Link" ou anexar um arquivo.`
|
305
|
+
}
|
306
|
+
},
|
307
|
+
taskbar: {
|
308
|
+
titleDownload: "Fazer download",
|
309
|
+
titleLink: "Abrir link",
|
310
|
+
}
|
311
|
+
};
|
312
|
+
|
281
313
|
class SnkMessageBuilder {
|
282
314
|
constructor(domainName) {
|
283
315
|
this._defaults = {
|
@@ -297,7 +329,9 @@ class SnkMessageBuilder {
|
|
297
329
|
snkCrud: snkCrudMessages,
|
298
330
|
fileViewer: fileViewerMessages,
|
299
331
|
snkFilterParamConfig: snkFilterParamConfigMessages,
|
300
|
-
snkFilterFieldSearch: snkFilterFieldSearchMessages
|
332
|
+
snkFilterFieldSearch: snkFilterFieldSearchMessages,
|
333
|
+
snkSimpleBar: snkSimpleBarMessages,
|
334
|
+
snkAttach: snkAttachMessages,
|
301
335
|
};
|
302
336
|
this._currentOperation = OperationMap.CLEAN;
|
303
337
|
this._domainName = domainName;
|