@genesislcap/foundation-ui 15.43.0-FUI-2629.1 → 15.44.0

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.
Files changed (34) hide show
  1. package/dist/custom-elements.json +631 -1283
  2. package/dist/dts/actions-menu/actions-menu.d.ts +0 -3
  3. package/dist/dts/actions-menu/actions-menu.d.ts.map +1 -1
  4. package/dist/dts/base-components.d.ts +0 -1
  5. package/dist/dts/base-components.d.ts.map +1 -1
  6. package/dist/dts/index.d.ts +0 -1
  7. package/dist/dts/index.d.ts.map +1 -1
  8. package/dist/dts/react.d.ts +9 -19
  9. package/dist/dts/utils/index.d.ts +0 -1
  10. package/dist/dts/utils/index.d.ts.map +1 -1
  11. package/dist/esm/actions-menu/actions-menu.js +2 -17
  12. package/dist/esm/base-components.js +0 -2
  13. package/dist/esm/index.js +0 -1
  14. package/dist/esm/utils/index.js +0 -1
  15. package/dist/foundation-ui.api.json +78 -1281
  16. package/dist/foundation-ui.d.ts +0 -78
  17. package/dist/react.cjs +6 -13
  18. package/dist/react.mjs +5 -11
  19. package/package.json +18 -18
  20. package/dist/dts/utils/popover-position.d.ts +0 -26
  21. package/dist/dts/utils/popover-position.d.ts.map +0 -1
  22. package/dist/dts/vertical-dropdown-menu/index.d.ts +0 -4
  23. package/dist/dts/vertical-dropdown-menu/index.d.ts.map +0 -1
  24. package/dist/dts/vertical-dropdown-menu/vertical-dropdown-menu.d.ts +0 -67
  25. package/dist/dts/vertical-dropdown-menu/vertical-dropdown-menu.d.ts.map +0 -1
  26. package/dist/dts/vertical-dropdown-menu/vertical-dropdown-menu.styles.d.ts +0 -5
  27. package/dist/dts/vertical-dropdown-menu/vertical-dropdown-menu.styles.d.ts.map +0 -1
  28. package/dist/dts/vertical-dropdown-menu/vertical-dropdown-menu.template.d.ts +0 -5
  29. package/dist/dts/vertical-dropdown-menu/vertical-dropdown-menu.template.d.ts.map +0 -1
  30. package/dist/esm/utils/popover-position.js +0 -70
  31. package/dist/esm/vertical-dropdown-menu/index.js +0 -3
  32. package/dist/esm/vertical-dropdown-menu/vertical-dropdown-menu.js +0 -155
  33. package/dist/esm/vertical-dropdown-menu/vertical-dropdown-menu.styles.js +0 -55
  34. package/dist/esm/vertical-dropdown-menu/vertical-dropdown-menu.template.js +0 -64
@@ -332,13 +332,10 @@ export declare class ActionsMenu extends FoundationElement {
332
332
  singleOption: ActionMenuItem;
333
333
  actionsMenu: HTMLElement;
334
334
  actionsOpener: HTMLElement;
335
- private positionTracker?;
336
335
  disconnectedCallback(): void;
337
336
  private updateMenuPosition;
338
337
  protected definitionChanged(oldValue: any, newValue: any): void;
339
338
  protected openChanged(): void;
340
- private startTrackingPosition;
341
- private stopTrackingPosition;
342
339
  toggleActionsMenuVisibility(): void;
343
340
  onActionMenuItemClick(callback: (rowData: any) => void | any): void;
344
341
  get allActions(): ActionMenuItem[];
@@ -910,7 +907,6 @@ export declare const baseComponents: {
910
907
  styles: ElementStyles;
911
908
  shadowOptions: ShadowRootInit;
912
909
  }, VerificationCodeInput>;
913
- foundationVerticalDropdownMenu: (overrideDefinition?: OverrideFoundationElementDefinition<FoundationElementDefinition>) => FoundationElementRegistry<FoundationElementDefinition, VerticalDropdownMenu>;
914
910
  foundationSectionNavigator: (overrideDefinition?: OverrideFoundationElementDefinition< {
915
911
  baseName: string;
916
912
  template: ViewTemplate<SectionNavigator, any>;
@@ -5144,19 +5140,6 @@ export declare const foundationVerificationCodeInputStyles: ElementStyles;
5144
5140
 
5145
5141
  export declare const foundationVerificationCodeInputTemplate: ViewTemplate<VerificationCodeInput, any>;
5146
5142
 
5147
- /**
5148
- * The Foundation Vertical Dropdown Menu
5149
- *
5150
- * @public
5151
- * @remarks
5152
- * HTML Element: \<foundation-vertical-dropdown-menu\>
5153
- */
5154
- export declare const foundationVerticalDropdownMenu: (overrideDefinition?: OverrideFoundationElementDefinition<FoundationElementDefinition>) => FoundationElementRegistry<FoundationElementDefinition, typeof VerticalDropdownMenu>;
5155
-
5156
- export declare const foundationVerticalDropdownMenuStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ElementStyles;
5157
-
5158
- export declare const foundationVerticalDropdownMenuTemplate: ViewTemplate<VerticalDropdownMenu>;
5159
-
5160
5143
  /**
5161
5144
  * Converts a server BinaryExpression to a client BinaryOperator
5162
5145
  *
@@ -7798,67 +7781,6 @@ export declare interface VerificationCodeInputEventDetail {
7798
7781
 
7799
7782
  export declare type VerticalAlign = 'baseline' | 'top' | 'middle' | 'bottom' | 'sub' | 'text-top';
7800
7783
 
7801
- /**
7802
- * The Vertical Dropdown Menu component.
7803
- * @remarks An icon-only opener (a "kebab") that anchors a menu to itself, for a pinned
7804
- * column of per-row actions. Unlike `%%prefix%%-actions-menu`, it renders no button text and
7805
- * hides itself entirely when a row has no items.
7806
- * @tagname %%prefix%%-vertical-dropdown-menu
7807
- * @public
7808
- */
7809
- export declare class VerticalDropdownMenu extends FoundationElement {
7810
- items: VerticalDropdownMenuItem[] | ((rowData: any) => VerticalDropdownMenuItem[]);
7811
- definition: any;
7812
- classNames: string;
7813
- open: boolean;
7814
- iconName: string;
7815
- buttonAppearance: string;
7816
- autoCloseOnAction: boolean;
7817
- hideDisabled: boolean;
7818
- menuOpener: HTMLElement;
7819
- dropdownMenu: HTMLElement;
7820
- private positionTracker?;
7821
- disconnectedCallback(): void;
7822
- protected definitionChanged(oldValue: any, newValue: any): void;
7823
- protected openChanged(): void;
7824
- private updateMenuPosition;
7825
- private startTrackingPosition;
7826
- private stopTrackingPosition;
7827
- toggleVisibility(): void;
7828
- /**
7829
- * Syncs `open` when the native `popover="auto"` light-dismiss (outside click / Escape)
7830
- * closes the popover without going through `toggleVisibility()`.
7831
- */
7832
- onPopoverToggle(event: Event): void;
7833
- onItemClick(callback: (rowData: any) => void | any): void;
7834
- get rowData(): any;
7835
- get resolvedItems(): VerticalDropdownMenuItem[];
7836
- get visibleItems(): VerticalDropdownMenuItem[];
7837
- getLabel(label: string | ((rowData: any) => string)): string;
7838
- getTemplate(prefix: string): ViewTemplate<VerticalDropdownMenu, any>;
7839
- }
7840
-
7841
- export declare const verticalDropdownMenuBaseStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ElementStyles;
7842
-
7843
- /**
7844
- * The Vertical Dropdown Menu Item.
7845
- * @remarks Used within the Vertical Dropdown Menu component.
7846
- * @public
7847
- */
7848
- export declare type VerticalDropdownMenuItem = {
7849
- label: string | ((rowData: any) => string);
7850
- icon?: {
7851
- variant?: IconStyle;
7852
- name: string;
7853
- size?: FaSize;
7854
- };
7855
- color?: string;
7856
- isDisabled?: (rowData: any) => boolean;
7857
- callback: (rowData: any) => void | any;
7858
- };
7859
-
7860
- export declare const verticalDropdownMenuTemplate: (prefix: string) => ViewTemplate<VerticalDropdownMenu, any>;
7861
-
7862
7784
  export declare type WeeklyConfig = {
7863
7785
  type: RecurrenceType.WEEKLY;
7864
7786
  selectedDays: Set<string>;
package/dist/react.cjs CHANGED
@@ -103,7 +103,6 @@ const { Tooltip: TooltipWC } = require('./esm/tooltip/tooltip.js');
103
103
  const { TreeView: TreeViewWC } = require('./esm/tree-view/tree-view.js');
104
104
  const { UrlInput: UrlInputWC } = require('./esm/url-input/url-input.js');
105
105
  const { VerificationCodeInput: VerificationCodeInputWC } = require('./esm/verification-code-input/verification-code-input.js');
106
- const { VerticalDropdownMenu: VerticalDropdownMenuWC } = require('./esm/vertical-dropdown-menu/vertical-dropdown-menu.js');
107
106
 
108
107
  function _mergeRefs(...refs) {
109
108
  return (value) => {
@@ -114,6 +113,11 @@ function _mergeRefs(...refs) {
114
113
  };
115
114
  }
116
115
 
116
+ const Accordion = React.forwardRef(function Accordion(props, ref) {
117
+ const { children, ...rest } = props;
118
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
119
+ });
120
+
117
121
  const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
118
122
  const { children, ...rest } = props;
119
123
  return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
@@ -146,11 +150,6 @@ const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref)
146
150
  return React.createElement(customElements.getName(AiCriteriaSearchWC) ?? '%%prefix%%-ai-criteria-search', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
147
151
  });
148
152
 
149
- const Accordion = React.forwardRef(function Accordion(props, ref) {
150
- const { children, ...rest } = props;
151
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
152
- });
153
-
154
153
  const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
155
154
  const { children, ...rest } = props;
156
155
  return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
@@ -1092,11 +1091,6 @@ const VerificationCodeInput = React.forwardRef(function VerificationCodeInput(pr
1092
1091
  return React.createElement(customElements.getName(VerificationCodeInputWC) ?? '%%prefix%%-verification-code-input', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
1093
1092
  });
1094
1093
 
1095
- const VerticalDropdownMenu = React.forwardRef(function VerticalDropdownMenu(props, ref) {
1096
- const { children, ...rest } = props;
1097
- return React.createElement(customElements.getName(VerticalDropdownMenuWC) ?? '%%prefix%%-vertical-dropdown-menu', { ...rest, ref }, children);
1098
- });
1099
-
1100
1094
  const DailyRecurrence = React.forwardRef(function DailyRecurrence(props, ref) {
1101
1095
  const { onUpdateCronConfig, children, ...rest } = props;
1102
1096
  const _innerRef = React.useRef(null);
@@ -1149,10 +1143,10 @@ const WeeklyRecurrence = React.forwardRef(function WeeklyRecurrence(props, ref)
1149
1143
  });
1150
1144
 
1151
1145
  module.exports = {
1146
+ Accordion,
1152
1147
  AccordionItem,
1153
1148
  ActionsMenu,
1154
1149
  AiCriteriaSearch,
1155
- Accordion,
1156
1150
  AiIndicator,
1157
1151
  Anchor,
1158
1152
  AnchoredRegion,
@@ -1243,7 +1237,6 @@ module.exports = {
1243
1237
  TreeView,
1244
1238
  UrlInput,
1245
1239
  VerificationCodeInput,
1246
- VerticalDropdownMenu,
1247
1240
  DailyRecurrence,
1248
1241
  MonthlyYearlyRecurrence,
1249
1242
  WeeklyRecurrence,
package/dist/react.mjs CHANGED
@@ -101,7 +101,6 @@ import { Tooltip as TooltipWC } from './esm/tooltip/tooltip.js';
101
101
  import { TreeView as TreeViewWC } from './esm/tree-view/tree-view.js';
102
102
  import { UrlInput as UrlInputWC } from './esm/url-input/url-input.js';
103
103
  import { VerificationCodeInput as VerificationCodeInputWC } from './esm/verification-code-input/verification-code-input.js';
104
- import { VerticalDropdownMenu as VerticalDropdownMenuWC } from './esm/vertical-dropdown-menu/vertical-dropdown-menu.js';
105
104
 
106
105
  function _mergeRefs(...refs) {
107
106
  return (value) => {
@@ -112,6 +111,11 @@ function _mergeRefs(...refs) {
112
111
  };
113
112
  }
114
113
 
114
+ export const Accordion = React.forwardRef(function Accordion(props, ref) {
115
+ const { children, ...rest } = props;
116
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
117
+ });
118
+
115
119
  export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
116
120
  const { children, ...rest } = props;
117
121
  return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
@@ -144,11 +148,6 @@ export const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props
144
148
  return React.createElement(customElements.getName(AiCriteriaSearchWC) ?? '%%prefix%%-ai-criteria-search', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
145
149
  });
146
150
 
147
- export const Accordion = React.forwardRef(function Accordion(props, ref) {
148
- const { children, ...rest } = props;
149
- return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
150
- });
151
-
152
151
  export const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
153
152
  const { children, ...rest } = props;
154
153
  return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
@@ -1090,11 +1089,6 @@ export const VerificationCodeInput = React.forwardRef(function VerificationCodeI
1090
1089
  return React.createElement(customElements.getName(VerificationCodeInputWC) ?? '%%prefix%%-verification-code-input', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
1091
1090
  });
1092
1091
 
1093
- export const VerticalDropdownMenu = React.forwardRef(function VerticalDropdownMenu(props, ref) {
1094
- const { children, ...rest } = props;
1095
- return React.createElement(customElements.getName(VerticalDropdownMenuWC) ?? '%%prefix%%-vertical-dropdown-menu', { ...rest, ref }, children);
1096
- });
1097
-
1098
1092
  export const DailyRecurrence = React.forwardRef(function DailyRecurrence(props, ref) {
1099
1093
  const { onUpdateCronConfig, children, ...rest } = props;
1100
1094
  const _innerRef = React.useRef(null);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-ui",
3
3
  "description": "Genesis Foundation UI",
4
- "version": "15.43.0-FUI-2629.1",
4
+ "version": "15.44.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -85,13 +85,13 @@
85
85
  }
86
86
  },
87
87
  "devDependencies": {
88
- "@genesislcap/foundation-testing": "15.43.0-FUI-2629.1",
89
- "@genesislcap/genx": "15.43.0-FUI-2629.1",
90
- "@genesislcap/rollup-builder": "15.43.0-FUI-2629.1",
91
- "@genesislcap/ts-builder": "15.43.0-FUI-2629.1",
92
- "@genesislcap/uvu-playwright-builder": "15.43.0-FUI-2629.1",
93
- "@genesislcap/vite-builder": "15.43.0-FUI-2629.1",
94
- "@genesislcap/webpack-builder": "15.43.0-FUI-2629.1",
88
+ "@genesislcap/foundation-testing": "15.44.0",
89
+ "@genesislcap/genx": "15.44.0",
90
+ "@genesislcap/rollup-builder": "15.44.0",
91
+ "@genesislcap/ts-builder": "15.44.0",
92
+ "@genesislcap/uvu-playwright-builder": "15.44.0",
93
+ "@genesislcap/vite-builder": "15.44.0",
94
+ "@genesislcap/webpack-builder": "15.44.0",
95
95
  "copyfiles": "^2.4.1"
96
96
  },
97
97
  "dependencies": {
@@ -100,16 +100,16 @@
100
100
  "@fortawesome/free-regular-svg-icons": "^6.2.1",
101
101
  "@fortawesome/free-solid-svg-icons": "^6.2.1",
102
102
  "@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
103
- "@genesislcap/expression-builder": "15.43.0-FUI-2629.1",
104
- "@genesislcap/foundation-ai": "15.43.0-FUI-2629.1",
105
- "@genesislcap/foundation-comms": "15.43.0-FUI-2629.1",
106
- "@genesislcap/foundation-criteria": "15.43.0-FUI-2629.1",
107
- "@genesislcap/foundation-errors": "15.43.0-FUI-2629.1",
108
- "@genesislcap/foundation-events": "15.43.0-FUI-2629.1",
109
- "@genesislcap/foundation-logger": "15.43.0-FUI-2629.1",
110
- "@genesislcap/foundation-notifications": "15.43.0-FUI-2629.1",
111
- "@genesislcap/foundation-user": "15.43.0-FUI-2629.1",
112
- "@genesislcap/foundation-utils": "15.43.0-FUI-2629.1",
103
+ "@genesislcap/expression-builder": "15.44.0",
104
+ "@genesislcap/foundation-ai": "15.44.0",
105
+ "@genesislcap/foundation-comms": "15.44.0",
106
+ "@genesislcap/foundation-criteria": "15.44.0",
107
+ "@genesislcap/foundation-errors": "15.44.0",
108
+ "@genesislcap/foundation-events": "15.44.0",
109
+ "@genesislcap/foundation-logger": "15.44.0",
110
+ "@genesislcap/foundation-notifications": "15.44.0",
111
+ "@genesislcap/foundation-user": "15.44.0",
112
+ "@genesislcap/foundation-utils": "15.44.0",
113
113
  "@microsoft/fast-colors": "5.3.1",
114
114
  "@microsoft/fast-components": "2.30.6",
115
115
  "@microsoft/fast-element": "1.14.0",
@@ -1,26 +0,0 @@
1
- /**
2
- * Walks up from `element`, crossing shadow-root boundaries via `.host`, collecting every
3
- * scrollable ancestor (including the anchor's own document).
4
- * @remarks Native `scroll` events are not `composed`, so they don't cross shadow-DOM boundaries
5
- * the way `click`/`keydown` do — a listener on `document` never sees a shadow-DOM-nested
6
- * viewport's own scroll. Callers must listen on each returned ancestor directly.
7
- * @public
8
- */
9
- export declare function findScrollableAncestors(element: HTMLElement): (HTMLElement | Document)[];
10
- /**
11
- * Keeps a Popover-API element anchored to its trigger while any of the trigger's scrollable
12
- * ancestors scroll, and reports back when the trigger has been removed from the DOM (e.g. AG
13
- * Grid row virtualization recycling the row that owns it).
14
- * @public
15
- */
16
- export declare class AnchoredPopoverPositionTracker {
17
- private readonly anchor;
18
- private readonly onReposition;
19
- private readonly onAnchorDetached;
20
- private ancestors;
21
- private readonly handleScroll;
22
- constructor(anchor: HTMLElement, onReposition: () => void, onAnchorDetached: () => void);
23
- start(): void;
24
- stop(): void;
25
- }
26
- //# sourceMappingURL=popover-position.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"popover-position.d.ts","sourceRoot":"","sources":["../../../src/utils/popover-position.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,WAAW,GAAG,CAAC,WAAW,GAAG,QAAQ,CAAC,EAAE,CA8BxF;AAED;;;;;GAKG;AACH,qBAAa,8BAA8B;IAYvC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAbnC,OAAO,CAAC,SAAS,CAAkC;IAEnD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAM3B;gBAGiB,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,MAAM,IAAI,EACxB,gBAAgB,EAAE,MAAM,IAAI;IAG/C,KAAK,IAAI,IAAI;IAQb,IAAI,IAAI,IAAI;CAMb"}
@@ -1,4 +0,0 @@
1
- export * from './vertical-dropdown-menu.styles';
2
- export * from './vertical-dropdown-menu.template';
3
- export * from './vertical-dropdown-menu';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vertical-dropdown-menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC"}
@@ -1,67 +0,0 @@
1
- import type { IconStyle } from '@fortawesome/fontawesome-svg-core';
2
- import { FoundationElement } from '@microsoft/fast-foundation';
3
- import type { FaSize } from '../icon';
4
- /**
5
- * The Vertical Dropdown Menu Item.
6
- * @remarks Used within the Vertical Dropdown Menu component.
7
- * @public
8
- */
9
- export type VerticalDropdownMenuItem = {
10
- label: string | ((rowData: any) => string);
11
- icon?: {
12
- variant?: IconStyle;
13
- name: string;
14
- size?: FaSize;
15
- };
16
- color?: string;
17
- isDisabled?: (rowData: any) => boolean;
18
- callback: (rowData: any) => void | any;
19
- };
20
- /**
21
- * The Vertical Dropdown Menu component.
22
- * @remarks An icon-only opener (a "kebab") that anchors a menu to itself, for a pinned
23
- * column of per-row actions. Unlike `%%prefix%%-actions-menu`, it renders no button text and
24
- * hides itself entirely when a row has no items.
25
- * @tagname %%prefix%%-vertical-dropdown-menu
26
- * @public
27
- */
28
- export declare class VerticalDropdownMenu extends FoundationElement {
29
- items: VerticalDropdownMenuItem[] | ((rowData: any) => VerticalDropdownMenuItem[]);
30
- definition: any;
31
- classNames: string;
32
- open: boolean;
33
- iconName: string;
34
- buttonAppearance: string;
35
- autoCloseOnAction: boolean;
36
- hideDisabled: boolean;
37
- menuOpener: HTMLElement;
38
- dropdownMenu: HTMLElement;
39
- private positionTracker?;
40
- disconnectedCallback(): void;
41
- protected definitionChanged(oldValue: any, newValue: any): void;
42
- protected openChanged(): void;
43
- private updateMenuPosition;
44
- private startTrackingPosition;
45
- private stopTrackingPosition;
46
- toggleVisibility(): void;
47
- /**
48
- * Syncs `open` when the native `popover="auto"` light-dismiss (outside click / Escape)
49
- * closes the popover without going through `toggleVisibility()`.
50
- */
51
- onPopoverToggle(event: Event): void;
52
- onItemClick(callback: (rowData: any) => void | any): void;
53
- get rowData(): any;
54
- get resolvedItems(): VerticalDropdownMenuItem[];
55
- get visibleItems(): VerticalDropdownMenuItem[];
56
- getLabel(label: string | ((rowData: any) => string)): string;
57
- getTemplate(prefix: string): import("@microsoft/fast-element").ViewTemplate<VerticalDropdownMenu, any>;
58
- }
59
- /**
60
- * The Foundation Vertical Dropdown Menu
61
- *
62
- * @public
63
- * @remarks
64
- * HTML Element: \<foundation-vertical-dropdown-menu\>
65
- */
66
- export declare const foundationVerticalDropdownMenu: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition>) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof VerticalDropdownMenu>;
67
- //# sourceMappingURL=vertical-dropdown-menu.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vertical-dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/vertical-dropdown-menu/vertical-dropdown-menu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAQtC;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,GAAG,KAAK,MAAM,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,SAAS,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC;IACvC,QAAQ,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,GAAG,GAAG,CAAC;CACxC,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,oBAAqB,SAAQ,iBAAiB;IAC7C,KAAK,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,GAAG,KAAK,wBAAwB,EAAE,CAAC,CAAC;IACnF,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACe,IAAI,EAAE,OAAO,CAAS;IAClC,QAAQ,EAAE,MAAM,CAAuB;IACnE,gBAAgB,EAAE,MAAM,CAAC;IAC+B,iBAAiB,EAAE,OAAO,CAAQ;IACzC,YAAY,EAAE,OAAO,CAAS;IAErF,UAAU,EAAG,WAAW,CAAC;IACzB,YAAY,EAAG,WAAW,CAAC;IAE3B,OAAO,CAAC,eAAe,CAAC,CAAiC;IAEzD,oBAAoB,IAAI,IAAI;IAQ5B,SAAS,CAAC,iBAAiB,CAAC,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;IAiBxD,SAAS,CAAC,WAAW;IAerB,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,qBAAqB;IAS7B,OAAO,CAAC,oBAAoB;IAK5B,gBAAgB;IAIhB;;;OAGG;IACH,eAAe,CAAC,KAAK,EAAE,KAAK;IAO5B,WAAW,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,GAAG,GAAG;IAKlD,IAAI,OAAO,QAKV;IAED,IAAI,aAAa,IAAI,wBAAwB,EAAE,CAG9C;IAED,IAAI,YAAY,IAAI,wBAAwB,EAAE,CAG7C;IAED,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,GAAG,KAAK,MAAM,CAAC;IAInD,WAAW,CAAC,MAAM,EAAE,MAAM;CAI3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,oUAIzC,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { ElementStyles } from '@microsoft/fast-element';
2
- import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
3
- export declare const verticalDropdownMenuBaseStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ElementStyles;
4
- export declare const foundationVerticalDropdownMenuStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ElementStyles;
5
- //# sourceMappingURL=vertical-dropdown-menu.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vertical-dropdown-menu.styles.d.ts","sourceRoot":"","sources":["../../../src/vertical-dropdown-menu/vertical-dropdown-menu.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,8BAA8B,GACzC,SAAS,wBAAwB,EACjC,YAAY,2BAA2B,KACtC,aAkDF,CAAC;AAEF,eAAO,MAAM,oCAAoC,GAC/C,SAAS,wBAAwB,EACjC,YAAY,2BAA2B,KACtC,aAEF,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { ViewTemplate } from '@microsoft/fast-element';
2
- import type { VerticalDropdownMenu } from './vertical-dropdown-menu';
3
- export declare const verticalDropdownMenuTemplate: (prefix: string) => ViewTemplate<VerticalDropdownMenu, any>;
4
- export declare const foundationVerticalDropdownMenuTemplate: ViewTemplate<VerticalDropdownMenu>;
5
- //# sourceMappingURL=vertical-dropdown-menu.template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vertical-dropdown-menu.template.d.ts","sourceRoot":"","sources":["../../../src/vertical-dropdown-menu/vertical-dropdown-menu.template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,4BAA4B,GAAI,QAAQ,MAAM,4CAwE1D,CAAC;AAEF,eAAO,MAAM,sCAAsC,EAAE,YAAY,CAAC,oBAAoB,CAIrF,CAAC"}
@@ -1,70 +0,0 @@
1
- /**
2
- * Walks up from `element`, crossing shadow-root boundaries via `.host`, collecting every
3
- * scrollable ancestor (including the anchor's own document).
4
- * @remarks Native `scroll` events are not `composed`, so they don't cross shadow-DOM boundaries
5
- * the way `click`/`keydown` do — a listener on `document` never sees a shadow-DOM-nested
6
- * viewport's own scroll. Callers must listen on each returned ancestor directly.
7
- * @public
8
- */
9
- export function findScrollableAncestors(element) {
10
- var _a;
11
- const ancestors = [];
12
- let node = element.parentNode;
13
- while (node) {
14
- if (node instanceof ShadowRoot) {
15
- node = node.host;
16
- continue;
17
- }
18
- if (node instanceof Document) {
19
- ancestors.push(node);
20
- break;
21
- }
22
- if (node instanceof HTMLElement) {
23
- const style = (_a = node.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.getComputedStyle(node);
24
- if (!style) {
25
- node = node.parentNode;
26
- continue;
27
- }
28
- if (/(auto|scroll|overlay)/.test(style.overflowY) ||
29
- /(auto|scroll|overlay)/.test(style.overflowX)) {
30
- ancestors.push(node);
31
- }
32
- }
33
- node = node.parentNode;
34
- }
35
- return ancestors;
36
- }
37
- /**
38
- * Keeps a Popover-API element anchored to its trigger while any of the trigger's scrollable
39
- * ancestors scroll, and reports back when the trigger has been removed from the DOM (e.g. AG
40
- * Grid row virtualization recycling the row that owns it).
41
- * @public
42
- */
43
- export class AnchoredPopoverPositionTracker {
44
- constructor(anchor, onReposition, onAnchorDetached) {
45
- this.anchor = anchor;
46
- this.onReposition = onReposition;
47
- this.onAnchorDetached = onAnchorDetached;
48
- this.ancestors = [];
49
- this.handleScroll = () => {
50
- if (!this.anchor.isConnected) {
51
- this.onAnchorDetached();
52
- return;
53
- }
54
- this.onReposition();
55
- };
56
- }
57
- start() {
58
- this.stop();
59
- this.ancestors = findScrollableAncestors(this.anchor);
60
- for (const ancestor of this.ancestors) {
61
- ancestor.addEventListener('scroll', this.handleScroll, { passive: true });
62
- }
63
- }
64
- stop() {
65
- for (const ancestor of this.ancestors) {
66
- ancestor.removeEventListener('scroll', this.handleScroll);
67
- }
68
- this.ancestors = [];
69
- }
70
- }
@@ -1,3 +0,0 @@
1
- export * from './vertical-dropdown-menu.styles';
2
- export * from './vertical-dropdown-menu.template';
3
- export * from './vertical-dropdown-menu';
@@ -1,155 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { attr, observable } from '@microsoft/fast-element';
3
- import { FoundationElement } from '@microsoft/fast-foundation';
4
- import { classNames } from '@microsoft/fast-web-utilities';
5
- import { AnchoredPopoverPositionTracker } from '../utils';
6
- import { foundationVerticalDropdownMenuStyles as styles } from './vertical-dropdown-menu.styles';
7
- import { foundationVerticalDropdownMenuTemplate as template, verticalDropdownMenuTemplate, } from './vertical-dropdown-menu.template';
8
- /**
9
- * The Vertical Dropdown Menu component.
10
- * @remarks An icon-only opener (a "kebab") that anchors a menu to itself, for a pinned
11
- * column of per-row actions. Unlike `%%prefix%%-actions-menu`, it renders no button text and
12
- * hides itself entirely when a row has no items.
13
- * @tagname %%prefix%%-vertical-dropdown-menu
14
- * @public
15
- */
16
- export class VerticalDropdownMenu extends FoundationElement {
17
- constructor() {
18
- super(...arguments);
19
- this.open = false;
20
- this.iconName = 'ellipsis-vertical';
21
- this.autoCloseOnAction = true;
22
- this.hideDisabled = false;
23
- }
24
- disconnectedCallback() {
25
- var _a;
26
- this.stopTrackingPosition();
27
- if ((_a = this.dropdownMenu) === null || _a === void 0 ? void 0 : _a.matches(':popover-open')) {
28
- this.dropdownMenu.hidePopover();
29
- }
30
- super.disconnectedCallback();
31
- }
32
- definitionChanged(oldValue, newValue) {
33
- var _a;
34
- if (!newValue)
35
- return;
36
- this.items = (_a = newValue.items) !== null && _a !== void 0 ? _a : [];
37
- delete this.definition.items;
38
- if (newValue.iconName) {
39
- this.iconName = newValue.iconName;
40
- delete this.definition.iconName;
41
- }
42
- if (newValue.buttonAppearance) {
43
- this.buttonAppearance = newValue.buttonAppearance;
44
- delete this.definition.buttonAppearance;
45
- }
46
- }
47
- openChanged() {
48
- var _a;
49
- this.classNames = classNames(['visible', this.open], ['hidden', !this.open]);
50
- if (this.open) {
51
- this.updateMenuPosition();
52
- this.dropdownMenu.showPopover();
53
- this.startTrackingPosition();
54
- }
55
- else {
56
- this.stopTrackingPosition();
57
- if ((_a = this.dropdownMenu) === null || _a === void 0 ? void 0 : _a.matches(':popover-open')) {
58
- this.dropdownMenu.hidePopover();
59
- }
60
- }
61
- }
62
- updateMenuPosition() {
63
- const rect = this.menuOpener.getBoundingClientRect();
64
- this.dropdownMenu.style.position = 'fixed';
65
- this.dropdownMenu.style.top = `${rect.bottom}px`;
66
- this.dropdownMenu.style.left = 'auto';
67
- this.dropdownMenu.style.right = `${window.innerWidth - rect.right}px`;
68
- }
69
- startTrackingPosition() {
70
- this.positionTracker = new AnchoredPopoverPositionTracker(this.menuOpener, () => this.updateMenuPosition(), () => (this.open = false));
71
- this.positionTracker.start();
72
- }
73
- stopTrackingPosition() {
74
- var _a;
75
- (_a = this.positionTracker) === null || _a === void 0 ? void 0 : _a.stop();
76
- this.positionTracker = undefined;
77
- }
78
- toggleVisibility() {
79
- this.open = !this.open;
80
- }
81
- /**
82
- * Syncs `open` when the native `popover="auto"` light-dismiss (outside click / Escape)
83
- * closes the popover without going through `toggleVisibility()`.
84
- */
85
- onPopoverToggle(event) {
86
- const newState = event.newState;
87
- if (newState) {
88
- this.open = newState === 'open';
89
- }
90
- }
91
- onItemClick(callback) {
92
- if (this.autoCloseOnAction)
93
- this.open = false;
94
- callback(this.rowData);
95
- }
96
- get rowData() {
97
- if (!this.definition)
98
- return;
99
- const { node, data } = this.definition;
100
- return (node === null || node === void 0 ? void 0 : node.data) || data;
101
- }
102
- get resolvedItems() {
103
- const items = typeof this.items === 'function' ? this.items(this.rowData) : this.items;
104
- return items !== null && items !== void 0 ? items : [];
105
- }
106
- get visibleItems() {
107
- if (!this.hideDisabled)
108
- return this.resolvedItems;
109
- return this.resolvedItems.filter((item) => { var _a; return !((_a = item.isDisabled) === null || _a === void 0 ? void 0 : _a.call(item, this.rowData)); });
110
- }
111
- getLabel(label) {
112
- return typeof label === 'function' ? label(this.rowData) : label;
113
- }
114
- getTemplate(prefix) {
115
- if (this.visibleItems.length === 0)
116
- return;
117
- return verticalDropdownMenuTemplate(prefix);
118
- }
119
- }
120
- __decorate([
121
- observable
122
- ], VerticalDropdownMenu.prototype, "items", void 0);
123
- __decorate([
124
- observable
125
- ], VerticalDropdownMenu.prototype, "definition", void 0);
126
- __decorate([
127
- observable
128
- ], VerticalDropdownMenu.prototype, "classNames", void 0);
129
- __decorate([
130
- attr({ attribute: 'open', mode: 'boolean' })
131
- ], VerticalDropdownMenu.prototype, "open", void 0);
132
- __decorate([
133
- attr({ attribute: 'icon-name' })
134
- ], VerticalDropdownMenu.prototype, "iconName", void 0);
135
- __decorate([
136
- attr
137
- ], VerticalDropdownMenu.prototype, "buttonAppearance", void 0);
138
- __decorate([
139
- attr({ attribute: 'auto-close-on-action', mode: 'boolean' })
140
- ], VerticalDropdownMenu.prototype, "autoCloseOnAction", void 0);
141
- __decorate([
142
- attr({ attribute: 'hide-disabled', mode: 'boolean' })
143
- ], VerticalDropdownMenu.prototype, "hideDisabled", void 0);
144
- /**
145
- * The Foundation Vertical Dropdown Menu
146
- *
147
- * @public
148
- * @remarks
149
- * HTML Element: \<foundation-vertical-dropdown-menu\>
150
- */
151
- export const foundationVerticalDropdownMenu = VerticalDropdownMenu.compose({
152
- baseName: 'vertical-dropdown-menu',
153
- styles,
154
- template,
155
- });