@acorex/components 18.5.17 → 18.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/audio-wave/lib/audio-wave.component.d.ts +5 -0
- package/button-group/lib/button-group.component.d.ts +5 -2
- package/circular-progress/lib/circular-progress.component.d.ts +21 -57
- package/data-pager/lib/data-pager-pagesize-dropdown.component.d.ts +28 -0
- package/data-pager/lib/data-pager-prev-buttons.component.d.ts +20 -0
- package/data-pager/lib/data-pager.component.d.ts +111 -0
- package/data-table/lib/columns/data-text-column.component.d.ts +58 -0
- package/data-table/lib/columns/row-command-column.component.d.ts +83 -0
- package/data-table/lib/columns/row-index-column.component.d.ts +51 -0
- package/data-table/lib/columns/row-select-column.component.d.ts +47 -0
- package/data-table/lib/data-table/data-table.component.d.ts +200 -0
- package/data-table/lib/infinite-scroll-data-table/infinite-scroll-data-table.component.d.ts +185 -0
- package/datetime-box/lib/datetime-box.component.d.ts +59 -1
- package/datetime-input/lib/datetime-input.component.d.ts +133 -0
- package/datetime-picker/lib/datetime-picker.component.d.ts +95 -0
- package/decorators/lib/components/clear-button.component.d.ts +25 -0
- package/decorators/lib/components/close-button.component.d.ts +22 -0
- package/decorators/lib/components/generic-content.component.d.ts +4 -0
- package/decorators/lib/components/icon.component.d.ts +12 -0
- package/dialog/lib/dialog.component.d.ts +20 -0
- package/drawer/lib/drawer-container.component.d.ts +7 -0
- package/drawer/lib/drawer.component.d.ts +104 -0
- package/dropdown/lib/dropdown-box.component.d.ts +66 -0
- package/dropdown/lib/dropdown-panel.component.d.ts +85 -0
- package/dropdown-button/lib/dropdown-button.component.d.ts +38 -0
- package/esm2022/audio-wave/lib/audio-wave.component.mjs +6 -1
- package/esm2022/button-group/lib/button-group.component.mjs +6 -3
- package/esm2022/circular-progress/lib/circular-progress.component.mjs +45 -114
- package/esm2022/data-pager/lib/data-pager-pagesize-dropdown.component.mjs +23 -1
- package/esm2022/data-pager/lib/data-pager-prev-buttons.component.mjs +18 -1
- package/esm2022/data-pager/lib/data-pager.component.mjs +109 -1
- package/esm2022/data-table/lib/columns/data-text-column.component.mjs +32 -1
- package/esm2022/data-table/lib/columns/row-command-column.component.mjs +63 -1
- package/esm2022/data-table/lib/columns/row-index-column.component.mjs +40 -1
- package/esm2022/data-table/lib/columns/row-select-column.component.mjs +39 -1
- package/esm2022/data-table/lib/data-table/data-table.component.mjs +183 -1
- package/esm2022/data-table/lib/infinite-scroll-data-table/infinite-scroll-data-table.component.mjs +159 -1
- package/esm2022/datetime-box/lib/datetime-box.component.mjs +51 -2
- package/esm2022/datetime-input/lib/datetime-input.component.mjs +122 -1
- package/esm2022/datetime-picker/lib/datetime-picker.component.mjs +90 -1
- package/esm2022/decorators/lib/components/clear-button.component.mjs +26 -1
- package/esm2022/decorators/lib/components/close-button.component.mjs +23 -1
- package/esm2022/decorators/lib/components/generic-content.component.mjs +5 -1
- package/esm2022/decorators/lib/components/icon.component.mjs +13 -1
- package/esm2022/dialog/lib/dialog.component.mjs +18 -1
- package/esm2022/drawer/lib/drawer-container.component.mjs +8 -1
- package/esm2022/drawer/lib/drawer.component.mjs +102 -1
- package/esm2022/dropdown/lib/dropdown-box.component.mjs +58 -1
- package/esm2022/dropdown/lib/dropdown-panel.component.mjs +77 -1
- package/esm2022/dropdown-button/lib/dropdown-button.component.mjs +36 -1
- package/esm2022/form/lib/form-field.component.mjs +40 -1
- package/esm2022/form/lib/form.component.mjs +59 -1
- package/esm2022/form/lib/validation-summary.component.mjs +41 -1
- package/esm2022/image/lib/image.component.mjs +47 -1
- package/esm2022/label/lib/label.component.mjs +32 -1
- package/esm2022/list/lib/list.component.mjs +84 -1
- package/esm2022/loading/lib/loading-spinner.component.mjs +17 -1
- package/esm2022/loading/lib/loading.component.mjs +27 -1
- package/esm2022/popup/lib/popup.component.mjs +2 -2
- package/esm2022/progress-bar/lib/progress-bar.component.mjs +1 -1
- package/esm2022/uploader/index.mjs +5 -5
- package/esm2022/uploader/lib/{uploader-dialog-container.component.mjs → uploader-dialog-container/uploader-dialog-container.component.mjs} +2 -2
- package/esm2022/uploader/lib/uploader-drop-zone/uploader-drop-zone.component.mjs +27 -0
- package/esm2022/uploader/lib/uploader-list/uploader-list.component.mjs +26 -0
- package/esm2022/uploader/lib/uploader-zone.directive.mjs +23 -16
- package/esm2022/uploader/lib/uploader.models.mjs +6 -1
- package/esm2022/uploader/lib/uploader.module.mjs +18 -13
- package/esm2022/uploader/lib/uploader.service.mjs +14 -7
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.mjs +50 -10
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-toolbar/wysiwyg-toolbar.component.mjs +8 -16
- package/fesm2022/acorex-components-audio-wave.mjs +5 -0
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-button-group.mjs +5 -2
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +44 -113
- package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +147 -0
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +510 -0
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +50 -1
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +121 -0
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +89 -0
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +63 -0
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +17 -0
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +108 -0
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +35 -0
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +133 -0
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +137 -0
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +46 -0
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +31 -0
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +83 -0
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +42 -0
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +1 -1
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +63 -32
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +55 -25
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/form/lib/form-field.component.d.ts +45 -0
- package/form/lib/form.component.d.ts +58 -0
- package/form/lib/validation-summary.component.d.ts +49 -0
- package/image/lib/image.component.d.ts +61 -0
- package/label/lib/label.component.d.ts +34 -0
- package/list/lib/list.component.d.ts +98 -0
- package/loading/lib/loading-spinner.component.d.ts +20 -0
- package/loading/lib/loading.component.d.ts +35 -0
- package/package.json +66 -66
- package/progress-bar/lib/progress-bar.component.d.ts +0 -1
- package/uploader/index.d.ts +4 -4
- package/uploader/lib/{uploader-drop-zone.component.d.ts → uploader-drop-zone/uploader-drop-zone.component.d.ts} +3 -1
- package/uploader/lib/{uploader-list.component.d.ts → uploader-list/uploader-list.component.d.ts} +1 -1
- package/uploader/lib/uploader-zone.directive.d.ts +1 -0
- package/uploader/lib/uploader.models.d.ts +5 -0
- package/uploader/lib/uploader.module.d.ts +4 -4
- package/uploader/lib/uploader.service.d.ts +2 -1
- package/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.d.ts +16 -3
- package/wysiwyg/lib/wysiwyg/wysiwyg-toolbar/wysiwyg-toolbar.component.d.ts +3 -4
- package/esm2022/uploader/lib/uploader-drop-zone.component.mjs +0 -18
- package/esm2022/uploader/lib/uploader-list.component.mjs +0 -26
- /package/uploader/lib/{uploader-dialog-container.component.d.ts → uploader-dialog-container/uploader-dialog-container.component.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MXColorComponent } from '@acorex/components/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { viewChild, input, model, afterNextRender, effect, Component, ChangeDetectionStrategy, ViewEncapsulation, HostBinding, NgModule } from '@angular/core';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The Button is a component which detects user interaction and triggers a corresponding event
|
|
@@ -8,108 +8,48 @@ import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Vi
|
|
|
8
8
|
* @category Components
|
|
9
9
|
*/
|
|
10
10
|
class AXCircularProgressComponent extends MXColorComponent {
|
|
11
|
+
/**
|
|
12
|
+
* @ignore
|
|
13
|
+
*/
|
|
11
14
|
constructor() {
|
|
12
|
-
super(
|
|
13
|
-
/**
|
|
14
|
-
* @ignore
|
|
15
|
-
*/
|
|
16
|
-
this.strokeDashoffset = 0;
|
|
15
|
+
super();
|
|
17
16
|
/**
|
|
18
17
|
* @ignore
|
|
19
18
|
*/
|
|
20
|
-
this.
|
|
19
|
+
this.circle = viewChild('circle');
|
|
21
20
|
/**
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
this.normalizedRadius = 0;
|
|
25
|
-
/**
|
|
26
|
-
* Emits when the value of the circular progress changes.
|
|
21
|
+
* Defines the current progress of the circular progress component.
|
|
27
22
|
*
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
this.ValueChange = new EventEmitter();
|
|
31
|
-
/**
|
|
32
|
-
* @ignore
|
|
33
|
-
*/
|
|
34
|
-
this._progress = 0;
|
|
35
|
-
/**
|
|
36
|
-
* Emitted when the stroke width of the circular progress component changes.
|
|
23
|
+
* Change progress mode
|
|
37
24
|
*
|
|
38
|
-
* @event
|
|
39
25
|
*/
|
|
40
|
-
this.
|
|
26
|
+
this.mode = input('determinate');
|
|
41
27
|
/**
|
|
42
|
-
*
|
|
28
|
+
* Defines the current progress of the circular progress component.
|
|
29
|
+
*
|
|
30
|
+
* The percentage value to set for the progress.
|
|
31
|
+
*
|
|
43
32
|
*/
|
|
44
|
-
this.
|
|
33
|
+
this.progress = model();
|
|
45
34
|
/**
|
|
46
|
-
*
|
|
35
|
+
* Defines the stroke width of the circular progress component.
|
|
47
36
|
*
|
|
48
|
-
*
|
|
37
|
+
* The stroke width to be set for the circular progress component.
|
|
49
38
|
*/
|
|
50
|
-
this.
|
|
39
|
+
this.stroke = model();
|
|
51
40
|
/**
|
|
52
|
-
*
|
|
41
|
+
* Defines the stroke width of the circular progress component.
|
|
42
|
+
*
|
|
43
|
+
* Circle size
|
|
53
44
|
*/
|
|
54
|
-
this.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
*/
|
|
59
|
-
ngAfterViewInit() {
|
|
60
|
-
this.setCircularSize();
|
|
61
|
-
this.updateProgress();
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Defines the current progress of the circular progress component.
|
|
65
|
-
*
|
|
66
|
-
* @param v - The percentage value to set for the progress.
|
|
67
|
-
*
|
|
68
|
-
*/
|
|
69
|
-
get progress() {
|
|
70
|
-
return this._progress;
|
|
71
|
-
}
|
|
72
|
-
set progress(v) {
|
|
73
|
-
this.setOption({
|
|
74
|
-
name: 'progress',
|
|
75
|
-
value: v,
|
|
76
|
-
afterCallback: () => {
|
|
77
|
-
this.updateProgress();
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Defines the stroke width of the circular progress component.
|
|
83
|
-
*
|
|
84
|
-
* @param v - The stroke width to be set for the circular progress component.
|
|
85
|
-
*/
|
|
86
|
-
get stroke() {
|
|
87
|
-
return this._stroke;
|
|
88
|
-
}
|
|
89
|
-
set stroke(v) {
|
|
90
|
-
this.setOption({
|
|
91
|
-
name: 'stroke',
|
|
92
|
-
value: v,
|
|
93
|
-
afterCallback: () => {
|
|
94
|
-
this.setCircularSize();
|
|
95
|
-
},
|
|
45
|
+
this.size = model();
|
|
46
|
+
afterNextRender(() => {
|
|
47
|
+
this.setCircularSize();
|
|
48
|
+
this.updateProgress();
|
|
96
49
|
});
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*
|
|
101
|
-
* @param v - The new size value for the circular progress component.
|
|
102
|
-
*/
|
|
103
|
-
get size() {
|
|
104
|
-
return this._size;
|
|
105
|
-
}
|
|
106
|
-
set size(v) {
|
|
107
|
-
this.setOption({
|
|
108
|
-
name: 'size',
|
|
109
|
-
value: v,
|
|
110
|
-
afterCallback: () => {
|
|
111
|
-
this.setCircularSize();
|
|
112
|
-
},
|
|
50
|
+
effect(() => {
|
|
51
|
+
this.setCircularSize();
|
|
52
|
+
this.updateProgress();
|
|
113
53
|
});
|
|
114
54
|
}
|
|
115
55
|
/**
|
|
@@ -119,46 +59,37 @@ class AXCircularProgressComponent extends MXColorComponent {
|
|
|
119
59
|
return `ax-${this['color']}-circular`;
|
|
120
60
|
}
|
|
121
61
|
/**
|
|
122
|
-
* Updates the circular progress size based on `size` and `stroke`.
|
|
123
62
|
* @ignore
|
|
124
63
|
*/
|
|
125
64
|
setCircularSize() {
|
|
126
|
-
if (this.circle) {
|
|
127
|
-
this.circle.nativeElement.style.setProperty('--ax-stroke-size', `${this.size - this.stroke}px`);
|
|
128
|
-
this.circle.nativeElement.style.setProperty('--ax-circle-size', `${this.size}px`);
|
|
65
|
+
if (this.circle()) {
|
|
66
|
+
this.circle().nativeElement.style.setProperty('--ax-stroke-size', `${this.size() - this.stroke()}px`);
|
|
67
|
+
this.circle().nativeElement.style.setProperty('--ax-circle-size', `${this.size()}px`);
|
|
129
68
|
}
|
|
130
69
|
}
|
|
131
70
|
/**
|
|
132
|
-
* Updates the circular progress display based on the current `progress` value.
|
|
133
71
|
* @ignore
|
|
134
72
|
*/
|
|
135
73
|
updateProgress() {
|
|
136
|
-
if (this.circle) {
|
|
137
|
-
this.circle.nativeElement.style.background = `conic-gradient(var(--ax-progress-color) ${this.progress * 3.6}deg, var(--ax-progress-line-color) 0deg)`;
|
|
74
|
+
if (this.circle()) {
|
|
75
|
+
this.circle().nativeElement.style.background = `conic-gradient(var(--ax-progress-color) ${this.progress() * 3.6}deg, var(--ax-progress-line-color) 0deg)`;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @ignore
|
|
80
|
+
*/
|
|
81
|
+
setIndeterminateMode() {
|
|
82
|
+
if (this.mode() === 'indeterminate' && !this.progress()) {
|
|
83
|
+
this.progress.set(65);
|
|
138
84
|
}
|
|
139
85
|
}
|
|
140
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXCircularProgressComponent, deps:
|
|
141
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
86
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXCircularProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
87
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.0.2", type: AXCircularProgressComponent, selector: "ax-circular-progress", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: false, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, progress: { classPropertyName: "progress", publicName: "progress", isSignal: true, isRequired: false, transformFunction: null }, stroke: { classPropertyName: "stroke", publicName: "stroke", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { progress: "progressChange", stroke: "strokeChange", size: "sizeChange" }, host: { properties: { "class": "this.__hostClass" } }, viewQueries: [{ propertyName: "circle", first: true, predicate: ["circle"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-progress-circular ax-progress-{{mode()}}\" #circle>\n <span class=\"ax-progress-content\">\n <ng-content></ng-content>\n </span>\n</div>\n\n<ng-content select=\"ax-suffix\"></ng-content>", styles: [".ax-dark ax-circular-progress.ax-primary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-primary-500), 70%);--ax-progress-line-color: rgba(var(--ax-color-white), .25)}.ax-dark ax-circular-progress.ax-secondary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-secondary-500), 70%);--ax-progress-line-color: rgba(var(--ax-color-white), .25)}.ax-dark ax-circular-progress.ax-success-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-success-500), 70%);--ax-progress-line-color: rgba(var(--ax-color-white), .25)}.ax-dark ax-circular-progress.ax-warning-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-warning-500), 70%);--ax-progress-line-color: rgba(var(--ax-color-white), .25)}.ax-dark ax-circular-progress.ax-danger-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-danger-500), 70%);--ax-progress-line-color: rgba(var(--ax-color-white), .25)}.ax-dark ax-circular-progress.ax-info-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-info-500), 70%);--ax-progress-line-color: rgba(var(--ax-color-white), .25)}.ax-dark ax-circular-progress .ax-progress-circular{--ax-progress-line-color: rgba(var(--ax-color-white), .25)}ax-circular-progress .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-primary-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25);--ax-circle-size: 48px;--ax-stroke-size: 44px;height:var(--ax-circle-size);width:var(--ax-circle-size);border-radius:9999px;background:conic-gradient(var(--ax-progress-color) 0deg,var(--ax-progress-line-color) 0deg);position:relative;display:flex;align-items:center;justify-content:center}ax-circular-progress .ax-progress-circular:before{content:\"\";height:var(--ax-stroke-size);width:var(--ax-stroke-size);position:absolute;border-radius:9999px;background-color:rgba(var(--ax-color-surface))}ax-circular-progress .ax-progress-circular .ax-progress-content{position:relative;display:flex;align-items:center;justify-content:center}ax-circular-progress .ax-progress-circular.ax-progress-indeterminate{animation-name:rotate;animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes rotate{0%{transform:rotate(-360deg)}to{transform:rotate(360deg)}}ax-circular-progress.ax-ghost-circular .ax-circular-progress-svg{--ax-progress-color: rgba(var(--ax-color-ghost-fore));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-primary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-primary-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25)}ax-circular-progress.ax-secondary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-secondary-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25)}ax-circular-progress.ax-success-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-success-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25)}ax-circular-progress.ax-warning-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-warning-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25)}ax-circular-progress.ax-danger-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-danger-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25)}ax-circular-progress.ax-info-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-info-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
142
88
|
}
|
|
143
89
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXCircularProgressComponent, decorators: [{
|
|
144
90
|
type: Component,
|
|
145
|
-
args: [{ selector: 'ax-circular-progress', inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-progress-circular\" #circle>\n <span class=\"ax-progress-content\">\n <ng-content></ng-content>\n </span>\n</div>\n<ng-content select=\"ax-suffix\"></ng-content
|
|
146
|
-
}], propDecorators: {
|
|
147
|
-
type: ViewChild,
|
|
148
|
-
args: ['circle']
|
|
149
|
-
}], ValueChange: [{
|
|
150
|
-
type: Output
|
|
151
|
-
}], progress: [{
|
|
152
|
-
type: Input
|
|
153
|
-
}], strokeChange: [{
|
|
154
|
-
type: Output
|
|
155
|
-
}], stroke: [{
|
|
156
|
-
type: Input
|
|
157
|
-
}], sizeChange: [{
|
|
158
|
-
type: Output
|
|
159
|
-
}], size: [{
|
|
160
|
-
type: Input
|
|
161
|
-
}], __hostClass: [{
|
|
91
|
+
args: [{ selector: 'ax-circular-progress', inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-progress-circular ax-progress-{{mode()}}\" #circle>\n <span class=\"ax-progress-content\">\n <ng-content></ng-content>\n </span>\n</div>\n\n<ng-content select=\"ax-suffix\"></ng-content>", styles: [".ax-dark ax-circular-progress.ax-primary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-primary-500), 70%);--ax-progress-line-color: rgba(var(--ax-color-white), .25)}.ax-dark ax-circular-progress.ax-secondary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-secondary-500), 70%);--ax-progress-line-color: rgba(var(--ax-color-white), .25)}.ax-dark ax-circular-progress.ax-success-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-success-500), 70%);--ax-progress-line-color: rgba(var(--ax-color-white), .25)}.ax-dark ax-circular-progress.ax-warning-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-warning-500), 70%);--ax-progress-line-color: rgba(var(--ax-color-white), .25)}.ax-dark ax-circular-progress.ax-danger-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-danger-500), 70%);--ax-progress-line-color: rgba(var(--ax-color-white), .25)}.ax-dark ax-circular-progress.ax-info-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-info-500), 70%);--ax-progress-line-color: rgba(var(--ax-color-white), .25)}.ax-dark ax-circular-progress .ax-progress-circular{--ax-progress-line-color: rgba(var(--ax-color-white), .25)}ax-circular-progress .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-primary-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25);--ax-circle-size: 48px;--ax-stroke-size: 44px;height:var(--ax-circle-size);width:var(--ax-circle-size);border-radius:9999px;background:conic-gradient(var(--ax-progress-color) 0deg,var(--ax-progress-line-color) 0deg);position:relative;display:flex;align-items:center;justify-content:center}ax-circular-progress .ax-progress-circular:before{content:\"\";height:var(--ax-stroke-size);width:var(--ax-stroke-size);position:absolute;border-radius:9999px;background-color:rgba(var(--ax-color-surface))}ax-circular-progress .ax-progress-circular .ax-progress-content{position:relative;display:flex;align-items:center;justify-content:center}ax-circular-progress .ax-progress-circular.ax-progress-indeterminate{animation-name:rotate;animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes rotate{0%{transform:rotate(-360deg)}to{transform:rotate(360deg)}}ax-circular-progress.ax-ghost-circular .ax-circular-progress-svg{--ax-progress-color: rgba(var(--ax-color-ghost-fore));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-primary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-primary-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25)}ax-circular-progress.ax-secondary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-secondary-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25)}ax-circular-progress.ax-success-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-success-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25)}ax-circular-progress.ax-warning-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-warning-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25)}ax-circular-progress.ax-danger-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-danger-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25)}ax-circular-progress.ax-info-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-info-500));--ax-progress-line-color: rgba(var(--ax-color-black), .25)}\n"] }]
|
|
92
|
+
}], ctorParameters: () => [], propDecorators: { __hostClass: [{
|
|
162
93
|
type: HostBinding,
|
|
163
94
|
args: ['class']
|
|
164
95
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-circular-progress.mjs","sources":["../../../../libs/components/circular-progress/src/lib/circular-progress.component.ts","../../../../libs/components/circular-progress/src/lib/circular-progress.component.html","../../../../libs/components/circular-progress/src/lib/circular-progress.module.ts","../../../../libs/components/circular-progress/src/acorex-components-circular-progress.ts"],"sourcesContent":["import { MXColorComponent } from '@acorex/components/common';\nimport {\n
|
|
1
|
+
{"version":3,"file":"acorex-components-circular-progress.mjs","sources":["../../../../libs/components/circular-progress/src/lib/circular-progress.component.ts","../../../../libs/components/circular-progress/src/lib/circular-progress.component.html","../../../../libs/components/circular-progress/src/lib/circular-progress.module.ts","../../../../libs/components/circular-progress/src/acorex-components-circular-progress.ts"],"sourcesContent":["import { MXColorComponent } from '@acorex/components/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n HostBinding,\n input,\n model,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\n\nexport type AXCircularProgressMode = 'determinate' | 'indeterminate';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-circular-progress',\n templateUrl: './circular-progress.component.html',\n styleUrls: ['./circular-progress.component.scss'],\n inputs: ['color'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXCircularProgressComponent extends MXColorComponent {\n /**\n * @ignore\n */\n circle = viewChild<ElementRef<HTMLDivElement>>('circle');\n\n /**\n * Defines the current progress of the circular progress component.\n *\n * Change progress mode\n *\n */\n\n mode = input<AXCircularProgressMode>('determinate');\n\n /**\n * Defines the current progress of the circular progress component.\n *\n * The percentage value to set for the progress.\n *\n */\n progress = model<number>();\n\n /**\n * Defines the stroke width of the circular progress component.\n *\n * The stroke width to be set for the circular progress component.\n */\n stroke = model<number>();\n\n /**\n * Defines the stroke width of the circular progress component.\n *\n * Circle size\n */\n size = model<number>();\n\n /**\n * @ignore\n */\n\n constructor() {\n super();\n afterNextRender(() => {\n this.setCircularSize();\n this.updateProgress();\n });\n effect(() => {\n this.setCircularSize();\n this.updateProgress();\n });\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this['color']}-circular`;\n }\n\n /**\n * @ignore\n */\n setCircularSize() {\n if (this.circle()) {\n this.circle().nativeElement.style.setProperty('--ax-stroke-size', `${this.size() - this.stroke()}px`);\n this.circle().nativeElement.style.setProperty('--ax-circle-size', `${this.size()}px`);\n }\n }\n\n /**\n * @ignore\n */\n updateProgress() {\n if (this.circle()) {\n this.circle().nativeElement.style.background = `conic-gradient(var(--ax-progress-color) ${\n this.progress() * 3.6\n }deg, var(--ax-progress-line-color) 0deg)`;\n }\n }\n /**\n * @ignore\n */\n setIndeterminateMode() {\n if (this.mode() === 'indeterminate' && !this.progress()) {\n this.progress.set(65);\n }\n }\n}\n","<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-progress-circular ax-progress-{{mode()}}\" #circle>\n <span class=\"ax-progress-content\">\n <ng-content></ng-content>\n </span>\n</div>\n\n<ng-content select=\"ax-suffix\"></ng-content>","import { NgModule } from '@angular/core';\nimport { AXCircularProgressComponent } from './circular-progress.component';\n\n@NgModule({\n declarations: [AXCircularProgressComponent],\n imports: [],\n exports: [AXCircularProgressComponent],\n})\nexport class AXCircularProgressModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
|
@@ -417,19 +417,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
|
417
417
|
}]
|
|
418
418
|
}] });
|
|
419
419
|
|
|
420
|
+
/**
|
|
421
|
+
* Displays a button to select page sizes for data pagination.
|
|
422
|
+
*
|
|
423
|
+
* @category Components
|
|
424
|
+
*/
|
|
420
425
|
class AXDataPagerPageSizesComponent extends AXDataPagerChild {
|
|
421
426
|
constructor() {
|
|
422
427
|
super(...arguments);
|
|
428
|
+
/**
|
|
429
|
+
* @ignore
|
|
430
|
+
*/
|
|
423
431
|
//TODO: AXButtonItems type error
|
|
424
432
|
this._items = [];
|
|
425
433
|
}
|
|
434
|
+
/**
|
|
435
|
+
* Gets the list of page sizes available for selection.
|
|
436
|
+
*/
|
|
426
437
|
get sizes() {
|
|
427
438
|
return this._sizes || [5, 10, 20, 50, 100];
|
|
428
439
|
}
|
|
440
|
+
/**
|
|
441
|
+
* Sets the list of page sizes available for selection.
|
|
442
|
+
*
|
|
443
|
+
* @param value - An array of numbers representing the page sizes to be set.
|
|
444
|
+
*/
|
|
429
445
|
set sizes(v) {
|
|
430
446
|
this._sizes = v;
|
|
431
447
|
this.applyParent();
|
|
432
448
|
}
|
|
449
|
+
/**
|
|
450
|
+
* @ignore
|
|
451
|
+
*/
|
|
433
452
|
applyParent() {
|
|
434
453
|
this._size = this._parent.displayInfo.take;
|
|
435
454
|
this._items = this.sizes.map((s) => ({
|
|
@@ -441,6 +460,9 @@ class AXDataPagerPageSizesComponent extends AXDataPagerChild {
|
|
|
441
460
|
}));
|
|
442
461
|
this.cdr.detectChanges();
|
|
443
462
|
}
|
|
463
|
+
/**
|
|
464
|
+
* @ignore
|
|
465
|
+
*/
|
|
444
466
|
_emitOnItemClick(e) {
|
|
445
467
|
if (this._parent.readonly || this._parent.disabled)
|
|
446
468
|
return;
|
|
@@ -491,19 +513,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
|
491
513
|
type: Input
|
|
492
514
|
}] } });
|
|
493
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Component that provides navigation buttons for going to the previous page and the first page in a data pager.
|
|
518
|
+
*
|
|
519
|
+
* @category Components
|
|
520
|
+
*/
|
|
494
521
|
class AXDataPagerPrevButtonsComponent extends AXDataPagerChild {
|
|
522
|
+
/**
|
|
523
|
+
* @ignore
|
|
524
|
+
*/
|
|
495
525
|
ngOnInit() {
|
|
496
526
|
super.ngOnInit;
|
|
497
527
|
this.rtl = AXHtmlUtil.isRtl(this.getHostElement());
|
|
498
528
|
}
|
|
529
|
+
/**
|
|
530
|
+
* @ignore
|
|
531
|
+
*/
|
|
499
532
|
applyParent() {
|
|
500
533
|
this.disabled = this._parent.displayInfo.page == 1 || this._parent.disabled;
|
|
501
534
|
}
|
|
535
|
+
/**
|
|
536
|
+
* @ignore
|
|
537
|
+
*/
|
|
502
538
|
_emitOnFirstPageClick(e) {
|
|
503
539
|
if (this._parent.readonly || this._parent.disabled)
|
|
504
540
|
return;
|
|
505
541
|
this._parent.goFirstPage();
|
|
506
542
|
}
|
|
543
|
+
/**
|
|
544
|
+
* @ignore
|
|
545
|
+
*/
|
|
507
546
|
_emitOnPrevPageClick(e) {
|
|
508
547
|
if (this._parent.readonly || this._parent.disabled)
|
|
509
548
|
return;
|
|
@@ -549,16 +588,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
|
549
588
|
}]
|
|
550
589
|
}] });
|
|
551
590
|
|
|
591
|
+
/**
|
|
592
|
+
* Component for managing and displaying data pagination controls.
|
|
593
|
+
*
|
|
594
|
+
* @category Components
|
|
595
|
+
*/
|
|
552
596
|
class AXDataPagerComponent extends MXValueComponent {
|
|
597
|
+
/**
|
|
598
|
+
* Indicates whether the component is currently loading.
|
|
599
|
+
*
|
|
600
|
+
*/
|
|
553
601
|
get isLoading() {
|
|
554
602
|
return this._isLoading();
|
|
555
603
|
}
|
|
604
|
+
/**
|
|
605
|
+
* Sets the loading state of the component.
|
|
606
|
+
*
|
|
607
|
+
* @param v - The loading state to be set.
|
|
608
|
+
*/
|
|
556
609
|
set isLoading(v) {
|
|
557
610
|
this._isLoading.set(v);
|
|
558
611
|
}
|
|
612
|
+
/**
|
|
613
|
+
* Gets the number of items per page in the data pager.
|
|
614
|
+
*/
|
|
559
615
|
get size() {
|
|
560
616
|
return this._size || 10;
|
|
561
617
|
}
|
|
618
|
+
/**
|
|
619
|
+
* Sets the number of items per page and updates the data pager accordingly.
|
|
620
|
+
*
|
|
621
|
+
* @param {number} v - The new number of items per page.
|
|
622
|
+
*/
|
|
562
623
|
set size(v) {
|
|
563
624
|
if (v != this._size) {
|
|
564
625
|
const prevSize = this._size;
|
|
@@ -571,9 +632,18 @@ class AXDataPagerComponent extends MXValueComponent {
|
|
|
571
632
|
this._emitChangedEvent(prevSize != null ? true : false);
|
|
572
633
|
}
|
|
573
634
|
}
|
|
635
|
+
/**
|
|
636
|
+
* Gets the total number of items.
|
|
637
|
+
*/
|
|
574
638
|
get total() {
|
|
575
639
|
return this._total;
|
|
576
640
|
}
|
|
641
|
+
/**
|
|
642
|
+
* Sets the total number of items and triggers an update event if the value changes.
|
|
643
|
+
*
|
|
644
|
+
* @param v - The total number of items to set.
|
|
645
|
+
* If the value is non-positive, it defaults to 0.
|
|
646
|
+
*/
|
|
577
647
|
set total(v) {
|
|
578
648
|
const t = v && v > 0 ? v : 0;
|
|
579
649
|
if (t != this._total) {
|
|
@@ -581,15 +651,31 @@ class AXDataPagerComponent extends MXValueComponent {
|
|
|
581
651
|
this._emitChangedEvent();
|
|
582
652
|
}
|
|
583
653
|
}
|
|
654
|
+
/**
|
|
655
|
+
* Gets the total number of pages.
|
|
656
|
+
*/
|
|
584
657
|
get totalPages() {
|
|
585
658
|
return this._totalPages;
|
|
586
659
|
}
|
|
660
|
+
/**
|
|
661
|
+
* Sets the total number of pages.
|
|
662
|
+
*
|
|
663
|
+
* @param value - The total number of pages to set.
|
|
664
|
+
*/
|
|
587
665
|
set totalPages(value) {
|
|
588
666
|
this._totalPages = value;
|
|
589
667
|
}
|
|
668
|
+
/**
|
|
669
|
+
* Gets the current display mode of the data pager.
|
|
670
|
+
*/
|
|
590
671
|
get displayMode() {
|
|
591
672
|
return this._displayMode;
|
|
592
673
|
}
|
|
674
|
+
/**
|
|
675
|
+
* Sets the display mode of the data pager and emits a change event.
|
|
676
|
+
*
|
|
677
|
+
* @param v - The new display mode to set, of type `AXDataPagerMode`.
|
|
678
|
+
*/
|
|
593
679
|
set displayMode(v) {
|
|
594
680
|
this.setOption({
|
|
595
681
|
name: 'displayMode',
|
|
@@ -599,15 +685,43 @@ class AXDataPagerComponent extends MXValueComponent {
|
|
|
599
685
|
},
|
|
600
686
|
});
|
|
601
687
|
}
|
|
688
|
+
/**
|
|
689
|
+
* @ignore
|
|
690
|
+
*/
|
|
602
691
|
constructor(_parent) {
|
|
603
692
|
super();
|
|
604
693
|
this._parent = _parent;
|
|
694
|
+
/**
|
|
695
|
+
* @ignore
|
|
696
|
+
*/
|
|
605
697
|
this._isLoading = signal(false);
|
|
698
|
+
/**
|
|
699
|
+
* @ignore
|
|
700
|
+
*/
|
|
606
701
|
this._size = null;
|
|
702
|
+
/**
|
|
703
|
+
* @ignore
|
|
704
|
+
*/
|
|
607
705
|
this._total = 0;
|
|
706
|
+
/**
|
|
707
|
+
* @ignore
|
|
708
|
+
*/
|
|
608
709
|
this._totalPages = 0;
|
|
710
|
+
/**
|
|
711
|
+
* Emitted when the display mode changes.
|
|
712
|
+
* @event
|
|
713
|
+
* An event containing the new display mode.
|
|
714
|
+
*/
|
|
609
715
|
this.displayModeChange = new EventEmitter();
|
|
716
|
+
/**
|
|
717
|
+
* @ignore
|
|
718
|
+
*/
|
|
610
719
|
this._displayMode = 'full';
|
|
720
|
+
/**
|
|
721
|
+
* Emitted when the data pager's state changes.
|
|
722
|
+
* @event
|
|
723
|
+
* An event containing details about the change.
|
|
724
|
+
*/
|
|
611
725
|
this.onChanged = new EventEmitter();
|
|
612
726
|
//
|
|
613
727
|
if (this._parent) {
|
|
@@ -620,12 +734,21 @@ class AXDataPagerComponent extends MXValueComponent {
|
|
|
620
734
|
this.total = this._parent.totalCount;
|
|
621
735
|
}
|
|
622
736
|
}
|
|
737
|
+
/**
|
|
738
|
+
* @ignore
|
|
739
|
+
*/
|
|
623
740
|
ngAfterViewInit() {
|
|
624
741
|
this._emitChangedEvent();
|
|
625
742
|
}
|
|
743
|
+
/**
|
|
744
|
+
* @ignore
|
|
745
|
+
*/
|
|
626
746
|
internalValueChanged(value) {
|
|
627
747
|
this._emitChangedEvent(true);
|
|
628
748
|
}
|
|
749
|
+
/**
|
|
750
|
+
* @ignore
|
|
751
|
+
*/
|
|
629
752
|
internalGetValue(value) {
|
|
630
753
|
if (!isNumber(value) || !value || this.totalPages == 0)
|
|
631
754
|
return 1;
|
|
@@ -646,6 +769,9 @@ class AXDataPagerComponent extends MXValueComponent {
|
|
|
646
769
|
};
|
|
647
770
|
return result;
|
|
648
771
|
}
|
|
772
|
+
/**
|
|
773
|
+
* @ignore
|
|
774
|
+
*/
|
|
649
775
|
_emitChangedEvent(u = false) {
|
|
650
776
|
this.totalPages = Math.ceil(this._total / this.size);
|
|
651
777
|
//
|
|
@@ -663,18 +789,39 @@ class AXDataPagerComponent extends MXValueComponent {
|
|
|
663
789
|
this.cdr.markForCheck();
|
|
664
790
|
}
|
|
665
791
|
}
|
|
792
|
+
/**
|
|
793
|
+
* Navigates to the next page, or to the last page if on the final page.
|
|
794
|
+
* @ignore
|
|
795
|
+
*/
|
|
666
796
|
goNextPage() {
|
|
667
797
|
this.goToPage(Math.min(this.value + 1, this.totalPages));
|
|
668
798
|
}
|
|
799
|
+
/**
|
|
800
|
+
* Navigates to the last page.
|
|
801
|
+
* @ignore
|
|
802
|
+
*/
|
|
669
803
|
goLastPage() {
|
|
670
804
|
this.goToPage(this.totalPages);
|
|
671
805
|
}
|
|
806
|
+
/**
|
|
807
|
+
* Navigates to the first page.
|
|
808
|
+
* @ignore
|
|
809
|
+
*/
|
|
672
810
|
goFirstPage() {
|
|
673
811
|
this.goToPage(1);
|
|
674
812
|
}
|
|
813
|
+
/**
|
|
814
|
+
* Navigates to the previous page, or to the first page if on the initial page.
|
|
815
|
+
* @ignore
|
|
816
|
+
*/
|
|
675
817
|
goPrevPage() {
|
|
676
818
|
this.goToPage(Math.max(this.value - 1, 1));
|
|
677
819
|
}
|
|
820
|
+
/**
|
|
821
|
+
* Navigates to a specified page.
|
|
822
|
+
* @param page - The page number to navigate to.
|
|
823
|
+
* @ignore
|
|
824
|
+
*/
|
|
678
825
|
goToPage(page) {
|
|
679
826
|
if (page != this.value) {
|
|
680
827
|
this.commitValue(page, true);
|