@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,149 @@
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, OnInit, Renderer2 } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { ColorPickerText } from '../../shared/models/particle-component-text.model';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Component that wraps the native HTML5 color picker for supported browsers
7
+ */
8
+ export declare class ColorPickerComponent implements ControlValueAccessor, OnInit {
9
+ private renderer;
10
+ private changeDetectorRef;
11
+ /**
12
+ * Regex to match a hexadecimal string (000000)
13
+ * @private
14
+ */
15
+ private static readonly FULL_HEX_REGEX;
16
+ /**
17
+ * Regex to match a short hexadecimal string (000)
18
+ * @private
19
+ */
20
+ private static readonly SHORT_HEX_REGEX;
21
+ /**
22
+ * Regex to match a valid hex character (A-F, a-f, 0-9)
23
+ * @private
24
+ */
25
+ private static readonly HEX_CHARACTER_REGEX;
26
+ /**
27
+ * Navigation keys
28
+ * @private
29
+ */
30
+ private static readonly NAVIGATION_KEYS;
31
+ /**
32
+ * Set the value of the color picker
33
+ * @param value the value to set
34
+ */
35
+ set value(value: string);
36
+ /**
37
+ * Set disabled
38
+ * @param disabled whether or not the control should be disabled
39
+ */
40
+ set disabled(disabled: boolean);
41
+ /**
42
+ * Class list to apply to the hex string input
43
+ */
44
+ classList: string;
45
+ text: ColorPickerText;
46
+ /**
47
+ * Event emitted on hex string input event. Emits the current value of the input
48
+ */
49
+ input: EventEmitter<string>;
50
+ /**
51
+ * Event emitted on color selection from color picker (color picker widget dismissed)
52
+ * or valid hex string typed in input. Emits the current value of the input
53
+ */
54
+ colorSelected: EventEmitter<string>;
55
+ /**
56
+ * ViewChild of the color input element
57
+ */
58
+ colorInput: ElementRef<HTMLInputElement>;
59
+ /**
60
+ * Whether to render the component
61
+ */
62
+ render: boolean;
63
+ /**
64
+ * Whether the native HTML5 color picker is supported
65
+ */
66
+ colorPickerSupported: boolean;
67
+ /**
68
+ * The value of the color picker
69
+ */
70
+ _value: string;
71
+ /**
72
+ * Whether the color picker is disabled
73
+ * @private
74
+ */
75
+ _disabled: boolean;
76
+ /**
77
+ * Expand a short hex string (#abc) into its full form (#aabbcc)
78
+ * @param hexString the short hex string to expand
79
+ * @private
80
+ */
81
+ private static expandShortHexString;
82
+ /**
83
+ * Function to call on change
84
+ */
85
+ onChange: (value: any) => void;
86
+ /**
87
+ * Function to call on touch
88
+ */
89
+ onTouched: () => any;
90
+ /**
91
+ * Dependency injection site
92
+ * @param renderer the Angular renderer
93
+ * @param changeDetectorRef the Angular ChangeDetectorRef
94
+ */
95
+ constructor(renderer: Renderer2, changeDetectorRef: ChangeDetectorRef);
96
+ /**
97
+ * Init component, check for color picker browser support
98
+ */
99
+ ngOnInit(): void;
100
+ /**
101
+ * Write value
102
+ * @param value the value to write
103
+ */
104
+ writeValue(value: string): void;
105
+ /**
106
+ * Register on change function
107
+ * @param fn the function to register
108
+ */
109
+ registerOnChange(fn: any): void;
110
+ /**
111
+ * Register on touched function
112
+ * @param fn the function to register
113
+ */
114
+ registerOnTouched(fn: any): void;
115
+ /**
116
+ * Set whether the control should be disabled
117
+ * @param isDisabled disabled or not
118
+ */
119
+ setDisabledState(isDisabled: boolean): void;
120
+ /**
121
+ * Prevent illegal input
122
+ * @param event the keydown KeyboardEvent
123
+ */
124
+ handleKeyDown(event: KeyboardEvent): void;
125
+ /**
126
+ * Update model
127
+ * @param value the new value of the model
128
+ * @param emitColorSelected whether or not emit the color selected event
129
+ * @private
130
+ */
131
+ updateModel(value: string, emitColorSelected?: boolean): void;
132
+ /**
133
+ * Null out value on blur if not valid hex string, otherwise update model
134
+ * @param value the value to check
135
+ */
136
+ handleBlur(value: string): void;
137
+ /**
138
+ * Prevent pasting a non-hex string
139
+ * @param event the paste ClipboardEvent
140
+ */
141
+ handlePaste(event: ClipboardEvent): void;
142
+ /**
143
+ * Determine if the browser supports the HTML5 color picker
144
+ * @private
145
+ */
146
+ private isColorPickerSupported;
147
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColorPickerComponent, never>;
148
+ static ɵcmp: i0.ɵɵComponentDeclaration<ColorPickerComponent, "particle-color-picker", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "classList": { "alias": "classList"; "required": false; }; "text": { "alias": "text"; "required": false; }; }, { "input": "input"; "colorSelected": "colorSelected"; }, never, never, false, never>;
149
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./color-picker.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ export declare class ParticleColorPickerModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<ParticleColorPickerModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ParticleColorPickerModule, [typeof i1.ColorPickerComponent], [typeof i2.CommonModule, typeof i3.FormsModule], [typeof i1.ColorPickerComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<ParticleColorPickerModule>;
9
+ }
@@ -0,0 +1,211 @@
1
+ import { ElementRef, EventEmitter, OnDestroy, OnInit, QueryList, Renderer2 } from '@angular/core';
2
+ import { BehaviorSubject, Observable } from 'rxjs';
3
+ import { CalendarText } from '../../../../shared/models/particle-component-text.model';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Interface representing a date interval
7
+ */
8
+ export declare interface Interval {
9
+ start: Date | number;
10
+ end: Date | number;
11
+ }
12
+ /**
13
+ * Interface representing a Date broken down by date/month/year
14
+ * with extended metadata
15
+ */
16
+ declare interface MetaDate {
17
+ /**
18
+ * The day of the week (starting at 0)
19
+ */
20
+ day: number;
21
+ /**
22
+ * The day of the month (starting at 1)
23
+ */
24
+ date: number;
25
+ /**
26
+ * The month (starting at 0)
27
+ */
28
+ month: number;
29
+ /**
30
+ * The full year
31
+ */
32
+ year: number;
33
+ /**
34
+ * Whether the day is selectable
35
+ */
36
+ selectable: boolean;
37
+ }
38
+ /**
39
+ * Component that allows a user to select a date from a calendar
40
+ */
41
+ export declare class CalendarComponent implements OnDestroy, OnInit {
42
+ private renderer;
43
+ /**
44
+ * The keyboard arrow keys
45
+ * @private
46
+ */
47
+ private static readonly ARROW_KEYS;
48
+ /**
49
+ * ViewChild of the calendar widget parent div element
50
+ */
51
+ calendarWidgetDiv: ElementRef<HTMLDivElement>;
52
+ /**
53
+ * ViewChild of the month select element
54
+ */
55
+ yearSelect: ElementRef<HTMLSelectElement>;
56
+ /**
57
+ * ViewChild of the done button
58
+ */
59
+ doneButton: ElementRef<HTMLButtonElement>;
60
+ /**
61
+ * QueryList of the calendar date buttons for the currently selected month/year
62
+ */
63
+ calendarDates: QueryList<ElementRef<HTMLButtonElement>>;
64
+ /**
65
+ * The selected date value
66
+ */
67
+ set value(value: Date);
68
+ /**
69
+ * The range of available dates to choose from
70
+ */
71
+ set dateRange(dateRange: {
72
+ minDate: Date;
73
+ maxDate: Date;
74
+ });
75
+ set text(text: CalendarText);
76
+ get text(): CalendarText;
77
+ showControls: boolean;
78
+ private _text;
79
+ /**
80
+ * Event emitted on date select
81
+ */
82
+ selected: EventEmitter<Date>;
83
+ /**
84
+ * Event emitted on close (either through the button, escape keyup or click off of widget).
85
+ * Note: it is the parent component's job to actually hide the calendar, this event
86
+ * acts as a signal that that action should be taken
87
+ */
88
+ closed: EventEmitter<void>;
89
+ /**
90
+ * The current Date broken down by day/month/year
91
+ */
92
+ readonly currentDate: MetaDate;
93
+ /**
94
+ * Array of days of the week
95
+ */
96
+ weekDays: string[];
97
+ /**
98
+ * BehaviorSubject tracking the current value
99
+ */
100
+ readonly _value: BehaviorSubject<MetaDate>;
101
+ /**
102
+ * BehaviorSubject tracking the valid selection interval
103
+ */
104
+ readonly _validSelectionInterval: BehaviorSubject<Interval>;
105
+ /**
106
+ * BehaviorSubject tracking the currently selected month
107
+ */
108
+ readonly _selectedMonth: BehaviorSubject<number>;
109
+ /**
110
+ * BehaviorSubject tracking the currently selected year
111
+ */
112
+ readonly _selectedYear: BehaviorSubject<number>;
113
+ /**
114
+ * The full month for the current selected month/year
115
+ */
116
+ readonly fullMonth$: Observable<Array<MetaDate>>;
117
+ /**
118
+ * The range of selectable years as an Observable
119
+ */
120
+ readonly validYearRange$: Observable<Array<number>>;
121
+ /**
122
+ * Subscription for the combination of value and valid selection interval
123
+ * @private
124
+ */
125
+ private readonly subscription;
126
+ /**
127
+ * The currently selected date
128
+ */
129
+ selectedDate: MetaDate | null;
130
+ /**
131
+ * Generate a 42 element array representing the input month's days with
132
+ * padding from the previous/following month
133
+ * @param month the month to generate dates for
134
+ * @param year the year to generate the month for
135
+ * @param selectionInterval the selection interval
136
+ */
137
+ private static generateMonth;
138
+ /**
139
+ * Generate an Array of numbers representing the span of years between the input
140
+ * @param minYear the start of the range
141
+ * @param maxYear the end of the range
142
+ * @param currentYear the current year
143
+ */
144
+ private static generateYearRange;
145
+ /**
146
+ * Dependency injection site
147
+ * @param renderer the Angular renderer
148
+ */
149
+ constructor(renderer: Renderer2);
150
+ /**
151
+ * Init component
152
+ */
153
+ ngOnInit(): void;
154
+ /**
155
+ * Destroy component, unsubscribe from any active subscriptions
156
+ */
157
+ ngOnDestroy(): void;
158
+ /**
159
+ * Handle window keyup events
160
+ * @param event the keyup KeyboardEvent
161
+ */
162
+ onKeyUp(event: KeyboardEvent): void;
163
+ /**
164
+ * Emit closed event on click if clicked outside calendar widget
165
+ * @param event the click MouseEvent
166
+ */
167
+ handleClick(event: MouseEvent): void;
168
+ /**
169
+ * Update selected date and emit selection event
170
+ * @param selectedDate the selected date
171
+ */
172
+ handleDateSelection(selectedDate: MetaDate): void;
173
+ /**
174
+ * Select the current date and toggle selected month/year to match
175
+ */
176
+ selectToday(): void;
177
+ /**
178
+ * Handle arrow key navigation for calendar date buttons
179
+ * @param key the pressed arrow key
180
+ * @private
181
+ */
182
+ private onArrowKeyUp;
183
+ /**
184
+ * Attempt to focus on date indexed immediately to the left of the input date
185
+ * @param date the day of the month
186
+ * @private
187
+ */
188
+ private navigateLeft;
189
+ /**
190
+ * Attempt to focus on date indexed immediately to the right of the input date
191
+ * @param date the day of the month
192
+ * @private
193
+ */
194
+ private navigateRight;
195
+ /**
196
+ * Attempt to navigate one week in the past from the input date
197
+ * @param date the day of the month
198
+ * @private
199
+ */
200
+ private navigateUp;
201
+ /**
202
+ * Attempt to navigate one week in the future from the input date
203
+ * @param date the day of the month
204
+ * @private
205
+ */
206
+ private navigateDown;
207
+ clear(): void;
208
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, never>;
209
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "particle-calendar", never, { "value": { "alias": "value"; "required": false; }; "dateRange": { "alias": "dateRange"; "required": false; }; "text": { "alias": "text"; "required": false; }; "showControls": { "alias": "showControls"; "required": false; }; }, { "selected": "selected"; "closed": "closed"; }, never, never, false, never>;
210
+ }
211
+ export {};
@@ -0,0 +1,95 @@
1
+ import { AfterViewInit, ChangeDetectorRef } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { DateRangePickerText } from '../../../../shared/models/particle-component-text.model';
4
+ import { PopoverComponent } from '../../../popover/popover.component';
5
+ import { CalendarComponent } from '../calendar/calendar.component';
6
+ import * as i0 from "@angular/core";
7
+ export declare class DateRangePickerComponent implements ControlValueAccessor, AfterViewInit {
8
+ private changeDetectorRef;
9
+ currentYear: number;
10
+ _disabled: boolean;
11
+ private _value$;
12
+ private _lastValue;
13
+ private _init;
14
+ valueObs$: import("rxjs").Observable<any>;
15
+ inputId: string;
16
+ inputClassList: string;
17
+ calendarButtonClassList: string;
18
+ text: DateRangePickerText;
19
+ set dateRange(value: {
20
+ minDate: Date;
21
+ maxDate: Date;
22
+ });
23
+ get dateRange(): {
24
+ minDate: Date;
25
+ maxDate: Date;
26
+ };
27
+ get endDateRange(): {
28
+ minDate: Date;
29
+ maxDate: Date;
30
+ };
31
+ private _dateRange;
32
+ private _endDateRange;
33
+ set value(value: {
34
+ start: Date;
35
+ end: Date;
36
+ });
37
+ get value(): {
38
+ start: Date;
39
+ end: Date;
40
+ };
41
+ set disabled(disabled: boolean);
42
+ get disabled(): boolean;
43
+ ariaLabel: string;
44
+ /**
45
+ * Format for the selected date range in the selection preview. Must
46
+ * be a valid Angular DatePipe format
47
+ */
48
+ dateFormat: string;
49
+ calendarPopover: PopoverComponent;
50
+ beginCalendar: CalendarComponent;
51
+ endCalendar: CalendarComponent;
52
+ ngAfterViewInit(): void;
53
+ get beginDate(): Date;
54
+ set beginDate(beginDate: Date);
55
+ get endDate(): Date;
56
+ set endDate(endDate: Date);
57
+ /**
58
+ * Function to call on change
59
+ */
60
+ onChange: (value: any) => void;
61
+ /**
62
+ * Function to call on touch
63
+ */
64
+ onTouched: () => any;
65
+ constructor(changeDetectorRef: ChangeDetectorRef);
66
+ /**
67
+ * Write value
68
+ * @param value the value to write
69
+ */
70
+ writeValue(value: {
71
+ start: Date;
72
+ end: Date;
73
+ }): void;
74
+ /**
75
+ * Register function on change
76
+ * @param fn the function to change
77
+ */
78
+ registerOnChange(fn: any): void;
79
+ /**
80
+ * Register function on touch
81
+ * @param fn the function to register
82
+ */
83
+ registerOnTouched(fn: any): void;
84
+ /**
85
+ * Set disabled state
86
+ * @param isDisabled whether or not the control is disabled
87
+ */
88
+ setDisabledState(isDisabled: boolean): void;
89
+ openCalendar(event: Event): void;
90
+ updateModel(isBegin: boolean, date: Date): void;
91
+ checkState(): void;
92
+ clear(): void;
93
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePickerComponent, never>;
94
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateRangePickerComponent, "particle-date-range-picker", never, { "inputId": { "alias": "inputId"; "required": false; }; "inputClassList": { "alias": "inputClassList"; "required": false; }; "calendarButtonClassList": { "alias": "calendarButtonClassList"; "required": false; }; "text": { "alias": "text"; "required": false; }; "dateRange": { "alias": "dateRange"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; }, {}, never, never, false, never>;
95
+ }