@arsedizioni/ars-utils 22.0.43 → 22.0.47

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arsedizioni/ars-utils",
3
- "version": "22.0.43",
3
+ "version": "22.0.47",
4
4
  "author": {
5
5
  "email": "software@arsedizioni.it",
6
6
  "name": "Fabio Buscaroli, Alberto Doria"
@@ -1049,7 +1049,7 @@ declare class ClipperDocumentMenuComponent {
1049
1049
  private readonly renderer2;
1050
1050
  private readonly clipperService;
1051
1051
  readonly useSelections: _angular_core.InputSignal<boolean>;
1052
- readonly selectionSource: _angular_core.InputSignal<"bag" | "selection" | "none">;
1052
+ readonly selectionSource: _angular_core.InputSignal<"selection" | "bag" | "none">;
1053
1053
  /**
1054
1054
  * Computed signal that returns the current effective document selection.
1055
1055
  * Re-evaluates when any input signal or the underlying selection model changes.
@@ -405,20 +405,20 @@ declare class EmailsValidatorDirective implements Validator {
405
405
  * The host control is re-validated whenever the OTHER control's value changes:
406
406
  * without this, typing a new password AFTER the confirmation field was filled
407
407
  * left the form incorrectly valid (the classic password/confirm bug).
408
+ *
409
+ * IMPORTANT (reciprocal-binding safety): the re-validation triggered from the
410
+ * other control's `valueChanges` runs with `{ emitEvent: false }`. Calling
411
+ * Angular's `onValidatorChange` instead would re-emit valueChanges, so a
412
+ * reciprocal setup (A [equals]=B and B [equals]=A) would overflow the stack.
408
413
  */
409
414
  declare class EqualsValidatorDirective implements Validator {
410
415
  /** The control whose value must match the host control's value. */
411
416
  readonly equals: i0.InputSignal<AbstractControl<any, any, any>>;
412
- /** Callback registered by Angular forms to re-run validation on the host control. */
413
- private onValidatorChange?;
417
+ /** The host control, captured on the first validate() call. */
418
+ private hostControl?;
414
419
  /** Subscription to the other control's valueChanges. */
415
420
  private subscription?;
416
421
  constructor();
417
- /**
418
- * Registers the callback Angular invokes to re-run this validator.
419
- * @param fn - The revalidation callback provided by the forms API.
420
- */
421
- registerOnValidatorChange(fn: () => void): void;
422
422
  /**
423
423
  * Validates that the host control value equals the bound control's value.
424
424
  * Returns `null` (valid) when no control is bound.
@@ -504,20 +504,21 @@ declare class NotEmptyValidatorDirective implements Validator {
504
504
  *
505
505
  * The host control is re-validated whenever the OTHER control's value changes,
506
506
  * so editing either field keeps both error states consistent.
507
+ *
508
+ * IMPORTANT (reciprocal-binding safety): the re-validation triggered from the
509
+ * other control's `valueChanges` is run with `{ emitEvent: false }`. Using
510
+ * Angular's `onValidatorChange` here instead would call `host.updateValueAndValidity()`
511
+ * WITH events, so a reciprocal setup (A [notEqual]=B and B [notEqual]=A) would
512
+ * ping-pong valueChanges between the two controls and overflow the stack.
507
513
  */
508
514
  declare class NotEqualValidatorDirective implements Validator {
509
515
  /** The control whose value must differ from the host control's value. */
510
516
  readonly notEqual: i0.InputSignal<AbstractControl<any, any, any>>;
511
- /** Callback registered by Angular forms to re-run validation on the host control. */
512
- private onValidatorChange?;
517
+ /** The host control, captured on the first validate() call. */
518
+ private hostControl?;
513
519
  /** Subscription to the other control's valueChanges. */
514
520
  private subscription?;
515
521
  constructor();
516
- /**
517
- * Registers the callback Angular invokes to re-run this validator.
518
- * @param fn - The revalidation callback provided by the forms API.
519
- */
520
- registerOnValidatorChange(fn: () => void): void;
521
522
  /**
522
523
  * Validates that the host control value is not equal to the bound control's value.
523
524
  * Also clears the `notequal` error on the other control when the host becomes valid.
@@ -1293,6 +1293,7 @@ declare function applyVisibility(el: {
1293
1293
  display: string;
1294
1294
  };
1295
1295
  }, setStyle: (prop: string, value: string) => void, removeStyle: (prop: string) => void, visible: boolean, prevDisplay: string | null): string | null;
1296
+ declare function toBool(v: string | boolean | null | undefined): boolean | undefined;
1296
1297
  declare class FxShowHideDirective extends ResponsiveBaseDirective {
1297
1298
  readonly fxShow: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
1298
1299
  readonly showXs: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
@@ -1344,29 +1345,48 @@ declare class FxShowHideDirective extends ResponsiveBaseDirective {
1344
1345
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FxShowHideDirective, " [fxShow], [fxHide], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxShow.sm-up], [fxShow.md-up], [fxShow.lg-up], [fxShow.xl-up], [fxShow.sm-down], [fxShow.md-down], [fxShow.lg-down], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg], [fxHide.sm-up], [fxHide.md-up], [fxHide.lg-up], [fxHide.xl-up], [fxHide.sm-down], [fxHide.md-down], [fxHide.lg-down] ", never, { "fxShow": { "alias": "fxShow"; "required": false; "isSignal": true; }; "showXs": { "alias": "fxShow.xs"; "required": false; "isSignal": true; }; "showSm": { "alias": "fxShow.sm"; "required": false; "isSignal": true; }; "showMd": { "alias": "fxShow.md"; "required": false; "isSignal": true; }; "showLg": { "alias": "fxShow.lg"; "required": false; "isSignal": true; }; "showXl": { "alias": "fxShow.xl"; "required": false; "isSignal": true; }; "showLtSm": { "alias": "fxShow.lt-sm"; "required": false; "isSignal": true; }; "showLtMd": { "alias": "fxShow.lt-md"; "required": false; "isSignal": true; }; "showLtLg": { "alias": "fxShow.lt-lg"; "required": false; "isSignal": true; }; "showLtXl": { "alias": "fxShow.lt-xl"; "required": false; "isSignal": true; }; "showGtXs": { "alias": "fxShow.gt-xs"; "required": false; "isSignal": true; }; "showGtSm": { "alias": "fxShow.gt-sm"; "required": false; "isSignal": true; }; "showGtMd": { "alias": "fxShow.gt-md"; "required": false; "isSignal": true; }; "showGtLg": { "alias": "fxShow.gt-lg"; "required": false; "isSignal": true; }; "showSmUp": { "alias": "fxShow.sm-up"; "required": false; "isSignal": true; }; "showMdUp": { "alias": "fxShow.md-up"; "required": false; "isSignal": true; }; "showLgUp": { "alias": "fxShow.lg-up"; "required": false; "isSignal": true; }; "showXlUp": { "alias": "fxShow.xl-up"; "required": false; "isSignal": true; }; "showSmDown": { "alias": "fxShow.sm-down"; "required": false; "isSignal": true; }; "showMdDown": { "alias": "fxShow.md-down"; "required": false; "isSignal": true; }; "showLgDown": { "alias": "fxShow.lg-down"; "required": false; "isSignal": true; }; "fxHide": { "alias": "fxHide"; "required": false; "isSignal": true; }; "hideXs": { "alias": "fxHide.xs"; "required": false; "isSignal": true; }; "hideSm": { "alias": "fxHide.sm"; "required": false; "isSignal": true; }; "hideMd": { "alias": "fxHide.md"; "required": false; "isSignal": true; }; "hideLg": { "alias": "fxHide.lg"; "required": false; "isSignal": true; }; "hideXl": { "alias": "fxHide.xl"; "required": false; "isSignal": true; }; "hideLtSm": { "alias": "fxHide.lt-sm"; "required": false; "isSignal": true; }; "hideLtMd": { "alias": "fxHide.lt-md"; "required": false; "isSignal": true; }; "hideLtLg": { "alias": "fxHide.lt-lg"; "required": false; "isSignal": true; }; "hideLtXl": { "alias": "fxHide.lt-xl"; "required": false; "isSignal": true; }; "hideGtXs": { "alias": "fxHide.gt-xs"; "required": false; "isSignal": true; }; "hideGtSm": { "alias": "fxHide.gt-sm"; "required": false; "isSignal": true; }; "hideGtMd": { "alias": "fxHide.gt-md"; "required": false; "isSignal": true; }; "hideGtLg": { "alias": "fxHide.gt-lg"; "required": false; "isSignal": true; }; "hideSmUp": { "alias": "fxHide.sm-up"; "required": false; "isSignal": true; }; "hideMdUp": { "alias": "fxHide.md-up"; "required": false; "isSignal": true; }; "hideLgUp": { "alias": "fxHide.lg-up"; "required": false; "isSignal": true; }; "hideXlUp": { "alias": "fxHide.xl-up"; "required": false; "isSignal": true; }; "hideSmDown": { "alias": "fxHide.sm-down"; "required": false; "isSignal": true; }; "hideMdDown": { "alias": "fxHide.md-down"; "required": false; "isSignal": true; }; "hideLgDown": { "alias": "fxHide.lg-down"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1345
1346
  }
1346
1347
 
1348
+ /** A single style value. Numbers are stringified; an optional `.unit` suffix on the key is appended. */
1349
+ type StyleValue = string | number | null | undefined;
1350
+ /**
1351
+ * NgStyle-compatible style input (same shape accepted by @ngbracket/ngx-layout):
1352
+ * - a raw style string: `'max-width: 30px; color: red'`
1353
+ * - an array of strings / maps: `['color: red', { 'max-width.px': 30 }]`
1354
+ * - a property→value map, with optional `.unit` suffix on the key:
1355
+ * `{ 'max-width.px': 30, color: 'red' }`
1356
+ */
1357
+ type StyleInput = string | Array<string | Record<string, StyleValue>> | Record<string, StyleValue>;
1358
+ /** Internal, fully-resolved representation handed to the DOM effect. */
1347
1359
  type StyleMap = Record<string, string>;
1360
+ /**
1361
+ * Flattens any {@link StyleInput} into a plain `{ property: cssValue }` map,
1362
+ * resolving `'prop.unit': value` keys (e.g. `'max-width.px': 30` → `max-width: '30px'`)
1363
+ * and stringifying numeric values. `null` / `undefined` / `''` values are skipped.
1364
+ * @param v - The raw style input (or undefined).
1365
+ * @returns A normalised `{ property: value }` map ready for `Renderer2.setStyle`.
1366
+ */
1367
+ declare function normalizeStyle(v: StyleInput | undefined): StyleMap;
1348
1368
  declare class FxStyleDirective extends ResponsiveBaseDirective {
1349
- readonly fxStyle: _angular_core.InputSignal<StyleMap>;
1350
- readonly xs: _angular_core.InputSignal<StyleMap>;
1351
- readonly sm: _angular_core.InputSignal<StyleMap>;
1352
- readonly md: _angular_core.InputSignal<StyleMap>;
1353
- readonly lg: _angular_core.InputSignal<StyleMap>;
1354
- readonly xl: _angular_core.InputSignal<StyleMap>;
1355
- readonly ltSm: _angular_core.InputSignal<StyleMap>;
1356
- readonly ltMd: _angular_core.InputSignal<StyleMap>;
1357
- readonly ltLg: _angular_core.InputSignal<StyleMap>;
1358
- readonly ltXl: _angular_core.InputSignal<StyleMap>;
1359
- readonly gtXs: _angular_core.InputSignal<StyleMap>;
1360
- readonly gtSm: _angular_core.InputSignal<StyleMap>;
1361
- readonly gtMd: _angular_core.InputSignal<StyleMap>;
1362
- readonly gtLg: _angular_core.InputSignal<StyleMap>;
1363
- readonly smUp: _angular_core.InputSignal<StyleMap>;
1364
- readonly mdUp: _angular_core.InputSignal<StyleMap>;
1365
- readonly lgUp: _angular_core.InputSignal<StyleMap>;
1366
- readonly xlUp: _angular_core.InputSignal<StyleMap>;
1367
- readonly smDown: _angular_core.InputSignal<StyleMap>;
1368
- readonly mdDown: _angular_core.InputSignal<StyleMap>;
1369
- readonly lgDown: _angular_core.InputSignal<StyleMap>;
1369
+ readonly fxStyle: _angular_core.InputSignal<StyleInput>;
1370
+ readonly xs: _angular_core.InputSignal<StyleInput>;
1371
+ readonly sm: _angular_core.InputSignal<StyleInput>;
1372
+ readonly md: _angular_core.InputSignal<StyleInput>;
1373
+ readonly lg: _angular_core.InputSignal<StyleInput>;
1374
+ readonly xl: _angular_core.InputSignal<StyleInput>;
1375
+ readonly ltSm: _angular_core.InputSignal<StyleInput>;
1376
+ readonly ltMd: _angular_core.InputSignal<StyleInput>;
1377
+ readonly ltLg: _angular_core.InputSignal<StyleInput>;
1378
+ readonly ltXl: _angular_core.InputSignal<StyleInput>;
1379
+ readonly gtXs: _angular_core.InputSignal<StyleInput>;
1380
+ readonly gtSm: _angular_core.InputSignal<StyleInput>;
1381
+ readonly gtMd: _angular_core.InputSignal<StyleInput>;
1382
+ readonly gtLg: _angular_core.InputSignal<StyleInput>;
1383
+ readonly smUp: _angular_core.InputSignal<StyleInput>;
1384
+ readonly mdUp: _angular_core.InputSignal<StyleInput>;
1385
+ readonly lgUp: _angular_core.InputSignal<StyleInput>;
1386
+ readonly xlUp: _angular_core.InputSignal<StyleInput>;
1387
+ readonly smDown: _angular_core.InputSignal<StyleInput>;
1388
+ readonly mdDown: _angular_core.InputSignal<StyleInput>;
1389
+ readonly lgDown: _angular_core.InputSignal<StyleInput>;
1370
1390
  private readonly _resolved;
1371
1391
  /** Tracks which CSS properties were last applied — plain field, not a signal. */
1372
1392
  private _appliedProps;
@@ -1375,6 +1395,12 @@ declare class FxStyleDirective extends ResponsiveBaseDirective {
1375
1395
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FxStyleDirective, " [fxStyle], [fxStyle.xs], [fxStyle.sm], [fxStyle.md], [fxStyle.lg], [fxStyle.xl], [fxStyle.lt-sm], [fxStyle.lt-md], [fxStyle.lt-lg], [fxStyle.lt-xl], [fxStyle.gt-xs], [fxStyle.gt-sm], [fxStyle.gt-md], [fxStyle.gt-lg], [fxStyle.sm-up], [fxStyle.md-up], [fxStyle.lg-up], [fxStyle.xl-up], [fxStyle.sm-down], [fxStyle.md-down], [fxStyle.lg-down] ", never, { "fxStyle": { "alias": "fxStyle"; "required": false; "isSignal": true; }; "xs": { "alias": "fxStyle.xs"; "required": false; "isSignal": true; }; "sm": { "alias": "fxStyle.sm"; "required": false; "isSignal": true; }; "md": { "alias": "fxStyle.md"; "required": false; "isSignal": true; }; "lg": { "alias": "fxStyle.lg"; "required": false; "isSignal": true; }; "xl": { "alias": "fxStyle.xl"; "required": false; "isSignal": true; }; "ltSm": { "alias": "fxStyle.lt-sm"; "required": false; "isSignal": true; }; "ltMd": { "alias": "fxStyle.lt-md"; "required": false; "isSignal": true; }; "ltLg": { "alias": "fxStyle.lt-lg"; "required": false; "isSignal": true; }; "ltXl": { "alias": "fxStyle.lt-xl"; "required": false; "isSignal": true; }; "gtXs": { "alias": "fxStyle.gt-xs"; "required": false; "isSignal": true; }; "gtSm": { "alias": "fxStyle.gt-sm"; "required": false; "isSignal": true; }; "gtMd": { "alias": "fxStyle.gt-md"; "required": false; "isSignal": true; }; "gtLg": { "alias": "fxStyle.gt-lg"; "required": false; "isSignal": true; }; "smUp": { "alias": "fxStyle.sm-up"; "required": false; "isSignal": true; }; "mdUp": { "alias": "fxStyle.md-up"; "required": false; "isSignal": true; }; "lgUp": { "alias": "fxStyle.lg-up"; "required": false; "isSignal": true; }; "xlUp": { "alias": "fxStyle.xl-up"; "required": false; "isSignal": true; }; "smDown": { "alias": "fxStyle.sm-down"; "required": false; "isSignal": true; }; "mdDown": { "alias": "fxStyle.md-down"; "required": false; "isSignal": true; }; "lgDown": { "alias": "fxStyle.lg-down"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1376
1396
  }
1377
1397
  type ClassInput = string | string[] | Record<string, boolean>;
1398
+ /**
1399
+ * Converts any {@link ClassInput} into a flat set of active class names.
1400
+ * @param v - The class input (string, array, or `{ class: enabled }` map), or undefined.
1401
+ * @returns A `Set` of the class names that should be applied.
1402
+ */
1403
+ declare function toClassSet(v: ClassInput | undefined): Set<string>;
1378
1404
  declare class FxClassDirective extends ResponsiveBaseDirective {
1379
1405
  readonly fxClass: _angular_core.InputSignal<ClassInput>;
1380
1406
  readonly xs: _angular_core.InputSignal<ClassInput>;
@@ -1411,5 +1437,5 @@ declare class FlexLayoutModule {
1411
1437
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<FlexLayoutModule>;
1412
1438
  }
1413
1439
 
1414
- export { ALIAS_FAMILIES, ALIAS_INDEX, BS5_BREAKPOINTS, BusyDialogComponent, BusyTimer, CANONICAL_ALIASES, ConfirmDialogComponent, CredentialsDialogComponent, DeleteDialogComponent, DeleteDialogConfirmMode, DialogService, FlexLayoutModule, FxClassDirective, FxFlexAlignDirective, FxFlexDirective, FxFlexFillDirective, FxFlexOffsetDirective, FxFlexOrderDirective, FxGridAreaDirective, FxGridColumnDirective, FxGridDirective, FxLayoutAlignDirective, FxLayoutDirective, FxLayoutGapDirective, FxLayoutWrapDirective, FxShowHideDirective, FxStyleDirective, IfBpDirective, InfoDialogComponent, LAYOUT_BREAKPOINTS, LAYOUT_VALUES, MediaObserver, NON_CANONICAL_PRIORITY, OtpInputComponent, PaginatorIntl, PasswordStrengthComponent, RecoverPasswordDialogComponent, ResetPasswordDialogComponent, ResponsiveBaseDirective, ToastComponent, UIService, applyVisibility, buildAlignStyles, buildFlexStyles, buildLayoutCSS, resolve, resolveAll, resolveFlexInput, resolveNonCanonical, resolveParentFlow, validateBasis, validateLayoutValue, validateWrapValue };
1440
+ export { ALIAS_FAMILIES, ALIAS_INDEX, BS5_BREAKPOINTS, BusyDialogComponent, BusyTimer, CANONICAL_ALIASES, ConfirmDialogComponent, CredentialsDialogComponent, DeleteDialogComponent, DeleteDialogConfirmMode, DialogService, FlexLayoutModule, FxClassDirective, FxFlexAlignDirective, FxFlexDirective, FxFlexFillDirective, FxFlexOffsetDirective, FxFlexOrderDirective, FxGridAreaDirective, FxGridColumnDirective, FxGridDirective, FxLayoutAlignDirective, FxLayoutDirective, FxLayoutGapDirective, FxLayoutWrapDirective, FxShowHideDirective, FxStyleDirective, IfBpDirective, InfoDialogComponent, LAYOUT_BREAKPOINTS, LAYOUT_VALUES, MediaObserver, NON_CANONICAL_PRIORITY, OtpInputComponent, PaginatorIntl, PasswordStrengthComponent, RecoverPasswordDialogComponent, ResetPasswordDialogComponent, ResponsiveBaseDirective, ToastComponent, UIService, applyVisibility, buildAlignStyles, buildFlexStyles, buildLayoutCSS, normalizeStyle, resolve, resolveAll, resolveFlexInput, resolveNonCanonical, resolveParentFlow, toBool, toClassSet, validateBasis, validateLayoutValue, validateWrapValue };
1415
1441
  export type { BpValues, BreakpointAlias, CanonicalKey, ConfirmDialogData, ConfirmDialogOption, CredentialsDialogData, CredentialsDialogResult, DeleteDialogData, DialogOption, DialogResult, IDialogService, InfoDialogData, NcValues, NonCanonicalKey, RecoverPasswordDialogData, RecoverPasswordDialogResult, ResetPasswordDialogData, ResetPasswordDialogMode, ResetPasswordDialogResult, ToastData };