@sankhyalabs/sankhyablocks 9.2.0-ms.14 → 9.2.0-ms.16
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/{ClientSideExporterProvider-994f6e26.js → ClientSideExporterProvider-bb0b2273.js} +8 -5
- package/dist/cjs/{ConfigStorage-1931defc.js → ConfigStorage-0ebc800f.js} +2 -2
- package/dist/cjs/{DataFetcher-ad9fb3bb.js → DataFetcher-602cdc72.js} +1 -1
- package/dist/cjs/{ISave-18ffb73e.js → ISave-18205d86.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-65e5288e.js → SnkFormConfigManager-4b651537.js} +2 -2
- package/dist/cjs/{auth-fetcher-afbe69ab.js → auth-fetcher-82317d4d.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-c7253b02.js → dataunit-fetcher-93077a2f.js} +1 -1
- package/dist/cjs/{form-config-fetcher-f6e66d64.js → form-config-fetcher-05d210e7.js} +1 -1
- package/dist/cjs/{index-0ad2baeb.js → index-13d05f03.js} +21 -5
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
- package/dist/cjs/snk-actions-button_8.cjs.entry.js +5 -5
- package/dist/cjs/snk-application.cjs.entry.js +6 -6
- package/dist/cjs/snk-attach.cjs.entry.js +7 -7
- package/dist/cjs/snk-crud.cjs.entry.js +7 -7
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-72715da9.js → snk-data-unit-28d629e4.js} +2 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +9 -9
- package/dist/cjs/snk-entity-list.cjs.entry.js +5 -1
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form_2.cjs.entry.js +4 -4
- package/dist/cjs/snk-grid.cjs.entry.js +75 -48
- package/dist/cjs/{snk-guides-viewer-c23ed218.js → snk-guides-viewer-73d40f42.js} +6 -6
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +4 -4
- package/dist/cjs/snk-pesquisa.cjs.entry.js +4 -4
- package/dist/cjs/snk-simple-crud.cjs.entry.js +9 -9
- package/dist/cjs/snk-taskbar.cjs.entry.js +2 -2
- package/dist/cjs/{taskbar-elements-3b74cd21.js → taskbar-elements-fb5d1e08.js} +1 -1
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +4 -1
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -1
- package/dist/collection/components/snk-grid/snk-grid.js +70 -43
- package/dist/components/ContinuousInsertUtils.js +4 -1
- package/dist/components/DataFetcher.js +1 -1
- package/dist/components/index2.js +21 -5
- package/dist/components/snk-entity-list.js +5 -1
- package/dist/components/snk-grid2.js +67 -40
- package/dist/esm/{ClientSideExporterProvider-7c2781f4.js → ClientSideExporterProvider-21a99af1.js} +8 -5
- package/dist/esm/{ConfigStorage-b5a1dba3.js → ConfigStorage-fc4e3a42.js} +2 -2
- package/dist/esm/{DataFetcher-6f6de657.js → DataFetcher-01ce1a4f.js} +1 -1
- package/dist/esm/{ISave-7ecdca20.js → ISave-d36bade4.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-34fc1dc7.js → SnkFormConfigManager-71dae34e.js} +2 -2
- package/dist/esm/{auth-fetcher-7332a9a9.js → auth-fetcher-2e565c35.js} +1 -1
- package/dist/esm/{dataunit-fetcher-f21cbad0.js → dataunit-fetcher-14ba162b.js} +1 -1
- package/dist/esm/{form-config-fetcher-6ab4e805.js → form-config-fetcher-a1ccc944.js} +1 -1
- package/dist/esm/{index-b72af127.js → index-446f9341.js} +21 -5
- package/dist/esm/pesquisa-grid_2.entry.js +4 -4
- package/dist/esm/snk-actions-button_8.entry.js +5 -5
- package/dist/esm/snk-application.entry.js +6 -6
- package/dist/esm/snk-attach.entry.js +7 -7
- package/dist/esm/snk-crud.entry.js +7 -7
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-d31619fb.js → snk-data-unit-3977725e.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +9 -9
- package/dist/esm/snk-entity-list.entry.js +5 -1
- package/dist/esm/snk-expression-group_2.entry.js +1 -1
- package/dist/esm/snk-filter-bar_4.entry.js +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form_2.entry.js +4 -4
- package/dist/esm/snk-grid.entry.js +75 -48
- package/dist/esm/{snk-guides-viewer-fbfece85.js → snk-guides-viewer-f800c9aa.js} +6 -6
- package/dist/esm/snk-guides-viewer.entry.js +9 -9
- package/dist/esm/snk-personalized-filter.entry.js +4 -4
- package/dist/esm/snk-pesquisa.entry.js +4 -4
- package/dist/esm/snk-simple-crud.entry.js +9 -9
- package/dist/esm/snk-taskbar.entry.js +2 -2
- package/dist/esm/{taskbar-elements-171476d4.js → taskbar-elements-faaf5d8f.js} +1 -1
- package/dist/sankhyablocks/{p-4e63ffed.entry.js → p-082e7ba8.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8b601472.js → p-2b2c2718.js} +1 -1
- package/dist/sankhyablocks/p-3143bb44.entry.js +1 -0
- package/dist/sankhyablocks/{p-eb0616d3.entry.js → p-34222890.entry.js} +1 -1
- package/dist/sankhyablocks/{p-16fc4acd.js → p-353b4a74.js} +1 -1
- package/dist/sankhyablocks/p-3a10f9ea.entry.js +1 -0
- package/dist/sankhyablocks/{p-3dba3468.js → p-3cdfd7fb.js} +1 -1
- package/dist/sankhyablocks/{p-b49281be.entry.js → p-41e5a485.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c6331595.js → p-51209229.js} +1 -1
- package/dist/sankhyablocks/p-55798617.js +1 -0
- package/dist/sankhyablocks/{p-ba4979b4.js → p-7535d592.js} +1 -1
- package/dist/sankhyablocks/{p-f39b0ebe.entry.js → p-7a1d3cb6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-eacff4b7.entry.js → p-7b97f9af.entry.js} +1 -1
- package/dist/sankhyablocks/{p-72c8c847.entry.js → p-95c71f5e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-69b815ab.entry.js → p-a60028f1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ad2ae575.entry.js → p-aba06047.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1210500e.js → p-ae2ebab7.js} +1 -1
- package/dist/sankhyablocks/p-b21aa190.entry.js +1 -0
- package/dist/sankhyablocks/{p-d377aa7a.entry.js → p-b6b42620.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7de79adf.js → p-b987e15d.js} +1 -1
- package/dist/sankhyablocks/{p-6a015ba2.js → p-c3bab5f4.js} +1 -1
- package/dist/sankhyablocks/{p-735a1175.entry.js → p-c3dbf441.entry.js} +1 -1
- package/dist/sankhyablocks/{p-a2e8c7a7.entry.js → p-c3eea705.entry.js} +1 -1
- package/dist/sankhyablocks/{p-cf7063a4.entry.js → p-c8932b14.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c9e6d720.js → p-dc8bb41f.js} +1 -1
- package/dist/sankhyablocks/{p-5e282b33.entry.js → p-dde9da7a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6fa3d474.entry.js → p-dfbe4d7f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4872dc3a.entry.js → p-e5571279.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b35574b5.js → p-e63cc25f.js} +1 -1
- package/dist/sankhyablocks/{p-665dd170.entry.js → p-f4bf0517.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +17 -15
- package/package.json +1 -1
- package/dist/sankhyablocks/p-295b83ae.entry.js +0 -1
- package/dist/sankhyablocks/p-5c7af8a9.entry.js +0 -1
- package/dist/sankhyablocks/p-82729ec0.entry.js +0 -1
- package/dist/sankhyablocks/p-a349689a.js +0 -1
- /package/dist/sankhyablocks/{p-0dac8fef.js → p-65517fcf.js} +0 -0
@@ -4,20 +4,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const taskbarElements = require('./taskbar-elements-
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
7
|
+
const taskbarElements = require('./taskbar-elements-fb5d1e08.js');
|
8
|
+
const ConfigStorage = require('./ConfigStorage-0ebc800f.js');
|
9
9
|
const index$1 = require('./index-e3e39724.js');
|
10
10
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
11
|
-
const index$2 = require('./index-
|
12
|
-
const ClientSideExporterProvider = require('./ClientSideExporterProvider-
|
11
|
+
const index$2 = require('./index-13d05f03.js');
|
12
|
+
const ClientSideExporterProvider = require('./ClientSideExporterProvider-bb0b2273.js');
|
13
13
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
14
|
-
require('./DataFetcher-
|
15
|
-
require('./ISave-
|
14
|
+
require('./DataFetcher-602cdc72.js');
|
15
|
+
require('./ISave-18205d86.js');
|
16
16
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
17
17
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
18
|
-
require('./dataunit-fetcher-
|
18
|
+
require('./dataunit-fetcher-93077a2f.js');
|
19
19
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
20
|
-
require('./form-config-fetcher-
|
20
|
+
require('./form-config-fetcher-05d210e7.js');
|
21
21
|
require('./constants-6d82e405.js');
|
22
22
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
23
23
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
@@ -94,23 +94,23 @@ const SnkGrid = class {
|
|
94
94
|
this._customRenders = new Map();
|
95
95
|
this._keyboardManager = new core.KeyboardManager();
|
96
96
|
this._topTaskbarProcessor = new taskbarProcessor.TaskbarProcessor({
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
97
|
+
'snkGridTopTaskbar.regular': ['FORM_MODE', 'CONFIGURATOR', 'INSERT'],
|
98
|
+
'snkGridTopTaskbar.regular.secondary': ['FORM_MODE', 'CONFIGURATOR', 'INSERT'],
|
99
|
+
'snkGridTopTaskbar.regular.singleTaskbar': [],
|
100
|
+
'snkGridTopTaskbar.finish_edition': ['CANCEL', 'SAVE', this.handleAddFormMode()],
|
101
|
+
'snkGridTopTaskbar.finish_edition.secondary': [],
|
102
|
+
'snkGridTopTaskbar.finish_edition.singleTaskbar': [],
|
103
103
|
});
|
104
104
|
this._headerTaskbarProcessor = new taskbarProcessor.TaskbarProcessor({
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
105
|
+
'snkGridHeaderTaskbar.unselected': ['REFRESH', 'DATA_EXPORTER', 'ACTIONS_BUTTON', 'MORE_OPTIONS'],
|
106
|
+
'snkGridHeaderTaskbar.selected': this.getGridHeaderSelectedBtns(),
|
107
|
+
'snkGridHeaderTaskbar.detail.unselected': ['REFRESH', 'MORE_OPTIONS'],
|
108
|
+
'snkGridHeaderTaskbar.detail.selected': ['UPDATE', 'ATTACH', 'CLONE', 'REMOVE', 'MORE_OPTIONS', 'DIVIDER', 'REFRESH'],
|
109
|
+
'snkGridHeaderTaskbar.singleTaskbar.unselected': ['INSERT', 'FORM_MODE', 'CONFIGURATOR', 'REFRESH', 'DATA_EXPORTER', 'ACTIONS_BUTTON', 'MORE_OPTIONS'],
|
110
|
+
'snkGridHeaderTaskbar.singleTaskbar.selected': ['UPDATE', 'CLONE', 'REMOVE', 'MORE_OPTIONS', 'DIVIDER', 'ATTACH', 'FORM_MODE', 'CONFIGURATOR', 'REFRESH', 'DATA_EXPORTER', 'ACTIONS_BUTTON'],
|
111
|
+
'snkGridHeaderTaskbar.singleTaskbar.detail.unselected': ['INSERT', 'FORM_MODE', 'CONFIGURATOR', 'REFRESH', 'MORE_OPTIONS'],
|
112
|
+
'snkGridHeaderTaskbar.singleTaskbar.detail.selected': ['UPDATE', 'ATTACH', 'CLONE', 'REMOVE', 'MORE_OPTIONS', 'DIVIDER', 'FORM_MODE', 'CONFIGURATOR', 'REFRESH'],
|
113
|
+
'snkGridHeaderTaskbar.singleTaskbar.finish_edition': ['CANCEL', 'SAVE', this.handleAddFormMode()],
|
114
114
|
});
|
115
115
|
this.dataUnitInterceptor = {
|
116
116
|
interceptAction: async (action) => {
|
@@ -118,7 +118,7 @@ const SnkGrid = class {
|
|
118
118
|
return await this.interceptMetadataLoaded(action);
|
119
119
|
}
|
120
120
|
return action;
|
121
|
-
}
|
121
|
+
},
|
122
122
|
};
|
123
123
|
this._dataUnit = undefined;
|
124
124
|
this._dataState = undefined;
|
@@ -166,7 +166,7 @@ const SnkGrid = class {
|
|
166
166
|
const btns = [
|
167
167
|
taskbarElements.TaskbarElement.UPDATE, taskbarElements.TaskbarElement.CLONE, taskbarElements.TaskbarElement.REMOVE,
|
168
168
|
taskbarElements.TaskbarElement.MORE_OPTIONS, taskbarElements.TaskbarElement.DIVIDER, taskbarElements.TaskbarElement.ATTACH, taskbarElements.TaskbarElement.FORM_MODE,
|
169
|
-
taskbarElements.TaskbarElement.CONFIGURATOR, taskbarElements.TaskbarElement.REFRESH, taskbarElements.TaskbarElement.DATA_EXPORTER, taskbarElements.TaskbarElement.ACTIONS_BUTTON
|
169
|
+
taskbarElements.TaskbarElement.CONFIGURATOR, taskbarElements.TaskbarElement.REFRESH, taskbarElements.TaskbarElement.DATA_EXPORTER, taskbarElements.TaskbarElement.ACTIONS_BUTTON,
|
170
170
|
];
|
171
171
|
if (this.multipleEditionEnabled)
|
172
172
|
btns.unshift(taskbarElements.TaskbarElement.UPDATE_MULTIPLE);
|
@@ -330,7 +330,7 @@ const SnkGrid = class {
|
|
330
330
|
this.loadConfig();
|
331
331
|
}
|
332
332
|
handleAddFormMode() {
|
333
|
-
return this.enableGridInsert ? taskbarElements.TaskbarElement.FORM_MODE :
|
333
|
+
return this.enableGridInsert ? taskbarElements.TaskbarElement.FORM_MODE : '';
|
334
334
|
}
|
335
335
|
openGridConfig() {
|
336
336
|
this._grid.getColumnsState()
|
@@ -374,6 +374,17 @@ const SnkGrid = class {
|
|
374
374
|
ConfigStorage.ConfigStorage.addGridLegacyConfig(this.configName, this.gridLegacyConfigName);
|
375
375
|
}
|
376
376
|
}
|
377
|
+
hasCalculatedFields(columnNames) {
|
378
|
+
let hasCalculatedFields = false;
|
379
|
+
columnNames.forEach(name => {
|
380
|
+
var _a;
|
381
|
+
const field = this._dataUnit.getField(name);
|
382
|
+
if (((_a = field.properties) === null || _a === void 0 ? void 0 : _a.calculated) === 'true') {
|
383
|
+
hasCalculatedFields = true;
|
384
|
+
}
|
385
|
+
});
|
386
|
+
return hasCalculatedFields;
|
387
|
+
}
|
377
388
|
gridConfigChangeHandler(evt) {
|
378
389
|
const config = this.normalizeGridConfig(evt.detail);
|
379
390
|
ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName, this.resourceID);
|
@@ -389,11 +400,25 @@ const SnkGrid = class {
|
|
389
400
|
});
|
390
401
|
evt.stopPropagation();
|
391
402
|
}
|
403
|
+
async hasToForceClientSideExporter() {
|
404
|
+
if (!this._grid) {
|
405
|
+
return false;
|
406
|
+
}
|
407
|
+
const filters = await this._grid.getAppliedColumnFilters();
|
408
|
+
const columnNames = filters.map(filter => filter.name.replace('FILTRO_COLUNA_', ''));
|
409
|
+
return this.hasCalculatedFields(columnNames);
|
410
|
+
}
|
392
411
|
async dataExporterProviderStore() {
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
412
|
+
/**
|
413
|
+
* O ServerSideExporterProvider do SankhyaOm não suporta a filtragem de campos calculados.
|
414
|
+
* Por esse motivo, precisamos verificar os filtros aplicados no momento e recriar o dataExporterProvider conforme necessário.
|
415
|
+
* Se houver campos calculados, forçamos o uso do clientSide, caso contrário é seguido o fluxo padrão.
|
416
|
+
*/
|
417
|
+
const forceClientSide = await this.hasToForceClientSideExporter();
|
418
|
+
const dataExporterProvider = (forceClientSide || this.strategyExporter === index$1.ExporterStrategy.CLIENT_SIDE)
|
419
|
+
? new ClientSideExporterProvider.ClientSideExporterProvider(this._dataUnit, this._grid)
|
420
|
+
: new ServerSideExporterProvider(this._dataUnit, this._grid);
|
421
|
+
index$2.store.set('exporterProviders', Object.assign(Object.assign({}, index$2.store.get('exporterProviders')), { [this.configName]: dataExporterProvider }));
|
397
422
|
}
|
398
423
|
addElementID() {
|
399
424
|
const dataInfo = { dataUnit: this._dataUnit };
|
@@ -442,15 +467,15 @@ const SnkGrid = class {
|
|
442
467
|
}
|
443
468
|
}
|
444
469
|
componentWillLoad() {
|
445
|
-
this._application = core.ApplicationContext.getContextValue(
|
470
|
+
this._application = core.ApplicationContext.getContextValue('__SNK__APPLICATION__');
|
446
471
|
//TODO: substituir pelo metodo nativo closest
|
447
472
|
let parent = this._element.parentElement;
|
448
473
|
while (parent) {
|
449
|
-
if (parent.tagName.toUpperCase() ===
|
474
|
+
if (parent.tagName.toUpperCase() === 'SNK-DATA-UNIT') {
|
450
475
|
this._snkDataUnit = parent;
|
451
476
|
this._dataUnit = this._snkDataUnit.dataUnit;
|
452
477
|
if (!this._dataUnit) {
|
453
|
-
this._snkDataUnit.addEventListener(
|
478
|
+
this._snkDataUnit.addEventListener('dataUnitReady', (evt) => {
|
454
479
|
this._dataUnit = evt.detail;
|
455
480
|
this.finishLoading();
|
456
481
|
});
|
@@ -460,8 +485,8 @@ const SnkGrid = class {
|
|
460
485
|
}
|
461
486
|
if (!this.messagesBuilder)
|
462
487
|
this.messagesBuilder = this._snkDataUnit.messagesBuilder;
|
463
|
-
this._snkDataUnit.addEventListener(
|
464
|
-
this._snkDataUnit.addEventListener(
|
488
|
+
this._snkDataUnit.addEventListener('dataStateChange', this.handleDataStateChange.bind(this));
|
489
|
+
this._snkDataUnit.addEventListener('cancelEdition', () => {
|
465
490
|
var _a;
|
466
491
|
if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.recordsIsEmpty) {
|
467
492
|
this._dataUnit.clearSelection();
|
@@ -524,23 +549,23 @@ const SnkGrid = class {
|
|
524
549
|
var _a, _b;
|
525
550
|
const hasSelectedRecord = this._dataState && !!((_a = this._dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.length);
|
526
551
|
const taskbarIdPrefixLookup = {
|
527
|
-
primary: this.isDetail ?
|
528
|
-
secondary: this.isDetail ?
|
529
|
-
singleTaskbar: this.isDetail ?
|
552
|
+
primary: this.isDetail ? 'snkGridHeaderTaskbar.detail' : 'snkGridHeaderTaskbar',
|
553
|
+
secondary: this.isDetail ? 'snkGridHeaderTaskbar.detail' : 'snkGridHeaderTaskbar',
|
554
|
+
singleTaskbar: this.isDetail ? 'snkGridHeaderTaskbar.singleTaskbar.detail' : 'snkGridHeaderTaskbar.singleTaskbar',
|
530
555
|
};
|
531
556
|
const taskbarIdPrefix = taskbarIdPrefixLookup[this.presentationMode];
|
532
557
|
let headerTaskbarId = hasSelectedRecord ? `${taskbarIdPrefix}.selected` : `${taskbarIdPrefix}.unselected`;
|
533
558
|
if (((_b = this._dataState) === null || _b === void 0 ? void 0 : _b.isDirty) && this.presentationMode === index$1.PresentationMode.SINGLE_TASKBAR) {
|
534
|
-
headerTaskbarId =
|
559
|
+
headerTaskbarId = 'snkGridHeaderTaskbar.singleTaskbar.finish_edition';
|
535
560
|
}
|
536
561
|
return headerTaskbarId;
|
537
562
|
}
|
538
563
|
getTopTaskBarId() {
|
539
564
|
var _a;
|
540
565
|
const suffixLookup = {
|
541
|
-
primary:
|
542
|
-
secondary:
|
543
|
-
singleTaskbar:
|
566
|
+
primary: '',
|
567
|
+
secondary: '.secondary',
|
568
|
+
singleTaskbar: '.singleTaskbar',
|
544
569
|
};
|
545
570
|
const sufix = suffixLookup[this.presentationMode];
|
546
571
|
if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
|
@@ -550,9 +575,9 @@ const SnkGrid = class {
|
|
550
575
|
}
|
551
576
|
getPrimaryButton() {
|
552
577
|
const primaryButtonLookup = {
|
553
|
-
primary:
|
554
|
-
secondary:
|
555
|
-
singleTaskbar:
|
578
|
+
primary: 'INSERT',
|
579
|
+
secondary: '',
|
580
|
+
singleTaskbar: 'INSERT',
|
556
581
|
};
|
557
582
|
return primaryButtonLookup[this.presentationMode];
|
558
583
|
}
|
@@ -592,10 +617,10 @@ const SnkGrid = class {
|
|
592
617
|
getActionsSettingsList() {
|
593
618
|
const hardList = [{
|
594
619
|
value: core.StringUtils.generateUUID(),
|
595
|
-
label: this.messagesBuilder.getMessage(
|
620
|
+
label: this.messagesBuilder.getMessage('snkGrid.findColumn', {}),
|
596
621
|
disableCloseOnSelect: true,
|
597
622
|
eagerInitialize: true,
|
598
|
-
itemBuilder: (_, item) => this.getColumnSearch(item)
|
623
|
+
itemBuilder: (_, item) => this.getColumnSearch(item),
|
599
624
|
}];
|
600
625
|
return hardList;
|
601
626
|
}
|
@@ -623,7 +648,9 @@ const SnkGrid = class {
|
|
623
648
|
return undefined;
|
624
649
|
}
|
625
650
|
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline", tabindex: "0" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
|
626
|
-
index.h(index.Fragment, null, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.h("snk-taskbar", { class: "ez-padding-left--medium ez-padding-top--extra-small", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none', actionsSettingsList: this.getActionsSettingsList() }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ?
|
651
|
+
index.h(index.Fragment, null, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.h("snk-taskbar", { class: "ez-padding-left--medium ez-padding-top--extra-small", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none', actionsSettingsList: this.getActionsSettingsList() }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? 'snk-grid-container__without-shadow ' : '') + 'snk-grid__table', "data-element-id": "embedded", dataUnit: this._dataUnit, key: 'grid-' + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => {
|
652
|
+
this.gridConfigChangeHandler(evt);
|
653
|
+
}, onEzColumnFilterChanged: async () => await this.dataExporterProviderStore(), onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, useSearchColumn: this.useSearchColumn, suppressHorizontalScroll: this.suppressHorizontalScroll, paginationCounterMode: this.paginationCounterMode, suppressCheckboxColumn: this.suppressCheckboxColumn, suppressFilterColumn: this.suppressFilterColumn, compact: this.compact }, index.h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId, actionsSettingsList: this.getActionsSettingsList() }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._popUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
627
654
|
}
|
628
655
|
get _element() { return index.getElement(this); }
|
629
656
|
static get watchers() { return {
|
@@ -2,19 +2,19 @@
|
|
2
2
|
|
3
3
|
const index = require('./index-1cf293c1.js');
|
4
4
|
const core = require('@sankhyalabs/core');
|
5
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
5
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-4b651537.js');
|
6
6
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
7
7
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
8
|
-
const taskbarElements = require('./taskbar-elements-
|
8
|
+
const taskbarElements = require('./taskbar-elements-fb5d1e08.js');
|
9
9
|
const constants = require('./constants-6d82e405.js');
|
10
|
-
require('./DataFetcher-
|
11
|
-
require('./ISave-
|
10
|
+
require('./DataFetcher-602cdc72.js');
|
11
|
+
require('./ISave-18205d86.js');
|
12
12
|
const index$1 = require('./index-e3e39724.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-93077a2f.js');
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
17
|
-
require('./form-config-fetcher-
|
17
|
+
require('./form-config-fetcher-05d210e7.js');
|
18
18
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
19
19
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
20
20
|
|
@@ -2,25 +2,25 @@
|
|
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-73d40f42.js');
|
6
6
|
require('./index-1cf293c1.js');
|
7
7
|
require('@sankhyalabs/core');
|
8
|
-
require('./SnkFormConfigManager-
|
9
|
-
require('./ConfigStorage-
|
10
|
-
require('./form-config-fetcher-
|
11
|
-
require('./DataFetcher-
|
8
|
+
require('./SnkFormConfigManager-4b651537.js');
|
9
|
+
require('./ConfigStorage-0ebc800f.js');
|
10
|
+
require('./form-config-fetcher-05d210e7.js');
|
11
|
+
require('./DataFetcher-602cdc72.js');
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
14
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
15
15
|
require('./constants-6d82e405.js');
|
16
16
|
require('@sankhyalabs/ezui/dist/collection/utils/form');
|
17
17
|
require('./taskbar-processor-2fba34a8.js');
|
18
|
-
require('./taskbar-elements-
|
18
|
+
require('./taskbar-elements-fb5d1e08.js');
|
19
19
|
require('./index-e3e39724.js');
|
20
|
-
require('./index-
|
21
|
-
require('./ISave-
|
20
|
+
require('./index-13d05f03.js');
|
21
|
+
require('./ISave-18205d86.js');
|
22
22
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
23
|
-
require('./dataunit-fetcher-
|
23
|
+
require('./dataunit-fetcher-93077a2f.js');
|
24
24
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
25
25
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
26
26
|
require('./ResourceIDUtils-5ff86aa7.js');
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-7259cf65.js');
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
8
|
+
const ConfigStorage = require('./ConfigStorage-0ebc800f.js');
|
9
9
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
10
10
|
const index$1 = require('./index-62760a9c.js');
|
11
|
-
const index$2 = require('./index-
|
11
|
+
const index$2 = require('./index-13d05f03.js');
|
12
12
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
13
|
-
require('./form-config-fetcher-
|
14
|
-
require('./DataFetcher-
|
13
|
+
require('./form-config-fetcher-05d210e7.js');
|
14
|
+
require('./DataFetcher-602cdc72.js');
|
15
15
|
require('./PrintUtils-bcaeb82f.js');
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
17
17
|
|
@@ -4,14 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const ISave = require('./ISave-
|
8
|
-
require('./DataFetcher-
|
7
|
+
const ISave = require('./ISave-18205d86.js');
|
8
|
+
require('./DataFetcher-602cdc72.js');
|
9
9
|
require('./index-e3e39724.js');
|
10
10
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
11
11
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
12
|
-
require('./dataunit-fetcher-
|
12
|
+
require('./dataunit-fetcher-93077a2f.js');
|
13
13
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
14
|
-
require('./form-config-fetcher-
|
14
|
+
require('./form-config-fetcher-05d210e7.js');
|
15
15
|
require('./constants-6d82e405.js');
|
16
16
|
require('./PrintUtils-bcaeb82f.js');
|
17
17
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
@@ -6,20 +6,20 @@ const index = require('./index-1cf293c1.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
8
8
|
const constants = require('./constants-6d82e405.js');
|
9
|
-
const taskbarElements = require('./taskbar-elements-
|
10
|
-
require('./DataFetcher-
|
11
|
-
require('./ISave-
|
12
|
-
const ClientSideExporterProvider = require('./ClientSideExporterProvider-
|
9
|
+
const taskbarElements = require('./taskbar-elements-fb5d1e08.js');
|
10
|
+
require('./DataFetcher-602cdc72.js');
|
11
|
+
require('./ISave-18205d86.js');
|
12
|
+
const ClientSideExporterProvider = require('./ClientSideExporterProvider-bb0b2273.js');
|
13
13
|
const index$1 = require('./index-e3e39724.js');
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
16
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
16
|
+
const dataunitFetcher = require('./dataunit-fetcher-93077a2f.js');
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
18
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
18
|
+
const formConfigFetcher = require('./form-config-fetcher-05d210e7.js');
|
19
19
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
20
|
-
const ConfigStorage = require('./ConfigStorage-
|
21
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
22
|
-
const index$2 = require('./index-
|
20
|
+
const ConfigStorage = require('./ConfigStorage-0ebc800f.js');
|
21
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-4b651537.js');
|
22
|
+
const index$2 = require('./index-13d05f03.js');
|
23
23
|
require('./PrintUtils-bcaeb82f.js');
|
24
24
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
25
25
|
require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
8
|
-
const taskbarElements = require('./taskbar-elements-
|
8
|
+
const taskbarElements = require('./taskbar-elements-fb5d1e08.js');
|
9
9
|
const index$1 = require('./index-e3e39724.js');
|
10
|
-
require('./index-
|
10
|
+
require('./index-13d05f03.js');
|
11
11
|
|
12
12
|
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex;flex-wrap:wrap}.no-wrap.sc-snk-taskbar-h{flex-wrap:nowrap}.full-width.sc-snk-taskbar-h{width:100%}.align-right.sc-snk-taskbar-h{justify-content:flex-end}.overflowed.sc-snk-taskbar{display:none}";
|
13
13
|
|
package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js
CHANGED
@@ -35,7 +35,10 @@ export default class ClientSideExporterProvider extends CommonsExporter {
|
|
35
35
|
}
|
36
36
|
resolveRecordsFromSelection() {
|
37
37
|
const selectionInfo = this.dataUnit.getSelectionInfo();
|
38
|
-
|
38
|
+
if (selectionInfo.isEmpty()) {
|
39
|
+
return this.dataUnit.records;
|
40
|
+
}
|
41
|
+
const selectionRecords = selectionInfo.isAllRecords() ? selectionInfo.getAllRecords() : selectionInfo.records;
|
39
42
|
return selectionRecords.length ? selectionRecords : this.dataUnit.records;
|
40
43
|
}
|
41
44
|
getHiddenOptions() {
|
@@ -69,7 +69,11 @@ export class SnkEntityList {
|
|
69
69
|
onEzSearchChange(evt) {
|
70
70
|
var _a, _b, _c, _d;
|
71
71
|
const newValueIsEmpty = ObjectUtils.isEmptySafetyCheck(evt.detail);
|
72
|
-
const hasConfingOnList = (_a = this.getListConfigValue(this.config)) === null || _a === void 0 ? void 0 : _a.find((
|
72
|
+
const hasConfingOnList = (_a = this.getListConfigValue(this.config)) === null || _a === void 0 ? void 0 : _a.find((item) => {
|
73
|
+
var _a;
|
74
|
+
const itemId = typeof item.id === 'number' ? String(item.id) : item.id;
|
75
|
+
return itemId === ((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value);
|
76
|
+
});
|
73
77
|
if (newValueIsEmpty || hasConfingOnList) {
|
74
78
|
return;
|
75
79
|
}
|