ngxsmk-datepicker 2.2.0 → 2.2.2
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/README.md +1313 -1344
- package/docs/API.md +29 -3
- package/docs/COMPATIBILITY.md +1 -1
- package/docs/INTEGRATION.md +701 -631
- package/docs/IONIC_INTEGRATION.md +1 -1
- package/docs/IONIC_TESTING.md +1 -1
- package/docs/LOCALE-GUIDE.md +3 -3
- package/docs/PLUGIN-ARCHITECTURE.md +1 -1
- package/docs/SEO.md +1 -1
- package/docs/SSR-EXAMPLE.md +1 -1
- package/docs/THEME-TOKENS.md +1 -1
- package/docs/TIMEZONE.md +1 -1
- package/docs/extension-points.md +1 -1
- package/docs/signal-forms.md +1 -1
- package/docs/signals.md +1 -1
- package/docs/ssr.md +1 -1
- package/fesm2022/ngxsmk-datepicker.mjs +3356 -3360
- package/package.json +1 -1
- package/styles/ionic-integration.css +220 -226
- package/types/ngxsmk-datepicker.d.ts +25 -44
- package/CHANGELOG.md +0 -1133
- package/LICENSE +0 -21
- package/MIGRATION.md +0 -1702
package/package.json
CHANGED
|
@@ -1,226 +1,220 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ionic Framework Integration Styles
|
|
3
|
-
*
|
|
4
|
-
* This file contains CSS fixes and overrides to ensure ngxsmk-datepicker
|
|
5
|
-
* works correctly with Ionic Angular applications.
|
|
6
|
-
*
|
|
7
|
-
* Import this file in your global styles or Ionic app stylesheet:
|
|
8
|
-
* @import 'ngxsmk-datepicker/styles/ionic-integration.css';
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/* ============================================
|
|
12
|
-
1. Z-INDEX CONFLICTS FIX
|
|
13
|
-
============================================ */
|
|
14
|
-
|
|
15
|
-
/* Default z-index for Ionic compatibility */
|
|
16
|
-
ion-app ngxsmk-datepicker {
|
|
17
|
-
--datepicker-z-index-base: 10001;
|
|
18
|
-
/* Below ion-alert (20001), above ion-popover (10000) */
|
|
19
|
-
--datepicker-z-index-backdrop: 10000;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/* When inside ion-modal, use higher z-index */
|
|
23
|
-
ion-modal ngxsmk-datepicker {
|
|
24
|
-
--datepicker-z-index-base: 20001;
|
|
25
|
-
/* Above modal backdrop (20000) */
|
|
26
|
-
--datepicker-z-index-backdrop: 20000;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/* When inside ion-popover, use appropriate z-index */
|
|
30
|
-
ion-popover ngxsmk-datepicker {
|
|
31
|
-
--datepicker-z-index-base: 10001;
|
|
32
|
-
/* Above popover (10000) */
|
|
33
|
-
--datepicker-z-index-backdrop: 10000;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* ============================================
|
|
37
|
-
2. BODY SCROLL LOCK DISABLE
|
|
38
|
-
============================================ */
|
|
39
|
-
|
|
40
|
-
/* Disable body scroll lock in Ionic apps */
|
|
41
|
-
ion-app body:has(.ngxsmk-datepicker-wrapper.ngxsmk-calendar-open:not(.ngxsmk-inline-mode)),
|
|
42
|
-
ion-app html:has(.ngxsmk-datepicker-wrapper.ngxsmk-calendar-open:not(.ngxsmk-inline-mode)) {
|
|
43
|
-
overflow: auto !important;
|
|
44
|
-
position: static !important;
|
|
45
|
-
width: auto !important;
|
|
46
|
-
height: auto !important;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/* Use Ionic's scroll lock instead */
|
|
50
|
-
ion-content:has(.ngxsmk-datepicker-wrapper.ngxsmk-calendar-open:not(.ngxsmk-inline-mode)) {
|
|
51
|
-
--overflow: hidden;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* ============================================
|
|
55
|
-
3. POSITIONING IN ION-CONTENT
|
|
56
|
-
============================================ */
|
|
57
|
-
|
|
58
|
-
/* Fix positioning when inside ion-content */
|
|
59
|
-
ion-content .ngxsmk-popover-container.ngxsmk-popover-open:not(.ngxsmk-inline-container) {
|
|
60
|
-
/* Use absolute positioning relative to ion-content */
|
|
61
|
-
position: absolute !important;
|
|
62
|
-
/* Position will be calculated by JavaScript or use inline mode */
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/* Alternative: Use inline mode in ion-content (recommended) */
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
max-height: calc(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
padding-
|
|
82
|
-
|
|
83
|
-
height: calc(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
--datepicker-primary-
|
|
94
|
-
--datepicker-
|
|
95
|
-
--datepicker-
|
|
96
|
-
--datepicker-text-color: var(--ion-text-color, #
|
|
97
|
-
--datepicker-
|
|
98
|
-
--datepicker-
|
|
99
|
-
--datepicker-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
--datepicker-
|
|
106
|
-
--datepicker-text-color: var(--ion-text-color, #
|
|
107
|
-
--datepicker-
|
|
108
|
-
--datepicker-
|
|
109
|
-
--datepicker-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
/*
|
|
121
|
-
|
|
122
|
-
/*
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
/*
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
/*
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
width: 100% !important;
|
|
222
|
-
height: 100% !important;
|
|
223
|
-
max-width: 100% !important;
|
|
224
|
-
border-radius: 0 !important;
|
|
225
|
-
margin: 0 !important;
|
|
226
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Ionic Framework Integration Styles
|
|
3
|
+
*
|
|
4
|
+
* This file contains CSS fixes and overrides to ensure ngxsmk-datepicker
|
|
5
|
+
* works correctly with Ionic Angular applications.
|
|
6
|
+
*
|
|
7
|
+
* Import this file in your global styles or Ionic app stylesheet:
|
|
8
|
+
* @import 'ngxsmk-datepicker/styles/ionic-integration.css';
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* ============================================
|
|
12
|
+
1. Z-INDEX CONFLICTS FIX
|
|
13
|
+
============================================ */
|
|
14
|
+
|
|
15
|
+
/* Default z-index for Ionic compatibility */
|
|
16
|
+
ion-app ngxsmk-datepicker {
|
|
17
|
+
--datepicker-z-index-base: 10001;
|
|
18
|
+
/* Below ion-alert (20001), above ion-popover (10000) */
|
|
19
|
+
--datepicker-z-index-backdrop: 10000;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* When inside ion-modal, use higher z-index */
|
|
23
|
+
ion-modal ngxsmk-datepicker {
|
|
24
|
+
--datepicker-z-index-base: 20001;
|
|
25
|
+
/* Above modal backdrop (20000) */
|
|
26
|
+
--datepicker-z-index-backdrop: 20000;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* When inside ion-popover, use appropriate z-index */
|
|
30
|
+
ion-popover ngxsmk-datepicker {
|
|
31
|
+
--datepicker-z-index-base: 10001;
|
|
32
|
+
/* Above popover (10000) */
|
|
33
|
+
--datepicker-z-index-backdrop: 10000;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* ============================================
|
|
37
|
+
2. BODY SCROLL LOCK DISABLE
|
|
38
|
+
============================================ */
|
|
39
|
+
|
|
40
|
+
/* Disable body scroll lock in Ionic apps */
|
|
41
|
+
ion-app body:has(.ngxsmk-datepicker-wrapper.ngxsmk-calendar-open:not(.ngxsmk-inline-mode)),
|
|
42
|
+
ion-app html:has(.ngxsmk-datepicker-wrapper.ngxsmk-calendar-open:not(.ngxsmk-inline-mode)) {
|
|
43
|
+
overflow: auto !important;
|
|
44
|
+
position: static !important;
|
|
45
|
+
width: auto !important;
|
|
46
|
+
height: auto !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Use Ionic's scroll lock instead */
|
|
50
|
+
ion-content:has(.ngxsmk-datepicker-wrapper.ngxsmk-calendar-open:not(.ngxsmk-inline-mode)) {
|
|
51
|
+
--overflow: hidden;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* ============================================
|
|
55
|
+
3. POSITIONING IN ION-CONTENT
|
|
56
|
+
============================================ */
|
|
57
|
+
|
|
58
|
+
/* Fix positioning when inside ion-content */
|
|
59
|
+
ion-content .ngxsmk-popover-container.ngxsmk-popover-open:not(.ngxsmk-inline-container) {
|
|
60
|
+
/* Use absolute positioning relative to ion-content */
|
|
61
|
+
position: absolute !important;
|
|
62
|
+
/* Position will be calculated by JavaScript or use inline mode */
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Alternative: Use inline mode in ion-content (recommended) */
|
|
66
|
+
|
|
67
|
+
/* ============================================
|
|
68
|
+
4. SAFE AREA INSETS (iOS)
|
|
69
|
+
============================================ */
|
|
70
|
+
|
|
71
|
+
/* Bottom sheet with safe area insets */
|
|
72
|
+
.ngxsmk-popover-container.ngxsmk-popover-open.ngxsmk-bottom-sheet:not(.ngxsmk-inline-container) {
|
|
73
|
+
padding-bottom: env(safe-area-inset-bottom) !important;
|
|
74
|
+
max-height: calc(90vh - env(safe-area-inset-bottom)) !important;
|
|
75
|
+
max-height: calc(90dvh - env(safe-area-inset-bottom)) !important;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Fullscreen with safe area insets */
|
|
79
|
+
.ngxsmk-popover-container.ngxsmk-popover-open.ngxsmk-fullscreen:not(.ngxsmk-inline-container) {
|
|
80
|
+
padding-top: env(safe-area-inset-top) !important;
|
|
81
|
+
padding-bottom: env(safe-area-inset-bottom) !important;
|
|
82
|
+
height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
|
|
83
|
+
height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* ============================================
|
|
87
|
+
5. CSS VARIABLE MAPPING (Ionic Theming)
|
|
88
|
+
============================================ */
|
|
89
|
+
|
|
90
|
+
/* Map Ionic theme variables to datepicker variables */
|
|
91
|
+
ion-app ngxsmk-datepicker {
|
|
92
|
+
--datepicker-primary-color: var(--ion-color-primary, #6d28d9);
|
|
93
|
+
--datepicker-primary-contrast: var(--ion-color-primary-contrast, #ffffff);
|
|
94
|
+
--datepicker-background: var(--ion-background-color, #ffffff);
|
|
95
|
+
--datepicker-text-color: var(--ion-text-color, #1f2937);
|
|
96
|
+
--datepicker-subtle-text-color: var(--ion-text-color-step-400, #6b7280);
|
|
97
|
+
--datepicker-border-color: var(--ion-border-color, #e5e7eb);
|
|
98
|
+
--datepicker-hover-background: var(--ion-color-light, #f3f4f6);
|
|
99
|
+
--datepicker-range-background: var(--ion-color-primary-tint, #f5f3ff);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Dark theme mapping */
|
|
103
|
+
ion-app.ion-theme-dark ngxsmk-datepicker {
|
|
104
|
+
--datepicker-background: var(--ion-background-color, #1f2937);
|
|
105
|
+
--datepicker-text-color: var(--ion-text-color, #f3f4f6);
|
|
106
|
+
--datepicker-subtle-text-color: var(--ion-text-color-step-400, #9ca3af);
|
|
107
|
+
--datepicker-border-color: var(--ion-border-color, #374151);
|
|
108
|
+
--datepicker-hover-background: var(--ion-color-step-100, #374151);
|
|
109
|
+
--datepicker-range-background: rgba(var(--ion-color-primary-rgb), 0.15);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* ============================================
|
|
113
|
+
6. TOUCH GESTURE COMPATIBILITY
|
|
114
|
+
============================================ */
|
|
115
|
+
|
|
116
|
+
/* Allow Ionic gestures to work when datepicker is in inline mode */
|
|
117
|
+
|
|
118
|
+
/* Prevent touch event conflicts in popover mode */
|
|
119
|
+
.ngxsmk-popover-container.ngxsmk-popover-open:not(.ngxsmk-inline-container) {
|
|
120
|
+
/* Ionic gestures may be blocked - use inline mode instead */
|
|
121
|
+
touch-action: pan-y;
|
|
122
|
+
/* Allow vertical scrolling */
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* ============================================
|
|
126
|
+
7. FOCUS MANAGEMENT
|
|
127
|
+
============================================ */
|
|
128
|
+
|
|
129
|
+
/* When inside ion-modal, let Ionic handle focus */
|
|
130
|
+
|
|
131
|
+
/* ============================================
|
|
132
|
+
8. KEYBOARD BEHAVIOR
|
|
133
|
+
============================================ */
|
|
134
|
+
|
|
135
|
+
/* Prevent keyboard from covering datepicker on iOS */
|
|
136
|
+
@supports (-webkit-touch-callout: none) {
|
|
137
|
+
/* iOS Safari */
|
|
138
|
+
.ngxsmk-popover-container.ngxsmk-popover-open:not(.ngxsmk-inline-container) {
|
|
139
|
+
/* Adjust position when keyboard is visible */
|
|
140
|
+
max-height: calc(100dvh - env(keyboard-inset-height, 0px)) !important;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* ============================================
|
|
145
|
+
9. SHADOW DOM SUPPORT
|
|
146
|
+
============================================ */
|
|
147
|
+
|
|
148
|
+
/* Ensure variables cascade into Shadow DOM */
|
|
149
|
+
|
|
150
|
+
/* Global variables for Shadow DOM */
|
|
151
|
+
:root {
|
|
152
|
+
--datepicker-primary-color: var(--ion-color-primary, #6d28d9);
|
|
153
|
+
--datepicker-background: var(--ion-background-color, #ffffff);
|
|
154
|
+
--datepicker-text-color: var(--ion-text-color, #1f2937);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* ============================================
|
|
158
|
+
10. ION-ITEM INTEGRATION
|
|
159
|
+
============================================ */
|
|
160
|
+
|
|
161
|
+
/* Better integration with ion-item */
|
|
162
|
+
ion-item ngxsmk-datepicker {
|
|
163
|
+
--padding-start: 0;
|
|
164
|
+
--padding-end: 0;
|
|
165
|
+
--inner-padding-end: 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
ion-item ngxsmk-datepicker .ngxsmk-input-group {
|
|
169
|
+
width: 100%;
|
|
170
|
+
border: none;
|
|
171
|
+
background: transparent;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* ============================================
|
|
175
|
+
11. RESPONSIVE BEHAVIOR
|
|
176
|
+
============================================ */
|
|
177
|
+
|
|
178
|
+
/* On mobile, prefer inline mode in Ionic */
|
|
179
|
+
|
|
180
|
+
/* ============================================
|
|
181
|
+
12. CAPACITOR SPECIFIC
|
|
182
|
+
============================================ */
|
|
183
|
+
|
|
184
|
+
/* Capacitor status bar spacing */
|
|
185
|
+
@supports (padding-top: env(safe-area-inset-top)) {
|
|
186
|
+
.ngxsmk-popover-container.ngxsmk-popover-open.ngxsmk-fullscreen:not(.ngxsmk-inline-container) {
|
|
187
|
+
padding-top: calc(env(safe-area-inset-top) + var(--ion-safe-area-top, 0px)) !important;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* ============================================
|
|
192
|
+
13. POSITIONING FIXES (Mobile)
|
|
193
|
+
============================================ */
|
|
194
|
+
|
|
195
|
+
/* Bottom Sheet Positioning */
|
|
196
|
+
.ngxsmk-popover-container.ngxsmk-popover-open.ngxsmk-bottom-sheet:not(.ngxsmk-inline-container) {
|
|
197
|
+
top: auto !important;
|
|
198
|
+
left: 0 !important;
|
|
199
|
+
right: 0 !important;
|
|
200
|
+
bottom: 0 !important;
|
|
201
|
+
transform: none !important;
|
|
202
|
+
width: 100% !important;
|
|
203
|
+
max-width: 100% !important;
|
|
204
|
+
border-radius: 20px 20px 0 0 !important;
|
|
205
|
+
margin: 0 !important;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* Fullscreen Positioning */
|
|
209
|
+
.ngxsmk-popover-container.ngxsmk-popover-open.ngxsmk-fullscreen:not(.ngxsmk-inline-container) {
|
|
210
|
+
top: 0 !important;
|
|
211
|
+
left: 0 !important;
|
|
212
|
+
right: 0 !important;
|
|
213
|
+
bottom: 0 !important;
|
|
214
|
+
transform: none !important;
|
|
215
|
+
width: 100% !important;
|
|
216
|
+
height: 100% !important;
|
|
217
|
+
max-width: 100% !important;
|
|
218
|
+
border-radius: 0 !important;
|
|
219
|
+
margin: 0 !important;
|
|
220
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, ElementRef, AfterViewInit, OnDestroy, TemplateRef, InjectionToken, EffectRef, Signal, OnInit, OnChanges, SimpleChanges
|
|
2
|
+
import { EventEmitter, ElementRef, AfterViewInit, OnDestroy, TemplateRef, InjectionToken, EffectRef, Signal, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
|
|
@@ -731,6 +731,8 @@ interface MatFormFieldControlMock<T> {
|
|
|
731
731
|
declare class NgxsmkDatepickerComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit, ControlValueAccessor, MatFormFieldControlMock<DatepickerValue> {
|
|
732
732
|
private static _idCounter;
|
|
733
733
|
private static _allInstances;
|
|
734
|
+
private static _materialSupportRegistered;
|
|
735
|
+
static withMaterialSupport(matFormFieldControlToken: any): void;
|
|
734
736
|
_uniqueId: string;
|
|
735
737
|
mode: 'single' | 'range' | 'multiple' | 'week' | 'month' | 'quarter' | 'year' | 'timeRange';
|
|
736
738
|
calendarViewMode: 'month' | 'year' | 'decade' | 'timeline' | 'time-slider';
|
|
@@ -1444,6 +1446,8 @@ declare class NgxsmkDatepickerComponent implements OnInit, OnChanges, OnDestroy,
|
|
|
1444
1446
|
private scrollDebounceTimer;
|
|
1445
1447
|
private readonly updatePositionOnScroll;
|
|
1446
1448
|
private updateOpeningState;
|
|
1449
|
+
private _startOpeningState;
|
|
1450
|
+
private _startClosingState;
|
|
1447
1451
|
private renderInBody;
|
|
1448
1452
|
/** Hides the body-appended popover so loading/calendar are not visible at wrong position. */
|
|
1449
1453
|
private hideBodyPopoverUntilPositioned;
|
|
@@ -1650,6 +1654,9 @@ declare class NgxsmkDatepickerComponent implements OnInit, OnChanges, OnDestroy,
|
|
|
1650
1654
|
* For large constraint lists (>1000), consider optimizing with Set or DateRange tree.
|
|
1651
1655
|
*/
|
|
1652
1656
|
isDateDisabled(date: Date | null): boolean;
|
|
1657
|
+
private _isInDisabledDates;
|
|
1658
|
+
private _isInDisabledRanges;
|
|
1659
|
+
private _isOutOfMinMaxBounds;
|
|
1653
1660
|
/**
|
|
1654
1661
|
* Checks if a date is selected in multiple selection mode.
|
|
1655
1662
|
*
|
|
@@ -1703,6 +1710,20 @@ declare class NgxsmkDatepickerComponent implements OnInit, OnChanges, OnDestroy,
|
|
|
1703
1710
|
* - Calendar regeneration is optimized with caching
|
|
1704
1711
|
*/
|
|
1705
1712
|
onDateClick(day: Date | null): void;
|
|
1713
|
+
/**
|
|
1714
|
+
* Returns true (and cleans up touch state) when the click event should be
|
|
1715
|
+
* ignored because it was already handled by the touch handler within the
|
|
1716
|
+
* deduplication window (250 ms).
|
|
1717
|
+
*/
|
|
1718
|
+
private _shouldSkipDueToTouchGuard;
|
|
1719
|
+
private _navigateToMonthOfDay;
|
|
1720
|
+
private _handleSingleModeClick;
|
|
1721
|
+
private _handleRangeModeClick;
|
|
1722
|
+
private _handleRangeEndSelection;
|
|
1723
|
+
private _handlePeriodModeClick;
|
|
1724
|
+
private _handleMultipleModeClick;
|
|
1725
|
+
private _applyRecurringPattern;
|
|
1726
|
+
private _syncTimeAfterDateClick;
|
|
1706
1727
|
onDateHover(day: Date | null): void;
|
|
1707
1728
|
onDateCellTouchStart(event: TouchEvent, day: Date | null): void;
|
|
1708
1729
|
onDateCellTouchMove(event: TouchEvent): void;
|
|
@@ -2221,6 +2242,8 @@ interface DatepickerTheme {
|
|
|
2221
2242
|
sm?: string;
|
|
2222
2243
|
md?: string;
|
|
2223
2244
|
lg?: string;
|
|
2245
|
+
/** Focus ring (e.g. input focus). Use a color-mix or rgba for 15% opacity. Example: 0 0 0 3px color-mix(in srgb, var(--datepicker-primary-color) 15%, transparent) */
|
|
2246
|
+
focus?: string;
|
|
2224
2247
|
[key: string]: string | undefined;
|
|
2225
2248
|
};
|
|
2226
2249
|
}
|
|
@@ -2385,47 +2408,5 @@ declare class HapticFeedbackService {
|
|
|
2385
2408
|
static ɵprov: i0.ɵɵInjectableDeclaration<HapticFeedbackService>;
|
|
2386
2409
|
}
|
|
2387
2410
|
|
|
2388
|
-
|
|
2389
|
-
* Helper function to provide Angular Material form field control token
|
|
2390
|
-
* Use this when using ngxsmk-datepicker inside mat-form-field in non-standalone components
|
|
2391
|
-
*
|
|
2392
|
-
* IMPORTANT: This requires @angular/material to be installed. Import MAT_FORM_FIELD_CONTROL
|
|
2393
|
-
* from @angular/material/form-field and pass it to this function.
|
|
2394
|
-
*
|
|
2395
|
-
* @example For NgModule (non-standalone):
|
|
2396
|
-
* ```typescript
|
|
2397
|
-
* import { NgModule } from '@angular/core';
|
|
2398
|
-
* import { MAT_FORM_FIELD_CONTROL } from '@angular/material/form-field';
|
|
2399
|
-
* import { NgxsmkDatepickerComponent, provideMaterialFormFieldControl } from 'ngxsmk-datepicker';
|
|
2400
|
-
*
|
|
2401
|
-
* @NgModule({
|
|
2402
|
-
* imports: [NgxsmkDatepickerComponent],
|
|
2403
|
-
* providers: [provideMaterialFormFieldControl(MAT_FORM_FIELD_CONTROL)]
|
|
2404
|
-
* })
|
|
2405
|
-
* export class MyModule { }
|
|
2406
|
-
* ```
|
|
2407
|
-
*
|
|
2408
|
-
* @example For standalone component:
|
|
2409
|
-
* ```typescript
|
|
2410
|
-
* import { Component } from '@angular/core';
|
|
2411
|
-
* import { MAT_FORM_FIELD_CONTROL } from '@angular/material/form-field';
|
|
2412
|
-
* import { NgxsmkDatepickerComponent, provideMaterialFormFieldControl } from 'ngxsmk-datepicker';
|
|
2413
|
-
*
|
|
2414
|
-
* @Component({
|
|
2415
|
-
* standalone: true,
|
|
2416
|
-
* imports: [NgxsmkDatepickerComponent],
|
|
2417
|
-
* providers: [provideMaterialFormFieldControl(MAT_FORM_FIELD_CONTROL)]
|
|
2418
|
-
* })
|
|
2419
|
-
* export class MyComponent { }
|
|
2420
|
-
* ```
|
|
2421
|
-
*
|
|
2422
|
-
* ### Troubleshooting
|
|
2423
|
-
* If you see the error `mat-form-field must contain a MatFormFieldControl`:
|
|
2424
|
-
* 1. Ensure you are passing `MAT_FORM_FIELD_CONTROL` (not `MAT_FORM_FIELD`) to this function.
|
|
2425
|
-
* 2. Ensure you have added the provider to the `providers` array of your component or module.
|
|
2426
|
-
* 3. In standalone components, make sure `NgxsmkDatepickerComponent` is in the `imports` array.
|
|
2427
|
-
*/
|
|
2428
|
-
declare function provideMaterialFormFieldControl(matFormFieldControlToken: unknown): Provider;
|
|
2429
|
-
|
|
2430
|
-
export { AriaLiveService, CustomDateFormatService, CustomSelectComponent, DATEPICKER_CONFIG, DEFAULT_ANIMATION_CONFIG, DEFAULT_DATEPICKER_CONFIG, DatePresetsService, DefaultTranslationService, FieldSyncService, FocusTrapService, HapticFeedbackService, LocaleRegistryService, NativeDateAdapter, NgxsmkDatepickerComponent, NgxsmkDatepickerModule, ThemeBuilderService, TranslationRegistryService, addMonths, convertTimezone, exportToCsv, exportToIcs, exportToJson, formatDateWithTimezone, formatLocaleNumber, generateDecadeGrid, generateMonthOptions, generateTimeOptions, generateWeekDays, generateYearGrid, generateYearOptions, get24Hour, getEndOfDay, getEndOfMonth, getFirstDayOfWeek, getStartOfDay, getStartOfMonth, getTimezoneOffset, importFromCsv, importFromIcs, importFromJson, isSameDay, isValidTimezone, normalizeDate, parseDateWithTimezone, processDateRanges, provideDatepickerConfig, provideMaterialFormFieldControl, subtractDays, update12HourState };
|
|
2411
|
+
export { AriaLiveService, CustomDateFormatService, CustomSelectComponent, DATEPICKER_CONFIG, DEFAULT_ANIMATION_CONFIG, DEFAULT_DATEPICKER_CONFIG, DatePresetsService, DefaultTranslationService, FieldSyncService, FocusTrapService, HapticFeedbackService, LocaleRegistryService, NativeDateAdapter, NgxsmkDatepickerComponent, NgxsmkDatepickerModule, ThemeBuilderService, TranslationRegistryService, addMonths, convertTimezone, exportToCsv, exportToIcs, exportToJson, formatDateWithTimezone, formatLocaleNumber, generateDecadeGrid, generateMonthOptions, generateTimeOptions, generateWeekDays, generateYearGrid, generateYearOptions, get24Hour, getEndOfDay, getEndOfMonth, getFirstDayOfWeek, getStartOfDay, getStartOfMonth, getTimezoneOffset, importFromCsv, importFromIcs, importFromJson, isSameDay, isValidTimezone, normalizeDate, parseDateWithTimezone, processDateRanges, provideDatepickerConfig, subtractDays, update12HourState };
|
|
2431
2412
|
export type { AnimationConfig, CalendarSystem, DateAdapter, DateFormatHook, DateInput, DatePreset, DateRange, DatepickerConfig, DatepickerHooks, DatepickerTheme, DatepickerTranslations, DatepickerValue, DayCellRenderHook, EventHook, ExportOptions, HolidayProvider, KeyboardShortcutContext, KeyboardShortcutHelp, KeyboardShortcutHook, LocaleData, PartialDatepickerTranslations, SignalFormField, SignalFormFieldConfig, TranslationService, ValidationHook };
|