@arsedizioni/ars-utils 22.6.82 → 22.6.85
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/arsedizioni-ars-utils-core.validators.mjs +20 -38
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +2 -25
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1 -1
- package/types/arsedizioni-ars-utils-core.validators.d.ts +19 -25
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +1 -1
- package/types/arsedizioni-ars-utils-ui.navigation.d.ts +1 -8
package/package.json
CHANGED
|
@@ -1173,7 +1173,7 @@ declare class ClipperDocumentMenuComponent {
|
|
|
1173
1173
|
private readonly renderer2;
|
|
1174
1174
|
private readonly clipperService;
|
|
1175
1175
|
readonly useSelections: _angular_core.InputSignal<boolean>;
|
|
1176
|
-
readonly selectionSource: _angular_core.InputSignal<"
|
|
1176
|
+
readonly selectionSource: _angular_core.InputSignal<"none" | "bag" | "selection">;
|
|
1177
1177
|
/**
|
|
1178
1178
|
* Computed signal that returns the current effective document selection.
|
|
1179
1179
|
* Re-evaluates when any input signal or the underlying selection model changes.
|
|
@@ -299,14 +299,14 @@ interface ArsValidatorConfig<TValue = string, TPathKind extends PathKind = PathK
|
|
|
299
299
|
* leave the map with a kind nobody produces.
|
|
300
300
|
*/
|
|
301
301
|
/**
|
|
302
|
-
* Earliest
|
|
302
|
+
* Earliest year {@link date} and {@link dateRange} accept: 1750.
|
|
303
303
|
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
304
|
+
* It is the floor of what the backend can store, and it is set that low on purpose: a birth date,
|
|
305
|
+
* the date of an old norm or the commissioning of an old machine are real data well before 1970.
|
|
306
|
+
* What it does catch is the 01/01/0001 or 01/01/0020 that a mistyped year produces, which SQL
|
|
307
|
+
* Server would reject with an error nobody can read.
|
|
308
308
|
*/
|
|
309
|
-
declare const MIN_VALID_YEAR =
|
|
309
|
+
declare const MIN_VALID_YEAR = 1750;
|
|
310
310
|
declare const ARS_VALIDATOR_MESSAGES: Record<string, string>;
|
|
311
311
|
/**
|
|
312
312
|
* Requires the value to be a well-formed GUID / UUID.
|
|
@@ -372,18 +372,6 @@ declare function notEmpty<TValue extends string | readonly unknown[] | undefined
|
|
|
372
372
|
* @returns void
|
|
373
373
|
*/
|
|
374
374
|
declare function notEqual<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, other: SchemaPath<TValue, SchemaPathRules.Supported>, config?: ArsValidatorConfig<TValue, TPathKind>): void;
|
|
375
|
-
/**
|
|
376
|
-
* Requires the value to be a date the backend can store: parseable, and after 1750.
|
|
377
|
-
*
|
|
378
|
-
* The signal-form counterpart of `SqlDateValidatorDirective`. The year floor is not arbitrary —
|
|
379
|
-
* it is what separates a real date from the 01/01/0001 that a mistyped year produces, which SQL
|
|
380
|
-
* Server rejects with an error nobody can read.
|
|
381
|
-
*
|
|
382
|
-
* @param path - Path of the field to validate.
|
|
383
|
-
* @param config - Optional message override and `when` condition.
|
|
384
|
-
* @returns void
|
|
385
|
-
*/
|
|
386
|
-
declare function sqlDate<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>, config?: ArsValidatorConfig<string, TPathKind>): void;
|
|
387
375
|
/**
|
|
388
376
|
* Requires the value to be a real date, as {@link SystemUtils.parseDate} understands one.
|
|
389
377
|
*
|
|
@@ -392,11 +380,11 @@ declare function sqlDate<TPathKind extends PathKind = PathKind.Root>(path: Schem
|
|
|
392
380
|
* `parseDate` handles the shapes this codebase produces (ISO, `dd/MM/yyyy`, `yyyy-MM-dd`, and the
|
|
393
381
|
* shorthand forms). Empty passes — saying "obbligatorio" is the job of `required()`.
|
|
394
382
|
*
|
|
395
|
-
* A date earlier than {@link MIN_VALID_YEAR} (
|
|
396
|
-
*
|
|
383
|
+
* A date earlier than {@link MIN_VALID_YEAR} (1750) is rejected: it is what the backend can
|
|
384
|
+
* store, so an earlier value is a mistyped year rather than data.
|
|
397
385
|
*
|
|
398
|
-
*
|
|
399
|
-
*
|
|
386
|
+
* It is also the signal-form counterpart of `SqlDateValidatorDirective`: one rule for every date,
|
|
387
|
+
* whether it is typed or picked.
|
|
400
388
|
*
|
|
401
389
|
* @param path - Path of the field to validate.
|
|
402
390
|
* @param config - Optional message override and `when` condition.
|
|
@@ -411,7 +399,7 @@ declare function date<TValue extends string | Date | null | undefined, TPathKind
|
|
|
411
399
|
* Written for the two inputs of a `mat-date-range-input`, whose start and end live in two
|
|
412
400
|
* separate fields of the model. Each end is checked with the same rule as {@link date}, and the
|
|
413
401
|
* ordering is checked only when BOTH ends are filled in — a half-open range ("from today
|
|
414
|
-
* onwards") is a legitimate filter, not an error. The
|
|
402
|
+
* onwards") is a legitimate filter, not an error. The {@link MIN_VALID_YEAR} floor of {@link date}
|
|
415
403
|
* applies to both ends.
|
|
416
404
|
*
|
|
417
405
|
* The rule is bound to BOTH paths, so the error appears on whichever end the user is looking at
|
|
@@ -433,11 +421,17 @@ declare function dateRange<TValue extends string | Date | null | undefined, TPat
|
|
|
433
421
|
* comparison is made on the end of the day, so a date entered this morning does not become
|
|
434
422
|
* invalid because the clock says 09:00.
|
|
435
423
|
*
|
|
424
|
+
* Like {@link notPast}, it accepts both the `Date` a Material datepicker writes into the model and
|
|
425
|
+
* the text of a plain input. An empty value passes: saying "obbligatorio" is the job of
|
|
426
|
+
* `required()`.
|
|
427
|
+
*
|
|
436
428
|
* @param path - Path of the field to validate.
|
|
437
429
|
* @param config - Optional message override and `when` condition.
|
|
438
430
|
* @returns void
|
|
431
|
+
* @example
|
|
432
|
+
* const f = form(this.model, p => { required(p.executionDate); notFuture(p.executionDate); });
|
|
439
433
|
*/
|
|
440
|
-
declare function notFuture<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<
|
|
434
|
+
declare function notFuture<TValue extends string | Date | null | undefined, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, config?: ArsValidatorConfig<TValue, TPathKind>): void;
|
|
441
435
|
/**
|
|
442
436
|
* Requires the value to be a date that is not in the past.
|
|
443
437
|
*
|
|
@@ -617,5 +611,5 @@ declare class SignalsUtils {
|
|
|
617
611
|
}[], message?: string): string | undefined;
|
|
618
612
|
}
|
|
619
613
|
|
|
620
|
-
export { ARS_VALIDATOR_MESSAGES, EmailsValidatorDirective, EqualsValidatorDirective, FileSizeValidatorDirective, GuidValidatorDirective, MIN_VALID_YEAR, MaxTermsValidatorDirective, NotEmptyValidatorDirective, NotEqualValidatorDirective, NotFutureValidatorDirective, PasswordValidatorDirective, SignalsUtils, SqlDateValidatorDirective, TimeValidatorDirective, UrlValidatorDirective, ValidIfDirective, ValidatorDirective, date, dateRange, emails, equals, fileSize, guid, italianFiscalCode, italianVat, maxTerms, notEmpty, notEqual, notFuture, notPast, otp, password,
|
|
614
|
+
export { ARS_VALIDATOR_MESSAGES, EmailsValidatorDirective, EqualsValidatorDirective, FileSizeValidatorDirective, GuidValidatorDirective, MIN_VALID_YEAR, MaxTermsValidatorDirective, NotEmptyValidatorDirective, NotEqualValidatorDirective, NotFutureValidatorDirective, PasswordValidatorDirective, SignalsUtils, SqlDateValidatorDirective, TimeValidatorDirective, UrlValidatorDirective, ValidIfDirective, ValidatorDirective, date, dateRange, emails, equals, fileSize, guid, italianFiscalCode, italianVat, maxTerms, notEmpty, notEqual, notFuture, notPast, otp, password, time, url, validIf };
|
|
621
615
|
export type { ArsValidatorConfig };
|
|
@@ -163,7 +163,7 @@ declare class ChipsSelectorComponent implements OnDestroy, ControlValueAccessor
|
|
|
163
163
|
/** When `true`, at least one item must remain selected. */
|
|
164
164
|
readonly mustSelect: _angular_core.InputSignal<boolean>;
|
|
165
165
|
/** Layout mode: `'collapsed'` forces dropdown mode, `'dynamic'` collapses based on `collapseAt`. */
|
|
166
|
-
readonly mode: _angular_core.InputSignal<"
|
|
166
|
+
readonly mode: _angular_core.InputSignal<"dynamic" | "collapsed">;
|
|
167
167
|
/** When `true`, chips are stacked vertically instead of wrapping horizontally. */
|
|
168
168
|
readonly stacked: _angular_core.InputSignal<boolean>;
|
|
169
169
|
/** Chips below this index receive extra padding to align with other UI elements. */
|
|
@@ -522,7 +522,7 @@ declare class NavigationBarComponent {
|
|
|
522
522
|
* `compact` wraps the icon only (56x32 pill), `wide` wraps icon and label
|
|
523
523
|
* together, exactly as described by the M3 Expressive specs.
|
|
524
524
|
*/
|
|
525
|
-
protected readonly indicatorMode: _angular_core.Signal<"
|
|
525
|
+
protected readonly indicatorMode: _angular_core.Signal<"wide" | "compact">;
|
|
526
526
|
/** Tooltip placement derived from the variant and from the anchoring edge. */
|
|
527
527
|
protected readonly tooltipPosition: _angular_core.Signal<TooltipPosition>;
|
|
528
528
|
/** Inline width override for the rail / drawer, or `undefined` to keep the spec default. */
|
|
@@ -568,13 +568,6 @@ declare class NavigationBarComponent {
|
|
|
568
568
|
* branch leaves this set empty and `ancestorIds` marks the trail instead.
|
|
569
569
|
*/
|
|
570
570
|
protected readonly highlightedIds: _angular_core.Signal<ReadonlySet<string>>;
|
|
571
|
-
/**
|
|
572
|
-
* Ids of the rows that close an expanded branch: the last nested destination
|
|
573
|
-
* before the list goes back to the top level, or before it ends. They are what
|
|
574
|
-
* carries the gap that separates a branch from what follows it — a margin on
|
|
575
|
-
* the parent would not do, because the branch it opens is not inside it.
|
|
576
|
-
*/
|
|
577
|
-
protected readonly branchEndIds: _angular_core.Signal<ReadonlySet<string>>;
|
|
578
571
|
/**
|
|
579
572
|
* Ids of the ancestors of the active destination. No variant ever shows a parent
|
|
580
573
|
* as selected, so this trail is what tells the user where they are: it marks the
|