@acorex/components 20.7.37 → 20.7.38
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/calendar/index.d.ts +11 -4
- package/data-pager/index.d.ts +6 -25
- package/datetime-box/index.d.ts +2 -3
- package/datetime-input/index.d.ts +2 -2
- package/datetime-picker/index.d.ts +3 -3
- package/fesm2022/acorex-components-calendar.mjs +34 -17
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +44 -53
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +6 -18
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +9 -17
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +27 -30
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +130 -57
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/package.json +28 -28
- package/scheduler/index.d.ts +20 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AXEvent, MXInteractiveComponent, AXComponent, MXValueComponent, AXPagedComponent } from '@acorex/cdk/common';
|
|
2
|
-
import {
|
|
2
|
+
import { AXLocaleService } from '@acorex/core/locale';
|
|
3
|
+
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
3
4
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, inject, Input, ViewEncapsulation, ChangeDetectionStrategy, Component,
|
|
5
|
+
import { Injectable, inject, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, signal, EventEmitter, forwardRef, HostBinding, Output, NgModule } from '@angular/core';
|
|
5
6
|
import { AXDecoratorGenericComponent, AXDecoratorIconComponent, AXDecoratorModule } from '@acorex/components/decorators';
|
|
6
7
|
import { AXTranslationService, AXTranslatorPipe, AXTranslationModule } from '@acorex/core/translation';
|
|
7
8
|
import { AsyncPipe, NgClass, CommonModule } from '@angular/common';
|
|
@@ -9,7 +10,6 @@ import { AXNumberBoxComponent, AXNumberBoxModule } from '@acorex/components/numb
|
|
|
9
10
|
import * as i1 from '@angular/forms';
|
|
10
11
|
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
11
12
|
import { AXButtonComponent, AXButtonItemListComponent, AXButtonItemComponent, AXButtonModule } from '@acorex/components/button';
|
|
12
|
-
import { AXLocaleService } from '@acorex/core/locale';
|
|
13
13
|
import { AXDropdownPanelComponent, AXDropdownModule } from '@acorex/components/dropdown';
|
|
14
14
|
import { isNumber, isEqual, cloneDeep } from 'lodash-es';
|
|
15
15
|
import { AXButtonGroupModule } from '@acorex/components/button-group';
|
|
@@ -41,6 +41,7 @@ class AXDataPagerChild extends MXInteractiveComponent {
|
|
|
41
41
|
super();
|
|
42
42
|
this._parent = inject(AXDataPagerParentComponent);
|
|
43
43
|
this._unsubscriber = inject(AXUnsubscriber);
|
|
44
|
+
this._localeService = inject(AXLocaleService);
|
|
44
45
|
//
|
|
45
46
|
this._parent.onChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe(async (c) => {
|
|
46
47
|
await this.applyParent();
|
|
@@ -49,6 +50,10 @@ class AXDataPagerChild extends MXInteractiveComponent {
|
|
|
49
50
|
this._parent.onOptionChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe(async (c) => {
|
|
50
51
|
await this.applyParent();
|
|
51
52
|
});
|
|
53
|
+
//
|
|
54
|
+
this._localeService.profileChanged$.pipe(this._unsubscriber.takeUntilDestroy).subscribe(() => {
|
|
55
|
+
void this.applyParent();
|
|
56
|
+
});
|
|
52
57
|
}
|
|
53
58
|
/**
|
|
54
59
|
* @ignore
|
|
@@ -206,12 +211,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
206
211
|
* @category Components
|
|
207
212
|
*/
|
|
208
213
|
class AXDataPagerNextButtonsComponent extends AXDataPagerChild {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
super.ngOnInit;
|
|
214
|
-
this.rtl = AXHtmlUtil.isRtl(this.getHostElement());
|
|
214
|
+
constructor() {
|
|
215
|
+
super(...arguments);
|
|
216
|
+
this.localeService = inject(AXLocaleService);
|
|
217
|
+
this.isRtl = this.localeService.isRtl;
|
|
215
218
|
}
|
|
216
219
|
/**
|
|
217
220
|
* @ignore
|
|
@@ -251,8 +254,8 @@ class AXDataPagerNextButtonsComponent extends AXDataPagerChild {
|
|
|
251
254
|
<ax-icon
|
|
252
255
|
class="ax-icon ax-text-xl"
|
|
253
256
|
[ngClass]="{
|
|
254
|
-
'ax-icon-chevron-left':
|
|
255
|
-
'ax-icon-chevron-right': !
|
|
257
|
+
'ax-icon-chevron-left': isRtl(),
|
|
258
|
+
'ax-icon-chevron-right': !isRtl(),
|
|
256
259
|
}"
|
|
257
260
|
></ax-icon>
|
|
258
261
|
</ax-button>
|
|
@@ -265,7 +268,7 @@ class AXDataPagerNextButtonsComponent extends AXDataPagerChild {
|
|
|
265
268
|
>
|
|
266
269
|
<ax-icon
|
|
267
270
|
class="ax-icon ax-text-xl"
|
|
268
|
-
[ngClass]="{ 'ax-icon-chevron-double-left':
|
|
271
|
+
[ngClass]="{ 'ax-icon-chevron-double-left': isRtl(), 'ax-icon-chevron-double-right': !isRtl() }"
|
|
269
272
|
></ax-icon>
|
|
270
273
|
</ax-button>
|
|
271
274
|
`, isInline: true, dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
@@ -285,8 +288,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
285
288
|
<ax-icon
|
|
286
289
|
class="ax-icon ax-text-xl"
|
|
287
290
|
[ngClass]="{
|
|
288
|
-
'ax-icon-chevron-left':
|
|
289
|
-
'ax-icon-chevron-right': !
|
|
291
|
+
'ax-icon-chevron-left': isRtl(),
|
|
292
|
+
'ax-icon-chevron-right': !isRtl(),
|
|
290
293
|
}"
|
|
291
294
|
></ax-icon>
|
|
292
295
|
</ax-button>
|
|
@@ -299,7 +302,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
299
302
|
>
|
|
300
303
|
<ax-icon
|
|
301
304
|
class="ax-icon ax-text-xl"
|
|
302
|
-
[ngClass]="{ 'ax-icon-chevron-double-left':
|
|
305
|
+
[ngClass]="{ 'ax-icon-chevron-double-left': isRtl(), 'ax-icon-chevron-double-right': !isRtl() }"
|
|
303
306
|
></ax-icon>
|
|
304
307
|
</ax-button>
|
|
305
308
|
`,
|
|
@@ -320,28 +323,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
320
323
|
* @category Components
|
|
321
324
|
*/
|
|
322
325
|
class AXDataPagerNumericSelectorComponent extends AXDataPagerChild {
|
|
323
|
-
/**
|
|
324
|
-
* @ignore
|
|
325
|
-
*/
|
|
326
326
|
constructor() {
|
|
327
|
-
super();
|
|
327
|
+
super(...arguments);
|
|
328
328
|
this._items = [];
|
|
329
329
|
this._currentPage = 1;
|
|
330
330
|
this._lastPage = 1;
|
|
331
331
|
this._loading = false;
|
|
332
332
|
this.localeService = inject(AXLocaleService);
|
|
333
|
-
this.
|
|
334
|
-
// console.log(this.localeService.activeProfile().i18nMeta?.rtl ?? false);
|
|
335
|
-
return this.localeService.activeProfile().i18nMeta?.rtl ?? false;
|
|
336
|
-
}, ...(ngDevMode ? [{ debugName: "rtlstatus" }] : []));
|
|
333
|
+
this.isRtl = this.localeService.isRtl;
|
|
337
334
|
/**
|
|
338
335
|
* @ignore
|
|
339
336
|
*/
|
|
340
337
|
this._displayCount = 5;
|
|
341
|
-
afterNextRender(() => {
|
|
342
|
-
this.rtl = AXHtmlUtil.isRtl(this.getHostElement());
|
|
343
|
-
this.cdr.detectChanges();
|
|
344
|
-
});
|
|
345
338
|
}
|
|
346
339
|
/**
|
|
347
340
|
* @ignore
|
|
@@ -363,7 +356,7 @@ class AXDataPagerNumericSelectorComponent extends AXDataPagerChild {
|
|
|
363
356
|
// Add ellipsis button for previous pages if needed
|
|
364
357
|
if (start > 1) {
|
|
365
358
|
this._items.push({
|
|
366
|
-
iconClass: this.
|
|
359
|
+
iconClass: this.isRtl() ? 'ax-icon-chevron-right' : 'ax-icon-chevron-left',
|
|
367
360
|
data: start - 1,
|
|
368
361
|
});
|
|
369
362
|
}
|
|
@@ -377,7 +370,7 @@ class AXDataPagerNumericSelectorComponent extends AXDataPagerChild {
|
|
|
377
370
|
// Add ellipsis button for next pages if needed
|
|
378
371
|
if (end < this._lastPage) {
|
|
379
372
|
this._items.push({
|
|
380
|
-
iconClass: this.
|
|
373
|
+
iconClass: this.isRtl() ? 'ax-icon-chevron-left' : 'ax-icon-chevron-right',
|
|
381
374
|
data: end + 1,
|
|
382
375
|
});
|
|
383
376
|
}
|
|
@@ -397,8 +390,8 @@ class AXDataPagerNumericSelectorComponent extends AXDataPagerChild {
|
|
|
397
390
|
// } else {
|
|
398
391
|
// this._parent.goToPage(Number(e.data));
|
|
399
392
|
// }
|
|
400
|
-
const nextIcon = this.
|
|
401
|
-
const prevIcon = this.
|
|
393
|
+
const nextIcon = this.isRtl() ? 'ax-icon-chevron-left' : 'ax-icon-chevron-right';
|
|
394
|
+
const prevIcon = this.isRtl() ? 'ax-icon-chevron-right' : 'ax-icon-chevron-left';
|
|
402
395
|
if (e.iconClass === nextIcon) {
|
|
403
396
|
this._parent.goNextPage();
|
|
404
397
|
}
|
|
@@ -409,7 +402,7 @@ class AXDataPagerNumericSelectorComponent extends AXDataPagerChild {
|
|
|
409
402
|
this._parent.goToPage(Number(e.data));
|
|
410
403
|
}
|
|
411
404
|
}
|
|
412
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXDataPagerNumericSelectorComponent, deps:
|
|
405
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXDataPagerNumericSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
413
406
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXDataPagerNumericSelectorComponent, isStandalone: true, selector: "ax-data-pager-numeric-selector", providers: [
|
|
414
407
|
{
|
|
415
408
|
provide: AXDataPagerChild,
|
|
@@ -427,8 +420,8 @@ class AXDataPagerNumericSelectorComponent extends AXDataPagerChild {
|
|
|
427
420
|
<ax-icon
|
|
428
421
|
class="ax-icon"
|
|
429
422
|
[ngClass]="{
|
|
430
|
-
'ax-icon-chevron-double-left': !
|
|
431
|
-
'ax-icon-chevron-double-right':
|
|
423
|
+
'ax-icon-chevron-double-left': !isRtl(),
|
|
424
|
+
'ax-icon-chevron-double-right': isRtl(),
|
|
432
425
|
}"
|
|
433
426
|
></ax-icon>
|
|
434
427
|
</ax-button>
|
|
@@ -457,8 +450,8 @@ class AXDataPagerNumericSelectorComponent extends AXDataPagerChild {
|
|
|
457
450
|
<ax-icon
|
|
458
451
|
class="ax-icon"
|
|
459
452
|
[ngClass]="{
|
|
460
|
-
'ax-icon-chevron-double-left':
|
|
461
|
-
'ax-icon-chevron-double-right': !
|
|
453
|
+
'ax-icon-chevron-double-left': isRtl(),
|
|
454
|
+
'ax-icon-chevron-double-right': !isRtl(),
|
|
462
455
|
}"
|
|
463
456
|
></ax-icon>
|
|
464
457
|
</ax-button>
|
|
@@ -478,8 +471,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
478
471
|
<ax-icon
|
|
479
472
|
class="ax-icon"
|
|
480
473
|
[ngClass]="{
|
|
481
|
-
'ax-icon-chevron-double-left': !
|
|
482
|
-
'ax-icon-chevron-double-right':
|
|
474
|
+
'ax-icon-chevron-double-left': !isRtl(),
|
|
475
|
+
'ax-icon-chevron-double-right': isRtl(),
|
|
483
476
|
}"
|
|
484
477
|
></ax-icon>
|
|
485
478
|
</ax-button>
|
|
@@ -508,8 +501,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
508
501
|
<ax-icon
|
|
509
502
|
class="ax-icon"
|
|
510
503
|
[ngClass]="{
|
|
511
|
-
'ax-icon-chevron-double-left':
|
|
512
|
-
'ax-icon-chevron-double-right': !
|
|
504
|
+
'ax-icon-chevron-double-left': isRtl(),
|
|
505
|
+
'ax-icon-chevron-double-right': !isRtl(),
|
|
513
506
|
}"
|
|
514
507
|
></ax-icon>
|
|
515
508
|
</ax-button>
|
|
@@ -526,7 +519,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
526
519
|
],
|
|
527
520
|
imports: [AXButtonComponent, AXDecoratorIconComponent, NgClass],
|
|
528
521
|
}]
|
|
529
|
-
}]
|
|
522
|
+
}] });
|
|
530
523
|
|
|
531
524
|
/**
|
|
532
525
|
* Displays a button to select page sizes for data pagination.
|
|
@@ -649,12 +642,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
649
642
|
* @category Components
|
|
650
643
|
*/
|
|
651
644
|
class AXDataPagerPrevButtonsComponent extends AXDataPagerChild {
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
super.ngOnInit;
|
|
657
|
-
this.rtl = AXHtmlUtil.isRtl(this.getHostElement());
|
|
645
|
+
constructor() {
|
|
646
|
+
super(...arguments);
|
|
647
|
+
this.localeService = inject(AXLocaleService);
|
|
648
|
+
this.isRtl = this.localeService.isRtl;
|
|
658
649
|
}
|
|
659
650
|
/**
|
|
660
651
|
* @ignore
|
|
@@ -693,7 +684,7 @@ class AXDataPagerPrevButtonsComponent extends AXDataPagerChild {
|
|
|
693
684
|
>
|
|
694
685
|
<ax-icon
|
|
695
686
|
class="ax-icon ax-text-xl"
|
|
696
|
-
[ngClass]="{ 'ax-icon-chevron-double-right':
|
|
687
|
+
[ngClass]="{ 'ax-icon-chevron-double-right': isRtl(), 'ax-icon-chevron-double-left': !isRtl() }"
|
|
697
688
|
></ax-icon>
|
|
698
689
|
</ax-button>
|
|
699
690
|
<ax-button
|
|
@@ -706,8 +697,8 @@ class AXDataPagerPrevButtonsComponent extends AXDataPagerChild {
|
|
|
706
697
|
<ax-icon
|
|
707
698
|
class="ax-icon ax-text-xl"
|
|
708
699
|
[ngClass]="{
|
|
709
|
-
'ax-icon-chevron-left': !
|
|
710
|
-
'ax-icon-chevron-right':
|
|
700
|
+
'ax-icon-chevron-left': !isRtl(),
|
|
701
|
+
'ax-icon-chevron-right': isRtl(),
|
|
711
702
|
}"
|
|
712
703
|
></ax-icon>
|
|
713
704
|
</ax-button>
|
|
@@ -727,7 +718,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
727
718
|
>
|
|
728
719
|
<ax-icon
|
|
729
720
|
class="ax-icon ax-text-xl"
|
|
730
|
-
[ngClass]="{ 'ax-icon-chevron-double-right':
|
|
721
|
+
[ngClass]="{ 'ax-icon-chevron-double-right': isRtl(), 'ax-icon-chevron-double-left': !isRtl() }"
|
|
731
722
|
></ax-icon>
|
|
732
723
|
</ax-button>
|
|
733
724
|
<ax-button
|
|
@@ -740,8 +731,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
740
731
|
<ax-icon
|
|
741
732
|
class="ax-icon ax-text-xl"
|
|
742
733
|
[ngClass]="{
|
|
743
|
-
'ax-icon-chevron-left': !
|
|
744
|
-
'ax-icon-chevron-right':
|
|
734
|
+
'ax-icon-chevron-left': !isRtl(),
|
|
735
|
+
'ax-icon-chevron-right': isRtl(),
|
|
745
736
|
}"
|
|
746
737
|
></ax-icon>
|
|
747
738
|
</ax-button>
|