@elliemae/ds-data-table 3.10.0-next.2 → 3.10.0-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -100,7 +100,8 @@ const HeaderCellGroupComp = ({
100
100
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DropIndicator.DropIndicator, {
101
101
  vertical: true,
102
102
  dropIndicatorPosition,
103
- isLast: isLast && isDragging
103
+ isLast: isLast && isDragging,
104
+ isDropValid: true
104
105
  })
105
106
  ]
106
107
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/Headers/HeaderCellGroup.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable complexity */\nimport React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport { HeaderCell } from './HeaderCell';\nimport { SortableItemContext } from '../HoC/SortableItemContext';\nimport { withDnDSortableColumnContext } from '../internal';\nimport { DropIndicator } from '../DropIndicator';\nimport { SortableHeaderCell } from '../SortableHeaderCell';\nimport { TypescriptColumn } from '../../types/props';\nimport { EmptyChildrenGroup } from './EmptyChildrenGroup';\nimport { DATA_TESTID } from '../../configs';\nimport DataTableContext from '../../DataTableContext';\n\nconst StyledWrapper = styled(Grid)`\n position: relative;\n ${({ shouldDropOneLevel, isDragOverlay }) => (shouldDropOneLevel && !isDragOverlay ? `top: 50%; height: 50%;` : '')}\n width: ${(props) => (props.isDragOverlay ? 'fit-content' : '100%')};\n grid-column: ${(props) => props.gridColumn};\n background: ${(props) => (props.isDragging ? props.theme.colors.neutral['080'] : 'white')};\n opacity: ${(props) => (props.isDragging ? 0.8 : 1)};\n box-shadow: 0 2px 4px 0 ${(props) => (props.isDragOverlay ? 'rgba(0,0,0,0.5)' : 'transparent')};\n border-left: ${({ isFirst }) => (isFirst ? '0px' : '1px')} solid ${(props) => props.theme.colors.neutral['080']};\n`;\n\ninterface HeaderCellGroupCompProps {\n header: TypescriptColumn;\n isDragOverlay?: boolean;\n isDraggingParent?: boolean;\n isLast?: boolean;\n isFirst?: boolean;\n level?: number;\n}\n\nconst HeaderCellGroupComp: React.ComponentType<HeaderCellGroupCompProps> = ({\n header,\n isDragOverlay,\n isDraggingParent,\n isLast,\n isFirst,\n level = 0,\n}) => {\n const { visibleColumns } = useContext(DataTableContext);\n const { draggableProps } = useContext(SortableItemContext);\n\n const isMultiLevel = visibleColumns.some((col) => !!col.columns);\n\n const children = header.columns;\n\n const isDragging = (draggableProps && draggableProps.isDragging) || isDraggingParent;\n const dropIndicatorPosition =\n draggableProps && draggableProps.shouldShowDropIndicatorPosition && draggableProps.dropIndicatorPosition;\n\n const ChildGroup = isDragOverlay ? HeaderCellGroup : HeaderCellGroupSortable;\n\n const colSpan = children?.length ?? 1;\n return (\n <StyledWrapper\n ref={draggableProps ? draggableProps.setNodeRef : null}\n gridColumn={isDragOverlay ? 'auto' : `span ${colSpan}`}\n isDragOverlay={isDragOverlay}\n isDragging={isDragging}\n cols={['auto']}\n data-testid={isDragOverlay ? DATA_TESTID.DATA_TABLE_COLUMN_DRAG_OVERLAY : undefined}\n isFirst={isFirst}\n shouldDropOneLevel={isMultiLevel && level === 0 && !children}\n >\n <HeaderCell column={header} isDragOverlay={isDragOverlay} colSpan={colSpan} />\n {!!children?.length && !isDragOverlay && (\n <SortableHeaderCell isGroup items={children} isDragOverlay={isDragOverlay}>\n {children.map((h, index) => (\n <ChildGroup\n key={h.id}\n header={h}\n isDragOverlay={isDragOverlay}\n isDraggingParent={isDragging}\n isLast={index === children.length - 1}\n isFirst={index === 0}\n level={level + 1}\n />\n ))}\n </SortableHeaderCell>\n )}\n {children?.length && isDragOverlay && <EmptyChildrenGroup />}\n <DropIndicator vertical dropIndicatorPosition={dropIndicatorPosition} isLast={isLast && isDragging} />\n </StyledWrapper>\n );\n};\n\n// We need to declare this because we MUST avoid the useSortable call in the recursive calls of the function\n\nexport const HeaderCellGroup = HeaderCellGroupComp;\n\nexport const HeaderCellGroupSortable = withDnDSortableColumnContext(HeaderCellGroupComp);\n\nexport default HeaderCellGroupSortable;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,mBAAkC;AAClC,qBAAqB;AACrB,uBAAuB;AACvB,wBAA2B;AAC3B,iCAAoC;AACpC,sBAA6C;AAC7C,2BAA8B;AAC9B,gCAAmC;AAEnC,gCAAmC;AACnC,qBAA4B;AAC5B,8BAA6B;AAE7B,MAAM,oBAAgB,yBAAO,mBAAI;AAAA;AAAA,IAE7B,CAAC,EAAE,oBAAoB,cAAc,MAAO,sBAAsB,CAAC,gBAAgB,2BAA2B;AAAA,WACvG,CAAC,UAAW,MAAM,gBAAgB,gBAAgB;AAAA,iBAC5C,CAAC,UAAU,MAAM;AAAA,gBAClB,CAAC,UAAW,MAAM,aAAa,MAAM,MAAM,OAAO,QAAQ,SAAS;AAAA,aACtE,CAAC,UAAW,MAAM,aAAa,MAAM;AAAA,4BACtB,CAAC,UAAW,MAAM,gBAAgB,oBAAoB;AAAA,iBACjE,CAAC,EAAE,QAAQ,MAAO,UAAU,QAAQ,eAAgB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAY3G,MAAM,sBAAqE,CAAC;AAAA,EAC1E;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AACV,MAAM;AACJ,QAAM,EAAE,eAAe,QAAI,yBAAW,wBAAAA,OAAgB;AACtD,QAAM,EAAE,eAAe,QAAI,yBAAW,8CAAmB;AAEzD,QAAM,eAAe,eAAe,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,OAAO;AAE/D,QAAM,WAAW,OAAO;AAExB,QAAM,aAAc,kBAAkB,eAAe,cAAe;AACpE,QAAM,wBACJ,kBAAkB,eAAe,mCAAmC,eAAe;AAErF,QAAM,aAAa,gBAAgB,kBAAkB;AAErD,QAAM,UAAU,UAAU,UAAU;AACpC,SACE,6CAAC;AAAA,IACC,KAAK,iBAAiB,eAAe,aAAa;AAAA,IAClD,YAAY,gBAAgB,SAAS,QAAQ;AAAA,IAC7C;AAAA,IACA;AAAA,IACA,MAAM,CAAC,MAAM;AAAA,IACb,eAAa,gBAAgB,2BAAY,iCAAiC;AAAA,IAC1E;AAAA,IACA,oBAAoB,gBAAgB,UAAU,KAAK,CAAC;AAAA,IAEpD;AAAA,kDAAC;AAAA,QAAW,QAAQ;AAAA,QAAQ;AAAA,QAA8B;AAAA,OAAkB;AAAA,MAC3E,CAAC,CAAC,UAAU,UAAU,CAAC,iBACtB,4CAAC;AAAA,QAAmB,SAAO;AAAA,QAAC,OAAO;AAAA,QAAU;AAAA,QAC1C,mBAAS,IAAI,CAAC,GAAG,UAChB,4CAAC;AAAA,UAEC,QAAQ;AAAA,UACR;AAAA,UACA,kBAAkB;AAAA,UAClB,QAAQ,UAAU,SAAS,SAAS;AAAA,UACpC,SAAS,UAAU;AAAA,UACnB,OAAO,QAAQ;AAAA,WANV,EAAE,EAOT,CACD;AAAA,OACH;AAAA,MAED,UAAU,UAAU,iBAAiB,4CAAC,gDAAmB;AAAA,MAC1D,4CAAC;AAAA,QAAc,UAAQ;AAAA,QAAC;AAAA,QAA8C,QAAQ,UAAU;AAAA,OAAY;AAAA;AAAA,GACtG;AAEJ;AAIO,MAAM,kBAAkB;AAExB,MAAM,8BAA0B,8CAA6B,mBAAmB;AAEvF,IAAO,0BAAQ;",
4
+ "sourcesContent": ["/* eslint-disable complexity */\nimport React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport { HeaderCell } from './HeaderCell';\nimport { SortableItemContext } from '../HoC/SortableItemContext';\nimport { withDnDSortableColumnContext } from '../internal';\nimport { DropIndicator } from '../DropIndicator';\nimport { SortableHeaderCell } from '../SortableHeaderCell';\nimport { TypescriptColumn } from '../../types/props';\nimport { EmptyChildrenGroup } from './EmptyChildrenGroup';\nimport { DATA_TESTID } from '../../configs';\nimport DataTableContext from '../../DataTableContext';\n\nconst StyledWrapper = styled(Grid)`\n position: relative;\n ${({ shouldDropOneLevel, isDragOverlay }) => (shouldDropOneLevel && !isDragOverlay ? `top: 50%; height: 50%;` : '')}\n width: ${(props) => (props.isDragOverlay ? 'fit-content' : '100%')};\n grid-column: ${(props) => props.gridColumn};\n background: ${(props) => (props.isDragging ? props.theme.colors.neutral['080'] : 'white')};\n opacity: ${(props) => (props.isDragging ? 0.8 : 1)};\n box-shadow: 0 2px 4px 0 ${(props) => (props.isDragOverlay ? 'rgba(0,0,0,0.5)' : 'transparent')};\n border-left: ${({ isFirst }) => (isFirst ? '0px' : '1px')} solid ${(props) => props.theme.colors.neutral['080']};\n`;\n\ninterface HeaderCellGroupCompProps {\n header: TypescriptColumn;\n isDragOverlay?: boolean;\n isDraggingParent?: boolean;\n isLast?: boolean;\n isFirst?: boolean;\n level?: number;\n}\n\nconst HeaderCellGroupComp: React.ComponentType<HeaderCellGroupCompProps> = ({\n header,\n isDragOverlay,\n isDraggingParent,\n isLast,\n isFirst,\n level = 0,\n}) => {\n const { visibleColumns } = useContext(DataTableContext);\n const { draggableProps } = useContext(SortableItemContext);\n\n const isMultiLevel = visibleColumns.some((col) => !!col.columns);\n\n const children = header.columns;\n\n const isDragging = (draggableProps && draggableProps.isDragging) || isDraggingParent;\n const dropIndicatorPosition =\n draggableProps && draggableProps.shouldShowDropIndicatorPosition && draggableProps.dropIndicatorPosition;\n\n const ChildGroup = isDragOverlay ? HeaderCellGroup : HeaderCellGroupSortable;\n\n const colSpan = children?.length ?? 1;\n return (\n <StyledWrapper\n ref={draggableProps ? draggableProps.setNodeRef : null}\n gridColumn={isDragOverlay ? 'auto' : `span ${colSpan}`}\n isDragOverlay={isDragOverlay}\n isDragging={isDragging}\n cols={['auto']}\n data-testid={isDragOverlay ? DATA_TESTID.DATA_TABLE_COLUMN_DRAG_OVERLAY : undefined}\n isFirst={isFirst}\n shouldDropOneLevel={isMultiLevel && level === 0 && !children}\n >\n <HeaderCell column={header} isDragOverlay={isDragOverlay} colSpan={colSpan} />\n {!!children?.length && !isDragOverlay && (\n <SortableHeaderCell isGroup items={children} isDragOverlay={isDragOverlay}>\n {children.map((h, index) => (\n <ChildGroup\n key={h.id}\n header={h}\n isDragOverlay={isDragOverlay}\n isDraggingParent={isDragging}\n isLast={index === children.length - 1}\n isFirst={index === 0}\n level={level + 1}\n />\n ))}\n </SortableHeaderCell>\n )}\n {children?.length && isDragOverlay && <EmptyChildrenGroup />}\n <DropIndicator vertical dropIndicatorPosition={dropIndicatorPosition} isLast={isLast && isDragging} isDropValid />\n </StyledWrapper>\n );\n};\n\n// We need to declare this because we MUST avoid the useSortable call in the recursive calls of the function\n\nexport const HeaderCellGroup = HeaderCellGroupComp;\n\nexport const HeaderCellGroupSortable = withDnDSortableColumnContext(HeaderCellGroupComp);\n\nexport default HeaderCellGroupSortable;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,mBAAkC;AAClC,qBAAqB;AACrB,uBAAuB;AACvB,wBAA2B;AAC3B,iCAAoC;AACpC,sBAA6C;AAC7C,2BAA8B;AAC9B,gCAAmC;AAEnC,gCAAmC;AACnC,qBAA4B;AAC5B,8BAA6B;AAE7B,MAAM,oBAAgB,yBAAO,mBAAI;AAAA;AAAA,IAE7B,CAAC,EAAE,oBAAoB,cAAc,MAAO,sBAAsB,CAAC,gBAAgB,2BAA2B;AAAA,WACvG,CAAC,UAAW,MAAM,gBAAgB,gBAAgB;AAAA,iBAC5C,CAAC,UAAU,MAAM;AAAA,gBAClB,CAAC,UAAW,MAAM,aAAa,MAAM,MAAM,OAAO,QAAQ,SAAS;AAAA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pC,SAAS,UAAU;AAAA,UACnB,OAAO,QAAQ;AAAA,WANV,EAAE,EAOT,CACD;AAAA,OACH;AAAA,MAED,UAAU,UAAU,iBAAiB,4CAAC,gDAAmB;AAAA,MAC1D,4CAAC;AAAA,QAAc,UAAQ;AAAA,QAAC;AAAA,QAA8C,QAAQ,UAAU;AAAA,QAAY,aAAW;AAAA,OAAC;AAAA;AAAA,GAClH;AAEJ;AAIO,MAAM,kBAAkB;AAExB,MAAM,8BAA0B,8CAA6B,mBAAmB;AAEvF,IAAO,0BAAQ;",
6
6
  "names": ["DataTableContext"]
7
7
  }
@@ -69,7 +69,8 @@ const HeaderCellGroupComp = ({
69
69
  /* @__PURE__ */ jsx(DropIndicator, {
70
70
  vertical: true,
71
71
  dropIndicatorPosition,
72
- isLast: isLast && isDragging
72
+ isLast: isLast && isDragging,
73
+ isDropValid: true
73
74
  })
74
75
  ]
75
76
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Headers/HeaderCellGroup.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport { HeaderCell } from './HeaderCell';\nimport { SortableItemContext } from '../HoC/SortableItemContext';\nimport { withDnDSortableColumnContext } from '../internal';\nimport { DropIndicator } from '../DropIndicator';\nimport { SortableHeaderCell } from '../SortableHeaderCell';\nimport { TypescriptColumn } from '../../types/props';\nimport { EmptyChildrenGroup } from './EmptyChildrenGroup';\nimport { DATA_TESTID } from '../../configs';\nimport DataTableContext from '../../DataTableContext';\n\nconst StyledWrapper = styled(Grid)`\n position: relative;\n ${({ shouldDropOneLevel, isDragOverlay }) => (shouldDropOneLevel && !isDragOverlay ? `top: 50%; height: 50%;` : '')}\n width: ${(props) => (props.isDragOverlay ? 'fit-content' : '100%')};\n grid-column: ${(props) => props.gridColumn};\n background: ${(props) => (props.isDragging ? props.theme.colors.neutral['080'] : 'white')};\n opacity: ${(props) => (props.isDragging ? 0.8 : 1)};\n box-shadow: 0 2px 4px 0 ${(props) => (props.isDragOverlay ? 'rgba(0,0,0,0.5)' : 'transparent')};\n border-left: ${({ isFirst }) => (isFirst ? '0px' : '1px')} solid ${(props) => props.theme.colors.neutral['080']};\n`;\n\ninterface HeaderCellGroupCompProps {\n header: TypescriptColumn;\n isDragOverlay?: boolean;\n isDraggingParent?: boolean;\n isLast?: boolean;\n isFirst?: boolean;\n level?: number;\n}\n\nconst HeaderCellGroupComp: React.ComponentType<HeaderCellGroupCompProps> = ({\n header,\n isDragOverlay,\n isDraggingParent,\n isLast,\n isFirst,\n level = 0,\n}) => {\n const { visibleColumns } = useContext(DataTableContext);\n const { draggableProps } = useContext(SortableItemContext);\n\n const isMultiLevel = visibleColumns.some((col) => !!col.columns);\n\n const children = header.columns;\n\n const isDragging = (draggableProps && draggableProps.isDragging) || isDraggingParent;\n const dropIndicatorPosition =\n draggableProps && draggableProps.shouldShowDropIndicatorPosition && draggableProps.dropIndicatorPosition;\n\n const ChildGroup = isDragOverlay ? HeaderCellGroup : HeaderCellGroupSortable;\n\n const colSpan = children?.length ?? 1;\n return (\n <StyledWrapper\n ref={draggableProps ? draggableProps.setNodeRef : null}\n gridColumn={isDragOverlay ? 'auto' : `span ${colSpan}`}\n isDragOverlay={isDragOverlay}\n isDragging={isDragging}\n cols={['auto']}\n data-testid={isDragOverlay ? DATA_TESTID.DATA_TABLE_COLUMN_DRAG_OVERLAY : undefined}\n isFirst={isFirst}\n shouldDropOneLevel={isMultiLevel && level === 0 && !children}\n >\n <HeaderCell column={header} isDragOverlay={isDragOverlay} colSpan={colSpan} />\n {!!children?.length && !isDragOverlay && (\n <SortableHeaderCell isGroup items={children} isDragOverlay={isDragOverlay}>\n {children.map((h, index) => (\n <ChildGroup\n key={h.id}\n header={h}\n isDragOverlay={isDragOverlay}\n isDraggingParent={isDragging}\n isLast={index === children.length - 1}\n isFirst={index === 0}\n level={level + 1}\n />\n ))}\n </SortableHeaderCell>\n )}\n {children?.length && isDragOverlay && <EmptyChildrenGroup />}\n <DropIndicator vertical dropIndicatorPosition={dropIndicatorPosition} isLast={isLast && isDragging} />\n </StyledWrapper>\n );\n};\n\n// We need to declare this because we MUST avoid the useSortable call in the recursive calls of the function\n\nexport const HeaderCellGroup = HeaderCellGroupComp;\n\nexport const HeaderCellGroupSortable = withDnDSortableColumnContext(HeaderCellGroupComp);\n\nexport default HeaderCellGroupSortable;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,kBAAkB;AAClC,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,2BAA2B;AACpC,SAAS,oCAAoC;AAC7C,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B;AAEnC,SAAS,0BAA0B;AACnC,SAAS,mBAAmB;AAC5B,OAAO,sBAAsB;AAE7B,MAAM,gBAAgB,OAAO,IAAI;AAAA;AAAA,IAE7B,CAAC,EAAE,oBAAoB,cAAc,MAAO,sBAAsB,CAAC,gBAAgB,2BAA2B;AAAA,WACvG,CAAC,UAAW,MAAM,gBAAgB,gBAAgB;AAAA,iBAC5C,CAAC,UAAU,MAAM;AAAA,gBAClB,CAAC,UAAW,MAAM,aAAa,MAAM,MAAM,OAAO,QAAQ,SAAS;AAAA,aACtE,CAAC,UAAW,MAAM,aAAa,MAAM;AAAA,4BACtB,CAAC,UAAW,MAAM,gBAAgB,oBAAoB;AAAA,iBACjE,CAAC,EAAE,QAAQ,MAAO,UAAU,QAAQ,eAAgB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAY3G,MAAM,sBAAqE,CAAC;AAAA,EAC1E;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AACV,MAAM;AACJ,QAAM,EAAE,eAAe,IAAI,WAAW,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'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport { HeaderCell } from './HeaderCell';\nimport { SortableItemContext } from '../HoC/SortableItemContext';\nimport { withDnDSortableColumnContext } from '../internal';\nimport { DropIndicator } from '../DropIndicator';\nimport { SortableHeaderCell } from '../SortableHeaderCell';\nimport { TypescriptColumn } from '../../types/props';\nimport { EmptyChildrenGroup } from './EmptyChildrenGroup';\nimport { DATA_TESTID } from '../../configs';\nimport DataTableContext from '../../DataTableContext';\n\nconst StyledWrapper = styled(Grid)`\n position: relative;\n ${({ shouldDropOneLevel, isDragOverlay }) => (shouldDropOneLevel && !isDragOverlay ? `top: 50%; height: 50%;` : '')}\n width: ${(props) => (props.isDragOverlay ? 'fit-content' : '100%')};\n grid-column: ${(props) => props.gridColumn};\n background: ${(props) => (props.isDragging ? props.theme.colors.neutral['080'] : 'white')};\n opacity: ${(props) => (props.isDragging ? 0.8 : 1)};\n box-shadow: 0 2px 4px 0 ${(props) => (props.isDragOverlay ? 'rgba(0,0,0,0.5)' : 'transparent')};\n border-left: ${({ isFirst }) => (isFirst ? '0px' : '1px')} solid ${(props) => props.theme.colors.neutral['080']};\n`;\n\ninterface HeaderCellGroupCompProps {\n header: TypescriptColumn;\n isDragOverlay?: boolean;\n isDraggingParent?: boolean;\n isLast?: boolean;\n isFirst?: boolean;\n level?: number;\n}\n\nconst HeaderCellGroupComp: React.ComponentType<HeaderCellGroupCompProps> = ({\n header,\n isDragOverlay,\n isDraggingParent,\n isLast,\n isFirst,\n level = 0,\n}) => {\n const { visibleColumns } = useContext(DataTableContext);\n const { draggableProps } = useContext(SortableItemContext);\n\n const isMultiLevel = visibleColumns.some((col) => !!col.columns);\n\n const children = header.columns;\n\n const isDragging = (draggableProps && draggableProps.isDragging) || isDraggingParent;\n const dropIndicatorPosition =\n draggableProps && draggableProps.shouldShowDropIndicatorPosition && draggableProps.dropIndicatorPosition;\n\n const ChildGroup = isDragOverlay ? HeaderCellGroup : HeaderCellGroupSortable;\n\n const colSpan = children?.length ?? 1;\n return (\n <StyledWrapper\n ref={draggableProps ? draggableProps.setNodeRef : null}\n gridColumn={isDragOverlay ? 'auto' : `span ${colSpan}`}\n isDragOverlay={isDragOverlay}\n isDragging={isDragging}\n cols={['auto']}\n data-testid={isDragOverlay ? DATA_TESTID.DATA_TABLE_COLUMN_DRAG_OVERLAY : undefined}\n isFirst={isFirst}\n shouldDropOneLevel={isMultiLevel && level === 0 && !children}\n >\n <HeaderCell column={header} isDragOverlay={isDragOverlay} colSpan={colSpan} />\n {!!children?.length && !isDragOverlay && (\n <SortableHeaderCell isGroup items={children} isDragOverlay={isDragOverlay}>\n {children.map((h, index) => (\n <ChildGroup\n key={h.id}\n header={h}\n isDragOverlay={isDragOverlay}\n isDraggingParent={isDragging}\n isLast={index === children.length - 1}\n isFirst={index === 0}\n level={level + 1}\n />\n ))}\n </SortableHeaderCell>\n )}\n {children?.length && isDragOverlay && <EmptyChildrenGroup />}\n <DropIndicator vertical dropIndicatorPosition={dropIndicatorPosition} isLast={isLast && isDragging} isDropValid />\n </StyledWrapper>\n );\n};\n\n// We need to declare this because we MUST avoid the useSortable call in the recursive calls of the function\n\nexport const HeaderCellGroup = HeaderCellGroupComp;\n\nexport const HeaderCellGroupSortable = withDnDSortableColumnContext(HeaderCellGroupComp);\n\nexport default HeaderCellGroupSortable;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,kBAAkB;AAClC,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,2BAA2B;AACpC,SAAS,oCAAoC;AAC7C,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B;AAEnC,SAAS,0BAA0B;AACnC,SAAS,mBAAmB;AAC5B,OAAO,sBAAsB;AAE7B,MAAM,gBAAgB,OAAO,IAAI;AAAA;AAAA,IAE7B,CAAC,EAAE,oBAAoB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mB,SAAO;AAAA,QAAC,OAAO;AAAA,QAAU;AAAA,QAC1C,mBAAS,IAAI,CAAC,GAAG,UAChB,oBAAC;AAAA,UAEC,QAAQ;AAAA,UACR;AAAA,UACA,kBAAkB;AAAA,UAClB,QAAQ,UAAU,SAAS,SAAS;AAAA,UACpC,SAAS,UAAU;AAAA,UACnB,OAAO,QAAQ;AAAA,WANV,EAAE,EAOT,CACD;AAAA,OACH;AAAA,MAED,UAAU,UAAU,iBAAiB,oBAAC,sBAAmB;AAAA,MAC1D,oBAAC;AAAA,QAAc,UAAQ;AAAA,QAAC;AAAA,QAA8C,QAAQ,UAAU;AAAA,QAAY,aAAW;AAAA,OAAC;AAAA;AAAA,GAClH;AAEJ;AAIO,MAAM,kBAAkB;AAExB,MAAM,0BAA0B,6BAA6B,mBAAmB;AAEvF,IAAO,0BAAQ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-data-table",
3
- "version": "3.10.0-next.2",
3
+ "version": "3.10.0-next.4",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Data Table",
6
6
  "files": [
@@ -571,23 +571,23 @@
571
571
  "indent": 4
572
572
  },
573
573
  "dependencies": {
574
- "@elliemae/ds-button": "3.10.0-next.2",
575
- "@elliemae/ds-circular-progress-indicator": "3.10.0-next.2",
576
- "@elliemae/ds-controlled-form": "3.10.0-next.2",
577
- "@elliemae/ds-drag-and-drop": "3.10.0-next.2",
578
- "@elliemae/ds-dropdownmenu": "3.10.0-next.2",
579
- "@elliemae/ds-form": "3.10.0-next.2",
580
- "@elliemae/ds-form-layout-blocks": "3.10.0-next.2",
581
- "@elliemae/ds-grid": "3.10.0-next.2",
582
- "@elliemae/ds-icons": "3.10.0-next.2",
583
- "@elliemae/ds-pagination": "3.10.0-next.2",
584
- "@elliemae/ds-pills": "3.10.0-next.2",
585
- "@elliemae/ds-popperjs": "3.10.0-next.2",
586
- "@elliemae/ds-skeleton": "3.10.0-next.2",
587
- "@elliemae/ds-system": "3.10.0-next.2",
588
- "@elliemae/ds-toolbar": "3.10.0-next.2",
589
- "@elliemae/ds-truncated-tooltip-text": "3.10.0-next.2",
590
- "@elliemae/ds-utilities": "3.10.0-next.2",
574
+ "@elliemae/ds-button": "3.10.0-next.4",
575
+ "@elliemae/ds-circular-progress-indicator": "3.10.0-next.4",
576
+ "@elliemae/ds-controlled-form": "3.10.0-next.4",
577
+ "@elliemae/ds-drag-and-drop": "3.10.0-next.4",
578
+ "@elliemae/ds-dropdownmenu": "3.10.0-next.4",
579
+ "@elliemae/ds-form": "3.10.0-next.4",
580
+ "@elliemae/ds-form-layout-blocks": "3.10.0-next.4",
581
+ "@elliemae/ds-grid": "3.10.0-next.4",
582
+ "@elliemae/ds-icons": "3.10.0-next.4",
583
+ "@elliemae/ds-pagination": "3.10.0-next.4",
584
+ "@elliemae/ds-pills": "3.10.0-next.4",
585
+ "@elliemae/ds-popperjs": "3.10.0-next.4",
586
+ "@elliemae/ds-skeleton": "3.10.0-next.4",
587
+ "@elliemae/ds-system": "3.10.0-next.4",
588
+ "@elliemae/ds-toolbar": "3.10.0-next.4",
589
+ "@elliemae/ds-truncated-tooltip-text": "3.10.0-next.4",
590
+ "@elliemae/ds-utilities": "3.10.0-next.4",
591
591
  "react-virtual": "~2.10.4",
592
592
  "uid": "~2.0.0"
593
593
  },