@bravura/ui 6.1.0 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/README.md +58 -57
  3. package/fesm2022/bravura-ui-alert.mjs +19 -22
  4. package/fesm2022/bravura-ui-alert.mjs.map +1 -1
  5. package/fesm2022/bravura-ui-behavior.mjs +18 -18
  6. package/fesm2022/bravura-ui-behavior.mjs.map +1 -1
  7. package/fesm2022/bravura-ui-clip-note.mjs +10 -10
  8. package/fesm2022/bravura-ui-clip-note.mjs.map +1 -1
  9. package/fesm2022/bravura-ui-common.mjs +5 -6
  10. package/fesm2022/bravura-ui-common.mjs.map +1 -1
  11. package/fesm2022/bravura-ui-currency-input.mjs +7 -7
  12. package/fesm2022/bravura-ui-currency-input.mjs.map +1 -1
  13. package/fesm2022/bravura-ui-decimal-input.mjs +7 -7
  14. package/fesm2022/bravura-ui-decimal-input.mjs.map +1 -1
  15. package/fesm2022/bravura-ui-discrete-input.mjs +10 -11
  16. package/fesm2022/bravura-ui-discrete-input.mjs.map +1 -1
  17. package/fesm2022/bravura-ui-file-upload.mjs +18 -18
  18. package/fesm2022/bravura-ui-file-upload.mjs.map +1 -1
  19. package/fesm2022/bravura-ui-form-field.mjs +10 -10
  20. package/fesm2022/bravura-ui-form-field.mjs.map +1 -1
  21. package/fesm2022/bravura-ui-icon-font.mjs +7 -7
  22. package/fesm2022/bravura-ui-icon-font.mjs.map +1 -1
  23. package/fesm2022/bravura-ui-panel.mjs +16 -16
  24. package/fesm2022/bravura-ui-panel.mjs.map +1 -1
  25. package/fesm2022/bravura-ui-phone-number.mjs +13 -13
  26. package/fesm2022/bravura-ui-phone-number.mjs.map +1 -1
  27. package/fesm2022/bravura-ui-radio-panel.mjs +12 -14
  28. package/fesm2022/bravura-ui-radio-panel.mjs.map +1 -1
  29. package/fesm2022/bravura-ui-selection-panel.mjs +11 -11
  30. package/fesm2022/bravura-ui-selection-panel.mjs.map +1 -1
  31. package/fesm2022/bravura-ui-skeletons.mjs +10 -10
  32. package/fesm2022/bravura-ui-skeletons.mjs.map +1 -1
  33. package/fesm2022/bravura-ui-stepper.mjs +18 -18
  34. package/fesm2022/bravura-ui-stepper.mjs.map +1 -1
  35. package/fesm2022/bravura-ui-tooltip.mjs +13 -31
  36. package/fesm2022/bravura-ui-tooltip.mjs.map +1 -1
  37. package/package.json +39 -39
  38. package/{alert/testing/test-api.d.ts → types/bravura-ui-alert-testing.d.ts} +8 -4
  39. package/{alert/alert-container.component.d.ts → types/bravura-ui-alert.d.ts} +61 -4
  40. package/types/bravura-ui-behavior.d.ts +233 -0
  41. package/{clip-note/clip-note.directive.d.ts → types/bravura-ui-clip-note.d.ts} +64 -6
  42. package/types/bravura-ui-common.d.ts +26 -0
  43. package/{currency-input/currency-input.directive.d.ts → types/bravura-ui-currency-input.d.ts} +17 -8
  44. package/{decimal-input/decimal-input.directive.d.ts → types/bravura-ui-decimal-input.d.ts} +17 -8
  45. package/{discrete-input/discrete-input.component.d.ts → types/bravura-ui-discrete-input.d.ts} +18 -5
  46. package/{file-upload/file-upload.component.d.ts → types/bravura-ui-file-upload.d.ts} +61 -7
  47. package/{form-field/form-field.component.d.ts → types/bravura-ui-form-field.d.ts} +18 -6
  48. package/{icon-font/icon.directive.d.ts → types/bravura-ui-icon-font.d.ts} +38 -3
  49. package/{panel/panel.component.d.ts → types/bravura-ui-panel.d.ts} +53 -4
  50. package/{phone-number/phone-number.directive.d.ts → types/bravura-ui-phone-number.d.ts} +49 -5
  51. package/{radio-panel/testing/test-api.d.ts → types/bravura-ui-radio-panel-testing.d.ts} +12 -7
  52. package/types/bravura-ui-radio-panel.d.ts +73 -0
  53. package/types/bravura-ui-selection-panel.d.ts +151 -0
  54. package/types/bravura-ui-skeletons.d.ts +81 -0
  55. package/{stepper/stepper.component.d.ts → types/bravura-ui-stepper.d.ts} +37 -4
  56. package/{tooltip/tooltip.directive.d.ts → types/bravura-ui-tooltip.d.ts} +19 -4
  57. package/types/bravura-ui.d.ts +3 -0
  58. package/alert/alert-message.component.d.ts +0 -47
  59. package/alert/alert.module.d.ts +0 -14
  60. package/alert/index.d.ts +0 -5
  61. package/alert/public-api.d.ts +0 -1
  62. package/alert/testing/index.d.ts +0 -5
  63. package/behavior/await.directive.d.ts +0 -71
  64. package/behavior/behavior.module.d.ts +0 -17
  65. package/behavior/index.d.ts +0 -5
  66. package/behavior/observe-content-class.directive.d.ts +0 -29
  67. package/behavior/public-api.d.ts +0 -5
  68. package/behavior/sizing-monitor.directive.d.ts +0 -23
  69. package/behavior/sizing.directive.d.ts +0 -98
  70. package/clip-note/clip-note.component.d.ts +0 -45
  71. package/clip-note/clip-note.module.d.ts +0 -19
  72. package/clip-note/index.d.ts +0 -5
  73. package/clip-note/public-api.d.ts +0 -1
  74. package/common/common-utils.d.ts +0 -11
  75. package/common/common.module.d.ts +0 -11
  76. package/common/index.d.ts +0 -5
  77. package/common/public-api.d.ts +0 -2
  78. package/currency-input/currency-input.module.d.ts +0 -10
  79. package/currency-input/index.d.ts +0 -5
  80. package/currency-input/public-api.d.ts +0 -1
  81. package/decimal-input/decimal-input.module.d.ts +0 -10
  82. package/decimal-input/index.d.ts +0 -5
  83. package/decimal-input/public-api.d.ts +0 -1
  84. package/discrete-input/discrete-input.module.d.ts +0 -11
  85. package/discrete-input/index.d.ts +0 -5
  86. package/discrete-input/public-api.d.ts +0 -2
  87. package/file-upload/file-upload.module.d.ts +0 -14
  88. package/file-upload/file-upload.service.d.ts +0 -42
  89. package/file-upload/index.d.ts +0 -5
  90. package/file-upload/public-api.d.ts +0 -6
  91. package/form-field/form-field.module.d.ts +0 -13
  92. package/form-field/index.d.ts +0 -5
  93. package/form-field/public-api.d.ts +0 -2
  94. package/icon-font/icon-font.module.d.ts +0 -12
  95. package/icon-font/index.d.ts +0 -5
  96. package/icon-font/public-api.d.ts +0 -3
  97. package/icon-font/utilities.d.ts +0 -20
  98. package/index.d.ts +0 -5
  99. package/panel/index.d.ts +0 -5
  100. package/panel/panel-section.component.d.ts +0 -15
  101. package/panel/panel.module.d.ts +0 -16
  102. package/panel/public-api.d.ts +0 -1
  103. package/panel/tinted.directive.d.ts +0 -26
  104. package/phone-number/index.d.ts +0 -5
  105. package/phone-number/phone-number.module.d.ts +0 -17
  106. package/phone-number/phone-number.pipe.d.ts +0 -13
  107. package/phone-number/phone-number.validator.d.ts +0 -31
  108. package/phone-number/public-api.d.ts +0 -1
  109. package/public-api.d.ts +0 -1
  110. package/radio-panel/index.d.ts +0 -5
  111. package/radio-panel/public-api.d.ts +0 -3
  112. package/radio-panel/radio-panel-item.component.d.ts +0 -22
  113. package/radio-panel/radio-panel.component.d.ts +0 -38
  114. package/radio-panel/radio-panel.module.d.ts +0 -15
  115. package/radio-panel/testing/index.d.ts +0 -5
  116. package/selection-panel/index.d.ts +0 -5
  117. package/selection-panel/public-api.d.ts +0 -3
  118. package/selection-panel/selection-panel-item.component.d.ts +0 -77
  119. package/selection-panel/selection-panel.directive.d.ts +0 -67
  120. package/selection-panel/selection-panel.module.d.ts +0 -13
  121. package/skeletons/index.d.ts +0 -5
  122. package/skeletons/public-api.d.ts +0 -3
  123. package/skeletons/skeleton-loader-presets.directive.d.ts +0 -23
  124. package/skeletons/skeleton-loader.component.d.ts +0 -44
  125. package/skeletons/skeletons.module.d.ts +0 -16
  126. package/stepper/index.d.ts +0 -5
  127. package/stepper/public-api.d.ts +0 -3
  128. package/stepper/step-label-top.directive.d.ts +0 -17
  129. package/stepper/stepper-animation.d.ts +0 -6
  130. package/stepper/stepper.module.d.ts +0 -17
  131. package/tooltip/index.d.ts +0 -5
  132. package/tooltip/public-api.d.ts +0 -3
  133. package/tooltip/tooltip.component.d.ts +0 -26
  134. package/tooltip/tooltip.module.d.ts +0 -13
@@ -79,13 +79,13 @@ class DecimalInputDirective {
79
79
  }
80
80
  this._renderer.setProperty(this._el.nativeElement, 'value', newValue);
81
81
  }
82
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DecimalInputDirective, deps: [{ token: i0.ElementRef, self: true }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
83
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: DecimalInputDirective, isStandalone: false, selector: "input[buiDecimalInput]", inputs: { buiDecimalInput: "buiDecimalInput" }, host: { listeners: { "input": "onInput()", "keypress": "onKeypress($event)", "blur": "onblur()" }, properties: { "placeholder": "this.placeholder", "autocomplete": "this.autocomplete", "type": "this.type", "attr.inputmode": "this.inputMode" } }, providers: [
82
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DecimalInputDirective, deps: [{ token: i0.ElementRef, self: true }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
83
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: DecimalInputDirective, isStandalone: false, selector: "input[buiDecimalInput]", inputs: { buiDecimalInput: "buiDecimalInput" }, host: { listeners: { "input": "onInput()", "keypress": "onKeypress($event)", "blur": "onblur()" }, properties: { "placeholder": "this.placeholder", "autocomplete": "this.autocomplete", "type": "this.type", "attr.inputmode": "this.inputMode" } }, providers: [
84
84
  DecimalPipe,
85
85
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DecimalInputDirective), multi: true }
86
86
  ], usesOnChanges: true, ngImport: i0 }); }
87
87
  }
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DecimalInputDirective, decorators: [{
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DecimalInputDirective, decorators: [{
89
89
  type: Directive,
90
90
  args: [{
91
91
  selector: 'input[buiDecimalInput]',
@@ -123,11 +123,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
123
123
  }] } });
124
124
 
125
125
  class DecimalInputModule {
126
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DecimalInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
127
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: DecimalInputModule, declarations: [DecimalInputDirective], imports: [CommonModule], exports: [DecimalInputDirective] }); }
128
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DecimalInputModule, imports: [CommonModule] }); }
126
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DecimalInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
127
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: DecimalInputModule, declarations: [DecimalInputDirective], imports: [CommonModule], exports: [DecimalInputDirective] }); }
128
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DecimalInputModule, imports: [CommonModule] }); }
129
129
  }
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DecimalInputModule, decorators: [{
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DecimalInputModule, decorators: [{
131
131
  type: NgModule,
132
132
  args: [{
133
133
  declarations: [DecimalInputDirective],
@@ -1 +1 @@
1
- {"version":3,"file":"bravura-ui-decimal-input.mjs","sources":["../../../projects/ui/decimal-input/decimal-input.directive.ts","../../../projects/ui/decimal-input/decimal-input.module.ts","../../../projects/ui/decimal-input/bravura-ui-decimal-input.ts"],"sourcesContent":["import { DecimalPipe } from '@angular/common';\r\nimport {\r\n\tDirective,\r\n\tElementRef,\r\n\tforwardRef,\r\n\tHostBinding,\r\n\tHostListener,\r\n\tInput,\r\n\tOnChanges,\r\n\tRenderer2,\r\n\tSelf\r\n} from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { noop } from 'rxjs';\r\n\r\n/* tslint:disable:no-empty */\r\nexport const noop_consumer = (_: any) => {};\r\n\r\n/**\r\n * This directive will enhance an input element to format the numbers entered to a decimal amount.\r\n */\r\n@Directive({\r\n\tselector: 'input[buiDecimalInput]',\r\n\tproviders: [\r\n\t\tDecimalPipe,\r\n\t\t{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DecimalInputDirective), multi: true }\r\n\t],\r\n\tstandalone: false\r\n})\r\nexport class DecimalInputDirective implements OnChanges, ControlValueAccessor {\r\n\t/**\r\n\t * number of decimal places allowed\r\n\t */\r\n\t@Input()\r\n\tbuiDecimalInput: number = 2;\r\n\r\n\t@HostBinding('placeholder')\r\n\tprivate placeholder: string = '';\r\n\r\n\t@HostBinding('autocomplete')\r\n\tprivate autocomplete = 'off';\r\n\r\n\t@HostBinding('type')\r\n\tprivate type = 'number';\r\n\r\n\t@HostBinding('attr.inputmode')\r\n\tprivate inputMode = 'decimal';\r\n\r\n\tprivate change = noop_consumer;\r\n\tprivate onTouch = noop;\r\n\r\n\tconstructor(\r\n\t\t@Self() private _el: ElementRef<HTMLInputElement>,\r\n\t\tprivate _renderer: Renderer2\r\n\t) {}\r\n\r\n\tngOnChanges(): void {\r\n\t\tthis.buiDecimalInput = this.buiDecimalInput || 2;\r\n\t\tthis.onInput();\r\n\t}\r\n\r\n\t@HostListener('input')\r\n\tonInput() {\r\n\t\tconst value = this._el.nativeElement.value;\r\n\r\n\t\tconst decimalPart = value.split('.')[1];\r\n\r\n\t\tif (decimalPart && decimalPart.length > this.buiDecimalInput) {\r\n\t\t\tconst indexOfPeriod = value.indexOf('.');\r\n\t\t\tconst newValue = value.substring(0, indexOfPeriod + this.buiDecimalInput + 1);\r\n\t\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', newValue);\r\n\t\t}\r\n\t\tconst resolvedValue = this._el.nativeElement.value;\r\n\t\tthis.change(\r\n\t\t\tresolvedValue === '' || resolvedValue === null || resolvedValue === undefined ? null : Number(resolvedValue)\r\n\t\t);\r\n\t}\r\n\r\n\t@HostListener('keypress', ['$event'])\r\n\tonKeypress(evt: KeyboardEvent) {\r\n\t\tconst target = evt.target as HTMLInputElement;\r\n\t\tconst value = target.value;\r\n\t\tconst isSpace = evt.key === ' ';\r\n\r\n\t\tif (\r\n\t\t\tisSpace ||\r\n\t\t\t(!['.', '-'].includes(evt.key) && isNaN(Number(evt.key))) ||\r\n\t\t\t(evt.key === '.' && value.indexOf('.') > 0)\r\n\t\t) {\r\n\t\t\tevt.preventDefault();\r\n\t\t}\r\n\t}\r\n\r\n\t@HostListener('blur')\r\n\tonblur() {\r\n\t\tthis.onTouch();\r\n\t\tthis._resetDecimalPlaces();\r\n\t}\r\n\r\n\twriteValue(value: any) {\r\n\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', value);\r\n\t\tthis._resetDecimalPlaces();\r\n\t}\r\n\r\n\tregisterOnChange(fn: any) {\r\n\t\tthis.change = fn;\r\n\t}\r\n\r\n\tregisterOnTouched(fn: any) {\r\n\t\tthis.onTouch = fn;\r\n\t}\r\n\r\n\tprivate _resetDecimalPlaces() {\r\n\t\tconst value = this._el.nativeElement.value;\r\n\t\tif (value === '' || value === null || value === undefined) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst splitValues = value.split('.');\r\n\t\tlet newValue = '';\r\n\t\tif (splitValues[1] && splitValues[1].length > this.buiDecimalInput) {\r\n\t\t\tnewValue = value.substring(0, splitValues[0].length + 1 + this.buiDecimalInput);\r\n\t\t} else {\r\n\t\t\tthis.buiDecimalInput = this.buiDecimalInput < 0 ? 0 : this.buiDecimalInput;\r\n\t\t\tnewValue = Number(value).toFixed(this.buiDecimalInput);\r\n\t\t}\r\n\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', newValue);\r\n\t}\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { DecimalInputDirective } from './decimal-input.directive';\r\n\r\n@NgModule({\r\n\tdeclarations: [DecimalInputDirective],\r\n\timports: [CommonModule],\r\n\texports: [DecimalInputDirective]\r\n})\r\nexport class DecimalInputModule {}\r\nexport { DecimalInputDirective };\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAeA;AACO,MAAM,aAAa,GAAG,CAAC,CAAM,KAAM,GAAC;AAE3C;;AAEG;MASU,qBAAqB,CAAA;IAsBjC,WACiB,CAAA,GAAiC,EACzC,SAAoB,EAAA;QADZ,IAAG,CAAA,GAAA,GAAH,GAAG;QACX,IAAS,CAAA,SAAA,GAAT,SAAS;AAvBlB;;AAEG;QAEH,IAAe,CAAA,eAAA,GAAW,CAAC;QAGnB,IAAW,CAAA,WAAA,GAAW,EAAE;QAGxB,IAAY,CAAA,YAAA,GAAG,KAAK;QAGpB,IAAI,CAAA,IAAA,GAAG,QAAQ;QAGf,IAAS,CAAA,SAAA,GAAG,SAAS;QAErB,IAAM,CAAA,MAAA,GAAG,aAAa;QACtB,IAAO,CAAA,OAAA,GAAG,IAAI;;IAOtB,WAAW,GAAA;QACV,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,IAAI,CAAC;QAChD,IAAI,CAAC,OAAO,EAAE;;IAIf,OAAO,GAAA;QACN,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK;QAE1C,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEvC,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,eAAe,EAAE;YAC7D,MAAM,aAAa,GAAG,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,MAAM;gBAIX,SAAS,EAAA,CAAA;sBADhB,WAAW;uBAAC,gBAAgB;gBAiB7B,OAAO,EAAA,CAAA;sBADN,YAAY;uBAAC,OAAO;gBAkBrB,UAAU,EAAA,CAAA;sBADT,YAAY;uBAAC,UAAU,EAAE,CAAC,QAAQ,CAAC;gBAgBpC,MAAM,EAAA,CAAA;sBADL,YAAY;uBAAC,MAAM;;;MCpFR,kBAAkB,CAAA;+GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAJf,YAAA,EAAA,CAAA,qBAAqB,CAC1B,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAEnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAHpB,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAGV,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,qBAAqB;AAC/B,iBAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"bravura-ui-decimal-input.mjs","sources":["../../../projects/ui/decimal-input/decimal-input.directive.ts","../../../projects/ui/decimal-input/decimal-input.module.ts","../../../projects/ui/decimal-input/bravura-ui-decimal-input.ts"],"sourcesContent":["import { DecimalPipe } from '@angular/common';\nimport {\n\tDirective,\n\tElementRef,\n\tforwardRef,\n\tHostBinding,\n\tHostListener,\n\tInput,\n\tOnChanges,\n\tRenderer2,\n\tSelf\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { noop } from 'rxjs';\n\n/* tslint:disable:no-empty */\nexport const noop_consumer = (_: any) => {};\n\n/**\n * This directive will enhance an input element to format the numbers entered to a decimal amount.\n */\n@Directive({\n\tselector: 'input[buiDecimalInput]',\n\tproviders: [\n\t\tDecimalPipe,\n\t\t{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DecimalInputDirective), multi: true }\n\t],\n\tstandalone: false\n})\nexport class DecimalInputDirective implements OnChanges, ControlValueAccessor {\n\t/**\n\t * number of decimal places allowed\n\t */\n\t@Input()\n\tbuiDecimalInput: number = 2;\n\n\t@HostBinding('placeholder')\n\tplaceholder: string = '';\n\n\t@HostBinding('autocomplete')\n\tautocomplete = 'off';\n\n\t@HostBinding('type')\n\ttype = 'number';\n\n\t@HostBinding('attr.inputmode')\n\tinputMode = 'decimal';\n\n\tprivate change = noop_consumer;\n\tprivate onTouch = noop;\n\n\tconstructor(\n\t\t@Self() private _el: ElementRef<HTMLInputElement>,\n\t\tprivate _renderer: Renderer2\n\t) {}\n\n\tngOnChanges(): void {\n\t\tthis.buiDecimalInput = this.buiDecimalInput || 2;\n\t\tthis.onInput();\n\t}\n\n\t@HostListener('input')\n\tonInput() {\n\t\tconst value = this._el.nativeElement.value;\n\n\t\tconst decimalPart = value.split('.')[1];\n\n\t\tif (decimalPart && decimalPart.length > this.buiDecimalInput) {\n\t\t\tconst indexOfPeriod = value.indexOf('.');\n\t\t\tconst newValue = value.substring(0, indexOfPeriod + this.buiDecimalInput + 1);\n\t\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', newValue);\n\t\t}\n\t\tconst resolvedValue = this._el.nativeElement.value;\n\t\tthis.change(\n\t\t\tresolvedValue === '' || resolvedValue === null || resolvedValue === undefined ? null : Number(resolvedValue)\n\t\t);\n\t}\n\n\t@HostListener('keypress', ['$event'])\n\tonKeypress(evt: KeyboardEvent) {\n\t\tconst target = evt.target as HTMLInputElement;\n\t\tconst value = target.value;\n\t\tconst isSpace = evt.key === ' ';\n\n\t\tif (\n\t\t\tisSpace ||\n\t\t\t(!['.', '-'].includes(evt.key) && isNaN(Number(evt.key))) ||\n\t\t\t(evt.key === '.' && value.indexOf('.') > 0)\n\t\t) {\n\t\t\tevt.preventDefault();\n\t\t}\n\t}\n\n\t@HostListener('blur')\n\tonblur() {\n\t\tthis.onTouch();\n\t\tthis._resetDecimalPlaces();\n\t}\n\n\twriteValue(value: any) {\n\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', value);\n\t\tthis._resetDecimalPlaces();\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.change = fn;\n\t}\n\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouch = fn;\n\t}\n\n\tprivate _resetDecimalPlaces() {\n\t\tconst value = this._el.nativeElement.value;\n\t\tif (value === '' || value === null || value === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tconst splitValues = value.split('.');\n\t\tlet newValue = '';\n\t\tif (splitValues[1] && splitValues[1].length > this.buiDecimalInput) {\n\t\t\tnewValue = value.substring(0, splitValues[0].length + 1 + this.buiDecimalInput);\n\t\t} else {\n\t\t\tthis.buiDecimalInput = this.buiDecimalInput < 0 ? 0 : this.buiDecimalInput;\n\t\t\tnewValue = Number(value).toFixed(this.buiDecimalInput);\n\t\t}\n\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', newValue);\n\t}\n}\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { DecimalInputDirective } from './decimal-input.directive';\r\n\r\n@NgModule({\r\n\tdeclarations: [DecimalInputDirective],\r\n\timports: [CommonModule],\r\n\texports: [DecimalInputDirective]\r\n})\r\nexport class DecimalInputModule {}\r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A,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAJf,YAAA,EAAA,CAAA,qBAAqB,CAC1B,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAEnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAHpB,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGV,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,qBAAqB;AAC/B,iBAAA;;;ACRD;;AAEG;;;;"}
@@ -1,11 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { ElementRef, Input, ViewChildren, Optional, Inject, Self, Component, NgModule } from '@angular/core';
3
- import * as i4 from '@angular/common';
4
3
  import { CommonModule } from '@angular/common';
5
4
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
6
5
  import * as i2 from '@angular/forms';
7
6
  import { UntypedFormControl, Validators, UntypedFormArray, UntypedFormGroup, ReactiveFormsModule } from '@angular/forms';
8
- import * as i5 from '@angular/material/form-field';
7
+ import * as i4 from '@angular/material/form-field';
9
8
  import { MAT_FORM_FIELD, MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';
10
9
  import { Subject } from 'rxjs';
11
10
  import * as i1 from '@angular/cdk/a11y';
@@ -267,15 +266,15 @@ class DiscreteInputComponent {
267
266
  event.preventDefault();
268
267
  this.onContainerClick();
269
268
  }
270
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DiscreteInputComponent, deps: [{ token: i1.FocusMonitor }, { token: i0.ElementRef }, { token: MAT_FORM_FIELD, optional: true }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }], target: i0.ɵɵFactoryTarget.Component }); }
271
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: DiscreteInputComponent, isStandalone: false, selector: "bui-discrete-input", inputs: { type: "type", separator: "separator", accept: "accept", userAriaDescribedBy: ["aria-describedby", "userAriaDescribedBy"], autocomplete: "autocomplete", sizeSpec: "sizeSpec", placeholder: "placeholder", required: "required", disabled: "disabled", value: "value" }, host: { classAttribute: "bui-discrete-input bui-host" }, providers: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }], viewQueries: [{ propertyName: "inputParts", predicate: ["part"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\r\n\trole=\"group\"\r\n\tclass=\"bui-discrete-input-container\"\r\n\t[formGroup]=\"group\"\r\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\r\n>\r\n\t<ng-container [formArrayName]=\"'parts'\">\r\n\t\t<ng-template ngFor [ngForOf]=\"parts.controls\" let-p let-i=\"index\">\r\n\t\t\t<input\r\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\r\n\t\t\t\t[formControlName]=\"i\"\r\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\r\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\r\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\r\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\r\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\r\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\r\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\r\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\r\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\r\n\t\t\t\t#part\r\n\t\t\t\t(click)=\"$event.stopPropagation()\"\r\n\t\t\t\t(paste)=\"_onPaste($event)\"\r\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\r\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\r\n\t\t\t\tautocapitalize=\"none\"\r\n\t\t\t/>\r\n\t\t\t<span *ngIf=\"_separatorRequired(i)\" class=\"bui-discrete-input-spacer\">{{ separator }}</span>\r\n\t\t</ng-template>\r\n\t</ng-container>\r\n</div>\r\n", styles: [".bui-discrete-input-container{display:flex;align-items:center}.bui-discrete-input-element{border:1px solid rgba(128,128,128,.4);border-radius:3px;background:none;padding:0;text-align:center;width:1.5em;height:1.5em;font-size:inherit;color:currentColor;caret-color:auto}.bui-discrete-input-element:not(:last-child){margin-right:.25em}.bui-discrete-input-element:focus-visible{outline-style:solid;outline-width:2px;outline-offset:-1px}.bui-discrete-input-element[type=number]::-webkit-inner-spin-button,.bui-discrete-input-element[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bui-discrete-input-element[type=number]{-moz-appearance:textfield}.bui-discrete-input-spacer{margin-right:.25em;vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }] }); }
269
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DiscreteInputComponent, deps: [{ token: i1.FocusMonitor }, { token: i0.ElementRef }, { token: MAT_FORM_FIELD, optional: true }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }], target: i0.ɵɵFactoryTarget.Component }); }
270
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DiscreteInputComponent, isStandalone: false, selector: "bui-discrete-input", inputs: { type: "type", separator: "separator", accept: "accept", userAriaDescribedBy: ["aria-describedby", "userAriaDescribedBy"], autocomplete: "autocomplete", sizeSpec: "sizeSpec", placeholder: "placeholder", required: "required", disabled: "disabled", value: "value" }, host: { classAttribute: "bui-discrete-input bui-host" }, providers: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }], viewQueries: [{ propertyName: "inputParts", predicate: ["part"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t@for (p of parts.controls; track p; let i = $index) {\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t@if (_separatorRequired(i)) {\n\t\t\t\t<span class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t\t}\n\t\t}\n\t</ng-container>\n</div>\n", styles: [".bui-discrete-input-container{display:flex;align-items:center}.bui-discrete-input-element{border:1px solid rgba(128,128,128,.4);border-radius:3px;background:none;padding:0;text-align:center;width:1.5em;height:1.5em;font-size:inherit;color:currentColor;caret-color:auto}.bui-discrete-input-element:not(:last-child){margin-right:.25em}.bui-discrete-input-element:focus-visible{outline-style:solid;outline-width:2px;outline-offset:-1px}.bui-discrete-input-element[type=number]::-webkit-inner-spin-button,.bui-discrete-input-element[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bui-discrete-input-element[type=number]{-moz-appearance:textfield}.bui-discrete-input-spacer{margin-right:.25em;vertical-align:middle}\n"], dependencies: [{ 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }] }); }
272
271
  }
273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DiscreteInputComponent, decorators: [{
272
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DiscreteInputComponent, decorators: [{
274
273
  type: Component,
275
274
  args: [{ selector: 'bui-discrete-input', providers: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }], host: {
276
275
  class: 'bui-discrete-input bui-host'
277
- }, standalone: false, template: "<div\r\n\trole=\"group\"\r\n\tclass=\"bui-discrete-input-container\"\r\n\t[formGroup]=\"group\"\r\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\r\n>\r\n\t<ng-container [formArrayName]=\"'parts'\">\r\n\t\t<ng-template ngFor [ngForOf]=\"parts.controls\" let-p let-i=\"index\">\r\n\t\t\t<input\r\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\r\n\t\t\t\t[formControlName]=\"i\"\r\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\r\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\r\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\r\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\r\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\r\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\r\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\r\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\r\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\r\n\t\t\t\t#part\r\n\t\t\t\t(click)=\"$event.stopPropagation()\"\r\n\t\t\t\t(paste)=\"_onPaste($event)\"\r\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\r\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\r\n\t\t\t\tautocapitalize=\"none\"\r\n\t\t\t/>\r\n\t\t\t<span *ngIf=\"_separatorRequired(i)\" class=\"bui-discrete-input-spacer\">{{ separator }}</span>\r\n\t\t</ng-template>\r\n\t</ng-container>\r\n</div>\r\n", styles: [".bui-discrete-input-container{display:flex;align-items:center}.bui-discrete-input-element{border:1px solid rgba(128,128,128,.4);border-radius:3px;background:none;padding:0;text-align:center;width:1.5em;height:1.5em;font-size:inherit;color:currentColor;caret-color:auto}.bui-discrete-input-element:not(:last-child){margin-right:.25em}.bui-discrete-input-element:focus-visible{outline-style:solid;outline-width:2px;outline-offset:-1px}.bui-discrete-input-element[type=number]::-webkit-inner-spin-button,.bui-discrete-input-element[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bui-discrete-input-element[type=number]{-moz-appearance:textfield}.bui-discrete-input-spacer{margin-right:.25em;vertical-align:middle}\n"] }]
278
- }], ctorParameters: () => [{ type: i1.FocusMonitor }, { type: i0.ElementRef }, { type: i5.MatFormField, decorators: [{
276
+ }, standalone: false, template: "<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t@for (p of parts.controls; track p; let i = $index) {\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t@if (_separatorRequired(i)) {\n\t\t\t\t<span class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t\t}\n\t\t}\n\t</ng-container>\n</div>\n", styles: [".bui-discrete-input-container{display:flex;align-items:center}.bui-discrete-input-element{border:1px solid rgba(128,128,128,.4);border-radius:3px;background:none;padding:0;text-align:center;width:1.5em;height:1.5em;font-size:inherit;color:currentColor;caret-color:auto}.bui-discrete-input-element:not(:last-child){margin-right:.25em}.bui-discrete-input-element:focus-visible{outline-style:solid;outline-width:2px;outline-offset:-1px}.bui-discrete-input-element[type=number]::-webkit-inner-spin-button,.bui-discrete-input-element[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bui-discrete-input-element[type=number]{-moz-appearance:textfield}.bui-discrete-input-spacer{margin-right:.25em;vertical-align:middle}\n"] }]
277
+ }], ctorParameters: () => [{ type: i1.FocusMonitor }, { type: i0.ElementRef }, { type: i4.MatFormField, decorators: [{
279
278
  type: Optional
280
279
  }, {
281
280
  type: Inject,
@@ -315,11 +314,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
315
314
  }] } });
316
315
 
317
316
  class DiscreteInputModule {
318
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DiscreteInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
319
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: DiscreteInputModule, declarations: [DiscreteInputComponent], imports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule], exports: [DiscreteInputComponent] }); }
320
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DiscreteInputModule, imports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule] }); }
317
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DiscreteInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
318
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: DiscreteInputModule, declarations: [DiscreteInputComponent], imports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule], exports: [DiscreteInputComponent] }); }
319
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DiscreteInputModule, imports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule] }); }
321
320
  }
322
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DiscreteInputModule, decorators: [{
321
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DiscreteInputModule, decorators: [{
323
322
  type: NgModule,
324
323
  args: [{
325
324
  declarations: [DiscreteInputComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"bravura-ui-discrete-input.mjs","sources":["../../../projects/ui/discrete-input/discrete-input.component.ts","../../../projects/ui/discrete-input/discrete-input.component.html","../../../projects/ui/discrete-input/discrete-input.module.ts","../../../projects/ui/discrete-input/bravura-ui-discrete-input.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n\tComponent,\n\tElementRef,\n\tInject,\n\tInput,\n\tOnDestroy,\n\tOptional,\n\tQueryList,\n\tSelf,\n\tViewChildren\n} from '@angular/core';\nimport {\n\tAbstractControl,\n\tControlValueAccessor,\n\tFormGroupDirective,\n\tNgControl,\n\tNgForm,\n\tUntypedFormArray,\n\tUntypedFormControl,\n\tUntypedFormGroup,\n\tValidators\n} from '@angular/forms';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MAT_FORM_FIELD, MatFormField, MatFormFieldControl } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\n\n/**\n * Custom `MatFormFieldControl` with an individual input box for each character, suitable for fixed-length fields,\n * such as secondary PIN inputs, TFNs, or BSB code etc.\n *\n * Accessibility features are not yet fully implemented.\n *\n * Example:\n *\n * ```html\n * <mat-form-field>\n * <bui-discrete-input></bui-discrete-input>\n * </mat-form-field>\n * ```\n *\n */\n@Component({\n\tselector: 'bui-discrete-input',\n\ttemplateUrl: 'discrete-input.component.html',\n\tstyleUrls: ['discrete-input.component.scss'],\n\tproviders: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }],\n\thost: {\n\t\tclass: 'bui-discrete-input bui-host'\n\t},\n\tstandalone: false\n})\nexport class DiscreteInputComponent implements MatFormFieldControl<string>, ControlValueAccessor, OnDestroy {\n\t/** @ignore */\n\tstatic nextId = 0;\n\n\t/** @ignore */\n\tstatic ngAcceptInputType_disabled: boolean | string | null | undefined;\n\t/** @ignore */\n\tstatic ngAcceptInputType_required: boolean | string | null | undefined;\n\n\t/** @ignore */ parts: UntypedFormArray;\n\t/** @ignore */ group: UntypedFormGroup;\n\t/** Emits whenever the component state changes. */\n\tstateChanges = new Subject<void>();\n\t/** Whether the control is focused. */\n\tfocused: boolean;\n\n\t/** The type of input boxes */\n\t@Input()\n\ttype: 'text' | 'number' | 'password' = 'text';\n\n\t/** Input boxes are separated in groups. This specifies the characters displayed between two groups. */\n\t@Input()\n\tseparator = ' ';\n\n\t/**\n\t * A list of characters accepted in the inputs, for example `0-9`, `a-zA-Z0-9`\n\t * @example '0-9'\n\t */\n\t@Input()\n\taccept?: string;\n\n\t/** @ignore */ id = `bui-discrete-input-${DiscreteInputComponent.nextId++}`;\n\n\t/** Value of aria-describedby that should be merged with the described-by ids which are set by the form-field. */\n\t@Input('aria-describedby') userAriaDescribedBy?: string;\n\n\t@ViewChildren('part', { read: ElementRef }) private inputParts!: QueryList<ElementRef<HTMLInputElement>>;\n\n\t/**@ignore */\n\t_formField: MatFormField;\n\n\t/**@ignore */\n\tngControl: NgControl;\n\n\t@Input()\n\tautocomplete?: string = 'off';\n\n\tprivate _sizeSpec: number[] = [];\n\n\tprivate _required = false;\n\n\tprivate _placeholder?: string;\n\tprivate _disabled = false;\n\tprivate _separatorPos: number[] = [];\n\n\t/** @ignore */ onChange = (_: any) => {};\n\t/** @ignore */ onTouched = () => {};\n\n\t/** @ignore */\n\tget shouldLabelFloat() {\n\t\treturn true;\n\t}\n\n\t/** @ignore */\n\tget empty() {\n\t\treturn this.parts.controls.every(c => !c.value);\n\t}\n\n\t/**\n\t * Defines the length and grouping of the input.\n\t * @default [2, 2, 2]\n\t */\n\t@Input()\n\tget sizeSpec(): number[] {\n\t\treturn this._sizeSpec;\n\t}\n\tset sizeSpec(spec: number[]) {\n\t\tlet size = 0;\n\t\tthis._separatorPos = [];\n\t\tspec.forEach((n, i) => {\n\t\t\tsize += n;\n\t\t\tif (i < spec.length - 1) {\n\t\t\t\tthis._separatorPos.push(size);\n\t\t\t}\n\t\t});\n\t\tif (size !== this.parts.length) {\n\t\t\tconst v = this.value;\n\t\t\tthis.parts.clear({ emitEvent: false });\n\t\t\tfor (let i = 0; i < size; i++) {\n\t\t\t\tthis.parts.setControl(\n\t\t\t\t\ti,\n\t\t\t\t\tnew UntypedFormControl(null, [Validators.required, Validators.minLength(1), Validators.maxLength(1)])\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.value = v;\n\t\t\tthis._sizeSpec = spec;\n\t\t}\n\t}\n\n\t/** The placeholder for this control. */\n\t@Input()\n\tget placeholder(): string {\n\t\treturn this._placeholder!;\n\t}\n\tset placeholder(value: string) {\n\t\tthis._placeholder = value;\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is required. */\n\t@Input()\n\tget required(): boolean {\n\t\treturn this._required;\n\t}\n\tset required(value: boolean) {\n\t\tthis._required = coerceBooleanProperty(value);\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is disabled. */\n\t@Input()\n\tget disabled(): boolean {\n\t\treturn this._disabled;\n\t}\n\tset disabled(value: boolean) {\n\t\tthis._disabled = coerceBooleanProperty(value);\n\t\tthis._disabled ? this.parts.disable() : this.parts.enable();\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** The value of the control. */\n\t@Input()\n\tget value(): string {\n\t\treturn this.parts.controls\n\t\t\t.map(c => c.value)\n\t\t\t.filter(c => c)\n\t\t\t.join('');\n\t}\n\tset value(v: string) {\n\t\tv = v || '';\n\t\tfor (let i = 0; i < this.parts.controls.length; i++) {\n\t\t\tthis.parts.controls[i]?.setValue(v[i]);\n\t\t}\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** @ignore */\n\tget _colorSuffix(): string {\n\t\treturn this.errorState ? 'warn' : this._formField?.color || 'primary';\n\t}\n\n\tconstructor(\n\t\tprivate _focusMonitor: FocusMonitor,\n\t\tprivate _elementRef: ElementRef<HTMLElement>,\n\t\t@Optional() @Inject(MAT_FORM_FIELD) formField: MatFormField,\n\t\t@Optional() @Self() control: NgControl,\n\t\t@Optional() _parentForm: NgForm,\n\t\t@Optional() _parentFormGroup: FormGroupDirective,\n\t\t_defaultErrorStateMatcher: ErrorStateMatcher\n\t) {\n\t\tthis.parts = new UntypedFormArray([]);\n\t\tthis.group = new UntypedFormGroup({ parts: this.parts });\n\t\tthis.sizeSpec = [2, 2, 2];\n\t\tthis._formField = formField;\n\t\tthis.focused = false;\n\t\tthis.stateChanges = new Subject<void>();\n\n\t\tthis.ngControl = control;\n\t\tif (this.ngControl != null) {\n\t\t\tthis.ngControl.valueAccessor = this;\n\t\t}\n\n\t\tthis._focusMonitor.monitor(this._elementRef, true).subscribe(origin => {\n\t\t\tif (this.focused && !origin) {\n\t\t\t\tthis.onTouched();\n\t\t\t}\n\t\t\tthis.focused = !!origin;\n\t\t\tthis.stateChanges.next();\n\t\t});\n\t}\n\n\t/** @ignore */ errorState = false;\n\t/** @ignore */ controlType?: string | undefined;\n\t/** @ignore */ autofilled?: boolean | undefined;\n\n\t/** @ignore */\n\tngOnDestroy() {\n\t\tthis.stateChanges.complete();\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/** @ignore */\n\tsetDescribedByIds(ids: string[]) {\n\t\tconst controlElement = this._elementRef.nativeElement.querySelector('.bui-discrete-input-container');\n\t\tcontrolElement!.setAttribute('aria-describedby', ids.join(' '));\n\t}\n\n\t/** @ignore */\n\tonContainerClick() {\n\t\tconst l = this.parts.controls.length;\n\t\tfor (let i = 0; i < l; i++) {\n\t\t\tif (this.parts.controls[i].invalid || i === l - 1) {\n\t\t\t\tthis._focusMonitor.focusVia(this.inputParts.get(i)!, 'program');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @ignore */\n\twriteValue(v: string): void {\n\t\tthis.value = v;\n\t}\n\n\t/** @ignore */\n\tregisterOnChange(fn: any): void {\n\t\tthis.onChange = fn;\n\t}\n\n\t/** @ignore */\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\t/** @ignore */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/** @ignore */\n\t_handleInput(control: AbstractControl, index: number, event: Event): void {\n\t\tlet v = control.value && control.value[0];\n\t\tconst rawValue = (event.target as HTMLInputElement).value;\n\t\tif (rawValue.length > 1) {\n\t\t\tthis._replaceText(rawValue, event);\n\t\t\treturn;\n\t\t}\n\t\tcontrol.setValue(v);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (!control.errors && nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\n\t\tthis.onChange(this.value);\n\t}\n\n\t/** @ignore */\n\t_handleBeforeInput(index: number, event: InputEvent): void {\n\t\tconst v = event.data;\n\t\tif (this.accept && v && !new RegExp(`[${this.accept}]`).test(v)) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\treturn;\n\t\t}\n\t\tconst inp = this.inputParts.get(index)!.nativeElement;\n\t\tif (v && inp.value) {\n\t\t\tinp.value = '';\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_focusPart(elemRef: ElementRef<HTMLInputElement>) {\n\t\tthis._focusMonitor.focusVia(elemRef, 'program');\n\t}\n\n\t/** @ignore */\n\t_consumeKey(event: Event) {\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t}\n\n\t/** @ignore */\n\t_leftArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst prevElement = this.inputParts.get(index - 1);\n\t\tif (prevElement) {\n\t\t\tthis._focusPart(prevElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_rightArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_handleBackspace(control: AbstractControl, index: number): void {\n\t\tconst prevElement = index && this.inputParts.get(index - 1);\n\t\tif (!control.value && prevElement) {\n\t\t\tthis._focusMonitor.focusVia(prevElement, 'program');\n\t\t} else if (control.value) {\n\t\t\tcontrol.setValue('');\n\t\t\tthis.onChange(this.value);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_onPaste(event: ClipboardEvent) {\n\t\tlet text = event.clipboardData?.getData('text');\n\t\tthis._replaceText(text, event);\n\t}\n\n\t/** @ignore */\n\t_separatorRequired(index: number) {\n\t\treturn this._separatorPos.includes(index + 1);\n\t}\n\n\t/** @ignore */\n\t_placeholderAt(index: number) {\n\t\treturn this._placeholder && this._placeholder[index];\n\t}\n\n\tprivate _replaceText(text: string | undefined, event: Event) {\n\t\tif (text) {\n\t\t\tif (this.accept) {\n\t\t\t\ttext = text.replace(new RegExp(`[^${this.accept}]`, 'gi'), '');\n\t\t\t}\n\t\t\tthis.value = text;\n\t\t\tthis.onChange(this.value);\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis.onContainerClick();\n\t}\n}\n","<div\r\n\trole=\"group\"\r\n\tclass=\"bui-discrete-input-container\"\r\n\t[formGroup]=\"group\"\r\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\r\n>\r\n\t<ng-container [formArrayName]=\"'parts'\">\r\n\t\t<ng-template ngFor [ngForOf]=\"parts.controls\" let-p let-i=\"index\">\r\n\t\t\t<input\r\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\r\n\t\t\t\t[formControlName]=\"i\"\r\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\r\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\r\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\r\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\r\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\r\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\r\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\r\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\r\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\r\n\t\t\t\t#part\r\n\t\t\t\t(click)=\"$event.stopPropagation()\"\r\n\t\t\t\t(paste)=\"_onPaste($event)\"\r\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\r\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\r\n\t\t\t\tautocapitalize=\"none\"\r\n\t\t\t/>\r\n\t\t\t<span *ngIf=\"_separatorRequired(i)\" class=\"bui-discrete-input-spacer\">{{ separator }}</span>\r\n\t\t</ng-template>\r\n\t</ng-container>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DiscreteInputComponent } from './discrete-input.component';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { A11yModule } from '@angular/cdk/a11y';\r\n\r\n@NgModule({\r\n\tdeclarations: [DiscreteInputComponent],\r\n\timports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule],\r\n\texports: [DiscreteInputComponent]\r\n})\r\nexport class DiscreteInputModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AA4BA;;;;;;;;;;;;;;AAcG;MAWU,sBAAsB,CAAA;;aAE3B,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;;AAyDlB,IAAA,IAAI,gBAAgB,GAAA;AACnB,QAAA,OAAO,IAAI;;;AAIZ,IAAA,IAAI,KAAK,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;;AAGhD;;;AAGG;AACH,IAAA,IACI,QAAQ,GAAA;QACX,OAAO,IAAI,CAAC,SAAS;;IA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BAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAC;oBAC5E,OAAO,EAAE,CAAC,sBAAsB;AAChC,iBAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"bravura-ui-discrete-input.mjs","sources":["../../../projects/ui/discrete-input/discrete-input.component.ts","../../../projects/ui/discrete-input/discrete-input.component.html","../../../projects/ui/discrete-input/discrete-input.module.ts","../../../projects/ui/discrete-input/bravura-ui-discrete-input.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n\tComponent,\n\tElementRef,\n\tInject,\n\tInput,\n\tOnDestroy,\n\tOptional,\n\tQueryList,\n\tSelf,\n\tViewChildren\n} from '@angular/core';\nimport {\n\tAbstractControl,\n\tControlValueAccessor,\n\tFormGroupDirective,\n\tNgControl,\n\tNgForm,\n\tUntypedFormArray,\n\tUntypedFormControl,\n\tUntypedFormGroup,\n\tValidators\n} from '@angular/forms';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MAT_FORM_FIELD, MatFormField, MatFormFieldControl } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\n\n/**\n * Custom `MatFormFieldControl` with an individual input box for each character, suitable for fixed-length fields,\n * such as secondary PIN inputs, TFNs, or BSB code etc.\n *\n * Accessibility features are not yet fully implemented.\n *\n * Example:\n *\n * ```html\n * <mat-form-field>\n * <bui-discrete-input></bui-discrete-input>\n * </mat-form-field>\n * ```\n *\n */\n@Component({\n\tselector: 'bui-discrete-input',\n\ttemplateUrl: 'discrete-input.component.html',\n\tstyleUrls: ['discrete-input.component.scss'],\n\tproviders: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }],\n\thost: {\n\t\tclass: 'bui-discrete-input bui-host'\n\t},\n\tstandalone: false\n})\nexport class DiscreteInputComponent implements MatFormFieldControl<string>, ControlValueAccessor, OnDestroy {\n\t/** @ignore */\n\tstatic nextId = 0;\n\n\t/** @ignore */\n\tstatic ngAcceptInputType_disabled: boolean | string | null | undefined;\n\t/** @ignore */\n\tstatic ngAcceptInputType_required: boolean | string | null | undefined;\n\n\t/** @ignore */ parts: UntypedFormArray;\n\t/** @ignore */ group: UntypedFormGroup;\n\t/** Emits whenever the component state changes. */\n\tstateChanges = new Subject<void>();\n\t/** Whether the control is focused. */\n\tfocused: boolean;\n\n\t/** The type of input boxes */\n\t@Input()\n\ttype: 'text' | 'number' | 'password' = 'text';\n\n\t/** Input boxes are separated in groups. This specifies the characters displayed between two groups. */\n\t@Input()\n\tseparator = ' ';\n\n\t/**\n\t * A list of characters accepted in the inputs, for example `0-9`, `a-zA-Z0-9`\n\t * @example '0-9'\n\t */\n\t@Input()\n\taccept?: string;\n\n\t/** @ignore */ id = `bui-discrete-input-${DiscreteInputComponent.nextId++}`;\n\n\t/** Value of aria-describedby that should be merged with the described-by ids which are set by the form-field. */\n\t@Input('aria-describedby') userAriaDescribedBy?: string;\n\n\t@ViewChildren('part', { read: ElementRef }) private inputParts!: QueryList<ElementRef<HTMLInputElement>>;\n\n\t/**@ignore */\n\t_formField: MatFormField;\n\n\t/**@ignore */\n\tngControl: NgControl;\n\n\t@Input()\n\tautocomplete?: string = 'off';\n\n\tprivate _sizeSpec: number[] = [];\n\n\tprivate _required = false;\n\n\tprivate _placeholder?: string;\n\tprivate _disabled = false;\n\tprivate _separatorPos: number[] = [];\n\n\t/** @ignore */ onChange = (_: any) => {};\n\t/** @ignore */ onTouched = () => {};\n\n\t/** @ignore */\n\tget shouldLabelFloat() {\n\t\treturn true;\n\t}\n\n\t/** @ignore */\n\tget empty() {\n\t\treturn this.parts.controls.every(c => !c.value);\n\t}\n\n\t/**\n\t * Defines the length and grouping of the input.\n\t * @default [2, 2, 2]\n\t */\n\t@Input()\n\tget sizeSpec(): number[] {\n\t\treturn this._sizeSpec;\n\t}\n\tset sizeSpec(spec: number[]) {\n\t\tlet size = 0;\n\t\tthis._separatorPos = [];\n\t\tspec.forEach((n, i) => {\n\t\t\tsize += n;\n\t\t\tif (i < spec.length - 1) {\n\t\t\t\tthis._separatorPos.push(size);\n\t\t\t}\n\t\t});\n\t\tif (size !== this.parts.length) {\n\t\t\tconst v = this.value;\n\t\t\tthis.parts.clear({ emitEvent: false });\n\t\t\tfor (let i = 0; i < size; i++) {\n\t\t\t\tthis.parts.setControl(\n\t\t\t\t\ti,\n\t\t\t\t\tnew UntypedFormControl(null, [Validators.required, Validators.minLength(1), Validators.maxLength(1)])\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.value = v;\n\t\t\tthis._sizeSpec = spec;\n\t\t}\n\t}\n\n\t/** The placeholder for this control. */\n\t@Input()\n\tget placeholder(): string {\n\t\treturn this._placeholder!;\n\t}\n\tset placeholder(value: string) {\n\t\tthis._placeholder = value;\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is required. */\n\t@Input()\n\tget required(): boolean {\n\t\treturn this._required;\n\t}\n\tset required(value: boolean) {\n\t\tthis._required = coerceBooleanProperty(value);\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is disabled. */\n\t@Input()\n\tget disabled(): boolean {\n\t\treturn this._disabled;\n\t}\n\tset disabled(value: boolean) {\n\t\tthis._disabled = coerceBooleanProperty(value);\n\t\tthis._disabled ? this.parts.disable() : this.parts.enable();\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** The value of the control. */\n\t@Input()\n\tget value(): string {\n\t\treturn this.parts.controls\n\t\t\t.map(c => c.value)\n\t\t\t.filter(c => c)\n\t\t\t.join('');\n\t}\n\tset value(v: string) {\n\t\tv = v || '';\n\t\tfor (let i = 0; i < this.parts.controls.length; i++) {\n\t\t\tthis.parts.controls[i]?.setValue(v[i]);\n\t\t}\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** @ignore */\n\tget _colorSuffix(): string {\n\t\treturn this.errorState ? 'warn' : this._formField?.color || 'primary';\n\t}\n\n\tconstructor(\n\t\tprivate _focusMonitor: FocusMonitor,\n\t\tprivate _elementRef: ElementRef<HTMLElement>,\n\t\t@Optional() @Inject(MAT_FORM_FIELD) formField: MatFormField,\n\t\t@Optional() @Self() control: NgControl,\n\t\t@Optional() _parentForm: NgForm,\n\t\t@Optional() _parentFormGroup: FormGroupDirective,\n\t\t_defaultErrorStateMatcher: ErrorStateMatcher\n\t) {\n\t\tthis.parts = new UntypedFormArray([]);\n\t\tthis.group = new UntypedFormGroup({ parts: this.parts });\n\t\tthis.sizeSpec = [2, 2, 2];\n\t\tthis._formField = formField;\n\t\tthis.focused = false;\n\t\tthis.stateChanges = new Subject<void>();\n\n\t\tthis.ngControl = control;\n\t\tif (this.ngControl != null) {\n\t\t\tthis.ngControl.valueAccessor = this;\n\t\t}\n\n\t\tthis._focusMonitor.monitor(this._elementRef, true).subscribe(origin => {\n\t\t\tif (this.focused && !origin) {\n\t\t\t\tthis.onTouched();\n\t\t\t}\n\t\t\tthis.focused = !!origin;\n\t\t\tthis.stateChanges.next();\n\t\t});\n\t}\n\n\t/** @ignore */ errorState = false;\n\t/** @ignore */ controlType?: string | undefined;\n\t/** @ignore */ autofilled?: boolean | undefined;\n\n\t/** @ignore */\n\tngOnDestroy() {\n\t\tthis.stateChanges.complete();\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/** @ignore */\n\tsetDescribedByIds(ids: string[]) {\n\t\tconst controlElement = this._elementRef.nativeElement.querySelector('.bui-discrete-input-container');\n\t\tcontrolElement!.setAttribute('aria-describedby', ids.join(' '));\n\t}\n\n\t/** @ignore */\n\tonContainerClick() {\n\t\tconst l = this.parts.controls.length;\n\t\tfor (let i = 0; i < l; i++) {\n\t\t\tif (this.parts.controls[i].invalid || i === l - 1) {\n\t\t\t\tthis._focusMonitor.focusVia(this.inputParts.get(i)!, 'program');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @ignore */\n\twriteValue(v: string): void {\n\t\tthis.value = v;\n\t}\n\n\t/** @ignore */\n\tregisterOnChange(fn: any): void {\n\t\tthis.onChange = fn;\n\t}\n\n\t/** @ignore */\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\t/** @ignore */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/** @ignore */\n\t_handleInput(control: AbstractControl, index: number, event: Event): void {\n\t\tlet v = control.value && control.value[0];\n\t\tconst rawValue = (event.target as HTMLInputElement).value;\n\t\tif (rawValue.length > 1) {\n\t\t\tthis._replaceText(rawValue, event);\n\t\t\treturn;\n\t\t}\n\t\tcontrol.setValue(v);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (!control.errors && nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\n\t\tthis.onChange(this.value);\n\t}\n\n\t/** @ignore */\n\t_handleBeforeInput(index: number, event: InputEvent): void {\n\t\tconst v = event.data;\n\t\tif (this.accept && v && !new RegExp(`[${this.accept}]`).test(v)) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\treturn;\n\t\t}\n\t\tconst inp = this.inputParts.get(index)!.nativeElement;\n\t\tif (v && inp.value) {\n\t\t\tinp.value = '';\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_focusPart(elemRef: ElementRef<HTMLInputElement>) {\n\t\tthis._focusMonitor.focusVia(elemRef, 'program');\n\t}\n\n\t/** @ignore */\n\t_consumeKey(event: Event) {\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t}\n\n\t/** @ignore */\n\t_leftArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst prevElement = this.inputParts.get(index - 1);\n\t\tif (prevElement) {\n\t\t\tthis._focusPart(prevElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_rightArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_handleBackspace(control: AbstractControl, index: number): void {\n\t\tconst prevElement = index && this.inputParts.get(index - 1);\n\t\tif (!control.value && prevElement) {\n\t\t\tthis._focusMonitor.focusVia(prevElement, 'program');\n\t\t} else if (control.value) {\n\t\t\tcontrol.setValue('');\n\t\t\tthis.onChange(this.value);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_onPaste(event: ClipboardEvent) {\n\t\tlet text = event.clipboardData?.getData('text');\n\t\tthis._replaceText(text, event);\n\t}\n\n\t/** @ignore */\n\t_separatorRequired(index: number) {\n\t\treturn this._separatorPos.includes(index + 1);\n\t}\n\n\t/** @ignore */\n\t_placeholderAt(index: number) {\n\t\treturn this._placeholder && this._placeholder[index];\n\t}\n\n\tprivate _replaceText(text: string | undefined, event: Event) {\n\t\tif (text) {\n\t\t\tif (this.accept) {\n\t\t\t\ttext = text.replace(new RegExp(`[^${this.accept}]`, 'gi'), '');\n\t\t\t}\n\t\t\tthis.value = text;\n\t\t\tthis.onChange(this.value);\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis.onContainerClick();\n\t}\n}\n","<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t@for (p of parts.controls; track p; let i = $index) {\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t@if (_separatorRequired(i)) {\n\t\t\t\t<span class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t\t}\n\t\t}\n\t</ng-container>\n</div>\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DiscreteInputComponent } from './discrete-input.component';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { A11yModule } from '@angular/cdk/a11y';\r\n\r\n@NgModule({\r\n\tdeclarations: [DiscreteInputComponent],\r\n\timports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule],\r\n\texports: [DiscreteInputComponent]\r\n})\r\nexport class DiscreteInputModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA4BA;;;;;;;;;;;;;;AAcG;MAWU,sBAAsB,CAAA;;aAE3B,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;;AAyDlB,IAAA,IAAI,gBAAgB,GAAA;AACnB,QAAA,OAAO,IAAI;;;AAIZ,IAAA,IAAI,KAAK,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;;AAGhD;;;AAGG;AACH,IAAA,IACI,QAAQ,GAAA;QACX,OAAO,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ME5KW,mBAAmB,CAAA;8GAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAnB,mBAAmB,EAAA,YAAA,EAAA,CAJhB,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAC3B,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CACjE,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAEpB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAHrB,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;;2FAG/D,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAC;oBAC5E,OAAO,EAAE,CAAC,sBAAsB;AAChC,iBAAA;;;ACXD;;AAEG;;;;"}
@@ -1,22 +1,22 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, ElementRef, forwardRef, HostListener, ViewChild, Input, Component, NgModule } from '@angular/core';
3
- import * as i2 from '@angular/common';
3
+ import * as i8 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import { trigger, transition, query, stagger, animate, style } from '@angular/animations';
6
6
  import { HttpEventType } from '@angular/common/http';
7
7
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
8
  import { Observable, of, Subject } from 'rxjs';
9
- import * as i3 from '@angular/material/icon';
9
+ import * as i2 from '@angular/material/icon';
10
10
  import { MatIconModule } from '@angular/material/icon';
11
- import * as i4 from '@bravura/ui/icon-font';
11
+ import * as i3 from '@bravura/ui/icon-font';
12
12
  import { IconFontModule } from '@bravura/ui/icon-font';
13
- import * as i5 from '@angular/material/progress-bar';
13
+ import * as i4 from '@angular/material/progress-bar';
14
14
  import { MatProgressBarModule } from '@angular/material/progress-bar';
15
- import * as i6 from '@angular/material/button';
15
+ import * as i5 from '@angular/material/button';
16
16
  import { MatButtonModule } from '@angular/material/button';
17
- import * as i7 from '@angular/material/divider';
17
+ import * as i6 from '@angular/material/divider';
18
18
  import { MatDividerModule } from '@angular/material/divider';
19
- import * as i8 from '@angular/material/tooltip';
19
+ import * as i7 from '@angular/material/tooltip';
20
20
  import { MatTooltipModule } from '@angular/material/tooltip';
21
21
 
22
22
  /**
@@ -39,10 +39,10 @@ class FileUploadItem {
39
39
  * Please extend this type and provide it in an injector at the same level, or ancestral to that, of the `FileUploadComponent`.
40
40
  */
41
41
  class FileUploadService {
42
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FileUploadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
43
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FileUploadService }); }
42
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FileUploadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
43
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FileUploadService }); }
44
44
  }
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FileUploadService, decorators: [{
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FileUploadService, decorators: [{
46
46
  type: Injectable
47
47
  }] });
48
48
 
@@ -378,8 +378,8 @@ class FileUploadComponent {
378
378
  }
379
379
  this._onChange(completedIds);
380
380
  }
381
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FileUploadComponent, deps: [{ token: FileUploadService }], target: i0.ɵɵFactoryTarget.Component }); }
382
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FileUploadComponent, isStandalone: false, selector: "bui-file-upload", inputs: { uploadActionText: "uploadActionText", fileUploadedLabel: "fileUploadedLabel", dragHint: "dragHint", dropHint: "dropHint", limit: "limit", fileSize: "fileSize", types: "types" }, host: { listeners: { "dragenter": "onDragEnter($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDndDrop($event)" }, properties: { "class.bui-dnd-active": "_overFrame && remaining >= _numberOfFilesDragged", "class.bui-dnd-over": "_overDropZone && remaining >= _numberOfFilesDragged", "class.bui-dnd-invalid": "_invalidFilesDragged" }, classAttribute: "bui-host bui-file-upload" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploadComponent), multi: true }], viewQueries: [{ propertyName: "_fileInput", first: true, predicate: ["fileInput"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"bui-file-upload-container\">\r\n\t<div\r\n\t\tclass=\"bui-file-upload-hint\"\r\n\t\t*ngIf=\"!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)\"\r\n\t>\r\n\t\t<ng-template [ngIf]=\"_invalidFilesDragged\" [ngIfElse]=\"validDnd\">\r\n\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\r\n\t\t</ng-template>\r\n\t\t<ng-template #validDnd>\r\n\t\t\t<div *ngIf=\"!_overFrame && !_overDropZone\" class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\r\n\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\r\n\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\r\n\t\t\t</div>\r\n\t\t\t<div *ngIf=\"_overFrame && !_overDropZone\" class=\"bui-color-light\">{{ dragHint }}</div>\r\n\t\t\t<div *ngIf=\"_overDropZone\" class=\"bui-color-light\">{{ dropHint }}</div>\r\n\t\t</ng-template>\r\n\t</div>\r\n\t<div\r\n\t\tclass=\"bui-file-upload-list\"\r\n\t\t[@slideOut]=\"_uploadingItems.length\"\r\n\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\r\n\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\r\n\t\t*ngIf=\"_uploadingItems.length\"\r\n\t>\r\n\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\r\n\r\n\t\t<ng-container *ngFor=\"let item of _uploadingItems; let idx = index\">\r\n\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\r\n\t\t\t\t<div class=\"bui-file-upload-item-name\">\r\n\t\t\t\t\t<span>\r\n\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\r\n\t\t\t\t\t\t<a\r\n\t\t\t\t\t\t\tclass=\"text\"\r\n\t\t\t\t\t\t\t*ngIf=\"item.done && !item.downloading; else staticName\"\r\n\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\r\n\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\r\n\t\t\t\t\t\t\tcontextmenu=\"false\"\r\n\t\t\t\t\t\t\tmatTooltip=\"Download\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{ item.name }}\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t<ng-template #staticName>\r\n\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\r\n\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\r\n\t\t\t\t\t\t<mat-progress-bar\r\n\t\t\t\t\t\t\tmode=\"determinate\"\r\n\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\r\n\t\t\t\t\t\t\t*ngIf=\"!item.downloading\"\r\n\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\r\n\t\t\t\t\t\t></mat-progress-bar>\r\n\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\" *ngIf=\"item.downloading\"></mat-progress-bar>\r\n\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t<ng-template [ngIf]=\"item.done\" [ngIfElse]=\"inprogress\"> 100% </ng-template>\r\n\t\t\t\t\t\t\t<ng-template #inprogress>\r\n\t\t\t\t\t\t\t\t{{ item.progress | percent }}\r\n\t\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"bui-file-upload-item-action\">\r\n\t\t\t\t\t<button\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t\t\t(click)=\"item.cancel()\"\r\n\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\r\n\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\r\n\t\t\t\t\t\tmatTooltip=\"Delete\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<mat-divider *ngIf=\"idx < _uploadingItems.length - 1\"></mat-divider>\r\n\t\t</ng-container>\r\n\t</div>\r\n\t<input\r\n\t\ttype=\"file\"\r\n\t\t#fileInput\r\n\t\tstyle=\"display: none\"\r\n\t\taccept=\"{{ _accept }}\"\r\n\t\t(change)=\"_handleFileSelection()\"\r\n\t\t[multiple]=\"remaining > 1\"\r\n\t/>\r\n\r\n\t<div *ngIf=\"_fileSizeExceedMsg\" class=\"bui-color-warn bui-file-size-exceed\">\r\n\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\r\n\t</div>\r\n</div>\r\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]) .bui-file-size-exceed{display:flex;align-items:center;margin-bottom:1rem}:host:not([hidden]) .bui-file-size-exceed mat-icon{margin-left:.2rem}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2);display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0;justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:12px 0;--mdc-linear-progress-track-height: 8px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-mdc-progress-bar{border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }, { kind: "component", type: i5.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i7.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i2.PercentPipe, name: "percent" }], animations: [
381
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FileUploadComponent, deps: [{ token: FileUploadService }], target: i0.ɵɵFactoryTarget.Component }); }
382
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: FileUploadComponent, isStandalone: false, selector: "bui-file-upload", inputs: { uploadActionText: "uploadActionText", fileUploadedLabel: "fileUploadedLabel", dragHint: "dragHint", dropHint: "dropHint", limit: "limit", fileSize: "fileSize", types: "types" }, host: { listeners: { "dragenter": "onDragEnter($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDndDrop($event)" }, properties: { "class.bui-dnd-active": "_overFrame && remaining >= _numberOfFilesDragged", "class.bui-dnd-over": "_overDropZone && remaining >= _numberOfFilesDragged", "class.bui-dnd-invalid": "_invalidFilesDragged" }, classAttribute: "bui-host bui-file-upload" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploadComponent), multi: true }], viewQueries: [{ propertyName: "_fileInput", first: true, predicate: ["fileInput"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"bui-file-upload-container\">\n\t@if (!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)) {\n\t\t<div class=\"bui-file-upload-hint\">\n\t\t\t@if (_invalidFilesDragged) {\n\t\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t\t} @else {\n\t\t\t\t@if (!_overFrame && !_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (_overFrame && !_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t\t}\n\t\t\t\t@if (_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t}\n\t@if (_uploadingItems.length) {\n\t\t<div\n\t\t\tclass=\"bui-file-upload-list\"\n\t\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t>\n\t\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\t\t\t@for (item of _uploadingItems; track item; let idx = $index) {\n\t\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t\t@if (item.done && !item.downloading) {\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t\t@if (!item.downloading) {\n\t\t\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (item.downloading) {\n\t\t\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\"></mat-progress-bar>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t@if (item.done) {\n\t\t\t\t\t\t\t\t\t100%\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t@if (idx < _uploadingItems.length - 1) {\n\t\t\t\t\t<mat-divider></mat-divider>\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t}\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n\n\t@if (_fileSizeExceedMsg) {\n\t\t<div class=\"bui-color-warn bui-file-size-exceed\">\n\t\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\n\t\t</div>\n\t}\n</div>\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]) .bui-file-size-exceed{display:flex;align-items:center;margin-bottom:1rem}:host:not([hidden]) .bui-file-size-exceed mat-icon{margin-left:.2rem}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2);display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0;justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:12px 0;--mat-progress-bar-track-height: 8px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-mdc-progress-bar{border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"], dependencies: [{ kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }, { kind: "component", type: i4.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i8.PercentPipe, name: "percent" }], animations: [
383
383
  trigger('slideOut', [
384
384
  transition('* => *', [
385
385
  query(':leave', stagger(100, animate('0.25s', style({ height: 0, overflow: 'hidden' }))), { optional: true })
@@ -387,7 +387,7 @@ class FileUploadComponent {
387
387
  ])
388
388
  ] }); }
389
389
  }
390
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FileUploadComponent, decorators: [{
390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FileUploadComponent, decorators: [{
391
391
  type: Component,
392
392
  args: [{ host: {
393
393
  class: 'bui-host bui-file-upload',
@@ -400,7 +400,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
400
400
  query(':leave', stagger(100, animate('0.25s', style({ height: 0, overflow: 'hidden' }))), { optional: true })
401
401
  ])
402
402
  ])
403
- ], standalone: false, template: "<div class=\"bui-file-upload-container\">\r\n\t<div\r\n\t\tclass=\"bui-file-upload-hint\"\r\n\t\t*ngIf=\"!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)\"\r\n\t>\r\n\t\t<ng-template [ngIf]=\"_invalidFilesDragged\" [ngIfElse]=\"validDnd\">\r\n\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\r\n\t\t</ng-template>\r\n\t\t<ng-template #validDnd>\r\n\t\t\t<div *ngIf=\"!_overFrame && !_overDropZone\" class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\r\n\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\r\n\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\r\n\t\t\t</div>\r\n\t\t\t<div *ngIf=\"_overFrame && !_overDropZone\" class=\"bui-color-light\">{{ dragHint }}</div>\r\n\t\t\t<div *ngIf=\"_overDropZone\" class=\"bui-color-light\">{{ dropHint }}</div>\r\n\t\t</ng-template>\r\n\t</div>\r\n\t<div\r\n\t\tclass=\"bui-file-upload-list\"\r\n\t\t[@slideOut]=\"_uploadingItems.length\"\r\n\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\r\n\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\r\n\t\t*ngIf=\"_uploadingItems.length\"\r\n\t>\r\n\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\r\n\r\n\t\t<ng-container *ngFor=\"let item of _uploadingItems; let idx = index\">\r\n\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\r\n\t\t\t\t<div class=\"bui-file-upload-item-name\">\r\n\t\t\t\t\t<span>\r\n\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\r\n\t\t\t\t\t\t<a\r\n\t\t\t\t\t\t\tclass=\"text\"\r\n\t\t\t\t\t\t\t*ngIf=\"item.done && !item.downloading; else staticName\"\r\n\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\r\n\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\r\n\t\t\t\t\t\t\tcontextmenu=\"false\"\r\n\t\t\t\t\t\t\tmatTooltip=\"Download\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{ item.name }}\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t<ng-template #staticName>\r\n\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\r\n\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\r\n\t\t\t\t\t\t<mat-progress-bar\r\n\t\t\t\t\t\t\tmode=\"determinate\"\r\n\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\r\n\t\t\t\t\t\t\t*ngIf=\"!item.downloading\"\r\n\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\r\n\t\t\t\t\t\t></mat-progress-bar>\r\n\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\" *ngIf=\"item.downloading\"></mat-progress-bar>\r\n\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t<ng-template [ngIf]=\"item.done\" [ngIfElse]=\"inprogress\"> 100% </ng-template>\r\n\t\t\t\t\t\t\t<ng-template #inprogress>\r\n\t\t\t\t\t\t\t\t{{ item.progress | percent }}\r\n\t\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"bui-file-upload-item-action\">\r\n\t\t\t\t\t<button\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t\t\t(click)=\"item.cancel()\"\r\n\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\r\n\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\r\n\t\t\t\t\t\tmatTooltip=\"Delete\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<mat-divider *ngIf=\"idx < _uploadingItems.length - 1\"></mat-divider>\r\n\t\t</ng-container>\r\n\t</div>\r\n\t<input\r\n\t\ttype=\"file\"\r\n\t\t#fileInput\r\n\t\tstyle=\"display: none\"\r\n\t\taccept=\"{{ _accept }}\"\r\n\t\t(change)=\"_handleFileSelection()\"\r\n\t\t[multiple]=\"remaining > 1\"\r\n\t/>\r\n\r\n\t<div *ngIf=\"_fileSizeExceedMsg\" class=\"bui-color-warn bui-file-size-exceed\">\r\n\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\r\n\t</div>\r\n</div>\r\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]) .bui-file-size-exceed{display:flex;align-items:center;margin-bottom:1rem}:host:not([hidden]) .bui-file-size-exceed mat-icon{margin-left:.2rem}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2);display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0;justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:12px 0;--mdc-linear-progress-track-height: 8px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-mdc-progress-bar{border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"] }]
403
+ ], standalone: false, template: "<div class=\"bui-file-upload-container\">\n\t@if (!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)) {\n\t\t<div class=\"bui-file-upload-hint\">\n\t\t\t@if (_invalidFilesDragged) {\n\t\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t\t} @else {\n\t\t\t\t@if (!_overFrame && !_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (_overFrame && !_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t\t}\n\t\t\t\t@if (_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t}\n\t@if (_uploadingItems.length) {\n\t\t<div\n\t\t\tclass=\"bui-file-upload-list\"\n\t\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t>\n\t\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\t\t\t@for (item of _uploadingItems; track item; let idx = $index) {\n\t\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t\t@if (item.done && !item.downloading) {\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t\t@if (!item.downloading) {\n\t\t\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (item.downloading) {\n\t\t\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\"></mat-progress-bar>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t@if (item.done) {\n\t\t\t\t\t\t\t\t\t100%\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t@if (idx < _uploadingItems.length - 1) {\n\t\t\t\t\t<mat-divider></mat-divider>\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t}\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n\n\t@if (_fileSizeExceedMsg) {\n\t\t<div class=\"bui-color-warn bui-file-size-exceed\">\n\t\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\n\t\t</div>\n\t}\n</div>\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]) .bui-file-size-exceed{display:flex;align-items:center;margin-bottom:1rem}:host:not([hidden]) .bui-file-size-exceed mat-icon{margin-left:.2rem}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2);display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0;justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:12px 0;--mat-progress-bar-track-height: 8px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-mdc-progress-bar{border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"] }]
404
404
  }], ctorParameters: () => [{ type: FileUploadService }], propDecorators: { uploadActionText: [{
405
405
  type: Input
406
406
  }], fileUploadedLabel: [{
@@ -433,15 +433,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
433
433
  }] } });
434
434
 
435
435
  class FileUploadModule {
436
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
437
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: FileUploadModule, declarations: [FileUploadComponent], imports: [CommonModule,
436
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
437
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: FileUploadModule, declarations: [FileUploadComponent], imports: [CommonModule,
438
438
  MatIconModule,
439
439
  IconFontModule,
440
440
  MatProgressBarModule,
441
441
  MatButtonModule,
442
442
  MatDividerModule,
443
443
  MatTooltipModule], exports: [FileUploadComponent] }); }
444
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FileUploadModule, imports: [CommonModule,
444
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FileUploadModule, imports: [CommonModule,
445
445
  MatIconModule,
446
446
  IconFontModule,
447
447
  MatProgressBarModule,
@@ -449,7 +449,7 @@ class FileUploadModule {
449
449
  MatDividerModule,
450
450
  MatTooltipModule] }); }
451
451
  }
452
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FileUploadModule, decorators: [{
452
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FileUploadModule, decorators: [{
453
453
  type: NgModule,
454
454
  args: [{
455
455
  declarations: [FileUploadComponent],