@energycap/components 0.47.4-ECAP-35552-PresentationModeUpdate.20261023-1554 → 0.47.4

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": "@energycap/components",
3
- "version": "0.47.4-ECAP-35552-PresentationModeUpdate.20261023-1554",
3
+ "version": "0.47.4",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "dependencies": {
6
6
  "tslib": "^2.0.0"
@@ -8118,12 +8118,17 @@ export declare class DateDisplayPipe3 implements PipeTransform {
8118
8118
  static ɵpipe: i0.ɵɵPipeDeclaration<DateDisplayPipe3, "dateDisplay3", false>;
8119
8119
  }
8120
8120
  declare namespace multiselect_component_d_exports {
8121
- export { MultiselectComponent, MultiselectMenuPosition };
8121
+ export { MultiselectComponent, MultiselectCustomItemMapper, MultiselectMenuPosition };
8122
8122
  }
8123
8123
  /**
8124
8124
  * Position of the menu relative to the input
8125
8125
  */
8126
8126
  export type MultiselectMenuPosition = 'top_right' | 'top_left' | 'bottom_left' | 'bottom_right';
8127
+ /**
8128
+ * Turns the text a user typed into the custom item(s) to select. Return a single item, several items (for example
8129
+ * a pasted, comma-separated list), or null / an empty array to reject the text.
8130
+ */
8131
+ export type MultiselectCustomItemMapper = (text: string) => MenuItem | MenuItem[] | null;
8127
8132
  /**
8128
8133
  * Multiselect component that allows a user to pick multiple items from a dropdown list.
8129
8134
  * Selected items are displayed as dismissable tags inside the input area.
@@ -8182,6 +8187,16 @@ export declare class MultiselectComponent extends FormControlBase implements OnI
8182
8187
  * @default false
8183
8188
  */
8184
8189
  allowCustom: boolean;
8190
+ /**
8191
+ * Optional mapper for custom entries when allowCustom is true, the equivalent of Kendo's `valueNormalizer`.
8192
+ * Receives the trimmed filter text when the user adds it, and returns the item(s) to select instead of the default
8193
+ * `{ label: text, value: text }`. Returning several items adds each as its own tag, so a pasted list can be split.
8194
+ * Each returned item goes through the same rules as a typed one: an item whose label matches an option selects that
8195
+ * option, an item that is already selected is skipped, and maxSelections is respected. When nothing is added the
8196
+ * filter text is kept so the user can correct it.
8197
+ * @default undefined
8198
+ */
8199
+ customItemMapper?: MultiselectCustomItemMapper;
8185
8200
  /**
8186
8201
  * Maximum number of items that can be selected. 0 means no limit.
8187
8202
  * @default 0
@@ -8370,8 +8385,8 @@ export declare class MultiselectComponent extends FormControlBase implements OnI
8370
8385
  */
8371
8386
  onFilterInput(): void;
8372
8387
  /**
8373
- * Add a custom item from the current filter text and select it.
8374
- * The item uses the typed text as both label and value.
8388
+ * Add custom item(s) from the current filter text and select them.
8389
+ * Without a customItemMapper the item uses the typed text as both label and value.
8375
8390
  */
8376
8391
  addCustomItem(): void;
8377
8392
  /**
@@ -8517,6 +8532,10 @@ export declare class MultiselectComponent extends FormControlBase implements OnI
8517
8532
  "alias": "allowCustom";
8518
8533
  "required": false;
8519
8534
  };
8535
+ "customItemMapper": {
8536
+ "alias": "customItemMapper";
8537
+ "required": false;
8538
+ };
8520
8539
  "maxSelections": {
8521
8540
  "alias": "maxSelections";
8522
8541
  "required": false;