@sankhyalabs/sankhyablocks 8.16.0-dev.66 → 8.16.0-dev.68

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. package/dist/cjs/{ConfigStorage-9b965af9.js → ConfigStorage-d024aec8.js} +2 -2
  2. package/dist/cjs/{ContinuousInsertUtils-a6139f3d.js → ContinuousInsertUtils-54d44192.js} +4 -4
  3. package/dist/cjs/{DataFetcher-e059eb72.js → DataFetcher-65879b2c.js} +188 -56
  4. package/dist/cjs/{SnkFormConfigManager-51caf3d0.js → SnkFormConfigManager-ae3185b2.js} +2 -2
  5. package/dist/cjs/{auth-fetcher-a78242d1.js → auth-fetcher-8480751c.js} +1 -1
  6. package/dist/cjs/{dataunit-fetcher-0121621c.js → dataunit-fetcher-8ea97d88.js} +1 -1
  7. package/dist/cjs/{form-config-fetcher-91fba2b1.js → form-config-fetcher-90126e4c.js} +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/{pesquisa-fetcher-a85d6935.js → pesquisa-fetcher-f3454c23.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_5.cjs.entry.js +5 -5
  13. package/dist/cjs/snk-application.cjs.entry.js +18 -20
  14. package/dist/cjs/snk-attach.cjs.entry.js +5 -5
  15. package/dist/cjs/snk-config-options_3.cjs.entry.js +4 -4
  16. package/dist/cjs/snk-crud.cjs.entry.js +5 -5
  17. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
  18. package/dist/cjs/{snk-data-unit-c699179d.js → snk-data-unit-72ef8777.js} +1 -1
  19. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  20. package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
  21. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
  22. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  23. package/dist/cjs/snk-grid.cjs.entry.js +9 -6
  24. package/dist/cjs/{snk-guides-viewer-575596a2.js → snk-guides-viewer-ea5d0907.js} +5 -5
  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 +4 -4
  28. package/dist/cjs/snk-simple-crud.cjs.entry.js +7 -7
  29. package/dist/collection/components/snk-application/snk-application.js +12 -14
  30. package/dist/collection/components/snk-grid/snk-grid.js +15 -0
  31. package/dist/components/DataFetcher.js +188 -56
  32. package/dist/components/snk-application2.js +12 -14
  33. package/dist/components/snk-grid2.js +4 -0
  34. package/dist/esm/{ConfigStorage-ff99377a.js → ConfigStorage-373bb440.js} +2 -2
  35. package/dist/esm/{ContinuousInsertUtils-15b5f1da.js → ContinuousInsertUtils-25e7bd9a.js} +4 -4
  36. package/dist/esm/{DataFetcher-5034df59.js → DataFetcher-5221b992.js} +188 -56
  37. package/dist/esm/{SnkFormConfigManager-a7770e24.js → SnkFormConfigManager-b65e6db0.js} +2 -2
  38. package/dist/esm/{auth-fetcher-0b78ca31.js → auth-fetcher-e32fe8a4.js} +1 -1
  39. package/dist/esm/{dataunit-fetcher-481e159d.js → dataunit-fetcher-8dd93d8b.js} +1 -1
  40. package/dist/esm/{form-config-fetcher-0c2620ef.js → form-config-fetcher-126e2471.js} +1 -1
  41. package/dist/esm/loader.js +1 -1
  42. package/dist/esm/{pesquisa-fetcher-c437c9b1.js → pesquisa-fetcher-0af41f09.js} +1 -1
  43. package/dist/esm/pesquisa-grid_2.entry.js +4 -4
  44. package/dist/esm/sankhyablocks.js +1 -1
  45. package/dist/esm/snk-actions-button_5.entry.js +5 -5
  46. package/dist/esm/snk-application.entry.js +18 -20
  47. package/dist/esm/snk-attach.entry.js +5 -5
  48. package/dist/esm/snk-config-options_3.entry.js +4 -4
  49. package/dist/esm/snk-crud.entry.js +5 -5
  50. package/dist/esm/snk-data-exporter.entry.js +5 -5
  51. package/dist/esm/{snk-data-unit-d4ba54d7.js → snk-data-unit-11a49fc3.js} +1 -1
  52. package/dist/esm/snk-data-unit.entry.js +3 -3
  53. package/dist/esm/snk-detail-view.entry.js +7 -7
  54. package/dist/esm/snk-filter-bar_4.entry.js +3 -3
  55. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  56. package/dist/esm/snk-grid.entry.js +9 -6
  57. package/dist/esm/{snk-guides-viewer-3043422d.js → snk-guides-viewer-830f5fb9.js} +5 -5
  58. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  59. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  60. package/dist/esm/snk-pesquisa.entry.js +4 -4
  61. package/dist/esm/snk-simple-crud.entry.js +7 -7
  62. package/dist/sankhyablocks/{p-fcc662c6.js → p-05b6ff91.js} +1 -1
  63. package/dist/sankhyablocks/{p-7d09f66c.entry.js → p-09067bee.entry.js} +1 -1
  64. package/dist/sankhyablocks/{p-acca8a69.js → p-1435701f.js} +1 -1
  65. package/dist/sankhyablocks/{p-70cb4e36.entry.js → p-16cc8640.entry.js} +2 -2
  66. package/dist/sankhyablocks/{p-229c3615.js → p-171b7623.js} +1 -1
  67. package/dist/sankhyablocks/{p-763edad2.js → p-19dc71e9.js} +1 -1
  68. package/dist/sankhyablocks/{p-e2bd42c0.entry.js → p-1a91d1f3.entry.js} +1 -1
  69. package/dist/sankhyablocks/{p-e9432f45.entry.js → p-1cf39cfd.entry.js} +1 -1
  70. package/dist/sankhyablocks/{p-b299dc14.entry.js → p-254c59d2.entry.js} +1 -1
  71. package/dist/sankhyablocks/{p-08242e3f.entry.js → p-469384a2.entry.js} +1 -1
  72. package/dist/sankhyablocks/p-54f5354a.entry.js +1 -0
  73. package/dist/sankhyablocks/{p-0f3b2a32.js → p-60e4db34.js} +1 -1
  74. package/dist/sankhyablocks/p-68134a67.entry.js +1 -0
  75. package/dist/sankhyablocks/{p-4be4cdac.js → p-798386c7.js} +1 -1
  76. package/dist/sankhyablocks/{p-35882caf.entry.js → p-82ee6dc3.entry.js} +1 -1
  77. package/dist/sankhyablocks/{p-36598f95.js → p-8a1ee5b5.js} +1 -1
  78. package/dist/sankhyablocks/{p-c9bd54e6.entry.js → p-8bd86610.entry.js} +1 -1
  79. package/dist/sankhyablocks/{p-e8512d4b.entry.js → p-b50a0753.entry.js} +1 -1
  80. package/dist/sankhyablocks/{p-badbd2ca.entry.js → p-c475ac24.entry.js} +1 -1
  81. package/dist/sankhyablocks/p-d62228fb.js +1 -0
  82. package/dist/sankhyablocks/{p-3e6990a6.entry.js → p-d92d4f91.entry.js} +1 -1
  83. package/dist/sankhyablocks/{p-58fd3017.js → p-ddefbbc7.js} +1 -1
  84. package/dist/sankhyablocks/{p-22d04eac.entry.js → p-e5430b29.entry.js} +1 -1
  85. package/dist/sankhyablocks/p-f0b9303b.js +1 -0
  86. package/dist/sankhyablocks/{p-4895f6e4.entry.js → p-f258690a.entry.js} +1 -1
  87. package/dist/sankhyablocks/{p-036b4807.entry.js → p-f975370f.entry.js} +1 -1
  88. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  89. package/dist/types/components/snk-grid/snk-grid.d.ts +1 -0
  90. package/dist/types/components.d.ts +1 -0
  91. package/package.json +1 -1
  92. package/dist/sankhyablocks/p-00278e07.js +0 -1
  93. package/dist/sankhyablocks/p-82274cb0.js +0 -1
  94. package/dist/sankhyablocks/p-a33e803a.entry.js +0 -1
  95. package/dist/sankhyablocks/p-f71d043b.entry.js +0 -1
@@ -1063,7 +1063,7 @@ export class SnkApplication {
1063
1063
  try {
1064
1064
  await this.checkTimeoutLimitLockManager();
1065
1065
  await LockManager.whenHasLock(this._element, LockManagerOperation.APP_LOADING);
1066
- await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 1200);
1066
+ await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 200);
1067
1067
  await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1068
1068
  this._applicationReady = true;
1069
1069
  }
@@ -1103,19 +1103,17 @@ export class SnkApplication {
1103
1103
  }
1104
1104
  // TODO: Etapa 2 - implementar template de loading
1105
1105
  renderLoadingSkeleton(template) {
1106
- if (this.enableLockManagerLoadingApp) {
1107
- if (!this._isBrowserTypeElectron) {
1108
- switch (template) {
1109
- case TEMPLATES_LOADING_SKELETON.APPLICATION:
1110
- case TEMPLATES_LOADING_SKELETON.GRID:
1111
- return this.getSkeletonTemplateApplication();
1112
- default:
1113
- return this.getSkeletonTemplateApplication();
1114
- }
1115
- }
1116
- else {
1117
- return this.getSpinnerLoadingDefault();
1118
- }
1106
+ if (!this.enableLockManagerLoadingApp)
1107
+ return;
1108
+ if (this._isBrowserTypeElectron) {
1109
+ return this.getSpinnerLoadingDefault();
1110
+ }
1111
+ switch (template) {
1112
+ case TEMPLATES_LOADING_SKELETON.APPLICATION:
1113
+ case TEMPLATES_LOADING_SKELETON.GRID:
1114
+ return this.getSkeletonTemplateApplication();
1115
+ default:
1116
+ return this.getSkeletonTemplateApplication();
1119
1117
  }
1120
1118
  }
1121
1119
  getLoadingVisibilityStyle() {
@@ -77,6 +77,9 @@ export class SnkGrid {
77
77
  this.enableGridInsert = false;
78
78
  this.outlineMode = false;
79
79
  }
80
+ reloadConfig() {
81
+ this.loadConfig();
82
+ }
80
83
  /**
81
84
  * Exibe a janela de configurações da grade.
82
85
  */
@@ -1030,6 +1033,18 @@ export class SnkGrid {
1030
1033
  }
1031
1034
  static get methods() {
1032
1035
  return {
1036
+ "reloadConfig": {
1037
+ "complexType": {
1038
+ "signature": "() => Promise<void>",
1039
+ "parameters": [],
1040
+ "references": {},
1041
+ "return": "Promise<void>"
1042
+ },
1043
+ "docs": {
1044
+ "text": "",
1045
+ "tags": []
1046
+ }
1047
+ },
1033
1048
  "showConfig": {
1034
1049
  "complexType": {
1035
1050
  "signature": "() => Promise<void>",
@@ -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'
@@ -1420,7 +1420,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1420
1420
  try {
1421
1421
  await this.checkTimeoutLimitLockManager();
1422
1422
  await LockManager.whenHasLock(this._element, LockManagerOperation.APP_LOADING);
1423
- await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 1200);
1423
+ await LockManager.whenResolve(this._element, LockManagerOperation.APP_LOADING, 200);
1424
1424
  await LockManager.resetLocks(this._element, LockManagerOperation.APP_LOADING);
1425
1425
  this._applicationReady = true;
1426
1426
  }
@@ -1460,19 +1460,17 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1460
1460
  }
1461
1461
  // TODO: Etapa 2 - implementar template de loading
1462
1462
  renderLoadingSkeleton(template) {
1463
- if (this.enableLockManagerLoadingApp) {
1464
- if (!this._isBrowserTypeElectron) {
1465
- switch (template) {
1466
- case TEMPLATES_LOADING_SKELETON.APPLICATION:
1467
- case TEMPLATES_LOADING_SKELETON.GRID:
1468
- return this.getSkeletonTemplateApplication();
1469
- default:
1470
- return this.getSkeletonTemplateApplication();
1471
- }
1472
- }
1473
- else {
1474
- return this.getSpinnerLoadingDefault();
1475
- }
1463
+ if (!this.enableLockManagerLoadingApp)
1464
+ return;
1465
+ if (this._isBrowserTypeElectron) {
1466
+ return this.getSpinnerLoadingDefault();
1467
+ }
1468
+ switch (template) {
1469
+ case TEMPLATES_LOADING_SKELETON.APPLICATION:
1470
+ case TEMPLATES_LOADING_SKELETON.GRID:
1471
+ return this.getSkeletonTemplateApplication();
1472
+ default:
1473
+ return this.getSkeletonTemplateApplication();
1476
1474
  }
1477
1475
  }
1478
1476
  getLoadingVisibilityStyle() {
@@ -156,6 +156,9 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
156
156
  this.enableGridInsert = false;
157
157
  this.outlineMode = false;
158
158
  }
159
+ reloadConfig() {
160
+ this.loadConfig();
161
+ }
159
162
  /**
160
163
  * Exibe a janela de configurações da grade.
161
164
  */
@@ -584,6 +587,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
584
587
  "_popUpGridConfig": [32],
585
588
  "_showSnkFilterBar": [32],
586
589
  "_enableContinuousInsert": [32],
590
+ "reloadConfig": [64],
587
591
  "showConfig": [64],
588
592
  "hideConfig": [64],
589
593
  "setConfig": [64],
@@ -1,7 +1,7 @@
1
- import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-0c2620ef.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-c437c9b1.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-481e159d.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-0c2620ef.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