@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.
- package/LICENSE +7 -0
- package/README.md +396 -0
- package/app/modules/accordion/accordion.component.d.ts +26 -0
- package/app/modules/accordion/accordion.module.d.ts +11 -0
- package/app/modules/accordion/directives/accordion-content.directive.d.ts +8 -0
- package/app/modules/accordion/directives/accordion-header.directive.d.ts +8 -0
- package/app/modules/accordion/directives/accordion-item.directive.d.ts +13 -0
- package/app/modules/background-carousel/background-carousel.directive.d.ts +42 -0
- package/app/modules/background-carousel/carousel-options.model.d.ts +30 -0
- package/app/modules/background-carousel/particle-background-carousel.module.d.ts +8 -0
- package/app/modules/checkbox/checkbox.component.d.ts +43 -0
- package/app/modules/checkbox/checkbox.module.d.ts +9 -0
- package/app/modules/color-picker/color-picker.component.d.ts +149 -0
- package/app/modules/color-picker/color-picker.module.d.ts +9 -0
- package/app/modules/date-picker/components/calendar/calendar.component.d.ts +211 -0
- package/app/modules/date-picker/components/date-range-picker/date-range-picker.component.d.ts +95 -0
- package/app/modules/date-picker/date-picker.component.d.ts +259 -0
- package/app/modules/date-picker/date-picker.module.d.ts +15 -0
- package/app/modules/dialog/dialog.component.d.ts +87 -0
- package/app/modules/dialog/dialog.module.d.ts +9 -0
- package/app/modules/dropdown/dropdown.component.d.ts +288 -0
- package/app/modules/dropdown/dropdown.module.d.ts +9 -0
- package/app/modules/dropdown/models/dropdown-option-group.model.d.ts +16 -0
- package/app/modules/dropdown/models/dropdown-option.model.d.ts +25 -0
- package/app/modules/endpoint-state/components/endpoint-state.component.d.ts +46 -0
- package/app/modules/endpoint-state/endpoint-state.module.d.ts +8 -0
- package/app/modules/icons/components/icon-select.component.d.ts +229 -0
- package/app/modules/icons/models/fontawesome-icons-brands.model.d.ts +13 -0
- package/app/modules/icons/models/fontawesome-icons-regular.model.d.ts +13 -0
- package/app/modules/icons/models/fontawesome-icons-solid.model.d.ts +13 -0
- package/app/modules/icons/models/particle-icons-light.model.d.ts +197 -0
- package/app/modules/icons/models/particle-icons-regular.model.d.ts +205 -0
- package/app/modules/icons/models/particle-icons-solid.model.d.ts +365 -0
- package/app/modules/icons/particle-icons.module.d.ts +13 -0
- package/app/modules/icons/services/icons.service.d.ts +44 -0
- package/app/modules/idle-timeout/idle-timeout.component.d.ts +35 -0
- package/app/modules/idle-timeout/idle-timer.d.ts +14 -0
- package/app/modules/idle-timeout/particle-idle-timeout.module.d.ts +9 -0
- package/app/modules/input-mask/input-mask.component.d.ts +86 -0
- package/app/modules/input-mask/input-mask.module.d.ts +8 -0
- package/app/modules/keyfilter/keyfilter.directive.d.ts +60 -0
- package/app/modules/keyfilter/keyfilter.module.d.ts +8 -0
- package/app/modules/layout/components/layout-full-framing/layout-full-framing.component.d.ts +27 -0
- package/app/modules/layout/components/layout-fullwidth-sidebar/layout-fullwidth-sidebar.component.d.ts +23 -0
- package/app/modules/layout/layout.module.d.ts +10 -0
- package/app/modules/loader/components/loader.component.d.ts +11 -0
- package/app/modules/loader/loader.module.d.ts +8 -0
- package/app/modules/multi-select/models/multi-select-option-group.model.d.ts +16 -0
- package/app/modules/multi-select/models/multi-select-option.model.d.ts +25 -0
- package/app/modules/multi-select/multi-select.component.d.ts +279 -0
- package/app/modules/multi-select/multi-select.module.d.ts +8 -0
- package/app/modules/notification/models/notification.model.d.ts +21 -0
- package/app/modules/notification/notification.component.d.ts +46 -0
- package/app/modules/notification/notification.module.d.ts +8 -0
- package/app/modules/notification/services/notification.service.d.ts +54 -0
- package/app/modules/ordinal-number-pipe/ordinal-number-pipe.module.d.ts +8 -0
- package/app/modules/ordinal-number-pipe/ordinal-number.pipe.d.ts +15 -0
- package/app/modules/paginator/pagination-event.model.d.ts +24 -0
- package/app/modules/paginator/paginator.component.d.ts +103 -0
- package/app/modules/paginator/particle-paginator.module.d.ts +13 -0
- package/app/modules/popover/popover.component.d.ts +140 -0
- package/app/modules/popover/popover.module.d.ts +9 -0
- package/app/modules/profile-pic/particle-profile-pic.module.d.ts +9 -0
- package/app/modules/profile-pic/profile-pic.component.d.ts +32 -0
- package/app/modules/progress-bar/progress-bar.component.d.ts +16 -0
- package/app/modules/progress-bar/progress-bar.module.d.ts +8 -0
- package/app/modules/push-container/particle-push-container.module.d.ts +9 -0
- package/app/modules/push-container/push-container-state.model.d.ts +7 -0
- package/app/modules/push-container/push-container.component.d.ts +137 -0
- package/app/modules/rich-text/particle-rich-text.module.d.ts +15 -0
- package/app/modules/rich-text/render-rich-text.component.d.ts +6 -0
- package/app/modules/rich-text/rich-text-capabilities.model.d.ts +7 -0
- package/app/modules/rich-text/rich-text.component.d.ts +48 -0
- package/app/modules/scroll-to-top/particle-scroll-to-top.module.d.ts +8 -0
- package/app/modules/scroll-to-top/scroll-to-top.component.d.ts +19 -0
- package/app/modules/slideover/particle-slideover.module.d.ts +8 -0
- package/app/modules/slideover/slideover.component.d.ts +35 -0
- package/app/modules/slider/slider.component.d.ts +143 -0
- package/app/modules/slider/slider.module.d.ts +9 -0
- package/app/modules/theming/components/theming.component.d.ts +43 -0
- package/app/modules/theming/models/theme.model.d.ts +88 -0
- package/app/modules/theming/services/theme-change-detection.service.d.ts +26 -0
- package/app/modules/theming/services/theming.service.d.ts +142 -0
- package/app/modules/theming/theming.module.d.ts +12 -0
- package/app/modules/toggle-switch/models/toggle-options.model.d.ts +11 -0
- package/app/modules/toggle-switch/toggle-switch.component.d.ts +43 -0
- package/app/modules/toggle-switch/toggle-switch.module.d.ts +8 -0
- package/app/modules/tooltip/tooltip.directive.d.ts +157 -0
- package/app/modules/tooltip/tooltip.module.d.ts +8 -0
- package/app/modules/week-picker/week-picker.component.d.ts +289 -0
- package/app/modules/week-picker/week-picker.module.d.ts +13 -0
- package/app/shared/enums/endpoint-status.enum.d.ts +9 -0
- package/app/shared/interceptors/json.interceptor.d.ts +17 -0
- package/app/shared/models/auditable.model.d.ts +21 -0
- package/app/shared/models/data-list.model.d.ts +9 -0
- package/app/shared/models/id.model.d.ts +9 -0
- package/app/shared/models/observable-container.d.ts +8 -0
- package/app/shared/models/particle-component-text.model.d.ts +211 -0
- package/app/shared/services/base-data.service.d.ts +130 -0
- package/app/shared/services/dialog.service.d.ts +10 -0
- package/app/shared/services/local-storage.service.d.ts +41 -0
- package/esm2022/app/modules/accordion/accordion.component.mjs +101 -0
- package/esm2022/app/modules/accordion/accordion.module.mjs +37 -0
- package/esm2022/app/modules/accordion/directives/accordion-content.directive.mjs +17 -0
- package/esm2022/app/modules/accordion/directives/accordion-header.directive.mjs +17 -0
- package/esm2022/app/modules/accordion/directives/accordion-item.directive.mjs +36 -0
- package/esm2022/app/modules/background-carousel/background-carousel.directive.mjs +91 -0
- package/esm2022/app/modules/background-carousel/carousel-options.model.mjs +36 -0
- package/esm2022/app/modules/background-carousel/particle-background-carousel.module.mjs +24 -0
- package/esm2022/app/modules/checkbox/checkbox.component.mjs +108 -0
- package/esm2022/app/modules/checkbox/checkbox.module.mjs +28 -0
- package/esm2022/app/modules/color-picker/color-picker.component.mjs +306 -0
- package/esm2022/app/modules/color-picker/color-picker.module.mjs +19 -0
- package/esm2022/app/modules/date-picker/components/calendar/calendar.component.mjs +496 -0
- package/esm2022/app/modules/date-picker/components/date-range-picker/date-range-picker.component.mjs +250 -0
- package/esm2022/app/modules/date-picker/date-picker.component.mjs +538 -0
- package/esm2022/app/modules/date-picker/date-picker.module.mjs +56 -0
- package/esm2022/app/modules/dialog/dialog.component.mjs +177 -0
- package/esm2022/app/modules/dialog/dialog.module.mjs +28 -0
- package/esm2022/app/modules/dropdown/dropdown.component.mjs +682 -0
- package/esm2022/app/modules/dropdown/dropdown.module.mjs +28 -0
- package/esm2022/app/modules/dropdown/models/dropdown-option-group.model.mjs +2 -0
- package/esm2022/app/modules/dropdown/models/dropdown-option.model.mjs +2 -0
- package/esm2022/app/modules/endpoint-state/components/endpoint-state.component.mjs +75 -0
- package/esm2022/app/modules/endpoint-state/endpoint-state.module.mjs +22 -0
- package/esm2022/app/modules/icons/components/icon-select.component.mjs +377 -0
- package/esm2022/app/modules/icons/models/fontawesome-icons-brands.model.mjs +471 -0
- package/esm2022/app/modules/icons/models/fontawesome-icons-regular.model.mjs +166 -0
- package/esm2022/app/modules/icons/models/fontawesome-icons-solid.model.mjs +1016 -0
- package/esm2022/app/modules/icons/models/particle-icons-light.model.mjs +310 -0
- package/esm2022/app/modules/icons/models/particle-icons-regular.model.mjs +324 -0
- package/esm2022/app/modules/icons/models/particle-icons-solid.model.mjs +581 -0
- package/esm2022/app/modules/icons/particle-icons.module.mjs +66 -0
- package/esm2022/app/modules/icons/services/icons.service.mjs +86 -0
- package/esm2022/app/modules/idle-timeout/idle-timeout.component.mjs +85 -0
- package/esm2022/app/modules/idle-timeout/idle-timer.mjs +66 -0
- package/esm2022/app/modules/idle-timeout/particle-idle-timeout.module.mjs +28 -0
- package/esm2022/app/modules/input-mask/input-mask.component.mjs +594 -0
- package/esm2022/app/modules/input-mask/input-mask.module.mjs +18 -0
- package/esm2022/app/modules/keyfilter/keyfilter.directive.mjs +158 -0
- package/esm2022/app/modules/keyfilter/keyfilter.module.mjs +18 -0
- package/esm2022/app/modules/layout/components/layout-full-framing/layout-full-framing.component.mjs +79 -0
- package/esm2022/app/modules/layout/components/layout-fullwidth-sidebar/layout-fullwidth-sidebar.component.mjs +65 -0
- package/esm2022/app/modules/layout/layout.module.mjs +33 -0
- package/esm2022/app/modules/loader/components/loader.component.mjs +30 -0
- package/esm2022/app/modules/loader/loader.module.mjs +24 -0
- package/esm2022/app/modules/multi-select/models/multi-select-option-group.model.mjs +2 -0
- package/esm2022/app/modules/multi-select/models/multi-select-option.model.mjs +2 -0
- package/esm2022/app/modules/multi-select/multi-select.component.mjs +665 -0
- package/esm2022/app/modules/multi-select/multi-select.module.mjs +18 -0
- package/esm2022/app/modules/notification/models/notification.model.mjs +2 -0
- package/esm2022/app/modules/notification/notification.component.mjs +122 -0
- package/esm2022/app/modules/notification/notification.module.mjs +18 -0
- package/esm2022/app/modules/notification/services/notification.service.mjs +84 -0
- package/esm2022/app/modules/ordinal-number-pipe/ordinal-number-pipe.module.mjs +20 -0
- package/esm2022/app/modules/ordinal-number-pipe/ordinal-number.pipe.mjs +49 -0
- package/esm2022/app/modules/paginator/pagination-event.model.mjs +29 -0
- package/esm2022/app/modules/paginator/paginator.component.mjs +207 -0
- package/esm2022/app/modules/paginator/particle-paginator.module.mjs +48 -0
- package/esm2022/app/modules/popover/popover.component.mjs +352 -0
- package/esm2022/app/modules/popover/popover.module.mjs +24 -0
- package/esm2022/app/modules/profile-pic/particle-profile-pic.module.mjs +28 -0
- package/esm2022/app/modules/profile-pic/profile-pic.component.mjs +74 -0
- package/esm2022/app/modules/progress-bar/progress-bar.component.mjs +43 -0
- package/esm2022/app/modules/progress-bar/progress-bar.module.mjs +24 -0
- package/esm2022/app/modules/push-container/particle-push-container.module.mjs +26 -0
- package/esm2022/app/modules/push-container/push-container-state.model.mjs +2 -0
- package/esm2022/app/modules/push-container/push-container.component.mjs +363 -0
- package/esm2022/app/modules/rich-text/particle-rich-text.module.mjs +64 -0
- package/esm2022/app/modules/rich-text/render-rich-text.component.mjs +18 -0
- package/esm2022/app/modules/rich-text/rich-text-capabilities.model.mjs +2 -0
- package/esm2022/app/modules/rich-text/rich-text.component.mjs +187 -0
- package/esm2022/app/modules/scroll-to-top/particle-scroll-to-top.module.mjs +24 -0
- package/esm2022/app/modules/scroll-to-top/scroll-to-top.component.mjs +49 -0
- package/esm2022/app/modules/slideover/particle-slideover.module.mjs +24 -0
- package/esm2022/app/modules/slideover/slideover.component.mjs +115 -0
- package/esm2022/app/modules/slider/slider.component.mjs +243 -0
- package/esm2022/app/modules/slider/slider.module.mjs +26 -0
- package/esm2022/app/modules/theming/components/theming.component.mjs +86 -0
- package/esm2022/app/modules/theming/models/theme.model.mjs +9 -0
- package/esm2022/app/modules/theming/services/theme-change-detection.service.mjs +38 -0
- package/esm2022/app/modules/theming/services/theming.service.mjs +507 -0
- package/esm2022/app/modules/theming/theming.module.mjs +55 -0
- package/esm2022/app/modules/toggle-switch/models/toggle-options.model.mjs +2 -0
- package/esm2022/app/modules/toggle-switch/toggle-switch.component.mjs +107 -0
- package/esm2022/app/modules/toggle-switch/toggle-switch.module.mjs +24 -0
- package/esm2022/app/modules/tooltip/tooltip.directive.mjs +381 -0
- package/esm2022/app/modules/tooltip/tooltip.module.mjs +18 -0
- package/esm2022/app/modules/week-picker/week-picker.component.mjs +511 -0
- package/esm2022/app/modules/week-picker/week-picker.module.mjs +40 -0
- package/esm2022/app/shared/enums/endpoint-status.enum.mjs +11 -0
- package/esm2022/app/shared/interceptors/json.interceptor.mjs +23 -0
- package/esm2022/app/shared/models/auditable.model.mjs +2 -0
- package/esm2022/app/shared/models/data-list.model.mjs +2 -0
- package/esm2022/app/shared/models/id.model.mjs +2 -0
- package/esm2022/app/shared/models/observable-container.mjs +15 -0
- package/esm2022/app/shared/models/particle-component-text.model.mjs +2 -0
- package/esm2022/app/shared/services/base-data.service.mjs +190 -0
- package/esm2022/app/shared/services/dialog.service.mjs +50 -0
- package/esm2022/app/shared/services/local-storage.service.mjs +60 -0
- package/esm2022/entake-particle.mjs +5 -0
- package/esm2022/public_api.mjs +98 -0
- package/fesm2022/entake-particle.mjs +12477 -0
- package/fesm2022/entake-particle.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/package.json +65 -0
- package/particle.css +1 -0
- package/public_api.d.ts +97 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy, Renderer2 } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Directive to create a tooltip around the host element
|
|
5
|
+
* TODO: Open/Close animation with AnimationFactory
|
|
6
|
+
*/
|
|
7
|
+
export declare class TooltipDirective implements OnDestroy {
|
|
8
|
+
private element;
|
|
9
|
+
private renderer;
|
|
10
|
+
/**
|
|
11
|
+
* The number of pixels from the host to offset the tooltip
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
14
|
+
private readonly TOOLTIP_OFFSET;
|
|
15
|
+
/**
|
|
16
|
+
* Tooltip text input
|
|
17
|
+
* @param text the text to set for the tooltip
|
|
18
|
+
*/
|
|
19
|
+
set particleTooltip(text: string);
|
|
20
|
+
get particleTooltip(): string;
|
|
21
|
+
/**
|
|
22
|
+
* The direction of the tooltip around the host element
|
|
23
|
+
*/
|
|
24
|
+
tooltipPosition: 'left' | 'right' | 'top' | 'bottom';
|
|
25
|
+
/**
|
|
26
|
+
* Whether to disable the tooltip
|
|
27
|
+
* @param disabled disabled or not
|
|
28
|
+
*/
|
|
29
|
+
set tooltipDisabled(disabled: boolean);
|
|
30
|
+
get tooltipDisabled(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The DIV element housing the tooltip
|
|
33
|
+
* @private
|
|
34
|
+
*/
|
|
35
|
+
private tooltip;
|
|
36
|
+
/**
|
|
37
|
+
* The tooltip text
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
40
|
+
private _text;
|
|
41
|
+
/**
|
|
42
|
+
* Whether or not the tooltip is disabled
|
|
43
|
+
* @private
|
|
44
|
+
*/
|
|
45
|
+
private _tooltipDisabled;
|
|
46
|
+
/**
|
|
47
|
+
* Array of scroll unlisten functions
|
|
48
|
+
* @private
|
|
49
|
+
*/
|
|
50
|
+
private scrollUnlisteners;
|
|
51
|
+
/**
|
|
52
|
+
* Get window scroll top
|
|
53
|
+
* @private
|
|
54
|
+
*/
|
|
55
|
+
private static getWindowScrollTop;
|
|
56
|
+
/**
|
|
57
|
+
* Get window scroll left
|
|
58
|
+
* @private
|
|
59
|
+
*/
|
|
60
|
+
private static getWindowScrollLeft;
|
|
61
|
+
/**
|
|
62
|
+
* Dependency injection site
|
|
63
|
+
* @param element the host element
|
|
64
|
+
* @param renderer the Angular renderer
|
|
65
|
+
*/
|
|
66
|
+
constructor(element: ElementRef<HTMLElement>, renderer: Renderer2);
|
|
67
|
+
/**
|
|
68
|
+
* Destroy directive, invoke scroll unlisteners
|
|
69
|
+
*/
|
|
70
|
+
ngOnDestroy(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Handle host mouse enter event
|
|
73
|
+
*/
|
|
74
|
+
onMouseEnter(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Handle host mouse leave event
|
|
77
|
+
*/
|
|
78
|
+
onMouseLeave(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Handle host click event
|
|
81
|
+
*/
|
|
82
|
+
onClick(): void;
|
|
83
|
+
/**
|
|
84
|
+
* Create tooltip, set the text and align it
|
|
85
|
+
* @private
|
|
86
|
+
*/
|
|
87
|
+
private showTooltip;
|
|
88
|
+
/**
|
|
89
|
+
* Add the tooltip to the DOM
|
|
90
|
+
* @private
|
|
91
|
+
*/
|
|
92
|
+
private createTooltip;
|
|
93
|
+
/**
|
|
94
|
+
* Set tooltip text
|
|
95
|
+
* @private
|
|
96
|
+
*/
|
|
97
|
+
private setTooltipText;
|
|
98
|
+
/**
|
|
99
|
+
* Align the tooltip to the input position or the next best fit
|
|
100
|
+
* @private
|
|
101
|
+
*/
|
|
102
|
+
private alignTooltip;
|
|
103
|
+
/**
|
|
104
|
+
* Align the tooltip to the left of the host
|
|
105
|
+
* @private
|
|
106
|
+
*/
|
|
107
|
+
private alignLeft;
|
|
108
|
+
/**
|
|
109
|
+
* Align the tooltip to the right of the host
|
|
110
|
+
* @private
|
|
111
|
+
*/
|
|
112
|
+
private alignRight;
|
|
113
|
+
/**
|
|
114
|
+
* Align the tooltip to the top of the host
|
|
115
|
+
* @private
|
|
116
|
+
*/
|
|
117
|
+
private alignTop;
|
|
118
|
+
/**
|
|
119
|
+
* Align the tooltip to the bottom of the host
|
|
120
|
+
* @private
|
|
121
|
+
*/
|
|
122
|
+
private alignBottom;
|
|
123
|
+
/**
|
|
124
|
+
* Get the host's top and left position offset by window scroll
|
|
125
|
+
* @private
|
|
126
|
+
*/
|
|
127
|
+
private getHostOffset;
|
|
128
|
+
/**
|
|
129
|
+
* Remove the tooltip from the DOM
|
|
130
|
+
* @private
|
|
131
|
+
*/
|
|
132
|
+
private deleteTooltip;
|
|
133
|
+
/**
|
|
134
|
+
* Checks if the tooltip fits in the window
|
|
135
|
+
* @private
|
|
136
|
+
*/
|
|
137
|
+
private tooltipOutOfWindow;
|
|
138
|
+
/**
|
|
139
|
+
* Listen for scrolling on all scrollable parents of the host element
|
|
140
|
+
* @private
|
|
141
|
+
*/
|
|
142
|
+
private addScrollListeners;
|
|
143
|
+
/**
|
|
144
|
+
* Invoke scroll unlisten functions and clear unlisteners list
|
|
145
|
+
* @private
|
|
146
|
+
*/
|
|
147
|
+
private removeScrollListeners;
|
|
148
|
+
/**
|
|
149
|
+
* Get the parent elements for the input element
|
|
150
|
+
* @param element the element to get parents for
|
|
151
|
+
* @param parents the parent elements
|
|
152
|
+
* @private
|
|
153
|
+
*/
|
|
154
|
+
private getParentElements;
|
|
155
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective, never>;
|
|
156
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[particleTooltip]", never, { "particleTooltip": { "alias": "particleTooltip"; "required": false; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; }; "tooltipDisabled": { "alias": "tooltipDisabled"; "required": false; }; }, {}, never, never, false, never>;
|
|
157
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./tooltip.directive";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class ParticleTooltipModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ParticleTooltipModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ParticleTooltipModule, [typeof i1.TooltipDirective], [typeof i2.CommonModule], [typeof i1.TooltipDirective]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ParticleTooltipModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
4
|
+
import { PopoverComponent } from '../popover/popover.component';
|
|
5
|
+
import { WeekPickerText } from '../../shared/models/particle-component-text.model';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Interface representing a Date broken down by day/date/week/month/year
|
|
9
|
+
* with extended metadata
|
|
10
|
+
*/
|
|
11
|
+
declare interface MetaDate {
|
|
12
|
+
/**
|
|
13
|
+
* The day of the week (starting at 0)
|
|
14
|
+
*/
|
|
15
|
+
day: number;
|
|
16
|
+
/**
|
|
17
|
+
* The day of the month (starting at 1)
|
|
18
|
+
*/
|
|
19
|
+
date: number;
|
|
20
|
+
/**
|
|
21
|
+
* The week of the year
|
|
22
|
+
*/
|
|
23
|
+
week: number;
|
|
24
|
+
/**
|
|
25
|
+
* The month (starting at 0)
|
|
26
|
+
*/
|
|
27
|
+
month: number;
|
|
28
|
+
/**
|
|
29
|
+
* The full year
|
|
30
|
+
*/
|
|
31
|
+
year: number;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the day is selectable
|
|
34
|
+
*/
|
|
35
|
+
selectable: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Interface representing a week of the year with metadata
|
|
39
|
+
*/
|
|
40
|
+
declare interface MetaWeek {
|
|
41
|
+
/**
|
|
42
|
+
* The week of the year (starting at 1)
|
|
43
|
+
*/
|
|
44
|
+
week: number;
|
|
45
|
+
/**
|
|
46
|
+
* The year of the week
|
|
47
|
+
*/
|
|
48
|
+
year: number;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the week can be selected in the week picker
|
|
51
|
+
*/
|
|
52
|
+
selectable: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* The numeric dates of the days in the week
|
|
55
|
+
*/
|
|
56
|
+
dates: Array<number>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Component to allow a user to select a week
|
|
60
|
+
*/
|
|
61
|
+
export declare class WeekPickerComponent implements ControlValueAccessor {
|
|
62
|
+
private changeDetectorRef;
|
|
63
|
+
/**
|
|
64
|
+
* Set the value of the week picker
|
|
65
|
+
* @param value the value to set
|
|
66
|
+
*/
|
|
67
|
+
set value(value: {
|
|
68
|
+
start: Date;
|
|
69
|
+
end: Date;
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* Set disabled
|
|
73
|
+
*/
|
|
74
|
+
set disabled(disabled: boolean);
|
|
75
|
+
/**
|
|
76
|
+
* Set the valid date boundary for the week picker
|
|
77
|
+
* @param dateRange
|
|
78
|
+
*/
|
|
79
|
+
set dateRange(dateRange: {
|
|
80
|
+
start?: Date;
|
|
81
|
+
end?: Date;
|
|
82
|
+
});
|
|
83
|
+
/**
|
|
84
|
+
* Class list to apply to the date range input
|
|
85
|
+
*/
|
|
86
|
+
inputClassList: any;
|
|
87
|
+
/**
|
|
88
|
+
* Class list to apply to the week picker button
|
|
89
|
+
*/
|
|
90
|
+
calendarButtonClassList: string;
|
|
91
|
+
/**
|
|
92
|
+
* The aria label to apply to the date range input
|
|
93
|
+
*/
|
|
94
|
+
ariaLabel: string;
|
|
95
|
+
/**
|
|
96
|
+
* Format for the selected date range in the selection preview. Must
|
|
97
|
+
* be a valid Angular DatePipe format
|
|
98
|
+
*/
|
|
99
|
+
dateFormat: string;
|
|
100
|
+
/**
|
|
101
|
+
* Close the picker when a selection is made
|
|
102
|
+
*/
|
|
103
|
+
closeOnSelect: boolean;
|
|
104
|
+
text: WeekPickerText;
|
|
105
|
+
/**
|
|
106
|
+
* Event emitted on week select
|
|
107
|
+
*/
|
|
108
|
+
weekSelected: EventEmitter<{
|
|
109
|
+
start: Date;
|
|
110
|
+
end: Date;
|
|
111
|
+
}>;
|
|
112
|
+
/**
|
|
113
|
+
* ViewChild of the calendar popover
|
|
114
|
+
*/
|
|
115
|
+
calendarPopover: PopoverComponent;
|
|
116
|
+
/**
|
|
117
|
+
* The current date
|
|
118
|
+
*/
|
|
119
|
+
readonly currentDate: MetaDate;
|
|
120
|
+
/**
|
|
121
|
+
* BehaviorSubject tracking the value of the week picker
|
|
122
|
+
*/
|
|
123
|
+
readonly _internalValue: BehaviorSubject<{
|
|
124
|
+
start: Date;
|
|
125
|
+
end: Date;
|
|
126
|
+
}>;
|
|
127
|
+
/**
|
|
128
|
+
* BehaviorSubject tracking the selectable date range
|
|
129
|
+
*/
|
|
130
|
+
readonly _validSelectionInterval: BehaviorSubject<{
|
|
131
|
+
start: Date;
|
|
132
|
+
end: Date;
|
|
133
|
+
}>;
|
|
134
|
+
/**
|
|
135
|
+
* BehaviorSubject tracking the currently selected month
|
|
136
|
+
*/
|
|
137
|
+
readonly _selectedMonth: BehaviorSubject<number>;
|
|
138
|
+
/**
|
|
139
|
+
* BehaviorSubject tracking the currently selected year
|
|
140
|
+
*/
|
|
141
|
+
readonly _selectedYear: BehaviorSubject<number>;
|
|
142
|
+
/**
|
|
143
|
+
* The selected week of the year of the start of the selection as an Observable
|
|
144
|
+
*/
|
|
145
|
+
readonly selectedWeek$: Observable<number>;
|
|
146
|
+
/**
|
|
147
|
+
* The year of the start of the selected week as an Observable
|
|
148
|
+
*/
|
|
149
|
+
readonly selectedYear$: Observable<number>;
|
|
150
|
+
/**
|
|
151
|
+
* Observable boolean representing if next week (relative to the current selection) is selectable
|
|
152
|
+
*/
|
|
153
|
+
readonly canSelectNextWeek$: Observable<boolean>;
|
|
154
|
+
/**
|
|
155
|
+
* Observable boolean representing if last week (relative to the current selection) is selectable
|
|
156
|
+
*/
|
|
157
|
+
readonly canSelectLastWeek$: Observable<boolean>;
|
|
158
|
+
/**
|
|
159
|
+
* The range of selectable years as an Observable
|
|
160
|
+
*/
|
|
161
|
+
readonly validYearRange$: Observable<Array<number>>;
|
|
162
|
+
/**
|
|
163
|
+
* An array of MetaWeeks representing a month as an Observable
|
|
164
|
+
*/
|
|
165
|
+
readonly fullMonth$: Observable<Array<MetaWeek>>;
|
|
166
|
+
/**
|
|
167
|
+
* The value of the week picker
|
|
168
|
+
* @private
|
|
169
|
+
*/
|
|
170
|
+
private _value;
|
|
171
|
+
/**
|
|
172
|
+
* Whether the control is disabled
|
|
173
|
+
* @private
|
|
174
|
+
*/
|
|
175
|
+
private _disabled;
|
|
176
|
+
/**
|
|
177
|
+
* Generate an Array of numbers representing the span of years between the input
|
|
178
|
+
* @param minYear the start of the range
|
|
179
|
+
* @param maxYear the end of the range
|
|
180
|
+
* @param currentYear the current year
|
|
181
|
+
*/
|
|
182
|
+
private static generateYearRange;
|
|
183
|
+
/**
|
|
184
|
+
* Generate a month with week and selectable status metadata
|
|
185
|
+
* @param month the month to generate
|
|
186
|
+
* @param year the year of the month to generate
|
|
187
|
+
* @param selectionInterval the interval representing the
|
|
188
|
+
* minimum to the maximum week of the year
|
|
189
|
+
* @private
|
|
190
|
+
*/
|
|
191
|
+
private static generateMonth;
|
|
192
|
+
/**
|
|
193
|
+
* Get the input date as a MetaDate
|
|
194
|
+
* @param date the date to transform
|
|
195
|
+
* @param selectable whether or not the date is selectable
|
|
196
|
+
* @private
|
|
197
|
+
*/
|
|
198
|
+
private static getMetaDate;
|
|
199
|
+
/**
|
|
200
|
+
* Function to call on change
|
|
201
|
+
*/
|
|
202
|
+
onChange: (value: any) => void;
|
|
203
|
+
/**
|
|
204
|
+
* Function to call on touch
|
|
205
|
+
*/
|
|
206
|
+
onTouched: () => any;
|
|
207
|
+
/**
|
|
208
|
+
* Dependency injection site
|
|
209
|
+
* @param changeDetectorRef the Angular ChangeDetectorRef
|
|
210
|
+
*/
|
|
211
|
+
constructor(changeDetectorRef: ChangeDetectorRef);
|
|
212
|
+
/**
|
|
213
|
+
* Get the value of the week picker
|
|
214
|
+
*/
|
|
215
|
+
get value(): {
|
|
216
|
+
start: Date;
|
|
217
|
+
end: Date;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Get whether the control is disabled
|
|
221
|
+
*/
|
|
222
|
+
get disabled(): boolean;
|
|
223
|
+
/**
|
|
224
|
+
* Write value
|
|
225
|
+
* @param value the value to write
|
|
226
|
+
*/
|
|
227
|
+
writeValue(value: {
|
|
228
|
+
start: Date;
|
|
229
|
+
end: Date;
|
|
230
|
+
}): void;
|
|
231
|
+
/**
|
|
232
|
+
* Register function on change
|
|
233
|
+
* @param fn the function to change
|
|
234
|
+
*/
|
|
235
|
+
registerOnChange(fn: any): void;
|
|
236
|
+
/**
|
|
237
|
+
* Register function on touch
|
|
238
|
+
* @param fn the function to register
|
|
239
|
+
*/
|
|
240
|
+
registerOnTouched(fn: any): void;
|
|
241
|
+
/**
|
|
242
|
+
* Set disabled state
|
|
243
|
+
* @param isDisabled whether or not the control is disabled
|
|
244
|
+
*/
|
|
245
|
+
setDisabledState(isDisabled: boolean): void;
|
|
246
|
+
/**
|
|
247
|
+
* Open the week picker popover
|
|
248
|
+
* @param event the event to pass to the popover
|
|
249
|
+
*/
|
|
250
|
+
openCalendar(event: Event): void;
|
|
251
|
+
/**
|
|
252
|
+
* Handle week select
|
|
253
|
+
* @param week the week of the year
|
|
254
|
+
* @param selectable whether or not the week is selectable
|
|
255
|
+
*/
|
|
256
|
+
onWeekSelect(week: number, selectable: boolean): void;
|
|
257
|
+
/**
|
|
258
|
+
* Select next week (relative to the week of the current selection)
|
|
259
|
+
*/
|
|
260
|
+
selectNextWeek(): void;
|
|
261
|
+
/**
|
|
262
|
+
* Select last week (relative to the week of the current selection)
|
|
263
|
+
*/
|
|
264
|
+
selectLastWeek(): void;
|
|
265
|
+
/**
|
|
266
|
+
* Select the current week
|
|
267
|
+
*/
|
|
268
|
+
selectCurrentWeek(): void;
|
|
269
|
+
/**
|
|
270
|
+
* Update model
|
|
271
|
+
* @param value the new value of the model
|
|
272
|
+
* @private
|
|
273
|
+
*/
|
|
274
|
+
private updateModel;
|
|
275
|
+
/**
|
|
276
|
+
* Set the selection interval
|
|
277
|
+
* @param interval the input selection interval
|
|
278
|
+
* @private
|
|
279
|
+
*/
|
|
280
|
+
private setSelectionInterval;
|
|
281
|
+
/**
|
|
282
|
+
* Set the selectable status of the current date
|
|
283
|
+
* @private
|
|
284
|
+
*/
|
|
285
|
+
private setCurrentDateSelectable;
|
|
286
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WeekPickerComponent, never>;
|
|
287
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WeekPickerComponent, "particle-week-picker", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "dateRange": { "alias": "dateRange"; "required": false; }; "inputClassList": { "alias": "inputClassList"; "required": false; }; "calendarButtonClassList": { "alias": "calendarButtonClassList"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; }; "text": { "alias": "text"; "required": false; }; }, { "weekSelected": "weekSelected"; }, never, never, false, never>;
|
|
288
|
+
}
|
|
289
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./week-picker.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../ordinal-number-pipe/ordinal-number-pipe.module";
|
|
5
|
+
import * as i4 from "@angular/forms";
|
|
6
|
+
import * as i5 from "@angular/cdk/a11y";
|
|
7
|
+
import * as i6 from "../popover/popover.module";
|
|
8
|
+
import * as i7 from "../tooltip/tooltip.module";
|
|
9
|
+
export declare class ParticleWeekPickerModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ParticleWeekPickerModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ParticleWeekPickerModule, [typeof i1.WeekPickerComponent], [typeof i2.CommonModule, typeof i3.ParticleOrdinalNumberPipeModule, typeof i4.FormsModule, typeof i5.A11yModule, typeof i6.ParticlePopoverModule, typeof i7.ParticleTooltipModule], [typeof i1.WeekPickerComponent]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ParticleWeekPickerModule>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* This interceptor will force the Content-Type header to application/json so that each http call doesn't have to.
|
|
6
|
+
*/
|
|
7
|
+
export declare class JsonInterceptor implements HttpInterceptor {
|
|
8
|
+
/**
|
|
9
|
+
* Intercept method to set the content type header.
|
|
10
|
+
*
|
|
11
|
+
* @param req
|
|
12
|
+
* @param next
|
|
13
|
+
*/
|
|
14
|
+
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<JsonInterceptor, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<JsonInterceptor>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auditable Class - Holds the creation and modification data that is known for most DB interactions
|
|
3
|
+
*/
|
|
4
|
+
export interface Auditable {
|
|
5
|
+
/**
|
|
6
|
+
* Who Created it
|
|
7
|
+
*/
|
|
8
|
+
createdBy: string;
|
|
9
|
+
/**
|
|
10
|
+
* When it was created
|
|
11
|
+
*/
|
|
12
|
+
createdTime: Date;
|
|
13
|
+
/**
|
|
14
|
+
* Who last modified it
|
|
15
|
+
*/
|
|
16
|
+
modifiedBy: string;
|
|
17
|
+
/**
|
|
18
|
+
* When it was last modified
|
|
19
|
+
*/
|
|
20
|
+
modifiedTime: Date;
|
|
21
|
+
}
|