@libs-ui/components-datetime-input 0.2.304 → 0.2.306-10
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/defines/input.define.d.ts +1 -1
- package/esm2022/defines/input.define.mjs +1 -1
- package/esm2022/index.mjs +1 -1
- package/esm2022/input.component.mjs +75 -58
- package/esm2022/interfaces/function-control-event.interface.mjs +1 -1
- package/esm2022/interfaces/index.mjs +1 -1
- package/esm2022/interfaces/input.interface.mjs +1 -1
- package/esm2022/interfaces/valid.interface.mjs +1 -1
- package/fesm2022/libs-ui-components-datetime-input.mjs +74 -57
- package/fesm2022/libs-ui-components-datetime-input.mjs.map +1 -1
- package/input.component.d.ts +14 -12
- package/interfaces/function-control-event.interface.d.ts +1 -1
- package/interfaces/input.interface.d.ts +1 -1
- package/interfaces/valid.interface.d.ts +1 -1
- package/package.json +8 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb24tY29udHJvbC1ldmVudC5pbnRlcmZhY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvZGF0ZXRpbWUvaW5wdXQvc3JjL2ludGVyZmFjZXMvZnVuY3Rpb24tY29udHJvbC1ldmVudC5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IElJbnB1dEZ1bmN0aW9uQ29udHJvbEV2ZW50IH0gZnJvbSAnQGxpYnMtdWkvY29tcG9uZW50cy1pbnB1dHMtaW5wdXQnO1xuXG5leHBvcnQgaW50ZXJmYWNlIElNdWx0aUZ1bmN0aW9uRGF0ZUlucHV0Q29udHJvbEV2ZW50IHtcbiAgZnJvbUhvdXJzPzogSUlucHV0RnVuY3Rpb25Db250cm9sRXZlbnQ7XG4gIHRvSG91cnM/OiBJSW5wdXRGdW5jdGlvbkNvbnRyb2xFdmVudDtcbiAgZnJvbU1pbnV0ZXM/OiBJSW5wdXRGdW5jdGlvbkNvbnRyb2xFdmVudDtcbiAgdG9NaW51dGVzPzogSUlucHV0RnVuY3Rpb25Db250cm9sRXZlbnQ7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgSURhdGVUaW1lSW5wdXRGdW5jdGlvbkNvbnRyb2xFdmVudCB7XG4gIGNoZWNrSXNWYWxpZDogKCkgPT4gUHJvbWlzZTxib29sZWFuPjtcbiAgcmVzZXRFcnJvcjogKHJlc2V0QWxsPzogYm9vbGVhbikgPT4gUHJvbWlzZTx2b2lkPjtcbiAgc2V0TWVzc2FnZUVycm9yOiAobWVzc2FnZTogc3RyaW5nIHwgdW5kZWZpbmVkKSA9PiBQcm9taXNlPHZvaWQ+O1xufVxuIl19
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * from './input.interface';
|
|
2
2
|
export * from './function-control-event.interface';
|
|
3
3
|
export * from './valid.interface';
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvZGF0ZXRpbWUvaW5wdXQvc3JjL2ludGVyZmFjZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLG9DQUFvQyxDQUFDO0FBQ25ELGNBQWMsbUJBQW1CLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2lucHV0LmludGVyZmFjZSc7XG5leHBvcnQgKiBmcm9tICcuL2Z1bmN0aW9uLWNvbnRyb2wtZXZlbnQuaW50ZXJmYWNlJztcbmV4cG9ydCAqIGZyb20gJy4vdmFsaWQuaW50ZXJmYWNlJztcbiJdfQ==
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQuaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy11aS9jb21wb25lbnRzL2RhdGV0aW1lL2lucHV0L3NyYy9pbnRlcmZhY2VzL2lucHV0LmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgV3JpdGFibGVTaWduYWwgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuZXhwb3J0IGludGVyZmFjZSBJQ2hhbmdlRm9jdXNJbnB1dCB7XG4gIGhvdXJzRm9jdXM/OiBib29sZWFuO1xuICBtaW51dGVzRm9jdXM/OiBib29sZWFuO1xuICBjaGFuZ2VCb3JkZXI/OiBib29sZWFuO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIElTZWxlY3RlZE11bHRpVGltZSB7XG4gIGZyb20/OiBXcml0YWJsZVNpZ25hbDxJU2VsZWN0ZWRUaW1lSW5wdXQ+O1xuICB0bz86IFdyaXRhYmxlU2lnbmFsPElTZWxlY3RlZFRpbWVJbnB1dD47XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgSVNlbGVjdGVkVGltZUlucHV0IHtcbiAgaG91cnM/OiBzdHJpbmcgfCBudW1iZXI7XG4gIG1pbnV0ZT86IHN0cmluZyB8IG51bWJlcjtcbn1cbiJdfQ==
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWQuaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy11aS9jb21wb25lbnRzL2RhdGV0aW1lL2lucHV0L3NyYy9pbnRlcmZhY2VzL3ZhbGlkLmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSU1lc3NhZ2VUcmFuc2xhdGUgfSBmcm9tICdAbGlicy11aS9pbnRlcmZhY2VzLXR5cGVzJztcbmV4cG9ydCBpbnRlcmZhY2UgSVZhbGlkQ29tcGFyZSBleHRlbmRzIElNZXNzYWdlVHJhbnNsYXRlIHtcbiAgaXNDaGVja0Vycm9yVGltZUVuZEdyZWF0ZXJUaW1lU3RhcnQ/OiBib29sZWFuO1xuICBpc0NoZWNrRXJyb3JUaW1lRHVwbGljYXRlPzogYm9vbGVhbjtcbn1cbiJdfQ==
|
|
@@ -120,12 +120,15 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
120
120
|
// }
|
|
121
121
|
// }
|
|
122
122
|
ngOnInit() {
|
|
123
|
-
this.outFunctionsControl.emit(
|
|
123
|
+
this.outFunctionsControl.emit(this.FunctionsControl);
|
|
124
|
+
this.checkValid(true);
|
|
125
|
+
}
|
|
126
|
+
get FunctionsControl() {
|
|
127
|
+
return {
|
|
124
128
|
checkIsValid: this.checkValid.bind(this),
|
|
125
129
|
setMessageError: this.setMessageError.bind(this),
|
|
126
|
-
resetError: this.resetError.bind(this)
|
|
127
|
-
}
|
|
128
|
-
this.checkValid(true);
|
|
130
|
+
resetError: this.resetError.bind(this),
|
|
131
|
+
};
|
|
129
132
|
}
|
|
130
133
|
formatSelectedTime(data) {
|
|
131
134
|
const fromData = data.from?.();
|
|
@@ -133,7 +136,7 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
133
136
|
if (this.writeDrownFromKeyboard()) {
|
|
134
137
|
return;
|
|
135
138
|
}
|
|
136
|
-
if (!fromData?.hours && fromData?.hours !== 0 || !fromData?.minute && fromData?.minute !== 0 || (this.multiTime() && (!toData?.hours && toData?.hours !== 0 || !toData?.minute && toData?.minute !== 0))) {
|
|
139
|
+
if ((!fromData?.hours && fromData?.hours !== 0) || (!fromData?.minute && fromData?.minute !== 0) || (this.multiTime() && ((!toData?.hours && toData?.hours !== 0) || (!toData?.minute && toData?.minute !== 0)))) {
|
|
137
140
|
this.reset(this.multiTime());
|
|
138
141
|
this.isSelected.set(false);
|
|
139
142
|
return;
|
|
@@ -164,59 +167,63 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
164
167
|
const eventInput = event.event;
|
|
165
168
|
const target = eventInput.target;
|
|
166
169
|
if (event.name === 'focus') {
|
|
167
|
-
this.changeBorderFocus.update(current => {
|
|
170
|
+
this.changeBorderFocus.update((current) => {
|
|
168
171
|
current.changeBorder = true;
|
|
169
172
|
current.hoursFocus = true;
|
|
170
173
|
current.minutesFocus = false;
|
|
171
174
|
return current;
|
|
172
175
|
});
|
|
173
|
-
if (!get(this, type) && get(this, type) !== 0) {
|
|
176
|
+
if (!get(this.getInstance(), type) && get(this.getInstance(), type) !== 0) {
|
|
174
177
|
this.isZero.set(false);
|
|
175
178
|
}
|
|
176
179
|
return;
|
|
177
180
|
}
|
|
178
|
-
this.changeBorderFocus.update(current => {
|
|
181
|
+
this.changeBorderFocus.update((current) => {
|
|
179
182
|
current.hoursFocus = false;
|
|
180
183
|
return current;
|
|
181
184
|
});
|
|
182
|
-
timer(0)
|
|
185
|
+
timer(0)
|
|
186
|
+
.pipe()
|
|
187
|
+
.subscribe(() => {
|
|
183
188
|
if (!this.changeBorderFocus().hoursFocus && !this.changeBorderFocus().minutesFocus) {
|
|
184
|
-
this.changeBorderFocus.update(current => {
|
|
189
|
+
this.changeBorderFocus.update((current) => {
|
|
185
190
|
current.changeBorder = false;
|
|
186
191
|
return current;
|
|
187
192
|
});
|
|
188
193
|
}
|
|
189
194
|
});
|
|
190
|
-
if (Number(get(this, type)) === 0) {
|
|
191
|
-
get(this, type, undefined, true).set('00');
|
|
192
|
-
target.value = get(this, type);
|
|
195
|
+
if (Number(get(this.getInstance(), type)) === 0) {
|
|
196
|
+
get(this.getInstance(), type, undefined, true).set('00');
|
|
197
|
+
target.value = get(this.getInstance(), type);
|
|
193
198
|
return;
|
|
194
199
|
}
|
|
195
|
-
if (Number(get(this, type)) && Number(get(this, type)) <= 2 && Number(get(this, type)) !== 0) {
|
|
196
|
-
get(this, type, undefined, true).set(`0${Number(get(this, type))}`);
|
|
197
|
-
target.value = get(this, type);
|
|
200
|
+
if (Number(get(this.getInstance(), type)) && Number(get(this.getInstance(), type)) <= 2 && Number(get(this.getInstance(), type)) !== 0) {
|
|
201
|
+
get(this.getInstance(), type, undefined, true).set(`0${Number(get(this.getInstance(), type))}`);
|
|
202
|
+
target.value = get(this.getInstance(), type);
|
|
198
203
|
}
|
|
199
204
|
}
|
|
200
205
|
handlerFocusAndBlurMinutes(event, type) {
|
|
201
206
|
if (event.name === 'focus') {
|
|
202
|
-
this.changeBorderFocus.update(current => {
|
|
207
|
+
this.changeBorderFocus.update((current) => {
|
|
203
208
|
current.changeBorder = true;
|
|
204
209
|
current.minutesFocus = true;
|
|
205
210
|
current.hoursFocus = false;
|
|
206
211
|
return current;
|
|
207
212
|
});
|
|
208
|
-
if (!get(this, type) && get(this, type) !== 0) {
|
|
213
|
+
if (!get(this.getInstance(), type) && get(this.getInstance(), type) !== 0) {
|
|
209
214
|
this.isZero.set(false);
|
|
210
215
|
}
|
|
211
216
|
return;
|
|
212
217
|
}
|
|
213
|
-
this.changeBorderFocus.update(current => {
|
|
218
|
+
this.changeBorderFocus.update((current) => {
|
|
214
219
|
current.minutesFocus = false;
|
|
215
220
|
return current;
|
|
216
221
|
});
|
|
217
|
-
timer(0)
|
|
222
|
+
timer(0)
|
|
223
|
+
.pipe()
|
|
224
|
+
.subscribe(() => {
|
|
218
225
|
if (!this.changeBorderFocus().hoursFocus && !this.changeBorderFocus().minutesFocus) {
|
|
219
|
-
this.changeBorderFocus.update(current => {
|
|
226
|
+
this.changeBorderFocus.update((current) => {
|
|
220
227
|
current.changeBorder = false;
|
|
221
228
|
return current;
|
|
222
229
|
});
|
|
@@ -224,14 +231,14 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
224
231
|
});
|
|
225
232
|
const eventInput = event.event;
|
|
226
233
|
const target = eventInput.target;
|
|
227
|
-
if (Number(get(this, type)) === 0) {
|
|
228
|
-
get(this, type, undefined, true).set('00');
|
|
229
|
-
target.value = get(this, type);
|
|
234
|
+
if (Number(get(this.getInstance(), type)) === 0) {
|
|
235
|
+
get(this.getInstance(), type, undefined, true).set('00');
|
|
236
|
+
target.value = get(this.getInstance(), type);
|
|
230
237
|
return;
|
|
231
238
|
}
|
|
232
|
-
if (Number(get(this, type)) && Number(get(this, type)) <= 5 && Number(get(this, type)) !== 0) {
|
|
233
|
-
get(this, type, undefined, true).set(`0${Number(get(this, type))}`);
|
|
234
|
-
target.value = get(this, type);
|
|
239
|
+
if (Number(get(this.getInstance(), type)) && Number(get(this.getInstance(), type)) <= 5 && Number(get(this.getInstance(), type)) !== 0) {
|
|
240
|
+
get(this.getInstance(), type, undefined, true).set(`0${Number(get(this.getInstance(), type))}`);
|
|
241
|
+
target.value = get(this.getInstance(), type);
|
|
235
242
|
}
|
|
236
243
|
}
|
|
237
244
|
handlerValueHoursChange(data, type) {
|
|
@@ -239,33 +246,33 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
239
246
|
if (data === 0) {
|
|
240
247
|
this.isZero.set(true);
|
|
241
248
|
}
|
|
242
|
-
if (this.isSelected() || Number(get(this, type)) === Number(data)) {
|
|
243
|
-
if (data === 0 && !this.keyCodeBackspace() && get(this, type) !== '00') {
|
|
249
|
+
if (this.isSelected() || Number(get(this.getInstance(), type)) === Number(data)) {
|
|
250
|
+
if (data === 0 && !this.keyCodeBackspace() && get(this.getInstance(), type) !== '00') {
|
|
244
251
|
this.checkFocus(type);
|
|
245
252
|
}
|
|
246
253
|
return;
|
|
247
254
|
}
|
|
248
255
|
if (data === undefined) {
|
|
249
|
-
get(this, type, undefined, true).set(data);
|
|
256
|
+
get(this.getInstance(), type, undefined, true).set(data);
|
|
250
257
|
this.isZero.set(false);
|
|
251
258
|
this.applyTime();
|
|
252
259
|
return;
|
|
253
260
|
}
|
|
254
|
-
get(this, type, undefined, true).set(data);
|
|
261
|
+
get(this.getInstance(), type, undefined, true).set(data);
|
|
255
262
|
if (data === 0) {
|
|
256
|
-
get(this, type, undefined, true).set('0');
|
|
263
|
+
get(this.getInstance(), type, undefined, true).set('0');
|
|
257
264
|
}
|
|
258
265
|
this.isSelected.set(false);
|
|
259
266
|
this.checkValid(this.ignoreCheckValidWhenInput());
|
|
260
267
|
if (data > 2 && data !== 0 && `${data}`.length < 2) {
|
|
261
|
-
get(this, type, undefined, true).set(`0${data}`);
|
|
268
|
+
get(this.getInstance(), type, undefined, true).set(`0${data}`);
|
|
262
269
|
this.checkFocus(type);
|
|
263
270
|
}
|
|
264
271
|
if (`${data}`.length === 2) {
|
|
265
272
|
this.checkFocus(type);
|
|
266
273
|
}
|
|
267
274
|
if (data <= 2 && data > 0 && this.isZero() && `${data}`.length === 1) {
|
|
268
|
-
get(this, type, undefined, true).set(`0${data}`);
|
|
275
|
+
get(this.getInstance(), type, undefined, true).set(`0${data}`);
|
|
269
276
|
this.checkFocus(type);
|
|
270
277
|
}
|
|
271
278
|
if (data !== 0) {
|
|
@@ -278,21 +285,21 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
278
285
|
if (data === 0) {
|
|
279
286
|
this.isZero.set(true);
|
|
280
287
|
}
|
|
281
|
-
if (this.isSelected() || Number(get(this, type)) === Number(data)) {
|
|
282
|
-
if (data === 0 && !this.keyCodeBackspace() && get(this, type) !== '00') {
|
|
288
|
+
if (this.isSelected() || Number(get(this.getInstance(), type)) === Number(data)) {
|
|
289
|
+
if (data === 0 && !this.keyCodeBackspace() && get(this.getInstance(), type) !== '00') {
|
|
283
290
|
this.checkFocus(type);
|
|
284
291
|
}
|
|
285
292
|
return;
|
|
286
293
|
}
|
|
287
294
|
if (data === undefined) {
|
|
288
|
-
get(this, type, undefined, true).set(data);
|
|
295
|
+
get(this.getInstance(), type, undefined, true).set(data);
|
|
289
296
|
this.isZero.set(false);
|
|
290
297
|
this.applyTime();
|
|
291
298
|
return;
|
|
292
299
|
}
|
|
293
|
-
get(this, type, undefined, true).set(data);
|
|
300
|
+
get(this.getInstance(), type, undefined, true).set(data);
|
|
294
301
|
if (data === 0) {
|
|
295
|
-
get(this, type, undefined, true).set('0');
|
|
302
|
+
get(this.getInstance(), type, undefined, true).set('0');
|
|
296
303
|
}
|
|
297
304
|
this.isSelected.set(false);
|
|
298
305
|
this.checkValid(this.ignoreCheckValidWhenInput());
|
|
@@ -300,11 +307,11 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
300
307
|
this.checkFocus(type);
|
|
301
308
|
}
|
|
302
309
|
if (data > 5 && `${data}`.length < 2) {
|
|
303
|
-
get(this, type, undefined, true).set(`0${data}`);
|
|
310
|
+
get(this.getInstance(), type, undefined, true).set(`0${data}`);
|
|
304
311
|
this.checkFocus(type);
|
|
305
312
|
}
|
|
306
313
|
if (data <= 5 && data > 0 && this.isZero() && `${data}`.length === 1) {
|
|
307
|
-
get(this, type, undefined, true).set(`0${data}`);
|
|
314
|
+
get(this.getInstance(), type, undefined, true).set(`0${data}`);
|
|
308
315
|
this.checkFocus(type);
|
|
309
316
|
}
|
|
310
317
|
if (data !== 0) {
|
|
@@ -357,13 +364,24 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
357
364
|
this.isErrorMultiRequired.set(true);
|
|
358
365
|
valid = false;
|
|
359
366
|
}
|
|
360
|
-
if (this.hours() &&
|
|
361
|
-
|
|
367
|
+
if (this.hours() &&
|
|
368
|
+
this.toHours() &&
|
|
369
|
+
this.minutes() &&
|
|
370
|
+
this.toMinutes() &&
|
|
371
|
+
this.validCompareTime() &&
|
|
372
|
+
this.validCompareTime()?.isCheckErrorTimeEndGreaterTimeStart &&
|
|
373
|
+
(Number(this.hours()) > Number(this.toHours()) || (Number(this.hours()) === Number(this.toHours()) && (this.ignoreAllowEqualTime() ? Number(this.minutes()) >= Number(this.toMinutes()) : Number(this.minutes()) > Number(this.toMinutes()))))) {
|
|
362
374
|
this.isErrorMultiValidCompareTime.set(true);
|
|
363
375
|
valid = false;
|
|
364
376
|
}
|
|
365
|
-
if (this.hours() &&
|
|
366
|
-
|
|
377
|
+
if (this.hours() &&
|
|
378
|
+
this.toHours() &&
|
|
379
|
+
this.minutes() &&
|
|
380
|
+
this.toMinutes() &&
|
|
381
|
+
this.validCompareTime() &&
|
|
382
|
+
this.validCompareTime()?.isCheckErrorTimeDuplicate &&
|
|
383
|
+
Number(this.hours()) === Number(this.toHours()) &&
|
|
384
|
+
Number(this.minutes()) === Number(this.toMinutes())) {
|
|
367
385
|
this.isErrorMultiValidCompareTime.set(true);
|
|
368
386
|
valid = false;
|
|
369
387
|
}
|
|
@@ -400,7 +418,7 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
400
418
|
this.outEmitMultiTime.emit({ from: from, to: to });
|
|
401
419
|
return;
|
|
402
420
|
}
|
|
403
|
-
if (!isNil(this.hours()) && !isNil(this.minutes()) && !isNil(this.toMinutes()) && !isNil(this.toHours()) && await this.checkValid(this.ignoreCheckValidWhenInput())) {
|
|
421
|
+
if (!isNil(this.hours()) && !isNil(this.minutes()) && !isNil(this.toMinutes()) && !isNil(this.toHours()) && (await this.checkValid(this.ignoreCheckValidWhenInput()))) {
|
|
404
422
|
this.outEmitMultiTime.emit({ from: signal({ hours: Number(this.hours()), minute: Number(this.minutes()) }), to: signal({ hours: Number(this.toHours()), minute: Number(this.toMinutes()) }) });
|
|
405
423
|
return;
|
|
406
424
|
}
|
|
@@ -414,7 +432,7 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
414
432
|
}
|
|
415
433
|
}
|
|
416
434
|
handlerFocus(event, type) {
|
|
417
|
-
this.focusInput.update(current => {
|
|
435
|
+
this.focusInput.update((current) => {
|
|
418
436
|
current[type] = event;
|
|
419
437
|
return current;
|
|
420
438
|
});
|
|
@@ -422,7 +440,7 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
422
440
|
eventInput(event, type) {
|
|
423
441
|
this.isSelected.set(false);
|
|
424
442
|
this.writeDrownFromKeyboard.set(true);
|
|
425
|
-
if (event.keyCode === 96 && Number(get(this, type)) === 0) {
|
|
443
|
+
if (event.keyCode === 96 && Number(get(this.getInstance(), type)) === 0) {
|
|
426
444
|
this.isZero.set(true);
|
|
427
445
|
}
|
|
428
446
|
if (event.keyCode !== 8) {
|
|
@@ -439,7 +457,7 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
439
457
|
case 'minutes':
|
|
440
458
|
if (isNil(this.minutes())) {
|
|
441
459
|
if (this.checkBackspaceFocusMinutes() === 1) {
|
|
442
|
-
this.checkBackspaceFocusMinutes.update(current => {
|
|
460
|
+
this.checkBackspaceFocusMinutes.update((current) => {
|
|
443
461
|
current = current + 1;
|
|
444
462
|
return current;
|
|
445
463
|
});
|
|
@@ -452,7 +470,7 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
452
470
|
case 'toHours':
|
|
453
471
|
if (isNil(this.toHours())) {
|
|
454
472
|
if (this.checkBackspaceFocusToHours() === 1) {
|
|
455
|
-
this.checkBackspaceFocusToHours.update(current => {
|
|
473
|
+
this.checkBackspaceFocusToHours.update((current) => {
|
|
456
474
|
current = current + 1;
|
|
457
475
|
return current;
|
|
458
476
|
});
|
|
@@ -465,7 +483,7 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
465
483
|
case 'toMinutes':
|
|
466
484
|
if (isNil(this.toMinutes())) {
|
|
467
485
|
if (this.checkBackspaceFocusToMinutes() === 1) {
|
|
468
|
-
this.checkBackspaceFocusToMinutes.update(current => {
|
|
486
|
+
this.checkBackspaceFocusToMinutes.update((current) => {
|
|
469
487
|
current = current + 1;
|
|
470
488
|
return current;
|
|
471
489
|
});
|
|
@@ -504,16 +522,15 @@ class LibsUiComponentsDatetimeInputComponent {
|
|
|
504
522
|
async setMessageError(message) {
|
|
505
523
|
this.otherError.set({ message });
|
|
506
524
|
}
|
|
525
|
+
getInstance() {
|
|
526
|
+
return this;
|
|
527
|
+
}
|
|
507
528
|
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 }, classDatePickerInput: { classPropertyName: "classDatePickerInput", publicName: "classDatePickerInput", 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() ?? '' }} 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\n 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()\">:</div>\n <div [class.w-[16px]]=\"minutes()\"\n [class.w-[28px]]=\"!minutes()\">\n\n <libs_ui-components-inputs-input\n 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\n 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()\">:</div>\n <div [class.!w-[16px]]=\"toMinutes()\"\n [class.!w-[28px]]=\"!toMinutes()\">\n <libs_ui-components-inputs-input\n 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", "typeInput", "modeInput", "tabInsertContentTagInput", "textAreaEnterNotNewLine", "emitEmptyInDataTypeNumber", "keepZeroInTypeInt", "autoAddZeroLessThan10InTypeInt", "ignoreBlockInputMaxValue", "maxValueNumber", "minValueNumber", "fixedFloat", "acceptNegativeValue", "valueUpDownNumber", "classInclude", "maxLength", "readonly", "disable", "noBorder", "backgroundNone", "borderError", "useColorModeExist", "placeholder", "keepPlaceholderOnly", "value", "autoRemoveEmoji", "defaultHeight", "minHeightTextArea", "maxHeightTextArea", "focusTimeOut", "selectAllTimeOut", "blurTimeOut", "zIndexPopoverContent", "classContainerInput", "showCount", "ignoreStopPropagationEvent", "resize", "templateLeftBottomInput", "templateRightBottomInput", "classContainerBottomInput", "ignoreWidthInput100", "iframeTextareaCustomStyle", "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 });
|
|
529
|
+
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 }, classDatePickerInput: { classPropertyName: "classDatePickerInput", publicName: "classDatePickerInput", 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\n [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\n class=\" libs-ui-date-time-input {{ 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\n 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\n [class.!w-[16px]]=\"hours()\"\n [class.!w-[18px]]=\"!hours()\">\n <libs_ui-components-inputs-input\n 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\n 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()\">\n :\n </div>\n <div\n [class.w-[16px]]=\"minutes()\"\n [class.w-[28px]]=\"!minutes()\">\n <libs_ui-components-inputs-input\n 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\n 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\n [class.!w-[16px]]=\"toHours()\"\n [class.!w-[18px]]=\"!toHours()\">\n <libs_ui-components-inputs-input\n 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\n 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()\">\n :\n </div>\n <div\n [class.!w-[16px]]=\"toMinutes()\"\n [class.!w-[28px]]=\"!toMinutes()\">\n <libs_ui-components-inputs-input\n 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\n 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\n [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\n 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\n 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", "typeInput", "modeInput", "tabInsertContentTagInput", "textAreaEnterNotNewLine", "emitEmptyInDataTypeNumber", "keepZeroInTypeInt", "autoAddZeroLessThan10InTypeInt", "ignoreBlockInputMaxValue", "maxValueNumber", "minValueNumber", "fixedFloat", "acceptNegativeValue", "valueUpDownNumber", "classInclude", "maxLength", "readonly", "disable", "noBorder", "backgroundNone", "borderError", "useColorModeExist", "placeholder", "keepPlaceholderOnly", "value", "autoRemoveEmoji", "defaultHeight", "minHeightTextArea", "maxHeightTextArea", "focusTimeOut", "selectAllTimeOut", "blurTimeOut", "zIndexPopoverContent", "classContainerInput", "showCount", "ignoreStopPropagationEvent", "resize", "templateLeftBottomInput", "templateRightBottomInput", "classContainerBottomInput", "ignoreWidthInput100", "iframeTextareaCustomStyle", "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 });
|
|
509
530
|
}
|
|
510
531
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsDatetimeInputComponent, decorators: [{
|
|
511
532
|
type: Component,
|
|
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() ?? '' }} 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\n 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()\">:</div>\n <div [class.w-[16px]]=\"minutes()\"\n [class.w-[28px]]=\"!minutes()\">\n\n <libs_ui-components-inputs-input\n 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\n 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()\">:</div>\n <div [class.!w-[16px]]=\"toMinutes()\"\n [class.!w-[28px]]=\"!toMinutes()\">\n <libs_ui-components-inputs-input\n 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"] }]
|
|
533
|
+
args: [{ selector: 'libs_ui-components-datetime-input', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [TranslateModule, LibsUiComponentsLabelComponent, LibsUiComponentsInputsInputComponent], template: "@if (labelConfig(); as labelConfig) {\n <libs_ui-components-label\n [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\n class=\" libs-ui-date-time-input {{ 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\n 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\n [class.!w-[16px]]=\"hours()\"\n [class.!w-[18px]]=\"!hours()\">\n <libs_ui-components-inputs-input\n 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\n 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()\">\n :\n </div>\n <div\n [class.w-[16px]]=\"minutes()\"\n [class.w-[28px]]=\"!minutes()\">\n <libs_ui-components-inputs-input\n 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\n 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\n [class.!w-[16px]]=\"toHours()\"\n [class.!w-[18px]]=\"!toHours()\">\n <libs_ui-components-inputs-input\n 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\n 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()\">\n :\n </div>\n <div\n [class.!w-[16px]]=\"toMinutes()\"\n [class.!w-[28px]]=\"!toMinutes()\">\n <libs_ui-components-inputs-input\n 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\n 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\n [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\n 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\n 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
534
|
}], ctorParameters: () => [] });
|
|
518
535
|
|
|
519
536
|
/**
|