@sankhyalabs/sankhyablocks 8.15.10 → 8.15.12

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 (89) hide show
  1. package/dist/cjs/{ConfigStorage-0a690675.js → ConfigStorage-317b99ee.js} +2 -2
  2. package/dist/cjs/{DataFetcher-77729a93.js → DataFetcher-b7b5d5cf.js} +188 -56
  3. package/dist/cjs/{SnkFormConfigManager-d6d5db6d.js → SnkFormConfigManager-073e1d5a.js} +2 -2
  4. package/dist/cjs/{SnkMultiSelectionListDataSource-f79d220c.js → SnkMultiSelectionListDataSource-9893d9ab.js} +3 -3
  5. package/dist/cjs/{auth-fetcher-29bb791c.js → auth-fetcher-4984b91c.js} +1 -1
  6. package/dist/cjs/{form-config-fetcher-feb08214.js → form-config-fetcher-a5750a79.js} +1 -1
  7. package/dist/cjs/{pesquisa-fetcher-cba1b3d0.js → pesquisa-fetcher-f238747e.js} +1 -1
  8. package/dist/cjs/snk-actions-button_4.cjs.entry.js +4 -4
  9. package/dist/cjs/snk-application.cjs.entry.js +5 -5
  10. package/dist/cjs/snk-attach.cjs.entry.js +4 -4
  11. package/dist/cjs/snk-crud.cjs.entry.js +4 -4
  12. package/dist/cjs/snk-data-exporter.cjs.entry.js +29 -3
  13. package/dist/cjs/{snk-data-unit-735a1ee5.js → snk-data-unit-e07390ed.js} +7 -6
  14. package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
  15. package/dist/cjs/snk-detail-view.cjs.entry.js +6 -6
  16. package/dist/cjs/snk-filter-bar.cjs.entry.js +3 -3
  17. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  18. package/dist/cjs/snk-form-config.cjs.entry.js +2 -2
  19. package/dist/cjs/snk-form.cjs.entry.js +4 -4
  20. package/dist/cjs/snk-grid.cjs.entry.js +7 -7
  21. package/dist/cjs/{snk-guides-viewer-bfcad2d6.js → snk-guides-viewer-182f4ebf.js} +4 -4
  22. package/dist/cjs/snk-guides-viewer.cjs.entry.js +6 -6
  23. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  24. package/dist/cjs/snk-simple-crud.cjs.entry.js +6 -6
  25. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +14 -1
  26. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +13 -0
  27. package/dist/collection/components/snk-data-unit/snk-data-unit.js +7 -6
  28. package/dist/collection/components/snk-grid/snk-grid.js +2 -2
  29. package/dist/components/DataFetcher.js +188 -56
  30. package/dist/components/snk-data-exporter2.js +27 -1
  31. package/dist/components/snk-data-unit2.js +7 -6
  32. package/dist/components/snk-grid2.js +2 -2
  33. package/dist/esm/{ConfigStorage-8c2ddac8.js → ConfigStorage-3f44568f.js} +2 -2
  34. package/dist/esm/{DataFetcher-773a3e4b.js → DataFetcher-69e38b94.js} +188 -56
  35. package/dist/esm/{SnkFormConfigManager-c01b9d9d.js → SnkFormConfigManager-b8e8be9c.js} +2 -2
  36. package/dist/esm/{SnkMultiSelectionListDataSource-a4805051.js → SnkMultiSelectionListDataSource-7f925c1b.js} +3 -3
  37. package/dist/esm/{auth-fetcher-a411f73c.js → auth-fetcher-1372e2d1.js} +1 -1
  38. package/dist/esm/{form-config-fetcher-e0382e5a.js → form-config-fetcher-f221fbdd.js} +1 -1
  39. package/dist/esm/{pesquisa-fetcher-34a8b8be.js → pesquisa-fetcher-6d045e06.js} +1 -1
  40. package/dist/esm/snk-actions-button_4.entry.js +4 -4
  41. package/dist/esm/snk-application.entry.js +5 -5
  42. package/dist/esm/snk-attach.entry.js +4 -4
  43. package/dist/esm/snk-crud.entry.js +4 -4
  44. package/dist/esm/snk-data-exporter.entry.js +29 -3
  45. package/dist/esm/{snk-data-unit-e85c0088.js → snk-data-unit-a91c34aa.js} +7 -6
  46. package/dist/esm/snk-data-unit.entry.js +1 -1
  47. package/dist/esm/snk-detail-view.entry.js +6 -6
  48. package/dist/esm/snk-filter-bar.entry.js +3 -3
  49. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  50. package/dist/esm/snk-form-config.entry.js +2 -2
  51. package/dist/esm/snk-form.entry.js +4 -4
  52. package/dist/esm/snk-grid.entry.js +7 -7
  53. package/dist/esm/{snk-guides-viewer-edeac29f.js → snk-guides-viewer-5723ccec.js} +4 -4
  54. package/dist/esm/snk-guides-viewer.entry.js +6 -6
  55. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  56. package/dist/esm/snk-simple-crud.entry.js +6 -6
  57. package/dist/sankhyablocks/p-05230083.entry.js +1 -0
  58. package/dist/sankhyablocks/{p-2f3b59b4.entry.js → p-13173088.entry.js} +1 -1
  59. package/dist/sankhyablocks/{p-41c2c191.entry.js → p-19e779bb.entry.js} +1 -1
  60. package/dist/sankhyablocks/{p-181975f1.js → p-1c73621e.js} +1 -1
  61. package/dist/sankhyablocks/{p-9fc8dc5c.entry.js → p-20dde3d5.entry.js} +1 -1
  62. package/dist/sankhyablocks/{p-5630574e.js → p-21f4ad7d.js} +1 -1
  63. package/dist/sankhyablocks/{p-f93c9444.entry.js → p-38d69666.entry.js} +1 -1
  64. package/dist/sankhyablocks/p-43cf9fa1.js +1 -0
  65. package/dist/sankhyablocks/{p-c5a9a5d9.entry.js → p-45c04048.entry.js} +1 -1
  66. package/dist/sankhyablocks/{p-c2ae0fab.entry.js → p-4ad2b2f6.entry.js} +1 -1
  67. package/dist/sankhyablocks/p-4be0502e.entry.js +1 -0
  68. package/dist/sankhyablocks/{p-863351fd.entry.js → p-5577c6c8.entry.js} +1 -1
  69. package/dist/sankhyablocks/{p-37e5d563.js → p-57b4c3b7.js} +1 -1
  70. package/dist/sankhyablocks/{p-4a832d16.entry.js → p-601db900.entry.js} +1 -1
  71. package/dist/sankhyablocks/{p-c5aa7d70.entry.js → p-619e1af7.entry.js} +2 -2
  72. package/dist/sankhyablocks/{p-96621231.js → p-62ceca72.js} +1 -1
  73. package/dist/sankhyablocks/{p-a97226f6.entry.js → p-76b77086.entry.js} +1 -1
  74. package/dist/sankhyablocks/p-884385be.js +1 -0
  75. package/dist/sankhyablocks/{p-46e55a95.entry.js → p-9100a669.entry.js} +1 -1
  76. package/dist/sankhyablocks/{p-80c64add.entry.js → p-97af2a3a.entry.js} +1 -1
  77. package/dist/sankhyablocks/{p-f0145e3b.js → p-a6a01b15.js} +1 -1
  78. package/dist/sankhyablocks/{p-f03e4199.entry.js → p-aff42158.entry.js} +1 -1
  79. package/dist/sankhyablocks/{p-86af4cc2.js → p-b7dc87c3.js} +1 -1
  80. package/dist/sankhyablocks/p-f2dc8ba0.js +1 -0
  81. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  82. package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +2 -0
  83. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +2 -0
  84. package/package.json +1 -1
  85. package/dist/sankhyablocks/p-0cd3c0a9.js +0 -1
  86. package/dist/sankhyablocks/p-3961b3ee.entry.js +0 -1
  87. package/dist/sankhyablocks/p-594bc21d.js +0 -1
  88. package/dist/sankhyablocks/p-e98bc5e9.entry.js +0 -1
  89. package/dist/sankhyablocks/p-edb806ca.js +0 -1
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const formConfigFetcher = require('./form-config-fetcher-feb08214.js');
3
+ const formConfigFetcher = require('./form-config-fetcher-a5750a79.js');
4
4
  const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
5
5
  const core = require('@sankhyalabs/core');
6
- const DataFetcher = require('./DataFetcher-77729a93.js');
6
+ const DataFetcher = require('./DataFetcher-b7b5d5cf.js');
7
7
 
8
8
  class GridConfigFetcher extends formConfigFetcher.ResourceFetcher {
9
9
  constructor() {
@@ -21,25 +21,40 @@ function commonjsRequire () {
21
21
  }
22
22
 
23
23
  var browserPonyfill = createCommonjsModule(function (module, exports) {
24
- var global = typeof self !== 'undefined' ? self : commonjsGlobal;
25
- var __self__ = (function () {
24
+ // Save global object in a variable
25
+ var __global__ =
26
+ (typeof globalThis !== 'undefined' && globalThis) ||
27
+ (typeof self !== 'undefined' && self) ||
28
+ (typeof commonjsGlobal !== 'undefined' && commonjsGlobal);
29
+ // Create an object that extends from __global__ without the fetch function
30
+ var __globalThis__ = (function () {
26
31
  function F() {
27
32
  this.fetch = false;
28
- this.DOMException = global.DOMException;
33
+ this.DOMException = __global__.DOMException;
29
34
  }
30
- F.prototype = global;
35
+ F.prototype = __global__; // Needed for feature detection on whatwg-fetch's code
31
36
  return new F();
32
37
  })();
33
- (function(self) {
38
+ // Wraps whatwg-fetch with a function scope to hijack the global object
39
+ // "globalThis" that's going to be patched
40
+ (function(globalThis) {
34
41
 
35
42
  ((function (exports) {
36
43
 
44
+ /* eslint-disable no-prototype-builtins */
45
+ var g =
46
+ (typeof globalThis !== 'undefined' && globalThis) ||
47
+ (typeof self !== 'undefined' && self) ||
48
+ // eslint-disable-next-line no-undef
49
+ (typeof commonjsGlobal !== 'undefined' && commonjsGlobal) ||
50
+ {};
51
+
37
52
  var support = {
38
- searchParams: 'URLSearchParams' in self,
39
- iterable: 'Symbol' in self && 'iterator' in Symbol,
53
+ searchParams: 'URLSearchParams' in g,
54
+ iterable: 'Symbol' in g && 'iterator' in Symbol,
40
55
  blob:
41
- 'FileReader' in self &&
42
- 'Blob' in self &&
56
+ 'FileReader' in g &&
57
+ 'Blob' in g &&
43
58
  (function() {
44
59
  try {
45
60
  new Blob();
@@ -48,8 +63,8 @@ return new F();
48
63
  return false
49
64
  }
50
65
  })(),
51
- formData: 'FormData' in self,
52
- arrayBuffer: 'ArrayBuffer' in self
66
+ formData: 'FormData' in g,
67
+ arrayBuffer: 'ArrayBuffer' in g
53
68
  };
54
69
 
55
70
  function isDataView(obj) {
@@ -80,8 +95,8 @@ return new F();
80
95
  if (typeof name !== 'string') {
81
96
  name = String(name);
82
97
  }
83
- if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
84
- throw new TypeError('Invalid character in header field name')
98
+ if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {
99
+ throw new TypeError('Invalid character in header field name: "' + name + '"')
85
100
  }
86
101
  return name.toLowerCase()
87
102
  }
@@ -120,6 +135,9 @@ return new F();
120
135
  }, this);
121
136
  } else if (Array.isArray(headers)) {
122
137
  headers.forEach(function(header) {
138
+ if (header.length != 2) {
139
+ throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)
140
+ }
123
141
  this.append(header[0], header[1]);
124
142
  }, this);
125
143
  } else if (headers) {
@@ -190,6 +208,7 @@ return new F();
190
208
  }
191
209
 
192
210
  function consumed(body) {
211
+ if (body._noBody) return
193
212
  if (body.bodyUsed) {
194
213
  return Promise.reject(new TypeError('Already read'))
195
214
  }
@@ -217,7 +236,9 @@ return new F();
217
236
  function readBlobAsText(blob) {
218
237
  var reader = new FileReader();
219
238
  var promise = fileReaderReady(reader);
220
- reader.readAsText(blob);
239
+ var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type);
240
+ var encoding = match ? match[1] : 'utf-8';
241
+ reader.readAsText(blob, encoding);
221
242
  return promise
222
243
  }
223
244
 
@@ -245,8 +266,21 @@ return new F();
245
266
  this.bodyUsed = false;
246
267
 
247
268
  this._initBody = function(body) {
269
+ /*
270
+ fetch-mock wraps the Response object in an ES6 Proxy to
271
+ provide useful test harness features such as flush. However, on
272
+ ES5 browsers without fetch or Proxy support pollyfills must be used;
273
+ the proxy-pollyfill is unable to proxy an attribute unless it exists
274
+ on the object before the Proxy is created. This change ensures
275
+ Response.bodyUsed exists on the instance, while maintaining the
276
+ semantic of setting Request.bodyUsed in the constructor before
277
+ _initBody is called.
278
+ */
279
+ // eslint-disable-next-line no-self-assign
280
+ this.bodyUsed = this.bodyUsed;
248
281
  this._bodyInit = body;
249
282
  if (!body) {
283
+ this._noBody = true;
250
284
  this._bodyText = '';
251
285
  } else if (typeof body === 'string') {
252
286
  this._bodyText = body;
@@ -294,15 +328,29 @@ return new F();
294
328
  return Promise.resolve(new Blob([this._bodyText]))
295
329
  }
296
330
  };
331
+ }
297
332
 
298
- this.arrayBuffer = function() {
299
- if (this._bodyArrayBuffer) {
300
- return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
333
+ this.arrayBuffer = function() {
334
+ if (this._bodyArrayBuffer) {
335
+ var isConsumed = consumed(this);
336
+ if (isConsumed) {
337
+ return isConsumed
338
+ } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
339
+ return Promise.resolve(
340
+ this._bodyArrayBuffer.buffer.slice(
341
+ this._bodyArrayBuffer.byteOffset,
342
+ this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
343
+ )
344
+ )
301
345
  } else {
302
- return this.blob().then(readBlobAsArrayBuffer)
346
+ return Promise.resolve(this._bodyArrayBuffer)
303
347
  }
304
- };
305
- }
348
+ } else if (support.blob) {
349
+ return this.blob().then(readBlobAsArrayBuffer)
350
+ } else {
351
+ throw new Error('could not read as ArrayBuffer')
352
+ }
353
+ };
306
354
 
307
355
  this.text = function() {
308
356
  var rejected = consumed(this);
@@ -335,7 +383,7 @@ return new F();
335
383
  }
336
384
 
337
385
  // HTTP methods whose capitalization should be normalized
338
- var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
386
+ var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'];
339
387
 
340
388
  function normalizeMethod(method) {
341
389
  var upcased = method.toUpperCase();
@@ -343,6 +391,10 @@ return new F();
343
391
  }
344
392
 
345
393
  function Request(input, options) {
394
+ if (!(this instanceof Request)) {
395
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
396
+ }
397
+
346
398
  options = options || {};
347
399
  var body = options.body;
348
400
 
@@ -372,13 +424,33 @@ return new F();
372
424
  }
373
425
  this.method = normalizeMethod(options.method || this.method || 'GET');
374
426
  this.mode = options.mode || this.mode || null;
375
- this.signal = options.signal || this.signal;
427
+ this.signal = options.signal || this.signal || (function () {
428
+ if ('AbortController' in g) {
429
+ var ctrl = new AbortController();
430
+ return ctrl.signal;
431
+ }
432
+ }());
376
433
  this.referrer = null;
377
434
 
378
435
  if ((this.method === 'GET' || this.method === 'HEAD') && body) {
379
436
  throw new TypeError('Body not allowed for GET or HEAD requests')
380
437
  }
381
438
  this._initBody(body);
439
+
440
+ if (this.method === 'GET' || this.method === 'HEAD') {
441
+ if (options.cache === 'no-store' || options.cache === 'no-cache') {
442
+ // Search for a '_' parameter in the query string
443
+ var reParamSearch = /([?&])_=[^&]*/;
444
+ if (reParamSearch.test(this.url)) {
445
+ // If it already exists then set the value with the current time
446
+ this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());
447
+ } else {
448
+ // Otherwise add a new '_' parameter to the end with the current time
449
+ var reQueryString = /\?/;
450
+ this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();
451
+ }
452
+ }
453
+ }
382
454
  }
383
455
 
384
456
  Request.prototype.clone = function() {
@@ -406,28 +478,46 @@ return new F();
406
478
  // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
407
479
  // https://tools.ietf.org/html/rfc7230#section-3.2
408
480
  var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
409
- preProcessedHeaders.split(/\r?\n/).forEach(function(line) {
410
- var parts = line.split(':');
411
- var key = parts.shift().trim();
412
- if (key) {
413
- var value = parts.join(':').trim();
414
- headers.append(key, value);
415
- }
416
- });
481
+ // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
482
+ // https://github.com/github/fetch/issues/748
483
+ // https://github.com/zloirock/core-js/issues/751
484
+ preProcessedHeaders
485
+ .split('\r')
486
+ .map(function(header) {
487
+ return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header
488
+ })
489
+ .forEach(function(line) {
490
+ var parts = line.split(':');
491
+ var key = parts.shift().trim();
492
+ if (key) {
493
+ var value = parts.join(':').trim();
494
+ try {
495
+ headers.append(key, value);
496
+ } catch (error) {
497
+ console.warn('Response ' + error.message);
498
+ }
499
+ }
500
+ });
417
501
  return headers
418
502
  }
419
503
 
420
504
  Body.call(Request.prototype);
421
505
 
422
506
  function Response(bodyInit, options) {
507
+ if (!(this instanceof Response)) {
508
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
509
+ }
423
510
  if (!options) {
424
511
  options = {};
425
512
  }
426
513
 
427
514
  this.type = 'default';
428
515
  this.status = options.status === undefined ? 200 : options.status;
516
+ if (this.status < 200 || this.status > 599) {
517
+ throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].")
518
+ }
429
519
  this.ok = this.status >= 200 && this.status < 300;
430
- this.statusText = 'statusText' in options ? options.statusText : 'OK';
520
+ this.statusText = options.statusText === undefined ? '' : '' + options.statusText;
431
521
  this.headers = new Headers(options.headers);
432
522
  this.url = options.url || '';
433
523
  this._initBody(bodyInit);
@@ -445,7 +535,9 @@ return new F();
445
535
  };
446
536
 
447
537
  Response.error = function() {
448
- var response = new Response(null, {status: 0, statusText: ''});
538
+ var response = new Response(null, {status: 200, statusText: ''});
539
+ response.ok = false;
540
+ response.status = 0;
449
541
  response.type = 'error';
450
542
  return response
451
543
  };
@@ -460,7 +552,7 @@ return new F();
460
552
  return new Response(null, {status: status, headers: {location: url}})
461
553
  };
462
554
 
463
- exports.DOMException = self.DOMException;
555
+ exports.DOMException = g.DOMException;
464
556
  try {
465
557
  new exports.DOMException();
466
558
  } catch (err) {
@@ -490,28 +582,50 @@ return new F();
490
582
 
491
583
  xhr.onload = function() {
492
584
  var options = {
493
- status: xhr.status,
494
585
  statusText: xhr.statusText,
495
586
  headers: parseHeaders(xhr.getAllResponseHeaders() || '')
496
587
  };
588
+ // This check if specifically for when a user fetches a file locally from the file system
589
+ // Only if the status is out of a normal range
590
+ if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {
591
+ options.status = 200;
592
+ } else {
593
+ options.status = xhr.status;
594
+ }
497
595
  options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
498
596
  var body = 'response' in xhr ? xhr.response : xhr.responseText;
499
- resolve(new Response(body, options));
597
+ setTimeout(function() {
598
+ resolve(new Response(body, options));
599
+ }, 0);
500
600
  };
501
601
 
502
602
  xhr.onerror = function() {
503
- reject(new TypeError('Network request failed'));
603
+ setTimeout(function() {
604
+ reject(new TypeError('Network request failed'));
605
+ }, 0);
504
606
  };
505
607
 
506
608
  xhr.ontimeout = function() {
507
- reject(new TypeError('Network request failed'));
609
+ setTimeout(function() {
610
+ reject(new TypeError('Network request timed out'));
611
+ }, 0);
508
612
  };
509
613
 
510
614
  xhr.onabort = function() {
511
- reject(new exports.DOMException('Aborted', 'AbortError'));
615
+ setTimeout(function() {
616
+ reject(new exports.DOMException('Aborted', 'AbortError'));
617
+ }, 0);
512
618
  };
513
619
 
514
- xhr.open(request.method, request.url, true);
620
+ function fixUrl(url) {
621
+ try {
622
+ return url === '' && g.location.href ? g.location.href : url
623
+ } catch (e) {
624
+ return url
625
+ }
626
+ }
627
+
628
+ xhr.open(request.method, fixUrl(request.url), true);
515
629
 
516
630
  if (request.credentials === 'include') {
517
631
  xhr.withCredentials = true;
@@ -519,13 +633,32 @@ return new F();
519
633
  xhr.withCredentials = false;
520
634
  }
521
635
 
522
- if ('responseType' in xhr && support.blob) {
523
- xhr.responseType = 'blob';
636
+ if ('responseType' in xhr) {
637
+ if (support.blob) {
638
+ xhr.responseType = 'blob';
639
+ } else if (
640
+ support.arrayBuffer
641
+ ) {
642
+ xhr.responseType = 'arraybuffer';
643
+ }
524
644
  }
525
645
 
526
- request.headers.forEach(function(value, name) {
527
- xhr.setRequestHeader(name, value);
528
- });
646
+ if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
647
+ var names = [];
648
+ Object.getOwnPropertyNames(init.headers).forEach(function(name) {
649
+ names.push(normalizeName(name));
650
+ xhr.setRequestHeader(name, normalizeValue(init.headers[name]));
651
+ });
652
+ request.headers.forEach(function(value, name) {
653
+ if (names.indexOf(name) === -1) {
654
+ xhr.setRequestHeader(name, value);
655
+ }
656
+ });
657
+ } else {
658
+ request.headers.forEach(function(value, name) {
659
+ xhr.setRequestHeader(name, value);
660
+ });
661
+ }
529
662
 
530
663
  if (request.signal) {
531
664
  request.signal.addEventListener('abort', abortXhr);
@@ -544,11 +677,11 @@ return new F();
544
677
 
545
678
  fetch.polyfill = true;
546
679
 
547
- if (!self.fetch) {
548
- self.fetch = fetch;
549
- self.Headers = Headers;
550
- self.Request = Request;
551
- self.Response = Response;
680
+ if (!g.fetch) {
681
+ g.fetch = fetch;
682
+ g.Headers = Headers;
683
+ g.Request = Request;
684
+ g.Response = Response;
552
685
  }
553
686
 
554
687
  exports.Headers = Headers;
@@ -561,13 +694,12 @@ return new F();
561
694
  return exports;
562
695
 
563
696
  }))({});
564
- })(__self__);
565
- __self__.fetch.ponyfill = true;
566
- // Remove "polyfill" property added by whatwg-fetch
567
- delete __self__.fetch.polyfill;
568
- // Choose between native implementation (global) or custom implementation (__self__)
569
- // var ctx = global.fetch ? global : __self__;
570
- var ctx = __self__; // this line disable service worker support temporarily
697
+ })(__globalThis__);
698
+ // This is a ponyfill, so...
699
+ __globalThis__.fetch.ponyfill = true;
700
+ delete __globalThis__.fetch.polyfill;
701
+ // Choose between native implementation (__global__) or custom implementation (__globalThis__)
702
+ var ctx = __global__.fetch ? __global__ : __globalThis__;
571
703
  exports = ctx.fetch; // To enable: import fetch from 'cross-fetch'
572
704
  exports.default = ctx.fetch; // For TypeScript consumers without esModuleInterop.
573
705
  exports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch'
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const ConfigStorage = require('./ConfigStorage-0a690675.js');
3
+ const ConfigStorage = require('./ConfigStorage-317b99ee.js');
4
4
  const core = require('@sankhyalabs/core');
5
- const formConfigFetcher = require('./form-config-fetcher-feb08214.js');
5
+ const formConfigFetcher = require('./form-config-fetcher-a5750a79.js');
6
6
 
7
7
  class SnkFormConfigManager {
8
8
  constructor(configName, resourceID, onConfigChange) {
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- const DataFetcher = require('./DataFetcher-77729a93.js');
4
- const pesquisaFetcher = require('./pesquisa-fetcher-cba1b3d0.js');
3
+ const DataFetcher = require('./DataFetcher-b7b5d5cf.js');
4
+ const pesquisaFetcher = require('./pesquisa-fetcher-f238747e.js');
5
5
  const core = require('@sankhyalabs/core');
6
6
  require('./index-0922807b.js');
7
7
  require('./ISave-e91b70a7.js');
8
8
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
9
9
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
10
10
  require('./filter-item-type.enum-a7ffdaa6.js');
11
- require('./form-config-fetcher-feb08214.js');
11
+ require('./form-config-fetcher-a5750a79.js');
12
12
  const InMemoryFilterColumnDataSource = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
13
13
 
14
14
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const core = require('@sankhyalabs/core');
4
- const formConfigFetcher = require('./form-config-fetcher-feb08214.js');
4
+ const formConfigFetcher = require('./form-config-fetcher-a5750a79.js');
5
5
 
6
6
  class AuthFetcher extends formConfigFetcher.ResourceFetcher {
7
7
  getData(resourceID) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const DataFetcher = require('./DataFetcher-77729a93.js');
3
+ const DataFetcher = require('./DataFetcher-b7b5d5cf.js');
4
4
  const core = require('@sankhyalabs/core');
5
5
 
6
6
  class ResourceFetcher {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const core = require('@sankhyalabs/core');
4
- const DataFetcher = require('./DataFetcher-77729a93.js');
4
+ const DataFetcher = require('./DataFetcher-b7b5d5cf.js');
5
5
  const constants = require('@sankhyalabs/ezui/dist/collection/utils/constants');
6
6
  const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
@@ -4,20 +4,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const DataFetcher = require('./DataFetcher-77729a93.js');
7
+ const DataFetcher = require('./DataFetcher-b7b5d5cf.js');
8
8
  const ParamType = require('./ParamType-90b440a0.js');
9
- require('./pesquisa-fetcher-cba1b3d0.js');
9
+ require('./pesquisa-fetcher-f238747e.js');
10
10
  require('./index-0922807b.js');
11
11
  require('./ISave-e91b70a7.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
14
  require('./filter-item-type.enum-a7ffdaa6.js');
15
- require('./form-config-fetcher-feb08214.js');
15
+ require('./form-config-fetcher-a5750a79.js');
16
16
  const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
17
17
  const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
18
18
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
19
19
  const CheckMode = require('@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode');
20
- const ConfigStorage = require('./ConfigStorage-0a690675.js');
20
+ const ConfigStorage = require('./ConfigStorage-317b99ee.js');
21
21
  const constants = require('./constants-35ddd366.js');
22
22
  require('./PrintUtils-bcaeb82f.js');
23
23
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
@@ -5,12 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
- const ConfigStorage = require('./ConfigStorage-0a690675.js');
9
- const DataFetcher = require('./DataFetcher-77729a93.js');
10
- const authFetcher = require('./auth-fetcher-29bb791c.js');
11
- const pesquisaFetcher = require('./pesquisa-fetcher-cba1b3d0.js');
8
+ const ConfigStorage = require('./ConfigStorage-317b99ee.js');
9
+ const DataFetcher = require('./DataFetcher-b7b5d5cf.js');
10
+ const authFetcher = require('./auth-fetcher-4984b91c.js');
11
+ const pesquisaFetcher = require('./pesquisa-fetcher-f238747e.js');
12
12
  const SnkMessageBuilder = require('./SnkMessageBuilder-96b0f549.js');
13
- require('./form-config-fetcher-feb08214.js');
13
+ require('./form-config-fetcher-a5750a79.js');
14
14
  require('./filter-item-type.enum-a7ffdaa6.js');
15
15
  require('./PrintUtils-bcaeb82f.js');
16
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
@@ -4,14 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const DataFetcher = require('./DataFetcher-77729a93.js');
8
- const pesquisaFetcher = require('./pesquisa-fetcher-cba1b3d0.js');
7
+ const DataFetcher = require('./DataFetcher-b7b5d5cf.js');
8
+ const pesquisaFetcher = require('./pesquisa-fetcher-f238747e.js');
9
9
  require('./index-0922807b.js');
10
10
  const ISave = require('./ISave-e91b70a7.js');
11
11
  require('./filter-item-type.enum-a7ffdaa6.js');
12
- require('./form-config-fetcher-feb08214.js');
12
+ require('./form-config-fetcher-a5750a79.js');
13
13
  const constants = require('./constants-35ddd366.js');
14
- const authFetcher = require('./auth-fetcher-29bb791c.js');
14
+ const authFetcher = require('./auth-fetcher-4984b91c.js');
15
15
  const taskbarElements = require('./taskbar-elements-3ecd1278.js');
16
16
  require('./PrintUtils-bcaeb82f.js');
17
17
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
@@ -5,16 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const taskbarElements = require('./taskbar-elements-3ecd1278.js');
8
- require('./DataFetcher-77729a93.js');
9
- require('./pesquisa-fetcher-cba1b3d0.js');
8
+ require('./DataFetcher-b7b5d5cf.js');
9
+ require('./pesquisa-fetcher-f238747e.js');
10
10
  const index$1 = require('./index-0922807b.js');
11
11
  require('./ISave-e91b70a7.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
14
  require('./filter-item-type.enum-a7ffdaa6.js');
15
- require('./form-config-fetcher-feb08214.js');
15
+ require('./form-config-fetcher-a5750a79.js');
16
16
  const constants = require('./constants-35ddd366.js');
17
- const authFetcher = require('./auth-fetcher-29bb791c.js');
17
+ const authFetcher = require('./auth-fetcher-4984b91c.js');
18
18
  require('./index-102ba62d.js');
19
19
  require('./PrintUtils-bcaeb82f.js');
20
20
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
@@ -7,8 +7,8 @@ const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const index = require('./index-0922807b.js');
9
9
  const constants = require('./constants-35ddd366.js');
10
- const DataFetcher = require('./DataFetcher-77729a93.js');
11
- const snkDataUnit = require('./snk-data-unit-735a1ee5.js');
10
+ const DataFetcher = require('./DataFetcher-b7b5d5cf.js');
11
+ const snkDataUnit = require('./snk-data-unit-e07390ed.js');
12
12
  require('./PrintUtils-bcaeb82f.js');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
14
  require('./SnkMessageBuilder-96b0f549.js');
@@ -214,6 +214,20 @@ function getFormatResponse(result) {
214
214
  return core.ObjectUtils.stringToObject(response);
215
215
  }
216
216
 
217
+ const DOC_MAX_WIDTH = 760;
218
+ function getVisibleColumns(columns) {
219
+ const visibleColumns = [];
220
+ let totalWidth = 0;
221
+ for (const column of columns) {
222
+ totalWidth += column.width;
223
+ if (totalWidth >= DOC_MAX_WIDTH) {
224
+ break;
225
+ }
226
+ visibleColumns.push(column);
227
+ }
228
+ return visibleColumns;
229
+ }
230
+
217
231
  const snkDataExporterCss = ".sc-snk-data-exporter-h{display:flex;width:fit-content;height:fit-content}.snk-data-exporter.sc-snk-data-exporter{display:flex;width:fit-content;height:fit-content}.snk-data-exporter__dropdown.sc-snk-data-exporter{display:none}.snk-data-exporter__dropdown--show.sc-snk-data-exporter{display:flex;flex-direction:column;position:fixed}.snk-data-exporter__dropdown.sc-snk-data-exporter>ez-dropdown.sc-snk-data-exporter{position:relative}";
218
232
 
219
233
  const LIMIT_PER_EXPORT = 5000;
@@ -299,12 +313,24 @@ const SnkDataExporter = class {
299
313
  controlDropdown() {
300
314
  this._showDropdown = !this._showDropdown;
301
315
  }
316
+ async getParsedColumns() {
317
+ const columns = await this.provider.getColumnsMetadata();
318
+ const visibleColumns = getVisibleColumns(columns);
319
+ return visibleColumns;
320
+ }
321
+ async getColumns(resolveProps) {
322
+ var _a;
323
+ if ((_a = this.getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) === null || _a === void 0 ? void 0 : _a.includes("PDF")) {
324
+ return await this.getParsedColumns();
325
+ }
326
+ return await this.provider.getColumnsMetadata();
327
+ }
302
328
  async resolveExporter(resolveProps, callbackResolver) {
303
329
  if (this.provider == undefined || resolveProps == undefined || callbackResolver == undefined) {
304
330
  return;
305
331
  }
306
332
  const filters = this.provider.getFilters();
307
- const columns = await this.provider.getColumnsMetadata();
333
+ const columns = await this.getColumns(resolveProps);
308
334
  const sort = this.provider.getOrders();
309
335
  const resourceURI = this.provider.getResourceURI();
310
336
  const selectedIDs = this.provider.getSelectedIDs();