@sankhyalabs/sankhyablocks 10.1.0-dev.1 → 10.1.0-dev.3
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-5a73e979.js → ConfigStorage-b29e31be.js} +2 -2
- package/dist/cjs/{DataFetcher-eeb3b0b7.js → DataFetcher-ed9d97ea.js} +1 -1
- package/dist/cjs/{ISave-861e9d6d.js → ISave-81eb2fbc.js} +4 -4
- package/dist/cjs/{SnkFormConfigManager-8d4fded8.js → SnkFormConfigManager-6838389c.js} +2 -2
- package/dist/cjs/{SnkMultiSelectionListDataSource-3b93f6a6.js → SnkMultiSelectionListDataSource-1e804147.js} +4 -4
- package/dist/cjs/{auth-fetcher-8d8acd69.js → auth-fetcher-cc28d847.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-1cea0695.js → dataunit-fetcher-ab1cc071.js} +1 -1
- package/dist/cjs/{form-config-fetcher-f347f884.js → form-config-fetcher-f0897eb5.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_9.cjs.entry.js +14 -7
- package/dist/cjs/snk-application.cjs.entry.js +81 -69
- package/dist/cjs/snk-attach.cjs.entry.js +5 -5
- package/dist/cjs/snk-crud.cjs.entry.js +90 -6
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-de248308.js → snk-data-unit-68992932.js} +2 -2
- 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 +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form-view.cjs.entry.js +2 -6
- package/dist/cjs/snk-form_2.cjs.entry.js +4 -4
- package/dist/cjs/snk-grid.cjs.entry.js +8 -7
- package/dist/cjs/{snk-guides-viewer-4ec3e7e1.js → snk-guides-viewer-8b841753.js} +6 -6
- 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 +17 -5
- package/dist/cjs/snk-simple-crud.cjs.entry.js +7 -7
- package/dist/cjs/snk-taskbar.cjs.entry.js +8 -4
- package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.js +27 -0
- package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +5 -25
- package/dist/collection/components/snk-application/snk-application.js +87 -44
- package/dist/collection/components/snk-crud/snk-crud.js +106 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +2 -6
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
- package/dist/collection/components/snk-grid/snk-grid.js +20 -1
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +9 -2
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +5 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +47 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +29 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +3 -3
- package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +1 -1
- package/dist/components/DataFetcher.js +1 -1
- package/dist/components/ISave.js +3 -3
- package/dist/components/snk-application2.js +76 -63
- package/dist/components/snk-crud.js +88 -1
- package/dist/components/snk-detail-view2.js +1 -1
- package/dist/components/snk-form-view2.js +2 -6
- package/dist/components/snk-grid2.js +3 -1
- package/dist/components/snk-layout-form-config2.js +9 -2
- package/dist/components/snk-pesquisa2.js +15 -2
- package/dist/components/snk-taskbar2.js +9 -4
- package/dist/esm/{ConfigStorage-568dc227.js → ConfigStorage-13d80e36.js} +2 -2
- package/dist/esm/{DataFetcher-743feb3b.js → DataFetcher-f4ccd9f3.js} +1 -1
- package/dist/esm/{ISave-345481c1.js → ISave-288fa9df.js} +4 -4
- package/dist/esm/{SnkFormConfigManager-d61df0c8.js → SnkFormConfigManager-3ee2937b.js} +2 -2
- package/dist/esm/{SnkMultiSelectionListDataSource-ca8d7a09.js → SnkMultiSelectionListDataSource-5d3a93f2.js} +4 -4
- package/dist/esm/{auth-fetcher-c353127d.js → auth-fetcher-59ab0c67.js} +1 -1
- package/dist/esm/{dataunit-fetcher-7f2c61ca.js → dataunit-fetcher-c4f9f222.js} +1 -1
- package/dist/esm/{form-config-fetcher-898d2dd1.js → form-config-fetcher-6a00fe9e.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +4 -4
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_9.entry.js +14 -7
- package/dist/esm/snk-application.entry.js +81 -69
- package/dist/esm/snk-attach.entry.js +5 -5
- package/dist/esm/snk-crud.entry.js +90 -6
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-60b338c5.js → snk-data-unit-0edeb967.js} +2 -2
- 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 +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form-view.entry.js +2 -6
- package/dist/esm/snk-form_2.entry.js +4 -4
- package/dist/esm/snk-grid.entry.js +8 -7
- package/dist/esm/{snk-guides-viewer-339e10b3.js → snk-guides-viewer-9cd4d20f.js} +6 -6
- 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 +17 -5
- package/dist/esm/snk-simple-crud.entry.js +7 -7
- package/dist/esm/snk-taskbar.entry.js +8 -4
- package/dist/sankhyablocks/{p-9fe91526.js → p-0e279e7a.js} +1 -1
- package/dist/sankhyablocks/{p-9b6d4950.entry.js → p-1858c023.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1d585081.js → p-1c2971e4.js} +1 -1
- package/dist/sankhyablocks/{p-27005fac.entry.js → p-26e0f63c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bb0de89c.entry.js → p-34df7eca.entry.js} +1 -1
- package/dist/sankhyablocks/p-34f447ba.entry.js +1 -0
- package/dist/sankhyablocks/{p-bd203e8d.entry.js → p-38e56b68.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1649f51e.entry.js → p-3abeeefa.entry.js} +1 -1
- package/dist/sankhyablocks/{p-144da1d1.entry.js → p-3d021bef.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e64958ba.entry.js → p-44939a0e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-88ed2793.js → p-5304753a.js} +2 -2
- package/dist/sankhyablocks/{p-e8c49c12.js → p-53599b26.js} +2 -2
- package/dist/sankhyablocks/p-557368df.entry.js +1 -0
- package/dist/sankhyablocks/p-583151c5.entry.js +1 -0
- package/dist/sankhyablocks/{p-1f8cb438.entry.js → p-6180de07.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1788d191.js → p-78ff8734.js} +1 -1
- package/dist/sankhyablocks/{p-e6b1c769.entry.js → p-80014119.entry.js} +1 -1
- package/dist/sankhyablocks/{p-af9d79e0.entry.js → p-8a88690f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7fc46290.js → p-9317942f.js} +1 -1
- package/dist/sankhyablocks/p-a2ed1ebd.entry.js +1 -0
- package/dist/sankhyablocks/{p-0cf9aa38.js → p-a644a956.js} +1 -1
- package/dist/sankhyablocks/p-ae108ffd.entry.js +11 -0
- package/dist/sankhyablocks/{p-9f2cdaab.entry.js → p-b4322b87.entry.js} +1 -1
- package/dist/sankhyablocks/p-b7e891cc.entry.js +1 -0
- package/dist/sankhyablocks/{p-6d241415.js → p-bb2f5f38.js} +1 -1
- package/dist/sankhyablocks/{p-626b7a17.js → p-d9c54991.js} +1 -1
- package/dist/sankhyablocks/{p-c90f337a.entry.js → p-e9021f79.entry.js} +1 -1
- package/dist/sankhyablocks/{p-59b8f277.js → p-f15478a1.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.d.ts +5 -0
- package/dist/types/components/snk-application/snk-application.d.ts +9 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +12 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +4 -0
- package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +2 -2
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +9 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +6 -1
- package/dist/types/components.d.ts +39 -0
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-2c86cfab.entry.js +0 -1
- package/dist/sankhyablocks/p-4759912d.entry.js +0 -1
- package/dist/sankhyablocks/p-56948f00.entry.js +0 -11
- package/dist/sankhyablocks/p-95c71f5e.entry.js +0 -1
- package/dist/sankhyablocks/p-aae4258d.entry.js +0 -1
- package/dist/sankhyablocks/p-f25c50f7.entry.js +0 -1
@@ -385,32 +385,40 @@ class RequestListenerFactory {
|
|
385
385
|
}
|
386
386
|
}
|
387
387
|
|
388
|
+
const executeAdvancedModeSearch = async (argument, options, app, pesquisaFetcher) => {
|
389
|
+
const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic, executeOnOpen } = options;
|
390
|
+
return new Promise((accept, reject) => {
|
391
|
+
const pesquisaContent = document.createElement("snk-pesquisa");
|
392
|
+
pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
393
|
+
pesquisaContent.entityName = entity;
|
394
|
+
pesquisaContent.argument = argument;
|
395
|
+
pesquisaContent.searchLoader = (text) => pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
396
|
+
pesquisaContent.isHierarchyEntity = isHierarchyEntity;
|
397
|
+
if (isHierarchyEntity) {
|
398
|
+
pesquisaContent.treeLoader = (text) => pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
|
399
|
+
pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
|
400
|
+
}
|
401
|
+
pesquisaContent.selectItem = (option) => {
|
402
|
+
accept(option);
|
403
|
+
app.clearPopUpTitle();
|
404
|
+
app.closePopUp();
|
405
|
+
};
|
406
|
+
app.setPopUpTitle(entityDescription);
|
407
|
+
app.showPopUp(pesquisaContent, undefined, undefined, reject);
|
408
|
+
if (executeOnOpen) {
|
409
|
+
pesquisaContent.executeSearch(argument);
|
410
|
+
}
|
411
|
+
});
|
412
|
+
};
|
413
|
+
|
388
414
|
const QTD_DETAIL_FIELDS_PREDICTIVE_SEARCH = 6;
|
389
415
|
const INVALID_CONTENT_PATTERNS = ['<img', '<svg'];
|
390
416
|
const executePreparedSearchPlus = async (mode, argument, options, app, pesquisaFetcher) => {
|
391
417
|
var _a;
|
392
418
|
const mdByName = {};
|
393
|
-
const { entity,
|
419
|
+
const { entity, criteria, searchOptions } = options;
|
394
420
|
if (mode === "ADVANCED") {
|
395
|
-
return
|
396
|
-
const pesquisaContent = document.createElement("snk-pesquisa");
|
397
|
-
pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
398
|
-
pesquisaContent.entityName = entity;
|
399
|
-
pesquisaContent.argument = argument;
|
400
|
-
pesquisaContent.searchLoader = (text) => pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
401
|
-
pesquisaContent.isHierarchyEntity = isHierarchyEntity;
|
402
|
-
if (isHierarchyEntity) {
|
403
|
-
pesquisaContent.treeLoader = (text) => pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
|
404
|
-
pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
|
405
|
-
}
|
406
|
-
pesquisaContent.selectItem = (option) => {
|
407
|
-
accept(option);
|
408
|
-
app.clearPopUpTitle();
|
409
|
-
app.closePopUp();
|
410
|
-
};
|
411
|
-
app.setPopUpTitle(entityDescription);
|
412
|
-
app.showPopUp(pesquisaContent, undefined, undefined, reject);
|
413
|
-
});
|
421
|
+
return executeAdvancedModeSearch(argument, options, app, pesquisaFetcher);
|
414
422
|
}
|
415
423
|
else if (mode === "LOAD_DESCRIPTION") {
|
416
424
|
let result = await pesquisaFetcher.loadByCode(entity, argument, criteria, searchOptions);
|
@@ -447,14 +455,13 @@ const buildOptionItem = (argument, item, fields, descriptionField, pkField) => {
|
|
447
455
|
const matchFields = item['__matchFields'];
|
448
456
|
const descriptionValue = (_a = item[descriptionField]) !== null && _a !== void 0 ? _a : "";
|
449
457
|
const pkValue = item[pkField];
|
450
|
-
|
458
|
+
return {
|
451
459
|
value: pkValue,
|
452
460
|
label: descriptionValue,
|
453
461
|
presentationValue: StringUtils.highlightValue(argument, matchFields, pkValue, fields, true),
|
454
462
|
presentationLabel: descriptionField ? StringUtils.highlightValue(argument, matchFields, descriptionValue, fields, true) : "",
|
455
463
|
details: SearchUtils.buildDetails(argument, fields, item)
|
456
464
|
};
|
457
|
-
return searchOption;
|
458
465
|
};
|
459
466
|
const filterInvalidFields = (resp, item, mdByName) => {
|
460
467
|
let fieldsMetadata = resp.fieldsMetadata.filter((field) => {
|
@@ -890,7 +897,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
890
897
|
if (this._featureFlagsCache.get(featureName) && now < this._featureFlagsCache.get(featureName).expires) {
|
891
898
|
return Promise.resolve(this._featureFlagsCache.get(featureName).isActive);
|
892
899
|
}
|
893
|
-
//Caso ocorra um erro nessa chamada, o reject do error é feito automaticamente
|
900
|
+
//Caso ocorra um erro nessa chamada, o reject do error é feito automaticamente
|
894
901
|
const result = await DataFetcher.get().callServiceBroker("SystemUtilsSP.featureIsActive", JSON.stringify(payload));
|
895
902
|
const isActive = result.isActive;
|
896
903
|
this._featureFlagsCache.set(featureName, {
|
@@ -1381,52 +1388,57 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
1381
1388
|
*/
|
1382
1389
|
async executePreparedSearch(mode, argument, options) {
|
1383
1390
|
const mdByName = {};
|
1384
|
-
const { entity,
|
1391
|
+
const { entity, criteria, searchOptions, useSearchPlus } = options;
|
1385
1392
|
if (useSearchPlus) {
|
1386
1393
|
return executePreparedSearchPlus(mode, argument, options, this, this.pesquisaFetcher);
|
1387
1394
|
}
|
1388
1395
|
if (mode === "ADVANCED") {
|
1389
|
-
return
|
1390
|
-
const pesquisaContent = document.createElement("snk-pesquisa");
|
1391
|
-
pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
1392
|
-
pesquisaContent.entityName = entity;
|
1393
|
-
pesquisaContent.argument = argument;
|
1394
|
-
pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
1395
|
-
pesquisaContent.isHierarchyEntity = isHierarchyEntity;
|
1396
|
-
if (isHierarchyEntity) {
|
1397
|
-
pesquisaContent.treeLoader = (text) => this.pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
|
1398
|
-
pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
|
1399
|
-
}
|
1400
|
-
pesquisaContent.selectItem = (option) => {
|
1401
|
-
accept(option);
|
1402
|
-
this.clearPopUpTitle();
|
1403
|
-
this.closePopUp();
|
1404
|
-
};
|
1405
|
-
this.setPopUpTitle(entityDescription);
|
1406
|
-
this.showPopUp(pesquisaContent, undefined, undefined, reject);
|
1407
|
-
});
|
1396
|
+
return executeAdvancedModeSearch(argument, options, this, this.pesquisaFetcher);
|
1408
1397
|
}
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
result.data.forEach((item) => {
|
1418
|
-
let fieldsMetadata = this.filterInvalidFields(result, item, mdByName);
|
1419
|
-
let qtyFields = 6;
|
1420
|
-
let fields = this.filterMathFields(item['__matchFields'], fieldsMetadata, qtyFields, mdByName);
|
1421
|
-
list.push(this.builOptionItem(argument, item, fields, descriptionField, pkField));
|
1422
|
-
});
|
1423
|
-
resolve(list);
|
1424
|
-
})
|
1425
|
-
.catch(error => {
|
1426
|
-
reject(error);
|
1427
|
-
});
|
1398
|
+
return new Promise((resolve, reject) => {
|
1399
|
+
this.pesquisaFetcher.loadAdvancedSearch(entity, argument, criteria, searchOptions)
|
1400
|
+
.then(result => {
|
1401
|
+
result = ObjectUtils.stringToObject(result.json.$);
|
1402
|
+
resolve(this.buildSearchResultList(result, mdByName, argument));
|
1403
|
+
})
|
1404
|
+
.catch(error => {
|
1405
|
+
reject(error);
|
1428
1406
|
});
|
1429
|
-
}
|
1407
|
+
});
|
1408
|
+
}
|
1409
|
+
/**
|
1410
|
+
* Obtém as opções em componentes de pesquisa além dos metadados como showMore e entityPk.
|
1411
|
+
* @param {string} argument - O argumento da pesquisa.
|
1412
|
+
* @param {any} options - Opções preparadas para a pesquisa.
|
1413
|
+
* @returns {Promise<Array<IOption> | IOption>} Uma lista de opções ou uma única opção.
|
1414
|
+
* @async
|
1415
|
+
*/
|
1416
|
+
async executePreparedSearchWithFullResponse(argument, options) {
|
1417
|
+
const mdByName = {};
|
1418
|
+
const { entity, criteria, searchOptions } = options;
|
1419
|
+
return new Promise((resolve, reject) => {
|
1420
|
+
this.pesquisaFetcher.loadAdvancedSearch(entity, argument, criteria, searchOptions)
|
1421
|
+
.then(result => {
|
1422
|
+
result = ObjectUtils.stringToObject(result.json.$);
|
1423
|
+
result.data = this.buildSearchResultList(result, mdByName, argument);
|
1424
|
+
resolve(result);
|
1425
|
+
})
|
1426
|
+
.catch(error => {
|
1427
|
+
reject(error);
|
1428
|
+
});
|
1429
|
+
});
|
1430
|
+
}
|
1431
|
+
buildSearchResultList(result, mdByName, argument) {
|
1432
|
+
let descriptionField = result.descriptionField;
|
1433
|
+
let pkField = result.pkField;
|
1434
|
+
const list = [];
|
1435
|
+
result.data.forEach((item) => {
|
1436
|
+
let fieldsMetadata = this.filterInvalidFields(result, item, mdByName);
|
1437
|
+
let qtyFields = 6;
|
1438
|
+
let fields = this.filterMathFields(item['__matchFields'], fieldsMetadata, qtyFields, mdByName);
|
1439
|
+
list.push(this.builOptionItem(argument, item, fields, descriptionField, pkField));
|
1440
|
+
});
|
1441
|
+
return list;
|
1430
1442
|
}
|
1431
1443
|
/**
|
1432
1444
|
* Obtém `true` caso a tela esteja em modo de debug.
|
@@ -1979,6 +1991,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
1979
1991
|
"executeSearch": [64],
|
1980
1992
|
"executePreparedSearchPlus": [64],
|
1981
1993
|
"executePreparedSearch": [64],
|
1994
|
+
"executePreparedSearchWithFullResponse": [64],
|
1982
1995
|
"isDebugMode": [64],
|
1983
1996
|
"getAppLabel": [64],
|
1984
1997
|
"addSearchListener": [64],
|
@@ -67,6 +67,38 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
67
67
|
this._viewHistory = [];
|
68
68
|
this._customEditors = new Map();
|
69
69
|
this._customRenders = new Map();
|
70
|
+
this.loadEntitySuggestions = async (argument) => {
|
71
|
+
var _a;
|
72
|
+
const value = (_a = argument === null || argument === void 0 ? void 0 : argument.argument) !== null && _a !== void 0 ? _a : '';
|
73
|
+
const mode = (argument === null || argument === void 0 ? void 0 : argument.mode) || "PREDICTIVE";
|
74
|
+
if (!value || value.trim().length === 0) {
|
75
|
+
return [];
|
76
|
+
}
|
77
|
+
try {
|
78
|
+
this._showMoreOnSearch = false;
|
79
|
+
const entityName = this._snkDataUnit.entityName;
|
80
|
+
if (mode === "PREDICTIVE") {
|
81
|
+
return await this.handlePredictiveSearch(value, entityName);
|
82
|
+
}
|
83
|
+
return await this._application.executePreparedSearch(mode, value, this.buildSearchOptions(entityName));
|
84
|
+
}
|
85
|
+
catch (error) {
|
86
|
+
console.error('Erro ao carregar sugestões de entidades:', error);
|
87
|
+
return [];
|
88
|
+
}
|
89
|
+
};
|
90
|
+
this.searchEntitySelect = async (item) => {
|
91
|
+
if (!this._entityPKField || !item) {
|
92
|
+
return;
|
93
|
+
}
|
94
|
+
try {
|
95
|
+
const pk = [{ name: this._entityPKField, value: item.value }];
|
96
|
+
await this.refreshDataUnitByPk(pk);
|
97
|
+
}
|
98
|
+
catch (error) {
|
99
|
+
console.error('Erro ao selecionar entidade:', error);
|
100
|
+
}
|
101
|
+
};
|
70
102
|
this.dataUnitInterceptor = {
|
71
103
|
interceptAction: (action) => {
|
72
104
|
if (action.type === Action.DATA_SAVED) {
|
@@ -83,6 +115,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
83
115
|
this._resourceID = undefined;
|
84
116
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
85
117
|
this.numberingConfig = undefined;
|
118
|
+
this._showMoreOnSearch = false;
|
119
|
+
this._entityPKField = undefined;
|
86
120
|
this.enableLockManagerLoadingComp = false;
|
87
121
|
this.enableLockManagerTaskbarClick = false;
|
88
122
|
this.configName = undefined;
|
@@ -111,6 +145,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
111
145
|
this.layoutFormConfig = true;
|
112
146
|
this.multipleEditionEnabled = true;
|
113
147
|
this.paginationCounterMode = 'auto';
|
148
|
+
this.showEntitySearch = true;
|
114
149
|
this.disableNumberingConfig = false;
|
115
150
|
}
|
116
151
|
/**
|
@@ -406,6 +441,49 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
406
441
|
var _a;
|
407
442
|
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
408
443
|
}
|
444
|
+
async handlePredictiveSearch(argument, entityName) {
|
445
|
+
var _a, _b;
|
446
|
+
const response = await this._application.executePreparedSearchWithFullResponse(argument, this.buildSearchOptions(entityName, 5));
|
447
|
+
this._showMoreOnSearch = (_a = response === null || response === void 0 ? void 0 : response.hasMore) !== null && _a !== void 0 ? _a : false;
|
448
|
+
this._entityPKField = response === null || response === void 0 ? void 0 : response.pkField;
|
449
|
+
return (_b = response === null || response === void 0 ? void 0 : response.data) !== null && _b !== void 0 ? _b : [];
|
450
|
+
}
|
451
|
+
async refreshDataUnitByPk(pks) {
|
452
|
+
try {
|
453
|
+
const pkField = pks[0].name;
|
454
|
+
const pkValue = pks[0].value;
|
455
|
+
// Criar filtro para a busca específica
|
456
|
+
const quickFilter = {
|
457
|
+
term: '',
|
458
|
+
filter: {
|
459
|
+
name: '',
|
460
|
+
params: [],
|
461
|
+
expression: `(${pkField} = ${pkValue})`
|
462
|
+
}
|
463
|
+
};
|
464
|
+
// Carregar dados com o filtro aplicado diretamente
|
465
|
+
await this._dataUnit.loadData(quickFilter);
|
466
|
+
// Navegar para o formulário se houver apenas um registro
|
467
|
+
if (this._dataUnit.records.length === 1) {
|
468
|
+
this._dataUnit.selectFirst();
|
469
|
+
this.gridToForm(true);
|
470
|
+
}
|
471
|
+
}
|
472
|
+
catch (error) {
|
473
|
+
console.error('Erro ao atualizar dataset:', error);
|
474
|
+
}
|
475
|
+
}
|
476
|
+
buildSearchOptions(entityName, limit) {
|
477
|
+
return {
|
478
|
+
entity: entityName,
|
479
|
+
entityDescription: entityName,
|
480
|
+
executeOnOpen: true,
|
481
|
+
searchOptions: {
|
482
|
+
localEntityName: entityName,
|
483
|
+
limit,
|
484
|
+
}
|
485
|
+
};
|
486
|
+
}
|
409
487
|
async toggleView() {
|
410
488
|
const currentView = await this._viewStack.getSelectedIndex();
|
411
489
|
this.setViewMode(VIEW_MODE.GRID === currentView ? VIEW_MODE.FORM : VIEW_MODE.GRID);
|
@@ -512,12 +590,18 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
512
590
|
}
|
513
591
|
this.configuratorCancel.emit();
|
514
592
|
}
|
593
|
+
renderDynamicSearch(slotName) {
|
594
|
+
var _a;
|
595
|
+
if (!this.showEntitySearch || ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.insertionMode) === true)
|
596
|
+
return;
|
597
|
+
return (h("div", { slot: slotName, class: "entity-search-container", style: { position: 'relative', display: 'inline-block', marginLeft: '10px', minWidth: '200px' } }, h("ez-search", { label: "Buscar registros", optionLoader: this.loadEntitySuggestions, onEzChange: (evt) => this.searchEntitySelect(evt.detail), mode: "slim", showMore: this._showMoreOnSearch, suppressEmptyOption: true, suppressInputPersist: true })));
|
598
|
+
}
|
515
599
|
render() {
|
516
600
|
if (this._resourceID == undefined) {
|
517
601
|
return;
|
518
602
|
}
|
519
603
|
this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
|
520
|
-
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, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode }, 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", { tabIndex: "0" }, 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, entityName: this._snkDataUnit.entityName, 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, layoutFormConfig: this.layoutFormConfig })), 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" }))));
|
604
|
+
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, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode }, 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" }), this.renderDynamicSearch("GRID_HEADER_DYNAMIC_SEARCH"))), 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" }), this.renderDynamicSearch("GUIDES_VIEWER_DYNAMIC_SEARCH"), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", { tabIndex: "0" }, 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, entityName: this._snkDataUnit.entityName, 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, layoutFormConfig: this.layoutFormConfig })), 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" }))));
|
521
605
|
}
|
522
606
|
get _element() { return this; }
|
523
607
|
static get watchers() { return {
|
@@ -553,6 +637,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
553
637
|
"layoutFormConfig": [4, "layout-form-config"],
|
554
638
|
"multipleEditionEnabled": [4, "multiple-edition-enabled"],
|
555
639
|
"paginationCounterMode": [1, "pagination-counter-mode"],
|
640
|
+
"showEntitySearch": [4, "show-entity-search"],
|
556
641
|
"disableNumberingConfig": [4, "disable-numbering-config"],
|
557
642
|
"_dataUnit": [32],
|
558
643
|
"_dataState": [32],
|
@@ -562,6 +647,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
562
647
|
"_resourceID": [32],
|
563
648
|
"customContainerId": [32],
|
564
649
|
"numberingConfig": [32],
|
650
|
+
"_showMoreOnSearch": [32],
|
651
|
+
"_entityPKField": [32],
|
565
652
|
"goToView": [64],
|
566
653
|
"openConfigurator": [64],
|
567
654
|
"closeConfigurator": [64],
|
@@ -512,7 +512,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
512
512
|
}
|
513
513
|
buildTaskBar() {
|
514
514
|
var _a;
|
515
|
-
return h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.getActionsList(), actionsSettingsList: this.getSettingsListForm(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? TaskbarElement.SAVE : TaskbarElement.INSERT, "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS", alignRigth: true }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
|
515
|
+
return h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.getActionsList(), actionsSettingsList: this.getSettingsListForm(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? TaskbarElement.SAVE : TaskbarElement.INSERT, "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS", additionalSlotId: "GUIDES_VIEWER_DYNAMIC_SEARCH", alignRigth: true }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GUIDES_VIEWER_DYNAMIC_SEARCH" })));
|
516
516
|
}
|
517
517
|
async dataUnitActionHandler(action) {
|
518
518
|
var _a;
|
@@ -15,7 +15,7 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
15
15
|
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
16
16
|
this._customEditors = new Map();
|
17
17
|
this._fieldProps = new Map();
|
18
|
-
this._singleColumn =
|
18
|
+
this._singleColumn = false;
|
19
19
|
this.levelPath = undefined;
|
20
20
|
this.fieldSearch = undefined;
|
21
21
|
this.label = undefined;
|
@@ -153,11 +153,7 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
153
153
|
}
|
154
154
|
}
|
155
155
|
setSingleColumn(layoutFormConfig) {
|
156
|
-
|
157
|
-
this._singleColumn = true;
|
158
|
-
return;
|
159
|
-
}
|
160
|
-
this._singleColumn = (layoutFormConfig.config === FormLayout.CASCADE);
|
156
|
+
this._singleColumn = (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === FormLayout.CASCADE;
|
161
157
|
}
|
162
158
|
registerNotifyListeners(layoutFormConfig) {
|
163
159
|
if (!layoutFormConfig)
|
@@ -158,6 +158,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
158
158
|
this.canEdit = true;
|
159
159
|
this.taskbarCustomContainerId = undefined;
|
160
160
|
this.gridHeaderCustomSlotId = 'GRID_HEADER_CUSTOM_ELEMENTS';
|
161
|
+
this.gridHeaderDynamicSearchSlotId = 'GRID_HEADER_DYNAMIC_SEARCH';
|
161
162
|
this.topTaskbarCustomSlotId = 'GRID_TASKBAR_CUSTOM_ELEMENTS';
|
162
163
|
this.disablePersonalizedFilter = undefined;
|
163
164
|
this.gridLegacyConfigName = undefined;
|
@@ -676,7 +677,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
676
677
|
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline", tabindex: "0" }, h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
|
677
678
|
h(Fragment, null, 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, filterCustomConfig: this.filterCustomConfig, filterCustomConfigInterceptor: this.filterCustomConfigInterceptor }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), 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() }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === 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) => {
|
678
679
|
this.gridConfigChangeHandler(evt);
|
679
|
-
}, 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 }, 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() }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, h("slot", { name: "SnkGridFooter" })), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._popUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
680
|
+
}, 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 }, 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, additionalSlotId: this.gridHeaderDynamicSearchSlotId, actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.gridHeaderCustomSlotId }), h("slot", { name: this.gridHeaderDynamicSearchSlotId }))), h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, h("slot", { name: "SnkGridFooter" })), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._popUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
680
681
|
}
|
681
682
|
get _element() { return this; }
|
682
683
|
static get watchers() { return {
|
@@ -703,6 +704,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
703
704
|
"canEdit": [4, "can-edit"],
|
704
705
|
"taskbarCustomContainerId": [1, "taskbar-custom-container-id"],
|
705
706
|
"gridHeaderCustomSlotId": [1, "grid-header-custom-slot-id"],
|
707
|
+
"gridHeaderDynamicSearchSlotId": [1, "grid-header-dynamic-search-slot-id"],
|
706
708
|
"topTaskbarCustomSlotId": [1, "top-taskbar-custom-slot-id"],
|
707
709
|
"disablePersonalizedFilter": [4, "disable-personalized-filter"],
|
708
710
|
"gridLegacyConfigName": [1, "grid-legacy-config-name"],
|
@@ -20,7 +20,7 @@ const SnkLayoutFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
20
20
|
this.__registerHost();
|
21
21
|
this._formConfigFetcher = new FormConfigFetcher();
|
22
22
|
this.messagesBuilder = undefined;
|
23
|
-
this.layoutType = FormLayout.
|
23
|
+
this.layoutType = FormLayout.SIDE_BY_SIDE;
|
24
24
|
}
|
25
25
|
/**
|
26
26
|
* Salva o tipo de layout escolhido. Sem retorno.
|
@@ -39,7 +39,14 @@ const SnkLayoutFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
39
39
|
if (!this._LayoutFormConfigSingleton)
|
40
40
|
return;
|
41
41
|
const { config } = this._LayoutFormConfigSingleton;
|
42
|
-
|
42
|
+
if (config == null) {
|
43
|
+
this.layoutType = FormLayout.SIDE_BY_SIDE;
|
44
|
+
return;
|
45
|
+
}
|
46
|
+
const configAsNumber = Number(config);
|
47
|
+
this.layoutType = Object.values(FormLayout).includes(configAsNumber)
|
48
|
+
? configAsNumber
|
49
|
+
: FormLayout.SIDE_BY_SIDE;
|
43
50
|
}
|
44
51
|
toggleLayout(key) {
|
45
52
|
this.layoutType = key;
|
@@ -11,7 +11,7 @@ import './constants.js';
|
|
11
11
|
import { d as defineCustomElement$2 } from './pesquisa-grid2.js';
|
12
12
|
import { d as defineCustomElement$1 } from './pesquisa-tree2.js';
|
13
13
|
|
14
|
-
const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--color-secondary:var(--text--secondary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--small, 6px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right);height:
|
14
|
+
const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--color-secondary:var(--text--secondary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--small, 6px);--snk-pesquisa__scrollable-content--height:calc(100vh - 300px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right);height:var(--snk-pesquisa__scrollable-content--height)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records-label.sc-snk-pesquisa{display:flex;flex-direction:row;justify-content:space-between;font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__records-label.hidden.sc-snk-pesquisa{display:none}.snk-pesquisa__records.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color)}.snk-pesquisa__records-limit.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color-secondary)}.snk-pesquisa__records-limit.hidden.sc-snk-pesquisa,.snk-pesquisa__records.hidden.sc-snk-pesquisa{visibility:hidden}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}.snk-pesquisa__cards-container.sc-snk-pesquisa{height:100%;overflow-y:auto}";
|
15
15
|
|
16
16
|
const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
17
17
|
constructor() {
|
@@ -46,6 +46,18 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
46
46
|
this._textInput.value = this.argument;
|
47
47
|
}
|
48
48
|
}
|
49
|
+
/** * Executa uma pesquisa programaticamente.
|
50
|
+
* Útil para cenários onde a pesquisa precisa ser disparada sem interação do usuário.
|
51
|
+
*
|
52
|
+
* @param text Texto utilizado como argumento de pesquisa.
|
53
|
+
* @returns Promise<void>
|
54
|
+
* @example
|
55
|
+
* await pesquisaRef.executeSearch("Texto para pesquisa");
|
56
|
+
*/
|
57
|
+
async executeSearch(text) {
|
58
|
+
this.argument = text;
|
59
|
+
this.onChangeValue({ detail: text });
|
60
|
+
}
|
49
61
|
clearSearch() {
|
50
62
|
this.argument = "";
|
51
63
|
this._itemList = undefined;
|
@@ -417,7 +429,8 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
417
429
|
"_startLoading": [32],
|
418
430
|
"_presentationMode": [32],
|
419
431
|
"_currentView": [32],
|
420
|
-
"_valideDataSource": [32]
|
432
|
+
"_valideDataSource": [32],
|
433
|
+
"executeSearch": [64]
|
421
434
|
}]);
|
422
435
|
function defineCustomElement() {
|
423
436
|
if (typeof customElements === "undefined") {
|
@@ -144,9 +144,10 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
144
144
|
this.taskbarSaveUnlocker = createEvent(this, "taskbarSaveUnlocker", 7);
|
145
145
|
this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
|
146
146
|
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
147
|
-
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
148
147
|
this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
|
149
148
|
this.TASKBAR_CUSTOM_ELEMENTS = 'taskbar-custom-elements-container';
|
149
|
+
this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME = 'taskbar-additional-slot-container';
|
150
|
+
this.TASKBAR_ADDITIONAL_SLOT = 'taskbar-additional-slot-container';
|
150
151
|
this._titleKeyByElement = {
|
151
152
|
[TaskbarElement.UPDATE_MULTIPLE]: "snkTaskbar.titleUpdateMultiple",
|
152
153
|
[TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
@@ -189,6 +190,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
189
190
|
this._isWaitingForSave = false;
|
190
191
|
this.alignRigth = false;
|
191
192
|
this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
|
193
|
+
this.additionalSlotId = "TASKBAR_ADDITIONAL_SLOT";
|
192
194
|
this.customContainerId = undefined;
|
193
195
|
this.overflowStrategy = 'hiddenItems';
|
194
196
|
this.configName = undefined;
|
@@ -509,7 +511,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
509
511
|
return (_a = element.getAttribute('data-taskbar-label')) !== null && _a !== void 0 ? _a : "";
|
510
512
|
}
|
511
513
|
hasToIgnoreOverFlow(element) {
|
512
|
-
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME)
|
514
|
+
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME) ||
|
515
|
+
element.classList.contains(this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME);
|
513
516
|
}
|
514
517
|
handleOverFlowStrategy() {
|
515
518
|
if (this.overflowStrategy === 'hiddenItems') {
|
@@ -555,7 +558,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
555
558
|
this._slotContainer.appendChild(customElement);
|
556
559
|
}
|
557
560
|
render() {
|
558
|
-
var _a;
|
561
|
+
var _a, _b;
|
559
562
|
if (this._definitions === undefined) {
|
560
563
|
return undefined;
|
561
564
|
}
|
@@ -575,7 +578,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
575
578
|
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
576
579
|
return h("slot", { name: elem });
|
577
580
|
})), h("div", { id: this.TASKBAR_CUSTOM_ELEMENTS, class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, h("slot", { name: this.customSlotId }), (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 :
|
578
|
-
_a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS))))
|
581
|
+
_a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS)), h("div", { id: this.TASKBAR_ADDITIONAL_SLOT, class: this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME }, h("slot", { name: this.additionalSlotId }), (_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 :
|
582
|
+
_b.addNotOverFlowElement(this.TASKBAR_ADDITIONAL_SLOT))));
|
579
583
|
}
|
580
584
|
getHostClasses() {
|
581
585
|
if (this.overflowStrategy !== 'hiddenItems')
|
@@ -593,6 +597,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
593
597
|
}, [6, "snk-taskbar", {
|
594
598
|
"alignRigth": [4, "align-rigth"],
|
595
599
|
"customSlotId": [1, "custom-slot-id"],
|
600
|
+
"additionalSlotId": [1, "additional-slot-id"],
|
596
601
|
"customContainerId": [1, "custom-container-id"],
|
597
602
|
"overflowStrategy": [1, "overflow-strategy"],
|
598
603
|
"configName": [1, "config-name"],
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-
|
2
|
-
import { D as DataFetcher, d as dist } from './DataFetcher-
|
1
|
+
import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-6a00fe9e.js';
|
2
|
+
import { D as DataFetcher, d as dist } from './DataFetcher-f4ccd9f3.js';
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
4
4
|
import { ObjectUtils } from '@sankhyalabs/core';
|
5
5
|
|
@@ -7257,7 +7257,7 @@ const snkPesquisaMessages$2 = {
|
|
7257
7257
|
initialMessage: "Os resultados de sua pesquisa aparecerão aqui...",
|
7258
7258
|
resultsFoundSingular: "1 registro encontrado",
|
7259
7259
|
resultsFoundPlural: "{{COUNT}} registros encontrados",
|
7260
|
-
limitMessage: "
|
7260
|
+
limitMessage: "Esta pesquisa foi limitada, existem mais resultados."
|
7261
7261
|
},
|
7262
7262
|
viewMode: {
|
7263
7263
|
tableMode: "Modo grade",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { UserInterface, DataType, ApplicationContext, ErrorException } from '@sankhyalabs/core';
|
2
|
-
import { d as dist, D as DataFetcher } from './DataFetcher-
|
2
|
+
import { d as dist, D as DataFetcher } from './DataFetcher-f4ccd9f3.js';
|
3
3
|
|
4
4
|
function buildGridMetadata(rawValue) {
|
5
5
|
const fieldsMetadata = buildFieldsMetadata(rawValue.fieldsMetadata);
|
@@ -162,7 +162,7 @@ class PesquisaFetcher {
|
|
162
162
|
return result;
|
163
163
|
}
|
164
164
|
loadAdvancedSearch(entityName, argument, criteria, searchOptions, codeValue) {
|
165
|
-
var _a, _b, _c, _d, _e;
|
165
|
+
var _a, _b, _c, _d, _e, _f;
|
166
166
|
const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, searchOptions);
|
167
167
|
const values = {
|
168
168
|
argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
|
@@ -201,11 +201,11 @@ class PesquisaFetcher {
|
|
201
201
|
};
|
202
202
|
}
|
203
203
|
const options = searchOptions != undefined
|
204
|
-
? Object.assign(Object.assign({}, values === null || values === void 0 ? void 0 : values.searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
|
204
|
+
? Object.assign(Object.assign({}, values === null || values === void 0 ? void 0 : values.searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true, "limit": searchOptions.limit }) : undefined;
|
205
205
|
const reqBody = {
|
206
206
|
"serviceName": serviceName,
|
207
207
|
"requestBody": {
|
208
|
-
"criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": (_d = options === null || options === void 0 ? void 0 : options.ignoreEntityCriteria) !== null && _d !== void 0 ? _d : false, "limit": this._defaultPageSize, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (
|
208
|
+
"criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": (_d = options === null || options === void 0 ? void 0 : options.ignoreEntityCriteria) !== null && _d !== void 0 ? _d : false, "limit": (_e = options === null || options === void 0 ? void 0 : options.limit) !== null && _e !== void 0 ? _e : this._defaultPageSize, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_f = values.searchOptions) === null || _f === void 0 ? void 0 : _f.rootEntity }, { options }),
|
209
209
|
"clientEventList": {
|
210
210
|
"clientEvent": []
|
211
211
|
}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
1
|
+
import { C as ConfigStorage } from './ConfigStorage-13d80e36.js';
|
2
2
|
import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
3
|
-
import { F as FormConfigFetcher } from './form-config-fetcher-
|
3
|
+
import { F as FormConfigFetcher } from './form-config-fetcher-6a00fe9e.js';
|
4
4
|
import { a as TAB_NAMES } from './constants-7b422de0.js';
|
5
5
|
|
6
6
|
class SnkFormConfigManager {
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import { D as DataFetcher } from './DataFetcher-
|
2
|
-
import './ISave-
|
1
|
+
import { D as DataFetcher } from './DataFetcher-f4ccd9f3.js';
|
2
|
+
import './ISave-288fa9df.js';
|
3
3
|
import { SortMode, ApplicationContext, ObjectUtils, StringUtils, NumberUtils, DataType, UserInterface as UserInterface$1, DateUtils } from '@sankhyalabs/core';
|
4
4
|
import { D as DataExporterOption } from './index-b40568ff.js';
|
5
5
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
6
6
|
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
7
|
-
import { P as PreloadManager } from './dataunit-fetcher-
|
7
|
+
import { P as PreloadManager } from './dataunit-fetcher-c4f9f222.js';
|
8
8
|
import './filter-item-type.enum-d45e026f.js';
|
9
|
-
import './form-config-fetcher-
|
9
|
+
import './form-config-fetcher-6a00fe9e.js';
|
10
10
|
import './constants-7b422de0.js';
|
11
11
|
import { h } from './index-479e1293.js';
|
12
12
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|