@energycap/components 0.39.17-ECAP-23124-menu-item-divider-improvements.20240528-1347 → 0.39.17-ECAP-25250-eclipse-formula-builder-proto.20240529-1651

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.
@@ -212,11 +212,6 @@ export declare class ComboboxComponent extends FormControlBase implements OnInit
212
212
  * Number of filtered options to display in the footer. Excludes headings.
213
213
  */
214
214
  filteredOptionCount: number;
215
- /**
216
- * Flat list of selectable items in the combobox.
217
- * Does not include headings or divider-section items.
218
- */
219
- private selectableItems;
220
215
  /**
221
216
  * Index of the currently-selected options
222
217
  */
@@ -1,4 +1,4 @@
1
- import { AfterContentInit, ElementRef, EventEmitter, OnChanges, OnDestroy, Renderer2, SimpleChanges, TemplateRef } from '@angular/core';
1
+ import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, Renderer2, TemplateRef } from '@angular/core';
2
2
  import { ScrollService } from '../../core/scroll.service';
3
3
  import { WindowService } from '../../core/window.service';
4
4
  import { LinkTarget } from '../../display/tags/tag';
@@ -11,7 +11,7 @@ export interface MenuItem<TValue = any, SItems = any> extends NavItem {
11
11
  caption?: string;
12
12
  items?: MenuItem<SItems>[];
13
13
  checked?: boolean;
14
- display?: 'default' | 'heading' | 'divider' | 'divided-section';
14
+ display?: 'default' | 'heading' | 'divider';
15
15
  value?: TValue;
16
16
  classList?: string;
17
17
  disabled?: boolean;
@@ -21,7 +21,6 @@ export interface MenuItem<TValue = any, SItems = any> extends NavItem {
21
21
  externalLink?: boolean;
22
22
  /** Optional text to display in-place of the default label when the MenuItem is selected. */
23
23
  selectedLabel?: string;
24
- hideIfNoItems?: boolean;
25
24
  }
26
25
  export declare const menuAnimationSpeed = 350;
27
26
  /**
@@ -29,7 +28,7 @@ export declare const menuAnimationSpeed = 350;
29
28
  *
30
29
  * @export
31
30
  */
32
- export declare class MenuComponent implements AfterContentInit, OnDestroy, OnChanges {
31
+ export declare class MenuComponent implements AfterContentInit, OnDestroy {
33
32
  private el;
34
33
  private renderer;
35
34
  private windowService;
@@ -162,29 +161,7 @@ export declare class MenuComponent implements AfterContentInit, OnDestroy, OnCha
162
161
  * This allows us to prevent double-calls to selectItem() with the same input.
163
162
  */
164
163
  private lastSelected;
165
- /**
166
- * Flattened array of all selectable items in the menu. Makes it easier to keep track of the currently highlighted item for keyboard navigation.
167
- */
168
- private selectableItems;
169
- /**
170
- * Helper function to return a flat list of all selectable items in the provided menu items. Filters out headings and divided-sections.
171
- * This makes it much easier to keep track of currently highlighted items for keyboard navigation.
172
- */
173
- static getSelectableItems(items: MenuItem[]): MenuItem[];
174
- /**
175
- * Returns an ID for the provided item based on its index in the provided items array. This mimics the behavior of the MenuComponent's
176
- * generated IDs for items that don't have provided IDs. This is used in MenuComponent and ComboboxComponent to scroll to specific items.
177
- * NOTE: If the items array does not match what is displayed in the menu, this function will not return the correct ID.
178
- *
179
- * Returns null if the not found
180
- * @param items The MenuItems array to search through.
181
- * @param item The item to generate the ID for.
182
- * @param menuComponentId Used to prefix the generated ID. This should be the ID of the menu component the item is present in.
183
- * @memberof MenuComponent
184
- */
185
- static getIndexedItemId(items: MenuItem[], item?: MenuItem | null, menuComponentId?: string): string | null;
186
164
  constructor(el: ElementRef, renderer: Renderer2, windowService: WindowService, scrollService: ScrollService);
187
- ngOnChanges(changes: SimpleChanges): void;
188
165
  /**
189
166
  * Sets & displays the interalized template based on
190
167
  * the set template.
@@ -238,6 +215,14 @@ export declare class MenuComponent implements AfterContentInit, OnDestroy, OnCha
238
215
  */
239
216
  private scrollMenu;
240
217
  private scrollToHighlightedItem;
218
+ /**
219
+ * Find a given item's index in the filtered items array.
220
+ *
221
+ * Returns -1 if not found
222
+ * @param itemToFind The matching item to find in the items array.
223
+ * @memberof MenuComponent
224
+ */
225
+ private findItemIndex;
241
226
  private addKeydownListener;
242
227
  /**
243
228
  * Sets the menu item ids using its index if item doesn't already have one
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energycap/components",
3
- "version": "0.39.17-ECAP-23124-menu-item-divider-improvements.20240528-1347",
3
+ "version": "0.39.17-ECAP-25250-eclipse-formula-builder-proto.20240529-1651",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
@@ -217,7 +217,7 @@
217
217
  --ec-form-control-border-color: var(--ec-color-gray-4);
218
218
  --ec-form-control-border-radius: var(--ec-border-radius);
219
219
  --ec-form-control-font-size: var(--ec-font-size-body);
220
- --ec-form-control-border-color-focus: var(--ec-background-color);
220
+ --ec-form-control-border-color-focus: var(--ec-color-interactive);
221
221
  --ec-form-control-box-shadow-focus: 0 0 0 2px var(--ec-color-interactive);
222
222
  --ec-form-control-background-color-invalid: var(--ec-background-color-caution);
223
223
  --ec-form-control-color-invalid: var(--ec-color-primary-dark);