mis-crystal-design-system 18.2.13 → 18.2.16-test
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/datepicker_v2/tz-dp-container/tz-dp-container.component.d.ts +1 -0
- package/daterangepicker_v2/daterangepicker-constants.d.ts +4 -0
- package/daterangepicker_v2/daterangepicker.module.d.ts +9 -8
- package/daterangepicker_v2/models/drp-config.model.d.ts +14 -0
- package/daterangepicker_v2/public_api.d.ts +3 -1
- package/daterangepicker_v2/tz-daterangepicker.directive.d.ts +2 -1
- package/daterangepicker_v2/tz-drp-container/tz-drp-container.component.d.ts +24 -1
- package/daterangepicker_v2/tz-drp-mobile-container/tz-drp-mobile-container.component.d.ts +13 -0
- package/esm2022/datepicker_v2/tz-dp-container/tz-dp-container.component.mjs +49 -33
- package/esm2022/daterangepicker_v2/daterangepicker-constants.mjs +12 -1
- package/esm2022/daterangepicker_v2/daterangepicker.module.mjs +5 -4
- package/esm2022/daterangepicker_v2/models/drp-config.model.mjs +1 -1
- package/esm2022/daterangepicker_v2/public_api.mjs +3 -1
- package/esm2022/daterangepicker_v2/tz-daterangepicker.directive.mjs +8 -3
- package/esm2022/daterangepicker_v2/tz-drp-container/tz-drp-container.component.mjs +177 -50
- package/esm2022/daterangepicker_v2/tz-drp-mobile-container/tz-drp-mobile-container.component.mjs +267 -0
- package/esm2022/specificdatepicker/models/sdp-config.model.mjs +1 -1
- package/esm2022/specificdatepicker/specificdatepicker.module.mjs +4 -5
- package/esm2022/specificdatepicker/tz-sdp-container/tz-sdp-container.component.mjs +277 -225
- package/esm2022/specificdatepicker/tz-specificdatepicker.directive.mjs +33 -31
- package/esm2022/table/table.component.mjs +62 -63
- package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs +48 -32
- package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs +464 -61
- package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs +311 -257
- package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-table.mjs +61 -62
- package/fesm2022/mis-crystal-design-system-table.mjs.map +1 -1
- package/package.json +7 -7
- package/specificdatepicker/models/sdp-config.model.d.ts +1 -0
- package/specificdatepicker/specificdatepicker.module.d.ts +2 -3
- package/specificdatepicker/tz-sdp-container/tz-sdp-container.component.d.ts +10 -9
- package/specificdatepicker/tz-specificdatepicker.directive.d.ts +4 -2
|
@@ -49,6 +49,7 @@ export declare class TzDpContainerComponent implements OnInit {
|
|
|
49
49
|
currentMonth: import("@angular/core").Signal<ICurrentMonth>;
|
|
50
50
|
currentYearNumber: import("@angular/core").Signal<number>;
|
|
51
51
|
currentMonthDates: import("@angular/core").Signal<ICurrentMonthDates[]>;
|
|
52
|
+
currentMonthWeeks: import("@angular/core").Signal<ICurrentMonthDates[][]>;
|
|
52
53
|
isPreviousMonthDisabled: import("@angular/core").Signal<boolean>;
|
|
53
54
|
isNextMonthDisabled: import("@angular/core").Signal<boolean>;
|
|
54
55
|
localSelectedDate: import("@angular/core").Signal<ICurrentMonthDates>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @format */
|
|
2
2
|
import { InjectionToken } from "@angular/core";
|
|
3
|
+
import type { IDayOption } from "./models/drp-config.model";
|
|
3
4
|
export declare const CONTAINER_DATA: InjectionToken<{}>;
|
|
4
5
|
export declare const DATE_FORMAT = "DD-MM-YYYY";
|
|
5
6
|
export declare const ISO_DATE_FORMAT = "YYYY-MM-DD";
|
|
@@ -30,3 +31,6 @@ export declare const SELECTION_MODE: {
|
|
|
30
31
|
readonly WEEKLY: "weekly";
|
|
31
32
|
};
|
|
32
33
|
export type SelectionMode = (typeof SELECTION_MODE)[keyof typeof SELECTION_MODE];
|
|
34
|
+
/** Default caption shown before the day chips. */
|
|
35
|
+
export declare const DEFAULT_DAY_SELECTION_LABEL = "Include Days:";
|
|
36
|
+
export declare const DEFAULT_DAY_OPTIONS: IDayOption[];
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./tz-drp-container/tz-drp-container.component";
|
|
3
|
-
import * as i2 from "./tz-
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "@angular/
|
|
6
|
-
import * as i5 from "@angular/
|
|
7
|
-
import * as i6 from "
|
|
8
|
-
import * as i7 from "mis-crystal-design-system/
|
|
9
|
-
import * as i8 from "
|
|
3
|
+
import * as i2 from "./tz-drp-mobile-container/tz-drp-mobile-container.component";
|
|
4
|
+
import * as i3 from "./tz-daterangepicker.directive";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "@angular/forms";
|
|
7
|
+
import * as i6 from "@angular/cdk/overlay";
|
|
8
|
+
import * as i7 from "mis-crystal-design-system/toast";
|
|
9
|
+
import * as i8 from "mis-crystal-design-system/button";
|
|
10
|
+
import * as i9 from "@angular/cdk/a11y";
|
|
10
11
|
export declare class DateRangepickerModuleV2 {
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangepickerModuleV2, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DateRangepickerModuleV2, [typeof i1.TzDrpContainerComponent, typeof i2.TzDaterangepickerDirective], [typeof
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DateRangepickerModuleV2, [typeof i1.TzDrpContainerComponent, typeof i2.TzDrpMobileContainerComponent, typeof i3.TzDaterangepickerDirective], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i6.OverlayModule, typeof i7.ToastModule, typeof i8.ButtonModule, typeof i9.A11yModule], [typeof i1.TzDrpContainerComponent, typeof i2.TzDrpMobileContainerComponent, typeof i3.TzDaterangepickerDirective]>;
|
|
13
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<DateRangepickerModuleV2>;
|
|
14
15
|
}
|
|
@@ -8,11 +8,22 @@ export interface IDatePickerConfig {
|
|
|
8
8
|
ranges?: RangeItem[];
|
|
9
9
|
enableTime?: boolean;
|
|
10
10
|
selectionMode?: SelectionMode;
|
|
11
|
+
showDaySelection?: boolean;
|
|
12
|
+
/** Chips to render, in display order. Defaults to DEFAULT_DAY_OPTIONS. */
|
|
13
|
+
dayOptions?: IDayOption[];
|
|
14
|
+
/** Disables Apply until at least one day is selected. */
|
|
15
|
+
daySelectionRequired?: boolean;
|
|
16
|
+
/** Caption before the chips. Defaults to "Include Days:". */
|
|
17
|
+
daySelectionLabel?: string;
|
|
11
18
|
}
|
|
12
19
|
export interface RangeItem {
|
|
13
20
|
label: string;
|
|
14
21
|
value: [Date, Date];
|
|
15
22
|
}
|
|
23
|
+
export interface IDayOption {
|
|
24
|
+
label: string;
|
|
25
|
+
value: number;
|
|
26
|
+
}
|
|
16
27
|
export interface IDatePickerData {
|
|
17
28
|
dates: ISelectedDatesConfig;
|
|
18
29
|
dpConfig: Partial<IDatePickerConfig>;
|
|
@@ -21,6 +32,7 @@ export interface IDatePickerData {
|
|
|
21
32
|
selectedRangeLabel?: string;
|
|
22
33
|
showPrevMonth?: boolean;
|
|
23
34
|
enableDateTabbing?: boolean;
|
|
35
|
+
isMobileView?: boolean;
|
|
24
36
|
dateChange: (date: ISelectedDatesConfig) => void;
|
|
25
37
|
close: () => void;
|
|
26
38
|
}
|
|
@@ -47,4 +59,6 @@ export interface ISelectedDatesConfig {
|
|
|
47
59
|
startDate: string | null;
|
|
48
60
|
endDate: string | null;
|
|
49
61
|
selectedRangeLabel?: string;
|
|
62
|
+
/** Selected day values, in dayOptions order. Also used to pre-select. */
|
|
63
|
+
selectedDays?: number[];
|
|
50
64
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { TzDrpContainerComponent } from "./tz-drp-container/tz-drp-container.component";
|
|
2
|
+
export { TzDrpMobileContainerComponent } from "./tz-drp-mobile-container/tz-drp-mobile-container.component";
|
|
2
3
|
export { DateRangepickerModuleV2 } from "./daterangepicker.module";
|
|
3
4
|
export { TzDaterangepickerDirective } from "./tz-daterangepicker.directive";
|
|
4
|
-
export { IDatePickerConfig, IDatePickerToastText } from "./models/drp-config.model";
|
|
5
|
+
export { IDatePickerConfig, IDatePickerToastText, IDayOption, ISelectedDatesConfig, RangeItem } from "./models/drp-config.model";
|
|
5
6
|
export { SELECTION_MODE, type SelectionMode } from "./daterangepicker-constants";
|
|
7
|
+
export { DEFAULT_DAY_OPTIONS, DEFAULT_DAY_SELECTION_LABEL } from "./daterangepicker-constants";
|
|
@@ -14,6 +14,7 @@ export declare class TzDaterangepickerDirective {
|
|
|
14
14
|
selectedRangeLabel: import("@angular/core").InputSignal<string>;
|
|
15
15
|
dateMessages: import("@angular/core").InputSignal<IDatePickerToastText[]>;
|
|
16
16
|
enableDateTabbing: import("@angular/core").InputSignal<boolean>;
|
|
17
|
+
isMobileView: import("@angular/core").InputSignal<boolean>;
|
|
17
18
|
positionX: import("@angular/core").InputSignal<"start" | "center" | "end">;
|
|
18
19
|
positionY: import("@angular/core").InputSignal<"center" | "top" | "bottom">;
|
|
19
20
|
offsetX: import("@angular/core").InputSignal<number>;
|
|
@@ -29,5 +30,5 @@ export declare class TzDaterangepickerDirective {
|
|
|
29
30
|
applyDate(dates: ISelectedDatesConfig): void;
|
|
30
31
|
close(): void;
|
|
31
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<TzDaterangepickerDirective, [{ optional: true; self: true; }, null, null, null]>;
|
|
32
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TzDaterangepickerDirective, "input[misTzDrp]", never, { "dpConfig": { "alias": "dpConfig"; "required": false; "isSignal": true; }; "selectedDates": { "alias": "selectedDates"; "required": false; "isSignal": true; }; "datesDisabled": { "alias": "datesDisabled"; "required": false; "isSignal": true; }; "selectedRangeLabel": { "alias": "selectedRangeLabel"; "required": false; "isSignal": true; }; "dateMessages": { "alias": "dateMessages"; "required": false; "isSignal": true; }; "enableDateTabbing": { "alias": "enableDateTabbing"; "required": false; "isSignal": true; }; "positionX": { "alias": "positionX"; "required": false; "isSignal": true; }; "positionY": { "alias": "positionY"; "required": false; "isSignal": true; }; "offsetX": { "alias": "offsetX"; "required": false; "isSignal": true; }; "offsetY": { "alias": "offsetY"; "required": false; "isSignal": true; }; }, { "dateChange": "dateChange"; }, never, never, false, never>;
|
|
33
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TzDaterangepickerDirective, "input[misTzDrp]", never, { "dpConfig": { "alias": "dpConfig"; "required": false; "isSignal": true; }; "selectedDates": { "alias": "selectedDates"; "required": false; "isSignal": true; }; "datesDisabled": { "alias": "datesDisabled"; "required": false; "isSignal": true; }; "selectedRangeLabel": { "alias": "selectedRangeLabel"; "required": false; "isSignal": true; }; "dateMessages": { "alias": "dateMessages"; "required": false; "isSignal": true; }; "enableDateTabbing": { "alias": "enableDateTabbing"; "required": false; "isSignal": true; }; "isMobileView": { "alias": "isMobileView"; "required": false; "isSignal": true; }; "positionX": { "alias": "positionX"; "required": false; "isSignal": true; }; "positionY": { "alias": "positionY"; "required": false; "isSignal": true; }; "offsetX": { "alias": "offsetX"; "required": false; "isSignal": true; }; "offsetY": { "alias": "offsetY"; "required": false; "isSignal": true; }; }, { "dateChange": "dateChange"; }, never, never, false, never>;
|
|
33
34
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnInit, Renderer2, DestroyRef } from "@angular/core";
|
|
2
2
|
import { type DateRangePane, type MonthNavDirection } from "../daterangepicker-constants";
|
|
3
|
-
import { ICurrentMonth, ICurrentMonthDates, IDatePickerData, IWeekDay, ISelectedDatesConfig, RangeItem } from "../models/drp-config.model";
|
|
3
|
+
import { ICurrentMonth, ICurrentMonthDates, IDatePickerData, IDayOption, IWeekDay, ISelectedDatesConfig, RangeItem } from "../models/drp-config.model";
|
|
4
4
|
import { ToastService } from "mis-crystal-design-system/toast";
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class TzDrpContainerComponent implements OnInit {
|
|
@@ -22,6 +22,7 @@ export declare class TzDrpContainerComponent implements OnInit {
|
|
|
22
22
|
};
|
|
23
23
|
private readonly CUSTOM_RANGE_LABEL;
|
|
24
24
|
readonly data: import("@angular/core").WritableSignal<IDatePickerData>;
|
|
25
|
+
readonly isMobile: import("@angular/core").Signal<boolean>;
|
|
25
26
|
private dayjsInstance;
|
|
26
27
|
/**
|
|
27
28
|
* Parse date string using configured format with fallback
|
|
@@ -44,6 +45,7 @@ export declare class TzDrpContainerComponent implements OnInit {
|
|
|
44
45
|
private readonly isDatesValidSignal;
|
|
45
46
|
private readonly selectedItemLabelSignal;
|
|
46
47
|
private readonly hoveredWeekStartSignal;
|
|
48
|
+
private readonly selectedDaysSignal;
|
|
47
49
|
readonly startHourSignal: import("@angular/core").WritableSignal<number>;
|
|
48
50
|
readonly startMinuteSignal: import("@angular/core").WritableSignal<number>;
|
|
49
51
|
readonly startAmPmSignal: import("@angular/core").WritableSignal<string>;
|
|
@@ -67,11 +69,24 @@ export declare class TzDrpContainerComponent implements OnInit {
|
|
|
67
69
|
selectedItemLabel: import("@angular/core").Signal<string>;
|
|
68
70
|
isWeeklyMode: import("@angular/core").Signal<boolean>;
|
|
69
71
|
enableDateTabbing: import("@angular/core").Signal<boolean>;
|
|
72
|
+
/** Chips to render, normalised from dpConfig.dayOptions. */
|
|
73
|
+
readonly dayOptions: import("@angular/core").Signal<IDayOption[]>;
|
|
74
|
+
/** Renders only when explicitly enabled and chips exist. */
|
|
75
|
+
readonly showDaySelection: import("@angular/core").Signal<boolean>;
|
|
76
|
+
readonly daySelectionLabel: import("@angular/core").Signal<string>;
|
|
77
|
+
readonly isDaySelectionRequired: import("@angular/core").Signal<boolean>;
|
|
78
|
+
readonly selectedDays: import("@angular/core").Signal<number[]>;
|
|
79
|
+
readonly isDaySelectionValid: import("@angular/core").Signal<boolean>;
|
|
80
|
+
/** Apply needs a complete range and, when mandated, at least one day. */
|
|
81
|
+
readonly canApply: import("@angular/core").Signal<boolean>;
|
|
82
|
+
readonly showDaySelectionHint: import("@angular/core").Signal<boolean>;
|
|
83
|
+
readonly daySelectionGroupAriaLabel: import("@angular/core").Signal<string>;
|
|
70
84
|
readonly anchorIndexLeft: import("@angular/core").Signal<number>;
|
|
71
85
|
readonly anchorIndexRight: import("@angular/core").Signal<number>;
|
|
72
86
|
readonly prevMonthAriaLabel: import("@angular/core").Signal<string>;
|
|
73
87
|
readonly nextMonthAriaLabel: import("@angular/core").Signal<string>;
|
|
74
88
|
readonly applyButtonAriaLabel: import("@angular/core").Signal<string>;
|
|
89
|
+
private readonly selectedDayLabels;
|
|
75
90
|
currentMonthDates: import("@angular/core").Signal<ICurrentMonthDates[]>;
|
|
76
91
|
nextMonthDates: import("@angular/core").Signal<ICurrentMonthDates[]>;
|
|
77
92
|
startHour: import("@angular/core").Signal<number>;
|
|
@@ -115,6 +130,14 @@ export declare class TzDrpContainerComponent implements OnInit {
|
|
|
115
130
|
selectDay(from: DateRangePane, day: ICurrentMonthDates): void;
|
|
116
131
|
selectRange(item: RangeItem): void;
|
|
117
132
|
resetRange(): void;
|
|
133
|
+
/** Drops unknown values, de-duplicates and re-orders to match dayOptions. */
|
|
134
|
+
private sanitizeSelectedDays;
|
|
135
|
+
isDaySelected(option: IDayOption): boolean;
|
|
136
|
+
toggleDay(option: IDayOption): void;
|
|
137
|
+
trackDayOption(_index: number, option: IDayOption): number;
|
|
138
|
+
dayChipAriaLabel(option: IDayOption): string;
|
|
139
|
+
/** Attaches selectedDays only when the strip is active. */
|
|
140
|
+
private buildApplyPayload;
|
|
118
141
|
applyDates(): void;
|
|
119
142
|
cancelDatePicker(): void;
|
|
120
143
|
onStartHourInput(): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TzDrpContainerComponent } from "../tz-drp-container/tz-drp-container.component";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Mobile variant of the date range picker container.
|
|
5
|
+
*
|
|
6
|
+
* Opened by `misTzDrp` when `isMobileView` is true. All behaviour is inherited from
|
|
7
|
+
* {@link TzDrpContainerComponent}; only the template and styles differ, so the desktop
|
|
8
|
+
* container keeps its `@media` based layout untouched.
|
|
9
|
+
*/
|
|
10
|
+
export declare class TzDrpMobileContainerComponent extends TzDrpContainerComponent {
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TzDrpMobileContainerComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TzDrpMobileContainerComponent, "mis-tz-drp-mobile", never, {}, {}, never, never, false, never>;
|
|
13
|
+
}
|