@acorex/components 5.0.21 → 5.0.22
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/esm2020/lib/alert/alert.component.mjs +2 -2
- package/esm2020/lib/base/mixin/button-mixin.class.mjs +2 -2
- package/esm2020/lib/button/button-item.component.mjs +2 -2
- package/esm2020/lib/calendar/calendar.component.mjs +3 -1
- package/esm2020/lib/datepicker/datepicker.component.mjs +48 -24
- package/esm2020/lib/decorators/prefix.component.mjs +3 -3
- package/esm2020/lib/decorators/suffix.component.mjs +3 -3
- package/esm2020/lib/dialog/dialog.component.mjs +3 -3
- package/fesm2015/acorex-components.mjs +58 -32
- package/fesm2015/acorex-components.mjs.map +1 -1
- package/fesm2020/acorex-components.mjs +58 -32
- package/fesm2020/acorex-components.mjs.map +1 -1
- package/lib/decorators/prefix.component.d.ts +1 -1
- package/lib/decorators/suffix.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -222,7 +222,7 @@ function _ButtonComponentMixin(Base) {
|
|
|
222
222
|
'ax-state-disabled': this["disabled"],
|
|
223
223
|
'ax-state-selected': this.selected
|
|
224
224
|
};
|
|
225
|
-
cssClasses[`ax-${this.color || 'primary'}${this.look ? '-' + this.look : ''}`] = true;
|
|
225
|
+
cssClasses[`ax-${this.color || 'primary'}${this.look ? '-' + this.look : '-default'}`] = true;
|
|
226
226
|
return cssClasses;
|
|
227
227
|
}
|
|
228
228
|
};
|
|
@@ -1077,7 +1077,7 @@ class AXAlertComponent extends AXBaseComponentMixin {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
}
|
|
1079
1079
|
get hostClass() {
|
|
1080
|
-
return `ax-${this.color}`;
|
|
1080
|
+
return `ax-${this.color}-default`;
|
|
1081
1081
|
}
|
|
1082
1082
|
/**
|
|
1083
1083
|
* set the visibility of the Alert
|
|
@@ -1632,7 +1632,7 @@ class AXButtonItemComponent extends AXBaseItemButtonMixin {
|
|
|
1632
1632
|
'ax-state-disabled': this.disabled,
|
|
1633
1633
|
'ax-state-selected': this.selected,
|
|
1634
1634
|
};
|
|
1635
|
-
cssClasses[`ax-${this.color || 'primary'}`] = true;
|
|
1635
|
+
cssClasses[`ax-${this.color || 'primary'}-default`] = true;
|
|
1636
1636
|
return Object.entries(cssClasses).filter(c => c[1]).map(c => c[0]).join(' ');
|
|
1637
1637
|
}
|
|
1638
1638
|
}
|
|
@@ -1692,7 +1692,7 @@ class AXDecoratorPrefixComponent extends AXBaseComponentMixin {
|
|
|
1692
1692
|
}
|
|
1693
1693
|
AXDecoratorPrefixComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AXDecoratorPrefixComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1694
1694
|
AXDecoratorPrefixComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AXDecoratorPrefixComponent, selector: "ax-prefix", usesInheritance: true, ngImport: i0, template: `
|
|
1695
|
-
<ng-content select="ax-button,ax-loading,ax-icon,ax-
|
|
1695
|
+
<ng-content select="ax-button,ax-loading,ax-icon,ax-content">
|
|
1696
1696
|
</ng-content>
|
|
1697
1697
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1698
1698
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AXDecoratorPrefixComponent, decorators: [{
|
|
@@ -1700,7 +1700,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1700
1700
|
args: [{
|
|
1701
1701
|
selector: 'ax-prefix',
|
|
1702
1702
|
template: `
|
|
1703
|
-
<ng-content select="ax-button,ax-loading,ax-icon,ax-
|
|
1703
|
+
<ng-content select="ax-button,ax-loading,ax-icon,ax-content">
|
|
1704
1704
|
</ng-content>
|
|
1705
1705
|
`,
|
|
1706
1706
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1715,7 +1715,7 @@ class AXDecoratorSuffixComponent extends AXBaseComponentMixin {
|
|
|
1715
1715
|
}
|
|
1716
1716
|
AXDecoratorSuffixComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AXDecoratorSuffixComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1717
1717
|
AXDecoratorSuffixComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AXDecoratorSuffixComponent, selector: "ax-suffix", usesInheritance: true, ngImport: i0, template: `
|
|
1718
|
-
<ng-content select="ax-button,ax-icon,ax-badge">
|
|
1718
|
+
<ng-content select="ax-button,ax-icon,ax-badge,ax-content">
|
|
1719
1719
|
</ng-content>
|
|
1720
1720
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1721
1721
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AXDecoratorSuffixComponent, decorators: [{
|
|
@@ -1723,7 +1723,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1723
1723
|
args: [{
|
|
1724
1724
|
selector: 'ax-suffix',
|
|
1725
1725
|
template: `
|
|
1726
|
-
<ng-content select="ax-button,ax-icon,ax-badge">
|
|
1726
|
+
<ng-content select="ax-button,ax-icon,ax-badge,ax-content">
|
|
1727
1727
|
</ng-content>
|
|
1728
1728
|
`,
|
|
1729
1729
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -2038,6 +2038,8 @@ class AXCalendarComponent extends AXCalendarComponentMixin {
|
|
|
2038
2038
|
// 'ax-state-event': d.dayOfMonth == 12,
|
|
2039
2039
|
};
|
|
2040
2040
|
}
|
|
2041
|
+
// just for tailwind
|
|
2042
|
+
//'ax-col-start-1','ax-col-start-2','ax-col-start-3','ax-col-start-4','ax-col-start-5','ax-col-start-6','ax-col-start-7'
|
|
2041
2043
|
r.cssClass[`ax-col-start-${vr.startTime.dayOfWeek}`] = i == 0;
|
|
2042
2044
|
return r;
|
|
2043
2045
|
});
|
|
@@ -3152,42 +3154,66 @@ class AXDatePickerComponent extends AXBaseDatePickerMixin {
|
|
|
3152
3154
|
const sStart = input.selectionStart;
|
|
3153
3155
|
const sEnd = input.selectionEnd;
|
|
3154
3156
|
const dateVal = new AXDateTime(this.value);
|
|
3155
|
-
//
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
ignore();
|
|
3164
|
-
this._highlightPart(input, (e.key === 'ArrowRight' ? (sEnd + (next[0]?.index || 0)) : (prev[prev.length - 1]?.index)));
|
|
3165
|
-
}
|
|
3166
|
-
else if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
|
|
3167
|
-
const re = /[a-zA-Z0-9]+/ig;
|
|
3168
|
-
const sign = e.key === 'ArrowUp' ? +1 : -1;
|
|
3169
|
-
const parts = Array.from(this.format.matchAll(re));
|
|
3170
|
-
const word = valStr.substring(sStart, sEnd);
|
|
3171
|
-
const part = parts[Array.from(valStr.matchAll(re)).findIndex(c => c[0] == word)];
|
|
3157
|
+
//
|
|
3158
|
+
const re = /[a-zA-Z0-9]+/ig;
|
|
3159
|
+
const parts = Array.from(this.format.matchAll(re));
|
|
3160
|
+
const word = valStr.substring(sStart, sEnd);
|
|
3161
|
+
const part = parts[Array.from(valStr.matchAll(re)).findIndex(c => c[0] == word)];
|
|
3162
|
+
//
|
|
3163
|
+
//
|
|
3164
|
+
if ([...nums].includes(key)) {
|
|
3172
3165
|
if (part) {
|
|
3173
3166
|
switch (part[0]) {
|
|
3174
3167
|
case 'dd':
|
|
3175
3168
|
case 'DD':
|
|
3176
|
-
|
|
3169
|
+
debugger;
|
|
3170
|
+
const newVal = Math.max(1, Math.min(31, Number(word + e.key)));
|
|
3171
|
+
this.value = dateVal.set('day', newVal).date;
|
|
3177
3172
|
break;
|
|
3178
3173
|
case 'mm':
|
|
3179
|
-
case 'MMM':
|
|
3180
|
-
case 'MMMM':
|
|
3181
|
-
this.value = dateVal.add('month', sign).date;
|
|
3182
3174
|
break;
|
|
3183
3175
|
case 'yy':
|
|
3184
3176
|
case 'YYYY':
|
|
3185
|
-
this.value = dateVal.add('year', sign).date;
|
|
3186
3177
|
break;
|
|
3187
3178
|
}
|
|
3188
3179
|
setTimeout(() => {
|
|
3189
|
-
this._highlightPart(input,
|
|
3180
|
+
this._highlightPart(input, sStart);
|
|
3190
3181
|
}, Math.max(10, this.debounceTime));
|
|
3182
|
+
ignore();
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
else if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {
|
|
3186
|
+
const next = Array.from(valStr.substr(sEnd).matchAll(re));
|
|
3187
|
+
const prev = Array.from(valStr.substring(0, sStart).matchAll(re));
|
|
3188
|
+
ignore();
|
|
3189
|
+
this._highlightPart(input, (e.key === 'ArrowRight' ? (sEnd + (next[0]?.index || 0)) : (prev[prev.length - 1]?.index)));
|
|
3190
|
+
}
|
|
3191
|
+
else if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
|
|
3192
|
+
if (e.ctrlKey && e.key === 'ArrowDown') {
|
|
3193
|
+
this.open();
|
|
3194
|
+
}
|
|
3195
|
+
else {
|
|
3196
|
+
const sign = e.key === 'ArrowUp' ? +1 : -1;
|
|
3197
|
+
if (part) {
|
|
3198
|
+
switch (part[0]) {
|
|
3199
|
+
case 'dd':
|
|
3200
|
+
case 'DD':
|
|
3201
|
+
this.value = dateVal.add('day', sign).date;
|
|
3202
|
+
break;
|
|
3203
|
+
case 'mm':
|
|
3204
|
+
case 'MMM':
|
|
3205
|
+
case 'MMMM':
|
|
3206
|
+
this.value = dateVal.add('month', sign).date;
|
|
3207
|
+
break;
|
|
3208
|
+
case 'yy':
|
|
3209
|
+
case 'YYYY':
|
|
3210
|
+
this.value = dateVal.add('year', sign).date;
|
|
3211
|
+
break;
|
|
3212
|
+
}
|
|
3213
|
+
setTimeout(() => {
|
|
3214
|
+
this._highlightPart(input, sStart);
|
|
3215
|
+
}, Math.max(10, this.debounceTime));
|
|
3216
|
+
}
|
|
3191
3217
|
}
|
|
3192
3218
|
ignore();
|
|
3193
3219
|
}
|
|
@@ -3436,10 +3462,10 @@ class AXDialogComponent extends AXBaseComponentMixin {
|
|
|
3436
3462
|
}
|
|
3437
3463
|
}
|
|
3438
3464
|
AXDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AXDialogComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3439
|
-
AXDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AXDialogComponent, selector: "ax-dialog", usesInheritance: true, ngImport: i0, template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" cdkTrapFocus>\r\n <div class=\"ax-dialog ax-{{options.type}}\" tabindex=\"0\" cdkDrag role=\"alert\" cdkDragHandle>\r\n <div class=\"ax-dialog-icon-side\">\r\n <i class=\"ax-dialog-icon {{_icon}}\"></i>\r\n </div>\r\n <div class=\"ax-dialog-content-side\">\r\n <div class=\"ax-dialog-title\">{{options.title}}</div>\r\n <div class=\"ax-dialog-content\">{{options.content}}</div>\r\n </div>\r\n <div class=\"ax-dialog-dismiss-icon\">\r\n <i class=\"ax-ic ax-ic-close\" *ngIf=\"options.dismissible\" (click)=\"close()\"></i>\r\n </div>\r\n <footer class=\"ax-dialog-footer\">\r\n <ng-container *ngFor=\"let button of options.buttons\">\r\n <ax-button [text]=\"button.text\" [submitBehavior]=\"button.submitBehavior\" [cancelBehavior]=\"button.cancelBehavior\" (onClick)=\"_handleButtonClick(button)\" [class]=\"button.cssClass\" [look]=\"button.look\" [color]=\"button.color\"></ax-button>\r\n <div class=\"ax-ml-2\"></div>\r\n </ng-container>\r\n </footer>\r\n </div>\r\n\r\n</div>", components: [{ type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "size", "text", "submitBehavior", "cancelBehavior", "color", "look", "toggleable", "selected"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange"] }], directives: [{ type: i2$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { type: i3$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragDisabled", "cdkDragStartDelay", "cdkDragLockAxis", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragBoundary", "cdkDragRootElement", "cdkDragPreviewContainer", "cdkDragData", "cdkDragFreeDragPosition"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i3$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3465
|
+
AXDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AXDialogComponent, selector: "ax-dialog", usesInheritance: true, ngImport: i0, template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" cdkTrapFocus>\r\n <div class=\"ax-dialog ax-{{options.type}}-default\" tabindex=\"0\" cdkDrag role=\"alert\" cdkDragHandle>\r\n <div class=\"ax-dialog-icon-side\">\r\n <i class=\"ax-dialog-icon {{_icon}}\"></i>\r\n </div>\r\n <div class=\"ax-dialog-content-side\">\r\n <div class=\"ax-dialog-title\">{{options.title}}</div>\r\n <div class=\"ax-dialog-content\">{{options.content}}</div>\r\n </div>\r\n <div class=\"ax-dialog-dismiss-icon\">\r\n <i class=\"ax-ic ax-ic-close\" *ngIf=\"options.dismissible\" (click)=\"close()\"></i>\r\n </div>\r\n <footer class=\"ax-dialog-footer\">\r\n <ng-container *ngFor=\"let button of options.buttons\">\r\n <ax-button [text]=\"button.text\" [submitBehavior]=\"button.submitBehavior\" [cancelBehavior]=\"button.cancelBehavior\" (onClick)=\"_handleButtonClick(button)\" [class]=\"button.cssClass\" [look]=\"button.look\" [color]=\"button.color\"></ax-button>\r\n <div class=\"ax-ml-2\"></div>\r\n </ng-container>\r\n </footer>\r\n </div>\r\n\r\n</div>", components: [{ type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "size", "text", "submitBehavior", "cancelBehavior", "color", "look", "toggleable", "selected"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange"] }], directives: [{ type: i2$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { type: i3$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragDisabled", "cdkDragStartDelay", "cdkDragLockAxis", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragBoundary", "cdkDragRootElement", "cdkDragPreviewContainer", "cdkDragData", "cdkDragFreeDragPosition"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i3$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3440
3466
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AXDialogComponent, decorators: [{
|
|
3441
3467
|
type: Component,
|
|
3442
|
-
args: [{ selector: 'ax-dialog', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" cdkTrapFocus>\r\n <div class=\"ax-dialog ax-{{options.type}}\" tabindex=\"0\" cdkDrag role=\"alert\" cdkDragHandle>\r\n <div class=\"ax-dialog-icon-side\">\r\n <i class=\"ax-dialog-icon {{_icon}}\"></i>\r\n </div>\r\n <div class=\"ax-dialog-content-side\">\r\n <div class=\"ax-dialog-title\">{{options.title}}</div>\r\n <div class=\"ax-dialog-content\">{{options.content}}</div>\r\n </div>\r\n <div class=\"ax-dialog-dismiss-icon\">\r\n <i class=\"ax-ic ax-ic-close\" *ngIf=\"options.dismissible\" (click)=\"close()\"></i>\r\n </div>\r\n <footer class=\"ax-dialog-footer\">\r\n <ng-container *ngFor=\"let button of options.buttons\">\r\n <ax-button [text]=\"button.text\" [submitBehavior]=\"button.submitBehavior\" [cancelBehavior]=\"button.cancelBehavior\" (onClick)=\"_handleButtonClick(button)\" [class]=\"button.cssClass\" [look]=\"button.look\" [color]=\"button.color\"></ax-button>\r\n <div class=\"ax-ml-2\"></div>\r\n </ng-container>\r\n </footer>\r\n </div>\r\n\r\n</div>" }]
|
|
3468
|
+
args: [{ selector: 'ax-dialog', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" cdkTrapFocus>\r\n <div class=\"ax-dialog ax-{{options.type}}-default\" tabindex=\"0\" cdkDrag role=\"alert\" cdkDragHandle>\r\n <div class=\"ax-dialog-icon-side\">\r\n <i class=\"ax-dialog-icon {{_icon}}\"></i>\r\n </div>\r\n <div class=\"ax-dialog-content-side\">\r\n <div class=\"ax-dialog-title\">{{options.title}}</div>\r\n <div class=\"ax-dialog-content\">{{options.content}}</div>\r\n </div>\r\n <div class=\"ax-dialog-dismiss-icon\">\r\n <i class=\"ax-ic ax-ic-close\" *ngIf=\"options.dismissible\" (click)=\"close()\"></i>\r\n </div>\r\n <footer class=\"ax-dialog-footer\">\r\n <ng-container *ngFor=\"let button of options.buttons\">\r\n <ax-button [text]=\"button.text\" [submitBehavior]=\"button.submitBehavior\" [cancelBehavior]=\"button.cancelBehavior\" (onClick)=\"_handleButtonClick(button)\" [class]=\"button.cssClass\" [look]=\"button.look\" [color]=\"button.color\"></ax-button>\r\n <div class=\"ax-ml-2\"></div>\r\n </ng-container>\r\n </footer>\r\n </div>\r\n\r\n</div>" }]
|
|
3443
3469
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; } });
|
|
3444
3470
|
|
|
3445
3471
|
/**
|