mis-crystal-design-system 17.0.0 → 17.0.2-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analytics/analytics.service.d.ts +5 -1
- package/assets/images/close.svg +5 -0
- package/async-search-dropdown/async-dropdown.component.d.ts +9 -1
- package/async-search-dropdown/async-dropdown.module.d.ts +2 -1
- package/datepicker_v2/datepicker.module.d.ts +2 -1
- package/datepicker_v2/tz-datepicker.directive.d.ts +2 -0
- package/datepicker_v2/tz-dp-container/tz-dp-container.component.d.ts +18 -1
- package/daterangepicker_v2/daterangepicker.module.d.ts +2 -1
- package/daterangepicker_v2/models/drp-config.model.d.ts +6 -0
- package/daterangepicker_v2/tz-daterangepicker.directive.d.ts +2 -0
- package/daterangepicker_v2/tz-drp-container/tz-drp-container.component.d.ts +6 -2
- package/dropdown/calculate-container-height.directive.d.ts +1 -1
- package/dropdown/dropdown.component.d.ts +4 -1
- package/dropdown/dropdown.module.d.ts +2 -1
- package/dynamic-form/dynamic-form.component.d.ts +14 -4
- package/dynamic-form/dynamic-form.namespace.d.ts +1 -0
- package/esm2022/action-list/action-list.component.mjs +2 -2
- package/esm2022/action-list/action-list.module.mjs +2 -2
- package/esm2022/analytics/analytics.module.mjs +2 -2
- package/esm2022/analytics/analytics.service.mjs +8 -7
- package/esm2022/async-search-dropdown/async-dropdown.component.mjs +98 -47
- package/esm2022/async-search-dropdown/async-dropdown.module.mjs +6 -5
- package/esm2022/button/button.component.mjs +2 -2
- package/esm2022/button/button.directive.mjs +2 -2
- package/esm2022/button/button.module.mjs +2 -2
- package/esm2022/checkbox/checkbox.component.mjs +5 -5
- package/esm2022/checkbox/checkbox.module.mjs +2 -2
- package/esm2022/chip/chip.component.mjs +14 -14
- package/esm2022/chip/chip.module.mjs +2 -2
- package/esm2022/datepicker_v2/datepicker.module.mjs +6 -5
- package/esm2022/datepicker_v2/public_api.mjs +1 -1
- package/esm2022/datepicker_v2/tz-datepicker.directive.mjs +22 -3
- package/esm2022/datepicker_v2/tz-dp-container/tz-dp-container.component.mjs +281 -85
- package/esm2022/daterangepicker_v2/daterangepicker.module.mjs +6 -5
- package/esm2022/daterangepicker_v2/models/drp-config.model.mjs +1 -1
- package/esm2022/daterangepicker_v2/public_api.mjs +1 -1
- package/esm2022/daterangepicker_v2/tz-daterangepicker.directive.mjs +25 -4
- package/esm2022/daterangepicker_v2/tz-drp-container/tz-drp-container.component.mjs +218 -110
- package/esm2022/drawer/drawer-body/drawer-body.component.mjs +2 -2
- package/esm2022/drawer/drawer.module.mjs +2 -2
- package/esm2022/drawer/drawer.service.mjs +2 -2
- package/esm2022/dropdown/calculate-container-height.directive.mjs +6 -6
- package/esm2022/dropdown/dropdown.component.mjs +157 -97
- package/esm2022/dropdown/dropdown.module.mjs +6 -5
- package/esm2022/dynamic-form/dynamic-form.component.mjs +609 -221
- package/esm2022/dynamic-form/dynamic-form.module.mjs +2 -2
- package/esm2022/dynamic-form/dynamic-form.namespace.mjs +1 -1
- package/esm2022/fab/fab.component.mjs +2 -2
- package/esm2022/fab/fab.module.mjs +2 -2
- package/esm2022/filter/animations/slideFromRight.mjs +12 -0
- package/esm2022/filter/filter-panel/filter-panel.component.mjs +396 -0
- package/esm2022/filter/filters.module.mjs +66 -0
- package/esm2022/filter/has-value.pipe.mjs +31 -0
- package/esm2022/filter/index.mjs +2 -0
- package/esm2022/filter/mis-crystal-design-system-filter.mjs +5 -0
- package/esm2022/filter/public_api.mjs +4 -0
- package/esm2022/input/directives/input/input.directive.mjs +2 -2
- package/esm2022/input/mis-input.component.mjs +2 -2
- package/esm2022/input/mis-input.module.mjs +2 -2
- package/esm2022/input-stepper/input-stepper/input-stepper.component.mjs +5 -5
- package/esm2022/input-stepper/input-stepper.module.mjs +2 -2
- package/esm2022/loader/loader.component.mjs +2 -2
- package/esm2022/loader/loader.module.mjs +2 -2
- package/esm2022/menu/menu-close.directive.mjs +3 -3
- package/esm2022/menu/menu.directive.mjs +3 -3
- package/esm2022/menu/menu.module.mjs +2 -2
- package/esm2022/mobile-filter/mobile-filter.component.mjs +10 -8
- package/esm2022/mobile-filter/mobile-filter.module.mjs +2 -2
- package/esm2022/modal/modal.module.mjs +2 -2
- package/esm2022/modal/modal.service.mjs +2 -2
- package/esm2022/modal/module-wrapper/module-wrapper.component.mjs +2 -2
- package/esm2022/multi-select-dropdown/multi-select-dropdown.component.mjs +27 -15
- package/esm2022/multi-select-dropdown/multi-select-dropdown.module.mjs +2 -2
- package/esm2022/nested-multi-select-dropdown/nested-multi-select-dropdown.component.mjs +15 -8
- package/esm2022/nested-multi-select-dropdown/nested-multi-select-dropdown.module.mjs +2 -2
- package/esm2022/phone-input/phone-input.component.mjs +7 -51
- package/esm2022/phone-input/phone-input.module.mjs +2 -2
- package/esm2022/radio-button/radio-button.component.mjs +5 -5
- package/esm2022/radio-button/radio-button.module.mjs +2 -2
- package/esm2022/ske-loader/ske-loader.component.mjs +5 -5
- package/esm2022/ske-loader/ske-loader.module.mjs +2 -2
- package/esm2022/slider/slider.component.mjs +2 -2
- package/esm2022/slider/slider.module.mjs +2 -2
- package/esm2022/snackbar/snackbar/snackbar.component.mjs +2 -2
- package/esm2022/snackbar/snackbar.module.mjs +2 -2
- package/esm2022/snackbar/snackbar.service.mjs +2 -2
- package/esm2022/specificdatepicker/public_api.mjs +3 -3
- package/esm2022/specificdatepicker/specificdatepicker.module.mjs +2 -2
- package/esm2022/specificdatepicker/tz-sdp-container/tz-sdp-container.component.mjs +90 -63
- package/esm2022/specificdatepicker/tz-specificdatepicker.directive.mjs +2 -2
- package/esm2022/star-rating/star-rating.component.mjs +2 -2
- package/esm2022/star-rating/star-rating.module.mjs +2 -2
- package/esm2022/switch/switch.component.mjs +2 -2
- package/esm2022/switch/switch.module.mjs +2 -2
- package/esm2022/table/custom-table-cell.directive.mjs +2 -2
- package/esm2022/table/filter/filter.component.mjs +13 -5
- package/esm2022/table/public_api.mjs +2 -3
- package/esm2022/table/sub-table/sub-table.component.mjs +2 -2
- package/esm2022/table/table.component.mjs +28 -12
- package/esm2022/table/table.module.mjs +2 -2
- package/esm2022/timepicker/timepicker.component.mjs +69 -59
- package/esm2022/timepicker/timepicker.directive.mjs +3 -3
- package/esm2022/timepicker/timepicker.module.mjs +2 -2
- package/esm2022/timerangepicker/public_api.mjs +1 -1
- package/esm2022/timerangepicker/timerangepicker.component.mjs +58 -48
- package/esm2022/timerangepicker/timerangepicker.module.mjs +2 -2
- package/esm2022/toast/toast.component.mjs +2 -2
- package/esm2022/toast/toast.data.service.mjs +2 -2
- package/esm2022/toast/toast.module.mjs +2 -2
- package/esm2022/toast/toast.service.mjs +2 -2
- package/esm2022/tooltip/tooltip-container/tooltip.component.mjs +11 -10
- package/esm2022/tooltip/tooltip.directive.mjs +10 -4
- package/esm2022/tooltip/tooltip.module.mjs +2 -2
- package/esm2022/virtual-scroll/virtual-scroll.component.mjs +2 -2
- package/esm2022/virtual-scroll/virtual-scroll.module.mjs +2 -2
- package/esm2022/widgets/services/widget.service.mjs +2 -2
- package/esm2022/widgets/widgets.module.mjs +2 -2
- package/fesm2022/mis-crystal-design-system-action-list.mjs +2 -2
- package/fesm2022/mis-crystal-design-system-action-list.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-analytics.mjs +8 -7
- package/fesm2022/mis-crystal-design-system-analytics.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-async-search-dropdown.mjs +102 -50
- package/fesm2022/mis-crystal-design-system-async-search-dropdown.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-button.mjs +3 -3
- package/fesm2022/mis-crystal-design-system-button.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-checkbox.mjs +5 -5
- package/fesm2022/mis-crystal-design-system-checkbox.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-chip.mjs +14 -14
- package/fesm2022/mis-crystal-design-system-chip.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs +306 -90
- package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs +246 -116
- package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-drawer.mjs +3 -3
- package/fesm2022/mis-crystal-design-system-drawer.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-dropdown.mjs +166 -105
- package/fesm2022/mis-crystal-design-system-dropdown.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-dynamic-form.mjs +609 -221
- package/fesm2022/mis-crystal-design-system-dynamic-form.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-fab.mjs +2 -2
- package/fesm2022/mis-crystal-design-system-fab.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-filter.mjs +503 -0
- package/fesm2022/mis-crystal-design-system-filter.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-input-stepper.mjs +5 -5
- package/fesm2022/mis-crystal-design-system-input-stepper.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-input.mjs +3 -3
- package/fesm2022/mis-crystal-design-system-input.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-loader.mjs +2 -2
- package/fesm2022/mis-crystal-design-system-loader.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-menu.mjs +5 -5
- package/fesm2022/mis-crystal-design-system-menu.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-mobile-filter.mjs +10 -8
- package/fesm2022/mis-crystal-design-system-mobile-filter.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-modal.mjs +3 -3
- package/fesm2022/mis-crystal-design-system-modal.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-multi-select-dropdown.mjs +27 -15
- package/fesm2022/mis-crystal-design-system-multi-select-dropdown.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-nested-multi-select-dropdown.mjs +15 -8
- package/fesm2022/mis-crystal-design-system-nested-multi-select-dropdown.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-phone-input.mjs +7 -51
- package/fesm2022/mis-crystal-design-system-phone-input.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-radio-button.mjs +5 -5
- package/fesm2022/mis-crystal-design-system-radio-button.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-ske-loader.mjs +5 -5
- package/fesm2022/mis-crystal-design-system-ske-loader.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-slider.mjs +2 -2
- package/fesm2022/mis-crystal-design-system-slider.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-snackbar.mjs +3 -3
- package/fesm2022/mis-crystal-design-system-snackbar.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs +91 -64
- package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-star-rating.mjs +2 -2
- package/fesm2022/mis-crystal-design-system-star-rating.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-switch.mjs +2 -2
- package/fesm2022/mis-crystal-design-system-switch.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-table.mjs +46 -22
- package/fesm2022/mis-crystal-design-system-table.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-timepicker.mjs +71 -61
- package/fesm2022/mis-crystal-design-system-timepicker.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-timerangepicker.mjs +58 -48
- package/fesm2022/mis-crystal-design-system-timerangepicker.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-toast.mjs +4 -4
- package/fesm2022/mis-crystal-design-system-toast.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-tooltip.mjs +20 -13
- package/fesm2022/mis-crystal-design-system-tooltip.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-virtual-scroll.mjs +2 -2
- package/fesm2022/mis-crystal-design-system-virtual-scroll.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-widgets.mjs +1 -1
- package/fesm2022/mis-crystal-design-system-widgets.mjs.map +1 -1
- package/filter/animations/slideFromRight.d.ts +1 -0
- package/filter/filter-panel/filter-panel.component.d.ts +51 -0
- package/filter/filters.module.d.ts +18 -0
- package/filter/has-value.pipe.d.ts +12 -0
- package/filter/index.d.ts +1 -0
- package/filter/public_api.d.ts +4 -0
- package/multi-select-dropdown/multi-select-dropdown.component.d.ts +3 -1
- package/package.json +29 -23
- package/phone-input/phone-input.component.d.ts +6 -15
- package/specificdatepicker/public_api.d.ts +2 -3
- package/specificdatepicker/tz-sdp-container/tz-sdp-container.component.d.ts +2 -1
- package/styles/mis-mixins.scss +46 -0
- package/styles/mis-old-icon-styles.scss +498 -0
- package/table/filter/filter.component.d.ts +1 -1
- package/table/public_api.d.ts +1 -2
- package/timepicker/timepicker.component.d.ts +4 -3
- package/timerangepicker/public_api.d.ts +1 -0
- package/timerangepicker/timerangepicker.component.d.ts +3 -1
- package/tooltip/tooltip-container/tooltip.component.d.ts +2 -1
- package/tooltip/tooltip.directive.d.ts +3 -1
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { EventEmitter, Directive, Input, Output, Component, ViewChild, ViewChildren, NgModule } from '@angular/core';
|
|
3
|
-
import * as moment from 'moment-timezone';
|
|
4
3
|
import * as i1 from '@angular/cdk/overlay';
|
|
5
4
|
import { ConnectionPositionPair, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
6
5
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
7
6
|
import * as i3 from 'mis-crystal-design-system/tooltip';
|
|
8
7
|
import { ToolTipDirective, ToolTipModule } from 'mis-crystal-design-system/tooltip';
|
|
8
|
+
import dayjs from 'dayjs';
|
|
9
|
+
import timezone from 'dayjs/plugin/timezone';
|
|
10
|
+
import utc from 'dayjs/plugin/utc';
|
|
11
|
+
import customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
9
12
|
import * as i1$1 from '@angular/common';
|
|
10
13
|
import { CommonModule } from '@angular/common';
|
|
11
14
|
import * as i2 from '@angular/forms';
|
|
@@ -52,8 +55,8 @@ class TimepickerDirective {
|
|
|
52
55
|
destroyOverlay() {
|
|
53
56
|
this.overlayRef.detach();
|
|
54
57
|
}
|
|
55
|
-
static { this.ɵfac = function TimepickerDirective_Factory(
|
|
56
|
-
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TimepickerDirective, selectors: [["", "libTimepicker", ""]], inputs: { originEl: "originEl", createOverlayOnInput: [
|
|
58
|
+
static { this.ɵfac = function TimepickerDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimepickerDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(i1.Overlay), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); }; }
|
|
59
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TimepickerDirective, selectors: [["", "libTimepicker", ""]], inputs: { originEl: "originEl", createOverlayOnInput: [0, "openStatus", "createOverlayOnInput"] }, outputs: { statusEmitter: "statusEmitter" } }); }
|
|
57
60
|
}
|
|
58
61
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimepickerDirective, [{
|
|
59
62
|
type: Directive,
|
|
@@ -73,9 +76,10 @@ class TimepickerDirective {
|
|
|
73
76
|
const _c0 = ["input"];
|
|
74
77
|
const _c1 = ["timeInterval"];
|
|
75
78
|
const _c2 = a0 => ({ height: a0 });
|
|
76
|
-
const _c3 = a0 => ({
|
|
77
|
-
const _c4 = a0 => ({
|
|
78
|
-
const _c5 = a0 => ({
|
|
79
|
+
const _c3 = a0 => ({ "disable": a0 });
|
|
80
|
+
const _c4 = a0 => ({ invalid: a0 });
|
|
81
|
+
const _c5 = a0 => ({ width: a0 });
|
|
82
|
+
const _c6 = a0 => ({ highlight: a0 });
|
|
79
83
|
function TimePickerComponent_ng_template_3_div_0_li_3_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
80
84
|
i0.ɵɵelement(0, "div", 12);
|
|
81
85
|
} }
|
|
@@ -90,7 +94,7 @@ function TimePickerComponent_ng_template_3_div_0_li_3_Template(rf, ctx) { if (rf
|
|
|
90
94
|
const interval_r3 = ctx.$implicit;
|
|
91
95
|
const i_r5 = ctx.index;
|
|
92
96
|
const ctx_r3 = i0.ɵɵnextContext(3);
|
|
93
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3,
|
|
97
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c6, i_r5 === ctx_r3.isHighlighted));
|
|
94
98
|
i0.ɵɵadvance(2);
|
|
95
99
|
i0.ɵɵtextInterpolate1(" ", interval_r3, " ");
|
|
96
100
|
i0.ɵɵadvance();
|
|
@@ -102,7 +106,7 @@ function TimePickerComponent_ng_template_3_div_0_Template(rf, ctx) { if (rf & 1)
|
|
|
102
106
|
i0.ɵɵelementEnd()();
|
|
103
107
|
} if (rf & 2) {
|
|
104
108
|
const ctx_r3 = i0.ɵɵnextContext(2);
|
|
105
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(2,
|
|
109
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(2, _c5, ctx_r3.dropdownWidth || ctx_r3.inputWidth));
|
|
106
110
|
i0.ɵɵadvance(3);
|
|
107
111
|
i0.ɵɵproperty("ngForOf", ctx_r3.timeIntervals);
|
|
108
112
|
} }
|
|
@@ -112,6 +116,9 @@ function TimePickerComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
112
116
|
const ctx_r3 = i0.ɵɵnextContext();
|
|
113
117
|
i0.ɵɵproperty("ngIf", ctx_r3.openStatus);
|
|
114
118
|
} }
|
|
119
|
+
dayjs.extend(utc);
|
|
120
|
+
dayjs.extend(timezone);
|
|
121
|
+
dayjs.extend(customParseFormat);
|
|
115
122
|
class TimePickerComponent {
|
|
116
123
|
// gets all the li elements from the dropdown and scrolls to the highlighted element
|
|
117
124
|
set timeIntervalRefs(intervals) {
|
|
@@ -135,40 +142,41 @@ class TimePickerComponent {
|
|
|
135
142
|
this.height = "max-content";
|
|
136
143
|
this.inputWidth = "100px";
|
|
137
144
|
this.interval = 15;
|
|
138
|
-
this.dateAsEpoch =
|
|
145
|
+
this.dateAsEpoch = dayjs().valueOf();
|
|
139
146
|
this.rangeValidity = true;
|
|
140
147
|
this.showTooltip = true;
|
|
141
148
|
this.dispayToolTip = this.showTooltip;
|
|
142
149
|
this.triggerChange = true;
|
|
150
|
+
this.disable = false;
|
|
143
151
|
this.timeEmitter = new EventEmitter();
|
|
144
152
|
}
|
|
145
153
|
ngOnInit() {
|
|
146
154
|
if (!this.givenTime && !this.minTime) {
|
|
147
|
-
this.chosenTime =
|
|
148
|
-
let
|
|
155
|
+
this.chosenTime = dayjs(this.firstInterval).format(this.timeFormat);
|
|
156
|
+
let chosenTimedayjs = this.getdayjs(this.chosenTime);
|
|
149
157
|
this.emitTime({
|
|
150
158
|
valid: !this.isInvalid,
|
|
151
159
|
time: this.chosenTime,
|
|
152
|
-
epoch:
|
|
160
|
+
epoch: chosenTimedayjs.valueOf()
|
|
153
161
|
});
|
|
154
162
|
}
|
|
155
163
|
}
|
|
156
164
|
ngOnChanges() {
|
|
157
165
|
this.timeFormat = this.clockFormat === 12 ? "hh:mm a" : "HH:mm";
|
|
158
|
-
|
|
166
|
+
dayjs.tz.setDefault(this.timezone);
|
|
159
167
|
if (this.timeFormat) {
|
|
160
|
-
let
|
|
168
|
+
let chosenTimedayjs = this.getdayjs(this.chosenTime);
|
|
161
169
|
// if the first interval is >= the chosen time
|
|
162
170
|
// then only update the value of chosen time
|
|
163
171
|
// else it remains the same
|
|
164
|
-
if (this.firstInterval >=
|
|
165
|
-
this.chosenTime =
|
|
166
|
-
|
|
172
|
+
if (this.firstInterval >= chosenTimedayjs.valueOf() && this.rangeValidity && !this.userInputFlag) {
|
|
173
|
+
this.chosenTime = dayjs(this.firstInterval).format(this.timeFormat);
|
|
174
|
+
chosenTimedayjs = this.getdayjs(this.chosenTime);
|
|
167
175
|
}
|
|
168
176
|
if ((this.givenTimeFlag && this.givenTime) || this.minTime) {
|
|
169
|
-
this.chosenTime =
|
|
177
|
+
this.chosenTime = dayjs(this.minTime || this.givenTime).format(this.timeFormat);
|
|
170
178
|
}
|
|
171
|
-
|
|
179
|
+
chosenTimedayjs = this.getdayjs(this.chosenTime);
|
|
172
180
|
if (!this.userInputFlag)
|
|
173
181
|
this.populateDropdown();
|
|
174
182
|
this.userInputFlag = false;
|
|
@@ -177,7 +185,7 @@ class TimePickerComponent {
|
|
|
177
185
|
this.emitTime({
|
|
178
186
|
valid: !this.isInvalid,
|
|
179
187
|
time: this.chosenTime,
|
|
180
|
-
epoch:
|
|
188
|
+
epoch: chosenTimedayjs.valueOf()
|
|
181
189
|
});
|
|
182
190
|
this.calculateClosestInterval(this.chosenTime);
|
|
183
191
|
}
|
|
@@ -186,9 +194,9 @@ class TimePickerComponent {
|
|
|
186
194
|
emitTime(data) {
|
|
187
195
|
this.timeEmitter.emit(data);
|
|
188
196
|
}
|
|
189
|
-
// function to get
|
|
190
|
-
|
|
191
|
-
return
|
|
197
|
+
// function to get dayjs object when time is given in string
|
|
198
|
+
getdayjs(time = '00:00') {
|
|
199
|
+
return dayjs(`${dayjs(this.dateAsEpoch).format("DD-MM-YYYY")} ${time}`, `DD-MM-YYYY ${this.timeFormat}`);
|
|
192
200
|
}
|
|
193
201
|
closeDropdown() {
|
|
194
202
|
this.dispayToolTip = false;
|
|
@@ -206,7 +214,7 @@ class TimePickerComponent {
|
|
|
206
214
|
const RE12 = /^(([0][1-9]|1[0-2]):([0-5][0-9])( )?(am|pm|AM|PM))$/i;
|
|
207
215
|
const RE24 = /^([01][0-9]|2[0-3]):[0-5][0-9]$/;
|
|
208
216
|
const RE = this.clockFormat === 12 ? RE12 : RE24;
|
|
209
|
-
const
|
|
217
|
+
const timedayjs = this.getdayjs(time);
|
|
210
218
|
let flag = false;
|
|
211
219
|
// if the first interval is set to the start of the day
|
|
212
220
|
// or a time is already provided to the component to show
|
|
@@ -214,11 +222,11 @@ class TimePickerComponent {
|
|
|
214
222
|
if (this.minTime ||
|
|
215
223
|
this.givenTime ||
|
|
216
224
|
(this.firstInterval &&
|
|
217
|
-
|
|
225
|
+
dayjs(this.firstInterval).format(this.timeFormat).valueOf() === dayjs().startOf("day").format(this.timeFormat).valueOf())) {
|
|
218
226
|
flag = time.match(RE) ? true : false;
|
|
219
227
|
}
|
|
220
228
|
else {
|
|
221
|
-
flag = time.match(RE) &&
|
|
229
|
+
flag = time.match(RE) && timedayjs.diff(dayjs(), "m") >= 0 ? true : false;
|
|
222
230
|
}
|
|
223
231
|
return flag;
|
|
224
232
|
}
|
|
@@ -229,11 +237,11 @@ class TimePickerComponent {
|
|
|
229
237
|
this.chosenTime = time;
|
|
230
238
|
this.calculateClosestInterval(this.chosenTime);
|
|
231
239
|
}
|
|
232
|
-
const
|
|
240
|
+
const timedayjs = this.getdayjs(time);
|
|
233
241
|
this.emitTime({
|
|
234
242
|
valid: !this.isInvalid,
|
|
235
243
|
time: time,
|
|
236
|
-
epoch:
|
|
244
|
+
epoch: timedayjs.valueOf()
|
|
237
245
|
});
|
|
238
246
|
this.openStatus = false;
|
|
239
247
|
if (this.timepickerDirective)
|
|
@@ -249,35 +257,35 @@ class TimePickerComponent {
|
|
|
249
257
|
this.timepickerDirective.destroyOverlay();
|
|
250
258
|
this.calculateClosestInterval(time);
|
|
251
259
|
}
|
|
252
|
-
const
|
|
260
|
+
const timedayjs = this.getdayjs(time);
|
|
253
261
|
this.emitTime({
|
|
254
262
|
valid: !this.isInvalid,
|
|
255
263
|
time: time,
|
|
256
|
-
epoch:
|
|
264
|
+
epoch: timedayjs.valueOf()
|
|
257
265
|
});
|
|
258
266
|
}
|
|
259
267
|
calculateClosestInterval(time) {
|
|
260
268
|
let roundedEpoch;
|
|
261
|
-
// Converting time and date to a
|
|
262
|
-
const chosenDate =
|
|
263
|
-
const parsedTimeWithDate =
|
|
264
|
-
// Converting
|
|
269
|
+
// Converting time and date to a dayjs object
|
|
270
|
+
const chosenDate = dayjs(this.dateAsEpoch).format("DD-MM-YYYY"); // 05-01-2024
|
|
271
|
+
const parsedTimeWithDate = dayjs(`${chosenDate} ${time}`, `DD-MM-YYYY ${this.timeFormat}`);
|
|
272
|
+
// Converting dayjs object to epoch
|
|
265
273
|
const chosenTimeEpoch = parsedTimeWithDate.valueOf();
|
|
266
|
-
const offset = this.interval - (
|
|
274
|
+
const offset = this.interval - (dayjs(chosenTimeEpoch).minute() % this.interval);
|
|
267
275
|
if (this.minTime && !this.givenTime) {
|
|
268
276
|
this.isHighlighted = 0;
|
|
269
277
|
return;
|
|
270
278
|
}
|
|
271
|
-
roundedEpoch = offset >= this.interval / 2 ? (
|
|
279
|
+
roundedEpoch = offset >= this.interval / 2 ? (dayjs(chosenTimeEpoch).subtract(this.interval - offset, "m")).valueOf() : (dayjs(chosenTimeEpoch).add(offset, "m")).valueOf();
|
|
272
280
|
// finding the index of element that needs to be highlighted
|
|
273
|
-
if (chosenTimeEpoch >
|
|
281
|
+
if (chosenTimeEpoch > dayjs(this.dateAsEpoch).endOf("day").subtract(this.interval, "m").valueOf()) {
|
|
274
282
|
this.isHighlighted = this.timeIntervals.length - 1;
|
|
275
283
|
}
|
|
276
284
|
else {
|
|
277
|
-
const
|
|
285
|
+
const roundedEpochdayjs = dayjs(roundedEpoch);
|
|
278
286
|
this.isHighlighted = this.timeIntervals.findIndex(interval => {
|
|
279
|
-
const intervalObj =
|
|
280
|
-
return intervalObj.isSame(
|
|
287
|
+
const intervalObj = dayjs(`${chosenDate} ${interval}`, `DD-MM-YYYY ${this.timeFormat}`);
|
|
288
|
+
return intervalObj.isSame(roundedEpochdayjs);
|
|
281
289
|
});
|
|
282
290
|
}
|
|
283
291
|
}
|
|
@@ -288,45 +296,45 @@ class TimePickerComponent {
|
|
|
288
296
|
if (!this.firstInterval) {
|
|
289
297
|
// firstInterval is initialised according to the current time
|
|
290
298
|
// if the date is same as the current date
|
|
291
|
-
if (
|
|
292
|
-
const offset = this.interval - (
|
|
293
|
-
this.firstInterval =
|
|
299
|
+
if (dayjs(this.dateAsEpoch).format("DD-MM-YYYY") === dayjs().format("DD-MM-YYYY") && !this.minTime) {
|
|
300
|
+
const offset = this.interval - (dayjs().minute() % this.interval);
|
|
301
|
+
this.firstInterval = dayjs().add(offset, "m").valueOf();
|
|
294
302
|
}
|
|
295
303
|
// if minimum time to show is provided
|
|
296
304
|
else if (this.minTime) {
|
|
297
|
-
const offset = this.interval - (
|
|
298
|
-
this.firstInterval =
|
|
305
|
+
const offset = this.interval - (dayjs(this.minTime).minute() % this.interval);
|
|
306
|
+
this.firstInterval = dayjs(this.minTime).add(offset, "m").valueOf();
|
|
299
307
|
}
|
|
300
308
|
// else the firstInterval is initialised as start of day
|
|
301
309
|
else {
|
|
302
|
-
this.firstInterval =
|
|
310
|
+
this.firstInterval = dayjs().startOf("day").valueOf();
|
|
303
311
|
}
|
|
304
312
|
}
|
|
305
313
|
if (this.givenTime && this.givenTimeFlag) {
|
|
306
|
-
this.firstInterval =
|
|
314
|
+
this.firstInterval = dayjs(this.givenTime).startOf('d').valueOf();
|
|
307
315
|
this.givenTimeFlag = false;
|
|
308
316
|
}
|
|
309
|
-
const dateAsString =
|
|
310
|
-
const intervalAsString =
|
|
311
|
-
|
|
312
|
-
const end =
|
|
317
|
+
const dateAsString = dayjs(this.dateAsEpoch).format('DD-MM-YYYY');
|
|
318
|
+
const intervalAsString = dayjs(this.firstInterval).format(this.timeFormat);
|
|
319
|
+
let start = dayjs(`${dateAsString} ${intervalAsString}`, `DD-MM-YYYY ${this.timeFormat}`);
|
|
320
|
+
const end = dayjs(this.dateAsEpoch).endOf('d');
|
|
313
321
|
while (start.valueOf() < end.valueOf()) {
|
|
314
322
|
this.timeIntervals.push(start.format(this.timeFormat));
|
|
315
|
-
start.add(this.interval, "m");
|
|
323
|
+
start = start.add(this.interval, "m");
|
|
316
324
|
}
|
|
317
325
|
// if the start time is equal to the interval just before midnight
|
|
318
326
|
// and the start date = end date
|
|
319
327
|
// push 11:59pm only
|
|
320
328
|
if (this.timeIntervals.length === 0) {
|
|
321
|
-
this.chosenTime =
|
|
322
|
-
this.timeIntervals.push(
|
|
329
|
+
this.chosenTime = dayjs().endOf("d").format(this.timeFormat);
|
|
330
|
+
this.timeIntervals.push(dayjs().endOf("d").format(this.timeFormat));
|
|
323
331
|
}
|
|
324
332
|
}
|
|
325
333
|
ngOnDestroy() {
|
|
326
334
|
if (this.tooltipDirective)
|
|
327
335
|
this.tooltipDirective.hideToolTip();
|
|
328
336
|
}
|
|
329
|
-
static { this.ɵfac = function TimePickerComponent_Factory(
|
|
337
|
+
static { this.ɵfac = function TimePickerComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimePickerComponent)(); }; }
|
|
330
338
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TimePickerComponent, selectors: [["mis-timepicker"]], viewQuery: function TimePickerComponent_Query(rf, ctx) { if (rf & 1) {
|
|
331
339
|
i0.ɵɵviewQuery(_c0, 7);
|
|
332
340
|
i0.ɵɵviewQuery(TimepickerDirective, 5);
|
|
@@ -338,7 +346,7 @@ class TimePickerComponent {
|
|
|
338
346
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.timepickerDirective = _t.first);
|
|
339
347
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipDirective = _t.first);
|
|
340
348
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.timeIntervalRefs = _t);
|
|
341
|
-
} }, inputs: { clockFormat: "clockFormat", timezone: "timezone", height: "height", inputWidth: "inputWidth", dropdownWidth: "dropdownWidth", interval: "interval", dateAsEpoch: "dateAsEpoch", firstInterval: "firstInterval", rangeValidity: "rangeValidity", showTooltip: "showTooltip", givenTime: "givenTime", minTime: "minTime", triggerChange: "triggerChange" }, outputs: { timeEmitter: "timeEmitter" }, features: [i0.ɵɵNgOnChangesFeature], decls: 5, vars:
|
|
349
|
+
} }, inputs: { clockFormat: "clockFormat", timezone: "timezone", height: "height", inputWidth: "inputWidth", dropdownWidth: "dropdownWidth", interval: "interval", dateAsEpoch: "dateAsEpoch", firstInterval: "firstInterval", rangeValidity: "rangeValidity", showTooltip: "showTooltip", givenTime: "givenTime", minTime: "minTime", triggerChange: "triggerChange", disable: "disable" }, outputs: { timeEmitter: "timeEmitter" }, features: [i0.ɵɵNgOnChangesFeature], decls: 5, vars: 19, consts: [["input", ""], ["dropdownContainer", ""], ["dropdown", ""], ["timeInterval", ""], [1, "timepicker-container", 3, "ngStyle", "ngClass"], ["type", "text", "misToolTip", "", "cdkOverlayOrigin", "", 1, "h7", 3, "ngModelChange", "click", "ngModel", "ngClass", "ngStyle", "showToolTip", "text", "position", "showOnHover"], ["libDropdownScroll", "", "libTimepicker", "", 3, "statusEmitter", "originEl", "openStatus"], ["class", "timepicker-dropdown", 3, "ngStyle", 4, "ngIf"], [1, "timepicker-dropdown", 3, "ngStyle"], [3, "ngClass", "click", 4, "ngFor", "ngForOf"], [3, "click", "ngClass"], ["class", "ic-ui-check-24 selected-icon", 4, "ngIf"], [1, "ic-ui-check-24", "selected-icon"]], template: function TimePickerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
342
350
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
343
351
|
i0.ɵɵelementStart(0, "div", 4)(1, "input", 5, 0);
|
|
344
352
|
i0.ɵɵtwoWayListener("ngModelChange", function TimePickerComponent_Template_input_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.chosenTime, $event) || (ctx.chosenTime = $event); return i0.ɵɵresetView($event); });
|
|
@@ -349,17 +357,17 @@ class TimePickerComponent {
|
|
|
349
357
|
i0.ɵɵelementEnd();
|
|
350
358
|
} if (rf & 2) {
|
|
351
359
|
const input_r6 = i0.ɵɵreference(2);
|
|
352
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(
|
|
360
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(11, _c2, ctx.height))("ngClass", i0.ɵɵpureFunction1(13, _c3, ctx.disable));
|
|
353
361
|
i0.ɵɵadvance();
|
|
354
362
|
i0.ɵɵtwoWayProperty("ngModel", ctx.chosenTime);
|
|
355
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
363
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c4, ctx.isInvalid || !ctx.rangeValidity))("ngStyle", i0.ɵɵpureFunction1(17, _c5, ctx.inputWidth))("showToolTip", ctx.showTooltip && (ctx.isInvalid || !ctx.rangeValidity) && ctx.dispayToolTip)("text", "Invalid Time")("position", "top")("showOnHover", false);
|
|
356
364
|
i0.ɵɵadvance(2);
|
|
357
365
|
i0.ɵɵproperty("originEl", input_r6)("openStatus", ctx.openStatus);
|
|
358
|
-
} }, dependencies: [i1$1.NgClass, i1$1.NgForOf, i1$1.NgIf, i1$1.NgStyle, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgModel, i3.ToolTipDirective, i1.CdkOverlayOrigin, TimepickerDirective], styles: [".h1[_ngcontent-%COMP%]{font-size:40px;font-weight:400;letter-spacing:0px;line-height:48px}.h2[_ngcontent-%COMP%]{font-size:32px;font-weight:400;letter-spacing:0px;line-height:40px}.h3[_ngcontent-%COMP%]{font-size:28px;font-weight:400;letter-spacing:0px;line-height:36px}.h4[_ngcontent-%COMP%]{font-size:24px;font-weight:400;letter-spacing:0px;line-height:32px}.h5-b[_ngcontent-%COMP%]{font-size:20px;font-weight:700;letter-spacing:.25px;line-height:28px}.h5[_ngcontent-%COMP%]{font-size:20px;font-weight:400;letter-spacing:.15px;line-height:28px}.h6-b[_ngcontent-%COMP%]{font-size:16px;font-weight:700;letter-spacing:0px;line-height:24px}.h6[_ngcontent-%COMP%]{font-size:16px;font-weight:400;letter-spacing:0px;line-height:24px}.p[_ngcontent-%COMP%]{font-size:16px;font-weight:400;letter-spacing:0px;line-height:180%}.h7-b[_ngcontent-%COMP%]{font-size:14px;font-weight:700;letter-spacing:.25px;line-height:20px}.h7[_ngcontent-%COMP%]{font-size:14px;font-weight:400;letter-spacing:.2px;line-height:20px}.h8-b[_ngcontent-%COMP%]{font-size:12px;font-weight:700;letter-spacing:.25px;line-height:18px}.h8[_ngcontent-%COMP%]{font-size:12px;font-weight:400;letter-spacing:.2px;line-height:18px}.h9[_ngcontent-%COMP%]{font-size:10px;font-weight:400;letter-spacing:0px;line-height:15px}.btn-lg-b[_ngcontent-%COMP%]{font-size:16px;font-weight:700;letter-spacing:.5px;line-height:24px}.btn-lg[_ngcontent-%COMP%]{font-size:16px;font-weight:400;letter-spacing:.2px;line-height:24px}.btn-sm[_ngcontent-%COMP%]{font-size:14px;font-weight:400;letter-spacing:.25px;line-height:20px}.btn-link[_ngcontent-%COMP%]{font-size:16px;font-weight:400;letter-spacing:0px;line-height:24px}.display-1[_ngcontent-%COMP%]{font-size:48px;font-weight:400;letter-spacing:0px;line-height:56px}.display-2[_ngcontent-%COMP%]{font-size:14px;font-weight:400;letter-spacing:.5px;line-height:20px}*[_ngcontent-%COMP%]{box-sizing:border-box;font-family:Lato}.timepicker-container[_ngcontent-%COMP%]{display:inline-block;position:relative}input[_ngcontent-%COMP%]{text-align:center;border:none;border-bottom:1px solid #e0e0e0;outline:none;height:100%;width:100px;padding:4px 16px}input[_ngcontent-%COMP%]:hover{background:#f5f7fc}input[_ngcontent-%COMP%]:focus, input[_ngcontent-%COMP%]:active{background:#e6ebf7;border-bottom:1px solid #0937b2}.timepicker-dropdown[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 4px);left:0;max-height:200px;overflow-y:auto;border:1px solid #e0e0e0;box-shadow:0 12px 24px #0000001f,0 4px 8px #0000001f;border-radius:4px;padding:8px;background:#fff}.timepicker-dropdown[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.timepicker-dropdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:0;padding:0}.timepicker-dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{text-align:start;list-style:none;padding:6px 12px;cursor:pointer;font-size:14px;color:#181f33;display:flex;justify-content:space-between;align-items:center}.timepicker-dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background:#f5f7fc;border-radius:6px}.timepicker-dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .selected-icon[_ngcontent-%COMP%]{font-weight:900}.highlight[_ngcontent-%COMP%]{background-color:#f5f7fc;border-radius:6px}.invalid[_ngcontent-%COMP%]{background:#fae1ea!important;border-bottom:1px solid #b00020!important}"] }); }
|
|
366
|
+
} }, dependencies: [i1$1.NgClass, i1$1.NgForOf, i1$1.NgIf, i1$1.NgStyle, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgModel, i3.ToolTipDirective, i1.CdkOverlayOrigin, TimepickerDirective], styles: [".h1[_ngcontent-%COMP%]{font-size:40px;font-weight:400;letter-spacing:0px;line-height:48px}.h2[_ngcontent-%COMP%]{font-size:32px;font-weight:400;letter-spacing:0px;line-height:40px}.h3[_ngcontent-%COMP%]{font-size:28px;font-weight:400;letter-spacing:0px;line-height:36px}.h4[_ngcontent-%COMP%]{font-size:24px;font-weight:400;letter-spacing:0px;line-height:32px}.h5-b[_ngcontent-%COMP%]{font-size:20px;font-weight:700;letter-spacing:.25px;line-height:28px}.h5[_ngcontent-%COMP%]{font-size:20px;font-weight:400;letter-spacing:.15px;line-height:28px}.h6-b[_ngcontent-%COMP%]{font-size:16px;font-weight:700;letter-spacing:0px;line-height:24px}.h6[_ngcontent-%COMP%]{font-size:16px;font-weight:400;letter-spacing:0px;line-height:24px}.p[_ngcontent-%COMP%]{font-size:16px;font-weight:400;letter-spacing:0px;line-height:180%}.h7-b[_ngcontent-%COMP%]{font-size:14px;font-weight:700;letter-spacing:.25px;line-height:20px}.h7[_ngcontent-%COMP%]{font-size:14px;font-weight:400;letter-spacing:.2px;line-height:20px}.h8-b[_ngcontent-%COMP%]{font-size:12px;font-weight:700;letter-spacing:.25px;line-height:18px}.h8[_ngcontent-%COMP%]{font-size:12px;font-weight:400;letter-spacing:.2px;line-height:18px}.h9[_ngcontent-%COMP%]{font-size:10px;font-weight:400;letter-spacing:0px;line-height:15px}.btn-lg-b[_ngcontent-%COMP%]{font-size:16px;font-weight:700;letter-spacing:.5px;line-height:24px}.btn-lg[_ngcontent-%COMP%]{font-size:16px;font-weight:400;letter-spacing:.2px;line-height:24px}.btn-sm[_ngcontent-%COMP%]{font-size:14px;font-weight:400;letter-spacing:.25px;line-height:20px}.btn-link[_ngcontent-%COMP%]{font-size:16px;font-weight:400;letter-spacing:0px;line-height:24px}.display-1[_ngcontent-%COMP%]{font-size:48px;font-weight:400;letter-spacing:0px;line-height:56px}.display-2[_ngcontent-%COMP%]{font-size:14px;font-weight:400;letter-spacing:.5px;line-height:20px}*[_ngcontent-%COMP%]{box-sizing:border-box;font-family:Lato}.timepicker-container[_ngcontent-%COMP%]{display:inline-block;position:relative}input[_ngcontent-%COMP%]{text-align:center;border:none;border-bottom:1px solid #e0e0e0;outline:none;height:100%;width:100px;padding:4px 16px}input[_ngcontent-%COMP%]:hover{background:#f5f7fc}input[_ngcontent-%COMP%]:focus, input[_ngcontent-%COMP%]:active{background:#e6ebf7;border-bottom:1px solid #0937b2}.timepicker-dropdown[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 4px);left:0;max-height:200px;overflow-y:auto;border:1px solid #e0e0e0;box-shadow:0 12px 24px #0000001f,0 4px 8px #0000001f;border-radius:4px;padding:8px;background:#fff}.timepicker-dropdown[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.timepicker-dropdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:0;padding:0}.timepicker-dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{text-align:start;list-style:none;padding:6px 12px;cursor:pointer;font-size:14px;color:#181f33;display:flex;justify-content:space-between;align-items:center}.timepicker-dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background:#f5f7fc;border-radius:6px}.timepicker-dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .selected-icon[_ngcontent-%COMP%]{font-weight:900}.highlight[_ngcontent-%COMP%]{background-color:#f5f7fc;border-radius:6px}.invalid[_ngcontent-%COMP%]{background:#fae1ea!important;border-bottom:1px solid #b00020!important}.disable[_ngcontent-%COMP%]{pointer-events:none!important;opacity:.5!important}"] }); }
|
|
359
367
|
}
|
|
360
368
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimePickerComponent, [{
|
|
361
369
|
type: Component,
|
|
362
|
-
args: [{ selector: "mis-timepicker", template: "<div class=\"timepicker-container\" [ngStyle]=\"{ height: height }\">\n <input\n type=\"text\"\n [(ngModel)]=\"chosenTime\"\n (ngModelChange)=\"onTimeChange(chosenTime)\"\n [ngClass]=\"{ invalid: isInvalid || !rangeValidity }\"\n [ngStyle]=\"{ width: inputWidth }\"\n (click)=\"openDropdown()\"\n misToolTip\n [showToolTip]=\"showTooltip && (isInvalid || !rangeValidity) && dispayToolTip\"\n [text]=\"'Invalid Time'\"\n [position]=\"'top'\"\n [showOnHover]=\"false\"\n #input\n cdkOverlayOrigin\n class=\"h7\"\n />\n\n <ng-template #dropdownContainer libDropdownScroll libTimepicker [originEl]=\"input\" [openStatus]=\"openStatus\" (statusEmitter)=\"closeDropdown()\">\n <div *ngIf=\"openStatus\" class=\"timepicker-dropdown\" [ngStyle]=\"{ width: dropdownWidth || inputWidth }\">\n <ul #dropdown>\n <li #timeInterval (click)=\"onTimeSelect(interval)\" *ngFor=\"let interval of timeIntervals; index as i\" [ngClass]=\"{ highlight: i === isHighlighted }\">\n {{ interval }}\n <div class=\"ic-ui-check-24 selected-icon\" *ngIf=\"interval === chosenTime\"></div>\n </li>\n </ul>\n </div>\n </ng-template>\n</div>\n", styles: [".h1{font-size:40px;font-weight:400;letter-spacing:0px;line-height:48px}.h2{font-size:32px;font-weight:400;letter-spacing:0px;line-height:40px}.h3{font-size:28px;font-weight:400;letter-spacing:0px;line-height:36px}.h4{font-size:24px;font-weight:400;letter-spacing:0px;line-height:32px}.h5-b{font-size:20px;font-weight:700;letter-spacing:.25px;line-height:28px}.h5{font-size:20px;font-weight:400;letter-spacing:.15px;line-height:28px}.h6-b{font-size:16px;font-weight:700;letter-spacing:0px;line-height:24px}.h6{font-size:16px;font-weight:400;letter-spacing:0px;line-height:24px}.p{font-size:16px;font-weight:400;letter-spacing:0px;line-height:180%}.h7-b{font-size:14px;font-weight:700;letter-spacing:.25px;line-height:20px}.h7{font-size:14px;font-weight:400;letter-spacing:.2px;line-height:20px}.h8-b{font-size:12px;font-weight:700;letter-spacing:.25px;line-height:18px}.h8{font-size:12px;font-weight:400;letter-spacing:.2px;line-height:18px}.h9{font-size:10px;font-weight:400;letter-spacing:0px;line-height:15px}.btn-lg-b{font-size:16px;font-weight:700;letter-spacing:.5px;line-height:24px}.btn-lg{font-size:16px;font-weight:400;letter-spacing:.2px;line-height:24px}.btn-sm{font-size:14px;font-weight:400;letter-spacing:.25px;line-height:20px}.btn-link{font-size:16px;font-weight:400;letter-spacing:0px;line-height:24px}.display-1{font-size:48px;font-weight:400;letter-spacing:0px;line-height:56px}.display-2{font-size:14px;font-weight:400;letter-spacing:.5px;line-height:20px}*{box-sizing:border-box;font-family:Lato}.timepicker-container{display:inline-block;position:relative}input{text-align:center;border:none;border-bottom:1px solid #e0e0e0;outline:none;height:100%;width:100px;padding:4px 16px}input:hover{background:#f5f7fc}input:focus,input:active{background:#e6ebf7;border-bottom:1px solid #0937b2}.timepicker-dropdown{position:absolute;top:calc(100% + 4px);left:0;max-height:200px;overflow-y:auto;border:1px solid #e0e0e0;box-shadow:0 12px 24px #0000001f,0 4px 8px #0000001f;border-radius:4px;padding:8px;background:#fff}.timepicker-dropdown::-webkit-scrollbar{display:none}.timepicker-dropdown ul{margin:0;padding:0}.timepicker-dropdown li{text-align:start;list-style:none;padding:6px 12px;cursor:pointer;font-size:14px;color:#181f33;display:flex;justify-content:space-between;align-items:center}.timepicker-dropdown li:hover{background:#f5f7fc;border-radius:6px}.timepicker-dropdown li .selected-icon{font-weight:900}.highlight{background-color:#f5f7fc;border-radius:6px}.invalid{background:#fae1ea!important;border-bottom:1px solid #b00020!important}\n"] }]
|
|
370
|
+
args: [{ selector: "mis-timepicker", template: "<div class=\"timepicker-container\" [ngStyle]=\"{ height: height }\" [ngClass]=\"{'disable': disable}\">\n <input\n type=\"text\"\n [(ngModel)]=\"chosenTime\"\n (ngModelChange)=\"onTimeChange(chosenTime)\"\n [ngClass]=\"{ invalid: isInvalid || !rangeValidity }\"\n [ngStyle]=\"{ width: inputWidth }\"\n (click)=\"openDropdown()\"\n misToolTip\n [showToolTip]=\"showTooltip && (isInvalid || !rangeValidity) && dispayToolTip\"\n [text]=\"'Invalid Time'\"\n [position]=\"'top'\"\n [showOnHover]=\"false\"\n #input\n cdkOverlayOrigin\n class=\"h7\"\n />\n\n <ng-template #dropdownContainer libDropdownScroll libTimepicker [originEl]=\"input\" [openStatus]=\"openStatus\" (statusEmitter)=\"closeDropdown()\">\n <div *ngIf=\"openStatus\" class=\"timepicker-dropdown\" [ngStyle]=\"{ width: dropdownWidth || inputWidth }\">\n <ul #dropdown>\n <li #timeInterval (click)=\"onTimeSelect(interval)\" *ngFor=\"let interval of timeIntervals; index as i\" [ngClass]=\"{ highlight: i === isHighlighted }\">\n {{ interval }}\n <div class=\"ic-ui-check-24 selected-icon\" *ngIf=\"interval === chosenTime\"></div>\n </li>\n </ul>\n </div>\n </ng-template>\n</div>\n", styles: [".h1{font-size:40px;font-weight:400;letter-spacing:0px;line-height:48px}.h2{font-size:32px;font-weight:400;letter-spacing:0px;line-height:40px}.h3{font-size:28px;font-weight:400;letter-spacing:0px;line-height:36px}.h4{font-size:24px;font-weight:400;letter-spacing:0px;line-height:32px}.h5-b{font-size:20px;font-weight:700;letter-spacing:.25px;line-height:28px}.h5{font-size:20px;font-weight:400;letter-spacing:.15px;line-height:28px}.h6-b{font-size:16px;font-weight:700;letter-spacing:0px;line-height:24px}.h6{font-size:16px;font-weight:400;letter-spacing:0px;line-height:24px}.p{font-size:16px;font-weight:400;letter-spacing:0px;line-height:180%}.h7-b{font-size:14px;font-weight:700;letter-spacing:.25px;line-height:20px}.h7{font-size:14px;font-weight:400;letter-spacing:.2px;line-height:20px}.h8-b{font-size:12px;font-weight:700;letter-spacing:.25px;line-height:18px}.h8{font-size:12px;font-weight:400;letter-spacing:.2px;line-height:18px}.h9{font-size:10px;font-weight:400;letter-spacing:0px;line-height:15px}.btn-lg-b{font-size:16px;font-weight:700;letter-spacing:.5px;line-height:24px}.btn-lg{font-size:16px;font-weight:400;letter-spacing:.2px;line-height:24px}.btn-sm{font-size:14px;font-weight:400;letter-spacing:.25px;line-height:20px}.btn-link{font-size:16px;font-weight:400;letter-spacing:0px;line-height:24px}.display-1{font-size:48px;font-weight:400;letter-spacing:0px;line-height:56px}.display-2{font-size:14px;font-weight:400;letter-spacing:.5px;line-height:20px}*{box-sizing:border-box;font-family:Lato}.timepicker-container{display:inline-block;position:relative}input{text-align:center;border:none;border-bottom:1px solid #e0e0e0;outline:none;height:100%;width:100px;padding:4px 16px}input:hover{background:#f5f7fc}input:focus,input:active{background:#e6ebf7;border-bottom:1px solid #0937b2}.timepicker-dropdown{position:absolute;top:calc(100% + 4px);left:0;max-height:200px;overflow-y:auto;border:1px solid #e0e0e0;box-shadow:0 12px 24px #0000001f,0 4px 8px #0000001f;border-radius:4px;padding:8px;background:#fff}.timepicker-dropdown::-webkit-scrollbar{display:none}.timepicker-dropdown ul{margin:0;padding:0}.timepicker-dropdown li{text-align:start;list-style:none;padding:6px 12px;cursor:pointer;font-size:14px;color:#181f33;display:flex;justify-content:space-between;align-items:center}.timepicker-dropdown li:hover{background:#f5f7fc;border-radius:6px}.timepicker-dropdown li .selected-icon{font-weight:900}.highlight{background-color:#f5f7fc;border-radius:6px}.invalid{background:#fae1ea!important;border-bottom:1px solid #b00020!important}.disable{pointer-events:none!important;opacity:.5!important}\n"] }]
|
|
363
371
|
}], () => [], { clockFormat: [{
|
|
364
372
|
type: Input
|
|
365
373
|
}], timezone: [{
|
|
@@ -386,6 +394,8 @@ class TimePickerComponent {
|
|
|
386
394
|
type: Input
|
|
387
395
|
}], triggerChange: [{
|
|
388
396
|
type: Input
|
|
397
|
+
}], disable: [{
|
|
398
|
+
type: Input
|
|
389
399
|
}], timeEmitter: [{
|
|
390
400
|
type: Output
|
|
391
401
|
}], input: [{
|
|
@@ -407,7 +417,7 @@ class TimePickerModule {
|
|
|
407
417
|
static forRoot() {
|
|
408
418
|
return { ngModule: TimePickerModule, providers: [] };
|
|
409
419
|
}
|
|
410
|
-
static { this.ɵfac = function TimePickerModule_Factory(
|
|
420
|
+
static { this.ɵfac = function TimePickerModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimePickerModule)(); }; }
|
|
411
421
|
static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: TimePickerModule }); }
|
|
412
422
|
static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule, FormsModule, ToolTipModule, OverlayModule] }); }
|
|
413
423
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-timepicker.mjs","sources":["../../../projects/mis-components/timepicker/timepicker.directive.ts","../../../projects/mis-components/timepicker/timepicker.component.html","../../../projects/mis-components/timepicker/timepicker.component.ts","../../../projects/mis-components/timepicker/timepicker.module.ts","../../../projects/mis-components/timepicker/mis-crystal-design-system-timepicker.ts"],"sourcesContent":["import { Directive, Output, TemplateRef } from '@angular/core';\nimport { EventEmitter, Input, ViewContainerRef } from \"@angular/core\";\nimport { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\n\n@Directive({\n selector: '[libTimepicker]'\n})\nexport class TimepickerDirective {\n private openStatus: boolean = false;\n @Input('originEl') originEl : any;\n @Output() statusEmitter = new EventEmitter<boolean>(); \n\n @Input('openStatus') set createOverlayOnInput(openStatus){\n this.openStatus = openStatus;\n if(this.originEl && this.openStatus) this.createOverlay(this.originEl);\n }; \n private overlayRef!: OverlayRef;\n constructor(private templateRef: TemplateRef<Element>, private overlay: Overlay, private viewContainerRef: ViewContainerRef) {}\n\n createOverlay(origin: any): void {\n const positions = [\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }, 0, 4),\n new ConnectionPositionPair({ originX: \"end\", originY: \"bottom\" }, { overlayX: \"end\", overlayY: \"top\" }, 0, 4)\n ];\n\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n positionStrategy: this.overlay\n .position()\n //connecting the dropdown overlay to the input element\n .flexibleConnectedTo(origin)\n .withPositions([...positions])\n .withPush(true)\n });\n\n this.overlayRef = this.overlay.create(overlayConfig);\n const dropdownPortal = new TemplatePortal(this.templateRef, this.viewContainerRef);\n this.overlayRef.attach(dropdownPortal);\n this.overlayRef.backdropClick().subscribe(resp => {\n this.openStatus = false;\n this.statusEmitter.emit(false);\n this.overlayRef.detach();\n });\n }\n\n destroyOverlay(){\n this.overlayRef.detach();\n }\n \n}\n","<div class=\"timepicker-container\" [ngStyle]=\"{ height: height }\">\n <input\n type=\"text\"\n [(ngModel)]=\"chosenTime\"\n (ngModelChange)=\"onTimeChange(chosenTime)\"\n [ngClass]=\"{ invalid: isInvalid || !rangeValidity }\"\n [ngStyle]=\"{ width: inputWidth }\"\n (click)=\"openDropdown()\"\n misToolTip\n [showToolTip]=\"showTooltip && (isInvalid || !rangeValidity) && dispayToolTip\"\n [text]=\"'Invalid Time'\"\n [position]=\"'top'\"\n [showOnHover]=\"false\"\n #input\n cdkOverlayOrigin\n class=\"h7\"\n />\n\n <ng-template #dropdownContainer libDropdownScroll libTimepicker [originEl]=\"input\" [openStatus]=\"openStatus\" (statusEmitter)=\"closeDropdown()\">\n <div *ngIf=\"openStatus\" class=\"timepicker-dropdown\" [ngStyle]=\"{ width: dropdownWidth || inputWidth }\">\n <ul #dropdown>\n <li #timeInterval (click)=\"onTimeSelect(interval)\" *ngFor=\"let interval of timeIntervals; index as i\" [ngClass]=\"{ highlight: i === isHighlighted }\">\n {{ interval }}\n <div class=\"ic-ui-check-24 selected-icon\" *ngIf=\"interval === chosenTime\"></div>\n </li>\n </ul>\n </div>\n </ng-template>\n</div>\n","import { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, ViewChild, ViewChildren } from \"@angular/core\";\nimport * as moment from \"moment-timezone\";\nimport { ITime } from \"./time.namespace\";\nimport { TimepickerDirective } from \"./timepicker.directive\";\nimport { ToolTipDirective } from \"mis-crystal-design-system/tooltip\";\n\n\n@Component({\n selector: \"mis-timepicker\",\n templateUrl: \"./timepicker.component.html\",\n styleUrls: [\"./timepicker.component.scss\"]\n})\nexport class TimePickerComponent implements OnInit, OnChanges, OnDestroy {\n currTime!: string;\n chosenTime: string;\n openStatus: boolean = false;\n isHighlighted: number = 0;\n isInvalid: boolean = false;\n timeIntervals: string[] = [];\n shouldScroll: boolean = false;\n userInputFlag: boolean = false;\n givenTimeFlag: boolean = true;\n @Input() clockFormat: number = 12;\n timeFormat!: string;\n \n @Input() timezone: string = \"Asia/Kolkata\";\n @Input() height: string = \"max-content\";\n @Input() inputWidth: string = \"100px\";\n @Input() dropdownWidth?: string;\n @Input() interval: number = 15;\n @Input() dateAsEpoch: number = moment().valueOf();\n @Input() firstInterval!: number;\n @Input() rangeValidity: boolean = true;\n @Input() showTooltip: boolean = true;\n dispayToolTip: boolean = this.showTooltip;\n @Input() givenTime: number;\n @Input() minTime?: number;\n @Input() triggerChange: boolean = true;\n\n @Output() timeEmitter = new EventEmitter<ITime>();\n @ViewChild(\"input\", { static: true }) input: ElementRef;\n @ViewChild(TimepickerDirective) timepickerDirective: TimepickerDirective;\n @ViewChild(ToolTipDirective) tooltipDirective: ToolTipDirective;\n\n // gets all the li elements from the dropdown and scrolls to the highlighted element\n @ViewChildren(\"timeInterval\") set timeIntervalRefs(intervals) {\n intervals.forEach(interval => {\n if (interval.nativeElement.classList[0] === \"highlight\") {\n const highlighted = interval.nativeElement;\n setTimeout(() => highlighted.scrollIntoView({ block: \"center\" }));\n }\n });\n }\n\n constructor(){}\n ngOnInit(): void {\n if(!this.givenTime && !this.minTime) {\n this.chosenTime = moment(this.firstInterval).format(this.timeFormat);\n let chosenTimeMoment = this.getMoment(this.chosenTime);\n this.emitTime({\n valid: !this.isInvalid,\n time: this.chosenTime,\n epoch: chosenTimeMoment.valueOf()\n });\n }\n }\n\n ngOnChanges(): void {\n this.timeFormat = this.clockFormat === 12 ? \"hh:mm a\" : \"HH:mm\";\n moment.tz.setDefault(this.timezone);\n\n if (this.timeFormat) {\n let chosenTimeMoment = this.getMoment(this.chosenTime);\n \n // if the first interval is >= the chosen time\n // then only update the value of chosen time\n // else it remains the same\n if (this.firstInterval >= chosenTimeMoment.valueOf() && this.rangeValidity && !this.userInputFlag) {\n this.chosenTime = moment(this.firstInterval).format(this.timeFormat);\n chosenTimeMoment = this.getMoment(this.chosenTime)\n }\n\n if((this.givenTimeFlag && this.givenTime) || this.minTime ) {\n this.chosenTime = moment(this.minTime || this.givenTime).format(this.timeFormat);\n }\n chosenTimeMoment = this.getMoment(this.chosenTime)\n\n if (!this.userInputFlag) this.populateDropdown();\n this.userInputFlag = false;\n \n if(this.chosenTime) {\n this.isInvalid = !this.checkTimeValidity(this.chosenTime.trim());\n this.emitTime({\n valid: !this.isInvalid,\n time: this.chosenTime,\n epoch: chosenTimeMoment.valueOf()\n });\n this.calculateClosestInterval(this.chosenTime);\n }\n }\n }\n\n emitTime(data: ITime): void {\n this.timeEmitter.emit(data);\n }\n\n // function to get moment object when time is given in string\n getMoment(time: string){\n return moment(`${moment(this.dateAsEpoch).format(\"DD-MM-YYYY\")} ${time}`, `'DD-MM-YYYY' ${this.timeFormat}`)\n }\n\n closeDropdown() {\n this.dispayToolTip = false;\n this.userInputFlag = false;\n this.openStatus = false;\n if (this.timepickerDirective) this.timepickerDirective.destroyOverlay();\n }\n\n // toggle timepicker dropdown\n openDropdown(): void {\n this.dispayToolTip = true;\n this.openStatus = true;\n }\n\n checkTimeValidity(time: string): boolean {\n const RE12 = /^(([0][1-9]|1[0-2]):([0-5][0-9])( )?(am|pm|AM|PM))$/i;\n const RE24 = /^([01][0-9]|2[0-3]):[0-5][0-9]$/;\n const RE = this.clockFormat === 12 ? RE12 : RE24;\n\n const timeMoment = this.getMoment(time);\n let flag: boolean = false;\n\n // if the first interval is set to the start of the day\n // or a time is already provided to the component to show\n // then we don't check its validity against the current time\n if (\n this.minTime || \n this.givenTime ||\n (this.firstInterval &&\n moment(this.firstInterval).format(this.timeFormat).valueOf() === moment().startOf(\"d\").format(this.timeFormat).valueOf())\n ) {\n flag = time.match(RE) ? true : false;\n } else {\n flag = time.match(RE) && timeMoment.diff(moment(), \"m\") >= 0 ? true: false;\n }\n\n return flag;\n }\n\n // update chosen time as soon as the user clicks on an interval\n onTimeSelect(time: string): void {\n this.isInvalid = !this.checkTimeValidity(time.trim());\n if (!this.isInvalid) {\n this.chosenTime = time;\n this.calculateClosestInterval(this.chosenTime);\n }\n\n const timeMoment = this.getMoment(time);\n this.emitTime({\n valid: !this.isInvalid,\n time: time,\n epoch: timeMoment.valueOf() \n });\n this.openStatus = false;\n if (this.timepickerDirective) this.timepickerDirective.destroyOverlay();\n }\n\n // checks validity of time on input change and calculates the closest interval\n onTimeChange(time: string): void {\n this.isInvalid = !this.checkTimeValidity(time.trim());\n\n if (!this.isInvalid) {\n this.userInputFlag = true;\n this.openStatus = false;\n if (this.timepickerDirective) this.timepickerDirective.destroyOverlay();\n this.calculateClosestInterval(time);\n }\n const timeMoment = this.getMoment(time);\n this.emitTime({\n valid: !this.isInvalid,\n time: time,\n epoch: timeMoment.valueOf() \n });\n }\n\n calculateClosestInterval(time: string): void {\n let roundedEpoch: number;\n // Converting time and date to a moment object \n const chosenDate = moment(this.dateAsEpoch).format(\"DD-MM-YYYY\"); // 05-01-2024\n const parsedTimeWithDate = moment(`${chosenDate} ${time}`, `DD-MM-YYYY ${this.timeFormat}`);\n // Converting moment object to epoch\n const chosenTimeEpoch = parsedTimeWithDate.valueOf();\n const offset = this.interval - (moment(chosenTimeEpoch).minutes() % this.interval);\n\n if (this.minTime && !this.givenTime) {\n this.isHighlighted = 0;\n return;\n }\n roundedEpoch = offset >= this.interval / 2 ? (moment(chosenTimeEpoch).subtract(this.interval - offset, \"m\")).valueOf() : (moment(chosenTimeEpoch).add( offset, \"m\")).valueOf();\n\n // finding the index of element that needs to be highlighted\n if ( chosenTimeEpoch > moment(this.dateAsEpoch).endOf(\"d\").subtract(this.interval, \"m\").valueOf()) {\n this.isHighlighted = this.timeIntervals.length - 1;\n } else {\n const roundedEpochMoment = moment(roundedEpoch);\n this.isHighlighted = this.timeIntervals.findIndex(interval => {\n const intervalObj = moment(`${chosenDate} ${interval}`, `DD-MM-YYYY ${this.timeFormat}`);\n return intervalObj.isSame(roundedEpochMoment);\n });\n }\n }\n\n\n // populates the dropdown according to the first interval received\n populateDropdown(): void {\n this.timeIntervals = [];\n\n // if picker is used as an individual component\n if (!this.firstInterval) {\n // firstInterval is initialised according to the current time\n // if the date is same as the current date\n if (moment(this.dateAsEpoch).format(\"DD-MM-YYYY\") === moment().format(\"DD-MM-YYYY\") && !this.minTime) {\n const offset = this.interval - (moment().minutes() % this.interval);\n this.firstInterval = moment().add(offset, \"m\").valueOf();\n }\n // if minimum time to show is provided\n else if(this.minTime){\n const offset = this.interval - (moment(this.minTime).minutes() % this.interval);\n this.firstInterval = moment(this.minTime).add(offset, \"m\").valueOf();\n }\n // else the firstInterval is initialised as start of day\n else {\n this.firstInterval = moment().startOf(\"d\").valueOf();\n }\n }\n\n if(this.givenTime && this.givenTimeFlag){\n this.firstInterval = moment(this.givenTime).startOf('d').valueOf();\n this.givenTimeFlag = false;\n }\n\n const dateAsString = moment(this.dateAsEpoch).format('DD-MM-YYYY');\n const intervalAsString = moment(this.firstInterval).format(this.timeFormat);\n const start = moment(`${dateAsString} ${intervalAsString}`, `DD-MM-YYYY ${this.timeFormat}`);\n const end = moment(`${dateAsString}`, 'DD-MM-YYYY').endOf('d');\n\n \n while (start.valueOf() < end.valueOf()) {\n this.timeIntervals.push(start.format(this.timeFormat));\n start.add(this.interval, \"m\");\n }\n\n // if the start time is equal to the interval just before midnight\n // and the start date = end date\n // push 11:59pm only\n if (this.timeIntervals.length === 0) {\n this.chosenTime = moment().endOf(\"d\").format(this.timeFormat);\n this.timeIntervals.push(moment().endOf(\"d\").format(this.timeFormat));\n }\n }\n\n ngOnDestroy() {\n if (this.tooltipDirective) this.tooltipDirective.hideToolTip();\n }\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { TimePickerComponent } from \"./timepicker.component\";\nimport { ToolTipModule } from \"mis-crystal-design-system/tooltip\";\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { TimepickerDirective } from './timepicker.directive';\n\n@NgModule({\n declarations: [TimePickerComponent, TimepickerDirective],\n imports: [CommonModule, FormsModule, ToolTipModule, OverlayModule],\n exports: [TimePickerComponent]\n})\nexport class TimePickerModule {\n static forRoot(): ModuleWithProviders<TimePickerModule> {\n return { ngModule: TimePickerModule, providers: [] };\n }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAQa,mBAAmB,CAAA;IAK9B,IAA0B,oBAAoB,CAAC,UAAU,EAAA;AACvD,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,UAAU;AAAE,YAAA,IAAI,CAAC,aAAa,CAAC,I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AO,EAAE,CAAC,mBAAmB,CAAC;AAC/B,aAAA,CAAA;;AACY,CAAA,YAAA,EAAA,CAAA,OAAA,SAAA,KAAA,WAAA,IAAA,SAAA,KAAA,EAAA,CAAA,kBAAA,CAAA,gBAAgB,EAJZ,EAAA,YAAA,EAAA,CAAA,mBAAmB,EAAE,mBAAmB,CAC7C,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,aACvD,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACX/B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mis-crystal-design-system-timepicker.mjs","sources":["../../../projects/mis-components/timepicker/timepicker.directive.ts","../../../projects/mis-components/timepicker/timepicker.component.html","../../../projects/mis-components/timepicker/timepicker.component.ts","../../../projects/mis-components/timepicker/timepicker.module.ts","../../../projects/mis-components/timepicker/mis-crystal-design-system-timepicker.ts"],"sourcesContent":["import { Directive, Output, TemplateRef } from '@angular/core';\nimport { EventEmitter, Input, ViewContainerRef } from \"@angular/core\";\nimport { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\n\n@Directive({\n selector: '[libTimepicker]'\n})\nexport class TimepickerDirective {\n private openStatus: boolean = false;\n @Input('originEl') originEl : any;\n @Output() statusEmitter = new EventEmitter<boolean>(); \n\n @Input('openStatus') set createOverlayOnInput(openStatus){\n this.openStatus = openStatus;\n if(this.originEl && this.openStatus) this.createOverlay(this.originEl);\n }; \n private overlayRef!: OverlayRef;\n constructor(private templateRef: TemplateRef<Element>, private overlay: Overlay, private viewContainerRef: ViewContainerRef) {}\n\n createOverlay(origin: any): void {\n const positions = [\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }, 0, 4),\n new ConnectionPositionPair({ originX: \"end\", originY: \"bottom\" }, { overlayX: \"end\", overlayY: \"top\" }, 0, 4)\n ];\n\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n positionStrategy: this.overlay\n .position()\n //connecting the dropdown overlay to the input element\n .flexibleConnectedTo(origin)\n .withPositions([...positions])\n .withPush(true)\n });\n\n this.overlayRef = this.overlay.create(overlayConfig);\n const dropdownPortal = new TemplatePortal(this.templateRef, this.viewContainerRef);\n this.overlayRef.attach(dropdownPortal);\n this.overlayRef.backdropClick().subscribe(resp => {\n this.openStatus = false;\n this.statusEmitter.emit(false);\n this.overlayRef.detach();\n });\n }\n\n destroyOverlay(){\n this.overlayRef.detach();\n }\n \n}\n","<div class=\"timepicker-container\" [ngStyle]=\"{ height: height }\" [ngClass]=\"{'disable': disable}\">\n <input\n type=\"text\"\n [(ngModel)]=\"chosenTime\"\n (ngModelChange)=\"onTimeChange(chosenTime)\"\n [ngClass]=\"{ invalid: isInvalid || !rangeValidity }\"\n [ngStyle]=\"{ width: inputWidth }\"\n (click)=\"openDropdown()\"\n misToolTip\n [showToolTip]=\"showTooltip && (isInvalid || !rangeValidity) && dispayToolTip\"\n [text]=\"'Invalid Time'\"\n [position]=\"'top'\"\n [showOnHover]=\"false\"\n #input\n cdkOverlayOrigin\n class=\"h7\"\n />\n\n <ng-template #dropdownContainer libDropdownScroll libTimepicker [originEl]=\"input\" [openStatus]=\"openStatus\" (statusEmitter)=\"closeDropdown()\">\n <div *ngIf=\"openStatus\" class=\"timepicker-dropdown\" [ngStyle]=\"{ width: dropdownWidth || inputWidth }\">\n <ul #dropdown>\n <li #timeInterval (click)=\"onTimeSelect(interval)\" *ngFor=\"let interval of timeIntervals; index as i\" [ngClass]=\"{ highlight: i === isHighlighted }\">\n {{ interval }}\n <div class=\"ic-ui-check-24 selected-icon\" *ngIf=\"interval === chosenTime\"></div>\n </li>\n </ul>\n </div>\n </ng-template>\n</div>\n","import { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, ViewChild, ViewChildren } from \"@angular/core\";\nimport { ITime } from \"./time.namespace\";\nimport { TimepickerDirective } from \"./timepicker.directive\";\nimport { ToolTipDirective } from \"mis-crystal-design-system/tooltip\";\n\nimport dayjs from 'dayjs';\nimport timezone from 'dayjs/plugin/timezone';\nimport utc from 'dayjs/plugin/utc';\nimport customParseFormat from 'dayjs/plugin/customParseFormat'\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(customParseFormat);\n\n\n@Component({\n selector: \"mis-timepicker\",\n templateUrl: \"./timepicker.component.html\",\n styleUrls: [\"./timepicker.component.scss\"]\n})\nexport class TimePickerComponent implements OnInit, OnChanges, OnDestroy {\n currTime!: string;\n chosenTime: string;\n openStatus: boolean = false;\n isHighlighted: number = 0;\n isInvalid: boolean = false;\n timeIntervals: string[] = [];\n shouldScroll: boolean = false;\n userInputFlag: boolean = false;\n givenTimeFlag: boolean = true;\n @Input() clockFormat: number = 12;\n timeFormat!: string;\n \n @Input() timezone: string = \"Asia/Kolkata\";\n @Input() height: string = \"max-content\";\n @Input() inputWidth: string = \"100px\";\n @Input() dropdownWidth?: string;\n @Input() interval: number = 15;\n @Input() dateAsEpoch: number = dayjs().valueOf();\n @Input() firstInterval!: number;\n @Input() rangeValidity: boolean = true;\n @Input() showTooltip: boolean = true;\n dispayToolTip: boolean = this.showTooltip;\n @Input() givenTime: number;\n @Input() minTime?: number;\n @Input() triggerChange: boolean = true;\n @Input() disable: boolean = false;\n @Output() timeEmitter = new EventEmitter<ITime>();\n @ViewChild(\"input\", { static: true }) input: ElementRef;\n @ViewChild(TimepickerDirective) timepickerDirective: TimepickerDirective;\n @ViewChild(ToolTipDirective) tooltipDirective: ToolTipDirective;\n\n // gets all the li elements from the dropdown and scrolls to the highlighted element\n @ViewChildren(\"timeInterval\") set timeIntervalRefs(intervals) {\n intervals.forEach(interval => {\n if (interval.nativeElement.classList[0] === \"highlight\") {\n const highlighted = interval.nativeElement;\n setTimeout(() => highlighted.scrollIntoView({ block: \"center\" }));\n }\n });\n }\n\n constructor(){}\n ngOnInit(): void {\n if(!this.givenTime && !this.minTime) {\n this.chosenTime = dayjs(this.firstInterval).format(this.timeFormat);\n let chosenTimedayjs = this.getdayjs(this.chosenTime);\n this.emitTime({\n valid: !this.isInvalid,\n time: this.chosenTime,\n epoch: chosenTimedayjs.valueOf()\n });\n }\n }\n\n ngOnChanges(): void {\n this.timeFormat = this.clockFormat === 12 ? \"hh:mm a\" : \"HH:mm\";\n dayjs.tz.setDefault(this.timezone);\n\n if (this.timeFormat) {\n let chosenTimedayjs = this.getdayjs(this.chosenTime);\n \n // if the first interval is >= the chosen time\n // then only update the value of chosen time\n // else it remains the same\n if (this.firstInterval >= chosenTimedayjs.valueOf() && this.rangeValidity && !this.userInputFlag) {\n this.chosenTime = dayjs(this.firstInterval).format(this.timeFormat);\n chosenTimedayjs = this.getdayjs(this.chosenTime)\n }\n\n if((this.givenTimeFlag && this.givenTime) || this.minTime ) {\n this.chosenTime = dayjs(this.minTime || this.givenTime).format(this.timeFormat);\n }\n chosenTimedayjs = this.getdayjs(this.chosenTime)\n\n if (!this.userInputFlag) this.populateDropdown();\n this.userInputFlag = false;\n \n if(this.chosenTime) {\n this.isInvalid = !this.checkTimeValidity(this.chosenTime.trim());\n this.emitTime({\n valid: !this.isInvalid,\n time: this.chosenTime,\n epoch: chosenTimedayjs.valueOf()\n });\n this.calculateClosestInterval(this.chosenTime);\n }\n }\n }\n\n emitTime(data: ITime): void {\n this.timeEmitter.emit(data);\n }\n\n // function to get dayjs object when time is given in string\n getdayjs(time: string = '00:00'){\n return dayjs( `${dayjs(this.dateAsEpoch).format(\"DD-MM-YYYY\")} ${time}`, `DD-MM-YYYY ${this.timeFormat}`)\n }\n\n closeDropdown() {\n this.dispayToolTip = false;\n this.userInputFlag = false;\n this.openStatus = false;\n if (this.timepickerDirective) this.timepickerDirective.destroyOverlay();\n }\n\n // toggle timepicker dropdown\n openDropdown(): void {\n this.dispayToolTip = true;\n this.openStatus = true;\n }\n\n checkTimeValidity(time: string): boolean {\n const RE12 = /^(([0][1-9]|1[0-2]):([0-5][0-9])( )?(am|pm|AM|PM))$/i;\n const RE24 = /^([01][0-9]|2[0-3]):[0-5][0-9]$/;\n const RE = this.clockFormat === 12 ? RE12 : RE24;\n\n const timedayjs = this.getdayjs(time);\n let flag: boolean = false;\n\n // if the first interval is set to the start of the day\n // or a time is already provided to the component to show\n // then we don't check its validity against the current time\n if (\n this.minTime || \n this.givenTime ||\n (this.firstInterval &&\n dayjs(this.firstInterval).format(this.timeFormat).valueOf() === dayjs().startOf(\"day\").format(this.timeFormat).valueOf())\n ) {\n flag = time.match(RE) ? true : false;\n } else {\n flag = time.match(RE) && timedayjs.diff(dayjs(), \"m\") >= 0 ? true: false;\n }\n\n return flag;\n }\n\n // update chosen time as soon as the user clicks on an interval\n onTimeSelect(time: string): void {\n this.isInvalid = !this.checkTimeValidity(time.trim());\n if (!this.isInvalid) {\n this.chosenTime = time;\n this.calculateClosestInterval(this.chosenTime);\n }\n\n const timedayjs = this.getdayjs(time);\n this.emitTime({\n valid: !this.isInvalid,\n time: time,\n epoch: timedayjs.valueOf() \n });\n this.openStatus = false;\n if (this.timepickerDirective) this.timepickerDirective.destroyOverlay();\n }\n\n // checks validity of time on input change and calculates the closest interval\n onTimeChange(time: string): void {\n this.isInvalid = !this.checkTimeValidity(time.trim());\n\n if (!this.isInvalid) {\n this.userInputFlag = true;\n this.openStatus = false;\n if (this.timepickerDirective) this.timepickerDirective.destroyOverlay();\n this.calculateClosestInterval(time);\n }\n const timedayjs = this.getdayjs(time);\n this.emitTime({\n valid: !this.isInvalid,\n time: time,\n epoch: timedayjs.valueOf() \n });\n }\n\n calculateClosestInterval(time: string): void {\n let roundedEpoch: number;\n // Converting time and date to a dayjs object \n const chosenDate = dayjs(this.dateAsEpoch).format(\"DD-MM-YYYY\"); // 05-01-2024\n const parsedTimeWithDate = dayjs(`${chosenDate} ${time}`, `DD-MM-YYYY ${this.timeFormat}`);\n // Converting dayjs object to epoch\n const chosenTimeEpoch = parsedTimeWithDate.valueOf();\n const offset = this.interval - (dayjs(chosenTimeEpoch).minute() % this.interval);\n\n if (this.minTime && !this.givenTime) {\n this.isHighlighted = 0;\n return;\n }\n roundedEpoch = offset >= this.interval / 2 ? (dayjs(chosenTimeEpoch).subtract(this.interval - offset, \"m\")).valueOf() : (dayjs(chosenTimeEpoch).add( offset, \"m\")).valueOf();\n\n // finding the index of element that needs to be highlighted\n if ( chosenTimeEpoch > dayjs(this.dateAsEpoch).endOf(\"day\").subtract(this.interval, \"m\").valueOf()) {\n this.isHighlighted = this.timeIntervals.length - 1;\n } else {\n const roundedEpochdayjs = dayjs(roundedEpoch);\n this.isHighlighted = this.timeIntervals.findIndex(interval => {\n const intervalObj = dayjs(`${chosenDate} ${interval}`, `DD-MM-YYYY ${this.timeFormat}`);\n return intervalObj.isSame(roundedEpochdayjs);\n });\n }\n }\n\n\n // populates the dropdown according to the first interval received\n populateDropdown(): void {\n this.timeIntervals = [];\n\n // if picker is used as an individual component\n if (!this.firstInterval) {\n // firstInterval is initialised according to the current time\n // if the date is same as the current date\n if (dayjs(this.dateAsEpoch).format(\"DD-MM-YYYY\") === dayjs().format(\"DD-MM-YYYY\") && !this.minTime) {\n const offset = this.interval - (dayjs().minute() % this.interval);\n this.firstInterval = dayjs().add(offset, \"m\").valueOf();\n }\n // if minimum time to show is provided\n else if(this.minTime){\n const offset = this.interval - (dayjs(this.minTime).minute() % this.interval);\n this.firstInterval = dayjs(this.minTime).add(offset, \"m\").valueOf();\n }\n // else the firstInterval is initialised as start of day\n else {\n this.firstInterval = dayjs().startOf(\"day\").valueOf();\n }\n }\n\n if(this.givenTime && this.givenTimeFlag){\n this.firstInterval = dayjs(this.givenTime).startOf('d').valueOf();\n this.givenTimeFlag = false;\n }\n\n const dateAsString = dayjs(this.dateAsEpoch).format('DD-MM-YYYY');\n const intervalAsString = dayjs(this.firstInterval).format(this.timeFormat);\n let start = dayjs(`${dateAsString} ${intervalAsString}`, `DD-MM-YYYY ${this.timeFormat}`);\n const end = dayjs(this.dateAsEpoch).endOf('d');\n while (start.valueOf() < end.valueOf()) {\n this.timeIntervals.push(start.format(this.timeFormat));\n start = start.add(this.interval, \"m\");\n }\n\n // if the start time is equal to the interval just before midnight\n // and the start date = end date\n // push 11:59pm only\n if (this.timeIntervals.length === 0) {\n this.chosenTime = dayjs().endOf(\"d\").format(this.timeFormat);\n this.timeIntervals.push(dayjs().endOf(\"d\").format(this.timeFormat));\n }\n }\n\n ngOnDestroy() {\n if (this.tooltipDirective) this.tooltipDirective.hideToolTip();\n }\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { TimePickerComponent } from \"./timepicker.component\";\nimport { ToolTipModule } from \"mis-crystal-design-system/tooltip\";\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { TimepickerDirective } from './timepicker.directive';\n\n@NgModule({\n declarations: [TimePickerComponent, TimepickerDirective],\n imports: [CommonModule, FormsModule, ToolTipModule, OverlayModule],\n exports: [TimePickerComponent]\n})\nexport class TimePickerModule {\n static forRoot(): ModuleWithProviders<TimePickerModule> {\n return { ngModule: TimePickerModule, providers: [] };\n }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAQa,mBAAmB,CAAA;IAK9B,IAA0B,oBAAoB,CAAC,UAAU,EAAA;AACvD,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,UAAU;AAAE,YAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACxE;;AAED,IAAA,WAAA,CAAoB,WAAiC,EAAU,OAAgB,EAAU,gBAAkC,EAAA;QAAvG,IAAW,CAAA,WAAA,GAAX,WAAW,CAAsB;QAAU,IAAO,CAAA,OAAA,GAAP,OAAO,CAAS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