@sankhyalabs/sankhyablocks 10.1.0-dev.2 → 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.
Files changed (119) hide show
  1. package/dist/cjs/{ConfigStorage-5a73e979.js → ConfigStorage-b29e31be.js} +2 -2
  2. package/dist/cjs/{DataFetcher-eeb3b0b7.js → DataFetcher-ed9d97ea.js} +1 -1
  3. package/dist/cjs/{ISave-861e9d6d.js → ISave-81eb2fbc.js} +4 -4
  4. package/dist/cjs/{SnkFormConfigManager-8d4fded8.js → SnkFormConfigManager-6838389c.js} +2 -2
  5. package/dist/cjs/{SnkMultiSelectionListDataSource-3b93f6a6.js → SnkMultiSelectionListDataSource-1e804147.js} +4 -4
  6. package/dist/cjs/{auth-fetcher-8d8acd69.js → auth-fetcher-cc28d847.js} +1 -1
  7. package/dist/cjs/{dataunit-fetcher-1cea0695.js → dataunit-fetcher-ab1cc071.js} +1 -1
  8. package/dist/cjs/{form-config-fetcher-f347f884.js → form-config-fetcher-f0897eb5.js} +1 -1
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
  11. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  12. package/dist/cjs/snk-actions-button_9.cjs.entry.js +5 -5
  13. package/dist/cjs/snk-application.cjs.entry.js +81 -69
  14. package/dist/cjs/snk-attach.cjs.entry.js +5 -5
  15. package/dist/cjs/snk-crud.cjs.entry.js +90 -6
  16. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
  17. package/dist/cjs/{snk-data-unit-de248308.js → snk-data-unit-68992932.js} +2 -2
  18. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  19. package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
  20. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
  21. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  22. package/dist/cjs/snk-form_2.cjs.entry.js +4 -4
  23. package/dist/cjs/snk-grid.cjs.entry.js +8 -7
  24. package/dist/cjs/{snk-guides-viewer-4ec3e7e1.js → snk-guides-viewer-8b841753.js} +6 -6
  25. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  26. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  27. package/dist/cjs/snk-pesquisa.cjs.entry.js +17 -5
  28. package/dist/cjs/snk-simple-crud.cjs.entry.js +7 -7
  29. package/dist/cjs/snk-taskbar.cjs.entry.js +8 -4
  30. package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.js +27 -0
  31. package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +5 -25
  32. package/dist/collection/components/snk-application/snk-application.js +87 -44
  33. package/dist/collection/components/snk-crud/snk-crud.js +106 -2
  34. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
  35. package/dist/collection/components/snk-grid/snk-grid.js +20 -1
  36. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +5 -1
  37. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +47 -0
  38. package/dist/collection/components/snk-taskbar/snk-taskbar.js +29 -4
  39. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +3 -3
  40. package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +1 -1
  41. package/dist/components/DataFetcher.js +1 -1
  42. package/dist/components/ISave.js +3 -3
  43. package/dist/components/snk-application2.js +76 -63
  44. package/dist/components/snk-crud.js +88 -1
  45. package/dist/components/snk-detail-view2.js +1 -1
  46. package/dist/components/snk-grid2.js +3 -1
  47. package/dist/components/snk-pesquisa2.js +15 -2
  48. package/dist/components/snk-taskbar2.js +9 -4
  49. package/dist/esm/{ConfigStorage-568dc227.js → ConfigStorage-13d80e36.js} +2 -2
  50. package/dist/esm/{DataFetcher-743feb3b.js → DataFetcher-f4ccd9f3.js} +1 -1
  51. package/dist/esm/{ISave-345481c1.js → ISave-288fa9df.js} +4 -4
  52. package/dist/esm/{SnkFormConfigManager-d61df0c8.js → SnkFormConfigManager-3ee2937b.js} +2 -2
  53. package/dist/esm/{SnkMultiSelectionListDataSource-ca8d7a09.js → SnkMultiSelectionListDataSource-5d3a93f2.js} +4 -4
  54. package/dist/esm/{auth-fetcher-c353127d.js → auth-fetcher-59ab0c67.js} +1 -1
  55. package/dist/esm/{dataunit-fetcher-7f2c61ca.js → dataunit-fetcher-c4f9f222.js} +1 -1
  56. package/dist/esm/{form-config-fetcher-898d2dd1.js → form-config-fetcher-6a00fe9e.js} +1 -1
  57. package/dist/esm/loader.js +1 -1
  58. package/dist/esm/pesquisa-grid_2.entry.js +4 -4
  59. package/dist/esm/sankhyablocks.js +1 -1
  60. package/dist/esm/snk-actions-button_9.entry.js +5 -5
  61. package/dist/esm/snk-application.entry.js +81 -69
  62. package/dist/esm/snk-attach.entry.js +5 -5
  63. package/dist/esm/snk-crud.entry.js +90 -6
  64. package/dist/esm/snk-data-exporter.entry.js +5 -5
  65. package/dist/esm/{snk-data-unit-60b338c5.js → snk-data-unit-0edeb967.js} +2 -2
  66. package/dist/esm/snk-data-unit.entry.js +3 -3
  67. package/dist/esm/snk-detail-view.entry.js +7 -7
  68. package/dist/esm/snk-filter-bar_4.entry.js +3 -3
  69. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  70. package/dist/esm/snk-form_2.entry.js +4 -4
  71. package/dist/esm/snk-grid.entry.js +8 -7
  72. package/dist/esm/{snk-guides-viewer-339e10b3.js → snk-guides-viewer-9cd4d20f.js} +6 -6
  73. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  74. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  75. package/dist/esm/snk-pesquisa.entry.js +17 -5
  76. package/dist/esm/snk-simple-crud.entry.js +7 -7
  77. package/dist/esm/snk-taskbar.entry.js +8 -4
  78. package/dist/sankhyablocks/{p-9fe91526.js → p-0e279e7a.js} +1 -1
  79. package/dist/sankhyablocks/{p-164c822d.entry.js → p-1858c023.entry.js} +1 -1
  80. package/dist/sankhyablocks/{p-1d585081.js → p-1c2971e4.js} +1 -1
  81. package/dist/sankhyablocks/{p-27005fac.entry.js → p-26e0f63c.entry.js} +1 -1
  82. package/dist/sankhyablocks/{p-bb0de89c.entry.js → p-34df7eca.entry.js} +1 -1
  83. package/dist/sankhyablocks/p-34f447ba.entry.js +1 -0
  84. package/dist/sankhyablocks/{p-bd203e8d.entry.js → p-38e56b68.entry.js} +1 -1
  85. package/dist/sankhyablocks/{p-1649f51e.entry.js → p-3abeeefa.entry.js} +1 -1
  86. package/dist/sankhyablocks/{p-144da1d1.entry.js → p-3d021bef.entry.js} +1 -1
  87. package/dist/sankhyablocks/{p-e64958ba.entry.js → p-44939a0e.entry.js} +1 -1
  88. package/dist/sankhyablocks/{p-88ed2793.js → p-5304753a.js} +2 -2
  89. package/dist/sankhyablocks/{p-e8c49c12.js → p-53599b26.js} +2 -2
  90. package/dist/sankhyablocks/p-557368df.entry.js +1 -0
  91. package/dist/sankhyablocks/p-583151c5.entry.js +1 -0
  92. package/dist/sankhyablocks/{p-1f8cb438.entry.js → p-6180de07.entry.js} +1 -1
  93. package/dist/sankhyablocks/{p-1788d191.js → p-78ff8734.js} +1 -1
  94. package/dist/sankhyablocks/{p-e6b1c769.entry.js → p-80014119.entry.js} +1 -1
  95. package/dist/sankhyablocks/{p-af9d79e0.entry.js → p-8a88690f.entry.js} +1 -1
  96. package/dist/sankhyablocks/{p-7fc46290.js → p-9317942f.js} +1 -1
  97. package/dist/sankhyablocks/p-a2ed1ebd.entry.js +1 -0
  98. package/dist/sankhyablocks/{p-0cf9aa38.js → p-a644a956.js} +1 -1
  99. package/dist/sankhyablocks/p-ae108ffd.entry.js +11 -0
  100. package/dist/sankhyablocks/{p-9f2cdaab.entry.js → p-b4322b87.entry.js} +1 -1
  101. package/dist/sankhyablocks/{p-6d241415.js → p-bb2f5f38.js} +1 -1
  102. package/dist/sankhyablocks/{p-626b7a17.js → p-d9c54991.js} +1 -1
  103. package/dist/sankhyablocks/{p-c90f337a.entry.js → p-e9021f79.entry.js} +1 -1
  104. package/dist/sankhyablocks/{p-59b8f277.js → p-f15478a1.js} +1 -1
  105. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  106. package/dist/types/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.d.ts +5 -0
  107. package/dist/types/components/snk-application/snk-application.d.ts +9 -0
  108. package/dist/types/components/snk-crud/snk-crud.d.ts +12 -0
  109. package/dist/types/components/snk-grid/snk-grid.d.ts +4 -0
  110. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +9 -0
  111. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +6 -1
  112. package/dist/types/components.d.ts +39 -0
  113. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
  114. package/package.json +1 -1
  115. package/dist/sankhyablocks/p-4759912d.entry.js +0 -1
  116. package/dist/sankhyablocks/p-56948f00.entry.js +0 -11
  117. package/dist/sankhyablocks/p-95c71f5e.entry.js +0 -1
  118. package/dist/sankhyablocks/p-aae4258d.entry.js +0 -1
  119. package/dist/sankhyablocks/p-f25c50f7.entry.js +0 -1
@@ -2,27 +2,27 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-4ec3e7e1.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-8b841753.js');
6
6
  require('./index-1cf293c1.js');
7
7
  require('@sankhyalabs/core');
8
8
  require('@sankhyalabs/core/dist/dataunit/DataUnit');
9
9
  require('@sankhyalabs/ezui/dist/collection/utils');
10
10
  require('@sankhyalabs/ezui/dist/collection/utils/form');
11
- require('./DataFetcher-eeb3b0b7.js');
11
+ require('./DataFetcher-ed9d97ea.js');
12
12
  require('./PrintUtils-bcaeb82f.js');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
- require('./ISave-861e9d6d.js');
14
+ require('./ISave-81eb2fbc.js');
15
15
  require('./index-e3e39724.js');
16
16
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
17
- require('./dataunit-fetcher-1cea0695.js');
17
+ require('./dataunit-fetcher-ab1cc071.js');
18
18
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
19
19
  require('@sankhyalabs/core/dist/utils/SortingUtils');
20
20
  require('./ResourceIDUtils-5ff86aa7.js');
21
21
  require('./filter-item-type.enum-a7ffdaa6.js');
22
- require('./form-config-fetcher-f347f884.js');
22
+ require('./form-config-fetcher-f0897eb5.js');
23
23
  require('./constants-6d82e405.js');
24
- require('./SnkFormConfigManager-8d4fded8.js');
25
- require('./ConfigStorage-5a73e979.js');
24
+ require('./SnkFormConfigManager-6838389c.js');
25
+ require('./ConfigStorage-b29e31be.js');
26
26
  require('./taskbar-elements-fb5d1e08.js');
27
27
  require('./index-13d05f03.js');
28
28
  require('./taskbar-processor-2fba34a8.js');
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-1cf293c1.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-7259cf65.js');
8
- const ConfigStorage = require('./ConfigStorage-5a73e979.js');
8
+ const ConfigStorage = require('./ConfigStorage-b29e31be.js');
9
9
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
10
10
  const index$1 = require('./index-62760a9c.js');
11
11
  const index$2 = require('./index-13d05f03.js');
12
12
  require('./filter-item-type.enum-a7ffdaa6.js');
13
- require('./form-config-fetcher-f347f884.js');
14
- require('./DataFetcher-eeb3b0b7.js');
13
+ require('./form-config-fetcher-f0897eb5.js');
14
+ require('./DataFetcher-ed9d97ea.js');
15
15
  require('./PrintUtils-bcaeb82f.js');
16
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
17
17
 
@@ -4,21 +4,21 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1cf293c1.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const ISave = require('./ISave-861e9d6d.js');
8
- require('./DataFetcher-eeb3b0b7.js');
7
+ const ISave = require('./ISave-81eb2fbc.js');
8
+ require('./DataFetcher-ed9d97ea.js');
9
9
  require('./index-e3e39724.js');
10
10
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
11
11
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
12
- require('./dataunit-fetcher-1cea0695.js');
12
+ require('./dataunit-fetcher-ab1cc071.js');
13
13
  require('./filter-item-type.enum-a7ffdaa6.js');
14
- require('./form-config-fetcher-f347f884.js');
14
+ require('./form-config-fetcher-f0897eb5.js');
15
15
  require('./constants-6d82e405.js');
16
16
  require('./PrintUtils-bcaeb82f.js');
17
17
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
18
18
  require('@sankhyalabs/core/dist/utils/SortingUtils');
19
19
  require('./ResourceIDUtils-5ff86aa7.js');
20
20
 
21
- 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:100vh}.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}";
21
+ 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}";
22
22
 
23
23
  const SnkPesquisa = class {
24
24
  constructor(hostRef) {
@@ -52,6 +52,18 @@ const SnkPesquisa = class {
52
52
  this._textInput.value = this.argument;
53
53
  }
54
54
  }
55
+ /** * Executa uma pesquisa programaticamente.
56
+ * Útil para cenários onde a pesquisa precisa ser disparada sem interação do usuário.
57
+ *
58
+ * @param text Texto utilizado como argumento de pesquisa.
59
+ * @returns Promise<void>
60
+ * @example
61
+ * await pesquisaRef.executeSearch("Texto para pesquisa");
62
+ */
63
+ async executeSearch(text) {
64
+ this.argument = text;
65
+ this.onChangeValue({ detail: text });
66
+ }
55
67
  clearSearch() {
56
68
  this.argument = "";
57
69
  this._itemList = undefined;
@@ -7,18 +7,18 @@ const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const constants = require('./constants-6d82e405.js');
9
9
  const taskbarElements = require('./taskbar-elements-fb5d1e08.js');
10
- require('./DataFetcher-eeb3b0b7.js');
11
- require('./ISave-861e9d6d.js');
12
- const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-3b93f6a6.js');
10
+ require('./DataFetcher-ed9d97ea.js');
11
+ require('./ISave-81eb2fbc.js');
12
+ const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-1e804147.js');
13
13
  const index$1 = require('./index-e3e39724.js');
14
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
15
15
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
16
- const dataunitFetcher = require('./dataunit-fetcher-1cea0695.js');
16
+ const dataunitFetcher = require('./dataunit-fetcher-ab1cc071.js');
17
17
  require('./filter-item-type.enum-a7ffdaa6.js');
18
- const formConfigFetcher = require('./form-config-fetcher-f347f884.js');
18
+ const formConfigFetcher = require('./form-config-fetcher-f0897eb5.js');
19
19
  const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
20
- const ConfigStorage = require('./ConfigStorage-5a73e979.js');
21
- const SnkFormConfigManager = require('./SnkFormConfigManager-8d4fded8.js');
20
+ const ConfigStorage = require('./ConfigStorage-b29e31be.js');
21
+ const SnkFormConfigManager = require('./SnkFormConfigManager-6838389c.js');
22
22
  const index$2 = require('./index-13d05f03.js');
23
23
  require('./PrintUtils-bcaeb82f.js');
24
24
  require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
@@ -19,9 +19,10 @@ const SnkTaskbar = class {
19
19
  this.taskbarSaveUnlocker = index.createEvent(this, "taskbarSaveUnlocker", 7);
20
20
  this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
21
21
  this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
22
- this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
23
22
  this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
24
23
  this.TASKBAR_CUSTOM_ELEMENTS = 'taskbar-custom-elements-container';
24
+ this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME = 'taskbar-additional-slot-container';
25
+ this.TASKBAR_ADDITIONAL_SLOT = 'taskbar-additional-slot-container';
25
26
  this._titleKeyByElement = {
26
27
  [taskbarElements.TaskbarElement.UPDATE_MULTIPLE]: "snkTaskbar.titleUpdateMultiple",
27
28
  [taskbarElements.TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
@@ -64,6 +65,7 @@ const SnkTaskbar = class {
64
65
  this._isWaitingForSave = false;
65
66
  this.alignRigth = false;
66
67
  this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
68
+ this.additionalSlotId = "TASKBAR_ADDITIONAL_SLOT";
67
69
  this.customContainerId = undefined;
68
70
  this.overflowStrategy = 'hiddenItems';
69
71
  this.configName = undefined;
@@ -384,7 +386,8 @@ const SnkTaskbar = class {
384
386
  return (_a = element.getAttribute('data-taskbar-label')) !== null && _a !== void 0 ? _a : "";
385
387
  }
386
388
  hasToIgnoreOverFlow(element) {
387
- return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME);
389
+ return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME) ||
390
+ element.classList.contains(this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME);
388
391
  }
389
392
  handleOverFlowStrategy() {
390
393
  if (this.overflowStrategy === 'hiddenItems') {
@@ -430,7 +433,7 @@ const SnkTaskbar = class {
430
433
  this._slotContainer.appendChild(customElement);
431
434
  }
432
435
  render() {
433
- var _a;
436
+ var _a, _b;
434
437
  if (this._definitions === undefined) {
435
438
  return undefined;
436
439
  }
@@ -450,7 +453,8 @@ const SnkTaskbar = class {
450
453
  (_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
451
454
  return index.h("slot", { name: elem });
452
455
  })), index.h("div", { id: this.TASKBAR_CUSTOM_ELEMENTS, class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, index.h("slot", { name: this.customSlotId }), (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 :
453
- _a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS))));
456
+ _a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS)), index.h("div", { id: this.TASKBAR_ADDITIONAL_SLOT, class: this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME }, index.h("slot", { name: this.additionalSlotId }), (_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 :
457
+ _b.addNotOverFlowElement(this.TASKBAR_ADDITIONAL_SLOT))));
454
458
  }
455
459
  getHostClasses() {
456
460
  if (this.overflowStrategy !== 'hiddenItems')
@@ -0,0 +1,27 @@
1
+ import { ElementIDUtils } from "@sankhyalabs/core";
2
+ const executeAdvancedModeSearch = async (argument, options, app, pesquisaFetcher) => {
3
+ const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic, executeOnOpen } = options;
4
+ return new Promise((accept, reject) => {
5
+ const pesquisaContent = document.createElement("snk-pesquisa");
6
+ pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
7
+ pesquisaContent.entityName = entity;
8
+ pesquisaContent.argument = argument;
9
+ pesquisaContent.searchLoader = (text) => pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
10
+ pesquisaContent.isHierarchyEntity = isHierarchyEntity;
11
+ if (isHierarchyEntity) {
12
+ pesquisaContent.treeLoader = (text) => pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
13
+ pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
14
+ }
15
+ pesquisaContent.selectItem = (option) => {
16
+ accept(option);
17
+ app.clearPopUpTitle();
18
+ app.closePopUp();
19
+ };
20
+ app.setPopUpTitle(entityDescription);
21
+ app.showPopUp(pesquisaContent, undefined, undefined, reject);
22
+ if (executeOnOpen) {
23
+ pesquisaContent.executeSearch(argument);
24
+ }
25
+ });
26
+ };
27
+ export default executeAdvancedModeSearch;
@@ -1,32 +1,13 @@
1
- import { ArrayUtils, ElementIDUtils, SearchUtils } from "@sankhyalabs/core";
2
- import { ObjectUtils } from "@sankhyalabs/core";
3
- import { StringUtils } from "@sankhyalabs/core";
1
+ import { ArrayUtils, ObjectUtils, SearchUtils, StringUtils } from "@sankhyalabs/core";
2
+ import executeAdvancedModeSearch from "./exec-prepared-search-advaced-mode";
4
3
  const QTD_DETAIL_FIELDS_PREDICTIVE_SEARCH = 6;
5
4
  const INVALID_CONTENT_PATTERNS = ['<img', '<svg'];
6
5
  const executePreparedSearchPlus = async (mode, argument, options, app, pesquisaFetcher) => {
7
6
  var _a;
8
7
  const mdByName = {};
9
- const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic } = options;
8
+ const { entity, criteria, searchOptions } = options;
10
9
  if (mode === "ADVANCED") {
11
- return new Promise((accept, reject) => {
12
- const pesquisaContent = document.createElement("snk-pesquisa");
13
- pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
14
- pesquisaContent.entityName = entity;
15
- pesquisaContent.argument = argument;
16
- pesquisaContent.searchLoader = (text) => pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
17
- pesquisaContent.isHierarchyEntity = isHierarchyEntity;
18
- if (isHierarchyEntity) {
19
- pesquisaContent.treeLoader = (text) => pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
20
- pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
21
- }
22
- pesquisaContent.selectItem = (option) => {
23
- accept(option);
24
- app.clearPopUpTitle();
25
- app.closePopUp();
26
- };
27
- app.setPopUpTitle(entityDescription);
28
- app.showPopUp(pesquisaContent, undefined, undefined, reject);
29
- });
10
+ return executeAdvancedModeSearch(argument, options, app, pesquisaFetcher);
30
11
  }
31
12
  else if (mode === "LOAD_DESCRIPTION") {
32
13
  let result = await pesquisaFetcher.loadByCode(entity, argument, criteria, searchOptions);
@@ -63,14 +44,13 @@ const buildOptionItem = (argument, item, fields, descriptionField, pkField) => {
63
44
  const matchFields = item['__matchFields'];
64
45
  const descriptionValue = (_a = item[descriptionField]) !== null && _a !== void 0 ? _a : "";
65
46
  const pkValue = item[pkField];
66
- let searchOption = {
47
+ return {
67
48
  value: pkValue,
68
49
  label: descriptionValue,
69
50
  presentationValue: StringUtils.highlightValue(argument, matchFields, pkValue, fields, true),
70
51
  presentationLabel: descriptionField ? StringUtils.highlightValue(argument, matchFields, descriptionValue, fields, true) : "",
71
52
  details: SearchUtils.buildDetails(argument, fields, item)
72
53
  };
73
- return searchOption;
74
54
  };
75
55
  const filterInvalidFields = (resp, item, mdByName) => {
76
56
  let fieldsMetadata = resp.fieldsMetadata.filter((field) => {
@@ -20,6 +20,7 @@ import { TEMPLATES_SKELETON } from "../../lib/utils/constants";
20
20
  import executePreparedSearchPlus from "./search-strategy/exec-prepared-search-plus";
21
21
  import { LayoutFormConfig } from "../../lib/configs/LayoutFormConfig";
22
22
  import { FormConfigFetcher } from "../../lib";
23
+ import executeAdvancedModeSearch from "./search-strategy/exec-prepared-search-advaced-mode";
23
24
  /**
24
25
  * É possível customizar as mensagens dos blocos de construção através de um pequeno modulo na estrutura da aplicação:
25
26
  * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
@@ -394,7 +395,7 @@ export class SnkApplication {
394
395
  if (this._featureFlagsCache.get(featureName) && now < this._featureFlagsCache.get(featureName).expires) {
395
396
  return Promise.resolve(this._featureFlagsCache.get(featureName).isActive);
396
397
  }
397
- //Caso ocorra um erro nessa chamada, o reject do error é feito automaticamente
398
+ //Caso ocorra um erro nessa chamada, o reject do error é feito automaticamente
398
399
  const result = await DataFetcher.get().callServiceBroker("SystemUtilsSP.featureIsActive", JSON.stringify(payload));
399
400
  const isActive = result.isActive;
400
401
  this._featureFlagsCache.set(featureName, {
@@ -887,52 +888,57 @@ export class SnkApplication {
887
888
  */
888
889
  async executePreparedSearch(mode, argument, options) {
889
890
  const mdByName = {};
890
- const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic, useSearchPlus } = options;
891
+ const { entity, criteria, searchOptions, useSearchPlus } = options;
891
892
  if (useSearchPlus) {
892
893
  return executePreparedSearchPlus(mode, argument, options, this, this.pesquisaFetcher);
893
894
  }
894
895
  if (mode === "ADVANCED") {
895
- return new Promise((accept, reject) => {
896
- const pesquisaContent = document.createElement("snk-pesquisa");
897
- pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
898
- pesquisaContent.entityName = entity;
899
- pesquisaContent.argument = argument;
900
- pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
901
- pesquisaContent.isHierarchyEntity = isHierarchyEntity;
902
- if (isHierarchyEntity) {
903
- pesquisaContent.treeLoader = (text) => this.pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
904
- pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
905
- }
906
- pesquisaContent.selectItem = (option) => {
907
- accept(option);
908
- this.clearPopUpTitle();
909
- this.closePopUp();
910
- };
911
- this.setPopUpTitle(entityDescription);
912
- this.showPopUp(pesquisaContent, undefined, undefined, reject);
913
- });
896
+ return executeAdvancedModeSearch(argument, options, this, this.pesquisaFetcher);
914
897
  }
915
- else {
916
- return new Promise((resolve, reject) => {
917
- this.pesquisaFetcher.loadAdvancedSearch(entity, argument, criteria, searchOptions)
918
- .then(result => {
919
- result = ObjectUtils.stringToObject(result.json.$);
920
- let descriptionField = result.descriptionField;
921
- let pkField = result.pkField;
922
- const list = [];
923
- result.data.forEach((item) => {
924
- let fieldsMetadata = this.filterInvalidFields(result, item, mdByName);
925
- let qtyFields = 6;
926
- let fields = this.filterMathFields(item['__matchFields'], fieldsMetadata, qtyFields, mdByName);
927
- list.push(this.builOptionItem(argument, item, fields, descriptionField, pkField));
928
- });
929
- resolve(list);
930
- })
931
- .catch(error => {
932
- reject(error);
933
- });
898
+ return new Promise((resolve, reject) => {
899
+ this.pesquisaFetcher.loadAdvancedSearch(entity, argument, criteria, searchOptions)
900
+ .then(result => {
901
+ result = ObjectUtils.stringToObject(result.json.$);
902
+ resolve(this.buildSearchResultList(result, mdByName, argument));
903
+ })
904
+ .catch(error => {
905
+ reject(error);
934
906
  });
935
- }
907
+ });
908
+ }
909
+ /**
910
+ * Obtém as opções em componentes de pesquisa além dos metadados como showMore e entityPk.
911
+ * @param {string} argument - O argumento da pesquisa.
912
+ * @param {any} options - Opções preparadas para a pesquisa.
913
+ * @returns {Promise<Array<IOption> | IOption>} Uma lista de opções ou uma única opção.
914
+ * @async
915
+ */
916
+ async executePreparedSearchWithFullResponse(argument, options) {
917
+ const mdByName = {};
918
+ const { entity, criteria, searchOptions } = options;
919
+ return new Promise((resolve, reject) => {
920
+ this.pesquisaFetcher.loadAdvancedSearch(entity, argument, criteria, searchOptions)
921
+ .then(result => {
922
+ result = ObjectUtils.stringToObject(result.json.$);
923
+ result.data = this.buildSearchResultList(result, mdByName, argument);
924
+ resolve(result);
925
+ })
926
+ .catch(error => {
927
+ reject(error);
928
+ });
929
+ });
930
+ }
931
+ buildSearchResultList(result, mdByName, argument) {
932
+ let descriptionField = result.descriptionField;
933
+ let pkField = result.pkField;
934
+ const list = [];
935
+ result.data.forEach((item) => {
936
+ let fieldsMetadata = this.filterInvalidFields(result, item, mdByName);
937
+ let qtyFields = 6;
938
+ let fields = this.filterMathFields(item['__matchFields'], fieldsMetadata, qtyFields, mdByName);
939
+ list.push(this.builOptionItem(argument, item, fields, descriptionField, pkField));
940
+ });
941
+ return list;
936
942
  }
937
943
  /**
938
944
  * Obtém `true` caso a tela esteja em modo de debug.
@@ -3477,9 +3483,6 @@ export class SnkApplication {
3477
3483
  },
3478
3484
  "Array": {
3479
3485
  "location": "global"
3480
- },
3481
- "HTMLSnkPesquisaElement": {
3482
- "location": "global"
3483
3486
  }
3484
3487
  },
3485
3488
  "return": "Promise<IOption | IOption[]>"
@@ -3504,6 +3507,46 @@ export class SnkApplication {
3504
3507
  }]
3505
3508
  }
3506
3509
  },
3510
+ "executePreparedSearchWithFullResponse": {
3511
+ "complexType": {
3512
+ "signature": "(argument: string, options: any) => Promise<any>",
3513
+ "parameters": [{
3514
+ "tags": [{
3515
+ "name": "param",
3516
+ "text": "argument - O argumento da pesquisa."
3517
+ }],
3518
+ "text": "- O argumento da pesquisa."
3519
+ }, {
3520
+ "tags": [{
3521
+ "name": "param",
3522
+ "text": "options - Op\u00E7\u00F5es preparadas para a pesquisa."
3523
+ }],
3524
+ "text": "- Op\u00E7\u00F5es preparadas para a pesquisa."
3525
+ }],
3526
+ "references": {
3527
+ "Promise": {
3528
+ "location": "global"
3529
+ }
3530
+ },
3531
+ "return": "Promise<any>"
3532
+ },
3533
+ "docs": {
3534
+ "text": "Obt\u00E9m as op\u00E7\u00F5es em componentes de pesquisa al\u00E9m dos metadados como showMore e entityPk.",
3535
+ "tags": [{
3536
+ "name": "param",
3537
+ "text": "argument - O argumento da pesquisa."
3538
+ }, {
3539
+ "name": "param",
3540
+ "text": "options - Op\u00E7\u00F5es preparadas para a pesquisa."
3541
+ }, {
3542
+ "name": "returns",
3543
+ "text": "Uma lista de op\u00E7\u00F5es ou uma \u00FAnica op\u00E7\u00E3o."
3544
+ }, {
3545
+ "name": "async",
3546
+ "text": undefined
3547
+ }]
3548
+ }
3549
+ },
3507
3550
  "isDebugMode": {
3508
3551
  "complexType": {
3509
3552
  "signature": "() => Promise<boolean>",
@@ -16,6 +16,38 @@ export class SnkCrud {
16
16
  this._viewHistory = [];
17
17
  this._customEditors = new Map();
18
18
  this._customRenders = new Map();
19
+ this.loadEntitySuggestions = async (argument) => {
20
+ var _a;
21
+ const value = (_a = argument === null || argument === void 0 ? void 0 : argument.argument) !== null && _a !== void 0 ? _a : '';
22
+ const mode = (argument === null || argument === void 0 ? void 0 : argument.mode) || "PREDICTIVE";
23
+ if (!value || value.trim().length === 0) {
24
+ return [];
25
+ }
26
+ try {
27
+ this._showMoreOnSearch = false;
28
+ const entityName = this._snkDataUnit.entityName;
29
+ if (mode === "PREDICTIVE") {
30
+ return await this.handlePredictiveSearch(value, entityName);
31
+ }
32
+ return await this._application.executePreparedSearch(mode, value, this.buildSearchOptions(entityName));
33
+ }
34
+ catch (error) {
35
+ console.error('Erro ao carregar sugestões de entidades:', error);
36
+ return [];
37
+ }
38
+ };
39
+ this.searchEntitySelect = async (item) => {
40
+ if (!this._entityPKField || !item) {
41
+ return;
42
+ }
43
+ try {
44
+ const pk = [{ name: this._entityPKField, value: item.value }];
45
+ await this.refreshDataUnitByPk(pk);
46
+ }
47
+ catch (error) {
48
+ console.error('Erro ao selecionar entidade:', error);
49
+ }
50
+ };
19
51
  this.dataUnitInterceptor = {
20
52
  interceptAction: (action) => {
21
53
  if (action.type === DUAction.DATA_SAVED) {
@@ -32,6 +64,8 @@ export class SnkCrud {
32
64
  this._resourceID = undefined;
33
65
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
34
66
  this.numberingConfig = undefined;
67
+ this._showMoreOnSearch = false;
68
+ this._entityPKField = undefined;
35
69
  this.enableLockManagerLoadingComp = false;
36
70
  this.enableLockManagerTaskbarClick = false;
37
71
  this.configName = undefined;
@@ -60,6 +94,7 @@ export class SnkCrud {
60
94
  this.layoutFormConfig = true;
61
95
  this.multipleEditionEnabled = true;
62
96
  this.paginationCounterMode = 'auto';
97
+ this.showEntitySearch = true;
63
98
  this.disableNumberingConfig = false;
64
99
  }
65
100
  /**
@@ -356,6 +391,49 @@ export class SnkCrud {
356
391
  var _a;
357
392
  (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
358
393
  }
394
+ async handlePredictiveSearch(argument, entityName) {
395
+ var _a, _b;
396
+ const response = await this._application.executePreparedSearchWithFullResponse(argument, this.buildSearchOptions(entityName, 5));
397
+ this._showMoreOnSearch = (_a = response === null || response === void 0 ? void 0 : response.hasMore) !== null && _a !== void 0 ? _a : false;
398
+ this._entityPKField = response === null || response === void 0 ? void 0 : response.pkField;
399
+ return (_b = response === null || response === void 0 ? void 0 : response.data) !== null && _b !== void 0 ? _b : [];
400
+ }
401
+ async refreshDataUnitByPk(pks) {
402
+ try {
403
+ const pkField = pks[0].name;
404
+ const pkValue = pks[0].value;
405
+ // Criar filtro para a busca específica
406
+ const quickFilter = {
407
+ term: '',
408
+ filter: {
409
+ name: '',
410
+ params: [],
411
+ expression: `(${pkField} = ${pkValue})`
412
+ }
413
+ };
414
+ // Carregar dados com o filtro aplicado diretamente
415
+ await this._dataUnit.loadData(quickFilter);
416
+ // Navegar para o formulário se houver apenas um registro
417
+ if (this._dataUnit.records.length === 1) {
418
+ this._dataUnit.selectFirst();
419
+ this.gridToForm(true);
420
+ }
421
+ }
422
+ catch (error) {
423
+ console.error('Erro ao atualizar dataset:', error);
424
+ }
425
+ }
426
+ buildSearchOptions(entityName, limit) {
427
+ return {
428
+ entity: entityName,
429
+ entityDescription: entityName,
430
+ executeOnOpen: true,
431
+ searchOptions: {
432
+ localEntityName: entityName,
433
+ limit,
434
+ }
435
+ };
436
+ }
359
437
  async toggleView() {
360
438
  const currentView = await this._viewStack.getSelectedIndex();
361
439
  this.setViewMode(VIEW_MODE.GRID === currentView ? VIEW_MODE.FORM : VIEW_MODE.GRID);
@@ -462,12 +540,18 @@ export class SnkCrud {
462
540
  }
463
541
  this.configuratorCancel.emit();
464
542
  }
543
+ renderDynamicSearch(slotName) {
544
+ var _a;
545
+ if (!this.showEntitySearch || ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.insertionMode) === true)
546
+ return;
547
+ 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 })));
548
+ }
465
549
  render() {
466
550
  if (this._resourceID == undefined) {
467
551
  return;
468
552
  }
469
553
  this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
470
- 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" }))));
554
+ 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" }))));
471
555
  }
472
556
  static get is() { return "snk-crud"; }
473
557
  static get encapsulation() { return "scoped"; }
@@ -1004,6 +1088,24 @@ export class SnkCrud {
1004
1088
  "reflect": false,
1005
1089
  "defaultValue": "'auto'"
1006
1090
  },
1091
+ "showEntitySearch": {
1092
+ "type": "boolean",
1093
+ "mutable": false,
1094
+ "complexType": {
1095
+ "original": "boolean",
1096
+ "resolved": "boolean",
1097
+ "references": {}
1098
+ },
1099
+ "required": false,
1100
+ "optional": true,
1101
+ "docs": {
1102
+ "tags": [],
1103
+ "text": "Define se o campo de busca de entidades ser\u00E1 exibido na barra superior."
1104
+ },
1105
+ "attribute": "show-entity-search",
1106
+ "reflect": false,
1107
+ "defaultValue": "true"
1108
+ },
1007
1109
  "disableNumberingConfig": {
1008
1110
  "type": "boolean",
1009
1111
  "mutable": false,
@@ -1033,7 +1135,9 @@ export class SnkCrud {
1033
1135
  "_canEdit": {},
1034
1136
  "_resourceID": {},
1035
1137
  "customContainerId": {},
1036
- "numberingConfig": {}
1138
+ "numberingConfig": {},
1139
+ "_showMoreOnSearch": {},
1140
+ "_entityPKField": {}
1037
1141
  };
1038
1142
  }
1039
1143
  static get events() {
@@ -457,7 +457,7 @@ export class SnkGuidesViewer {
457
457
  }
458
458
  buildTaskBar() {
459
459
  var _a;
460
- 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" })));
460
+ 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" })));
461
461
  }
462
462
  async dataUnitActionHandler(action) {
463
463
  var _a;