@acorex/components 7.10.2 → 7.11.1

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 (67) hide show
  1. package/button/lib/button-item-list.component.d.ts +2 -2
  2. package/circular-progress/README.md +3 -0
  3. package/circular-progress/index.d.ts +2 -0
  4. package/circular-progress/lib/circular-progress.component.d.ts +33 -0
  5. package/circular-progress/lib/circular-progress.module.d.ts +7 -0
  6. package/common/lib/classes/datalist.class.d.ts +5 -0
  7. package/common/lib/classes/datasource.class.d.ts +10 -7
  8. package/common/lib/classes/events.class.d.ts +2 -1
  9. package/data-table/index.d.ts +6 -2
  10. package/data-table/lib/columns/data-column.d.ts +18 -0
  11. package/data-table/lib/columns/data-text-column.component.d.ts +10 -0
  12. package/data-table/lib/columns/row-command-column.component.d.ts +31 -0
  13. package/data-table/lib/columns/row-index-column.component.d.ts +12 -0
  14. package/data-table/lib/columns/row-select-column.component.d.ts +13 -0
  15. package/data-table/lib/data-table.component.d.ts +42 -27
  16. package/data-table/lib/data-table.module.d.ts +14 -9
  17. package/esm2022/alert/lib/alert.component.mjs +2 -2
  18. package/esm2022/button/lib/button-item-list.component.mjs +5 -4
  19. package/esm2022/circular-progress/acorex-components-circular-progress.mjs +5 -0
  20. package/esm2022/circular-progress/index.mjs +3 -0
  21. package/esm2022/circular-progress/lib/circular-progress.component.mjs +96 -0
  22. package/esm2022/circular-progress/lib/circular-progress.module.mjs +17 -0
  23. package/esm2022/common/lib/classes/datalist.class.mjs +6 -1
  24. package/esm2022/common/lib/classes/datasource.class.mjs +10 -3
  25. package/esm2022/common/lib/classes/events.class.mjs +2 -2
  26. package/esm2022/data-table/index.mjs +7 -3
  27. package/esm2022/data-table/lib/columns/data-column.mjs +35 -0
  28. package/esm2022/data-table/lib/columns/data-text-column.component.mjs +34 -0
  29. package/esm2022/data-table/lib/columns/row-command-column.component.mjs +110 -0
  30. package/esm2022/data-table/lib/columns/row-index-column.component.mjs +41 -0
  31. package/esm2022/data-table/lib/columns/row-select-column.component.mjs +62 -0
  32. package/esm2022/data-table/lib/data-table.component.mjs +135 -92
  33. package/esm2022/data-table/lib/data-table.module.mjs +43 -6
  34. package/esm2022/dropdown/lib/dropdown-panel.component.mjs +1 -2
  35. package/esm2022/progress-bar/lib/progress-bar.component.mjs +20 -62
  36. package/esm2022/skeleton/lib/skeleton.component.mjs +2 -2
  37. package/esm2022/switch/lib/switch-content.component.mjs +3 -3
  38. package/esm2022/switch/lib/switch.component.mjs +3 -3
  39. package/esm2022/uploader/lib/uploader-list.component.mjs +3 -3
  40. package/fesm2022/acorex-components-alert.mjs +2 -2
  41. package/fesm2022/acorex-components-alert.mjs.map +1 -1
  42. package/fesm2022/acorex-components-button.mjs +3 -2
  43. package/fesm2022/acorex-components-button.mjs.map +1 -1
  44. package/fesm2022/acorex-components-circular-progress.mjs +117 -0
  45. package/fesm2022/acorex-components-circular-progress.mjs.map +1 -0
  46. package/fesm2022/acorex-components-common.mjs +15 -3
  47. package/fesm2022/acorex-components-common.mjs.map +1 -1
  48. package/fesm2022/acorex-components-data-table.mjs +363 -157
  49. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  50. package/fesm2022/acorex-components-dropdown.mjs +0 -1
  51. package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
  52. package/fesm2022/acorex-components-progress-bar.mjs +18 -60
  53. package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
  54. package/fesm2022/acorex-components-skeleton.mjs +2 -2
  55. package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
  56. package/fesm2022/acorex-components-switch.mjs +4 -4
  57. package/fesm2022/acorex-components-switch.mjs.map +1 -1
  58. package/fesm2022/acorex-components-uploader.mjs +2 -2
  59. package/fesm2022/acorex-components-uploader.mjs.map +1 -1
  60. package/package.json +7 -1
  61. package/progress-bar/lib/progress-bar.component.d.ts +9 -18
  62. package/switch/lib/switch-content.component.d.ts +1 -1
  63. package/switch/lib/switch.component.d.ts +1 -1
  64. package/data-table/lib/data-column.directive.d.ts +0 -11
  65. package/data-table/lib/data-table2.component.d.ts +0 -37
  66. package/esm2022/data-table/lib/data-column.directive.mjs +0 -26
  67. package/esm2022/data-table/lib/data-table2.component.mjs +0 -118
@@ -13,12 +13,12 @@ class AXSwitchContentComponent extends MXBaseComponent {
13
13
  super.ngOnInit();
14
14
  }
15
15
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXSwitchContentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
16
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXSwitchContentComponent, selector: "ax-switch-handler-content,ax-switch-off-content,ax-switch-on-content", usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
16
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXSwitchContentComponent, selector: "ax-switch-handler-content,ax-switch-handler-on-content,ax-switch-handler-off-content,ax-switch-off-content,ax-switch-on-content", usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
17
17
  }
18
18
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXSwitchContentComponent, decorators: [{
19
19
  type: Component,
20
20
  args: [{
21
- selector: 'ax-switch-handler-content,ax-switch-off-content,ax-switch-on-content',
21
+ selector: 'ax-switch-handler-content,ax-switch-handler-on-content,ax-switch-handler-off-content,ax-switch-off-content,ax-switch-on-content',
22
22
  template: `<ng-content></ng-content>`,
23
23
  }]
24
24
  }] });
@@ -44,7 +44,7 @@ class AXSwitchComponent extends classes((MXValueComponent), MXColorComponent) {
44
44
  useExisting: forwardRef(() => AXSwitchComponent),
45
45
  multi: true,
46
46
  },
47
- ], usesInheritance: true, ngImport: i0, template: "<button type=\"button\" role=\"switch\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" \n (focus)=\"emitOnFocusEvent($event)\" \n (blur)=\"emitOnBlurEvent($event)\"\n [class.ax-switch-checked]=\"value\" (click)=\"_handleOnClickEvent($event)\">\n <div class=\"ax-switch-handle\">\n <ax-loading *ngIf=\"loading\"></ax-loading>\n <ng-content select=\"ax-switch-handler-content\"></ng-content>\n </div>\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\n <ng-content select=\"ax-switch-off-content\"></ng-content>\n\n </span>\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\n <ng-content select=\"ax-switch-on-content\"></ng-content>\n </span>\n</button>", styles: ["ax-switch{line-height:initial}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.5rem;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:#00000040!important;min-width:2.25rem;height:1.25rem;line-height:1.25rem;transition:background-color .3s linear;cursor:pointer}ax-switch button:focus-visible{outline-width:2px;outline-offset:2px;outline-style:solid;outline-color:rgba(var(--ax-color-primary-500))}ax-switch button:active .ax-switch-handle{width:1.25rem}ax-switch button.ax-switch-checked{background-color:rgba(var(--ax-color-primary-500))!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:rgba(var(--ax-color-white));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:100%;display:flex;align-items:center;justify-content:center;color:rgba(var(--ax-color-black),.25)}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:rgba(var(--ax-color-primary-500));stroke:rgba(var(--ax-color-primary-500))}ax-switch button .ax-switch-handle:before{position:absolute;background-color:rgba(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-state-disabled{opacity:.5;cursor:not-allowed}ax-switch .ax-state-readonly{opacity:.75}ax-switch.ax-primary-solid button:focus-visible{outline-color:rgba(var(--ax-color-primary-500))!important}ax-switch.ax-primary-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-primary-500))!important}ax-switch.ax-primary-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-primary-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-primary-500))}ax-switch.ax-primary-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-primary-fore))}ax-switch.ax-primary-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-primary-500));stroke:rgba(var(--ax-color-primary-500))}ax-switch.ax-secondary-solid button:focus-visible{outline-color:rgba(var(--ax-color-secondary-500))!important}ax-switch.ax-secondary-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-secondary-500))!important}ax-switch.ax-secondary-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-secondary-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-secondary-500))}ax-switch.ax-secondary-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-secondary-fore))}ax-switch.ax-secondary-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-secondary-500));stroke:rgba(var(--ax-color-secondary-500))}ax-switch.ax-success-solid button:focus-visible{outline-color:rgba(var(--ax-color-success-500))!important}ax-switch.ax-success-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-success-500))!important}ax-switch.ax-success-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-success-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-success-500))}ax-switch.ax-success-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-success-fore))}ax-switch.ax-success-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-success-500));stroke:rgba(var(--ax-color-success-500))}ax-switch.ax-warning-solid button:focus-visible{outline-color:rgba(var(--ax-color-warning-500))!important}ax-switch.ax-warning-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-warning-500))!important}ax-switch.ax-warning-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-warning-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-warning-500))}ax-switch.ax-warning-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-warning-fore))}ax-switch.ax-warning-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-warning-500));stroke:rgba(var(--ax-color-warning-500))}ax-switch.ax-danger-solid button:focus-visible{outline-color:rgba(var(--ax-color-danger-500))!important}ax-switch.ax-danger-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-danger-500))!important}ax-switch.ax-danger-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-danger-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-danger-500))}ax-switch.ax-danger-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-danger-fore))}ax-switch.ax-danger-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-danger-500));stroke:rgba(var(--ax-color-danger-500))}ax-switch.ax-info-solid button:focus-visible{outline-color:rgba(var(--ax-color-info-500))!important}ax-switch.ax-info-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-info-500))!important}ax-switch.ax-info-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-info-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-info-500))}ax-switch.ax-info-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-info-fore))}ax-switch.ax-info-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-info-500));stroke:rgba(var(--ax-color-info-500))}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
47
+ ], usesInheritance: true, ngImport: i0, template: "<button\n type=\"button\"\n role=\"switch\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n [class.ax-switch-checked]=\"value\"\n (click)=\"_handleOnClickEvent($event)\"\n>\n <div class=\"ax-switch-handle\">\n <ax-loading *ngIf=\"loading\"></ax-loading>\n <div class=\"ax-switch-handle-content\">\n <ng-content *ngIf=\"!loading\" select=\"ax-switch-handler-content\"></ng-content>\n <ng-content *ngIf=\"!loading && value\" select=\"ax-switch-handler-on-content\"></ng-content>\n <ng-content *ngIf=\"!loading && !value\" select=\"ax-switch-handler-off-content\"></ng-content>\n </div>\n </div>\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\n <ng-content select=\"ax-switch-off-content\"></ng-content>\n </span>\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\n <ng-content select=\"ax-switch-on-content\"></ng-content>\n </span>\n</button>\n", styles: ["ax-switch{line-height:initial}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.5rem;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:#00000040!important;min-width:2.25rem;height:1.25rem;line-height:1.25rem;transition:background-color .3s linear;cursor:pointer}ax-switch button:focus-visible{outline-width:2px;outline-offset:2px;outline-style:solid;outline-color:rgba(var(--ax-color-primary-500))}ax-switch button:active .ax-switch-handle{width:1.25rem}ax-switch button.ax-switch-checked{background-color:rgba(var(--ax-color-primary-500))!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:rgba(var(--ax-color-white));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-handle-content,ax-switch button .ax-switch-handle .ax-switch-handle-content *{height:100%;width:100%;font-size:100%;display:flex;align-items:center;justify-content:center;color:rgba(var(--ax-color-black),.25)}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:rgba(var(--ax-color-primary-500));stroke:rgba(var(--ax-color-primary-500))}ax-switch button .ax-switch-handle:before{position:absolute;background-color:rgba(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-state-disabled{opacity:.5;cursor:not-allowed}ax-switch .ax-state-readonly{opacity:.75}ax-switch.ax-primary-solid button:focus-visible{outline-color:rgba(var(--ax-color-primary-500))!important}ax-switch.ax-primary-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-primary-500))!important}ax-switch.ax-primary-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-primary-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-primary-500))}ax-switch.ax-primary-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-primary-fore))}ax-switch.ax-primary-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-primary-500));stroke:rgba(var(--ax-color-primary-500))}ax-switch.ax-secondary-solid button:focus-visible{outline-color:rgba(var(--ax-color-secondary-500))!important}ax-switch.ax-secondary-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-secondary-500))!important}ax-switch.ax-secondary-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-secondary-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-secondary-500))}ax-switch.ax-secondary-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-secondary-fore))}ax-switch.ax-secondary-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-secondary-500));stroke:rgba(var(--ax-color-secondary-500))}ax-switch.ax-success-solid button:focus-visible{outline-color:rgba(var(--ax-color-success-500))!important}ax-switch.ax-success-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-success-500))!important}ax-switch.ax-success-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-success-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-success-500))}ax-switch.ax-success-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-success-fore))}ax-switch.ax-success-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-success-500));stroke:rgba(var(--ax-color-success-500))}ax-switch.ax-warning-solid button:focus-visible{outline-color:rgba(var(--ax-color-warning-500))!important}ax-switch.ax-warning-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-warning-500))!important}ax-switch.ax-warning-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-warning-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-warning-500))}ax-switch.ax-warning-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-warning-fore))}ax-switch.ax-warning-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-warning-500));stroke:rgba(var(--ax-color-warning-500))}ax-switch.ax-danger-solid button:focus-visible{outline-color:rgba(var(--ax-color-danger-500))!important}ax-switch.ax-danger-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-danger-500))!important}ax-switch.ax-danger-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-danger-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-danger-500))}ax-switch.ax-danger-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-danger-fore))}ax-switch.ax-danger-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-danger-500));stroke:rgba(var(--ax-color-danger-500))}ax-switch.ax-info-solid button:focus-visible{outline-color:rgba(var(--ax-color-info-500))!important}ax-switch.ax-info-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-info-500))!important}ax-switch.ax-info-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-info-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-info-500))}ax-switch.ax-info-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-info-fore))}ax-switch.ax-info-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-info-500));stroke:rgba(var(--ax-color-info-500))}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
48
48
  }
49
49
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXSwitchComponent, decorators: [{
50
50
  type: Component,
@@ -54,7 +54,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
54
54
  useExisting: forwardRef(() => AXSwitchComponent),
55
55
  multi: true,
56
56
  },
57
- ], template: "<button type=\"button\" role=\"switch\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" \n (focus)=\"emitOnFocusEvent($event)\" \n (blur)=\"emitOnBlurEvent($event)\"\n [class.ax-switch-checked]=\"value\" (click)=\"_handleOnClickEvent($event)\">\n <div class=\"ax-switch-handle\">\n <ax-loading *ngIf=\"loading\"></ax-loading>\n <ng-content select=\"ax-switch-handler-content\"></ng-content>\n </div>\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\n <ng-content select=\"ax-switch-off-content\"></ng-content>\n\n </span>\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\n <ng-content select=\"ax-switch-on-content\"></ng-content>\n </span>\n</button>", styles: ["ax-switch{line-height:initial}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.5rem;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:#00000040!important;min-width:2.25rem;height:1.25rem;line-height:1.25rem;transition:background-color .3s linear;cursor:pointer}ax-switch button:focus-visible{outline-width:2px;outline-offset:2px;outline-style:solid;outline-color:rgba(var(--ax-color-primary-500))}ax-switch button:active .ax-switch-handle{width:1.25rem}ax-switch button.ax-switch-checked{background-color:rgba(var(--ax-color-primary-500))!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:rgba(var(--ax-color-white));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:100%;display:flex;align-items:center;justify-content:center;color:rgba(var(--ax-color-black),.25)}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:rgba(var(--ax-color-primary-500));stroke:rgba(var(--ax-color-primary-500))}ax-switch button .ax-switch-handle:before{position:absolute;background-color:rgba(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-state-disabled{opacity:.5;cursor:not-allowed}ax-switch .ax-state-readonly{opacity:.75}ax-switch.ax-primary-solid button:focus-visible{outline-color:rgba(var(--ax-color-primary-500))!important}ax-switch.ax-primary-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-primary-500))!important}ax-switch.ax-primary-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-primary-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-primary-500))}ax-switch.ax-primary-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-primary-fore))}ax-switch.ax-primary-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-primary-500));stroke:rgba(var(--ax-color-primary-500))}ax-switch.ax-secondary-solid button:focus-visible{outline-color:rgba(var(--ax-color-secondary-500))!important}ax-switch.ax-secondary-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-secondary-500))!important}ax-switch.ax-secondary-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-secondary-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-secondary-500))}ax-switch.ax-secondary-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-secondary-fore))}ax-switch.ax-secondary-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-secondary-500));stroke:rgba(var(--ax-color-secondary-500))}ax-switch.ax-success-solid button:focus-visible{outline-color:rgba(var(--ax-color-success-500))!important}ax-switch.ax-success-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-success-500))!important}ax-switch.ax-success-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-success-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-success-500))}ax-switch.ax-success-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-success-fore))}ax-switch.ax-success-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-success-500));stroke:rgba(var(--ax-color-success-500))}ax-switch.ax-warning-solid button:focus-visible{outline-color:rgba(var(--ax-color-warning-500))!important}ax-switch.ax-warning-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-warning-500))!important}ax-switch.ax-warning-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-warning-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-warning-500))}ax-switch.ax-warning-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-warning-fore))}ax-switch.ax-warning-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-warning-500));stroke:rgba(var(--ax-color-warning-500))}ax-switch.ax-danger-solid button:focus-visible{outline-color:rgba(var(--ax-color-danger-500))!important}ax-switch.ax-danger-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-danger-500))!important}ax-switch.ax-danger-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-danger-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-danger-500))}ax-switch.ax-danger-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-danger-fore))}ax-switch.ax-danger-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-danger-500));stroke:rgba(var(--ax-color-danger-500))}ax-switch.ax-info-solid button:focus-visible{outline-color:rgba(var(--ax-color-info-500))!important}ax-switch.ax-info-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-info-500))!important}ax-switch.ax-info-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-info-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-info-500))}ax-switch.ax-info-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-info-fore))}ax-switch.ax-info-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-info-500));stroke:rgba(var(--ax-color-info-500))}\n"] }]
57
+ ], template: "<button\n type=\"button\"\n role=\"switch\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n [class.ax-switch-checked]=\"value\"\n (click)=\"_handleOnClickEvent($event)\"\n>\n <div class=\"ax-switch-handle\">\n <ax-loading *ngIf=\"loading\"></ax-loading>\n <div class=\"ax-switch-handle-content\">\n <ng-content *ngIf=\"!loading\" select=\"ax-switch-handler-content\"></ng-content>\n <ng-content *ngIf=\"!loading && value\" select=\"ax-switch-handler-on-content\"></ng-content>\n <ng-content *ngIf=\"!loading && !value\" select=\"ax-switch-handler-off-content\"></ng-content>\n </div>\n </div>\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\n <ng-content select=\"ax-switch-off-content\"></ng-content>\n </span>\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\n <ng-content select=\"ax-switch-on-content\"></ng-content>\n </span>\n</button>\n", styles: ["ax-switch{line-height:initial}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.5rem;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:#00000040!important;min-width:2.25rem;height:1.25rem;line-height:1.25rem;transition:background-color .3s linear;cursor:pointer}ax-switch button:focus-visible{outline-width:2px;outline-offset:2px;outline-style:solid;outline-color:rgba(var(--ax-color-primary-500))}ax-switch button:active .ax-switch-handle{width:1.25rem}ax-switch button.ax-switch-checked{background-color:rgba(var(--ax-color-primary-500))!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:rgba(var(--ax-color-white));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-handle-content,ax-switch button .ax-switch-handle .ax-switch-handle-content *{height:100%;width:100%;font-size:100%;display:flex;align-items:center;justify-content:center;color:rgba(var(--ax-color-black),.25)}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:rgba(var(--ax-color-primary-500));stroke:rgba(var(--ax-color-primary-500))}ax-switch button .ax-switch-handle:before{position:absolute;background-color:rgba(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-state-disabled{opacity:.5;cursor:not-allowed}ax-switch .ax-state-readonly{opacity:.75}ax-switch.ax-primary-solid button:focus-visible{outline-color:rgba(var(--ax-color-primary-500))!important}ax-switch.ax-primary-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-primary-500))!important}ax-switch.ax-primary-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-primary-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-primary-500))}ax-switch.ax-primary-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-primary-fore))}ax-switch.ax-primary-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-primary-500));stroke:rgba(var(--ax-color-primary-500))}ax-switch.ax-secondary-solid button:focus-visible{outline-color:rgba(var(--ax-color-secondary-500))!important}ax-switch.ax-secondary-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-secondary-500))!important}ax-switch.ax-secondary-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-secondary-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-secondary-500))}ax-switch.ax-secondary-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-secondary-fore))}ax-switch.ax-secondary-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-secondary-500));stroke:rgba(var(--ax-color-secondary-500))}ax-switch.ax-success-solid button:focus-visible{outline-color:rgba(var(--ax-color-success-500))!important}ax-switch.ax-success-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-success-500))!important}ax-switch.ax-success-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-success-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-success-500))}ax-switch.ax-success-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-success-fore))}ax-switch.ax-success-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-success-500));stroke:rgba(var(--ax-color-success-500))}ax-switch.ax-warning-solid button:focus-visible{outline-color:rgba(var(--ax-color-warning-500))!important}ax-switch.ax-warning-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-warning-500))!important}ax-switch.ax-warning-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-warning-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-warning-500))}ax-switch.ax-warning-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-warning-fore))}ax-switch.ax-warning-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-warning-500));stroke:rgba(var(--ax-color-warning-500))}ax-switch.ax-danger-solid button:focus-visible{outline-color:rgba(var(--ax-color-danger-500))!important}ax-switch.ax-danger-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-danger-500))!important}ax-switch.ax-danger-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-danger-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-danger-500))}ax-switch.ax-danger-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-danger-fore))}ax-switch.ax-danger-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-danger-500));stroke:rgba(var(--ax-color-danger-500))}ax-switch.ax-info-solid button:focus-visible{outline-color:rgba(var(--ax-color-info-500))!important}ax-switch.ax-info-solid button.ax-switch-checked{background-color:rgba(var(--ax-color-info-500))!important}ax-switch.ax-info-solid button.ax-switch-checked ax-switch-handler-content,ax-switch.ax-info-solid button.ax-switch-checked ax-switch-handler-content *{color:rgba(var(--ax-color-info-500))}ax-switch.ax-info-solid button.ax-switch-checked .ax-switch-inner{color:rgba(var(--ax-color-info-fore))}ax-switch.ax-info-solid button .ax-switch-handle ax-loading svg{fill:rgba(var(--ax-color-info-500));stroke:rgba(var(--ax-color-info-500))}\n"] }]
58
58
  }], propDecorators: { loading: [{
59
59
  type: Input
60
60
  }], __hostClass: [{
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-switch.mjs","sources":["../../../../libs/components/switch/src/lib/switch-content.component.ts","../../../../libs/components/switch/src/lib/switch.component.ts","../../../../libs/components/switch/src/lib/switch.component.html","../../../../libs/components/switch/src/lib/switch.module.ts","../../../../libs/components/switch/src/acorex-components-switch.ts"],"sourcesContent":["import { MXBaseComponent } from '@acorex/components/common';\nimport { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'ax-switch-handler-content,ax-switch-off-content,ax-switch-on-content',\n template: `<ng-content></ng-content>`,\n})\nexport class AXSwitchContentComponent extends MXBaseComponent implements OnInit {\n ngOnInit(): void {\n super.ngOnInit();\n }\n}\n","import { MXColorComponent, MXValueComponent } from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\n\n@Component({\n selector: 'ax-switch',\n templateUrl: './switch.component.html',\n styleUrls: ['./switch.component.scss'],\n inputs: ['disabled', 'readonly', 'color', 'tabIndex', 'value', 'name'],\n outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged', 'readonlyChange', 'disabledChange'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXSwitchComponent),\n multi: true,\n },\n ],\n})\nexport class AXSwitchComponent extends classes(MXValueComponent<boolean>, MXColorComponent) {\n @Input()\n loading: boolean;\n\n protected _handleOnClickEvent(e: MouseEvent) {\n this.onTouchedCallback();\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n } else {\n this.commitValue(!this.value, true);\n }\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.color ? this.color : 'primary'}-solid`;\n }\n}\n","<button type=\"button\" role=\"switch\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" \n (focus)=\"emitOnFocusEvent($event)\" \n (blur)=\"emitOnBlurEvent($event)\"\n [class.ax-switch-checked]=\"value\" (click)=\"_handleOnClickEvent($event)\">\n <div class=\"ax-switch-handle\">\n <ax-loading *ngIf=\"loading\"></ax-loading>\n <ng-content select=\"ax-switch-handler-content\"></ng-content>\n </div>\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\n <ng-content select=\"ax-switch-off-content\"></ng-content>\n\n </span>\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\n <ng-content select=\"ax-switch-on-content\"></ng-content>\n </span>\n</button>","import { AXLoadingModule } from '@acorex/components/loading';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXSwitchContentComponent } from './switch-content.component';\nimport { AXSwitchComponent } from './switch.component';\n\n@NgModule({\n declarations: [AXSwitchComponent, AXSwitchContentComponent],\n imports: [CommonModule, FormsModule, AXLoadingModule],\n exports: [AXSwitchComponent, AXSwitchContentComponent],\n providers: [],\n})\nexport class AXSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],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A,IAAA,EAAA,cAAc,EALV,YAAA,EAAA,CAAA,iBAAiB,EAAE,wBAAwB,CAChD,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,eAAe,CAC1C,EAAA,OAAA,EAAA,CAAA,iBAAiB,EAAE,wBAAwB,CAAA,EAAA,CAAA,CAAA,EAAA;AAG1C,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAJf,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIzC,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,iBAAiB,EAAE,wBAAwB,CAAC;AAC3D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,eAAe,CAAC;AACrD,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,wBAAwB,CAAC;AACtD,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-switch.mjs","sources":["../../../../libs/components/switch/src/lib/switch-content.component.ts","../../../../libs/components/switch/src/lib/switch.component.ts","../../../../libs/components/switch/src/lib/switch.component.html","../../../../libs/components/switch/src/lib/switch.module.ts","../../../../libs/components/switch/src/acorex-components-switch.ts"],"sourcesContent":["import { MXBaseComponent } from '@acorex/components/common';\nimport { Component, OnInit } from '@angular/core';\n\n@Component({\n selector:\n 'ax-switch-handler-content,ax-switch-handler-on-content,ax-switch-handler-off-content,ax-switch-off-content,ax-switch-on-content',\n template: `<ng-content></ng-content>`,\n})\nexport class AXSwitchContentComponent extends MXBaseComponent implements OnInit {\n ngOnInit(): void {\n super.ngOnInit();\n }\n}\n","import { MXColorComponent, MXValueComponent } from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\n\n@Component({\n selector: 'ax-switch',\n templateUrl: './switch.component.html',\n styleUrls: ['./switch.component.scss'],\n inputs: ['disabled', 'readonly', 'color', 'tabIndex', 'value', 'name'],\n outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged', 'readonlyChange', 'disabledChange'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXSwitchComponent),\n multi: true,\n },\n ],\n})\nexport class AXSwitchComponent extends classes(MXValueComponent<boolean>, MXColorComponent) {\n @Input()\n loading: boolean;\n\n protected _handleOnClickEvent(e: MouseEvent) {\n this.onTouchedCallback();\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n } else {\n this.commitValue(!this.value, true);\n }\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.color ? this.color : 'primary'}-solid`;\n }\n}\n","<button\n type=\"button\"\n role=\"switch\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n [class.ax-switch-checked]=\"value\"\n (click)=\"_handleOnClickEvent($event)\"\n>\n <div class=\"ax-switch-handle\">\n <ax-loading *ngIf=\"loading\"></ax-loading>\n <div class=\"ax-switch-handle-content\">\n <ng-content *ngIf=\"!loading\" select=\"ax-switch-handler-content\"></ng-content>\n <ng-content *ngIf=\"!loading && value\" select=\"ax-switch-handler-on-content\"></ng-content>\n <ng-content *ngIf=\"!loading && !value\" select=\"ax-switch-handler-off-content\"></ng-content>\n </div>\n </div>\n <span class=\"ax-switch-inner\" *ngIf=\"!value\">\n <ng-content select=\"ax-switch-off-content\"></ng-content>\n </span>\n <span class=\"ax-switch-inner\" *ngIf=\"value\">\n <ng-content select=\"ax-switch-on-content\"></ng-content>\n </span>\n</button>\n","import { AXLoadingModule } from '@acorex/components/loading';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXSwitchContentComponent } from './switch-content.component';\nimport { AXSwitchComponent } from './switch.component';\n\n@NgModule({\n declarations: [AXSwitchComponent, AXSwitchContentComponent],\n imports: [CommonModule, FormsModule, AXLoadingModule],\n exports: [AXSwitchComponent, AXSwitchContentComponent],\n providers: [],\n})\nexport class AXSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAQM,MAAO,wBAAyB,SAAQ,eAAe,CAAA;IAC3D,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;KAClB;8GAHU,wBAAwB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,8LAFzB,CAA2B,yBAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAE1B,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EACN,iIAAiI;AACnI,oBAAA,QAAQ,EAAE,CAA2B,yBAAA,CAAA;AACtC,iBAAA,CAAA;;;ACqBK,MAAO,iBAAkB,SAAQ,OAAO,EAAC,gBAAyB,GAAE,gBAAgB,CAAC,CAAA;AAI/E,IAA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tD,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
@@ -102,7 +102,7 @@ class AXUploaderListComponent extends MXBaseComponent {
102
102
  this.dialogRef.close();
103
103
  }
104
104
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXUploaderListComponent, deps: [{ token: i1$1.DialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
105
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXUploaderListComponent, selector: "ax-uploader-list", usesInheritance: true, ngImport: i0, template: "<div class=\"ax-uploader-list-header\">\n <div>Uploader list</div>\n <div>\n <i\n class=\"ax-icon\"\n [ngClass]=\"{ 'ax-icon-chevron-down': !isCollapsed, 'ax-icon-chevron-up': isCollapsed }\"\n (click)=\"toggle()\"\n ></i>\n\n <i class=\"ax-icon ax-icon-close\" (click)=\"close()\"></i>\n </div>\n</div>\n\n<div [@collapse]=\"isCollapsed\">\n <div class=\"ax-uploader-progress-status\">\n <div>{{ leftTime }}min left</div>\n <button>{{ 'common.cancel' | trans }}</button>\n </div>\n <ul class=\"ax-uploader-list-items\">\n <ng-container *ngFor=\"let item of items\">\n <li>\n <div>\n <i class=\"ax-icon ax-icon-inbox\"></i>\n <div class=\"ax-uploader-item-text\">\n <strong>{{ item.name }}</strong>\n <small>{{ item.size }}</small>\n </div>\n </div>\n <div>\n <ax-progress-bar style=\"width: 48px\" color=\"primary\" [value]=\"20\"></ax-progress-bar>\n </div>\n </li>\n </ng-container>\n </ul>\n</div>\n", styles: [".ax-dark ax-uploader-list .ax-uploader-progress-status{background-color:rgba(var(--ax-color-primary-500),.25);color:rgba(var(--ax-color-primary-50));border-color:rgba(var(--ax-color-primary-500))}ax-uploader-list{display:block;background-color:rgba(var(--ax-color-surface));-webkit-border-top-left-radius:.75rem;-webkit-border-top-right-radius:.75rem;-moz-border-radius-topleft:.75rem;-moz-border-radius-topright:.75rem;border-top-left-radius:.75rem;border-top-right-radius:.75rem;overflow:hidden;box-shadow:-1px -1px 10px #00000029;border:1px solid;border-color:rgba(var(--ax-color-border-default));outline-color:rgba(var(--ax-color-primary-500))}ax-uploader-list .ax-uploader-list-header{display:flex;justify-content:space-between;padding:.75rem 1rem;background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-on-surface-fore));font-weight:500}ax-uploader-list .ax-uploader-list-header .ax-icon{font-size:1.5rem;cursor:pointer;margin-inline-start:.5rem}ax-uploader-list .ax-uploader-list-header .ax-icon:hover{opacity:.6}ax-uploader-list .ax-uploader-progress-status{display:flex;align-items:center;justify-content:space-between;font-size:.875rem;background-color:rgba(var(--ax-color-primary-100));color:rgba(var(--ax-color-primary-700));padding:.5rem .75rem;border-top:1px solid;border-bottom:1px solid;border-color:rgba(var(--ax-color-primary-200))}ax-uploader-list .ax-uploader-list-items{padding:.5rem 0;max-height:50vh;overflow-y:auto;overflow-x:hidden}ax-uploader-list .ax-uploader-list-items li{font-size:.875rem;padding:.75rem;display:flex;align-items:center;justify-content:space-between}ax-uploader-list .ax-uploader-list-items li>div{display:flex}ax-uploader-list .ax-uploader-list-items li>div .ax-icon{display:flex;font-size:1.5rem;margin-inline-end:.5rem}ax-uploader-list .ax-uploader-list-items li>div .ax-uploader-item-text{display:flex;flex-direction:column}ax-uploader-list .ax-uploader-list-items li>div .ax-uploader-item-text strong{font-weight:500;display:block}ax-uploader-list .ax-uploader-list-items li>div .ax-uploader-item-text small{color:rgba(var(--ax-color-on-surface-fore),.75)}.ax-uploader-list-pane .cdk-dialog-container:focus,.ax-uploader-list-pane .cdk-dialog-container:focus-visible,.ax-uploader-list-pane .cdk-dialog-container:focus-within{outline:none}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3.AXProgressBarComponent, selector: "ax-progress-bar", inputs: ["color", "value", "look", "strokeWidth", "size"], outputs: ["ValueChange", "LookChange", "strokeWidthChange", "sizeChange"] }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "trans" }], animations: [
105
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXUploaderListComponent, selector: "ax-uploader-list", usesInheritance: true, ngImport: i0, template: "<div class=\"ax-uploader-list-header\">\n <div>Uploader list</div>\n <div>\n <i\n class=\"ax-icon\"\n [ngClass]=\"{ 'ax-icon-chevron-down': !isCollapsed, 'ax-icon-chevron-up': isCollapsed }\"\n (click)=\"toggle()\"\n ></i>\n\n <i class=\"ax-icon ax-icon-close\" (click)=\"close()\"></i>\n </div>\n</div>\n\n<div [@collapse]=\"isCollapsed\">\n <div class=\"ax-uploader-progress-status\">\n <div>{{ leftTime }}min left</div>\n <button>{{ 'common.cancel' | trans }}</button>\n </div>\n <ul class=\"ax-uploader-list-items\">\n <ng-container *ngFor=\"let item of items\">\n <li>\n <div>\n <i class=\"ax-icon ax-icon-inbox\"></i>\n <div class=\"ax-uploader-item-text\">\n <strong>{{ item.name }}</strong>\n <small>{{ item.size }}</small>\n </div>\n </div>\n <div>\n <ax-progress-bar style=\"width: 48px\" color=\"primary\" [progress]=\"20\"></ax-progress-bar>\n </div>\n </li>\n </ng-container>\n </ul>\n</div>\n", styles: [".ax-dark ax-uploader-list .ax-uploader-progress-status{background-color:rgba(var(--ax-color-primary-500),.25);color:rgba(var(--ax-color-primary-50));border-color:rgba(var(--ax-color-primary-500))}ax-uploader-list{display:block;background-color:rgba(var(--ax-color-surface));-webkit-border-top-left-radius:.75rem;-webkit-border-top-right-radius:.75rem;-moz-border-radius-topleft:.75rem;-moz-border-radius-topright:.75rem;border-top-left-radius:.75rem;border-top-right-radius:.75rem;overflow:hidden;box-shadow:-1px -1px 10px #00000029;border:1px solid;border-color:rgba(var(--ax-color-border-default));outline-color:rgba(var(--ax-color-primary-500))}ax-uploader-list .ax-uploader-list-header{display:flex;justify-content:space-between;padding:.75rem 1rem;background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-on-surface-fore));font-weight:500}ax-uploader-list .ax-uploader-list-header .ax-icon{font-size:1.5rem;cursor:pointer;margin-inline-start:.5rem}ax-uploader-list .ax-uploader-list-header .ax-icon:hover{opacity:.6}ax-uploader-list .ax-uploader-progress-status{display:flex;align-items:center;justify-content:space-between;font-size:.875rem;background-color:rgba(var(--ax-color-primary-100));color:rgba(var(--ax-color-primary-700));padding:.5rem .75rem;border-top:1px solid;border-bottom:1px solid;border-color:rgba(var(--ax-color-primary-200))}ax-uploader-list .ax-uploader-list-items{padding:.5rem 0;max-height:50vh;overflow-y:auto;overflow-x:hidden}ax-uploader-list .ax-uploader-list-items li{font-size:.875rem;padding:.75rem;display:flex;align-items:center;justify-content:space-between}ax-uploader-list .ax-uploader-list-items li>div{display:flex}ax-uploader-list .ax-uploader-list-items li>div .ax-icon{display:flex;font-size:1.5rem;margin-inline-end:.5rem}ax-uploader-list .ax-uploader-list-items li>div .ax-uploader-item-text{display:flex;flex-direction:column}ax-uploader-list .ax-uploader-list-items li>div .ax-uploader-item-text strong{font-weight:500;display:block}ax-uploader-list .ax-uploader-list-items li>div .ax-uploader-item-text small{color:rgba(var(--ax-color-on-surface-fore),.75)}.ax-uploader-list-pane .cdk-dialog-container:focus,.ax-uploader-list-pane .cdk-dialog-container:focus-visible,.ax-uploader-list-pane .cdk-dialog-container:focus-within{outline:none}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3.AXProgressBarComponent, selector: "ax-progress-bar", inputs: ["color", "progress", "height"], outputs: ["ValueChange", "sizeChange"] }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "trans" }], animations: [
106
106
  trigger('collapse', [
107
107
  state('false', style({ height: AUTO_STYLE, visibility: AUTO_STYLE })),
108
108
  state('true', style({ height: '0', visibility: 'hidden' })),
@@ -120,7 +120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
120
120
  transition('false => true', animate(150 + 'ms ease-in')),
121
121
  transition('true => false', animate(150 + 'ms ease-out')),
122
122
  ]),
123
- ], template: "<div class=\"ax-uploader-list-header\">\n <div>Uploader list</div>\n <div>\n <i\n class=\"ax-icon\"\n [ngClass]=\"{ 'ax-icon-chevron-down': !isCollapsed, 'ax-icon-chevron-up': isCollapsed }\"\n (click)=\"toggle()\"\n ></i>\n\n <i class=\"ax-icon ax-icon-close\" (click)=\"close()\"></i>\n </div>\n</div>\n\n<div [@collapse]=\"isCollapsed\">\n <div class=\"ax-uploader-progress-status\">\n <div>{{ leftTime }}min left</div>\n <button>{{ 'common.cancel' | trans }}</button>\n </div>\n <ul class=\"ax-uploader-list-items\">\n <ng-container *ngFor=\"let item of items\">\n <li>\n <div>\n <i class=\"ax-icon ax-icon-inbox\"></i>\n <div class=\"ax-uploader-item-text\">\n <strong>{{ item.name }}</strong>\n <small>{{ item.size }}</small>\n </div>\n </div>\n <div>\n <ax-progress-bar style=\"width: 48px\" color=\"primary\" [value]=\"20\"></ax-progress-bar>\n </div>\n </li>\n </ng-container>\n </ul>\n</div>\n", styles: [".ax-dark ax-uploader-list .ax-uploader-progress-status{background-color:rgba(var(--ax-color-primary-500),.25);color:rgba(var(--ax-color-primary-50));border-color:rgba(var(--ax-color-primary-500))}ax-uploader-list{display:block;background-color:rgba(var(--ax-color-surface));-webkit-border-top-left-radius:.75rem;-webkit-border-top-right-radius:.75rem;-moz-border-radius-topleft:.75rem;-moz-border-radius-topright:.75rem;border-top-left-radius:.75rem;border-top-right-radius:.75rem;overflow:hidden;box-shadow:-1px -1px 10px #00000029;border:1px solid;border-color:rgba(var(--ax-color-border-default));outline-color:rgba(var(--ax-color-primary-500))}ax-uploader-list .ax-uploader-list-header{display:flex;justify-content:space-between;padding:.75rem 1rem;background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-on-surface-fore));font-weight:500}ax-uploader-list .ax-uploader-list-header .ax-icon{font-size:1.5rem;cursor:pointer;margin-inline-start:.5rem}ax-uploader-list .ax-uploader-list-header .ax-icon:hover{opacity:.6}ax-uploader-list .ax-uploader-progress-status{display:flex;align-items:center;justify-content:space-between;font-size:.875rem;background-color:rgba(var(--ax-color-primary-100));color:rgba(var(--ax-color-primary-700));padding:.5rem .75rem;border-top:1px solid;border-bottom:1px solid;border-color:rgba(var(--ax-color-primary-200))}ax-uploader-list .ax-uploader-list-items{padding:.5rem 0;max-height:50vh;overflow-y:auto;overflow-x:hidden}ax-uploader-list .ax-uploader-list-items li{font-size:.875rem;padding:.75rem;display:flex;align-items:center;justify-content:space-between}ax-uploader-list .ax-uploader-list-items li>div{display:flex}ax-uploader-list .ax-uploader-list-items li>div .ax-icon{display:flex;font-size:1.5rem;margin-inline-end:.5rem}ax-uploader-list .ax-uploader-list-items li>div .ax-uploader-item-text{display:flex;flex-direction:column}ax-uploader-list .ax-uploader-list-items li>div .ax-uploader-item-text strong{font-weight:500;display:block}ax-uploader-list .ax-uploader-list-items li>div .ax-uploader-item-text small{color:rgba(var(--ax-color-on-surface-fore),.75)}.ax-uploader-list-pane .cdk-dialog-container:focus,.ax-uploader-list-pane .cdk-dialog-container:focus-visible,.ax-uploader-list-pane .cdk-dialog-container:focus-within{outline:none}\n"] }]
123
+ ], template: "<div class=\"ax-uploader-list-header\">\n <div>Uploader list</div>\n <div>\n <i\n class=\"ax-icon\"\n [ngClass]=\"{ 'ax-icon-chevron-down': !isCollapsed, 'ax-icon-chevron-up': isCollapsed }\"\n (click)=\"toggle()\"\n ></i>\n\n <i class=\"ax-icon ax-icon-close\" (click)=\"close()\"></i>\n </div>\n</div>\n\n<div [@collapse]=\"isCollapsed\">\n <div class=\"ax-uploader-progress-status\">\n <div>{{ leftTime }}min left</div>\n <button>{{ 'common.cancel' | trans }}</button>\n </div>\n <ul class=\"ax-uploader-list-items\">\n <ng-container *ngFor=\"let item of items\">\n <li>\n <div>\n <i class=\"ax-icon ax-icon-inbox\"></i>\n <div class=\"ax-uploader-item-text\">\n <strong>{{ item.name }}</strong>\n <small>{{ item.size }}</small>\n </div>\n </div>\n <div>\n <ax-progress-bar style=\"width: 48px\" color=\"primary\" [progress]=\"20\"></ax-progress-bar>\n </div>\n </li>\n </ng-container>\n </ul>\n</div>\n", styles: [".ax-dark ax-uploader-list .ax-uploader-progress-status{background-color:rgba(var(--ax-color-primary-500),.25);color:rgba(var(--ax-color-primary-50));border-color:rgba(var(--ax-color-primary-500))}ax-uploader-list{display:block;background-color:rgba(var(--ax-color-surface));-webkit-border-top-left-radius:.75rem;-webkit-border-top-right-radius:.75rem;-moz-border-radius-topleft:.75rem;-moz-border-radius-topright:.75rem;border-top-left-radius:.75rem;border-top-right-radius:.75rem;overflow:hidden;box-shadow:-1px -1px 10px #00000029;border:1px solid;border-color:rgba(var(--ax-color-border-default));outline-color:rgba(var(--ax-color-primary-500))}ax-uploader-list .ax-uploader-list-header{display:flex;justify-content:space-between;padding:.75rem 1rem;background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-on-surface-fore));font-weight:500}ax-uploader-list .ax-uploader-list-header .ax-icon{font-size:1.5rem;cursor:pointer;margin-inline-start:.5rem}ax-uploader-list .ax-uploader-list-header .ax-icon:hover{opacity:.6}ax-uploader-list .ax-uploader-progress-status{display:flex;align-items:center;justify-content:space-between;font-size:.875rem;background-color:rgba(var(--ax-color-primary-100));color:rgba(var(--ax-color-primary-700));padding:.5rem .75rem;border-top:1px solid;border-bottom:1px solid;border-color:rgba(var(--ax-color-primary-200))}ax-uploader-list .ax-uploader-list-items{padding:.5rem 0;max-height:50vh;overflow-y:auto;overflow-x:hidden}ax-uploader-list .ax-uploader-list-items li{font-size:.875rem;padding:.75rem;display:flex;align-items:center;justify-content:space-between}ax-uploader-list .ax-uploader-list-items li>div{display:flex}ax-uploader-list .ax-uploader-list-items li>div .ax-icon{display:flex;font-size:1.5rem;margin-inline-end:.5rem}ax-uploader-list .ax-uploader-list-items li>div .ax-uploader-item-text{display:flex;flex-direction:column}ax-uploader-list .ax-uploader-list-items li>div .ax-uploader-item-text strong{font-weight:500;display:block}ax-uploader-list .ax-uploader-list-items li>div .ax-uploader-item-text small{color:rgba(var(--ax-color-on-surface-fore),.75)}.ax-uploader-list-pane .cdk-dialog-container:focus,.ax-uploader-list-pane .cdk-dialog-container:focus-visible,.ax-uploader-list-pane .cdk-dialog-container:focus-within{outline:none}\n"] }]
124
124
  }], ctorParameters: function () { return [{ type: i1$1.DialogRef }]; } });
125
125
 
126
126
  class AXUploaderOverlayComponent extends MXBaseComponent {
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-uploader.mjs","sources":["../../../../libs/components/uploader/src/lib/uploader-drop-zone.component.ts","../../../../libs/components/uploader/src/lib/uploader-drop-zone.component.html","../../../../libs/components/uploader/src/lib/uploader.service.ts","../../../../libs/components/uploader/src/lib/uploader-list.component.ts","../../../../libs/components/uploader/src/lib/uploader-list.component.html","../../../../libs/components/uploader/src/lib/uploader-overlay.component.ts","../../../../libs/components/uploader/src/lib/uploader-overlay.component.html","../../../../libs/components/uploader/src/lib/uploader-zone.directive.ts","../../../../libs/components/uploader/src/lib/uploader.module.ts","../../../../libs/components/uploader/src/acorex-components-uploader.ts"],"sourcesContent":["import { MXBaseComponent } from '@acorex/components/common';\nimport { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-uploader-drop-zone',\n templateUrl: './uploader-drop-zone.component.html',\n styleUrls: ['./uploader.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXUploaderDropZoneComponent extends MXBaseComponent {}\n","<div class=\"ax-uploader-drop-zone-container\">\n <ax-icon class=\"ax-icon ax-icon-upload\"></ax-icon>\n <div class=\"ax-uploader-drop-zone-description\">\n <span>Drag & Drop or <a href=\"#\">Choose file</a> to upload</span>\n <p>SVG, PNG, JPG or GIF (MAX. 800x400px)</p>\n </div>\n</div>\n","import { Dialog, DialogRef } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy } from '@angular/cdk/overlay';\nimport { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { AXUploaderListComponent } from './uploader-list.component';\n\n@Injectable()\nexport class AXUploaderService {\n private dialog: Dialog = inject(Dialog);\n private http: HttpClient = inject(HttpClient);\n files$: BehaviorSubject<Array<any>> = new BehaviorSubject<Array<any>>([]);\n\n dialogRef: DialogRef;\n openDialog() {\n const positionStrategy = new GlobalPositionStrategy();\n if (!this.dialogRef) {\n this.dialogRef = this.dialog.open(AXUploaderListComponent, {\n hasBackdrop: false,\n closeOnNavigation: false,\n width: '320px',\n maxWidth: 320,\n panelClass: [\n 'ax-uploader-list-pane',\n 'ax-animate-animated',\n 'ax-animate-fadeIn',\n 'ax-animate-faster',\n ],\n positionStrategy: positionStrategy.bottom().end('24px'),\n data: {\n files: this.files$,\n },\n }) as DialogRef;\n }\n }\n\n closeDialog() {\n this.dialogRef.close();\n }\n\n upload(requestUrl: string, file: File, options?: any) {\n const formData = new FormData();\n formData.append(file.name, file);\n return this.http.post(requestUrl, formData, options);\n }\n}\n","import { AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { AUTO_STYLE, animate, state, style, transition, trigger } from '@angular/animations';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { Component, ViewEncapsulation, inject } from '@angular/core';\nimport { AXUploaderService } from './uploader.service';\n\nexport interface AXUploaderItem {\n type: 'picture' | 'doc' | 'pdf' | 'archive' | 'video' | 'unknow';\n name: string;\n size: number;\n description?: string;\n}\n\n@Component({\n selector: 'ax-uploader-list',\n templateUrl: './uploader-list.component.html',\n styleUrls: ['./uploader-list.component.scss'],\n encapsulation: ViewEncapsulation.None,\n animations: [\n trigger('collapse', [\n state('false', style({ height: AUTO_STYLE, visibility: AUTO_STYLE })),\n state('true', style({ height: '0', visibility: 'hidden' })),\n transition('false => true', animate(150 + 'ms ease-in')),\n transition('true => false', animate(150 + 'ms ease-out')),\n ]),\n ],\n})\nexport class AXUploaderListComponent extends MXBaseComponent {\n data = inject(DIALOG_DATA);\n items: any[] = [];\n leftTime = 5;\n isCollapsed = false;\n\n private uploadService: AXUploaderService = inject(AXUploaderService);\n\n constructor(private dialogRef: DialogRef<AXComponentCloseEvent>) {\n super();\n this.uploadService.files$.subscribe({\n next: (e: any) => {\n this.items.push(...e);\n // this.upload()\n },\n });\n }\n\n upload(file) {\n this.uploadService.upload('http://api.acorexui.com/api/v1/files', file).subscribe({\n next: (e: any) => {\n console.log(e);\n },\n error: (err: any) => {\n console.error(err);\n },\n });\n }\n\n toggle() {\n this.isCollapsed = !this.isCollapsed;\n }\n close() {\n this.dialogRef.close();\n }\n}\n","<div class=\"ax-uploader-list-header\">\n <div>Uploader list</div>\n <div>\n <i\n class=\"ax-icon\"\n [ngClass]=\"{ 'ax-icon-chevron-down': !isCollapsed, 'ax-icon-chevron-up': isCollapsed }\"\n (click)=\"toggle()\"\n ></i>\n\n <i class=\"ax-icon ax-icon-close\" (click)=\"close()\"></i>\n </div>\n</div>\n\n<div [@collapse]=\"isCollapsed\">\n <div class=\"ax-uploader-progress-status\">\n <div>{{ leftTime }}min left</div>\n <button>{{ 'common.cancel' | trans }}</button>\n </div>\n <ul class=\"ax-uploader-list-items\">\n <ng-container *ngFor=\"let item of items\">\n <li>\n <div>\n <i class=\"ax-icon ax-icon-inbox\"></i>\n <div class=\"ax-uploader-item-text\">\n <strong>{{ item.name }}</strong>\n <small>{{ item.size }}</small>\n </div>\n </div>\n <div>\n <ax-progress-bar style=\"width: 48px\" color=\"primary\" [value]=\"20\"></ax-progress-bar>\n </div>\n </li>\n </ng-container>\n </ul>\n</div>\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-uploader-overlay',\n templateUrl: './uploader-overlay.component.html',\n styleUrls: ['./uploader.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXUploaderOverlayComponent extends MXBaseComponent {}\n","<div\n class=\"ax-flex ax-flex-col ax-gap-4 ax-items-center ax-justify-center ax-h-[95vh] hover:ax-bg-primary-50 ax-m-2 hover:ax-border-2 ax-rounded-lg hover:ax-border-primary-500\">\n\n</div>","import { AXFileService } from '@acorex/core/file';\nimport { AXTranslator } from '@acorex/core/translation';\nimport { Directive, ElementRef, HostBinding, Input, OnDestroy, inject } from '@angular/core';\nimport { AXUploaderService } from './uploader.service';\n@Directive({\n selector: '[axUploaderZone]',\n})\nexport class AXUploaderZoneDirective implements OnDestroy {\n @Input() multiple = true;\n private fileService: AXFileService = inject(AXFileService);\n private uploadService: AXUploaderService = inject(AXUploaderService);\n private element: HTMLElement;\n\n stateClass = 'ax-uploader-overlay-state';\n overlayElement: HTMLDivElement;\n init() {\n this.element = this.elementRef.nativeElement as HTMLElement;\n this.element.style.position = 'relative';\n }\n\n constructor(private elementRef: ElementRef) {\n this.init();\n this.element.addEventListener('dragenter', this.handleDragEnter.bind(this), true);\n this.element.addEventListener('dragover', this.handleDragOver.bind(this), true);\n this.element.addEventListener('drop', this.handleOnDrop.bind(this), true);\n this.element.addEventListener('dragleave', this.removeZone.bind(this), true);\n }\n\n ngOnDestroy(): void {\n this.element.removeEventListener('dragenter', this.handleDragEnter.bind(this));\n this.element.removeEventListener('drop', this.handleOnDrop.bind(this));\n this.element.removeEventListener('dragover', this.handleDragOver.bind(this));\n this.element.removeEventListener('dragleave', this.removeZone.bind(this));\n }\n private handleDragEnter(event: Event) {\n this.createZone();\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n private handleOnDrop(event: DragEvent) {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.uploadService.files$.next(event.dataTransfer?.files as any);\n this.uploadService.openDialog();\n this.removeZone();\n }\n\n private handleDragOver(event: Event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n\n private createZone() {\n this.overlayElement = document.createElement('div');\n this.overlayElement.classList.add('ax-uploader-overlay-state');\n\n const icon: HTMLSpanElement = document.createElement('span');\n icon.classList.add('ax-icon', 'ax-icon-upload');\n\n const text = document.createElement('span');\n text.innerText = AXTranslator.get('uploader.zone.text');\n\n this.overlayElement.appendChild(icon);\n this.overlayElement.appendChild(text);\n\n this.element.appendChild(this.overlayElement);\n }\n private removeZone() {\n this.overlayElement.remove();\n }\n @HostBinding('class')\n get __hostClass(): string {\n return `ax-drop-zone`;\n }\n}\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { AXProgressBarModule } from '@acorex/components/progress-bar';\nimport { AXFileService } from '@acorex/core/file';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { HttpClientModule } from '@angular/common/http';\nimport { AXUploaderDropZoneComponent } from './uploader-drop-zone.component';\nimport { AXUploaderListComponent } from './uploader-list.component';\nimport { AXUploaderOverlayComponent } from './uploader-overlay.component';\nimport { AXUploaderZoneDirective } from './uploader-zone.directive';\nimport { AXUploaderService } from './uploader.service';\n\n@NgModule({\n declarations: [\n AXUploaderDropZoneComponent,\n AXUploaderListComponent,\n AXUploaderOverlayComponent,\n AXUploaderZoneDirective,\n ],\n imports: [\n CommonModule,\n HttpClientModule,\n AXDecoratorModule,\n AXButtonModule,\n AXTranslationModule,\n AXProgressBarModule,\n ],\n exports: [\n AXUploaderDropZoneComponent,\n AXUploaderListComponent,\n AXUploaderOverlayComponent,\n AXUploaderZoneDirective,\n ],\n providers: [AXUploaderService, AXFileService],\n})\nexport class AXUploaderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;AASM,MAAO,2BA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
+ {"version":3,"file":"acorex-components-uploader.mjs","sources":["../../../../libs/components/uploader/src/lib/uploader-drop-zone.component.ts","../../../../libs/components/uploader/src/lib/uploader-drop-zone.component.html","../../../../libs/components/uploader/src/lib/uploader.service.ts","../../../../libs/components/uploader/src/lib/uploader-list.component.ts","../../../../libs/components/uploader/src/lib/uploader-list.component.html","../../../../libs/components/uploader/src/lib/uploader-overlay.component.ts","../../../../libs/components/uploader/src/lib/uploader-overlay.component.html","../../../../libs/components/uploader/src/lib/uploader-zone.directive.ts","../../../../libs/components/uploader/src/lib/uploader.module.ts","../../../../libs/components/uploader/src/acorex-components-uploader.ts"],"sourcesContent":["import { MXBaseComponent } from '@acorex/components/common';\nimport { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-uploader-drop-zone',\n templateUrl: './uploader-drop-zone.component.html',\n styleUrls: ['./uploader.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXUploaderDropZoneComponent extends MXBaseComponent {}\n","<div class=\"ax-uploader-drop-zone-container\">\n <ax-icon class=\"ax-icon ax-icon-upload\"></ax-icon>\n <div class=\"ax-uploader-drop-zone-description\">\n <span>Drag & Drop or <a href=\"#\">Choose file</a> to upload</span>\n <p>SVG, PNG, JPG or GIF (MAX. 800x400px)</p>\n </div>\n</div>\n","import { Dialog, DialogRef } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy } from '@angular/cdk/overlay';\nimport { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { AXUploaderListComponent } from './uploader-list.component';\n\n@Injectable()\nexport class AXUploaderService {\n private dialog: Dialog = inject(Dialog);\n private http: HttpClient = inject(HttpClient);\n files$: BehaviorSubject<Array<any>> = new BehaviorSubject<Array<any>>([]);\n\n dialogRef: DialogRef;\n openDialog() {\n const positionStrategy = new GlobalPositionStrategy();\n if (!this.dialogRef) {\n this.dialogRef = this.dialog.open(AXUploaderListComponent, {\n hasBackdrop: false,\n closeOnNavigation: false,\n width: '320px',\n maxWidth: 320,\n panelClass: [\n 'ax-uploader-list-pane',\n 'ax-animate-animated',\n 'ax-animate-fadeIn',\n 'ax-animate-faster',\n ],\n positionStrategy: positionStrategy.bottom().end('24px'),\n data: {\n files: this.files$,\n },\n }) as DialogRef;\n }\n }\n\n closeDialog() {\n this.dialogRef.close();\n }\n\n upload(requestUrl: string, file: File, options?: any) {\n const formData = new FormData();\n formData.append(file.name, file);\n return this.http.post(requestUrl, formData, options);\n }\n}\n","import { AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { AUTO_STYLE, animate, state, style, transition, trigger } from '@angular/animations';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { Component, ViewEncapsulation, inject } from '@angular/core';\nimport { AXUploaderService } from './uploader.service';\n\nexport interface AXUploaderItem {\n type: 'picture' | 'doc' | 'pdf' | 'archive' | 'video' | 'unknow';\n name: string;\n size: number;\n description?: string;\n}\n\n@Component({\n selector: 'ax-uploader-list',\n templateUrl: './uploader-list.component.html',\n styleUrls: ['./uploader-list.component.scss'],\n encapsulation: ViewEncapsulation.None,\n animations: [\n trigger('collapse', [\n state('false', style({ height: AUTO_STYLE, visibility: AUTO_STYLE })),\n state('true', style({ height: '0', visibility: 'hidden' })),\n transition('false => true', animate(150 + 'ms ease-in')),\n transition('true => false', animate(150 + 'ms ease-out')),\n ]),\n ],\n})\nexport class AXUploaderListComponent extends MXBaseComponent {\n data = inject(DIALOG_DATA);\n items: any[] = [];\n leftTime = 5;\n isCollapsed = false;\n\n private uploadService: AXUploaderService = inject(AXUploaderService);\n\n constructor(private dialogRef: DialogRef<AXComponentCloseEvent>) {\n super();\n this.uploadService.files$.subscribe({\n next: (e: any) => {\n this.items.push(...e);\n // this.upload()\n },\n });\n }\n\n upload(file) {\n this.uploadService.upload('http://api.acorexui.com/api/v1/files', file).subscribe({\n next: (e: any) => {\n console.log(e);\n },\n error: (err: any) => {\n console.error(err);\n },\n });\n }\n\n toggle() {\n this.isCollapsed = !this.isCollapsed;\n }\n close() {\n this.dialogRef.close();\n }\n}\n","<div class=\"ax-uploader-list-header\">\n <div>Uploader list</div>\n <div>\n <i\n class=\"ax-icon\"\n [ngClass]=\"{ 'ax-icon-chevron-down': !isCollapsed, 'ax-icon-chevron-up': isCollapsed }\"\n (click)=\"toggle()\"\n ></i>\n\n <i class=\"ax-icon ax-icon-close\" (click)=\"close()\"></i>\n </div>\n</div>\n\n<div [@collapse]=\"isCollapsed\">\n <div class=\"ax-uploader-progress-status\">\n <div>{{ leftTime }}min left</div>\n <button>{{ 'common.cancel' | trans }}</button>\n </div>\n <ul class=\"ax-uploader-list-items\">\n <ng-container *ngFor=\"let item of items\">\n <li>\n <div>\n <i class=\"ax-icon ax-icon-inbox\"></i>\n <div class=\"ax-uploader-item-text\">\n <strong>{{ item.name }}</strong>\n <small>{{ item.size }}</small>\n </div>\n </div>\n <div>\n <ax-progress-bar style=\"width: 48px\" color=\"primary\" [progress]=\"20\"></ax-progress-bar>\n </div>\n </li>\n </ng-container>\n </ul>\n</div>\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-uploader-overlay',\n templateUrl: './uploader-overlay.component.html',\n styleUrls: ['./uploader.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXUploaderOverlayComponent extends MXBaseComponent {}\n","<div\n class=\"ax-flex ax-flex-col ax-gap-4 ax-items-center ax-justify-center ax-h-[95vh] hover:ax-bg-primary-50 ax-m-2 hover:ax-border-2 ax-rounded-lg hover:ax-border-primary-500\">\n\n</div>","import { AXFileService } from '@acorex/core/file';\nimport { AXTranslator } from '@acorex/core/translation';\nimport { Directive, ElementRef, HostBinding, Input, OnDestroy, inject } from '@angular/core';\nimport { AXUploaderService } from './uploader.service';\n@Directive({\n selector: '[axUploaderZone]',\n})\nexport class AXUploaderZoneDirective implements OnDestroy {\n @Input() multiple = true;\n private fileService: AXFileService = inject(AXFileService);\n private uploadService: AXUploaderService = inject(AXUploaderService);\n private element: HTMLElement;\n\n stateClass = 'ax-uploader-overlay-state';\n overlayElement: HTMLDivElement;\n init() {\n this.element = this.elementRef.nativeElement as HTMLElement;\n this.element.style.position = 'relative';\n }\n\n constructor(private elementRef: ElementRef) {\n this.init();\n this.element.addEventListener('dragenter', this.handleDragEnter.bind(this), true);\n this.element.addEventListener('dragover', this.handleDragOver.bind(this), true);\n this.element.addEventListener('drop', this.handleOnDrop.bind(this), true);\n this.element.addEventListener('dragleave', this.removeZone.bind(this), true);\n }\n\n ngOnDestroy(): void {\n this.element.removeEventListener('dragenter', this.handleDragEnter.bind(this));\n this.element.removeEventListener('drop', this.handleOnDrop.bind(this));\n this.element.removeEventListener('dragover', this.handleDragOver.bind(this));\n this.element.removeEventListener('dragleave', this.removeZone.bind(this));\n }\n private handleDragEnter(event: Event) {\n this.createZone();\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n private handleOnDrop(event: DragEvent) {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.uploadService.files$.next(event.dataTransfer?.files as any);\n this.uploadService.openDialog();\n this.removeZone();\n }\n\n private handleDragOver(event: Event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n\n private createZone() {\n this.overlayElement = document.createElement('div');\n this.overlayElement.classList.add('ax-uploader-overlay-state');\n\n const icon: HTMLSpanElement = document.createElement('span');\n icon.classList.add('ax-icon', 'ax-icon-upload');\n\n const text = document.createElement('span');\n text.innerText = AXTranslator.get('uploader.zone.text');\n\n this.overlayElement.appendChild(icon);\n this.overlayElement.appendChild(text);\n\n this.element.appendChild(this.overlayElement);\n }\n private removeZone() {\n this.overlayElement.remove();\n }\n @HostBinding('class')\n get __hostClass(): string {\n return `ax-drop-zone`;\n }\n}\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { AXProgressBarModule } from '@acorex/components/progress-bar';\nimport { AXFileService } from '@acorex/core/file';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { HttpClientModule } from '@angular/common/http';\nimport { AXUploaderDropZoneComponent } from './uploader-drop-zone.component';\nimport { AXUploaderListComponent } from './uploader-list.component';\nimport { AXUploaderOverlayComponent } from './uploader-overlay.component';\nimport { AXUploaderZoneDirective } from './uploader-zone.directive';\nimport { AXUploaderService } from './uploader.service';\n\n@NgModule({\n declarations: [\n AXUploaderDropZoneComponent,\n AXUploaderListComponent,\n AXUploaderOverlayComponent,\n AXUploaderZoneDirective,\n ],\n imports: [\n CommonModule,\n HttpClientModule,\n AXDecoratorModule,\n AXButtonModule,\n AXTranslationModule,\n AXProgressBarModule,\n ],\n exports: [\n AXUploaderDropZoneComponent,\n AXUploaderListComponent,\n AXUploaderOverlayComponent,\n AXUploaderZoneDirective,\n ],\n providers: [AXUploaderService, AXFileService],\n})\nexport class AXUploaderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;AASM,MAAO,2BAA4B,SAAQ,eAAe,CAAA;8GAAnD,2BAA2B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,2BAA2B,oFCTxC,6SAOA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,wBAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,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iBAAiB,EAAE,aAAa,CAAC,YAb3C,YAAY;YACZ,gBAAgB;YAChB,iBAAiB;YACjB,cAAc;YACd,mBAAmB;YACnB,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAUV,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAvB5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,2BAA2B;wBAC3B,uBAAuB;wBACvB,0BAA0B;wBAC1B,uBAAuB;AACxB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,gBAAgB;wBAChB,iBAAiB;wBACjB,cAAc;wBACd,mBAAmB;wBACnB,mBAAmB;AACpB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,2BAA2B;wBAC3B,uBAAuB;wBACvB,0BAA0B;wBAC1B,uBAAuB;AACxB,qBAAA;AACD,oBAAA,SAAS,EAAE,CAAC,iBAAiB,EAAE,aAAa,CAAC;AAC9C,iBAAA,CAAA;;;ACrCD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex/components",
3
- "version": "7.10.2",
3
+ "version": "7.11.1",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=16.2.0",
@@ -82,6 +82,12 @@
82
82
  "esm": "./esm2022/chips/acorex-components-chips.mjs",
83
83
  "default": "./fesm2022/acorex-components-chips.mjs"
84
84
  },
85
+ "./circular-progress": {
86
+ "types": "./circular-progress/index.d.ts",
87
+ "esm2022": "./esm2022/circular-progress/acorex-components-circular-progress.mjs",
88
+ "esm": "./esm2022/circular-progress/acorex-components-circular-progress.mjs",
89
+ "default": "./fesm2022/acorex-components-circular-progress.mjs"
90
+ },
85
91
  "./collapse": {
86
92
  "types": "./collapse/index.d.ts",
87
93
  "esm2022": "./esm2022/collapse/acorex-components-collapse.mjs",
@@ -1,5 +1,5 @@
1
1
  import { MXColorComponent } from '@acorex/components/common';
2
- import { EventEmitter } from '@angular/core';
2
+ import { ElementRef, EventEmitter } from '@angular/core';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
5
  * The Button is a component which detects user interaction and triggers a corresponding event
@@ -8,25 +8,16 @@ import * as i0 from "@angular/core";
8
8
  */
9
9
  export type AXProgressLook = 'linear' | 'circular';
10
10
  export declare class AXProgressBarComponent extends MXColorComponent {
11
- circle: SVGCircleElement;
11
+ circle: ElementRef;
12
12
  ValueChange: EventEmitter<number>;
13
- private _value;
14
- get value(): number;
15
- set value(v: number);
16
- LookChange: EventEmitter<AXProgressLook>;
17
- private _look;
18
- get look(): AXProgressLook;
19
- set look(v: AXProgressLook);
20
- strokeWidthChange: EventEmitter<number>;
21
- private _strokeWidth;
22
- get strokeWidth(): number;
23
- set strokeWidth(v: number);
13
+ private _progress;
14
+ get progress(): number;
15
+ set progress(v: number);
24
16
  sizeChange: EventEmitter<number>;
25
- private _size;
26
- get size(): number;
27
- set size(v: number);
17
+ private _height;
18
+ get height(): number;
19
+ set height(v: number);
28
20
  private get __hostClass();
29
- setCircularProgress(value: number): void;
30
21
  static ɵfac: i0.ɵɵFactoryDeclaration<AXProgressBarComponent, never>;
31
- static ɵcmp: i0.ɵɵComponentDeclaration<AXProgressBarComponent, "ax-progress-bar", never, { "color": { "alias": "color"; "required": false; }; "value": { "alias": "value"; "required": false; }; "look": { "alias": "look"; "required": false; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "ValueChange": "ValueChange"; "LookChange": "LookChange"; "strokeWidthChange": "strokeWidthChange"; "sizeChange": "sizeChange"; }, never, ["ax-prefix", "ax-suffix"], false, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXProgressBarComponent, "ax-progress-bar", never, { "color": { "alias": "color"; "required": false; }; "progress": { "alias": "progress"; "required": false; }; "height": { "alias": "height"; "required": false; }; }, { "ValueChange": "ValueChange"; "sizeChange": "sizeChange"; }, never, ["ax-prefix", "ax-suffix"], false, never>;
32
23
  }
@@ -4,5 +4,5 @@ import * as i0 from "@angular/core";
4
4
  export declare class AXSwitchContentComponent extends MXBaseComponent implements OnInit {
5
5
  ngOnInit(): void;
6
6
  static ɵfac: i0.ɵɵFactoryDeclaration<AXSwitchContentComponent, never>;
7
- static ɵcmp: i0.ɵɵComponentDeclaration<AXSwitchContentComponent, "ax-switch-handler-content,ax-switch-off-content,ax-switch-on-content", never, {}, {}, never, ["*"], false, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXSwitchContentComponent, "ax-switch-handler-content,ax-switch-handler-on-content,ax-switch-handler-off-content,ax-switch-off-content,ax-switch-on-content", never, {}, {}, never, ["*"], false, never>;
8
8
  }
@@ -10,6 +10,6 @@ export declare class AXSwitchComponent extends AXSwitchComponent_base {
10
10
  protected _handleOnClickEvent(e: MouseEvent): void;
11
11
  private get __hostClass();
12
12
  static ɵfac: i0.ɵɵFactoryDeclaration<AXSwitchComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<AXSwitchComponent, "ax-switch", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "color": { "alias": "color"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "value": { "alias": "value"; "required": false; }; "name": { "alias": "name"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, { "onBlur": "onBlur"; "onFocus": "onFocus"; "valueChange": "valueChange"; "onValueChanged": "onValueChanged"; "readonlyChange": "readonlyChange"; "disabledChange": "disabledChange"; }, never, ["ax-switch-handler-content", "ax-switch-off-content", "ax-switch-on-content"], false, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXSwitchComponent, "ax-switch", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "color": { "alias": "color"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "value": { "alias": "value"; "required": false; }; "name": { "alias": "name"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, { "onBlur": "onBlur"; "onFocus": "onFocus"; "valueChange": "valueChange"; "onValueChanged": "onValueChanged"; "readonlyChange": "readonlyChange"; "disabledChange": "disabledChange"; }, never, ["ax-switch-handler-content", "ax-switch-handler-on-content", "ax-switch-handler-off-content", "ax-switch-off-content", "ax-switch-on-content"], false, never>;
14
14
  }
15
15
  export {};
@@ -1,11 +0,0 @@
1
- import { TemplateRef } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class AXDataColumnComponent {
4
- headerTemplate?: TemplateRef<unknown>;
5
- cellTemplate?: TemplateRef<unknown>;
6
- valueField: string;
7
- caption: string;
8
- width: string | number;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<AXDataColumnComponent, never>;
10
- static ɵdir: i0.ɵɵDirectiveDeclaration<AXDataColumnComponent, "ax-data-column", never, { "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, {}, never, never, false, never>;
11
- }
@@ -1,37 +0,0 @@
1
- import { AXValueChangedEvent, MXBaseComponent, AXListDataSource, AXDataSource, AXEvent } from '@acorex/components/common';
2
- import { ElementRef, EventEmitter, QueryList, TemplateRef } from '@angular/core';
3
- import { AXDataColumnComponent } from './data-column.directive';
4
- import * as i0 from "@angular/core";
5
- export interface AXDataTableScrollIndexChanged extends AXEvent {
6
- index: number;
7
- }
8
- export declare class AXDataTable2Component extends MXBaseComponent {
9
- protected columns: QueryList<AXDataColumnComponent>;
10
- onPageChanged: EventEmitter<AXValueChangedEvent<number>>;
11
- rowTemplate?: TemplateRef<unknown>;
12
- emptyTemplate?: TemplateRef<unknown>;
13
- loadingTemplate: TemplateRef<unknown>;
14
- showHeader: boolean;
15
- private _pageSize;
16
- get pageSize(): number;
17
- set pageSize(v: number);
18
- fetchDataMode: 'auto' | 'manual';
19
- dataSource: AXDataSource<unknown>;
20
- protected listDataSource: AXListDataSource<unknown>;
21
- protected isLoading: boolean;
22
- protected hasItems: boolean;
23
- private lastIndex;
24
- itemHeight: number | 'auto';
25
- protected width: string;
26
- private viewport;
27
- onScrolledIndexChanged: EventEmitter<AXDataTableScrollIndexChanged>;
28
- trackByIdx(i: any): any;
29
- ngOnInit(): void;
30
- headerContainer: ElementRef;
31
- protected _handleOnscrolledIndexChange(e: number): void;
32
- ngDoCheck(): void;
33
- render(): void;
34
- refresh(): void;
35
- static ɵfac: i0.ɵɵFactoryDeclaration<AXDataTable2Component, never>;
36
- static ɵcmp: i0.ɵɵComponentDeclaration<AXDataTable2Component, "ax-data-table2", never, { "rowTemplate": { "alias": "rowTemplate"; "required": false; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; }; "loadingTemplate": { "alias": "loadingTemplate"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "fetchDataMode": { "alias": "fetchDataMode"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "itemHeight": { "alias": "itemHeight"; "required": false; }; }, { "onPageChanged": "onPageChanged"; "onScrolledIndexChanged": "onScrolledIndexChanged"; }, ["columns"], ["ax-header", "ax-footer"], false, never>;
37
- }
@@ -1,26 +0,0 @@
1
- import { Directive, Input, TemplateRef } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export class AXDataColumnComponent {
4
- constructor() {
5
- this.width = 'auto';
6
- }
7
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
8
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.6", type: AXDataColumnComponent, selector: "ax-data-column", inputs: { headerTemplate: "headerTemplate", cellTemplate: "cellTemplate", valueField: "valueField", caption: "caption", width: "width" }, ngImport: i0 }); }
9
- }
10
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataColumnComponent, decorators: [{
11
- type: Directive,
12
- args: [{
13
- selector: 'ax-data-column',
14
- }]
15
- }], propDecorators: { headerTemplate: [{
16
- type: Input
17
- }], cellTemplate: [{
18
- type: Input
19
- }], valueField: [{
20
- type: Input
21
- }], caption: [{
22
- type: Input
23
- }], width: [{
24
- type: Input
25
- }] } });
26
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YS1jb2x1bW4uZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL2RhdGEtdGFibGUvc3JjL2xpYi9kYXRhLWNvbHVtbi5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsV0FBVyxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUs5RCxNQUFNLE9BQU8scUJBQXFCO0lBSGxDO1FBaUJFLFVBQUssR0FBb0IsTUFBTSxDQUFDO0tBQ2pDOzhHQWZZLHFCQUFxQjtrR0FBckIscUJBQXFCOzsyRkFBckIscUJBQXFCO2tCQUhqQyxTQUFTO21CQUFDO29CQUNULFFBQVEsRUFBRSxnQkFBZ0I7aUJBQzNCOzhCQUdDLGNBQWM7c0JBRGIsS0FBSztnQkFJTixZQUFZO3NCQURYLEtBQUs7Z0JBSU4sVUFBVTtzQkFEVCxLQUFLO2dCQUlOLE9BQU87c0JBRE4sS0FBSztnQkFJTixLQUFLO3NCQURKLEtBQUsiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBEaXJlY3RpdmUsIElucHV0LCBUZW1wbGF0ZVJlZiB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5ARGlyZWN0aX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