@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-83517.0 → 0.0.0-bugfix-dev-KB-87855.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.
Files changed (146) hide show
  1. package/dist/cjs/{ClientSideExporterProvider-cc82b68a.js → ClientSideExporterProvider-e4f717b5.js} +30 -28
  2. package/dist/cjs/{ConfigStorage-2235f35e.js → ConfigStorage-df09fb78.js} +2 -2
  3. package/dist/cjs/{DataFetcher-875371e9.js → DataFetcher-1afdb18e.js} +14 -2
  4. package/dist/cjs/{ISave-62fbb1dd.js → ISave-c76e2c51.js} +27 -3
  5. package/dist/cjs/{SnkFormConfigManager-6637cd6b.js → SnkFormConfigManager-45a8d7b7.js} +3 -3
  6. package/dist/cjs/{auth-fetcher-abad589f.js → auth-fetcher-1687ac0a.js} +1 -1
  7. package/dist/cjs/{constants-241934b3.js → constants-77c1b8bd.js} +1 -0
  8. package/dist/cjs/{dataunit-fetcher-b95768e8.js → dataunit-fetcher-a723f0dc.js} +12 -8
  9. package/dist/cjs/{form-config-fetcher-db332748.js → form-config-fetcher-40d3f752.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -5
  12. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  13. package/dist/cjs/snk-actions-button_7.cjs.entry.js +8 -6
  14. package/dist/cjs/snk-application.cjs.entry.js +133 -16
  15. package/dist/cjs/snk-attach.cjs.entry.js +6 -6
  16. package/dist/cjs/snk-config-options_3.cjs.entry.js +10 -8
  17. package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
  18. package/dist/cjs/snk-crud.cjs.entry.js +27 -39
  19. package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -6
  20. package/dist/cjs/{snk-data-unit-33937ffe.js → snk-data-unit-bab0b78a.js} +1 -1
  21. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  22. package/dist/cjs/snk-detail-view.cjs.entry.js +8 -8
  23. package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
  24. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
  25. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  26. package/dist/cjs/snk-filter-search.cjs.entry.js +18 -5
  27. package/dist/cjs/snk-grid.cjs.entry.js +7 -7
  28. package/dist/cjs/{snk-guides-viewer-0e4f3b1a.js → snk-guides-viewer-b9a97db8.js} +6 -6
  29. package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -8
  30. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  31. package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -5
  32. package/dist/cjs/snk-simple-crud.cjs.entry.js +14 -11
  33. package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
  34. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +5 -2
  35. package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +107 -0
  36. package/dist/collection/components/snk-application/snk-application.js +86 -8
  37. package/dist/collection/components/snk-crud/snk-crud.js +22 -34
  38. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +15 -19
  39. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +18 -5
  40. package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js +5 -3
  41. package/dist/collection/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.js +2 -2
  42. package/dist/collection/components/snk-grid-config/snk-grid-config.js +2 -0
  43. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +6 -3
  44. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +8 -2
  45. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +14 -2
  46. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +5 -2
  47. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +6 -5
  48. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +26 -2
  49. package/dist/collection/lib/utils/constants.js +1 -0
  50. package/dist/components/ContinuousInsertUtils.js +25 -23
  51. package/dist/components/DataFetcher.js +14 -2
  52. package/dist/components/ISave.js +26 -2
  53. package/dist/components/constants.js +1 -0
  54. package/dist/components/dataunit-fetcher.js +11 -7
  55. package/dist/components/snk-application2.js +130 -10
  56. package/dist/components/snk-config-options2.js +5 -3
  57. package/dist/components/snk-crud.js +23 -35
  58. package/dist/components/snk-filter-search.js +18 -5
  59. package/dist/components/snk-grid-config2.js +2 -0
  60. package/dist/components/snk-simple-crud2.js +6 -3
  61. package/dist/esm/{ClientSideExporterProvider-8191676b.js → ClientSideExporterProvider-3b8ba474.js} +30 -28
  62. package/dist/esm/{ConfigStorage-9bd805d6.js → ConfigStorage-71e6766f.js} +2 -2
  63. package/dist/esm/{DataFetcher-ecf5f903.js → DataFetcher-88e56266.js} +14 -2
  64. package/dist/esm/{ISave-7d546dce.js → ISave-5efafc97.js} +27 -3
  65. package/dist/esm/{SnkFormConfigManager-fbc6a9a8.js → SnkFormConfigManager-be490a33.js} +3 -3
  66. package/dist/esm/{auth-fetcher-07d33333.js → auth-fetcher-3510520e.js} +1 -1
  67. package/dist/esm/{constants-75abb876.js → constants-7db1128a.js} +1 -0
  68. package/dist/esm/{dataunit-fetcher-ed6e65ef.js → dataunit-fetcher-0e025732.js} +12 -8
  69. package/dist/esm/{form-config-fetcher-ac17cff4.js → form-config-fetcher-fa208a6c.js} +1 -1
  70. package/dist/esm/loader.js +1 -1
  71. package/dist/esm/pesquisa-grid_2.entry.js +5 -5
  72. package/dist/esm/sankhyablocks.js +1 -1
  73. package/dist/esm/snk-actions-button_7.entry.js +8 -6
  74. package/dist/esm/snk-application.entry.js +134 -17
  75. package/dist/esm/snk-attach.entry.js +6 -6
  76. package/dist/esm/snk-config-options_3.entry.js +10 -8
  77. package/dist/esm/snk-configurator.entry.js +1 -1
  78. package/dist/esm/snk-crud.entry.js +28 -40
  79. package/dist/esm/snk-data-exporter.entry.js +6 -6
  80. package/dist/esm/{snk-data-unit-6258b8ae.js → snk-data-unit-0cb53554.js} +1 -1
  81. package/dist/esm/snk-data-unit.entry.js +3 -3
  82. package/dist/esm/snk-detail-view.entry.js +8 -8
  83. package/dist/esm/snk-field-config.entry.js +1 -1
  84. package/dist/esm/snk-filter-bar_4.entry.js +3 -3
  85. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  86. package/dist/esm/snk-filter-search.entry.js +18 -5
  87. package/dist/esm/snk-grid.entry.js +7 -7
  88. package/dist/esm/{snk-guides-viewer-80a8709c.js → snk-guides-viewer-83eecbd7.js} +6 -6
  89. package/dist/esm/snk-guides-viewer.entry.js +8 -8
  90. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  91. package/dist/esm/snk-pesquisa.entry.js +5 -5
  92. package/dist/esm/snk-simple-crud.entry.js +14 -11
  93. package/dist/esm/snk-tab-config.entry.js +1 -1
  94. package/dist/sankhyablocks/{p-13f17dab.js → p-03b68a74.js} +1 -1
  95. package/dist/sankhyablocks/{p-c7c6eab7.entry.js → p-10878f04.entry.js} +1 -1
  96. package/dist/sankhyablocks/{p-d1f04e2c.js → p-15784f66.js} +1 -1
  97. package/dist/sankhyablocks/p-15f67e59.entry.js +11 -0
  98. package/dist/sankhyablocks/{p-340e2447.entry.js → p-165cde3b.entry.js} +1 -1
  99. package/dist/sankhyablocks/{p-abd9681c.js → p-18c460f2.js} +1 -1
  100. package/dist/sankhyablocks/{p-2746d606.entry.js → p-1bdc7355.entry.js} +1 -1
  101. package/dist/sankhyablocks/{p-2953c481.entry.js → p-3749dffb.entry.js} +1 -1
  102. package/dist/sankhyablocks/{p-950e3cbe.entry.js → p-475df998.entry.js} +1 -1
  103. package/dist/sankhyablocks/{p-0bcd4757.entry.js → p-490b75b5.entry.js} +1 -1
  104. package/dist/sankhyablocks/{p-f467153c.entry.js → p-5ffa0493.entry.js} +1 -1
  105. package/dist/sankhyablocks/{p-5fea0816.entry.js → p-60137b7a.entry.js} +1 -1
  106. package/dist/sankhyablocks/{p-01512409.js → p-601b252b.js} +1 -1
  107. package/dist/sankhyablocks/p-6a0c8ce0.entry.js +1 -0
  108. package/dist/sankhyablocks/p-6dd38d7b.js +6 -0
  109. package/dist/sankhyablocks/{p-48729c8c.js → p-73285a8a.js} +1 -1
  110. package/dist/sankhyablocks/p-7993b2e3.js +60 -0
  111. package/dist/sankhyablocks/p-841d3c3e.entry.js +1 -0
  112. package/dist/sankhyablocks/{p-3a36d4b3.entry.js → p-90684a75.entry.js} +1 -1
  113. package/dist/sankhyablocks/{p-1d19a5b0.js → p-9261d8a0.js} +1 -1
  114. package/dist/sankhyablocks/{p-dc617b0c.entry.js → p-9a7f7ca3.entry.js} +1 -1
  115. package/dist/sankhyablocks/{p-f861bfcb.entry.js → p-9b4c5dae.entry.js} +1 -1
  116. package/dist/sankhyablocks/p-af133934.entry.js +1 -0
  117. package/dist/sankhyablocks/p-b6200d32.entry.js +1 -0
  118. package/dist/sankhyablocks/{p-23cd6abf.entry.js → p-c0eb761b.entry.js} +1 -1
  119. package/dist/sankhyablocks/{p-02c6dc9f.entry.js → p-d31a701e.entry.js} +1 -1
  120. package/dist/sankhyablocks/p-d4752c92.entry.js +1 -0
  121. package/dist/sankhyablocks/{p-d2065bb4.entry.js → p-dc6ad9a6.entry.js} +1 -1
  122. package/dist/sankhyablocks/p-e66968aa.js +1 -0
  123. package/dist/sankhyablocks/{p-cb9d725a.js → p-ebdb9d89.js} +1 -1
  124. package/dist/sankhyablocks/{p-5a7e18f4.js → p-fbba7e3d.js} +1 -1
  125. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  126. package/dist/types/components/snk-application/search-strategy/exec-prepared-search-plus.d.ts +5 -0
  127. package/dist/types/components/snk-application/snk-application.d.ts +7 -2
  128. package/dist/types/components/snk-crud/snk-crud.d.ts +1 -0
  129. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +5 -3
  130. package/dist/types/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.d.ts +2 -1
  131. package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +1 -0
  132. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +1 -0
  133. package/dist/types/components.d.ts +6 -0
  134. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -1
  135. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +4 -1
  136. package/dist/types/lib/utils/constants.d.ts +1 -0
  137. package/package.json +1 -1
  138. package/dist/sankhyablocks/p-07afb345.entry.js +0 -1
  139. package/dist/sankhyablocks/p-108fee57.js +0 -6
  140. package/dist/sankhyablocks/p-35fcf37e.js +0 -1
  141. package/dist/sankhyablocks/p-513af002.entry.js +0 -1
  142. package/dist/sankhyablocks/p-7e0a0aae.js +0 -60
  143. package/dist/sankhyablocks/p-9907cf67.entry.js +0 -1
  144. package/dist/sankhyablocks/p-c5acb7ba.entry.js +0 -11
  145. package/dist/sankhyablocks/p-c8622597.entry.js +0 -1
  146. package/dist/sankhyablocks/p-e5d8891d.entry.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ArrayUtils, SearchUtils, ElementIDUtils, ApplicationContext, DataType, ErrorTracking, UserAgentUtils, LockManager, LockManagerOperation } from '@sankhyalabs/core';
2
+ import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, SilentException, WarningException, ErrorException, ElementIDUtils, SearchUtils, ArrayUtils, KeyboardManager, OnboardingUtils, DependencyType, ApplicationContext, DataType, ErrorTracking, UserAgentUtils, LockManager, LockManagerOperation } from '@sankhyalabs/core';
3
3
  import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
4
  import { C as ConfigStorage } from './ConfigStorage.js';
5
5
  import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher.js';
@@ -259,7 +259,10 @@ class SnkErrorHandler {
259
259
  if (exception.errorCode) {
260
260
  exception.message += this.buildErrorCodeHTML(exception.errorCode);
261
261
  }
262
- if (exception instanceof WaitingChangeException) {
262
+ if (exception instanceof SilentException) {
263
+ console.warn("SilentException ignorada", exception);
264
+ }
265
+ else if (exception instanceof WaitingChangeException) {
263
266
  this._app.alert(exception.title, exception.message);
264
267
  }
265
268
  else if (exception instanceof WarningException) {
@@ -379,6 +382,110 @@ class RequestListenerFactory {
379
382
  }
380
383
  }
381
384
 
385
+ const QTD_DETAIL_FIELDS_PREDICTIVE_SEARCH = 6;
386
+ const INVALID_CONTENT_PATTERNS = ['<img', '<svg'];
387
+ const executePreparedSearchPlus = async (mode, argument, options, app, pesquisaFetcher) => {
388
+ var _a;
389
+ const mdByName = {};
390
+ const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic } = options;
391
+ if (mode === "ADVANCED") {
392
+ return new Promise((accept, reject) => {
393
+ const pesquisaContent = document.createElement("snk-pesquisa");
394
+ pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
395
+ pesquisaContent.entityName = entity;
396
+ pesquisaContent.argument = argument;
397
+ pesquisaContent.searchLoader = (text) => pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
398
+ pesquisaContent.isHierarchyEntity = isHierarchyEntity;
399
+ if (isHierarchyEntity) {
400
+ pesquisaContent.treeLoader = (text) => pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
401
+ pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
402
+ }
403
+ pesquisaContent.selectItem = (option) => {
404
+ accept(option);
405
+ app.clearPopUpTitle();
406
+ app.closePopUp();
407
+ };
408
+ app.setPopUpTitle(entityDescription);
409
+ app.showPopUp(pesquisaContent, undefined, undefined, reject);
410
+ });
411
+ }
412
+ else if (mode === "LOAD_DESCRIPTION") {
413
+ let result = await pesquisaFetcher.loadByCode(entity, argument, criteria, searchOptions);
414
+ result = ObjectUtils.stringToObject(result.json.$);
415
+ let descriptionField = result.descriptionField;
416
+ const option = (_a = result.data) === null || _a === void 0 ? void 0 : _a[0];
417
+ if (!option) {
418
+ return {
419
+ value: argument,
420
+ label: ""
421
+ };
422
+ }
423
+ return {
424
+ value: argument,
425
+ label: option[descriptionField]
426
+ };
427
+ }
428
+ else {
429
+ let codeValue;
430
+ let result = await pesquisaFetcher.loadAdvancedSearch(entity, argument, criteria, searchOptions, codeValue);
431
+ result = ObjectUtils.stringToObject(result.json.$);
432
+ let descriptionField = result.descriptionField;
433
+ let pkField = result.pkField;
434
+ const list = result.data.map((item) => {
435
+ let fieldsMetadata = filterInvalidFields(result, item, mdByName);
436
+ let fields = filterMathFields(item['__matchFields'], fieldsMetadata, QTD_DETAIL_FIELDS_PREDICTIVE_SEARCH, mdByName);
437
+ return buildOptionItem(argument, item, fields, descriptionField, pkField);
438
+ });
439
+ return list;
440
+ }
441
+ };
442
+ const buildOptionItem = (argument, item, fields, descriptionField, pkField) => {
443
+ var _a;
444
+ const matchFields = item['__matchFields'];
445
+ const descriptionValue = (_a = item[descriptionField]) !== null && _a !== void 0 ? _a : "";
446
+ const pkValue = item[pkField];
447
+ let searchOption = {
448
+ value: pkValue,
449
+ label: descriptionValue,
450
+ presentationValue: StringUtils.highlightValue(argument, matchFields, pkValue, fields, true),
451
+ presentationLabel: descriptionField ? StringUtils.highlightValue(argument, matchFields, descriptionValue, fields, true) : "",
452
+ details: SearchUtils.buildDetails(argument, fields, item)
453
+ };
454
+ return searchOption;
455
+ };
456
+ const filterInvalidFields = (resp, item, mdByName) => {
457
+ let fieldsMetadata = resp.fieldsMetadata.filter((field) => {
458
+ let accept = !StringUtils.isEmpty(item[field.fieldName]) &&
459
+ field.visible !== false &&
460
+ field.type !== 'B' &&
461
+ resp.pkField !== field.fieldName &&
462
+ resp.descriptionField !== field.fieldName &&
463
+ (field.isPrimaryKey || !field.isLinkField) &&
464
+ !(field.type === 'S' && field.presentationType === 'H');
465
+ if (accept) {
466
+ mdByName[field.fieldName] = field;
467
+ }
468
+ //Condição que trata o problema de trazer imagem no entityCard na pesquisa de registros
469
+ if (typeof item[field.fieldName] === 'string' && INVALID_CONTENT_PATTERNS.some(pattern => item[field.fieldName].includes(pattern))) {
470
+ return false;
471
+ }
472
+ return accept;
473
+ });
474
+ return fieldsMetadata;
475
+ };
476
+ const filterMathFields = (matchFields, fields, qtyFields, mdByName) => {
477
+ if (matchFields && Array.isArray(matchFields)) {
478
+ matchFields.forEach((matchField) => {
479
+ let fieldMD = ArrayUtils.removeReference(fields, mdByName[matchField]);
480
+ if (fieldMD) {
481
+ fields.unshift(fieldMD);
482
+ }
483
+ });
484
+ }
485
+ fields = fields.slice(0, qtyFields);
486
+ return fields;
487
+ };
488
+
382
489
  class LayoutFormConfig {
383
490
  constructor() {
384
491
  this._config = null;
@@ -1039,7 +1146,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1039
1146
  searchOptions,
1040
1147
  allowsNonAnalytic
1041
1148
  };
1042
- return this.executePreparedSearch(mode, argument, options);
1149
+ return (ctxOptions === null || ctxOptions === void 0 ? void 0 : ctxOptions.useSearchPlus) ? this.executePreparedSearchPlus(mode, argument, options) : this.executePreparedSearch(mode, argument, options);
1043
1150
  }
1044
1151
  }
1045
1152
  filterInvalidFields(resp, item, mdByName) {
@@ -1083,13 +1190,23 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1083
1190
  };
1084
1191
  return exibitionItem;
1085
1192
  }
1193
+ /**
1194
+ * Realiza a pesquisa de registros
1195
+ * Ex.: snk-config-options
1196
+ */
1197
+ async executePreparedSearchPlus(mode, argument, options) {
1198
+ return await this.executePreparedSearch(mode, argument, Object.assign(Object.assign({}, options), { useSearchPlus: true }));
1199
+ }
1086
1200
  /**
1087
1201
  * Obtém as opções em componentes de pesquisa
1088
1202
  * Ex.: snk-config-options
1089
1203
  */
1090
1204
  async executePreparedSearch(mode, argument, options) {
1091
1205
  const mdByName = {};
1092
- const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic } = options;
1206
+ const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic, useSearchPlus } = options;
1207
+ if (useSearchPlus) {
1208
+ return executePreparedSearchPlus(mode, argument, options, this, this.pesquisaFetcher);
1209
+ }
1093
1210
  if (mode === "ADVANCED") {
1094
1211
  return new Promise((accept, reject) => {
1095
1212
  const pesquisaContent = document.createElement("snk-pesquisa");
@@ -1239,10 +1356,10 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1239
1356
  });
1240
1357
  }
1241
1358
  }
1242
- clearPopUpTitle() {
1359
+ async clearPopUpTitle() {
1243
1360
  this._popUp.ezTitle = "";
1244
1361
  }
1245
- setPopUpTitle(title) {
1362
+ async setPopUpTitle(title) {
1246
1363
  this._popUp.ezTitle = title;
1247
1364
  }
1248
1365
  async pkChangeListener() {
@@ -1412,6 +1529,9 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1412
1529
  ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit, ctxOptions) => {
1413
1530
  return this.executeSearch(searchArgument, fieldName, dataUnit, ctxOptions);
1414
1531
  });
1532
+ ApplicationContext.setContextValue("__EZUI__SEARCH__PLUS__OPTION__LOADER__", (searchArgument, fieldName, dataUnit, ctxOptions) => {
1533
+ return this.executeSearch(searchArgument, fieldName, dataUnit, Object.assign(Object.assign({}, ctxOptions), { useSearchPlus: true }));
1534
+ });
1415
1535
  ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
1416
1536
  this.registerPkChangeListener();
1417
1537
  ErrorTracking.init();
@@ -1538,10 +1658,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1538
1658
  .bind("F1", Workspace.openHelp.bind(this), { description: "Abrir ajuda" });
1539
1659
  }
1540
1660
  removeShortcuts() {
1541
- this._keyboardManager
1542
- .unbind("ctrl + g")
1543
- .unbind("ctrl + d")
1544
- .unbind("F1");
1661
+ this._keyboardManager.unbindAllShortcutKeys();
1545
1662
  }
1546
1663
  renderLoadingSkeleton() {
1547
1664
  if (!this.enableLockManagerLoadingApp)
@@ -1649,6 +1766,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1649
1766
  "isLoadedByPk": [64],
1650
1767
  "preloadMangerRemoveRecord": [64],
1651
1768
  "executeSearch": [64],
1769
+ "executePreparedSearchPlus": [64],
1652
1770
  "executePreparedSearch": [64],
1653
1771
  "isDebugMode": [64],
1654
1772
  "getAppLabel": [64],
@@ -1659,6 +1777,8 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1659
1777
  "getDataFetcher": [64],
1660
1778
  "whenApplicationReady": [64],
1661
1779
  "setSearchFilterContext": [64],
1780
+ "clearPopUpTitle": [64],
1781
+ "setPopUpTitle": [64],
1662
1782
  "showScrimApp": [64],
1663
1783
  "markToReload": [64],
1664
1784
  "addLoadingLock": [64]
@@ -142,11 +142,13 @@ const SnkConfigOptions = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
142
142
  return h(TagName, Object.assign({ value: value, enabled: enabled, label: label, "data-field-name": name, key: name, onEzChange: (evt) => this.onChange(evt === null || evt === void 0 ? void 0 : evt.detail) }, (this.getConditionalAttributes(userInterface, required, options, precision, prettyPrecision, mode))));
143
143
  }
144
144
  getConditionalAttributes(userInterface, required, options, precision, prettyPrecision, mode) {
145
+ const useSearchPlus = userInterface == UserInterface.SEARCHPLUS;
145
146
  switch (userInterface) {
146
147
  case UserInterface.SEARCH:
148
+ case UserInterface.SEARCHPLUS:
147
149
  return {
148
150
  suppressEmptyOption: required,
149
- optionLoader: (searchArgument) => this.onSearch(searchArgument)
151
+ optionLoader: (searchArgument) => this.onSearch(searchArgument, { useSearchPlus })
150
152
  };
151
153
  case UserInterface.OPTIONSELECTOR:
152
154
  return {
@@ -179,9 +181,9 @@ const SnkConfigOptions = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
179
181
  this.fieldConfig.defaultValue.value = this.getValidatedValue(fieldValue);
180
182
  this.configOptionsChanged.emit(this.fieldConfig);
181
183
  }
182
- onSearch(searchArgument) {
184
+ onSearch(searchArgument, ctxOptions) {
183
185
  if (this._application != undefined && this.fieldConfig != undefined) {
184
- return this._application.executeSearch(searchArgument, this.fieldConfig.name, this.dataUnit);
186
+ return this._application.executeSearch(searchArgument, this.fieldConfig.name, this.dataUnit, ctxOptions);
185
187
  }
186
188
  }
187
189
  buildField(descriptor, config) {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { StringUtils, ElementIDUtils, ApplicationContext, JSUtils, FloatingManager } from '@sankhyalabs/core';
2
+ import { StringUtils, ElementIDUtils, ApplicationContext, KeyboardManager, JSUtils, FloatingManager } from '@sankhyalabs/core';
3
3
  import { T as TaskbarElement, d as defineCustomElement$4 } from './snk-taskbar2.js';
4
4
  import './DataFetcher.js';
5
5
  import { P as PresentationMode, E as ExporterStrategy } from './ISave.js';
@@ -312,29 +312,28 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
312
312
  }
313
313
  }
314
314
  async initKeyboardManager() {
315
- var _a;
316
- const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
317
- if (keyboardManager) {
318
- const dataUnit = this._dataUnit || await this._snkDataUnit.getDataUnit();
319
- async function saveDataUnitHandlingFocus() {
320
- const element = document.activeElement;
321
- const isDocumentBody = (element == document.body);
322
- if (!isDocumentBody)
323
- element.blur();
324
- await dataUnit.saveData();
325
- if (!isDocumentBody && element.setFocus != undefined) {
326
- element.setFocus();
327
- return;
328
- }
329
- if (!isDocumentBody)
330
- element.focus();
331
- }
332
- async function handleAddRecord() {
333
- if (!dataUnit.hasNewRecord()) {
334
- dataUnit.addRecord();
335
- }
315
+ this._keyboardManager = new KeyboardManager({ propagate: false, element: this._element });
316
+ const dataUnit = this._dataUnit || await this._snkDataUnit.getDataUnit();
317
+ async function saveDataUnitHandlingFocus() {
318
+ const element = document.activeElement;
319
+ const isDocumentBody = (element == document.body);
320
+ if (!isDocumentBody)
321
+ element.blur();
322
+ await dataUnit.saveData();
323
+ if (!isDocumentBody && element.setFocus != undefined) {
324
+ element.setFocus();
325
+ return;
326
+ }
327
+ if (!isDocumentBody)
328
+ element.focus();
329
+ }
330
+ async function handleAddRecord() {
331
+ if (!dataUnit.hasNewRecord()) {
332
+ dataUnit.addRecord();
336
333
  }
337
- keyboardManager
334
+ }
335
+ if (this._keyboardManager) {
336
+ this._keyboardManager
338
337
  .bind("F6", this.toggleView.bind(this), { description: "Alterna entre modo formulário e grade.", element: this._element })
339
338
  .bind("F7", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados.", element: this._element })
340
339
  .bind("ctrl + \\", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados.", element: this._element })
@@ -359,18 +358,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
359
358
  }
360
359
  async removeShortcuts() {
361
360
  var _a;
362
- const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
363
- if (keyboardManager) {
364
- keyboardManager
365
- .unbind("F6")
366
- .unbind("F7")
367
- .unbind("ctrl + \\")
368
- .unbind("F8")
369
- .unbind("F9")
370
- .unbind("ctrl + F9")
371
- .unbind("F5")
372
- .unbind("Escape");
373
- }
361
+ (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
374
362
  }
375
363
  async toggleView() {
376
364
  const currentView = await this._viewStack.getSelectedIndex();
@@ -7,14 +7,20 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
7
7
  super();
8
8
  this.__registerHost();
9
9
  this.valueChanged = createEvent(this, "valueChanged", 7);
10
+ this._isSearchPlus = false;
10
11
  this.config = undefined;
11
12
  this.value = undefined;
12
13
  }
13
14
  /**
14
15
  * Emitido quando acontece a alteração de valor do componente snk-filter-search
15
16
  */
16
- ezChangeListener(_evt) {
17
- this.value = this._searchInput.value;
17
+ async ezChangeListener(_evt) {
18
+ if (this._isSearchPlus) {
19
+ this.value = await this._searchInput.getValueAsync();
20
+ }
21
+ else {
22
+ this.value = this._searchInput.value;
23
+ }
18
24
  this.valueChanged.emit(this.value);
19
25
  }
20
26
  componentDidLoad() {
@@ -22,10 +28,11 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
22
28
  ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
23
29
  }
24
30
  }
25
- doSearch(mode, argument) {
31
+ doSearch(mode, argument, isSearchPlus = false) {
26
32
  const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
33
+ const loader = isSearchPlus ? application.executePreparedSearchPlus : application.executePreparedSearch;
27
34
  return new Promise((resolve, reject) => {
28
- application.executePreparedSearch(mode, argument, this.config.props.searchContext)
35
+ loader.bind(application)(mode, argument, this.config.props.searchContext)
29
36
  .then(result => {
30
37
  resolve(result);
31
38
  }).catch(reason => {
@@ -39,11 +46,17 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
39
46
  async show() {
40
47
  this._searchInput.setFocus();
41
48
  }
49
+ getInputItem() {
50
+ var _a;
51
+ this._isSearchPlus = ((_a = this.config.props) === null || _a === void 0 ? void 0 : _a["useSearchPlus"]) == true;
52
+ const TagName = this._isSearchPlus ? "ez-search-plus" : "ez-search";
53
+ return (h(TagName, { id: this.config.id, suppressEmptyOption: true, value: this.config.value, label: this.config.label, ref: ref => this._searchInput = ref, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, this._isSearchPlus) }));
54
+ }
42
55
  render() {
43
56
  if (!this.config || this.config.type !== FilterItemType.SEARCH) {
44
57
  return undefined;
45
58
  }
46
- return (h("ez-search", { id: this.config.id, suppressEmptyOption: true, value: this.config.value, label: this.config.label, ref: ref => this._searchInput = ref, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument) }));
59
+ return this.getInputItem();
47
60
  }
48
61
  get _element() { return this; }
49
62
  }, [0, "snk-filter-search", {
@@ -266,6 +266,7 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
266
266
  delete _newColumnConfig.ascending;
267
267
  _newColumnConfig.orderIndex = 0;
268
268
  }
269
+ _newColumnConfig.configVersion = SnkGridConfig.CURRENT_CONFIG_VERSION;
269
270
  _newColumnConfigList.push(_newColumnConfig);
270
271
  }
271
272
  });
@@ -505,6 +506,7 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
505
506
  "configName": [1, "config-name"],
506
507
  "resourceID": [1, "resource-i-d"]
507
508
  }]);
509
+ SnkGridConfig.CURRENT_CONFIG_VERSION = 1;
508
510
  function defineCustomElement() {
509
511
  if (typeof customElements === "undefined") {
510
512
  return;
@@ -663,7 +663,9 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
663
663
  window.addEventListener("keydown", this._keyDownHandler, { capture: true });
664
664
  }
665
665
  disconnectedCallback() {
666
+ var _a;
666
667
  window.removeEventListener("keydown", this._keyDownHandler);
668
+ (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
667
669
  }
668
670
  gridConfigChangeHandler(evt) {
669
671
  evt.stopPropagation();
@@ -745,12 +747,12 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
745
747
  }
746
748
  async initKeyboardManager() {
747
749
  var _a;
748
- const keyboardManager = new KeyboardManager();
750
+ this._keyboardManager = new KeyboardManager({ propagate: false, element: this._element });
749
751
  const dataUnit = this.dataUnit || await ((_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.getDataUnit());
750
752
  if (dataUnit == undefined) {
751
753
  return;
752
754
  }
753
- keyboardManager
755
+ this._keyboardManager
754
756
  .bind("F7", () => dataUnit.saveData(), { description: "Salva os dados.", element: this._element })
755
757
  .bind("F8", dataUnit.addRecord.bind(dataUnit), { description: "Adiciona um novo registro.", element: this._element })
756
758
  .bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
@@ -760,7 +762,8 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
760
762
  }
761
763
  }, {
762
764
  debounceTime: 1000,
763
- description: "Cancela uma ação.", element: this._element
765
+ description: "Cancela uma ação.",
766
+ element: this._element
764
767
  });
765
768
  }
766
769
  async handleFormConfigSaved() {
@@ -1,13 +1,13 @@
1
- import { D as DataFetcher } from './DataFetcher-ecf5f903.js';
2
- import './ISave-7d546dce.js';
1
+ import { D as DataFetcher } from './DataFetcher-88e56266.js';
2
+ import './ISave-5efafc97.js';
3
3
  import { SortMode, ApplicationContext, UserInterface, DateUtils, ObjectUtils, StringUtils, NumberUtils, DataType } 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 as UserInterface$1 } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
7
- import { P as PreloadManager } from './dataunit-fetcher-ed6e65ef.js';
7
+ import { P as PreloadManager } from './dataunit-fetcher-0e025732.js';
8
8
  import './filter-item-type.enum-d45e026f.js';
9
- import './form-config-fetcher-ac17cff4.js';
10
- import './constants-75abb876.js';
9
+ import './form-config-fetcher-fa208a6c.js';
10
+ import './constants-7db1128a.js';
11
11
  import InMemoryFilterColumnDataSource from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
12
12
  import { h } from './index-a7d3d3f1.js';
13
13
  import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
@@ -119,11 +119,11 @@ class SnkMultiSelectionListDataSource {
119
119
  }
120
120
  return String(this._dataUnit.getFormattedValue(fieldName, value));
121
121
  }
122
- async getStaticOptions(fieldName) {
122
+ async getStaticOptions(fieldName, options) {
123
123
  if (fieldName == undefined) {
124
124
  return Promise.resolve(undefined);
125
125
  }
126
- return Promise.resolve(await PreloadManager.getDistinct(this._dataUnit, fieldName));
126
+ return Promise.resolve(await PreloadManager.getDistinct(this._dataUnit, fieldName, options));
127
127
  }
128
128
  fetchData(filterTerm, fieldName) {
129
129
  return new Promise(resolve => {
@@ -168,9 +168,15 @@ class RmPrecisionCustomValueFormatter {
168
168
  if (rmPrecision || rmPrecision === 0) {
169
169
  return NumberUtils.format(currentValue, rmPrecision, rmPrecision);
170
170
  }
171
- else {
172
- return currentValue;
171
+ const columnProps = column === null || column === void 0 ? void 0 : column.props;
172
+ if (columnProps) {
173
+ const precision = column === null || column === void 0 ? void 0 : column.props.get('precision');
174
+ const prettyPrecision = column === null || column === void 0 ? void 0 : column.props.get('prettyPrecision');
175
+ if (precision !== undefined && prettyPrecision !== undefined) {
176
+ return NumberUtils.format(currentValue, precision, prettyPrecision);
177
+ }
173
178
  }
179
+ return currentValue;
174
180
  }
175
181
  refreshSelectedRows() {
176
182
  var _a;
@@ -218,25 +224,21 @@ class CommonsExporter {
218
224
  userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface,
219
225
  customFormatter
220
226
  };
221
- if (isUserInterfaceSEARCH) {
222
- if (((_b = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONFIELD) != undefined) {
223
- const labelDescription = (_c = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _c === void 0 ? void 0 : _c.DESCRIPTIONENTITY;
224
- const mergedFrom = fieldData.properties.mergedFrom;
225
- const descriptionField = `${fieldData.properties.ENTITYNAME}.${fieldData.properties.DESCRIPTIONFIELD}`;
226
- descriptionColumn = {
227
- id: `${mergedFrom ? (mergedFrom + ".") : ""}${descriptionField}`,
228
- label: labelDescription,
229
- width: isUserInterfaceSEARCH && labelDescription ? (labelDescription.length * this.DEFAULT_FONT_SIZE - widthColumnDefault) : column.width,
230
- type: DataType.TEXT,
231
- userInterface: UserInterface$1.LONGTEXT,
232
- descriptionFrom: fieldData.name
233
- };
234
- }
235
- if (descriptionColumn) {
236
- const newWidth = this.getWidthByMetaData(column === null || column === void 0 ? void 0 : column.width, columnData === null || columnData === void 0 ? void 0 : columnData.width, descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.width);
237
- columnData = Object.assign(Object.assign({}, columnData), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.codWidth });
238
- descriptionColumn = Object.assign(Object.assign({}, descriptionColumn), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.descWidth, label: (descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.label) || (column === null || column === void 0 ? void 0 : column.label) });
239
- }
227
+ if (isUserInterfaceSEARCH && ((_b = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONFIELD) != undefined) {
228
+ const labelDescription = (_c = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _c === void 0 ? void 0 : _c.DESCRIPTIONENTITY;
229
+ const mergedFrom = fieldData.properties.mergedFrom;
230
+ const descriptionField = `${fieldData.properties.ENTITYNAME}.${fieldData.properties.DESCRIPTIONFIELD}`;
231
+ descriptionColumn = {
232
+ id: `${mergedFrom ? (mergedFrom + ".") : ""}${descriptionField}`,
233
+ label: labelDescription,
234
+ width: isUserInterfaceSEARCH && labelDescription ? (labelDescription.length * this.DEFAULT_FONT_SIZE - widthColumnDefault) : column.width,
235
+ type: DataType.TEXT,
236
+ userInterface: UserInterface$1.LONGTEXT,
237
+ descriptionFrom: fieldData.name
238
+ };
239
+ const newWidth = this.getWidthByMetaData(column === null || column === void 0 ? void 0 : column.width, columnData === null || columnData === void 0 ? void 0 : columnData.width, descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.width);
240
+ columnData = Object.assign(Object.assign({}, columnData), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.codWidth });
241
+ descriptionColumn = Object.assign(Object.assign({}, descriptionColumn), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.descWidth, label: (descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.label) || (column === null || column === void 0 ? void 0 : column.label) });
240
242
  }
241
243
  columnsMetadata.push(columnData);
242
244
  if (descriptionColumn)
@@ -1,7 +1,7 @@
1
- import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-ac17cff4.js';
1
+ import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-fa208a6c.js';
2
2
  import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
3
3
  import { ObjectUtils } from '@sankhyalabs/core';
4
- import { d as dist, D as DataFetcher } from './DataFetcher-ecf5f903.js';
4
+ import { d as dist, D as DataFetcher } from './DataFetcher-88e56266.js';
5
5
 
6
6
  class GridConfigFetcher extends ResourceFetcher {
7
7
  constructor() {
@@ -6716,7 +6716,13 @@ class DataFetcher {
6716
6716
  if (error.length > 0) { //As informações do erro vem no primeiro indice de um array
6717
6717
  const errorInfo = error[POSITION_ERROR_INFO];
6718
6718
  const errorMessage = (errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.message) ? errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.message : "Não há mensagem de erro";
6719
- const errorLevel = ((_a = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.extensions) === null || _a === void 0 ? void 0 : _a.level) ? errorInfo.extensions.level : "ERROR";
6719
+ /*
6720
+ No HTML5, todos os erros de Troubleshooting são considerados alerta,
6721
+ pois a comparação errorLevel == ServiceProxyConstants.LEVEL.ERROR sempre é falsa
6722
+ Motivo: - errorLevel é uma string "ERROR" por exemplo
6723
+ - ServiceProxyConstants.LEVEL.ERROR é um numero 1, por exemplo
6724
+ */
6725
+ const errorLevel = ((_a = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.extensions) === null || _a === void 0 ? void 0 : _a.level) ? "WARNING" : "ERROR";
6720
6726
  const errorCode = ((_b = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.extensions) === null || _b === void 0 ? void 0 : _b.code) ? errorInfo.extensions.code : "";
6721
6727
  switch (errorLevel) {
6722
6728
  case "WARNING":
@@ -6738,7 +6744,13 @@ class DataFetcher {
6738
6744
  let tsErrorCode, tsErrorLevel;
6739
6745
  if (tsError) {
6740
6746
  tsErrorCode = tsError.tsErrorCode;
6741
- tsErrorLevel = tsError.tsErrorLevel;
6747
+ /*
6748
+ No HTML5, todos os erros de Troubleshooting são considerados alerta,
6749
+ pois a comparação errorLevel == ServiceProxyConstants.LEVEL.ERROR sempre é falsa
6750
+ Motivo: - errorLevel é uma string "ERROR" por exemplo
6751
+ - ServiceProxyConstants.LEVEL.ERROR é um numero 1, por exemplo
6752
+ */
6753
+ tsErrorLevel = "WARNING";
6742
6754
  }
6743
6755
  if (tsErrorLevel === "WARNING") {
6744
6756
  return new WarningException(title, statusMessage, tsErrorCode);
@@ -1,5 +1,5 @@
1
1
  import { UserInterface, DataType, ApplicationContext, ErrorException } from '@sankhyalabs/core';
2
- import { d as dist, D as DataFetcher } from './DataFetcher-ecf5f903.js';
2
+ import { d as dist, D as DataFetcher } from './DataFetcher-88e56266.js';
3
3
 
4
4
  function buildGridMetadata(rawValue) {
5
5
  const fieldsMetadata = buildFieldsMetadata(rawValue.fieldsMetadata);
@@ -148,7 +148,20 @@ class PesquisaFetcher {
148
148
  });
149
149
  });
150
150
  }
151
- loadAdvancedSearch(entityName, argument, criteria, searchOptions) {
151
+ buildDescriptionCacheKey(entityName, codeValue) {
152
+ return `${entityName}__${codeValue}`;
153
+ }
154
+ async loadByCode(entityName, codeValue, criteria, searchOptions) {
155
+ const cacheKey = this.buildDescriptionCacheKey(entityName, codeValue);
156
+ const cachedValue = PesquisaFetcher.DESCRIPTIONS_BY_CODE[cacheKey];
157
+ if (cachedValue) {
158
+ return Promise.resolve(cachedValue);
159
+ }
160
+ const result = await this.loadAdvancedSearch(entityName, undefined, criteria, searchOptions, codeValue);
161
+ PesquisaFetcher.DESCRIPTIONS_BY_CODE[cacheKey] = result;
162
+ return result;
163
+ }
164
+ loadAdvancedSearch(entityName, argument, criteria, searchOptions, codeValue) {
152
165
  var _a, _b, _c, _d, _e;
153
166
  const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, searchOptions);
154
167
  const values = {
@@ -192,12 +205,22 @@ class PesquisaFetcher {
192
205
  const reqBody = {
193
206
  "serviceName": serviceName,
194
207
  "requestBody": {
195
- "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, "query": { "$": values.argument }, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_e = values.searchOptions) === null || _e === void 0 ? void 0 : _e.rootEntity }, { options }),
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": (_e = values.searchOptions) === null || _e === void 0 ? void 0 : _e.rootEntity }, { options }),
196
209
  "clientEventList": {
197
210
  "clientEvent": []
198
211
  }
199
212
  }
200
213
  };
214
+ if (codeValue == undefined) {
215
+ reqBody.requestBody.criteria.query = {
216
+ "$": argument
217
+ };
218
+ }
219
+ else {
220
+ reqBody.requestBody.criteria.pk = {
221
+ "$": codeValue
222
+ };
223
+ }
201
224
  const urlOptions = {
202
225
  urlParams: {
203
226
  "quietMode": true
@@ -307,6 +330,7 @@ class PesquisaFetcher {
307
330
  return params;
308
331
  }
309
332
  }
333
+ PesquisaFetcher.DESCRIPTIONS_BY_CODE = {};
310
334
  function buildLoadGridConfigPayload(entityName) {
311
335
  return {
312
336
  'gridConfig': {
@@ -1,7 +1,7 @@
1
- import { C as ConfigStorage } from './ConfigStorage-9bd805d6.js';
1
+ import { C as ConfigStorage } from './ConfigStorage-71e6766f.js';
2
2
  import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
3
- import { F as FormConfigFetcher } from './form-config-fetcher-ac17cff4.js';
4
- import { c as TAB_NAMES } from './constants-75abb876.js';
3
+ import { F as FormConfigFetcher } from './form-config-fetcher-fa208a6c.js';
4
+ import { c as TAB_NAMES } from './constants-7db1128a.js';
5
5
 
6
6
  class SnkFormConfigManager {
7
7
  constructor(configName, resourceID, onConfigChange, dataUnit) {
@@ -1,5 +1,5 @@
1
1
  import { ObjectUtils } from '@sankhyalabs/core';
2
- import { R as ResourceFetcher } from './form-config-fetcher-ac17cff4.js';
2
+ import { R as ResourceFetcher } from './form-config-fetcher-fa208a6c.js';
3
3
 
4
4
  class AuthFetcher extends ResourceFetcher {
5
5
  getData(resourceID) {
@@ -67,6 +67,7 @@ const TAGS_BY_TYPE = {
67
67
  CHECKBOX: "ez-check",
68
68
  OPTIONSELECTOR: "ez-combo-box",
69
69
  SEARCH: "ez-search",
70
+ SEARCHPLUS: "ez-search-plus",
70
71
  INTEGERNUMBER: "ez-number-input",
71
72
  DECIMALNUMBER: "ez-number-input"
72
73
  };