mn-angular-lib 1.0.152 → 1.0.154

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": "mn-angular-lib",
3
- "version": "1.0.152",
3
+ "version": "1.0.154",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.1.3",
6
6
  "@angular/core": "^21.1.3",
@@ -2692,6 +2692,18 @@ type MnMultiSelectProps<TValue = unknown> = {
2692
2692
  * while collapsing is active, `"{count} selected"` is used as the fallback.
2693
2693
  */
2694
2694
  collapsePlaceholder?: string;
2695
+ /**
2696
+ * Summary text shown when **every** option is selected, in place of the count summary.
2697
+ *
2698
+ * "Everything" is a meaningful state at any option count, so setting this collapses the
2699
+ * trigger as soon as the full set is selected regardless of `collapseThreshold` — without
2700
+ * it, a three-option select could never say so under the default threshold of 5.
2701
+ *
2702
+ * Setting this enables collapsing on its own. The `{count}` token is replaced the same way
2703
+ * it is in `collapsePlaceholder`. Ignored while the select has no options at all, where
2704
+ * "all of them" would be a claim about nothing.
2705
+ */
2706
+ allSelectedPlaceholder?: string;
2695
2707
  /** Size variant of the multi-select (default: 'md') */
2696
2708
  size?: MnMultiSelectVariants['size'];
2697
2709
  /** Border radius variant (default: 'md') */
@@ -2902,26 +2914,31 @@ declare class MnMultiSelect implements OnInit {
2902
2914
  get filteredOptions(): MnMultiSelectOption[];
2903
2915
  get selectedOptions(): MnMultiSelectOption[];
2904
2916
  /**
2905
- * Whether the collapse-to-summary feature is opted into. Active when either
2906
- * `collapsePlaceholder` or `collapseThreshold` is supplied; existing usages
2907
- * with neither prop are unaffected.
2917
+ * Whether the collapse-to-summary feature is opted into. Active when any of
2918
+ * `collapsePlaceholder`, `collapseThreshold` or `allSelectedPlaceholder` is
2919
+ * supplied; existing usages with none of them are unaffected.
2908
2920
  */
2909
2921
  get collapseEnabled(): boolean;
2922
+ /**
2923
+ * Whether every available option is currently selected. False for an empty select, where
2924
+ * "all of them" would be a claim about nothing.
2925
+ */
2926
+ get allSelected(): boolean;
2910
2927
  /**
2911
2928
  * The threshold above which the trigger collapses. Defaults to 5 when collapsing
2912
2929
  * is enabled via `collapsePlaceholder` alone (no explicit `collapseThreshold`).
2913
2930
  */
2914
2931
  get effectiveCollapseThreshold(): number;
2915
2932
  /**
2916
- * Whether the trigger should currently render the count summary instead of the
2917
- * individual chips: only when collapsing is enabled and the number of selected
2918
- * options exceeds the effective threshold.
2933
+ * Whether the trigger should currently render a summary instead of the individual
2934
+ * chips: when the number of selected options exceeds the effective threshold, or
2935
+ * when every option is selected and a summary for that case was supplied.
2919
2936
  */
2920
2937
  get isCollapsed(): boolean;
2921
2938
  /**
2922
2939
  * The summary text shown while collapsed, with the `{count}` token replaced by
2923
- * the number of selected options. Falls back to `"{count} selected"` when no
2924
- * `collapsePlaceholder` is provided.
2940
+ * the number of selected options. `allSelectedPlaceholder` wins while everything
2941
+ * is selected, then `collapsePlaceholder`, then `"{count} selected"`.
2925
2942
  */
2926
2943
  get collapseSummaryText(): string;
2927
2944
  handleBlur(): void;
@@ -5536,9 +5553,20 @@ type MultiSelectFieldConfig<TModel = unknown, TValue = unknown> = {
5536
5553
  options: SelectOption<TValue>[];
5537
5554
  validators?: ValidatorFn[];
5538
5555
  asyncValidators?: AsyncValidatorFn[];
5556
+ /** Placeholder shown in the trigger while nothing is selected. */
5557
+ placeholder?: string;
5539
5558
  searchable?: boolean;
5540
5559
  searchPlaceholder?: string;
5541
5560
  maxSelections?: number;
5561
+ /**
5562
+ * Forwarded to the underlying multi-select: once more than this many options are selected the
5563
+ * trigger collapses to a summary instead of rendering every chip.
5564
+ */
5565
+ collapseThreshold?: number;
5566
+ /** Forwarded summary text for the collapsed trigger; `{count}` is interpolated. */
5567
+ collapsePlaceholder?: string;
5568
+ /** Forwarded summary text shown when every option is selected. */
5569
+ allSelectedPlaceholder?: string;
5542
5570
  readOnly?: boolean;
5543
5571
  disabled?: boolean;
5544
5572
  visible?: FieldVisibilityCondition<TModel>;
@@ -6424,6 +6452,9 @@ type FormFieldView<TModel> = FormFieldConfig<TModel> & {
6424
6452
  searchable?: boolean;
6425
6453
  searchPlaceholder?: string;
6426
6454
  maxSelections?: number;
6455
+ collapseThreshold?: number;
6456
+ collapsePlaceholder?: string;
6457
+ allSelectedPlaceholder?: string;
6427
6458
  swatches?: string[];
6428
6459
  showValue?: boolean;
6429
6460
  unit?: string;