@leanix/components 0.4.3 → 0.4.4

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 (27) hide show
  1. package/esm2020/lib/forms-ui/components/date-input/date-input.component.mjs +5 -4
  2. package/esm2020/lib/forms-ui/components/date-picker-ui/date-formatter.mjs +8 -0
  3. package/esm2020/lib/forms-ui/components/date-picker-ui/datepicker-inner.component.mjs +310 -0
  4. package/esm2020/lib/forms-ui/components/date-picker-ui/datepicker-ui.module.mjs +28 -0
  5. package/esm2020/lib/forms-ui/components/date-picker-ui/datepicker.component.mjs +205 -0
  6. package/esm2020/lib/forms-ui/components/date-picker-ui/datepicker.config.mjs +29 -0
  7. package/esm2020/lib/forms-ui/components/date-picker-ui/daypicker.component.mjs +305 -0
  8. package/esm2020/lib/forms-ui/components/date-picker-ui/isBs3.mjs +2 -0
  9. package/esm2020/lib/forms-ui/components/date-picker-ui/monthpicker.component.mjs +149 -0
  10. package/esm2020/lib/forms-ui/components/date-picker-ui/yearpicker.component.mjs +153 -0
  11. package/esm2020/lib/forms-ui/forms-ui.module.mjs +6 -6
  12. package/fesm2015/leanix-components.mjs +1151 -8
  13. package/fesm2015/leanix-components.mjs.map +1 -1
  14. package/fesm2020/leanix-components.mjs +1150 -8
  15. package/fesm2020/leanix-components.mjs.map +1 -1
  16. package/lib/forms-ui/components/date-picker-ui/date-formatter.d.ts +3 -0
  17. package/lib/forms-ui/components/date-picker-ui/datepicker-inner.component.d.ts +78 -0
  18. package/lib/forms-ui/components/date-picker-ui/datepicker-ui.module.d.ts +15 -0
  19. package/lib/forms-ui/components/date-picker-ui/datepicker.component.d.ts +81 -0
  20. package/lib/forms-ui/components/date-picker-ui/datepicker.config.d.ts +22 -0
  21. package/lib/forms-ui/components/date-picker-ui/daypicker.component.d.ts +17 -0
  22. package/lib/forms-ui/components/date-picker-ui/isBs3.d.ts +1 -0
  23. package/lib/forms-ui/components/date-picker-ui/monthpicker.component.d.ts +14 -0
  24. package/lib/forms-ui/components/date-picker-ui/yearpicker.component.d.ts +14 -0
  25. package/lib/forms-ui/forms-ui.module.d.ts +2 -2
  26. package/package.json +1 -1
  27. package/src/lib/forms-ui/components/date-picker-ui/README.md +8 -0
@@ -22,9 +22,7 @@ import { Renderer, marked } from 'marked';
22
22
  import * as i1$4 from '@angular/cdk/clipboard';
23
23
  import { ClipboardModule } from '@angular/cdk/clipboard';
24
24
  import * as i2$1 from '@angular/forms';
25
- import { NG_VALUE_ACCESSOR, NG_VALIDATORS, UntypedFormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
26
- import * as i3 from 'ngx-bootstrap/datepicker';
27
- import { DatePickerComponent, DateFormatter, DatepickerModule } from 'ngx-bootstrap/datepicker';
25
+ import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule, UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
28
26
  import * as i2 from 'ngx-infinite-scroll';
29
27
  import { InfiniteScrollModule } from 'ngx-infinite-scroll';
30
28
  import * as i1$5 from '@angular/cdk/drag-drop';
@@ -3202,6 +3200,1133 @@ function isValidDateString(dateString) {
3202
3200
  return dateString !== null && /^\d\d\d\d-\d\d-\d\d$/.test(dateString) && !isNaN$1(Date.parse(dateString));
3203
3201
  }
3204
3202
 
3203
+ /* format method is monkey-patched in date-input component, leaving this implementation as dummy */
3204
+ class DateFormatter {
3205
+ format(date, format$1, locale) {
3206
+ return format(date, format$1, { locale });
3207
+ }
3208
+ }
3209
+
3210
+ /* tslint:disable: max-file-line-count */
3211
+ class DatePickerInnerComponent {
3212
+ constructor() {
3213
+ this.selectionDone = new EventEmitter(undefined);
3214
+ this.update = new EventEmitter(false);
3215
+ this.activeDateChange = new EventEmitter(undefined);
3216
+ /* tslint:disable-next-line: no-any*/
3217
+ this.stepDay = {};
3218
+ /* tslint:disable-next-line: no-any*/
3219
+ this.stepMonth = {};
3220
+ /* tslint:disable-next-line: no-any*/
3221
+ this.stepYear = {};
3222
+ this.modes = ['day', 'month', 'year'];
3223
+ this.dateFormatter = new DateFormatter();
3224
+ }
3225
+ get activeDate() {
3226
+ return this._activeDate;
3227
+ }
3228
+ set activeDate(value) {
3229
+ this._activeDate = value;
3230
+ }
3231
+ // todo: add formatter value to Date object
3232
+ ngOnInit() {
3233
+ // todo: use date for unique value
3234
+ this.uniqueId = `datepicker--${Math.floor(Math.random() * 10000)}`;
3235
+ if (this.initDate) {
3236
+ this.activeDate = this.initDate;
3237
+ this.selectedDate = new Date(this.activeDate.valueOf());
3238
+ this.update.emit(this.activeDate);
3239
+ }
3240
+ else if (this.activeDate === undefined) {
3241
+ this.activeDate = new Date();
3242
+ }
3243
+ }
3244
+ // this.refreshView should be called here to reflect the changes on the fly
3245
+ // tslint:disable-next-line:no-unused-variable
3246
+ ngOnChanges(changes) {
3247
+ this.refreshView();
3248
+ this.checkIfActiveDateGotUpdated(changes['activeDate']);
3249
+ }
3250
+ // Check if activeDate has been update and then emit the activeDateChange with the new date
3251
+ /* tslint:disable-next-line: no-any */
3252
+ checkIfActiveDateGotUpdated(activeDate) {
3253
+ if (activeDate && !activeDate.firstChange) {
3254
+ const previousValue = activeDate.previousValue;
3255
+ if (previousValue && previousValue instanceof Date && previousValue.getTime() !== activeDate.currentValue.getTime()) {
3256
+ this.activeDateChange.emit(this.activeDate);
3257
+ }
3258
+ }
3259
+ }
3260
+ setCompareHandler(handler, type) {
3261
+ if (type === 'day') {
3262
+ this.compareHandlerDay = handler;
3263
+ }
3264
+ if (type === 'month') {
3265
+ this.compareHandlerMonth = handler;
3266
+ }
3267
+ if (type === 'year') {
3268
+ this.compareHandlerYear = handler;
3269
+ }
3270
+ }
3271
+ compare(date1, date2) {
3272
+ if (date1 === undefined || date2 === undefined) {
3273
+ return undefined;
3274
+ }
3275
+ if (this.datepickerMode === 'day' && this.compareHandlerDay) {
3276
+ return this.compareHandlerDay(date1, date2);
3277
+ }
3278
+ if (this.datepickerMode === 'month' && this.compareHandlerMonth) {
3279
+ return this.compareHandlerMonth(date1, date2);
3280
+ }
3281
+ if (this.datepickerMode === 'year' && this.compareHandlerYear) {
3282
+ return this.compareHandlerYear(date1, date2);
3283
+ }
3284
+ return void 0;
3285
+ }
3286
+ setRefreshViewHandler(handler, type) {
3287
+ if (type === 'day') {
3288
+ this.refreshViewHandlerDay = handler;
3289
+ }
3290
+ if (type === 'month') {
3291
+ this.refreshViewHandlerMonth = handler;
3292
+ }
3293
+ if (type === 'year') {
3294
+ this.refreshViewHandlerYear = handler;
3295
+ }
3296
+ }
3297
+ refreshView() {
3298
+ if (this.datepickerMode === 'day' && this.refreshViewHandlerDay) {
3299
+ this.refreshViewHandlerDay();
3300
+ }
3301
+ if (this.datepickerMode === 'month' && this.refreshViewHandlerMonth) {
3302
+ this.refreshViewHandlerMonth();
3303
+ }
3304
+ if (this.datepickerMode === 'year' && this.refreshViewHandlerYear) {
3305
+ this.refreshViewHandlerYear();
3306
+ }
3307
+ }
3308
+ dateFilter(date, format) {
3309
+ return this.dateFormatter.format(date, format, this.locale);
3310
+ }
3311
+ /* tslint:disable-next-line: no-any*/
3312
+ isActive(dateObject) {
3313
+ if (this.compare(dateObject.date, this.activeDate) === 0) {
3314
+ this.activeDateId = dateObject.uid;
3315
+ return true;
3316
+ }
3317
+ return false;
3318
+ }
3319
+ /* tslint:disable-next-line: no-any*/
3320
+ createDateObject(date, format) {
3321
+ /* tslint:disable-next-line: no-any*/
3322
+ const dateObject = {};
3323
+ dateObject.date = new Date(date.getFullYear(), date.getMonth(), date.getDate());
3324
+ dateObject.date = this.fixTimeZone(dateObject.date);
3325
+ dateObject.label = this.dateFilter(date, format);
3326
+ dateObject.selected = this.compare(date, this.selectedDate) === 0;
3327
+ dateObject.disabled = this.isDisabled(date);
3328
+ dateObject.current = this.compare(date, new Date()) === 0;
3329
+ dateObject.customClass = this.getCustomClassForDate(dateObject.date);
3330
+ return dateObject;
3331
+ }
3332
+ /* tslint:disable-next-line: no-any*/
3333
+ split(arr, size) {
3334
+ /* tslint:disable-next-line: no-any*/
3335
+ const arrays = [];
3336
+ while (arr.length > 0) {
3337
+ arrays.push(arr.splice(0, size));
3338
+ }
3339
+ return arrays;
3340
+ }
3341
+ // Fix a hard-reproducible bug with timezones
3342
+ // The bug depends on OS, browser, current timezone and current date
3343
+ // i.e.
3344
+ // var date = new Date(2014, 0, 1);
3345
+ // console.log(date.getFullYear(), date.getMonth(), date.getDate(),
3346
+ // date.getHours()); can result in "2013 11 31 23" because of the bug.
3347
+ fixTimeZone(date) {
3348
+ const hours = date.getHours();
3349
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), hours === 23 ? hours + 2 : 0);
3350
+ }
3351
+ select(date, isManual = true) {
3352
+ if (this.datepickerMode === this.minMode) {
3353
+ if (!this.activeDate) {
3354
+ this.activeDate = new Date(0, 0, 0, 0, 0, 0, 0);
3355
+ }
3356
+ this.activeDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
3357
+ this.activeDate = this.fixTimeZone(this.activeDate);
3358
+ if (isManual) {
3359
+ this.selectionDone.emit(this.activeDate);
3360
+ }
3361
+ }
3362
+ else {
3363
+ this.activeDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
3364
+ this.activeDate = this.fixTimeZone(this.activeDate);
3365
+ if (isManual) {
3366
+ this.datepickerMode = this.modes[this.modes.indexOf(this.datepickerMode) - 1];
3367
+ }
3368
+ }
3369
+ this.selectedDate = new Date(this.activeDate.valueOf());
3370
+ this.update.emit(this.activeDate);
3371
+ this.refreshView();
3372
+ }
3373
+ move(direction) {
3374
+ /* tslint:disable-next-line: no-any*/
3375
+ let expectedStep;
3376
+ if (this.datepickerMode === 'day') {
3377
+ expectedStep = this.stepDay;
3378
+ }
3379
+ if (this.datepickerMode === 'month') {
3380
+ expectedStep = this.stepMonth;
3381
+ }
3382
+ if (this.datepickerMode === 'year') {
3383
+ expectedStep = this.stepYear;
3384
+ }
3385
+ if (expectedStep) {
3386
+ const year = this.activeDate.getFullYear() + direction * (expectedStep.years || 0);
3387
+ const month = this.activeDate.getMonth() + direction * (expectedStep.months || 0);
3388
+ this.activeDate = new Date(year, month, 1);
3389
+ this.refreshView();
3390
+ this.activeDateChange.emit(this.activeDate);
3391
+ }
3392
+ }
3393
+ toggleMode(_direction) {
3394
+ const direction = _direction || 1;
3395
+ if ((this.datepickerMode === this.maxMode && direction === 1) || (this.datepickerMode === this.minMode && direction === -1)) {
3396
+ return;
3397
+ }
3398
+ this.datepickerMode = this.modes[this.modes.indexOf(this.datepickerMode) + direction];
3399
+ this.refreshView();
3400
+ }
3401
+ getCustomClassForDate(date) {
3402
+ if (!this.customClass) {
3403
+ return '';
3404
+ }
3405
+ // todo: build a hash of custom classes, it will work faster
3406
+ const customClassObject = this.customClass.find((customClass) => {
3407
+ return customClass.date.valueOf() === date.valueOf() && customClass.mode === this.datepickerMode;
3408
+ }, this);
3409
+ return customClassObject === undefined ? '' : customClassObject.clazz;
3410
+ }
3411
+ compareDateDisabled(date1Disabled, date2) {
3412
+ if (date1Disabled === undefined || date2 === undefined) {
3413
+ return undefined;
3414
+ }
3415
+ if (date1Disabled.mode === 'day' && this.compareHandlerDay) {
3416
+ return this.compareHandlerDay(date1Disabled.date, date2);
3417
+ }
3418
+ if (date1Disabled.mode === 'month' && this.compareHandlerMonth) {
3419
+ return this.compareHandlerMonth(date1Disabled.date, date2);
3420
+ }
3421
+ if (date1Disabled.mode === 'year' && this.compareHandlerYear) {
3422
+ return this.compareHandlerYear(date1Disabled.date, date2);
3423
+ }
3424
+ return undefined;
3425
+ }
3426
+ isDisabled(date) {
3427
+ let isDateDisabled = false;
3428
+ if (this.dateDisabled) {
3429
+ this.dateDisabled.forEach((disabledDate) => {
3430
+ if (this.compareDateDisabled(disabledDate, date) === 0) {
3431
+ isDateDisabled = true;
3432
+ }
3433
+ });
3434
+ }
3435
+ if (this.dayDisabled) {
3436
+ isDateDisabled = isDateDisabled || this.dayDisabled.indexOf(date.getDay()) > -1;
3437
+ }
3438
+ return (isDateDisabled || (this.minDate && this.compare(date, this.minDate) < 0) || (this.maxDate && this.compare(date, this.maxDate) > 0));
3439
+ }
3440
+ }
3441
+ DatePickerInnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: DatePickerInnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3442
+ DatePickerInnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: DatePickerInnerComponent, selector: "datepicker-inner", inputs: { locale: "locale", datepickerMode: "datepickerMode", startingDay: "startingDay", yearRange: "yearRange", minDate: "minDate", maxDate: "maxDate", minMode: "minMode", maxMode: "maxMode", showWeeks: "showWeeks", formatDay: "formatDay", formatMonth: "formatMonth", formatYear: "formatYear", formatDayHeader: "formatDayHeader", formatDayTitle: "formatDayTitle", formatMonthTitle: "formatMonthTitle", onlyCurrentMonth: "onlyCurrentMonth", shortcutPropagation: "shortcutPropagation", customClass: "customClass", monthColLimit: "monthColLimit", yearColLimit: "yearColLimit", dateDisabled: "dateDisabled", dayDisabled: "dayDisabled", initDate: "initDate", activeDate: "activeDate" }, outputs: { selectionDone: "selectionDone", update: "update", activeDateChange: "activeDateChange" }, usesOnChanges: true, ngImport: i0, template: `
3443
+ <!--&lt;!&ndash;ng-keydown="keydown($event)"&ndash;&gt;-->
3444
+ <div *ngIf="datepickerMode" class="well well-sm bg-faded p-a card" role="application">
3445
+ <ng-content></ng-content>
3446
+ </div>
3447
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3448
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: DatePickerInnerComponent, decorators: [{
3449
+ type: Component,
3450
+ args: [{
3451
+ // eslint-disable-next-line @angular-eslint/component-selector
3452
+ selector: 'datepicker-inner',
3453
+ template: `
3454
+ <!--&lt;!&ndash;ng-keydown="keydown($event)"&ndash;&gt;-->
3455
+ <div *ngIf="datepickerMode" class="well well-sm bg-faded p-a card" role="application">
3456
+ <ng-content></ng-content>
3457
+ </div>
3458
+ `
3459
+ }]
3460
+ }], propDecorators: { locale: [{
3461
+ type: Input
3462
+ }], datepickerMode: [{
3463
+ type: Input
3464
+ }], startingDay: [{
3465
+ type: Input
3466
+ }], yearRange: [{
3467
+ type: Input
3468
+ }], minDate: [{
3469
+ type: Input
3470
+ }], maxDate: [{
3471
+ type: Input
3472
+ }], minMode: [{
3473
+ type: Input
3474
+ }], maxMode: [{
3475
+ type: Input
3476
+ }], showWeeks: [{
3477
+ type: Input
3478
+ }], formatDay: [{
3479
+ type: Input
3480
+ }], formatMonth: [{
3481
+ type: Input
3482
+ }], formatYear: [{
3483
+ type: Input
3484
+ }], formatDayHeader: [{
3485
+ type: Input
3486
+ }], formatDayTitle: [{
3487
+ type: Input
3488
+ }], formatMonthTitle: [{
3489
+ type: Input
3490
+ }], onlyCurrentMonth: [{
3491
+ type: Input
3492
+ }], shortcutPropagation: [{
3493
+ type: Input
3494
+ }], customClass: [{
3495
+ type: Input
3496
+ }], monthColLimit: [{
3497
+ type: Input
3498
+ }], yearColLimit: [{
3499
+ type: Input
3500
+ }], dateDisabled: [{
3501
+ type: Input
3502
+ }], dayDisabled: [{
3503
+ type: Input
3504
+ }], initDate: [{
3505
+ type: Input
3506
+ }], selectionDone: [{
3507
+ type: Output
3508
+ }], update: [{
3509
+ type: Output
3510
+ }], activeDateChange: [{
3511
+ type: Output
3512
+ }], activeDate: [{
3513
+ type: Input
3514
+ }] } });
3515
+
3516
+ class DatepickerConfig {
3517
+ constructor() {
3518
+ this.locale = 'en';
3519
+ this.datepickerMode = 'day';
3520
+ this.startingDay = 0;
3521
+ this.yearRange = 20;
3522
+ this.minMode = 'day';
3523
+ this.maxMode = 'year';
3524
+ this.showWeeks = true;
3525
+ this.formatDay = 'DD';
3526
+ this.formatMonth = 'MMMM';
3527
+ this.formatYear = 'YYYY';
3528
+ this.formatDayHeader = 'dd';
3529
+ this.formatDayTitle = 'MMMM YYYY';
3530
+ this.formatMonthTitle = 'YYYY';
3531
+ this.onlyCurrentMonth = false;
3532
+ this.monthColLimit = 3;
3533
+ this.yearColLimit = 5;
3534
+ this.shortcutPropagation = false;
3535
+ }
3536
+ }
3537
+ DatepickerConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: DatepickerConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3538
+ DatepickerConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: DatepickerConfig });
3539
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: DatepickerConfig, decorators: [{
3540
+ type: Injectable
3541
+ }] });
3542
+
3543
+ const isBs3 = () => true;
3544
+
3545
+ // @deprecated
3546
+ class DayPickerComponent {
3547
+ constructor(datePicker) {
3548
+ this.labels = [];
3549
+ this.rows = [];
3550
+ this.weekNumbers = [];
3551
+ this.datePicker = datePicker;
3552
+ }
3553
+ get isBs4() {
3554
+ return !isBs3();
3555
+ }
3556
+ /*protected getDaysInMonth(year:number, month:number) {
3557
+ return ((month === 1) && (year % 4 === 0) &&
3558
+ ((year % 100 !== 0) || (year % 400 === 0))) ? 29 : DAYS_IN_MONTH[month];
3559
+ }*/
3560
+ ngOnInit() {
3561
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
3562
+ const self = this;
3563
+ this.datePicker.stepDay = { months: 1 };
3564
+ this.datePicker.setRefreshViewHandler(function () {
3565
+ const year = this.activeDate.getFullYear();
3566
+ const month = this.activeDate.getMonth();
3567
+ const firstDayOfMonth = new Date(year, month, 1);
3568
+ const difference = this.startingDay - firstDayOfMonth.getDay();
3569
+ const numDisplayedFromPreviousMonth = difference > 0 ? 7 - difference : -difference;
3570
+ const firstDate = new Date(firstDayOfMonth.getTime());
3571
+ if (numDisplayedFromPreviousMonth > 0) {
3572
+ firstDate.setDate(-numDisplayedFromPreviousMonth + 1);
3573
+ }
3574
+ // 42 is the number of days on a six-week calendar
3575
+ const _days = self.getDates(firstDate, 42);
3576
+ const days = [];
3577
+ for (let i = 0; i < 42; i++) {
3578
+ const _dateObject = this.createDateObject(_days[i], this.formatDay);
3579
+ _dateObject.secondary = _days[i]?.getMonth() !== month;
3580
+ _dateObject.uid = this.uniqueId + '-' + i;
3581
+ days[i] = _dateObject;
3582
+ }
3583
+ self.labels = [];
3584
+ for (let j = 0; j < 7; j++) {
3585
+ self.labels[j] = {};
3586
+ self.labels[j].abbr = this.dateFilter(days[j].date, this.formatDayHeader);
3587
+ self.labels[j].full = this.dateFilter(days[j].date, 'EEEE');
3588
+ }
3589
+ self.title = this.dateFilter(this.activeDate, this.formatDayTitle);
3590
+ self.rows = this.split(days, 7);
3591
+ if (this.showWeeks) {
3592
+ self.weekNumbers = [];
3593
+ const thursdayIndex = (4 + 7 - this.startingDay) % 7;
3594
+ const numWeeks = self.rows.length;
3595
+ for (let curWeek = 0; curWeek < numWeeks; curWeek++) {
3596
+ self.weekNumbers.push(self.getISO8601WeekNumber(self.rows[curWeek][thursdayIndex].date));
3597
+ }
3598
+ }
3599
+ }, 'day');
3600
+ this.datePicker.setCompareHandler(function (date1, date2) {
3601
+ const d1 = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());
3602
+ const d2 = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
3603
+ return d1.getTime() - d2.getTime();
3604
+ }, 'day');
3605
+ this.datePicker.refreshView();
3606
+ }
3607
+ getDates(startDate, n) {
3608
+ const dates = new Array(n);
3609
+ let current = new Date(startDate.getTime());
3610
+ let i = 0;
3611
+ let date;
3612
+ while (i < n) {
3613
+ date = new Date(current.getTime());
3614
+ date = this.datePicker.fixTimeZone(date);
3615
+ dates[i++] = date;
3616
+ current = new Date(date.getFullYear(), date.getMonth(), date.getDate() + 1);
3617
+ }
3618
+ return dates;
3619
+ }
3620
+ getISO8601WeekNumber(date) {
3621
+ const checkDate = new Date(date.getTime());
3622
+ // Thursday
3623
+ checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
3624
+ const time = checkDate.getTime();
3625
+ // Compare with Jan 1
3626
+ checkDate.setMonth(0);
3627
+ checkDate.setDate(1);
3628
+ return Math.floor(Math.round((time - checkDate.getTime()) / 86400000) / 7) + 1;
3629
+ }
3630
+ }
3631
+ DayPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: DayPickerComponent, deps: [{ token: DatePickerInnerComponent }], target: i0.ɵɵFactoryTarget.Component });
3632
+ DayPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: DayPickerComponent, selector: "daypicker", ngImport: i0, template: `
3633
+ <table
3634
+ *ngIf="datePicker.datepickerMode === 'day'"
3635
+ role="grid"
3636
+ [attr.aria-labelledby]="datePicker.uniqueId + '-title'"
3637
+ aria-activedescendant="activeDateId"
3638
+ >
3639
+ <thead>
3640
+ <tr>
3641
+ <th>
3642
+ <button
3643
+ *ngIf="!isBs4"
3644
+ type="button"
3645
+ class="btn btn-default btn-secondary btn-sm pull-left float-left"
3646
+ (click)="datePicker.move(-1)"
3647
+ tabindex="-1"
3648
+ >
3649
+
3650
+ </button>
3651
+ <button
3652
+ *ngIf="isBs4"
3653
+ type="button"
3654
+ class="btn btn-default btn-secondary btn-sm pull-left float-left"
3655
+ (click)="datePicker.move(-1)"
3656
+ tabindex="-1"
3657
+ >
3658
+ &lt;
3659
+ </button>
3660
+ </th>
3661
+ <th [attr.colspan]="5 + (datePicker.showWeeks ? 1 : 0)">
3662
+ <button
3663
+ [id]="datePicker.uniqueId + '-title'"
3664
+ type="button"
3665
+ class="btn btn-default btn-secondary btn-sm"
3666
+ (click)="datePicker.toggleMode(0)"
3667
+ [disabled]="datePicker.datepickerMode === datePicker.maxMode"
3668
+ [ngClass]="{ disabled: datePicker.datepickerMode === datePicker.maxMode }"
3669
+ tabindex="-1"
3670
+ style="width:100%;"
3671
+ >
3672
+ <strong>{{ title }}</strong>
3673
+ </button>
3674
+ </th>
3675
+ <th>
3676
+ <button
3677
+ *ngIf="!isBs4"
3678
+ type="button"
3679
+ class="btn btn-default btn-secondary btn-sm pull-right float-right"
3680
+ (click)="datePicker.move(1)"
3681
+ tabindex="-1"
3682
+ >
3683
+
3684
+ </button>
3685
+ <button
3686
+ *ngIf="isBs4"
3687
+ type="button"
3688
+ class="btn btn-default btn-secondary btn-sm pull-right float-right"
3689
+ (click)="datePicker.move(1)"
3690
+ tabindex="-1"
3691
+ >
3692
+ &gt;
3693
+ </button>
3694
+ </th>
3695
+ </tr>
3696
+ <tr>
3697
+ <th *ngIf="datePicker.showWeeks"></th>
3698
+ <th *ngFor="let labelz of labels" class="text-center">
3699
+ <small aria-label="labelz.full"
3700
+ ><b>{{ labelz.abbr }}</b></small
3701
+ >
3702
+ </th>
3703
+ </tr>
3704
+ </thead>
3705
+ <tbody>
3706
+ <ng-template ngFor [ngForOf]="rows" let-rowz="$implicit" let-index="index">
3707
+ <tr *ngIf="!(datePicker.onlyCurrentMonth && rowz[0].secondary && rowz[6].secondary)">
3708
+ <td *ngIf="datePicker.showWeeks" class="h6" class="text-center">
3709
+ <em>{{ weekNumbers[index] }}</em>
3710
+ </td>
3711
+ <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [id]="dtz.uid">
3712
+ <button
3713
+ type="button"
3714
+ style="min-width:100%;"
3715
+ class="btn btn-sm {{ dtz.customClass }}"
3716
+ *ngIf="!(datePicker.onlyCurrentMonth && dtz.secondary)"
3717
+ [ngClass]="{
3718
+ 'btn-secondary': isBs4 && !dtz.selected && !datePicker.isActive(dtz),
3719
+ 'btn-info': dtz.selected,
3720
+ disabled: dtz.disabled,
3721
+ active: !isBs4 && datePicker.isActive(dtz),
3722
+ 'btn-default': !isBs4
3723
+ }"
3724
+ [disabled]="dtz.disabled"
3725
+ (click)="datePicker.select(dtz.date)"
3726
+ tabindex="-1"
3727
+ >
3728
+ <span [ngClass]="{ 'text-muted': dtz.secondary || dtz.current, 'text-info': !isBs4 && dtz.current }">{{ dtz.label }}</span>
3729
+ </button>
3730
+ </td>
3731
+ </tr>
3732
+ </ng-template>
3733
+ </tbody>
3734
+ </table>
3735
+ `, isInline: true, styles: [":host .btn-secondary{color:#292b2c;background-color:#fff;border-color:#ccc}:host .btn-info .text-muted{color:#292b2c!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3736
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: DayPickerComponent, decorators: [{
3737
+ type: Component,
3738
+ args: [{ selector: 'daypicker', template: `
3739
+ <table
3740
+ *ngIf="datePicker.datepickerMode === 'day'"
3741
+ role="grid"
3742
+ [attr.aria-labelledby]="datePicker.uniqueId + '-title'"
3743
+ aria-activedescendant="activeDateId"
3744
+ >
3745
+ <thead>
3746
+ <tr>
3747
+ <th>
3748
+ <button
3749
+ *ngIf="!isBs4"
3750
+ type="button"
3751
+ class="btn btn-default btn-secondary btn-sm pull-left float-left"
3752
+ (click)="datePicker.move(-1)"
3753
+ tabindex="-1"
3754
+ >
3755
+
3756
+ </button>
3757
+ <button
3758
+ *ngIf="isBs4"
3759
+ type="button"
3760
+ class="btn btn-default btn-secondary btn-sm pull-left float-left"
3761
+ (click)="datePicker.move(-1)"
3762
+ tabindex="-1"
3763
+ >
3764
+ &lt;
3765
+ </button>
3766
+ </th>
3767
+ <th [attr.colspan]="5 + (datePicker.showWeeks ? 1 : 0)">
3768
+ <button
3769
+ [id]="datePicker.uniqueId + '-title'"
3770
+ type="button"
3771
+ class="btn btn-default btn-secondary btn-sm"
3772
+ (click)="datePicker.toggleMode(0)"
3773
+ [disabled]="datePicker.datepickerMode === datePicker.maxMode"
3774
+ [ngClass]="{ disabled: datePicker.datepickerMode === datePicker.maxMode }"
3775
+ tabindex="-1"
3776
+ style="width:100%;"
3777
+ >
3778
+ <strong>{{ title }}</strong>
3779
+ </button>
3780
+ </th>
3781
+ <th>
3782
+ <button
3783
+ *ngIf="!isBs4"
3784
+ type="button"
3785
+ class="btn btn-default btn-secondary btn-sm pull-right float-right"
3786
+ (click)="datePicker.move(1)"
3787
+ tabindex="-1"
3788
+ >
3789
+
3790
+ </button>
3791
+ <button
3792
+ *ngIf="isBs4"
3793
+ type="button"
3794
+ class="btn btn-default btn-secondary btn-sm pull-right float-right"
3795
+ (click)="datePicker.move(1)"
3796
+ tabindex="-1"
3797
+ >
3798
+ &gt;
3799
+ </button>
3800
+ </th>
3801
+ </tr>
3802
+ <tr>
3803
+ <th *ngIf="datePicker.showWeeks"></th>
3804
+ <th *ngFor="let labelz of labels" class="text-center">
3805
+ <small aria-label="labelz.full"
3806
+ ><b>{{ labelz.abbr }}</b></small
3807
+ >
3808
+ </th>
3809
+ </tr>
3810
+ </thead>
3811
+ <tbody>
3812
+ <ng-template ngFor [ngForOf]="rows" let-rowz="$implicit" let-index="index">
3813
+ <tr *ngIf="!(datePicker.onlyCurrentMonth && rowz[0].secondary && rowz[6].secondary)">
3814
+ <td *ngIf="datePicker.showWeeks" class="h6" class="text-center">
3815
+ <em>{{ weekNumbers[index] }}</em>
3816
+ </td>
3817
+ <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [id]="dtz.uid">
3818
+ <button
3819
+ type="button"
3820
+ style="min-width:100%;"
3821
+ class="btn btn-sm {{ dtz.customClass }}"
3822
+ *ngIf="!(datePicker.onlyCurrentMonth && dtz.secondary)"
3823
+ [ngClass]="{
3824
+ 'btn-secondary': isBs4 && !dtz.selected && !datePicker.isActive(dtz),
3825
+ 'btn-info': dtz.selected,
3826
+ disabled: dtz.disabled,
3827
+ active: !isBs4 && datePicker.isActive(dtz),
3828
+ 'btn-default': !isBs4
3829
+ }"
3830
+ [disabled]="dtz.disabled"
3831
+ (click)="datePicker.select(dtz.date)"
3832
+ tabindex="-1"
3833
+ >
3834
+ <span [ngClass]="{ 'text-muted': dtz.secondary || dtz.current, 'text-info': !isBs4 && dtz.current }">{{ dtz.label }}</span>
3835
+ </button>
3836
+ </td>
3837
+ </tr>
3838
+ </ng-template>
3839
+ </tbody>
3840
+ </table>
3841
+ `, styles: [":host .btn-secondary{color:#292b2c;background-color:#fff;border-color:#ccc}:host .btn-info .text-muted{color:#292b2c!important}\n"] }]
3842
+ }], ctorParameters: function () { return [{ type: DatePickerInnerComponent }]; } });
3843
+
3844
+ // @deprecated
3845
+ class MonthPickerComponent {
3846
+ constructor(datePicker) {
3847
+ this.rows = [];
3848
+ this.datePicker = datePicker;
3849
+ }
3850
+ get isBs4() {
3851
+ return !isBs3();
3852
+ }
3853
+ ngOnInit() {
3854
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
3855
+ const self = this;
3856
+ this.datePicker.stepMonth = { years: 1 };
3857
+ this.datePicker.setRefreshViewHandler(function () {
3858
+ const months = new Array(12);
3859
+ const year = this.activeDate.getFullYear();
3860
+ let date;
3861
+ for (let i = 0; i < 12; i++) {
3862
+ date = new Date(year, i, 1);
3863
+ date = this.fixTimeZone(date);
3864
+ months[i] = this.createDateObject(date, this.formatMonth);
3865
+ months[i].uid = this.uniqueId + '-' + i;
3866
+ }
3867
+ self.title = this.dateFilter(this.activeDate, this.formatMonthTitle);
3868
+ self.rows = this.split(months, self.datePicker.monthColLimit);
3869
+ }, 'month');
3870
+ this.datePicker.setCompareHandler(function (date1, date2) {
3871
+ const d1 = new Date(date1.getFullYear(), date1.getMonth());
3872
+ const d2 = new Date(date2.getFullYear(), date2.getMonth());
3873
+ return d1.getTime() - d2.getTime();
3874
+ }, 'month');
3875
+ this.datePicker.refreshView();
3876
+ }
3877
+ }
3878
+ MonthPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: MonthPickerComponent, deps: [{ token: DatePickerInnerComponent }], target: i0.ɵɵFactoryTarget.Component });
3879
+ MonthPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: MonthPickerComponent, selector: "monthpicker", ngImport: i0, template: `
3880
+ <table *ngIf="datePicker.datepickerMode === 'month'" role="grid">
3881
+ <thead>
3882
+ <tr>
3883
+ <th>
3884
+ <button type="button" class="btn btn-default btn-sm pull-left float-left" (click)="datePicker.move(-1)" tabindex="-1">‹</button>
3885
+ </th>
3886
+ <th [attr.colspan]="datePicker.monthColLimit - 2 <= 0 ? 1 : datePicker.monthColLimit - 2">
3887
+ <button
3888
+ [id]="datePicker.uniqueId + '-title'"
3889
+ type="button"
3890
+ class="btn btn-default btn-sm"
3891
+ (click)="datePicker.toggleMode(0)"
3892
+ [disabled]="datePicker.datepickerMode === maxMode"
3893
+ [ngClass]="{ disabled: datePicker.datepickerMode === maxMode }"
3894
+ tabindex="-1"
3895
+ style="width:100%;"
3896
+ >
3897
+ <strong>{{ title }}</strong>
3898
+ </button>
3899
+ </th>
3900
+ <th>
3901
+ <button type="button" class="btn btn-default btn-sm pull-right float-right" (click)="datePicker.move(1)" tabindex="-1">
3902
+
3903
+ </button>
3904
+ </th>
3905
+ </tr>
3906
+ </thead>
3907
+ <tbody>
3908
+ <tr *ngFor="let rowz of rows">
3909
+ <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [attr.id]="dtz.uid" [ngClass]="dtz.customClass">
3910
+ <button
3911
+ type="button"
3912
+ style="min-width:100%;"
3913
+ class="btn btn-default"
3914
+ [ngClass]="{
3915
+ 'btn-link': isBs4 && !dtz.selected && !datePicker.isActive(dtz),
3916
+ 'btn-info': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)),
3917
+ disabled: dtz.disabled,
3918
+ active: !isBs4 && datePicker.isActive(dtz)
3919
+ }"
3920
+ [disabled]="dtz.disabled"
3921
+ (click)="datePicker.select(dtz.date)"
3922
+ tabindex="-1"
3923
+ >
3924
+ <span [ngClass]="{ 'text-success': isBs4 && dtz.current, 'text-info': !isBs4 && dtz.current }">{{ dtz.label }}</span>
3925
+ </button>
3926
+ </td>
3927
+ </tr>
3928
+ </tbody>
3929
+ </table>
3930
+ `, isInline: true, styles: [":host .btn-info .text-success{color:#fff!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3931
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: MonthPickerComponent, decorators: [{
3932
+ type: Component,
3933
+ args: [{ selector: 'monthpicker', template: `
3934
+ <table *ngIf="datePicker.datepickerMode === 'month'" role="grid">
3935
+ <thead>
3936
+ <tr>
3937
+ <th>
3938
+ <button type="button" class="btn btn-default btn-sm pull-left float-left" (click)="datePicker.move(-1)" tabindex="-1">‹</button>
3939
+ </th>
3940
+ <th [attr.colspan]="datePicker.monthColLimit - 2 <= 0 ? 1 : datePicker.monthColLimit - 2">
3941
+ <button
3942
+ [id]="datePicker.uniqueId + '-title'"
3943
+ type="button"
3944
+ class="btn btn-default btn-sm"
3945
+ (click)="datePicker.toggleMode(0)"
3946
+ [disabled]="datePicker.datepickerMode === maxMode"
3947
+ [ngClass]="{ disabled: datePicker.datepickerMode === maxMode }"
3948
+ tabindex="-1"
3949
+ style="width:100%;"
3950
+ >
3951
+ <strong>{{ title }}</strong>
3952
+ </button>
3953
+ </th>
3954
+ <th>
3955
+ <button type="button" class="btn btn-default btn-sm pull-right float-right" (click)="datePicker.move(1)" tabindex="-1">
3956
+
3957
+ </button>
3958
+ </th>
3959
+ </tr>
3960
+ </thead>
3961
+ <tbody>
3962
+ <tr *ngFor="let rowz of rows">
3963
+ <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [attr.id]="dtz.uid" [ngClass]="dtz.customClass">
3964
+ <button
3965
+ type="button"
3966
+ style="min-width:100%;"
3967
+ class="btn btn-default"
3968
+ [ngClass]="{
3969
+ 'btn-link': isBs4 && !dtz.selected && !datePicker.isActive(dtz),
3970
+ 'btn-info': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)),
3971
+ disabled: dtz.disabled,
3972
+ active: !isBs4 && datePicker.isActive(dtz)
3973
+ }"
3974
+ [disabled]="dtz.disabled"
3975
+ (click)="datePicker.select(dtz.date)"
3976
+ tabindex="-1"
3977
+ >
3978
+ <span [ngClass]="{ 'text-success': isBs4 && dtz.current, 'text-info': !isBs4 && dtz.current }">{{ dtz.label }}</span>
3979
+ </button>
3980
+ </td>
3981
+ </tr>
3982
+ </tbody>
3983
+ </table>
3984
+ `, styles: [":host .btn-info .text-success{color:#fff!important}\n"] }]
3985
+ }], ctorParameters: function () { return [{ type: DatePickerInnerComponent }]; } });
3986
+
3987
+ // @deprecated
3988
+ class YearPickerComponent {
3989
+ constructor(datePicker) {
3990
+ this.rows = [];
3991
+ this.datePicker = datePicker;
3992
+ }
3993
+ get isBs4() {
3994
+ return !isBs3();
3995
+ }
3996
+ ngOnInit() {
3997
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
3998
+ const self = this;
3999
+ this.datePicker.stepYear = { years: this.datePicker.yearRange };
4000
+ this.datePicker.setRefreshViewHandler(function () {
4001
+ const years = new Array(this.yearRange);
4002
+ let date;
4003
+ const start = self.getStartingYear(this.activeDate.getFullYear());
4004
+ for (let i = 0; i < this.yearRange; i++) {
4005
+ date = new Date(start + i, 0, 1);
4006
+ date = this.fixTimeZone(date);
4007
+ years[i] = this.createDateObject(date, this.formatYear);
4008
+ years[i].uid = this.uniqueId + '-' + i;
4009
+ }
4010
+ self.title = [years[0].label, years[this.yearRange - 1].label].join(' - ');
4011
+ self.rows = this.split(years, self.datePicker.yearColLimit);
4012
+ }, 'year');
4013
+ this.datePicker.setCompareHandler(function (date1, date2) {
4014
+ return date1.getFullYear() - date2.getFullYear();
4015
+ }, 'year');
4016
+ this.datePicker.refreshView();
4017
+ }
4018
+ getStartingYear(year) {
4019
+ // todo: parseInt
4020
+ return ((year - 1) / this.datePicker.yearRange) * this.datePicker.yearRange + 1;
4021
+ }
4022
+ }
4023
+ YearPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: YearPickerComponent, deps: [{ token: DatePickerInnerComponent }], target: i0.ɵɵFactoryTarget.Component });
4024
+ YearPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: YearPickerComponent, selector: "yearpicker", ngImport: i0, template: `
4025
+ <table *ngIf="datePicker.datepickerMode === 'year'" role="grid">
4026
+ <thead>
4027
+ <tr>
4028
+ <th>
4029
+ <button type="button" class="btn btn-default btn-sm pull-left float-left" (click)="datePicker.move(-1)" tabindex="-1">‹</button>
4030
+ </th>
4031
+ <th [attr.colspan]="datePicker.yearColLimit - 2 <= 0 ? 1 : datePicker.yearColLimit - 2">
4032
+ <button
4033
+ [id]="datePicker.uniqueId + '-title'"
4034
+ role="heading"
4035
+ type="button"
4036
+ class="btn btn-default btn-sm"
4037
+ (click)="datePicker.toggleMode(0)"
4038
+ [disabled]="datePicker.datepickerMode === datePicker.maxMode"
4039
+ [ngClass]="{ disabled: datePicker.datepickerMode === datePicker.maxMode }"
4040
+ tabindex="-1"
4041
+ style="width:100%;"
4042
+ >
4043
+ <strong>{{ title }}</strong>
4044
+ </button>
4045
+ </th>
4046
+ <th>
4047
+ <button type="button" class="btn btn-default btn-sm pull-right float-right" (click)="datePicker.move(1)" tabindex="-1">
4048
+
4049
+ </button>
4050
+ </th>
4051
+ </tr>
4052
+ </thead>
4053
+ <tbody>
4054
+ <tr *ngFor="let rowz of rows">
4055
+ <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [attr.id]="dtz.uid">
4056
+ <button
4057
+ type="button"
4058
+ style="min-width:100%;"
4059
+ class="btn btn-default"
4060
+ [ngClass]="{
4061
+ 'btn-link': isBs4 && !dtz.selected && !datePicker.isActive(dtz),
4062
+ 'btn-info': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)),
4063
+ disabled: dtz.disabled,
4064
+ active: !isBs4 && datePicker.isActive(dtz)
4065
+ }"
4066
+ [disabled]="dtz.disabled"
4067
+ (click)="datePicker.select(dtz.date)"
4068
+ tabindex="-1"
4069
+ >
4070
+ <span [ngClass]="{ 'text-success': isBs4 && dtz.current, 'text-info': !isBs4 && dtz.current }">{{ dtz.label }}</span>
4071
+ </button>
4072
+ </td>
4073
+ </tr>
4074
+ </tbody>
4075
+ </table>
4076
+ `, isInline: true, styles: [":host .btn-info .text-success{color:#fff!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
4077
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: YearPickerComponent, decorators: [{
4078
+ type: Component,
4079
+ args: [{ selector: 'yearpicker', template: `
4080
+ <table *ngIf="datePicker.datepickerMode === 'year'" role="grid">
4081
+ <thead>
4082
+ <tr>
4083
+ <th>
4084
+ <button type="button" class="btn btn-default btn-sm pull-left float-left" (click)="datePicker.move(-1)" tabindex="-1">‹</button>
4085
+ </th>
4086
+ <th [attr.colspan]="datePicker.yearColLimit - 2 <= 0 ? 1 : datePicker.yearColLimit - 2">
4087
+ <button
4088
+ [id]="datePicker.uniqueId + '-title'"
4089
+ role="heading"
4090
+ type="button"
4091
+ class="btn btn-default btn-sm"
4092
+ (click)="datePicker.toggleMode(0)"
4093
+ [disabled]="datePicker.datepickerMode === datePicker.maxMode"
4094
+ [ngClass]="{ disabled: datePicker.datepickerMode === datePicker.maxMode }"
4095
+ tabindex="-1"
4096
+ style="width:100%;"
4097
+ >
4098
+ <strong>{{ title }}</strong>
4099
+ </button>
4100
+ </th>
4101
+ <th>
4102
+ <button type="button" class="btn btn-default btn-sm pull-right float-right" (click)="datePicker.move(1)" tabindex="-1">
4103
+
4104
+ </button>
4105
+ </th>
4106
+ </tr>
4107
+ </thead>
4108
+ <tbody>
4109
+ <tr *ngFor="let rowz of rows">
4110
+ <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [attr.id]="dtz.uid">
4111
+ <button
4112
+ type="button"
4113
+ style="min-width:100%;"
4114
+ class="btn btn-default"
4115
+ [ngClass]="{
4116
+ 'btn-link': isBs4 && !dtz.selected && !datePicker.isActive(dtz),
4117
+ 'btn-info': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)),
4118
+ disabled: dtz.disabled,
4119
+ active: !isBs4 && datePicker.isActive(dtz)
4120
+ }"
4121
+ [disabled]="dtz.disabled"
4122
+ (click)="datePicker.select(dtz.date)"
4123
+ tabindex="-1"
4124
+ >
4125
+ <span [ngClass]="{ 'text-success': isBs4 && dtz.current, 'text-info': !isBs4 && dtz.current }">{{ dtz.label }}</span>
4126
+ </button>
4127
+ </td>
4128
+ </tr>
4129
+ </tbody>
4130
+ </table>
4131
+ `, styles: [":host .btn-info .text-success{color:#fff!important}\n"] }]
4132
+ }], ctorParameters: function () { return [{ type: DatePickerInnerComponent }]; } });
4133
+
4134
+ const DATEPICKER_CONTROL_VALUE_ACCESSOR = {
4135
+ provide: NG_VALUE_ACCESSOR,
4136
+ useExisting: forwardRef(() => DatePickerComponent),
4137
+ multi: true
4138
+ };
4139
+ /* tslint:enable:component-selector-name component-selector-type */
4140
+ class DatePickerComponent {
4141
+ constructor(config) {
4142
+ /** sets datepicker mode, supports: `day`, `month`, `year` */
4143
+ this.datepickerMode = 'day';
4144
+ /** if false week numbers will be hidden */
4145
+ this.showWeeks = true;
4146
+ this.selectionDone = new EventEmitter(undefined);
4147
+ /** callback to invoke when the activeDate is changed. */
4148
+ this.activeDateChange = new EventEmitter(undefined);
4149
+ /* tslint:disable-next-line: no-any*/
4150
+ this.onChange = Function.prototype;
4151
+ /* tslint:disable-next-line: no-any*/
4152
+ this.onTouched = Function.prototype;
4153
+ this._now = new Date();
4154
+ this.config = config;
4155
+ this.configureOptions();
4156
+ }
4157
+ /** currently active date */
4158
+ get activeDate() {
4159
+ return this._activeDate || this._now;
4160
+ }
4161
+ set activeDate(value) {
4162
+ this._activeDate = value;
4163
+ }
4164
+ configureOptions() {
4165
+ Object.assign(this, this.config);
4166
+ }
4167
+ onUpdate(event) {
4168
+ this.activeDate = event;
4169
+ this.onChange(event);
4170
+ }
4171
+ onSelectionDone(event) {
4172
+ this.selectionDone.emit(event);
4173
+ }
4174
+ onActiveDateChange(event) {
4175
+ this.activeDateChange.emit(event);
4176
+ }
4177
+ // todo: support null value
4178
+ /* tslint:disable-next-line: no-any*/
4179
+ writeValue(value) {
4180
+ if (this._datePicker.compare(value, this._activeDate) === 0) {
4181
+ return;
4182
+ }
4183
+ if (value && value instanceof Date) {
4184
+ this.activeDate = value;
4185
+ this._datePicker.select(value, false);
4186
+ return;
4187
+ }
4188
+ this.activeDate = (value ? new Date(value) : void 0);
4189
+ }
4190
+ registerOnChange(fn) {
4191
+ this.onChange = fn;
4192
+ }
4193
+ registerOnTouched(fn) {
4194
+ this.onTouched = fn;
4195
+ }
4196
+ }
4197
+ DatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: DatePickerComponent, deps: [{ token: DatepickerConfig }], target: i0.ɵɵFactoryTarget.Component });
4198
+ DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: DatePickerComponent, selector: "datepicker", inputs: { datepickerMode: "datepickerMode", initDate: "initDate", minDate: "minDate", maxDate: "maxDate", minMode: "minMode", maxMode: "maxMode", showWeeks: "showWeeks", formatDay: "formatDay", formatMonth: "formatMonth", formatYear: "formatYear", formatDayHeader: "formatDayHeader", formatDayTitle: "formatDayTitle", formatMonthTitle: "formatMonthTitle", startingDay: "startingDay", yearRange: "yearRange", onlyCurrentMonth: "onlyCurrentMonth", shortcutPropagation: "shortcutPropagation", monthColLimit: "monthColLimit", yearColLimit: "yearColLimit", customClass: "customClass", dateDisabled: "dateDisabled", dayDisabled: "dayDisabled", activeDate: "activeDate" }, outputs: { selectionDone: "selectionDone", activeDateChange: "activeDateChange" }, providers: [DATEPICKER_CONTROL_VALUE_ACCESSOR], viewQueries: [{ propertyName: "_datePicker", first: true, predicate: DatePickerInnerComponent, descendants: true, static: true }], ngImport: i0, template: `
4199
+ <datepicker-inner
4200
+ [activeDate]="activeDate"
4201
+ (update)="onUpdate($event)"
4202
+ [locale]="config.locale"
4203
+ [datepickerMode]="datepickerMode"
4204
+ [initDate]="initDate"
4205
+ [minDate]="minDate"
4206
+ [maxDate]="maxDate"
4207
+ [minMode]="minMode"
4208
+ [maxMode]="maxMode"
4209
+ [showWeeks]="showWeeks"
4210
+ [formatDay]="formatDay"
4211
+ [formatMonth]="formatMonth"
4212
+ [formatYear]="formatYear"
4213
+ [formatDayHeader]="formatDayHeader"
4214
+ [formatDayTitle]="formatDayTitle"
4215
+ [formatMonthTitle]="formatMonthTitle"
4216
+ [startingDay]="startingDay"
4217
+ [yearRange]="yearRange"
4218
+ [customClass]="customClass"
4219
+ [dateDisabled]="dateDisabled"
4220
+ [dayDisabled]="dayDisabled"
4221
+ [onlyCurrentMonth]="onlyCurrentMonth"
4222
+ [shortcutPropagation]="shortcutPropagation"
4223
+ [monthColLimit]="monthColLimit"
4224
+ [yearColLimit]="yearColLimit"
4225
+ (selectionDone)="onSelectionDone($event)"
4226
+ (activeDateChange)="onActiveDateChange($event)"
4227
+ >
4228
+ <daypicker tabindex="0"></daypicker>
4229
+ <monthpicker tabindex="0"></monthpicker>
4230
+ <yearpicker tabindex="0"></yearpicker>
4231
+ </datepicker-inner>
4232
+ `, isInline: true, dependencies: [{ kind: "component", type: DatePickerInnerComponent, selector: "datepicker-inner", inputs: ["locale", "datepickerMode", "startingDay", "yearRange", "minDate", "maxDate", "minMode", "maxMode", "showWeeks", "formatDay", "formatMonth", "formatYear", "formatDayHeader", "formatDayTitle", "formatMonthTitle", "onlyCurrentMonth", "shortcutPropagation", "customClass", "monthColLimit", "yearColLimit", "dateDisabled", "dayDisabled", "initDate", "activeDate"], outputs: ["selectionDone", "update", "activeDateChange"] }, { kind: "component", type: DayPickerComponent, selector: "daypicker" }, { kind: "component", type: MonthPickerComponent, selector: "monthpicker" }, { kind: "component", type: YearPickerComponent, selector: "yearpicker" }] });
4233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: DatePickerComponent, decorators: [{
4234
+ type: Component,
4235
+ args: [{
4236
+ // eslint-disable-next-line @angular-eslint/component-selector
4237
+ selector: 'datepicker',
4238
+ template: `
4239
+ <datepicker-inner
4240
+ [activeDate]="activeDate"
4241
+ (update)="onUpdate($event)"
4242
+ [locale]="config.locale"
4243
+ [datepickerMode]="datepickerMode"
4244
+ [initDate]="initDate"
4245
+ [minDate]="minDate"
4246
+ [maxDate]="maxDate"
4247
+ [minMode]="minMode"
4248
+ [maxMode]="maxMode"
4249
+ [showWeeks]="showWeeks"
4250
+ [formatDay]="formatDay"
4251
+ [formatMonth]="formatMonth"
4252
+ [formatYear]="formatYear"
4253
+ [formatDayHeader]="formatDayHeader"
4254
+ [formatDayTitle]="formatDayTitle"
4255
+ [formatMonthTitle]="formatMonthTitle"
4256
+ [startingDay]="startingDay"
4257
+ [yearRange]="yearRange"
4258
+ [customClass]="customClass"
4259
+ [dateDisabled]="dateDisabled"
4260
+ [dayDisabled]="dayDisabled"
4261
+ [onlyCurrentMonth]="onlyCurrentMonth"
4262
+ [shortcutPropagation]="shortcutPropagation"
4263
+ [monthColLimit]="monthColLimit"
4264
+ [yearColLimit]="yearColLimit"
4265
+ (selectionDone)="onSelectionDone($event)"
4266
+ (activeDateChange)="onActiveDateChange($event)"
4267
+ >
4268
+ <daypicker tabindex="0"></daypicker>
4269
+ <monthpicker tabindex="0"></monthpicker>
4270
+ <yearpicker tabindex="0"></yearpicker>
4271
+ </datepicker-inner>
4272
+ `,
4273
+ providers: [DATEPICKER_CONTROL_VALUE_ACCESSOR]
4274
+ }]
4275
+ }], ctorParameters: function () { return [{ type: DatepickerConfig }]; }, propDecorators: { datepickerMode: [{
4276
+ type: Input
4277
+ }], initDate: [{
4278
+ type: Input
4279
+ }], minDate: [{
4280
+ type: Input
4281
+ }], maxDate: [{
4282
+ type: Input
4283
+ }], minMode: [{
4284
+ type: Input
4285
+ }], maxMode: [{
4286
+ type: Input
4287
+ }], showWeeks: [{
4288
+ type: Input
4289
+ }], formatDay: [{
4290
+ type: Input
4291
+ }], formatMonth: [{
4292
+ type: Input
4293
+ }], formatYear: [{
4294
+ type: Input
4295
+ }], formatDayHeader: [{
4296
+ type: Input
4297
+ }], formatDayTitle: [{
4298
+ type: Input
4299
+ }], formatMonthTitle: [{
4300
+ type: Input
4301
+ }], startingDay: [{
4302
+ type: Input
4303
+ }], yearRange: [{
4304
+ type: Input
4305
+ }], onlyCurrentMonth: [{
4306
+ type: Input
4307
+ }], shortcutPropagation: [{
4308
+ type: Input
4309
+ }], monthColLimit: [{
4310
+ type: Input
4311
+ }], yearColLimit: [{
4312
+ type: Input
4313
+ }], customClass: [{
4314
+ type: Input
4315
+ }], dateDisabled: [{
4316
+ type: Input
4317
+ }], dayDisabled: [{
4318
+ type: Input
4319
+ }], activeDate: [{
4320
+ type: Input
4321
+ }], selectionDone: [{
4322
+ type: Output
4323
+ }], activeDateChange: [{
4324
+ type: Output
4325
+ }], _datePicker: [{
4326
+ type: ViewChild,
4327
+ args: [DatePickerInnerComponent, { static: true }]
4328
+ }] } });
4329
+
3205
4330
  const DEFAULT_MIN_DATE = new Date('0000-01-01');
3206
4331
  const DEFAULT_MAX_DATE = new Date('9999-12-31');
3207
4332
  class DateInputComponent {
@@ -3373,7 +4498,7 @@ DateInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", versi
3373
4498
  DateInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: DateInputComponent, selector: "lx-date-input", inputs: { date: "date", dateString: "dateString", valueAccessor: "valueAccessor", inputId: "inputId", renderingStyle: "renderingStyle", placeholder: "placeholder", cdk: "cdk", datepickerMode: "datepickerMode", initDateString: "initDateString", minDate: "minDate", maxDate: "maxDate", minMode: "minMode", maxMode: "maxMode", showWeeks: "showWeeks", formatDay: "formatDay", formatMonth: "formatMonth", formatYear: "formatYear", formatDayHeader: "formatDayHeader", formatDayTitle: "formatDayTitle", formatMonthTitle: "formatMonthTitle", startingDay: "startingDay", yearRange: "yearRange", onlyCurrentMonth: "onlyCurrentMonth", shortcutPropagation: "shortcutPropagation", customClass: "customClass", disabled: "disabled", dateDisabled: "dateDisabled", autoFocus: "autoFocus" }, outputs: { dateChange: "dateChange", dateStringChange: "dateStringChange", closeDateInput: "closeDateInput" }, providers: [
3374
4499
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateInputComponent), multi: true },
3375
4500
  { provide: NG_VALIDATORS, useExisting: forwardRef(() => DateInputComponent), multi: true }
3376
- ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"cdk; else withoutCdkOverlay\">\n <span\n class=\"wrapper\"\n [class.forLink]=\"renderingStyle === 'LINK'\"\n [class.has-error]=\"hasError\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n >\n <!-- TODO: The dateInput and datePicker code ist duplicated for cdk and withoutCdK use to solve a placing problem of the\n ngx-bootstrap datepicker component. Writing it in a ng-container led to an unexpected anchoring behavior of the datePicker NOT directly\n below the dateInput element -->\n <input\n #input\n class=\"form-control dateControl\"\n placeholder=\"{{ placeholder }}\"\n [id]=\"inputId\"\n [lxAutofocus]=\"autoFocus\"\n [(ngModel)]=\"dateString\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onDateStringChange($event)\"\n (focus)=\"showPopup()\"\n (blur)=\"onBlur()\"\n (keydown.enter)=\"hidePopup()\"\n (keydown.escape)=\"hidePopup()\"\n (keydown.tab)=\"hidePopup()\"\n (keydown.shift.tab)=\"hidePopup()\"\n [class.text-danger]=\"hasError\"\n *ngIf=\"renderingStyle === 'INPUT'\"\n />\n <a class=\"dateControl\" (click)=\"togglePopup()\" *ngIf=\"renderingStyle === 'LINK'\">{{ date | lxDate : dateFormat }}</a>\n\n <ng-template\n #cdkDatepicker\n cdkConnectedOverlay\n [cdkConnectedOverlayOpen]=\"showDatepicker\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'backdrop'\"\n (backdropClick)=\"hidePopup()\"\n >\n <div class=\"datepickerContainer\">\n <div class=\"calendar\">\n <datepicker\n class=\"popup\"\n (selectionDone)=\"onSelectionDone($event)\"\n [ngModel]=\"date\"\n [datepickerMode]=\"datepickerMode\"\n [initDate]=\"initDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [minMode]=\"minMode\"\n [maxMode]=\"maxMode\"\n [showWeeks]=\"showWeeks\"\n [formatDay]=\"formatDay\"\n [formatMonth]=\"formatMonth\"\n [formatYear]=\"formatYear\"\n [formatDayHeader]=\"formatDayHeader\"\n [formatDayTitle]=\"formatDayTitle\"\n [formatMonthTitle]=\"formatMonthTitle\"\n [startingDay]=\"startingDay\"\n [yearRange]=\"yearRange\"\n [onlyCurrentMonth]=\"onlyCurrentMonth\"\n [shortcutPropagation]=\"shortcutPropagation\"\n [customClass]=\"customClass\"\n [dateDisabled]=\"dateDisabled\"\n >\n </datepicker>\n </div>\n </div>\n </ng-template>\n </span>\n</ng-container>\n\n<ng-template #withoutCdkOverlay>\n <div class=\"legacy\" [class.forLink]=\"renderingStyle === 'LINK'\">\n <div class=\"backdrop\" *ngIf=\"showDatepicker\" (click)=\"hidePopup()\"></div>\n <span class=\"wrapper\" [class.forLink]=\"renderingStyle === 'LINK'\" [class.has-error]=\"hasError\">\n <input\n #input\n class=\"form-control dateControl\"\n placeholder=\"{{ placeholder }}\"\n [id]=\"inputId\"\n [lxAutofocus]=\"autoFocus\"\n [(ngModel)]=\"dateString\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onDateStringChange($event)\"\n (focus)=\"showPopup()\"\n (blur)=\"onBlur()\"\n (keydown.enter)=\"hidePopup()\"\n (keydown.escape)=\"hidePopup()\"\n (keydown.tab)=\"hidePopup()\"\n (keydown.shift.tab)=\"hidePopup()\"\n [class.text-danger]=\"hasError\"\n *ngIf=\"renderingStyle === 'INPUT'\"\n />\n <a class=\"dateControl\" (click)=\"togglePopup()\" *ngIf=\"renderingStyle === 'LINK'\">{{ date | lxDate : dateFormat }}</a>\n <div class=\"datepickerContainer\">\n <div class=\"calendar\">\n <datepicker\n class=\"popup\"\n *ngIf=\"showDatepicker\"\n (selectionDone)=\"onSelectionDone($event)\"\n [ngModel]=\"date\"\n [datepickerMode]=\"datepickerMode\"\n [initDate]=\"initDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [minMode]=\"minMode\"\n [maxMode]=\"maxMode\"\n [showWeeks]=\"showWeeks\"\n [formatDay]=\"formatDay\"\n [formatMonth]=\"formatMonth\"\n [formatYear]=\"formatYear\"\n [formatDayHeader]=\"formatDayHeader\"\n [formatDayTitle]=\"formatDayTitle\"\n [formatMonthTitle]=\"formatMonthTitle\"\n [startingDay]=\"startingDay\"\n [yearRange]=\"yearRange\"\n [onlyCurrentMonth]=\"onlyCurrentMonth\"\n [shortcutPropagation]=\"shortcutPropagation\"\n [customClass]=\"customClass\"\n [dateDisabled]=\"dateDisabled\"\n >\n </datepicker>\n </div>\n </div>\n </span>\n </div>\n</ng-template>\n", styles: [".backdrop{background-color:transparent}.datepickerContainer{z-index:700}.wrapper .forLink .popup{top:15px}.dateControl,.calendar{position:relative}.popup{position:relative;left:0;z-index:700;border-radius:3px}.popup ::ng-deep .text-info{color:#2a303d}.popup ::ng-deep .text-muted{color:#99a5bb}.popup ::ng-deep .btn.active,.popup ::ng-deep .btn.active .text-info{color:#fff;background-color:#2a303d}.popup ::ng-deep .well{margin:0;border:1px solid #2a303d}:host-context(.input-group) .datepickerContainer{top:100%}.legacy .backdrop{position:fixed;z-index:2;inset:0}.legacy .datepickerContainer{position:absolute}.legacy.forLink{display:inline-block}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.DatePickerComponent, selector: "datepicker", inputs: ["datepickerMode", "showWeeks", "activeDate", "initDate", "minDate", "maxDate", "minMode", "maxMode", "formatDay", "formatMonth", "formatYear", "formatDayHeader", "formatDayTitle", "formatMonthTitle", "startingDay", "yearRange", "onlyCurrentMonth", "shortcutPropagation", "monthColLimit", "yearColLimit", "customClass", "dateDisabled", "dayDisabled"], outputs: ["selectionDone", "activeDateChange"] }, { kind: "directive", type: i1$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: AutofocusDirective, selector: "[lxAutofocus]", inputs: ["lxAutofocus", "lxAutofocusPreventScroll", "lxAutofocusTimeout"] }, { kind: "pipe", type: CustomDatePipe, name: "lxDate" }] });
4501
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"cdk; else withoutCdkOverlay\">\n <span\n class=\"wrapper\"\n [class.forLink]=\"renderingStyle === 'LINK'\"\n [class.has-error]=\"hasError\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n >\n <!-- TODO: The dateInput and datePicker code ist duplicated for cdk and withoutCdK use to solve a placing problem of the\n ngx-bootstrap datepicker component. Writing it in a ng-container led to an unexpected anchoring behavior of the datePicker NOT directly\n below the dateInput element -->\n <input\n #input\n class=\"form-control dateControl\"\n placeholder=\"{{ placeholder }}\"\n [id]=\"inputId\"\n [lxAutofocus]=\"autoFocus\"\n [(ngModel)]=\"dateString\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onDateStringChange($event)\"\n (focus)=\"showPopup()\"\n (blur)=\"onBlur()\"\n (keydown.enter)=\"hidePopup()\"\n (keydown.escape)=\"hidePopup()\"\n (keydown.tab)=\"hidePopup()\"\n (keydown.shift.tab)=\"hidePopup()\"\n [class.text-danger]=\"hasError\"\n *ngIf=\"renderingStyle === 'INPUT'\"\n />\n <a class=\"dateControl\" (click)=\"togglePopup()\" *ngIf=\"renderingStyle === 'LINK'\">{{ date | lxDate : dateFormat }}</a>\n\n <ng-template\n #cdkDatepicker\n cdkConnectedOverlay\n [cdkConnectedOverlayOpen]=\"showDatepicker\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'backdrop'\"\n (backdropClick)=\"hidePopup()\"\n >\n <div class=\"datepickerContainer\">\n <div class=\"calendar\">\n <datepicker\n class=\"popup\"\n (selectionDone)=\"onSelectionDone($event)\"\n [ngModel]=\"date\"\n [datepickerMode]=\"datepickerMode\"\n [initDate]=\"initDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [minMode]=\"minMode\"\n [maxMode]=\"maxMode\"\n [showWeeks]=\"showWeeks\"\n [formatDay]=\"formatDay\"\n [formatMonth]=\"formatMonth\"\n [formatYear]=\"formatYear\"\n [formatDayHeader]=\"formatDayHeader\"\n [formatDayTitle]=\"formatDayTitle\"\n [formatMonthTitle]=\"formatMonthTitle\"\n [startingDay]=\"startingDay\"\n [yearRange]=\"yearRange\"\n [onlyCurrentMonth]=\"onlyCurrentMonth\"\n [shortcutPropagation]=\"shortcutPropagation\"\n [customClass]=\"customClass\"\n [dateDisabled]=\"dateDisabled\"\n >\n </datepicker>\n </div>\n </div>\n </ng-template>\n </span>\n</ng-container>\n\n<ng-template #withoutCdkOverlay>\n <div class=\"legacy\" [class.forLink]=\"renderingStyle === 'LINK'\">\n <div class=\"backdrop\" *ngIf=\"showDatepicker\" (click)=\"hidePopup()\"></div>\n <span class=\"wrapper\" [class.forLink]=\"renderingStyle === 'LINK'\" [class.has-error]=\"hasError\">\n <input\n #input\n class=\"form-control dateControl\"\n placeholder=\"{{ placeholder }}\"\n [id]=\"inputId\"\n [lxAutofocus]=\"autoFocus\"\n [(ngModel)]=\"dateString\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onDateStringChange($event)\"\n (focus)=\"showPopup()\"\n (blur)=\"onBlur()\"\n (keydown.enter)=\"hidePopup()\"\n (keydown.escape)=\"hidePopup()\"\n (keydown.tab)=\"hidePopup()\"\n (keydown.shift.tab)=\"hidePopup()\"\n [class.text-danger]=\"hasError\"\n *ngIf=\"renderingStyle === 'INPUT'\"\n />\n <a class=\"dateControl\" (click)=\"togglePopup()\" *ngIf=\"renderingStyle === 'LINK'\">{{ date | lxDate : dateFormat }}</a>\n <div class=\"datepickerContainer\">\n <div class=\"calendar\">\n <datepicker\n class=\"popup\"\n *ngIf=\"showDatepicker\"\n (selectionDone)=\"onSelectionDone($event)\"\n [ngModel]=\"date\"\n [datepickerMode]=\"datepickerMode\"\n [initDate]=\"initDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [minMode]=\"minMode\"\n [maxMode]=\"maxMode\"\n [showWeeks]=\"showWeeks\"\n [formatDay]=\"formatDay\"\n [formatMonth]=\"formatMonth\"\n [formatYear]=\"formatYear\"\n [formatDayHeader]=\"formatDayHeader\"\n [formatDayTitle]=\"formatDayTitle\"\n [formatMonthTitle]=\"formatMonthTitle\"\n [startingDay]=\"startingDay\"\n [yearRange]=\"yearRange\"\n [onlyCurrentMonth]=\"onlyCurrentMonth\"\n [shortcutPropagation]=\"shortcutPropagation\"\n [customClass]=\"customClass\"\n [dateDisabled]=\"dateDisabled\"\n >\n </datepicker>\n </div>\n </div>\n </span>\n </div>\n</ng-template>\n", styles: [".backdrop{background-color:transparent}.datepickerContainer{z-index:700}.wrapper .forLink .popup{top:15px}.dateControl,.calendar{position:relative}.popup{position:relative;left:0;z-index:700;border-radius:3px}.popup ::ng-deep .text-info{color:#2a303d}.popup ::ng-deep .text-muted{color:#99a5bb}.popup ::ng-deep .btn.active,.popup ::ng-deep .btn.active .text-info{color:#fff;background-color:#2a303d}.popup ::ng-deep .well{margin:0;border:1px solid #2a303d}:host-context(.input-group) .datepickerContainer{top:100%}.legacy .backdrop{position:fixed;z-index:2;inset:0}.legacy .datepickerContainer{position:absolute}.legacy.forLink{display:inline-block}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DatePickerComponent, selector: "datepicker", inputs: ["datepickerMode", "initDate", "minDate", "maxDate", "minMode", "maxMode", "showWeeks", "formatDay", "formatMonth", "formatYear", "formatDayHeader", "formatDayTitle", "formatMonthTitle", "startingDay", "yearRange", "onlyCurrentMonth", "shortcutPropagation", "monthColLimit", "yearColLimit", "customClass", "dateDisabled", "dayDisabled", "activeDate"], outputs: ["selectionDone", "activeDateChange"] }, { kind: "directive", type: i1$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: AutofocusDirective, selector: "[lxAutofocus]", inputs: ["lxAutofocus", "lxAutofocusPreventScroll", "lxAutofocusTimeout"] }, { kind: "pipe", type: CustomDatePipe, name: "lxDate" }] });
3377
4502
  __decorate([
3378
4503
  Observe('initDateString')
3379
4504
  ], DateInputComponent.prototype, "initDateString$", void 0);
@@ -3458,6 +4583,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImpor
3458
4583
  args: ['input']
3459
4584
  }] } });
3460
4585
 
4586
+ class DatepickerUiModule {
4587
+ static forRoot() {
4588
+ return { ngModule: DatepickerUiModule, providers: [DatepickerConfig] };
4589
+ }
4590
+ }
4591
+ DatepickerUiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: DatepickerUiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4592
+ DatepickerUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.1", ngImport: i0, type: DatepickerUiModule, declarations: [DatePickerComponent, DatePickerInnerComponent, DayPickerComponent, MonthPickerComponent, YearPickerComponent], imports: [CommonModule, FormsModule], exports: [DatePickerComponent, DatePickerInnerComponent, DayPickerComponent, MonthPickerComponent, YearPickerComponent] });
4593
+ DatepickerUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: DatepickerUiModule, imports: [CommonModule, FormsModule] });
4594
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: DatepickerUiModule, decorators: [{
4595
+ type: NgModule,
4596
+ args: [{
4597
+ imports: [CommonModule, FormsModule],
4598
+ declarations: [DatePickerComponent, DatePickerInnerComponent, DayPickerComponent, MonthPickerComponent, YearPickerComponent],
4599
+ exports: [DatePickerComponent, DatePickerInnerComponent, DayPickerComponent, MonthPickerComponent, YearPickerComponent],
4600
+ entryComponents: [DatePickerComponent]
4601
+ }]
4602
+ }] });
4603
+
3461
4604
  class DragAndDropListItemComponent {
3462
4605
  constructor(element) {
3463
4606
  this.element = element;
@@ -6099,8 +7242,7 @@ LxFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
6099
7242
  ErrorMessageComponent,
6100
7243
  FormSubmitDirective], imports: [CommonModule,
6101
7244
  FormsModule,
6102
- ReactiveFormsModule, i1$2.TranslateModule, DatepickerModule,
6103
- InfiniteScrollModule,
7245
+ ReactiveFormsModule, i1$2.TranslateModule, DatepickerUiModule, InfiniteScrollModule,
6104
7246
  ClipboardModule,
6105
7247
  OverlayModule,
6106
7248
  LxCoreUiModule,
@@ -6149,7 +7291,7 @@ LxFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
6149
7291
  FormsModule,
6150
7292
  ReactiveFormsModule,
6151
7293
  TranslateModule.forChild(),
6152
- DatepickerModule,
7294
+ DatepickerUiModule.forRoot(),
6153
7295
  InfiniteScrollModule,
6154
7296
  ClipboardModule,
6155
7297
  OverlayModule,
@@ -6206,7 +7348,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImpor
6206
7348
  FormsModule,
6207
7349
  ReactiveFormsModule,
6208
7350
  TranslateModule.forChild(),
6209
- DatepickerModule,
7351
+ DatepickerUiModule.forRoot(),
6210
7352
  InfiniteScrollModule,
6211
7353
  ClipboardModule,
6212
7354
  OverlayModule,