@acorex/components 7.0.26 → 7.0.28

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 (121) hide show
  1. package/alert/src/alert.component.d.ts +2 -2
  2. package/badge/src/badge.component.d.ts +2 -2
  3. package/breadcrumbs/src/breadcrumbs-item.component.d.ts +6 -6
  4. package/button/src/button-group.component.d.ts +6 -6
  5. package/button/src/button-item.component.d.ts +6 -6
  6. package/color-palette/src/color-palette-input.component.d.ts +1 -0
  7. package/color-picker/src/color-picker.component.d.ts +16 -16
  8. package/common/src/services/overlay.service.d.ts +2 -0
  9. package/date-picker/src/datepicker.component.d.ts +14 -14
  10. package/decorators/src/text.component.d.ts +1 -1
  11. package/esm2020/alert/src/alert.component.mjs +2 -2
  12. package/esm2020/badge/src/badge.component.mjs +2 -2
  13. package/esm2020/calendar/src/calendar.component.mjs +9 -9
  14. package/esm2020/card/src/card.component.mjs +2 -2
  15. package/esm2020/color-palette/src/color-palette-input.component.mjs +22 -11
  16. package/esm2020/color-palette/src/color-palette-picker.component.mjs +3 -3
  17. package/esm2020/color-palette/src/color-palette-preview.component.mjs +2 -2
  18. package/esm2020/color-palette/src/color-palette-swatches.component.mjs +15 -9
  19. package/esm2020/color-palette/src/color-palette.component.mjs +14 -8
  20. package/esm2020/color-picker/src/color-picker.component.mjs +32 -12
  21. package/esm2020/common/src/services/overlay.service.mjs +32 -16
  22. package/esm2020/decorators/src/text.component.mjs +4 -4
  23. package/esm2020/decorators/src/title.component.mjs +2 -3
  24. package/esm2020/dialog/src/dialog.component.mjs +2 -2
  25. package/esm2020/mixin/src/value-mixin.class.mjs +2 -1
  26. package/esm2020/picker/public-api.mjs +2 -1
  27. package/esm2020/picker/src/picker-column.component.mjs +22 -0
  28. package/esm2020/picker/src/picker.component.mjs +3 -24
  29. package/esm2020/picker/src/picker.module.mjs +6 -5
  30. package/esm2020/popup/src/popup.component.mjs +4 -5
  31. package/esm2020/popup/src/popup.service.mjs +25 -10
  32. package/esm2020/progress-bar/src/progress-bar.component.mjs +2 -2
  33. package/esm2020/range-slider/src/range-slider.component.mjs +2 -2
  34. package/esm2020/switch/src/switch.component.mjs +2 -2
  35. package/esm2020/tabs/src/tabs.component.mjs +2 -2
  36. package/fesm2015/acorex-components-alert.mjs +2 -3
  37. package/fesm2015/acorex-components-alert.mjs.map +1 -1
  38. package/fesm2015/acorex-components-badge.mjs +2 -3
  39. package/fesm2015/acorex-components-badge.mjs.map +1 -1
  40. package/fesm2015/acorex-components-calendar.mjs +8 -8
  41. package/fesm2015/acorex-components-calendar.mjs.map +1 -1
  42. package/fesm2015/acorex-components-card.mjs +2 -3
  43. package/fesm2015/acorex-components-card.mjs.map +1 -1
  44. package/fesm2015/acorex-components-color-palette.mjs +50 -28
  45. package/fesm2015/acorex-components-color-palette.mjs.map +1 -1
  46. package/fesm2015/acorex-components-color-picker.mjs +30 -11
  47. package/fesm2015/acorex-components-color-picker.mjs.map +1 -1
  48. package/fesm2015/acorex-components-common.mjs +30 -15
  49. package/fesm2015/acorex-components-common.mjs.map +1 -1
  50. package/fesm2015/acorex-components-decorators.mjs +3 -5
  51. package/fesm2015/acorex-components-decorators.mjs.map +1 -1
  52. package/fesm2015/acorex-components-dialog.mjs +2 -3
  53. package/fesm2015/acorex-components-dialog.mjs.map +1 -1
  54. package/fesm2015/acorex-components-mixin.mjs +1 -1
  55. package/fesm2015/acorex-components-mixin.mjs.map +1 -1
  56. package/fesm2015/acorex-components-picker.mjs +27 -29
  57. package/fesm2015/acorex-components-picker.mjs.map +1 -1
  58. package/fesm2015/acorex-components-popup.mjs +25 -12
  59. package/fesm2015/acorex-components-popup.mjs.map +1 -1
  60. package/fesm2015/acorex-components-progress-bar.mjs +2 -3
  61. package/fesm2015/acorex-components-progress-bar.mjs.map +1 -1
  62. package/fesm2015/acorex-components-range-slider.mjs +2 -3
  63. package/fesm2015/acorex-components-range-slider.mjs.map +1 -1
  64. package/fesm2015/acorex-components-switch.mjs +2 -3
  65. package/fesm2015/acorex-components-switch.mjs.map +1 -1
  66. package/fesm2015/acorex-components-tabs.mjs +2 -3
  67. package/fesm2015/acorex-components-tabs.mjs.map +1 -1
  68. package/fesm2020/acorex-components-alert.mjs +2 -3
  69. package/fesm2020/acorex-components-alert.mjs.map +1 -1
  70. package/fesm2020/acorex-components-badge.mjs +2 -3
  71. package/fesm2020/acorex-components-badge.mjs.map +1 -1
  72. package/fesm2020/acorex-components-calendar.mjs +8 -8
  73. package/fesm2020/acorex-components-calendar.mjs.map +1 -1
  74. package/fesm2020/acorex-components-card.mjs +2 -3
  75. package/fesm2020/acorex-components-card.mjs.map +1 -1
  76. package/fesm2020/acorex-components-color-palette.mjs +50 -28
  77. package/fesm2020/acorex-components-color-palette.mjs.map +1 -1
  78. package/fesm2020/acorex-components-color-picker.mjs +30 -11
  79. package/fesm2020/acorex-components-color-picker.mjs.map +1 -1
  80. package/fesm2020/acorex-components-common.mjs +30 -15
  81. package/fesm2020/acorex-components-common.mjs.map +1 -1
  82. package/fesm2020/acorex-components-decorators.mjs +3 -5
  83. package/fesm2020/acorex-components-decorators.mjs.map +1 -1
  84. package/fesm2020/acorex-components-dialog.mjs +2 -3
  85. package/fesm2020/acorex-components-dialog.mjs.map +1 -1
  86. package/fesm2020/acorex-components-mixin.mjs +1 -1
  87. package/fesm2020/acorex-components-mixin.mjs.map +1 -1
  88. package/fesm2020/acorex-components-picker.mjs +27 -29
  89. package/fesm2020/acorex-components-picker.mjs.map +1 -1
  90. package/fesm2020/acorex-components-popup.mjs +25 -12
  91. package/fesm2020/acorex-components-popup.mjs.map +1 -1
  92. package/fesm2020/acorex-components-progress-bar.mjs +2 -3
  93. package/fesm2020/acorex-components-progress-bar.mjs.map +1 -1
  94. package/fesm2020/acorex-components-range-slider.mjs +2 -3
  95. package/fesm2020/acorex-components-range-slider.mjs.map +1 -1
  96. package/fesm2020/acorex-components-switch.mjs +2 -3
  97. package/fesm2020/acorex-components-switch.mjs.map +1 -1
  98. package/fesm2020/acorex-components-tabs.mjs +2 -3
  99. package/fesm2020/acorex-components-tabs.mjs.map +1 -1
  100. package/mixin/src/base-components.class.d.ts +2 -2
  101. package/mixin/src/base-menu-mixin.class.d.ts +5 -5
  102. package/mixin/src/button-mixin.class.d.ts +2 -2
  103. package/mixin/src/clickable-mixin.class.d.ts +2 -2
  104. package/mixin/src/color-look-mixing.class.d.ts +2 -2
  105. package/mixin/src/datalist-component.class.d.ts +10 -10
  106. package/mixin/src/dropdown-mixin.class.d.ts +2 -2
  107. package/mixin/src/interactive-mixin.class.d.ts +4 -4
  108. package/mixin/src/loading-mixin.class.d.ts +2 -2
  109. package/mixin/src/mixin.class.d.ts +61 -61
  110. package/mixin/src/page-component.class.d.ts +2 -2
  111. package/mixin/src/selection-component.class.d.ts +2 -2
  112. package/mixin/src/sizable-mixin.class.d.ts +2 -2
  113. package/mixin/src/textbox-mixin.class.d.ts +2 -2
  114. package/mixin/src/value-mixin.class.d.ts +8 -8
  115. package/package.json +1 -1
  116. package/picker/public-api.d.ts +1 -0
  117. package/picker/src/picker-column.component.d.ts +11 -0
  118. package/picker/src/picker.component.d.ts +2 -4
  119. package/picker/src/picker.module.d.ts +9 -8
  120. package/popup/src/popup.service.d.ts +19 -14
  121. package/tabs/src/tab-item.component.d.ts +2 -2
@@ -66,7 +66,6 @@ class AXPopupComponent extends AXBaseComponentMixin {
66
66
  }
67
67
  //
68
68
  // this._platform.keydown.subscribe((e) => {
69
- // debugger;
70
69
  // this.close();
71
70
  // e.nativeEvent.stopPropagation();
72
71
  // });
@@ -132,10 +131,10 @@ class AXPopupComponent extends AXBaseComponentMixin {
132
131
  onFullScreen() { }
133
132
  }
134
133
  AXPopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", 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 });
135
- AXPopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", 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 <div class=\"ax-popup-header\" *ngIf=\"showHeader\">\r\n <span class=\"ax-popup-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n </div>\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>", styles: [".ax-popup{display:flex;flex-direction:column;background-color:rgb(var(--ax-color-surface));box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;border:1px solid;border-color:rgb(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default);outline-color:transparent;padding:0;width:50%;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));min-height:-moz-fit-content;min-height:fit-content;margin:0 auto}.ax-popup .ax-popup-header{padding:.75rem;display:flex;align-items:center;justify-content:space-between}.ax-popup .ax-popup-header .ax-popup-title{font-size:1rem}.ax-popup .ax-popup-header .ax-icon-close{font-size:1.5rem;cursor:pointer}.ax-popup .ax-popup-header .ax-icon-close:hover{opacity:.5}.ax-popup ax-footer{padding:.75rem;display:flex;align-items:center;justify-content:space-between}.ax-popup:focus{outline-color:transparent}.ax-popup:focus-visible{outline-color:rgb(var(--ax-color-primary-500))}.ax-popup ax-footer{background-color:rgba(var(--ax-color-ghost),.02)}.ax-popup .ax-popup-main-container{overflow:auto;flex:1 1 0%}.ax-popup.ax-popup-full{width:100vw;max-height:calc(100 * var(--ax-vh));height:calc(100 * var(--ax-vh))}.ax-popup.ax-fit{width:-moz-fit-content;width:fit-content}@media (max-width: 599px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{width:93vw!important;height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important}.ax-popup.ax-popup-sm .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-md .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-lg .ax-popup-main-container>ng-component>div{width:100%}}@media (min-width: 600px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{min-width:-moz-fit-content!important;min-width:fit-content!important;max-width:85vw!important}}@media (min-width: 1200px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{min-width:-moz-fit-content!important;min-width:fit-content!important}.ax-popup.ax-popup-sm{max-width:25vw!important}.ax-popup.ax-popup-md{max-width:50vw!important}.ax-popup.ax-popup-lg{max-width:85vw!important}}@media (min-width: 1800px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{min-width:-moz-fit-content!important;min-width:fit-content!important}.ax-popup.ax-popup-sm{max-width:25vw!important}.ax-popup.ax-popup-md{max-width:50vw!important}.ax-popup.ax-popup-lg{max-width:85vw!important}}\n"], 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
134
+ AXPopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", 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 <div class=\"ax-popup-header\" *ngIf=\"showHeader\">\r\n <span class=\"ax-popup-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n </div>\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>", styles: [".ax-popup{display:flex;flex-direction:column;background-color:rgb(var(--ax-color-surface));box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;border:1px solid;border-color:rgb(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default);outline-color:transparent;padding:0;width:50%;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));min-height:-moz-fit-content;min-height:fit-content;margin:0 auto;min-width:16rem}.ax-popup .ax-popup-header{padding:.75rem;display:flex;align-items:center;justify-content:space-between}.ax-popup .ax-popup-header .ax-popup-title{font-size:1rem}.ax-popup .ax-popup-header .ax-icon-close{font-size:1.5rem;cursor:pointer}.ax-popup .ax-popup-header .ax-icon-close:hover{opacity:.5}.ax-popup ax-footer{padding:.75rem;display:flex;align-items:center;justify-content:space-between}.ax-popup:focus{outline-color:transparent}.ax-popup:focus-visible{outline-color:rgb(var(--ax-color-primary-500))}.ax-popup ax-footer{background-color:rgba(var(--ax-color-ghost),.02)}.ax-popup .ax-popup-main-container{overflow:auto;flex:1 1 0%}.ax-popup.ax-popup-full{width:100vw;max-height:calc(100 * var(--ax-vh));height:calc(100 * var(--ax-vh))}.ax-popup.ax-fit{width:-moz-fit-content;width:fit-content}@media (max-width: 599px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{width:93vw!important;height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important}.ax-popup.ax-popup-sm .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-md .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-lg .ax-popup-main-container>ng-component>div{width:100%}}@media (min-width: 600px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{max-width:85vw!important}}@media (min-width: 1200px){.ax-popup.ax-popup-sm{max-width:25vw!important}.ax-popup.ax-popup-md{max-width:50vw!important}.ax-popup.ax-popup-lg{max-width:85vw!important}}@media (min-width: 1800px){.ax-popup.ax-popup-sm{max-width:25vw!important}.ax-popup.ax-popup-md{max-width:50vw!important}.ax-popup.ax-popup-lg{max-width:85vw!important}}\n"], 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
136
135
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXPopupComponent, decorators: [{
137
136
  type: Component,
138
- 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 <div class=\"ax-popup-header\" *ngIf=\"showHeader\">\r\n <span class=\"ax-popup-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n </div>\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>", styles: [".ax-popup{display:flex;flex-direction:column;background-color:rgb(var(--ax-color-surface));box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;border:1px solid;border-color:rgb(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default);outline-color:transparent;padding:0;width:50%;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));min-height:-moz-fit-content;min-height:fit-content;margin:0 auto}.ax-popup .ax-popup-header{padding:.75rem;display:flex;align-items:center;justify-content:space-between}.ax-popup .ax-popup-header .ax-popup-title{font-size:1rem}.ax-popup .ax-popup-header .ax-icon-close{font-size:1.5rem;cursor:pointer}.ax-popup .ax-popup-header .ax-icon-close:hover{opacity:.5}.ax-popup ax-footer{padding:.75rem;display:flex;align-items:center;justify-content:space-between}.ax-popup:focus{outline-color:transparent}.ax-popup:focus-visible{outline-color:rgb(var(--ax-color-primary-500))}.ax-popup ax-footer{background-color:rgba(var(--ax-color-ghost),.02)}.ax-popup .ax-popup-main-container{overflow:auto;flex:1 1 0%}.ax-popup.ax-popup-full{width:100vw;max-height:calc(100 * var(--ax-vh));height:calc(100 * var(--ax-vh))}.ax-popup.ax-fit{width:-moz-fit-content;width:fit-content}@media (max-width: 599px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{width:93vw!important;height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important}.ax-popup.ax-popup-sm .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-md .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-lg .ax-popup-main-container>ng-component>div{width:100%}}@media (min-width: 600px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{min-width:-moz-fit-content!important;min-width:fit-content!important;max-width:85vw!important}}@media (min-width: 1200px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{min-width:-moz-fit-content!important;min-width:fit-content!important}.ax-popup.ax-popup-sm{max-width:25vw!important}.ax-popup.ax-popup-md{max-width:50vw!important}.ax-popup.ax-popup-lg{max-width:85vw!important}}@media (min-width: 1800px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{min-width:-moz-fit-content!important;min-width:fit-content!important}.ax-popup.ax-popup-sm{max-width:25vw!important}.ax-popup.ax-popup-md{max-width:50vw!important}.ax-popup.ax-popup-lg{max-width:85vw!important}}\n"] }]
137
+ 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 <div class=\"ax-popup-header\" *ngIf=\"showHeader\">\r\n <span class=\"ax-popup-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n </div>\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>", styles: [".ax-popup{display:flex;flex-direction:column;background-color:rgb(var(--ax-color-surface));box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;border:1px solid;border-color:rgb(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default);outline-color:transparent;padding:0;width:50%;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));min-height:-moz-fit-content;min-height:fit-content;margin:0 auto;min-width:16rem}.ax-popup .ax-popup-header{padding:.75rem;display:flex;align-items:center;justify-content:space-between}.ax-popup .ax-popup-header .ax-popup-title{font-size:1rem}.ax-popup .ax-popup-header .ax-icon-close{font-size:1.5rem;cursor:pointer}.ax-popup .ax-popup-header .ax-icon-close:hover{opacity:.5}.ax-popup ax-footer{padding:.75rem;display:flex;align-items:center;justify-content:space-between}.ax-popup:focus{outline-color:transparent}.ax-popup:focus-visible{outline-color:rgb(var(--ax-color-primary-500))}.ax-popup ax-footer{background-color:rgba(var(--ax-color-ghost),.02)}.ax-popup .ax-popup-main-container{overflow:auto;flex:1 1 0%}.ax-popup.ax-popup-full{width:100vw;max-height:calc(100 * var(--ax-vh));height:calc(100 * var(--ax-vh))}.ax-popup.ax-fit{width:-moz-fit-content;width:fit-content}@media (max-width: 599px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{width:93vw!important;height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important}.ax-popup.ax-popup-sm .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-md .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-lg .ax-popup-main-container>ng-component>div{width:100%}}@media (min-width: 600px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{max-width:85vw!important}}@media (min-width: 1200px){.ax-popup.ax-popup-sm{max-width:25vw!important}.ax-popup.ax-popup-md{max-width:50vw!important}.ax-popup.ax-popup-lg{max-width:85vw!important}}@media (min-width: 1800px){.ax-popup.ax-popup-sm{max-width:25vw!important}.ax-popup.ax-popup-md{max-width:50vw!important}.ax-popup.ax-popup-lg{max-width:85vw!important}}\n"] }]
139
138
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.ViewContainerRef }, { type: i1.AXLoadingService }, { type: i2.AXPlatform }]; }, propDecorators: { onKeydownHandler: [{
140
139
  type: HostListener,
141
140
  args: ['keydown.escape', ['$event']]
@@ -155,15 +154,17 @@ class AXPopupService {
155
154
  this.stack = [];
156
155
  }
157
156
  /**
158
- * @ignore
159
- */
157
+ * @ignore
158
+ */
160
159
  open(arg1, arg2) {
161
160
  const options = {
162
161
  showCloseButton: true,
163
162
  showHeader: true,
164
163
  size: 'md',
165
164
  maximizable: false,
166
- draggable: true
165
+ draggable: true,
166
+ transparentBackdrop: false,
167
+ closeOnClickOutside: false,
167
168
  };
168
169
  if (typeof arg2 === 'string') {
169
170
  options.title = arg2;
@@ -172,7 +173,18 @@ class AXPopupService {
172
173
  Object.assign(options, arg2);
173
174
  }
174
175
  const lastActiveElement = document.activeElement;
175
- const com = this.overlayService.show(AXPopupComponent, options, { transparentBackdrop: false, closeOnClickOutside: false, scroll: 'block' });
176
+ const com = this.overlayService.show(AXPopupComponent, options, {
177
+ transparentBackdrop: options.transparentBackdrop,
178
+ scroll: 'block',
179
+ onBackdropClick: () => {
180
+ if (options.closeOnClickOutside) {
181
+ popup.close();
182
+ }
183
+ },
184
+ // onBackdropClick: () => {
185
+ // console.log('back');
186
+ // },
187
+ });
176
188
  const popup = com.instance;
177
189
  popup.content = arg1;
178
190
  popup[TAB_META_KEY] = {};
@@ -183,18 +195,20 @@ class AXPopupService {
183
195
  popup.onClosed.subscribe(c => {
184
196
  this.closePopup(popup, com, c, lastActiveElement);
185
197
  });
186
- const promise = new AXComponentClosedPromise((resolve) => {
187
- popup[TAB_META_KEY].close = (e) => {
198
+ const promise = new AXComponentClosedPromise(resolve => {
199
+ popup[TAB_META_KEY].close = e => {
188
200
  if (resolve) {
189
201
  resolve(e);
190
202
  }
191
203
  };
192
204
  });
193
- promise['closeMethod'] = () => { popup.close(); };
205
+ promise['closeMethod'] = () => {
206
+ popup.close();
207
+ };
194
208
  return promise;
195
209
  }
196
210
  closePopup(popup, com, result, lastActiveElement) {
197
- const closeFunc = (e) => {
211
+ const closeFunc = e => {
198
212
  com.dispose();
199
213
  this.stack.pop();
200
214
  delete e.cancel;
@@ -258,4 +272,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
258
272
 
259
273
  export { AXPopupComponent, AXPopupModule, AXPopupService };
260
274
  //# sourceMappingURL=acorex-components-popup.mjs.map
261
- //# sourceMappingURL=acorex-components-popup.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-popup.mjs","sources":["../../../../projects/acorex/components/popup/src/popup.component.ts","../../../../projects/acorex/components/popup/src/popup.component.html","../../../../projects/acorex/components/popup/src/popup.service.ts","../../../../projects/acorex/components/popup/src/popup.module.ts","../../../../projects/acorex/components/popup/acorex-components-popup.ts"],"sourcesContent":["import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ViewContainerRef,\r\n HostListener,\r\n ComponentRef,\r\n EventEmitter,\r\n TemplateRef,\r\n NgZone,\r\n} from '@angular/core';\r\nimport {\r\n CdkPortalOutletAttachedRef,\r\n ComponentPortal,\r\n Portal,\r\n TemplatePortal,\r\n} from '@angular/cdk/portal';\r\nimport { AXPlatform } from '@acorex/core/platform';\r\n\r\nimport { AXClosbaleComponent,AXComponentCloseEvent, TAB_META_KEY } from '@acorex/components/common';\r\nimport { AXLoadingService } from '@acorex/components/loading';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\n\r\n/**\r\n * The Button 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-popup',\r\n templateUrl: './popup.component.html',\r\n styleUrls: ['./popup.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }],\r\n})\r\nexport class AXPopupComponent extends AXBaseComponentMixin {\r\n isLoading: boolean = true;\r\n private _loadingId: number;\r\n\r\n title: string;\r\n\r\n onClosed: EventEmitter<AXComponentCloseEvent> =\r\n new EventEmitter<AXComponentCloseEvent>();\r\n\r\n size: 'sm' | 'md' | 'lg' | 'full' = 'sm';\r\n draggable: boolean = true;\r\n\r\n data: any = {};\r\n\r\n showCloseButton: boolean = true;\r\n showHeader: boolean = true;\r\n\r\n content: any;\r\n\r\n _selectedPortal: Portal<any>;\r\n _footerPortal: Portal<any>;\r\n _headerPortal: Portal<any>;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(\r\n elementRef: ElementRef,\r\n cdr: ChangeDetectorRef,\r\n private _zone: NgZone,\r\n private _viewContainerRef: ViewContainerRef,\r\n private loadingService: AXLoadingService,\r\n private _platform: AXPlatform\r\n ) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onInit() {\r\n super.onInit();\r\n if (this._platform.is('Mobile')) {\r\n this.draggable = false;\r\n }\r\n\r\n this._loadingId = this.loadingService.show(\r\n //TODO: check ts error\r\n //@ts-ignore\r\n this._getHostElement().querySelector('.ax-popup-body-container')\r\n );\r\n //\r\n if (typeof this.content === 'string') {\r\n // this.rendererService.findLoadedComponentByRoute(this.content, 20).then(route => {\r\n // setTimeout(() => {\r\n // this.loadComponent(route.component);\r\n // }, 300);\r\n // });\r\n } else if (this.content instanceof TemplateRef) {\r\n this._selectedPortal = new TemplatePortal(\r\n this.content,\r\n this._viewContainerRef,\r\n { $implicit: this.data, ref: this }\r\n );\r\n this._cdr.markForCheck();\r\n } else if (typeof this.content === 'function') {\r\n this._selectedPortal = new ComponentPortal(this.content);\r\n this._cdr.markForCheck();\r\n }\r\n //\r\n // this._platform.keydown.subscribe((e) => {\r\n // debugger;\r\n // this.close();\r\n // e.nativeEvent.stopPropagation();\r\n // });\r\n }\r\n\r\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\r\n ref = ref as ComponentRef<any>;\r\n if (ref.instance) {\r\n this[TAB_META_KEY].component = ref.instance;\r\n Object.assign(this[TAB_META_KEY].component, this.data);\r\n Object.assign(this[TAB_META_KEY].component, { _isPopup: true });\r\n if (ref.instance.onClosed) {\r\n ref.instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\r\n this.onClosed.emit(e);\r\n });\r\n }\r\n }\r\n this._zone.runOutsideAngular(() => {\r\n setTimeout(() => {\r\n const main = this._getHostElement().querySelector<HTMLDivElement>(\r\n '.ax-popup-main-container'\r\n );\r\n const popHeader = this._getHostElement().querySelector<HTMLDivElement>(\r\n '.ax-popup-header-container'\r\n );\r\n const popFooter = this._getHostElement().querySelector<HTMLDivElement>(\r\n '.ax-popup-footer-container'\r\n );\r\n const footer = main!.querySelector<HTMLDivElement>('ax-footer');\r\n const header = main!.querySelector<HTMLDivElement>('ax-header');\r\n if (footer) {\r\n popFooter!.append(footer);\r\n }\r\n if (header) {\r\n //TODO: check ts error\r\n //@ts-ignore\r\n popHeader.innerHTML = '';\r\n popHeader!.append(header);\r\n }\r\n this.focus();\r\n });\r\n });\r\n this.loadingService.hide(this._loadingId);\r\n this._cdr.markForCheck();\r\n }\r\n\r\n @HostListener('keydown.escape', ['$event'])\r\n onKeydownHandler(event: KeyboardEvent) {\r\n let focusedOrHasFocused = this._getHostElement().matches(':focus-within');\r\n if (this.showCloseButton && focusedOrHasFocused) {\r\n this.close();\r\n }\r\n }\r\n\r\n _handleCloseClick() {\r\n this.close();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.loadingService.hide(this._loadingId);\r\n }\r\n\r\n focus() {\r\n setTimeout(() => this._getHostElement().querySelector<HTMLDivElement>('.ax-popup')?.focus());\r\n }\r\n\r\n close() {\r\n this.onClosed.emit({\r\n //TODO: check ts error\r\n //@ts-ignore\r\n component: this[TAB_META_KEY].component,\r\n htmlElement: this._getHostElement(),\r\n });\r\n this._cdr.detectChanges();\r\n }\r\n\r\n onFullScreen() { }\r\n}\r\n","<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 <div class=\"ax-popup-header\" *ngIf=\"showHeader\">\r\n <span class=\"ax-popup-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n </div>\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>","import { Injectable, TemplateRef } from '@angular/core';\r\nimport { AXOverlayService, AXOverlayViewRef,AXComponentClosedPromise, AXComponentCloseEvent, TAB_META_KEY } from '@acorex/components/common';\r\nimport { AXPopupComponent } from './popup.component';\r\n\r\nexport type AXPopupContentType = string | TemplateRef<any> | Function;\r\n\r\n/**\r\n * This is a service which you can create popup with it\r\n *\r\n * @category Components\r\n */\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXPopupService {\r\n\r\n\r\n private stack: Array<AXPopupComponent> = [];\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(private overlayService: AXOverlayService) { }\r\n\r\n\r\n /**\r\n * Open popup 1\r\n */\r\n open(content: AXPopupContentType, title: string): AXComponentClosedPromise;\r\n /**\r\n * Open popup 2\r\n * @ignore\r\n */\r\n open(\r\n content: AXPopupContentType,\r\n options?: {\r\n title: string;\r\n showCloseButton?: boolean;\r\n showHeader?: boolean;\r\n maximizable?: boolean;\r\n size?: 'sm' | 'md' | 'lg' | 'full' | 'fit';\r\n data?: any;\r\n draggable?: boolean\r\n }\r\n ): AXComponentClosedPromise;\r\n\r\n /**\r\n * @ignore\r\n */\r\n open(arg1, arg2): AXComponentClosedPromise {\r\n const options: any = {\r\n showCloseButton: true,\r\n showHeader: true,\r\n size: 'md',\r\n maximizable: false,\r\n draggable: true\r\n };\r\n if (typeof arg2 === 'string') {\r\n options.title = arg2;\r\n } else {\r\n Object.assign(options, arg2);\r\n }\r\n const lastActiveElement = document.activeElement as HTMLElement;\r\n const com = this.overlayService.show(AXPopupComponent, options, { transparentBackdrop: false, closeOnClickOutside: false, scroll: 'block' });\r\n const popup = com.instance as AXPopupComponent;\r\n popup.content = arg1;\r\n popup[TAB_META_KEY] = {};\r\n if (options.size) {\r\n popup.size = options.size;\r\n }\r\n this.stack.push(popup);\r\n popup.onClosed.subscribe(c => {\r\n this.closePopup(popup, com, c, lastActiveElement);\r\n\r\n });\r\n const promise = new AXComponentClosedPromise((resolve) => {\r\n popup[TAB_META_KEY].close = (e) => {\r\n if (resolve) {\r\n resolve(e);\r\n }\r\n };\r\n });\r\n promise['closeMethod'] = () => { popup.close(); };\r\n return promise;\r\n }\r\n\r\n\r\n private closePopup(popup: AXPopupComponent, com: AXOverlayViewRef, result: AXComponentCloseEvent, lastActiveElement?: HTMLElement) {\r\n const closeFunc = (e) => {\r\n com.dispose();\r\n this.stack.pop();\r\n delete e.cancel;\r\n popup[TAB_META_KEY].close(e);\r\n if (lastActiveElement?.focus) {\r\n lastActiveElement.focus()\r\n }\r\n else if (this.stack.length) { this.stack.reverse()[0].focus(); }\r\n };\r\n const e = { cancel: false };\r\n const closingFunc = popup[TAB_META_KEY].component.onClosing;\r\n if (closingFunc) {\r\n const res = closingFunc(e);\r\n if (res instanceof Promise) {\r\n res.then(() => {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n });\r\n }\r\n else {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n }\r\n } else {\r\n closeFunc(result);\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { A11yModule } from '@angular/cdk/a11y';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXPopupComponent } from './popup.component';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\n\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXCommonModule } from '@acorex/components/common';\r\n\r\nconst COMPONENT = [AXPopupComponent];\r\nconst MODULES = [CommonModule,AXCommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule];\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 AXPopupModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;AAyBA;;;;AAIG;AASG,MAAO,gBAAiB,SAAQ,oBAAoB,CAAA;AAuBxD;;AAEG;IACH,WACE,CAAA,UAAsB,EACtB,GAAsB,EACd,KAAa,EACb,iBAAmC,EACnC,cAAgC,EAChC,SAAqB,EAAA;AAE7B,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QALf,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;QACb,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;QACnC,IAAc,CAAA,cAAA,GAAd,cAAc,CAAkB;QAChC,IAAS,CAAA,SAAA,GAAT,SAAS,CAAY;QA/B/B,IAAS,CAAA,SAAA,GAAY,IAAI,CAAC;AAK1B,QAAA,IAAA,CAAA,QAAQ,GACN,IAAI,YAAY,EAAyB,CAAC;QAE5C,IAAI,CAAA,IAAA,GAAgC,IAAI,CAAC;QACzC,IAAS,CAAA,SAAA,GAAY,IAAI,CAAC;QAE1B,IAAI,CAAA,IAAA,GAAQ,EAAE,CAAC;QAEf,IAAe,CAAA,eAAA,GAAY,IAAI,CAAC;QAChC,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;KAoB1B;IAED,MAAM,GAAA;QACJ,KAAK,CAAC,MAAM,EAAE,CAAC;QACf,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE;AAC/B,YAAA,IAAI,CAAC,SAAS,GAAG,KAAK,C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a,YAJT,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIX,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,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;AAChB,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-popup.mjs","sources":["../../../../projects/acorex/components/popup/src/popup.component.ts","../../../../projects/acorex/components/popup/src/popup.component.html","../../../../projects/acorex/components/popup/src/popup.service.ts","../../../../projects/acorex/components/popup/src/popup.module.ts","../../../../projects/acorex/components/popup/acorex-components-popup.ts"],"sourcesContent":["import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ViewContainerRef,\r\n HostListener,\r\n ComponentRef,\r\n EventEmitter,\r\n TemplateRef,\r\n NgZone,\r\n} from '@angular/core';\r\nimport {\r\n CdkPortalOutletAttachedRef,\r\n ComponentPortal,\r\n Portal,\r\n TemplatePortal,\r\n} from '@angular/cdk/portal';\r\nimport { AXPlatform } from '@acorex/core/platform';\r\n\r\nimport {\r\n AXClosbaleComponent,\r\n AXComponentCloseEvent,\r\n TAB_META_KEY,\r\n} from '@acorex/components/common';\r\nimport { AXLoadingService } from '@acorex/components/loading';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\n\r\n/**\r\n * The Button 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-popup',\r\n templateUrl: './popup.component.html',\r\n styleUrls: ['./popup.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }],\r\n})\r\nexport class AXPopupComponent extends AXBaseComponentMixin {\r\n isLoading: boolean = true;\r\n private _loadingId: number;\r\n\r\n title: string;\r\n\r\n onClosed: EventEmitter<AXComponentCloseEvent> =\r\n new EventEmitter<AXComponentCloseEvent>();\r\n\r\n size: 'sm' | 'md' | 'lg' | 'full' = 'sm';\r\n draggable: boolean = true;\r\n\r\n data: any = {};\r\n\r\n showCloseButton: boolean = true;\r\n showHeader: boolean = true;\r\n\r\n content: any;\r\n\r\n _selectedPortal: Portal<any>;\r\n _footerPortal: Portal<any>;\r\n _headerPortal: Portal<any>;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(\r\n elementRef: ElementRef,\r\n cdr: ChangeDetectorRef,\r\n private _zone: NgZone,\r\n private _viewContainerRef: ViewContainerRef,\r\n private loadingService: AXLoadingService,\r\n private _platform: AXPlatform\r\n ) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onInit() {\r\n super.onInit();\r\n if (this._platform.is('Mobile')) {\r\n this.draggable = false;\r\n }\r\n\r\n this._loadingId = this.loadingService.show(\r\n //TODO: check ts error\r\n //@ts-ignore\r\n this._getHostElement().querySelector('.ax-popup-body-container')\r\n );\r\n //\r\n if (typeof this.content === 'string') {\r\n // this.rendererService.findLoadedComponentByRoute(this.content, 20).then(route => {\r\n // setTimeout(() => {\r\n // this.loadComponent(route.component);\r\n // }, 300);\r\n // });\r\n } else if (this.content instanceof TemplateRef) {\r\n this._selectedPortal = new TemplatePortal(\r\n this.content,\r\n this._viewContainerRef,\r\n { $implicit: this.data, ref: this }\r\n );\r\n this._cdr.markForCheck();\r\n } else if (typeof this.content === 'function') {\r\n this._selectedPortal = new ComponentPortal(this.content);\r\n this._cdr.markForCheck();\r\n }\r\n //\r\n // this._platform.keydown.subscribe((e) => {\r\n // this.close();\r\n // e.nativeEvent.stopPropagation();\r\n // });\r\n }\r\n\r\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\r\n ref = ref as ComponentRef<any>;\r\n if (ref.instance) {\r\n this[TAB_META_KEY].component = ref.instance;\r\n Object.assign(this[TAB_META_KEY].component, this.data);\r\n Object.assign(this[TAB_META_KEY].component, { _isPopup: true });\r\n if (ref.instance.onClosed) {\r\n ref.instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\r\n this.onClosed.emit(e);\r\n });\r\n }\r\n }\r\n this._zone.runOutsideAngular(() => {\r\n setTimeout(() => {\r\n const main = this._getHostElement().querySelector<HTMLDivElement>(\r\n '.ax-popup-main-container'\r\n );\r\n const popHeader = this._getHostElement().querySelector<HTMLDivElement>(\r\n '.ax-popup-header-container'\r\n );\r\n const popFooter = this._getHostElement().querySelector<HTMLDivElement>(\r\n '.ax-popup-footer-container'\r\n );\r\n const footer = main!.querySelector<HTMLDivElement>('ax-footer');\r\n const header = main!.querySelector<HTMLDivElement>('ax-header');\r\n if (footer) {\r\n popFooter!.append(footer);\r\n }\r\n if (header) {\r\n //TODO: check ts error\r\n //@ts-ignore\r\n popHeader.innerHTML = '';\r\n popHeader!.append(header);\r\n }\r\n this.focus();\r\n });\r\n });\r\n this.loadingService.hide(this._loadingId);\r\n this._cdr.markForCheck();\r\n }\r\n\r\n @HostListener('keydown.escape', ['$event'])\r\n onKeydownHandler(event: KeyboardEvent) {\r\n let focusedOrHasFocused = this._getHostElement().matches(':focus-within');\r\n if (this.showCloseButton && focusedOrHasFocused) {\r\n this.close();\r\n }\r\n }\r\n\r\n _handleCloseClick() {\r\n this.close();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.loadingService.hide(this._loadingId);\r\n }\r\n\r\n focus() {\r\n setTimeout(() =>\r\n this._getHostElement().querySelector<HTMLDivElement>('.ax-popup')?.focus()\r\n );\r\n }\r\n\r\n close() {\r\n this.onClosed.emit({\r\n //TODO: check ts error\r\n //@ts-ignore\r\n component: this[TAB_META_KEY].component,\r\n htmlElement: this._getHostElement(),\r\n });\r\n this._cdr.detectChanges();\r\n }\r\n\r\n onFullScreen() {}\r\n}\r\n","<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 <div class=\"ax-popup-header\" *ngIf=\"showHeader\">\r\n <span class=\"ax-popup-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n </div>\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>","import { Injectable, TemplateRef } from '@angular/core';\r\nimport {\r\n AXOverlayService,\r\n AXOverlayViewRef,\r\n AXComponentClosedPromise,\r\n AXComponentCloseEvent,\r\n TAB_META_KEY,\r\n} from '@acorex/components/common';\r\nimport { AXPopupComponent } from './popup.component';\r\n\r\nexport type AXPopupContentType = string | TemplateRef<any> | Function;\r\nexport type AXPopupSizeType = 'sm' | 'md' | 'lg' | 'full' | 'fit';\r\nexport interface AXPopupOption {\r\n title?: string;\r\n showCloseButton?: boolean;\r\n showHeader?: boolean;\r\n maximizable?: boolean;\r\n size?: AXPopupSizeType;\r\n data?: any;\r\n draggable?: boolean;\r\n transparentBackdrop?: boolean;\r\n closeOnClickOutside?: boolean;\r\n}\r\n/**\r\n * This is a service which you can create popup with it\r\n *\r\n * @category Components\r\n */\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXPopupService {\r\n private stack: Array<AXPopupComponent> = [];\r\n protected options: AXPopupOption;\r\n /**\r\n * @ignore\r\n */\r\n constructor(private overlayService: AXOverlayService) {}\r\n\r\n /**\r\n * Open popup 1\r\n */\r\n open(content: AXPopupContentType, title: string): AXComponentClosedPromise;\r\n /**\r\n * Open popup 2\r\n * @ignore\r\n */\r\n open(\r\n content: AXPopupContentType,\r\n options?: AXPopupOption\r\n ): AXComponentClosedPromise;\r\n\r\n /**\r\n * @ignore\r\n */\r\n open(arg1, arg2): AXComponentClosedPromise {\r\n const options: AXPopupOption = {\r\n showCloseButton: true,\r\n showHeader: true,\r\n size: 'md',\r\n maximizable: false,\r\n draggable: true,\r\n transparentBackdrop: false,\r\n closeOnClickOutside: false,\r\n };\r\n if (typeof arg2 === 'string') {\r\n options.title = arg2;\r\n } else {\r\n Object.assign(options, arg2);\r\n }\r\n const lastActiveElement = document.activeElement as HTMLElement;\r\n const com = this.overlayService.show(AXPopupComponent, options, {\r\n transparentBackdrop: options.transparentBackdrop,\r\n\r\n scroll: 'block',\r\n onBackdropClick: () => {\r\n if (options.closeOnClickOutside) {\r\n popup.close();\r\n }\r\n },\r\n // onBackdropClick: () => {\r\n // console.log('back');\r\n // },\r\n });\r\n const popup = com.instance as AXPopupComponent;\r\n popup.content = arg1;\r\n popup[TAB_META_KEY] = {};\r\n if (options.size) {\r\n (popup.size as AXPopupSizeType) = options.size;\r\n }\r\n this.stack.push(popup);\r\n popup.onClosed.subscribe(c => {\r\n this.closePopup(popup, com, c, lastActiveElement);\r\n });\r\n const promise = new AXComponentClosedPromise(resolve => {\r\n popup[TAB_META_KEY].close = e => {\r\n if (resolve) {\r\n resolve(e);\r\n }\r\n };\r\n });\r\n promise['closeMethod'] = () => {\r\n popup.close();\r\n };\r\n return promise;\r\n }\r\n\r\n private closePopup(\r\n popup: AXPopupComponent,\r\n com: AXOverlayViewRef,\r\n result: AXComponentCloseEvent,\r\n lastActiveElement?: HTMLElement\r\n ) {\r\n const closeFunc = e => {\r\n com.dispose();\r\n this.stack.pop();\r\n delete e.cancel;\r\n popup[TAB_META_KEY].close(e);\r\n if (lastActiveElement?.focus) {\r\n lastActiveElement.focus();\r\n } else if (this.stack.length) {\r\n this.stack.reverse()[0].focus();\r\n }\r\n };\r\n const e = { cancel: false };\r\n const closingFunc = popup[TAB_META_KEY].component.onClosing;\r\n if (closingFunc) {\r\n const res = closingFunc(e);\r\n if (res instanceof Promise) {\r\n res.then(() => {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n });\r\n } else {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n }\r\n } else {\r\n closeFunc(result);\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { A11yModule } from '@angular/cdk/a11y';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXPopupComponent } from './popup.component';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\n\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXCommonModule } from '@acorex/components/common';\r\n\r\nconst COMPONENT = [AXPopupComponent];\r\nconst MODULES = [CommonModule,AXCommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule];\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 AXPopupModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA;;;;AAIG;AASG,MAAO,gBAAiB,SAAQ,oBAAoB,CAAA;AAuBxD;;AAEG;IACH,WACE,CAAA,UAAsB,EACtB,GAAsB,EACd,KAAa,EACb,iBAAmC,EACnC,cAAgC,EAChC,SAAqB,EAAA;AAE7B,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QALf,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;QACb,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;QACnC,IAAc,CAAA,cAAA,GAAd,cAAc,CAAkB;QAChC,IAAS,CAAA,SAAA,GAAT,SAAS,CAAY;QA/B/B,IAAS,CAAA,SAAA,G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AU,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,CAAC,CAAC;MAQ9G,aAAa,CAAA;;0GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,iBATP,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAClB,YAAY,EAAC,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,aADtG,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAStB,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAJT,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIX,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,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;AAChB,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
@@ -22,10 +22,10 @@ class AXProgressBarComponent extends AXBaseComponentMixin {
22
22
  }
23
23
  }
24
24
  AXProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
25
- AXProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXProgressBarComponent, selector: "ax-progress-bar", inputs: { color: "color", look: "look", value: "value" }, host: { properties: { "class": "this.__hostClass" }, classAttribute: "ax-progress-bar" }, usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-progress-bar-container\">\r\n <div class=\"ax-progress-bar-rise ax-animate-animated ax-animate-fedeIn ax-animate-faster\" [style.width.%]=\"value\">\r\n </div>\r\n</div>\r\n<ng-content select=\"ax-suffix\"></ng-content>", styles: ["ax-progress-bar{display:flex;justify-content:space-between;align-items:center;font-size:.875rem}ax-progress-bar ax-prefix{padding-inline-end:.5rem}ax-progress-bar ax-suffix{padding-inline-start:.5rem}ax-progress-bar .ax-progress-bar-container{width:100%;height:.5rem;position:relative;display:flex;border-radius:999rem;background-color:rgb(var(--ax-color-on-surface))}ax-progress-bar .ax-progress-bar-container .ax-progress-bar-rise{max-width:100%;transition:width 1s;background-color:rgb(var(--ax-color-primary-500));height:100%;position:absolute;inset-inline-start:0;border-radius:999rem}ax-progress-bar.ax-primary-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-primary-500))}ax-progress-bar.ax-secondary-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-secondary-500))}ax-progress-bar.ax-success-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-success-500))}ax-progress-bar.ax-warning-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-warning-500))}ax-progress-bar.ax-danger-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-danger-500))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
25
+ AXProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXProgressBarComponent, selector: "ax-progress-bar", inputs: { color: "color", look: "look", value: "value" }, host: { properties: { "class": "this.__hostClass" }, classAttribute: "ax-progress-bar" }, usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-progress-bar-container\">\r\n <div class=\"ax-progress-bar-rise ax-animate-animated ax-animate-fedeIn ax-animate-faster\" [style.width.%]=\"value\">\r\n </div>\r\n</div>\r\n<ng-content select=\"ax-suffix\"></ng-content>", styles: ["ax-progress-bar{display:flex;justify-content:space-between;align-items:center;font-size:.875rem}ax-progress-bar ax-prefix{padding-inline-end:.5rem}ax-progress-bar ax-suffix{padding-inline-start:.5rem}ax-progress-bar .ax-progress-bar-container{width:100%;height:.5rem;position:relative;display:flex;border-radius:99rem;background-color:rgb(var(--ax-color-on-surface))}ax-progress-bar .ax-progress-bar-container .ax-progress-bar-rise{max-width:100%;transition:width 1s;background-color:rgb(var(--ax-color-primary-500));height:100%;position:absolute;inset-inline-start:0;border-radius:99rem}ax-progress-bar.ax-primary-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-primary-500))}ax-progress-bar.ax-secondary-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-secondary-500))}ax-progress-bar.ax-success-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-success-500))}ax-progress-bar.ax-warning-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-warning-500))}ax-progress-bar.ax-danger-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-danger-500))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
26
26
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXProgressBarComponent, decorators: [{
27
27
  type: Component,
28
- args: [{ selector: 'ax-progress-bar', inputs: ['color', 'look',], host: { class: 'ax-progress-bar' }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-progress-bar-container\">\r\n <div class=\"ax-progress-bar-rise ax-animate-animated ax-animate-fedeIn ax-animate-faster\" [style.width.%]=\"value\">\r\n </div>\r\n</div>\r\n<ng-content select=\"ax-suffix\"></ng-content>", styles: ["ax-progress-bar{display:flex;justify-content:space-between;align-items:center;font-size:.875rem}ax-progress-bar ax-prefix{padding-inline-end:.5rem}ax-progress-bar ax-suffix{padding-inline-start:.5rem}ax-progress-bar .ax-progress-bar-container{width:100%;height:.5rem;position:relative;display:flex;border-radius:999rem;background-color:rgb(var(--ax-color-on-surface))}ax-progress-bar .ax-progress-bar-container .ax-progress-bar-rise{max-width:100%;transition:width 1s;background-color:rgb(var(--ax-color-primary-500));height:100%;position:absolute;inset-inline-start:0;border-radius:999rem}ax-progress-bar.ax-primary-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-primary-500))}ax-progress-bar.ax-secondary-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-secondary-500))}ax-progress-bar.ax-success-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-success-500))}ax-progress-bar.ax-warning-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-warning-500))}ax-progress-bar.ax-danger-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-danger-500))}\n"] }]
28
+ args: [{ selector: 'ax-progress-bar', inputs: ['color', 'look',], host: { class: 'ax-progress-bar' }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-progress-bar-container\">\r\n <div class=\"ax-progress-bar-rise ax-animate-animated ax-animate-fedeIn ax-animate-faster\" [style.width.%]=\"value\">\r\n </div>\r\n</div>\r\n<ng-content select=\"ax-suffix\"></ng-content>", styles: ["ax-progress-bar{display:flex;justify-content:space-between;align-items:center;font-size:.875rem}ax-progress-bar ax-prefix{padding-inline-end:.5rem}ax-progress-bar ax-suffix{padding-inline-start:.5rem}ax-progress-bar .ax-progress-bar-container{width:100%;height:.5rem;position:relative;display:flex;border-radius:99rem;background-color:rgb(var(--ax-color-on-surface))}ax-progress-bar .ax-progress-bar-container .ax-progress-bar-rise{max-width:100%;transition:width 1s;background-color:rgb(var(--ax-color-primary-500));height:100%;position:absolute;inset-inline-start:0;border-radius:99rem}ax-progress-bar.ax-primary-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-primary-500))}ax-progress-bar.ax-secondary-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-secondary-500))}ax-progress-bar.ax-success-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-success-500))}ax-progress-bar.ax-warning-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-warning-500))}ax-progress-bar.ax-danger-default .ax-progress-bar-rise{background-color:rgb(var(--ax-color-danger-500))}\n"] }]
29
29
  }], ctorParameters: function () { return []; }, propDecorators: { value: [{
30
30
  type: Input
31
31
  }], __hostClass: [{
@@ -54,4 +54,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
54
54
 
55
55
  export { AXProgressBarComponent, AXProgressBarModule };
56
56
  //# sourceMappingURL=acorex-components-progress-bar.mjs.map
57
- //# sourceMappingURL=acorex-components-progress-bar.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-progress-bar.mjs","sources":["../../../../projects/acorex/components/progress-bar/src/progress-bar.component.ts","../../../../projects/acorex/components/progress-bar/src/progress-bar.component.html","../../../../projects/acorex/components/progress-bar/src/progress-bar.module.ts","../../../../projects/acorex/components/progress-bar/acorex-components-progress-bar.ts"],"sourcesContent":["import { COLOR_LOOK_INPUTS, AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { ChangeDetectionStrategy, Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';\r\n\r\n/**\r\n * The Button 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-progress-bar',\r\n templateUrl: './progress-bar.component.html',\r\n styleUrls: ['./progress-bar.component.scss'],\r\n inputs: ['color', 'look',],\r\n host: { class: 'ax-progress-bar' },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXProgressBarComponent extends AXBaseComponentMixin {\r\n @Input()\r\n value: number = 0;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor() {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-${this['color']}-default`;\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-progress-bar-container\">\r\n <div class=\"ax-progress-bar-rise ax-animate-animated ax-animate-fedeIn ax-animate-faster\" [style.width.%]=\"value\">\r\n </div>\r\n</div>\r\n<ng-content select=\"ax-suffix\"></ng-content>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXProgressBarComponent } from './progress-bar.component';\r\n\r\n@NgModule({\r\n declarations: [AXProgressBarComponent],\r\n imports: [CommonModule],\r\n exports: [AXProgressBarComponent],\r\n providers: [],\r\n})\r\nexport class AXProgressBarModule { }","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAGA;;;;AAIG;AAUG,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAI9D;;AAEG;AACH,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;QANV,IAAK,CAAA,KAAA,GAAW,CAAC,CAAC;KAOjB;AAED,IAAA,QAAQ,MAAW;AAEnB,IAAA,IACY,WAAW,GAAA;AACrB,QAAA,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;KACtC;;mHAhBU,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,kOCjBnC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;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,sBAAsB,CAAC;AACjC,oBAAA,SAAS,EAAE,EAAE;AAChB,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-progress-bar.mjs","sources":["../../../../projects/acorex/components/progress-bar/src/progress-bar.component.ts","../../../../projects/acorex/components/progress-bar/src/progress-bar.component.html","../../../../projects/acorex/components/progress-bar/src/progress-bar.module.ts","../../../../projects/acorex/components/progress-bar/acorex-components-progress-bar.ts"],"sourcesContent":["import { COLOR_LOOK_INPUTS, AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { ChangeDetectionStrategy, Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';\r\n\r\n/**\r\n * The Button 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-progress-bar',\r\n templateUrl: './progress-bar.component.html',\r\n styleUrls: ['./progress-bar.component.scss'],\r\n inputs: ['color', 'look',],\r\n host: { class: 'ax-progress-bar' },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXProgressBarComponent extends AXBaseComponentMixin {\r\n @Input()\r\n value: number = 0;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor() {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-${this['color']}-default`;\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-progress-bar-container\">\r\n <div class=\"ax-progress-bar-rise ax-animate-animated ax-animate-fedeIn ax-animate-faster\" [style.width.%]=\"value\">\r\n </div>\r\n</div>\r\n<ng-content select=\"ax-suffix\"></ng-content>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXProgressBarComponent } from './progress-bar.component';\r\n\r\n@NgModule({\r\n declarations: [AXProgressBarComponent],\r\n imports: [CommonModule],\r\n exports: [AXProgressBarComponent],\r\n providers: [],\r\n})\r\nexport class AXProgressBarModule { }","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAGA;;;;AAIG;AAUG,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAI9D;;AAEG;AACH,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;QANV,IAAK,CAAA,KAAA,GAAW,CAAC,CAAC;KAOjB;AAED,IAAA,QAAQ,MAAW;AAEnB,IAAA,IACY,WAAW,GAAA;AACrB,QAAA,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;KACtC;;mHAhBU,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,kOCjBnC,qSAK4C,EAAA,MAAA,EAAA,CAAA,ymCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;2FDY/B,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBATlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,UAGnB,CAAC,OAAO,EAAE,MAAM,EAAE,QACpB,EAAE,KAAK,EAAE,iBAAiB,EAAE,mBACjB,uBAAuB,CAAC,MAAM,EAChC,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,qSAAA,EAAA,MAAA,EAAA,CAAA,ymCAAA,CAAA,EAAA,CAAA;0EAIrC,KAAK,EAAA,CAAA;sBADJ,KAAK;gBAaM,WAAW,EAAA,CAAA;sBADtB,WAAW;uBAAC,OAAO,CAAA;;;MEpBT,mBAAmB,CAAA;;gHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,EALb,YAAA,EAAA,CAAA,sBAAsB,CAC3B,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAGvB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAJlB,YAAY,CAAA,EAAA,CAAA,CAAA;2FAIb,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,sBAAsB,CAAC;AACjC,oBAAA,SAAS,EAAE,EAAE;AAChB,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
@@ -94,12 +94,12 @@ class AXRangeSliderComponent extends AXBaseValueComponentMixin {
94
94
  AXRangeSliderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXRangeSliderComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
95
95
  AXRangeSliderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXRangeSliderComponent, selector: "ax-range-slider", inputs: { readonly: "readonly", allowNull: "allowNull", value: "value", name: "name", checked: "checked", minValue: "minValue", maxValue: "maxValue", step: "step", color: "color", oriantaion: "oriantaion" }, outputs: { valueChange: "valueChange", onValueChanged: "onValueChanged", colorChange: "colorChange" }, host: { properties: { "class": "this.__hostClass" }, classAttribute: "ax-range-slider" }, providers: [
96
96
  { provide: AXValuableComponent, useExisting: AXRangeSliderComponent },
97
- ], usesInheritance: true, ngImport: i0, template: "<input type=\"range\" [min]=\"minValue\" [max]=\"maxValue\" [(ngModel)]=\"value\" [step]=\"step\">", styles: [".ax-range-slider{width:100%;--ax-current-value: 0%}.ax-range-slider input{-webkit-appearance:none;appearance:none;width:100%;height:.5rem;background:rgba(var(--ax-color-surface),.05);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;border-radius:999rem}.ax-range-slider input::-webkit-slider-thumb{width:1.5rem;height:1.5rem;background:rgb(var(--ax-color-surface));border:1px solid;border-color:rgb(var(--ax-color-border-default));cursor:pointer;border-radius:999rem;appearance:none;-webkit-appearance:none;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.ax-range-slider input::-moz-range-thumb{width:1.25rem;height:1.25rem;background:rgb(var(--ax-color-surface));border:1px solid;border-color:rgb(var(--ax-color-border-default));cursor:pointer;border-radius:999rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.ax-range-slider.ax-vertical{display:block;transform:rotate(90deg)}.ax-range-slider.ax-vertical input[type=range]{-webkit-appearance:slider-vertical}.ax-range-slider.ax-primary-default input{background:linear-gradient(to right,rgb(var(--ax-color-primary-500)) 0%,rgb(var(--ax-color-primary-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-secondary-default input{background:linear-gradient(to right,rgb(var(--ax-color-secondary-500)) 0%,rgb(var(--ax-color-secondary-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-success-default input{background:linear-gradient(to right,rgb(var(--ax-color-success-500)) 0%,rgb(var(--ax-color-success-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-warning-default input{background:linear-gradient(to right,rgb(var(--ax-color-warning-500)) 0%,rgb(var(--ax-color-warning-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-danger-default input{background:linear-gradient(to right,rgb(var(--ax-color-danger-500)) 0%,rgb(var(--ax-color-danger-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
97
+ ], usesInheritance: true, ngImport: i0, template: "<input type=\"range\" [min]=\"minValue\" [max]=\"maxValue\" [(ngModel)]=\"value\" [step]=\"step\">", styles: [".ax-range-slider{width:100%;--ax-current-value: 0%}.ax-range-slider input{-webkit-appearance:none;appearance:none;width:100%;height:.5rem;background:rgba(var(--ax-color-surface),.05);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;border-radius:99rem}.ax-range-slider input::-webkit-slider-thumb{width:1.5rem;height:1.5rem;background:rgb(var(--ax-color-surface));border:1px solid;border-color:rgb(var(--ax-color-border-default));cursor:pointer;border-radius:99rem;appearance:none;-webkit-appearance:none;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.ax-range-slider input::-moz-range-thumb{width:1.25rem;height:1.25rem;background:rgb(var(--ax-color-surface));border:1px solid;border-color:rgb(var(--ax-color-border-default));cursor:pointer;border-radius:99rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.ax-range-slider.ax-vertical{display:block;transform:rotate(90deg)}.ax-range-slider.ax-vertical input[type=range]{-webkit-appearance:slider-vertical}.ax-range-slider.ax-primary-default input{background:linear-gradient(to right,rgb(var(--ax-color-primary-500)) 0%,rgb(var(--ax-color-primary-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-secondary-default input{background:linear-gradient(to right,rgb(var(--ax-color-secondary-500)) 0%,rgb(var(--ax-color-secondary-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-success-default input{background:linear-gradient(to right,rgb(var(--ax-color-success-500)) 0%,rgb(var(--ax-color-success-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-warning-default input{background:linear-gradient(to right,rgb(var(--ax-color-warning-500)) 0%,rgb(var(--ax-color-warning-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-danger-default input{background:linear-gradient(to right,rgb(var(--ax-color-danger-500)) 0%,rgb(var(--ax-color-danger-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
98
98
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXRangeSliderComponent, decorators: [{
99
99
  type: Component,
100
100
  args: [{ selector: 'ax-range-slider', changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['readonly', 'allowNull', 'value', 'name', 'checked'], outputs: ['valueChange', 'onValueChanged'], host: { class: 'ax-range-slider' }, encapsulation: ViewEncapsulation.None, providers: [
101
101
  { provide: AXValuableComponent, useExisting: AXRangeSliderComponent },
102
- ], template: "<input type=\"range\" [min]=\"minValue\" [max]=\"maxValue\" [(ngModel)]=\"value\" [step]=\"step\">", styles: [".ax-range-slider{width:100%;--ax-current-value: 0%}.ax-range-slider input{-webkit-appearance:none;appearance:none;width:100%;height:.5rem;background:rgba(var(--ax-color-surface),.05);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;border-radius:999rem}.ax-range-slider input::-webkit-slider-thumb{width:1.5rem;height:1.5rem;background:rgb(var(--ax-color-surface));border:1px solid;border-color:rgb(var(--ax-color-border-default));cursor:pointer;border-radius:999rem;appearance:none;-webkit-appearance:none;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.ax-range-slider input::-moz-range-thumb{width:1.25rem;height:1.25rem;background:rgb(var(--ax-color-surface));border:1px solid;border-color:rgb(var(--ax-color-border-default));cursor:pointer;border-radius:999rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.ax-range-slider.ax-vertical{display:block;transform:rotate(90deg)}.ax-range-slider.ax-vertical input[type=range]{-webkit-appearance:slider-vertical}.ax-range-slider.ax-primary-default input{background:linear-gradient(to right,rgb(var(--ax-color-primary-500)) 0%,rgb(var(--ax-color-primary-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-secondary-default input{background:linear-gradient(to right,rgb(var(--ax-color-secondary-500)) 0%,rgb(var(--ax-color-secondary-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-success-default input{background:linear-gradient(to right,rgb(var(--ax-color-success-500)) 0%,rgb(var(--ax-color-success-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-warning-default input{background:linear-gradient(to right,rgb(var(--ax-color-warning-500)) 0%,rgb(var(--ax-color-warning-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-danger-default input{background:linear-gradient(to right,rgb(var(--ax-color-danger-500)) 0%,rgb(var(--ax-color-danger-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}\n"] }]
102
+ ], template: "<input type=\"range\" [min]=\"minValue\" [max]=\"maxValue\" [(ngModel)]=\"value\" [step]=\"step\">", styles: [".ax-range-slider{width:100%;--ax-current-value: 0%}.ax-range-slider input{-webkit-appearance:none;appearance:none;width:100%;height:.5rem;background:rgba(var(--ax-color-surface),.05);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;border-radius:99rem}.ax-range-slider input::-webkit-slider-thumb{width:1.5rem;height:1.5rem;background:rgb(var(--ax-color-surface));border:1px solid;border-color:rgb(var(--ax-color-border-default));cursor:pointer;border-radius:99rem;appearance:none;-webkit-appearance:none;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.ax-range-slider input::-moz-range-thumb{width:1.25rem;height:1.25rem;background:rgb(var(--ax-color-surface));border:1px solid;border-color:rgb(var(--ax-color-border-default));cursor:pointer;border-radius:99rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.ax-range-slider.ax-vertical{display:block;transform:rotate(90deg)}.ax-range-slider.ax-vertical input[type=range]{-webkit-appearance:slider-vertical}.ax-range-slider.ax-primary-default input{background:linear-gradient(to right,rgb(var(--ax-color-primary-500)) 0%,rgb(var(--ax-color-primary-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-secondary-default input{background:linear-gradient(to right,rgb(var(--ax-color-secondary-500)) 0%,rgb(var(--ax-color-secondary-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-success-default input{background:linear-gradient(to right,rgb(var(--ax-color-success-500)) 0%,rgb(var(--ax-color-success-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-warning-default input{background:linear-gradient(to right,rgb(var(--ax-color-warning-500)) 0%,rgb(var(--ax-color-warning-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}.ax-range-slider.ax-danger-default input{background:linear-gradient(to right,rgb(var(--ax-color-danger-500)) 0%,rgb(var(--ax-color-danger-500)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) var(--ax-current-value),rgb(var(--ax-color-on-surface)) 100%)}\n"] }]
103
103
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; }, propDecorators: { minValue: [{
104
104
  type: Input
105
105
  }], maxValue: [{
@@ -140,4 +140,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
140
140
 
141
141
  export { AXRangeSliderComponent, AXRangeSliderModule };
142
142
  //# sourceMappingURL=acorex-components-range-slider.mjs.map
143
- //# sourceMappingURL=acorex-components-range-slider.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-range-slider.mjs","sources":["../../../../projects/acorex/components/range-slider/src/range-slider.component.ts","../../../../projects/acorex/components/range-slider/src/range-slider.component.html","../../../../projects/acorex/components/range-slider/src/range-slider.module.ts","../../../../projects/acorex/components/range-slider/acorex-components-range-slider.ts"],"sourcesContent":["import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n EventEmitter,\r\n HostBinding,\r\n Output,\r\n NgZone,\r\n} from '@angular/core';\r\n\r\nimport {\r\n AXStyleColorType,\r\n AXValuableComponent,\r\n} from '@acorex/components/common';\r\nimport {\r\n AXBaseValueComponentMixin,\r\n AXComponentOptionChanged,\r\n} from '@acorex/components/mixin';\r\n\r\n@Component({\r\n selector: 'ax-range-slider',\r\n templateUrl: './range-slider.component.html',\r\n styleUrls: ['./range-slider.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n inputs: ['readonly', 'allowNull', 'value', 'name', 'checked'],\r\n outputs: ['valueChange', 'onValueChanged'],\r\n host: { class: 'ax-range-slider' },\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [\r\n { provide: AXValuableComponent, useExisting: AXRangeSliderComponent },\r\n ],\r\n})\r\nexport class AXRangeSliderComponent extends AXBaseValueComponentMixin {\r\n constructor(\r\n elementRef: ElementRef,\r\n cdr: ChangeDetectorRef,\r\n private _zone: NgZone\r\n ) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n private _minValue: number = 0;\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 ?? 0;\r\n }\r\n public set minValue(v: number) {\r\n this._setOption({\r\n name: 'minValue',\r\n value: v != null ? Number(v) : 0,\r\n });\r\n }\r\n\r\n private _maxValue: number = 100;\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 ?? 100;\r\n }\r\n public set maxValue(v: number) {\r\n this._setOption({\r\n name: 'maxValue',\r\n value: v != null ? Number(v) : 100,\r\n });\r\n }\r\n\r\n private _step: number = 1;\r\n /**\r\n * Specifies the greatest value that is valid\r\n */\r\n @Input()\r\n public get step(): number {\r\n return this._step ?? 100;\r\n }\r\n public set step(v: number) {\r\n this._setOption({\r\n name: 'step',\r\n value: v != null ? Number(v) : 1,\r\n });\r\n }\r\n\r\n @Output()\r\n colorChange: EventEmitter<AXStyleColorType> = new EventEmitter();\r\n _color: AXStyleColorType = 'primary';\r\n /**\r\n * Predefined color schemes\r\n */\r\n @Input()\r\n get color(): AXStyleColorType {\r\n return this._color;\r\n }\r\n set color(value: AXStyleColorType) {\r\n this._setOption({\r\n name: 'color',\r\n value,\r\n afterCallback: () => {\r\n this._cdr.markForCheck();\r\n },\r\n });\r\n }\r\n\r\n @Input() oriantaion: 'vertical' | 'horizontal' = 'horizontal';\r\n\r\n onViewInit() {\r\n this._calcVars();\r\n this.value = this.value ?? (this.maxValue - this.minValue) / 2;\r\n }\r\n\r\n _onValueChanged(oldValue: number, newValue: number) {\r\n this._calcVars();\r\n }\r\n\r\n _onOptionChanged(e: AXComponentOptionChanged) {\r\n this._calcVars();\r\n }\r\n\r\n private _calcVars() {\r\n this._zone.runOutsideAngular(() => {\r\n const per =\r\n (((this.value ?? 0) - this.minValue) /\r\n (this.maxValue - this.minValue)) *\r\n 100 -\r\n 0.1;\r\n this._getHostElement().style.setProperty('--ax-current-value', `${per}%`);\r\n });\r\n }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-${this.color}-default ax-${this.oriantaion}`;\r\n }\r\n}\r\n","<input type=\"range\" [min]=\"minValue\" [max]=\"maxValue\" [(ngModel)]=\"value\" [step]=\"step\">","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXRangeSliderComponent } from './range-slider.component';\r\nimport { FormsModule } from '@angular/forms';\r\n\r\nconst COMPONENT = [AXRangeSliderComponent];\r\nconst MODULES = [CommonModule,FormsModule];\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 AXRangeSliderModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAmCM,MAAO,sBAAuB,SAAQ,yBAAyB,CAAA;AACnE,IAAA,WAAA,CACE,UAAsB,EACtB,GAAsB,EACd,KAAa,EAAA;AAErB,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAFf,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;QAKf,IAAS,CAAA,SAAA,GAAW,CAAC,CAAC;QAetB,IAAS,CAAA,SAAA,GAAW,GAAG,CAAC;QAexB,IAAK,CAAA,KAAA,GAAW,CAAC,CAAC;AAgB1B,QAAA,IAAA,CAAA,WAAW,GAAmC,IAAI,YAAY,EAAE,CAAC;QACjE,IAAM,CAAA,MAAA,GAAqB,SAAS,CAAC;QAkB5B,IAAU,CAAA,UAAA,GAA8B,YAAY,CAAC;KAnE7D;AAGD;;AAEG;AACH,IAAA,IACW,QAAQ,GAAA;AAC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AA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,iBATb,sBAAsB,CAAA,EAAA,OAAA,EAAA,CACxB,YAAY,EAAC,WAAW,aADtB,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAS5B,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;AAChB,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-range-slider.mjs","sources":["../../../../projects/acorex/components/range-slider/src/range-slider.component.ts","../../../../projects/acorex/components/range-slider/src/range-slider.component.html","../../../../projects/acorex/components/range-slider/src/range-slider.module.ts","../../../../projects/acorex/components/range-slider/acorex-components-range-slider.ts"],"sourcesContent":["import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n EventEmitter,\r\n HostBinding,\r\n Output,\r\n NgZone,\r\n} from '@angular/core';\r\n\r\nimport {\r\n AXStyleColorType,\r\n AXValuableComponent,\r\n} from '@acorex/components/common';\r\nimport {\r\n AXBaseValueComponentMixin,\r\n AXComponentOptionChanged,\r\n} from '@acorex/components/mixin';\r\n\r\n@Component({\r\n selector: 'ax-range-slider',\r\n templateUrl: './range-slider.component.html',\r\n styleUrls: ['./range-slider.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n inputs: ['readonly', 'allowNull', 'value', 'name', 'checked'],\r\n outputs: ['valueChange', 'onValueChanged'],\r\n host: { class: 'ax-range-slider' },\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [\r\n { provide: AXValuableComponent, useExisting: AXRangeSliderComponent },\r\n ],\r\n})\r\nexport class AXRangeSliderComponent extends AXBaseValueComponentMixin {\r\n constructor(\r\n elementRef: ElementRef,\r\n cdr: ChangeDetectorRef,\r\n private _zone: NgZone\r\n ) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n private _minValue: number = 0;\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 ?? 0;\r\n }\r\n public set minValue(v: number) {\r\n this._setOption({\r\n name: 'minValue',\r\n value: v != null ? Number(v) : 0,\r\n });\r\n }\r\n\r\n private _maxValue: number = 100;\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 ?? 100;\r\n }\r\n public set maxValue(v: number) {\r\n this._setOption({\r\n name: 'maxValue',\r\n value: v != null ? Number(v) : 100,\r\n });\r\n }\r\n\r\n private _step: number = 1;\r\n /**\r\n * Specifies the greatest value that is valid\r\n */\r\n @Input()\r\n public get step(): number {\r\n return this._step ?? 100;\r\n }\r\n public set step(v: number) {\r\n this._setOption({\r\n name: 'step',\r\n value: v != null ? Number(v) : 1,\r\n });\r\n }\r\n\r\n @Output()\r\n colorChange: EventEmitter<AXStyleColorType> = new EventEmitter();\r\n _color: AXStyleColorType = 'primary';\r\n /**\r\n * Predefined color schemes\r\n */\r\n @Input()\r\n get color(): AXStyleColorType {\r\n return this._color;\r\n }\r\n set color(value: AXStyleColorType) {\r\n this._setOption({\r\n name: 'color',\r\n value,\r\n afterCallback: () => {\r\n this._cdr.markForCheck();\r\n },\r\n });\r\n }\r\n\r\n @Input() oriantaion: 'vertical' | 'horizontal' = 'horizontal';\r\n\r\n onViewInit() {\r\n this._calcVars();\r\n this.value = this.value ?? (this.maxValue - this.minValue) / 2;\r\n }\r\n\r\n _onValueChanged(oldValue: number, newValue: number) {\r\n this._calcVars();\r\n }\r\n\r\n _onOptionChanged(e: AXComponentOptionChanged) {\r\n this._calcVars();\r\n }\r\n\r\n private _calcVars() {\r\n this._zone.runOutsideAngular(() => {\r\n const per =\r\n (((this.value ?? 0) - this.minValue) /\r\n (this.maxValue - this.minValue)) *\r\n 100 -\r\n 0.1;\r\n this._getHostElement().style.setProperty('--ax-current-value', `${per}%`);\r\n });\r\n }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-${this.color}-default ax-${this.oriantaion}`;\r\n }\r\n}\r\n","<input type=\"range\" [min]=\"minValue\" [max]=\"maxValue\" [(ngModel)]=\"value\" [step]=\"step\">","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXRangeSliderComponent } from './range-slider.component';\r\nimport { FormsModule } from '@angular/forms';\r\n\r\nconst COMPONENT = [AXRangeSliderComponent];\r\nconst MODULES = [CommonModule,FormsModule];\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 AXRangeSliderModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAmCM,MAAO,sBAAuB,SAAQ,yBAAyB,CAAA;AACnE,IAAA,WAAA,CACE,UAAsB,EACtB,GAAsB,EACd,KAAa,EAAA;AAErB,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAFf,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;QAKf,IAAS,CAAA,SAAA,GAAW,CAAC,CAAC;QAetB,IAAS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AAA;sBADtB,WAAW;uBAAC,OAAO,CAAA;;;AElItB,MAAM,SAAS,GAAG,CAAC,sBAAsB,CAAC,CAAC;AAC3C,MAAM,OAAO,GAAG,CAAC,YAAY,EAAC,WAAW,CAAC,CAAC;MAQ9B,mBAAmB,CAAA;;gHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,iBATb,sBAAsB,CAAA,EAAA,OAAA,EAAA,CACxB,YAAY,EAAC,WAAW,aADtB,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAS5B,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;AAChB,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
@@ -39,7 +39,7 @@ class AXSwitchComponent extends AXBaseValueComponentMixin {
39
39
  }
40
40
  }
41
41
  AXSwitchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXSwitchComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
42
- AXSwitchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXSwitchComponent, selector: "ax-switch", inputs: { disabled: "disabled", color: "color", readonly: "readonly", tabIndex: "tabIndex", size: "size", cssClass: "cssClass", cssStyle: "cssStyle", allowNull: "allowNull", value: "value", name: "name", checked: "checked", uncheckedText: "uncheckedText", checkedText: "checkedText", loading: "loading" }, outputs: { onBlur: "onBlur", onFocus: "onFocus", valueChange: "valueChange", onValueChanged: "onValueChanged" }, host: { properties: { "class": "this.__hostClass" } }, usesInheritance: true, ngImport: i0, template: "<button type=\"button\" role=\"switch\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\"\r\n [class.ax-switch-checked]=\"value\" (click)=\"_handleOnClickEvent($event)\">\r\n <div class=\"ax-switch-handle\">\r\n <ax-loading *ngIf=\"loading\"></ax-loading>\r\n <ng-content select=\"ax-switch-handler-content\"></ng-content>\r\n </div>\r\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\r\n <ng-content select=\"ax-switch-off-content\"></ng-content>\r\n\r\n </span>\r\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\r\n <ng-content select=\"ax-switch-on-content\"></ng-content>\r\n </span>\r\n\r\n</button>", styles: ["ax-switch.ax-sm button{min-width:2rem;height:1rem;line-height:1rem}ax-switch.ax-sm button:active .ax-switch-handle{width:1rem}ax-switch.ax-sm .ax-switch-handle{width:.75rem;height:.75rem}ax-switch.ax-lg button{min-width:2.75rem;height:1.5rem;line-height:1.5rem}ax-switch.ax-lg button:active .ax-switch-handle{width:1.5rem}ax-switch.ax-lg .ax-switch-handle{width:1.25rem;height:1.25rem}ax-switch button{position:relative;display:inline-block;vertical-align:middle;border-radius:999rem;background-color:rgba(var(--ax-color-ghost),.16)!important;min-width:2.5rem;height:1.25rem;line-height:1.25rem;transition:background-color .3s linear;cursor:pointer}ax-switch button:active .ax-switch-handle{width:1.25rem}ax-switch button.ax-switch-checked{background-color:rgb(var(--ax-color-primary))!important}ax-switch button.ax-switch-checked .ax-switch-handle{inset-inline-end:.125rem;inset-inline-start:initial}ax-switch button.ax-switch-checked .ax-switch-inner{margin-inline-end:1.5rem;margin-inline-start:.375rem}ax-switch button .ax-switch-handle{width:1rem;height:1rem;background-color:#fff;position:absolute;border-radius:999rem;inset-inline-start:.125rem;top:.125rem;transition:width .3s;box-shadow:0 0 1px 1px #0000000d}ax-switch button .ax-switch-handle ax-switch-handler-content,ax-switch button .ax-switch-handle ax-switch-handler-content *{height:100%;width:100%;font-size:90%;display:flex;align-items:center;justify-content:center;color:#454a50}ax-switch button .ax-switch-handle:active{width:1.25rem}ax-switch button .ax-switch-handle ax-loading{width:100%;position:absolute;inset-inline-start:0;inset-inline-end:0;top:50%;transform:translateY(-50%)}ax-switch button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-primary));stroke:rgb(var(--ax-color-primary))}ax-switch button .ax-switch-handle:before{position:absolute;background-color:rgb(var(--ax-color-surface));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;border-radius:999rem;content:\"\"}ax-switch button .ax-switch-inner{display:block;margin-inline-start:1.5rem;margin-inline-end:.375rem;transition:margin .2s}ax-switch button .ax-switch-inner ax-switch-on-content,ax-switch button .ax-switch-inner ax-switch-off-content{display:flex;font-size:.875rem;padding:0 .25rem}ax-switch.ax-primary-default button:focus-visible{outline-color:rgb(var(--ax-color-primary))}ax-switch.ax-primary-default button ax-switch-handler-content,ax-switch.ax-primary-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-primary-default button.ax-switch-checked{background-color:rgb(var(--ax-color-primary))!important}ax-switch.ax-primary-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-primary-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-primary))}ax-switch.ax-primary-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-primary-fore))}ax-switch.ax-primary-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-primary));stroke:rgb(var(--ax-color-primary))}ax-switch.ax-secondary-default button:focus-visible{outline-color:rgb(var(--ax-color-secondary))}ax-switch.ax-secondary-default button ax-switch-handler-content,ax-switch.ax-secondary-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-secondary-default button.ax-switch-checked{background-color:rgb(var(--ax-color-secondary))!important}ax-switch.ax-secondary-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-secondary-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-secondary))}ax-switch.ax-secondary-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-secondary-fore))}ax-switch.ax-secondary-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-secondary));stroke:rgb(var(--ax-color-secondary))}ax-switch.ax-success-default button:focus-visible{outline-color:rgb(var(--ax-color-success))}ax-switch.ax-success-default button ax-switch-handler-content,ax-switch.ax-success-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-success-default button.ax-switch-checked{background-color:rgb(var(--ax-color-success))!important}ax-switch.ax-success-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-success-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-success))}ax-switch.ax-success-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-success-fore))}ax-switch.ax-success-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-success));stroke:rgb(var(--ax-color-success))}ax-switch.ax-warning-default button:focus-visible{outline-color:rgb(var(--ax-color-warning))}ax-switch.ax-warning-default button ax-switch-handler-content,ax-switch.ax-warning-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-warning-default button.ax-switch-checked{background-color:rgb(var(--ax-color-warning))!important}ax-switch.ax-warning-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-warning-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-warning))}ax-switch.ax-warning-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-warning-fore))}ax-switch.ax-warning-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-warning));stroke:rgb(var(--ax-color-warning))}ax-switch.ax-danger-default button:focus-visible{outline-color:rgb(var(--ax-color-danger))}ax-switch.ax-danger-default button ax-switch-handler-content,ax-switch.ax-danger-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-danger-default button.ax-switch-checked{background-color:rgb(var(--ax-color-danger))!important}ax-switch.ax-danger-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-danger-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-danger))}ax-switch.ax-danger-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-danger-fore))}ax-switch.ax-danger-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-danger));stroke:rgb(var(--ax-color-danger))}ax-switch .ax-state-disabled{opacity:.5;cursor:not-allowed}ax-switch .ax-state-readonly{opacity:.75}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "text"], outputs: ["visibleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
42
+ AXSwitchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXSwitchComponent, selector: "ax-switch", inputs: { disabled: "disabled", color: "color", readonly: "readonly", tabIndex: "tabIndex", size: "size", cssClass: "cssClass", cssStyle: "cssStyle", allowNull: "allowNull", value: "value", name: "name", checked: "checked", uncheckedText: "uncheckedText", checkedText: "checkedText", loading: "loading" }, outputs: { onBlur: "onBlur", onFocus: "onFocus", valueChange: "valueChange", onValueChanged: "onValueChanged" }, host: { properties: { "class": "this.__hostClass" } }, usesInheritance: true, ngImport: i0, template: "<button type=\"button\" role=\"switch\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\"\r\n [class.ax-switch-checked]=\"value\" (click)=\"_handleOnClickEvent($event)\">\r\n <div class=\"ax-switch-handle\">\r\n <ax-loading *ngIf=\"loading\"></ax-loading>\r\n <ng-content select=\"ax-switch-handler-content\"></ng-content>\r\n </div>\r\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\r\n <ng-content select=\"ax-switch-off-content\"></ng-content>\r\n\r\n </span>\r\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\r\n <ng-content select=\"ax-switch-on-content\"></ng-content>\r\n </span>\r\n\r\n</button>", styles: ["ax-switch.ax-sm button{min-width:2rem;height:1rem;line-height:1rem}ax-switch.ax-sm button:active .ax-switch-handle{width:1rem}ax-switch.ax-sm .ax-switch-handle{width:.75rem;height:.75rem}ax-switch.ax-lg button{min-width:2.75rem;height:1.5rem;line-height:1.5rem}ax-switch.ax-lg button:active .ax-switch-handle{width:1.5rem}ax-switch.ax-lg .ax-switch-handle{width:1.25rem;height:1.25rem}ax-switch button{position:relative;display:inline-block;vertical-align:middle;border-radius:99rem;background-color:rgba(var(--ax-color-ghost),.16)!important;min-width:2.5rem;height:1.25rem;line-height:1.25rem;transition:background-color .3s linear;cursor:pointer}ax-switch button:active .ax-switch-handle{width:1.25rem}ax-switch button.ax-switch-checked{background-color:rgb(var(--ax-color-primary))!important}ax-switch button.ax-switch-checked .ax-switch-handle{inset-inline-end:.125rem;inset-inline-start:initial}ax-switch button.ax-switch-checked .ax-switch-inner{margin-inline-end:1.5rem;margin-inline-start:.375rem}ax-switch button .ax-switch-handle{width:1rem;height:1rem;background-color:#fff;position:absolute;border-radius:99rem;inset-inline-start:.125rem;top:.125rem;transition:width .3s;box-shadow:0 0 1px 1px #0000000d}ax-switch button .ax-switch-handle ax-switch-handler-content,ax-switch button .ax-switch-handle ax-switch-handler-content *{height:100%;width:100%;font-size:90%;display:flex;align-items:center;justify-content:center;color:#454a50}ax-switch button .ax-switch-handle:active{width:1.25rem}ax-switch button .ax-switch-handle ax-loading{width:100%;position:absolute;inset-inline-start:0;inset-inline-end:0;top:50%;transform:translateY(-50%)}ax-switch button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-primary));stroke:rgb(var(--ax-color-primary))}ax-switch button .ax-switch-handle:before{position:absolute;background-color:rgb(var(--ax-color-surface));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;border-radius:99rem;content:\"\"}ax-switch button .ax-switch-inner{display:block;margin-inline-start:1.5rem;margin-inline-end:.375rem;transition:margin .2s}ax-switch button .ax-switch-inner ax-switch-on-content,ax-switch button .ax-switch-inner ax-switch-off-content{display:flex;font-size:.875rem;padding:0 .25rem}ax-switch.ax-primary-default button:focus-visible{outline-color:rgb(var(--ax-color-primary))}ax-switch.ax-primary-default button ax-switch-handler-content,ax-switch.ax-primary-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-primary-default button.ax-switch-checked{background-color:rgb(var(--ax-color-primary))!important}ax-switch.ax-primary-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-primary-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-primary))}ax-switch.ax-primary-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-primary-fore))}ax-switch.ax-primary-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-primary));stroke:rgb(var(--ax-color-primary))}ax-switch.ax-secondary-default button:focus-visible{outline-color:rgb(var(--ax-color-secondary))}ax-switch.ax-secondary-default button ax-switch-handler-content,ax-switch.ax-secondary-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-secondary-default button.ax-switch-checked{background-color:rgb(var(--ax-color-secondary))!important}ax-switch.ax-secondary-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-secondary-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-secondary))}ax-switch.ax-secondary-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-secondary-fore))}ax-switch.ax-secondary-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-secondary));stroke:rgb(var(--ax-color-secondary))}ax-switch.ax-success-default button:focus-visible{outline-color:rgb(var(--ax-color-success))}ax-switch.ax-success-default button ax-switch-handler-content,ax-switch.ax-success-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-success-default button.ax-switch-checked{background-color:rgb(var(--ax-color-success))!important}ax-switch.ax-success-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-success-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-success))}ax-switch.ax-success-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-success-fore))}ax-switch.ax-success-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-success));stroke:rgb(var(--ax-color-success))}ax-switch.ax-warning-default button:focus-visible{outline-color:rgb(var(--ax-color-warning))}ax-switch.ax-warning-default button ax-switch-handler-content,ax-switch.ax-warning-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-warning-default button.ax-switch-checked{background-color:rgb(var(--ax-color-warning))!important}ax-switch.ax-warning-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-warning-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-warning))}ax-switch.ax-warning-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-warning-fore))}ax-switch.ax-warning-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-warning));stroke:rgb(var(--ax-color-warning))}ax-switch.ax-danger-default button:focus-visible{outline-color:rgb(var(--ax-color-danger))}ax-switch.ax-danger-default button ax-switch-handler-content,ax-switch.ax-danger-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-danger-default button.ax-switch-checked{background-color:rgb(var(--ax-color-danger))!important}ax-switch.ax-danger-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-danger-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-danger))}ax-switch.ax-danger-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-danger-fore))}ax-switch.ax-danger-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-danger));stroke:rgb(var(--ax-color-danger))}ax-switch .ax-state-disabled{opacity:.5;cursor:not-allowed}ax-switch .ax-state-readonly{opacity:.75}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "text"], outputs: ["visibleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
43
43
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXSwitchComponent, decorators: [{
44
44
  type: Component,
45
45
  args: [{ selector: 'ax-switch', inputs: [
@@ -55,7 +55,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
55
55
  'value',
56
56
  'name',
57
57
  'checked',
58
- ], outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button type=\"button\" role=\"switch\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\"\r\n [class.ax-switch-checked]=\"value\" (click)=\"_handleOnClickEvent($event)\">\r\n <div class=\"ax-switch-handle\">\r\n <ax-loading *ngIf=\"loading\"></ax-loading>\r\n <ng-content select=\"ax-switch-handler-content\"></ng-content>\r\n </div>\r\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\r\n <ng-content select=\"ax-switch-off-content\"></ng-content>\r\n\r\n </span>\r\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\r\n <ng-content select=\"ax-switch-on-content\"></ng-content>\r\n </span>\r\n\r\n</button>", styles: ["ax-switch.ax-sm button{min-width:2rem;height:1rem;line-height:1rem}ax-switch.ax-sm button:active .ax-switch-handle{width:1rem}ax-switch.ax-sm .ax-switch-handle{width:.75rem;height:.75rem}ax-switch.ax-lg button{min-width:2.75rem;height:1.5rem;line-height:1.5rem}ax-switch.ax-lg button:active .ax-switch-handle{width:1.5rem}ax-switch.ax-lg .ax-switch-handle{width:1.25rem;height:1.25rem}ax-switch button{position:relative;display:inline-block;vertical-align:middle;border-radius:999rem;background-color:rgba(var(--ax-color-ghost),.16)!important;min-width:2.5rem;height:1.25rem;line-height:1.25rem;transition:background-color .3s linear;cursor:pointer}ax-switch button:active .ax-switch-handle{width:1.25rem}ax-switch button.ax-switch-checked{background-color:rgb(var(--ax-color-primary))!important}ax-switch button.ax-switch-checked .ax-switch-handle{inset-inline-end:.125rem;inset-inline-start:initial}ax-switch button.ax-switch-checked .ax-switch-inner{margin-inline-end:1.5rem;margin-inline-start:.375rem}ax-switch button .ax-switch-handle{width:1rem;height:1rem;background-color:#fff;position:absolute;border-radius:999rem;inset-inline-start:.125rem;top:.125rem;transition:width .3s;box-shadow:0 0 1px 1px #0000000d}ax-switch button .ax-switch-handle ax-switch-handler-content,ax-switch button .ax-switch-handle ax-switch-handler-content *{height:100%;width:100%;font-size:90%;display:flex;align-items:center;justify-content:center;color:#454a50}ax-switch button .ax-switch-handle:active{width:1.25rem}ax-switch button .ax-switch-handle ax-loading{width:100%;position:absolute;inset-inline-start:0;inset-inline-end:0;top:50%;transform:translateY(-50%)}ax-switch button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-primary));stroke:rgb(var(--ax-color-primary))}ax-switch button .ax-switch-handle:before{position:absolute;background-color:rgb(var(--ax-color-surface));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;border-radius:999rem;content:\"\"}ax-switch button .ax-switch-inner{display:block;margin-inline-start:1.5rem;margin-inline-end:.375rem;transition:margin .2s}ax-switch button .ax-switch-inner ax-switch-on-content,ax-switch button .ax-switch-inner ax-switch-off-content{display:flex;font-size:.875rem;padding:0 .25rem}ax-switch.ax-primary-default button:focus-visible{outline-color:rgb(var(--ax-color-primary))}ax-switch.ax-primary-default button ax-switch-handler-content,ax-switch.ax-primary-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-primary-default button.ax-switch-checked{background-color:rgb(var(--ax-color-primary))!important}ax-switch.ax-primary-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-primary-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-primary))}ax-switch.ax-primary-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-primary-fore))}ax-switch.ax-primary-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-primary));stroke:rgb(var(--ax-color-primary))}ax-switch.ax-secondary-default button:focus-visible{outline-color:rgb(var(--ax-color-secondary))}ax-switch.ax-secondary-default button ax-switch-handler-content,ax-switch.ax-secondary-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-secondary-default button.ax-switch-checked{background-color:rgb(var(--ax-color-secondary))!important}ax-switch.ax-secondary-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-secondary-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-secondary))}ax-switch.ax-secondary-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-secondary-fore))}ax-switch.ax-secondary-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-secondary));stroke:rgb(var(--ax-color-secondary))}ax-switch.ax-success-default button:focus-visible{outline-color:rgb(var(--ax-color-success))}ax-switch.ax-success-default button ax-switch-handler-content,ax-switch.ax-success-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-success-default button.ax-switch-checked{background-color:rgb(var(--ax-color-success))!important}ax-switch.ax-success-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-success-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-success))}ax-switch.ax-success-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-success-fore))}ax-switch.ax-success-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-success));stroke:rgb(var(--ax-color-success))}ax-switch.ax-warning-default button:focus-visible{outline-color:rgb(var(--ax-color-warning))}ax-switch.ax-warning-default button ax-switch-handler-content,ax-switch.ax-warning-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-warning-default button.ax-switch-checked{background-color:rgb(var(--ax-color-warning))!important}ax-switch.ax-warning-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-warning-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-warning))}ax-switch.ax-warning-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-warning-fore))}ax-switch.ax-warning-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-warning));stroke:rgb(var(--ax-color-warning))}ax-switch.ax-danger-default button:focus-visible{outline-color:rgb(var(--ax-color-danger))}ax-switch.ax-danger-default button ax-switch-handler-content,ax-switch.ax-danger-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-danger-default button.ax-switch-checked{background-color:rgb(var(--ax-color-danger))!important}ax-switch.ax-danger-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-danger-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-danger))}ax-switch.ax-danger-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-danger-fore))}ax-switch.ax-danger-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-danger));stroke:rgb(var(--ax-color-danger))}ax-switch .ax-state-disabled{opacity:.5;cursor:not-allowed}ax-switch .ax-state-readonly{opacity:.75}\n"] }]
58
+ ], outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button type=\"button\" role=\"switch\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\"\r\n [class.ax-switch-checked]=\"value\" (click)=\"_handleOnClickEvent($event)\">\r\n <div class=\"ax-switch-handle\">\r\n <ax-loading *ngIf=\"loading\"></ax-loading>\r\n <ng-content select=\"ax-switch-handler-content\"></ng-content>\r\n </div>\r\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\r\n <ng-content select=\"ax-switch-off-content\"></ng-content>\r\n\r\n </span>\r\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\r\n <ng-content select=\"ax-switch-on-content\"></ng-content>\r\n </span>\r\n\r\n</button>", styles: ["ax-switch.ax-sm button{min-width:2rem;height:1rem;line-height:1rem}ax-switch.ax-sm button:active .ax-switch-handle{width:1rem}ax-switch.ax-sm .ax-switch-handle{width:.75rem;height:.75rem}ax-switch.ax-lg button{min-width:2.75rem;height:1.5rem;line-height:1.5rem}ax-switch.ax-lg button:active .ax-switch-handle{width:1.5rem}ax-switch.ax-lg .ax-switch-handle{width:1.25rem;height:1.25rem}ax-switch button{position:relative;display:inline-block;vertical-align:middle;border-radius:99rem;background-color:rgba(var(--ax-color-ghost),.16)!important;min-width:2.5rem;height:1.25rem;line-height:1.25rem;transition:background-color .3s linear;cursor:pointer}ax-switch button:active .ax-switch-handle{width:1.25rem}ax-switch button.ax-switch-checked{background-color:rgb(var(--ax-color-primary))!important}ax-switch button.ax-switch-checked .ax-switch-handle{inset-inline-end:.125rem;inset-inline-start:initial}ax-switch button.ax-switch-checked .ax-switch-inner{margin-inline-end:1.5rem;margin-inline-start:.375rem}ax-switch button .ax-switch-handle{width:1rem;height:1rem;background-color:#fff;position:absolute;border-radius:99rem;inset-inline-start:.125rem;top:.125rem;transition:width .3s;box-shadow:0 0 1px 1px #0000000d}ax-switch button .ax-switch-handle ax-switch-handler-content,ax-switch button .ax-switch-handle ax-switch-handler-content *{height:100%;width:100%;font-size:90%;display:flex;align-items:center;justify-content:center;color:#454a50}ax-switch button .ax-switch-handle:active{width:1.25rem}ax-switch button .ax-switch-handle ax-loading{width:100%;position:absolute;inset-inline-start:0;inset-inline-end:0;top:50%;transform:translateY(-50%)}ax-switch button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-primary));stroke:rgb(var(--ax-color-primary))}ax-switch button .ax-switch-handle:before{position:absolute;background-color:rgb(var(--ax-color-surface));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;border-radius:99rem;content:\"\"}ax-switch button .ax-switch-inner{display:block;margin-inline-start:1.5rem;margin-inline-end:.375rem;transition:margin .2s}ax-switch button .ax-switch-inner ax-switch-on-content,ax-switch button .ax-switch-inner ax-switch-off-content{display:flex;font-size:.875rem;padding:0 .25rem}ax-switch.ax-primary-default button:focus-visible{outline-color:rgb(var(--ax-color-primary))}ax-switch.ax-primary-default button ax-switch-handler-content,ax-switch.ax-primary-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-primary-default button.ax-switch-checked{background-color:rgb(var(--ax-color-primary))!important}ax-switch.ax-primary-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-primary-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-primary))}ax-switch.ax-primary-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-primary-fore))}ax-switch.ax-primary-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-primary));stroke:rgb(var(--ax-color-primary))}ax-switch.ax-secondary-default button:focus-visible{outline-color:rgb(var(--ax-color-secondary))}ax-switch.ax-secondary-default button ax-switch-handler-content,ax-switch.ax-secondary-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-secondary-default button.ax-switch-checked{background-color:rgb(var(--ax-color-secondary))!important}ax-switch.ax-secondary-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-secondary-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-secondary))}ax-switch.ax-secondary-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-secondary-fore))}ax-switch.ax-secondary-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-secondary));stroke:rgb(var(--ax-color-secondary))}ax-switch.ax-success-default button:focus-visible{outline-color:rgb(var(--ax-color-success))}ax-switch.ax-success-default button ax-switch-handler-content,ax-switch.ax-success-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-success-default button.ax-switch-checked{background-color:rgb(var(--ax-color-success))!important}ax-switch.ax-success-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-success-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-success))}ax-switch.ax-success-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-success-fore))}ax-switch.ax-success-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-success));stroke:rgb(var(--ax-color-success))}ax-switch.ax-warning-default button:focus-visible{outline-color:rgb(var(--ax-color-warning))}ax-switch.ax-warning-default button ax-switch-handler-content,ax-switch.ax-warning-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-warning-default button.ax-switch-checked{background-color:rgb(var(--ax-color-warning))!important}ax-switch.ax-warning-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-warning-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-warning))}ax-switch.ax-warning-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-warning-fore))}ax-switch.ax-warning-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-warning));stroke:rgb(var(--ax-color-warning))}ax-switch.ax-danger-default button:focus-visible{outline-color:rgb(var(--ax-color-danger))}ax-switch.ax-danger-default button ax-switch-handler-content,ax-switch.ax-danger-default button ax-switch-handler-content *{color:#454a50}ax-switch.ax-danger-default button.ax-switch-checked{background-color:rgb(var(--ax-color-danger))!important}ax-switch.ax-danger-default button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-danger-default button.ax-switch-checked ax-switch-handler-content *{color:rgb(var(--ax-color-danger))}ax-switch.ax-danger-default button.ax-switch-checked .ax-switch-inner{color:rgb(var(--ax-color-danger-fore))}ax-switch.ax-danger-default button .ax-switch-handle ax-loading svg{fill:rgb(var(--ax-color-danger));stroke:rgb(var(--ax-color-danger))}ax-switch .ax-state-disabled{opacity:.5;cursor:not-allowed}ax-switch .ax-state-readonly{opacity:.75}\n"] }]
59
59
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { uncheckedText: [{
60
60
  type: Input
61
61
  }], checkedText: [{
@@ -88,4 +88,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
88
88
 
89
89
  export { AXSwitchComponent, AXSwitchContentComponent, AXSwitchModule };
90
90
  //# sourceMappingURL=acorex-components-switch.mjs.map
91
- //# sourceMappingURL=acorex-components-switch.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-switch.mjs","sources":["../../../../projects/acorex/components/switch/src/switch-content.component.ts","../../../../projects/acorex/components/switch/src/switch.component.ts","../../../../projects/acorex/components/switch/src/switch.component.html","../../../../projects/acorex/components/switch/src/switch.module.ts","../../../../projects/acorex/components/switch/acorex-components-switch.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-switch-handler-content,ax-switch-off-content,ax-switch-on-content',\r\n template: `<ng-content></ng-content>`,\r\n})\r\nexport class AXSwitchContentComponent implements OnInit {\r\n constructor() { }\r\n\r\n ngOnInit(): void { }\r\n}\r\n","\r\nimport { AXBaseValueComponentMixin } from '@acorex/components/mixin';\r\nimport {\r\n Component,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n ElementRef,\r\n Input,\r\n HostBinding,\r\n} from '@angular/core';\r\n\r\n\r\n@Component({\r\n selector: 'ax-switch',\r\n templateUrl: './switch.component.html',\r\n styleUrls: ['./switch.component.scss'],\r\n inputs: [\r\n 'disabled',\r\n 'color',\r\n 'readonly',\r\n 'tabIndex',\r\n 'size',\r\n 'cssClass',\r\n 'cssStyle',\r\n 'readonly',\r\n 'allowNull',\r\n 'value',\r\n 'name',\r\n 'checked',\r\n ],\r\n outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AXSwitchComponent extends AXBaseValueComponentMixin {\r\n @Input()\r\n uncheckedText: string;\r\n\r\n @Input()\r\n checkedText: string;\r\n\r\n @Input()\r\n loading: boolean;\r\n\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n _handleOnClickEvent(e: MouseEvent) {\r\n if (this.readonly || this.disabled) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n } else {\r\n this.value = !this.value;\r\n }\r\n }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-${this.color ? this.color : 'primary'}-default`\r\n }\r\n}\r\n","<button type=\"button\" role=\"switch\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\"\r\n [class.ax-switch-checked]=\"value\" (click)=\"_handleOnClickEvent($event)\">\r\n <div class=\"ax-switch-handle\">\r\n <ax-loading *ngIf=\"loading\"></ax-loading>\r\n <ng-content select=\"ax-switch-handler-content\"></ng-content>\r\n </div>\r\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\r\n <ng-content select=\"ax-switch-off-content\"></ng-content>\r\n\r\n </span>\r\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\r\n <ng-content select=\"ax-switch-on-content\"></ng-content>\r\n </span>\r\n\r\n</button>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXLoadingModule } from '@acorex/components/loading';\r\nimport { AXSwitchComponent } from './switch.component';\r\nimport { AXSwitchContentComponent } from './switch-content.component';\r\n\r\n@NgModule({\r\n declarations: [AXSwitchComponent,AXSwitchContentComponent],\r\n imports: [CommonModule, FormsModule, AXLoadingModule],\r\n exports: [AXSwitchComponent,AXSwitchContentComponent],\r\n providers: [],\r\n})\r\nexport class AX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EAAE,eAAe,CAAC;AACrD,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAC,wBAAwB,CAAC;AACrD,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-switch.mjs","sources":["../../../../projects/acorex/components/switch/src/switch-content.component.ts","../../../../projects/acorex/components/switch/src/switch.component.ts","../../../../projects/acorex/components/switch/src/switch.component.html","../../../../projects/acorex/components/switch/src/switch.module.ts","../../../../projects/acorex/components/switch/acorex-components-switch.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-switch-handler-content,ax-switch-off-content,ax-switch-on-content',\r\n template: `<ng-content></ng-content>`,\r\n})\r\nexport class AXSwitchContentComponent implements OnInit {\r\n constructor() { }\r\n\r\n ngOnInit(): void { }\r\n}\r\n","\r\nimport { AXBaseValueComponentMixin } from '@acorex/components/mixin';\r\nimport {\r\n Component,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n ElementRef,\r\n Input,\r\n HostBinding,\r\n} from '@angular/core';\r\n\r\n\r\n@Component({\r\n selector: 'ax-switch',\r\n templateUrl: './switch.component.html',\r\n styleUrls: ['./switch.component.scss'],\r\n inputs: [\r\n 'disabled',\r\n 'color',\r\n 'readonly',\r\n 'tabIndex',\r\n 'size',\r\n 'cssClass',\r\n 'cssStyle',\r\n 'readonly',\r\n 'allowNull',\r\n 'value',\r\n 'name',\r\n 'checked',\r\n ],\r\n outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AXSwitchComponent extends AXBaseValueComponentMixin {\r\n @Input()\r\n uncheckedText: string;\r\n\r\n @Input()\r\n checkedText: string;\r\n\r\n @Input()\r\n loading: boolean;\r\n\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n _handleOnClickEvent(e: MouseEvent) {\r\n if (this.readonly || this.disabled) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n } else {\r\n this.value = !this.value;\r\n }\r\n }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-${this.color ? this.color : 'primary'}-default`\r\n }\r\n}\r\n","<button type=\"button\" role=\"switch\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\"\r\n [class.ax-switch-checked]=\"value\" (click)=\"_handleOnClickEvent($event)\">\r\n <div class=\"ax-switch-handle\">\r\n <ax-loading *ngIf=\"loading\"></ax-loading>\r\n <ng-content select=\"ax-switch-handler-content\"></ng-content>\r\n </div>\r\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\r\n <ng-content select=\"ax-switch-off-content\"></ng-content>\r\n\r\n </span>\r\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\r\n <ng-content select=\"ax-switch-on-content\"></ng-content>\r\n </span>\r\n\r\n</button>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXLoadingModule } from '@acorex/components/loading';\r\nimport { AXSwitchComponent } from './switch.component';\r\nimport { AXSwitchContentComponent } from './switch-content.component';\r\n\r\n@NgModule({\r\n declarations: [AXSwitchComponent,AXSwitchContentComponent],\r\n imports: [CommonModule, FormsModule, AXLoadingModule],\r\n exports: [AXSwitchComponent,AXSwitchContentComponent],\r\n providers: [],\r\n})\r\nexport class AXSwitchModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAMa,wBAAwB,CAAA;AACjC,IAAA,WAAA,GAAA,GAAiB;AAEjB,IAAA,QAAQ,MAAY;;qHAHX,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAA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