cmat 0.0.29 → 0.0.31

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 (164) hide show
  1. package/components/adapter/index.d.ts +8 -9
  2. package/components/breadcrumb/index.d.ts +2 -4
  3. package/components/carousel/index.d.ts +3 -5
  4. package/components/cascade/index.d.ts +6 -7
  5. package/components/chip-input/index.d.ts +2 -2
  6. package/components/custom-formly/index.d.ts +41 -49
  7. package/components/date-range/index.d.ts +5 -6
  8. package/components/drawer/index.d.ts +30 -34
  9. package/components/fullscreen/index.d.ts +1 -2
  10. package/components/highlight/index.d.ts +12 -14
  11. package/components/image-viewer/index.d.ts +4 -5
  12. package/components/json-editor/index.d.ts +2 -3
  13. package/components/knob-input/index.d.ts +8 -8
  14. package/components/material-color-picker/index.d.ts +3 -3
  15. package/components/material-datetimepicker/index.d.ts +89 -93
  16. package/components/navigation/index.d.ts +82 -88
  17. package/components/opt-input/index.d.ts +6 -6
  18. package/components/pagination/index.d.ts +6 -9
  19. package/components/popover/index.d.ts +13 -16
  20. package/components/progress-bar/index.d.ts +3 -5
  21. package/components/rating/index.d.ts +5 -5
  22. package/components/select-search/index.d.ts +16 -17
  23. package/components/select-table/index.d.ts +6 -6
  24. package/components/select-tree/index.d.ts +7 -6
  25. package/components/speed-dial/index.d.ts +2 -3
  26. package/components/timeline/index.d.ts +2 -3
  27. package/components/toast/index.d.ts +14 -16
  28. package/components/transfer-picker/index.d.ts +43 -44
  29. package/components/treetable/index.d.ts +2 -3
  30. package/components/upload/index.d.ts +24 -27
  31. package/directives/animate-on-scroll/index.d.ts +4 -19
  32. package/directives/arrow-cursor/index.d.ts +2 -4
  33. package/directives/autofocus/index.d.ts +2 -2
  34. package/directives/data-exporter/index.d.ts +2 -15
  35. package/directives/digit-only/index.d.ts +4 -4
  36. package/directives/equal-validator/index.d.ts +1 -2
  37. package/fesm2022/cmat-components-adapter.mjs +22 -39
  38. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  39. package/fesm2022/cmat-components-breadcrumb.mjs +19 -21
  40. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  41. package/fesm2022/cmat-components-card.mjs +3 -3
  42. package/fesm2022/cmat-components-carousel.mjs +112 -127
  43. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  44. package/fesm2022/cmat-components-cascade.mjs +61 -73
  45. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  46. package/fesm2022/cmat-components-chip-input.mjs +14 -18
  47. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  48. package/fesm2022/cmat-components-custom-formly.mjs +167 -169
  49. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  50. package/fesm2022/cmat-components-date-range.mjs +17 -17
  51. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  52. package/fesm2022/cmat-components-drawer.mjs +17 -19
  53. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  54. package/fesm2022/cmat-components-fullscreen.mjs +7 -10
  55. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  56. package/fesm2022/cmat-components-highlight.mjs +14 -14
  57. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  58. package/fesm2022/cmat-components-image-viewer.mjs +9 -12
  59. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  60. package/fesm2022/cmat-components-json-editor.mjs +7 -7
  61. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  62. package/fesm2022/cmat-components-knob-input.mjs +12 -19
  63. package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
  64. package/fesm2022/cmat-components-masonry.mjs +3 -3
  65. package/fesm2022/cmat-components-material-color-picker.mjs +8 -7
  66. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  67. package/fesm2022/cmat-components-material-datetimepicker.mjs +166 -216
  68. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  69. package/fesm2022/cmat-components-navigation.mjs +108 -112
  70. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  71. package/fesm2022/cmat-components-opt-input.mjs +13 -20
  72. package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
  73. package/fesm2022/cmat-components-org-chart.mjs +9 -9
  74. package/fesm2022/cmat-components-pagination.mjs +32 -34
  75. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  76. package/fesm2022/cmat-components-password-strength.mjs +9 -9
  77. package/fesm2022/cmat-components-popover.mjs +27 -32
  78. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  79. package/fesm2022/cmat-components-progress-bar.mjs +10 -10
  80. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  81. package/fesm2022/cmat-components-rating.mjs +10 -14
  82. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  83. package/fesm2022/cmat-components-select-search.mjs +30 -53
  84. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  85. package/fesm2022/cmat-components-select-table.mjs +28 -33
  86. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  87. package/fesm2022/cmat-components-select-tree.mjs +55 -61
  88. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  89. package/fesm2022/cmat-components-speed-dial.mjs +13 -13
  90. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  91. package/fesm2022/cmat-components-timeline.mjs +18 -20
  92. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  93. package/fesm2022/cmat-components-toast.mjs +16 -16
  94. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  95. package/fesm2022/cmat-components-transfer-picker.mjs +47 -47
  96. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  97. package/fesm2022/cmat-components-treetable.mjs +11 -12
  98. package/fesm2022/cmat-components-treetable.mjs.map +1 -1
  99. package/fesm2022/cmat-components-upload.mjs +40 -33
  100. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  101. package/fesm2022/cmat-directives-animate-on-scroll.mjs +13 -14
  102. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  103. package/fesm2022/cmat-directives-arrow-cursor.mjs +11 -14
  104. package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
  105. package/fesm2022/cmat-directives-autofocus.mjs +8 -9
  106. package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
  107. package/fesm2022/cmat-directives-data-exporter.mjs +28 -28
  108. package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
  109. package/fesm2022/cmat-directives-debounce.mjs +11 -13
  110. package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
  111. package/fesm2022/cmat-directives-digit-only.mjs +17 -17
  112. package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
  113. package/fesm2022/cmat-directives-equal-validator.mjs +9 -16
  114. package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
  115. package/fesm2022/cmat-lib-mock-api.mjs +11 -14
  116. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  117. package/fesm2022/cmat-pipes-bytes.mjs +4 -5
  118. package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
  119. package/fesm2022/cmat-pipes-date-format.mjs +4 -5
  120. package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
  121. package/fesm2022/cmat-pipes-find-by-key.mjs +4 -5
  122. package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
  123. package/fesm2022/cmat-pipes-group-by.mjs +4 -5
  124. package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
  125. package/fesm2022/cmat-pipes-keys.mjs +4 -5
  126. package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
  127. package/fesm2022/cmat-pipes-secure.mjs +13 -14
  128. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  129. package/fesm2022/cmat-pipes-uppercase.mjs +4 -5
  130. package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
  131. package/fesm2022/cmat-services-alert.mjs +3 -3
  132. package/fesm2022/cmat-services-config.mjs +10 -12
  133. package/fesm2022/cmat-services-config.mjs.map +1 -1
  134. package/fesm2022/cmat-services-confirmation.mjs +17 -20
  135. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  136. package/fesm2022/cmat-services-data.mjs +10 -11
  137. package/fesm2022/cmat-services-data.mjs.map +1 -1
  138. package/fesm2022/cmat-services-export-as.mjs +3 -3
  139. package/fesm2022/cmat-services-loading.mjs +14 -14
  140. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  141. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  142. package/fesm2022/cmat-services-media-watcher.mjs +10 -10
  143. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  144. package/fesm2022/cmat-services-platform.mjs +8 -8
  145. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  146. package/fesm2022/cmat-services-splash-screen.mjs +9 -13
  147. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  148. package/fesm2022/cmat-services-title.mjs +10 -11
  149. package/fesm2022/cmat-services-title.mjs.map +1 -1
  150. package/fesm2022/cmat-services-translation.mjs +8 -8
  151. package/fesm2022/cmat-services-translation.mjs.map +1 -1
  152. package/fesm2022/cmat-services-utils.mjs +3 -3
  153. package/lib/mock-api/index.d.ts +0 -1
  154. package/package.json +17 -17
  155. package/pipes/secure/index.d.ts +2 -4
  156. package/services/config/index.d.ts +1 -1
  157. package/services/confirmation/index.d.ts +2 -4
  158. package/services/data/index.d.ts +1 -3
  159. package/services/loading/index.d.ts +3 -4
  160. package/services/media-watcher/index.d.ts +2 -3
  161. package/services/platform/index.d.ts +2 -3
  162. package/services/splash-screen/index.d.ts +1 -2
  163. package/services/title/index.d.ts +3 -5
  164. package/services/translation/index.d.ts +1 -2
@@ -1,10 +1,10 @@
1
1
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
- import * as i2 from '@angular/common';
2
+ import * as i1 from '@angular/common';
3
3
  import { CommonModule } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { DOCUMENT, Input, Output, HostBinding, Optional, Self, Inject, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
6
- import * as i1 from '@angular/forms';
7
- import { FormControl, ReactiveFormsModule } from '@angular/forms';
5
+ import { inject, DOCUMENT, Input, Output, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
6
+ import * as i2 from '@angular/forms';
7
+ import { NgControl, FormBuilder, FormControl, ReactiveFormsModule } from '@angular/forms';
8
8
  import { MatFormFieldControl } from '@angular/material/form-field';
9
9
  import { isNil } from 'lodash';
10
10
  import { Subject } from 'rxjs';
@@ -47,10 +47,7 @@ class ObjectUtil {
47
47
  /* eslint-disable @typescript-eslint/member-ordering */
48
48
  let NEXT_ID = 0;
49
49
  class CmatOtpInputComponent {
50
- constructor(ngControl, _document, _formBuilder) {
51
- this.ngControl = ngControl;
52
- this._document = _document;
53
- this._formBuilder = _formBuilder;
50
+ constructor() {
54
51
  this.id = `cmat-otp-input-${NEXT_ID++}`;
55
52
  this.onBlur = new Subject();
56
53
  this.onInputChange = new Subject();
@@ -60,6 +57,9 @@ class CmatOtpInputComponent {
60
57
  .substring(2) + new Date().getTime().toString(36);
61
58
  this.stateChanges = new Subject();
62
59
  this.focused = false;
60
+ this.ngControl = inject(NgControl, { optional: true, self: true });
61
+ this._document = inject(DOCUMENT);
62
+ this._formBuilder = inject(FormBuilder);
63
63
  this._unsubscribeAll = new Subject();
64
64
  this._activeFocusCount = 0;
65
65
  this._placeholder = '';
@@ -415,20 +415,13 @@ class CmatOtpInputComponent {
415
415
  this.onInputChange.next(val);
416
416
  }
417
417
  }
418
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatOtpInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: DOCUMENT }, { token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
419
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: CmatOtpInputComponent, isStandalone: true, selector: "cmat-otp-input", inputs: { id: "id", config: "config", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, outputs: { onBlur: "onBlur", onInputChange: "onInputChange" }, host: { properties: { "attr.id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatOtpInputComponent }], exportAs: ["cmatOtpInput"], usesOnChanges: true, ngImport: i0, template: "@if(otpForm.controls){\r\n<div class=\"cmat-otp-input-wrapper wrapper {{config.containerClass}}\" id=\"c_{{componentKey}}\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\" [ngStyle]=\"config.containerStyles\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut()\">\r\n <div class=\"n-o-c\">\r\n @for (item of controlKeys; track $index) {\r\n <input #inp class=\"cmat-otp-input {{config.inputClass}}\" autocomplete=\"one-time-code\" [pattern]=\"config.allowNumbersOnly ? '\\\\d*' : ''\"\r\n [type]=\"inputType\" [placeholder]=\"config.placeholder || ''\"\r\n [ngStyle]=\"config.inputStyles\" [id]=\"getBoxId($index)\"\r\n [ngClass]=\"{'error-input': (config.showError && errorState)}\"\r\n [formControl]=\"getFormControl(item)\" (paste)=\"handlePaste($event)\" (keyup)=\"onKeyUp($event,$index)\"\r\n (input)=\"onInput($event,$index)\" (keydown)=\"onKeyDown($event,$index)\">\r\n @if(config.separator && !$last){\r\n {{config.separator}}\r\n }\r\n }\r\n </div>\r\n</div>\r\n}", styles: [".cmat-otp-input{width:50px;height:50px;border-radius:4px;border:solid 1px;border-color:var(--cmat-text-hint);text-align:center;font-size:32px}.cmat-otp-input:focus{background-color:var(--cmat-divider);border:solid 2px var(--cmat-primary)}.cmat-otp-input-wrapper .cmat-otp-input{margin:0 .51rem}.cmat-otp-input-wrapper .cmat-otp-input:first-child{margin-left:0}.cmat-otp-input-wrapper .cmat-otp-input:last-child{margin-right:0}.n-o-c{display:flex;align-items:center}.error-input{border-color:var(--cmat-warn)}@media screen and (max-width: 767px){.cmat-otp-input{width:40px;font-size:24px;height:40px}}@media screen and (max-width: 420px){.cmat-otp-input{width:30px;font-size:18px;height:30px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
418
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatOtpInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
419
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.2", type: CmatOtpInputComponent, isStandalone: true, selector: "cmat-otp-input", inputs: { id: "id", config: "config", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, outputs: { onBlur: "onBlur", onInputChange: "onInputChange" }, host: { properties: { "attr.id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatOtpInputComponent }], exportAs: ["cmatOtpInput"], usesOnChanges: true, ngImport: i0, template: "@if(otpForm.controls){\r\n<div class=\"cmat-otp-input-wrapper wrapper {{config.containerClass}}\" id=\"c_{{componentKey}}\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\" [ngStyle]=\"config.containerStyles\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut()\">\r\n <div class=\"n-o-c\">\r\n @for (item of controlKeys; track $index) {\r\n <input #inp class=\"cmat-otp-input {{config.inputClass}}\" autocomplete=\"one-time-code\" [pattern]=\"config.allowNumbersOnly ? '\\\\d*' : ''\"\r\n [type]=\"inputType\" [placeholder]=\"config.placeholder || ''\"\r\n [ngStyle]=\"config.inputStyles\" [id]=\"getBoxId($index)\"\r\n [ngClass]=\"{'error-input': (config.showError && errorState)}\"\r\n [formControl]=\"getFormControl(item)\" (paste)=\"handlePaste($event)\" (keyup)=\"onKeyUp($event,$index)\"\r\n (input)=\"onInput($event,$index)\" (keydown)=\"onKeyDown($event,$index)\">\r\n @if(config.separator && !$last){\r\n {{config.separator}}\r\n }\r\n }\r\n </div>\r\n</div>\r\n}", styles: [".cmat-otp-input{width:50px;height:50px;border-radius:4px;border:solid 1px;border-color:rgba(var(--cmat-text-hint-rgb),.5);text-align:center;font-size:32px}.cmat-otp-input:focus{background-color:var(--cmat-divider);border:solid 2px var(--cmat-primary)}.cmat-otp-input-wrapper .cmat-otp-input{margin:0 .51rem}.cmat-otp-input-wrapper .cmat-otp-input:first-child{margin-left:0}.cmat-otp-input-wrapper .cmat-otp-input:last-child{margin-right:0}.n-o-c{display:flex;align-items:center}.error-input{border-color:var(--cmat-warn)}@media screen and (max-width: 767px){.cmat-otp-input{width:40px;font-size:24px;height:40px}}@media screen and (max-width: 420px){.cmat-otp-input{width:30px;font-size:18px;height:30px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
420
420
  }
421
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatOtpInputComponent, decorators: [{
421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatOtpInputComponent, decorators: [{
422
422
  type: Component,
423
- args: [{ selector: 'cmat-otp-input', exportAs: 'cmatOtpInput', imports: [CommonModule, ReactiveFormsModule], providers: [{ provide: MatFormFieldControl, useExisting: CmatOtpInputComponent }], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(otpForm.controls){\r\n<div class=\"cmat-otp-input-wrapper wrapper {{config.containerClass}}\" id=\"c_{{componentKey}}\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\" [ngStyle]=\"config.containerStyles\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut()\">\r\n <div class=\"n-o-c\">\r\n @for (item of controlKeys; track $index) {\r\n <input #inp class=\"cmat-otp-input {{config.inputClass}}\" autocomplete=\"one-time-code\" [pattern]=\"config.allowNumbersOnly ? '\\\\d*' : ''\"\r\n [type]=\"inputType\" [placeholder]=\"config.placeholder || ''\"\r\n [ngStyle]=\"config.inputStyles\" [id]=\"getBoxId($index)\"\r\n [ngClass]=\"{'error-input': (config.showError && errorState)}\"\r\n [formControl]=\"getFormControl(item)\" (paste)=\"handlePaste($event)\" (keyup)=\"onKeyUp($event,$index)\"\r\n (input)=\"onInput($event,$index)\" (keydown)=\"onKeyDown($event,$index)\">\r\n @if(config.separator && !$last){\r\n {{config.separator}}\r\n }\r\n }\r\n </div>\r\n</div>\r\n}", styles: [".cmat-otp-input{width:50px;height:50px;border-radius:4px;border:solid 1px;border-color:var(--cmat-text-hint);text-align:center;font-size:32px}.cmat-otp-input:focus{background-color:var(--cmat-divider);border:solid 2px var(--cmat-primary)}.cmat-otp-input-wrapper .cmat-otp-input{margin:0 .51rem}.cmat-otp-input-wrapper .cmat-otp-input:first-child{margin-left:0}.cmat-otp-input-wrapper .cmat-otp-input:last-child{margin-right:0}.n-o-c{display:flex;align-items:center}.error-input{border-color:var(--cmat-warn)}@media screen and (max-width: 767px){.cmat-otp-input{width:40px;font-size:24px;height:40px}}@media screen and (max-width: 420px){.cmat-otp-input{width:30px;font-size:18px;height:30px}}\n"] }]
424
- }], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
425
- type: Optional
426
- }, {
427
- type: Self
428
- }] }, { type: Document, decorators: [{
429
- type: Inject,
430
- args: [DOCUMENT]
431
- }] }, { type: i1.FormBuilder }], propDecorators: { id: [{
423
+ args: [{ selector: 'cmat-otp-input', exportAs: 'cmatOtpInput', imports: [CommonModule, ReactiveFormsModule], providers: [{ provide: MatFormFieldControl, useExisting: CmatOtpInputComponent }], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(otpForm.controls){\r\n<div class=\"cmat-otp-input-wrapper wrapper {{config.containerClass}}\" id=\"c_{{componentKey}}\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\" [ngStyle]=\"config.containerStyles\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut()\">\r\n <div class=\"n-o-c\">\r\n @for (item of controlKeys; track $index) {\r\n <input #inp class=\"cmat-otp-input {{config.inputClass}}\" autocomplete=\"one-time-code\" [pattern]=\"config.allowNumbersOnly ? '\\\\d*' : ''\"\r\n [type]=\"inputType\" [placeholder]=\"config.placeholder || ''\"\r\n [ngStyle]=\"config.inputStyles\" [id]=\"getBoxId($index)\"\r\n [ngClass]=\"{'error-input': (config.showError && errorState)}\"\r\n [formControl]=\"getFormControl(item)\" (paste)=\"handlePaste($event)\" (keyup)=\"onKeyUp($event,$index)\"\r\n (input)=\"onInput($event,$index)\" (keydown)=\"onKeyDown($event,$index)\">\r\n @if(config.separator && !$last){\r\n {{config.separator}}\r\n }\r\n }\r\n </div>\r\n</div>\r\n}", styles: [".cmat-otp-input{width:50px;height:50px;border-radius:4px;border:solid 1px;border-color:rgba(var(--cmat-text-hint-rgb),.5);text-align:center;font-size:32px}.cmat-otp-input:focus{background-color:var(--cmat-divider);border:solid 2px var(--cmat-primary)}.cmat-otp-input-wrapper .cmat-otp-input{margin:0 .51rem}.cmat-otp-input-wrapper .cmat-otp-input:first-child{margin-left:0}.cmat-otp-input-wrapper .cmat-otp-input:last-child{margin-right:0}.n-o-c{display:flex;align-items:center}.error-input{border-color:var(--cmat-warn)}@media screen and (max-width: 767px){.cmat-otp-input{width:40px;font-size:24px;height:40px}}@media screen and (max-width: 420px){.cmat-otp-input{width:30px;font-size:18px;height:30px}}\n"] }]
424
+ }], ctorParameters: () => [], propDecorators: { id: [{
432
425
  type: HostBinding,
433
426
  args: ['attr.id']
434
427
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-components-opt-input.mjs","sources":["../../../projects/cmat/components/opt-input/utils/keyboard-util.ts","../../../projects/cmat/components/opt-input/utils/object-util.ts","../../../projects/cmat/components/opt-input/otp-input.component.ts","../../../projects/cmat/components/opt-input/otp-input.component.html","../../../projects/cmat/components/opt-input/cmat-components-opt-input.ts"],"sourcesContent":["export class KeyboardUtil {\r\n static ifTab(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'Tab');\r\n }\r\n static ifDelete(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'Delete;Del');\r\n }\r\n static ifBackspace(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'Backspace');\r\n }\r\n static ifRightArrow(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'ArrowRight;Right')\r\n }\r\n static ifLeftArrow(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'ArrowLeft;Left')\r\n }\r\n static ifSpacebar(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'Spacebar; ')//don't remove the space after ; as this will check for space key\r\n }\r\n static ifKey(event: KeyboardEvent, keys: string): boolean {\r\n let keysToCheck = keys.split(';');\r\n return keysToCheck.some(k => k === event.key);\r\n }\r\n}\r\n","export class ObjectUtil{\r\n static keys(obj:any):string[]{\r\n if(!obj) return [];\r\n return Object.keys(obj);\r\n }\r\n}\r\n","/* eslint-disable @angular-eslint/no-output-on-prefix */\r\n/* eslint-disable @typescript-eslint/member-ordering */\r\nimport { coerceBooleanProperty, BooleanInput } from '@angular/cdk/coercion';\r\nimport { CommonModule } from '@angular/common';\r\nimport {\r\n Component,\r\n Input,\r\n Output,\r\n AfterViewInit,\r\n Inject,\r\n OnDestroy,\r\n OnChanges,\r\n SimpleChanges,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n Optional,\r\n Self,\r\n HostBinding,\r\n DOCUMENT\r\n} from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule, ControlValueAccessor, FormBuilder, UntypedFormGroup, NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { isNil } from 'lodash';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { OptInputConfig } from './models/config';\r\nimport { KeyboardUtil } from './utils/keyboard-util';\r\nimport { ObjectUtil } from './utils/object-util';\r\n\r\nlet NEXT_ID = 0;\r\n\r\n@Component({\r\n selector: 'cmat-otp-input',\r\n templateUrl: './otp-input.component.html',\r\n styleUrls: ['./otp-input.component.scss'],\r\n exportAs: 'cmatOtpInput',\r\n imports: [CommonModule, ReactiveFormsModule],\r\n providers: [{ provide: MatFormFieldControl, useExisting: CmatOtpInputComponent }],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class CmatOtpInputComponent implements MatFormFieldControl<any>, AfterViewInit, OnDestroy, OnChanges, ControlValueAccessor {\r\n @HostBinding('attr.id')\r\n @Input()\r\n public id = `cmat-otp-input-${NEXT_ID++}`;\r\n\r\n @Output() onBlur = new Subject<void>();\r\n @Output() onInputChange = new Subject<string | null>();\r\n @Input() config: OptInputConfig = { length: 4 };\r\n\r\n otpForm: UntypedFormGroup;\r\n currentVal: string | null;\r\n\r\n componentKey = Math.random()\r\n .toString(36)\r\n .substring(2) + new Date().getTime().toString(36);\r\n\r\n readonly stateChanges: Subject<void> = new Subject<void>();\r\n focused: boolean = false;\r\n private _unsubscribeAll: Subject<void> = new Subject<void>();\r\n private _activeFocusCount = 0;\r\n\r\n constructor(@Optional() @Self() public ngControl: NgControl, @Inject(DOCUMENT) private _document: Document, private _formBuilder: FormBuilder) {\r\n this.otpForm = this._formBuilder.group({});\r\n\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n get inputType(): string {\r\n return this.config?.isPasswordInput\r\n ? 'password'\r\n : this.config?.allowNumbersOnly\r\n ? 'tel'\r\n : 'text';\r\n }\r\n get controlKeys(): string[] { return ObjectUtil.keys(this.otpForm?.controls) };\r\n\r\n get errorState(): boolean {\r\n if (this.ngControl == null)\r\n return false;\r\n\r\n return (this.ngControl.invalid && ((this.ngControl.dirty ?? false) || this.ngControl.touched)) ?? false;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.config) {\r\n if (this.config.length !== ((this.otpForm?.controls as any).length ?? 0)) {\r\n this.otpForm = this._formBuilder.group({});\r\n for (let index = 0; index < this.config.length; index++) {\r\n this.otpForm.addControl(this._getControlName(index), new FormControl());\r\n }\r\n this.otpForm.valueChanges.pipe(takeUntil(this._unsubscribeAll)).subscribe(() => {\r\n ObjectUtil.keys(this.otpForm.controls).forEach((k) => {\r\n var val = this.otpForm.controls[k].value;\r\n if (val && val.length > 1) {\r\n if (val.length >= this.config.length) {\r\n this.setValue(val);\r\n } else {\r\n this._rebuildValue();\r\n }\r\n }\r\n });\r\n });\r\n }\r\n }\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n if (this.otpForm) {\r\n if (isDisabled) {\r\n this.otpForm.disable({ emitEvent: false });\r\n } else {\r\n this.otpForm.enable({ emitEvent: false });\r\n }\r\n }\r\n }\r\n writeValue(value: string): void {\r\n this.currentVal = value || null;\r\n if (this.otpForm && this.currentVal) {\r\n this.setValue(this.currentVal);\r\n }\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this._onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this._onTouchedChange = fn;\r\n }\r\n\r\n onFocusIn(): void {\r\n this._onTouchedChange();\r\n this._activeFocusCount++;\r\n\r\n if (!this.focused) {\r\n this.focused = true;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n onFocusOut(): void {\r\n setTimeout(() => {\r\n this._activeFocusCount--;\r\n if (this._activeFocusCount === 0) {\r\n this.focused = false;\r\n this._onTouchedChange();\r\n this.onBlur.next();\r\n this.stateChanges.next();\r\n }\r\n }, 0);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (!this.config.disableAutoFocus) {\r\n const containerItem = this._document.getElementById(`c_${this.componentKey}`);\r\n if (containerItem) {\r\n const ele: any = containerItem.getElementsByClassName('cmat-otp-input')[0];\r\n if (ele?.focus) {\r\n ele.focus();\r\n }\r\n }\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.stateChanges.complete();\r\n this._unsubscribeAll.next(void 0);\r\n this._unsubscribeAll.complete();\r\n }\r\n\r\n\r\n @Input()\r\n get placeholder(): string {\r\n return this._placeholder;\r\n }\r\n set placeholder(value: string) {\r\n this._placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n private _placeholder: string = '';\r\n\r\n @Input()\r\n get value(): any {\r\n return this._value;\r\n }\r\n set value(value: any) {\r\n if (value !== this.value) {\r\n this._value = value;\r\n\r\n this.stateChanges.next();\r\n\r\n this._onModelChange(value);\r\n }\r\n }\r\n protected _value: any;\r\n\r\n get empty(): boolean {\r\n return !this._value;\r\n }\r\n\r\n get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n @Input()\r\n get required(): boolean { return this._required; }\r\n set required(value: any) {\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n protected _required = false;\r\n\r\n @Input()\r\n get disabled(): boolean {\r\n if (!isNil(this.ngControl?.disabled)) {\r\n return this.ngControl.disabled;\r\n }\r\n return this._disabled;\r\n }\r\n set disabled(value: BooleanInput) {\r\n this._disabled = coerceBooleanProperty(value);\r\n\r\n this.setDisabledState(this._disabled);\r\n\r\n if (this.focused) {\r\n this.focused = false;\r\n this.stateChanges.next();\r\n }\r\n }\r\n protected _disabled = false;\r\n\r\n setDescribedByIds(ids: string[]): void {\r\n const containerItem = this._document.getElementById(`c_${this.componentKey}`);\r\n\r\n if (containerItem) {\r\n if (ids.length) {\r\n containerItem.setAttribute('aria-describedby', ids.join(' '));\r\n } else {\r\n containerItem.removeAttribute('aria-describedby');\r\n }\r\n }\r\n }\r\n\r\n onContainerClick(): void {\r\n const containerItem = this._document.getElementById(`c_${this.componentKey}`);\r\n\r\n if (!this.focused && containerItem) {\r\n containerItem.focus();\r\n }\r\n }\r\n\r\n onKeyDown($event: any, inputIdx: number): any {\r\n const prevInputId = this.getBoxId(inputIdx - 1);\r\n const currentInputId = this.getBoxId(inputIdx);\r\n const nextInputId = this.getBoxId(inputIdx + 1);\r\n if (KeyboardUtil.ifSpacebar($event)) {\r\n $event.preventDefault();\r\n return false;\r\n }\r\n if (KeyboardUtil.ifBackspace($event)) {\r\n if (!$event.target.value) {\r\n this._clearInput(prevInputId, inputIdx - 1);\r\n this._setSelected(prevInputId);\r\n } else {\r\n this._clearInput(currentInputId, inputIdx);\r\n }\r\n this._rebuildValue();\r\n return;\r\n }\r\n if (KeyboardUtil.ifDelete($event)) {\r\n if (!$event.target.value) {\r\n this._clearInput(prevInputId, inputIdx - 1);\r\n this._setSelected(prevInputId);\r\n } else {\r\n this._clearInput(currentInputId, inputIdx);\r\n }\r\n this._rebuildValue();\r\n return;\r\n }\r\n if (this.ifValidKeyCode($event)) {\r\n $event.target.value = $event.key;\r\n let ctrlName = this._getControlName(inputIdx);\r\n this.otpForm.controls[ctrlName]?.setValue($event.key);\r\n $event.preventDefault();\r\n this._setSelected(nextInputId);\r\n this._rebuildValue();\r\n }\r\n }\r\n onInput($event: any, inputIdx: number): void {\r\n let newVal = this.currentVal ? `${this.currentVal}${$event.target.value}` : $event.target.value;\r\n if (this.config.allowNumbersOnly && !this.validateNumber(newVal)) {\r\n $event.target.value = null;\r\n $event.stopPropagation();\r\n $event.preventDefault();\r\n this._clearInput(null, inputIdx);\r\n }\r\n }\r\n\r\n\r\n onKeyUp($event: any, inputIdx: number): void {\r\n if (KeyboardUtil.ifTab($event)) {\r\n inputIdx -= 1;\r\n }\r\n const nextInputId = this.getBoxId(inputIdx + 1);\r\n const prevInputId = this.getBoxId(inputIdx - 1);\r\n if (KeyboardUtil.ifRightArrow($event)) {\r\n $event.preventDefault();\r\n this._setSelected(nextInputId);\r\n return;\r\n }\r\n if (KeyboardUtil.ifLeftArrow($event)) {\r\n $event.preventDefault();\r\n this._setSelected(prevInputId);\r\n return;\r\n }\r\n\r\n if (!$event.target.value) {\r\n return;\r\n }\r\n }\r\n\r\n validateNumber(val: string): boolean | string {\r\n return val && /^[0-9]+$/.test(val);\r\n }\r\n\r\n getBoxId(idx: string | number): string {\r\n return `otp_${idx}_${this.componentKey}`;\r\n }\r\n\r\n focusTo(eleId: string): void {\r\n const ele: any = this._document.getElementById(eleId);\r\n if (ele) {\r\n ele.focus();\r\n }\r\n }\r\n\r\n setValue(value: any): void {\r\n if (this.config.allowNumbersOnly && isNaN(value)) {\r\n return;\r\n }\r\n this.otpForm.reset();\r\n if (!value) {\r\n this._rebuildValue();\r\n return;\r\n }\r\n value = value.toString().replace(/\\s/g, ''); // remove whitespace\r\n Array.from(value).forEach((c, idx) => {\r\n if (this.otpForm.get(this._getControlName(idx))) {\r\n this.otpForm.get(this._getControlName(idx))!.setValue(c);\r\n }\r\n });\r\n if (!this.config.disableAutoFocus) {\r\n setTimeout(() => {\r\n const containerItem = this._document.getElementById(`c_${this.componentKey}`);\r\n var indexOfElementToFocus = value.length < this.config.length ? value.length : (this.config.length - 1);\r\n let ele: any = containerItem!.getElementsByClassName('cmat-otp-input')[indexOfElementToFocus];\r\n if (ele?.focus) {\r\n setTimeout(() => {\r\n ele.focus();\r\n }, 1);\r\n }\r\n }, 0);\r\n\r\n }\r\n this._rebuildValue();\r\n }\r\n\r\n handlePaste(e: any): void {\r\n // Get pasted data via clipboard API\r\n let clipboardData = e.clipboardData ?? (window as any)['clipboardData'];\r\n if (clipboardData) {\r\n var pastedData = clipboardData.getData('Text');\r\n }\r\n e.stopPropagation();\r\n e.preventDefault();\r\n if (!pastedData || (this.config.allowNumbersOnly && !this.validateNumber(pastedData))) {\r\n return;\r\n }\r\n this.setValue(pastedData);\r\n }\r\n\r\n getFormControl(key: string): FormControl {\r\n return this.otpForm.controls[key] as FormControl;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n private _onModelChange: (value: any) => void = () => { };\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n private _onTouchedChange: () => any = () => { };\r\n\r\n private _getControlName(idx: number): string {\r\n return `ctrl_${idx}`;\r\n }\r\n\r\n private _clearInput(eleId: string | null, inputIdx: number): void {\r\n let ctrlName = this._getControlName(inputIdx);\r\n this.otpForm.controls[ctrlName]?.setValue(null);\r\n if (eleId) {\r\n const ele = this._document.getElementById(eleId);\r\n if (ele && ele instanceof HTMLInputElement) {\r\n ele.value = '';\r\n }\r\n }\r\n }\r\n\r\n private _setSelected(eleId: string): void {\r\n this.focusTo(eleId);\r\n const ele: any = this._document.getElementById(eleId);\r\n if (ele?.setSelectionRange) {\r\n setTimeout(() => {\r\n ele.setSelectionRange(0, 1);\r\n }, 0);\r\n }\r\n }\r\n\r\n private ifValidKeyCode(event: any): boolean | string {\r\n const inp = event.key;\r\n if (this.config?.allowNumbersOnly) {\r\n return this.validateNumber(inp);\r\n }\r\n const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);\r\n return isMobile ||\r\n (/^[a-zA-Z0-9%*_\\-@#$!]$/.test(inp) && inp.length == 1);\r\n }\r\n\r\n\r\n private _rebuildValue(): void {\r\n let val: string | null = null;\r\n ObjectUtil.keys(this.otpForm.controls).forEach((k) => {\r\n let ctrlVal = this.otpForm.controls[k].value;\r\n if (ctrlVal) {\r\n let isLengthExceed = ctrlVal.length > 1;\r\n let isCaseTransformEnabled = !this.config.allowNumbersOnly && this.config.letterCase && (this.config.letterCase.toLocaleLowerCase() == 'upper' || this.config.letterCase.toLocaleLowerCase() == 'lower');\r\n ctrlVal = ctrlVal[0];\r\n let transformedVal = isCaseTransformEnabled ? this.config.letterCase?.toLocaleLowerCase() == 'upper' ? ctrlVal.toUpperCase() : ctrlVal.toLowerCase() : ctrlVal;\r\n if (isCaseTransformEnabled && transformedVal == ctrlVal) {\r\n isCaseTransformEnabled = false;\r\n } else {\r\n ctrlVal = transformedVal;\r\n }\r\n if (val == null) {\r\n val = ctrlVal;\r\n } else {\r\n val += ctrlVal;\r\n }\r\n if (isLengthExceed || isCaseTransformEnabled) {\r\n this.otpForm.controls[k].setValue(ctrlVal);\r\n }\r\n }\r\n });\r\n if (this.currentVal != val) {\r\n this.currentVal = val;\r\n this._onModelChange(val);\r\n\r\n this.onInputChange.next(val);\r\n }\r\n }\r\n}\r\n\r\n","@if(otpForm.controls){\r\n<div class=\"cmat-otp-input-wrapper wrapper {{config.containerClass}}\" id=\"c_{{componentKey}}\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\" [ngStyle]=\"config.containerStyles\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut()\">\r\n <div class=\"n-o-c\">\r\n @for (item of controlKeys; track $index) {\r\n <input #inp class=\"cmat-otp-input {{config.inputClass}}\" autocomplete=\"one-time-code\" [pattern]=\"config.allowNumbersOnly ? '\\\\d*' : ''\"\r\n [type]=\"inputType\" [placeholder]=\"config.placeholder || ''\"\r\n [ngStyle]=\"config.inputStyles\" [id]=\"getBoxId($index)\"\r\n [ngClass]=\"{'error-input': (config.showError && errorState)}\"\r\n [formControl]=\"getFormControl(item)\" (paste)=\"handlePaste($event)\" (keyup)=\"onKeyUp($event,$index)\"\r\n (input)=\"onInput($event,$index)\" (keydown)=\"onKeyDown($event,$index)\">\r\n @if(config.separator && !$last){\r\n {{config.separator}}\r\n }\r\n }\r\n </div>\r\n</div>\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAAa,YAAY,CAAA;IACrB,OAAO,KAAK,CAAC,KAAoB,EAAA;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC;;IAEnC,OAAO,QAAQ,CAAC,KAAoB,EAAA;QAChC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,CAAC;;IAE1C,OAAO,WAAW,CAAC,KAAoB,EAAA;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC;;IAEzC,OAAO,YAAY,CAAC,KAAoB,EAAA;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,kBAAkB,CAAC;;IAEhD,OAAO,WAAW,CAAC,KAAoB,EAAA;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,gBAAgB,CAAC;;IAE9C,OAAO,UAAU,CAAC,KAAoB,EAAA;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,CAAC,CAAA;;AAE1C,IAAA,OAAO,KAAK,CAAC,KAAoB,EA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UAAA,EAAA,CAAA;kBAVjC,SAAS;+BACI,gBAAgB,EAAA,QAAA,EAGhB,cAAc,EAAA,OAAA,EACf,CAAC,YAAY,EAAE,mBAAmB,CAAC,EAAA,SAAA,EACjC,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAuB,qBAAA,EAAE,CAAC,EAAA,aAAA,EAClE,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kjCAAA,EAAA,MAAA,EAAA,CAAA,wrBAAA,CAAA,EAAA;;0BAuBlC;;0BAAY;;0BAAqC,MAAM;2BAAC,QAAQ;mEAlBtE,EAAE,EAAA,CAAA;sBAFR,WAAW;uBAAC,SAAS;;sBACrB;gBAGS,MAAM,EAAA,CAAA;sBAAf;gBACS,aAAa,EAAA,CAAA;sBAAtB;gBACQ,MAAM,EAAA,CAAA;sBAAd;gBA+HG,WAAW,EAAA,CAAA;sBADd;gBAWG,KAAK,EAAA,CAAA;sBADR;gBAwBG,QAAQ,EAAA,CAAA;sBADX;gBASG,QAAQ,EAAA,CAAA;sBADX;;;AEvNL;;AAEG;;;;"}
1
+ {"version":3,"file":"cmat-components-opt-input.mjs","sources":["../../../projects/cmat/components/opt-input/utils/keyboard-util.ts","../../../projects/cmat/components/opt-input/utils/object-util.ts","../../../projects/cmat/components/opt-input/otp-input.component.ts","../../../projects/cmat/components/opt-input/otp-input.component.html","../../../projects/cmat/components/opt-input/cmat-components-opt-input.ts"],"sourcesContent":["export class KeyboardUtil {\r\n static ifTab(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'Tab');\r\n }\r\n static ifDelete(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'Delete;Del');\r\n }\r\n static ifBackspace(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'Backspace');\r\n }\r\n static ifRightArrow(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'ArrowRight;Right')\r\n }\r\n static ifLeftArrow(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'ArrowLeft;Left')\r\n }\r\n static ifSpacebar(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'Spacebar; ')//don't remove the space after ; as this will check for space key\r\n }\r\n static ifKey(event: KeyboardEvent, keys: string): boolean {\r\n let keysToCheck = keys.split(';');\r\n return keysToCheck.some(k => k === event.key);\r\n }\r\n}\r\n","export class ObjectUtil{\r\n static keys(obj:any):string[]{\r\n if(!obj) return [];\r\n return Object.keys(obj);\r\n }\r\n}\r\n","/* eslint-disable @angular-eslint/no-output-on-prefix */\r\n/* eslint-disable @typescript-eslint/member-ordering */\r\nimport { coerceBooleanProperty, BooleanInput } from '@angular/cdk/coercion';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Component, Input, Output, AfterViewInit, OnDestroy, OnChanges, SimpleChanges, ChangeDetectionStrategy, ViewEncapsulation, HostBinding, DOCUMENT, inject } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule, ControlValueAccessor, FormBuilder, UntypedFormGroup, NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { isNil } from 'lodash';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { OptInputConfig } from './models/config';\r\nimport { KeyboardUtil } from './utils/keyboard-util';\r\nimport { ObjectUtil } from './utils/object-util';\r\n\r\nlet NEXT_ID = 0;\r\n\r\n@Component({\r\n selector: 'cmat-otp-input',\r\n templateUrl: './otp-input.component.html',\r\n styleUrls: ['./otp-input.component.scss'],\r\n exportAs: 'cmatOtpInput',\r\n imports: [CommonModule, ReactiveFormsModule],\r\n providers: [{ provide: MatFormFieldControl, useExisting: CmatOtpInputComponent }],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class CmatOtpInputComponent implements MatFormFieldControl<any>, AfterViewInit, OnDestroy, OnChanges, ControlValueAccessor {\r\n @HostBinding('attr.id')\r\n @Input()\r\n public id = `cmat-otp-input-${NEXT_ID++}`;\r\n\r\n @Output() onBlur = new Subject<void>();\r\n @Output() onInputChange = new Subject<string | null>();\r\n @Input() config: OptInputConfig = { length: 4 };\r\n\r\n otpForm: UntypedFormGroup;\r\n currentVal: string | null;\r\n\r\n componentKey = Math.random()\r\n .toString(36)\r\n .substring(2) + new Date().getTime().toString(36);\r\n\r\n readonly stateChanges: Subject<void> = new Subject<void>();\r\n focused: boolean = false;\r\n\r\n ngControl = inject(NgControl, { optional: true, self: true })!;\r\n private _document = inject<Document>(DOCUMENT);\r\n private _formBuilder = inject(FormBuilder);\r\n private _unsubscribeAll: Subject<void> = new Subject<void>();\r\n private _activeFocusCount = 0;\r\n\r\n constructor() {\r\n this.otpForm = this._formBuilder.group({});\r\n\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n get inputType(): string {\r\n return this.config?.isPasswordInput\r\n ? 'password'\r\n : this.config?.allowNumbersOnly\r\n ? 'tel'\r\n : 'text';\r\n }\r\n get controlKeys(): string[] { return ObjectUtil.keys(this.otpForm?.controls) };\r\n\r\n get errorState(): boolean {\r\n if (this.ngControl == null)\r\n return false;\r\n\r\n return (this.ngControl.invalid && ((this.ngControl.dirty ?? false) || this.ngControl.touched)) ?? false;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.config) {\r\n if (this.config.length !== ((this.otpForm?.controls as any).length ?? 0)) {\r\n this.otpForm = this._formBuilder.group({});\r\n for (let index = 0; index < this.config.length; index++) {\r\n this.otpForm.addControl(this._getControlName(index), new FormControl());\r\n }\r\n this.otpForm.valueChanges.pipe(takeUntil(this._unsubscribeAll)).subscribe(() => {\r\n ObjectUtil.keys(this.otpForm.controls).forEach((k) => {\r\n var val = this.otpForm.controls[k].value;\r\n if (val && val.length > 1) {\r\n if (val.length >= this.config.length) {\r\n this.setValue(val);\r\n } else {\r\n this._rebuildValue();\r\n }\r\n }\r\n });\r\n });\r\n }\r\n }\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n if (this.otpForm) {\r\n if (isDisabled) {\r\n this.otpForm.disable({ emitEvent: false });\r\n } else {\r\n this.otpForm.enable({ emitEvent: false });\r\n }\r\n }\r\n }\r\n writeValue(value: string): void {\r\n this.currentVal = value || null;\r\n if (this.otpForm && this.currentVal) {\r\n this.setValue(this.currentVal);\r\n }\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this._onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this._onTouchedChange = fn;\r\n }\r\n\r\n onFocusIn(): void {\r\n this._onTouchedChange();\r\n this._activeFocusCount++;\r\n\r\n if (!this.focused) {\r\n this.focused = true;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n onFocusOut(): void {\r\n setTimeout(() => {\r\n this._activeFocusCount--;\r\n if (this._activeFocusCount === 0) {\r\n this.focused = false;\r\n this._onTouchedChange();\r\n this.onBlur.next();\r\n this.stateChanges.next();\r\n }\r\n }, 0);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (!this.config.disableAutoFocus) {\r\n const containerItem = this._document.getElementById(`c_${this.componentKey}`);\r\n if (containerItem) {\r\n const ele: any = containerItem.getElementsByClassName('cmat-otp-input')[0];\r\n if (ele?.focus) {\r\n ele.focus();\r\n }\r\n }\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.stateChanges.complete();\r\n this._unsubscribeAll.next(void 0);\r\n this._unsubscribeAll.complete();\r\n }\r\n\r\n\r\n @Input()\r\n get placeholder(): string {\r\n return this._placeholder;\r\n }\r\n set placeholder(value: string) {\r\n this._placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n private _placeholder: string = '';\r\n\r\n @Input()\r\n get value(): any {\r\n return this._value;\r\n }\r\n set value(value: any) {\r\n if (value !== this.value) {\r\n this._value = value;\r\n\r\n this.stateChanges.next();\r\n\r\n this._onModelChange(value);\r\n }\r\n }\r\n protected _value: any;\r\n\r\n get empty(): boolean {\r\n return !this._value;\r\n }\r\n\r\n get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n @Input()\r\n get required(): boolean { return this._required; }\r\n set required(value: any) {\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n protected _required = false;\r\n\r\n @Input()\r\n get disabled(): boolean {\r\n if (!isNil(this.ngControl?.disabled)) {\r\n return this.ngControl.disabled;\r\n }\r\n return this._disabled;\r\n }\r\n set disabled(value: BooleanInput) {\r\n this._disabled = coerceBooleanProperty(value);\r\n\r\n this.setDisabledState(this._disabled);\r\n\r\n if (this.focused) {\r\n this.focused = false;\r\n this.stateChanges.next();\r\n }\r\n }\r\n protected _disabled = false;\r\n\r\n setDescribedByIds(ids: string[]): void {\r\n const containerItem = this._document.getElementById(`c_${this.componentKey}`);\r\n\r\n if (containerItem) {\r\n if (ids.length) {\r\n containerItem.setAttribute('aria-describedby', ids.join(' '));\r\n } else {\r\n containerItem.removeAttribute('aria-describedby');\r\n }\r\n }\r\n }\r\n\r\n onContainerClick(): void {\r\n const containerItem = this._document.getElementById(`c_${this.componentKey}`);\r\n\r\n if (!this.focused && containerItem) {\r\n containerItem.focus();\r\n }\r\n }\r\n\r\n onKeyDown($event: any, inputIdx: number): any {\r\n const prevInputId = this.getBoxId(inputIdx - 1);\r\n const currentInputId = this.getBoxId(inputIdx);\r\n const nextInputId = this.getBoxId(inputIdx + 1);\r\n if (KeyboardUtil.ifSpacebar($event)) {\r\n $event.preventDefault();\r\n return false;\r\n }\r\n if (KeyboardUtil.ifBackspace($event)) {\r\n if (!$event.target.value) {\r\n this._clearInput(prevInputId, inputIdx - 1);\r\n this._setSelected(prevInputId);\r\n } else {\r\n this._clearInput(currentInputId, inputIdx);\r\n }\r\n this._rebuildValue();\r\n return;\r\n }\r\n if (KeyboardUtil.ifDelete($event)) {\r\n if (!$event.target.value) {\r\n this._clearInput(prevInputId, inputIdx - 1);\r\n this._setSelected(prevInputId);\r\n } else {\r\n this._clearInput(currentInputId, inputIdx);\r\n }\r\n this._rebuildValue();\r\n return;\r\n }\r\n if (this.ifValidKeyCode($event)) {\r\n $event.target.value = $event.key;\r\n let ctrlName = this._getControlName(inputIdx);\r\n this.otpForm.controls[ctrlName]?.setValue($event.key);\r\n $event.preventDefault();\r\n this._setSelected(nextInputId);\r\n this._rebuildValue();\r\n }\r\n }\r\n onInput($event: any, inputIdx: number): void {\r\n let newVal = this.currentVal ? `${this.currentVal}${$event.target.value}` : $event.target.value;\r\n if (this.config.allowNumbersOnly && !this.validateNumber(newVal)) {\r\n $event.target.value = null;\r\n $event.stopPropagation();\r\n $event.preventDefault();\r\n this._clearInput(null, inputIdx);\r\n }\r\n }\r\n\r\n\r\n onKeyUp($event: any, inputIdx: number): void {\r\n if (KeyboardUtil.ifTab($event)) {\r\n inputIdx -= 1;\r\n }\r\n const nextInputId = this.getBoxId(inputIdx + 1);\r\n const prevInputId = this.getBoxId(inputIdx - 1);\r\n if (KeyboardUtil.ifRightArrow($event)) {\r\n $event.preventDefault();\r\n this._setSelected(nextInputId);\r\n return;\r\n }\r\n if (KeyboardUtil.ifLeftArrow($event)) {\r\n $event.preventDefault();\r\n this._setSelected(prevInputId);\r\n return;\r\n }\r\n\r\n if (!$event.target.value) {\r\n return;\r\n }\r\n }\r\n\r\n validateNumber(val: string): boolean | string {\r\n return val && /^[0-9]+$/.test(val);\r\n }\r\n\r\n getBoxId(idx: string | number): string {\r\n return `otp_${idx}_${this.componentKey}`;\r\n }\r\n\r\n focusTo(eleId: string): void {\r\n const ele: any = this._document.getElementById(eleId);\r\n if (ele) {\r\n ele.focus();\r\n }\r\n }\r\n\r\n setValue(value: any): void {\r\n if (this.config.allowNumbersOnly && isNaN(value)) {\r\n return;\r\n }\r\n this.otpForm.reset();\r\n if (!value) {\r\n this._rebuildValue();\r\n return;\r\n }\r\n value = value.toString().replace(/\\s/g, ''); // remove whitespace\r\n Array.from(value).forEach((c, idx) => {\r\n if (this.otpForm.get(this._getControlName(idx))) {\r\n this.otpForm.get(this._getControlName(idx))!.setValue(c);\r\n }\r\n });\r\n if (!this.config.disableAutoFocus) {\r\n setTimeout(() => {\r\n const containerItem = this._document.getElementById(`c_${this.componentKey}`);\r\n var indexOfElementToFocus = value.length < this.config.length ? value.length : (this.config.length - 1);\r\n let ele: any = containerItem!.getElementsByClassName('cmat-otp-input')[indexOfElementToFocus];\r\n if (ele?.focus) {\r\n setTimeout(() => {\r\n ele.focus();\r\n }, 1);\r\n }\r\n }, 0);\r\n\r\n }\r\n this._rebuildValue();\r\n }\r\n\r\n handlePaste(e: any): void {\r\n // Get pasted data via clipboard API\r\n let clipboardData = e.clipboardData ?? (window as any)['clipboardData'];\r\n if (clipboardData) {\r\n var pastedData = clipboardData.getData('Text');\r\n }\r\n e.stopPropagation();\r\n e.preventDefault();\r\n if (!pastedData || (this.config.allowNumbersOnly && !this.validateNumber(pastedData))) {\r\n return;\r\n }\r\n this.setValue(pastedData);\r\n }\r\n\r\n getFormControl(key: string): FormControl {\r\n return this.otpForm.controls[key] as FormControl;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n private _onModelChange: (value: any) => void = () => { };\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n private _onTouchedChange: () => any = () => { };\r\n\r\n private _getControlName(idx: number): string {\r\n return `ctrl_${idx}`;\r\n }\r\n\r\n private _clearInput(eleId: string | null, inputIdx: number): void {\r\n let ctrlName = this._getControlName(inputIdx);\r\n this.otpForm.controls[ctrlName]?.setValue(null);\r\n if (eleId) {\r\n const ele = this._document.getElementById(eleId);\r\n if (ele && ele instanceof HTMLInputElement) {\r\n ele.value = '';\r\n }\r\n }\r\n }\r\n\r\n private _setSelected(eleId: string): void {\r\n this.focusTo(eleId);\r\n const ele: any = this._document.getElementById(eleId);\r\n if (ele?.setSelectionRange) {\r\n setTimeout(() => {\r\n ele.setSelectionRange(0, 1);\r\n }, 0);\r\n }\r\n }\r\n\r\n private ifValidKeyCode(event: any): boolean | string {\r\n const inp = event.key;\r\n if (this.config?.allowNumbersOnly) {\r\n return this.validateNumber(inp);\r\n }\r\n const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);\r\n return isMobile ||\r\n (/^[a-zA-Z0-9%*_\\-@#$!]$/.test(inp) && inp.length == 1);\r\n }\r\n\r\n\r\n private _rebuildValue(): void {\r\n let val: string | null = null;\r\n ObjectUtil.keys(this.otpForm.controls).forEach((k) => {\r\n let ctrlVal = this.otpForm.controls[k].value;\r\n if (ctrlVal) {\r\n let isLengthExceed = ctrlVal.length > 1;\r\n let isCaseTransformEnabled = !this.config.allowNumbersOnly && this.config.letterCase && (this.config.letterCase.toLocaleLowerCase() == 'upper' || this.config.letterCase.toLocaleLowerCase() == 'lower');\r\n ctrlVal = ctrlVal[0];\r\n let transformedVal = isCaseTransformEnabled ? this.config.letterCase?.toLocaleLowerCase() == 'upper' ? ctrlVal.toUpperCase() : ctrlVal.toLowerCase() : ctrlVal;\r\n if (isCaseTransformEnabled && transformedVal == ctrlVal) {\r\n isCaseTransformEnabled = false;\r\n } else {\r\n ctrlVal = transformedVal;\r\n }\r\n if (val == null) {\r\n val = ctrlVal;\r\n } else {\r\n val += ctrlVal;\r\n }\r\n if (isLengthExceed || isCaseTransformEnabled) {\r\n this.otpForm.controls[k].setValue(ctrlVal);\r\n }\r\n }\r\n });\r\n if (this.currentVal != val) {\r\n this.currentVal = val;\r\n this._onModelChange(val);\r\n\r\n this.onInputChange.next(val);\r\n }\r\n }\r\n}\r\n\r\n","@if(otpForm.controls){\r\n<div class=\"cmat-otp-input-wrapper wrapper {{config.containerClass}}\" id=\"c_{{componentKey}}\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\" [ngStyle]=\"config.containerStyles\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut()\">\r\n <div class=\"n-o-c\">\r\n @for (item of controlKeys; track $index) {\r\n <input #inp class=\"cmat-otp-input {{config.inputClass}}\" autocomplete=\"one-time-code\" [pattern]=\"config.allowNumbersOnly ? '\\\\d*' : ''\"\r\n [type]=\"inputType\" [placeholder]=\"config.placeholder || ''\"\r\n [ngStyle]=\"config.inputStyles\" [id]=\"getBoxId($index)\"\r\n [ngClass]=\"{'error-input': (config.showError && errorState)}\"\r\n [formControl]=\"getFormControl(item)\" (paste)=\"handlePaste($event)\" (keyup)=\"onKeyUp($event,$index)\"\r\n (input)=\"onInput($event,$index)\" (keydown)=\"onKeyDown($event,$index)\">\r\n @if(config.separator && !$last){\r\n {{config.separator}}\r\n }\r\n }\r\n </div>\r\n</div>\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAAa,YAAY,CAAA;IACrB,OAAO,KAAK,CAAC,KAAoB,EAAA;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC;;IAEnC,OAAO,QAAQ,CAAC,KAAoB,EAAA;QAChC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,CAAC;;IAE1C,OAAO,WAAW,CAAC,KAAoB,EAAA;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC;;IAEzC,OAAO,YAAY,CAAC,KAAoB,EAAA;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,kBAAkB,CAAC;;IAEhD,OAAO,WAAW,CAAC,KAAoB,EAAA;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,gBAAgB,CAAC;;IAE9C,OAAO,UAAU,CAAC,KAAoB,EAAA;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,CAAC,CAAA;;AAE1C,IAAA,OAAO,KAAK,CAAC,KAAoB,EAAE,IAAY,EAAA;QAC3C,IAAI,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;AACjC,QAAA,OAAO,WAAW,CAAC,IAA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AAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kjCAAA,EAAA,MAAA,EAAA,CAAA,qsBAAA,CAAA,EAAA;wDAKxC,EAAE,EAAA,CAAA;sBAFR,WAAW;uBAAC,SAAS;;sBACrB;gBAGS,MAAM,EAAA,CAAA;sBAAf;gBACS,aAAa,EAAA,CAAA;sBAAtB;gBACQ,MAAM,EAAA,CAAA;sBAAd;gBAmIG,WAAW,EAAA,CAAA;sBADd;gBAWG,KAAK,EAAA,CAAA;sBADR;gBAwBG,QAAQ,EAAA,CAAA;sBADX;gBASG,QAAQ,EAAA,CAAA;sBADX;;;AE5ML;;AAEG;;;;"}
@@ -26,10 +26,10 @@ class CmatChartNodeComponent {
26
26
  this.containerClass = `cmat-org-connector-${this.direction} `;
27
27
  }
28
28
  }
29
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatChartNodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: CmatChartNodeComponent, isStandalone: true, selector: "cmat-org-chart-node", inputs: { node: "node", hasParent: "hasParent", enableControlHeight: "enableControlHeight", direction: "direction", detailsBtnTitle: "detailsBtnTitle" }, outputs: { detailsBtnClick: "detailsBtnClick" }, exportAs: ["cmatOrgChartNode"], usesOnChanges: true, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@if(hasParent){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass\" [style.height]=\"connectorToParentHeight\"></div>\r\n}\r\n<div class=\"cmat-org-box cmat-org-border cmat-org-background\" [ngClass]=\"node.cssClass\">\r\n @if(node.image!==''){\r\n <div class=\"cmat-org-image\" [style]=\"{ 'background-image': 'url(\\'' + node.image + '\\')' }\"\r\n [style.border-color]=\"node.color\"></div>\r\n }@else {\r\n <div class=\"text-center\">\r\n <mat-icon class=\"icon-size-16\" [svgIcon]=\"'heroicons_outline:user-circle'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <div class=\"cmat-org-container\">\r\n <div class=\"cmat-org-title\" [innerHTML]=\"node.title\" [style.color]=\"node.color\"></div>\r\n <div class=\"cmat-org-name\" [innerHTML]=\"node.name\"></div>\r\n \r\n @if(node.showDetail){\r\n <div class=\"button-container\">\r\n <button mat-flat-button class=\"cmat-org-btn cmat-org-btn-details\" color=\"primary\"\r\n (click)=\"detailsBtnClick.emit(node)\">\r\n {{ detailsBtnTitle }}\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n@if(node.children.length){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass\"></div>\r\n}", styles: ["cmat-org-chart-node{display:flex;align-items:center}.cmat-org-box{width:16em;height:16em;box-sizing:border-box;overflow:overlay;position:relative}.cmat-org-container{display:flex;flex-direction:column;align-items:center}.cmat-org-title,.cmat-org-name,.button-container{flex:1}.cmat-org-title{margin-top:.5em}.cmat-org-name{margin:.3em 0}.button-container{display:flex;flex-direction:row;justify-content:center;align-items:center;position:absolute;bottom:1em;width:100%}.cmat-org-image{background-repeat:round;width:4em;height:4em;background-color:transparent!important;border-radius:50%;padding:.25em;border:3px solid var(--cmat-text-hint);margin:4px auto auto}.cmat-org-title{font-size:1.1rem;font-weight:700;text-align:center}.cmat-org-name{text-align:center;margin-bottom:8px!important}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
29
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatChartNodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.2", type: CmatChartNodeComponent, isStandalone: true, selector: "cmat-org-chart-node", inputs: { node: "node", hasParent: "hasParent", enableControlHeight: "enableControlHeight", direction: "direction", detailsBtnTitle: "detailsBtnTitle" }, outputs: { detailsBtnClick: "detailsBtnClick" }, exportAs: ["cmatOrgChartNode"], usesOnChanges: true, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@if(hasParent){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass\" [style.height]=\"connectorToParentHeight\"></div>\r\n}\r\n<div class=\"cmat-org-box cmat-org-border cmat-org-background\" [ngClass]=\"node.cssClass\">\r\n @if(node.image!==''){\r\n <div class=\"cmat-org-image\" [style]=\"{ 'background-image': 'url(\\'' + node.image + '\\')' }\"\r\n [style.border-color]=\"node.color\"></div>\r\n }@else {\r\n <div class=\"text-center\">\r\n <mat-icon class=\"icon-size-16\" [svgIcon]=\"'heroicons_outline:user-circle'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <div class=\"cmat-org-container\">\r\n <div class=\"cmat-org-title\" [innerHTML]=\"node.title\" [style.color]=\"node.color\"></div>\r\n <div class=\"cmat-org-name\" [innerHTML]=\"node.name\"></div>\r\n \r\n @if(node.showDetail){\r\n <div class=\"button-container\">\r\n <button mat-flat-button class=\"cmat-org-btn cmat-org-btn-details\" color=\"primary\"\r\n (click)=\"detailsBtnClick.emit(node)\">\r\n {{ detailsBtnTitle }}\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n@if(node.children.length){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass\"></div>\r\n}", styles: ["cmat-org-chart-node{display:flex;align-items:center}.cmat-org-box{width:16em;height:16em;box-sizing:border-box;overflow:overlay;position:relative}.cmat-org-container{display:flex;flex-direction:column;align-items:center}.cmat-org-title,.cmat-org-name,.button-container{flex:1}.cmat-org-title{margin-top:.5em}.cmat-org-name{margin:.3em 0}.button-container{display:flex;flex-direction:row;justify-content:center;align-items:center;position:absolute;bottom:1em;width:100%}.cmat-org-image{background-repeat:round;width:4em;height:4em;background-color:transparent!important;border-radius:50%;padding:.25em;border:3px solid var(--cmat-text-hint);margin:4px auto auto}.cmat-org-title{font-size:1.1rem;font-weight:700;text-align:center}.cmat-org-name{text-align:center;margin-bottom:8px!important}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
31
31
  }
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatChartNodeComponent, decorators: [{
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatChartNodeComponent, decorators: [{
33
33
  type: Component,
34
34
  args: [{ selector: 'cmat-org-chart-node', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatOrgChartNode', imports: [NgClass, MatIconModule, MatButtonModule], template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@if(hasParent){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass\" [style.height]=\"connectorToParentHeight\"></div>\r\n}\r\n<div class=\"cmat-org-box cmat-org-border cmat-org-background\" [ngClass]=\"node.cssClass\">\r\n @if(node.image!==''){\r\n <div class=\"cmat-org-image\" [style]=\"{ 'background-image': 'url(\\'' + node.image + '\\')' }\"\r\n [style.border-color]=\"node.color\"></div>\r\n }@else {\r\n <div class=\"text-center\">\r\n <mat-icon class=\"icon-size-16\" [svgIcon]=\"'heroicons_outline:user-circle'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <div class=\"cmat-org-container\">\r\n <div class=\"cmat-org-title\" [innerHTML]=\"node.title\" [style.color]=\"node.color\"></div>\r\n <div class=\"cmat-org-name\" [innerHTML]=\"node.name\"></div>\r\n \r\n @if(node.showDetail){\r\n <div class=\"button-container\">\r\n <button mat-flat-button class=\"cmat-org-btn cmat-org-btn-details\" color=\"primary\"\r\n (click)=\"detailsBtnClick.emit(node)\">\r\n {{ detailsBtnTitle }}\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n@if(node.children.length){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass\"></div>\r\n}", styles: ["cmat-org-chart-node{display:flex;align-items:center}.cmat-org-box{width:16em;height:16em;box-sizing:border-box;overflow:overlay;position:relative}.cmat-org-container{display:flex;flex-direction:column;align-items:center}.cmat-org-title,.cmat-org-name,.button-container{flex:1}.cmat-org-title{margin-top:.5em}.cmat-org-name{margin:.3em 0}.button-container{display:flex;flex-direction:row;justify-content:center;align-items:center;position:absolute;bottom:1em;width:100%}.cmat-org-image{background-repeat:round;width:4em;height:4em;background-color:transparent!important;border-radius:50%;padding:.25em;border:3px solid var(--cmat-text-hint);margin:4px auto auto}.cmat-org-title{font-size:1.1rem;font-weight:700;text-align:center}.cmat-org-name{text-align:center;margin-bottom:8px!important}\n"] }]
35
35
  }], propDecorators: { node: [{
@@ -63,10 +63,10 @@ class CmatChartDesignerComponent {
63
63
  this.chartNodeClass = `cmat-org-${this.direction}`;
64
64
  }
65
65
  }
66
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatChartDesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
67
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: CmatChartDesignerComponent, isStandalone: true, selector: "cmat-org-chart-designer", inputs: { node: "node", hasParent: "hasParent", enableControlHeight: "enableControlHeight", direction: "direction", detailsBtnTitle: "detailsBtnTitle" }, outputs: { detailsBtnClick: "detailsBtnClick" }, host: { properties: { "style.flex-direction": "this.hostClass", "style.width": "this.hostWidthClass" } }, exportAs: ["cmatOrgChartDesigner"], usesOnChanges: true, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<cmat-org-chart-node [class]=\"chartNodeClass\" [node]=\"node\" [hasParent]=\"hasParent\"\r\n [enableControlHeight]=\"enableControlHeight\" [direction]=\"direction\" [detailsBtnTitle]=\"detailsBtnTitle\"\r\n (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n</cmat-org-chart-node>\r\n\r\n<div class=\"cmat-org-reports-{{ direction }} cmat-org-reports\">\r\n @for (childNode of node.children; track $index) {\r\n <div class=\"cmat-org-org-container cmat-org-org-container-{{ direction }}\">\r\n <div class=\"cmat-org-connector-container cmat-org-connector-container-{{ direction }}\">\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$first ? 'transparent' : ''\"></div>\r\n <div class=\"cmat-org-border\"></div>\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$last ? 'transparent' : ''\"></div>\r\n </div>\r\n <cmat-org-chart-designer [node]=\"childNode\" [hasParent]=\"true\" [enableControlHeight]=\"enableControlHeight\"\r\n [direction]=\"direction\" [detailsBtnTitle]=\"detailsBtnTitle\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n </cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>", styles: ["cmat-org-chart-designer{display:flex;align-items:center;flex:1}.cmat-org-vertical{flex-direction:column}.cmat-org-org-container{display:flex}.cmat-org-org-container-vertical{flex-direction:column}.cmat-org-connector{flex:1}.cmat-org-connector-container{display:flex}.cmat-org-connector-container-horizontal{flex-direction:column}.cmat-org-reports{display:flex;flex:1}.cmat-org-reports-horizontal{flex-direction:column}.cmat-org-reports-vertical{width:100%}\n"], dependencies: [{ kind: "component", type: i0.forwardRef(() => CmatChartDesignerComponent), selector: "cmat-org-chart-designer", inputs: ["node", "hasParent", "enableControlHeight", "direction", "detailsBtnTitle"], outputs: ["detailsBtnClick"], exportAs: ["cmatOrgChartDesigner"] }, { kind: "component", type: i0.forwardRef(() => CmatChartNodeComponent), selector: "cmat-org-chart-node", inputs: ["node", "hasParent", "enableControlHeight", "direction", "detailsBtnTitle"], outputs: ["detailsBtnClick"], exportAs: ["cmatOrgChartNode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
66
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatChartDesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
67
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.2", type: CmatChartDesignerComponent, isStandalone: true, selector: "cmat-org-chart-designer", inputs: { node: "node", hasParent: "hasParent", enableControlHeight: "enableControlHeight", direction: "direction", detailsBtnTitle: "detailsBtnTitle" }, outputs: { detailsBtnClick: "detailsBtnClick" }, host: { properties: { "style.flex-direction": "this.hostClass", "style.width": "this.hostWidthClass" } }, exportAs: ["cmatOrgChartDesigner"], usesOnChanges: true, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<cmat-org-chart-node [class]=\"chartNodeClass\" [node]=\"node\" [hasParent]=\"hasParent\"\r\n [enableControlHeight]=\"enableControlHeight\" [direction]=\"direction\" [detailsBtnTitle]=\"detailsBtnTitle\"\r\n (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n</cmat-org-chart-node>\r\n\r\n<div class=\"cmat-org-reports-{{ direction }} cmat-org-reports\">\r\n @for (childNode of node.children; track $index) {\r\n <div class=\"cmat-org-org-container cmat-org-org-container-{{ direction }}\">\r\n <div class=\"cmat-org-connector-container cmat-org-connector-container-{{ direction }}\">\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$first ? 'transparent' : ''\"></div>\r\n <div class=\"cmat-org-border\"></div>\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$last ? 'transparent' : ''\"></div>\r\n </div>\r\n <cmat-org-chart-designer [node]=\"childNode\" [hasParent]=\"true\" [enableControlHeight]=\"enableControlHeight\"\r\n [direction]=\"direction\" [detailsBtnTitle]=\"detailsBtnTitle\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n </cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>", styles: ["cmat-org-chart-designer{display:flex;align-items:center;flex:1}.cmat-org-vertical{flex-direction:column}.cmat-org-org-container{display:flex}.cmat-org-org-container-vertical{flex-direction:column}.cmat-org-connector{flex:1}.cmat-org-connector-container{display:flex}.cmat-org-connector-container-horizontal{flex-direction:column}.cmat-org-reports{display:flex;flex:1}.cmat-org-reports-horizontal{flex-direction:column}.cmat-org-reports-vertical{width:100%}\n"], dependencies: [{ kind: "component", type: i0.forwardRef(() => CmatChartDesignerComponent), selector: "cmat-org-chart-designer", inputs: ["node", "hasParent", "enableControlHeight", "direction", "detailsBtnTitle"], outputs: ["detailsBtnClick"], exportAs: ["cmatOrgChartDesigner"] }, { kind: "component", type: i0.forwardRef(() => CmatChartNodeComponent), selector: "cmat-org-chart-node", inputs: ["node", "hasParent", "enableControlHeight", "direction", "detailsBtnTitle"], outputs: ["detailsBtnClick"], exportAs: ["cmatOrgChartNode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
68
68
  }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatChartDesignerComponent, decorators: [{
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatChartDesignerComponent, decorators: [{
70
70
  type: Component,
71
71
  args: [{ selector: 'cmat-org-chart-designer', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatOrgChartDesigner', imports: [CmatChartNodeComponent, forwardRef(() => CmatChartDesignerComponent)], template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<cmat-org-chart-node [class]=\"chartNodeClass\" [node]=\"node\" [hasParent]=\"hasParent\"\r\n [enableControlHeight]=\"enableControlHeight\" [direction]=\"direction\" [detailsBtnTitle]=\"detailsBtnTitle\"\r\n (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n</cmat-org-chart-node>\r\n\r\n<div class=\"cmat-org-reports-{{ direction }} cmat-org-reports\">\r\n @for (childNode of node.children; track $index) {\r\n <div class=\"cmat-org-org-container cmat-org-org-container-{{ direction }}\">\r\n <div class=\"cmat-org-connector-container cmat-org-connector-container-{{ direction }}\">\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$first ? 'transparent' : ''\"></div>\r\n <div class=\"cmat-org-border\"></div>\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$last ? 'transparent' : ''\"></div>\r\n </div>\r\n <cmat-org-chart-designer [node]=\"childNode\" [hasParent]=\"true\" [enableControlHeight]=\"enableControlHeight\"\r\n [direction]=\"direction\" [detailsBtnTitle]=\"detailsBtnTitle\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n </cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>", styles: ["cmat-org-chart-designer{display:flex;align-items:center;flex:1}.cmat-org-vertical{flex-direction:column}.cmat-org-org-container{display:flex}.cmat-org-org-container-vertical{flex-direction:column}.cmat-org-connector{flex:1}.cmat-org-connector-container{display:flex}.cmat-org-connector-container-horizontal{flex-direction:column}.cmat-org-reports{display:flex;flex:1}.cmat-org-reports-horizontal{flex-direction:column}.cmat-org-reports-vertical{width:100%}\n"] }]
72
72
  }], propDecorators: { node: [{
@@ -96,10 +96,10 @@ class CmatOrgChartComponent {
96
96
  this.detailsBtnTitle = '查看详细';
97
97
  this.detailsBtnClick = new EventEmitter();
98
98
  }
99
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatOrgChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
100
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: CmatOrgChartComponent, isStandalone: true, selector: "cmat-org-chart", inputs: { nodes: "nodes", enableControlHeight: "enableControlHeight", direction: "direction", detailsBtnTitle: "detailsBtnTitle" }, outputs: { detailsBtnClick: "detailsBtnClick" }, exportAs: ["cmatOrgChart"], ngImport: i0, template: "<div class=\"cmat-org\">\r\n @for (node of nodes; track $index) {\r\n <div class=\"cmat-org-self-{{ direction }}\">\r\n <cmat-org-chart-designer [node]=\"node\" [direction]=\"direction\" [enableControlHeight]=\"enableControlHeight\"\r\n [detailsBtnTitle]=\"detailsBtnTitle\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\"></cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>", styles: [".cmat-org-horizontal{padding:1em 0}.cmat-org-vertical{padding:0 1em}.cmat-org-border{border:.1em solid var(--cmat-divider);box-sizing:border-box}.cmat-org-box{padding:.5em 1em;border-radius:.2em;box-shadow:0 2px 8px #00000059}.cmat-org-connector-horizontal{width:1em!important;height:0!important}.cmat-org-connector-vertical{width:0!important;height:1em!important}.cmat-org .cmat-org-self-vertical{margin-bottom:2%}\n"], dependencies: [{ kind: "component", type: CmatChartDesignerComponent, selector: "cmat-org-chart-designer", inputs: ["node", "hasParent", "enableControlHeight", "direction", "detailsBtnTitle"], outputs: ["detailsBtnClick"], exportAs: ["cmatOrgChartDesigner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
99
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatOrgChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
100
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.2", type: CmatOrgChartComponent, isStandalone: true, selector: "cmat-org-chart", inputs: { nodes: "nodes", enableControlHeight: "enableControlHeight", direction: "direction", detailsBtnTitle: "detailsBtnTitle" }, outputs: { detailsBtnClick: "detailsBtnClick" }, exportAs: ["cmatOrgChart"], ngImport: i0, template: "<div class=\"cmat-org\">\r\n @for (node of nodes; track $index) {\r\n <div class=\"cmat-org-self-{{ direction }}\">\r\n <cmat-org-chart-designer [node]=\"node\" [direction]=\"direction\" [enableControlHeight]=\"enableControlHeight\"\r\n [detailsBtnTitle]=\"detailsBtnTitle\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\"></cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>", styles: [".cmat-org-horizontal{padding:1em 0}.cmat-org-vertical{padding:0 1em}.cmat-org-border{border:.1em solid var(--cmat-divider);box-sizing:border-box}.cmat-org-box{padding:.5em 1em;border-radius:.2em;box-shadow:0 2px 8px #00000059}.cmat-org-connector-horizontal{width:1em!important;height:0!important}.cmat-org-connector-vertical{width:0!important;height:1em!important}.cmat-org .cmat-org-self-vertical{margin-bottom:2%}\n"], dependencies: [{ kind: "component", type: CmatChartDesignerComponent, selector: "cmat-org-chart-designer", inputs: ["node", "hasParent", "enableControlHeight", "direction", "detailsBtnTitle"], outputs: ["detailsBtnClick"], exportAs: ["cmatOrgChartDesigner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
101
101
  }
102
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatOrgChartComponent, decorators: [{
102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatOrgChartComponent, decorators: [{
103
103
  type: Component,
104
104
  args: [{ selector: 'cmat-org-chart', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatOrgChart', imports: [CmatChartDesignerComponent], template: "<div class=\"cmat-org\">\r\n @for (node of nodes; track $index) {\r\n <div class=\"cmat-org-self-{{ direction }}\">\r\n <cmat-org-chart-designer [node]=\"node\" [direction]=\"direction\" [enableControlHeight]=\"enableControlHeight\"\r\n [detailsBtnTitle]=\"detailsBtnTitle\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\"></cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>", styles: [".cmat-org-horizontal{padding:1em 0}.cmat-org-vertical{padding:0 1em}.cmat-org-border{border:.1em solid var(--cmat-divider);box-sizing:border-box}.cmat-org-box{padding:.5em 1em;border-radius:.2em;box-shadow:0 2px 8px #00000059}.cmat-org-connector-horizontal{width:1em!important;height:0!important}.cmat-org-connector-vertical{width:0!important;height:1em!important}.cmat-org .cmat-org-self-vertical{margin-bottom:2%}\n"] }]
105
105
  }], propDecorators: { nodes: [{
@@ -1,19 +1,19 @@
1
1
  import { NgStyle, DecimalPipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { EventEmitter, Injectable, Output, Input, Directive, ViewEncapsulation, ChangeDetectionStrategy, Component, Pipe } from '@angular/core';
4
- import * as i6 from '@angular/material/button';
3
+ import { EventEmitter, Injectable, inject, ChangeDetectorRef, Output, Input, Directive, ViewEncapsulation, ChangeDetectionStrategy, Component, Pipe } from '@angular/core';
4
+ import * as i5 from '@angular/material/button';
5
5
  import { MatButtonModule } from '@angular/material/button';
6
- import * as i3 from '@angular/material/form-field';
6
+ import * as i2 from '@angular/material/form-field';
7
7
  import { MatFormFieldModule } from '@angular/material/form-field';
8
- import * as i2 from '@angular/material/icon';
8
+ import * as i1 from '@angular/material/icon';
9
9
  import { MatIconModule } from '@angular/material/icon';
10
- import * as i4 from '@angular/material/input';
10
+ import * as i3 from '@angular/material/input';
11
11
  import { MatInputModule } from '@angular/material/input';
12
- import * as i5 from '@angular/material/select';
12
+ import * as i4 from '@angular/material/select';
13
13
  import { MatSelectModule } from '@angular/material/select';
14
14
  import { Subject, takeUntil } from 'rxjs';
15
15
  import { CmatDigitOnlyDirective } from 'cmat/directives/digit-only';
16
- import * as i1 from 'cmat/services/media-watcher';
16
+ import { CmatMediaWatcherService } from 'cmat/services/media-watcher';
17
17
  import { isNil } from 'lodash-es';
18
18
 
19
19
  class CmatPaginationService {
@@ -92,10 +92,10 @@ class CmatPaginationService {
92
92
  }
93
93
  return target;
94
94
  }
95
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPaginationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
96
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPaginationService, providedIn: 'root' }); }
95
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPaginationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
96
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPaginationService, providedIn: 'root' }); }
97
97
  }
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPaginationService, decorators: [{
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPaginationService, decorators: [{
99
99
  type: Injectable,
100
100
  args: [{
101
101
  providedIn: 'root'
@@ -103,14 +103,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
103
103
  }] });
104
104
 
105
105
  class CmatPaginationDirective {
106
- constructor(service, changeDetectorRef) {
107
- this.service = service;
108
- this.changeDetectorRef = changeDetectorRef;
106
+ constructor() {
109
107
  this.maxSize = 7;
110
108
  this.pageChange = new EventEmitter();
111
109
  this.pageBoundsCorrection = new EventEmitter();
112
110
  this.perPageCountChange = new EventEmitter();
113
111
  this.pages = [];
112
+ this.service = inject(CmatPaginationService);
113
+ this.changeDetectorRef = inject(ChangeDetectorRef);
114
114
  this._unsubscribeAll = new Subject();
115
115
  this.service.change.pipe(takeUntil(this._unsubscribeAll))
116
116
  .subscribe((id) => {
@@ -271,17 +271,16 @@ class CmatPaginationDirective {
271
271
  return i;
272
272
  }
273
273
  }
274
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPaginationDirective, deps: [{ token: CmatPaginationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
275
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: CmatPaginationDirective, isStandalone: true, selector: "pagination-template,[pagination-template]", inputs: { id: "id", maxSize: "maxSize" }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection", perPageCountChange: "perPageCountChange" }, exportAs: ["paginationApi"], usesOnChanges: true, ngImport: i0 }); }
274
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPaginationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
275
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.2", type: CmatPaginationDirective, isStandalone: true, selector: "pagination-template,[pagination-template]", inputs: { id: "id", maxSize: "maxSize" }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection", perPageCountChange: "perPageCountChange" }, exportAs: ["paginationApi"], usesOnChanges: true, ngImport: i0 }); }
276
276
  }
277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPaginationDirective, decorators: [{
277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPaginationDirective, decorators: [{
278
278
  type: Directive,
279
279
  args: [{
280
280
  selector: 'pagination-template,[pagination-template]',
281
- exportAs: 'paginationApi',
282
- standalone: true
281
+ exportAs: 'paginationApi'
283
282
  }]
284
- }], ctorParameters: () => [{ type: CmatPaginationService }, { type: i0.ChangeDetectorRef }], propDecorators: { id: [{
283
+ }], ctorParameters: () => [], propDecorators: { id: [{
285
284
  type: Input
286
285
  }], maxSize: [{
287
286
  type: Input
@@ -294,15 +293,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
294
293
  }] } });
295
294
 
296
295
  class CmatPaginationComponent {
297
- constructor(_cmatMediaWatcherService, _changeDetectorRef) {
298
- this._cmatMediaWatcherService = _cmatMediaWatcherService;
299
- this._changeDetectorRef = _changeDetectorRef;
296
+ constructor() {
300
297
  this.pageChange = new EventEmitter();
301
298
  this.pageBoundsCorrection = new EventEmitter();
302
299
  this.perPageCountChange = new EventEmitter();
303
300
  this.maxSize = 7;
304
301
  this.itemsPerPages = [10, 20, 30];
305
302
  this.initPerPage = 10;
303
+ this._cmatMediaWatcherService = inject(CmatMediaWatcherService);
304
+ this._changeDetectorRef = inject(ChangeDetectorRef);
306
305
  this._autoHide = false;
307
306
  this._unsubscribeAll = new Subject();
308
307
  }
@@ -320,13 +319,13 @@ class CmatPaginationComponent {
320
319
  this._changeDetectorRef.markForCheck();
321
320
  });
322
321
  }
323
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPaginationComponent, deps: [{ token: i1.CmatMediaWatcherService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
324
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: CmatPaginationComponent, isStandalone: true, selector: "cmat-pagination", inputs: { id: "id", maxSize: "maxSize", itemsPerPages: "itemsPerPages", initPerPage: "initPerPage", autoHide: "autoHide" }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection", perPageCountChange: "perPageCountChange" }, exportAs: ["cmatPagination"], ngImport: i0, template: "<pagination-template #p=\"paginationApi\" class=\"w-full px-4 py-2 flex\" [id]=\"id\"\r\n [maxSize]=\"isScreenSmall&&maxSize>5?5:maxSize\" (pageChange)=\"pageChange.emit($event)\"\r\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\" (perPageCountChange)=\"perPageCountChange.emit($event)\">\r\n <div class=\"hidden md:flex flex-auto items-center\">\r\n <span>\u603B\u8BA1:{{p.getTotalItems()}}</span>\r\n </div>\r\n <nav role=\"navigation\" class=\"flex min-h-12 w-full md:w-0\">\r\n @if (!(autoHide && p.pages.length <= 1)) {\r\n <ul\r\n class=\"flex flex-row items-center justify-center md:justify-end w-full\">\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===1\"\r\n (click)=\"p.goFirstPage()\">\r\n <mat-icon svgIcon=\"mat_outline:first_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"pr-4\">\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===1\"\r\n (click)=\"p.previous()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_before\"></mat-icon>\r\n </button>\r\n </li>\r\n <div class=\"flex flex-row gap-4\">\r\n @for (page of p.pages; track $index) {\r\n <li class=\"flex text-xl lg:text-2xl\">\r\n @if (p.getCurrent() !== page.value) {\r\n <a tabindex=\"0\" role=\"presentation\"\r\n class=\"cursor-pointer text-gray-400 hover:text-current\" (click)=\"p.setCurrent(page.value)\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </a>\r\n }\r\n @if (p.getCurrent() === page.value) {\r\n <span class=\"text-current\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </span>\r\n }\r\n </li>\r\n }\r\n </div> \r\n <li class=\"pl-4\">\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===p.getLastPage()\"\r\n (click)=\"p.next()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_next\"></mat-icon>\r\n </button>\r\n </li>\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===p.getLastPage()\"\r\n (click)=\"p.goLastPage()\">\r\n <mat-icon svgIcon=\"mat_outline:last_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"hidden md:block px-2\">\r\n <mat-form-field [ngStyle]=\"{'width':((p.getLastPage()?.toString()?.length||0)*8+64)+'px'}\">\r\n <input #current matInput type=\"text\" cmatDigitOnly class=\"text-end\"\r\n [value]=\"p.getCurrent()\" [autocomplete]=\"'off'\" [min]=\"0\" [max]=\"p.getLastPage()||0\"\r\n (keyup.enter)=\"p.setCurrent(current.value)\">\r\n <span matSuffix>/<div class=\"pl-1\">{{p.getLastPage()}}</div></span>\r\n </mat-form-field>\r\n </li>\r\n <li class=\"hidden md:block\">\r\n <mat-form-field class=\"w-24\">\r\n <mat-select #pageCount name=\"pageCount\" [value]=\"initPerPage\"\r\n (selectionChange)=\"p.setItemsPerPage(pageCount.value)\">\r\n @for (perPage of itemsPerPages; track perPage) {\r\n <mat-option [value]=\"perPage\">\r\n {{perPage}}\r\n </mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </li>\r\n </ul>\r\n }\r\n </nav>\r\n </pagination-template>", dependencies: [{ kind: "directive", type: CmatPaginationDirective, selector: "pagination-template,[pagination-template]", inputs: ["id", "maxSize"], outputs: ["pageChange", "pageBoundsCorrection", "perPageCountChange"], exportAs: ["paginationApi"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: CmatDigitOnlyDirective, selector: "[cmatDigitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
322
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
323
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.2", type: CmatPaginationComponent, isStandalone: true, selector: "cmat-pagination", inputs: { id: "id", maxSize: "maxSize", itemsPerPages: "itemsPerPages", initPerPage: "initPerPage", autoHide: "autoHide" }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection", perPageCountChange: "perPageCountChange" }, exportAs: ["cmatPagination"], ngImport: i0, template: "<pagination-template #p=\"paginationApi\" class=\"w-full px-4 py-2 flex\" [id]=\"id\"\r\n [maxSize]=\"isScreenSmall&&maxSize>5?5:maxSize\" (pageChange)=\"pageChange.emit($event)\"\r\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\" (perPageCountChange)=\"perPageCountChange.emit($event)\">\r\n <div class=\"hidden md:flex flex-auto items-center\">\r\n <span>\u603B\u8BA1:{{p.getTotalItems()}}</span>\r\n </div>\r\n <nav role=\"navigation\" class=\"flex min-h-12 w-full md:w-0\">\r\n @if (!(autoHide && p.pages.length <= 1)) {\r\n <ul\r\n class=\"flex flex-row items-center justify-center md:justify-end w-full\">\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===1\"\r\n (click)=\"p.goFirstPage()\">\r\n <mat-icon svgIcon=\"mat_outline:first_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"pr-4\">\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===1\"\r\n (click)=\"p.previous()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_before\"></mat-icon>\r\n </button>\r\n </li>\r\n <div class=\"flex flex-row gap-4\">\r\n @for (page of p.pages; track $index) {\r\n <li class=\"flex text-xl lg:text-2xl\">\r\n @if (p.getCurrent() !== page.value) {\r\n <a tabindex=\"0\" role=\"presentation\"\r\n class=\"cursor-pointer text-gray-400 hover:text-current\" (click)=\"p.setCurrent(page.value)\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </a>\r\n }\r\n @if (p.getCurrent() === page.value) {\r\n <span class=\"text-current\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </span>\r\n }\r\n </li>\r\n }\r\n </div> \r\n <li class=\"pl-4\">\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===p.getLastPage()\"\r\n (click)=\"p.next()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_next\"></mat-icon>\r\n </button>\r\n </li>\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===p.getLastPage()\"\r\n (click)=\"p.goLastPage()\">\r\n <mat-icon svgIcon=\"mat_outline:last_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"hidden md:block px-2\">\r\n <mat-form-field [ngStyle]=\"{'width':((p.getLastPage()?.toString()?.length||0)*8+64)+'px'}\">\r\n <input #current matInput type=\"text\" cmatDigitOnly class=\"text-end\"\r\n [value]=\"p.getCurrent()\" [autocomplete]=\"'off'\" [min]=\"0\" [max]=\"p.getLastPage()||0\"\r\n (keyup.enter)=\"p.setCurrent(current.value)\">\r\n <span matSuffix>/<div class=\"pl-1\">{{p.getLastPage()}}</div></span>\r\n </mat-form-field>\r\n </li>\r\n <li class=\"hidden md:block\">\r\n <mat-form-field class=\"w-24\">\r\n <mat-select #pageCount name=\"pageCount\" [value]=\"initPerPage\"\r\n (selectionChange)=\"p.setItemsPerPage(pageCount.value)\">\r\n @for (perPage of itemsPerPages; track perPage) {\r\n <mat-option [value]=\"perPage\">\r\n {{perPage}}\r\n </mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </li>\r\n </ul>\r\n }\r\n </nav>\r\n </pagination-template>", dependencies: [{ kind: "directive", type: CmatPaginationDirective, selector: "pagination-template,[pagination-template]", inputs: ["id", "maxSize"], outputs: ["pageChange", "pageBoundsCorrection", "perPageCountChange"], exportAs: ["paginationApi"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: CmatDigitOnlyDirective, selector: "[cmatDigitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
325
324
  }
326
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPaginationComponent, decorators: [{
325
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPaginationComponent, decorators: [{
327
326
  type: Component,
328
327
  args: [{ selector: 'cmat-pagination', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'cmatPagination', imports: [CmatPaginationDirective, MatIconModule, NgStyle, MatFormFieldModule, MatInputModule, CmatDigitOnlyDirective, MatSelectModule, DecimalPipe, MatButtonModule], template: "<pagination-template #p=\"paginationApi\" class=\"w-full px-4 py-2 flex\" [id]=\"id\"\r\n [maxSize]=\"isScreenSmall&&maxSize>5?5:maxSize\" (pageChange)=\"pageChange.emit($event)\"\r\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\" (perPageCountChange)=\"perPageCountChange.emit($event)\">\r\n <div class=\"hidden md:flex flex-auto items-center\">\r\n <span>\u603B\u8BA1:{{p.getTotalItems()}}</span>\r\n </div>\r\n <nav role=\"navigation\" class=\"flex min-h-12 w-full md:w-0\">\r\n @if (!(autoHide && p.pages.length <= 1)) {\r\n <ul\r\n class=\"flex flex-row items-center justify-center md:justify-end w-full\">\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===1\"\r\n (click)=\"p.goFirstPage()\">\r\n <mat-icon svgIcon=\"mat_outline:first_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"pr-4\">\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===1\"\r\n (click)=\"p.previous()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_before\"></mat-icon>\r\n </button>\r\n </li>\r\n <div class=\"flex flex-row gap-4\">\r\n @for (page of p.pages; track $index) {\r\n <li class=\"flex text-xl lg:text-2xl\">\r\n @if (p.getCurrent() !== page.value) {\r\n <a tabindex=\"0\" role=\"presentation\"\r\n class=\"cursor-pointer text-gray-400 hover:text-current\" (click)=\"p.setCurrent(page.value)\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </a>\r\n }\r\n @if (p.getCurrent() === page.value) {\r\n <span class=\"text-current\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </span>\r\n }\r\n </li>\r\n }\r\n </div> \r\n <li class=\"pl-4\">\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===p.getLastPage()\"\r\n (click)=\"p.next()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_next\"></mat-icon>\r\n </button>\r\n </li>\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===p.getLastPage()\"\r\n (click)=\"p.goLastPage()\">\r\n <mat-icon svgIcon=\"mat_outline:last_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"hidden md:block px-2\">\r\n <mat-form-field [ngStyle]=\"{'width':((p.getLastPage()?.toString()?.length||0)*8+64)+'px'}\">\r\n <input #current matInput type=\"text\" cmatDigitOnly class=\"text-end\"\r\n [value]=\"p.getCurrent()\" [autocomplete]=\"'off'\" [min]=\"0\" [max]=\"p.getLastPage()||0\"\r\n (keyup.enter)=\"p.setCurrent(current.value)\">\r\n <span matSuffix>/<div class=\"pl-1\">{{p.getLastPage()}}</div></span>\r\n </mat-form-field>\r\n </li>\r\n <li class=\"hidden md:block\">\r\n <mat-form-field class=\"w-24\">\r\n <mat-select #pageCount name=\"pageCount\" [value]=\"initPerPage\"\r\n (selectionChange)=\"p.setItemsPerPage(pageCount.value)\">\r\n @for (perPage of itemsPerPages; track perPage) {\r\n <mat-option [value]=\"perPage\">\r\n {{perPage}}\r\n </mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </li>\r\n </ul>\r\n }\r\n </nav>\r\n </pagination-template>" }]
329
- }], ctorParameters: () => [{ type: i1.CmatMediaWatcherService }, { type: i0.ChangeDetectorRef }], propDecorators: { pageChange: [{
328
+ }], propDecorators: { pageChange: [{
330
329
  type: Output
331
330
  }], pageBoundsCorrection: [{
332
331
  type: Output
@@ -346,8 +345,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
346
345
 
347
346
  const LARGE_NUMBER = Number.MAX_SAFE_INTEGER;
348
347
  class CmatPaginatePipe {
349
- constructor(service) {
350
- this.service = service;
348
+ constructor() {
349
+ this.service = inject(CmatPaginationService);
351
350
  this.state = {};
352
351
  }
353
352
  transform(collection, args) {
@@ -428,17 +427,16 @@ class CmatPaginatePipe {
428
427
  }
429
428
  return state.slice.every((element, index) => element === collection[start + index]);
430
429
  }
431
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPaginatePipe, deps: [{ token: CmatPaginationService }], target: i0.ɵɵFactoryTarget.Pipe }); }
432
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0", ngImport: i0, type: CmatPaginatePipe, isStandalone: true, name: "paginate" }); }
430
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPaginatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
431
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.2", ngImport: i0, type: CmatPaginatePipe, isStandalone: true, name: "paginate" }); }
433
432
  }
434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPaginatePipe, decorators: [{
433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPaginatePipe, decorators: [{
435
434
  type: Pipe,
436
435
  args: [{
437
436
  name: 'paginate',
438
- pure: true,
439
- standalone: true
437
+ pure: true
440
438
  }]
441
- }], ctorParameters: () => [{ type: CmatPaginationService }] });
439
+ }] });
442
440
 
443
441
  /**
444
442
  * Generated bundle index. Do not edit.