@react-spectrum/table 3.15.0 → 3.15.1

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 (36) hide show
  1. package/dist/DragPreview.main.js +1 -1
  2. package/dist/DragPreview.mjs +1 -1
  3. package/dist/DragPreview.module.js +1 -1
  4. package/dist/Resizer.main.js +3 -4
  5. package/dist/Resizer.main.js.map +1 -1
  6. package/dist/Resizer.mjs +3 -4
  7. package/dist/Resizer.module.js +3 -4
  8. package/dist/Resizer.module.js.map +1 -1
  9. package/dist/TableView.main.js +2 -3
  10. package/dist/TableView.main.js.map +1 -1
  11. package/dist/TableView.mjs +2 -3
  12. package/dist/TableView.module.js +2 -3
  13. package/dist/TableView.module.js.map +1 -1
  14. package/dist/TableViewBase.main.js +1 -1
  15. package/dist/TableViewBase.mjs +1 -1
  16. package/dist/TableViewBase.module.js +1 -1
  17. package/dist/TableViewLayout.main.js.map +1 -1
  18. package/dist/TableViewLayout.module.js.map +1 -1
  19. package/dist/TableViewWrapper.main.js +4 -5
  20. package/dist/TableViewWrapper.main.js.map +1 -1
  21. package/dist/TableViewWrapper.mjs +4 -5
  22. package/dist/TableViewWrapper.module.js +4 -5
  23. package/dist/TableViewWrapper.module.js.map +1 -1
  24. package/dist/TreeGridTableView.main.js +2 -3
  25. package/dist/TreeGridTableView.main.js.map +1 -1
  26. package/dist/TreeGridTableView.mjs +2 -3
  27. package/dist/TreeGridTableView.module.js +2 -3
  28. package/dist/TreeGridTableView.module.js.map +1 -1
  29. package/dist/types.d.ts.map +1 -1
  30. package/dist/{vars.bd693cb4.css → vars.27f08d5f.css} +2 -2
  31. package/dist/{vars.bd693cb4.css.map → vars.27f08d5f.css.map} +1 -1
  32. package/package.json +26 -26
  33. package/src/Resizer.tsx +2 -5
  34. package/src/TableView.tsx +2 -5
  35. package/src/TableViewWrapper.tsx +6 -9
  36. package/src/TreeGridTableView.tsx +2 -5
@@ -1,4 +1,4 @@
1
- require("./vars.bd693cb4.css");
1
+ require("./vars.27f08d5f.css");
2
2
  var $982885d0a34882ea$exports = require("./table_vars_css.main.js");
3
3
  require("./table.11fc8462.css");
4
4
  var $4afcd54cfd94dbb9$exports = require("./table_css.main.js");
@@ -1,4 +1,4 @@
1
- import "./vars.bd693cb4.css";
1
+ import "./vars.27f08d5f.css";
2
2
  import $9Othb$table_vars_cssmodulejs from "./table_vars_css.mjs";
3
3
  import "./table.11fc8462.css";
4
4
  import $9Othb$table_cssmodulejs from "./table_css.mjs";
@@ -1,4 +1,4 @@
1
- import "./vars.bd693cb4.css";
1
+ import "./vars.27f08d5f.css";
2
2
  import $9Othb$table_vars_cssmodulejs from "./table_vars_css.module.js";
3
3
  import "./table.11fc8462.css";
4
4
  import $9Othb$table_cssmodulejs from "./table_css.module.js";
@@ -1,5 +1,5 @@
1
1
  var $1a3d6ad53eb75d54$exports = require("./intlStrings.main.js");
2
- require("./vars.bd693cb4.css");
2
+ require("./vars.27f08d5f.css");
3
3
  var $982885d0a34882ea$exports = require("./table_vars_css.main.js");
4
4
  var $e39c6de4eb69450d$exports = require("./TableViewBase.main.js");
5
5
  var $hxFQC$reactspectrumutils = require("@react-spectrum/utils");
@@ -58,7 +58,7 @@ const $2877766f94c67a67$var$CURSORS = {
58
58
  e: $2877766f94c67a67$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($1ed2399e74febaae$exports))), 'e-resize')
59
59
  };
60
60
  const $2877766f94c67a67$export$b517d84d4ad20b24 = /*#__PURE__*/ (0, $hxFQC$react.createContext)(null);
61
- function $2877766f94c67a67$var$Resizer(props, ref) {
61
+ const $2877766f94c67a67$export$48a76196cafe3b93 = /*#__PURE__*/ (0, ($parcel$interopDefault($hxFQC$react))).forwardRef(function Resizer(props, ref) {
62
62
  let { column: column, showResizer: showResizer } = props;
63
63
  let objectRef = (0, $hxFQC$reactariautils.useObjectRef)(ref);
64
64
  let { isEmpty: isEmpty, onFocusedResizer: onFocusedResizer } = (0, $e39c6de4eb69450d$exports.useTableContext)();
@@ -138,14 +138,13 @@ function $2877766f94c67a67$var$Resizer(props, ref) {
138
138
  cursor: cursor
139
139
  }
140
140
  })));
141
- }
141
+ });
142
142
  function $2877766f94c67a67$var$CursorOverlay(props) {
143
143
  let { show: show, children: children } = props;
144
144
  let { getContainer: getContainer } = (0, $hxFQC$reactariaoverlays.useUNSTABLE_PortalContext)();
145
145
  var _getContainer;
146
146
  return show ? /*#__PURE__*/ (0, ($parcel$interopDefault($hxFQC$reactdom))).createPortal(children, (_getContainer = getContainer === null || getContainer === void 0 ? void 0 : getContainer()) !== null && _getContainer !== void 0 ? _getContainer : document.body) : null;
147
147
  }
148
- const $2877766f94c67a67$export$48a76196cafe3b93 = /*#__PURE__*/ (0, ($parcel$interopDefault($hxFQC$react))).forwardRef($2877766f94c67a67$var$Resizer);
149
148
 
150
149
 
151
150
  //# sourceMappingURL=Resizer.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;ACAA,4BAAiB;;;;ACAjB,4BAAiB;;;;;;;;;;;;;;ACAjB,4BAAiB;;;AHsBjB,SAAS,gCAAU,GAAW,EAAE,QAAgB;IAC9C,kGAAkG;IAClG,uGAAuG;IACvG,kFAAkF;IAClF,IAAI,CAAA,GAAA,8BAAO,KACT,OAAO,CAAC,kCAAkC,EAAE,mBAAmB,KAAK,+BAA+B,EAAE,mBAAmB,IAAI,OAAO,CAAC,0BAA0B,2BAA2B,YAAY,EAAE,UAAU;SAEjN,OAAO,CAAC,wBAAwB,EAAE,mBAAmB,KAAK,QAAQ,EAAE,UAAU;AAElF;AAWA,MAAM,gCAAU;IACd,IAAI,gCAAU,CAAA,GAAA,gEAAO,GAAG;IACxB,GAAG,gCAAU,CAAA,GAAA,gEAAM,GAAG;IACtB,GAAG,gCAAU,CAAA,GAAA,gEAAM,GAAG;AACxB;AAEO,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAA0C;AAExF,SAAS,8BAAW,KAAsB,EAAE,G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AA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/Resizer.tsx","node_modules/@parcel/runtime-js/lib/bundles/runtime-041bd783ad0660b4.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-8e8d37d2cf10eebe.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-cba9561fd7f119d5.js"],"sourcesContent":[" \nimport {classNames} from '@react-spectrum/utils';\nimport {ColumnSize} from '@react-types/table';\nimport eCursor from 'bundle-text:./cursors/Cur_MoveToRight_9_9.svg';\nimport ewCursor from 'bundle-text:./cursors/Cur_MoveHorizontal_9_9.svg';\nimport {FocusRing} from '@react-aria/focus';\nimport {GridNode} from '@react-types/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isWebKit, mergeProps, useObjectRef} from '@react-aria/utils';\nimport {Key, RefObject} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, useContext, useEffect, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport styles from '@adobe/spectrum-css-temp/components/table/vars.css';\nimport {TableColumnResizeState} from '@react-stately/table';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useTableColumnResize} from '@react-aria/table';\nimport {useTableContext, useVirtualizerContext} from './TableViewBase';\nimport {useUNSTABLE_PortalContext} from '@react-aria/overlays';\n// @ts-ignore\nimport wCursor from 'bundle-text:./cursors/Cur_MoveToLeft_9_9.svg';\n\nfunction getCursor(svg: string, fallback: string) {\n // WebKit renders SVG cursors blurry on 2x screens: https://bugs.webkit.org/show_bug.cgi?id=160657\n // To work around this, we generate two SVGs at different sizes and use image-set to pick between them.\n // Only do this in WebKit to avoid Firefox rendering the cursor at twice the size.\n if (isWebKit()) {\n return `image-set(url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 1x, url(\"data:image/svg+xml,${encodeURIComponent(svg.replace('width=\"32\" height=\"32\"', 'width=\"64\" height=\"64\"'))}\") 2x) 8 8, ${fallback}`;\n } else {\n return `url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 8 8, ${fallback}`;\n }\n}\n\ninterface ResizerProps<T> {\n column: GridNode<T>,\n showResizer: boolean,\n triggerRef: RefObject<HTMLDivElement | null>,\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void,\n onResize?: (widths: Map<Key, ColumnSize>) => void,\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void\n}\n\nconst CURSORS = {\n ew: getCursor(ewCursor, 'ew-resize'),\n w: getCursor(wCursor, 'w-resize'),\n e: getCursor(eCursor, 'e-resize')\n};\n\nexport const ResizeStateContext = createContext<TableColumnResizeState<unknown> | null>(null);\n\nfunction Resizer<T>(props: ResizerProps<T>, ref: ForwardedRef<HTMLInputElement | null>) {\n let {column, showResizer} = props;\n let objectRef = useObjectRef(ref);\n let {isEmpty, onFocusedResizer} = useTableContext();\n let layout = useContext(ResizeStateContext)!;\n // Virtualizer re-renders, but these components are all cached\n // in order to get around that and cause a rerender here, we use context\n // but we don't actually need any value, they are available on the layout object\n useVirtualizerContext();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n let {direction} = useLocale();\n\n let [isPointerDown, setIsPointerDown] = useState(false);\n useEffect(() => {\n let setDown = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(true);\n }\n };\n let setUp = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(false);\n }\n };\n document.addEventListener('pointerdown', setDown, {capture: true});\n document.addEventListener('pointerup', setUp, {capture: true});\n return () => {\n document.removeEventListener('pointerdown', setDown, {capture: true});\n document.removeEventListener('pointerup', setUp, {capture: true});\n };\n }, []);\n\n let {inputProps, resizerProps} = useTableColumnResize<unknown>(\n mergeProps(props, {\n 'aria-label': stringFormatter.format('columnResizer'),\n isDisabled: isEmpty\n }), layout, objectRef);\n\n let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);\n let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);\n let isResizing = layout.resizingColumn === column.key;\n let cursor = '';\n if (isEResizable) {\n cursor = direction === 'rtl' ? CURSORS.w : CURSORS.e;\n } else if (isWResizable) {\n cursor = direction === 'rtl' ? CURSORS.e : CURSORS.w;\n } else {\n cursor = CURSORS.ew;\n }\n\n let style = {\n ...resizerProps.style,\n height: '100%',\n display: showResizer ? undefined : 'none',\n cursor\n };\n\n return (\n <>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...resizerProps}\n role=\"presentation\"\n style={style}\n className={classNames(styles, 'spectrum-Table-columnResizer')}>\n <input\n ref={objectRef}\n {...mergeProps(inputProps, {onFocus: onFocusedResizer})} />\n </div>\n </FocusRing>\n {/* Placeholder so that the title doesn't intersect with space reserved by the resizer when it appears. */}\n <div\n aria-hidden\n role=\"presentation\"\n className={classNames(styles, 'spectrum-Table-columnResizerPlaceholder')} />\n <CursorOverlay show={isResizing && isPointerDown}>\n <div style={{position: 'fixed', top: 0, left: 0, bottom: 0, right: 0, cursor}} />\n </CursorOverlay>\n </>\n );\n}\n\nfunction CursorOverlay(props) {\n let {show, children} = props;\n let {getContainer} = useUNSTABLE_PortalContext();\n return show ? ReactDOM.createPortal(children, getContainer?.() ?? document.body) : null;\n}\n\nconst _Resizer = React.forwardRef(Resizer);\nexport {_Resizer as Resizer};\n","module.exports = \"fd8e59d99cf6255b\";","module.exports = \"c65a0be4a6d17c91\";","module.exports = \"d9395620b1a0eaaa\";"],"names":[],"version":3,"file":"Resizer.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;ACAA,4BAAiB;;;;ACAjB,4BAAiB;;;;;;;;;;;;;;ACAjB,4BAAiB;;;AHsBjB,SAAS,gCAAU,GAAW,EAAE,QAAgB;IAC9C,kGAAkG;IAClG,uGAAuG;IACvG,kFAAkF;IAClF,IAAI,CAAA,GAAA,8BAAO,KACT,OAAO,CAAC,kCAAkC,EAAE,mBAAmB,KAAK,+BAA+B,EAAE,mBAAmB,IAAI,OA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qBACjC,0DAAC;QAAI,OAAO;YAAC,UAAU;YAAS,KAAK;YAAG,MAAM;YAAG,QAAQ;YAAG,OAAO;oBAAG;QAAM;;AAIpF;AAEA,SAAS,oCAAc,KAAK;IAC1B,IAAI,QAAC,IAAI,YAAE,QAAQ,EAAC,GAAG;IACvB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,kDAAwB;QACC;IAA9C,OAAO,qBAAO,CAAA,GAAA,yCAAO,EAAE,YAAY,CAAC,UAAU,CAAA,gBAAA,yBAAA,mCAAA,4BAAA,2BAAA,gBAAoB,SAAS,IAAI,IAAI;AACrF","sources":["packages/@react-spectrum/table/src/Resizer.tsx","node_modules/@parcel/runtime-js/lib/bundles/runtime-041bd783ad0660b4.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-8e8d37d2cf10eebe.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-cba9561fd7f119d5.js"],"sourcesContent":[" \nimport {classNames} from '@react-spectrum/utils';\nimport {ColumnSize} from '@react-types/table';\nimport eCursor from 'bundle-text:./cursors/Cur_MoveToRight_9_9.svg';\nimport ewCursor from 'bundle-text:./cursors/Cur_MoveHorizontal_9_9.svg';\nimport {FocusRing} from '@react-aria/focus';\nimport {GridNode} from '@react-types/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isWebKit, mergeProps, useObjectRef} from '@react-aria/utils';\nimport {Key, RefObject} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, useContext, useEffect, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport styles from '@adobe/spectrum-css-temp/components/table/vars.css';\nimport {TableColumnResizeState} from '@react-stately/table';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useTableColumnResize} from '@react-aria/table';\nimport {useTableContext, useVirtualizerContext} from './TableViewBase';\nimport {useUNSTABLE_PortalContext} from '@react-aria/overlays';\n// @ts-ignore\nimport wCursor from 'bundle-text:./cursors/Cur_MoveToLeft_9_9.svg';\n\nfunction getCursor(svg: string, fallback: string) {\n // WebKit renders SVG cursors blurry on 2x screens: https://bugs.webkit.org/show_bug.cgi?id=160657\n // To work around this, we generate two SVGs at different sizes and use image-set to pick between them.\n // Only do this in WebKit to avoid Firefox rendering the cursor at twice the size.\n if (isWebKit()) {\n return `image-set(url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 1x, url(\"data:image/svg+xml,${encodeURIComponent(svg.replace('width=\"32\" height=\"32\"', 'width=\"64\" height=\"64\"'))}\") 2x) 8 8, ${fallback}`;\n } else {\n return `url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 8 8, ${fallback}`;\n }\n}\n\ninterface ResizerProps<T> {\n column: GridNode<T>,\n showResizer: boolean,\n triggerRef: RefObject<HTMLDivElement | null>,\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void,\n onResize?: (widths: Map<Key, ColumnSize>) => void,\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void\n}\n\nconst CURSORS = {\n ew: getCursor(ewCursor, 'ew-resize'),\n w: getCursor(wCursor, 'w-resize'),\n e: getCursor(eCursor, 'e-resize')\n};\n\nexport const ResizeStateContext = createContext<TableColumnResizeState<unknown> | null>(null);\n\nexport const Resizer = React.forwardRef(function Resizer<T>(props: ResizerProps<T>, ref: ForwardedRef<HTMLInputElement | null>) {\n let {column, showResizer} = props;\n let objectRef = useObjectRef(ref);\n let {isEmpty, onFocusedResizer} = useTableContext();\n let layout = useContext(ResizeStateContext)!;\n // Virtualizer re-renders, but these components are all cached\n // in order to get around that and cause a rerender here, we use context\n // but we don't actually need any value, they are available on the layout object\n useVirtualizerContext();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n let {direction} = useLocale();\n\n let [isPointerDown, setIsPointerDown] = useState(false);\n useEffect(() => {\n let setDown = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(true);\n }\n };\n let setUp = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(false);\n }\n };\n document.addEventListener('pointerdown', setDown, {capture: true});\n document.addEventListener('pointerup', setUp, {capture: true});\n return () => {\n document.removeEventListener('pointerdown', setDown, {capture: true});\n document.removeEventListener('pointerup', setUp, {capture: true});\n };\n }, []);\n\n let {inputProps, resizerProps} = useTableColumnResize<unknown>(\n mergeProps(props, {\n 'aria-label': stringFormatter.format('columnResizer'),\n isDisabled: isEmpty\n }), layout, objectRef);\n\n let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);\n let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);\n let isResizing = layout.resizingColumn === column.key;\n let cursor = '';\n if (isEResizable) {\n cursor = direction === 'rtl' ? CURSORS.w : CURSORS.e;\n } else if (isWResizable) {\n cursor = direction === 'rtl' ? CURSORS.e : CURSORS.w;\n } else {\n cursor = CURSORS.ew;\n }\n\n let style = {\n ...resizerProps.style,\n height: '100%',\n display: showResizer ? undefined : 'none',\n cursor\n };\n\n return (\n <>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...resizerProps}\n role=\"presentation\"\n style={style}\n className={classNames(styles, 'spectrum-Table-columnResizer')}>\n <input\n ref={objectRef}\n {...mergeProps(inputProps, {onFocus: onFocusedResizer})} />\n </div>\n </FocusRing>\n {/* Placeholder so that the title doesn't intersect with space reserved by the resizer when it appears. */}\n <div\n aria-hidden\n role=\"presentation\"\n className={classNames(styles, 'spectrum-Table-columnResizerPlaceholder')} />\n <CursorOverlay show={isResizing && isPointerDown}>\n <div style={{position: 'fixed', top: 0, left: 0, bottom: 0, right: 0, cursor}} />\n </CursorOverlay>\n </>\n );\n});\n\nfunction CursorOverlay(props) {\n let {show, children} = props;\n let {getContainer} = useUNSTABLE_PortalContext();\n return show ? ReactDOM.createPortal(children, getContainer?.() ?? document.body) : null;\n}\n","module.exports = \"fd8e59d99cf6255b\";","module.exports = \"c65a0be4a6d17c91\";","module.exports = \"d9395620b1a0eaaa\";"],"names":[],"version":3,"file":"Resizer.main.js.map"}
package/dist/Resizer.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import $dIfdp$intlStringsmodulejs from "./intlStrings.mjs";
2
- import "./vars.bd693cb4.css";
2
+ import "./vars.27f08d5f.css";
3
3
  import $dIfdp$table_vars_cssmodulejs from "./table_vars_css.mjs";
4
4
  import {useTableContext as $bd013581c0a4b065$export$3cb274deb6c2d854, useVirtualizerContext as $bd013581c0a4b065$export$3f8f74b6bfd2c5df} from "./TableViewBase.mjs";
5
5
  import {classNames as $dIfdp$classNames} from "@react-spectrum/utils";
@@ -51,7 +51,7 @@ const $fc695d2eafc2b351$var$CURSORS = {
51
51
  e: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($2fc56f9fdd93be52$exports))), 'e-resize')
52
52
  };
53
53
  const $fc695d2eafc2b351$export$b517d84d4ad20b24 = /*#__PURE__*/ (0, $dIfdp$createContext)(null);
54
- function $fc695d2eafc2b351$var$Resizer(props, ref) {
54
+ const $fc695d2eafc2b351$export$48a76196cafe3b93 = /*#__PURE__*/ (0, $dIfdp$react).forwardRef(function Resizer(props, ref) {
55
55
  let { column: column, showResizer: showResizer } = props;
56
56
  let objectRef = (0, $dIfdp$useObjectRef)(ref);
57
57
  let { isEmpty: isEmpty, onFocusedResizer: onFocusedResizer } = (0, $bd013581c0a4b065$export$3cb274deb6c2d854)();
@@ -131,14 +131,13 @@ function $fc695d2eafc2b351$var$Resizer(props, ref) {
131
131
  cursor: cursor
132
132
  }
133
133
  })));
134
- }
134
+ });
135
135
  function $fc695d2eafc2b351$var$CursorOverlay(props) {
136
136
  let { show: show, children: children } = props;
137
137
  let { getContainer: getContainer } = (0, $dIfdp$useUNSTABLE_PortalContext)();
138
138
  var _getContainer;
139
139
  return show ? /*#__PURE__*/ (0, $dIfdp$reactdom).createPortal(children, (_getContainer = getContainer === null || getContainer === void 0 ? void 0 : getContainer()) !== null && _getContainer !== void 0 ? _getContainer : document.body) : null;
140
140
  }
141
- const $fc695d2eafc2b351$export$48a76196cafe3b93 = /*#__PURE__*/ (0, $dIfdp$react).forwardRef($fc695d2eafc2b351$var$Resizer);
142
141
 
143
142
 
144
143
  export {$fc695d2eafc2b351$export$b517d84d4ad20b24 as ResizeStateContext, $fc695d2eafc2b351$export$48a76196cafe3b93 as Resizer};
@@ -1,5 +1,5 @@
1
1
  import $dIfdp$intlStringsmodulejs from "./intlStrings.module.js";
2
- import "./vars.bd693cb4.css";
2
+ import "./vars.27f08d5f.css";
3
3
  import $dIfdp$table_vars_cssmodulejs from "./table_vars_css.module.js";
4
4
  import {useTableContext as $bd013581c0a4b065$export$3cb274deb6c2d854, useVirtualizerContext as $bd013581c0a4b065$export$3f8f74b6bfd2c5df} from "./TableViewBase.module.js";
5
5
  import {classNames as $dIfdp$classNames} from "@react-spectrum/utils";
@@ -51,7 +51,7 @@ const $fc695d2eafc2b351$var$CURSORS = {
51
51
  e: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($2fc56f9fdd93be52$exports))), 'e-resize')
52
52
  };
53
53
  const $fc695d2eafc2b351$export$b517d84d4ad20b24 = /*#__PURE__*/ (0, $dIfdp$createContext)(null);
54
- function $fc695d2eafc2b351$var$Resizer(props, ref) {
54
+ const $fc695d2eafc2b351$export$48a76196cafe3b93 = /*#__PURE__*/ (0, $dIfdp$react).forwardRef(function Resizer(props, ref) {
55
55
  let { column: column, showResizer: showResizer } = props;
56
56
  let objectRef = (0, $dIfdp$useObjectRef)(ref);
57
57
  let { isEmpty: isEmpty, onFocusedResizer: onFocusedResizer } = (0, $bd013581c0a4b065$export$3cb274deb6c2d854)();
@@ -131,14 +131,13 @@ function $fc695d2eafc2b351$var$Resizer(props, ref) {
131
131
  cursor: cursor
132
132
  }
133
133
  })));
134
- }
134
+ });
135
135
  function $fc695d2eafc2b351$var$CursorOverlay(props) {
136
136
  let { show: show, children: children } = props;
137
137
  let { getContainer: getContainer } = (0, $dIfdp$useUNSTABLE_PortalContext)();
138
138
  var _getContainer;
139
139
  return show ? /*#__PURE__*/ (0, $dIfdp$reactdom).createPortal(children, (_getContainer = getContainer === null || getContainer === void 0 ? void 0 : getContainer()) !== null && _getContainer !== void 0 ? _getContainer : document.body) : null;
140
140
  }
141
- const $fc695d2eafc2b351$export$48a76196cafe3b93 = /*#__PURE__*/ (0, $dIfdp$react).forwardRef($fc695d2eafc2b351$var$Resizer);
142
141
 
143
142
 
144
143
  export {$fc695d2eafc2b351$export$b517d84d4ad20b24 as ResizeStateContext, $fc695d2eafc2b351$export$48a76196cafe3b93 as Resizer};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;ACAA,4BAAiB;;;;ACAjB,4BAAiB;;;;;;;;;;;;;;ACAjB,4BAAiB;;;AHsBjB,SAAS,gCAAU,GAAW,EAAE,QAAgB;IAC9C,kGAAkG;IAClG,uGAAuG;IACvG,kFAAkF;IAClF,IAAI,CAAA,GAAA,eAAO,KACT,OAAO,CAAC,kCAAkC,EAAE,mBAAmB,KAAK,+BAA+B,EAAE,mBAAmB,IAAI,OAAO,CAAC,0BAA0B,2BAA2B,YAAY,EAAE,UAAU;SAEjN,OAAO,CAAC,wBAAwB,EAAE,mBAAmB,KAAK,QAAQ,EAAE,UAAU;AAElF;AAWA,MAAM,gCAAU;IACd,IAAI,gCAAU,CAAA,GAAA,gEAAO,GAAG;IACxB,GAAG,gCAAU,CAAA,GAAA,gEAAM,GAAG;IACtB,GAAG,gCAAU,CAAA,GAAA,gEAAM,GAAG;AACxB;AAEO,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAA0C;AAExF,SAAS,8BAAW,KAAsB,EAAE,GAA0C;IACpF,IAAI,UAAC,MAAM,eAAE,WAAW,EAAC,GAAG;IAC5B,IAAI,YAAY,CAAA,GAAA,mBAAW,EAAE;IAC7B,IAAI,WAAC,OAAO,oBAAE,gBAAgB,EAAC,GAAG,CAAA,GAAA,yCAAc;IAChD,IAAI,SAAS,CAAA,GAAA,iBAAS,EA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,CAAC,GAAG,8BAAQ,CAAC;SAEpD,SAAS,8BAAQ,EAAE;IAGrB,IAAI,QAAQ;QACV,GAAG,aAAa,KAAK;QACrB,QAAQ;QACR,SAAS,cAAc,YAAY;gBACnC;IACF;IAEA,qBACE,gFACE,gCAAC,CAAA,GAAA,gBAAQ;QAAE,QAAA;QAAO,gBAAgB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;qBACnD,gCAAC;QACE,GAAG,YAAY;QAChB,MAAK;QACL,OAAO;QACP,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;qBAC9B,gCAAC;QACC,KAAK;QACJ,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY;YAAC,SAAS;QAAgB,EAAE;wBAI7D,gCAAC;QACC,eAAA;QACA,MAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;sBAChC,gCAAC;QAAc,MAAM,cAAc;qBACjC,gCAAC;QAAI,OAAO;YAAC,UAAU;YAAS,KAAK;YAAG,MAAM;YAAG,QAAQ;YAAG,OAAO;oBAAG;QAAM;;AAIpF;AAEA,SAAS,oCAAc,KAAK;IAC1B,IAAI,QAAC,IAAI,YAAE,QAAQ,EAAC,GAAG;IACvB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,gCAAwB;QACC;IAA9C,OAAO,qBAAO,CAAA,GAAA,eAAO,EAAE,YAAY,CAAC,UAAU,CAAA,gBAAA,yBAAA,mCAAA,4BAAA,2BAAA,gBAAoB,SAAS,IAAI,IAAI;AACrF;AAEA,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/Resizer.tsx","node_modules/@parcel/runtime-js/lib/bundles/runtime-a4d2d5b24236251c.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-3b74b2254c084d90.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-363f6d14626169ea.js"],"sourcesContent":[" \nimport {classNames} from '@react-spectrum/utils';\nimport {ColumnSize} from '@react-types/table';\nimport eCursor from 'bundle-text:./cursors/Cur_MoveToRight_9_9.svg';\nimport ewCursor from 'bundle-text:./cursors/Cur_MoveHorizontal_9_9.svg';\nimport {FocusRing} from '@react-aria/focus';\nimport {GridNode} from '@react-types/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isWebKit, mergeProps, useObjectRef} from '@react-aria/utils';\nimport {Key, RefObject} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, useContext, useEffect, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport styles from '@adobe/spectrum-css-temp/components/table/vars.css';\nimport {TableColumnResizeState} from '@react-stately/table';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useTableColumnResize} from '@react-aria/table';\nimport {useTableContext, useVirtualizerContext} from './TableViewBase';\nimport {useUNSTABLE_PortalContext} from '@react-aria/overlays';\n// @ts-ignore\nimport wCursor from 'bundle-text:./cursors/Cur_MoveToLeft_9_9.svg';\n\nfunction getCursor(svg: string, fallback: string) {\n // WebKit renders SVG cursors blurry on 2x screens: https://bugs.webkit.org/show_bug.cgi?id=160657\n // To work around this, we generate two SVGs at different sizes and use image-set to pick between them.\n // Only do this in WebKit to avoid Firefox rendering the cursor at twice the size.\n if (isWebKit()) {\n return `image-set(url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 1x, url(\"data:image/svg+xml,${encodeURIComponent(svg.replace('width=\"32\" height=\"32\"', 'width=\"64\" height=\"64\"'))}\") 2x) 8 8, ${fallback}`;\n } else {\n return `url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 8 8, ${fallback}`;\n }\n}\n\ninterface ResizerProps<T> {\n column: GridNode<T>,\n showResizer: boolean,\n triggerRef: RefObject<HTMLDivElement | null>,\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void,\n onResize?: (widths: Map<Key, ColumnSize>) => void,\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void\n}\n\nconst CURSORS = {\n ew: getCursor(ewCursor, 'ew-resize'),\n w: getCursor(wCursor, 'w-resize'),\n e: getCursor(eCursor, 'e-resize')\n};\n\nexport const ResizeStateContext = createContext<TableColumnResizeState<unknown> | null>(null);\n\nfunction Resizer<T>(props: ResizerProps<T>, ref: ForwardedRef<HTMLInputElement | null>) {\n let {column, showResizer} = props;\n let objectRef = useObjectRef(ref);\n let {isEmpty, onFocusedResizer} = useTableContext();\n let layout = useContext(ResizeStateContext)!;\n // Virtualizer re-renders, but these components are all cached\n // in order to get around that and cause a rerender here, we use context\n // but we don't actually need any value, they are available on the layout object\n useVirtualizerContext();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n let {direction} = useLocale();\n\n let [isPointerDown, setIsPointerDown] = useState(false);\n useEffect(() => {\n let setDown = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(true);\n }\n };\n let setUp = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(false);\n }\n };\n document.addEventListener('pointerdown', setDown, {capture: true});\n document.addEventListener('pointerup', setUp, {capture: true});\n return () => {\n document.removeEventListener('pointerdown', setDown, {capture: true});\n document.removeEventListener('pointerup', setUp, {capture: true});\n };\n }, []);\n\n let {inputProps, resizerProps} = useTableColumnResize<unknown>(\n mergeProps(props, {\n 'aria-label': stringFormatter.format('columnResizer'),\n isDisabled: isEmpty\n }), layout, objectRef);\n\n let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);\n let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);\n let isResizing = layout.resizingColumn === column.key;\n let cursor = '';\n if (isEResizable) {\n cursor = direction === 'rtl' ? CURSORS.w : CURSORS.e;\n } else if (isWResizable) {\n cursor = direction === 'rtl' ? CURSORS.e : CURSORS.w;\n } else {\n cursor = CURSORS.ew;\n }\n\n let style = {\n ...resizerProps.style,\n height: '100%',\n display: showResizer ? undefined : 'none',\n cursor\n };\n\n return (\n <>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...resizerProps}\n role=\"presentation\"\n style={style}\n className={classNames(styles, 'spectrum-Table-columnResizer')}>\n <input\n ref={objectRef}\n {...mergeProps(inputProps, {onFocus: onFocusedResizer})} />\n </div>\n </FocusRing>\n {/* Placeholder so that the title doesn't intersect with space reserved by the resizer when it appears. */}\n <div\n aria-hidden\n role=\"presentation\"\n className={classNames(styles, 'spectrum-Table-columnResizerPlaceholder')} />\n <CursorOverlay show={isResizing && isPointerDown}>\n <div style={{position: 'fixed', top: 0, left: 0, bottom: 0, right: 0, cursor}} />\n </CursorOverlay>\n </>\n );\n}\n\nfunction CursorOverlay(props) {\n let {show, children} = props;\n let {getContainer} = useUNSTABLE_PortalContext();\n return show ? ReactDOM.createPortal(children, getContainer?.() ?? document.body) : null;\n}\n\nconst _Resizer = React.forwardRef(Resizer);\nexport {_Resizer as Resizer};\n","module.exports = \"fb5e0424109df74c\";","module.exports = \"b243267b2524b67c\";","module.exports = \"1fd435371c71f5bc\";"],"names":[],"version":3,"file":"Resizer.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;ACAA,4BAAiB;;;;ACAjB,4BAAiB;;;;;;;;;;;;;;ACAjB,4BAAiB;;;AHsBjB,SAAS,gCAAU,GAAW,EAAE,QAAgB;IAC9C,kGAAkG;IAClG,uGAAuG;IACvG,kFAAkF;IAClF,IAAI,CAAA,GAAA,eAAO,KACT,OAAO,CAAC,kCAAkC,EAAE,mBAAmB,KAAK,+BAA+B,EAAE,mBAAmB,IAAI,OAAO,CAAC,0BAA0B,2BAA2B,YAAY,EAAE,UAAU;SAEjN,OAAO,CAAC,wBAAwB,EAAE,mBAAmB,KAAK,QAAQ,EAAE,UAAU;AAElF;AAWA,MAAM,gCAAU;IACd,IAAI,gCAAU,CAAA,GAAA,gEAAO,GAAG;IACxB,GAAG,gCAAU,CAAA,GAAA,gEAAM,GAAG;IACtB,GAAG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AwB;QACC;IAA9C,OAAO,qBAAO,CAAA,GAAA,eAAO,EAAE,YAAY,CAAC,UAAU,CAAA,gBAAA,yBAAA,mCAAA,4BAAA,2BAAA,gBAAoB,SAAS,IAAI,IAAI;AACrF","sources":["packages/@react-spectrum/table/src/Resizer.tsx","node_modules/@parcel/runtime-js/lib/bundles/runtime-a4d2d5b24236251c.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-3b74b2254c084d90.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-363f6d14626169ea.js"],"sourcesContent":[" \nimport {classNames} from '@react-spectrum/utils';\nimport {ColumnSize} from '@react-types/table';\nimport eCursor from 'bundle-text:./cursors/Cur_MoveToRight_9_9.svg';\nimport ewCursor from 'bundle-text:./cursors/Cur_MoveHorizontal_9_9.svg';\nimport {FocusRing} from '@react-aria/focus';\nimport {GridNode} from '@react-types/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isWebKit, mergeProps, useObjectRef} from '@react-aria/utils';\nimport {Key, RefObject} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, useContext, useEffect, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport styles from '@adobe/spectrum-css-temp/components/table/vars.css';\nimport {TableColumnResizeState} from '@react-stately/table';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useTableColumnResize} from '@react-aria/table';\nimport {useTableContext, useVirtualizerContext} from './TableViewBase';\nimport {useUNSTABLE_PortalContext} from '@react-aria/overlays';\n// @ts-ignore\nimport wCursor from 'bundle-text:./cursors/Cur_MoveToLeft_9_9.svg';\n\nfunction getCursor(svg: string, fallback: string) {\n // WebKit renders SVG cursors blurry on 2x screens: https://bugs.webkit.org/show_bug.cgi?id=160657\n // To work around this, we generate two SVGs at different sizes and use image-set to pick between them.\n // Only do this in WebKit to avoid Firefox rendering the cursor at twice the size.\n if (isWebKit()) {\n return `image-set(url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 1x, url(\"data:image/svg+xml,${encodeURIComponent(svg.replace('width=\"32\" height=\"32\"', 'width=\"64\" height=\"64\"'))}\") 2x) 8 8, ${fallback}`;\n } else {\n return `url(\"data:image/svg+xml,${encodeURIComponent(svg)}\") 8 8, ${fallback}`;\n }\n}\n\ninterface ResizerProps<T> {\n column: GridNode<T>,\n showResizer: boolean,\n triggerRef: RefObject<HTMLDivElement | null>,\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void,\n onResize?: (widths: Map<Key, ColumnSize>) => void,\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void\n}\n\nconst CURSORS = {\n ew: getCursor(ewCursor, 'ew-resize'),\n w: getCursor(wCursor, 'w-resize'),\n e: getCursor(eCursor, 'e-resize')\n};\n\nexport const ResizeStateContext = createContext<TableColumnResizeState<unknown> | null>(null);\n\nexport const Resizer = React.forwardRef(function Resizer<T>(props: ResizerProps<T>, ref: ForwardedRef<HTMLInputElement | null>) {\n let {column, showResizer} = props;\n let objectRef = useObjectRef(ref);\n let {isEmpty, onFocusedResizer} = useTableContext();\n let layout = useContext(ResizeStateContext)!;\n // Virtualizer re-renders, but these components are all cached\n // in order to get around that and cause a rerender here, we use context\n // but we don't actually need any value, they are available on the layout object\n useVirtualizerContext();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/table');\n let {direction} = useLocale();\n\n let [isPointerDown, setIsPointerDown] = useState(false);\n useEffect(() => {\n let setDown = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(true);\n }\n };\n let setUp = (e) => {\n if (e.pointerType === 'mouse') {\n setIsPointerDown(false);\n }\n };\n document.addEventListener('pointerdown', setDown, {capture: true});\n document.addEventListener('pointerup', setUp, {capture: true});\n return () => {\n document.removeEventListener('pointerdown', setDown, {capture: true});\n document.removeEventListener('pointerup', setUp, {capture: true});\n };\n }, []);\n\n let {inputProps, resizerProps} = useTableColumnResize<unknown>(\n mergeProps(props, {\n 'aria-label': stringFormatter.format('columnResizer'),\n isDisabled: isEmpty\n }), layout, objectRef);\n\n let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);\n let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);\n let isResizing = layout.resizingColumn === column.key;\n let cursor = '';\n if (isEResizable) {\n cursor = direction === 'rtl' ? CURSORS.w : CURSORS.e;\n } else if (isWResizable) {\n cursor = direction === 'rtl' ? CURSORS.e : CURSORS.w;\n } else {\n cursor = CURSORS.ew;\n }\n\n let style = {\n ...resizerProps.style,\n height: '100%',\n display: showResizer ? undefined : 'none',\n cursor\n };\n\n return (\n <>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...resizerProps}\n role=\"presentation\"\n style={style}\n className={classNames(styles, 'spectrum-Table-columnResizer')}>\n <input\n ref={objectRef}\n {...mergeProps(inputProps, {onFocus: onFocusedResizer})} />\n </div>\n </FocusRing>\n {/* Placeholder so that the title doesn't intersect with space reserved by the resizer when it appears. */}\n <div\n aria-hidden\n role=\"presentation\"\n className={classNames(styles, 'spectrum-Table-columnResizerPlaceholder')} />\n <CursorOverlay show={isResizing && isPointerDown}>\n <div style={{position: 'fixed', top: 0, left: 0, bottom: 0, right: 0, cursor}} />\n </CursorOverlay>\n </>\n );\n});\n\nfunction CursorOverlay(props) {\n let {show, children} = props;\n let {getContainer} = useUNSTABLE_PortalContext();\n return show ? ReactDOM.createPortal(children, getContainer?.() ?? document.body) : null;\n}\n","module.exports = \"fb5e0424109df74c\";","module.exports = \"b243267b2524b67c\";","module.exports = \"1fd435371c71f5bc\";"],"names":[],"version":3,"file":"Resizer.module.js.map"}
@@ -25,7 +25,7 @@ $parcel$export(module.exports, "TableView", () => $be8a9c035a82f788$export$b3c27
25
25
  */
26
26
 
27
27
 
28
- function $be8a9c035a82f788$var$TableView(props, ref) {
28
+ const $be8a9c035a82f788$export$b3c27e869d856b7 = /*#__PURE__*/ (0, ($parcel$interopDefault($3lcIF$react))).forwardRef(function TableView(props, ref) {
29
29
  let { selectionStyle: selectionStyle, dragAndDropHooks: dragAndDropHooks } = props;
30
30
  let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $3lcIF$react.useState)(selectionStyle !== 'highlight');
31
31
  let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
@@ -43,8 +43,7 @@ function $be8a9c035a82f788$var$TableView(props, ref) {
43
43
  state: state,
44
44
  ref: ref
45
45
  });
46
- }
47
- const $be8a9c035a82f788$export$b3c27e869d856b7 = /*#__PURE__*/ (0, ($parcel$interopDefault($3lcIF$react))).forwardRef($be8a9c035a82f788$var$TableView);
46
+ });
48
47
 
49
48
 
50
49
  //# sourceMappingURL=TableView.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAUD,SAAS,gCAA4B,KAAoB,EAAE,GAA2B;IACpF,IAAI,kBACF,cAAc,oBACd,gBAAgB,EACjB,GAAG;IACJ,IAAI,CAAC,yBAAyB,2BAA2B,GAAG,CAAA,GAAA,qBAAO,EAAE,mBAAmB;IACxF,IAAI,mBAAmB,CAAC,EAAC,6BAAA,uCAAA,iBAAkB,2BAA2B;IACtE,IAAI,QAAQ,CAAA,GAAA,sCAAY,EAAE;QACxB,GAAG,KAAK;iCACR;QACA,iBAAiB;QACjB,mBAAmB,MAAM,cAAc,KAAK,cAAc,YAAY;IACxE;IAEA,+HAA+H;IAC/H,IAAI,uBAAuB,MAAM,gBAAgB,CAAC,iBAAiB,KAAK;IACxE,IAAI,yBAAyB,yBAC3B,2BAA2B;IAG7B,qBACE,0DAAC,CAAA,GAAA,uCAAY;QAAG,GAAG,KAAK;QAAE,OAAO;QAAO,KAAK;;AAEjD;AAEA,MAAM,yDAAa,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/TableView.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMRef} from '@react-types/shared';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumTableProps} from './TableViewWrapper';\nimport {TableViewBase} from './TableViewBase';\nimport {useTableState} from '@react-stately/table';\n\ninterface TableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}\n\nfunction TableView<T extends object>(props: TableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {\n selectionStyle,\n dragAndDropHooks\n } = props;\n let [showSelectionCheckboxes, setShowSelectionCheckboxes] = useState(selectionStyle !== 'highlight');\n let isTableDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let state = useTableState({\n ...props,\n showSelectionCheckboxes,\n showDragButtons: isTableDraggable,\n selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'\n });\n\n // If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...\n let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';\n if (shouldShowCheckboxes !== showSelectionCheckboxes) {\n setShowSelectionCheckboxes(shouldShowCheckboxes);\n }\n\n return (\n <TableViewBase {...props} state={state} ref={ref} />\n );\n}\n\nconst _TableView = React.forwardRef(TableView) as <T>(props: TableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TableView as TableView};\n"],"names":[],"version":3,"file":"TableView.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAUM,MAAM,yDAAY,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,UAA4B,KAAoB,EAAE,GAA2B;IAC9H,IAAI,kBACF,cAAc,oBACd,gBAAgB,EACjB,GAAG;IACJ,IAAI,CAAC,yBAAyB,2BAA2B,GAAG,CAAA,GAAA,qBAAO,EAAE,mBAAmB;IACxF,IAAI,mBAAmB,CAAC,EAAC,6BAAA,uCAAA,iBAAkB,2BAA2B;IACtE,IAAI,QAAQ,CAAA,GAAA,sCAAY,EAAE;QACxB,GAAG,KAAK;iCACR;QACA,iBAAiB;QACjB,mBAAmB,MAAM,cAAc,KAAK,cAAc,YAAY;IACxE;IAEA,+HAA+H;IAC/H,IAAI,uBAAuB,MAAM,gBAAgB,CAAC,iBAAiB,KAAK;IACxE,IAAI,yBAAyB,yBAC3B,2BAA2B;IAG7B,qBACE,0DAAC,CAAA,GAAA,uCAAY;QAAG,GAAG,KAAK;QAAE,OAAO;QAAO,KAAK;;AAEjD","sources":["packages/@react-spectrum/table/src/TableView.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMRef} from '@react-types/shared';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumTableProps} from './TableViewWrapper';\nimport {TableViewBase} from './TableViewBase';\nimport {useTableState} from '@react-stately/table';\n\ninterface TableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}\n\nexport const TableView = React.forwardRef(function TableView<T extends object>(props: TableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {\n selectionStyle,\n dragAndDropHooks\n } = props;\n let [showSelectionCheckboxes, setShowSelectionCheckboxes] = useState(selectionStyle !== 'highlight');\n let isTableDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let state = useTableState({\n ...props,\n showSelectionCheckboxes,\n showDragButtons: isTableDraggable,\n selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'\n });\n\n // If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...\n let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';\n if (shouldShowCheckboxes !== showSelectionCheckboxes) {\n setShowSelectionCheckboxes(shouldShowCheckboxes);\n }\n\n return (\n <TableViewBase {...props} state={state} ref={ref} />\n );\n}) as <T>(props: TableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"TableView.main.js.map"}
@@ -15,7 +15,7 @@ import {useTableState as $9W9sm$useTableState} from "@react-stately/table";
15
15
  */
16
16
 
17
17
 
18
- function $d14697b14e638114$var$TableView(props, ref) {
18
+ const $d14697b14e638114$export$b3c27e869d856b7 = /*#__PURE__*/ (0, $9W9sm$react).forwardRef(function TableView(props, ref) {
19
19
  let { selectionStyle: selectionStyle, dragAndDropHooks: dragAndDropHooks } = props;
20
20
  let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $9W9sm$useState)(selectionStyle !== 'highlight');
21
21
  let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
@@ -33,8 +33,7 @@ function $d14697b14e638114$var$TableView(props, ref) {
33
33
  state: state,
34
34
  ref: ref
35
35
  });
36
- }
37
- const $d14697b14e638114$export$b3c27e869d856b7 = /*#__PURE__*/ (0, $9W9sm$react).forwardRef($d14697b14e638114$var$TableView);
36
+ });
38
37
 
39
38
 
40
39
  export {$d14697b14e638114$export$b3c27e869d856b7 as TableView};
@@ -15,7 +15,7 @@ import {useTableState as $9W9sm$useTableState} from "@react-stately/table";
15
15
  */
16
16
 
17
17
 
18
- function $d14697b14e638114$var$TableView(props, ref) {
18
+ const $d14697b14e638114$export$b3c27e869d856b7 = /*#__PURE__*/ (0, $9W9sm$react).forwardRef(function TableView(props, ref) {
19
19
  let { selectionStyle: selectionStyle, dragAndDropHooks: dragAndDropHooks } = props;
20
20
  let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $9W9sm$useState)(selectionStyle !== 'highlight');
21
21
  let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
@@ -33,8 +33,7 @@ function $d14697b14e638114$var$TableView(props, ref) {
33
33
  state: state,
34
34
  ref: ref
35
35
  });
36
- }
37
- const $d14697b14e638114$export$b3c27e869d856b7 = /*#__PURE__*/ (0, $9W9sm$react).forwardRef($d14697b14e638114$var$TableView);
36
+ });
38
37
 
39
38
 
40
39
  export {$d14697b14e638114$export$b3c27e869d856b7 as TableView};
@@ -1 +1 @@
1
- {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAUD,SAAS,gCAA4B,KAAoB,EAAE,GAA2B;IACpF,IAAI,kBACF,cAAc,oBACd,gBAAgB,EACjB,GAAG;IACJ,IAAI,CAAC,yBAAyB,2BAA2B,GAAG,CAAA,GAAA,eAAO,EAAE,mBAAmB;IACxF,IAAI,mBAAmB,CAAC,EAAC,6BAAA,uCAAA,iBAAkB,2BAA2B;IACtE,IAAI,QAAQ,CAAA,GAAA,oBAAY,EAAE;QACxB,GAAG,KAAK;iCACR;QACA,iBAAiB;QACjB,mBAAmB,MAAM,cAAc,KAAK,cAAc,YAAY;IACxE;IAEA,+HAA+H;IAC/H,IAAI,uBAAuB,MAAM,gBAAgB,CAAC,iBAAiB,KAAK;IACxE,IAAI,yBAAyB,yBAC3B,2BAA2B;IAG7B,qBACE,gCAAC,CAAA,GAAA,yCAAY;QAAG,GAAG,KAAK;QAAE,OAAO;QAAO,KAAK;;AAEjD;AAEA,MAAM,yDAAa,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/TableView.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMRef} from '@react-types/shared';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumTableProps} from './TableViewWrapper';\nimport {TableViewBase} from './TableViewBase';\nimport {useTableState} from '@react-stately/table';\n\ninterface TableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}\n\nfunction TableView<T extends object>(props: TableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {\n selectionStyle,\n dragAndDropHooks\n } = props;\n let [showSelectionCheckboxes, setShowSelectionCheckboxes] = useState(selectionStyle !== 'highlight');\n let isTableDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let state = useTableState({\n ...props,\n showSelectionCheckboxes,\n showDragButtons: isTableDraggable,\n selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'\n });\n\n // If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...\n let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';\n if (shouldShowCheckboxes !== showSelectionCheckboxes) {\n setShowSelectionCheckboxes(shouldShowCheckboxes);\n }\n\n return (\n <TableViewBase {...props} state={state} ref={ref} />\n );\n}\n\nconst _TableView = React.forwardRef(TableView) as <T>(props: TableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TableView as TableView};\n"],"names":[],"version":3,"file":"TableView.module.js.map"}
1
+ {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAUM,MAAM,yDAAY,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,UAA4B,KAAoB,EAAE,GAA2B;IAC9H,IAAI,kBACF,cAAc,oBACd,gBAAgB,EACjB,GAAG;IACJ,IAAI,CAAC,yBAAyB,2BAA2B,GAAG,CAAA,GAAA,eAAO,EAAE,mBAAmB;IACxF,IAAI,mBAAmB,CAAC,EAAC,6BAAA,uCAAA,iBAAkB,2BAA2B;IACtE,IAAI,QAAQ,CAAA,GAAA,oBAAY,EAAE;QACxB,GAAG,KAAK;iCACR;QACA,iBAAiB;QACjB,mBAAmB,MAAM,cAAc,KAAK,cAAc,YAAY;IACxE;IAEA,+HAA+H;IAC/H,IAAI,uBAAuB,MAAM,gBAAgB,CAAC,iBAAiB,KAAK;IACxE,IAAI,yBAAyB,yBAC3B,2BAA2B;IAG7B,qBACE,gCAAC,CAAA,GAAA,yCAAY;QAAG,GAAG,KAAK;QAAE,OAAO;QAAO,KAAK;;AAEjD","sources":["packages/@react-spectrum/table/src/TableView.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMRef} from '@react-types/shared';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumTableProps} from './TableViewWrapper';\nimport {TableViewBase} from './TableViewBase';\nimport {useTableState} from '@react-stately/table';\n\ninterface TableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}\n\nexport const TableView = React.forwardRef(function TableView<T extends object>(props: TableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {\n selectionStyle,\n dragAndDropHooks\n } = props;\n let [showSelectionCheckboxes, setShowSelectionCheckboxes] = useState(selectionStyle !== 'highlight');\n let isTableDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let state = useTableState({\n ...props,\n showSelectionCheckboxes,\n showDragButtons: isTableDraggable,\n selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'\n });\n\n // If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...\n let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';\n if (shouldShowCheckboxes !== showSelectionCheckboxes) {\n setShowSelectionCheckboxes(shouldShowCheckboxes);\n }\n\n return (\n <TableViewBase {...props} state={state} ref={ref} />\n );\n}) as <T>(props: TableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"TableView.module.js.map"}
@@ -4,7 +4,7 @@ var $18b3deb5c431fa13$exports = require("./Nubbin.main.js");
4
4
  var $2877766f94c67a67$exports = require("./Resizer.main.js");
5
5
  var $4a98adf416b1ae5d$exports = require("./RootDropIndicator.main.js");
6
6
  var $f65d44d222cc509b$exports = require("./DragPreview.main.js");
7
- require("./vars.bd693cb4.css");
7
+ require("./vars.27f08d5f.css");
8
8
  var $982885d0a34882ea$exports = require("./table_vars_css.main.js");
9
9
  require("./table.11fc8462.css");
10
10
  var $4afcd54cfd94dbb9$exports = require("./table_css.main.js");
@@ -4,7 +4,7 @@ import {Nubbin as $cb7d341e8868d81d$export$d9658cdf8c86807} from "./Nubbin.mjs";
4
4
  import {Resizer as $fc695d2eafc2b351$export$48a76196cafe3b93, ResizeStateContext as $fc695d2eafc2b351$export$b517d84d4ad20b24} from "./Resizer.mjs";
5
5
  import {RootDropIndicator as $4e6fc36ba71ba405$export$d30a7814cfd4033e} from "./RootDropIndicator.mjs";
6
6
  import {DragPreview as $daa6ead3d9d3506a$export$905ab40ac2179daa} from "./DragPreview.mjs";
7
- import "./vars.bd693cb4.css";
7
+ import "./vars.27f08d5f.css";
8
8
  import $7lS7h$table_vars_cssmodulejs from "./table_vars_css.mjs";
9
9
  import "./table.11fc8462.css";
10
10
  import $7lS7h$table_cssmodulejs from "./table_css.mjs";
@@ -4,7 +4,7 @@ import {Nubbin as $cb7d341e8868d81d$export$d9658cdf8c86807} from "./Nubbin.modul
4
4
  import {Resizer as $fc695d2eafc2b351$export$48a76196cafe3b93, ResizeStateContext as $fc695d2eafc2b351$export$b517d84d4ad20b24} from "./Resizer.module.js";
5
5
  import {RootDropIndicator as $4e6fc36ba71ba405$export$d30a7814cfd4033e} from "./RootDropIndicator.module.js";
6
6
  import {DragPreview as $daa6ead3d9d3506a$export$905ab40ac2179daa} from "./DragPreview.module.js";
7
- import "./vars.bd693cb4.css";
7
+ import "./vars.27f08d5f.css";
8
8
  import $7lS7h$table_vars_cssmodulejs from "./table_vars_css.module.js";
9
9
  import "./table.11fc8462.css";
10
10
  import $7lS7h$table_cssmodulejs from "./table_css.module.js";
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAOM,MAAM,kDAA2B,CAAA,GAAA,qCAAU;IAGtC,kBAAgC;QACxC,IAAI,aAAa,IAAI,CAAC,WAAW,CAAE,UAAU;QAC7C,IAAI,eAAe,WAAW,IAAI,CAAC,KAAK,CAAC,YAAY;QACrD,IAAI,CAAC,SAAS,GAAG,iBAAiB,aAAa,iBAAiB;QAChE,OAAO,KAAK,CAAC;IACf;IAEU,YAAY,IAAiB,EAAE,CAAS,EAAE,CAAS,EAAc;QACzE,IAAI,MAAM,KAAK,CAAC,YAAY,MAAM,GAAG;QACrC,IAAI,UAAU,CAAC,aAAa,GAAG,MAAM,qBAAqB;QAC1D,OAAO;IACT;IAEU,YAAwB;QAChC,IAAI,OAAO,KAAK,CAAC,UAAU;QAC3B,IAAI,YAAC,QAAQ,cAAE,UAAU,EAAC,GAAG;QAC7B,IAAI,CAAC,UACH,MAAM,IAAI,MAAM;QAGlB,IAAI,QAAQ,KAAK,UAAU,CAAC,IAAI,CAAC,KAAK;QAEtC,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,wFAAwF;YACxF,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CAAS,EAAE,CAAS,EAAc;QACtE,IAAI,MAAM,KAAK,CAAC,SAAS,MAAM,GAAG;QAClC,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,IAAI,GAAG,oBAAoB;QACrD,OAAO;IACT;IAEU,UAAU,IAAiB,EAAE,CAAS,EAAE,CAAS,EAAc;YAEnE;QADJ,IAAI,MAAM,KAAK,CAAC,UAAU,MAAM,GAAG;QACnC,KAAI,eAAA,KAAK,MAAM,cAAX,mCAAA,aAAa,KAAK,CAAC,UAAU,EAC/B,IAAI,UAAU,CAAC,aAAa,GAAG;QAEjC,OAAO;IACT;IAEU,wBAAgC;QACxC,OAAO,KAAK,CAAC,0BAA0B,GAAG,oBAAoB;IAChE;IAEU,eAAe,IAAiB,EAAE;YACnC,aAAgC;QAAvC,OAAO,EAAA,cAAA,KAAK,KAAK,cAAV,kCAAA,YAAY,gBAAgB,OAAI,eAAA,KAAK,KAAK,cAAV,mCAAA,aAAY,eAAe;IACpE;IAEA,uBAAuB,CAAS,EAAE,CAAS,EAAE,iBAAkD,EAAqB;YAE7G;YAAA;QADL,kCAAkC;QAClC,KAAK,CAAA,gDAAA,mCAAA,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAA,GAAA,mCAAG,EAAE,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,CAAA,OAAQ,KAAK,IAAI,KAAK,0BAA5E,uDAAA,iCAA0F,IAAI,CAAC,MAAM,cAArG,0DAAA,+CAAyG;QAC9G,OAAO,KAAK,CAAC,uBAAuB,GAAG,GAAG;IAC5C;;6BAjFQ,YAAqB;;AAkF/B","sources":["packages/@react-spectrum/table/src/TableViewLayout.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {DropTarget} from '@react-types/shared';\nimport {GridNode} from '@react-types/grid';\nimport {LayoutInfo, Rect} from '@react-stately/virtualizer';\nimport {LayoutNode, TableLayout} from '@react-stately/layout';\nimport {TableCollection} from '@react-stately/table';\n\nexport class TableViewLayout<T> extends TableLayout<T> {\n private isLoading: boolean = false;\n\n protected buildCollection(): LayoutNode[] {\n let collection = this.virtualizer!.collection as TableCollection<T>;\n let loadingState = collection.body.props.loadingState;\n this.isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n return super.buildCollection();\n }\n\n protected buildColumn(node: GridNode<T>, x: number, y: number): LayoutNode {\n let res = super.buildColumn(node, x, y);\n res.layoutInfo.allowOverflow = true; // for resizer nubbin\n return res;\n }\n\n protected buildBody(): LayoutNode {\n let node = super.buildBody(0);\n let {children, layoutInfo} = node;\n if (!children) {\n throw new Error('Missing children in LayoutInfo');\n }\n\n let width = node.layoutInfo.rect.width;\n\n if (this.isLoading) {\n // Add some margin around the loader to ensure that scrollbars don't flicker in and out.\n let rect = new Rect(40, children.length === 0 ? 40 : layoutInfo.rect.maxY, (width || this.virtualizer!.visibleRect.width) - 80, children.length === 0 ? this.virtualizer!.visibleRect.height - 80 : 60);\n let loader = new LayoutInfo('loader', 'loader', rect);\n loader.parentKey = layoutInfo.key;\n loader.isSticky = children.length === 0;\n let node = {\n layoutInfo: loader,\n validRect: loader.rect\n };\n children.push(node);\n this.layoutNodes.set(loader.key, node);\n layoutInfo.rect.height = loader.rect.maxY;\n width = Math.max(width, rect.width);\n } else if (children.length === 0) {\n let rect = new Rect(40, 40, this.virtualizer!.visibleRect.width - 80, this.virtualizer!.visibleRect.height - 80);\n let empty = new LayoutInfo('empty', 'empty', rect);\n empty.parentKey = layoutInfo.key;\n empty.isSticky = true;\n let node = {\n layoutInfo: empty,\n validRect: empty.rect\n };\n children.push(node);\n layoutInfo.rect.height = empty.rect.maxY;\n width = Math.max(width, rect.width);\n }\n\n return node;\n }\n\n protected buildRow(node: GridNode<T>, x: number, y: number): LayoutNode {\n let res = super.buildRow(node, x, y);\n res.layoutInfo.rect.height += 1; // for bottom border\n return res;\n }\n\n protected buildCell(node: GridNode<T>, x: number, y: number): LayoutNode {\n let res = super.buildCell(node, x, y);\n if (node.column?.props.hideHeader) {\n res.layoutInfo.allowOverflow = true;\n }\n return res;\n }\n\n protected getEstimatedRowHeight(): number {\n return super.getEstimatedRowHeight() + 1; // for bottom border\n }\n\n protected isStickyColumn(node: GridNode<T>) {\n return node.props?.isDragButtonCell || node.props?.isSelectionCell;\n }\n\n getDropTargetFromPoint(x: number, y: number, isValidDropTarget: (target: DropTarget) => boolean): DropTarget | null {\n // Offset for height of header row\n y -= this.getVisibleLayoutInfos(new Rect(x, y, 1, 1)).find(info => info.type === 'headerrow')?.rect.height ?? 0;\n return super.getDropTargetFromPoint(x, y, isValidDropTarget);\n }\n}\n"],"names":[],"version":3,"file":"TableViewLayout.main.js.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAOM,MAAM,kDAA2B,CAAA,GAAA,qCAAU;IAGtC,kBAAgC;QACxC,IAAI,aAAa,IAAI,CAAC,WAAW,CAAE,UAAU;QAC7C,IAAI,eAAe,WAAW,IAAI,CAAC,KAAK,CAAC,YAAY;QACrD,IAAI,CAAC,SAAS,GAAG,iBAAiB,aAAa,iBAAiB;QAChE,OAAO,KAAK,CAAC;IACf;IAEU,YAAY,IAAiB,EAAE,CAAS,EAAE,CAAS,EAAc;QACzE,IAAI,MAAM,KAAK,CAAC,YAAY,MAAM,GAAG;QACrC,IAAI,UAAU,CAAC,aAAa,GAAG,MAAM,qBAAqB;QAC1D,OAAO;IACT;IAEU,YAAwB;QAChC,IAAI,OAAO,KAAK,CAAC,UAAU;QAC3B,IAAI,YAAC,QAAQ,cAAE,UAAU,EAAC,GAAG;QAC7B,IAAI,CAAC,UACH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MAAM,GAAG,MAAM,IAAI,CAAC,IAAI;YACxC,QAAQ,KAAK,GAAG,CAAC,OAAO,KAAK,KAAK;QACpC;QAEA,OAAO;IACT;IAEU,SAAS,IAAiB,EAAE,CAAS,EAAE,CAAS,EAAc;QACtE,IAAI,MAAM,KAAK,CAAC,SAAS,MAAM,GAAG;QAClC,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,IAAI,GAAG,oBAAoB;QACrD,OAAO;IACT;IAEU,UAAU,IAAiB,EAAE,CAAS,EAAE,CAAS,EAAc;YAEnE;QADJ,IAAI,MAAM,KAAK,CAAC,UAAU,MAAM,GAAG;QACnC,KAAI,eAAA,KAAK,MAAM,cAAX,mCAAA,aAAa,KAAK,CAAC,UAAU,EAC/B,IAAI,UAAU,CAAC,aAAa,GAAG;QAEjC,OAAO;IACT;IAEU,wBAAgC;QACxC,OAAO,KAAK,CAAC,0BAA0B,GAAG,oBAAoB;IAChE;IAEU,eAAe,IAAiB,EAAE;YACnC,aAAgC;QAAvC,OAAO,EAAA,cAAA,KAAK,KAAK,cAAV,kCAAA,YAAY,gBAAgB,OAAI,eAAA,KAAK,KAAK,cAAV,mCAAA,aAAY,eAAe;IACpE;IAEA,uBAAuB,CAAS,EAAE,CAAS,EAAE,iBAAkD,EAAqB;YAE7G;YAAA;QADL,kCAAkC;QAClC,KAAK,CAAA,gDAAA,mCAAA,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAA,GAAA,mCAAG,EAAE,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,CAAA,OAAQ,KAAK,IAAI,KAAK,0BAA5E,uDAAA,iCAA0F,IAAI,CAAC,MAAM,cAArG,0DAAA,+CAAyG;QAC9G,OAAO,KAAK,CAAC,uBAAuB,GAAG,GAAG;IAC5C;;QAlFK,qBACG,YAAqB;;AAkF/B","sources":["packages/@react-spectrum/table/src/TableViewLayout.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {DropTarget} from '@react-types/shared';\nimport {GridNode} from '@react-types/grid';\nimport {LayoutInfo, Rect} from '@react-stately/virtualizer';\nimport {LayoutNode, TableLayout} from '@react-stately/layout';\nimport {TableCollection} from '@react-stately/table';\n\nexport class TableViewLayout<T> extends TableLayout<T> {\n private isLoading: boolean = false;\n\n protected buildCollection(): LayoutNode[] {\n let collection = this.virtualizer!.collection as TableCollection<T>;\n let loadingState = collection.body.props.loadingState;\n this.isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n return super.buildCollection();\n }\n\n protected buildColumn(node: GridNode<T>, x: number, y: number): LayoutNode {\n let res = super.buildColumn(node, x, y);\n res.layoutInfo.allowOverflow = true; // for resizer nubbin\n return res;\n }\n\n protected buildBody(): LayoutNode {\n let node = super.buildBody(0);\n let {children, layoutInfo} = node;\n if (!children) {\n throw new Error('Missing children in LayoutInfo');\n }\n\n let width = node.layoutInfo.rect.width;\n\n if (this.isLoading) {\n // Add some margin around the loader to ensure that scrollbars don't flicker in and out.\n let rect = new Rect(40, children.length === 0 ? 40 : layoutInfo.rect.maxY, (width || this.virtualizer!.visibleRect.width) - 80, children.length === 0 ? this.virtualizer!.visibleRect.height - 80 : 60);\n let loader = new LayoutInfo('loader', 'loader', rect);\n loader.parentKey = layoutInfo.key;\n loader.isSticky = children.length === 0;\n let node = {\n layoutInfo: loader,\n validRect: loader.rect\n };\n children.push(node);\n this.layoutNodes.set(loader.key, node);\n layoutInfo.rect.height = loader.rect.maxY;\n width = Math.max(width, rect.width);\n } else if (children.length === 0) {\n let rect = new Rect(40, 40, this.virtualizer!.visibleRect.width - 80, this.virtualizer!.visibleRect.height - 80);\n let empty = new LayoutInfo('empty', 'empty', rect);\n empty.parentKey = layoutInfo.key;\n empty.isSticky = true;\n let node = {\n layoutInfo: empty,\n validRect: empty.rect\n };\n children.push(node);\n layoutInfo.rect.height = empty.rect.maxY;\n width = Math.max(width, rect.width);\n }\n\n return node;\n }\n\n protected buildRow(node: GridNode<T>, x: number, y: number): LayoutNode {\n let res = super.buildRow(node, x, y);\n res.layoutInfo.rect.height += 1; // for bottom border\n return res;\n }\n\n protected buildCell(node: GridNode<T>, x: number, y: number): LayoutNode {\n let res = super.buildCell(node, x, y);\n if (node.column?.props.hideHeader) {\n res.layoutInfo.allowOverflow = true;\n }\n return res;\n }\n\n protected getEstimatedRowHeight(): number {\n return super.getEstimatedRowHeight() + 1; // for bottom border\n }\n\n protected isStickyColumn(node: GridNode<T>) {\n return node.props?.isDragButtonCell || node.props?.isSelectionCell;\n }\n\n getDropTargetFromPoint(x: number, y: number, isValidDropTarget: (target: DropTarget) => boolean): DropTarget | null {\n // Offset for height of header row\n y -= this.getVisibleLayoutInfos(new Rect(x, y, 1, 1)).find(info => info.type === 'headerrow')?.rect.height ?? 0;\n return super.getDropTargetFromPoint(x, y, isValidDropTarget);\n }\n}\n"],"names":[],"version":3,"file":"TableViewLayout.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAOM,MAAM,kDAA2B,CAAA,GAAA,kBAAU;IAGtC,kBAAgC;QACxC,IAAI,aAAa,IAAI,CAAC,WAAW,CAAE,UAAU;QAC7C,IAAI,eAAe,WAAW,IAAI,CAAC,KAAK,CAAC,YAAY;QACrD,IAAI,CAAC,SAAS,GAAG,iBAAiB,aAAa,iBAAiB;QAChE,OAAO,KAAK,CAAC;IACf;IAEU,YAAY,IAAiB,EAAE,CAAS,EAAE,CAAS,EAAc;QACzE,IAAI,MAAM,KAAK,CAAC,YAAY,MAAM,GAAG;QACrC,IAAI,UAAU,CAAC,aAAa,GAAG,MAAM,qBAAq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;;6BAjFQ,YAAqB;;AAkF/B","sources":["packages/@react-spectrum/table/src/TableViewLayout.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {DropTarget} from '@react-types/shared';\nimport {GridNode} from '@react-types/grid';\nimport {LayoutInfo, Rect} from '@react-stately/virtualizer';\nimport {LayoutNode, TableLayout} from '@react-stately/layout';\nimport {TableCollection} from '@react-stately/table';\n\nexport class TableViewLayout<T> extends TableLayout<T> {\n private isLoading: boolean = false;\n\n protected buildCollection(): LayoutNode[] {\n let collection = this.virtualizer!.collection as TableCollection<T>;\n let loadingState = collection.body.props.loadingState;\n this.isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n return super.buildCollection();\n }\n\n protected buildColumn(node: GridNode<T>, x: number, y: number): LayoutNode {\n let res = super.buildColumn(node, x, y);\n res.layoutInfo.allowOverflow = true; // for resizer nubbin\n return res;\n }\n\n protected buildBody(): LayoutNode {\n let node = super.buildBody(0);\n let {children, layoutInfo} = node;\n if (!children) {\n throw new Error('Missing children in LayoutInfo');\n }\n\n let width = node.layoutInfo.rect.width;\n\n if (this.isLoading) {\n // Add some margin around the loader to ensure that scrollbars don't flicker in and out.\n let rect = new Rect(40, children.length === 0 ? 40 : layoutInfo.rect.maxY, (width || this.virtualizer!.visibleRect.width) - 80, children.length === 0 ? this.virtualizer!.visibleRect.height - 80 : 60);\n let loader = new LayoutInfo('loader', 'loader', rect);\n loader.parentKey = layoutInfo.key;\n loader.isSticky = children.length === 0;\n let node = {\n layoutInfo: loader,\n validRect: loader.rect\n };\n children.push(node);\n this.layoutNodes.set(loader.key, node);\n layoutInfo.rect.height = loader.rect.maxY;\n width = Math.max(width, rect.width);\n } else if (children.length === 0) {\n let rect = new Rect(40, 40, this.virtualizer!.visibleRect.width - 80, this.virtualizer!.visibleRect.height - 80);\n let empty = new LayoutInfo('empty', 'empty', rect);\n empty.parentKey = layoutInfo.key;\n empty.isSticky = true;\n let node = {\n layoutInfo: empty,\n validRect: empty.rect\n };\n children.push(node);\n layoutInfo.rect.height = empty.rect.maxY;\n width = Math.max(width, rect.width);\n }\n\n return node;\n }\n\n protected buildRow(node: GridNode<T>, x: number, y: number): LayoutNode {\n let res = super.buildRow(node, x, y);\n res.layoutInfo.rect.height += 1; // for bottom border\n return res;\n }\n\n protected buildCell(node: GridNode<T>, x: number, y: number): LayoutNode {\n let res = super.buildCell(node, x, y);\n if (node.column?.props.hideHeader) {\n res.layoutInfo.allowOverflow = true;\n }\n return res;\n }\n\n protected getEstimatedRowHeight(): number {\n return super.getEstimatedRowHeight() + 1; // for bottom border\n }\n\n protected isStickyColumn(node: GridNode<T>) {\n return node.props?.isDragButtonCell || node.props?.isSelectionCell;\n }\n\n getDropTargetFromPoint(x: number, y: number, isValidDropTarget: (target: DropTarget) => boolean): DropTarget | null {\n // Offset for height of header row\n y -= this.getVisibleLayoutInfos(new Rect(x, y, 1, 1)).find(info => info.type === 'headerrow')?.rect.height ?? 0;\n return super.getDropTargetFromPoint(x, y, isValidDropTarget);\n }\n}\n"],"names":[],"version":3,"file":"TableViewLayout.module.js.map"}
1
+ {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAOM,MAAM,kDAA2B,CAAA,GAAA,kBAAU;IAGtC,kBAAgC;QACxC,IAAI,aAAa,IAAI,CAAC,WAAW,CAAE,UAAU;QAC7C,IAAI,eAAe,WAAW,IAAI,CAAC,KAAK,CAAC,YAAY;QACrD,IAAI,CAAC,SAAS,GAAG,iBAAiB,aAAa,iBAAiB;QAChE,OAAO,KAAK,CAAC;IACf;IAEU,YAAY,IAAiB,EAA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,KAAK,0BAA5E,uDAAA,iCAA0F,IAAI,CAAC,MAAM,cAArG,0DAAA,+CAAyG;QAC9G,OAAO,KAAK,CAAC,uBAAuB,GAAG,GAAG;IAC5C;;QAlFK,qBACG,YAAqB;;AAkF/B","sources":["packages/@react-spectrum/table/src/TableViewLayout.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {DropTarget} from '@react-types/shared';\nimport {GridNode} from '@react-types/grid';\nimport {LayoutInfo, Rect} from '@react-stately/virtualizer';\nimport {LayoutNode, TableLayout} from '@react-stately/layout';\nimport {TableCollection} from '@react-stately/table';\n\nexport class TableViewLayout<T> extends TableLayout<T> {\n private isLoading: boolean = false;\n\n protected buildCollection(): LayoutNode[] {\n let collection = this.virtualizer!.collection as TableCollection<T>;\n let loadingState = collection.body.props.loadingState;\n this.isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n return super.buildCollection();\n }\n\n protected buildColumn(node: GridNode<T>, x: number, y: number): LayoutNode {\n let res = super.buildColumn(node, x, y);\n res.layoutInfo.allowOverflow = true; // for resizer nubbin\n return res;\n }\n\n protected buildBody(): LayoutNode {\n let node = super.buildBody(0);\n let {children, layoutInfo} = node;\n if (!children) {\n throw new Error('Missing children in LayoutInfo');\n }\n\n let width = node.layoutInfo.rect.width;\n\n if (this.isLoading) {\n // Add some margin around the loader to ensure that scrollbars don't flicker in and out.\n let rect = new Rect(40, children.length === 0 ? 40 : layoutInfo.rect.maxY, (width || this.virtualizer!.visibleRect.width) - 80, children.length === 0 ? this.virtualizer!.visibleRect.height - 80 : 60);\n let loader = new LayoutInfo('loader', 'loader', rect);\n loader.parentKey = layoutInfo.key;\n loader.isSticky = children.length === 0;\n let node = {\n layoutInfo: loader,\n validRect: loader.rect\n };\n children.push(node);\n this.layoutNodes.set(loader.key, node);\n layoutInfo.rect.height = loader.rect.maxY;\n width = Math.max(width, rect.width);\n } else if (children.length === 0) {\n let rect = new Rect(40, 40, this.virtualizer!.visibleRect.width - 80, this.virtualizer!.visibleRect.height - 80);\n let empty = new LayoutInfo('empty', 'empty', rect);\n empty.parentKey = layoutInfo.key;\n empty.isSticky = true;\n let node = {\n layoutInfo: empty,\n validRect: empty.rect\n };\n children.push(node);\n layoutInfo.rect.height = empty.rect.maxY;\n width = Math.max(width, rect.width);\n }\n\n return node;\n }\n\n protected buildRow(node: GridNode<T>, x: number, y: number): LayoutNode {\n let res = super.buildRow(node, x, y);\n res.layoutInfo.rect.height += 1; // for bottom border\n return res;\n }\n\n protected buildCell(node: GridNode<T>, x: number, y: number): LayoutNode {\n let res = super.buildCell(node, x, y);\n if (node.column?.props.hideHeader) {\n res.layoutInfo.allowOverflow = true;\n }\n return res;\n }\n\n protected getEstimatedRowHeight(): number {\n return super.getEstimatedRowHeight() + 1; // for bottom border\n }\n\n protected isStickyColumn(node: GridNode<T>) {\n return node.props?.isDragButtonCell || node.props?.isSelectionCell;\n }\n\n getDropTargetFromPoint(x: number, y: number, isValidDropTarget: (target: DropTarget) => boolean): DropTarget | null {\n // Offset for height of header row\n y -= this.getVisibleLayoutInfos(new Rect(x, y, 1, 1)).find(info => info.type === 'headerrow')?.rect.height ?? 0;\n return super.getDropTargetFromPoint(x, y, isValidDropTarget);\n }\n}\n"],"names":[],"version":3,"file":"TableViewLayout.module.js.map"}
@@ -27,7 +27,9 @@ $parcel$export(module.exports, "TableView", () => $9802a0717549c6f1$export$b3c27
27
27
 
28
28
 
29
29
 
30
- function $9802a0717549c6f1$var$TableViewWrapper(props, ref) {
30
+ /**
31
+ * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
32
+ */ const $9802a0717549c6f1$export$b3c27e869d856b7 = /*#__PURE__*/ (0, ($parcel$interopDefault($kgRYg$react))).forwardRef(function TableViewWrapper(props, ref) {
31
33
  let { UNSTABLE_allowsExpandableRows: UNSTABLE_allowsExpandableRows, ...otherProps } = props;
32
34
  if ((0, $kgRYg$reactstatelyflags.tableNestedRows)() && UNSTABLE_allowsExpandableRows) return /*#__PURE__*/ (0, ($parcel$interopDefault($kgRYg$react))).createElement((0, $e770cde7e93c7e49$exports.TreeGridTableView), {
33
35
  ...otherProps,
@@ -37,10 +39,7 @@ function $9802a0717549c6f1$var$TableViewWrapper(props, ref) {
37
39
  ...otherProps,
38
40
  ref: ref
39
41
  });
40
- }
41
- /**
42
- * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
43
- */ const $9802a0717549c6f1$export$b3c27e869d856b7 = /*#__PURE__*/ (0, ($parcel$interopDefault($kgRYg$react))).forwardRef($9802a0717549c6f1$var$TableViewWrapper);
42
+ });
44
43
 
45
44
 
46
45
  //# sourceMappingURL=TableViewWrapper.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAiFD,SAAS,uCAAmC,KAA4B,EAAE,GAA2B;IACnG,IAAI,iCAAC,6BAA6B,EAAE,GAAG,YAAW,GAAG;IACrD,IAAI,CAAA,GAAA,wCAAc,OAAO,+BACvB,qBAAO,0DAAC,CAAA,GAAA,2CAAgB;QAAG,GAAG,UAAU;QAAE,KAAK;;SAE/C,qBAAO,0DAAC,CAAA,GAAA,mCAAQ;QAAG,GAAG,UAAU;QAAE,KAAK;;AAE3C;AAEA;;CAEC,GACD,MAAM,yDAAoB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/TableViewWrapper.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {AriaLabelingProps, DisabledBehavior, DOMProps, DOMRef, Key, SpectrumSelectionProps, StyleProps} from '@react-types/shared';\nimport type {ColumnSize, TableProps} from '@react-types/table';\nimport type {DragAndDropHooks} from '@react-spectrum/dnd';\nimport React, {JSX, ReactElement} from 'react';\nimport {tableNestedRows} from '@react-stately/flags';\nimport {TableView} from './TableView';\nimport {TreeGridTableView} from './TreeGridTableView';\n\nexport interface SpectrumTableProps<T> extends TableProps<T>, SpectrumSelectionProps, DOMProps, AriaLabelingProps, StyleProps {\n /**\n * Sets the amount of vertical padding within each cell.\n * @default 'regular'\n */\n density?: 'compact' | 'regular' | 'spacious',\n /**\n * Sets the overflow behavior for the cell contents.\n * @default 'truncate'\n */\n overflowMode?: 'wrap' | 'truncate',\n /** Whether the TableView should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** Sets what the TableView should render when there is no content to display. */\n renderEmptyState?: () => JSX.Element,\n /**\n * Whether `disabledKeys` applies to all interactions, or only selection.\n * @default \"selection\"\n */\n disabledBehavior?: DisabledBehavior,\n /** Handler that is called when a user performs an action on a row. */\n onAction?: (key: Key) => void,\n /**\n * Handler that is called when a user starts a column resize.\n */\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * Handler that is called when a user performs a column resize.\n * Can be used with the width property on columns to put the column widths into\n * a controlled state.\n */\n onResize?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * Handler that is called after a user performs a column resize.\n * Can be used to store the widths of columns for another future session.\n */\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the TableView.\n * @version beta\n */\n dragAndDropHooks?: DragAndDropHooks['dragAndDropHooks'],\n /**\n * Whether the TableView should support expandable rows. Requires the feature flag to be enabled first, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_allowsExpandableRows?: boolean,\n /**\n * The currently expanded keys in the collection (controlled). Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_expandedKeys?: 'all' | Iterable<Key>,\n /**\n * The initial expanded keys in the collection (uncontrolled). Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_defaultExpandedKeys?: 'all' | Iterable<Key>,\n /**\n * Handler that is called when items are expanded or collapsed. Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_onExpandedChange?: (keys: Set<Key>) => any\n}\n\nfunction TableViewWrapper<T extends object>(props: SpectrumTableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {UNSTABLE_allowsExpandableRows, ...otherProps} = props;\n if (tableNestedRows() && UNSTABLE_allowsExpandableRows) {\n return <TreeGridTableView {...otherProps} ref={ref} />;\n } else {\n return <TableView {...otherProps} ref={ref} />;\n }\n}\n\n/**\n * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.\n */\nconst _TableViewWrapper = React.forwardRef(TableViewWrapper) as <T>(props: SpectrumTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n\nexport {_TableViewWrapper as TableView};\n"],"names":[],"version":3,"file":"TableViewWrapper.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAiFD;;CAEC,GACD,MAAM,yDAAmB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,iBAAmC,KAA4B,EAAE,GAA2B;IAC7I,IAAI,iCAAC,6BAA6B,EAAE,GAAG,YAAW,GAAG;IACrD,IAAI,CAAA,GAAA,wCAAc,OAAO,+BACvB,qBAAO,0DAAC,CAAA,GAAA,2CAAgB;QAAG,GAAG,UAAU;QAAE,KAAK;;SAE/C,qBAAO,0DAAC,CAAA,GAAA,mCAAQ;QAAG,GAAG,UAAU;QAAE,KAAK;;AAE3C","sources":["packages/@react-spectrum/table/src/TableViewWrapper.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {AriaLabelingProps, DisabledBehavior, DOMProps, DOMRef, Key, SpectrumSelectionProps, StyleProps} from '@react-types/shared';\nimport type {ColumnSize, TableProps} from '@react-types/table';\nimport type {DragAndDropHooks} from '@react-spectrum/dnd';\nimport React, {JSX, ReactElement} from 'react';\nimport {tableNestedRows} from '@react-stately/flags';\nimport {TableView} from './TableView';\nimport {TreeGridTableView} from './TreeGridTableView';\n\nexport interface SpectrumTableProps<T> extends TableProps<T>, SpectrumSelectionProps, DOMProps, AriaLabelingProps, StyleProps {\n /**\n * Sets the amount of vertical padding within each cell.\n * @default 'regular'\n */\n density?: 'compact' | 'regular' | 'spacious',\n /**\n * Sets the overflow behavior for the cell contents.\n * @default 'truncate'\n */\n overflowMode?: 'wrap' | 'truncate',\n /** Whether the TableView should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** Sets what the TableView should render when there is no content to display. */\n renderEmptyState?: () => JSX.Element,\n /**\n * Whether `disabledKeys` applies to all interactions, or only selection.\n * @default \"selection\"\n */\n disabledBehavior?: DisabledBehavior,\n /** Handler that is called when a user performs an action on a row. */\n onAction?: (key: Key) => void,\n /**\n * Handler that is called when a user starts a column resize.\n */\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * Handler that is called when a user performs a column resize.\n * Can be used with the width property on columns to put the column widths into\n * a controlled state.\n */\n onResize?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * Handler that is called after a user performs a column resize.\n * Can be used to store the widths of columns for another future session.\n */\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the TableView.\n * @version beta\n */\n dragAndDropHooks?: DragAndDropHooks['dragAndDropHooks'],\n /**\n * Whether the TableView should support expandable rows. Requires the feature flag to be enabled first, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_allowsExpandableRows?: boolean,\n /**\n * The currently expanded keys in the collection (controlled). Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_expandedKeys?: 'all' | Iterable<Key>,\n /**\n * The initial expanded keys in the collection (uncontrolled). Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_defaultExpandedKeys?: 'all' | Iterable<Key>,\n /**\n * Handler that is called when items are expanded or collapsed. Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_onExpandedChange?: (keys: Set<Key>) => any\n}\n\n/**\n * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.\n */\nconst TableViewWrapper = React.forwardRef(function TableViewWrapper<T extends object>(props: SpectrumTableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {UNSTABLE_allowsExpandableRows, ...otherProps} = props;\n if (tableNestedRows() && UNSTABLE_allowsExpandableRows) {\n return <TreeGridTableView {...otherProps} ref={ref} />;\n } else {\n return <TableView {...otherProps} ref={ref} />;\n }\n}) as <T>(props: SpectrumTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {TableViewWrapper as TableView};\n"],"names":[],"version":3,"file":"TableViewWrapper.main.js.map"}
@@ -17,7 +17,9 @@ import {tableNestedRows as $k3cyS$tableNestedRows} from "@react-stately/flags";
17
17
 
18
18
 
19
19
 
20
- function $9f67189e3f884740$var$TableViewWrapper(props, ref) {
20
+ /**
21
+ * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
22
+ */ const $9f67189e3f884740$export$b3c27e869d856b7 = /*#__PURE__*/ (0, $k3cyS$react).forwardRef(function TableViewWrapper(props, ref) {
21
23
  let { UNSTABLE_allowsExpandableRows: UNSTABLE_allowsExpandableRows, ...otherProps } = props;
22
24
  if ((0, $k3cyS$tableNestedRows)() && UNSTABLE_allowsExpandableRows) return /*#__PURE__*/ (0, $k3cyS$react).createElement((0, $be90f60881eac8aa$export$5669566ac2c90964), {
23
25
  ...otherProps,
@@ -27,10 +29,7 @@ function $9f67189e3f884740$var$TableViewWrapper(props, ref) {
27
29
  ...otherProps,
28
30
  ref: ref
29
31
  });
30
- }
31
- /**
32
- * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
33
- */ const $9f67189e3f884740$export$b3c27e869d856b7 = /*#__PURE__*/ (0, $k3cyS$react).forwardRef($9f67189e3f884740$var$TableViewWrapper);
32
+ });
34
33
 
35
34
 
36
35
  export {$9f67189e3f884740$export$b3c27e869d856b7 as TableView};
@@ -17,7 +17,9 @@ import {tableNestedRows as $k3cyS$tableNestedRows} from "@react-stately/flags";
17
17
 
18
18
 
19
19
 
20
- function $9f67189e3f884740$var$TableViewWrapper(props, ref) {
20
+ /**
21
+ * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
22
+ */ const $9f67189e3f884740$export$b3c27e869d856b7 = /*#__PURE__*/ (0, $k3cyS$react).forwardRef(function TableViewWrapper(props, ref) {
21
23
  let { UNSTABLE_allowsExpandableRows: UNSTABLE_allowsExpandableRows, ...otherProps } = props;
22
24
  if ((0, $k3cyS$tableNestedRows)() && UNSTABLE_allowsExpandableRows) return /*#__PURE__*/ (0, $k3cyS$react).createElement((0, $be90f60881eac8aa$export$5669566ac2c90964), {
23
25
  ...otherProps,
@@ -27,10 +29,7 @@ function $9f67189e3f884740$var$TableViewWrapper(props, ref) {
27
29
  ...otherProps,
28
30
  ref: ref
29
31
  });
30
- }
31
- /**
32
- * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
33
- */ const $9f67189e3f884740$export$b3c27e869d856b7 = /*#__PURE__*/ (0, $k3cyS$react).forwardRef($9f67189e3f884740$var$TableViewWrapper);
32
+ });
34
33
 
35
34
 
36
35
  export {$9f67189e3f884740$export$b3c27e869d856b7 as TableView};
@@ -1 +1 @@
1
- {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAiFD,SAAS,uCAAmC,KAA4B,EAAE,GAA2B;IACnG,IAAI,iCAAC,6BAA6B,EAAE,GAAG,YAAW,GAAG;IACrD,IAAI,CAAA,GAAA,sBAAc,OAAO,+BACvB,qBAAO,gCAAC,CAAA,GAAA,yCAAgB;QAAG,GAAG,UAAU;QAAE,KAAK;;SAE/C,qBAAO,gCAAC,CAAA,GAAA,wCAAQ;QAAG,GAAG,UAAU;QAAE,KAAK;;AAE3C;AAEA;;CAEC,GACD,MAAM,yDAAoB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/TableViewWrapper.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {AriaLabelingProps, DisabledBehavior, DOMProps, DOMRef, Key, SpectrumSelectionProps, StyleProps} from '@react-types/shared';\nimport type {ColumnSize, TableProps} from '@react-types/table';\nimport type {DragAndDropHooks} from '@react-spectrum/dnd';\nimport React, {JSX, ReactElement} from 'react';\nimport {tableNestedRows} from '@react-stately/flags';\nimport {TableView} from './TableView';\nimport {TreeGridTableView} from './TreeGridTableView';\n\nexport interface SpectrumTableProps<T> extends TableProps<T>, SpectrumSelectionProps, DOMProps, AriaLabelingProps, StyleProps {\n /**\n * Sets the amount of vertical padding within each cell.\n * @default 'regular'\n */\n density?: 'compact' | 'regular' | 'spacious',\n /**\n * Sets the overflow behavior for the cell contents.\n * @default 'truncate'\n */\n overflowMode?: 'wrap' | 'truncate',\n /** Whether the TableView should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** Sets what the TableView should render when there is no content to display. */\n renderEmptyState?: () => JSX.Element,\n /**\n * Whether `disabledKeys` applies to all interactions, or only selection.\n * @default \"selection\"\n */\n disabledBehavior?: DisabledBehavior,\n /** Handler that is called when a user performs an action on a row. */\n onAction?: (key: Key) => void,\n /**\n * Handler that is called when a user starts a column resize.\n */\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * Handler that is called when a user performs a column resize.\n * Can be used with the width property on columns to put the column widths into\n * a controlled state.\n */\n onResize?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * Handler that is called after a user performs a column resize.\n * Can be used to store the widths of columns for another future session.\n */\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the TableView.\n * @version beta\n */\n dragAndDropHooks?: DragAndDropHooks['dragAndDropHooks'],\n /**\n * Whether the TableView should support expandable rows. Requires the feature flag to be enabled first, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_allowsExpandableRows?: boolean,\n /**\n * The currently expanded keys in the collection (controlled). Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_expandedKeys?: 'all' | Iterable<Key>,\n /**\n * The initial expanded keys in the collection (uncontrolled). Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_defaultExpandedKeys?: 'all' | Iterable<Key>,\n /**\n * Handler that is called when items are expanded or collapsed. Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_onExpandedChange?: (keys: Set<Key>) => any\n}\n\nfunction TableViewWrapper<T extends object>(props: SpectrumTableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {UNSTABLE_allowsExpandableRows, ...otherProps} = props;\n if (tableNestedRows() && UNSTABLE_allowsExpandableRows) {\n return <TreeGridTableView {...otherProps} ref={ref} />;\n } else {\n return <TableView {...otherProps} ref={ref} />;\n }\n}\n\n/**\n * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.\n */\nconst _TableViewWrapper = React.forwardRef(TableViewWrapper) as <T>(props: SpectrumTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n\nexport {_TableViewWrapper as TableView};\n"],"names":[],"version":3,"file":"TableViewWrapper.module.js.map"}
1
+ {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAiFD;;CAEC,GACD,MAAM,yDAAmB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,iBAAmC,KAA4B,EAAE,GAA2B;IAC7I,IAAI,iCAAC,6BAA6B,EAAE,GAAG,YAAW,GAAG;IACrD,IAAI,CAAA,GAAA,sBAAc,OAAO,+BACvB,qBAAO,gCAAC,CAAA,GAAA,yCAAgB;QAAG,GAAG,UAAU;QAAE,KAAK;;SAE/C,qBAAO,gCAAC,CAAA,GAAA,wCAAQ;QAAG,GAAG,UAAU;QAAE,KAAK;;AAE3C","sources":["packages/@react-spectrum/table/src/TableViewWrapper.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {AriaLabelingProps, DisabledBehavior, DOMProps, DOMRef, Key, SpectrumSelectionProps, StyleProps} from '@react-types/shared';\nimport type {ColumnSize, TableProps} from '@react-types/table';\nimport type {DragAndDropHooks} from '@react-spectrum/dnd';\nimport React, {JSX, ReactElement} from 'react';\nimport {tableNestedRows} from '@react-stately/flags';\nimport {TableView} from './TableView';\nimport {TreeGridTableView} from './TreeGridTableView';\n\nexport interface SpectrumTableProps<T> extends TableProps<T>, SpectrumSelectionProps, DOMProps, AriaLabelingProps, StyleProps {\n /**\n * Sets the amount of vertical padding within each cell.\n * @default 'regular'\n */\n density?: 'compact' | 'regular' | 'spacious',\n /**\n * Sets the overflow behavior for the cell contents.\n * @default 'truncate'\n */\n overflowMode?: 'wrap' | 'truncate',\n /** Whether the TableView should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** Sets what the TableView should render when there is no content to display. */\n renderEmptyState?: () => JSX.Element,\n /**\n * Whether `disabledKeys` applies to all interactions, or only selection.\n * @default \"selection\"\n */\n disabledBehavior?: DisabledBehavior,\n /** Handler that is called when a user performs an action on a row. */\n onAction?: (key: Key) => void,\n /**\n * Handler that is called when a user starts a column resize.\n */\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * Handler that is called when a user performs a column resize.\n * Can be used with the width property on columns to put the column widths into\n * a controlled state.\n */\n onResize?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * Handler that is called after a user performs a column resize.\n * Can be used to store the widths of columns for another future session.\n */\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void,\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the TableView.\n * @version beta\n */\n dragAndDropHooks?: DragAndDropHooks['dragAndDropHooks'],\n /**\n * Whether the TableView should support expandable rows. Requires the feature flag to be enabled first, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_allowsExpandableRows?: boolean,\n /**\n * The currently expanded keys in the collection (controlled). Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_expandedKeys?: 'all' | Iterable<Key>,\n /**\n * The initial expanded keys in the collection (uncontrolled). Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_defaultExpandedKeys?: 'all' | Iterable<Key>,\n /**\n * Handler that is called when items are expanded or collapsed. Requires the feature flag to be\n * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.\n * @version alpha\n * @private\n */\n UNSTABLE_onExpandedChange?: (keys: Set<Key>) => any\n}\n\n/**\n * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.\n */\nconst TableViewWrapper = React.forwardRef(function TableViewWrapper<T extends object>(props: SpectrumTableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {UNSTABLE_allowsExpandableRows, ...otherProps} = props;\n if (tableNestedRows() && UNSTABLE_allowsExpandableRows) {\n return <TreeGridTableView {...otherProps} ref={ref} />;\n } else {\n return <TableView {...otherProps} ref={ref} />;\n }\n}) as <T>(props: SpectrumTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {TableViewWrapper as TableView};\n"],"names":[],"version":3,"file":"TableViewWrapper.module.js.map"}
@@ -25,7 +25,7 @@ $parcel$export(module.exports, "TreeGridTableView", () => $e770cde7e93c7e49$expo
25
25
  */
26
26
 
27
27
 
28
- function $e770cde7e93c7e49$var$TreeGridTableView(props, ref) {
28
+ const $e770cde7e93c7e49$export$5669566ac2c90964 = /*#__PURE__*/ (0, ($parcel$interopDefault($5aNwD$react))).forwardRef(function TreeGridTableView(props, ref) {
29
29
  let { selectionStyle: selectionStyle, dragAndDropHooks: dragAndDropHooks } = props;
30
30
  let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $5aNwD$react.useState)(selectionStyle !== 'highlight');
31
31
  let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
@@ -43,8 +43,7 @@ function $e770cde7e93c7e49$var$TreeGridTableView(props, ref) {
43
43
  state: state,
44
44
  ref: ref
45
45
  });
46
- }
47
- const $e770cde7e93c7e49$export$5669566ac2c90964 = /*#__PURE__*/ (0, ($parcel$interopDefault($5aNwD$react))).forwardRef($e770cde7e93c7e49$var$TreeGridTableView);
46
+ });
48
47
 
49
48
 
50
49
  //# sourceMappingURL=TreeGridTableView.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAUD,SAAS,wCAAoC,KAA4B,EAAE,GAA2B;IACpG,IAAI,kBACF,cAAc,oBACd,gBAAgB,EACjB,GAAG;IACJ,IAAI,CAAC,yBAAyB,2BAA2B,GAAG,CAAA,GAAA,qBAAO,EAAE,mBAAmB;IACxF,IAAI,mBAAmB,CAAC,EAAC,6BAAA,uCAAA,iBAAkB,2BAA2B;IACtE,IAAI,QAAQ,CAAA,GAAA,kDAAwB,EAAE;QACpC,GAAG,KAAK;iCACR;QACA,iBAAiB;QACjB,mBAAmB,MAAM,cAAc,KAAK,cAAc,YAAY;IACxE;IAEA,+HAA+H;IAC/H,IAAI,uBAAuB,MAAM,gBAAgB,CAAC,iBAAiB,KAAK;IACxE,IAAI,yBAAyB,yBAC3B,2BAA2B;IAG7B,qBACE,0DAAC,CAAA,GAAA,uCAAY;QAAG,GAAG,KAAK;QAAE,OAAO;QAAO,KAAK;;AAEjD;AAEA,MAAM,0DAAqB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/TreeGridTableView.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMRef} from '@react-types/shared';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumTableProps} from './TableViewWrapper';\nimport {TableViewBase} from './TableViewBase';\nimport {UNSTABLE_useTreeGridState} from '@react-stately/table';\n\nexport interface TreeGridTableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}\n\nfunction TreeGridTableView<T extends object>(props: TreeGridTableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {\n selectionStyle,\n dragAndDropHooks\n } = props;\n let [showSelectionCheckboxes, setShowSelectionCheckboxes] = useState(selectionStyle !== 'highlight');\n let isTableDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let state = UNSTABLE_useTreeGridState({\n ...props,\n showSelectionCheckboxes,\n showDragButtons: isTableDraggable,\n selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'\n });\n\n // If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...\n let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';\n if (shouldShowCheckboxes !== showSelectionCheckboxes) {\n setShowSelectionCheckboxes(shouldShowCheckboxes);\n }\n\n return (\n <TableViewBase {...props} state={state} ref={ref} />\n );\n}\n\nconst _TreeGridTableView = React.forwardRef(TreeGridTableView) as <T>(props: TreeGridTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TreeGridTableView as TreeGridTableView};\n"],"names":[],"version":3,"file":"TreeGridTableView.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAUM,MAAM,0DAAoB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,kBAAoC,KAA4B,EAAE,GAA2B;IACtJ,IAAI,kBACF,cAAc,oBACd,gBAAgB,EACjB,GAAG;IACJ,IAAI,CAAC,yBAAyB,2BAA2B,GAAG,CAAA,GAAA,qBAAO,EAAE,mBAAmB;IACxF,IAAI,mBAAmB,CAAC,EAAC,6BAAA,uCAAA,iBAAkB,2BAA2B;IACtE,IAAI,QAAQ,CAAA,GAAA,kDAAwB,EAAE;QACpC,GAAG,KAAK;iCACR;QACA,iBAAiB;QACjB,mBAAmB,MAAM,cAAc,KAAK,cAAc,YAAY;IACxE;IAEA,+HAA+H;IAC/H,IAAI,uBAAuB,MAAM,gBAAgB,CAAC,iBAAiB,KAAK;IACxE,IAAI,yBAAyB,yBAC3B,2BAA2B;IAG7B,qBACE,0DAAC,CAAA,GAAA,uCAAY;QAAG,GAAG,KAAK;QAAE,OAAO;QAAO,KAAK;;AAEjD","sources":["packages/@react-spectrum/table/src/TreeGridTableView.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMRef} from '@react-types/shared';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumTableProps} from './TableViewWrapper';\nimport {TableViewBase} from './TableViewBase';\nimport {UNSTABLE_useTreeGridState} from '@react-stately/table';\n\nexport interface TreeGridTableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}\n\nexport const TreeGridTableView = React.forwardRef(function TreeGridTableView<T extends object>(props: TreeGridTableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {\n selectionStyle,\n dragAndDropHooks\n } = props;\n let [showSelectionCheckboxes, setShowSelectionCheckboxes] = useState(selectionStyle !== 'highlight');\n let isTableDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let state = UNSTABLE_useTreeGridState({\n ...props,\n showSelectionCheckboxes,\n showDragButtons: isTableDraggable,\n selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'\n });\n\n // If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...\n let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';\n if (shouldShowCheckboxes !== showSelectionCheckboxes) {\n setShowSelectionCheckboxes(shouldShowCheckboxes);\n }\n\n return (\n <TableViewBase {...props} state={state} ref={ref} />\n );\n}) as <T>(props: TreeGridTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"TreeGridTableView.main.js.map"}
@@ -15,7 +15,7 @@ import {UNSTABLE_useTreeGridState as $5KSRY$UNSTABLE_useTreeGridState} from "@re
15
15
  */
16
16
 
17
17
 
18
- function $be90f60881eac8aa$var$TreeGridTableView(props, ref) {
18
+ const $be90f60881eac8aa$export$5669566ac2c90964 = /*#__PURE__*/ (0, $5KSRY$react).forwardRef(function TreeGridTableView(props, ref) {
19
19
  let { selectionStyle: selectionStyle, dragAndDropHooks: dragAndDropHooks } = props;
20
20
  let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $5KSRY$useState)(selectionStyle !== 'highlight');
21
21
  let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
@@ -33,8 +33,7 @@ function $be90f60881eac8aa$var$TreeGridTableView(props, ref) {
33
33
  state: state,
34
34
  ref: ref
35
35
  });
36
- }
37
- const $be90f60881eac8aa$export$5669566ac2c90964 = /*#__PURE__*/ (0, $5KSRY$react).forwardRef($be90f60881eac8aa$var$TreeGridTableView);
36
+ });
38
37
 
39
38
 
40
39
  export {$be90f60881eac8aa$export$5669566ac2c90964 as TreeGridTableView};
@@ -15,7 +15,7 @@ import {UNSTABLE_useTreeGridState as $5KSRY$UNSTABLE_useTreeGridState} from "@re
15
15
  */
16
16
 
17
17
 
18
- function $be90f60881eac8aa$var$TreeGridTableView(props, ref) {
18
+ const $be90f60881eac8aa$export$5669566ac2c90964 = /*#__PURE__*/ (0, $5KSRY$react).forwardRef(function TreeGridTableView(props, ref) {
19
19
  let { selectionStyle: selectionStyle, dragAndDropHooks: dragAndDropHooks } = props;
20
20
  let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $5KSRY$useState)(selectionStyle !== 'highlight');
21
21
  let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
@@ -33,8 +33,7 @@ function $be90f60881eac8aa$var$TreeGridTableView(props, ref) {
33
33
  state: state,
34
34
  ref: ref
35
35
  });
36
- }
37
- const $be90f60881eac8aa$export$5669566ac2c90964 = /*#__PURE__*/ (0, $5KSRY$react).forwardRef($be90f60881eac8aa$var$TreeGridTableView);
36
+ });
38
37
 
39
38
 
40
39
  export {$be90f60881eac8aa$export$5669566ac2c90964 as TreeGridTableView};
@@ -1 +1 @@
1
- {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAUD,SAAS,wCAAoC,KAA4B,EAAE,GAA2B;IACpG,IAAI,kBACF,cAAc,oBACd,gBAAgB,EACjB,GAAG;IACJ,IAAI,CAAC,yBAAyB,2BAA2B,GAAG,CAAA,GAAA,eAAO,EAAE,mBAAmB;IACxF,IAAI,mBAAmB,CAAC,EAAC,6BAAA,uCAAA,iBAAkB,2BAA2B;IACtE,IAAI,QAAQ,CAAA,GAAA,gCAAwB,EAAE;QACpC,GAAG,KAAK;iCACR;QACA,iBAAiB;QACjB,mBAAmB,MAAM,cAAc,KAAK,cAAc,YAAY;IACxE;IAEA,+HAA+H;IAC/H,IAAI,uBAAuB,MAAM,gBAAgB,CAAC,iBAAiB,KAAK;IACxE,IAAI,yBAAyB,yBAC3B,2BAA2B;IAG7B,qBACE,gCAAC,CAAA,GAAA,yCAAY;QAAG,GAAG,KAAK;QAAE,OAAO;QAAO,KAAK;;AAEjD;AAEA,MAAM,0DAAqB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/table/src/TreeGridTableView.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMRef} from '@react-types/shared';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumTableProps} from './TableViewWrapper';\nimport {TableViewBase} from './TableViewBase';\nimport {UNSTABLE_useTreeGridState} from '@react-stately/table';\n\nexport interface TreeGridTableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}\n\nfunction TreeGridTableView<T extends object>(props: TreeGridTableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {\n selectionStyle,\n dragAndDropHooks\n } = props;\n let [showSelectionCheckboxes, setShowSelectionCheckboxes] = useState(selectionStyle !== 'highlight');\n let isTableDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let state = UNSTABLE_useTreeGridState({\n ...props,\n showSelectionCheckboxes,\n showDragButtons: isTableDraggable,\n selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'\n });\n\n // If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...\n let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';\n if (shouldShowCheckboxes !== showSelectionCheckboxes) {\n setShowSelectionCheckboxes(shouldShowCheckboxes);\n }\n\n return (\n <TableViewBase {...props} state={state} ref={ref} />\n );\n}\n\nconst _TreeGridTableView = React.forwardRef(TreeGridTableView) as <T>(props: TreeGridTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TreeGridTableView as TreeGridTableView};\n"],"names":[],"version":3,"file":"TreeGridTableView.module.js.map"}
1
+ {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAUM,MAAM,0DAAoB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,kBAAoC,KAA4B,EAAE,GAA2B;IACtJ,IAAI,kBACF,cAAc,oBACd,gBAAgB,EACjB,GAAG;IACJ,IAAI,CAAC,yBAAyB,2BAA2B,GAAG,CAAA,GAAA,eAAO,EAAE,mBAAmB;IACxF,IAAI,mBAAmB,CAAC,EAAC,6BAAA,uCAAA,iBAAkB,2BAA2B;IACtE,IAAI,QAAQ,CAAA,GAAA,gCAAwB,EAAE;QACpC,GAAG,KAAK;iCACR;QACA,iBAAiB;QACjB,mBAAmB,MAAM,cAAc,KAAK,cAAc,YAAY;IACxE;IAEA,+HAA+H;IAC/H,IAAI,uBAAuB,MAAM,gBAAgB,CAAC,iBAAiB,KAAK;IACxE,IAAI,yBAAyB,yBAC3B,2BAA2B;IAG7B,qBACE,gCAAC,CAAA,GAAA,yCAAY;QAAG,GAAG,KAAK;QAAE,OAAO;QAAO,KAAK;;AAEjD","sources":["packages/@react-spectrum/table/src/TreeGridTableView.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMRef} from '@react-types/shared';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumTableProps} from './TableViewWrapper';\nimport {TableViewBase} from './TableViewBase';\nimport {UNSTABLE_useTreeGridState} from '@react-stately/table';\n\nexport interface TreeGridTableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}\n\nexport const TreeGridTableView = React.forwardRef(function TreeGridTableView<T extends object>(props: TreeGridTableProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {\n selectionStyle,\n dragAndDropHooks\n } = props;\n let [showSelectionCheckboxes, setShowSelectionCheckboxes] = useState(selectionStyle !== 'highlight');\n let isTableDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let state = UNSTABLE_useTreeGridState({\n ...props,\n showSelectionCheckboxes,\n showDragButtons: isTableDraggable,\n selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'\n });\n\n // If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...\n let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';\n if (shouldShowCheckboxes !== showSelectionCheckboxes) {\n setShowSelectionCheckboxes(shouldShowCheckboxes);\n }\n\n return (\n <TableViewBase {...props} state={state} ref={ref} />\n );\n}) as <T>(props: TreeGridTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"TreeGridTableView.module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;ASoBA,oCAAoC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,EAAE,sBAAsB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,UAAU;IAC3H;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC7C;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACnC,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,MAAM,IAAI,OAAO,CAAC;IACrC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,sEAAsE;IACtE,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9B;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IACvD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAClD;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IACrD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;IACxD;;;;OAIG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC9C;;;;;OAKG;IACH,4BAA4B,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IACrD;;;;;OAKG;IACH,yBAAyB,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,GAAG,CAAA;CACpD;AAWD;;GAEG;AACH,OAAA,MAAM,WAA0D,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,OAAO,cAAc,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC;ACnFnJ,OAAA,MAAM,QAA2B,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,KAAK,IAAI,OAAO,CAAC;AAGnF,OAAO,EACL,WAAW,EACX,SAAS,EACT,OAAO,EACP,GAAG,EACH,IAAI,EACL,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAC,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,oBAAoB,CAAC","sources":["packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/InsertionIndicator.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/Nubbin.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/Resizer.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/RootDropIndicator.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/DragPreview.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TableViewLayout.ts","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TableViewBase.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TableView.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TreeGridTableView.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TableViewWrapper.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/index.ts","packages/@react-spectrum/table/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {TableView} from './TableViewWrapper';\nimport {Column} from '@react-stately/table';\nimport {JSX} from 'react';\nimport {SpectrumColumnProps} from '@react-types/table';\n\n// Override TS for Column to support spectrum specific props.\nconst SpectrumColumn = Column as <T>(props: SpectrumColumnProps<T>) => JSX.Element;\nexport {SpectrumColumn as Column};\n\nexport {\n TableHeader,\n TableBody,\n Section,\n Row,\n Cell\n} from '@react-stately/table';\n\nexport type {SpectrumColumnProps, TableHeaderProps, TableBodyProps, RowProps, CellProps} from '@react-types/table';\nexport type {SpectrumTableProps} from './TableViewWrapper';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;;ASoBA,oCAAoC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,EAAE,sBAAsB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,UAAU;IAC3H;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC7C;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACnC,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CA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,EACX,SAAS,EACT,OAAO,EACP,GAAG,EACH,IAAI,EACL,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAC,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,oBAAoB,CAAC","sources":["packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/InsertionIndicator.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/Nubbin.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/Resizer.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/RootDropIndicator.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/DragPreview.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TableViewLayout.ts","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TableViewBase.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TableView.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TreeGridTableView.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/TableViewWrapper.tsx","packages/@react-spectrum/table/src/packages/@react-spectrum/table/src/index.ts","packages/@react-spectrum/table/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {TableView} from './TableViewWrapper';\nimport {Column} from '@react-stately/table';\nimport {JSX} from 'react';\nimport {SpectrumColumnProps} from '@react-types/table';\n\n// Override TS for Column to support spectrum specific props.\nconst SpectrumColumn = Column as <T>(props: SpectrumColumnProps<T>) => JSX.Element;\nexport {SpectrumColumn as Column};\n\nexport {\n TableHeader,\n TableBody,\n Section,\n Row,\n Cell\n} from '@react-stately/table';\n\nexport type {SpectrumColumnProps, TableHeaderProps, TableBodyProps, RowProps, CellProps} from '@react-types/table';\nexport type {SpectrumTableProps} from './TableViewWrapper';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -779,9 +779,9 @@ svg.hm005a_spectrum-Table-sortedIcon {
779
779
 
780
780
  .hm005a_spectrum-Table-body.hm005a_focus-ring:after {
781
781
  content: "";
782
- box-shadow: inset 0 0 0 2px var(--spectrum-table-cell-border-color-key-focus, var(--spectrum-alias-border-color-focus));
783
782
  width: 100%;
784
783
  height: 100%;
784
+ box-shadow: inset 0 0 0 2px var(--spectrum-table-cell-border-color-key-focus, var(--spectrum-alias-border-color-focus));
785
785
  position: absolute;
786
786
  top: 0;
787
787
  left: 0;
@@ -989,4 +989,4 @@ tbody.hm005a_spectrum-Table-body .hm005a_spectrum-Table-row:last-child .hm005a_s
989
989
  --spectrum-table-background-color: transparent;
990
990
  }
991
991
  }
992
- /*# sourceMappingURL=vars.bd693cb4.css.map */
992
+ /*# sourceMappingURL=vars.27f08d5f.css.map */
@@ -1 +1 @@
1
- {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;AAUA;;;;;;;;;AAYA;;;;;;;AAQA;;;;;;;;;;;;AAYA;;;;;;;;AAQA;;;;;;;;;;;;;AAYE;;;;AAME;;;;;AAQA;;;;AAIF;;;;AAEE;;;;;AAIA;;;;;;;AAWJ;;;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAUE;;;;;;;;AAQA;;;;AAMF;;;;;;;;;AAQ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;;;;;AAWF;;;;;AAIE;;;;AASJ;;;;AAGE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAKF;;;;AAGE;;;;AAQA;;;;AAUE;;;;AAKF;;;;AAIA;;;;AAYA;;;;;;;;;;;AAkBE;;;;AAMA;;;;AAIA;;;;AAKA;;;;AAMA;;;;AAUE;;;;AAOF;;;;;;AAUJ;;;;;AAKA;;;;;AAME;;;;;AAIE;;;;;AAIE;;;;AAOF;;;;AAIA;;;;AASA;;;;AAKE;;;;AAIA;;;;AAIA;;;;AAQF;;;;;AASF;;;;AAOE;;;;AAOF;;;;AAOE;;;;;AAIA;;;;;AAOJ;;;;AAIA;EACE;;;;;;;;;;;;;;;;EAkBI;;;;EASA","sources":["packages/@adobe/spectrum-css-temp/components/table/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.bd693cb4.css.map"}
1
+ {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;AAUA;;;;;;;;;AAYA;;;;;;;AAQA;;;;;;;;;;;;AAYA;;;;;;;;AAQA;;;;;;;;;;;;;AAYE;;;;AAME;;;;;AAQA;;;;AAIF;;;;AAEE;;;;;AAIA;;;;;;;AAWJ;;;;;;;;;;;AAA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E;;;;AAKF;;;;AAGE;;;;AASN;;;;;AAIE;;;;AAUE;;;;;AASJ;;;;;;AAMI;;;;;;;;;;AAWF;;;;;AAIE;;;;AASJ;;;;AAGE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAKF;;;;AAGE;;;;AAQA;;;;AAUE;;;;AAKF;;;;AAIA;;;;AAYA;;;;;;;;;;;AAkBE;;;;AAMA;;;;AAIA;;;;AAKA;;;;AAMA;;;;AAUE;;;;AAOF;;;;;;AAUJ;;;;;AAKA;;;;;AAME;;;;;AAIE;;;;;AAIE;;;;AAOF;;;;AAIA;;;;AASA;;;;AAKE;;;;AAIA;;;;AAIA;;;;AAQF;;;;;AASF;;;;AAOE;;;;AAOF;;;;AAOE;;;;;AAIA;;;;;AAOJ;;;;AAIA;EACE;;;;;;;;;;;;;;;;EAkBI;;;;EASA","sources":["packages/@adobe/spectrum-css-temp/components/table/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.27f08d5f.css.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/table",
3
- "version": "3.15.0",
3
+ "version": "3.15.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,31 +36,31 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/button": "^3.11.0",
40
- "@react-aria/focus": "^3.19.0",
41
- "@react-aria/i18n": "^3.12.4",
42
- "@react-aria/interactions": "^3.22.5",
43
- "@react-aria/overlays": "^3.24.0",
44
- "@react-aria/selection": "^3.21.0",
45
- "@react-aria/table": "^3.16.0",
46
- "@react-aria/utils": "^3.26.0",
47
- "@react-aria/virtualizer": "^4.1.0",
48
- "@react-aria/visually-hidden": "^3.8.18",
49
- "@react-spectrum/checkbox": "^3.9.11",
50
- "@react-spectrum/dnd": "^3.5.0",
51
- "@react-spectrum/layout": "^3.6.10",
52
- "@react-spectrum/menu": "^3.21.0",
53
- "@react-spectrum/progress": "^3.7.11",
54
- "@react-spectrum/tooltip": "^3.7.0",
55
- "@react-spectrum/utils": "^3.12.0",
39
+ "@react-aria/button": "^3.11.1",
40
+ "@react-aria/focus": "^3.19.1",
41
+ "@react-aria/i18n": "^3.12.5",
42
+ "@react-aria/interactions": "^3.23.0",
43
+ "@react-aria/overlays": "^3.25.0",
44
+ "@react-aria/selection": "^3.22.0",
45
+ "@react-aria/table": "^3.16.1",
46
+ "@react-aria/utils": "^3.27.0",
47
+ "@react-aria/virtualizer": "^4.1.1",
48
+ "@react-aria/visually-hidden": "^3.8.19",
49
+ "@react-spectrum/checkbox": "^3.9.12",
50
+ "@react-spectrum/dnd": "^3.5.1",
51
+ "@react-spectrum/layout": "^3.6.11",
52
+ "@react-spectrum/menu": "^3.21.1",
53
+ "@react-spectrum/progress": "^3.7.12",
54
+ "@react-spectrum/tooltip": "^3.7.1",
55
+ "@react-spectrum/utils": "^3.12.1",
56
56
  "@react-stately/flags": "^3.0.5",
57
- "@react-stately/layout": "^4.1.0",
58
- "@react-stately/table": "^3.13.0",
59
- "@react-stately/virtualizer": "^4.2.0",
60
- "@react-types/grid": "^3.2.10",
61
- "@react-types/shared": "^3.26.0",
62
- "@react-types/table": "^3.10.3",
63
- "@spectrum-icons/ui": "^3.6.11",
57
+ "@react-stately/layout": "^4.1.1",
58
+ "@react-stately/table": "^3.13.1",
59
+ "@react-stately/virtualizer": "^4.2.1",
60
+ "@react-types/grid": "^3.2.11",
61
+ "@react-types/shared": "^3.27.0",
62
+ "@react-types/table": "^3.10.4",
63
+ "@spectrum-icons/ui": "^3.6.12",
64
64
  "@swc/helpers": "^0.5.0"
65
65
  },
66
66
  "devDependencies": {
@@ -76,5 +76,5 @@
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  },
79
- "gitHead": "71f0ef23053f9e03ee7e97df736e8b083e006849"
79
+ "gitHead": "09e7f44bebdc9d89122926b2b439a0a38a2814ea"
80
80
  }
package/src/Resizer.tsx CHANGED
@@ -48,7 +48,7 @@ const CURSORS = {
48
48
 
49
49
  export const ResizeStateContext = createContext<TableColumnResizeState<unknown> | null>(null);
50
50
 
51
- function Resizer<T>(props: ResizerProps<T>, ref: ForwardedRef<HTMLInputElement | null>) {
51
+ export const Resizer = React.forwardRef(function Resizer<T>(props: ResizerProps<T>, ref: ForwardedRef<HTMLInputElement | null>) {
52
52
  let {column, showResizer} = props;
53
53
  let objectRef = useObjectRef(ref);
54
54
  let {isEmpty, onFocusedResizer} = useTableContext();
@@ -128,13 +128,10 @@ function Resizer<T>(props: ResizerProps<T>, ref: ForwardedRef<HTMLInputElement |
128
128
  </CursorOverlay>
129
129
  </>
130
130
  );
131
- }
131
+ });
132
132
 
133
133
  function CursorOverlay(props) {
134
134
  let {show, children} = props;
135
135
  let {getContainer} = useUNSTABLE_PortalContext();
136
136
  return show ? ReactDOM.createPortal(children, getContainer?.() ?? document.body) : null;
137
137
  }
138
-
139
- const _Resizer = React.forwardRef(Resizer);
140
- export {_Resizer as Resizer};
package/src/TableView.tsx CHANGED
@@ -18,7 +18,7 @@ import {useTableState} from '@react-stately/table';
18
18
 
19
19
  interface TableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}
20
20
 
21
- function TableView<T extends object>(props: TableProps<T>, ref: DOMRef<HTMLDivElement>) {
21
+ export const TableView = React.forwardRef(function TableView<T extends object>(props: TableProps<T>, ref: DOMRef<HTMLDivElement>) {
22
22
  let {
23
23
  selectionStyle,
24
24
  dragAndDropHooks
@@ -41,7 +41,4 @@ function TableView<T extends object>(props: TableProps<T>, ref: DOMRef<HTMLDivEl
41
41
  return (
42
42
  <TableViewBase {...props} state={state} ref={ref} />
43
43
  );
44
- }
45
-
46
- const _TableView = React.forwardRef(TableView) as <T>(props: TableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
47
- export {_TableView as TableView};
44
+ }) as <T>(props: TableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
@@ -89,18 +89,15 @@ export interface SpectrumTableProps<T> extends TableProps<T>, SpectrumSelectionP
89
89
  UNSTABLE_onExpandedChange?: (keys: Set<Key>) => any
90
90
  }
91
91
 
92
- function TableViewWrapper<T extends object>(props: SpectrumTableProps<T>, ref: DOMRef<HTMLDivElement>) {
92
+ /**
93
+ * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
94
+ */
95
+ const TableViewWrapper = React.forwardRef(function TableViewWrapper<T extends object>(props: SpectrumTableProps<T>, ref: DOMRef<HTMLDivElement>) {
93
96
  let {UNSTABLE_allowsExpandableRows, ...otherProps} = props;
94
97
  if (tableNestedRows() && UNSTABLE_allowsExpandableRows) {
95
98
  return <TreeGridTableView {...otherProps} ref={ref} />;
96
99
  } else {
97
100
  return <TableView {...otherProps} ref={ref} />;
98
101
  }
99
- }
100
-
101
- /**
102
- * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
103
- */
104
- const _TableViewWrapper = React.forwardRef(TableViewWrapper) as <T>(props: SpectrumTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
105
-
106
- export {_TableViewWrapper as TableView};
102
+ }) as <T>(props: SpectrumTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
103
+ export {TableViewWrapper as TableView};
@@ -18,7 +18,7 @@ import {UNSTABLE_useTreeGridState} from '@react-stately/table';
18
18
 
19
19
  export interface TreeGridTableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {}
20
20
 
21
- function TreeGridTableView<T extends object>(props: TreeGridTableProps<T>, ref: DOMRef<HTMLDivElement>) {
21
+ export const TreeGridTableView = React.forwardRef(function TreeGridTableView<T extends object>(props: TreeGridTableProps<T>, ref: DOMRef<HTMLDivElement>) {
22
22
  let {
23
23
  selectionStyle,
24
24
  dragAndDropHooks
@@ -41,7 +41,4 @@ function TreeGridTableView<T extends object>(props: TreeGridTableProps<T>, ref:
41
41
  return (
42
42
  <TableViewBase {...props} state={state} ref={ref} />
43
43
  );
44
- }
45
-
46
- const _TreeGridTableView = React.forwardRef(TreeGridTableView) as <T>(props: TreeGridTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
47
- export {_TreeGridTableView as TreeGridTableView};
44
+ }) as <T>(props: TreeGridTableProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;