@libs-ui/components-datetime-input 0.2.82 → 0.2.84

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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb24tY29udHJvbC1ldmVudC5pbnRlcmZhY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvZGF0ZXRpbWUvaW5wdXQvc3JjL2ludGVyZmFjZXMvZnVuY3Rpb24tY29udHJvbC1ldmVudC5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IElJbnB1dEZ1bmN0aW9uQ29udHJvbEV2ZW50IH0gZnJvbSBcIkBsaWJzLXVpL2NvbXBvbmVudHMtaW5wdXRzLWlucHV0XCI7XG5cbmV4cG9ydCBpbnRlcmZhY2UgSU11bHRpRnVuY3Rpb25EYXRlSW5wdXRDb250cm9sRXZlbnQge1xuICBmcm9tSG91cnM/OiBJSW5wdXRGdW5jdGlvbkNvbnRyb2xFdmVudDtcbiAgdG9Ib3Vycz86IElJbnB1dEZ1bmN0aW9uQ29udHJvbEV2ZW50O1xuICBmcm9tTWludXRlcz86IElJbnB1dEZ1bmN0aW9uQ29udHJvbEV2ZW50O1xuICB0b01pbnV0ZXM/OiBJSW5wdXRGdW5jdGlvbkNvbnRyb2xFdmVudDtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBJRGF0ZVRpbWVJbnB1dEZ1bmN0aW9uQ29udHJvbEV2ZW50IHtcbiAgdmFsaWQ6ICgpID0+IFByb21pc2U8Ym9vbGVhbj47XG4gIHJlc2V0RXJyb3I6IChyZXNldEFsbD86IGJvb2xlYW4pID0+IFByb21pc2U8dm9pZD47XG4gIHNldE1lc3NhZ2VFcnJvcjogKG1lc3NhZ2U6IHN0cmluZyB8IHVuZGVmaW5lZCkgPT4gUHJvbWlzZTx2b2lkPjtcbn0iXX0=
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQuaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy11aS9jb21wb25lbnRzL2RhdGV0aW1lL2lucHV0L3NyYy9pbnRlcmZhY2VzL2lucHV0LmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgV3JpdGFibGVTaWduYWwgfSBmcm9tIFwiQGFuZ3VsYXIvY29yZVwiO1xuXG5leHBvcnQgaW50ZXJmYWNlIElDaGFuZ2VGb2N1c0lucHV0IHtcbiAgaG91cnNGb2N1cz86IGJvb2xlYW47XG4gIG1pbnV0ZXNGb2N1cz86IGJvb2xlYW47XG4gIGNoYW5nZUJvcmRlcj86IGJvb2xlYW47XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgSVNlbGVjdGVkTXVsdGlUaW1lIHtcbiAgZnJvbT86IFdyaXRhYmxlU2lnbmFsPElTZWxlY3RlZFRpbWVJbnB1dD4sXG4gIHRvPzogV3JpdGFibGVTaWduYWw8SVNlbGVjdGVkVGltZUlucHV0PlxufVxuXG5leHBvcnQgaW50ZXJmYWNlIElTZWxlY3RlZFRpbWVJbnB1dCB7XG4gIGhvdXJzPzogc3RyaW5nIHwgbnVtYmVyLFxuICBtaW51dGU/OiBzdHJpbmcgfCBudW1iZXJcbn1cbiJdfQ==
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWQuaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy11aS9jb21wb25lbnRzL2RhdGV0aW1lL2lucHV0L3NyYy9pbnRlcmZhY2VzL3ZhbGlkLmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuZXhwb3J0IGludGVyZmFjZSBJVmFsaWQge1xuICBtZXNzYWdlPzogc3RyaW5nO1xuICBpbnRlcnBvbGF0ZVBhcmFtcz86IHsgYW55OiBhbnkgfTtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBJVmFsaWRDb21wYXJlIGV4dGVuZHMgSVZhbGlkIHtcbiAgaXNDaGVja0Vycm9yVGltZUVuZEdyZWF0ZXJUaW1lU3RhcnQ/OiBib29sZWFuO1xuICBpc0NoZWNrRXJyb3JUaW1lRHVwbGljYXRlPzogYm9vbGVhbjtcbn0iXX0=
@@ -1,19 +1,524 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component } from '@angular/core';
3
- import { CommonModule } from '@angular/common';
2
+ import { signal, input, output, effect, untracked, Component, ChangeDetectionStrategy } from '@angular/core';
3
+ import { LibsUiComponentsInputsInputComponent } from '@libs-ui/components-inputs-input';
4
+ import { LibsUiComponentsLabelComponent } from '@libs-ui/components-label';
5
+ import { isNil, cloneDeep } from '@libs-ui/utils';
6
+ import * as i1 from '@ngx-translate/core';
7
+ import { TranslateModule } from '@ngx-translate/core';
8
+ import { timer } from 'rxjs';
4
9
 
5
- class DatetimeInputComponent {
6
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatetimeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DatetimeInputComponent, isStandalone: true, selector: "lib-datetime-input", ngImport: i0, template: "<p>datetime-input works!</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
10
+ const CheckTimeDisplay = (time) => {
11
+ const timeReturn = { hours: time.hours, minutes: time.minute };
12
+ if (Number(time.hours) > 23) {
13
+ timeReturn.hours = 23;
14
+ }
15
+ if (Number(time.minute) > 59) {
16
+ timeReturn.minutes = 59;
17
+ }
18
+ if (Number(time.hours) === 0 || Number(time.hours) < 0) {
19
+ timeReturn.hours = `00`;
20
+ }
21
+ if (Number(time.minute) === 0 || Number(time.minute) < 0) {
22
+ timeReturn.minutes = `00`;
23
+ }
24
+ if (Number(time.hours) && Number(time.hours) < 10) {
25
+ timeReturn.hours = `0${Number(time.hours)}`;
26
+ }
27
+ if (Number(time.minute) && Number(time.minute) < 10) {
28
+ timeReturn.minutes = `0${Number(time.minute)}`;
29
+ }
30
+ return timeReturn;
31
+ };
32
+ const CompareTime = (cloneDeepTime, time) => {
33
+ if (!cloneDeepTime && time) {
34
+ return true;
35
+ }
36
+ if (cloneDeepTime && !time) {
37
+ return false;
38
+ }
39
+ if (Number(cloneDeepTime?.from?.()?.hours) !== Number(time?.from?.()?.hours)) {
40
+ return true;
41
+ }
42
+ if (Number(cloneDeepTime?.from?.()?.minute) !== Number(time?.from?.()?.minute)) {
43
+ return true;
44
+ }
45
+ if (Number(cloneDeepTime?.to?.()?.hours) !== Number(time?.to?.()?.hours)) {
46
+ return true;
47
+ }
48
+ if (Number(cloneDeepTime?.to?.()?.minute) !== Number(time?.to?.()?.minute)) {
49
+ return true;
50
+ }
51
+ return false;
52
+ };
53
+
54
+ class LibsUiComponentsDatetimeInputComponent {
55
+ /* PROPERTY */
56
+ hours = signal(undefined);
57
+ minutes = signal(undefined);
58
+ toHours = signal(undefined);
59
+ toMinutes = signal(undefined);
60
+ isErrorRequired = signal(false);
61
+ isErrorMultiRequired = signal(false);
62
+ isErrorMultiValidCompareTime = signal(false);
63
+ focusInput = signal({});
64
+ cloneDeepTimeOutput = signal(undefined);
65
+ changeBorderFocus = signal({
66
+ changeBorder: false,
67
+ hoursFocus: false,
68
+ minutesFocus: false,
69
+ });
70
+ otherError = signal(undefined);
71
+ isZero = signal(false);
72
+ keyCodeBackspace = signal(false);
73
+ isSelected = signal(undefined);
74
+ writeDrownFromKeyboard = signal(undefined);
75
+ checkBackspaceFocusToHours = signal(1);
76
+ checkBackspaceFocusMinutes = signal(1);
77
+ checkBackspaceFocusToMinutes = signal(1);
78
+ multiTime = input(false);
79
+ selectedTime = input();
80
+ classIncludeBetweenTime = input(undefined);
81
+ fromAndToDateLabel = input();
82
+ resetInput = input(true);
83
+ disable = input(false);
84
+ readonly = input(false);
85
+ labelConfig = input(undefined);
86
+ validRequired = input(undefined);
87
+ validCompareTime = input(undefined);
88
+ ignoreBorder = input(false);
89
+ ignoreMultiIcon = input(false);
90
+ classDatePickerInput;
91
+ ignoreShowValid = input(false);
92
+ ignoreCheckValidWhenInput = input(false); // biến này dùng để có chạy validate ngay thời điểm khi nhập từ bán phím
93
+ ignoreAllowEqualTime = input(true); // biến này dùng để biết đc có cho 2 time bằng nhau hay không
94
+ emitDataSingleDataWhenUseMultiTime = input(false); // true khi muốn emit data riêng khi dùng dạng multi
95
+ classIncludeInput = input('', { transform: (value) => value ?? 'mo-lib-font-head-5' });
96
+ showBorderError = input(false);
97
+ defaultHeight = input(28);
98
+ ignoreWithDefault = input(false);
99
+ isEmitRealTime = input(false);
100
+ outEmitSingleTime = output();
101
+ outEmitMultiTime = output();
102
+ outClickButtonLabel = output();
103
+ outSwitchEventLabel = output();
104
+ outLabelRightClick = output();
105
+ outFunctionsControl = output();
106
+ outEmitValid = output();
107
+ outResetTime = output();
108
+ outEmitRealTime = output();
109
+ constructor() {
110
+ effect(() => {
111
+ const selectedTime = this.selectedTime();
112
+ if (!selectedTime) {
113
+ return;
114
+ }
115
+ untracked(() => this.formatSelectedTime(selectedTime));
116
+ });
117
+ }
118
+ // ngOnChanges(changes: SimpleChanges): void {
119
+ // if (changes.selectedTime && changes.selectedTime.currentValue && CompareTimeOutPut(changes.selectedTime.previousValue, changes.selectedTime.currentValue)) {
120
+ // }
121
+ // }
122
+ ngOnInit() {
123
+ this.outFunctionsControl.emit({
124
+ valid: this.checkValid.bind(this),
125
+ setMessageError: this.setMessageError.bind(this),
126
+ resetError: this.resetError.bind(this)
127
+ });
128
+ this.checkValid(true);
129
+ }
130
+ formatSelectedTime(data) {
131
+ const fromData = data.from?.();
132
+ const toData = data.to?.();
133
+ if (this.writeDrownFromKeyboard()) {
134
+ return;
135
+ }
136
+ if (!fromData?.hours && fromData?.hours !== 0 || !fromData?.minute && fromData?.minute !== 0 || (this.multiTime() && (!toData?.hours && toData?.hours !== 0 || !toData?.minute && toData?.minute !== 0))) {
137
+ this.reset(this.multiTime());
138
+ this.isSelected.set(false);
139
+ return;
140
+ }
141
+ if (isNaN(Number(fromData?.hours)) || isNaN(Number(fromData?.minute)) || (this.multiTime() && (isNaN(Number(toData?.minute)) || isNaN(Number(toData?.minute))))) {
142
+ this.reset(this.multiTime());
143
+ this.isSelected.set(false);
144
+ return;
145
+ }
146
+ if (!fromData && !toData) {
147
+ this.reset(this.multiTime());
148
+ this.isSelected.set(false);
149
+ return;
150
+ }
151
+ if (fromData && !isNil(fromData.hours) && !isNil(fromData.minute)) {
152
+ const timeFromCheckValid = CheckTimeDisplay({ hours: fromData.hours, minute: fromData.minute });
153
+ this.hours.set(timeFromCheckValid.hours);
154
+ this.minutes.set(timeFromCheckValid.minutes);
155
+ }
156
+ if (toData && !isNil(toData.hours) && !isNil(toData.minute) && this.multiTime()) {
157
+ const timeToCheckValid = CheckTimeDisplay({ hours: toData.hours, minute: toData.minute });
158
+ this.toHours.set(timeToCheckValid.hours);
159
+ this.toMinutes.set(timeToCheckValid.minutes);
160
+ }
161
+ this.isSelected.set(true);
162
+ }
163
+ handlerFocusAndBlur(event, type) {
164
+ const eventInput = event.event;
165
+ const target = eventInput.target;
166
+ if (event.name === 'focus') {
167
+ this.changeBorderFocus.update(current => {
168
+ current.changeBorder = true;
169
+ current.hoursFocus = true;
170
+ current.minutesFocus = false;
171
+ return current;
172
+ });
173
+ if (!this[type] && this[type] !== 0) {
174
+ this.isZero.set(false);
175
+ }
176
+ return;
177
+ }
178
+ this.changeBorderFocus.update(current => {
179
+ current.hoursFocus = false;
180
+ return current;
181
+ });
182
+ timer(0).pipe().subscribe(() => {
183
+ if (!this.changeBorderFocus().hoursFocus && !this.changeBorderFocus().minutesFocus) {
184
+ this.changeBorderFocus.update(current => {
185
+ current.changeBorder = false;
186
+ return current;
187
+ });
188
+ }
189
+ });
190
+ if (Number(this[type]) === 0) {
191
+ this[type].set('00');
192
+ target.value = this[type]();
193
+ return;
194
+ }
195
+ if (Number(this[type]) && Number(this[type]) <= 2 && Number(this[type]) !== 0) {
196
+ this[type].set(`0${Number(this[type])}`);
197
+ target.value = this[type];
198
+ }
199
+ }
200
+ handlerFocusAndBlurMinutes(event, type) {
201
+ if (event.name === 'focus') {
202
+ this.changeBorderFocus.update(current => {
203
+ current.changeBorder = true;
204
+ current.minutesFocus = true;
205
+ current.hoursFocus = false;
206
+ return current;
207
+ });
208
+ if (!this[type] && this[type] !== 0) {
209
+ this.isZero.set(false);
210
+ }
211
+ return;
212
+ }
213
+ this.changeBorderFocus.update(current => {
214
+ current.minutesFocus = false;
215
+ return current;
216
+ });
217
+ timer(0).pipe().subscribe(() => {
218
+ if (!this.changeBorderFocus().hoursFocus && !this.changeBorderFocus().minutesFocus) {
219
+ this.changeBorderFocus.update(current => {
220
+ current.changeBorder = false;
221
+ return current;
222
+ });
223
+ }
224
+ });
225
+ const eventInput = event.event;
226
+ const target = eventInput.target;
227
+ if (Number(this[type]) === 0) {
228
+ this[type].set('00');
229
+ target.value = this[type];
230
+ return;
231
+ }
232
+ if (Number(this[type]) && Number(this[type]) <= 5 && Number(this[type]) !== 0) {
233
+ this[type].set(`0${Number(this[type])}`);
234
+ target.value = this[type];
235
+ }
236
+ }
237
+ handlerValueHoursChange(data, type) {
238
+ data = data;
239
+ if (data === 0) {
240
+ this.isZero.set(true);
241
+ }
242
+ if (this.isSelected() || Number(this[type]()) === Number(data)) {
243
+ if (data === 0 && !this.keyCodeBackspace() && this[type]() !== '00') {
244
+ this.checkFocus(type);
245
+ }
246
+ return;
247
+ }
248
+ if (data === undefined) {
249
+ this[type].set(data);
250
+ this.isZero.set(false);
251
+ this.applyTime();
252
+ return;
253
+ }
254
+ this[type].set(data);
255
+ if (data === 0) {
256
+ this[type].set('0');
257
+ }
258
+ this.isSelected.set(false);
259
+ this.checkValid(this.ignoreCheckValidWhenInput());
260
+ if (data > 2 && data !== 0 && `${data}`.length < 2) {
261
+ this[type].set(`0${data}`);
262
+ this.checkFocus(type);
263
+ }
264
+ if (`${data}`.length === 2) {
265
+ this.checkFocus(type);
266
+ }
267
+ if (data <= 2 && data > 0 && this.isZero() && `${data}`.length === 1) {
268
+ this[type].set(`0${data}`);
269
+ this.checkFocus(type);
270
+ }
271
+ if (data !== 0) {
272
+ this.isZero.set(false);
273
+ }
274
+ this.applyTime();
275
+ }
276
+ handlerValueMinutesChange(data, type) {
277
+ data = data;
278
+ if (data === 0) {
279
+ this.isZero.set(true);
280
+ }
281
+ if (this.isSelected() || Number(this[type]()) === Number(data)) {
282
+ if (data === 0 && !this.keyCodeBackspace() && this[type]() !== '00') {
283
+ this.checkFocus(type);
284
+ }
285
+ return;
286
+ }
287
+ if (data === undefined) {
288
+ this[type].set(data);
289
+ this.isZero.set(false);
290
+ this.applyTime();
291
+ return;
292
+ }
293
+ this[type].set(data);
294
+ if (data === 0) {
295
+ this[type].set('0');
296
+ }
297
+ this.isSelected.set(false);
298
+ this.checkValid(this.ignoreCheckValidWhenInput());
299
+ if (`${data}`.length === 2) {
300
+ this.checkFocus(type);
301
+ }
302
+ if (data > 5 && `${data}`.length < 2) {
303
+ this[type].set(`0${data}`);
304
+ this.checkFocus(type);
305
+ }
306
+ if (data <= 5 && data > 0 && this.isZero() && `${data}`.length === 1) {
307
+ this[type].set(`0${data}`);
308
+ this.checkFocus(type);
309
+ }
310
+ if (data !== 0) {
311
+ this.isZero.set(false);
312
+ }
313
+ this.applyTime();
314
+ }
315
+ checkFocus(type) {
316
+ if (type === 'toMinutes' || this.keyCodeBackspace()) {
317
+ return;
318
+ }
319
+ switch (type) {
320
+ case 'hours':
321
+ this.focusInput().fromMinutes?.focus();
322
+ break;
323
+ case 'toHours':
324
+ this.focusInput().toMinutes?.focus();
325
+ break;
326
+ case 'minutes':
327
+ if (this.multiTime()) {
328
+ this.focusInput().toHours?.focus();
329
+ }
330
+ break;
331
+ }
332
+ }
333
+ handlerClickButtonLabel(button) {
334
+ this.outClickButtonLabel.emit(button);
335
+ }
336
+ handlerSwitchLabel(toggleEvent) {
337
+ this.outSwitchEventLabel.emit(toggleEvent);
338
+ }
339
+ handlerEventLabelRightLabel() {
340
+ this.outLabelRightClick.emit(true);
341
+ }
342
+ async checkValid(isValidateDefault = false) {
343
+ if (this.disable() || this.readonly()) {
344
+ return true;
345
+ }
346
+ this.isErrorRequired.set(false);
347
+ this.isErrorMultiRequired.set(false);
348
+ this.isErrorMultiValidCompareTime.set(false);
349
+ let valid = true;
350
+ if (!isValidateDefault) {
351
+ if ((isNil(this.hours()) || isNil(this.minutes())) && this.validRequired()) {
352
+ this.isErrorRequired.set(true);
353
+ valid = false;
354
+ }
355
+ if (this.multiTime()) {
356
+ if (this.validRequired() && (isNil(this.toHours()) || isNil(this.toMinutes()))) {
357
+ this.isErrorMultiRequired.set(true);
358
+ valid = false;
359
+ }
360
+ if (this.hours() && this.toHours() && this.minutes() && this.toMinutes() && this.validCompareTime() && this.validCompareTime()?.isCheckErrorTimeEndGreaterTimeStart && (Number(this.hours()) > Number(this.toHours()) ||
361
+ ((Number(this.hours()) === Number(this.toHours())) && (this.ignoreAllowEqualTime() ? (Number(this.minutes()) >= Number(this.toMinutes())) : (Number(this.minutes()) > Number(this.toMinutes())))))) {
362
+ this.isErrorMultiValidCompareTime.set(true);
363
+ valid = false;
364
+ }
365
+ if (this.hours() && this.toHours() && this.minutes() && this.toMinutes() && this.validCompareTime() && this.validCompareTime()?.isCheckErrorTimeDuplicate &&
366
+ (((Number(this.hours()) === Number(this.toHours())) && (Number(this.minutes()) === Number(this.toMinutes()))))) {
367
+ this.isErrorMultiValidCompareTime.set(true);
368
+ valid = false;
369
+ }
370
+ }
371
+ }
372
+ this.outEmitValid.emit({ validRequired: !(this.isErrorMultiRequired() || this.isErrorRequired()), validCompare: !this.isErrorMultiValidCompareTime() });
373
+ return valid;
374
+ }
375
+ emitRealTime() {
376
+ this.outEmitRealTime.emit({ from: signal({ hours: Number(this.hours()), minute: Number(this.minutes()) }), to: signal({ hours: Number(this.toHours()), minute: Number(this.toMinutes()) }) });
377
+ }
378
+ async applyTime() {
379
+ if (this.isEmitRealTime()) {
380
+ this.emitRealTime();
381
+ }
382
+ if (this.cloneDeepTimeOutput() && !CompareTime(this.cloneDeepTimeOutput(), { from: signal({ hours: this.hours(), minute: this.minutes() }), to: signal({ hours: this.toHours(), minute: this.toMinutes() }) })) {
383
+ return;
384
+ }
385
+ this.cloneDeepTimeOutput.set(cloneDeep({ from: signal({ hours: this.hours(), minute: this.minutes() }), to: signal({ hours: this.toHours(), minute: this.toMinutes() }) }));
386
+ if (this.multiTime()) {
387
+ if (this.emitDataSingleDataWhenUseMultiTime()) {
388
+ this.checkValid(this.ignoreCheckValidWhenInput());
389
+ const from = signal({});
390
+ const to = signal({});
391
+ if (!isNil(this.hours()) && !isNil(this.minutes()) && !this.isErrorRequired()) {
392
+ from.set({ hours: Number(this.hours()), minute: Number(this.minutes()) });
393
+ }
394
+ if (!isNil(this.toHours()) && !isNil(this.toMinutes()) && !this.isErrorMultiRequired()) {
395
+ to.set({ hours: Number(this.toHours()), minute: Number(this.toMinutes()) });
396
+ }
397
+ if (this.validCompareTime() && this.isErrorMultiValidCompareTime()) {
398
+ return;
399
+ }
400
+ this.outEmitMultiTime.emit({ from: from, to: to });
401
+ return;
402
+ }
403
+ if (!isNil(this.hours()) && !isNil(this.minutes()) && !isNil(this.toMinutes()) && !isNil(this.toHours()) && await this.checkValid(this.ignoreCheckValidWhenInput())) {
404
+ this.outEmitMultiTime.emit({ from: signal({ hours: Number(this.hours()), minute: Number(this.minutes()) }), to: signal({ hours: Number(this.toHours()), minute: Number(this.toMinutes()) }) });
405
+ return;
406
+ }
407
+ if (isNil(this.hours()) && isNil(this.minutes()) && isNil(this.toMinutes()) && isNil(this.toHours())) {
408
+ this.outEmitMultiTime.emit({ from: signal({ hours: undefined, minute: undefined }), to: signal({ hours: undefined, minute: undefined }) });
409
+ return;
410
+ }
411
+ }
412
+ if (!isNil(this.hours()) && !isNil(this.minutes()) && (await this.checkValid(this.ignoreCheckValidWhenInput()))) {
413
+ this.outEmitSingleTime.emit({ hours: Number(this.hours()), minute: Number(this.minutes()) });
414
+ }
415
+ }
416
+ handlerFocus(event, type) {
417
+ this.focusInput.update(current => {
418
+ current[type] = event;
419
+ return current;
420
+ });
421
+ }
422
+ eventInput(event, type) {
423
+ this.isSelected.set(false);
424
+ this.writeDrownFromKeyboard.set(true);
425
+ if (event.keyCode === 96 && Number(this[type]) === 0) {
426
+ this.isZero.set(true);
427
+ }
428
+ if (event.keyCode !== 8) {
429
+ if (event.keyCode) {
430
+ this.checkBackspaceFocusMinutes.set(1);
431
+ this.checkBackspaceFocusToHours.set(1);
432
+ this.checkBackspaceFocusToMinutes.set(1);
433
+ }
434
+ this.keyCodeBackspace.set(false);
435
+ return;
436
+ }
437
+ this.keyCodeBackspace.set(true);
438
+ switch (type) {
439
+ case 'minutes':
440
+ if (isNil(this.minutes())) {
441
+ if (this.checkBackspaceFocusMinutes() === 1) {
442
+ this.checkBackspaceFocusMinutes.update(current => {
443
+ current = current + 1;
444
+ return current;
445
+ });
446
+ return;
447
+ }
448
+ this.checkBackspaceFocusMinutes.set(1);
449
+ this.focusInput().fromHours?.focus();
450
+ }
451
+ break;
452
+ case 'toHours':
453
+ if (isNil(this.toHours())) {
454
+ if (this.checkBackspaceFocusToHours() === 1) {
455
+ this.checkBackspaceFocusToHours.update(current => {
456
+ current = current + 1;
457
+ return current;
458
+ });
459
+ return;
460
+ }
461
+ this.checkBackspaceFocusToHours.set(1);
462
+ this.focusInput().fromMinutes?.focus();
463
+ }
464
+ break;
465
+ case 'toMinutes':
466
+ if (isNil(this.toMinutes())) {
467
+ if (this.checkBackspaceFocusToMinutes() === 1) {
468
+ this.checkBackspaceFocusToMinutes.update(current => {
469
+ current = current + 1;
470
+ return current;
471
+ });
472
+ return;
473
+ }
474
+ this.checkBackspaceFocusToMinutes.set(1);
475
+ this.focusInput().toHours?.focus();
476
+ }
477
+ break;
478
+ }
479
+ }
480
+ reset(multiTime) {
481
+ this.hours.set(undefined);
482
+ this.minutes.set(undefined);
483
+ if (multiTime) {
484
+ this.toHours.set(undefined);
485
+ this.toMinutes.set(undefined);
486
+ }
487
+ }
488
+ handlerClickClear() {
489
+ this.checkValid(true);
490
+ this.hours.set(undefined);
491
+ this.minutes.set(undefined);
492
+ if (this.multiTime()) {
493
+ this.toHours.set(undefined);
494
+ this.toMinutes.set(undefined);
495
+ }
496
+ this.outResetTime.emit(undefined);
497
+ this.checkValid(this.ignoreCheckValidWhenInput());
498
+ }
499
+ async resetError() {
500
+ this.isErrorRequired.set(false);
501
+ this.isErrorMultiRequired.set(false);
502
+ this.isErrorMultiValidCompareTime.set(false);
503
+ }
504
+ async setMessageError(message) {
505
+ this.otherError.set({ message });
506
+ }
507
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsDatetimeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
508
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsDatetimeInputComponent, isStandalone: true, selector: "libs_ui-components-datetime-input", inputs: { multiTime: { classPropertyName: "multiTime", publicName: "multiTime", isSignal: true, isRequired: false, transformFunction: null }, selectedTime: { classPropertyName: "selectedTime", publicName: "selectedTime", isSignal: true, isRequired: false, transformFunction: null }, classIncludeBetweenTime: { classPropertyName: "classIncludeBetweenTime", publicName: "classIncludeBetweenTime", isSignal: true, isRequired: false, transformFunction: null }, fromAndToDateLabel: { classPropertyName: "fromAndToDateLabel", publicName: "fromAndToDateLabel", isSignal: true, isRequired: false, transformFunction: null }, resetInput: { classPropertyName: "resetInput", publicName: "resetInput", isSignal: true, isRequired: false, transformFunction: null }, disable: { classPropertyName: "disable", publicName: "disable", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, labelConfig: { classPropertyName: "labelConfig", publicName: "labelConfig", isSignal: true, isRequired: false, transformFunction: null }, validRequired: { classPropertyName: "validRequired", publicName: "validRequired", isSignal: true, isRequired: false, transformFunction: null }, validCompareTime: { classPropertyName: "validCompareTime", publicName: "validCompareTime", isSignal: true, isRequired: false, transformFunction: null }, ignoreBorder: { classPropertyName: "ignoreBorder", publicName: "ignoreBorder", isSignal: true, isRequired: false, transformFunction: null }, ignoreMultiIcon: { classPropertyName: "ignoreMultiIcon", publicName: "ignoreMultiIcon", isSignal: true, isRequired: false, transformFunction: null }, ignoreShowValid: { classPropertyName: "ignoreShowValid", publicName: "ignoreShowValid", isSignal: true, isRequired: false, transformFunction: null }, ignoreCheckValidWhenInput: { classPropertyName: "ignoreCheckValidWhenInput", publicName: "ignoreCheckValidWhenInput", isSignal: true, isRequired: false, transformFunction: null }, ignoreAllowEqualTime: { classPropertyName: "ignoreAllowEqualTime", publicName: "ignoreAllowEqualTime", isSignal: true, isRequired: false, transformFunction: null }, emitDataSingleDataWhenUseMultiTime: { classPropertyName: "emitDataSingleDataWhenUseMultiTime", publicName: "emitDataSingleDataWhenUseMultiTime", isSignal: true, isRequired: false, transformFunction: null }, classIncludeInput: { classPropertyName: "classIncludeInput", publicName: "classIncludeInput", isSignal: true, isRequired: false, transformFunction: null }, showBorderError: { classPropertyName: "showBorderError", publicName: "showBorderError", isSignal: true, isRequired: false, transformFunction: null }, defaultHeight: { classPropertyName: "defaultHeight", publicName: "defaultHeight", isSignal: true, isRequired: false, transformFunction: null }, ignoreWithDefault: { classPropertyName: "ignoreWithDefault", publicName: "ignoreWithDefault", isSignal: true, isRequired: false, transformFunction: null }, isEmitRealTime: { classPropertyName: "isEmitRealTime", publicName: "isEmitRealTime", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outEmitSingleTime: "outEmitSingleTime", outEmitMultiTime: "outEmitMultiTime", outClickButtonLabel: "outClickButtonLabel", outSwitchEventLabel: "outSwitchEventLabel", outLabelRightClick: "outLabelRightClick", outFunctionsControl: "outFunctionsControl", outEmitValid: "outEmitValid", outResetTime: "outResetTime", outEmitRealTime: "outEmitRealTime" }, ngImport: i0, template: "@if (labelConfig(); as labelConfig) {\n <libs_ui-components-label [classInclude]=\"labelConfig.classInclude\"\n [labelLeft]=\"labelConfig.labelLeft\"\n [labelLeftClass]=\"labelConfig.labelLeftClass\"\n [required]=\"labelConfig.required \"\n [description]=\"labelConfig.description\"\n [descriptionClass]=\"labelConfig.descriptionClass\"\n [labelRight]=\"labelConfig.labelRight\"\n [labelRightClass]=\"labelConfig.labelRightClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [buttonsLeft]=\"labelConfig.buttonsLeft\"\n [disableButtonsLeft]=\" labelConfig.disableButtonsLeft\"\n [buttonsRight]=\"labelConfig.buttonsRight\"\n [disableButtonsRight]=\" labelConfig.disableButtonsRight\"\n [hasToggle]=\"labelConfig.hasToggle\"\n [toggleActive]=\"labelConfig.toggleActive\"\n [toggleDisable]=\" labelConfig.toggleDisable\"\n [popover]=\"labelConfig.popover\"\n [iconPopoverClass]=\"labelConfig.iconPopoverClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [limitLength]=\"labelConfig.limitLength\"\n [count]=\"labelConfig.count\"\n (outClickButton)=\"handlerClickButtonLabel($event)\"\n (outSwitchEvent)=\"handlerSwitchLabel($event)\"\n (outLabelRightClick)=\"handlerEventLabelRightLabel()\" />\n}\n<div class=\"flex items-baseline\">\n <div class=\" libs-ui-date-time-input {{ classDatePickerInput ? classDatePickerInput : '' }} relative\"\n [class.!w-[123px]]=\"!ignoreWithDefault() && resetInput() && !multiTime()\"\n [class.!w-[155px]]=\"!ignoreWithDefault() && !resetInput() && multiTime()\"\n [class.!w-[99px]]=\"!ignoreWithDefault() && !resetInput() && !multiTime()\"\n [class.!w-[179px]]=\"!ignoreWithDefault() && resetInput() && multiTime()\"\n [class.!bg-[#f8f9fa]]=\"readonly()\"\n [class.libs-ui-border-general]=\"!isErrorRequired() && !isErrorMultiValidCompareTime() && !ignoreBorder()\"\n [class.!border]=\"changeBorderFocus().changeBorder && !ignoreBorder() && !(isErrorRequired() || isErrorMultiValidCompareTime())\"\n [class.!border-[1px]]=\"changeBorderFocus().changeBorder && !ignoreBorder() && !(isErrorRequired() || isErrorMultiValidCompareTime())\"\n [class.!border-[#4e8cf7]]=\"changeBorderFocus().changeBorder && !ignoreBorder() && !(isErrorRequired() || isErrorMultiValidCompareTime())\"\n [class.libs-ui-border-error-general]=\"(isErrorRequired() || isErrorMultiValidCompareTime() || showBorderError()) && !ignoreBorder()\">\n <div class=\"pr-[8px] pl-[16px] h-full flex items-center\">\n <i class=\"libs-ui-icon-clock text-[14px] text-[#9ca2ad]\"\n [class.opacity-0.5]=\"disable()\"></i>\n </div>\n <div class=\"flex items-baseline\">\n <div [class.!w-[16px]]=\"hours()\"\n [class.!w-[18px]]=\"!hours()\">\n <libs_ui-components-inputs-input classInclude=\"!p-0 w-full !border-none text-center text-[#333333] {{ classIncludeInput() }}\"\n [dataType]=\"'int'\"\n [autoAddZeroLessThan10InTypeInt]=\"true\"\n [emitEmptyInDataTypeNumber]=\"true\"\n [disable]=\"disable()\"\n [defaultHeight]=\"defaultHeight()\"\n [readonly]=\"readonly()\"\n [maxValueNumber]=\"23\"\n [minValueNumber]=\"0\"\n [value]=\"hours() || ''\"\n [placeholder]=\"'hh'\"\n [focusTimeOut]=\"0\"\n (outInputEvent)=\"eventInput($event,'hours')\"\n (outChange)=\"handlerValueHoursChange($event, 'hours')\"\n (outFocusAndBlurEvent)=\"handlerFocusAndBlur($event,'hours')\"\n (outFunctionsControl)=\"handlerFocus($event,'fromHours')\"\n [maxLength]=\"2\" />\n </div>\n <div class=\"libs-ui-font-h4r flex items-center \"\n [class.!text-[#9ca2ad]]=\"!hours() && !minutes()\"\n [class.!text-[#071631]]=\"hours() || minutes()\"\n [class.opacity-0.5]=\"disable()\">&colon;</div>\n <div [class.w-[16px]]=\"minutes()\"\n [class.w-[28px]]=\"!minutes()\">\n\n <libs_ui-components-inputs-input classInclude=\"w-full !p-0 !border-none text-center text-[#333333] {{ classIncludeInput() }}\"\n [dataType]=\"'int'\"\n [disable]=\"disable()\"\n [defaultHeight]=\"defaultHeight()\"\n [readonly]=\"readonly()\"\n [placeholder]=\"'mm'\"\n [autoAddZeroLessThan10InTypeInt]=\"true\"\n [emitEmptyInDataTypeNumber]=\"true\"\n [maxValueNumber]=\"59\"\n [focusTimeOut]=\"0\"\n (outInputEvent)=\"eventInput($event,'minutes')\"\n (outFunctionsControl)=\"handlerFocus($event,'fromMinutes')\"\n (outFocusAndBlurEvent)=\"handlerFocusAndBlurMinutes($event,'minutes')\"\n (outChange)=\"handlerValueMinutesChange($event, 'minutes')\"\n [value]=\"minutes() || ''\"\n [maxLength]=\"2\" />\n </div>\n </div>\n @if (multiTime()) {\n <div class=\"ml-[4px] mr-[3px] h-full flex items-center pt-[1px] libs-ui-font-h6r\"\n [class.text-[#9ca2ad]]=\"!hours() && !minutes() && !toHours() && !toMinutes()\"\n [class.text-[#071631]]=\"hours() || minutes() || toHours() || toMinutes()\">\n -\n </div>\n <div class=\"flex items-baseline\">\n <div [class.!w-[16px]]=\"toHours()\"\n [class.!w-[18px]]=\"!toHours()\">\n <libs_ui-components-inputs-input classInclude=\"w-full !p-0 !border-none text-center text-[#333333] {{ classIncludeInput() }}\"\n [dataType]=\"'int'\"\n [disable]=\"disable()\"\n [defaultHeight]=\"defaultHeight()\"\n [readonly]=\"readonly()\"\n [maxValueNumber]=\"23\"\n [minValueNumber]=\"0\"\n [autoAddZeroLessThan10InTypeInt]=\"true\"\n [emitEmptyInDataTypeNumber]=\"true\"\n [value]=\"toHours() || ''\"\n [placeholder]=\"'hh'\"\n [focusTimeOut]=\"0\"\n (outInputEvent)=\"eventInput($event,'toHours')\"\n (outFunctionsControl)=\"handlerFocus($event,'toHours')\"\n (outFocusAndBlurEvent)=\"handlerFocusAndBlur($event,'toHours')\"\n (outChange)=\"handlerValueHoursChange($event, 'toHours')\"\n [maxLength]=\"2\" />\n </div>\n <div class=\"libs-ui-font-h4r flex items-center \"\n [class.!text-[#9ca2ad]]=\"!toHours() && !toMinutes()\"\n [class.!text-[#071631]]=\"toHours() || toMinutes()\"\n [class.opacity-0.5]=\"disable()\">&colon;</div>\n <div [class.!w-[16px]]=\"toMinutes()\"\n [class.!w-[28px]]=\"!toMinutes()\">\n <libs_ui-components-inputs-input classInclude=\"w-full !p-0 !border-none text-center text-[#333333] {{ classIncludeInput() }}\"\n [dataType]=\"'int'\"\n [defaultHeight]=\"defaultHeight()\"\n [disable]=\"disable()\"\n [readonly]=\"readonly()\"\n [placeholder]=\"'mm'\"\n [autoAddZeroLessThan10InTypeInt]=\"true\"\n [emitEmptyInDataTypeNumber]=\"true\"\n [maxValueNumber]=\"59\"\n [focusTimeOut]=\"0\"\n [value]=\"toMinutes() || ''\"\n [maxLength]=\"2\"\n (outInputEvent)=\"eventInput($event,'toMinutes')\"\n (outFunctionsControl)=\"handlerFocus($event,'toMinutes')\"\n (outFocusAndBlurEvent)=\"handlerFocusAndBlurMinutes($event,'toMinutes')\"\n (outChange)=\"handlerValueMinutesChange($event, 'toMinutes')\" />\n </div>\n </div>\n }\n @if (resetInput() && (hours() || minutes()) && !disable() && !readonly()) {\n <div class=\"h-full items-center flex ml-[2px] cursor-pointer absolute right-[10px] top-0\"\n (click)=\"handlerClickClear()\">\n <i class=\"libs-ui-icon-close-circle-solid !before:text-[8px] text-[#cdd0d6]\"></i>\n </div>\n }\n </div>\n</div>\n@if (!ignoreShowValid() && !isErrorMultiValidCompareTime() &&(isErrorMultiRequired() || isErrorRequired()) && !disable() && !readonly()) {\n <div class=\"flex items-center mt-[8px] bottom-0\">\n <span [class]=\"'libs-ui-message-error libs-ui-font-h7r libs-ui-text-error'\"\n [innerHtml]=\"(validRequired()?.message || 'i18n_valid_empty_message')| translate:validRequired()?.interpolateParams\"></span>\n </div>\n}\n@if (!ignoreShowValid() && isErrorMultiValidCompareTime() && !disable() && !readonly()) {\n <div class=\"flex items-center mt-[8px] bottom-0\">\n <span class=\"libs-ui-message-error libs-ui-font-h7r libs-ui-text-error\"\n [innerHtml]=\"(validCompareTime()?.message || 'i18n_invalid_end_date_selected')| translate:validCompareTime()?.interpolateParams\"></span>\n </div>\n}\n\n@if (!ignoreShowValid() && !isErrorMultiValidCompareTime() && !isErrorMultiRequired() && !isErrorRequired() && !disable() && !readonly() && otherError()?.message) {\n <div class=\"flex items-center mt-[8px] bottom-0\">\n <span class=\"libs-ui-message-error libs-ui-font-h7r libs-ui-text-error\"\n [innerHtml]=\"(otherError()?.message || ' ') | translate:otherError()?.interpolateParams\"></span>\n </div>\n}\n", styles: [".libs-ui-date-time-input{display:flex;align-items:center;height:32px;border-radius:4px;background-color:#fff}:host ::ng-deep ::-webkit-input-placeholder{color:#9ca2ad!important;text-indent:0}:host ::ng-deep ::-moz-placeholder{color:#9ca2ad!important;text-indent:0}:host ::ng-deep :-ms-input-placeholder{color:#9ca2ad!important;text-indent:0}:host ::ng-deep :-moz-placeholder{color:#9ca2ad!important;text-indent:0}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "component", type: LibsUiComponentsLabelComponent, selector: "libs_ui-components-label", inputs: ["iconPopoverClass", "classInclude", "labelLeft", "labelLeftClass", "labelLeftBehindToggleButton", "popover", "required", "buttonsLeft", "disableButtonsLeft", "buttonsRight", "disableButtonsRight", "labelRight", "labelRightClass", "labelRightRequired", "hasToggle", "toggleSize", "toggleActive", "toggleDisable", "description", "descriptionClass", "buttonsDescription", "disableButtonsDescription", "buttonsDescriptionContainerClass", "onlyShowCount", "zIndexPopover", "timerDestroyPopover", "count", "limitLength"], outputs: ["outClickButton", "outSwitchEvent", "outLabelRightClick", "outLabelLeftClick"] }, { kind: "component", type: LibsUiComponentsInputsInputComponent, selector: "libs_ui-components-inputs-input", inputs: ["tagInput", "dataType", "tabInsertContentTagInput", "textAreaEnterNotNewLine", "emitEmptyInDataTypeNumber", "keepZeroInTypeInt", "autoAddZeroLessThan10InTypeInt", "ignoreBlockInputMaxValue", "hiddenContent", "maxValueNumber", "minValueNumber", "fixedFloat", "acceptNegativeValue", "valueUpDownNumber", "classInclude", "maxLength", "readonly", "disable", "noBorder", "backgroundNone", "borderError", "useColorModeExist", "placeholder", "keepPlaceholderOnly", "value", "autoRemoveEmoji", "defaultHeight", "minHeightTextArea", "maxHeightTextArea", "focusTimeOut", "blurTimeOut", "zIndexPopoverContent", "classContainerInput", "showCount", "ignoreStopPropagationEvent", "resize", "templateLeftBottomInput", "templateRightBottomInput", "classContainerBottomInput", "ignoreWidthInput100", "iconLeftClass", "popoverContentIconLeft", "iconRightClass", "popoverContentIconRight", "resetAutoCompletePassword", "acceptOnlyClickIcon", "setIconRightColorSameColorDisableReadOnly", "onlyAcceptNegativeValue", "maxLengthNumberCount", "focusInput"], outputs: ["maxValueNumberChange", "minValueNumberChange", "fixedFloatChange", "acceptNegativeValueChange", "maxLengthChange", "valueChange", "maxLengthNumberCountChange", "outHeightAreaChange", "outChange", "outFocusAndBlurEvent", "outEnterEvent", "outInputEvent", "outIconLeft", "outIconRight", "outFunctionsControl", "outFilesDrop", "outFileDrop", "outChangeValueByButtonUpDown"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8
509
  }
9
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatetimeInputComponent, decorators: [{
510
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsDatetimeInputComponent, decorators: [{
10
511
  type: Component,
11
- args: [{ selector: 'lib-datetime-input', standalone: true, imports: [CommonModule], template: "<p>datetime-input works!</p>\n" }]
12
- }] });
512
+ args: [{ selector: 'libs_ui-components-datetime-input', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
513
+ TranslateModule,
514
+ LibsUiComponentsLabelComponent,
515
+ LibsUiComponentsInputsInputComponent
516
+ ], template: "@if (labelConfig(); as labelConfig) {\n <libs_ui-components-label [classInclude]=\"labelConfig.classInclude\"\n [labelLeft]=\"labelConfig.labelLeft\"\n [labelLeftClass]=\"labelConfig.labelLeftClass\"\n [required]=\"labelConfig.required \"\n [description]=\"labelConfig.description\"\n [descriptionClass]=\"labelConfig.descriptionClass\"\n [labelRight]=\"labelConfig.labelRight\"\n [labelRightClass]=\"labelConfig.labelRightClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [buttonsLeft]=\"labelConfig.buttonsLeft\"\n [disableButtonsLeft]=\" labelConfig.disableButtonsLeft\"\n [buttonsRight]=\"labelConfig.buttonsRight\"\n [disableButtonsRight]=\" labelConfig.disableButtonsRight\"\n [hasToggle]=\"labelConfig.hasToggle\"\n [toggleActive]=\"labelConfig.toggleActive\"\n [toggleDisable]=\" labelConfig.toggleDisable\"\n [popover]=\"labelConfig.popover\"\n [iconPopoverClass]=\"labelConfig.iconPopoverClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [limitLength]=\"labelConfig.limitLength\"\n [count]=\"labelConfig.count\"\n (outClickButton)=\"handlerClickButtonLabel($event)\"\n (outSwitchEvent)=\"handlerSwitchLabel($event)\"\n (outLabelRightClick)=\"handlerEventLabelRightLabel()\" />\n}\n<div class=\"flex items-baseline\">\n <div class=\" libs-ui-date-time-input {{ classDatePickerInput ? classDatePickerInput : '' }} relative\"\n [class.!w-[123px]]=\"!ignoreWithDefault() && resetInput() && !multiTime()\"\n [class.!w-[155px]]=\"!ignoreWithDefault() && !resetInput() && multiTime()\"\n [class.!w-[99px]]=\"!ignoreWithDefault() && !resetInput() && !multiTime()\"\n [class.!w-[179px]]=\"!ignoreWithDefault() && resetInput() && multiTime()\"\n [class.!bg-[#f8f9fa]]=\"readonly()\"\n [class.libs-ui-border-general]=\"!isErrorRequired() && !isErrorMultiValidCompareTime() && !ignoreBorder()\"\n [class.!border]=\"changeBorderFocus().changeBorder && !ignoreBorder() && !(isErrorRequired() || isErrorMultiValidCompareTime())\"\n [class.!border-[1px]]=\"changeBorderFocus().changeBorder && !ignoreBorder() && !(isErrorRequired() || isErrorMultiValidCompareTime())\"\n [class.!border-[#4e8cf7]]=\"changeBorderFocus().changeBorder && !ignoreBorder() && !(isErrorRequired() || isErrorMultiValidCompareTime())\"\n [class.libs-ui-border-error-general]=\"(isErrorRequired() || isErrorMultiValidCompareTime() || showBorderError()) && !ignoreBorder()\">\n <div class=\"pr-[8px] pl-[16px] h-full flex items-center\">\n <i class=\"libs-ui-icon-clock text-[14px] text-[#9ca2ad]\"\n [class.opacity-0.5]=\"disable()\"></i>\n </div>\n <div class=\"flex items-baseline\">\n <div [class.!w-[16px]]=\"hours()\"\n [class.!w-[18px]]=\"!hours()\">\n <libs_ui-components-inputs-input classInclude=\"!p-0 w-full !border-none text-center text-[#333333] {{ classIncludeInput() }}\"\n [dataType]=\"'int'\"\n [autoAddZeroLessThan10InTypeInt]=\"true\"\n [emitEmptyInDataTypeNumber]=\"true\"\n [disable]=\"disable()\"\n [defaultHeight]=\"defaultHeight()\"\n [readonly]=\"readonly()\"\n [maxValueNumber]=\"23\"\n [minValueNumber]=\"0\"\n [value]=\"hours() || ''\"\n [placeholder]=\"'hh'\"\n [focusTimeOut]=\"0\"\n (outInputEvent)=\"eventInput($event,'hours')\"\n (outChange)=\"handlerValueHoursChange($event, 'hours')\"\n (outFocusAndBlurEvent)=\"handlerFocusAndBlur($event,'hours')\"\n (outFunctionsControl)=\"handlerFocus($event,'fromHours')\"\n [maxLength]=\"2\" />\n </div>\n <div class=\"libs-ui-font-h4r flex items-center \"\n [class.!text-[#9ca2ad]]=\"!hours() && !minutes()\"\n [class.!text-[#071631]]=\"hours() || minutes()\"\n [class.opacity-0.5]=\"disable()\">&colon;</div>\n <div [class.w-[16px]]=\"minutes()\"\n [class.w-[28px]]=\"!minutes()\">\n\n <libs_ui-components-inputs-input classInclude=\"w-full !p-0 !border-none text-center text-[#333333] {{ classIncludeInput() }}\"\n [dataType]=\"'int'\"\n [disable]=\"disable()\"\n [defaultHeight]=\"defaultHeight()\"\n [readonly]=\"readonly()\"\n [placeholder]=\"'mm'\"\n [autoAddZeroLessThan10InTypeInt]=\"true\"\n [emitEmptyInDataTypeNumber]=\"true\"\n [maxValueNumber]=\"59\"\n [focusTimeOut]=\"0\"\n (outInputEvent)=\"eventInput($event,'minutes')\"\n (outFunctionsControl)=\"handlerFocus($event,'fromMinutes')\"\n (outFocusAndBlurEvent)=\"handlerFocusAndBlurMinutes($event,'minutes')\"\n (outChange)=\"handlerValueMinutesChange($event, 'minutes')\"\n [value]=\"minutes() || ''\"\n [maxLength]=\"2\" />\n </div>\n </div>\n @if (multiTime()) {\n <div class=\"ml-[4px] mr-[3px] h-full flex items-center pt-[1px] libs-ui-font-h6r\"\n [class.text-[#9ca2ad]]=\"!hours() && !minutes() && !toHours() && !toMinutes()\"\n [class.text-[#071631]]=\"hours() || minutes() || toHours() || toMinutes()\">\n -\n </div>\n <div class=\"flex items-baseline\">\n <div [class.!w-[16px]]=\"toHours()\"\n [class.!w-[18px]]=\"!toHours()\">\n <libs_ui-components-inputs-input classInclude=\"w-full !p-0 !border-none text-center text-[#333333] {{ classIncludeInput() }}\"\n [dataType]=\"'int'\"\n [disable]=\"disable()\"\n [defaultHeight]=\"defaultHeight()\"\n [readonly]=\"readonly()\"\n [maxValueNumber]=\"23\"\n [minValueNumber]=\"0\"\n [autoAddZeroLessThan10InTypeInt]=\"true\"\n [emitEmptyInDataTypeNumber]=\"true\"\n [value]=\"toHours() || ''\"\n [placeholder]=\"'hh'\"\n [focusTimeOut]=\"0\"\n (outInputEvent)=\"eventInput($event,'toHours')\"\n (outFunctionsControl)=\"handlerFocus($event,'toHours')\"\n (outFocusAndBlurEvent)=\"handlerFocusAndBlur($event,'toHours')\"\n (outChange)=\"handlerValueHoursChange($event, 'toHours')\"\n [maxLength]=\"2\" />\n </div>\n <div class=\"libs-ui-font-h4r flex items-center \"\n [class.!text-[#9ca2ad]]=\"!toHours() && !toMinutes()\"\n [class.!text-[#071631]]=\"toHours() || toMinutes()\"\n [class.opacity-0.5]=\"disable()\">&colon;</div>\n <div [class.!w-[16px]]=\"toMinutes()\"\n [class.!w-[28px]]=\"!toMinutes()\">\n <libs_ui-components-inputs-input classInclude=\"w-full !p-0 !border-none text-center text-[#333333] {{ classIncludeInput() }}\"\n [dataType]=\"'int'\"\n [defaultHeight]=\"defaultHeight()\"\n [disable]=\"disable()\"\n [readonly]=\"readonly()\"\n [placeholder]=\"'mm'\"\n [autoAddZeroLessThan10InTypeInt]=\"true\"\n [emitEmptyInDataTypeNumber]=\"true\"\n [maxValueNumber]=\"59\"\n [focusTimeOut]=\"0\"\n [value]=\"toMinutes() || ''\"\n [maxLength]=\"2\"\n (outInputEvent)=\"eventInput($event,'toMinutes')\"\n (outFunctionsControl)=\"handlerFocus($event,'toMinutes')\"\n (outFocusAndBlurEvent)=\"handlerFocusAndBlurMinutes($event,'toMinutes')\"\n (outChange)=\"handlerValueMinutesChange($event, 'toMinutes')\" />\n </div>\n </div>\n }\n @if (resetInput() && (hours() || minutes()) && !disable() && !readonly()) {\n <div class=\"h-full items-center flex ml-[2px] cursor-pointer absolute right-[10px] top-0\"\n (click)=\"handlerClickClear()\">\n <i class=\"libs-ui-icon-close-circle-solid !before:text-[8px] text-[#cdd0d6]\"></i>\n </div>\n }\n </div>\n</div>\n@if (!ignoreShowValid() && !isErrorMultiValidCompareTime() &&(isErrorMultiRequired() || isErrorRequired()) && !disable() && !readonly()) {\n <div class=\"flex items-center mt-[8px] bottom-0\">\n <span [class]=\"'libs-ui-message-error libs-ui-font-h7r libs-ui-text-error'\"\n [innerHtml]=\"(validRequired()?.message || 'i18n_valid_empty_message')| translate:validRequired()?.interpolateParams\"></span>\n </div>\n}\n@if (!ignoreShowValid() && isErrorMultiValidCompareTime() && !disable() && !readonly()) {\n <div class=\"flex items-center mt-[8px] bottom-0\">\n <span class=\"libs-ui-message-error libs-ui-font-h7r libs-ui-text-error\"\n [innerHtml]=\"(validCompareTime()?.message || 'i18n_invalid_end_date_selected')| translate:validCompareTime()?.interpolateParams\"></span>\n </div>\n}\n\n@if (!ignoreShowValid() && !isErrorMultiValidCompareTime() && !isErrorMultiRequired() && !isErrorRequired() && !disable() && !readonly() && otherError()?.message) {\n <div class=\"flex items-center mt-[8px] bottom-0\">\n <span class=\"libs-ui-message-error libs-ui-font-h7r libs-ui-text-error\"\n [innerHtml]=\"(otherError()?.message || ' ') | translate:otherError()?.interpolateParams\"></span>\n </div>\n}\n", styles: [".libs-ui-date-time-input{display:flex;align-items:center;height:32px;border-radius:4px;background-color:#fff}:host ::ng-deep ::-webkit-input-placeholder{color:#9ca2ad!important;text-indent:0}:host ::ng-deep ::-moz-placeholder{color:#9ca2ad!important;text-indent:0}:host ::ng-deep :-ms-input-placeholder{color:#9ca2ad!important;text-indent:0}:host ::ng-deep :-moz-placeholder{color:#9ca2ad!important;text-indent:0}\n"] }]
517
+ }], ctorParameters: () => [] });
13
518
 
14
519
  /**
15
520
  * Generated bundle index. Do not edit.
16
521
  */
17
522
 
18
- export { DatetimeInputComponent };
523
+ export { LibsUiComponentsDatetimeInputComponent };
19
524
  //# sourceMappingURL=libs-ui-components-datetime-input.mjs.map