@entake/particle 17.0.0

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 (208) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +396 -0
  3. package/app/modules/accordion/accordion.component.d.ts +26 -0
  4. package/app/modules/accordion/accordion.module.d.ts +11 -0
  5. package/app/modules/accordion/directives/accordion-content.directive.d.ts +8 -0
  6. package/app/modules/accordion/directives/accordion-header.directive.d.ts +8 -0
  7. package/app/modules/accordion/directives/accordion-item.directive.d.ts +13 -0
  8. package/app/modules/background-carousel/background-carousel.directive.d.ts +42 -0
  9. package/app/modules/background-carousel/carousel-options.model.d.ts +30 -0
  10. package/app/modules/background-carousel/particle-background-carousel.module.d.ts +8 -0
  11. package/app/modules/checkbox/checkbox.component.d.ts +43 -0
  12. package/app/modules/checkbox/checkbox.module.d.ts +9 -0
  13. package/app/modules/color-picker/color-picker.component.d.ts +149 -0
  14. package/app/modules/color-picker/color-picker.module.d.ts +9 -0
  15. package/app/modules/date-picker/components/calendar/calendar.component.d.ts +211 -0
  16. package/app/modules/date-picker/components/date-range-picker/date-range-picker.component.d.ts +95 -0
  17. package/app/modules/date-picker/date-picker.component.d.ts +259 -0
  18. package/app/modules/date-picker/date-picker.module.d.ts +15 -0
  19. package/app/modules/dialog/dialog.component.d.ts +87 -0
  20. package/app/modules/dialog/dialog.module.d.ts +9 -0
  21. package/app/modules/dropdown/dropdown.component.d.ts +288 -0
  22. package/app/modules/dropdown/dropdown.module.d.ts +9 -0
  23. package/app/modules/dropdown/models/dropdown-option-group.model.d.ts +16 -0
  24. package/app/modules/dropdown/models/dropdown-option.model.d.ts +25 -0
  25. package/app/modules/endpoint-state/components/endpoint-state.component.d.ts +46 -0
  26. package/app/modules/endpoint-state/endpoint-state.module.d.ts +8 -0
  27. package/app/modules/icons/components/icon-select.component.d.ts +229 -0
  28. package/app/modules/icons/models/fontawesome-icons-brands.model.d.ts +13 -0
  29. package/app/modules/icons/models/fontawesome-icons-regular.model.d.ts +13 -0
  30. package/app/modules/icons/models/fontawesome-icons-solid.model.d.ts +13 -0
  31. package/app/modules/icons/models/particle-icons-light.model.d.ts +197 -0
  32. package/app/modules/icons/models/particle-icons-regular.model.d.ts +205 -0
  33. package/app/modules/icons/models/particle-icons-solid.model.d.ts +365 -0
  34. package/app/modules/icons/particle-icons.module.d.ts +13 -0
  35. package/app/modules/icons/services/icons.service.d.ts +44 -0
  36. package/app/modules/idle-timeout/idle-timeout.component.d.ts +35 -0
  37. package/app/modules/idle-timeout/idle-timer.d.ts +14 -0
  38. package/app/modules/idle-timeout/particle-idle-timeout.module.d.ts +9 -0
  39. package/app/modules/input-mask/input-mask.component.d.ts +86 -0
  40. package/app/modules/input-mask/input-mask.module.d.ts +8 -0
  41. package/app/modules/keyfilter/keyfilter.directive.d.ts +60 -0
  42. package/app/modules/keyfilter/keyfilter.module.d.ts +8 -0
  43. package/app/modules/layout/components/layout-full-framing/layout-full-framing.component.d.ts +27 -0
  44. package/app/modules/layout/components/layout-fullwidth-sidebar/layout-fullwidth-sidebar.component.d.ts +23 -0
  45. package/app/modules/layout/layout.module.d.ts +10 -0
  46. package/app/modules/loader/components/loader.component.d.ts +11 -0
  47. package/app/modules/loader/loader.module.d.ts +8 -0
  48. package/app/modules/multi-select/models/multi-select-option-group.model.d.ts +16 -0
  49. package/app/modules/multi-select/models/multi-select-option.model.d.ts +25 -0
  50. package/app/modules/multi-select/multi-select.component.d.ts +279 -0
  51. package/app/modules/multi-select/multi-select.module.d.ts +8 -0
  52. package/app/modules/notification/models/notification.model.d.ts +21 -0
  53. package/app/modules/notification/notification.component.d.ts +46 -0
  54. package/app/modules/notification/notification.module.d.ts +8 -0
  55. package/app/modules/notification/services/notification.service.d.ts +54 -0
  56. package/app/modules/ordinal-number-pipe/ordinal-number-pipe.module.d.ts +8 -0
  57. package/app/modules/ordinal-number-pipe/ordinal-number.pipe.d.ts +15 -0
  58. package/app/modules/paginator/pagination-event.model.d.ts +24 -0
  59. package/app/modules/paginator/paginator.component.d.ts +103 -0
  60. package/app/modules/paginator/particle-paginator.module.d.ts +13 -0
  61. package/app/modules/popover/popover.component.d.ts +140 -0
  62. package/app/modules/popover/popover.module.d.ts +9 -0
  63. package/app/modules/profile-pic/particle-profile-pic.module.d.ts +9 -0
  64. package/app/modules/profile-pic/profile-pic.component.d.ts +32 -0
  65. package/app/modules/progress-bar/progress-bar.component.d.ts +16 -0
  66. package/app/modules/progress-bar/progress-bar.module.d.ts +8 -0
  67. package/app/modules/push-container/particle-push-container.module.d.ts +9 -0
  68. package/app/modules/push-container/push-container-state.model.d.ts +7 -0
  69. package/app/modules/push-container/push-container.component.d.ts +137 -0
  70. package/app/modules/rich-text/particle-rich-text.module.d.ts +15 -0
  71. package/app/modules/rich-text/render-rich-text.component.d.ts +6 -0
  72. package/app/modules/rich-text/rich-text-capabilities.model.d.ts +7 -0
  73. package/app/modules/rich-text/rich-text.component.d.ts +48 -0
  74. package/app/modules/scroll-to-top/particle-scroll-to-top.module.d.ts +8 -0
  75. package/app/modules/scroll-to-top/scroll-to-top.component.d.ts +19 -0
  76. package/app/modules/slideover/particle-slideover.module.d.ts +8 -0
  77. package/app/modules/slideover/slideover.component.d.ts +35 -0
  78. package/app/modules/slider/slider.component.d.ts +143 -0
  79. package/app/modules/slider/slider.module.d.ts +9 -0
  80. package/app/modules/theming/components/theming.component.d.ts +43 -0
  81. package/app/modules/theming/models/theme.model.d.ts +88 -0
  82. package/app/modules/theming/services/theme-change-detection.service.d.ts +26 -0
  83. package/app/modules/theming/services/theming.service.d.ts +142 -0
  84. package/app/modules/theming/theming.module.d.ts +12 -0
  85. package/app/modules/toggle-switch/models/toggle-options.model.d.ts +11 -0
  86. package/app/modules/toggle-switch/toggle-switch.component.d.ts +43 -0
  87. package/app/modules/toggle-switch/toggle-switch.module.d.ts +8 -0
  88. package/app/modules/tooltip/tooltip.directive.d.ts +157 -0
  89. package/app/modules/tooltip/tooltip.module.d.ts +8 -0
  90. package/app/modules/week-picker/week-picker.component.d.ts +289 -0
  91. package/app/modules/week-picker/week-picker.module.d.ts +13 -0
  92. package/app/shared/enums/endpoint-status.enum.d.ts +9 -0
  93. package/app/shared/interceptors/json.interceptor.d.ts +17 -0
  94. package/app/shared/models/auditable.model.d.ts +21 -0
  95. package/app/shared/models/data-list.model.d.ts +9 -0
  96. package/app/shared/models/id.model.d.ts +9 -0
  97. package/app/shared/models/observable-container.d.ts +8 -0
  98. package/app/shared/models/particle-component-text.model.d.ts +211 -0
  99. package/app/shared/services/base-data.service.d.ts +130 -0
  100. package/app/shared/services/dialog.service.d.ts +10 -0
  101. package/app/shared/services/local-storage.service.d.ts +41 -0
  102. package/esm2022/app/modules/accordion/accordion.component.mjs +101 -0
  103. package/esm2022/app/modules/accordion/accordion.module.mjs +37 -0
  104. package/esm2022/app/modules/accordion/directives/accordion-content.directive.mjs +17 -0
  105. package/esm2022/app/modules/accordion/directives/accordion-header.directive.mjs +17 -0
  106. package/esm2022/app/modules/accordion/directives/accordion-item.directive.mjs +36 -0
  107. package/esm2022/app/modules/background-carousel/background-carousel.directive.mjs +91 -0
  108. package/esm2022/app/modules/background-carousel/carousel-options.model.mjs +36 -0
  109. package/esm2022/app/modules/background-carousel/particle-background-carousel.module.mjs +24 -0
  110. package/esm2022/app/modules/checkbox/checkbox.component.mjs +108 -0
  111. package/esm2022/app/modules/checkbox/checkbox.module.mjs +28 -0
  112. package/esm2022/app/modules/color-picker/color-picker.component.mjs +306 -0
  113. package/esm2022/app/modules/color-picker/color-picker.module.mjs +19 -0
  114. package/esm2022/app/modules/date-picker/components/calendar/calendar.component.mjs +496 -0
  115. package/esm2022/app/modules/date-picker/components/date-range-picker/date-range-picker.component.mjs +250 -0
  116. package/esm2022/app/modules/date-picker/date-picker.component.mjs +538 -0
  117. package/esm2022/app/modules/date-picker/date-picker.module.mjs +56 -0
  118. package/esm2022/app/modules/dialog/dialog.component.mjs +177 -0
  119. package/esm2022/app/modules/dialog/dialog.module.mjs +28 -0
  120. package/esm2022/app/modules/dropdown/dropdown.component.mjs +682 -0
  121. package/esm2022/app/modules/dropdown/dropdown.module.mjs +28 -0
  122. package/esm2022/app/modules/dropdown/models/dropdown-option-group.model.mjs +2 -0
  123. package/esm2022/app/modules/dropdown/models/dropdown-option.model.mjs +2 -0
  124. package/esm2022/app/modules/endpoint-state/components/endpoint-state.component.mjs +75 -0
  125. package/esm2022/app/modules/endpoint-state/endpoint-state.module.mjs +22 -0
  126. package/esm2022/app/modules/icons/components/icon-select.component.mjs +377 -0
  127. package/esm2022/app/modules/icons/models/fontawesome-icons-brands.model.mjs +471 -0
  128. package/esm2022/app/modules/icons/models/fontawesome-icons-regular.model.mjs +166 -0
  129. package/esm2022/app/modules/icons/models/fontawesome-icons-solid.model.mjs +1016 -0
  130. package/esm2022/app/modules/icons/models/particle-icons-light.model.mjs +310 -0
  131. package/esm2022/app/modules/icons/models/particle-icons-regular.model.mjs +324 -0
  132. package/esm2022/app/modules/icons/models/particle-icons-solid.model.mjs +581 -0
  133. package/esm2022/app/modules/icons/particle-icons.module.mjs +66 -0
  134. package/esm2022/app/modules/icons/services/icons.service.mjs +86 -0
  135. package/esm2022/app/modules/idle-timeout/idle-timeout.component.mjs +85 -0
  136. package/esm2022/app/modules/idle-timeout/idle-timer.mjs +66 -0
  137. package/esm2022/app/modules/idle-timeout/particle-idle-timeout.module.mjs +28 -0
  138. package/esm2022/app/modules/input-mask/input-mask.component.mjs +594 -0
  139. package/esm2022/app/modules/input-mask/input-mask.module.mjs +18 -0
  140. package/esm2022/app/modules/keyfilter/keyfilter.directive.mjs +158 -0
  141. package/esm2022/app/modules/keyfilter/keyfilter.module.mjs +18 -0
  142. package/esm2022/app/modules/layout/components/layout-full-framing/layout-full-framing.component.mjs +79 -0
  143. package/esm2022/app/modules/layout/components/layout-fullwidth-sidebar/layout-fullwidth-sidebar.component.mjs +65 -0
  144. package/esm2022/app/modules/layout/layout.module.mjs +33 -0
  145. package/esm2022/app/modules/loader/components/loader.component.mjs +30 -0
  146. package/esm2022/app/modules/loader/loader.module.mjs +24 -0
  147. package/esm2022/app/modules/multi-select/models/multi-select-option-group.model.mjs +2 -0
  148. package/esm2022/app/modules/multi-select/models/multi-select-option.model.mjs +2 -0
  149. package/esm2022/app/modules/multi-select/multi-select.component.mjs +665 -0
  150. package/esm2022/app/modules/multi-select/multi-select.module.mjs +18 -0
  151. package/esm2022/app/modules/notification/models/notification.model.mjs +2 -0
  152. package/esm2022/app/modules/notification/notification.component.mjs +122 -0
  153. package/esm2022/app/modules/notification/notification.module.mjs +18 -0
  154. package/esm2022/app/modules/notification/services/notification.service.mjs +84 -0
  155. package/esm2022/app/modules/ordinal-number-pipe/ordinal-number-pipe.module.mjs +20 -0
  156. package/esm2022/app/modules/ordinal-number-pipe/ordinal-number.pipe.mjs +49 -0
  157. package/esm2022/app/modules/paginator/pagination-event.model.mjs +29 -0
  158. package/esm2022/app/modules/paginator/paginator.component.mjs +207 -0
  159. package/esm2022/app/modules/paginator/particle-paginator.module.mjs +48 -0
  160. package/esm2022/app/modules/popover/popover.component.mjs +352 -0
  161. package/esm2022/app/modules/popover/popover.module.mjs +24 -0
  162. package/esm2022/app/modules/profile-pic/particle-profile-pic.module.mjs +28 -0
  163. package/esm2022/app/modules/profile-pic/profile-pic.component.mjs +74 -0
  164. package/esm2022/app/modules/progress-bar/progress-bar.component.mjs +43 -0
  165. package/esm2022/app/modules/progress-bar/progress-bar.module.mjs +24 -0
  166. package/esm2022/app/modules/push-container/particle-push-container.module.mjs +26 -0
  167. package/esm2022/app/modules/push-container/push-container-state.model.mjs +2 -0
  168. package/esm2022/app/modules/push-container/push-container.component.mjs +363 -0
  169. package/esm2022/app/modules/rich-text/particle-rich-text.module.mjs +64 -0
  170. package/esm2022/app/modules/rich-text/render-rich-text.component.mjs +18 -0
  171. package/esm2022/app/modules/rich-text/rich-text-capabilities.model.mjs +2 -0
  172. package/esm2022/app/modules/rich-text/rich-text.component.mjs +187 -0
  173. package/esm2022/app/modules/scroll-to-top/particle-scroll-to-top.module.mjs +24 -0
  174. package/esm2022/app/modules/scroll-to-top/scroll-to-top.component.mjs +49 -0
  175. package/esm2022/app/modules/slideover/particle-slideover.module.mjs +24 -0
  176. package/esm2022/app/modules/slideover/slideover.component.mjs +115 -0
  177. package/esm2022/app/modules/slider/slider.component.mjs +243 -0
  178. package/esm2022/app/modules/slider/slider.module.mjs +26 -0
  179. package/esm2022/app/modules/theming/components/theming.component.mjs +86 -0
  180. package/esm2022/app/modules/theming/models/theme.model.mjs +9 -0
  181. package/esm2022/app/modules/theming/services/theme-change-detection.service.mjs +38 -0
  182. package/esm2022/app/modules/theming/services/theming.service.mjs +507 -0
  183. package/esm2022/app/modules/theming/theming.module.mjs +55 -0
  184. package/esm2022/app/modules/toggle-switch/models/toggle-options.model.mjs +2 -0
  185. package/esm2022/app/modules/toggle-switch/toggle-switch.component.mjs +107 -0
  186. package/esm2022/app/modules/toggle-switch/toggle-switch.module.mjs +24 -0
  187. package/esm2022/app/modules/tooltip/tooltip.directive.mjs +381 -0
  188. package/esm2022/app/modules/tooltip/tooltip.module.mjs +18 -0
  189. package/esm2022/app/modules/week-picker/week-picker.component.mjs +511 -0
  190. package/esm2022/app/modules/week-picker/week-picker.module.mjs +40 -0
  191. package/esm2022/app/shared/enums/endpoint-status.enum.mjs +11 -0
  192. package/esm2022/app/shared/interceptors/json.interceptor.mjs +23 -0
  193. package/esm2022/app/shared/models/auditable.model.mjs +2 -0
  194. package/esm2022/app/shared/models/data-list.model.mjs +2 -0
  195. package/esm2022/app/shared/models/id.model.mjs +2 -0
  196. package/esm2022/app/shared/models/observable-container.mjs +15 -0
  197. package/esm2022/app/shared/models/particle-component-text.model.mjs +2 -0
  198. package/esm2022/app/shared/services/base-data.service.mjs +190 -0
  199. package/esm2022/app/shared/services/dialog.service.mjs +50 -0
  200. package/esm2022/app/shared/services/local-storage.service.mjs +60 -0
  201. package/esm2022/entake-particle.mjs +5 -0
  202. package/esm2022/public_api.mjs +98 -0
  203. package/fesm2022/entake-particle.mjs +12477 -0
  204. package/fesm2022/entake-particle.mjs.map +1 -0
  205. package/index.d.ts +5 -0
  206. package/package.json +65 -0
  207. package/particle.css +1 -0
  208. package/public_api.d.ts +97 -0
@@ -0,0 +1,259 @@
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2 } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { DatePickerText } from '../../shared/models/particle-component-text.model';
4
+ import { PopoverComponent } from '../popover/popover.component';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Component to allow a user to input/select a date
8
+ */
9
+ export declare class DatePickerComponent implements ControlValueAccessor, OnDestroy, OnInit {
10
+ private renderer;
11
+ private changeDetectorRef;
12
+ /**
13
+ * Allowed keys for date input
14
+ */
15
+ private static readonly ALLOWED_KEYS;
16
+ /**
17
+ * Matches YYYY-MM-DD
18
+ * @private
19
+ */
20
+ private static readonly BROWSER_DATE_PICKER_FORMAT;
21
+ /**
22
+ * Matches MM/DD/YYYY
23
+ * @private
24
+ */
25
+ private static readonly FULL_DATE_FORMAT;
26
+ /**
27
+ * Matches M/D/YYYY
28
+ * @private
29
+ */
30
+ private static readonly SHORT_DATE_FORMAT;
31
+ /**
32
+ * Matches M/DD/YYYY
33
+ * @private
34
+ */
35
+ private static readonly SHORT_MONTH_DATE_FORMAT;
36
+ /**
37
+ * Matches MM/D/YYYY
38
+ * @private
39
+ */
40
+ private static readonly SHORT_DAY_DATE_FORMAT;
41
+ /**
42
+ * A reference date with all fields set to 0
43
+ * @private
44
+ */
45
+ private static readonly referenceDate;
46
+ /**
47
+ * Value input setter
48
+ */
49
+ set value(value: Date);
50
+ set disabled(disabled: boolean);
51
+ set dateRange(dateRange: {
52
+ minDate: Date;
53
+ maxDate: Date;
54
+ });
55
+ /**
56
+ * The ID to set on the input
57
+ */
58
+ inputId: string;
59
+ /**
60
+ * Value to use as the date picker input's aria label
61
+ */
62
+ ariaLabel: string;
63
+ /**
64
+ * Optional class-list to add to the date picker input
65
+ */
66
+ inputClassList: any;
67
+ /**
68
+ * Optional class-list to add to the calendar button
69
+ */
70
+ calendarButtonClassList: string;
71
+ /**
72
+ * Close the picker when a selection is made
73
+ */
74
+ closeOnSelect: boolean;
75
+ /**
76
+ * Placeholder override
77
+ */
78
+ placeholder: string;
79
+ inputOnly: boolean;
80
+ private _text;
81
+ set text(text: DatePickerText);
82
+ get text(): DatePickerText;
83
+ /**
84
+ * Event emitted on date picker input
85
+ */
86
+ input: EventEmitter<void>;
87
+ /**
88
+ * Event emitted on valid date selection/input
89
+ */
90
+ dateSelected: EventEmitter<Date>;
91
+ /**
92
+ * ViewChild of the date picker div
93
+ */
94
+ datePickerDiv: ElementRef<HTMLDivElement>;
95
+ /**
96
+ * ViewChild of the calendar div
97
+ */
98
+ calendarDiv: ElementRef<HTMLDivElement>;
99
+ calendarPopover: PopoverComponent;
100
+ /**
101
+ * The current date
102
+ */
103
+ private readonly currentDate;
104
+ /**
105
+ * The fixed height of the calendar widget
106
+ */
107
+ private readonly calendarHeight;
108
+ /**
109
+ * The fixed width of the calendar widget
110
+ */
111
+ private readonly calendarWidth;
112
+ /**
113
+ * The amount of padding to apply between the date picker input and the calendar widget
114
+ */
115
+ private readonly calendarPadding;
116
+ /**
117
+ * String tracking date picker input
118
+ */
119
+ dateString: string;
120
+ mobileDateString: string;
121
+ /**
122
+ * Whether to show the calendar
123
+ */
124
+ showCalendar: {
125
+ currentValue: Date;
126
+ };
127
+ /**
128
+ * In mobile (screen width is less than 768), swap to a native input
129
+ */
130
+ isMobile: boolean;
131
+ /**
132
+ * The valid selection interval
133
+ * @private
134
+ */
135
+ validSelectionInterval: {
136
+ start: Date;
137
+ end: Date;
138
+ };
139
+ /**
140
+ * The internal control accessor value
141
+ * @private
142
+ */
143
+ private _value;
144
+ /**
145
+ * The internal disabled state
146
+ * @private
147
+ */
148
+ private _disabled;
149
+ /**
150
+ * Window resize unlisten function
151
+ */
152
+ private resizeListener;
153
+ /**
154
+ * Parse the input Date value into a string
155
+ * @param value the value to parse
156
+ * @private
157
+ */
158
+ private static parseDate;
159
+ /**
160
+ * Parse the input date string into a Date
161
+ * @param dateString the string to parse
162
+ * @private
163
+ */
164
+ private static parseDateString;
165
+ /**
166
+ * Get the date format that matches the input date string, null if no match
167
+ * @param dateString the string to test
168
+ * @private
169
+ */
170
+ private static getDateFormat;
171
+ /**
172
+ * Function to call on change
173
+ */
174
+ onChange: (value: any) => void;
175
+ /**
176
+ * Function to call on touch
177
+ */
178
+ onTouched: () => any;
179
+ /**
180
+ * Dependency injection site
181
+ * @param renderer the Angular renderer
182
+ * @param changeDetectorRef the Angular change detector
183
+ */
184
+ constructor(renderer: Renderer2, changeDetectorRef: ChangeDetectorRef);
185
+ /**
186
+ * Value getter
187
+ */
188
+ get value(): Date;
189
+ /**
190
+ * Disabled getter
191
+ */
192
+ get disabled(): boolean;
193
+ onWindowResize(event: any): void;
194
+ /**
195
+ * Init component, set up window resize listener
196
+ */
197
+ ngOnInit(): void;
198
+ /**
199
+ * Destroy component, invoke window resize unlisten function
200
+ */
201
+ ngOnDestroy(): void;
202
+ /**
203
+ * Write value
204
+ * @param value the value to write
205
+ */
206
+ writeValue(value: Date): void;
207
+ /**
208
+ * Register control value accessor change function
209
+ * @param fn the function to register
210
+ */
211
+ registerOnChange(fn: (value: any) => void): void;
212
+ /**
213
+ * Register touch handler
214
+ * @param fn the touch handler to register
215
+ */
216
+ registerOnTouched(fn: any): void;
217
+ /**
218
+ * Set the disabled state
219
+ * @param isDisabled whether or not the component should be disabled
220
+ */
221
+ setDisabledState?(isDisabled: boolean): void;
222
+ /**
223
+ * Only allow input from digits, forward slashes, and navigation keys
224
+ */
225
+ filterInput(event: KeyboardEvent): void;
226
+ /**
227
+ * Clear value if no input, write parsed date if input requirements fulfilled
228
+ */
229
+ handleBlur(): void;
230
+ /**
231
+ * Write on input if valid date within interval
232
+ */
233
+ handleInput(): void;
234
+ handleMobileInput(): void;
235
+ setMobileValue(): void;
236
+ /**
237
+ * Update the model value
238
+ * @param value the value to update the model to
239
+ */
240
+ updateModel(value: Date): void;
241
+ /**
242
+ * Open the calendar widget
243
+ * @param event the click MouseEvent
244
+ */
245
+ openCalendar(event?: MouseEvent): void;
246
+ /**
247
+ * Hide calendar overlay and remove calendar from the DOM
248
+ */
249
+ handleCalendarClose(): void;
250
+ /**
251
+ * Calculate and set the calendar's position based on the screen height.
252
+ * Positioning prefers to open at the bottom, if not enough room on bottom,
253
+ * positioning is attempted at the top, otherwise it attempts to vertically
254
+ * center
255
+ */
256
+ private setCalendarPosition;
257
+ static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
258
+ static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "particle-date-picker", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "dateRange": { "alias": "dateRange"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "inputClassList": { "alias": "inputClassList"; "required": false; }; "calendarButtonClassList": { "alias": "calendarButtonClassList"; "required": false; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "inputOnly": { "alias": "inputOnly"; "required": false; }; "text": { "alias": "text"; "required": false; }; }, { "input": "input"; "dateSelected": "dateSelected"; }, never, never, false, never>;
259
+ }
@@ -0,0 +1,15 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./date-picker.component";
3
+ import * as i2 from "./components/calendar/calendar.component";
4
+ import * as i3 from "./components/date-range-picker/date-range-picker.component";
5
+ import * as i4 from "@angular/cdk/a11y";
6
+ import * as i5 from "@angular/platform-browser/animations";
7
+ import * as i6 from "@angular/common";
8
+ import * as i7 from "@angular/forms";
9
+ import * as i8 from "../ordinal-number-pipe/ordinal-number-pipe.module";
10
+ import * as i9 from "../popover/popover.module";
11
+ export declare class ParticleDatePickerModule {
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<ParticleDatePickerModule, never>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ParticleDatePickerModule, [typeof i1.DatePickerComponent, typeof i2.CalendarComponent, typeof i3.DateRangePickerComponent], [typeof i4.A11yModule, typeof i5.BrowserAnimationsModule, typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.ParticleOrdinalNumberPipeModule, typeof i9.ParticlePopoverModule], [typeof i1.DatePickerComponent, typeof i2.CalendarComponent, typeof i3.DateRangePickerComponent]>;
14
+ static ɵinj: i0.ɵɵInjectorDeclaration<ParticleDatePickerModule>;
15
+ }
@@ -0,0 +1,87 @@
1
+ import { ElementRef, EventEmitter } from '@angular/core';
2
+ import { DialogService } from '../../shared/services/dialog.service';
3
+ import { Observable } from 'rxjs';
4
+ import { AnimationEvent } from '@angular/animations';
5
+ import { DialogText } from '../../shared/models/particle-component-text.model';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Component to display a dialog with dynamic content
9
+ */
10
+ export declare class DialogComponent {
11
+ private dialogService;
12
+ /**
13
+ * Element reference to the dialog close button
14
+ */
15
+ closeButton: ElementRef<HTMLButtonElement>;
16
+ /**
17
+ * Observable to update the effective width of the dialog on screen resize
18
+ */
19
+ effectiveWidth$: Observable<string>;
20
+ /**
21
+ * Object to operate whether the dialog is open/closed
22
+ */
23
+ private _object;
24
+ /**
25
+ * Object to operate whether the dialog is open/closed
26
+ */
27
+ set object(value: any);
28
+ get object(): any;
29
+ /**
30
+ * Title to show at the top of the dialog
31
+ */
32
+ title: string;
33
+ /**
34
+ * Class to apply to the title of the dialog
35
+ */
36
+ titleClass: string;
37
+ /**
38
+ * Show or hide the title bar
39
+ */
40
+ showTitle: boolean;
41
+ /**
42
+ * Whether to show close button and allow escape to close
43
+ */
44
+ allowClose: boolean;
45
+ /**
46
+ * Class to apply to the body of the dialog
47
+ */
48
+ bodyClass: string;
49
+ /**
50
+ * Height of the dialog (can use any height measurement)
51
+ */
52
+ height: string;
53
+ /**
54
+ * Width of the dialog (can use any width measurement)
55
+ */
56
+ width: string;
57
+ borderRadius: string;
58
+ text: DialogText;
59
+ /**
60
+ * Event Emitter for when the dialog is closed
61
+ */
62
+ closed: EventEmitter<any>;
63
+ /**
64
+ * Event emitted when dialog has finished opening
65
+ */
66
+ opened: EventEmitter<void>;
67
+ /**
68
+ * Dependency injection site
69
+ * @param dialogService the dialog service
70
+ */
71
+ constructor(dialogService: DialogService);
72
+ /**
73
+ * Null the object to close the dialog, emit the close event.
74
+ */
75
+ close(): void;
76
+ /**
77
+ * Method for compatibility with legacy dialog API. Method does nothing.
78
+ */
79
+ open(): void;
80
+ /**
81
+ * Emit closed/opened events based on state when dialog animation ends
82
+ * @param event
83
+ */
84
+ onAnimationDone(event: AnimationEvent): void;
85
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogComponent, never>;
86
+ static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "particle-dialog", never, { "object": { "alias": "object"; "required": false; }; "title": { "alias": "title"; "required": false; }; "titleClass": { "alias": "titleClass"; "required": false; }; "showTitle": { "alias": "showTitle"; "required": false; }; "allowClose": { "alias": "allowClose"; "required": false; }; "bodyClass": { "alias": "bodyClass"; "required": false; }; "height": { "alias": "height"; "required": false; }; "width": { "alias": "width"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "text": { "alias": "text"; "required": false; }; }, { "closed": "closed"; "opened": "opened"; }, never, ["*"], false, never>;
87
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./dialog.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/cdk/a11y";
5
+ export declare class ParticleDialogModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<ParticleDialogModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ParticleDialogModule, [typeof i1.DialogComponent], [typeof i2.CommonModule, typeof i3.A11yModule], [typeof i1.DialogComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<ParticleDialogModule>;
9
+ }
@@ -0,0 +1,288 @@
1
+ import { AnimationEvent } from '@angular/animations';
2
+ import { ChangeDetectorRef, ElementRef, EventEmitter, QueryList, Renderer2, TemplateRef } from '@angular/core';
3
+ import { ControlValueAccessor } from '@angular/forms';
4
+ import { BehaviorSubject, Observable } from 'rxjs';
5
+ import { DropdownOption } from './models/dropdown-option.model';
6
+ import { DropdownOptionGroup } from './models/dropdown-option-group.model';
7
+ import { DropdownText } from '../../shared/models/particle-component-text.model';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * Type representing the dropdown component option input
11
+ */
12
+ declare type DropdownOptionInput = Array<DropdownOption | DropdownOptionGroup>;
13
+ /**
14
+ * Dropdown component
15
+ */
16
+ export declare class DropdownComponent implements ControlValueAccessor {
17
+ private renderer;
18
+ private changeDetectorRef;
19
+ /**
20
+ * Set the value of the dropdown
21
+ * @param value the value to set
22
+ */
23
+ set value(value: string | number);
24
+ get value(): string | number;
25
+ /**
26
+ * The dropdown options/option groups
27
+ */
28
+ set options(options: DropdownOptionInput);
29
+ /**
30
+ * Dependency injection site
31
+ * @param renderer the Angular renderer
32
+ * @param changeDetectorRef reference to the Angular change detector
33
+ */
34
+ constructor(renderer: Renderer2, changeDetectorRef: ChangeDetectorRef);
35
+ /**
36
+ * The amount of offset (in pixels) to place between the dropdown
37
+ * and its list overlay
38
+ * @private
39
+ */
40
+ private static readonly DROPDOWN_LIST_OFFSET;
41
+ /**
42
+ * List of arrow key keycodes
43
+ * @private
44
+ */
45
+ private static readonly ARROW_KEYS;
46
+ /**
47
+ * ViewChild of the dropdown
48
+ */
49
+ dropdown: ElementRef<HTMLDivElement>;
50
+ /**
51
+ * ViewChild of the dropdown button
52
+ */
53
+ dropdownButton: ElementRef<HTMLButtonElement>;
54
+ /**
55
+ * ViewChild of the dropdown list
56
+ */
57
+ dropdownList: ElementRef<HTMLDivElement>;
58
+ /**
59
+ * QueryList of dropdown option ViewChildren
60
+ */
61
+ dropdownOptions: QueryList<ElementRef<HTMLButtonElement>>;
62
+ /**
63
+ * ContentChild of the dropdown option template
64
+ */
65
+ template: TemplateRef<HTMLElement>;
66
+ /**
67
+ * Whether the dropdown should be disabled
68
+ */
69
+ disabled: boolean;
70
+ text: DropdownText;
71
+ /**
72
+ * Class list to assign to the dropdown
73
+ */
74
+ classList: string;
75
+ buttonClassList: string;
76
+ /**
77
+ * Event emitted on value change, emits the new value
78
+ */
79
+ change: EventEmitter<string | number>;
80
+ /**
81
+ * BehaviorSubject tracking the input dropdown options/option groups
82
+ */
83
+ readonly _options: BehaviorSubject<DropdownOptionInput>;
84
+ /**
85
+ * Full list of all active options, whether they are in a group or not
86
+ * @private
87
+ */
88
+ private _allOptions;
89
+ /**
90
+ * Typeahead string while users are typing into the input field
91
+ * @private
92
+ */
93
+ private _fullPredictiveTextString;
94
+ /**
95
+ * Timeout to clear the _fullPredictiveTextString after a user stops typing for a certain amount of time
96
+ * @private
97
+ */
98
+ private _timeout;
99
+ /**
100
+ * BehaviorSubject tracking the current value of the dropdown
101
+ */
102
+ readonly _internalValue: BehaviorSubject<string | number>;
103
+ /**
104
+ * Observable map of option value (stringified if a number) to data context
105
+ */
106
+ private readonly dataContextMap$;
107
+ /**
108
+ * The data context of the selected option as an Observable
109
+ */
110
+ readonly selectedDataContext$: Observable<{
111
+ [key: string]: unknown;
112
+ }>;
113
+ private static getAllOptions;
114
+ /**
115
+ * Unique ID to assign to the dropdown
116
+ */
117
+ readonly dropdownId: any;
118
+ /**
119
+ * Whether the dropdown should be rendered
120
+ */
121
+ render: boolean;
122
+ /**
123
+ * Whether the dropdown is open
124
+ */
125
+ opened: boolean;
126
+ /**
127
+ * The index of the focused option in the dropdown list
128
+ */
129
+ selectionIndex: number;
130
+ /**
131
+ * In mobile (screen width is less than 768), swap to a native input
132
+ */
133
+ isMobile: boolean;
134
+ /**
135
+ * The current value of the dropdown
136
+ * @private
137
+ */
138
+ private _value;
139
+ /**
140
+ * Removes options that do not have both a label and a value,
141
+ * also removes empty groups (or groups that have no valid options)
142
+ * @param options the options to sanitize
143
+ * @private
144
+ */
145
+ private static sanitizeOptionInput;
146
+ /**
147
+ * Add option label to data context if not present. If $implicit
148
+ * value is not present, it will be added with the label as its value.
149
+ * If $implicit is already present, it will add a label key to the context
150
+ * @param label the option label
151
+ * @param dataContext the option data context
152
+ * @private
153
+ */
154
+ private static addLabelToDataContext;
155
+ /**
156
+ * Function to call on change
157
+ */
158
+ onChange: (value: any) => void;
159
+ /**
160
+ * Function to call on touch
161
+ */
162
+ onTouched: () => any;
163
+ /**
164
+ * Write value
165
+ * @param value the value to write
166
+ */
167
+ writeValue(value: string | number): void;
168
+ /**
169
+ * Register function on change
170
+ * @param fn the function to register
171
+ */
172
+ registerOnChange(fn: any): void;
173
+ /**
174
+ * Register function on touch
175
+ * @param fn the function to register
176
+ */
177
+ registerOnTouched(fn: any): void;
178
+ /**
179
+ * Set the disabled state
180
+ * @param isDisabled disabled or not
181
+ */
182
+ setDisabledState?(isDisabled: boolean): void;
183
+ /**
184
+ * Reposition and resize the dropdown on window resize
185
+ */
186
+ onWindowResize(event: any): void;
187
+ /**
188
+ * Prevent default behavior for arrow key keydown event
189
+ * @param event the keydown KeyboardEvent
190
+ */
191
+ onKeyDown(event: KeyboardEvent): void;
192
+ /**
193
+ * Close the dropdown list on tab and handle arrow key navigation
194
+ * @param event the keyup KeyboardEvent
195
+ */
196
+ onKeyUp(event: KeyboardEvent): void;
197
+ /**
198
+ * Close the dropdown list (if opened) on click if outside the list
199
+ * @param event the click MouseEvent
200
+ */
201
+ onClick(event: MouseEvent): void;
202
+ /**
203
+ * Close dropdown on escape keyup and focus on dropdown button
204
+ * @param event the keyup KeyboardEvent
205
+ */
206
+ onEscapeKeyUp(event: Event): void;
207
+ /**
208
+ * Set focus to dropdown option on mouse enter and update selected index
209
+ * @param option the dropdown option to focus
210
+ * @param index the index of the option to focus
211
+ */
212
+ onDropdownOptionMouseEnter(option: HTMLButtonElement, index: number): void;
213
+ /**
214
+ * Set focus to dropdown option on mouse move and update selected index
215
+ * @param option the dropdown option to focus
216
+ * @param index the index of the option to focus
217
+ */
218
+ onDropdownOptionMouseMove(option: HTMLButtonElement, index: number): void;
219
+ /**
220
+ * Write value and close dropdown on option select
221
+ * @param value the value to write
222
+ * @param disabled whether or not the selected option is disabled
223
+ */
224
+ onDropdownOptionSelect(value: string | number, disabled: boolean): void;
225
+ /**
226
+ * Open the dropdown list and align it
227
+ * @param event the click MouseEvent
228
+ */
229
+ openDropdown(event: MouseEvent): void;
230
+ /**
231
+ * Close the dropdown list
232
+ */
233
+ closeDropdown(): void;
234
+ /**
235
+ * Position and resize dropdown list on animation start if toState is open
236
+ * @param event the Angular AnimationEvent
237
+ */
238
+ onAnimationStart(event: AnimationEvent): void;
239
+ /**
240
+ * Stop rendering dropdown list on animation done if toState is close
241
+ * @param event the Angular AnimationEvent
242
+ */
243
+ onAnimationDone(event: AnimationEvent): void;
244
+ /**
245
+ * Focus on the selected dropdown option on dropdown open
246
+ * @private
247
+ */
248
+ setSelectionIndex(): void;
249
+ /**
250
+ * Update internal value and emit change events if input value differs from current value
251
+ * @param value the selected value
252
+ * @private
253
+ */
254
+ private handleDropdownOptionSelect;
255
+ onModelChangeMobile(value: any): void;
256
+ /**
257
+ * Align the dropdown list with the dropdown
258
+ * @private
259
+ */
260
+ private positionDropdownList;
261
+ /**
262
+ * Match the dropdown list width to the dropdown's width
263
+ * @private
264
+ */
265
+ private resizeDropdownList;
266
+ /**
267
+ * Handle arrow keyup event
268
+ * @param key the arrow key
269
+ */
270
+ private onArrowKeyUp;
271
+ /**
272
+ * Get the next enabled dropdown option (relative to the current selection index).
273
+ * If the currently selected option is the final available option, it is
274
+ * returned. If no selection has been made, the first available option is returned
275
+ * @private
276
+ */
277
+ private getNextOption;
278
+ /**
279
+ * Get the previous enabled dropdown option (relative to the current selection index).
280
+ * If the currently selected option is the first available option, it is
281
+ * returned
282
+ * @private
283
+ */
284
+ private getPreviousOption;
285
+ static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, never>;
286
+ static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "particle-dropdown", never, { "value": { "alias": "value"; "required": false; }; "options": { "alias": "options"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "text": { "alias": "text"; "required": false; }; "classList": { "alias": "classList"; "required": false; }; "buttonClassList": { "alias": "buttonClassList"; "required": false; }; }, { "change": "change"; }, ["template"], ["template"], false, never>;
287
+ }
288
+ export {};
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./dropdown.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ export declare class ParticleDropdownModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<ParticleDropdownModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ParticleDropdownModule, [typeof i1.DropdownComponent], [typeof i2.CommonModule, typeof i3.FormsModule], [typeof i1.DropdownComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<ParticleDropdownModule>;
9
+ }
@@ -0,0 +1,16 @@
1
+ import { DropdownOption } from './dropdown-option.model';
2
+ /**
3
+ * Interface representing an array of dropdown options
4
+ * grouped under a label
5
+ */
6
+ export interface DropdownOptionGroup {
7
+ type?: 'group';
8
+ /**
9
+ * The option group label
10
+ */
11
+ groupLabel: string;
12
+ /**
13
+ * The group options
14
+ */
15
+ options: Array<DropdownOption>;
16
+ }