@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-78242.2 → 0.0.0-bugfix-dev-KB-80932.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/dist/cjs/{ConfigStorage-f079f5fd.js → ConfigStorage-d024aec8.js} +2 -2
  2. package/dist/cjs/{ContinuousInsertUtils-64e47516.js → ContinuousInsertUtils-54d44192.js} +5 -5
  3. package/dist/cjs/{DataFetcher-e059eb72.js → DataFetcher-65879b2c.js} +188 -56
  4. package/dist/cjs/{SnkFormConfigManager-63369164.js → SnkFormConfigManager-ae3185b2.js} +2 -2
  5. package/dist/cjs/{auth-fetcher-4f853233.js → auth-fetcher-8480751c.js} +1 -1
  6. package/dist/cjs/{dataunit-fetcher-228016f4.js → dataunit-fetcher-8ea97d88.js} +2 -2
  7. package/dist/cjs/{form-config-fetcher-39397ac5.js → form-config-fetcher-90126e4c.js} +38 -1
  8. package/dist/cjs/index-f9e81701.js +8 -4
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{pesquisa-fetcher-a9bfeb22.js → pesquisa-fetcher-f3454c23.js} +179 -1
  11. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +133 -0
  12. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  13. package/dist/cjs/{snk-actions-button_4.cjs.entry.js → snk-actions-button_5.cjs.entry.js} +99 -9
  14. package/dist/cjs/snk-application.cjs.entry.js +144 -21
  15. package/dist/cjs/snk-attach.cjs.entry.js +13 -9
  16. package/dist/cjs/snk-config-options_3.cjs.entry.js +4 -4
  17. package/dist/cjs/snk-crud.cjs.entry.js +8 -7
  18. package/dist/cjs/snk-data-exporter.cjs.entry.js +29 -18
  19. package/dist/cjs/{snk-data-unit-3d9b6ed4.js → snk-data-unit-72ef8777.js} +1 -1
  20. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  21. package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
  22. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +27 -11
  23. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  24. package/dist/cjs/snk-grid.cjs.entry.js +9 -8
  25. package/dist/cjs/{snk-guides-viewer-2139481c.js → snk-guides-viewer-ea5d0907.js} +5 -5
  26. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  27. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  28. package/dist/cjs/snk-pesquisa.cjs.entry.js +105 -31
  29. package/dist/cjs/snk-simple-crud.cjs.entry.js +27 -29
  30. package/dist/collection/collection-manifest.json +3 -0
  31. package/dist/collection/components/snk-actions-button/actions/index.js +4 -4
  32. package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +4 -3
  33. package/dist/collection/components/snk-application/snk-application.css +34 -0
  34. package/dist/collection/components/snk-application/snk-application.js +197 -14
  35. package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +8 -4
  36. package/dist/collection/components/snk-crud/snk-crud.js +39 -20
  37. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +11 -5
  38. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +11 -4
  39. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -1
  40. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -3
  41. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +1 -1
  42. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +3 -1
  43. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +40 -8
  44. package/dist/collection/components/snk-grid/snk-grid.js +39 -20
  45. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css +10 -0
  46. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +190 -0
  47. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css +25 -0
  48. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +179 -0
  49. package/dist/collection/components/snk-pesquisa/pesquisaHelper.js +89 -0
  50. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +24 -5
  51. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +168 -32
  52. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +56 -41
  53. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +22 -0
  54. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +181 -0
  55. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +1 -1
  56. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +41 -4
  57. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +92 -3
  58. package/dist/components/ContinuousInsertUtils.js +2 -3
  59. package/dist/components/DataFetcher.js +188 -56
  60. package/dist/components/ISave.js +346 -1
  61. package/dist/components/dataunit-fetcher.js +1 -1
  62. package/dist/components/form-config-fetcher.js +37 -0
  63. package/dist/components/index.d.ts +3 -0
  64. package/dist/components/index.js +3 -0
  65. package/dist/components/pesquisa-grid.d.ts +11 -0
  66. package/dist/components/pesquisa-grid.js +6 -0
  67. package/dist/components/pesquisa-grid2.js +86 -0
  68. package/dist/components/pesquisa-tree.d.ts +11 -0
  69. package/dist/components/pesquisa-tree.js +6 -0
  70. package/dist/components/pesquisa-tree2.js +82 -0
  71. package/dist/components/snk-actions-button2.js +4 -5
  72. package/dist/components/snk-application2.js +159 -20
  73. package/dist/components/snk-attach2.js +20 -35
  74. package/dist/components/snk-crud.js +66 -59
  75. package/dist/components/snk-data-exporter2.js +25 -15
  76. package/dist/components/snk-detail-view2.js +84 -94
  77. package/dist/components/snk-filter-bar2.js +23 -8
  78. package/dist/components/snk-filter-modal.js +3 -1
  79. package/dist/components/snk-grid2.js +5 -4
  80. package/dist/components/snk-pesquisa2.js +118 -33
  81. package/dist/components/snk-simple-crud2.js +35 -56
  82. package/dist/components/snk-simple-form-config.d.ts +11 -0
  83. package/dist/components/snk-simple-form-config.js +6 -0
  84. package/dist/components/snk-simple-form-config2.js +120 -0
  85. package/dist/components/teste-pesquisa.js +13 -1
  86. package/dist/esm/{ConfigStorage-6514d66e.js → ConfigStorage-373bb440.js} +2 -2
  87. package/dist/esm/{ContinuousInsertUtils-b62906f9.js → ContinuousInsertUtils-25e7bd9a.js} +5 -5
  88. package/dist/esm/{DataFetcher-5034df59.js → DataFetcher-5221b992.js} +188 -56
  89. package/dist/esm/{SnkFormConfigManager-b409c745.js → SnkFormConfigManager-b65e6db0.js} +2 -2
  90. package/dist/esm/{auth-fetcher-ca5d3a49.js → auth-fetcher-e32fe8a4.js} +1 -1
  91. package/dist/esm/{dataunit-fetcher-56cb648b.js → dataunit-fetcher-8dd93d8b.js} +2 -2
  92. package/dist/esm/{form-config-fetcher-a7d3e277.js → form-config-fetcher-126e2471.js} +38 -1
  93. package/dist/esm/index-a7d3d3f1.js +8 -4
  94. package/dist/esm/loader.js +1 -1
  95. package/dist/{components/pesquisa-fetcher.js → esm/pesquisa-fetcher-0af41f09.js} +180 -3
  96. package/dist/esm/pesquisa-grid_2.entry.js +128 -0
  97. package/dist/esm/sankhyablocks.js +1 -1
  98. package/dist/esm/{snk-actions-button_4.entry.js → snk-actions-button_5.entry.js} +99 -10
  99. package/dist/esm/snk-application.entry.js +146 -23
  100. package/dist/esm/snk-attach.entry.js +13 -9
  101. package/dist/esm/snk-config-options_3.entry.js +4 -4
  102. package/dist/esm/snk-crud.entry.js +8 -7
  103. package/dist/esm/snk-data-exporter.entry.js +29 -18
  104. package/dist/esm/{snk-data-unit-9fa7d2b9.js → snk-data-unit-11a49fc3.js} +1 -1
  105. package/dist/esm/snk-data-unit.entry.js +3 -3
  106. package/dist/esm/snk-detail-view.entry.js +7 -7
  107. package/dist/esm/snk-filter-bar_4.entry.js +28 -12
  108. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  109. package/dist/esm/snk-grid.entry.js +9 -8
  110. package/dist/esm/{snk-guides-viewer-b7ed39eb.js → snk-guides-viewer-830f5fb9.js} +5 -5
  111. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  112. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  113. package/dist/esm/snk-pesquisa.entry.js +105 -31
  114. package/dist/esm/snk-simple-crud.entry.js +27 -29
  115. package/dist/sankhyablocks/{p-0e206e62.js → p-05b6ff91.js} +1 -1
  116. package/dist/sankhyablocks/p-09067bee.entry.js +1 -0
  117. package/dist/sankhyablocks/p-0cda2226.entry.js +11 -0
  118. package/dist/sankhyablocks/p-1435701f.js +26 -0
  119. package/dist/sankhyablocks/{p-e97be1c8.js → p-171b7623.js} +1 -1
  120. package/dist/sankhyablocks/{p-9ffd9fc7.js → p-19dc71e9.js} +1 -1
  121. package/dist/sankhyablocks/{p-0d2a2e9e.entry.js → p-1a91d1f3.entry.js} +1 -1
  122. package/dist/sankhyablocks/{p-aa003d4e.entry.js → p-1cf39cfd.entry.js} +1 -1
  123. package/dist/sankhyablocks/{p-bb8ef149.entry.js → p-254c59d2.entry.js} +1 -1
  124. package/dist/sankhyablocks/p-422eb699.entry.js +1 -0
  125. package/dist/sankhyablocks/{p-a2c790ac.entry.js → p-469384a2.entry.js} +1 -1
  126. package/dist/sankhyablocks/p-54f5354a.entry.js +1 -0
  127. package/dist/sankhyablocks/{p-342eeb3b.js → p-60e4db34.js} +1 -1
  128. package/dist/sankhyablocks/p-618a29ed.entry.js +1 -0
  129. package/dist/sankhyablocks/p-798386c7.js +6 -0
  130. package/dist/sankhyablocks/{p-fca0e5cc.entry.js → p-82ee6dc3.entry.js} +1 -1
  131. package/dist/sankhyablocks/{p-e4391e16.js → p-8a1ee5b5.js} +1 -1
  132. package/dist/sankhyablocks/p-8bd86610.entry.js +1 -0
  133. package/dist/sankhyablocks/p-b50a0753.entry.js +1 -0
  134. package/dist/sankhyablocks/p-d62228fb.js +1 -0
  135. package/dist/sankhyablocks/p-d92d4f91.entry.js +1 -0
  136. package/dist/sankhyablocks/{p-47d24ac8.js → p-ddefbbc7.js} +1 -1
  137. package/dist/sankhyablocks/p-e5430b29.entry.js +1 -0
  138. package/dist/sankhyablocks/p-f0b9303b.js +1 -0
  139. package/dist/sankhyablocks/p-f258690a.entry.js +1 -0
  140. package/dist/sankhyablocks/{p-ec43fcc8.entry.js → p-f975370f.entry.js} +1 -1
  141. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  142. package/dist/types/components/snk-application/snk-application.d.ts +22 -4
  143. package/dist/types/components/snk-crud/snk-crud.d.ts +8 -4
  144. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +1 -0
  145. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +1 -0
  146. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +1 -1
  147. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +6 -1
  148. package/dist/types/components/snk-grid/snk-grid.d.ts +8 -4
  149. package/dist/types/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.d.ts +38 -0
  150. package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +29 -0
  151. package/dist/types/components/snk-pesquisa/pesquisaHelper.d.ts +19 -0
  152. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +35 -1
  153. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -4
  154. package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +34 -0
  155. package/dist/types/components.d.ts +244 -23
  156. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +8 -2
  157. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +10 -1
  158. package/package.json +1 -1
  159. package/react/components.d.ts +3 -0
  160. package/react/components.js +3 -0
  161. package/react/components.js.map +1 -1
  162. package/dist/esm/pesquisa-fetcher-6bc2e41a.js +0 -169
  163. package/dist/sankhyablocks/p-00278e07.js +0 -1
  164. package/dist/sankhyablocks/p-0387d9d7.entry.js +0 -1
  165. package/dist/sankhyablocks/p-126c58ea.js +0 -26
  166. package/dist/sankhyablocks/p-1d3ce0d9.entry.js +0 -1
  167. package/dist/sankhyablocks/p-341465ce.js +0 -6
  168. package/dist/sankhyablocks/p-3728d2aa.entry.js +0 -11
  169. package/dist/sankhyablocks/p-4138da61.entry.js +0 -1
  170. package/dist/sankhyablocks/p-5d9788b3.entry.js +0 -1
  171. package/dist/sankhyablocks/p-7075b789.entry.js +0 -1
  172. package/dist/sankhyablocks/p-aaf94476.js +0 -1
  173. package/dist/sankhyablocks/p-af7f7b3e.entry.js +0 -1
  174. package/dist/sankhyablocks/p-d1791da2.entry.js +0 -1
  175. package/dist/sankhyablocks/p-eb7c9cf4.entry.js +0 -1
@@ -1,5 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
  import { DataUnit, DataType, UserInterface } from '@sankhyalabs/core';
3
+ import { d as defineCustomElement$5 } from './pesquisa-grid2.js';
4
+ import { d as defineCustomElement$4 } from './pesquisa-tree2.js';
3
5
  import { d as defineCustomElement$3 } from './snk-application2.js';
4
6
  import { d as defineCustomElement$2 } from './snk-pesquisa2.js';
5
7
 
@@ -37,13 +39,23 @@ function defineCustomElement$1() {
37
39
  if (typeof customElements === "undefined") {
38
40
  return;
39
41
  }
40
- const components = ["teste-pesquisa", "snk-application", "snk-pesquisa"];
42
+ const components = ["teste-pesquisa", "pesquisa-grid", "pesquisa-tree", "snk-application", "snk-pesquisa"];
41
43
  components.forEach(tagName => { switch (tagName) {
42
44
  case "teste-pesquisa":
43
45
  if (!customElements.get(tagName)) {
44
46
  customElements.define(tagName, TestePesquisa$1);
45
47
  }
46
48
  break;
49
+ case "pesquisa-grid":
50
+ if (!customElements.get(tagName)) {
51
+ defineCustomElement$5();
52
+ }
53
+ break;
54
+ case "pesquisa-tree":
55
+ if (!customElements.get(tagName)) {
56
+ defineCustomElement$4();
57
+ }
58
+ break;
47
59
  case "snk-application":
48
60
  if (!customElements.get(tagName)) {
49
61
  defineCustomElement$3();
@@ -1,7 +1,7 @@
1
- import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-a7d3e277.js';
1
+ import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-126e2471.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-5034df59.js';
4
+ import { d as dist, D as DataFetcher } from './DataFetcher-5221b992.js';
5
5
 
6
6
  class GridConfigFetcher extends ResourceFetcher {
7
7
  constructor() {
@@ -1,13 +1,13 @@
1
- import { D as DataFetcher } from './DataFetcher-5034df59.js';
2
- import './pesquisa-fetcher-6bc2e41a.js';
1
+ import { D as DataFetcher } from './DataFetcher-5221b992.js';
2
+ import './pesquisa-fetcher-0af41f09.js';
3
3
  import { SortMode, ApplicationContext, UserInterface, DateUtils, ObjectUtils, StringUtils, NumberUtils, DataType } from '@sankhyalabs/core';
4
4
  import './index-3aa4977a.js';
5
5
  import './ISave-d8c8bc59.js';
6
6
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
7
7
  import { UserInterface as UserInterface$1 } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
8
- import { P as PreloadManager } from './dataunit-fetcher-56cb648b.js';
8
+ import { P as PreloadManager } from './dataunit-fetcher-8dd93d8b.js';
9
9
  import './filter-item-type.enum-d45e026f.js';
10
- import './form-config-fetcher-a7d3e277.js';
10
+ import './form-config-fetcher-126e2471.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
 
@@ -204,7 +204,7 @@ class CommonsExporter {
204
204
  const columnData = {
205
205
  label: column.label,
206
206
  id: column.name,
207
- width: column.width,
207
+ width: (fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface) === UserInterface$1.SEARCH ? 60 : column.width,
208
208
  type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
209
209
  userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface,
210
210
  customFormatter
@@ -19,25 +19,40 @@ function commonjsRequire () {
19
19
  }
20
20
 
21
21
  var browserPonyfill = createCommonjsModule(function (module, exports) {
22
- var global = typeof self !== 'undefined' ? self : commonjsGlobal;
23
- var __self__ = (function () {
22
+ // Save global object in a variable
23
+ var __global__ =
24
+ (typeof globalThis !== 'undefined' && globalThis) ||
25
+ (typeof self !== 'undefined' && self) ||
26
+ (typeof commonjsGlobal !== 'undefined' && commonjsGlobal);
27
+ // Create an object that extends from __global__ without the fetch function
28
+ var __globalThis__ = (function () {
24
29
  function F() {
25
30
  this.fetch = false;
26
- this.DOMException = global.DOMException;
31
+ this.DOMException = __global__.DOMException;
27
32
  }
28
- F.prototype = global;
33
+ F.prototype = __global__; // Needed for feature detection on whatwg-fetch's code
29
34
  return new F();
30
35
  })();
31
- (function(self) {
36
+ // Wraps whatwg-fetch with a function scope to hijack the global object
37
+ // "globalThis" that's going to be patched
38
+ (function(globalThis) {
32
39
 
33
40
  ((function (exports) {
34
41
 
42
+ /* eslint-disable no-prototype-builtins */
43
+ var g =
44
+ (typeof globalThis !== 'undefined' && globalThis) ||
45
+ (typeof self !== 'undefined' && self) ||
46
+ // eslint-disable-next-line no-undef
47
+ (typeof commonjsGlobal !== 'undefined' && commonjsGlobal) ||
48
+ {};
49
+
35
50
  var support = {
36
- searchParams: 'URLSearchParams' in self,
37
- iterable: 'Symbol' in self && 'iterator' in Symbol,
51
+ searchParams: 'URLSearchParams' in g,
52
+ iterable: 'Symbol' in g && 'iterator' in Symbol,
38
53
  blob:
39
- 'FileReader' in self &&
40
- 'Blob' in self &&
54
+ 'FileReader' in g &&
55
+ 'Blob' in g &&
41
56
  (function() {
42
57
  try {
43
58
  new Blob();
@@ -46,8 +61,8 @@ return new F();
46
61
  return false
47
62
  }
48
63
  })(),
49
- formData: 'FormData' in self,
50
- arrayBuffer: 'ArrayBuffer' in self
64
+ formData: 'FormData' in g,
65
+ arrayBuffer: 'ArrayBuffer' in g
51
66
  };
52
67
 
53
68
  function isDataView(obj) {
@@ -78,8 +93,8 @@ return new F();
78
93
  if (typeof name !== 'string') {
79
94
  name = String(name);
80
95
  }
81
- if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
82
- throw new TypeError('Invalid character in header field name')
96
+ if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {
97
+ throw new TypeError('Invalid character in header field name: "' + name + '"')
83
98
  }
84
99
  return name.toLowerCase()
85
100
  }
@@ -118,6 +133,9 @@ return new F();
118
133
  }, this);
119
134
  } else if (Array.isArray(headers)) {
120
135
  headers.forEach(function(header) {
136
+ if (header.length != 2) {
137
+ throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)
138
+ }
121
139
  this.append(header[0], header[1]);
122
140
  }, this);
123
141
  } else if (headers) {
@@ -188,6 +206,7 @@ return new F();
188
206
  }
189
207
 
190
208
  function consumed(body) {
209
+ if (body._noBody) return
191
210
  if (body.bodyUsed) {
192
211
  return Promise.reject(new TypeError('Already read'))
193
212
  }
@@ -215,7 +234,9 @@ return new F();
215
234
  function readBlobAsText(blob) {
216
235
  var reader = new FileReader();
217
236
  var promise = fileReaderReady(reader);
218
- reader.readAsText(blob);
237
+ var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type);
238
+ var encoding = match ? match[1] : 'utf-8';
239
+ reader.readAsText(blob, encoding);
219
240
  return promise
220
241
  }
221
242
 
@@ -243,8 +264,21 @@ return new F();
243
264
  this.bodyUsed = false;
244
265
 
245
266
  this._initBody = function(body) {
267
+ /*
268
+ fetch-mock wraps the Response object in an ES6 Proxy to
269
+ provide useful test harness features such as flush. However, on
270
+ ES5 browsers without fetch or Proxy support pollyfills must be used;
271
+ the proxy-pollyfill is unable to proxy an attribute unless it exists
272
+ on the object before the Proxy is created. This change ensures
273
+ Response.bodyUsed exists on the instance, while maintaining the
274
+ semantic of setting Request.bodyUsed in the constructor before
275
+ _initBody is called.
276
+ */
277
+ // eslint-disable-next-line no-self-assign
278
+ this.bodyUsed = this.bodyUsed;
246
279
  this._bodyInit = body;
247
280
  if (!body) {
281
+ this._noBody = true;
248
282
  this._bodyText = '';
249
283
  } else if (typeof body === 'string') {
250
284
  this._bodyText = body;
@@ -292,15 +326,29 @@ return new F();
292
326
  return Promise.resolve(new Blob([this._bodyText]))
293
327
  }
294
328
  };
329
+ }
295
330
 
296
- this.arrayBuffer = function() {
297
- if (this._bodyArrayBuffer) {
298
- return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
331
+ this.arrayBuffer = function() {
332
+ if (this._bodyArrayBuffer) {
333
+ var isConsumed = consumed(this);
334
+ if (isConsumed) {
335
+ return isConsumed
336
+ } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
337
+ return Promise.resolve(
338
+ this._bodyArrayBuffer.buffer.slice(
339
+ this._bodyArrayBuffer.byteOffset,
340
+ this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
341
+ )
342
+ )
299
343
  } else {
300
- return this.blob().then(readBlobAsArrayBuffer)
344
+ return Promise.resolve(this._bodyArrayBuffer)
301
345
  }
302
- };
303
- }
346
+ } else if (support.blob) {
347
+ return this.blob().then(readBlobAsArrayBuffer)
348
+ } else {
349
+ throw new Error('could not read as ArrayBuffer')
350
+ }
351
+ };
304
352
 
305
353
  this.text = function() {
306
354
  var rejected = consumed(this);
@@ -333,7 +381,7 @@ return new F();
333
381
  }
334
382
 
335
383
  // HTTP methods whose capitalization should be normalized
336
- var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
384
+ var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'];
337
385
 
338
386
  function normalizeMethod(method) {
339
387
  var upcased = method.toUpperCase();
@@ -341,6 +389,10 @@ return new F();
341
389
  }
342
390
 
343
391
  function Request(input, options) {
392
+ if (!(this instanceof Request)) {
393
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
394
+ }
395
+
344
396
  options = options || {};
345
397
  var body = options.body;
346
398
 
@@ -370,13 +422,33 @@ return new F();
370
422
  }
371
423
  this.method = normalizeMethod(options.method || this.method || 'GET');
372
424
  this.mode = options.mode || this.mode || null;
373
- this.signal = options.signal || this.signal;
425
+ this.signal = options.signal || this.signal || (function () {
426
+ if ('AbortController' in g) {
427
+ var ctrl = new AbortController();
428
+ return ctrl.signal;
429
+ }
430
+ }());
374
431
  this.referrer = null;
375
432
 
376
433
  if ((this.method === 'GET' || this.method === 'HEAD') && body) {
377
434
  throw new TypeError('Body not allowed for GET or HEAD requests')
378
435
  }
379
436
  this._initBody(body);
437
+
438
+ if (this.method === 'GET' || this.method === 'HEAD') {
439
+ if (options.cache === 'no-store' || options.cache === 'no-cache') {
440
+ // Search for a '_' parameter in the query string
441
+ var reParamSearch = /([?&])_=[^&]*/;
442
+ if (reParamSearch.test(this.url)) {
443
+ // If it already exists then set the value with the current time
444
+ this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());
445
+ } else {
446
+ // Otherwise add a new '_' parameter to the end with the current time
447
+ var reQueryString = /\?/;
448
+ this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();
449
+ }
450
+ }
451
+ }
380
452
  }
381
453
 
382
454
  Request.prototype.clone = function() {
@@ -404,28 +476,46 @@ return new F();
404
476
  // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
405
477
  // https://tools.ietf.org/html/rfc7230#section-3.2
406
478
  var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
407
- preProcessedHeaders.split(/\r?\n/).forEach(function(line) {
408
- var parts = line.split(':');
409
- var key = parts.shift().trim();
410
- if (key) {
411
- var value = parts.join(':').trim();
412
- headers.append(key, value);
413
- }
414
- });
479
+ // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
480
+ // https://github.com/github/fetch/issues/748
481
+ // https://github.com/zloirock/core-js/issues/751
482
+ preProcessedHeaders
483
+ .split('\r')
484
+ .map(function(header) {
485
+ return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header
486
+ })
487
+ .forEach(function(line) {
488
+ var parts = line.split(':');
489
+ var key = parts.shift().trim();
490
+ if (key) {
491
+ var value = parts.join(':').trim();
492
+ try {
493
+ headers.append(key, value);
494
+ } catch (error) {
495
+ console.warn('Response ' + error.message);
496
+ }
497
+ }
498
+ });
415
499
  return headers
416
500
  }
417
501
 
418
502
  Body.call(Request.prototype);
419
503
 
420
504
  function Response(bodyInit, options) {
505
+ if (!(this instanceof Response)) {
506
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
507
+ }
421
508
  if (!options) {
422
509
  options = {};
423
510
  }
424
511
 
425
512
  this.type = 'default';
426
513
  this.status = options.status === undefined ? 200 : options.status;
514
+ if (this.status < 200 || this.status > 599) {
515
+ throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].")
516
+ }
427
517
  this.ok = this.status >= 200 && this.status < 300;
428
- this.statusText = 'statusText' in options ? options.statusText : 'OK';
518
+ this.statusText = options.statusText === undefined ? '' : '' + options.statusText;
429
519
  this.headers = new Headers(options.headers);
430
520
  this.url = options.url || '';
431
521
  this._initBody(bodyInit);
@@ -443,7 +533,9 @@ return new F();
443
533
  };
444
534
 
445
535
  Response.error = function() {
446
- var response = new Response(null, {status: 0, statusText: ''});
536
+ var response = new Response(null, {status: 200, statusText: ''});
537
+ response.ok = false;
538
+ response.status = 0;
447
539
  response.type = 'error';
448
540
  return response
449
541
  };
@@ -458,7 +550,7 @@ return new F();
458
550
  return new Response(null, {status: status, headers: {location: url}})
459
551
  };
460
552
 
461
- exports.DOMException = self.DOMException;
553
+ exports.DOMException = g.DOMException;
462
554
  try {
463
555
  new exports.DOMException();
464
556
  } catch (err) {
@@ -488,28 +580,50 @@ return new F();
488
580
 
489
581
  xhr.onload = function() {
490
582
  var options = {
491
- status: xhr.status,
492
583
  statusText: xhr.statusText,
493
584
  headers: parseHeaders(xhr.getAllResponseHeaders() || '')
494
585
  };
586
+ // This check if specifically for when a user fetches a file locally from the file system
587
+ // Only if the status is out of a normal range
588
+ if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {
589
+ options.status = 200;
590
+ } else {
591
+ options.status = xhr.status;
592
+ }
495
593
  options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
496
594
  var body = 'response' in xhr ? xhr.response : xhr.responseText;
497
- resolve(new Response(body, options));
595
+ setTimeout(function() {
596
+ resolve(new Response(body, options));
597
+ }, 0);
498
598
  };
499
599
 
500
600
  xhr.onerror = function() {
501
- reject(new TypeError('Network request failed'));
601
+ setTimeout(function() {
602
+ reject(new TypeError('Network request failed'));
603
+ }, 0);
502
604
  };
503
605
 
504
606
  xhr.ontimeout = function() {
505
- reject(new TypeError('Network request failed'));
607
+ setTimeout(function() {
608
+ reject(new TypeError('Network request timed out'));
609
+ }, 0);
506
610
  };
507
611
 
508
612
  xhr.onabort = function() {
509
- reject(new exports.DOMException('Aborted', 'AbortError'));
613
+ setTimeout(function() {
614
+ reject(new exports.DOMException('Aborted', 'AbortError'));
615
+ }, 0);
510
616
  };
511
617
 
512
- xhr.open(request.method, request.url, true);
618
+ function fixUrl(url) {
619
+ try {
620
+ return url === '' && g.location.href ? g.location.href : url
621
+ } catch (e) {
622
+ return url
623
+ }
624
+ }
625
+
626
+ xhr.open(request.method, fixUrl(request.url), true);
513
627
 
514
628
  if (request.credentials === 'include') {
515
629
  xhr.withCredentials = true;
@@ -517,13 +631,32 @@ return new F();
517
631
  xhr.withCredentials = false;
518
632
  }
519
633
 
520
- if ('responseType' in xhr && support.blob) {
521
- xhr.responseType = 'blob';
634
+ if ('responseType' in xhr) {
635
+ if (support.blob) {
636
+ xhr.responseType = 'blob';
637
+ } else if (
638
+ support.arrayBuffer
639
+ ) {
640
+ xhr.responseType = 'arraybuffer';
641
+ }
522
642
  }
523
643
 
524
- request.headers.forEach(function(value, name) {
525
- xhr.setRequestHeader(name, value);
526
- });
644
+ if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
645
+ var names = [];
646
+ Object.getOwnPropertyNames(init.headers).forEach(function(name) {
647
+ names.push(normalizeName(name));
648
+ xhr.setRequestHeader(name, normalizeValue(init.headers[name]));
649
+ });
650
+ request.headers.forEach(function(value, name) {
651
+ if (names.indexOf(name) === -1) {
652
+ xhr.setRequestHeader(name, value);
653
+ }
654
+ });
655
+ } else {
656
+ request.headers.forEach(function(value, name) {
657
+ xhr.setRequestHeader(name, value);
658
+ });
659
+ }
527
660
 
528
661
  if (request.signal) {
529
662
  request.signal.addEventListener('abort', abortXhr);
@@ -542,11 +675,11 @@ return new F();
542
675
 
543
676
  fetch.polyfill = true;
544
677
 
545
- if (!self.fetch) {
546
- self.fetch = fetch;
547
- self.Headers = Headers;
548
- self.Request = Request;
549
- self.Response = Response;
678
+ if (!g.fetch) {
679
+ g.fetch = fetch;
680
+ g.Headers = Headers;
681
+ g.Request = Request;
682
+ g.Response = Response;
550
683
  }
551
684
 
552
685
  exports.Headers = Headers;
@@ -559,13 +692,12 @@ return new F();
559
692
  return exports;
560
693
 
561
694
  }))({});
562
- })(__self__);
563
- __self__.fetch.ponyfill = true;
564
- // Remove "polyfill" property added by whatwg-fetch
565
- delete __self__.fetch.polyfill;
566
- // Choose between native implementation (global) or custom implementation (__self__)
567
- // var ctx = global.fetch ? global : __self__;
568
- var ctx = __self__; // this line disable service worker support temporarily
695
+ })(__globalThis__);
696
+ // This is a ponyfill, so...
697
+ __globalThis__.fetch.ponyfill = true;
698
+ delete __globalThis__.fetch.polyfill;
699
+ // Choose between native implementation (__global__) or custom implementation (__globalThis__)
700
+ var ctx = __global__.fetch ? __global__ : __globalThis__;
569
701
  exports = ctx.fetch; // To enable: import fetch from 'cross-fetch'
570
702
  exports.default = ctx.fetch; // For TypeScript consumers without esModuleInterop.
571
703
  exports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch'
@@ -1,6 +1,6 @@
1
- import { C as ConfigStorage } from './ConfigStorage-6514d66e.js';
1
+ import { C as ConfigStorage } from './ConfigStorage-373bb440.js';
2
2
  import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
3
- import { F as FormConfigFetcher } from './form-config-fetcher-a7d3e277.js';
3
+ import { F as FormConfigFetcher } from './form-config-fetcher-126e2471.js';
4
4
  import { b as TAB_NAMES } from './constants-7302ee87.js';
5
5
 
6
6
  class SnkFormConfigManager {
@@ -1,5 +1,5 @@
1
1
  import { ObjectUtils } from '@sankhyalabs/core';
2
- import { R as ResourceFetcher } from './form-config-fetcher-a7d3e277.js';
2
+ import { R as ResourceFetcher } from './form-config-fetcher-126e2471.js';
3
3
 
4
4
  class AuthFetcher extends ResourceFetcher {
5
5
  getData(resourceID) {
@@ -1,5 +1,5 @@
1
1
  import { ObjectUtils, DataUnit, DataType, DateUtils, StringUtils, ChangeOperation, ApplicationContext, UserInterface, DataUnitStorage } from '@sankhyalabs/core';
2
- import { D as DataFetcher, d as dist } from './DataFetcher-5034df59.js';
2
+ import { D as DataFetcher, d as dist } from './DataFetcher-5221b992.js';
3
3
  import { DISTINCT_FILTER_NAME_PREFIX } from '@sankhyalabs/ezui/dist/collection/utils/constants';
4
4
  import { DataUnitTransient } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
5
5
  import { ColumnFilterManager } from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
@@ -247,7 +247,7 @@ function buildLoadDataResponse(recordsIn, dataUnit, request) {
247
247
  };
248
248
  return Promise.resolve({
249
249
  records: getPagesByRecords(records, offset, limit),
250
- paginationInfo: buildPaginationInfo(paginationInfoBuilderParams),
250
+ paginationInfo: dataUnit.pageSize ? buildPaginationInfo(paginationInfoBuilderParams) : undefined,
251
251
  });
252
252
  }
253
253
  function applySorting(records, dataUnit, sorting) {
@@ -1,4 +1,4 @@
1
- import { d as dist, D as DataFetcher } from './DataFetcher-5034df59.js';
1
+ import { d as dist, D as DataFetcher } from './DataFetcher-5221b992.js';
2
2
  import { ObjectUtils } from '@sankhyalabs/core';
3
3
 
4
4
  class ResourceFetcher {
@@ -240,6 +240,43 @@ class FormConfigFetcher extends ResourceFetcher {
240
240
  return undefined;
241
241
  return this.buildLegacyConfigurableForm(response);
242
242
  }
243
+ async fetchSimpleFormConfig(configName) {
244
+ const payload = { 'requestBody': { 'formConfig': { 'configName': configName } } };
245
+ const response = await DataFetcher.get().callServiceBroker('FormConfig.getFormConfig', JSON.stringify(payload));
246
+ return this.processConfig(response);
247
+ }
248
+ async saveSimpleFormConfig(configName, fieldList) {
249
+ const payload = this.buildSaveSimpleFormConfigPayload(configName, fieldList);
250
+ const response = await DataFetcher.get().callServiceBroker('FormConfig.saveFormConfig', JSON.stringify(payload));
251
+ this.processConfig(response);
252
+ }
253
+ processConfig(response) {
254
+ if (ObjectUtils.isEmpty(response))
255
+ return [];
256
+ const fields = this.getResponseAsArray(response);
257
+ return fields.map(field => field.name);
258
+ }
259
+ getResponseAsArray(response) {
260
+ var _a, _b, _c;
261
+ const rawFields = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.formConfig) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.field) !== null && _c !== void 0 ? _c : [];
262
+ return Array.isArray(rawFields) ? rawFields : [rawFields];
263
+ }
264
+ buildSaveSimpleFormConfigPayload(configName, fieldNameList) {
265
+ const fieldList = fieldNameList.map(fieldName => { return { name: fieldName }; });
266
+ return {
267
+ formConfig: {
268
+ configName,
269
+ layout: {
270
+ field: fieldList,
271
+ },
272
+ metadata: { field: [] },
273
+ }
274
+ };
275
+ }
276
+ async restoreFormConfig(configName) {
277
+ const payload = { 'requestBody': { 'formConfig': { 'configName': configName } } };
278
+ await DataFetcher.get().callServiceBroker('FormConfig.restoreFormConfig', JSON.stringify(payload));
279
+ }
243
280
  buildLegacyConfigurableForm(config) {
244
281
  var _a, _b, _c;
245
282
  const rawFields = (_c = (_b = (_a = config === null || config === void 0 ? void 0 : config.formConfig) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.field) !== null && _c !== void 0 ? _c : [];
@@ -2158,6 +2158,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2158
2158
  return import(
2159
2159
  /* webpackMode: "lazy" */
2160
2160
  './snk-filter-modal-item.entry.js').then(processMod, consoleError);
2161
+ case 'pesquisa-grid_2':
2162
+ return import(
2163
+ /* webpackMode: "lazy" */
2164
+ './pesquisa-grid_2.entry.js').then(processMod, consoleError);
2161
2165
  case 'snk-attach':
2162
2166
  return import(
2163
2167
  /* webpackMode: "lazy" */
@@ -2170,6 +2174,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2170
2174
  return import(
2171
2175
  /* webpackMode: "lazy" */
2172
2176
  './snk-personalized-filter.entry.js').then(processMod, consoleError);
2177
+ case 'snk-actions-button_5':
2178
+ return import(
2179
+ /* webpackMode: "lazy" */
2180
+ './snk-actions-button_5.entry.js').then(processMod, consoleError);
2173
2181
  case 'snk-filter-advanced-mode_2':
2174
2182
  return import(
2175
2183
  /* webpackMode: "lazy" */
@@ -2178,10 +2186,6 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2178
2186
  return import(
2179
2187
  /* webpackMode: "lazy" */
2180
2188
  './snk-filter-detail.entry.js').then(processMod, consoleError);
2181
- case 'snk-actions-button_4':
2182
- return import(
2183
- /* webpackMode: "lazy" */
2184
- './snk-actions-button_4.entry.js').then(processMod, consoleError);
2185
2189
  case 'snk-simple-bar':
2186
2190
  return import(
2187
2191
  /* webpackMode: "lazy" */