@deephaven/components 0.74.1-beta.7 → 0.75.1-alpha-listview-actions.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.
Files changed (80) hide show
  1. package/dist/Button.d.ts +1 -1
  2. package/dist/Select.d.ts +1 -1
  3. package/dist/spectrum/ActionGroup.d.ts +14 -0
  4. package/dist/spectrum/ActionGroup.d.ts.map +1 -0
  5. package/dist/spectrum/ActionGroup.js +42 -0
  6. package/dist/spectrum/ActionGroup.js.map +1 -0
  7. package/dist/spectrum/ActionMenu.d.ts +15 -0
  8. package/dist/spectrum/ActionMenu.d.ts.map +1 -0
  9. package/dist/spectrum/ActionMenu.js +35 -0
  10. package/dist/spectrum/ActionMenu.js.map +1 -0
  11. package/dist/spectrum/ListActionGroup.d.ts +19 -0
  12. package/dist/spectrum/ListActionGroup.d.ts.map +1 -0
  13. package/dist/spectrum/ListActionGroup.js +9 -0
  14. package/dist/spectrum/ListActionGroup.js.map +1 -0
  15. package/dist/spectrum/ListActionMenu.d.ts +19 -0
  16. package/dist/spectrum/ListActionMenu.d.ts.map +1 -0
  17. package/dist/spectrum/ListActionMenu.js +9 -0
  18. package/dist/spectrum/ListActionMenu.js.map +1 -0
  19. package/dist/spectrum/buttons.d.ts +1 -1
  20. package/dist/spectrum/buttons.d.ts.map +1 -1
  21. package/dist/spectrum/buttons.js +1 -1
  22. package/dist/spectrum/buttons.js.map +1 -1
  23. package/dist/spectrum/collections.d.ts +1 -1
  24. package/dist/spectrum/collections.d.ts.map +1 -1
  25. package/dist/spectrum/collections.js +1 -1
  26. package/dist/spectrum/collections.js.map +1 -1
  27. package/dist/spectrum/index.d.ts +4 -0
  28. package/dist/spectrum/index.d.ts.map +1 -1
  29. package/dist/spectrum/index.js +4 -0
  30. package/dist/spectrum/index.js.map +1 -1
  31. package/dist/spectrum/listView/ListView.d.ts +4 -18
  32. package/dist/spectrum/listView/ListView.d.ts.map +1 -1
  33. package/dist/spectrum/listView/ListView.js +10 -63
  34. package/dist/spectrum/listView/ListView.js.map +1 -1
  35. package/dist/spectrum/listView/ListViewNormalized.d.ts +23 -0
  36. package/dist/spectrum/listView/ListViewNormalized.d.ts.map +1 -0
  37. package/dist/spectrum/listView/ListViewNormalized.js +82 -0
  38. package/dist/spectrum/listView/ListViewNormalized.js.map +1 -0
  39. package/dist/spectrum/listView/ListViewWrapper.css +39 -0
  40. package/dist/spectrum/listView/ListViewWrapper.css.map +1 -0
  41. package/dist/spectrum/listView/ListViewWrapper.d.ts +21 -0
  42. package/dist/spectrum/listView/ListViewWrapper.d.ts.map +1 -0
  43. package/dist/spectrum/listView/ListViewWrapper.js +71 -0
  44. package/dist/spectrum/listView/ListViewWrapper.js.map +1 -0
  45. package/dist/spectrum/listView/index.d.ts +2 -0
  46. package/dist/spectrum/listView/index.d.ts.map +1 -1
  47. package/dist/spectrum/listView/index.js +2 -0
  48. package/dist/spectrum/listView/index.js.map +1 -1
  49. package/dist/spectrum/picker/Picker.d.ts.map +1 -1
  50. package/dist/spectrum/picker/Picker.js +2 -2
  51. package/dist/spectrum/picker/Picker.js.map +1 -1
  52. package/dist/spectrum/picker/PickerNormalized.d.ts +2 -1
  53. package/dist/spectrum/picker/PickerNormalized.d.ts.map +1 -1
  54. package/dist/spectrum/picker/PickerNormalized.js +31 -15
  55. package/dist/spectrum/picker/PickerNormalized.js.map +1 -1
  56. package/dist/spectrum/shared.d.ts +15 -9
  57. package/dist/spectrum/shared.d.ts.map +1 -1
  58. package/dist/spectrum/shared.js +16 -1
  59. package/dist/spectrum/shared.js.map +1 -1
  60. package/dist/spectrum/utils/index.d.ts +1 -0
  61. package/dist/spectrum/utils/index.d.ts.map +1 -1
  62. package/dist/spectrum/utils/index.js +1 -0
  63. package/dist/spectrum/utils/index.js.map +1 -1
  64. package/dist/spectrum/utils/itemUtils.d.ts +29 -17
  65. package/dist/spectrum/utils/itemUtils.d.ts.map +1 -1
  66. package/dist/spectrum/utils/itemUtils.js +8 -108
  67. package/dist/spectrum/utils/itemUtils.js.map +1 -1
  68. package/dist/spectrum/utils/itemWrapperUtils.d.ts +19 -3
  69. package/dist/spectrum/utils/itemWrapperUtils.d.ts.map +1 -1
  70. package/dist/spectrum/utils/itemWrapperUtils.js +65 -19
  71. package/dist/spectrum/utils/itemWrapperUtils.js.map +1 -1
  72. package/dist/spectrum/utils/propsUtils.d.ts +14 -0
  73. package/dist/spectrum/utils/propsUtils.d.ts.map +1 -0
  74. package/dist/spectrum/utils/propsUtils.js +93 -0
  75. package/dist/spectrum/utils/propsUtils.js.map +1 -0
  76. package/dist/spectrum/utils/useRenderNormalizedItem.d.ts +17 -3
  77. package/dist/spectrum/utils/useRenderNormalizedItem.d.ts.map +1 -1
  78. package/dist/spectrum/utils/useRenderNormalizedItem.js +57 -10
  79. package/dist/spectrum/utils/useRenderNormalizedItem.js.map +1 -1
  80. package/package.json +8 -8
@@ -1,4 +1,14 @@
1
- import { ItemElement, ItemOrSection, SectionElement, TooltipOptions } from './itemUtils';
1
+ import { ReactNode } from 'react';
2
+ import { ItemElement, ItemIconSlot, ItemOrSection, SectionElement, TooltipOptions } from './itemUtils';
3
+ /**
4
+ * If the given content is a string, wrap it in an Icon component. Otherwise,
5
+ * return the original content. If the key is not found in the dhIcons object,
6
+ * the vsBlank icon will be used.
7
+ * @param maybeIconKey The content to wrap
8
+ * @param slot The slot to use for the Icon component
9
+ * @returns The wrapped content or original content if not a string
10
+ */
11
+ export declare function wrapIcon(maybeIconKey: ReactNode, slot: ItemIconSlot): ReactNode;
2
12
  /**
3
13
  * Ensure all primitive children are wrapped in `Item` elements and that all
4
14
  * `Item` element content is wrapped in `ItemContent` elements to handle text
@@ -7,6 +17,12 @@ import { ItemElement, ItemOrSection, SectionElement, TooltipOptions } from './it
7
17
  * @param tooltipOptions The tooltip options to use when wrapping items
8
18
  * @returns The wrapped items or sections
9
19
  */
10
- export declare function wrapItemChildren(itemsOrSections: ItemOrSection | ItemOrSection[], tooltipOptions: TooltipOptions | null): (ItemElement | SectionElement)[];
11
- export default wrapItemChildren;
20
+ export declare function wrapItemChildren<T>(itemsOrSections: ItemOrSection<T> | ItemOrSection<T>[], tooltipOptions: TooltipOptions | null): ItemElement<T> | SectionElement<T> | (ItemElement<T> | SectionElement<T>)[];
21
+ /**
22
+ * If the given content is a primitive type, wrap it in a Text component.
23
+ * @param content The content to wrap
24
+ * @param slot The slot to use for the Text component
25
+ * @returns The wrapped content or original content if not a primitive type
26
+ */
27
+ export declare function wrapPrimitiveWithText(content?: ReactNode, slot?: string): ReactNode;
12
28
  //# sourceMappingURL=itemWrapperUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"itemWrapperUtils.d.ts","sourceRoot":"","sources":["../../../src/spectrum/utils/itemWrapperUtils.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGL,WAAW,EACX,aAAa,EAEb,cAAc,EACd,cAAc,EACf,MAAM,aAAa,CAAC;AAIrB;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,eAAe,EAAE,aAAa,GAAG,aAAa,EAAE,EAChD,cAAc,EAAE,cAAc,GAAG,IAAI,GACpC,CAAC,WAAW,GAAG,cAAc,CAAC,EAAE,CA8DlC;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"itemWrapperUtils.d.ts","sourceRoot":"","sources":["../../../src/spectrum/utils/itemWrapperUtils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AAMhD,OAAO,EAGL,WAAW,EACX,YAAY,EACZ,aAAa,EAEb,cAAc,EACd,cAAc,EACf,MAAM,aAAa,CAAC;AAKrB;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,YAAY,EAAE,SAAS,EACvB,IAAI,EAAE,YAAY,GACjB,SAAS,CAaX;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,eAAe,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,EAAE,EACtD,cAAc,EAAE,cAAc,GAAG,IAAI,GACpC,WAAW,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAoD7E;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,CAAC,EAAE,SAAS,EACnB,IAAI,CAAC,EAAE,MAAM,GACZ,SAAS,CAeX"}
@@ -5,9 +5,38 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
5
5
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
6
6
  import { cloneElement } from 'react';
7
7
  import { Item } from '@adobe/react-spectrum';
8
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
9
+ import { dh as dhIcons } from '@deephaven/icons';
8
10
  import { isElementOfType } from '@deephaven/react-hooks';
11
+ import { ensureArray, NON_BREAKING_SPACE } from '@deephaven/utils';
9
12
  import { isItemElement, isSectionElement, ITEM_EMPTY_STRING_TEXT_VALUE } from "./itemUtils.js";
10
- import ItemContent from "../ItemContent.js";
13
+ import { ItemContent } from "../ItemContent.js";
14
+ import { Icon } from "../icons.js";
15
+ import { Text } from "../Text.js";
16
+ /**
17
+ * If the given content is a string, wrap it in an Icon component. Otherwise,
18
+ * return the original content. If the key is not found in the dhIcons object,
19
+ * the vsBlank icon will be used.
20
+ * @param maybeIconKey The content to wrap
21
+ * @param slot The slot to use for the Icon component
22
+ * @returns The wrapped content or original content if not a string
23
+ */
24
+ import { jsx as _jsx } from "react/jsx-runtime";
25
+ export function wrapIcon(maybeIconKey, slot) {
26
+ var _maybeIconKey, _dhIcons$maybeIconKey;
27
+ // eslint-disable-next-line no-param-reassign
28
+ maybeIconKey = (_maybeIconKey = maybeIconKey) !== null && _maybeIconKey !== void 0 ? _maybeIconKey : '';
29
+ if (typeof maybeIconKey !== 'string') {
30
+ return maybeIconKey;
31
+ }
32
+ return /*#__PURE__*/_jsx(Icon, {
33
+ slot: slot,
34
+ children: /*#__PURE__*/_jsx(FontAwesomeIcon, {
35
+ icon: (_dhIcons$maybeIconKey = dhIcons[maybeIconKey]) !== null && _dhIcons$maybeIconKey !== void 0 ? _dhIcons$maybeIconKey : dhIcons.vsBlank
36
+ })
37
+ });
38
+ }
39
+
11
40
  /**
12
41
  * Ensure all primitive children are wrapped in `Item` elements and that all
13
42
  * `Item` element content is wrapped in `ItemContent` elements to handle text
@@ -16,10 +45,9 @@ import ItemContent from "../ItemContent.js";
16
45
  * @param tooltipOptions The tooltip options to use when wrapping items
17
46
  * @returns The wrapped items or sections
18
47
  */
19
- import { jsx as _jsx } from "react/jsx-runtime";
20
48
  export function wrapItemChildren(itemsOrSections, tooltipOptions) {
21
- var itemsOrSectionsArray = Array.isArray(itemsOrSections) ? itemsOrSections : [itemsOrSections];
22
- return itemsOrSectionsArray.map(item => {
49
+ var itemsOrSectionsArray = ensureArray(itemsOrSections);
50
+ var result = itemsOrSectionsArray.map(item => {
23
51
  if (isItemElement(item)) {
24
52
  var _item$key;
25
53
  // Item content is already wrapped
@@ -27,13 +55,13 @@ export function wrapItemChildren(itemsOrSections, tooltipOptions) {
27
55
  return item;
28
56
  }
29
57
  var key = (_item$key = item.key) !== null && _item$key !== void 0 ? _item$key : item.props.textValue;
30
- var textValue = item.props.textValue === '' ? ITEM_EMPTY_STRING_TEXT_VALUE : item.props.textValue;
58
+ var _textValue = item.props.textValue === '' ? ITEM_EMPTY_STRING_TEXT_VALUE : item.props.textValue;
31
59
 
32
60
  // Wrap in `ItemContent` so we can support tooltips and handle text
33
61
  // overflow
34
62
  return /*#__PURE__*/cloneElement(item, _objectSpread(_objectSpread({}, item.props), {}, {
35
63
  key,
36
- textValue,
64
+ textValue: _textValue,
37
65
  children: /*#__PURE__*/_jsx(ItemContent, {
38
66
  tooltipOptions: tooltipOptions,
39
67
  children: item.props.children
@@ -47,19 +75,37 @@ export function wrapItemChildren(itemsOrSections, tooltipOptions) {
47
75
  children: wrapItemChildren(item.props.children, tooltipOptions)
48
76
  }));
49
77
  }
50
- if (typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean') {
51
- var text = String(item);
52
- var _textValue = text === '' ? ITEM_EMPTY_STRING_TEXT_VALUE : text;
53
- return /*#__PURE__*/_jsx(Item, {
54
- textValue: _textValue,
55
- children: /*#__PURE__*/_jsx(ItemContent, {
56
- tooltipOptions: tooltipOptions,
57
- children: text
58
- })
59
- }, text);
60
- }
61
- return item;
78
+ var text = String(item);
79
+ var textValue = text === '' ? ITEM_EMPTY_STRING_TEXT_VALUE : text;
80
+ return /*#__PURE__*/_jsx(Item, {
81
+ textValue: textValue,
82
+ children: /*#__PURE__*/_jsx(ItemContent, {
83
+ tooltipOptions: tooltipOptions,
84
+ children: text
85
+ })
86
+ }, text);
62
87
  });
88
+
89
+ // Keep consistent with original data structure as array or single node
90
+ return Array.isArray(itemsOrSections) ? result : result[0];
91
+ }
92
+
93
+ /**
94
+ * If the given content is a primitive type, wrap it in a Text component.
95
+ * @param content The content to wrap
96
+ * @param slot The slot to use for the Text component
97
+ * @returns The wrapped content or original content if not a primitive type
98
+ */
99
+ export function wrapPrimitiveWithText(content, slot) {
100
+ var _content;
101
+ // eslint-disable-next-line no-param-reassign
102
+ content = (_content = content) !== null && _content !== void 0 ? _content : '';
103
+ if (['string', 'boolean', 'number'].includes(typeof content)) {
104
+ return /*#__PURE__*/_jsx(Text, {
105
+ slot: slot,
106
+ children: content === '' ? NON_BREAKING_SPACE : String(content)
107
+ });
108
+ }
109
+ return content;
63
110
  }
64
- export default wrapItemChildren;
65
111
  //# sourceMappingURL=itemWrapperUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"itemWrapperUtils.js","names":["cloneElement","Item","isElementOfType","isItemElement","isSectionElement","ITEM_EMPTY_STRING_TEXT_VALUE","ItemContent","jsx","_jsx","wrapItemChildren","itemsOrSections","tooltipOptions","itemsOrSectionsArray","Array","isArray","map","item","_item$key","props","children","key","textValue","_objectSpread","_item$key2","title","undefined","text","String"],"sources":["../../../src/spectrum/utils/itemWrapperUtils.tsx"],"sourcesContent":["import { cloneElement, ReactElement } from 'react';\nimport { Item } from '@adobe/react-spectrum';\nimport { isElementOfType } from '@deephaven/react-hooks';\nimport {\n isItemElement,\n isSectionElement,\n ItemElement,\n ItemOrSection,\n ITEM_EMPTY_STRING_TEXT_VALUE,\n SectionElement,\n TooltipOptions,\n} from './itemUtils';\nimport { ItemProps } from '../shared';\nimport ItemContent from '../ItemContent';\n\n/**\n * Ensure all primitive children are wrapped in `Item` elements and that all\n * `Item` element content is wrapped in `ItemContent` elements to handle text\n * overflow consistently and to support tooltips.\n * @param itemsOrSections The items or sections to wrap\n * @param tooltipOptions The tooltip options to use when wrapping items\n * @returns The wrapped items or sections\n */\nexport function wrapItemChildren(\n itemsOrSections: ItemOrSection | ItemOrSection[],\n tooltipOptions: TooltipOptions | null\n): (ItemElement | SectionElement)[] {\n const itemsOrSectionsArray = Array.isArray(itemsOrSections)\n ? itemsOrSections\n : [itemsOrSections];\n\n return itemsOrSectionsArray.map(item => {\n if (isItemElement(item)) {\n // Item content is already wrapped\n if (isElementOfType(item.props.children, ItemContent)) {\n return item;\n }\n\n const key = item.key ?? item.props.textValue;\n const textValue =\n item.props.textValue === ''\n ? ITEM_EMPTY_STRING_TEXT_VALUE\n : item.props.textValue;\n\n // Wrap in `ItemContent` so we can support tooltips and handle text\n // overflow\n return cloneElement(item, {\n ...item.props,\n key,\n textValue,\n children: (\n <ItemContent tooltipOptions={tooltipOptions}>\n {item.props.children}\n </ItemContent>\n ),\n });\n }\n\n if (isSectionElement(item)) {\n return cloneElement(item, {\n ...item.props,\n key:\n item.key ??\n (typeof item.props.title === 'string' ? item.props.title : undefined),\n children: wrapItemChildren(\n item.props.children,\n tooltipOptions\n ) as ReactElement<ItemProps<unknown>>[],\n });\n }\n\n if (\n typeof item === 'string' ||\n typeof item === 'number' ||\n typeof item === 'boolean'\n ) {\n const text = String(item);\n const textValue = text === '' ? ITEM_EMPTY_STRING_TEXT_VALUE : text;\n\n return (\n <Item key={text} textValue={textValue}>\n <ItemContent tooltipOptions={tooltipOptions}>{text}</ItemContent>\n </Item>\n );\n }\n\n return item;\n });\n}\n\nexport default wrapItemChildren;\n"],"mappings":";;;;;AAAA,SAASA,YAAY,QAAsB,OAAO;AAClD,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,eAAe,QAAQ,wBAAwB;AAAC,SAEvDC,aAAa,EACbC,gBAAgB,EAGhBC,4BAA4B;AAAA,OAKvBC,WAAW;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,SAAAC,GAAA,IAAAC,IAAA;AAQA,OAAO,SAASC,gBAAgBA,CAC9BC,eAAgD,EAChDC,cAAqC,EACH;EAClC,IAAMC,oBAAoB,GAAGC,KAAK,CAACC,OAAO,CAACJ,eAAe,CAAC,GACvDA,eAAe,GACf,CAACA,eAAe,CAAC;EAErB,OAAOE,oBAAoB,CAACG,GAAG,CAACC,IAAI,IAAI;IACtC,IAAIb,aAAa,CAACa,IAAI,CAAC,EAAE;MAAA,IAAAC,SAAA;MACvB;MACA,IAAIf,eAAe,CAACc,IAAI,CAACE,KAAK,CAACC,QAAQ,EAAEb,WAAW,CAAC,EAAE;QACrD,OAAOU,IAAI;MACb;MAEA,IAAMI,GAAG,IAAAH,SAAA,GAAGD,IAAI,CAACI,GAAG,cAAAH,SAAA,cAAAA,SAAA,GAAID,IAAI,CAACE,KAAK,CAACG,SAAS;MAC5C,IAAMA,SAAS,GACbL,IAAI,CAACE,KAAK,CAACG,SAAS,KAAK,EAAE,GACvBhB,4BAA4B,GAC5BW,IAAI,CAACE,KAAK,CAACG,SAAS;;MAE1B;MACA;MACA,oB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h","dhIcons","isElementOfType","ensureArray","NON_BREAKING_SPACE","isItemElement","isSectionElement","ITEM_EMPTY_STRING_TEXT_VALUE","ItemContent","Icon","Text","jsx","_jsx","wrapIcon","maybeIconKey","slot","_maybeIconKey","_dhIcons$maybeIconKey","children","icon","vsBlank","wrapItemChildren","itemsOrSections","tooltipOptions","itemsOrSectionsArray","result","map","item","_item$key","props","key","textValue","_objectSpread","_item$key2","title","undefined","text","String","Array","isArray","wrapPrimitiveWithText","content","_content","includes"],"sources":["../../../src/spectrum/utils/itemWrapperUtils.tsx"],"sourcesContent":["import { cloneElement, ReactNode } from 'react';\nimport { Item } from '@adobe/react-spectrum';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { dh as dhIcons } from '@deephaven/icons';\nimport { isElementOfType } from '@deephaven/react-hooks';\nimport { ensureArray, NON_BREAKING_SPACE } from '@deephaven/utils';\nimport {\n isItemElement,\n isSectionElement,\n ItemElement,\n ItemIconSlot,\n ItemOrSection,\n ITEM_EMPTY_STRING_TEXT_VALUE,\n SectionElement,\n TooltipOptions,\n} from './itemUtils';\nimport { ItemContent } from '../ItemContent';\nimport { Icon } from '../icons';\nimport { Text } from '../Text';\n\n/**\n * If the given content is a string, wrap it in an Icon component. Otherwise,\n * return the original content. If the key is not found in the dhIcons object,\n * the vsBlank icon will be used.\n * @param maybeIconKey The content to wrap\n * @param slot The slot to use for the Icon component\n * @returns The wrapped content or original content if not a string\n */\nexport function wrapIcon(\n maybeIconKey: ReactNode,\n slot: ItemIconSlot\n): ReactNode {\n // eslint-disable-next-line no-param-reassign\n maybeIconKey = maybeIconKey ?? '';\n\n if (typeof maybeIconKey !== 'string') {\n return maybeIconKey;\n }\n\n return (\n <Icon slot={slot}>\n <FontAwesomeIcon icon={dhIcons[maybeIconKey] ?? dhIcons.vsBlank} />\n </Icon>\n );\n}\n\n/**\n * Ensure all primitive children are wrapped in `Item` elements and that all\n * `Item` element content is wrapped in `ItemContent` elements to handle text\n * overflow consistently and to support tooltips.\n * @param itemsOrSections The items or sections to wrap\n * @param tooltipOptions The tooltip options to use when wrapping items\n * @returns The wrapped items or sections\n */\nexport function wrapItemChildren<T>(\n itemsOrSections: ItemOrSection<T> | ItemOrSection<T>[],\n tooltipOptions: TooltipOptions | null\n): ItemElement<T> | SectionElement<T> | (ItemElement<T> | SectionElement<T>)[] {\n const itemsOrSectionsArray = ensureArray(itemsOrSections);\n\n const result = itemsOrSectionsArray.map(item => {\n if (isItemElement(item)) {\n // Item content is already wrapped\n if (isElementOfType(item.props.children, ItemContent)) {\n return item;\n }\n\n const key = item.key ?? item.props.textValue;\n const textValue =\n item.props.textValue === ''\n ? ITEM_EMPTY_STRING_TEXT_VALUE\n : item.props.textValue;\n\n // Wrap in `ItemContent` so we can support tooltips and handle text\n // overflow\n return cloneElement(item, {\n ...item.props,\n key,\n textValue,\n children: (\n <ItemContent tooltipOptions={tooltipOptions}>\n {item.props.children}\n </ItemContent>\n ),\n });\n }\n\n if (isSectionElement(item)) {\n return cloneElement(item, {\n ...item.props,\n key:\n item.key ??\n (typeof item.props.title === 'string' ? item.props.title : undefined),\n children: wrapItemChildren<T>(item.props.children, tooltipOptions),\n });\n }\n\n const text = String(item);\n const textValue = text === '' ? ITEM_EMPTY_STRING_TEXT_VALUE : text;\n\n return (\n <Item key={text} textValue={textValue}>\n <ItemContent tooltipOptions={tooltipOptions}>{text}</ItemContent>\n </Item>\n );\n });\n\n // Keep consistent with original data structure as array or single node\n return Array.isArray(itemsOrSections) ? result : result[0];\n}\n\n/**\n * If the given content is a primitive type, wrap it in a Text component.\n * @param content The content to wrap\n * @param slot The slot to use for the Text component\n * @returns The wrapped content or original content if not a primitive type\n */\nexport function wrapPrimitiveWithText(\n content?: ReactNode,\n slot?: string\n): ReactNode {\n // eslint-disable-next-line no-param-reassign\n content = content ?? '';\n\n if (['string', 'boolean', 'number'].includes(typeof content)) {\n return (\n <Text slot={slot}>\n {/* Non-breaking space is needed to avoid the Text element's height \n collapsing when content is empty */}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AAG6B,IAAI;IAEnE,oBACExB,IAAA,CAACd,IAAI;MAAYiC,SAAS,EAAEA,SAAU;MAAAb,QAAA,eACpCN,IAAA,CAACJ,WAAW;QAACe,cAAc,EAAEA,cAAe;QAAAL,QAAA,EAAEkB;MAAI,CAAc;IAAC,GADxDA,IAEL,CAAC;EAEX,CAAC,CAAC;;EAEF;EACA,OAAOE,KAAK,CAACC,OAAO,CAACjB,eAAe,CAAC,GAAGG,MAAM,GAAGA,MAAM,CAAC,CAAC,CAAC;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASe,qBAAqBA,CACnCC,OAAmB,EACnB1B,IAAa,EACF;EAAA,IAAA2B,QAAA;EACX;EACAD,OAAO,IAAAC,QAAA,GAAGD,OAAO,cAAAC,QAAA,cAAAA,QAAA,GAAI,EAAE;EAEvB,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAACC,QAAQ,CAAC,OAAOF,OAAO,CAAC,EAAE;IAC5D,oBACE7B,IAAA,CAACF,IAAI;MAACK,IAAI,EAAEA,IAAK;MAAAG,QAAA,EAGduB,OAAO,KAAK,EAAE,GAAGrC,kBAAkB,GAAGiC,MAAM,CAACI,OAAO;IAAC,CAClD,CAAC;EAEX;EAEA,OAAOA,OAAO;AAChB"}
@@ -0,0 +1,14 @@
1
+ import type { AriaLabelingProps, StyleProps } from '@react-types/shared';
2
+ /**
3
+ * Separate props for Spectrum components into AriaLabelingProps, StyleProps, and
4
+ * any remaining props.
5
+ * @param props The props to separate
6
+ * @returns The separated props
7
+ */
8
+ export declare function separateSpectrumProps<T extends AriaLabelingProps & StyleProps>(props: T): {
9
+ ariaLabelProps: AriaLabelingProps;
10
+ styleProps: StyleProps;
11
+ componentProps: Omit<T, keyof (AriaLabelingProps & StyleProps)>;
12
+ };
13
+ export default separateSpectrumProps;
14
+ //# sourceMappingURL=propsUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propsUtils.d.ts","sourceRoot":"","sources":["../../../src/spectrum/utils/propsUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEzE;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,iBAAiB,GAAG,UAAU,EAC5E,KAAK,EAAE,CAAC,GACP;IACD,cAAc,EAAE,iBAAiB,CAAC;IAClC,UAAU,EAAE,UAAU,CAAC;IACvB,cAAc,EAAE,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,iBAAiB,GAAG,UAAU,CAAC,CAAC,CAAC;CACjE,CAsFA;AAED,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,93 @@
1
+ var _excluded = ["aria-label", "aria-labelledby", "aria-describedby", "aria-details", "marginX", "marginY", "width", "height", "minWidth", "minHeight", "maxWidth", "maxHeight", "flex", "flexGrow", "flexShrink", "flexBasis", "justifySelf", "alignSelf", "order", "gridArea", "gridColumn", "gridRow", "gridColumnStart", "gridColumnEnd", "gridRowStart", "gridRowEnd", "position", "zIndex", "top", "bottom", "start", "end", "left", "right", "isHidden"];
2
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
3
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4
+ /**
5
+ * Separate props for Spectrum components into AriaLabelingProps, StyleProps, and
6
+ * any remaining props.
7
+ * @param props The props to separate
8
+ * @returns The separated props
9
+ */
10
+ export function separateSpectrumProps(props) {
11
+ var {
12
+ 'aria-label': ariaLabel,
13
+ 'aria-labelledby': ariaLabelledby,
14
+ 'aria-describedby': ariaDescribedby,
15
+ 'aria-details': ariaHidden,
16
+ marginX,
17
+ marginY,
18
+ width,
19
+ height,
20
+ minWidth,
21
+ minHeight,
22
+ maxWidth,
23
+ maxHeight,
24
+ flex,
25
+ flexGrow,
26
+ flexShrink,
27
+ flexBasis,
28
+ justifySelf,
29
+ alignSelf,
30
+ order,
31
+ gridArea,
32
+ gridColumn,
33
+ gridRow,
34
+ gridColumnStart,
35
+ gridColumnEnd,
36
+ gridRowStart,
37
+ gridRowEnd,
38
+ position,
39
+ zIndex,
40
+ top,
41
+ bottom,
42
+ start,
43
+ end,
44
+ left,
45
+ right,
46
+ isHidden
47
+ } = props,
48
+ componentProps = _objectWithoutProperties(props, _excluded);
49
+ return {
50
+ ariaLabelProps: {
51
+ 'aria-label': ariaLabel,
52
+ 'aria-labelledby': ariaLabelledby,
53
+ 'aria-describedby': ariaDescribedby,
54
+ 'aria-details': ariaHidden
55
+ },
56
+ styleProps: {
57
+ marginX,
58
+ marginY,
59
+ width,
60
+ height,
61
+ minWidth,
62
+ minHeight,
63
+ maxWidth,
64
+ maxHeight,
65
+ flex,
66
+ flexGrow,
67
+ flexShrink,
68
+ flexBasis,
69
+ justifySelf,
70
+ alignSelf,
71
+ order,
72
+ gridArea,
73
+ gridColumn,
74
+ gridRow,
75
+ gridColumnStart,
76
+ gridColumnEnd,
77
+ gridRowStart,
78
+ gridRowEnd,
79
+ position,
80
+ zIndex,
81
+ top,
82
+ bottom,
83
+ start,
84
+ end,
85
+ left,
86
+ right,
87
+ isHidden
88
+ },
89
+ componentProps: componentProps
90
+ };
91
+ }
92
+ export default separateSpectrumProps;
93
+ //# sourceMappingURL=propsUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propsUtils.js","names":["separateSpectrumProps","props","ariaLabel","ariaLabelledby","ariaDescribedby","ariaHidden","marginX","marginY","width","height","minWidth","minHeight","maxWidth","maxHeight","flex","flexGrow","flexShrink","flexBasis","justifySelf","alignSelf","order","gridArea","gridColumn","gridRow","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","position","zIndex","top","bottom","start","end","left","right","isHidden","componentProps","_objectWithoutProperties","_excluded","ariaLabelProps","styleProps"],"sources":["../../../src/spectrum/utils/propsUtils.ts"],"sourcesContent":["import type { AriaLabelingProps, StyleProps } from '@react-types/shared';\n\n/**\n * Separate props for Spectrum components into AriaLabelingProps, StyleProps, and\n * any remaining props.\n * @param props The props to separate\n * @returns The separated props\n */\nexport function separateSpectrumProps<T extends AriaLabelingProps & StyleProps>(\n props: T\n): {\n ariaLabelProps: AriaLabelingProps;\n styleProps: StyleProps;\n componentProps: Omit<T, keyof (AriaLabelingProps & StyleProps)>;\n} {\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaHidden,\n\n marginX,\n marginY,\n width,\n height,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n flexGrow,\n flexShrink,\n flexBasis,\n justifySelf,\n alignSelf,\n order,\n gridArea,\n gridColumn,\n gridRow,\n gridColumnStart,\n gridColumnEnd,\n gridRowStart,\n gridRowEnd,\n position,\n zIndex,\n top,\n bottom,\n start,\n end,\n left,\n right,\n isHidden,\n ...componentProps\n } = props;\n\n return {\n ariaLabelProps: {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaHidden,\n },\n styleProps: {\n marginX,\n marginY,\n width,\n height,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n flexGrow,\n flexShrink,\n flexBasis,\n justifySelf,\n alignSelf,\n order,\n gridArea,\n gridColumn,\n gridRow,\n gridColumnStart,\n gridColumnEnd,\n gridRowStart,\n gridRowEnd,\n position,\n zIndex,\n top,\n bottom,\n start,\n end,\n left,\n right,\n isHidden,\n },\n componentProps: componentProps as Omit<\n T,\n keyof (AriaLabelingProps & StyleProps)\n >,\n };\n}\n\nexport default separateSpectrumProps;\n"],"mappings":";;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,qBAAqBA,CACnCC,KAAQ,EAKR;EACA,IAAM;MACJ,YAAY,EAAEC,SAAS;MACvB,iBAAiB,EAAEC,cAAc;MACjC,kBAAkB,EAAEC,eAAe;MACnC,cAAc,EAAEC,UAAU;MAE1BC,OAAO;MACPC,OAAO;MACPC,KAAK;MACLC,MAAM;MACNC,QAAQ;MACRC,SAAS;MACTC,QAAQ;MACRC,SAAS;MACTC,IAAI;MACJC,QAAQ;MACRC,UAAU;MACVC,SAAS;MACTC,WAAW;MACXC,SAAS;MACTC,KAAK;MACLC,QAAQ;MACRC,UAAU;MACVC,OAAO;MACPC,eAAe;MACfC,aAAa;MACbC,YAAY;MACZC,UAAU;MACVC,QAAQ;MACRC,MAAM;MACNC,GAAG;MACHC,MAAM;MACNC,KAAK;MACLC,GAAG;MACHC,IAAI;MACJC,KAAK;MACLC;IAEF,CAAC,GAAGnC,KAAK;IADJoC,cAAc,GAAAC,wBAAA,CACfrC,KAAK,EAAAsC,SAAA;EAET,OAAO;IACLC,cAAc,EAAE;MACd,YAAY,EAAEtC,SAAS;MACvB,iBAAiB,EAAEC,cAAc;MACjC,kBAAkB,EAAEC,eAAe;MACnC,cAAc,EAAEC;IAClB,CAAC;IACDoC,UAAU,EAAE;MACVnC,OAAO;MACPC,OAAO;MACPC,KAAK;MACLC,MAAM;MACNC,QAAQ;MACRC,SAAS;MACTC,QAAQ;MACRC,SAAS;MACTC,IAAI;MACJC,QAAQ;MACRC,UAAU;MACVC,SAAS;MACTC,WAAW;MACXC,SAAS;MACTC,KAAK;MACLC,QAAQ;MACRC,UAAU;MACVC,OAAO;MACPC,eAAe;MACfC,aAAa;MACbC,YAAY;MACZC,UAAU;MACVC,QAAQ;MACRC,MAAM;MACNC,GAAG;MACHC,MAAM;MACNC,KAAK;MACLC,GAAG;MACHC,IAAI;MACJC,KAAK;MACLC;IACF,CAAC;IACDC,cAAc,EAAEA;EAIlB,CAAC;AACH;AAEA,eAAerC,qBAAqB"}
@@ -1,11 +1,25 @@
1
- /// <reference types="react" />
2
- import { NormalizedItem, TooltipOptions } from './itemUtils';
1
+ import { ReactElement } from 'react';
2
+ import { ListActionGroupProps } from '../ListActionGroup';
3
+ import { ListActionMenuProps } from '../ListActionMenu';
4
+ import { ItemIconSlot, NormalizedItem, TooltipOptions } from './itemUtils';
5
+ export type ListActions<T> = ReactElement<ListActionGroupProps<T>> | ReactElement<ListActionMenuProps<T>>;
6
+ export interface UseRenderNormalizedItemOptions {
7
+ itemIconSlot: ItemIconSlot;
8
+ showItemDescriptions: boolean;
9
+ showItemIcons: boolean;
10
+ tooltipOptions: TooltipOptions | null;
11
+ actions?: ListActions<unknown>;
12
+ }
3
13
  /**
4
14
  * Returns a render function that can be used to render a normalized item in
5
15
  * collection components.
16
+ * @param itemIconSlot Slot to use for item icons
17
+ * @param showItemDescriptions Whether to show item descriptions
18
+ * @param showItemIcons Whether to show item icons
6
19
  * @param tooltipOptions Tooltip options to use when rendering the item
20
+ * @param actions Optional actions to render with the item
7
21
  * @returns Render function for normalized items
8
22
  */
9
- export declare function useRenderNormalizedItem(tooltipOptions: TooltipOptions | null): (normalizedItem: NormalizedItem) => JSX.Element;
23
+ export declare function useRenderNormalizedItem({ itemIconSlot, showItemDescriptions, showItemIcons, tooltipOptions, actions, }: UseRenderNormalizedItemOptions): (normalizedItem: NormalizedItem) => JSX.Element;
10
24
  export default useRenderNormalizedItem;
11
25
  //# sourceMappingURL=useRenderNormalizedItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRenderNormalizedItem.d.ts","sourceRoot":"","sources":["../../../src/spectrum/utils/useRenderNormalizedItem.tsx"],"names":[],"mappings":";AAGA,OAAO,EAGL,cAAc,EACd,cAAc,EACf,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,cAAc,GAAG,IAAI,GACpC,CAAC,cAAc,EAAE,cAAc,KAAK,GAAG,CAAC,OAAO,CA+BjD;AAED,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"useRenderNormalizedItem.d.ts","sourceRoot":"","sources":["../../../src/spectrum/utils/useRenderNormalizedItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,YAAY,EAAe,MAAM,OAAO,CAAC;AAIvD,OAAO,EAAmB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAkB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAEL,YAAY,EAEZ,cAAc,EACd,cAAc,EACf,MAAM,aAAa,CAAC;AAGrB,MAAM,MAAM,WAAW,CAAC,CAAC,IACrB,YAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,GACrC,YAAY,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzC,MAAM,WAAW,8BAA8B;IAC7C,YAAY,EAAE,YAAY,CAAC;IAC3B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,OAAO,GACR,EAAE,8BAA8B,GAAG,CAClC,cAAc,EAAE,cAAc,KAC3B,GAAG,CAAC,OAAO,CAoEf;AAED,eAAe,uBAAuB,CAAC"}
@@ -1,20 +1,67 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
6
+ import { isElementOfType } from '@deephaven/react-hooks';
1
7
  import { useCallback } from 'react';
8
+ import ActionGroup from "../ActionGroup.js";
9
+ import ActionMenu from "../ActionMenu.js";
2
10
  import { ItemContent } from "../ItemContent.js";
11
+ import { ListActionGroup } from "../ListActionGroup.js";
12
+ import { ListActionMenu } from "../ListActionMenu.js";
3
13
  import { Item } from "../shared.js";
4
14
  import { getItemKey, ITEM_EMPTY_STRING_TEXT_VALUE } from "./itemUtils.js";
15
+ import { wrapIcon, wrapPrimitiveWithText } from "./itemWrapperUtils.js";
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ import { jsxs as _jsxs } from "react/jsx-runtime";
5
18
  /**
6
19
  * Returns a render function that can be used to render a normalized item in
7
20
  * collection components.
21
+ * @param itemIconSlot Slot to use for item icons
22
+ * @param showItemDescriptions Whether to show item descriptions
23
+ * @param showItemIcons Whether to show item icons
8
24
  * @param tooltipOptions Tooltip options to use when rendering the item
25
+ * @param actions Optional actions to render with the item
9
26
  * @returns Render function for normalized items
10
27
  */
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- export function useRenderNormalizedItem(tooltipOptions) {
28
+ export function useRenderNormalizedItem(_ref) {
29
+ var {
30
+ itemIconSlot,
31
+ showItemDescriptions,
32
+ showItemIcons,
33
+ tooltipOptions,
34
+ actions
35
+ } = _ref;
13
36
  return useCallback(normalizedItem => {
14
- var _normalizedItem$item$, _normalizedItem$item, _normalizedItem$item$2, _normalizedItem$item2;
15
- var key = getItemKey(normalizedItem);
16
- var content = (_normalizedItem$item$ = (_normalizedItem$item = normalizedItem.item) === null || _normalizedItem$item === void 0 ? void 0 : _normalizedItem$item.content) !== null && _normalizedItem$item$ !== void 0 ? _normalizedItem$item$ : '';
17
- var textValue = (_normalizedItem$item$2 = (_normalizedItem$item2 = normalizedItem.item) === null || _normalizedItem$item2 === void 0 ? void 0 : _normalizedItem$item2.textValue) !== null && _normalizedItem$item$2 !== void 0 ? _normalizedItem$item$2 : '';
37
+ var _normalizedItem$item, _normalizedItem$item$, _normalizedItem$item2, _normalizedItem$item3, _normalizedItem$item4;
38
+ var itemKey = getItemKey(normalizedItem);
39
+ var content = wrapPrimitiveWithText((_normalizedItem$item = normalizedItem.item) === null || _normalizedItem$item === void 0 ? void 0 : _normalizedItem$item.content);
40
+ var textValue = (_normalizedItem$item$ = (_normalizedItem$item2 = normalizedItem.item) === null || _normalizedItem$item2 === void 0 ? void 0 : _normalizedItem$item2.textValue) !== null && _normalizedItem$item$ !== void 0 ? _normalizedItem$item$ : '';
41
+ var description = showItemDescriptions ? wrapPrimitiveWithText((_normalizedItem$item3 = normalizedItem.item) === null || _normalizedItem$item3 === void 0 ? void 0 : _normalizedItem$item3.description, 'description') : null;
42
+ var icon = showItemIcons ? wrapIcon((_normalizedItem$item4 = normalizedItem.item) === null || _normalizedItem$item4 === void 0 ? void 0 : _normalizedItem$item4.icon, itemIconSlot) : null;
43
+ var action = null;
44
+ if (isElementOfType(actions, ListActionGroup)) {
45
+ action = /*#__PURE__*/_jsx(ActionGroup
46
+ // eslint-disable-next-line react/jsx-props-no-spreading
47
+ , _objectSpread(_objectSpread({}, actions.props), {}, {
48
+ onAction: key => actions.props.onAction(key, itemKey),
49
+ onChange: keys => {
50
+ var _actions$props$onChan, _actions$props;
51
+ return (_actions$props$onChan = (_actions$props = actions.props).onChange) === null || _actions$props$onChan === void 0 ? void 0 : _actions$props$onChan.call(_actions$props, keys, itemKey);
52
+ }
53
+ }));
54
+ } else if (isElementOfType(actions, ListActionMenu)) {
55
+ action = /*#__PURE__*/_jsx(ActionMenu
56
+ // eslint-disable-next-line react/jsx-props-no-spreading
57
+ , _objectSpread(_objectSpread({}, actions.props), {}, {
58
+ onAction: key => actions.props.onAction(key, itemKey),
59
+ onOpenChange: isOpen => {
60
+ var _actions$props$onOpen, _actions$props2;
61
+ return (_actions$props$onOpen = (_actions$props2 = actions.props).onOpenChange) === null || _actions$props$onOpen === void 0 ? void 0 : _actions$props$onOpen.call(_actions$props2, isOpen, itemKey);
62
+ }
63
+ }));
64
+ }
18
65
  return /*#__PURE__*/_jsx(Item
19
66
  // Note that setting the `key` prop explicitly on `Item` elements
20
67
  // causes the picker to expect `selectedKey` and `defaultSelectedKey`
@@ -29,12 +76,12 @@ export function useRenderNormalizedItem(tooltipOptions) {
29
76
  // but are used for accessibility purposes, so we set to an arbitrary
30
77
  // `ITEM_EMPTY_STRING_TEXT_VALUE` value so that they are not empty strings.
31
78
  textValue: textValue === '' ? ITEM_EMPTY_STRING_TEXT_VALUE : textValue,
32
- children: /*#__PURE__*/_jsx(ItemContent, {
79
+ children: /*#__PURE__*/_jsxs(ItemContent, {
33
80
  tooltipOptions: tooltipOptions,
34
- children: content
81
+ children: [icon, content, description, action]
35
82
  })
36
- }, key);
37
- }, [tooltipOptions]);
83
+ }, itemKey);
84
+ }, [actions, itemIconSlot, showItemDescriptions, showItemIcons, tooltipOptions]);
38
85
  }
39
86
  export default useRenderNormalizedItem;
40
87
  //# sourceMappingURL=useRenderNormalizedItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRenderNormalizedItem.js","names":["useCallback","ItemContent","Item","getItemKey","ITEM_EMPTY_STRING_TEXT_VALUE","jsx","_jsx","useRenderNormalizedItem","tooltipOptions","normalizedItem","_normalizedItem$item$","_normalizedItem$item","_normalizedItem$item$2","_normalizedItem$item2","key","content","item","textValue","children"],"sources":["../../../src/spectrum/utils/useRenderNormalizedItem.tsx"],"sourcesContent":["import { Key, useCallback } from 'react';\nimport { ItemContent } from '../ItemContent';\nimport { Item } from '../shared';\nimport {\n getItemKey,\n ITEM_EMPTY_STRING_TEXT_VALUE,\n NormalizedItem,\n TooltipOptions,\n} from './itemUtils';\n\n/**\n * Returns a render function that can be used to render a normalized item in\n * collection components.\n * @param tooltipOptions Tooltip options to use when rendering the item\n * @returns Render function for normalized items\n */\nexport function useRenderNormalizedItem(\n tooltipOptions: TooltipOptions | null\n): (normalizedItem: NormalizedItem) => JSX.Element {\n return useCallback(\n (normalizedItem: NormalizedItem) => {\n const key = getItemKey(normalizedItem);\n const content = normalizedItem.item?.content ?? '';\n const textValue = normalizedItem.item?.textValue ?? '';\n\n return (\n <Item\n // Note that setting the `key` prop explicitly on `Item` elements\n // causes the picker to expect `selectedKey` and `defaultSelectedKey`\n // to be strings. It also passes the stringified value of the key to\n // `onSelectionChange` handlers` regardless of the actual type of the\n // key. We can't really get around setting in order to support Windowed\n // data, so we'll need to do some manual conversion of keys to strings\n // in other components that use this hook.\n key={key as Key}\n // The `textValue` prop gets used to provide the content of `<option>`\n // elements that back the Spectrum Picker. These are not visible in the UI,\n // but are used for accessibility purposes, so we set to an arbitrary\n // `ITEM_EMPTY_STRING_TEXT_VALUE` value so that they are not empty strings.\n textValue={\n textValue === '' ? ITEM_EMPTY_STRING_TEXT_VALUE : textValue\n }\n >\n <ItemContent tooltipOptions={tooltipOptions}>{content}</ItemContent>\n </Item>\n );\n },\n [tooltipOptions]\n );\n}\n\nexport default useRenderNormalizedItem;\n"],"mappings":"AAAA,SAAcA,WAAW,QAAQ,OAAO;AAAC,SAChCC,WAAW;AAAA,SACXC,IAAI;AAAA,SAEXC,UAAU,EACVC,4BAA4B;AAK9B;AACA;AACA;AACA;AACA;AACA;AALA,SAAAC,GAAA,IAAAC,IAAA;AAMA,OAAO,SAASC,uBAAuBA,CACrCC,cAAqC,EACY;EACjD,OAAOR,WAAW,CACfS,cAA8B,IAAK;IAAA,IAAAC,qBAAA,EAAAC,oBAAA,EAAAC,sBAAA,EAAAC,qBAAA;IAClC,IAAMC,GAAG,GAAGX,UAAU,CAACM,cAAc,CAAC;IACtC,IAAMM,OAAO,IAAAL,qBAAA,IAAAC,oBAAA,GAAGF,cAAc,CAACO,IAAI,cAAAL,oBAAA,uBAAnBA,oBAAA,CAAqBI,OAAO,cAAAL,qBAAA,cAAAA,qBAAA,GAAI,EAAE;IAClD,IAAMO,SAAS,IAAAL,sBAAA,IAAAC,qBAAA,GAAGJ,cAAc,CAACO,IAAI,cAAAH,qBAAA,uBAAnBA,qBAAA,CAAqBI,SAAS,cAAAL,sBAAA,cAAAA,sBAAA,GAAI,EAAE;IAEtD,oBACEN,IAAA,CAACJ;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IAAA;MAEA;MACA;MACA;MACA;MACAe,SAAS,EACPA,SAAS,KAAK,EAAE,GAAGb,4BAA4B,GAAGa,SACnD;MAAAC,QAAA,eAEDZ,IAAA,CAACL,WAAW;QAACO,cAAc,EAAEA,cAAe;QAAAU,QAAA,EAAEH;MAAO,CAAc;IAAC,GAT/DD,GAUD,CAAC;EAEX,CAAC,EACD,CAACN,cAAc,CACjB,CAAC;AACH;AAEA,eAAeD,uBAAuB"}
1
+ {"version":3,"file":"useRenderNormalizedItem.js","names":["isElementOfType","useCallback","ActionGroup","ActionMenu","ItemContent","ListActionGroup","ListActionMenu","Item","getItemKey","ITEM_EMPTY_STRING_TEXT_VALUE","wrapIcon","wrapPrimitiveWithText","jsx","_jsx","jsxs","_jsxs","useRenderNormalizedItem","_ref","itemIconSlot","showItemDescriptions","showItemIcons","tooltipOptions","actions","normalizedItem","_normalizedItem$item","_normalizedItem$item$","_normalizedItem$item2","_normalizedItem$item3","_normalizedItem$item4","itemKey","content","item","textValue","description","icon","action","_objectSpread","props","onAction","key","onChange","keys","_actions$props$onChan","_actions$props","call","onOpenChange","isOpen","_actions$props$onOpen","_actions$props2","children"],"sources":["../../../src/spectrum/utils/useRenderNormalizedItem.tsx"],"sourcesContent":["import { isElementOfType } from '@deephaven/react-hooks';\nimport { Key, ReactElement, useCallback } from 'react';\nimport ActionGroup from '../ActionGroup';\nimport ActionMenu from '../ActionMenu';\nimport { ItemContent } from '../ItemContent';\nimport { ListActionGroup, ListActionGroupProps } from '../ListActionGroup';\nimport { ListActionMenu, ListActionMenuProps } from '../ListActionMenu';\nimport { Item } from '../shared';\nimport {\n getItemKey,\n ItemIconSlot,\n ITEM_EMPTY_STRING_TEXT_VALUE,\n NormalizedItem,\n TooltipOptions,\n} from './itemUtils';\nimport { wrapIcon, wrapPrimitiveWithText } from './itemWrapperUtils';\n\nexport type ListActions<T> =\n | ReactElement<ListActionGroupProps<T>>\n | ReactElement<ListActionMenuProps<T>>;\n\nexport interface UseRenderNormalizedItemOptions {\n itemIconSlot: ItemIconSlot;\n showItemDescriptions: boolean;\n showItemIcons: boolean;\n tooltipOptions: TooltipOptions | null;\n actions?: ListActions<unknown>;\n}\n\n/**\n * Returns a render function that can be used to render a normalized item in\n * collection components.\n * @param itemIconSlot Slot to use for item icons\n * @param showItemDescriptions Whether to show item descriptions\n * @param showItemIcons Whether to show item icons\n * @param tooltipOptions Tooltip options to use when rendering the item\n * @param actions Optional actions to render with the item\n * @returns Render function for normalized items\n */\nexport function useRenderNormalizedItem({\n itemIconSlot,\n showItemDescriptions,\n showItemIcons,\n tooltipOptions,\n actions,\n}: UseRenderNormalizedItemOptions): (\n normalizedItem: NormalizedItem\n) => JSX.Element {\n return useCallback(\n (normalizedItem: NormalizedItem) => {\n const itemKey = getItemKey(normalizedItem);\n const content = wrapPrimitiveWithText(normalizedItem.item?.content);\n const textValue = normalizedItem.item?.textValue ?? '';\n\n const description = showItemDescriptions\n ? wrapPrimitiveWithText(normalizedItem.item?.description, 'description')\n : null;\n\n const icon = showItemIcons\n ? wrapIcon(normalizedItem.item?.icon, itemIconSlot)\n : null;\n\n let action = null;\n\n if (isElementOfType(actions, ListActionGroup)) {\n action = (\n <ActionGroup\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...actions.props}\n onAction={key => actions.props.onAction(key, itemKey)}\n onChange={keys => actions.props.onChange?.(keys, itemKey)}\n />\n );\n } else if (isElementOfType(actions, ListActionMenu)) {\n action = (\n <ActionMenu\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...actions.props}\n onAction={key => actions.props.onAction(key, itemKey)}\n onOpenChange={isOpen =>\n actions.props.onOpenChange?.(isOpen, itemKey)\n }\n />\n );\n }\n\n return (\n <Item\n // Note that setting the `key` prop explicitly on `Item` elements\n // causes the picker to expect `selectedKey` and `defaultSelectedKey`\n // to be strings. It also passes the stringified value of the key to\n // `onSelectionChange` handlers` regardless of the actual type of the\n // key. We can't really get around setting in order to support Windowed\n // data, so we'll need to do some manual conversion of keys to strings\n // in other components that use this hook.\n key={itemKey as Key}\n // The `textValue` prop gets used to provide the content of `<option>`\n // elements that back the Spectrum Picker. These are not visible in the UI,\n // but are used for accessibility purposes, so we set to an arbitrary\n // `ITEM_EMPTY_STRING_TEXT_VALUE` value so that they are not empty strings.\n textValue={\n textValue === '' ? ITEM_EMPTY_STRING_TEXT_VALUE : textValue\n }\n >\n <ItemContent tooltipOptions={tooltipOptions}>\n {icon}\n {content}\n {description}\n {action}\n </ItemContent>\n </Item>\n );\n },\n [actions, itemIconSlot, showItemDescriptions, showItemIcons, tooltipOptions]\n );\n}\n\nexport default useRenderNormalizedItem;\n"],"mappings":";;;;;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MACAyB,SAAS,EACPA,SAAS,KAAK,EAAE,GAAGvB,4BAA4B,GAAGuB,SACnD;MAAAiB,QAAA,eAEDlC,KAAA,CAACX,WAAW;QAACiB,cAAc,EAAEA,cAAe;QAAA4B,QAAA,GACzCf,IAAI,EACJJ,OAAO,EACPG,WAAW,EACXE,MAAM;MAAA,CACI;IAAC,GAdTN,OAeD,CAAC;EAEX,CAAC,EACD,CAACP,OAAO,EAAEJ,YAAY,EAAEC,oBAAoB,EAAEC,aAAa,EAAEC,cAAc,CAC7E,CAAC;AACH;AAEA,eAAeL,uBAAuB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/components",
3
- "version": "0.74.1-beta.7+fb63be1f",
3
+ "version": "0.75.1-alpha-listview-actions.4+db460e2d",
4
4
  "description": "Deephaven React component library",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -24,11 +24,11 @@
24
24
  "build:theme": "sass --embed-sources --style=compressed --load-path=../../node_modules ./src/theme:./dist/theme"
25
25
  },
26
26
  "dependencies": {
27
- "@adobe/react-spectrum": "^3.34.1",
28
- "@deephaven/icons": "^0.74.1-beta.7+fb63be1f",
29
- "@deephaven/log": "^0.74.1-beta.7+fb63be1f",
30
- "@deephaven/react-hooks": "^0.74.1-beta.7+fb63be1f",
31
- "@deephaven/utils": "^0.74.1-beta.7+fb63be1f",
27
+ "@adobe/react-spectrum": "3.33.1",
28
+ "@deephaven/icons": "^0.75.1-alpha-listview-actions.4+db460e2d",
29
+ "@deephaven/log": "^0.75.1-alpha-listview-actions.4+db460e2d",
30
+ "@deephaven/react-hooks": "^0.75.1-alpha-listview-actions.4+db460e2d",
31
+ "@deephaven/utils": "^0.75.1-alpha-listview-actions.4+db460e2d",
32
32
  "@fortawesome/fontawesome-svg-core": "^6.2.1",
33
33
  "@fortawesome/react-fontawesome": "^0.2.0",
34
34
  "@react-spectrum/theme-default": "^3.5.1",
@@ -55,7 +55,7 @@
55
55
  "react-dom": ">=16.8.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@deephaven/mocks": "^0.74.1-beta.7+fb63be1f"
58
+ "@deephaven/mocks": "^0.75.1-alpha-listview-actions.4+db460e2d"
59
59
  },
60
60
  "files": [
61
61
  "dist",
@@ -69,5 +69,5 @@
69
69
  "publishConfig": {
70
70
  "access": "public"
71
71
  },
72
- "gitHead": "fb63be1f4b437634c4b3bdbacc0578f174e212fb"
72
+ "gitHead": "db460e2da18206a34b2d1f3f1d776a0c5cdcd894"
73
73
  }