@acorex/components 6.0.14 → 6.0.17

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 (149) hide show
  1. package/alert/src/alert.component.d.ts +1 -1
  2. package/avatar/src/avatar.component.d.ts +6 -9
  3. package/badge/src/badge.component.d.ts +1 -1
  4. package/breadcrumbs/src/breadcrumbs-item.component.d.ts +4 -4
  5. package/button/src/button-group.component.d.ts +4 -4
  6. package/button/src/button-item.component.d.ts +4 -4
  7. package/color-picker/src/color-picker.component.d.ts +14 -14
  8. package/common/src/auto-focus.directive.d.ts +2 -1
  9. package/common/src/events.class.d.ts +1 -1
  10. package/date-picker/src/datepicker.component.d.ts +11 -11
  11. package/decorators/public-api.d.ts +1 -0
  12. package/decorators/src/decorators.module.d.ts +3 -2
  13. package/decorators/src/text.component.d.ts +9 -0
  14. package/dialog/src/dialog.service.d.ts +3 -1
  15. package/dropdown/src/dropdown-panel.component.d.ts +1 -0
  16. package/dropdown/src/dropdown.module.d.ts +7 -5
  17. package/esm2020/avatar/src/avatar.component.mjs +14 -21
  18. package/esm2020/badge/src/badge.component.mjs +3 -3
  19. package/esm2020/button/src/button-item.component.mjs +3 -3
  20. package/esm2020/calendar/src/calendar.component.mjs +5 -2
  21. package/esm2020/collapse/src/collapse.component.mjs +3 -3
  22. package/esm2020/common/src/auto-focus.directive.mjs +7 -3
  23. package/esm2020/common/src/events.class.mjs +1 -1
  24. package/esm2020/decorators/public-api.mjs +2 -1
  25. package/esm2020/decorators/src/decorators.module.mjs +8 -4
  26. package/esm2020/decorators/src/icon.component.mjs +3 -2
  27. package/esm2020/decorators/src/text.component.mjs +21 -0
  28. package/esm2020/dialog/src/dialog.class.mjs +1 -1
  29. package/esm2020/dialog/src/dialog.component.mjs +1 -1
  30. package/esm2020/dialog/src/dialog.service.mjs +11 -7
  31. package/esm2020/dropdown/src/dropdown-panel.component.mjs +14 -3
  32. package/esm2020/dropdown/src/dropdown.module.mjs +6 -4
  33. package/esm2020/image/src/image.component.mjs +36 -9
  34. package/esm2020/menu/src/menu.component.mjs +5 -3
  35. package/esm2020/number-box/src/number-box.component.mjs +10 -4
  36. package/esm2020/password-box/src/password-box.component.mjs +11 -5
  37. package/esm2020/popover/src/popover.component.mjs +9 -18
  38. package/esm2020/popup/src/popup.component.mjs +14 -6
  39. package/esm2020/popup/src/popup.module.mjs +4 -3
  40. package/esm2020/popup/src/popup.service.mjs +8 -4
  41. package/esm2020/textarea/src/textarea.component.mjs +11 -5
  42. package/esm2020/textbox/src/textbox.component.mjs +31 -9
  43. package/esm2020/time-box/src/time-box.component.mjs +10 -4
  44. package/esm2020/uploader/src/uploader.component.mjs +37 -7
  45. package/esm2020/uploader/src/uploader.module.mjs +5 -4
  46. package/fesm2015/acorex-components-avatar.mjs +13 -20
  47. package/fesm2015/acorex-components-avatar.mjs.map +1 -1
  48. package/fesm2015/acorex-components-badge.mjs +2 -2
  49. package/fesm2015/acorex-components-badge.mjs.map +1 -1
  50. package/fesm2015/acorex-components-button.mjs +2 -2
  51. package/fesm2015/acorex-components-button.mjs.map +1 -1
  52. package/fesm2015/acorex-components-calendar.mjs +3 -1
  53. package/fesm2015/acorex-components-calendar.mjs.map +1 -1
  54. package/fesm2015/acorex-components-collapse.mjs +2 -2
  55. package/fesm2015/acorex-components-collapse.mjs.map +1 -1
  56. package/fesm2015/acorex-components-common.mjs +6 -2
  57. package/fesm2015/acorex-components-common.mjs.map +1 -1
  58. package/fesm2015/acorex-components-decorators.mjs +27 -5
  59. package/fesm2015/acorex-components-decorators.mjs.map +1 -1
  60. package/fesm2015/acorex-components-dialog.mjs +11 -7
  61. package/fesm2015/acorex-components-dialog.mjs.map +1 -1
  62. package/fesm2015/acorex-components-dropdown.mjs +18 -5
  63. package/fesm2015/acorex-components-dropdown.mjs.map +1 -1
  64. package/fesm2015/acorex-components-image.mjs +35 -8
  65. package/fesm2015/acorex-components-image.mjs.map +1 -1
  66. package/fesm2015/acorex-components-menu.mjs +5 -3
  67. package/fesm2015/acorex-components-menu.mjs.map +1 -1
  68. package/fesm2015/acorex-components-number-box.mjs +10 -4
  69. package/fesm2015/acorex-components-number-box.mjs.map +1 -1
  70. package/fesm2015/acorex-components-password-box.mjs +10 -4
  71. package/fesm2015/acorex-components-password-box.mjs.map +1 -1
  72. package/fesm2015/acorex-components-popover.mjs +9 -18
  73. package/fesm2015/acorex-components-popover.mjs.map +1 -1
  74. package/fesm2015/acorex-components-popup.mjs +23 -11
  75. package/fesm2015/acorex-components-popup.mjs.map +1 -1
  76. package/fesm2015/acorex-components-textarea.mjs +10 -4
  77. package/fesm2015/acorex-components-textarea.mjs.map +1 -1
  78. package/fesm2015/acorex-components-textbox.mjs +30 -8
  79. package/fesm2015/acorex-components-textbox.mjs.map +1 -1
  80. package/fesm2015/acorex-components-time-box.mjs +10 -4
  81. package/fesm2015/acorex-components-time-box.mjs.map +1 -1
  82. package/fesm2015/acorex-components-uploader.mjs +41 -9
  83. package/fesm2015/acorex-components-uploader.mjs.map +1 -1
  84. package/fesm2020/acorex-components-avatar.mjs +13 -20
  85. package/fesm2020/acorex-components-avatar.mjs.map +1 -1
  86. package/fesm2020/acorex-components-badge.mjs +2 -2
  87. package/fesm2020/acorex-components-badge.mjs.map +1 -1
  88. package/fesm2020/acorex-components-button.mjs +2 -2
  89. package/fesm2020/acorex-components-button.mjs.map +1 -1
  90. package/fesm2020/acorex-components-calendar.mjs +3 -1
  91. package/fesm2020/acorex-components-calendar.mjs.map +1 -1
  92. package/fesm2020/acorex-components-collapse.mjs +2 -2
  93. package/fesm2020/acorex-components-collapse.mjs.map +1 -1
  94. package/fesm2020/acorex-components-common.mjs +6 -2
  95. package/fesm2020/acorex-components-common.mjs.map +1 -1
  96. package/fesm2020/acorex-components-decorators.mjs +27 -5
  97. package/fesm2020/acorex-components-decorators.mjs.map +1 -1
  98. package/fesm2020/acorex-components-dialog.mjs +11 -7
  99. package/fesm2020/acorex-components-dialog.mjs.map +1 -1
  100. package/fesm2020/acorex-components-dropdown.mjs +18 -5
  101. package/fesm2020/acorex-components-dropdown.mjs.map +1 -1
  102. package/fesm2020/acorex-components-image.mjs +35 -8
  103. package/fesm2020/acorex-components-image.mjs.map +1 -1
  104. package/fesm2020/acorex-components-menu.mjs +5 -3
  105. package/fesm2020/acorex-components-menu.mjs.map +1 -1
  106. package/fesm2020/acorex-components-number-box.mjs +10 -4
  107. package/fesm2020/acorex-components-number-box.mjs.map +1 -1
  108. package/fesm2020/acorex-components-password-box.mjs +10 -4
  109. package/fesm2020/acorex-components-password-box.mjs.map +1 -1
  110. package/fesm2020/acorex-components-popover.mjs +8 -17
  111. package/fesm2020/acorex-components-popover.mjs.map +1 -1
  112. package/fesm2020/acorex-components-popup.mjs +23 -11
  113. package/fesm2020/acorex-components-popup.mjs.map +1 -1
  114. package/fesm2020/acorex-components-textarea.mjs +10 -4
  115. package/fesm2020/acorex-components-textarea.mjs.map +1 -1
  116. package/fesm2020/acorex-components-textbox.mjs +30 -8
  117. package/fesm2020/acorex-components-textbox.mjs.map +1 -1
  118. package/fesm2020/acorex-components-time-box.mjs +10 -4
  119. package/fesm2020/acorex-components-time-box.mjs.map +1 -1
  120. package/fesm2020/acorex-components-uploader.mjs +40 -9
  121. package/fesm2020/acorex-components-uploader.mjs.map +1 -1
  122. package/image/src/image.component.d.ts +16 -7
  123. package/menu/src/menu.component.d.ts +1 -0
  124. package/mixin/src/base-components.class.d.ts +1 -1
  125. package/mixin/src/base-menu-mixin.class.d.ts +4 -4
  126. package/mixin/src/button-mixin.class.d.ts +1 -1
  127. package/mixin/src/clickable-mixin.class.d.ts +1 -1
  128. package/mixin/src/color-look-mixing.class.d.ts +1 -1
  129. package/mixin/src/datalist-component.class.d.ts +9 -9
  130. package/mixin/src/dropdown-mixin.class.d.ts +1 -1
  131. package/mixin/src/interactive-mixin.class.d.ts +3 -3
  132. package/mixin/src/loading-mixin.class.d.ts +1 -1
  133. package/mixin/src/mixin.class.d.ts +42 -42
  134. package/mixin/src/page-component.class.d.ts +1 -1
  135. package/mixin/src/selection-component.class.d.ts +1 -1
  136. package/mixin/src/sizable-mixin.class.d.ts +1 -1
  137. package/mixin/src/textbox-mixin.class.d.ts +3 -3
  138. package/mixin/src/value-mixin.class.d.ts +7 -7
  139. package/number-box/src/number-box.component.d.ts +2 -0
  140. package/package.json +1 -1
  141. package/password-box/src/password-box.component.d.ts +2 -0
  142. package/popover/src/popover.component.d.ts +2 -2
  143. package/popup/src/popup.module.d.ts +7 -6
  144. package/tabs/src/tab-item.component.d.ts +1 -1
  145. package/textarea/src/textarea.component.d.ts +2 -0
  146. package/textbox/src/textbox.component.d.ts +2 -0
  147. package/time-box/src/time-box.component.d.ts +2 -0
  148. package/uploader/src/uploader.component.d.ts +10 -3
  149. package/uploader/src/uploader.module.d.ts +2 -1
@@ -2,7 +2,7 @@ import IMask from 'imask';
2
2
  import * as i5 from 'angular-imask';
3
3
  import { IMaskDirective, IMaskModule } from 'angular-imask';
4
4
  import * as i0 from '@angular/core';
5
- import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ViewChild, NgModule } from '@angular/core';
5
+ import { Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Input, NgModule } from '@angular/core';
6
6
  import { toNumber } from 'lodash-es';
7
7
  import { AXBaseTextBoxMixin } from '@acorex/components/mixin';
8
8
  import * as i1 from '@angular/common';
@@ -111,6 +111,9 @@ class AXNumberBoxComponent extends AXBaseTextBoxMixin {
111
111
  super._onOptionChanged(option);
112
112
  this._updateMask();
113
113
  }
114
+ focus() {
115
+ this.input.nativeElement.focus();
116
+ }
114
117
  _updateMask() {
115
118
  var _a, _b, _c, _d;
116
119
  if (!this._maskObj) {
@@ -212,7 +215,7 @@ class AXNumberBoxComponent extends AXBaseTextBoxMixin {
212
215
  }
213
216
  }
214
217
  AXNumberBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXNumberBoxComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
215
- AXNumberBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXNumberBoxComponent, selector: "ax-number-box", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", size: "size", value: "value", placeholder: "placeholder", maxLength: "maxLength", allowNull: "allowNull", debounceTime: "debounceTime", type: "type", autoComplete: "autoComplete", name: "name", checked: "checked", thousandsSeparator: "thousandsSeparator", padDecimalZeros: "padDecimalZeros", step: "step", decimals: "decimals", decimalStep: "decimalStep", showSpinButtons: "showSpinButtons", minValue: "minValue", maxValue: "maxValue" }, outputs: { valueChange: "valueChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus" }, host: { classAttribute: "ax-editor-container ax-number-box" }, viewQueries: [{ propertyName: "_maskDirective", first: true, predicate: IMaskDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input class=\"ax-input\" type=\"text\" \r\n [attr.placeholder]=\"placeholder\" \r\n [attr.autocomplete]=\"autoComplete\"\r\n [imask]=\"_maskObj\" \r\n [unmask]=\"'typed'\"\r\n [attr.min]=\"minValue\"\r\n [attr.max]=\"maxValue\" \r\n [class.ax-state-disabled]=\"disabled\" \r\n [class.ax-state-readonly]=\"readonly\"\r\n [disabled]=\"disabled\" \r\n [readonly]=\"readonly\" \r\n [tabindex]=\"tabIndex\" \r\n [ngModel]=\"value\" (ngModelChange)=\"_handleModleChange($event)\"\r\n (keydown)=\"_handleOnKeydownEvent($event)\" \r\n (keyup)=\"_emitOnKeyupEvent($event)\"\r\n (keypress)=\"_emitOnKeypressEvent($event)\"\r\n (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\"\r\n >\r\n\r\n<div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-ic-arrow-fill ax-rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-ic-arrow-fill ax--rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n</div>\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>", dependencies: [{ kind: "directive", type: i1.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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }, { kind: "component", type: i4.AXDecoratorPrefixComponent, selector: "ax-prefix" }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: i5.IMaskDirective, selector: "[imask]", inputs: ["imask", "unmask", "imaskElement"], outputs: ["accept", "complete"], exportAs: ["imask"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
218
+ AXNumberBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXNumberBoxComponent, selector: "ax-number-box", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", size: "size", value: "value", placeholder: "placeholder", maxLength: "maxLength", allowNull: "allowNull", debounceTime: "debounceTime", type: "type", autoComplete: "autoComplete", name: "name", checked: "checked", thousandsSeparator: "thousandsSeparator", padDecimalZeros: "padDecimalZeros", step: "step", decimals: "decimals", decimalStep: "decimalStep", showSpinButtons: "showSpinButtons", minValue: "minValue", maxValue: "maxValue" }, outputs: { valueChange: "valueChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus" }, host: { classAttribute: "ax-editor-container ax-number-box" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "_maskDirective", first: true, predicate: IMaskDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" type=\"text\" \r\n [attr.placeholder]=\"placeholder\" \r\n [attr.autocomplete]=\"autoComplete\"\r\n [imask]=\"_maskObj\" \r\n [unmask]=\"'typed'\"\r\n [attr.min]=\"minValue\"\r\n [attr.max]=\"maxValue\" \r\n [class.ax-state-disabled]=\"disabled\" \r\n [class.ax-state-readonly]=\"readonly\"\r\n [disabled]=\"disabled\" \r\n [readonly]=\"readonly\" \r\n [tabindex]=\"tabIndex\" \r\n [ngModel]=\"value\" (ngModelChange)=\"_handleModleChange($event)\"\r\n (keydown)=\"_handleOnKeydownEvent($event)\" \r\n (keyup)=\"_emitOnKeyupEvent($event)\"\r\n (keypress)=\"_emitOnKeypressEvent($event)\"\r\n (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\"\r\n >\r\n\r\n<div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-ic-arrow-fill ax-rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-ic-arrow-fill ax--rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n</div>\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>", dependencies: [{ kind: "directive", type: i1.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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }, { kind: "component", type: i4.AXDecoratorPrefixComponent, selector: "ax-prefix" }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: i5.IMaskDirective, selector: "[imask]", inputs: ["imask", "unmask", "imaskElement"], outputs: ["accept", "complete"], exportAs: ["imask"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
216
219
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXNumberBoxComponent, decorators: [{
217
220
  type: Component,
218
221
  args: [{ selector: 'ax-number-box', inputs: [
@@ -237,8 +240,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
237
240
  'onValueChanged',
238
241
  'onBlur',
239
242
  'onFocus'
240
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-editor-container ax-number-box' }, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input class=\"ax-input\" type=\"text\" \r\n [attr.placeholder]=\"placeholder\" \r\n [attr.autocomplete]=\"autoComplete\"\r\n [imask]=\"_maskObj\" \r\n [unmask]=\"'typed'\"\r\n [attr.min]=\"minValue\"\r\n [attr.max]=\"maxValue\" \r\n [class.ax-state-disabled]=\"disabled\" \r\n [class.ax-state-readonly]=\"readonly\"\r\n [disabled]=\"disabled\" \r\n [readonly]=\"readonly\" \r\n [tabindex]=\"tabIndex\" \r\n [ngModel]=\"value\" (ngModelChange)=\"_handleModleChange($event)\"\r\n (keydown)=\"_handleOnKeydownEvent($event)\" \r\n (keyup)=\"_emitOnKeyupEvent($event)\"\r\n (keypress)=\"_emitOnKeypressEvent($event)\"\r\n (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\"\r\n >\r\n\r\n<div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-ic-arrow-fill ax-rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-ic-arrow-fill ax--rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n</div>\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>" }]
241
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { thousandsSeparator: [{
243
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-editor-container ax-number-box' }, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" type=\"text\" \r\n [attr.placeholder]=\"placeholder\" \r\n [attr.autocomplete]=\"autoComplete\"\r\n [imask]=\"_maskObj\" \r\n [unmask]=\"'typed'\"\r\n [attr.min]=\"minValue\"\r\n [attr.max]=\"maxValue\" \r\n [class.ax-state-disabled]=\"disabled\" \r\n [class.ax-state-readonly]=\"readonly\"\r\n [disabled]=\"disabled\" \r\n [readonly]=\"readonly\" \r\n [tabindex]=\"tabIndex\" \r\n [ngModel]=\"value\" (ngModelChange)=\"_handleModleChange($event)\"\r\n (keydown)=\"_handleOnKeydownEvent($event)\" \r\n (keyup)=\"_emitOnKeyupEvent($event)\"\r\n (keypress)=\"_emitOnKeypressEvent($event)\"\r\n (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\"\r\n >\r\n\r\n<div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-ic-arrow-fill ax-rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-ic-arrow-fill ax--rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n</div>\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>" }]
244
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { input: [{
245
+ type: ViewChild,
246
+ args: ['input']
247
+ }], thousandsSeparator: [{
242
248
  type: Input
243
249
  }], padDecimalZeros: [{
244
250
  type: Input
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-number-box.mjs","sources":["../../../../projects/acorex/components/number-box/src/number-box.component.ts","../../../../projects/acorex/components/number-box/src/number-box.component.html","../../../../projects/acorex/components/number-box/src/number-box.module.ts","../../../../projects/acorex/components/number-box/acorex-components-number-box.ts"],"sourcesContent":["import IMask from 'imask';\r\nimport { IMaskDirective } from 'angular-imask';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n ViewChild,\r\n} from '@angular/core';\r\n\r\nimport { AXClickEvent } from '@acorex/components/common';\r\n\r\nimport { toNumber } from 'lodash-es';\r\nimport {\r\n AXBaseTextBoxMixin,\r\n AXComponentOptionChanged,\r\n} from '@acorex/components/mixin';\r\n\r\n/**\r\n * The NumberBox is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-number-box',\r\n templateUrl: './number-box.component.html',\r\n inputs: [\r\n 'disabled',\r\n 'readonly',\r\n 'tabIndex',\r\n 'size',\r\n 'value',\r\n 'placeholder',\r\n 'maxLength',\r\n 'allowNull',\r\n 'debounceTime',\r\n 'type',\r\n 'autoComplete',\r\n 'readonly',\r\n 'allowNull',\r\n 'value',\r\n 'name',\r\n 'checked',\r\n ],\r\n outputs: [\r\n 'valueChange',\r\n 'onValueChanged',\r\n 'onBlur',\r\n 'onFocus'\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: { class: 'ax-editor-container ax-number-box' },\r\n})\r\nexport class AXNumberBoxComponent extends AXBaseTextBoxMixin {\r\n private _thousandsSeparator: string;\r\n /**\r\n * A character value that specifies the separator character.\r\n */\r\n @Input()\r\n public get thousandsSeparator(): string {\r\n return this._thousandsSeparator;\r\n }\r\n public set thousandsSeparator(v: string) {\r\n this._setOption({\r\n name: 'thousandsSeparator',\r\n value: v ?? '',\r\n });\r\n }\r\n\r\n private _padDecimalZeros: boolean = false;\r\n /**\r\n * A character value that specifies the separator character.\r\n */\r\n @Input()\r\n public get padDecimalZeros(): boolean {\r\n return this._padDecimalZeros;\r\n }\r\n public set padDecimalZeros(v: boolean) {\r\n this._setOption({\r\n name: 'padDecimalZeros',\r\n value: v,\r\n });\r\n }\r\n\r\n /**\r\n * Specifies the value that is used to increment or decrement the **Integer** part of number\r\n */\r\n @Input()\r\n step: number = 1;\r\n\r\n private _decimals: number = 0;\r\n /**\r\n * Specifies the number of decimals that the user can enter\r\n */\r\n @Input()\r\n public get decimals(): number {\r\n return this._decimals;\r\n }\r\n public set decimals(v: number) {\r\n this._setOption({\r\n name: 'decimals',\r\n value: v ?? 0,\r\n });\r\n }\r\n\r\n /**\r\n * Specifies the value that is used to increment or decrement the **Deciaml** part of number\r\n */\r\n @Input()\r\n decimalStep: number | 'auto' = 'auto';\r\n\r\n /**\r\n * Specifies whether the Up and Down spin buttons will be rendered or not\r\n */\r\n @Input()\r\n showSpinButtons: boolean = true;\r\n\r\n private _minValue: number = Number.MIN_SAFE_INTEGER;\r\n /**\r\n * Specifies the smallest value that is valid\r\n */\r\n @Input()\r\n public get minValue(): number {\r\n return this._minValue;\r\n }\r\n public set minValue(v: number) {\r\n this._setOption({\r\n name: 'minValue',\r\n value: v != null ? Number(v) : Number.MIN_SAFE_INTEGER,\r\n });\r\n }\r\n\r\n private _maxValue: number = Number.MAX_SAFE_INTEGER;\r\n /**\r\n * Specifies the greatest value that is valid\r\n */\r\n @Input()\r\n public get maxValue(): number {\r\n return this._maxValue;\r\n }\r\n public set maxValue(v: number) {\r\n this._setOption({\r\n name: 'maxValue',\r\n value: v != null ? Number(v) : Number.MAX_SAFE_INTEGER,\r\n });\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n _maskObj: IMask.MaskedNumber;\r\n\r\n @ViewChild(IMaskDirective)\r\n private _maskDirective: IMaskDirective<IMask.MaskedNumber>;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, private cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onViewInit(): void {\r\n super.onViewInit();\r\n this._updateMask();\r\n }\r\n\r\n _onOptionChanged(option: AXComponentOptionChanged): void {\r\n super._onOptionChanged(option);\r\n this._updateMask();\r\n }\r\n\r\n private _updateMask() {\r\n if (!this._maskObj) {\r\n this._maskObj = IMask.createMask({\r\n mask: Number,\r\n min: this.minValue,\r\n max: this.maxValue,\r\n thousandsSeparator: this.thousandsSeparator || '',\r\n scale: this.decimals,\r\n radix: '.',\r\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\r\n });\r\n } else {\r\n this._maskObj.updateOptions({\r\n min: this.minValue,\r\n max: this.maxValue,\r\n thousandsSeparator: this.thousandsSeparator || '',\r\n scale: this.decimals,\r\n radix: '.',\r\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\r\n });\r\n }\r\n this._maskDirective?.maskRef?.updateValue();\r\n this._maskDirective?.maskRef?.updateControl();\r\n }\r\n\r\n _handleOnKeydownEvent(e: KeyboardEvent) {\r\n if (this.disabled || this.readonly) return;\r\n const ignore = () => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n };\r\n this._setUserInteraction();\r\n const input = e.target as HTMLInputElement;\r\n const valStr = input.value;\r\n const decimalPointIndex = valStr.indexOf('.');\r\n const _cursorPos = input.selectionStart!;\r\n\r\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\r\n if (\r\n decimalPointIndex > 0 &&\r\n _cursorPos > decimalPointIndex &&\r\n this.decimals > 0\r\n ) {\r\n e.key === 'ArrowDown' ? this.decimalStepDown() : this.decimalStepUp();\r\n } else {\r\n e.key === 'ArrowDown' ? this.stepDown() : this.stepUp();\r\n }\r\n ignore();\r\n setTimeout(() => {\r\n input.setSelectionRange(_cursorPos, _cursorPos);\r\n }, 5);\r\n }\r\n super._emitOnKeydownEvent(e);\r\n }\r\n\r\n _handleUpDownClick(e: AXClickEvent, v: -1 | 1) {\r\n if (this.disabled || this.readonly) return;\r\n this._setUserInteraction();\r\n v == 1 ? this.stepUp() : this.stepDown();\r\n }\r\n\r\n _setValue(value: any) {\r\n if (value == null && this.allowNull) {\r\n return null;\r\n }\r\n const v = toNumber(value);\r\n if (v < this.minValue) return this.minValue;\r\n if (v > this.maxValue) return this.maxValue;\r\n return v;\r\n }\r\n\r\n stepUp() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value += toNumber(this.step);\r\n }\r\n\r\n stepDown() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value -= toNumber(this.step);\r\n }\r\n\r\n decimalStepUp() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value += toNumber(\r\n this.decimalStep == 'auto'\r\n ? 1 / Math.pow(10, this.decimals)\r\n : this.decimalStep\r\n );\r\n }\r\n\r\n decimalStepDown() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value -= toNumber(\r\n this.decimalStep == 'auto'\r\n ? 1 / Math.pow(10, this.decimals)\r\n : this.decimalStep\r\n );\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input class=\"ax-input\" type=\"text\" \r\n [attr.placeholder]=\"placeholder\" \r\n [attr.autocomplete]=\"autoComplete\"\r\n [imask]=\"_maskObj\" \r\n [unmask]=\"'typed'\"\r\n [attr.min]=\"minValue\"\r\n [attr.max]=\"maxValue\" \r\n [class.ax-state-disabled]=\"disabled\" \r\n [class.ax-state-readonly]=\"readonly\"\r\n [disabled]=\"disabled\" \r\n [readonly]=\"readonly\" \r\n [tabindex]=\"tabIndex\" \r\n [ngModel]=\"value\" (ngModelChange)=\"_handleModleChange($event)\"\r\n (keydown)=\"_handleOnKeydownEvent($event)\" \r\n (keyup)=\"_emitOnKeyupEvent($event)\"\r\n (keypress)=\"_emitOnKeypressEvent($event)\"\r\n (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\"\r\n >\r\n\r\n<div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-ic-arrow-fill ax-rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-ic-arrow-fill ax--rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n</div>\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>","import { NgModule } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport {IMaskModule} from 'angular-imask';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXNumberBoxComponent } from './number-box.component';\r\n\r\nconst COMPONENT = [AXNumberBoxComponent];\r\nconst MODULES = [\r\n CommonModule,\r\n FormsModule,\r\n AXButtonModule,\r\n AXDecoratorModule,\r\n IMaskModule\r\n];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXNumberBoxModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoBA;;;;AAIG;AAgCG,MAAO,oBAAqB,SAAQ,kBAAkB,CAAA;AAsG1D;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAU,GAAsB,EAAA;AAChE,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AADmB,QAAA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;AAzF1D,QAAA,IAAgB,CAAA,gBAAA,GAAY,KAAK,CAAC;AAe1C;;AAEG;AAEH,QAAA,IAAI,CAAA,IAAA,GAAW,CAAC,CAAC;AAET,QAAA,IAAS,CAAA,SAAA,GAAW,CAAC,CAAC;AAe9B;;AAEG;AAEH,QAAA,IAAW,CAAA,WAAA,GAAoB,MAAM,CAAC;AAEtC;;AAEG;AAEH,QAAA,IAAe,CAAA,eAAA,GAAY,IAAI,CAAC;AAExB,QAAA,IAAA,CAAA,SAAS,GAAW,MAAM,CAAC,gBAAgB,CAAC;AAe5C,QAAA,IAAA,CAAA,SAAS,GAAW,MAAM,CAAC,gBAAgB,CAAC;KA4BnD;AAzGD;;AAEG;AACH,IAAA,IACW,kBAAkB,GAAA;QAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC;KACjC;IACD,IAAW,kBAAkB,CAAC,CAAS,EAAA;QACrC,IAAI,CAAC,UAAU,CAAC;AACd,YAAA,IAAI,EAAE,oBAAoB;AAC1B,YAAA,KAAK,EAAE,CAAC,KAAA,IAAA,IAAD,CAAC,KAAD,KAAA,CAAA,GAAA,CAAC,GAAI,EAAE;AACf,SAAA,CAAC,CAAC;KACJ;AAGD;;AAEG;AACH,IAAA,IACW,eAAe,GAAA;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;KAC9B;IACD,IAAW,eAAe,CAAC,CAAU,EAAA;QACn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EAAA,EAAA,IAAA,EAAA,iBAAiB,YAJb,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;iBAChB,CAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-number-box.mjs","sources":["../../../../projects/acorex/components/number-box/src/number-box.component.ts","../../../../projects/acorex/components/number-box/src/number-box.component.html","../../../../projects/acorex/components/number-box/src/number-box.module.ts","../../../../projects/acorex/components/number-box/acorex-components-number-box.ts"],"sourcesContent":["import IMask from 'imask';\r\nimport { IMaskDirective } from 'angular-imask';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n ViewChild,\r\n} from '@angular/core';\r\n\r\nimport { AXClickEvent } from '@acorex/components/common';\r\n\r\nimport { toNumber } from 'lodash-es';\r\nimport {\r\n AXBaseTextBoxMixin,\r\n AXComponentOptionChanged,\r\n} from '@acorex/components/mixin';\r\n\r\n/**\r\n * The NumberBox is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-number-box',\r\n templateUrl: './number-box.component.html',\r\n inputs: [\r\n 'disabled',\r\n 'readonly',\r\n 'tabIndex',\r\n 'size',\r\n 'value',\r\n 'placeholder',\r\n 'maxLength',\r\n 'allowNull',\r\n 'debounceTime',\r\n 'type',\r\n 'autoComplete',\r\n 'readonly',\r\n 'allowNull',\r\n 'value',\r\n 'name',\r\n 'checked',\r\n ],\r\n outputs: [\r\n 'valueChange',\r\n 'onValueChanged',\r\n 'onBlur',\r\n 'onFocus'\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: { class: 'ax-editor-container ax-number-box' },\r\n})\r\nexport class AXNumberBoxComponent extends AXBaseTextBoxMixin {\r\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\r\n\r\n private _thousandsSeparator: string;\r\n /**\r\n * A character value that specifies the separator character.\r\n */\r\n @Input()\r\n public get thousandsSeparator(): string {\r\n return this._thousandsSeparator;\r\n }\r\n public set thousandsSeparator(v: string) {\r\n this._setOption({\r\n name: 'thousandsSeparator',\r\n value: v ?? '',\r\n });\r\n }\r\n\r\n private _padDecimalZeros: boolean = false;\r\n /**\r\n * A character value that specifies the separator character.\r\n */\r\n @Input()\r\n public get padDecimalZeros(): boolean {\r\n return this._padDecimalZeros;\r\n }\r\n public set padDecimalZeros(v: boolean) {\r\n this._setOption({\r\n name: 'padDecimalZeros',\r\n value: v,\r\n });\r\n }\r\n\r\n /**\r\n * Specifies the value that is used to increment or decrement the **Integer** part of number\r\n */\r\n @Input()\r\n step: number = 1;\r\n\r\n private _decimals: number = 0;\r\n /**\r\n * Specifies the number of decimals that the user can enter\r\n */\r\n @Input()\r\n public get decimals(): number {\r\n return this._decimals;\r\n }\r\n public set decimals(v: number) {\r\n this._setOption({\r\n name: 'decimals',\r\n value: v ?? 0,\r\n });\r\n }\r\n\r\n /**\r\n * Specifies the value that is used to increment or decrement the **Deciaml** part of number\r\n */\r\n @Input()\r\n decimalStep: number | 'auto' = 'auto';\r\n\r\n /**\r\n * Specifies whether the Up and Down spin buttons will be rendered or not\r\n */\r\n @Input()\r\n showSpinButtons: boolean = true;\r\n\r\n private _minValue: number = Number.MIN_SAFE_INTEGER;\r\n /**\r\n * Specifies the smallest value that is valid\r\n */\r\n @Input()\r\n public get minValue(): number {\r\n return this._minValue;\r\n }\r\n public set minValue(v: number) {\r\n this._setOption({\r\n name: 'minValue',\r\n value: v != null ? Number(v) : Number.MIN_SAFE_INTEGER,\r\n });\r\n }\r\n\r\n private _maxValue: number = Number.MAX_SAFE_INTEGER;\r\n /**\r\n * Specifies the greatest value that is valid\r\n */\r\n @Input()\r\n public get maxValue(): number {\r\n return this._maxValue;\r\n }\r\n public set maxValue(v: number) {\r\n this._setOption({\r\n name: 'maxValue',\r\n value: v != null ? Number(v) : Number.MAX_SAFE_INTEGER,\r\n });\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n _maskObj: IMask.MaskedNumber;\r\n\r\n @ViewChild(IMaskDirective)\r\n private _maskDirective: IMaskDirective<IMask.MaskedNumber>;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, private cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onViewInit(): void {\r\n super.onViewInit();\r\n this._updateMask();\r\n }\r\n\r\n _onOptionChanged(option: AXComponentOptionChanged): void {\r\n super._onOptionChanged(option);\r\n this._updateMask();\r\n }\r\n\r\n focus(): void {\r\n this.input.nativeElement.focus()\r\n }\r\n\r\n private _updateMask() {\r\n if (!this._maskObj) {\r\n this._maskObj = IMask.createMask({\r\n mask: Number,\r\n min: this.minValue,\r\n max: this.maxValue,\r\n thousandsSeparator: this.thousandsSeparator || '',\r\n scale: this.decimals,\r\n radix: '.',\r\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\r\n });\r\n } else {\r\n this._maskObj.updateOptions({\r\n min: this.minValue,\r\n max: this.maxValue,\r\n thousandsSeparator: this.thousandsSeparator || '',\r\n scale: this.decimals,\r\n radix: '.',\r\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\r\n });\r\n }\r\n this._maskDirective?.maskRef?.updateValue();\r\n this._maskDirective?.maskRef?.updateControl();\r\n }\r\n\r\n _handleOnKeydownEvent(e: KeyboardEvent) {\r\n if (this.disabled || this.readonly) return;\r\n const ignore = () => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n };\r\n this._setUserInteraction();\r\n const input = e.target as HTMLInputElement;\r\n const valStr = input.value;\r\n const decimalPointIndex = valStr.indexOf('.');\r\n const _cursorPos = input.selectionStart!;\r\n\r\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\r\n if (\r\n decimalPointIndex > 0 &&\r\n _cursorPos > decimalPointIndex &&\r\n this.decimals > 0\r\n ) {\r\n e.key === 'ArrowDown' ? this.decimalStepDown() : this.decimalStepUp();\r\n } else {\r\n e.key === 'ArrowDown' ? this.stepDown() : this.stepUp();\r\n }\r\n ignore();\r\n setTimeout(() => {\r\n input.setSelectionRange(_cursorPos, _cursorPos);\r\n }, 5);\r\n }\r\n super._emitOnKeydownEvent(e);\r\n }\r\n\r\n _handleUpDownClick(e: AXClickEvent, v: -1 | 1) {\r\n if (this.disabled || this.readonly) return;\r\n this._setUserInteraction();\r\n v == 1 ? this.stepUp() : this.stepDown();\r\n }\r\n\r\n _setValue(value: any) {\r\n if (value == null && this.allowNull) {\r\n return null;\r\n }\r\n const v = toNumber(value);\r\n if (v < this.minValue) return this.minValue;\r\n if (v > this.maxValue) return this.maxValue;\r\n return v;\r\n }\r\n\r\n stepUp() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value += toNumber(this.step);\r\n }\r\n\r\n stepDown() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value -= toNumber(this.step);\r\n }\r\n\r\n decimalStepUp() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value += toNumber(\r\n this.decimalStep == 'auto'\r\n ? 1 / Math.pow(10, this.decimals)\r\n : this.decimalStep\r\n );\r\n }\r\n\r\n decimalStepDown() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value -= toNumber(\r\n this.decimalStep == 'auto'\r\n ? 1 / Math.pow(10, this.decimals)\r\n : this.decimalStep\r\n );\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" type=\"text\" \r\n [attr.placeholder]=\"placeholder\" \r\n [attr.autocomplete]=\"autoComplete\"\r\n [imask]=\"_maskObj\" \r\n [unmask]=\"'typed'\"\r\n [attr.min]=\"minValue\"\r\n [attr.max]=\"maxValue\" \r\n [class.ax-state-disabled]=\"disabled\" \r\n [class.ax-state-readonly]=\"readonly\"\r\n [disabled]=\"disabled\" \r\n [readonly]=\"readonly\" \r\n [tabindex]=\"tabIndex\" \r\n [ngModel]=\"value\" (ngModelChange)=\"_handleModleChange($event)\"\r\n (keydown)=\"_handleOnKeydownEvent($event)\" \r\n (keyup)=\"_emitOnKeyupEvent($event)\"\r\n (keypress)=\"_emitOnKeypressEvent($event)\"\r\n (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\"\r\n >\r\n\r\n<div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-ic-arrow-fill ax-rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-ic-arrow-fill ax--rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n</div>\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>","import { NgModule } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport {IMaskModule} from 'angular-imask';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXNumberBoxComponent } from './number-box.component';\r\n\r\nconst COMPONENT = [AXNumberBoxComponent];\r\nconst MODULES = [\r\n CommonModule,\r\n FormsModule,\r\n AXButtonModule,\r\n AXDecoratorModule,\r\n IMaskModule\r\n];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXNumberBoxModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoBA;;;;AAIG;AAgCG,MAAO,oBAAqB,SAAQ,kBAAkB,CAAA;AAwG1D;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAU,GAAsB,EAAA;AAChE,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AADmB,QAAA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;AAzF1D,QAAA,IAAgB,CAAA,gBAAA,GAAY,KAAK,CAAC;AAe1C;;AAEG;AAEH,QAAA,IAAI,CAAA,IAAA,GAAW,CAAC,CAAC;AAET,QAAA,IAAS,CAAA,SAAA,GAAW,CAAC,CAAC;AAe9B;;AAEG;AAEH,QAAA,IAAW,CAAA,WAAA,GAAoB,MAAM,CAAC;AAEtC;;AAEG;AAEH,QAAA,IAAe,CAAA,eAAA,GAAY,IAAI,CAAC;AAExB,QAAA,IAAA,CAAA,SAAS,GAAW,MAAM,CAAC,gBAAgB,CAAC;AAe5C,QAAA,IAAA,CAAA,SAAS,GAAW,MAAM,CAAC,gBAAgB,CAAC;KA4BnD;AAzGD;;AAEG;AACH,IAAA,IACW,kBAAkB,GAAA;QAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC;KACjC;IACD,IAAW,kBAAkB,CAAC,CAAS,EAAA;QACrC,IAAI,CAAC,UAAU,CAAC;AACd,YAAA,IAAI,EAAE,oBAAoB;AAC1B,YAAA,KAAK,EAAE,CAAC,KAAA,IAAA,IAAD,CAAC,KAAD,KAAA,CAAA,GAAA,CAAC,GAAI,EAAE;AAC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BAAiB,CAAA;;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAjB,iBAAiB,EAAA,YAAA,EAAA,CAfX,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAEnC,YAAY;QACZ,WAAW;QACX,cAAc;QACd,iBAAiB;QACjB,WAAW,aANI,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAe1B,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAJb,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;iBAChB,CAAA;;;ACtBD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { AXBaseTextBoxMixin } from '@acorex/components/mixin';
2
2
  import * as i0 from '@angular/core';
3
- import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
3
+ import { Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, Input, NgModule } from '@angular/core';
4
4
  import * as i1 from '@angular/common';
5
5
  import { CommonModule } from '@angular/common';
6
6
  import * as i2 from '@angular/forms';
@@ -28,6 +28,9 @@ class AXPasswordBoxComponent extends AXBaseTextBoxMixin {
28
28
  */
29
29
  this.showToggleButton = true;
30
30
  }
31
+ focus() {
32
+ this.input.nativeElement.focus();
33
+ }
31
34
  toggleType() {
32
35
  if (this._type === 'password') {
33
36
  this._type = 'text';
@@ -40,7 +43,7 @@ class AXPasswordBoxComponent extends AXBaseTextBoxMixin {
40
43
  }
41
44
  }
42
45
  AXPasswordBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXPasswordBoxComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
43
- AXPasswordBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXPasswordBoxComponent, selector: "ax-password-box", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", cssClass: "cssClass", size: "size", placeholder: "placeholder", maxLength: "maxLength", allowNull: "allowNull", debounceTime: "debounceTime", type: "type", autoComplete: "autoComplete", value: "value", name: "name", checked: "checked", showToggleButton: "showToggleButton" }, outputs: { valueChange: "valueChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus" }, host: { classAttribute: "ax-password-box ax-editor-container" }, usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input class=\"ax-input\" [attr.name]=\"name\" [type]=\"_type\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\" [readonly]=\"readonly\" [tabindex]=\"tabIndex\"\r\n [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\" (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\">\r\n\r\n<ng-content select=\"ax-suffix\">\r\n\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>\r\n<ng-content select=\"ax-input-mask\">\r\n</ng-content>\r\n<ax-button color=\"light\" look=\"blank\" [size]=\"size\" (onClick)=\"toggleType()\" [tabIndex]=\"-1\" *ngIf=\"showToggleButton\">\r\n <ax-icon [icon]=\"_icon\"></ax-icon>\r\n</ax-button>", dependencies: [{ kind: "directive", type: i1.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.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
46
+ AXPasswordBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXPasswordBoxComponent, selector: "ax-password-box", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", cssClass: "cssClass", size: "size", placeholder: "placeholder", maxLength: "maxLength", allowNull: "allowNull", debounceTime: "debounceTime", type: "type", autoComplete: "autoComplete", value: "value", name: "name", checked: "checked", showToggleButton: "showToggleButton" }, outputs: { valueChange: "valueChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus" }, host: { classAttribute: "ax-password-box ax-editor-container" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" [attr.name]=\"name\" [type]=\"_type\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\" [readonly]=\"readonly\" [tabindex]=\"tabIndex\"\r\n [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\" (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\">\r\n\r\n<ng-content select=\"ax-suffix\">\r\n\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>\r\n<ng-content select=\"ax-input-mask\">\r\n</ng-content>\r\n<ax-button color=\"light\" look=\"blank\" [size]=\"size\" (onClick)=\"toggleType()\" [tabIndex]=\"-1\" *ngIf=\"showToggleButton\">\r\n <ax-icon [icon]=\"_icon\"></ax-icon>\r\n</ax-button>", dependencies: [{ kind: "directive", type: i1.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.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
44
47
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXPasswordBoxComponent, decorators: [{
45
48
  type: Component,
46
49
  args: [{ selector: 'ax-password-box', inputs: [
@@ -56,8 +59,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
56
59
  'onBlur',
57
60
  'onFocus',
58
61
  'valueChange', 'onValueChanged',
59
- ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'ax-password-box ax-editor-container' }, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input class=\"ax-input\" [attr.name]=\"name\" [type]=\"_type\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\" [readonly]=\"readonly\" [tabindex]=\"tabIndex\"\r\n [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\" (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\">\r\n\r\n<ng-content select=\"ax-suffix\">\r\n\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>\r\n<ng-content select=\"ax-input-mask\">\r\n</ng-content>\r\n<ax-button color=\"light\" look=\"blank\" [size]=\"size\" (onClick)=\"toggleType()\" [tabIndex]=\"-1\" *ngIf=\"showToggleButton\">\r\n <ax-icon [icon]=\"_icon\"></ax-icon>\r\n</ax-button>" }]
60
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { showToggleButton: [{
62
+ ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'ax-password-box ax-editor-container' }, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" [attr.name]=\"name\" [type]=\"_type\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\" [readonly]=\"readonly\" [tabindex]=\"tabIndex\"\r\n [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\" (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\">\r\n\r\n<ng-content select=\"ax-suffix\">\r\n\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>\r\n<ng-content select=\"ax-input-mask\">\r\n</ng-content>\r\n<ax-button color=\"light\" look=\"blank\" [size]=\"size\" (onClick)=\"toggleType()\" [tabIndex]=\"-1\" *ngIf=\"showToggleButton\">\r\n <ax-icon [icon]=\"_icon\"></ax-icon>\r\n</ax-button>" }]
63
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { input: [{
64
+ type: ViewChild,
65
+ args: ['input']
66
+ }], showToggleButton: [{
61
67
  type: Input
62
68
  }] } });
63
69
 
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-password-box.mjs","sources":["../../../../projects/acorex/components/password-box/src/password-box.component.ts","../../../../projects/acorex/components/password-box/src/password-box.component.html","../../../../projects/acorex/components/password-box/src/password-box.module.ts","../../../../projects/acorex/components/password-box/acorex-components-password-box.ts"],"sourcesContent":["\r\nimport { TEXTBOX_INPUTS, TEXTBOX_OUTPUT, AXBaseTextBoxMixin } from '@acorex/components/mixin';\r\nimport {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n Input,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n\r\n/**\r\n * The Textbox is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-password-box',\r\n templateUrl: 'password-box.component.html',\r\n inputs: [\r\n 'disabled',\r\n 'readonly',\r\n 'tabIndex',\r\n 'cssClass',\r\n 'size',\r\n 'placeholder', 'maxLength', 'allowNull', 'debounceTime', 'type', 'autoComplete', 'readonly','allowNull','value','name', 'checked',\r\n ],\r\n outputs: [\r\n 'valueChange',\r\n 'onValueChanged',\r\n 'onBlur',\r\n 'onFocus',\r\n 'valueChange', 'onValueChanged',\r\n ],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: { class: 'ax-password-box ax-editor-container' },\r\n})\r\nexport class AXPasswordBoxComponent extends AXBaseTextBoxMixin {\r\n _type: 'password' | 'text' = 'password';\r\n _icon: 'ax-ic-eye' | 'ax-ic-eye-off' = 'ax-ic-eye';\r\n\r\n /**\r\n * A flag for showing or hiding password button.\r\n */\r\n @Input() showToggleButton: boolean = true;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n toggleType() {\r\n if (this._type === 'password') {\r\n this._type = 'text';\r\n this._icon = 'ax-ic-eye-off';\r\n } else {\r\n this._type = 'password';\r\n this._icon = 'ax-ic-eye';\r\n }\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input class=\"ax-input\" [attr.name]=\"name\" [type]=\"_type\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\" [readonly]=\"readonly\" [tabindex]=\"tabIndex\"\r\n [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\" (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\">\r\n\r\n<ng-content select=\"ax-suffix\">\r\n\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>\r\n<ng-content select=\"ax-input-mask\">\r\n</ng-content>\r\n<ax-button color=\"light\" look=\"blank\" [size]=\"size\" (onClick)=\"toggleType()\" [tabIndex]=\"-1\" *ngIf=\"showToggleButton\">\r\n <ax-icon [icon]=\"_icon\"></ax-icon>\r\n</ax-button>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXPasswordBoxComponent } from './password-box.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\n\r\nconst COMPONENT = [AXPasswordBoxComponent];\r\nconst MODULES = [\r\n CommonModule,\r\n FormsModule,\r\n AXButtonModule,\r\n AXDecoratorModule,\r\n];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXPasswordBoxModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAYA;;;;AAIG;AAuBG,MAAO,sBAAuB,SAAQ,kBAAkB,CAAA;AAS5D;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAZzB,QAAA,IAAK,CAAA,KAAA,GAAwB,UAAU,CAAC;AACxC,QAAA,IAAK,CAAA,KAAA,GAAkC,WAAW,CAAC;AAEnD;;AAEG;AACM,QAAA,IAAgB,CAAA,gBAAA,GAAY,IAAI,CAAC;KAOzC;IAED,UAAU,GAAA;AACR,QAAA,IAAI,IAAI,CAAC,KAAK,KAAK,UAAU,EAAE;AAC7B,YAAA,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;AACpB,YAAA,IAAI,CAAC,KAAK,GAAG,eAAe,CAAC;AAC9B,SAAA;AAAM,aAAA;AACL,YAAA,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC;A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;AAC3C,MAAM,OAAO,GAAG;IACZ,YAAY;IACZ,WAAW;IACX,cAAc;IACd,iBAAiB;CACpB,CAAC;MAQW,mBAAmB,CAAA;;gHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;iHAAnB,mBAAmB,EAAA,YAAA,EAAA,CAdb,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAErC,YAAY;QACZ,WAAW;QACX,cAAc;QACd,iBAAiB,aALF,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAc5B,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAJf,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIX,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;iBAChB,CAAA;;;ACpBD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-password-box.mjs","sources":["../../../../projects/acorex/components/password-box/src/password-box.component.ts","../../../../projects/acorex/components/password-box/src/password-box.component.html","../../../../projects/acorex/components/password-box/src/password-box.module.ts","../../../../projects/acorex/components/password-box/acorex-components-password-box.ts"],"sourcesContent":["\r\nimport { TEXTBOX_INPUTS, TEXTBOX_OUTPUT, AXBaseTextBoxMixin } from '@acorex/components/mixin';\r\nimport {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n Input,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n\r\n/**\r\n * The Textbox is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-password-box',\r\n templateUrl: 'password-box.component.html',\r\n inputs: [\r\n 'disabled',\r\n 'readonly',\r\n 'tabIndex',\r\n 'cssClass',\r\n 'size',\r\n 'placeholder', 'maxLength', 'allowNull', 'debounceTime', 'type', 'autoComplete', 'readonly','allowNull','value','name', 'checked',\r\n ],\r\n outputs: [\r\n 'valueChange',\r\n 'onValueChanged',\r\n 'onBlur',\r\n 'onFocus',\r\n 'valueChange', 'onValueChanged',\r\n ],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: { class: 'ax-password-box ax-editor-container' },\r\n})\r\nexport class AXPasswordBoxComponent extends AXBaseTextBoxMixin {\r\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\r\n\r\n _type: 'password' | 'text' = 'password';\r\n _icon: 'ax-ic-eye' | 'ax-ic-eye-off' = 'ax-ic-eye';\r\n\r\n /**\r\n * A flag for showing or hiding password button.\r\n */\r\n @Input() showToggleButton: boolean = true;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n focus(): void {\r\n this.input.nativeElement.focus()\r\n }\r\n\r\n toggleType() {\r\n if (this._type === 'password') {\r\n this._type = 'text';\r\n this._icon = 'ax-ic-eye-off';\r\n } else {\r\n this._type = 'password';\r\n this._icon = 'ax-ic-eye';\r\n }\r\n }\r\n \r\n}\r\n","<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" [attr.name]=\"name\" [type]=\"_type\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\" [readonly]=\"readonly\" [tabindex]=\"tabIndex\"\r\n [(ngModel)]=\"value\" (focus)=\"_emitOnFocusEvent($event)\" (blur)=\"_emitOnBlurEvent($event)\" [attr.autocomplete]=\"autoComplete\">\r\n\r\n<ng-content select=\"ax-suffix\">\r\n\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>\r\n<ng-content select=\"ax-input-mask\">\r\n</ng-content>\r\n<ax-button color=\"light\" look=\"blank\" [size]=\"size\" (onClick)=\"toggleType()\" [tabIndex]=\"-1\" *ngIf=\"showToggleButton\">\r\n <ax-icon [icon]=\"_icon\"></ax-icon>\r\n</ax-button>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXPasswordBoxComponent } from './password-box.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\n\r\nconst COMPONENT = [AXPasswordBoxComponent];\r\nconst MODULES = [\r\n CommonModule,\r\n FormsModule,\r\n AXButtonModule,\r\n AXDecoratorModule,\r\n];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXPasswordBoxModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAaA;;;;AAIG;AAuBG,MAAO,sBAAuB,SAAQ,kBAAkB,CAAA;AAW5D;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAZzB,QAAA,IAAK,CAAA,KAAA,GAAwB,UAAU,CAAC;AACxC,QAAA,IAAK,CAAA,KAAA,GAAkC,WAAW,CAAC;AAEnD;;AAEG;AACM,QAAA,IAAgB,CAAA,gBAAA,GAAY,IAAI,CAAC;KAOzC;IAED,KAAK,GAAA;AACH,QAAA,IAAI,C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6 @@
1
1
  import { TemplatePortal } from '@angular/cdk/portal';
2
2
  import * as i0 from '@angular/core';
3
- import { EventEmitter, ElementRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, ViewChild, Output, HostListener, NgModule } from '@angular/core';
3
+ import { EventEmitter, ElementRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, ViewChild, Output, NgModule } from '@angular/core';
4
4
  import { some, includes } from 'lodash-es';
5
5
  import { fromEvent, throttleTime } from 'rxjs';
6
6
  import { AXDrawingUtil } from '@acorex/core/utils';
@@ -112,28 +112,21 @@ class AXPopoverComponent extends AXInteractiveComponenetMixin {
112
112
  s === null || s === void 0 ? void 0 : s.unsubscribe();
113
113
  });
114
114
  }
115
- _handleKeydownHandler(e) {
116
- // if (e.key === 'Enter' && e.type === 'keydown') {
117
- // this.toggle();
118
- // }
119
- if (e.key === 'Escape') {
120
- if (this.isOpen) {
121
- this.close();
122
- e.stopPropagation();
123
- }
124
- }
125
- }
126
115
  toggle() {
127
116
  this.isOpen ? this.close() : this.open();
128
117
  }
129
118
  //
130
119
  close() {
131
- var _a;
120
+ var _a, _b;
132
121
  if (!this.isOpen) {
133
122
  return;
134
123
  }
135
124
  (_a = this._overlayRef) === null || _a === void 0 ? void 0 : _a.detach();
136
125
  this._emitOnClosedEvent();
126
+ //
127
+ if ((_b = this._lastActiveElement) === null || _b === void 0 ? void 0 : _b.focus) {
128
+ this._lastActiveElement.focus();
129
+ }
137
130
  }
138
131
  dispose() {
139
132
  var _a;
@@ -147,6 +140,7 @@ class AXPopoverComponent extends AXInteractiveComponenetMixin {
147
140
  if (this.isOpen) {
148
141
  return;
149
142
  }
143
+ this._lastActiveElement = document.activeElement;
150
144
  this._ensureOverlayCreated();
151
145
  (_a = this._overlayRef) === null || _a === void 0 ? void 0 : _a.attach(this._templatePortal);
152
146
  this._emitOnOpenedEvent();
@@ -156,7 +150,7 @@ class AXPopoverComponent extends AXInteractiveComponenetMixin {
156
150
  if (!targetRef)
157
151
  return;
158
152
  if (!this._overlayRef) {
159
- if (this._platform.is('Mobile') || this._platform.is('SM') && this.adaptivityEnabled) {
153
+ if ((this._platform.is('Mobile') || this._platform.is('SM')) && this.adaptivityEnabled) {
160
154
  this._openAsActionsheet();
161
155
  }
162
156
  else {
@@ -231,7 +225,7 @@ class AXPopoverComponent extends AXInteractiveComponenetMixin {
231
225
  }
232
226
  }
233
227
  AXPopoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXPopoverComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1.Overlay }, { token: i2.AXPlatform }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
234
- AXPopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXPopoverComponent, selector: "ax-popover", inputs: { target: "target", position: "position", openTrigger: "openTrigger", closeTrigger: "closeTrigger", hasBackdrop: "hasBackdrop", backdropClass: "backdropClass", adaptivityEnabled: "adaptivityEnabled" }, outputs: { onOpened: "onOpened", onClosed: "onClosed" }, host: { listeners: { "keydown": "_handleKeydownHandler($event)" } }, viewQueries: [{ propertyName: "_baseTemplate", first: true, predicate: ["baseTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #baseTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
228
+ AXPopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXPopoverComponent, selector: "ax-popover", inputs: { target: "target", position: "position", openTrigger: "openTrigger", closeTrigger: "closeTrigger", hasBackdrop: "hasBackdrop", backdropClass: "backdropClass", adaptivityEnabled: "adaptivityEnabled" }, outputs: { onOpened: "onOpened", onClosed: "onClosed" }, viewQueries: [{ propertyName: "_baseTemplate", first: true, predicate: ["baseTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #baseTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
235
229
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXPopoverComponent, decorators: [{
236
230
  type: Component,
237
231
  args: [{ selector: 'ax-popover', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #baseTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>" }]
@@ -256,9 +250,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
256
250
  type: Output
257
251
  }], onClosed: [{
258
252
  type: Output
259
- }], _handleKeydownHandler: [{
260
- type: HostListener,
261
- args: ['keydown', ['$event']]
262
253
  }] } });
263
254
 
264
255
  class AXPopoverModule {
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-popover.mjs","sources":["../../../../projects/acorex/components/popover/src/popover.component.ts","../../../../projects/acorex/components/popover/src/popover.component.html","../../../../projects/acorex/components/popover/src/popover.module.ts","../../../../projects/acorex/components/popover/acorex-components-popover.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\r\nimport { TemplatePortal } from '@angular/cdk/portal';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n NgZone,\r\n ViewContainerRef,\r\n Input,\r\n ViewChild,\r\n TemplateRef,\r\n Output,\r\n EventEmitter,\r\n HostListener,\r\n} from '@angular/core';\r\nimport { some, includes } from 'lodash-es';\r\nimport { Subscription, fromEvent, throttleTime } from 'rxjs';\r\nimport { AXConnectedPosition, AXEvent } from '@acorex/components/common';\r\nimport { AXPlatform } from '@acorex/core/platform';\r\nimport { AXPoint, AXDrawingUtil } from '@acorex/core/utils';\r\nimport { AXInteractiveComponenetMixin, AXBaseComponent } from '@acorex/components/mixin';\r\n\r\n\r\n@Component({\r\n selector: 'ax-popover',\r\n templateUrl: './popover.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AXPopoverComponent extends AXInteractiveComponenetMixin {\r\n constructor(\r\n private _elementRef: ElementRef,\r\n public _cdr: ChangeDetectorRef,\r\n private _zone: NgZone,\r\n private _overlay: Overlay,\r\n private _platform: AXPlatform,\r\n private _viewContainerRef: ViewContainerRef\r\n ) {\r\n super(_elementRef, _cdr);\r\n }\r\n //\r\n private _target: HTMLElement;\r\n @Input()\r\n public get target(): HTMLElement | ElementRef | AXBaseComponent {\r\n return this._target;\r\n }\r\n public set target(v: HTMLElement | ElementRef | AXBaseComponent) {\r\n if (v instanceof HTMLElement) this._target = v;\r\n else if (v instanceof ElementRef) this._target = v.nativeElement;\r\n else if (v instanceof AXBaseComponent) this._target = v._getInnerElement();\r\n }\r\n\r\n @Input()\r\n position: AXConnectedPosition | AXConnectedPosition[] = [\r\n {\r\n originX: 'start',\r\n originY: 'bottom',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'start',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n ];\r\n //\r\n @ViewChild('baseTemplate')\r\n _baseTemplate: TemplateRef<any>;\r\n _overlayRef: OverlayRef | any;\r\n _templatePortal: TemplatePortal;\r\n\r\n _subs: Subscription[] = [];\r\n //\r\n @Input()\r\n openTrigger: 'manual' | 'click' | 'mouseover' | 'toggle' = 'toggle';\r\n //\r\n @Input()\r\n closeTrigger: 'manual' | 'clickout' | 'mouseout' = 'clickout';\r\n //\r\n @Input()\r\n hasBackdrop: boolean = false;\r\n\r\n @Input()\r\n backdropClass: string;\r\n\r\n @Input()\r\n adaptivityEnabled: boolean = false;\r\n //\r\n private _mousePos: AXPoint = { x: 0, y: 0 };\r\n private _isScrollAttached: boolean = false;\r\n //\r\n @Output()\r\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\r\n @Output()\r\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\r\n\r\n _emitOnOpenedEvent() {\r\n this.onOpened.emit({\r\n component: this,\r\n htmlElement: this._getHostElement(),\r\n });\r\n }\r\n\r\n _emitOnClosedEvent() {\r\n this.onClosed.emit({\r\n component: this,\r\n htmlElement: this._getHostElement(),\r\n });\r\n }\r\n //\r\n onViewInit() {\r\n if (this._target) {\r\n if (this.openTrigger === 'mouseover') {\r\n const mouseEnter$ = fromEvent<MouseEvent>(this._target, 'mouseover');\r\n this._addSub(\r\n mouseEnter$.subscribe((e) => {\r\n const point = { x: e.clientX, y: e.clientY };\r\n if (AXDrawingUtil.isInElementBound(point, this._target))\r\n this.open();\r\n })\r\n );\r\n }\r\n if (this.closeTrigger === 'mouseout') {\r\n const mouseMove$ = fromEvent<MouseEvent>(document, 'mousemove');\r\n this._addSub(\r\n mouseMove$.pipe(throttleTime(50)).subscribe((e) => {\r\n this._mousePos.x = e.clientX;\r\n this._mousePos.y = e.clientY;\r\n if (this.isOpen) {\r\n setTimeout(() => {\r\n if (\r\n some([this._target, this._overlayRef.overlayElement], (el) =>\r\n includes(\r\n document.elementsFromPoint(\r\n this._mousePos.x,\r\n this._mousePos.y\r\n ),\r\n el\r\n )\r\n )\r\n )\r\n this.close();\r\n }, 100);\r\n }\r\n })\r\n );\r\n }\r\n //\r\n if (this.openTrigger === 'click' || this.openTrigger === 'toggle') {\r\n const click$ = fromEvent<MouseEvent>(this._target, 'click');\r\n this._addSub(\r\n click$.subscribe((e) => {\r\n this.openTrigger == 'toggle' ? this.toggle() : this.open();\r\n })\r\n );\r\n }\r\n }\r\n }\r\n //\r\n onDestroy(): void {\r\n this._overlayRef?.detach();\r\n this._overlayRef?.dispose();\r\n this._subs.forEach((s) => {\r\n s?.unsubscribe();\r\n });\r\n }\r\n\r\n @HostListener('keydown', ['$event'])\r\n _handleKeydownHandler(e: KeyboardEvent) {\r\n // if (e.key === 'Enter' && e.type === 'keydown') {\r\n // this.toggle();\r\n // }\r\n if (e.key === 'Escape') {\r\n if (this.isOpen) {\r\n this.close();\r\n e.stopPropagation();\r\n }\r\n }\r\n }\r\n\r\n toggle() {\r\n this.isOpen ? this.close() : this.open();\r\n }\r\n //\r\n close() {\r\n if (!this.isOpen) {\r\n return;\r\n }\r\n this._overlayRef?.detach();\r\n this._emitOnClosedEvent();\r\n }\r\n\r\n dispose() {\r\n this.close();\r\n this._overlayRef?.dispose();\r\n this._overlayRef = null as any;\r\n }\r\n //\r\n open() {\r\n if (this.isOpen) {\r\n return;\r\n }\r\n this._ensureOverlayCreated();\r\n this._overlayRef?.attach(this._templatePortal);\r\n this._emitOnOpenedEvent();\r\n }\r\n\r\n private _ensureOverlayCreated() {\r\n const targetRef = this._target;\r\n if (!targetRef) return;\r\n\r\n if (!this._overlayRef) {\r\n if (this._platform.is('Mobile') || this._platform.is('SM') && this.adaptivityEnabled) {\r\n this._openAsActionsheet();\r\n } else {\r\n this._openAsPopover(targetRef);\r\n }\r\n\r\n if (this.closeTrigger == 'clickout') {\r\n this._addSub(\r\n this._overlayRef._outsidePointerEvents.subscribe((c) => {\r\n const target = c.target as HTMLElement;\r\n const comElem = targetRef;\r\n if (!comElem.contains(target)) {\r\n this.close();\r\n }\r\n })\r\n );\r\n }\r\n this._addSub(\r\n this._overlayRef.attachments().subscribe(() => {\r\n if (!this._isScrollAttached) {\r\n this._addSub(\r\n this._platform.scroll.subscribe((c) => {\r\n if (\r\n !(c.nativeEvent.target as HTMLElement).closest(\r\n '.ax-overlay-pane'\r\n )\r\n )\r\n this.updatePosition();\r\n })\r\n );\r\n this._isScrollAttached = true;\r\n }\r\n })\r\n );\r\n }\r\n if (!this._templatePortal) {\r\n this._templatePortal = new TemplatePortal(\r\n this._baseTemplate,\r\n this._viewContainerRef\r\n );\r\n }\r\n }\r\n\r\n private _openAsPopover(targetRef: HTMLElement) {\r\n this._overlayRef = this._overlay.create({\r\n positionStrategy: this._overlay\r\n .position()\r\n .flexibleConnectedTo(targetRef)\r\n .withPositions(\r\n Array.isArray(this.position) ? this.position : [this.position]\r\n )\r\n .withPush(false),\r\n disposeOnNavigation: true,\r\n panelClass: ['ax-animate-fadeIn', 'ax-animate-faster'],\r\n maxHeight: 'unset',\r\n hasBackdrop: this.hasBackdrop,\r\n backdropClass: [this.backdropClass || 'cdk-overlay-transparent-backdrop'],\r\n });\r\n }\r\n\r\n private _openAsActionsheet() {\r\n this._overlayRef = this._overlay.create({\r\n positionStrategy: this._overlay\r\n .position()\r\n .flexibleConnectedTo(document.body)\r\n .withPositions([\r\n {\r\n originX: 'center',\r\n originY: 'bottom',\r\n overlayX: 'center',\r\n overlayY: 'bottom',\r\n },\r\n ]),\r\n disposeOnNavigation: true,\r\n panelClass: ['ax-animate-slideInUp', 'ax-animate-faster'],\r\n hasBackdrop: true,\r\n width: '100%',\r\n });\r\n }\r\n\r\n get isOpen(): boolean {\r\n return this._overlayRef ? this._overlayRef.hasAttached() : false;\r\n }\r\n\r\n private _addSub(sub: Subscription) {\r\n this._subs.push(sub);\r\n }\r\n\r\n updatePosition(): void {\r\n this._overlayRef?.updatePosition();\r\n this.focus();\r\n }\r\n}\r\n","<ng-template #baseTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXPopoverComponent } from './popover.component';\r\n\r\n@NgModule({\r\n declarations: [AXPopoverComponent],\r\n imports: [CommonModule],\r\n exports: [AXPopoverComponent],\r\n providers: [],\r\n})\r\nexport class AXPopoverModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AA+BM,MAAO,kBAAmB,SAAQ,4BAA4B,CAAA;IAClE,WACU,CAAA,WAAuB,EACxB,IAAuB,EACtB,KAAa,EACb,QAAiB,EACjB,SAAqB,EACrB,i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AAM;gBAGP,QAAQ,EAAA,CAAA;sBADP,MAAM;gBA2EP,qBAAqB,EAAA,CAAA;sBADpB,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,CAAA;;;MEjKxB,eAAe,CAAA;;4GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EALX,YAAA,EAAA,CAAA,kBAAkB,CACvB,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAGjB,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAJhB,YAAY,CAAA,EAAA,CAAA,CAAA;2FAIX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC7B,oBAAA,SAAS,EAAE,EAAE;iBACd,CAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-popover.mjs","sources":["../../../../projects/acorex/components/popover/src/popover.component.ts","../../../../projects/acorex/components/popover/src/popover.component.html","../../../../projects/acorex/components/popover/src/popover.module.ts","../../../../projects/acorex/components/popover/acorex-components-popover.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\r\nimport { TemplatePortal } from '@angular/cdk/portal';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n NgZone,\r\n ViewContainerRef,\r\n Input,\r\n ViewChild,\r\n TemplateRef,\r\n Output,\r\n EventEmitter,\r\n HostListener,\r\n} from '@angular/core';\r\nimport { some, includes } from 'lodash-es';\r\nimport { Subscription, fromEvent, throttleTime } from 'rxjs';\r\nimport { AXConnectedPosition, AXEvent } from '@acorex/components/common';\r\nimport { AXPlatform } from '@acorex/core/platform';\r\nimport { AXPoint, AXDrawingUtil } from '@acorex/core/utils';\r\nimport { AXInteractiveComponenetMixin, AXBaseComponent } from '@acorex/components/mixin';\r\n\r\n\r\n@Component({\r\n selector: 'ax-popover',\r\n templateUrl: './popover.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AXPopoverComponent extends AXInteractiveComponenetMixin {\r\n constructor(\r\n private _elementRef: ElementRef,\r\n public _cdr: ChangeDetectorRef,\r\n private _zone: NgZone,\r\n private _overlay: Overlay,\r\n private _platform: AXPlatform,\r\n private _viewContainerRef: ViewContainerRef\r\n ) {\r\n super(_elementRef, _cdr);\r\n }\r\n //\r\n private _target: HTMLElement;\r\n @Input()\r\n public get target(): HTMLElement | ElementRef | AXBaseComponent {\r\n return this._target;\r\n }\r\n public set target(v: HTMLElement | ElementRef | AXBaseComponent) {\r\n if (v instanceof HTMLElement) this._target = v;\r\n else if (v instanceof ElementRef) this._target = v.nativeElement;\r\n else if (v instanceof AXBaseComponent) this._target = v._getInnerElement();\r\n }\r\n\r\n @Input()\r\n position: AXConnectedPosition | AXConnectedPosition[] = [\r\n {\r\n originX: 'start',\r\n originY: 'bottom',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'start',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n ];\r\n //\r\n @ViewChild('baseTemplate')\r\n _baseTemplate: TemplateRef<any>;\r\n _overlayRef: OverlayRef;\r\n _templatePortal: TemplatePortal;\r\n\r\n _subs: Subscription[] = [];\r\n //\r\n @Input()\r\n openTrigger: 'manual' | 'click' | 'mouseover' | 'toggle' = 'toggle';\r\n //\r\n @Input()\r\n closeTrigger: 'manual' | 'clickout' | 'mouseout' = 'clickout';\r\n //\r\n @Input()\r\n hasBackdrop: boolean = false;\r\n\r\n @Input()\r\n backdropClass: string;\r\n\r\n @Input()\r\n adaptivityEnabled: boolean = false;\r\n //\r\n private _mousePos: AXPoint = { x: 0, y: 0 };\r\n private _isScrollAttached: boolean = false;\r\n private _lastActiveElement: HTMLElement;\r\n //\r\n @Output()\r\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\r\n @Output()\r\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\r\n\r\n _emitOnOpenedEvent() {\r\n this.onOpened.emit({\r\n component: this,\r\n htmlElement: this._getHostElement(),\r\n });\r\n }\r\n\r\n _emitOnClosedEvent() {\r\n this.onClosed.emit({\r\n component: this,\r\n htmlElement: this._getHostElement(),\r\n });\r\n }\r\n //\r\n onViewInit() {\r\n if (this._target) {\r\n if (this.openTrigger === 'mouseover') {\r\n const mouseEnter$ = fromEvent<MouseEvent>(this._target, 'mouseover');\r\n this._addSub(\r\n mouseEnter$.subscribe((e) => {\r\n const point = { x: e.clientX, y: e.clientY };\r\n if (AXDrawingUtil.isInElementBound(point, this._target))\r\n this.open();\r\n })\r\n );\r\n }\r\n if (this.closeTrigger === 'mouseout') {\r\n const mouseMove$ = fromEvent<MouseEvent>(document, 'mousemove');\r\n this._addSub(\r\n mouseMove$.pipe(throttleTime(50)).subscribe((e) => {\r\n this._mousePos.x = e.clientX;\r\n this._mousePos.y = e.clientY;\r\n if (this.isOpen) {\r\n setTimeout(() => {\r\n if (\r\n some([this._target, this._overlayRef.overlayElement], (el) =>\r\n includes(\r\n document.elementsFromPoint(\r\n this._mousePos.x,\r\n this._mousePos.y\r\n ),\r\n el\r\n )\r\n )\r\n )\r\n this.close();\r\n }, 100);\r\n }\r\n })\r\n );\r\n }\r\n //\r\n if (this.openTrigger === 'click' || this.openTrigger === 'toggle') {\r\n const click$ = fromEvent<MouseEvent>(this._target, 'click');\r\n this._addSub(\r\n click$.subscribe((e) => {\r\n this.openTrigger == 'toggle' ? this.toggle() : this.open();\r\n })\r\n );\r\n }\r\n }\r\n }\r\n //\r\n onDestroy(): void {\r\n this._overlayRef?.detach();\r\n this._overlayRef?.dispose();\r\n this._subs.forEach((s) => {\r\n s?.unsubscribe();\r\n });\r\n }\r\n\r\n toggle() {\r\n this.isOpen ? this.close() : this.open();\r\n }\r\n //\r\n close() {\r\n if (!this.isOpen) {\r\n return;\r\n }\r\n this._overlayRef?.detach();\r\n this._emitOnClosedEvent();\r\n //\r\n if (this._lastActiveElement?.focus) {\r\n this._lastActiveElement.focus();\r\n }\r\n }\r\n\r\n dispose() {\r\n this.close();\r\n this._overlayRef?.dispose();\r\n this._overlayRef = null as any;\r\n }\r\n //\r\n open() {\r\n if (this.isOpen) {\r\n return;\r\n }\r\n this._lastActiveElement = document.activeElement as HTMLElement;\r\n this._ensureOverlayCreated();\r\n this._overlayRef?.attach(this._templatePortal);\r\n this._emitOnOpenedEvent();\r\n }\r\n\r\n private _ensureOverlayCreated() {\r\n const targetRef = this._target;\r\n if (!targetRef) return;\r\n\r\n if (!this._overlayRef) {\r\n if ((this._platform.is('Mobile') || this._platform.is('SM')) && this.adaptivityEnabled) {\r\n this._openAsActionsheet();\r\n } else {\r\n this._openAsPopover(targetRef);\r\n }\r\n\r\n if (this.closeTrigger == 'clickout') {\r\n this._addSub(\r\n this._overlayRef._outsidePointerEvents.subscribe((c) => {\r\n const target = c.target as HTMLElement;\r\n const comElem = targetRef;\r\n if (!comElem.contains(target)) {\r\n this.close();\r\n }\r\n })\r\n );\r\n }\r\n this._addSub(\r\n this._overlayRef.attachments().subscribe(() => {\r\n if (!this._isScrollAttached) {\r\n this._addSub(\r\n this._platform.scroll.subscribe((c) => {\r\n if (\r\n !(c.nativeEvent.target as HTMLElement).closest(\r\n '.ax-overlay-pane'\r\n )\r\n )\r\n this.updatePosition();\r\n })\r\n );\r\n this._isScrollAttached = true;\r\n }\r\n })\r\n );\r\n }\r\n if (!this._templatePortal) {\r\n this._templatePortal = new TemplatePortal(\r\n this._baseTemplate,\r\n this._viewContainerRef\r\n );\r\n }\r\n }\r\n\r\n private _openAsPopover(targetRef: HTMLElement) {\r\n this._overlayRef = this._overlay.create({\r\n positionStrategy: this._overlay\r\n .position()\r\n .flexibleConnectedTo(targetRef)\r\n .withPositions(\r\n Array.isArray(this.position) ? this.position : [this.position]\r\n )\r\n .withPush(false),\r\n disposeOnNavigation: true,\r\n panelClass: ['ax-animate-fadeIn', 'ax-animate-faster'],\r\n maxHeight: 'unset',\r\n hasBackdrop: this.hasBackdrop,\r\n backdropClass: [this.backdropClass || 'cdk-overlay-transparent-backdrop'],\r\n });\r\n }\r\n\r\n private _openAsActionsheet() {\r\n this._overlayRef = this._overlay.create({\r\n positionStrategy: this._overlay\r\n .position()\r\n .flexibleConnectedTo(document.body)\r\n .withPositions([\r\n {\r\n originX: 'center',\r\n originY: 'bottom',\r\n overlayX: 'center',\r\n overlayY: 'bottom',\r\n },\r\n ]),\r\n disposeOnNavigation: true,\r\n panelClass: ['ax-animate-slideInUp', 'ax-animate-faster'],\r\n hasBackdrop: true,\r\n width: '100%',\r\n });\r\n }\r\n\r\n get isOpen(): boolean {\r\n return this._overlayRef ? this._overlayRef.hasAttached() : false;\r\n }\r\n\r\n private _addSub(sub: Subscription) {\r\n this._subs.push(sub);\r\n }\r\n\r\n updatePosition(): void {\r\n this._overlayRef?.updatePosition();\r\n this.focus();\r\n }\r\n}\r\n","<ng-template #baseTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXPopoverComponent } from './popover.component';\r\n\r\n@NgModule({\r\n declarations: [AXPopoverComponent],\r\n imports: [CommonModule],\r\n exports: [AXPopoverComponent],\r\n providers: [],\r\n})\r\nexport class AXPopoverModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AA+BM,MAAO,kBAAmB,SAAQ,4BAA4B,CAAA;IAClE,WACU,CAAA,WAAuB,EACxB,IAAuB,EACtB,KAAa,EACb,QAAiB,EACjB,SAAqB,EACrB,iBAAmC,EAAA;AAE3C,QAAA,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AAPjB,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;AACxB,QAAA,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAmB;AACtB,QAAA,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;AACb,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAS;AACjB,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAAY;AACrB,QAAA,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;QAiB7C,IAAA,CAAA,QAAQ,GAAgD;AACtD,YAAA;AACE,gBAAA,OAAO,EAAE,OAAO;AAChB,gBAAA,OAAO,EAAE,QAAQ;AACjB,gBAAA,QAAQ,EAAE,OAAO;AACjB,gBAAA,QAAQ,EAAE,KAAK;AAChB,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,OAAO;AAChB,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,QAAQ,EAAE,OAAO;AACjB,gBAAA,QAAQ,EAAE,QAAQ;AACnB,aAAA;SACF,CAAC;AAOF,QAAA,IAAK,CAAA,KAAA,GAAmB,EAAE,CAAC;;AAG3B,QAAA,IAAW,CAAA,WAAA,GAAgD,QAAQ,CAAC;;AAGpE,QAAA,IAAY,CAAA,YAAA,GAAuC,UAAU,CAAC;;AAG9D,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK,CAAC;AAM7B,QAAA,IAAiB,CAAA,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itter, TemplateRef, Component, ChangeDetectionStrategy, ViewEnca
3
3
  import * as i6 from '@angular/cdk/portal';
4
4
  import { TemplatePortal, ComponentPortal, PortalModule } from '@angular/cdk/portal';
5
5
  import * as i1$1 from '@acorex/components/common';
6
- import { AXClosbaleComponent } from '@acorex/components/common';
6
+ import { AXClosbaleComponent, AXCommonModule } from '@acorex/components/common';
7
7
  import { TAB_META_KEY, AXPageClosedPromise } from '@acorex/components/page';
8
8
  import { AXBaseComponentMixin } from '@acorex/components/mixin';
9
9
  import * as i1 from '@acorex/components/loading';
@@ -66,6 +66,12 @@ class AXPopupComponent extends AXBaseComponentMixin {
66
66
  this._selectedPortal = new ComponentPortal(this.content);
67
67
  this._cdr.markForCheck();
68
68
  }
69
+ //
70
+ // this._platform.keydown.subscribe((e) => {
71
+ // debugger;
72
+ // this.close();
73
+ // e.nativeEvent.stopPropagation();
74
+ // });
69
75
  }
70
76
  _handleAttched(ref) {
71
77
  ref = ref;
@@ -95,14 +101,16 @@ class AXPopupComponent extends AXBaseComponentMixin {
95
101
  popHeader.innerHTML = '';
96
102
  popHeader.append(header);
97
103
  }
104
+ this.focus();
98
105
  });
99
106
  });
100
107
  this.loadingService.hide(this._loadingId);
101
- this.focus();
102
108
  this._cdr.markForCheck();
103
109
  }
104
110
  onKeydownHandler(event) {
105
- if (this.showCloseButton) {
111
+ debugger;
112
+ let focusedOrHasFocused = this._getHostElement().matches(':focus-within');
113
+ if (this.showCloseButton && focusedOrHasFocused) {
106
114
  this.close();
107
115
  }
108
116
  }
@@ -113,7 +121,7 @@ class AXPopupComponent extends AXBaseComponentMixin {
113
121
  this.loadingService.hide(this._loadingId);
114
122
  }
115
123
  focus() {
116
- setTimeout(() => this._getHostElement().focus());
124
+ setTimeout(() => { var _a; return (_a = this._getHostElement().querySelector('.ax-popup')) === null || _a === void 0 ? void 0 : _a.focus(); });
117
125
  }
118
126
  close() {
119
127
  this.onClosed.emit({
@@ -127,10 +135,10 @@ class AXPopupComponent extends AXBaseComponentMixin {
127
135
  onFullScreen() { }
128
136
  }
129
137
  AXPopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXPopupComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: i1.AXLoadingService }, { token: i2.AXPlatform }], target: i0.ɵɵFactoryTarget.Component });
130
- AXPopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXPopupComponent, selector: "ax-popup", host: { listeners: { "keydown.escape": "onKeydownHandler($event)" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\r\n <div class=\"ax-popup ax-popup-{{size}}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!draggable\">\r\n <div cdkDragHandle class=\"ax-popup-header-container\">\r\n <ax-header *ngIf=\"showHeader\">\r\n <ax-title [text]=\"title\"></ax-title>\r\n <ax-close-button *ngIf=\"showCloseButton\"></ax-close-button>\r\n </ax-header>\r\n </div>\r\n <div class=\"ax-popup-main-container\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\r\n </div>\r\n <div class=\"ax-popup-footer-container\"></div>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i5.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i6.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: i7.AXDecoratorHeaderComponent, selector: "ax-header" }, { kind: "component", type: i7.AXDecoratorTitleComponent, selector: "ax-title", inputs: ["text"] }, { kind: "component", type: i7.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
138
+ AXPopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXPopupComponent, selector: "ax-popup", host: { listeners: { "keydown.escape": "onKeydownHandler($event)" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\r\n <div class=\"ax-popup ax-popup-{{size}}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!draggable\">\r\n <div cdkDragHandle class=\"ax-popup-header-container\">\r\n <ax-header *ngIf=\"showHeader\">\r\n <ax-title [text]=\"title\"></ax-title>\r\n <ax-close-button *ngIf=\"showCloseButton\" ></ax-close-button>\r\n </ax-header>\r\n </div>\r\n <div class=\"ax-popup-main-container\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\r\n </div>\r\n <div class=\"ax-popup-footer-container\"></div>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i5.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i6.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: i7.AXDecoratorHeaderComponent, selector: "ax-header" }, { kind: "component", type: i7.AXDecoratorTitleComponent, selector: "ax-title", inputs: ["text"] }, { kind: "component", type: i7.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
131
139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXPopupComponent, decorators: [{
132
140
  type: Component,
133
- args: [{ selector: 'ax-popup', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }], template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\r\n <div class=\"ax-popup ax-popup-{{size}}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!draggable\">\r\n <div cdkDragHandle class=\"ax-popup-header-container\">\r\n <ax-header *ngIf=\"showHeader\">\r\n <ax-title [text]=\"title\"></ax-title>\r\n <ax-close-button *ngIf=\"showCloseButton\"></ax-close-button>\r\n </ax-header>\r\n </div>\r\n <div class=\"ax-popup-main-container\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\r\n </div>\r\n <div class=\"ax-popup-footer-container\"></div>\r\n </div>\r\n</div>" }]
141
+ args: [{ selector: 'ax-popup', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }], template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\r\n <div class=\"ax-popup ax-popup-{{size}}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!draggable\">\r\n <div cdkDragHandle class=\"ax-popup-header-container\">\r\n <ax-header *ngIf=\"showHeader\">\r\n <ax-title [text]=\"title\"></ax-title>\r\n <ax-close-button *ngIf=\"showCloseButton\" ></ax-close-button>\r\n </ax-header>\r\n </div>\r\n <div class=\"ax-popup-main-container\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\r\n </div>\r\n <div class=\"ax-popup-footer-container\"></div>\r\n </div>\r\n</div>" }]
134
142
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.ViewContainerRef }, { type: i1.AXLoadingService }, { type: i2.AXPlatform }]; }, propDecorators: { onKeydownHandler: [{
135
143
  type: HostListener,
136
144
  args: ['keydown.escape', ['$event']]
@@ -166,6 +174,7 @@ class AXPopupService {
166
174
  else {
167
175
  Object.assign(options, arg2);
168
176
  }
177
+ const lastActiveElement = document.activeElement;
169
178
  const com = this.overlayService.show(AXPopupComponent, options, { transparentBackdrop: false, closeOnClickOutside: false, scroll: 'block' });
170
179
  const popup = com.instance;
171
180
  popup.content = arg1;
@@ -175,7 +184,7 @@ class AXPopupService {
175
184
  }
176
185
  this.stack.push(popup);
177
186
  popup.onClosed.subscribe(c => {
178
- this.closePopup(popup, com, c);
187
+ this.closePopup(popup, com, c, lastActiveElement);
179
188
  });
180
189
  const promise = new AXPageClosedPromise((resolve) => {
181
190
  popup[TAB_META_KEY].close = (e) => {
@@ -187,13 +196,16 @@ class AXPopupService {
187
196
  promise['closeMethod'] = () => { popup.close(); };
188
197
  return promise;
189
198
  }
190
- closePopup(popup, com, result) {
199
+ closePopup(popup, com, result, lastActiveElement) {
191
200
  const closeFunc = (e) => {
192
201
  com.dispose();
193
202
  this.stack.pop();
194
203
  delete e.cancel;
195
204
  popup[TAB_META_KEY].close(e);
196
- if (this.stack.length) {
205
+ if (lastActiveElement === null || lastActiveElement === void 0 ? void 0 : lastActiveElement.focus) {
206
+ lastActiveElement.focus();
207
+ }
208
+ else if (this.stack.length) {
197
209
  this.stack.reverse()[0].focus();
198
210
  }
199
211
  };
@@ -227,11 +239,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
227
239
  }], ctorParameters: function () { return [{ type: i1$1.AXOverlayService }]; } });
228
240
 
229
241
  const COMPONENT = [AXPopupComponent];
230
- const MODULES = [CommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule];
242
+ const MODULES = [CommonModule, AXCommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule];
231
243
  class AXPopupModule {
232
244
  }
233
245
  AXPopupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXPopupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
234
- AXPopupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: AXPopupModule, declarations: [AXPopupComponent], imports: [CommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule], exports: [AXPopupComponent] });
246
+ AXPopupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: AXPopupModule, declarations: [AXPopupComponent], imports: [CommonModule, AXCommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule], exports: [AXPopupComponent] });
235
247
  AXPopupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXPopupModule, imports: [MODULES] });
236
248
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXPopupModule, decorators: [{
237
249
  type: NgModule,