@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-74246.2 → 0.0.0-bugfix-dev-KB-80932.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/{ConfigStorage-9b965af9.js → ConfigStorage-d024aec8.js} +2 -2
- package/dist/cjs/{ContinuousInsertUtils-42636ac1.js → ContinuousInsertUtils-54d44192.js} +5 -5
- package/dist/cjs/{DataFetcher-e059eb72.js → DataFetcher-65879b2c.js} +188 -56
- package/dist/cjs/{SnkFormConfigManager-46e90d8d.js → SnkFormConfigManager-ae3185b2.js} +6 -8
- package/dist/cjs/{auth-fetcher-a78242d1.js → auth-fetcher-8480751c.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-228016f4.js → dataunit-fetcher-8ea97d88.js} +2 -2
- package/dist/cjs/{form-config-fetcher-91fba2b1.js → form-config-fetcher-90126e4c.js} +1 -1
- package/dist/cjs/index-f9e81701.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-2ec4811b.js → pesquisa-fetcher-f3454c23.js} +176 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +133 -0
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_5.cjs.entry.js +12 -10
- package/dist/cjs/snk-application.cjs.entry.js +144 -21
- package/dist/cjs/snk-attach.cjs.entry.js +5 -5
- package/dist/cjs/snk-config-options_3.cjs.entry.js +4 -4
- package/dist/cjs/snk-crud.cjs.entry.js +8 -7
- package/dist/cjs/snk-data-exporter.cjs.entry.js +25 -12
- package/dist/cjs/{snk-data-unit-3d9b6ed4.js → snk-data-unit-72ef8777.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +24 -10
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-grid.cjs.entry.js +9 -8
- package/dist/cjs/{snk-guides-viewer-7d85e2fb.js → snk-guides-viewer-ea5d0907.js} +5 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +105 -31
- package/dist/cjs/snk-simple-crud.cjs.entry.js +15 -10
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/snk-actions-button/actions/index.js +4 -4
- package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +4 -3
- package/dist/collection/components/snk-application/snk-application.css +34 -0
- package/dist/collection/components/snk-application/snk-application.js +197 -14
- package/dist/collection/components/snk-crud/snk-crud.js +39 -20
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +8 -2
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +11 -4
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -1
- package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +1 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +40 -8
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +4 -6
- package/dist/collection/components/snk-grid/snk-grid.js +39 -20
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css +10 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +190 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css +25 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +179 -0
- package/dist/collection/components/snk-pesquisa/pesquisaHelper.js +89 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +24 -5
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +168 -32
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +44 -21
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +3 -1
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +89 -3
- package/dist/components/ContinuousInsertUtils.js +2 -3
- package/dist/components/DataFetcher.js +188 -56
- package/dist/components/ISave.js +346 -1
- package/dist/components/SnkFormConfigManager.js +4 -6
- package/dist/components/dataunit-fetcher.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/pesquisa-grid.d.ts +11 -0
- package/dist/components/pesquisa-grid.js +6 -0
- package/dist/components/pesquisa-grid2.js +86 -0
- package/dist/components/pesquisa-tree.d.ts +11 -0
- package/dist/components/pesquisa-tree.js +6 -0
- package/dist/components/pesquisa-tree2.js +82 -0
- package/dist/components/snk-actions-button2.js +4 -5
- package/dist/components/snk-application2.js +159 -20
- package/dist/components/snk-attach2.js +0 -1
- package/dist/components/snk-crud.js +5 -4
- package/dist/components/snk-data-exporter2.js +21 -9
- package/dist/components/snk-detail-view2.js +0 -1
- package/dist/components/snk-filter-bar2.js +23 -8
- package/dist/components/snk-grid2.js +5 -4
- package/dist/components/snk-pesquisa2.js +118 -33
- package/dist/components/snk-simple-crud2.js +11 -6
- package/dist/components/snk-simple-form-config2.js +4 -3
- package/dist/components/teste-pesquisa.js +13 -1
- package/dist/esm/{ConfigStorage-ff99377a.js → ConfigStorage-373bb440.js} +2 -2
- package/dist/esm/{ContinuousInsertUtils-071e0b6a.js → ContinuousInsertUtils-25e7bd9a.js} +5 -5
- package/dist/esm/{DataFetcher-5034df59.js → DataFetcher-5221b992.js} +188 -56
- package/dist/esm/{SnkFormConfigManager-035f2975.js → SnkFormConfigManager-b65e6db0.js} +6 -8
- package/dist/esm/{auth-fetcher-0b78ca31.js → auth-fetcher-e32fe8a4.js} +1 -1
- package/dist/esm/{dataunit-fetcher-56cb648b.js → dataunit-fetcher-8dd93d8b.js} +2 -2
- package/dist/esm/{form-config-fetcher-0c2620ef.js → form-config-fetcher-126e2471.js} +1 -1
- package/dist/esm/index-a7d3d3f1.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/{components/pesquisa-fetcher.js → esm/pesquisa-fetcher-0af41f09.js} +177 -3
- package/dist/esm/pesquisa-grid_2.entry.js +128 -0
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_5.entry.js +12 -10
- package/dist/esm/snk-application.entry.js +146 -23
- package/dist/esm/snk-attach.entry.js +5 -5
- package/dist/esm/snk-config-options_3.entry.js +4 -4
- package/dist/esm/snk-crud.entry.js +8 -7
- package/dist/esm/snk-data-exporter.entry.js +25 -12
- package/dist/esm/{snk-data-unit-9fa7d2b9.js → snk-data-unit-11a49fc3.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +7 -7
- package/dist/esm/snk-filter-bar_4.entry.js +25 -11
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-grid.entry.js +9 -8
- package/dist/esm/{snk-guides-viewer-2fd50f6b.js → snk-guides-viewer-830f5fb9.js} +5 -5
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +105 -31
- package/dist/esm/snk-simple-crud.entry.js +15 -10
- package/dist/sankhyablocks/p-05b6ff91.js +1 -0
- package/dist/sankhyablocks/p-09067bee.entry.js +1 -0
- package/dist/sankhyablocks/p-0cda2226.entry.js +11 -0
- package/dist/sankhyablocks/{p-acca8a69.js → p-1435701f.js} +1 -1
- package/dist/sankhyablocks/{p-4c5fde50.js → p-171b7623.js} +1 -1
- package/dist/sankhyablocks/{p-763edad2.js → p-19dc71e9.js} +1 -1
- package/dist/sankhyablocks/{p-0d2a2e9e.entry.js → p-1a91d1f3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e9432f45.entry.js → p-1cf39cfd.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e7067256.entry.js → p-254c59d2.entry.js} +1 -1
- package/dist/sankhyablocks/p-422eb699.entry.js +1 -0
- package/dist/sankhyablocks/{p-c629c07a.entry.js → p-469384a2.entry.js} +1 -1
- package/dist/sankhyablocks/p-54f5354a.entry.js +1 -0
- package/dist/sankhyablocks/{p-342eeb3b.js → p-60e4db34.js} +1 -1
- package/dist/sankhyablocks/p-618a29ed.entry.js +1 -0
- package/dist/sankhyablocks/p-798386c7.js +6 -0
- package/dist/sankhyablocks/{p-35882caf.entry.js → p-82ee6dc3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c271fbf1.js → p-8a1ee5b5.js} +1 -1
- package/dist/sankhyablocks/p-8bd86610.entry.js +1 -0
- package/dist/sankhyablocks/p-b50a0753.entry.js +1 -0
- package/dist/sankhyablocks/p-d62228fb.js +1 -0
- package/dist/sankhyablocks/p-d92d4f91.entry.js +1 -0
- package/dist/sankhyablocks/{p-47d24ac8.js → p-ddefbbc7.js} +1 -1
- package/dist/sankhyablocks/p-e5430b29.entry.js +1 -0
- package/dist/sankhyablocks/p-f0b9303b.js +1 -0
- package/dist/sankhyablocks/p-f258690a.entry.js +1 -0
- package/dist/sankhyablocks/{p-5136d9f0.entry.js → p-f975370f.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +22 -4
- package/dist/types/components/snk-crud/snk-crud.d.ts +8 -4
- package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +6 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +8 -4
- package/dist/types/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.d.ts +38 -0
- package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +29 -0
- package/dist/types/components/snk-pesquisa/pesquisaHelper.d.ts +19 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +35 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +8 -1
- package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +1 -0
- package/dist/types/components.d.ts +206 -23
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +10 -1
- package/package.json +1 -1
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/esm/pesquisa-fetcher-24e5bba0.js +0 -172
- package/dist/sankhyablocks/p-00278e07.js +0 -1
- package/dist/sankhyablocks/p-262583c6.entry.js +0 -1
- package/dist/sankhyablocks/p-29643bef.entry.js +0 -1
- package/dist/sankhyablocks/p-365d8ed4.entry.js +0 -1
- package/dist/sankhyablocks/p-399e1b74.entry.js +0 -1
- package/dist/sankhyablocks/p-65650e05.entry.js +0 -1
- package/dist/sankhyablocks/p-70ed0b0f.js +0 -1
- package/dist/sankhyablocks/p-82274cb0.js +0 -1
- package/dist/sankhyablocks/p-8cf0a9fe.entry.js +0 -1
- package/dist/sankhyablocks/p-d1791da2.entry.js +0 -1
- package/dist/sankhyablocks/p-e6683406.js +0 -6
- package/dist/sankhyablocks/p-eda55eef.entry.js +0 -11
- package/dist/sankhyablocks/p-ff6c8f52.entry.js +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
|
|
2
|
-
import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ArrayUtils, SearchUtils, ElementIDUtils, ApplicationContext, DataType, ErrorTracking } from '@sankhyalabs/core';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
|
2
|
+
import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ArrayUtils, SearchUtils, ElementIDUtils, ApplicationContext, DataType, ErrorTracking, UserAgentUtils, LockManager, LockManagerOperation } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
5
|
-
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-
|
|
6
|
-
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-
|
|
7
|
-
import { P as PreloadManager, D as DataUnitFetcher } from './dataunit-fetcher-
|
|
8
|
-
import { P as PesquisaFetcher } from './pesquisa-fetcher-
|
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-373bb440.js';
|
|
5
|
+
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-5221b992.js';
|
|
6
|
+
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-e32fe8a4.js';
|
|
7
|
+
import { P as PreloadManager, D as DataUnitFetcher } from './dataunit-fetcher-8dd93d8b.js';
|
|
8
|
+
import { P as PesquisaFetcher } from './pesquisa-fetcher-0af41f09.js';
|
|
9
9
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-6fff4a4c.js';
|
|
10
|
-
import './form-config-fetcher-
|
|
10
|
+
import './form-config-fetcher-126e2471.js';
|
|
11
11
|
import './filter-item-type.enum-d45e026f.js';
|
|
12
12
|
import './PrintUtils-3e4ff0f5.js';
|
|
13
13
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
@@ -305,11 +305,12 @@ class DebouncedRequestListener {
|
|
|
305
305
|
}
|
|
306
306
|
;
|
|
307
307
|
onRequestEnd(param) {
|
|
308
|
+
var _a, _b, _c;
|
|
308
309
|
const timeoutId = this.requests.get(param.requestId);
|
|
309
310
|
clearTimeout(timeoutId);
|
|
310
|
-
if (this.requestsLoadingBar.includes(param.requestId)) {
|
|
311
|
-
this.requestsLoadingBar = this.requestsLoadingBar.filter(id => id !== param.requestId);
|
|
312
|
-
!this.requestsLoadingBar.length && this.ezLoadingBar.hide();
|
|
311
|
+
if ((_a = this.requestsLoadingBar) === null || _a === void 0 ? void 0 : _a.includes(param.requestId)) {
|
|
312
|
+
this.requestsLoadingBar = (_b = this.requestsLoadingBar) === null || _b === void 0 ? void 0 : _b.filter(id => id !== param.requestId);
|
|
313
|
+
!this.requestsLoadingBar.length && ((_c = this.ezLoadingBar) === null || _c === void 0 ? void 0 : _c.hide());
|
|
313
314
|
}
|
|
314
315
|
}
|
|
315
316
|
;
|
|
@@ -380,7 +381,7 @@ class RequestListenerFactory {
|
|
|
380
381
|
}
|
|
381
382
|
}
|
|
382
383
|
|
|
383
|
-
const snkApplicationCss = ".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";
|
|
384
|
+
const snkApplicationCss = ".sc-snk-application-h{display:flex;flex-direction:column;height:100%}.sc-snk-application-h>.loading-hidden.sc-snk-application{display:none;pointer-events:none}.skeleton-content-left.sc-snk-application{width:300px;padding-right:5px}.skeleton-content.sc-snk-application{height:calc(100vh - 310px)}.spinner.sc-snk-application{height:100vh;gap:10px}.spinner.sc-snk-application>.spin.sc-snk-application{animation-name:spin;animation-duration:5000ms;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";
|
|
384
385
|
|
|
385
386
|
const SnkApplication = class {
|
|
386
387
|
constructor(hostRef) {
|
|
@@ -394,9 +395,13 @@ const SnkApplication = class {
|
|
|
394
395
|
this._duCache = new Map();
|
|
395
396
|
this._duPromises = new Map();
|
|
396
397
|
this._requestListener = RequestListenerFactory.create({ strategy: 'request_time' });
|
|
398
|
+
this._maxTimeLockAppLoading = 10000;
|
|
399
|
+
this._isBrowserTypeElectron = false;
|
|
397
400
|
this._pendingActions = new Map;
|
|
398
401
|
this._loadPkParameter = null;
|
|
399
402
|
this._isLoadedByPk = false;
|
|
403
|
+
this._applicationReady = false;
|
|
404
|
+
this.enableLockManagerLoadingApp = undefined;
|
|
400
405
|
this.messagesBuilder = undefined;
|
|
401
406
|
this.configName = undefined;
|
|
402
407
|
this.gridLegacyConfigName = undefined;
|
|
@@ -882,15 +887,21 @@ const SnkApplication = class {
|
|
|
882
887
|
return Promise.resolve(this._isLoadedByPk);
|
|
883
888
|
}
|
|
884
889
|
/**
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
890
|
+
* Remove registro do cache do PreLoader do dataunit.
|
|
891
|
+
* Deve ser usado quando existe um dataunit usando loader do application, mas o removeLoader está sendo sobrescrito.
|
|
892
|
+
*/
|
|
888
893
|
async preloadMangerRemoveRecord(dataUnit, recordsIDs) {
|
|
889
894
|
const records = recordsIDs.map(id => {
|
|
890
895
|
return { "__record__id__": id };
|
|
891
896
|
});
|
|
892
897
|
PreloadManager.removeRecords(dataUnit, records);
|
|
893
898
|
}
|
|
899
|
+
getCountSkeleton(className, skeletonHeight, spacingSkeleton) {
|
|
900
|
+
let containerHeight = window.innerHeight - 350;
|
|
901
|
+
spacingSkeleton = !spacingSkeleton ? 20 : spacingSkeleton;
|
|
902
|
+
let skeletonCount = Math.floor(containerHeight / (skeletonHeight + spacingSkeleton));
|
|
903
|
+
return skeletonCount || 1;
|
|
904
|
+
}
|
|
894
905
|
async getAuthList(auth) {
|
|
895
906
|
return await (new MGEAuthorization()).parseFromJSON(auth);
|
|
896
907
|
}
|
|
@@ -932,12 +943,12 @@ const SnkApplication = class {
|
|
|
932
943
|
* Obtém as opções em componentes de pesquisa
|
|
933
944
|
* Ex.: snk-config-options
|
|
934
945
|
*/
|
|
935
|
-
async executeSearch(searchArgument, fieldName, dataUnit) {
|
|
946
|
+
async executeSearch(searchArgument, fieldName, dataUnit, ctxOptions) {
|
|
936
947
|
const descriptor = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(fieldName);
|
|
937
948
|
if (!descriptor) ;
|
|
938
949
|
else {
|
|
939
950
|
const { mode, argument } = searchArgument;
|
|
940
|
-
const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY } = descriptor.properties;
|
|
951
|
+
const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY, ISHIERARCHYENTITY } = descriptor.properties;
|
|
941
952
|
const dependencies = descriptor.dependencies;
|
|
942
953
|
let criteria;
|
|
943
954
|
const searchOptions = {
|
|
@@ -967,7 +978,16 @@ const SnkApplication = class {
|
|
|
967
978
|
}
|
|
968
979
|
}
|
|
969
980
|
});
|
|
970
|
-
|
|
981
|
+
const allowsNonAnalytic = ctxOptions === null || ctxOptions === void 0 ? void 0 : ctxOptions.allowsNonAnalytic;
|
|
982
|
+
const options = {
|
|
983
|
+
entity: ENTITYNAME,
|
|
984
|
+
entityDescription: DESCRIPTIONENTITY,
|
|
985
|
+
isHierarchyEntity: ISHIERARCHYENTITY,
|
|
986
|
+
criteria,
|
|
987
|
+
searchOptions,
|
|
988
|
+
allowsNonAnalytic
|
|
989
|
+
};
|
|
990
|
+
return this.executePreparedSearch(mode, argument, options);
|
|
971
991
|
}
|
|
972
992
|
}
|
|
973
993
|
filterInvalidFields(resp, item, mdByName) {
|
|
@@ -1017,13 +1037,19 @@ const SnkApplication = class {
|
|
|
1017
1037
|
*/
|
|
1018
1038
|
async executePreparedSearch(mode, argument, options) {
|
|
1019
1039
|
const mdByName = {};
|
|
1020
|
-
const { entity, entityDescription, criteria, searchOptions } = options;
|
|
1040
|
+
const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic } = options;
|
|
1021
1041
|
if (mode === "ADVANCED") {
|
|
1022
1042
|
return new Promise((accept, reject) => {
|
|
1023
1043
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
1024
1044
|
pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
|
1045
|
+
pesquisaContent.entityName = entity;
|
|
1025
1046
|
pesquisaContent.argument = argument;
|
|
1026
1047
|
pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
|
1048
|
+
pesquisaContent.isHierarchyEntity = isHierarchyEntity;
|
|
1049
|
+
if (isHierarchyEntity) {
|
|
1050
|
+
pesquisaContent.treeLoader = (text) => this.pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
|
|
1051
|
+
pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
|
|
1052
|
+
}
|
|
1027
1053
|
pesquisaContent.selectItem = (option) => {
|
|
1028
1054
|
accept(option);
|
|
1029
1055
|
this.clearPopUpTitle();
|
|
@@ -1331,8 +1357,8 @@ const SnkApplication = class {
|
|
|
1331
1357
|
this._errorHandler = new SnkErrorHandler(this);
|
|
1332
1358
|
this.messagesBuilder = new SnkMessageBuilder();
|
|
1333
1359
|
ApplicationContext.setContextValue("__EZUI__UPLOAD__ADD__URL__", `${UrlUtils.getUrlBase()}/mge/upload/file`);
|
|
1334
|
-
ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit) => {
|
|
1335
|
-
return this.executeSearch(searchArgument, fieldName, dataUnit);
|
|
1360
|
+
ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit, ctxOptions) => {
|
|
1361
|
+
return this.executeSearch(searchArgument, fieldName, dataUnit, ctxOptions);
|
|
1336
1362
|
});
|
|
1337
1363
|
ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
|
1338
1364
|
this.registerPkChangeListener();
|
|
@@ -1346,12 +1372,15 @@ const SnkApplication = class {
|
|
|
1346
1372
|
this._waitingAppReady.forEach(resolve => resolve());
|
|
1347
1373
|
}
|
|
1348
1374
|
connectedCallback() {
|
|
1375
|
+
this._isBrowserTypeElectron = UserAgentUtils.isElectron();
|
|
1349
1376
|
ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
|
|
1350
1377
|
DataFetcher.addRequestListener(this._requestListener);
|
|
1351
1378
|
}
|
|
1352
1379
|
disconnectedCallback() {
|
|
1353
|
-
DataFetcher.removeRequestListener(this._requestListener);
|
|
1380
|
+
DataFetcher === null || DataFetcher === void 0 ? void 0 : DataFetcher.removeRequestListener(this._requestListener);
|
|
1354
1381
|
this.removeShortcuts();
|
|
1382
|
+
if (this._lockManagerTimer)
|
|
1383
|
+
clearTimeout(this._lockManagerTimer);
|
|
1355
1384
|
}
|
|
1356
1385
|
async componentDidLoad() {
|
|
1357
1386
|
this.applicationLoading.emit(true);
|
|
@@ -1363,6 +1392,63 @@ const SnkApplication = class {
|
|
|
1363
1392
|
ElementIDUtils.addIDInfo(this._element, `resource_${this.applicationResourceID}`);
|
|
1364
1393
|
await this.handleShowNewVersionPopup();
|
|
1365
1394
|
this.initKeyboardManager();
|
|
1395
|
+
if (this.enableLockManagerLoadingApp) {
|
|
1396
|
+
LockManager.addLockManagerCtxId(this._element);
|
|
1397
|
+
this.resolveApplicationReady();
|
|
1398
|
+
}
|
|
1399
|
+
else {
|
|
1400
|
+
this._applicationReady = true;
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
async markToReload() {
|
|
1404
|
+
if (!this.enableLockManagerLoadingApp)
|
|
1405
|
+
return;
|
|
1406
|
+
this._applicationReady = false;
|
|
1407
|
+
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
|
1408
|
+
this.resolveApplicationReady();
|
|
1409
|
+
}
|
|
1410
|
+
async addLoadingLock(forceReady = false) {
|
|
1411
|
+
if (!this.enableLockManagerLoadingApp)
|
|
1412
|
+
return;
|
|
1413
|
+
if (forceReady) {
|
|
1414
|
+
this._applicationReady = false;
|
|
1415
|
+
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
|
1416
|
+
}
|
|
1417
|
+
this.resolveApplicationReady();
|
|
1418
|
+
return await LockManager.lock(this._element, LockManagerOperation.APP_LOADING);
|
|
1419
|
+
}
|
|
1420
|
+
async resolveApplicationReady() {
|
|
1421
|
+
if (this._applicationReady) {
|
|
1422
|
+
return;
|
|
1423
|
+
}
|
|
1424
|
+
try {
|
|
1425
|
+
await this.checkTimeoutLimitLockManager();
|
|
1426
|
+
await LockManager.whenHasLock(this._element, LockManagerOperation.APP_LOADING);
|
|
1427
|
+
await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 1200);
|
|
1428
|
+
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
|
1429
|
+
this._applicationReady = true;
|
|
1430
|
+
}
|
|
1431
|
+
catch (error) {
|
|
1432
|
+
console.warn(error);
|
|
1433
|
+
this._applicationReady = true;
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
stopTimeoutLockManager() {
|
|
1437
|
+
if (this._lockManagerTimer) {
|
|
1438
|
+
clearTimeout(this._lockManagerTimer);
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
async checkTimeoutLimitLockManager() {
|
|
1442
|
+
this.stopTimeoutLockManager();
|
|
1443
|
+
if (this._applicationReady)
|
|
1444
|
+
return;
|
|
1445
|
+
this._lockManagerTimer = setTimeout(async () => {
|
|
1446
|
+
if (!this._applicationReady) {
|
|
1447
|
+
await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
|
|
1448
|
+
this.stopTimeoutLockManager();
|
|
1449
|
+
this._applicationReady = true;
|
|
1450
|
+
}
|
|
1451
|
+
}, this._maxTimeLockAppLoading);
|
|
1366
1452
|
}
|
|
1367
1453
|
initKeyboardManager() {
|
|
1368
1454
|
this._keyboardManager
|
|
@@ -1376,8 +1462,40 @@ const SnkApplication = class {
|
|
|
1376
1462
|
.unbind("ctrl + d")
|
|
1377
1463
|
.unbind("F1");
|
|
1378
1464
|
}
|
|
1465
|
+
// TODO: Etapa 2 - implementar template de loading
|
|
1466
|
+
renderLoadingSkeleton(template) {
|
|
1467
|
+
if (this.enableLockManagerLoadingApp) {
|
|
1468
|
+
if (!this._isBrowserTypeElectron) {
|
|
1469
|
+
switch (template) {
|
|
1470
|
+
case TEMPLATES_LOADING_SKELETON.APPLICATION:
|
|
1471
|
+
case TEMPLATES_LOADING_SKELETON.GRID:
|
|
1472
|
+
return this.getSkeletonTemplateApplication();
|
|
1473
|
+
default:
|
|
1474
|
+
return this.getSkeletonTemplateApplication();
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
else {
|
|
1478
|
+
return this.getSpinnerLoadingDefault();
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
getLoadingVisibilityStyle() {
|
|
1483
|
+
return {
|
|
1484
|
+
visibility: this._applicationReady ? "hidden" : "initial",
|
|
1485
|
+
display: this._applicationReady ? "none" : "unset"
|
|
1486
|
+
};
|
|
1487
|
+
}
|
|
1488
|
+
getSkeletonTemplateApplication() {
|
|
1489
|
+
return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-margin--medium ez-margin-top--extra-small" }, h("ez-skeleton", { count: 1, variant: "rect", width: "100%", height: "150px", animation: "progress" })), h("div", { class: "ez-flex ez-flex--align-items-stretch skeleton-content" }, h("div", { class: "skeleton-content-left ez-margin--medium" }, h("ez-skeleton", { count: 1, variant: "rect", width: "100%", height: "calc(100% - 15px)", animation: "progress", marginBottom: "20px" })), h("div", { class: "ez-flex-item--auto skeleton-content-right ez-margin--medium" }, h("ez-skeleton", { count: this.getCountSkeleton("skeleton-content-right", 50, 20), variant: "rect", width: "100%", height: "49px", animation: "progress", marginBottom: "20px" }))), h("div", { class: "skeleton-content-footer ez-margin--medium ez-margin-top--extra-small" }, h("ez-skeleton", { count: 1, variant: "rect", width: "100%", height: "100px", animation: "progress" }))));
|
|
1490
|
+
}
|
|
1491
|
+
getSpinnerLoadingDefault() {
|
|
1492
|
+
return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-flex ez-size-height--full ez-size-width--full ez-flex--justify-center ez-flex--align-items-center spinner" }, h("ez-icon", { iconName: "sync", size: "x-large", class: "spin" }), h("span", { class: "ez-title ez-title--secondary ez-title--extra-large" }, "Carregando..."))));
|
|
1493
|
+
}
|
|
1379
1494
|
render() {
|
|
1380
|
-
return (h(
|
|
1495
|
+
return (h(Host, { style: {
|
|
1496
|
+
visibility: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden",
|
|
1497
|
+
overflow: (!this.enableLockManagerLoadingApp || this._applicationReady) ? "unset" : "hidden"
|
|
1498
|
+
} }, h("div", null, h("ez-loading-bar", { ref: (ref) => this._requestListener.ezLoadingBar = ref }), h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "small", closeOutsideClick: true, closeEsc: true }), this.renderLoadingSkeleton())));
|
|
1381
1499
|
}
|
|
1382
1500
|
get _element() { return getElement(this); }
|
|
1383
1501
|
static get watchers() { return {
|
|
@@ -1390,6 +1508,11 @@ class PendingPromise {
|
|
|
1390
1508
|
this.reject = reject;
|
|
1391
1509
|
}
|
|
1392
1510
|
}
|
|
1511
|
+
var TEMPLATES_LOADING_SKELETON;
|
|
1512
|
+
(function (TEMPLATES_LOADING_SKELETON) {
|
|
1513
|
+
TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["APPLICATION"] = 1] = "APPLICATION";
|
|
1514
|
+
TEMPLATES_LOADING_SKELETON[TEMPLATES_LOADING_SKELETON["GRID"] = 2] = "GRID";
|
|
1515
|
+
})(TEMPLATES_LOADING_SKELETON || (TEMPLATES_LOADING_SKELETON = {}));
|
|
1393
1516
|
SnkApplication.style = snkApplicationCss;
|
|
1394
1517
|
|
|
1395
1518
|
export { SnkApplication as snk_application };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-a7d3d3f1.js';
|
|
2
2
|
import { ApplicationContext, DataType, Action, UserInterface, StringUtils, DataUnit } from '@sankhyalabs/core';
|
|
3
|
-
import { D as DataFetcher } from './DataFetcher-
|
|
4
|
-
import './pesquisa-fetcher-
|
|
3
|
+
import { D as DataFetcher } from './DataFetcher-5221b992.js';
|
|
4
|
+
import './pesquisa-fetcher-0af41f09.js';
|
|
5
5
|
import './index-3aa4977a.js';
|
|
6
6
|
import { S as SaveErrorsEnum } from './ISave-d8c8bc59.js';
|
|
7
|
-
import { P as PreloadManager, b as buildLoadDataResponse, D as DataUnitFetcher, I as InMemoryLoader } from './dataunit-fetcher-
|
|
7
|
+
import { P as PreloadManager, b as buildLoadDataResponse, D as DataUnitFetcher, I as InMemoryLoader } from './dataunit-fetcher-8dd93d8b.js';
|
|
8
8
|
import './filter-item-type.enum-d45e026f.js';
|
|
9
|
-
import './form-config-fetcher-
|
|
9
|
+
import './form-config-fetcher-126e2471.js';
|
|
10
10
|
import { V as VIEW_MODE } from './constants-7302ee87.js';
|
|
11
|
-
import { A as AutorizationType } from './auth-fetcher-
|
|
11
|
+
import { A as AutorizationType } from './auth-fetcher-e32fe8a4.js';
|
|
12
12
|
import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
|
|
13
13
|
import './PrintUtils-3e4ff0f5.js';
|
|
14
14
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
@@ -3,14 +3,14 @@ import { UserInterface, ObjectUtils, StringUtils, ApplicationContext, ElementIDU
|
|
|
3
3
|
import { DataType, getConvertedValue } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
4
4
|
import { CheckMode, ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
5
|
import { c as VARS_BY_TYPE, D as DEFAULT_TYPE, d as TAGS_BY_TYPE, C as CONFIG_EVENTS, a as CONFIG_SORTABLE_EVENTS, b as TAB_NAMES, A as ACTION_CONFIG } from './constants-7302ee87.js';
|
|
6
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
6
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-b65e6db0.js';
|
|
7
7
|
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
|
8
8
|
import { S as Sortable } from './Sortable-83960219.js';
|
|
9
|
-
import { U as UserConfigType } from './form-config-fetcher-
|
|
9
|
+
import { U as UserConfigType } from './form-config-fetcher-126e2471.js';
|
|
10
10
|
import { buildFormConfigFromDataUnit } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
11
|
-
import './ConfigStorage-
|
|
11
|
+
import './ConfigStorage-373bb440.js';
|
|
12
12
|
import './filter-item-type.enum-d45e026f.js';
|
|
13
|
-
import './DataFetcher-
|
|
13
|
+
import './DataFetcher-5221b992.js';
|
|
14
14
|
import './PrintUtils-3e4ff0f5.js';
|
|
15
15
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
16
16
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
|
2
2
|
import { StringUtils, ElementIDUtils, ApplicationContext, JSUtils, FloatingManager } from '@sankhyalabs/core';
|
|
3
3
|
import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
|
|
4
|
-
import './DataFetcher-
|
|
5
|
-
import './pesquisa-fetcher-
|
|
4
|
+
import './DataFetcher-5221b992.js';
|
|
5
|
+
import './pesquisa-fetcher-0af41f09.js';
|
|
6
6
|
import { P as PresentationMode } from './index-3aa4977a.js';
|
|
7
7
|
import './ISave-d8c8bc59.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-8dd93d8b.js';
|
|
11
11
|
import './filter-item-type.enum-d45e026f.js';
|
|
12
|
-
import './form-config-fetcher-
|
|
12
|
+
import './form-config-fetcher-126e2471.js';
|
|
13
13
|
import { V as VIEW_MODE } from './constants-7302ee87.js';
|
|
14
|
-
import { A as AutorizationType } from './auth-fetcher-
|
|
14
|
+
import { A as AutorizationType } from './auth-fetcher-e32fe8a4.js';
|
|
15
15
|
import './index-bdf75557.js';
|
|
16
16
|
import './PrintUtils-3e4ff0f5.js';
|
|
17
17
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
@@ -38,6 +38,8 @@ const SnkCrud = class {
|
|
|
38
38
|
this._currentViewMode = VIEW_MODE.GRID;
|
|
39
39
|
this._canEdit = undefined;
|
|
40
40
|
this._resourceID = undefined;
|
|
41
|
+
this.enableLockManagerLoadingComp = false;
|
|
42
|
+
this.enableLockManagerTaskbarClick = false;
|
|
41
43
|
this.configName = undefined;
|
|
42
44
|
this.filterBarTitle = undefined;
|
|
43
45
|
this.selectionToastConfig = undefined;
|
|
@@ -59,7 +61,6 @@ const SnkCrud = class {
|
|
|
59
61
|
this.enableGridInsert = false;
|
|
60
62
|
this.domainMessagesBuilder = undefined;
|
|
61
63
|
this.ignoreReadOnlyFormFields = undefined;
|
|
62
|
-
this.enableLockManger = false;
|
|
63
64
|
this.setCustomFormTitle = undefined;
|
|
64
65
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
|
65
66
|
}
|
|
@@ -406,7 +407,7 @@ const SnkCrud = class {
|
|
|
406
407
|
return;
|
|
407
408
|
}
|
|
408
409
|
this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
|
|
409
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert,
|
|
410
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
|
410
411
|
}
|
|
411
412
|
get _element() { return getElement(this); }
|
|
412
413
|
static get watchers() { return {
|
|
@@ -3,15 +3,15 @@ import { ApplicationContext, ObjectUtils, UserInterface, DataType, ElementIDUtil
|
|
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { D as DataExporterOption, a as DataExporterType, b as DataExporterFormat } from './index-3aa4977a.js';
|
|
5
5
|
import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants-7302ee87.js';
|
|
6
|
-
import { D as DataFetcher } from './DataFetcher-
|
|
7
|
-
import { S as SnkDataUnit } from './snk-data-unit-
|
|
8
|
-
import './pesquisa-fetcher-
|
|
6
|
+
import { D as DataFetcher } from './DataFetcher-5221b992.js';
|
|
7
|
+
import { S as SnkDataUnit } from './snk-data-unit-11a49fc3.js';
|
|
8
|
+
import './pesquisa-fetcher-0af41f09.js';
|
|
9
9
|
import './ISave-d8c8bc59.js';
|
|
10
10
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
11
11
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
12
|
-
import './dataunit-fetcher-
|
|
12
|
+
import './dataunit-fetcher-8dd93d8b.js';
|
|
13
13
|
import './filter-item-type.enum-d45e026f.js';
|
|
14
|
-
import './form-config-fetcher-
|
|
14
|
+
import './form-config-fetcher-126e2471.js';
|
|
15
15
|
import './PrintUtils-3e4ff0f5.js';
|
|
16
16
|
import './SnkMessageBuilder-6fff4a4c.js';
|
|
17
17
|
import '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
@@ -250,7 +250,7 @@ function getFormatResponse(result) {
|
|
|
250
250
|
return ObjectUtils.stringToObject(response);
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
const DOC_MAX_WIDTH =
|
|
253
|
+
const DOC_MAX_WIDTH = 760;
|
|
254
254
|
function getVisibleColumns(columns) {
|
|
255
255
|
const visibleColumns = [];
|
|
256
256
|
let totalWidth = 0;
|
|
@@ -290,12 +290,19 @@ class ServerSideExporterStrategy {
|
|
|
290
290
|
const visibleColumns = getVisibleColumns(columns);
|
|
291
291
|
return visibleColumns;
|
|
292
292
|
}
|
|
293
|
+
async getColumns(resolveProps) {
|
|
294
|
+
var _a;
|
|
295
|
+
if ((_a = getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) === null || _a === void 0 ? void 0 : _a.includes("PDF")) {
|
|
296
|
+
return await this.getParsedColumns();
|
|
297
|
+
}
|
|
298
|
+
return await this._provider.getColumnsMetadata();
|
|
299
|
+
}
|
|
293
300
|
async getParams(resolveProps) {
|
|
294
|
-
var _a, _b, _c, _d, _e, _f
|
|
301
|
+
var _a, _b, _c, _d, _e, _f;
|
|
295
302
|
const filters = (_b = (_a = this._provider).getFilters) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
296
|
-
const columns =
|
|
297
|
-
const sort = (
|
|
298
|
-
const resourceURI = (
|
|
303
|
+
const columns = await this.getColumns(resolveProps);
|
|
304
|
+
const sort = (_d = (_c = this._provider).getOrders) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
305
|
+
const resourceURI = (_f = (_e = this._provider).getResourceURI) === null || _f === void 0 ? void 0 : _f.call(_e);
|
|
299
306
|
const selectedIDs = this._provider.getSelectedIDs();
|
|
300
307
|
const option = resolveProps.exportOption;
|
|
301
308
|
const currentPageOptions = [
|
|
@@ -349,11 +356,17 @@ class ClientSideExporterStrategy {
|
|
|
349
356
|
const visibleColumns = getVisibleColumns(columns);
|
|
350
357
|
return visibleColumns;
|
|
351
358
|
}
|
|
352
|
-
async
|
|
359
|
+
async getColumns(resolveProps) {
|
|
353
360
|
var _a;
|
|
361
|
+
if ((_a = getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) === null || _a === void 0 ? void 0 : _a.includes("PDF")) {
|
|
362
|
+
return await this.getParsedColumns();
|
|
363
|
+
}
|
|
364
|
+
return await this._provider.getColumnsMetadata();
|
|
365
|
+
}
|
|
366
|
+
async executeExport(resolveProps) {
|
|
354
367
|
const { methodName, gridTitle } = resolveProps;
|
|
355
368
|
const records = await this._provider.getRecords();
|
|
356
|
-
const columns =
|
|
369
|
+
const columns = await this.getColumns(resolveProps);
|
|
357
370
|
const [serviceName, processor] = this.getExecutor(methodName);
|
|
358
371
|
const payload = {
|
|
359
372
|
serviceName,
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, g as getElement, H as Host
|
|
|
2
2
|
import { Action, ObjectUtils, DataUnitAction, StringUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder-6fff4a4c.js';
|
|
5
|
-
import { g as getRecordValue, a as DatasetStrategy } from './dataunit-fetcher-
|
|
5
|
+
import { g as getRecordValue, a as DatasetStrategy } from './dataunit-fetcher-8dd93d8b.js';
|
|
6
6
|
import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
7
7
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { S as snk_data_unit } from './snk-data-unit-
|
|
1
|
+
export { S as snk_data_unit } from './snk-data-unit-11a49fc3.js';
|
|
2
2
|
import './index-a7d3d3f1.js';
|
|
3
3
|
import '@sankhyalabs/core';
|
|
4
4
|
import '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
5
|
import './SnkMessageBuilder-6fff4a4c.js';
|
|
6
|
-
import './dataunit-fetcher-
|
|
7
|
-
import './DataFetcher-
|
|
6
|
+
import './dataunit-fetcher-8dd93d8b.js';
|
|
7
|
+
import './DataFetcher-5221b992.js';
|
|
8
8
|
import './PrintUtils-3e4ff0f5.js';
|
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
10
10
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host } from './index-a7d3d3f1.js';
|
|
2
2
|
import { Action } from '@sankhyalabs/core';
|
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-b65e6db0.js';
|
|
4
4
|
import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
5
|
-
import './DataFetcher-
|
|
6
|
-
import './pesquisa-fetcher-
|
|
5
|
+
import './DataFetcher-5221b992.js';
|
|
6
|
+
import './pesquisa-fetcher-0af41f09.js';
|
|
7
7
|
import { P as PresentationMode } from './index-3aa4977a.js';
|
|
8
8
|
import './ISave-d8c8bc59.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-8dd93d8b.js';
|
|
12
12
|
import './filter-item-type.enum-d45e026f.js';
|
|
13
|
-
import './form-config-fetcher-
|
|
13
|
+
import './form-config-fetcher-126e2471.js';
|
|
14
14
|
import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
|
|
15
15
|
import { V as VIEW_MODE } from './constants-7302ee87.js';
|
|
16
|
-
import { S as SnkGuidesViewer } from './snk-guides-viewer-
|
|
16
|
+
import { S as SnkGuidesViewer } from './snk-guides-viewer-830f5fb9.js';
|
|
17
17
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-6fff4a4c.js';
|
|
18
|
-
import './ConfigStorage-
|
|
18
|
+
import './ConfigStorage-373bb440.js';
|
|
19
19
|
import './PrintUtils-3e4ff0f5.js';
|
|
20
20
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
21
21
|
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
|
2
|
-
import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext, FloatingManager, DateUtils, MaskFormatter, ArrayUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext, LockManager, LockManagerOperation, FloatingManager, DateUtils, MaskFormatter, ArrayUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-373bb440.js';
|
|
5
5
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
6
6
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
|
7
7
|
import { F as FilterOperand } from './index-ae591a44.js';
|
|
@@ -10,8 +10,8 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
|
10
10
|
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-e2b38ef7.js';
|
|
11
11
|
import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
12
12
|
import { F as FilterType } from './filter-type.enum-a80c1b6b.js';
|
|
13
|
-
import './form-config-fetcher-
|
|
14
|
-
import './DataFetcher-
|
|
13
|
+
import './form-config-fetcher-126e2471.js';
|
|
14
|
+
import './DataFetcher-5221b992.js';
|
|
15
15
|
import './PrintUtils-3e4ff0f5.js';
|
|
16
16
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
17
17
|
|
|
@@ -262,6 +262,7 @@ const SnkFilterBar = class {
|
|
|
262
262
|
this._firstLoad = true;
|
|
263
263
|
this._pendingVariables = false;
|
|
264
264
|
this._customfiltersToBeUpdated = [];
|
|
265
|
+
this._resolveLoading = undefined;
|
|
265
266
|
this._calculateSortIndex = (item) => {
|
|
266
267
|
if (!item.visible)
|
|
267
268
|
return 0;
|
|
@@ -275,6 +276,7 @@ const SnkFilterBar = class {
|
|
|
275
276
|
this._filtersComparator = (a, b) => {
|
|
276
277
|
return this._calculateSortIndex(b) - this._calculateSortIndex(a);
|
|
277
278
|
};
|
|
279
|
+
this.enableLockManagerLoadingComp = false;
|
|
278
280
|
this.customFilterBarConfig = undefined;
|
|
279
281
|
this.dataUnit = undefined;
|
|
280
282
|
this.title = undefined;
|
|
@@ -695,14 +697,26 @@ const SnkFilterBar = class {
|
|
|
695
697
|
this.personalizedFilterId = undefined;
|
|
696
698
|
this.showPersonalizedFilter = false;
|
|
697
699
|
}
|
|
698
|
-
componentWillLoad() {
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
this.
|
|
702
|
-
this.
|
|
703
|
-
this.
|
|
700
|
+
async componentWillLoad() {
|
|
701
|
+
var _a;
|
|
702
|
+
try {
|
|
703
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
704
|
+
await this.attachDataUnit();
|
|
705
|
+
if (this._application) {
|
|
706
|
+
if (this._application.enableLockManagerLoadingApp && this.enableLockManagerLoadingComp) {
|
|
707
|
+
const appLoadLockerID = LockManager.addLockManagerCtxId(this._element);
|
|
708
|
+
this._resolveLoading = LockManager.lock(appLoadLockerID, LockManagerOperation.APP_LOADING);
|
|
709
|
+
}
|
|
710
|
+
await Promise.all([
|
|
711
|
+
this.loadPermitions(),
|
|
712
|
+
this.addFilterBarLegacyConfigName(),
|
|
713
|
+
this.loadConfigFromStorage(),
|
|
714
|
+
]);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
finally {
|
|
718
|
+
(_a = this._resolveLoading) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
704
719
|
}
|
|
705
|
-
this.attachDataUnit();
|
|
706
720
|
}
|
|
707
721
|
componentDidRender() {
|
|
708
722
|
this.processPendingFilter();
|
|
@@ -2,10 +2,10 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
|
|
|
2
2
|
import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
|
4
4
|
import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
|
|
5
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
5
|
+
import { C as ConfigStorage } from './ConfigStorage-373bb440.js';
|
|
6
6
|
import { F as FilterType } from './filter-type.enum-a80c1b6b.js';
|
|
7
|
-
import './form-config-fetcher-
|
|
8
|
-
import './DataFetcher-
|
|
7
|
+
import './form-config-fetcher-126e2471.js';
|
|
8
|
+
import './DataFetcher-5221b992.js';
|
|
9
9
|
import './PrintUtils-3e4ff0f5.js';
|
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
11
11
|
|