@quadrel-enterprise-ui/framework 21.4.5 → 21.5.1
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/fesm2022/quadrel-enterprise-ui-framework.mjs +153 -11
- package/fesm2022/quadrel-enterprise-ui-framework.mjs.map +1 -1
- package/package.json +1 -1
- package/src/assets/i18n/de.json +5 -0
- package/src/assets/i18n/en.json +5 -0
- package/src/assets/i18n/fr.json +5 -0
- package/src/assets/i18n/it.json +5 -0
- package/types/quadrel-enterprise-ui-framework.d.ts +92 -0
package/package.json
CHANGED
package/src/assets/i18n/de.json
CHANGED
|
@@ -111,10 +111,15 @@
|
|
|
111
111
|
"i18n.qd.form.error.maxLength": "Zu hohe Anzahl von Zeichen",
|
|
112
112
|
"i18n.qd.form.error.pattern": "Entspricht nicht dem Muster",
|
|
113
113
|
"i18n.qd.form.error.date": "Eingabe entspricht nicht DD.MM.JJJJ",
|
|
114
|
+
"i18n.qd.form.error.dateTime": "Eingabe entspricht nicht DD.MM.JJJJ HH:mm",
|
|
115
|
+
"i18n.qd.form.error.dateTimeWithSeconds": "Eingabe entspricht nicht DD.MM.JJJJ HH:mm:ss",
|
|
114
116
|
"i18n.qd.form.error.disabledDates": "Datum ausserhalb des erlaubten Bereichs",
|
|
115
117
|
"i18n.qd.form.error.dateRange": "Das Datum liegt ausserhalb des gültigen Bereichs.",
|
|
118
|
+
"i18n.qd.form.error.dateTimeRange": "Der Zeitpunkt liegt ausserhalb des gültigen Bereichs.",
|
|
116
119
|
"i18n.qd.form.error.startDateNotAfterEndDate": "Das Startdatum darf nicht hinter dem Enddatum liegen.",
|
|
117
120
|
"i18n.qd.form.error.endDateNotBeforeStartDate": "Das Enddatum darf nicht vor dem Startdatum liegen.",
|
|
121
|
+
"i18n.qd.form.error.startDateTimeNotAfterEndDateTime": "Der Startzeitpunkt darf nicht hinter dem Endzeitpunkt liegen.",
|
|
122
|
+
"i18n.qd.form.error.endDateTimeNotBeforeStartDateTime": "Der Endzeitpunkt darf nicht vor dem Startzeitpunkt liegen.",
|
|
118
123
|
"i18n.qd.form.error.disabledTimes": "Zeit ausserhalb des erlaubten Bereichs",
|
|
119
124
|
"i18n.qd.form.error.startTimeNotAfterEndTime": "Die Startzeit darf nicht hinter der Endzeit liegen.",
|
|
120
125
|
"i18n.qd.form.error.endTimeNotBeforeStartTime": "Die Endzeit darf nicht vor der Startzeit liegen.",
|
package/src/assets/i18n/en.json
CHANGED
|
@@ -111,10 +111,15 @@
|
|
|
111
111
|
"i18n.qd.form.error.maxLength": "Too many characters",
|
|
112
112
|
"i18n.qd.form.error.pattern": "Does not match pattern",
|
|
113
113
|
"i18n.qd.form.error.date": "Input does not correspond to DD.MM.YYYY",
|
|
114
|
+
"i18n.qd.form.error.dateTime": "Input does not correspond to DD.MM.YYYY HH:mm",
|
|
115
|
+
"i18n.qd.form.error.dateTimeWithSeconds": "Input does not correspond to DD.MM.YYYY HH:mm:ss",
|
|
114
116
|
"i18n.qd.form.error.disabledDates": "Date outside the permitted range",
|
|
115
117
|
"i18n.qd.form.error.dateRange": "The date is outside the valid range.",
|
|
118
|
+
"i18n.qd.form.error.dateTimeRange": "The date and time is outside the valid range.",
|
|
116
119
|
"i18n.qd.form.error.startDateNotAfterEndDate": "The start date cannot be later than the end date.",
|
|
117
120
|
"i18n.qd.form.error.endDateNotBeforeStartDate": "The end date cannot be earlier than the start date.",
|
|
121
|
+
"i18n.qd.form.error.startDateTimeNotAfterEndDateTime": "The start date and time cannot be later than the end date and time.",
|
|
122
|
+
"i18n.qd.form.error.endDateTimeNotBeforeStartDateTime": "The end date and time cannot be earlier than the start date and time.",
|
|
118
123
|
"i18n.qd.form.error.disabledTimes": "Time outside the permitted range",
|
|
119
124
|
"i18n.qd.form.error.startTimeNotAfterEndTime": "The start time cannot be later than the end time.",
|
|
120
125
|
"i18n.qd.form.error.endTimeNotBeforeStartTime": "The end time cannot be earlier than the start time.",
|
package/src/assets/i18n/fr.json
CHANGED
|
@@ -111,10 +111,15 @@
|
|
|
111
111
|
"i18n.qd.form.error.maxLength": "Trop de caractères",
|
|
112
112
|
"i18n.qd.form.error.pattern": "Ne correspond pas au schéma",
|
|
113
113
|
"i18n.qd.form.error.date": "La saisie ne correspond pas à JJ.MM.AAAA",
|
|
114
|
+
"i18n.qd.form.error.dateTime": "La saisie ne correspond pas à JJ.MM.AAAA HH:mm",
|
|
115
|
+
"i18n.qd.form.error.dateTimeWithSeconds": "La saisie ne correspond pas à JJ.MM.AAAA HH:mm:ss",
|
|
114
116
|
"i18n.qd.form.error.disabledDates": "Date en dehors de la plage autorisée",
|
|
115
117
|
"i18n.qd.form.error.dateRange": "La date est en dehors de la plage valide.",
|
|
118
|
+
"i18n.qd.form.error.dateTimeRange": "La date et l'heure sont en dehors de la plage valide.",
|
|
116
119
|
"i18n.qd.form.error.startDateNotAfterEndDate": "La date de début ne peut pas être postérieure à la date de fin.",
|
|
117
120
|
"i18n.qd.form.error.endDateNotBeforeStartDate": "La date de fin ne peut pas être antérieure à la date de début.",
|
|
121
|
+
"i18n.qd.form.error.startDateTimeNotAfterEndDateTime": "La date et l'heure de début ne peuvent pas être postérieures à la date et l'heure de fin.",
|
|
122
|
+
"i18n.qd.form.error.endDateTimeNotBeforeStartDateTime": "La date et l'heure de fin ne peuvent pas être antérieures à la date et l'heure de début.",
|
|
118
123
|
"i18n.qd.form.error.disabledTimes": "Temps en dehors de la plage autorisée",
|
|
119
124
|
"i18n.qd.form.error.startTimeNotAfterEndTime": "Le temps de début ne peut pas être postérieur au temps de fin.",
|
|
120
125
|
"i18n.qd.form.error.endTimeNotBeforeStartTime": "Le temps de fin ne peut pas être antérieur au temps de début.",
|
package/src/assets/i18n/it.json
CHANGED
|
@@ -111,10 +111,15 @@
|
|
|
111
111
|
"i18n.qd.form.error.maxLength": "Limite caratteri superato",
|
|
112
112
|
"i18n.qd.form.error.pattern": "Non corrisponde allo schema",
|
|
113
113
|
"i18n.qd.form.error.date": "L'input non corrisponde a GG.MM.AAAA",
|
|
114
|
+
"i18n.qd.form.error.dateTime": "L'input non corrisponde a GG.MM.AAAA HH:mm",
|
|
115
|
+
"i18n.qd.form.error.dateTimeWithSeconds": "L'input non corrisponde a GG.MM.AAAA HH:mm:ss",
|
|
114
116
|
"i18n.qd.form.error.disabledDates": "Data fuori dall'intervallo consentito",
|
|
115
117
|
"i18n.qd.form.error.dateRange": "La data è al di fuori dell'intervallo valido.",
|
|
118
|
+
"i18n.qd.form.error.dateTimeRange": "La data e l'ora sono al di fuori dell'intervallo valido.",
|
|
116
119
|
"i18n.qd.form.error.startDateNotAfterEndDate": "La data di inizio non può essere successiva alla data di fine.",
|
|
117
120
|
"i18n.qd.form.error.endDateNotBeforeStartDate": "La data di fine non può essere anteriore alla data di inizio.",
|
|
121
|
+
"i18n.qd.form.error.startDateTimeNotAfterEndDateTime": "La data e l'ora di inizio non possono essere successive alla data e all'ora di fine.",
|
|
122
|
+
"i18n.qd.form.error.endDateTimeNotBeforeStartDateTime": "La data e l'ora di fine non possono essere anteriori alla data e all'ora di inizio.",
|
|
118
123
|
"i18n.qd.form.error.disabledTimes": "Tempo fuori dall'intervallo consentito",
|
|
119
124
|
"i18n.qd.form.error.startTimeNotAfterEndTime": "L'orario di inizio non può essere successivo all'orario di fine.",
|
|
120
125
|
"i18n.qd.form.error.endTimeNotBeforeStartTime": "L'orario di fine non può essere precedente all'orario di inizio.",
|
|
@@ -5941,6 +5941,7 @@ declare class QdNotificationsComponent implements OnInit {
|
|
|
5941
5941
|
* #### **Behavior**
|
|
5942
5942
|
* - Appears in the bottom-right corner.
|
|
5943
5943
|
* - Adapts to the QLS (e.g., stays above a PageFooter).
|
|
5944
|
+
* - Re-enters the top layer whenever a notification arrives, so it stays above dialogs opened before.
|
|
5944
5945
|
* - Behavior is configurable via `snackbarOptions` (e.g., lifetime, close button, handlers).
|
|
5945
5946
|
*
|
|
5946
5947
|
* #### **Usage**
|
|
@@ -5969,6 +5970,21 @@ declare class QdNotificationsSnackbarListenerDirective implements OnInit, OnDest
|
|
|
5969
5970
|
ngOnInit(): void;
|
|
5970
5971
|
ngOnDestroy(): void;
|
|
5971
5972
|
private initOverlay;
|
|
5973
|
+
/**
|
|
5974
|
+
* Raises the snackbar back above every other overlay whenever a notification arrives.
|
|
5975
|
+
*
|
|
5976
|
+
* The CDK renders overlays into the browser top layer, where the paint order follows the order
|
|
5977
|
+
* in which the overlays entered that layer and `z-index` has no effect. The snackbar overlay is
|
|
5978
|
+
* created once with this listener, so overlays opened later - a dialog and its backdrop above
|
|
5979
|
+
* all - would cover it. Re-entering the top layer with every arriving notification puts the
|
|
5980
|
+
* snackbar back on top.
|
|
5981
|
+
*
|
|
5982
|
+
* The re-entry is bound to arriving notifications, so a snackbar that is already visible - a
|
|
5983
|
+
* sticky one with `lifeTime: 0` above all - stays covered by a dialog opened afterwards until
|
|
5984
|
+
* the next notification arrives. Closing a notification leaves the top layer untouched.
|
|
5985
|
+
*/
|
|
5986
|
+
private observeNotificationsToStayOnTop;
|
|
5987
|
+
private raiseToTopLayer;
|
|
5972
5988
|
private observeSafeBottomOffset;
|
|
5973
5989
|
private bottomRightPositions;
|
|
5974
5990
|
static ɵfac: i0.ɵɵFactoryDeclaration<QdNotificationsSnackbarListenerDirective, never>;
|
|
@@ -6402,8 +6418,10 @@ declare class QdDatepickerComponent implements ControlValueAccessor, OnInit, OnC
|
|
|
6402
6418
|
timePicker?: QdFormTimepickerConfiguration;
|
|
6403
6419
|
private _disabledDatesValidator;
|
|
6404
6420
|
private _disabledTimesValidator;
|
|
6421
|
+
private _dateTimeValidator;
|
|
6405
6422
|
private _boundDisabledDates;
|
|
6406
6423
|
private _boundDisabledTimes;
|
|
6424
|
+
private _boundDateTimeValidation;
|
|
6407
6425
|
private _subs;
|
|
6408
6426
|
private _onChange;
|
|
6409
6427
|
private _onTouched;
|
|
@@ -6431,6 +6449,18 @@ declare class QdDatepickerComponent implements ControlValueAccessor, OnInit, OnC
|
|
|
6431
6449
|
private updateDisplayedDateTime;
|
|
6432
6450
|
private rebindDisabledDatesValidatorIfChanged;
|
|
6433
6451
|
private rebindDisabledTimesValidatorIfChanged;
|
|
6452
|
+
private rebindDateTimeValidatorIfChanged;
|
|
6453
|
+
/**
|
|
6454
|
+
* Identifies the date-time error message the current config asks for. `undefined` means the
|
|
6455
|
+
* picker is date-only and the plain `date` message applies.
|
|
6456
|
+
*/
|
|
6457
|
+
private get dateTimeValidationSignature();
|
|
6458
|
+
/**
|
|
6459
|
+
* Makes the invalid-input message name the date *and time* format the input expects. The
|
|
6460
|
+
* validator reports under the same `date` error key as `QdValidators.date()`, so it replaces
|
|
6461
|
+
* the date-only message instead of adding a second one.
|
|
6462
|
+
*/
|
|
6463
|
+
private validateDateTime;
|
|
6434
6464
|
private validateDisabledDates;
|
|
6435
6465
|
private validateDisabledTimes;
|
|
6436
6466
|
private isValidDateInput;
|
|
@@ -8453,6 +8483,30 @@ declare class QdValidators {
|
|
|
8453
8483
|
* ```
|
|
8454
8484
|
*/
|
|
8455
8485
|
static date(errorKey?: string): ValidatorFn;
|
|
8486
|
+
/**
|
|
8487
|
+
* Validates that the value is a real, parseable `Date` object and names the **date and time**
|
|
8488
|
+
* format in the error message.
|
|
8489
|
+
*
|
|
8490
|
+
* Behaves exactly like {@link QdValidators.date}, but the message points at the format a
|
|
8491
|
+
* date-time input expects (`DD.MM.YYYY HH:mm`, or `DD.MM.YYYY HH:mm:ss` when seconds are
|
|
8492
|
+
* enabled) instead of the date-only one. The error is reported under the same `date` key as
|
|
8493
|
+
* {@link QdValidators.date}, so adding it to a control that already carries `date()` replaces
|
|
8494
|
+
* that message rather than showing a second one.
|
|
8495
|
+
*
|
|
8496
|
+
* `qd-datepicker` adds this validator on its own whenever a `timePicker` is configured — reach
|
|
8497
|
+
* for it directly only when validating a date-time value outside of the component.
|
|
8498
|
+
*
|
|
8499
|
+
* @param enableSeconds - Whether the input accepts seconds; mirrors the datepicker config of the same name.
|
|
8500
|
+
* @param errorKey - Translation key returned when the value is not a valid date.
|
|
8501
|
+
*
|
|
8502
|
+
* #### **Usage**
|
|
8503
|
+
* ```ts
|
|
8504
|
+
* new QdFormControl(null, QdValidators.dateTime());
|
|
8505
|
+
* new QdFormControl(new Date(), QdValidators.dateTime(true));
|
|
8506
|
+
* new QdFormControl(new Date(), QdValidators.dateTime(false, 'date-time-error'));
|
|
8507
|
+
* ```
|
|
8508
|
+
*/
|
|
8509
|
+
static dateTime(enableSeconds?: boolean, errorKey?: string): ValidatorFn;
|
|
8456
8510
|
/**
|
|
8457
8511
|
* Validates that a date does not fall inside any of the given disabled ranges.
|
|
8458
8512
|
*
|
|
@@ -8506,6 +8560,44 @@ declare class QdValidators {
|
|
|
8506
8560
|
* ```
|
|
8507
8561
|
*/
|
|
8508
8562
|
static dateRange(partnerControlName: string, position: 'start' | 'end', errorKey?: string): ValidatorFn;
|
|
8563
|
+
/**
|
|
8564
|
+
* Validates that a date **and time** stays on the correct side of a sibling "range partner"
|
|
8565
|
+
* control.
|
|
8566
|
+
*
|
|
8567
|
+
* The date-time counterpart of {@link QdValidators.dateRange}: identical wiring, but the
|
|
8568
|
+
* comparison includes the time of day instead of stopping at the day. Use it for a from/to
|
|
8569
|
+
* pair of datepickers that have a `timePicker` configured — `dateRange` accepts `10:00` to
|
|
8570
|
+
* `08:00` on the same day, this one rejects it.
|
|
8571
|
+
*
|
|
8572
|
+
* Put it on both ends of the pair, each pointing at the other. A `'start'` control is invalid
|
|
8573
|
+
* when its value lies after the partner; an `'end'` control is invalid when its value lies
|
|
8574
|
+
* before the partner. Equal instants are valid, so a zero-length range passes. The comparison
|
|
8575
|
+
* is exact, which fits both picker precisions on its own: without seconds the entered values
|
|
8576
|
+
* carry `:00` seconds, with `enableSeconds` they carry the entered ones.
|
|
8577
|
+
*
|
|
8578
|
+
* Everything else behaves like {@link QdValidators.dateRange}: the partner value is read live
|
|
8579
|
+
* on every run, empty or invalid own/partner values and a missing partner control all pass,
|
|
8580
|
+
* and `qdRevalidates` keeps both ends in sync inside a `QdFormGroup` — see there for the cases
|
|
8581
|
+
* that still need a manual `updateValueAndValidity`.
|
|
8582
|
+
*
|
|
8583
|
+
* @param partnerControlName - Name of the sibling control holding the other end of the range.
|
|
8584
|
+
* @param position - `'start'` for the from-control, `'end'` for the to-control.
|
|
8585
|
+
* @param errorKey - Translation key returned when the order is violated.
|
|
8586
|
+
*
|
|
8587
|
+
* #### **Usage**
|
|
8588
|
+
* ```ts
|
|
8589
|
+
* new QdFormGroup({
|
|
8590
|
+
* from: new QdFormControl(null, QdValidators.dateTimeRange('to', 'start')),
|
|
8591
|
+
* to: new QdFormControl(null, QdValidators.dateTimeRange('from', 'end'))
|
|
8592
|
+
* });
|
|
8593
|
+
* ```
|
|
8594
|
+
*/
|
|
8595
|
+
static dateTimeRange(partnerControlName: string, position: 'start' | 'end', errorKey?: string): ValidatorFn;
|
|
8596
|
+
/**
|
|
8597
|
+
* Compares a control against its range partner. Without a `granularity` the comparison is
|
|
8598
|
+
* exact, which is what a date *and time* range needs; `'day'` ignores the time of day.
|
|
8599
|
+
*/
|
|
8600
|
+
private static isRangeOrderViolated;
|
|
8509
8601
|
private static isValidDate;
|
|
8510
8602
|
/**
|
|
8511
8603
|
* Validates that the time of a date value does not fall inside any disabled time range.
|