@sankhyalabs/sankhyablocks 8.15.0-dev.4 → 8.15.0-dev.6
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/{dataunit-fetcher-de65b9fc.js → dataunit-fetcher-bd4c52da.js} +11 -6
- package/dist/cjs/snk-actions-button_2.cjs.entry.js +16 -2
- package/dist/cjs/snk-application.cjs.entry.js +1 -1
- package/dist/cjs/snk-attach.cjs.entry.js +9 -2
- package/dist/cjs/snk-crud.cjs.entry.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +2 -2
- package/dist/cjs/{snk-guides-viewer-7f9b6d94.js → snk-guides-viewer-cb176c4d.js} +2 -2
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +2 -2
- package/dist/cjs/snk-simple-crud.cjs.entry.js +1 -1
- package/dist/collection/components/snk-attach/snk-attach.js +8 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +15 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +11 -6
- package/dist/components/dataunit-fetcher.js +11 -6
- package/dist/components/snk-attach2.js +8 -1
- package/dist/components/snk-detail-view2.js +1 -1
- package/dist/components/taskbar-actions-button2.js +15 -1
- package/dist/esm/{dataunit-fetcher-e218c6d2.js → dataunit-fetcher-65714f21.js} +11 -6
- package/dist/esm/snk-actions-button_2.entry.js +16 -2
- package/dist/esm/snk-application.entry.js +1 -1
- package/dist/esm/snk-attach.entry.js +9 -2
- package/dist/esm/snk-crud.entry.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +2 -2
- package/dist/esm/{snk-guides-viewer-9d5e073f.js → snk-guides-viewer-eeb8f354.js} +2 -2
- package/dist/esm/snk-guides-viewer.entry.js +2 -2
- package/dist/esm/snk-simple-crud.entry.js +1 -1
- package/dist/sankhyablocks/{p-a87229cd.entry.js → p-0dca29cb.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ba627e85.js → p-29804fc5.js} +1 -1
- package/dist/sankhyablocks/{p-0d084a0f.entry.js → p-6d20d38c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7f9d6b5d.entry.js → p-7d51d949.entry.js} +1 -1
- package/dist/sankhyablocks/{p-d1007720.entry.js → p-95a3778f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4b0938f6.entry.js → p-b146a9f0.entry.js} +1 -1
- package/dist/sankhyablocks/p-bedb8ad6.entry.js +1 -0
- package/dist/sankhyablocks/{p-143425c0.entry.js → p-ca4d337a.entry.js} +1 -1
- package/dist/sankhyablocks/p-d1f5bc50.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-8437508f.js +0 -1
- package/dist/sankhyablocks/p-e3132789.entry.js +0 -1
@@ -200,13 +200,21 @@ class DatasetStrategy {
|
|
200
200
|
getFieldsList(dataUnit) {
|
201
201
|
let fields = ["__record__id__", "__record__label__"];
|
202
202
|
dataUnit.metadata.fields.forEach((descriptor) => {
|
203
|
-
if (descriptor.standAlone)
|
203
|
+
if (descriptor.standAlone)
|
204
204
|
return;
|
205
|
-
}
|
206
205
|
fields = fields.concat(this.getFieldNames(descriptor));
|
207
206
|
});
|
208
207
|
return fields;
|
209
208
|
}
|
209
|
+
getStandAloneFieldsList(dataUnit) {
|
210
|
+
let fields = {};
|
211
|
+
dataUnit.metadata.fields.forEach((currentField) => {
|
212
|
+
if (!currentField.standAlone)
|
213
|
+
return;
|
214
|
+
fields = Object.assign(Object.assign({}, fields), { [currentField.name]: { fieldType: currentField.dataType, userType: currentField.userInterface } });
|
215
|
+
});
|
216
|
+
return fields;
|
217
|
+
}
|
210
218
|
getFieldNames(descriptor) {
|
211
219
|
const descriptionField = this.getSearchDescriptionField(descriptor);
|
212
220
|
if (descriptionField == undefined) {
|
@@ -229,10 +237,7 @@ class DatasetStrategy {
|
|
229
237
|
totalRecordsCount: loadingInfo.count,
|
230
238
|
pagerID: loadingInfo.pagerId,
|
231
239
|
standAlone: false,
|
232
|
-
standAloneFieldsMD: {
|
233
|
-
__record__id__: { "fieldType": "S", "userType": "P" },
|
234
|
-
__record__label__: { "fieldType": "S", "userType": "P" }
|
235
|
-
},
|
240
|
+
standAloneFieldsMD: Object.assign({ __record__id__: { "fieldType": "S", "userType": "P" }, __record__label__: { "fieldType": "S", "userType": "P" } }, this.getStandAloneFieldsList(dataUnit)),
|
236
241
|
tryJoinedFields: true,
|
237
242
|
parallelLoader: useParallelLoader,
|
238
243
|
crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
|
@@ -11,7 +11,7 @@ require('./index-0922807b.js');
|
|
11
11
|
require('./ISave-d68ce3cd.js');
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
14
|
-
require('./dataunit-fetcher-
|
14
|
+
require('./dataunit-fetcher-bd4c52da.js');
|
15
15
|
require('./PreloadManager-84466da6.js');
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
17
17
|
require('./form-config-fetcher-df043d3d.js');
|
@@ -783,12 +783,26 @@ const TaskbarActionsButton = class {
|
|
783
783
|
return this._showDropdown && ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
784
784
|
}
|
785
785
|
onSelectAction(iAction) {
|
786
|
-
const
|
786
|
+
const actions = this.actions.map(action => (Object.assign(Object.assign({}, action), { id: action.value })));
|
787
|
+
const selectedAction = this.getSelectedAction(iAction.id, actions);
|
787
788
|
this.taskbarActionSelected.emit(selectedAction);
|
788
789
|
if (!selectedAction.disableCloseOnSelect) {
|
789
790
|
this._showDropdown = false;
|
790
791
|
}
|
791
792
|
}
|
793
|
+
getSelectedAction(id, actions) {
|
794
|
+
let selectedItem;
|
795
|
+
for (const item of actions) {
|
796
|
+
if (item.id === id) {
|
797
|
+
selectedItem = item;
|
798
|
+
break;
|
799
|
+
}
|
800
|
+
if (!(item === null || item === void 0 ? void 0 : item.children))
|
801
|
+
continue;
|
802
|
+
selectedItem = this.getSelectedAction(id, item.children);
|
803
|
+
}
|
804
|
+
return selectedItem;
|
805
|
+
}
|
792
806
|
dropdownItemBuilder(item, _level) {
|
793
807
|
const itemAction = this.actions.find(action => action.value === item.id);
|
794
808
|
if (!itemAction || !itemAction.itemBuilder) {
|
@@ -8,7 +8,7 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const ConfigStorage = require('./ConfigStorage-8009ecb2.js');
|
9
9
|
const DataFetcher = require('./DataFetcher-ba94ed5b.js');
|
10
10
|
const authFetcher = require('./auth-fetcher-c8467c07.js');
|
11
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
11
|
+
const dataunitFetcher = require('./dataunit-fetcher-bd4c52da.js');
|
12
12
|
const pesquisaFetcher = require('./pesquisa-fetcher-ef050a47.js');
|
13
13
|
const SnkMessageBuilder = require('./SnkMessageBuilder-7293d0ad.js');
|
14
14
|
require('./form-config-fetcher-df043d3d.js');
|
@@ -7,7 +7,7 @@ const core = require('@sankhyalabs/core');
|
|
7
7
|
const DataFetcher = require('./DataFetcher-ba94ed5b.js');
|
8
8
|
const ISave = require('./ISave-d68ce3cd.js');
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
10
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
10
|
+
const dataunitFetcher = require('./dataunit-fetcher-bd4c52da.js');
|
11
11
|
const PreloadManager = require('./PreloadManager-84466da6.js');
|
12
12
|
const taskbarElements = require('./taskbar-elements-01b85b99.js');
|
13
13
|
require('./PrintUtils-bcaeb82f.js');
|
@@ -376,6 +376,9 @@ const SnkAttach = class {
|
|
376
376
|
}
|
377
377
|
registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
378
378
|
var _a;
|
379
|
+
if (this.dataUnit == null) {
|
380
|
+
this.loadAttachmentDataUnit();
|
381
|
+
}
|
379
382
|
if (oldRegisterKey !== newRegisterKey) {
|
380
383
|
this.returnToGridMode();
|
381
384
|
this._attachFetcher = new AttachFetcher(this.entityName, this.registerKey, (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
@@ -446,7 +449,11 @@ const SnkAttach = class {
|
|
446
449
|
}
|
447
450
|
componentWillLoad() {
|
448
451
|
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
449
|
-
|
452
|
+
}
|
453
|
+
componentWillRender() {
|
454
|
+
if (this.dataUnit == null) {
|
455
|
+
this.loadAttachmentDataUnit();
|
456
|
+
}
|
450
457
|
}
|
451
458
|
render() {
|
452
459
|
var _a, _b;
|
@@ -11,7 +11,7 @@ const index$1 = require('./index-0922807b.js');
|
|
11
11
|
require('./ISave-d68ce3cd.js');
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
14
|
-
require('./dataunit-fetcher-
|
14
|
+
require('./dataunit-fetcher-bd4c52da.js');
|
15
15
|
require('./PreloadManager-84466da6.js');
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
17
17
|
require('./form-config-fetcher-df043d3d.js');
|
@@ -12,13 +12,13 @@ const index$1 = require('./index-0922807b.js');
|
|
12
12
|
require('./ISave-d68ce3cd.js');
|
13
13
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
15
|
-
require('./dataunit-fetcher-
|
15
|
+
require('./dataunit-fetcher-bd4c52da.js');
|
16
16
|
require('./PreloadManager-84466da6.js');
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
18
18
|
require('./form-config-fetcher-df043d3d.js');
|
19
19
|
const taskbarElements = require('./taskbar-elements-01b85b99.js');
|
20
20
|
const constants = require('./constants-35ddd366.js');
|
21
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
21
|
+
const snkGuidesViewer = require('./snk-guides-viewer-cb176c4d.js');
|
22
22
|
const SnkMessageBuilder = require('./SnkMessageBuilder-7293d0ad.js');
|
23
23
|
require('./ConfigStorage-8009ecb2.js');
|
24
24
|
require('./PrintUtils-bcaeb82f.js');
|
@@ -13,7 +13,7 @@ const index$1 = require('./index-0922807b.js');
|
|
13
13
|
require('./ISave-d68ce3cd.js');
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
16
|
-
require('./dataunit-fetcher-
|
16
|
+
require('./dataunit-fetcher-bd4c52da.js');
|
17
17
|
require('./PreloadManager-84466da6.js');
|
18
18
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
19
19
|
require('./form-config-fetcher-df043d3d.js');
|
@@ -151,7 +151,7 @@ const SnkGuidesViewer = class {
|
|
151
151
|
});
|
152
152
|
this._guides = this._guides.map(guide => {
|
153
153
|
if (guide.id === guideItem.id) {
|
154
|
-
return Object.assign(Object.assign({}, guide), guideItem);
|
154
|
+
return Object.assign(Object.assign(Object.assign({}, guide), guideItem), (guideItem.children !== undefined ? {} : { children: undefined }));
|
155
155
|
}
|
156
156
|
return guide;
|
157
157
|
});
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
5
|
+
const snkGuidesViewer = require('./snk-guides-viewer-cb176c4d.js');
|
6
6
|
require('./index-f9e81701.js');
|
7
7
|
require('@sankhyalabs/core');
|
8
8
|
require('./SnkFormConfigManager-7d850fbc.js');
|
@@ -21,7 +21,7 @@ require('./constants-35ddd366.js');
|
|
21
21
|
require('./pesquisa-fetcher-ef050a47.js');
|
22
22
|
require('./ISave-d68ce3cd.js');
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
24
|
-
require('./dataunit-fetcher-
|
24
|
+
require('./dataunit-fetcher-bd4c52da.js');
|
25
25
|
require('./PreloadManager-84466da6.js');
|
26
26
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
27
27
|
require('./ResourceIDUtils-5ff86aa7.js');
|
@@ -12,7 +12,7 @@ const index$1 = require('./index-0922807b.js');
|
|
12
12
|
require('./ISave-d68ce3cd.js');
|
13
13
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
15
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
15
|
+
const dataunitFetcher = require('./dataunit-fetcher-bd4c52da.js');
|
16
16
|
require('./PreloadManager-84466da6.js');
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
18
18
|
require('./form-config-fetcher-df043d3d.js');
|
@@ -34,6 +34,9 @@ export class SnkAttach {
|
|
34
34
|
}
|
35
35
|
registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
36
36
|
var _a;
|
37
|
+
if (this.dataUnit == null) {
|
38
|
+
this.loadAttachmentDataUnit();
|
39
|
+
}
|
37
40
|
if (oldRegisterKey !== newRegisterKey) {
|
38
41
|
this.returnToGridMode();
|
39
42
|
this._attachFetcher = new AttachFetcher(this.entityName, this.registerKey, (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
@@ -104,7 +107,11 @@ export class SnkAttach {
|
|
104
107
|
}
|
105
108
|
componentWillLoad() {
|
106
109
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
107
|
-
|
110
|
+
}
|
111
|
+
componentWillRender() {
|
112
|
+
if (this.dataUnit == null) {
|
113
|
+
this.loadAttachmentDataUnit();
|
114
|
+
}
|
108
115
|
}
|
109
116
|
render() {
|
110
117
|
var _a, _b;
|
@@ -134,7 +134,7 @@ export class SnkGuidesViewer {
|
|
134
134
|
});
|
135
135
|
this._guides = this._guides.map(guide => {
|
136
136
|
if (guide.id === guideItem.id) {
|
137
|
-
return Object.assign(Object.assign({}, guide), guideItem);
|
137
|
+
return Object.assign(Object.assign(Object.assign({}, guide), guideItem), (guideItem.children !== undefined ? {} : { children: undefined }));
|
138
138
|
}
|
139
139
|
return guide;
|
140
140
|
});
|
@@ -59,12 +59,26 @@ export class TaskbarActionsButton {
|
|
59
59
|
return this._showDropdown && ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
60
60
|
}
|
61
61
|
onSelectAction(iAction) {
|
62
|
-
const
|
62
|
+
const actions = this.actions.map(action => (Object.assign(Object.assign({}, action), { id: action.value })));
|
63
|
+
const selectedAction = this.getSelectedAction(iAction.id, actions);
|
63
64
|
this.taskbarActionSelected.emit(selectedAction);
|
64
65
|
if (!selectedAction.disableCloseOnSelect) {
|
65
66
|
this._showDropdown = false;
|
66
67
|
}
|
67
68
|
}
|
69
|
+
getSelectedAction(id, actions) {
|
70
|
+
let selectedItem;
|
71
|
+
for (const item of actions) {
|
72
|
+
if (item.id === id) {
|
73
|
+
selectedItem = item;
|
74
|
+
break;
|
75
|
+
}
|
76
|
+
if (!(item === null || item === void 0 ? void 0 : item.children))
|
77
|
+
continue;
|
78
|
+
selectedItem = this.getSelectedAction(id, item.children);
|
79
|
+
}
|
80
|
+
return selectedItem;
|
81
|
+
}
|
68
82
|
dropdownItemBuilder(item, _level) {
|
69
83
|
const itemAction = this.actions.find(action => action.value === item.id);
|
70
84
|
if (!itemAction || !itemAction.itemBuilder) {
|
package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js
CHANGED
@@ -51,13 +51,21 @@ export class DatasetStrategy {
|
|
51
51
|
getFieldsList(dataUnit) {
|
52
52
|
let fields = ["__record__id__", "__record__label__"];
|
53
53
|
dataUnit.metadata.fields.forEach((descriptor) => {
|
54
|
-
if (descriptor.standAlone)
|
54
|
+
if (descriptor.standAlone)
|
55
55
|
return;
|
56
|
-
}
|
57
56
|
fields = fields.concat(this.getFieldNames(descriptor));
|
58
57
|
});
|
59
58
|
return fields;
|
60
59
|
}
|
60
|
+
getStandAloneFieldsList(dataUnit) {
|
61
|
+
let fields = {};
|
62
|
+
dataUnit.metadata.fields.forEach((currentField) => {
|
63
|
+
if (!currentField.standAlone)
|
64
|
+
return;
|
65
|
+
fields = Object.assign(Object.assign({}, fields), { [currentField.name]: { fieldType: currentField.dataType, userType: currentField.userInterface } });
|
66
|
+
});
|
67
|
+
return fields;
|
68
|
+
}
|
61
69
|
getFieldNames(descriptor) {
|
62
70
|
const descriptionField = this.getSearchDescriptionField(descriptor);
|
63
71
|
if (descriptionField == undefined) {
|
@@ -80,10 +88,7 @@ export class DatasetStrategy {
|
|
80
88
|
totalRecordsCount: loadingInfo.count,
|
81
89
|
pagerID: loadingInfo.pagerId,
|
82
90
|
standAlone: false,
|
83
|
-
standAloneFieldsMD: {
|
84
|
-
__record__id__: { "fieldType": "S", "userType": "P" },
|
85
|
-
__record__label__: { "fieldType": "S", "userType": "P" }
|
86
|
-
},
|
91
|
+
standAloneFieldsMD: Object.assign({ __record__id__: { "fieldType": "S", "userType": "P" }, __record__label__: { "fieldType": "S", "userType": "P" } }, this.getStandAloneFieldsList(dataUnit)),
|
87
92
|
tryJoinedFields: true,
|
88
93
|
parallelLoader: useParallelLoader,
|
89
94
|
crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
|
@@ -576,13 +576,21 @@ class DatasetStrategy {
|
|
576
576
|
getFieldsList(dataUnit) {
|
577
577
|
let fields = ["__record__id__", "__record__label__"];
|
578
578
|
dataUnit.metadata.fields.forEach((descriptor) => {
|
579
|
-
if (descriptor.standAlone)
|
579
|
+
if (descriptor.standAlone)
|
580
580
|
return;
|
581
|
-
}
|
582
581
|
fields = fields.concat(this.getFieldNames(descriptor));
|
583
582
|
});
|
584
583
|
return fields;
|
585
584
|
}
|
585
|
+
getStandAloneFieldsList(dataUnit) {
|
586
|
+
let fields = {};
|
587
|
+
dataUnit.metadata.fields.forEach((currentField) => {
|
588
|
+
if (!currentField.standAlone)
|
589
|
+
return;
|
590
|
+
fields = Object.assign(Object.assign({}, fields), { [currentField.name]: { fieldType: currentField.dataType, userType: currentField.userInterface } });
|
591
|
+
});
|
592
|
+
return fields;
|
593
|
+
}
|
586
594
|
getFieldNames(descriptor) {
|
587
595
|
const descriptionField = this.getSearchDescriptionField(descriptor);
|
588
596
|
if (descriptionField == undefined) {
|
@@ -605,10 +613,7 @@ class DatasetStrategy {
|
|
605
613
|
totalRecordsCount: loadingInfo.count,
|
606
614
|
pagerID: loadingInfo.pagerId,
|
607
615
|
standAlone: false,
|
608
|
-
standAloneFieldsMD: {
|
609
|
-
__record__id__: { "fieldType": "S", "userType": "P" },
|
610
|
-
__record__label__: { "fieldType": "S", "userType": "P" }
|
611
|
-
},
|
616
|
+
standAloneFieldsMD: Object.assign({ __record__id__: { "fieldType": "S", "userType": "P" }, __record__label__: { "fieldType": "S", "userType": "P" } }, this.getStandAloneFieldsList(dataUnit)),
|
612
617
|
tryJoinedFields: true,
|
613
618
|
parallelLoader: useParallelLoader,
|
614
619
|
crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
|
@@ -371,6 +371,9 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
371
371
|
}
|
372
372
|
registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
373
373
|
var _a;
|
374
|
+
if (this.dataUnit == null) {
|
375
|
+
this.loadAttachmentDataUnit();
|
376
|
+
}
|
374
377
|
if (oldRegisterKey !== newRegisterKey) {
|
375
378
|
this.returnToGridMode();
|
376
379
|
this._attachFetcher = new AttachFetcher(this.entityName, this.registerKey, (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
@@ -441,7 +444,11 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
441
444
|
}
|
442
445
|
componentWillLoad() {
|
443
446
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
444
|
-
|
447
|
+
}
|
448
|
+
componentWillRender() {
|
449
|
+
if (this.dataUnit == null) {
|
450
|
+
this.loadAttachmentDataUnit();
|
451
|
+
}
|
445
452
|
}
|
446
453
|
render() {
|
447
454
|
var _a, _b;
|
@@ -176,7 +176,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
176
176
|
});
|
177
177
|
this._guides = this._guides.map(guide => {
|
178
178
|
if (guide.id === guideItem.id) {
|
179
|
-
return Object.assign(Object.assign({}, guide), guideItem);
|
179
|
+
return Object.assign(Object.assign(Object.assign({}, guide), guideItem), (guideItem.children !== undefined ? {} : { children: undefined }));
|
180
180
|
}
|
181
181
|
return guide;
|
182
182
|
});
|
@@ -67,12 +67,26 @@ const TaskbarActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
67
67
|
return this._showDropdown && ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
68
68
|
}
|
69
69
|
onSelectAction(iAction) {
|
70
|
-
const
|
70
|
+
const actions = this.actions.map(action => (Object.assign(Object.assign({}, action), { id: action.value })));
|
71
|
+
const selectedAction = this.getSelectedAction(iAction.id, actions);
|
71
72
|
this.taskbarActionSelected.emit(selectedAction);
|
72
73
|
if (!selectedAction.disableCloseOnSelect) {
|
73
74
|
this._showDropdown = false;
|
74
75
|
}
|
75
76
|
}
|
77
|
+
getSelectedAction(id, actions) {
|
78
|
+
let selectedItem;
|
79
|
+
for (const item of actions) {
|
80
|
+
if (item.id === id) {
|
81
|
+
selectedItem = item;
|
82
|
+
break;
|
83
|
+
}
|
84
|
+
if (!(item === null || item === void 0 ? void 0 : item.children))
|
85
|
+
continue;
|
86
|
+
selectedItem = this.getSelectedAction(id, item.children);
|
87
|
+
}
|
88
|
+
return selectedItem;
|
89
|
+
}
|
76
90
|
dropdownItemBuilder(item, _level) {
|
77
91
|
const itemAction = this.actions.find(action => action.value === item.id);
|
78
92
|
if (!itemAction || !itemAction.itemBuilder) {
|
@@ -198,13 +198,21 @@ class DatasetStrategy {
|
|
198
198
|
getFieldsList(dataUnit) {
|
199
199
|
let fields = ["__record__id__", "__record__label__"];
|
200
200
|
dataUnit.metadata.fields.forEach((descriptor) => {
|
201
|
-
if (descriptor.standAlone)
|
201
|
+
if (descriptor.standAlone)
|
202
202
|
return;
|
203
|
-
}
|
204
203
|
fields = fields.concat(this.getFieldNames(descriptor));
|
205
204
|
});
|
206
205
|
return fields;
|
207
206
|
}
|
207
|
+
getStandAloneFieldsList(dataUnit) {
|
208
|
+
let fields = {};
|
209
|
+
dataUnit.metadata.fields.forEach((currentField) => {
|
210
|
+
if (!currentField.standAlone)
|
211
|
+
return;
|
212
|
+
fields = Object.assign(Object.assign({}, fields), { [currentField.name]: { fieldType: currentField.dataType, userType: currentField.userInterface } });
|
213
|
+
});
|
214
|
+
return fields;
|
215
|
+
}
|
208
216
|
getFieldNames(descriptor) {
|
209
217
|
const descriptionField = this.getSearchDescriptionField(descriptor);
|
210
218
|
if (descriptionField == undefined) {
|
@@ -227,10 +235,7 @@ class DatasetStrategy {
|
|
227
235
|
totalRecordsCount: loadingInfo.count,
|
228
236
|
pagerID: loadingInfo.pagerId,
|
229
237
|
standAlone: false,
|
230
|
-
standAloneFieldsMD: {
|
231
|
-
__record__id__: { "fieldType": "S", "userType": "P" },
|
232
|
-
__record__label__: { "fieldType": "S", "userType": "P" }
|
233
|
-
},
|
238
|
+
standAloneFieldsMD: Object.assign({ __record__id__: { "fieldType": "S", "userType": "P" }, __record__label__: { "fieldType": "S", "userType": "P" } }, this.getStandAloneFieldsList(dataUnit)),
|
234
239
|
tryJoinedFields: true,
|
235
240
|
parallelLoader: useParallelLoader,
|
236
241
|
crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
|
@@ -7,7 +7,7 @@ import './index-0ece87a6.js';
|
|
7
7
|
import './ISave-4412b20c.js';
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
-
import './dataunit-fetcher-
|
10
|
+
import './dataunit-fetcher-65714f21.js';
|
11
11
|
import './PreloadManager-c1c2f2b4.js';
|
12
12
|
import './filter-item-type.enum-d45e026f.js';
|
13
13
|
import './form-config-fetcher-36219cd3.js';
|
@@ -779,12 +779,26 @@ const TaskbarActionsButton = class {
|
|
779
779
|
return this._showDropdown && ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
780
780
|
}
|
781
781
|
onSelectAction(iAction) {
|
782
|
-
const
|
782
|
+
const actions = this.actions.map(action => (Object.assign(Object.assign({}, action), { id: action.value })));
|
783
|
+
const selectedAction = this.getSelectedAction(iAction.id, actions);
|
783
784
|
this.taskbarActionSelected.emit(selectedAction);
|
784
785
|
if (!selectedAction.disableCloseOnSelect) {
|
785
786
|
this._showDropdown = false;
|
786
787
|
}
|
787
788
|
}
|
789
|
+
getSelectedAction(id, actions) {
|
790
|
+
let selectedItem;
|
791
|
+
for (const item of actions) {
|
792
|
+
if (item.id === id) {
|
793
|
+
selectedItem = item;
|
794
|
+
break;
|
795
|
+
}
|
796
|
+
if (!(item === null || item === void 0 ? void 0 : item.children))
|
797
|
+
continue;
|
798
|
+
selectedItem = this.getSelectedAction(id, item.children);
|
799
|
+
}
|
800
|
+
return selectedItem;
|
801
|
+
}
|
788
802
|
dropdownItemBuilder(item, _level) {
|
789
803
|
const itemAction = this.actions.find(action => action.value === item.id);
|
790
804
|
if (!itemAction || !itemAction.itemBuilder) {
|
@@ -4,7 +4,7 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { C as ConfigStorage } from './ConfigStorage-1244b8b0.js';
|
5
5
|
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-aa159c5a.js';
|
6
6
|
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-c05dc474.js';
|
7
|
-
import { D as DataUnitFetcher } from './dataunit-fetcher-
|
7
|
+
import { D as DataUnitFetcher } from './dataunit-fetcher-65714f21.js';
|
8
8
|
import { P as PesquisaFetcher } from './pesquisa-fetcher-dd3ca0a5.js';
|
9
9
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-ca843d1b.js';
|
10
10
|
import './form-config-fetcher-36219cd3.js';
|
@@ -3,7 +3,7 @@ import { ApplicationContext, DataType, Action } from '@sankhyalabs/core';
|
|
3
3
|
import { D as DataFetcher } from './DataFetcher-aa159c5a.js';
|
4
4
|
import { S as SaveErrorsEnum } from './ISave-4412b20c.js';
|
5
5
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
6
|
-
import { D as DataUnitFetcher } from './dataunit-fetcher-
|
6
|
+
import { D as DataUnitFetcher } from './dataunit-fetcher-65714f21.js';
|
7
7
|
import { P as PreloadManager } from './PreloadManager-c1c2f2b4.js';
|
8
8
|
import { T as TaskbarElement } from './taskbar-elements-d4d0b424.js';
|
9
9
|
import './PrintUtils-3e4ff0f5.js';
|
@@ -372,6 +372,9 @@ const SnkAttach = class {
|
|
372
372
|
}
|
373
373
|
registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
374
374
|
var _a;
|
375
|
+
if (this.dataUnit == null) {
|
376
|
+
this.loadAttachmentDataUnit();
|
377
|
+
}
|
375
378
|
if (oldRegisterKey !== newRegisterKey) {
|
376
379
|
this.returnToGridMode();
|
377
380
|
this._attachFetcher = new AttachFetcher(this.entityName, this.registerKey, (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
@@ -442,7 +445,11 @@ const SnkAttach = class {
|
|
442
445
|
}
|
443
446
|
componentWillLoad() {
|
444
447
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
445
|
-
|
448
|
+
}
|
449
|
+
componentWillRender() {
|
450
|
+
if (this.dataUnit == null) {
|
451
|
+
this.loadAttachmentDataUnit();
|
452
|
+
}
|
446
453
|
}
|
447
454
|
render() {
|
448
455
|
var _a, _b;
|
@@ -7,7 +7,7 @@ import { P as PresentationMode } from './index-0ece87a6.js';
|
|
7
7
|
import './ISave-4412b20c.js';
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
-
import './dataunit-fetcher-
|
10
|
+
import './dataunit-fetcher-65714f21.js';
|
11
11
|
import './PreloadManager-c1c2f2b4.js';
|
12
12
|
import './filter-item-type.enum-d45e026f.js';
|
13
13
|
import './form-config-fetcher-36219cd3.js';
|
@@ -8,13 +8,13 @@ import { P as PresentationMode } from './index-0ece87a6.js';
|
|
8
8
|
import './ISave-4412b20c.js';
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
|
-
import './dataunit-fetcher-
|
11
|
+
import './dataunit-fetcher-65714f21.js';
|
12
12
|
import './PreloadManager-c1c2f2b4.js';
|
13
13
|
import './filter-item-type.enum-d45e026f.js';
|
14
14
|
import './form-config-fetcher-36219cd3.js';
|
15
15
|
import { T as TaskbarElement } from './taskbar-elements-d4d0b424.js';
|
16
16
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
17
|
-
import { S as SnkGuidesViewer } from './snk-guides-viewer-
|
17
|
+
import { S as SnkGuidesViewer } from './snk-guides-viewer-eeb8f354.js';
|
18
18
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-ca843d1b.js';
|
19
19
|
import './ConfigStorage-1244b8b0.js';
|
20
20
|
import './PrintUtils-3e4ff0f5.js';
|
@@ -11,7 +11,7 @@ import { P as PresentationMode } from './index-0ece87a6.js';
|
|
11
11
|
import './ISave-4412b20c.js';
|
12
12
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
13
13
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
14
|
-
import './dataunit-fetcher-
|
14
|
+
import './dataunit-fetcher-65714f21.js';
|
15
15
|
import './PreloadManager-c1c2f2b4.js';
|
16
16
|
import './filter-item-type.enum-d45e026f.js';
|
17
17
|
import './form-config-fetcher-36219cd3.js';
|
@@ -149,7 +149,7 @@ const SnkGuidesViewer = class {
|
|
149
149
|
});
|
150
150
|
this._guides = this._guides.map(guide => {
|
151
151
|
if (guide.id === guideItem.id) {
|
152
|
-
return Object.assign(Object.assign({}, guide), guideItem);
|
152
|
+
return Object.assign(Object.assign(Object.assign({}, guide), guideItem), (guideItem.children !== undefined ? {} : { children: undefined }));
|
153
153
|
}
|
154
154
|
return guide;
|
155
155
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { S as snk_guides_viewer } from './snk-guides-viewer-
|
1
|
+
export { S as snk_guides_viewer } from './snk-guides-viewer-eeb8f354.js';
|
2
2
|
import './index-a7d3d3f1.js';
|
3
3
|
import '@sankhyalabs/core';
|
4
4
|
import './SnkFormConfigManager-9be0e7d4.js';
|
@@ -17,7 +17,7 @@ import './constants-8457af36.js';
|
|
17
17
|
import './pesquisa-fetcher-dd3ca0a5.js';
|
18
18
|
import './ISave-4412b20c.js';
|
19
19
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
20
|
-
import './dataunit-fetcher-
|
20
|
+
import './dataunit-fetcher-65714f21.js';
|
21
21
|
import './PreloadManager-c1c2f2b4.js';
|
22
22
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
23
23
|
import './ResourceIDUtils-a114189a.js';
|
@@ -8,7 +8,7 @@ import { P as PresentationMode } from './index-0ece87a6.js';
|
|
8
8
|
import './ISave-4412b20c.js';
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
|
-
import { I as InMemoryLoader } from './dataunit-fetcher-
|
11
|
+
import { I as InMemoryLoader } from './dataunit-fetcher-65714f21.js';
|
12
12
|
import './PreloadManager-c1c2f2b4.js';
|
13
13
|
import './filter-item-type.enum-d45e026f.js';
|
14
14
|
import './form-config-fetcher-36219cd3.js';
|