ngwr 4.2.3 → 5.0.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 (140) hide show
  1. package/fesm2022/ngwr-alert.mjs +8 -8
  2. package/fesm2022/ngwr-alert.mjs.map +1 -1
  3. package/fesm2022/ngwr-avatar.mjs +8 -8
  4. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  5. package/fesm2022/ngwr-button.mjs +11 -11
  6. package/fesm2022/ngwr-button.mjs.map +1 -1
  7. package/fesm2022/ngwr-cdk.mjs +3 -3
  8. package/fesm2022/ngwr-checkbox.mjs +8 -8
  9. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  10. package/fesm2022/ngwr-dialog.mjs +26 -26
  11. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  12. package/fesm2022/ngwr-divider.mjs +7 -7
  13. package/fesm2022/ngwr-divider.mjs.map +1 -1
  14. package/fesm2022/ngwr-form.mjs +10 -10
  15. package/fesm2022/ngwr-icon.mjs +13 -13
  16. package/fesm2022/ngwr-input.mjs +8 -8
  17. package/fesm2022/ngwr-input.mjs.map +1 -1
  18. package/fesm2022/ngwr-pipes.mjs +7 -7
  19. package/fesm2022/ngwr-progress.mjs +7 -7
  20. package/fesm2022/ngwr-progress.mjs.map +1 -1
  21. package/fesm2022/ngwr-qr.mjs +32 -30
  22. package/fesm2022/ngwr-qr.mjs.map +1 -1
  23. package/fesm2022/ngwr-skeleton.mjs +7 -7
  24. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  25. package/fesm2022/ngwr-spinner.mjs +7 -7
  26. package/fesm2022/ngwr-tag.mjs +8 -8
  27. package/fesm2022/ngwr-tag.mjs.map +1 -1
  28. package/fesm2022/ngwr-textarea.mjs +185 -0
  29. package/fesm2022/ngwr-textarea.mjs.map +1 -0
  30. package/icon/icons.d.ts +109 -109
  31. package/package.json +16 -49
  32. package/qr/generator.d.ts +1 -3
  33. package/qr/qr.component.d.ts +1 -1
  34. package/qr/qrcodegen.d.ts +8 -8
  35. package/styles/grid.scss +4 -3
  36. package/styles.scss +1 -0
  37. package/textarea/index.d.ts +7 -0
  38. package/textarea/public-api.d.ts +8 -0
  39. package/textarea/styles/_index.scss +77 -0
  40. package/textarea/styles/vars.scss +17 -0
  41. package/textarea/textarea.component.d.ts +44 -0
  42. package/textarea/textarea.module.d.ts +7 -0
  43. package/esm2022/alert/alert-type.mjs +0 -8
  44. package/esm2022/alert/alert.component.mjs +0 -54
  45. package/esm2022/alert/alert.module.mjs +0 -22
  46. package/esm2022/alert/ngwr-alert.mjs +0 -5
  47. package/esm2022/alert/public-api.mjs +0 -10
  48. package/esm2022/avatar/avatar.component.mjs +0 -77
  49. package/esm2022/avatar/avatar.module.mjs +0 -22
  50. package/esm2022/avatar/ngwr-avatar.mjs +0 -5
  51. package/esm2022/avatar/public-api.mjs +0 -9
  52. package/esm2022/button/button-group.component.mjs +0 -36
  53. package/esm2022/button/button.component.mjs +0 -94
  54. package/esm2022/button/button.module.mjs +0 -23
  55. package/esm2022/button/ngwr-button.mjs +0 -5
  56. package/esm2022/button/public-api.mjs +0 -10
  57. package/esm2022/cdk/base.directive.mjs +0 -27
  58. package/esm2022/cdk/ngwr-cdk.mjs +0 -5
  59. package/esm2022/cdk/public-api.mjs +0 -8
  60. package/esm2022/cdk/rxjs/is-array.mjs +0 -10
  61. package/esm2022/cdk/rxjs/is-defined.mjs +0 -10
  62. package/esm2022/cdk/rxjs/is-not-empty-array.mjs +0 -10
  63. package/esm2022/cdk/rxjs/is-observable.mjs +0 -10
  64. package/esm2022/cdk/rxjs/ngwr-cdk-rxjs.mjs +0 -5
  65. package/esm2022/cdk/rxjs/public-api.mjs +0 -11
  66. package/esm2022/cdk/types/maybe.mjs +0 -8
  67. package/esm2022/cdk/types/ngwr-cdk-types.mjs +0 -5
  68. package/esm2022/cdk/types/public-api.mjs +0 -10
  69. package/esm2022/cdk/types/safe-any.mjs +0 -8
  70. package/esm2022/cdk/types/theme-color.mjs +0 -17
  71. package/esm2022/cdk/utils/generate-random-id.mjs +0 -17
  72. package/esm2022/cdk/utils/ngwr-cdk-utils.mjs +0 -5
  73. package/esm2022/cdk/utils/public-api.mjs +0 -8
  74. package/esm2022/checkbox/checkbox.component.mjs +0 -87
  75. package/esm2022/checkbox/checkbox.module.mjs +0 -22
  76. package/esm2022/checkbox/ngwr-checkbox.mjs +0 -5
  77. package/esm2022/checkbox/public-api.mjs +0 -9
  78. package/esm2022/dialog/dialog-animations.mjs +0 -28
  79. package/esm2022/dialog/dialog-base.directive.mjs +0 -95
  80. package/esm2022/dialog/dialog-close.directive.mjs +0 -33
  81. package/esm2022/dialog/dialog-content.directive.mjs +0 -25
  82. package/esm2022/dialog/dialog-data.token.mjs +0 -9
  83. package/esm2022/dialog/dialog-footer.directive.mjs +0 -36
  84. package/esm2022/dialog/dialog-options.mjs +0 -9
  85. package/esm2022/dialog/dialog-ref.mjs +0 -67
  86. package/esm2022/dialog/dialog-title.directive.mjs +0 -25
  87. package/esm2022/dialog/dialog.component.mjs +0 -57
  88. package/esm2022/dialog/dialog.module.mjs +0 -38
  89. package/esm2022/dialog/dialog.service.mjs +0 -107
  90. package/esm2022/dialog/ngwr-dialog.mjs +0 -5
  91. package/esm2022/dialog/public-api.mjs +0 -19
  92. package/esm2022/divider/divider.component.mjs +0 -60
  93. package/esm2022/divider/divider.module.mjs +0 -16
  94. package/esm2022/divider/ngwr-divider.mjs +0 -5
  95. package/esm2022/divider/public-api.mjs +0 -9
  96. package/esm2022/form/form-error.component.mjs +0 -33
  97. package/esm2022/form/form-item.component.mjs +0 -43
  98. package/esm2022/form/form.module.mjs +0 -23
  99. package/esm2022/form/ngwr-form.mjs +0 -5
  100. package/esm2022/form/public-api.mjs +0 -10
  101. package/esm2022/icon/icon.component.mjs +0 -87
  102. package/esm2022/icon/icon.module.mjs +0 -22
  103. package/esm2022/icon/icon.service.mjs +0 -40
  104. package/esm2022/icon/icons.mjs +0 -549
  105. package/esm2022/icon/ngwr-icon.mjs +0 -5
  106. package/esm2022/icon/provide-wr-icons.mjs +0 -17
  107. package/esm2022/icon/public-api.mjs +0 -12
  108. package/esm2022/input/input-types.mjs +0 -2
  109. package/esm2022/input/input.component.mjs +0 -118
  110. package/esm2022/input/input.module.mjs +0 -22
  111. package/esm2022/input/ngwr-input.mjs +0 -5
  112. package/esm2022/input/public-api.mjs +0 -10
  113. package/esm2022/ngwr.mjs +0 -5
  114. package/esm2022/pipes/new-array.pipe.mjs +0 -23
  115. package/esm2022/pipes/ngwr-pipes.mjs +0 -5
  116. package/esm2022/pipes/pipes.module.mjs +0 -22
  117. package/esm2022/pipes/public-api.mjs +0 -9
  118. package/esm2022/progress/ngwr-progress.mjs +0 -5
  119. package/esm2022/progress/progress.component.mjs +0 -42
  120. package/esm2022/progress/progress.module.mjs +0 -22
  121. package/esm2022/progress/public-api.mjs +0 -9
  122. package/esm2022/public-api.mjs +0 -3
  123. package/esm2022/qr/generator.mjs +0 -84
  124. package/esm2022/qr/ngwr-qr.mjs +0 -5
  125. package/esm2022/qr/public-api.mjs +0 -9
  126. package/esm2022/qr/qr.component.mjs +0 -90
  127. package/esm2022/qr/qr.module.mjs +0 -22
  128. package/esm2022/qr/qrcodegen.mjs +0 -872
  129. package/esm2022/skeleton/index.mjs +0 -3
  130. package/esm2022/skeleton/ngwr-skeleton.mjs +0 -5
  131. package/esm2022/skeleton/skeleton.component.mjs +0 -43
  132. package/esm2022/skeleton/skeleton.module.mjs +0 -16
  133. package/esm2022/spinner/index.mjs +0 -3
  134. package/esm2022/spinner/ngwr-spinner.mjs +0 -5
  135. package/esm2022/spinner/spinner.component.mjs +0 -33
  136. package/esm2022/spinner/spinner.module.mjs +0 -22
  137. package/esm2022/tag/ngwr-tag.mjs +0 -5
  138. package/esm2022/tag/public-api.mjs +0 -9
  139. package/esm2022/tag/tag.component.mjs +0 -74
  140. package/esm2022/tag/tag.module.mjs +0 -16
@@ -4,6 +4,8 @@ import { inject, PLATFORM_ID, ElementRef, signal, numberAttribute, Component, Ch
4
4
  import { WrAbstractBase } from 'ngwr/cdk';
5
5
  import { WrIconService } from 'ngwr/icon';
6
6
 
7
+ /* eslint-disable */
8
+ // @ts-nocheck
7
9
  /*
8
10
  * QR Code generator library (TypeScript)
9
11
  *
@@ -101,7 +103,7 @@ var qrcodegen;
101
103
  ecl = newEcl;
102
104
  }
103
105
  // Concatenate all segments to create the data bit string
104
- let bb = [];
106
+ const bb = [];
105
107
  for (const seg of segs) {
106
108
  appendBits(seg.mode.modeBits, 4, bb);
107
109
  appendBits(seg.numChars, seg.mode.numCharCountBits(version), bb);
@@ -119,7 +121,7 @@ var qrcodegen;
119
121
  for (let padByte = 0xec; bb.length < dataCapacityBits; padByte ^= 0xec ^ 0x11)
120
122
  appendBits(padByte, 8, bb);
121
123
  // Pack bits into bytes in big endian
122
- let dataCodewords = [];
124
+ const dataCodewords = [];
123
125
  while (dataCodewords.length * 8 < bb.length)
124
126
  dataCodewords.push(0);
125
127
  bb.forEach((b, i) => (dataCodewords[i >>> 3] |= b << (7 - (i & 7))));
@@ -151,7 +153,7 @@ var qrcodegen;
151
153
  throw new RangeError('Mask value out of range');
152
154
  this.size = version * 4 + 17;
153
155
  // Initialize both grids to be size*size arrays of Boolean false
154
- let row = [];
156
+ const row = [];
155
157
  for (let i = 0; i < this.size; i++)
156
158
  row.push(false);
157
159
  for (let i = 0; i < this.size; i++) {
@@ -303,10 +305,10 @@ var qrcodegen;
303
305
  const numShortBlocks = numBlocks - (rawCodewords % numBlocks);
304
306
  const shortBlockLen = Math.floor(rawCodewords / numBlocks);
305
307
  // Split data into blocks and append ECC to each block
306
- let blocks = [];
308
+ const blocks = [];
307
309
  const rsDiv = QrCode.reedSolomonComputeDivisor(blockEccLen);
308
310
  for (let i = 0, k = 0; i < numBlocks; i++) {
309
- let dat = data.slice(k, k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1));
311
+ const dat = data.slice(k, k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1));
310
312
  k += dat.length;
311
313
  const ecc = QrCode.reedSolomonComputeRemainder(dat, rsDiv);
312
314
  if (i < numShortBlocks)
@@ -314,7 +316,7 @@ var qrcodegen;
314
316
  blocks.push(dat.concat(ecc));
315
317
  }
316
318
  // Interleave (not concatenate) the bytes from every block into a single sequence
317
- let result = [];
319
+ const result = [];
318
320
  for (let i = 0; i < blocks[0].length; i++) {
319
321
  blocks.forEach((block, j) => {
320
322
  // Skip the padding byte in short blocks
@@ -405,7 +407,7 @@ var qrcodegen;
405
407
  for (let y = 0; y < this.size; y++) {
406
408
  let runColor = false;
407
409
  let runX = 0;
408
- let runHistory = [0, 0, 0, 0, 0, 0, 0];
410
+ const runHistory = [0, 0, 0, 0, 0, 0, 0];
409
411
  for (let x = 0; x < this.size; x++) {
410
412
  if (this.modules[y][x] == runColor) {
411
413
  runX++;
@@ -428,7 +430,7 @@ var qrcodegen;
428
430
  for (let x = 0; x < this.size; x++) {
429
431
  let runColor = false;
430
432
  let runY = 0;
431
- let runHistory = [0, 0, 0, 0, 0, 0, 0];
433
+ const runHistory = [0, 0, 0, 0, 0, 0, 0];
432
434
  for (let y = 0; y < this.size; y++) {
433
435
  if (this.modules[y][x] == runColor) {
434
436
  runY++;
@@ -477,7 +479,7 @@ var qrcodegen;
477
479
  else {
478
480
  const numAlign = Math.floor(this.version / 7) + 2;
479
481
  const step = this.version == 32 ? 26 : Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2;
480
- let result = [6];
482
+ const result = [6];
481
483
  for (let pos = this.size - 7; result.length < numAlign; pos -= step)
482
484
  result.splice(1, 0, pos);
483
485
  return result;
@@ -513,7 +515,7 @@ var qrcodegen;
513
515
  throw new RangeError('Degree out of range');
514
516
  // Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1.
515
517
  // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array [255, 8, 93].
516
- let result = [];
518
+ const result = [];
517
519
  for (let i = 0; i < degree - 1; i++)
518
520
  result.push(0);
519
521
  result.push(1); // Start off with the monomial x^0
@@ -534,7 +536,7 @@ var qrcodegen;
534
536
  }
535
537
  // Returns the Reed-Solomon error correction codeword for the given data and divisor polynomials.
536
538
  static reedSolomonComputeRemainder(data, divisor) {
537
- let result = divisor.map(_ => 0);
539
+ const result = divisor.map(_ => 0);
538
540
  for (const b of data) {
539
541
  // Polynomial division
540
542
  const factor = b ^ result.shift();
@@ -672,7 +674,7 @@ var qrcodegen;
672
674
  // byte mode. All input byte arrays are acceptable. Any text string
673
675
  // can be converted to UTF-8 bytes and encoded as a byte mode segment.
674
676
  static makeBytes(data) {
675
- let bb = [];
677
+ const bb = [];
676
678
  for (const b of data)
677
679
  appendBits(b, 8, bb);
678
680
  return new QrSegment(QrSegment.Mode.BYTE, data.length, bb);
@@ -681,7 +683,7 @@ var qrcodegen;
681
683
  static makeNumeric(digits) {
682
684
  if (!QrSegment.isNumeric(digits))
683
685
  throw new RangeError('String contains non-numeric characters');
684
- let bb = [];
686
+ const bb = [];
685
687
  for (let i = 0; i < digits.length;) {
686
688
  // Consume up to 3 digits per iteration
687
689
  const n = Math.min(digits.length - i, 3);
@@ -696,7 +698,7 @@ var qrcodegen;
696
698
  static makeAlphanumeric(text) {
697
699
  if (!QrSegment.isAlphanumeric(text))
698
700
  throw new RangeError('String contains unencodable characters in alphanumeric mode');
699
- let bb = [];
701
+ const bb = [];
700
702
  let i;
701
703
  for (i = 0; i + 2 <= text.length; i += 2) {
702
704
  // Process groups of 2
@@ -725,7 +727,7 @@ var qrcodegen;
725
727
  // Returns a segment representing an Extended Channel Interpretation
726
728
  // (ECI) designator with the given assignment value.
727
729
  static makeEci(assignVal) {
728
- let bb = [];
730
+ const bb = [];
729
731
  if (assignVal < 0)
730
732
  throw new RangeError('ECI assignment value out of range');
731
733
  else if (assignVal < 1 << 7)
@@ -793,7 +795,7 @@ var qrcodegen;
793
795
  // Returns a new array of bytes representing the given string encoded in UTF-8.
794
796
  static toUtf8ByteArray(str) {
795
797
  str = encodeURI(str);
796
- let result = [];
798
+ const result = [];
797
799
  for (let i = 0; i < str.length; i++) {
798
800
  if (str.charAt(i) != '%')
799
801
  result.push(str.charCodeAt(i));
@@ -981,13 +983,6 @@ class WrQrComponent extends WrAbstractBase {
981
983
  this.wrIconService = inject(WrIconService);
982
984
  this.isBrowser = signal(true);
983
985
  }
984
- ngOnInit() {
985
- this.isBrowser.set(isPlatformBrowser(this.pid));
986
- this.setElBg();
987
- }
988
- ngAfterViewInit() {
989
- this.drawCanvas();
990
- }
991
986
  ngOnChanges(changes) {
992
987
  const { value, level, padding, color, bgColor, size, icon, iconSize } = changes;
993
988
  if ((value || level || padding || color || bgColor || size || icon || iconSize) && this.canvas) {
@@ -997,6 +992,13 @@ class WrQrComponent extends WrAbstractBase {
997
992
  this.setElBg();
998
993
  }
999
994
  }
995
+ ngOnInit() {
996
+ this.isBrowser.set(isPlatformBrowser(this.pid));
997
+ this.setElBg();
998
+ }
999
+ ngAfterViewInit() {
1000
+ this.drawCanvas();
1001
+ }
1000
1002
  setElBg() {
1001
1003
  this.elRef.nativeElement.style.backgroundColor = this.bgColor;
1002
1004
  }
@@ -1010,10 +1012,10 @@ class WrQrComponent extends WrAbstractBase {
1010
1012
  drawCanvas(this.canvas.nativeElement, plotQRCodeData(this.value, this.level), this.size, 10, this.padding, this.color, this.bgColor, this.iconSize, icon);
1011
1013
  }
1012
1014
  }
1013
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrQrComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1014
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: WrQrComponent, isStandalone: true, selector: "wr-qr", inputs: { value: "value", level: "level", padding: ["padding", "padding", numberAttribute], color: "color", bgColor: "bgColor", size: ["size", "size", numberAttribute], icon: "icon", iconSize: ["iconSize", "iconSize", numberAttribute] }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (isBrowser()) {\n <canvas #canvas></canvas>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1015
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: WrQrComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1016
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: WrQrComponent, isStandalone: true, selector: "wr-qr", inputs: { value: "value", level: "level", padding: ["padding", "padding", numberAttribute], color: "color", bgColor: "bgColor", size: ["size", "size", numberAttribute], icon: "icon", iconSize: ["iconSize", "iconSize", numberAttribute] }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (isBrowser()) {\n <canvas #canvas></canvas>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1015
1017
  }
1016
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrQrComponent, decorators: [{
1018
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: WrQrComponent, decorators: [{
1017
1019
  type: Component,
1018
1020
  args: [{ standalone: true, selector: 'wr-qr', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@if (isBrowser()) {\n <canvas #canvas></canvas>\n}\n" }]
1019
1021
  }], propDecorators: { class: [{
@@ -1050,11 +1052,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
1050
1052
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
1051
1053
  */
1052
1054
  class WrQrModule {
1053
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrQrModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1054
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: WrQrModule, imports: [WrQrComponent], exports: [WrQrComponent] }); }
1055
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrQrModule }); }
1055
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: WrQrModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1056
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: WrQrModule, imports: [WrQrComponent], exports: [WrQrComponent] }); }
1057
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: WrQrModule }); }
1056
1058
  }
1057
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrQrModule, decorators: [{
1059
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: WrQrModule, decorators: [{
1058
1060
  type: NgModule,
1059
1061
  args: [{
1060
1062
  imports: [WrQrComponent],