@veeqo/transfigure 0.0.4 → 0.0.5

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 (225) hide show
  1. package/dist/BusinessLogic/types.d.ts +2 -0
  2. package/dist/components/TableManagement/DndContainer.d.ts +11 -0
  3. package/dist/components/TableManagement/TableManagement.d.ts +6 -0
  4. package/dist/components/TableManagement/TableManagementGlyph.d.ts +4 -0
  5. package/dist/components/TableManagement/TableManagementModal.d.ts +2 -0
  6. package/dist/components/TableManagement/components/ColumnGroup.d.ts +2 -0
  7. package/dist/components/TableManagement/components/ColumnItem.d.ts +2 -0
  8. package/dist/components/TableManagement/components/DroppableArea.d.ts +8 -0
  9. package/dist/components/TableManagement/components/SortableItem.d.ts +7 -0
  10. package/dist/components/TableManagement/components/styled.d.ts +28 -0
  11. package/dist/components/TableManagement/components/types.d.ts +11 -0
  12. package/dist/components/TableManagement/hooks/useCollisionDetectionStrategy/index.d.ts +1 -0
  13. package/dist/components/TableManagement/hooks/useCollisionDetectionStrategy/types.d.ts +4 -0
  14. package/dist/components/TableManagement/hooks/useCollisionDetectionStrategy/useCollisionDetectionStrategy.d.ts +5 -0
  15. package/dist/components/TableManagement/hooks/useDragHandlers/index.d.ts +1 -0
  16. package/dist/components/TableManagement/hooks/useDragHandlers/types.d.ts +6 -0
  17. package/dist/components/TableManagement/hooks/useDragHandlers/useDragHandlers.d.ts +9 -0
  18. package/dist/components/TableManagement/index.d.ts +1 -0
  19. package/dist/components/TableManagement/types.d.ts +17 -0
  20. package/dist/components/TableManagement/utils/filterColumnsBySearch/filterColumnsBySearch.d.ts +2 -0
  21. package/dist/components/TableManagement/utils/filterColumnsBySearch/index.d.ts +1 -0
  22. package/dist/hooks/index.d.ts +1 -0
  23. package/dist/hooks/useHiddenColumns/index.d.ts +1 -0
  24. package/dist/hooks/useHiddenColumns/useHiddenColumns.d.ts +3 -0
  25. package/dist/hooks/usePersistColumns/index.d.ts +1 -0
  26. package/dist/hooks/usePersistColumns/usePersistColumns.d.ts +6 -0
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.js +79 -75
  30. package/dist/index100.cjs +1 -0
  31. package/dist/index100.js +66 -0
  32. package/dist/index101.cjs +1 -0
  33. package/dist/index101.js +32 -0
  34. package/dist/index102.cjs +7 -0
  35. package/dist/index102.js +12 -0
  36. package/dist/index103.cjs +1 -0
  37. package/dist/index103.js +44 -0
  38. package/dist/index11.cjs +1 -1
  39. package/dist/index11.js +1 -1
  40. package/dist/index12.cjs +1 -1
  41. package/dist/index12.js +1 -1
  42. package/dist/index13.cjs +1 -1
  43. package/dist/index13.js +1 -1
  44. package/dist/index14.cjs +1 -1
  45. package/dist/index14.js +2 -2
  46. package/dist/index15.cjs +1 -1
  47. package/dist/index15.js +2 -2
  48. package/dist/index16.cjs +1 -1
  49. package/dist/index16.js +1 -1
  50. package/dist/index17.cjs +1 -1
  51. package/dist/index17.js +1 -1
  52. package/dist/index18.cjs +1 -1
  53. package/dist/index18.js +2 -2
  54. package/dist/index19.cjs +1 -1
  55. package/dist/index19.js +2 -2
  56. package/dist/index2.cjs +1 -1
  57. package/dist/index2.js +2 -2
  58. package/dist/index20.cjs +1 -1
  59. package/dist/index20.js +3 -3
  60. package/dist/index21.cjs +1 -1
  61. package/dist/index21.js +2 -2
  62. package/dist/index22.cjs +1 -1
  63. package/dist/index22.js +2 -2
  64. package/dist/index23.cjs +1 -1
  65. package/dist/index23.js +3 -3
  66. package/dist/index24.cjs +1 -1
  67. package/dist/index24.js +3 -3
  68. package/dist/index25.cjs +1 -1
  69. package/dist/index25.js +1 -1
  70. package/dist/index26.cjs +1 -1
  71. package/dist/index26.js +2 -2
  72. package/dist/index27.cjs +1 -1
  73. package/dist/index27.js +2 -2
  74. package/dist/index28.cjs +1 -1
  75. package/dist/index28.js +3 -3
  76. package/dist/index29.cjs +1 -1
  77. package/dist/index29.js +1 -1
  78. package/dist/index3.cjs +1 -1
  79. package/dist/index3.js +2 -2
  80. package/dist/index30.cjs +1 -1
  81. package/dist/index30.js +1 -1
  82. package/dist/index31.cjs +1 -1
  83. package/dist/index31.js +1 -1
  84. package/dist/index32.cjs +1 -1
  85. package/dist/index32.js +1 -1
  86. package/dist/index33.cjs +1 -1
  87. package/dist/index33.js +5 -5
  88. package/dist/index34.cjs +1 -1
  89. package/dist/index34.js +1 -1
  90. package/dist/index35.cjs +1 -1
  91. package/dist/index35.js +1 -1
  92. package/dist/index36.cjs +1 -1
  93. package/dist/index36.js +3 -3
  94. package/dist/index37.cjs +1 -1
  95. package/dist/index37.js +3 -3
  96. package/dist/index38.cjs +1 -1
  97. package/dist/index38.js +4 -4
  98. package/dist/index39.cjs +1 -1
  99. package/dist/index39.js +2 -2
  100. package/dist/index4.cjs +1 -1
  101. package/dist/index4.js +2 -2
  102. package/dist/index41.cjs +1 -1
  103. package/dist/index41.js +4 -4
  104. package/dist/index43.cjs +1 -1
  105. package/dist/index43.js +46 -19
  106. package/dist/index44.cjs +1 -1
  107. package/dist/index44.js +19 -2
  108. package/dist/index45.cjs +1 -1
  109. package/dist/index45.js +2 -23
  110. package/dist/index46.cjs +1 -1
  111. package/dist/index46.js +23 -2
  112. package/dist/index47.cjs +1 -1
  113. package/dist/index47.js +2 -4
  114. package/dist/index48.cjs +1 -1
  115. package/dist/index48.js +4 -11
  116. package/dist/index49.cjs +1 -1
  117. package/dist/index49.js +10 -12
  118. package/dist/index5.cjs +1 -1
  119. package/dist/index5.js +2 -2
  120. package/dist/index50.cjs +1 -1
  121. package/dist/index50.js +12 -11
  122. package/dist/index51.cjs +1 -1
  123. package/dist/index51.js +11 -184
  124. package/dist/index52.cjs +1 -1
  125. package/dist/index52.js +183 -25
  126. package/dist/index53.cjs +1 -1
  127. package/dist/index53.js +26 -24
  128. package/dist/index54.cjs +1 -1
  129. package/dist/index54.js +19 -22
  130. package/dist/index55.cjs +1 -1
  131. package/dist/index55.js +25 -90
  132. package/dist/index56.cjs +1 -1
  133. package/dist/index56.js +92 -8
  134. package/dist/index57.cjs +1 -1
  135. package/dist/index57.js +8 -50
  136. package/dist/index58.cjs +1 -1
  137. package/dist/index58.js +49 -60
  138. package/dist/index59.cjs +1 -1
  139. package/dist/index59.js +61 -17
  140. package/dist/index6.cjs +1 -1
  141. package/dist/index6.js +4 -4
  142. package/dist/index60.cjs +1 -1
  143. package/dist/index60.js +18 -316
  144. package/dist/index61.cjs +1 -1
  145. package/dist/index61.js +15 -60
  146. package/dist/index62.cjs +1 -1
  147. package/dist/index62.js +309 -50
  148. package/dist/index63.cjs +1 -1
  149. package/dist/index63.js +54 -31
  150. package/dist/index64.cjs +1 -1
  151. package/dist/index64.js +52 -27
  152. package/dist/index65.cjs +1 -1
  153. package/dist/index65.js +37 -4
  154. package/dist/index66.cjs +1 -1
  155. package/dist/index66.js +32 -9
  156. package/dist/index67.cjs +1 -1
  157. package/dist/index67.js +4 -17
  158. package/dist/index68.cjs +1 -1
  159. package/dist/index68.js +9 -19
  160. package/dist/index69.cjs +1 -1
  161. package/dist/index69.js +16 -46
  162. package/dist/index70.cjs +1 -1
  163. package/dist/index70.js +19 -17
  164. package/dist/index71.cjs +1 -1
  165. package/dist/index71.js +48 -2
  166. package/dist/index72.cjs +1 -1
  167. package/dist/index72.js +21 -9
  168. package/dist/index73.cjs +1 -3
  169. package/dist/index73.js +2 -14
  170. package/dist/index74.cjs +1 -1
  171. package/dist/index74.js +8 -8
  172. package/dist/index75.cjs +3 -1
  173. package/dist/index75.js +13 -28
  174. package/dist/index76.cjs +1 -19
  175. package/dist/index76.js +9 -24
  176. package/dist/index77.cjs +1 -1
  177. package/dist/index77.js +154 -14
  178. package/dist/index78.cjs +1 -12
  179. package/dist/index78.js +19 -16
  180. package/dist/index79.cjs +1 -80
  181. package/dist/index79.js +24 -95
  182. package/dist/index80.cjs +1 -1
  183. package/dist/index80.js +29 -22
  184. package/dist/index81.cjs +19 -1
  185. package/dist/index81.js +24 -24
  186. package/dist/index82.cjs +1 -1
  187. package/dist/index82.js +22 -2
  188. package/dist/index83.cjs +1 -13
  189. package/dist/index83.js +13 -15
  190. package/dist/index84.cjs +17 -17
  191. package/dist/index84.js +25 -25
  192. package/dist/index85.cjs +1 -1
  193. package/dist/index85.js +13 -36
  194. package/dist/index86.cjs +104 -1
  195. package/dist/index86.js +119 -62
  196. package/dist/index87.cjs +1 -7
  197. package/dist/index87.js +58 -10
  198. package/dist/index88.cjs +1 -0
  199. package/dist/index88.js +31 -0
  200. package/dist/index89.cjs +1 -0
  201. package/dist/index89.js +4 -0
  202. package/dist/index9.cjs +1 -1
  203. package/dist/index9.js +17 -15
  204. package/dist/index90.cjs +1 -0
  205. package/dist/index90.js +36 -0
  206. package/dist/index91.cjs +1 -0
  207. package/dist/index91.js +10 -0
  208. package/dist/index92.cjs +12 -0
  209. package/dist/index92.js +18 -0
  210. package/dist/index93.cjs +1 -0
  211. package/dist/index93.js +4 -0
  212. package/dist/index94.cjs +1 -0
  213. package/dist/index94.js +65 -0
  214. package/dist/index95.cjs +1 -0
  215. package/dist/index95.js +38 -0
  216. package/dist/index96.cjs +80 -0
  217. package/dist/index96.js +97 -0
  218. package/dist/index97.cjs +13 -0
  219. package/dist/index97.js +19 -0
  220. package/dist/index98.cjs +1 -0
  221. package/dist/index98.js +21 -0
  222. package/dist/index99.cjs +1 -0
  223. package/dist/index99.js +10 -0
  224. package/dist/types.d.ts +8 -0
  225. package/package.json +11 -2
@@ -18,4 +18,6 @@ export type BusinessLogicType = {
18
18
  GROUP_MAP: Map<string, FilterGroupType>;
19
19
  FILTERS_DEBOUCE_INTERVAL_MS: number;
20
20
  PAGE_SIZE_OPTIONS: number[];
21
+ DEFAULT_VISIBLE_COLUMNS: string[];
22
+ DEFAULT_HIDDEN_COLUMNS: string[];
21
23
  };
@@ -0,0 +1,11 @@
1
+ import { Dispatch, ReactNode, SetStateAction } from 'react';
2
+ import { UniqueIdentifier } from '@dnd-kit/core';
3
+ export type Items = Record<string, UniqueIdentifier[]>;
4
+ type DndContainerProps = {
5
+ items: Items;
6
+ children: ReactNode;
7
+ setItems: Dispatch<SetStateAction<Items>>;
8
+ renderDragOverlay?: (activeId: UniqueIdentifier) => ReactNode;
9
+ };
10
+ export declare const DndContainer: ({ items, setItems, children, renderDragOverlay, }: DndContainerProps) => JSX.Element;
11
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ColumnDefinition } from '../../../node_modules/@veeqo/ui/dist/components/DataGrid/types';
2
+ type Props = {
3
+ columnDefinitions: ColumnDefinition<any>[];
4
+ };
5
+ export declare const TableManagement: ({ columnDefinitions }: Props) => JSX.Element | null;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const TableManagementGlyph: ({ height, width }: {
2
+ height?: number | undefined;
3
+ width?: number | undefined;
4
+ }) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { TableManagementProps } from './types';
2
+ export declare const TableManagementModal: ({ onClose, columnDefintions, hiddenColumns, visibleColumns }: TableManagementProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ColumnGroupProps } from './types';
2
+ export declare const ColumnGroup: ({ id, title, columns }: ColumnGroupProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ColumnItemProps } from './types';
2
+ export declare const ColumnItem: ({ column, isHidden, isDragOverlay }: ColumnItemProps) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { StackProps } from '../../../../node_modules/@veeqo/ui/dist/components/Stack/types';
2
+ import { ReactNode } from 'react';
3
+ type DroppableAreaProps = {
4
+ id: string | number;
5
+ children: ReactNode;
6
+ };
7
+ export declare const DroppableArea: ({ id, children, ...props }: DroppableAreaProps & StackProps) => JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ type SortableItemProps = {
3
+ id: string | number;
4
+ children: ReactNode;
5
+ };
6
+ export declare const SortableItem: ({ id, children }: SortableItemProps) => JSX.Element;
7
+ export {};
@@ -0,0 +1,28 @@
1
+ import { DialogHTMLAttributes } from 'react';
2
+ export declare const VerticalSeparator: import('styled-components').StyledComponent<string, any, {}, never>;
3
+ export declare const VerticalText: import('styled-components').StyledComponent<"span", any, {} & import('../../../../node_modules/@veeqo/ui/dist/components/Text/types').TextProps, never>;
4
+ export declare const StickyText: import('styled-components').StyledComponent<"span", any, {} & import('../../../../node_modules/@veeqo/ui/dist/components/Text/types').TextProps, never>;
5
+ export declare const DetailedText: import('styled-components').StyledComponent<"span", any, {} & import('../../../../node_modules/@veeqo/ui/dist/components/Text/types').TextProps, never>;
6
+ export declare const ColumnGroupsGrid: import('styled-components').StyledComponent<"div", any, import('../../../../node_modules/@veeqo/ui/dist/components/Grid/types').GridProps, never>;
7
+ export declare const VisibilityOffIcon: import('styled-components').StyledComponent<({ name, size, color, className, ariaLabel, style, onClick, }: import('../../../../node_modules/@veeqo/components/dist/components/common/Glyph/Glyph').GlyphProps) => React.JSX.Element, any, {
8
+ name: "visibility-off";
9
+ }, "name">;
10
+ export declare const ColumnItemWrapper: import('styled-components').StyledComponent<"div", any, import('../../../../node_modules/@veeqo/ui/dist/components/Stack/types').StackProps & {
11
+ isHidden?: boolean;
12
+ isDragOverlay?: boolean;
13
+ }, never>;
14
+ export declare const DraggingOverlay: import('styled-components').StyledComponent<string, any, {}, never>;
15
+ export declare const DroppableAreaStack: import('styled-components').StyledComponent<"div", any, import('../../../../node_modules/@veeqo/ui/dist/components/Stack/types').StackProps, never>;
16
+ export declare const ColumnSearch: import('styled-components').StyledComponent<({ type, disabled, onClearClick, onChange, onBlur, onFocus, onKeyUp, onKeyDown, onKeyPress, value, error, placeholder, className, name, isLoading, fill, reversed, autoComplete, size, }: import('../../../../node_modules/@veeqo/ui/dist/components/Search/types').SearchProps) => React.JSX.Element, any, {}, never>;
17
+ export declare const Container: import('styled-components').StyledComponent<string, any, {}, never>;
18
+ export declare const HeaderContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
19
+ /**
20
+ * Required when using drag and drop functionality within the context of the modal
21
+ * component from @veeqo/ui.
22
+ *
23
+ * The modal component uses the HTML Dialog element which renders itself in the
24
+ * 'Top layer' of the DOM. To ensure DragOverlay can be used correctly in and above
25
+ * the component rendered in this top layer, an invisible dialog should be rendered
26
+ * as a parent to ensure correct stacking.
27
+ */
28
+ export declare const DndDragOverlayDialog: import('styled-components').StyledComponent<string, any, DialogHTMLAttributes<HTMLDialogElement>, never>;
@@ -0,0 +1,11 @@
1
+ import { BaseColumnConfig } from '../types';
2
+ export type ColumnItemProps = {
3
+ column: BaseColumnConfig;
4
+ isHidden?: boolean;
5
+ isDragOverlay?: boolean;
6
+ };
7
+ export type ColumnGroupProps = {
8
+ id: string;
9
+ title: string;
10
+ columns: BaseColumnConfig[];
11
+ };
@@ -0,0 +1 @@
1
+ export { useCollisionDetectionStrategy } from './useCollisionDetectionStrategy';
@@ -0,0 +1,4 @@
1
+ import { Items } from '../../types';
2
+ export type UseCollisionDetectionStrategyArgs = {
3
+ items: Items;
4
+ };
@@ -0,0 +1,5 @@
1
+ import { CollisionDetection } from '@dnd-kit/core';
2
+ import { UseCollisionDetectionStrategyArgs } from './types';
3
+ export declare const useCollisionDetectionStrategy: ({ items }: UseCollisionDetectionStrategyArgs) => {
4
+ collisionDetectionStrategy: CollisionDetection;
5
+ };
@@ -0,0 +1 @@
1
+ export { useDragHandlers } from './useDragHandlers';
@@ -0,0 +1,6 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { Items } from '../../types';
3
+ export type UseDragHandlersArgs = {
4
+ items: Items;
5
+ setItems: Dispatch<SetStateAction<Items>>;
6
+ };
@@ -0,0 +1,9 @@
1
+ import { DragEndEvent, DragOverEvent, DragStartEvent, UniqueIdentifier } from '@dnd-kit/core';
2
+ import { UseDragHandlersArgs } from './types';
3
+ export declare const useDragHandlers: ({ items, setItems }: UseDragHandlersArgs) => {
4
+ activeId: UniqueIdentifier | null;
5
+ handleDragStart: (event: DragStartEvent) => void;
6
+ handleDragOver: (event: DragOverEvent) => void;
7
+ handleDragEnd: (event: DragEndEvent) => void;
8
+ handleDragCancel: () => void;
9
+ };
@@ -0,0 +1 @@
1
+ export { TableManagement } from './TableManagement';
@@ -0,0 +1,17 @@
1
+ import { UniqueIdentifier } from '@dnd-kit/core';
2
+ import { ColumnDefinition } from '../../../node_modules/@veeqo/ui/dist/components/DataGrid/types';
3
+ import { ColumnConfig } from '../../../node_modules/@veeqo/ui/dist/components/DataTable/types';
4
+ export type Items = Record<string, UniqueIdentifier[]>;
5
+ export type BaseColumnConfig = Pick<ColumnConfig, 'id' | 'iconSlot' | 'title' | 'tooltip' | 'hidden' | 'align' | 'width'> & {
6
+ detailed?: string;
7
+ };
8
+ export type TableManagementProps = {
9
+ onClose?: () => void;
10
+ hiddenColumns: string[];
11
+ visibleColumns: string[];
12
+ columnDefintions: ColumnDefinition<any>[];
13
+ };
14
+ export declare enum ColumnGroupIds {
15
+ Hidden = "hidden",
16
+ Visible = "visible"
17
+ }
@@ -0,0 +1,2 @@
1
+ import { ColumnDefinition } from '../../../../../node_modules/@veeqo/ui/dist/components/DataGrid/types';
2
+ export declare const filterColumnsBySearch: (columns: ColumnDefinition<any>[], searchQuery: string) => ColumnDefinition<any>[];
@@ -0,0 +1 @@
1
+ export { filterColumnsBySearch } from './filterColumnsBySearch';
@@ -7,3 +7,4 @@ export * from './useStores';
7
7
  export * from './useViews';
8
8
  export * from './useViewUrlChange';
9
9
  export * from './useCustomViews';
10
+ export * from './useHiddenColumns';
@@ -0,0 +1 @@
1
+ export { useHiddenColumns } from './useHiddenColumns';
@@ -0,0 +1,3 @@
1
+ export declare const useHiddenColumns: () => never[] | {
2
+ hiddenColumnIds: string[];
3
+ };
@@ -0,0 +1 @@
1
+ export { usePersistColumns } from './usePersistColumns';
@@ -0,0 +1,6 @@
1
+ export declare const usePersistColumns: () => {
2
+ saveColumns: ({ visibleColumns }: {
3
+ visibleColumns: string[];
4
+ }) => Promise<void>;
5
+ isSaving: boolean;
6
+ };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index2.cjs"),s=require("./index3.cjs"),o=require("./index4.cjs"),n=require("./index5.cjs"),a=require("./index6.cjs"),c=require("./index7.cjs"),u=require("./index8.cjs"),l=require("./index9.cjs"),F=require("./index10.cjs"),d=require("./index11.cjs"),q=require("./index12.cjs"),g=require("./index13.cjs"),w=require("./index14.cjs"),A=require("./index15.cjs"),V=require("./index16.cjs"),C=require("./index17.cjs"),p=require("./index18.cjs"),h=require("./index19.cjs"),v=require("./index20.cjs"),b=require("./index21.cjs"),R=require("./index22.cjs"),y=require("./index23.cjs"),D=require("./index24.cjs"),M=require("./index25.cjs"),m=require("./index26.cjs"),T=require("./index27.cjs"),N=require("./index28.cjs"),L=require("./index29.cjs"),S=require("./index30.cjs"),P=require("./index31.cjs"),O=require("./index32.cjs"),B=require("./index33.cjs"),k=require("./index34.cjs"),x=require("./index35.cjs"),f=require("./index36.cjs"),U=require("./index37.cjs"),I=require("./index38.cjs"),E=require("./index39.cjs"),G=require("./index40.cjs"),X=require("./index41.cjs"),$=require("./index42.cjs"),e=require("./index43.cjs"),H=require("./index44.cjs"),J=require("./index45.cjs"),_=require("./index46.cjs"),j=require("./index47.cjs"),W=require("./index48.cjs"),r=require("./index49.cjs"),i=require("./index50.cjs"),z=require("./index51.cjs"),K=require("./index52.cjs"),Q=require("./index53.cjs"),Y=require("./index54.cjs"),Z=require("./index55.cjs"),ee=require("./index56.cjs"),re=require("./index57.cjs"),ie=require("./index58.cjs"),te=require("./index59.cjs"),se=require("./index60.cjs"),oe=require("./index61.cjs"),ne=require("./index62.cjs"),ae=require("./index63.cjs"),ce=require("./index64.cjs"),ue=require("./index65.cjs"),le=require("./index66.cjs"),Fe=require("./index67.cjs"),de=require("./index68.cjs"),qe=require("./index69.cjs"),ge=require("./index70.cjs");exports.deleteCustomView=t.deleteCustomView;exports.patchCurrentUser=s.patchCurrentUser;exports.patchCustomView=o.patchCustomView;exports.createCustomView=n.createCustomView;exports.axios=a.axios;exports.useBusinessLogic=c.useBusinessLogic;exports.BusinessLogicManager=u.BusinessLogicManager;exports.setMockedBusinessLogic=l.setMockedBusinessLogic;exports.ErrorBoundary=F.ErrorBoundary;exports.SearchBar=d.SearchBar;exports.TableControls=q.TableControls;exports.ToastsManager=g.ToastsManager;exports.ActiveFilterTag=w.ActiveFilterTag;exports.ActiveFilters=A.ActiveFilters;exports.FilterArrayField=V.FilterArrayField;exports.FilterField=C.FilterField;exports.ActiveFilterArrayTag=p.ActiveFilterArrayTag;exports.ActiveFilterDateRangeTag=h.ActiveFilterDateRangeTag;exports.ActiveFilterNumberRangeTag=v.ActiveFilterNumberRangeTag;exports.ActiveAsyncCheckboxFilter=b.ActiveAsyncCheckboxFilter;exports.ActiveAsyncRadioFilter=R.ActiveAsyncRadioFilter;exports.AsyncCheckboxFilter=y.AsyncCheckboxFilter;exports.AsyncRadioFilter=D.AsyncRadioFilter;exports.CheckboxFilter=M.CheckboxFilter;exports.DateRangeFilter=m.DateRangeFilter;exports.MultipleFieldFilter=T.MultipleFieldFilter;exports.NumberRangeFilter=N.NumberRangeFilter;exports.RadioFilter=L.RadioFilter;exports.FiltersDropdown=S.FiltersDropdown;exports.FiltersList=P.FiltersList;exports.FilterGroup=O.FilterGroup;exports.ViewTab=B.ViewTab;exports.CreateView=k.CreateView;exports.EditDropdown=x.EditDropdown;exports.OptionsDropdown=f.OptionsDropdown;exports.PillNotifications=U.PillNotifications;exports.SortableViews=I.SortableViews;exports.UnsavedChangesPill=E.UnsavedChangesPill;exports.ViewDropdowns=G.ViewDropdowns;exports.ViewList=X.ViewList;exports.SHARING_OPTIONS=$.SHARING_OPTIONS;exports.DateOptionMap=e.DateOptionMap;exports.DateValue=e.DateValue;exports.FilterChoiceValue=H.FilterChoiceValue;exports.ModalProvider=J.ModalProvider;exports.ModalId=_.ModalId;exports.useModal=j.useModal;exports.withCSRF=W.withCSRF;exports.onlyJSON=r.onlyJSON;exports.vndAPI=r.vndAPI;exports.fetcherV1=i.fetcherV1;exports.fetcherV2=i.fetcherV2;exports.useDropdownManager=z.useDropdownManager;exports.useDuplicateActiveView=K.useDuplicateActiveView;exports.useFilterArrayLabel=Q.useFilterArrayLabel;exports.useFilterLabel=Y.useFilterLabel;exports.usePersistUnsavedChanges=Z.usePersistUnsavedChanges;exports.useStores=ee.useStores;exports.useViews=re.useViews;exports.useViewUrlChange=ie.useViewUrlChange;exports.useCustomViews=te.useCustomViews;exports.Filters=se.Filters;exports.NumberRangeFilterClass=oe.NumberRangeFilter;exports.RangeFilter=ne.RangeFilter;exports.Views=ae.Views;exports.Notifications=ce.Notifications;exports.MobXProvider=ue.MobXProvider;exports.getAsyncOptions=le.getAsyncOptions;exports.getFetcherFunction=Fe.getFetcherFunction;exports.isValidDateRange=de.isValidDateRange;exports.viewsAdapter=qe.viewsAdapter;exports.createAllView=ge.createAllView;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index2.cjs"),s=require("./index3.cjs"),o=require("./index4.cjs"),n=require("./index5.cjs"),a=require("./index6.cjs"),c=require("./index7.cjs"),u=require("./index8.cjs"),l=require("./index9.cjs"),F=require("./index10.cjs"),d=require("./index11.cjs"),q=require("./index12.cjs"),g=require("./index13.cjs"),w=require("./index14.cjs"),A=require("./index15.cjs"),V=require("./index16.cjs"),C=require("./index17.cjs"),p=require("./index18.cjs"),b=require("./index19.cjs"),h=require("./index20.cjs"),v=require("./index21.cjs"),R=require("./index22.cjs"),y=require("./index23.cjs"),D=require("./index24.cjs"),m=require("./index25.cjs"),M=require("./index26.cjs"),T=require("./index27.cjs"),N=require("./index28.cjs"),L=require("./index29.cjs"),S=require("./index30.cjs"),P=require("./index31.cjs"),O=require("./index32.cjs"),B=require("./index33.cjs"),k=require("./index34.cjs"),x=require("./index35.cjs"),f=require("./index36.cjs"),U=require("./index37.cjs"),I=require("./index38.cjs"),E=require("./index39.cjs"),G=require("./index40.cjs"),H=require("./index41.cjs"),X=require("./index42.cjs"),$=require("./index43.cjs"),e=require("./index44.cjs"),J=require("./index45.cjs"),_=require("./index46.cjs"),j=require("./index47.cjs"),W=require("./index48.cjs"),z=require("./index49.cjs"),r=require("./index50.cjs"),i=require("./index51.cjs"),K=require("./index52.cjs"),Q=require("./index53.cjs"),Y=require("./index54.cjs"),Z=require("./index55.cjs"),ee=require("./index56.cjs"),re=require("./index57.cjs"),ie=require("./index58.cjs"),te=require("./index59.cjs"),se=require("./index60.cjs"),oe=require("./index61.cjs"),ne=require("./index62.cjs"),ae=require("./index63.cjs"),ce=require("./index64.cjs"),ue=require("./index65.cjs"),le=require("./index66.cjs"),Fe=require("./index67.cjs"),de=require("./index68.cjs"),qe=require("./index69.cjs"),ge=require("./index70.cjs"),we=require("./index71.cjs"),Ae=require("./index72.cjs");exports.deleteCustomView=t.deleteCustomView;exports.patchCurrentUser=s.patchCurrentUser;exports.patchCustomView=o.patchCustomView;exports.createCustomView=n.createCustomView;exports.axios=a.axios;exports.useBusinessLogic=c.useBusinessLogic;exports.BusinessLogicManager=u.BusinessLogicManager;exports.setMockedBusinessLogic=l.setMockedBusinessLogic;exports.ErrorBoundary=F.ErrorBoundary;exports.SearchBar=d.SearchBar;exports.TableControls=q.TableControls;exports.ToastsManager=g.ToastsManager;exports.ActiveFilterTag=w.ActiveFilterTag;exports.ActiveFilters=A.ActiveFilters;exports.FilterArrayField=V.FilterArrayField;exports.FilterField=C.FilterField;exports.ActiveFilterArrayTag=p.ActiveFilterArrayTag;exports.ActiveFilterDateRangeTag=b.ActiveFilterDateRangeTag;exports.ActiveFilterNumberRangeTag=h.ActiveFilterNumberRangeTag;exports.ActiveAsyncCheckboxFilter=v.ActiveAsyncCheckboxFilter;exports.ActiveAsyncRadioFilter=R.ActiveAsyncRadioFilter;exports.AsyncCheckboxFilter=y.AsyncCheckboxFilter;exports.AsyncRadioFilter=D.AsyncRadioFilter;exports.CheckboxFilter=m.CheckboxFilter;exports.DateRangeFilter=M.DateRangeFilter;exports.MultipleFieldFilter=T.MultipleFieldFilter;exports.NumberRangeFilter=N.NumberRangeFilter;exports.RadioFilter=L.RadioFilter;exports.FiltersDropdown=S.FiltersDropdown;exports.FiltersList=P.FiltersList;exports.FilterGroup=O.FilterGroup;exports.ViewTab=B.ViewTab;exports.CreateView=k.CreateView;exports.EditDropdown=x.EditDropdown;exports.OptionsDropdown=f.OptionsDropdown;exports.PillNotifications=U.PillNotifications;exports.SortableViews=I.SortableViews;exports.UnsavedChangesPill=E.UnsavedChangesPill;exports.ViewDropdowns=G.ViewDropdowns;exports.ViewList=H.ViewList;exports.SHARING_OPTIONS=X.SHARING_OPTIONS;exports.TableManagement=$.TableManagement;exports.DateOptionMap=e.DateOptionMap;exports.DateValue=e.DateValue;exports.FilterChoiceValue=J.FilterChoiceValue;exports.ModalProvider=_.ModalProvider;exports.ModalId=j.ModalId;exports.useModal=W.useModal;exports.withCSRF=z.withCSRF;exports.onlyJSON=r.onlyJSON;exports.vndAPI=r.vndAPI;exports.fetcherV1=i.fetcherV1;exports.fetcherV2=i.fetcherV2;exports.useDropdownManager=K.useDropdownManager;exports.useDuplicateActiveView=Q.useDuplicateActiveView;exports.useFilterArrayLabel=Y.useFilterArrayLabel;exports.useFilterLabel=Z.useFilterLabel;exports.usePersistUnsavedChanges=ee.usePersistUnsavedChanges;exports.useStores=re.useStores;exports.useViews=ie.useViews;exports.useViewUrlChange=te.useViewUrlChange;exports.useCustomViews=se.useCustomViews;exports.useHiddenColumns=oe.useHiddenColumns;exports.Filters=ne.Filters;exports.NumberRangeFilterClass=ae.NumberRangeFilter;exports.RangeFilter=ce.RangeFilter;exports.Views=ue.Views;exports.Notifications=le.Notifications;exports.MobXProvider=Fe.MobXProvider;exports.getAsyncOptions=de.getAsyncOptions;exports.getFetcherFunction=qe.getFetcherFunction;exports.isValidDateRange=ge.isValidDateRange;exports.viewsAdapter=we.viewsAdapter;exports.createAllView=Ae.createAllView;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from './components/TableControls';
7
7
  export * from './components/ToastsManager';
8
8
  export * from './components/Filters';
9
9
  export * from './components/Views';
10
+ export * from './components/TableManagement';
10
11
  export * from './constants';
11
12
  export * from './context';
12
13
  export * from './fetchers';
package/dist/index.js CHANGED
@@ -4,14 +4,14 @@ import { patchCustomView as m } from "./index4.js";
4
4
  import { createCustomView as x } from "./index5.js";
5
5
  import { axios as s } from "./index6.js";
6
6
  import { useBusinessLogic as n } from "./index7.js";
7
- import { BusinessLogicManager as F } from "./index8.js";
7
+ import { BusinessLogicManager as u } from "./index8.js";
8
8
  import { setMockedBusinessLogic as d } from "./index9.js";
9
9
  import { ErrorBoundary as w } from "./index10.js";
10
10
  import { SearchBar as V } from "./index11.js";
11
- import { TableControls as h } from "./index12.js";
12
- import { ToastsManager as b } from "./index13.js";
11
+ import { TableControls as b } from "./index12.js";
12
+ import { ToastsManager as v } from "./index13.js";
13
13
  import { ActiveFilterTag as D } from "./index14.js";
14
- import { ActiveFilters as M } from "./index15.js";
14
+ import { ActiveFilters as y } from "./index15.js";
15
15
  import { FilterArrayField as T } from "./index16.js";
16
16
  import { FilterField as P } from "./index17.js";
17
17
  import { ActiveFilterArrayTag as O } from "./index18.js";
@@ -31,42 +31,44 @@ import { FiltersList as mr } from "./index31.js";
31
31
  import { FilterGroup as xr } from "./index32.js";
32
32
  import { ViewTab as sr } from "./index33.js";
33
33
  import { CreateView as nr } from "./index34.js";
34
- import { EditDropdown as Fr } from "./index35.js";
34
+ import { EditDropdown as ur } from "./index35.js";
35
35
  import { OptionsDropdown as dr } from "./index36.js";
36
36
  import { PillNotifications as wr } from "./index37.js";
37
37
  import { SortableViews as Vr } from "./index38.js";
38
- import { UnsavedChangesPill as hr } from "./index39.js";
39
- import { ViewDropdowns as br } from "./index40.js";
38
+ import { UnsavedChangesPill as br } from "./index39.js";
39
+ import { ViewDropdowns as vr } from "./index40.js";
40
40
  import { ViewList as Dr } from "./index41.js";
41
- import { SHARING_OPTIONS as Mr } from "./index42.js";
42
- import { DateOptionMap as Tr, DateValue as Lr } from "./index43.js";
43
- import { FilterChoiceValue as Sr } from "./index44.js";
44
- import { ModalProvider as Br } from "./index45.js";
45
- import { ModalId as Ir } from "./index46.js";
46
- import { useModal as Er } from "./index47.js";
47
- import { withCSRF as Hr } from "./index48.js";
48
- import { onlyJSON as Xr, vndAPI as _r } from "./index49.js";
49
- import { fetcherV1 as qr, fetcherV2 as zr } from "./index50.js";
50
- import { useDropdownManager as Qr } from "./index51.js";
51
- import { useDuplicateActiveView as Yr } from "./index52.js";
52
- import { useFilterArrayLabel as $r } from "./index53.js";
53
- import { useFilterLabel as ee } from "./index54.js";
54
- import { usePersistUnsavedChanges as te } from "./index55.js";
55
- import { useStores as pe } from "./index56.js";
56
- import { useViews as fe } from "./index57.js";
57
- import { useViewUrlChange as ae } from "./index58.js";
58
- import { useCustomViews as le } from "./index59.js";
59
- import { Filters as ce } from "./index60.js";
60
- import { NumberRangeFilter as ue } from "./index61.js";
61
- import { RangeFilter as ge } from "./index62.js";
62
- import { Views as Ae } from "./index63.js";
63
- import { Notifications as Ce } from "./index64.js";
64
- import { MobXProvider as ve } from "./index65.js";
65
- import { getAsyncOptions as Re } from "./index66.js";
66
- import { getFetcherFunction as ye } from "./index67.js";
67
- import { isValidDateRange as Ne } from "./index68.js";
68
- import { viewsAdapter as Le } from "./index69.js";
69
- import { createAllView as Se } from "./index70.js";
41
+ import { SHARING_OPTIONS as yr } from "./index42.js";
42
+ import { TableManagement as Tr } from "./index43.js";
43
+ import { DateOptionMap as Pr, DateValue as Sr } from "./index44.js";
44
+ import { FilterChoiceValue as Br } from "./index45.js";
45
+ import { ModalProvider as Ir } from "./index46.js";
46
+ import { ModalId as Er } from "./index47.js";
47
+ import { useModal as Hr } from "./index48.js";
48
+ import { withCSRF as Xr } from "./index49.js";
49
+ import { onlyJSON as jr, vndAPI as qr } from "./index50.js";
50
+ import { fetcherV1 as Kr, fetcherV2 as Qr } from "./index51.js";
51
+ import { useDropdownManager as Yr } from "./index52.js";
52
+ import { useDuplicateActiveView as $r } from "./index53.js";
53
+ import { useFilterArrayLabel as ee } from "./index54.js";
54
+ import { useFilterLabel as te } from "./index55.js";
55
+ import { usePersistUnsavedChanges as pe } from "./index56.js";
56
+ import { useStores as fe } from "./index57.js";
57
+ import { useViews as ae } from "./index58.js";
58
+ import { useViewUrlChange as le } from "./index59.js";
59
+ import { useCustomViews as ce } from "./index60.js";
60
+ import { useHiddenColumns as Fe } from "./index61.js";
61
+ import { Filters as ge } from "./index62.js";
62
+ import { NumberRangeFilter as Ae } from "./index63.js";
63
+ import { RangeFilter as Ce } from "./index64.js";
64
+ import { Views as he } from "./index65.js";
65
+ import { Notifications as Re } from "./index66.js";
66
+ import { MobXProvider as Me } from "./index67.js";
67
+ import { getAsyncOptions as Ne } from "./index68.js";
68
+ import { getFetcherFunction as Le } from "./index69.js";
69
+ import { isValidDateRange as Se } from "./index70.js";
70
+ import { viewsAdapter as Be } from "./index71.js";
71
+ import { createAllView as Ie } from "./index72.js";
70
72
  export {
71
73
  G as ActiveAsyncCheckboxFilter,
72
74
  J as ActiveAsyncRadioFilter,
@@ -74,70 +76,72 @@ export {
74
76
  k as ActiveFilterDateRangeTag,
75
77
  U as ActiveFilterNumberRangeTag,
76
78
  D as ActiveFilterTag,
77
- M as ActiveFilters,
79
+ y as ActiveFilters,
78
80
  _ as AsyncCheckboxFilter,
79
81
  q as AsyncRadioFilter,
80
- F as BusinessLogicManager,
82
+ u as BusinessLogicManager,
81
83
  K as CheckboxFilter,
82
84
  nr as CreateView,
83
- Tr as DateOptionMap,
85
+ Pr as DateOptionMap,
84
86
  W as DateRangeFilter,
85
- Lr as DateValue,
86
- Fr as EditDropdown,
87
+ Sr as DateValue,
88
+ ur as EditDropdown,
87
89
  w as ErrorBoundary,
88
90
  T as FilterArrayField,
89
- Sr as FilterChoiceValue,
91
+ Br as FilterChoiceValue,
90
92
  P as FilterField,
91
93
  xr as FilterGroup,
92
- ce as Filters,
94
+ ge as Filters,
93
95
  ir as FiltersDropdown,
94
96
  mr as FiltersList,
95
- ve as MobXProvider,
96
- Ir as ModalId,
97
- Br as ModalProvider,
97
+ Me as MobXProvider,
98
+ Er as ModalId,
99
+ Ir as ModalProvider,
98
100
  Z as MultipleFieldFilter,
99
- Ce as Notifications,
101
+ Re as Notifications,
100
102
  rr as NumberRangeFilter,
101
- ue as NumberRangeFilterClass,
103
+ Ae as NumberRangeFilterClass,
102
104
  dr as OptionsDropdown,
103
105
  wr as PillNotifications,
104
106
  or as RadioFilter,
105
- ge as RangeFilter,
106
- Mr as SHARING_OPTIONS,
107
+ Ce as RangeFilter,
108
+ yr as SHARING_OPTIONS,
107
109
  V as SearchBar,
108
110
  Vr as SortableViews,
109
- h as TableControls,
110
- b as ToastsManager,
111
- hr as UnsavedChangesPill,
112
- br as ViewDropdowns,
111
+ b as TableControls,
112
+ Tr as TableManagement,
113
+ v as ToastsManager,
114
+ br as UnsavedChangesPill,
115
+ vr as ViewDropdowns,
113
116
  Dr as ViewList,
114
117
  sr as ViewTab,
115
- Ae as Views,
118
+ he as Views,
116
119
  s as axios,
117
- Se as createAllView,
120
+ Ie as createAllView,
118
121
  x as createCustomView,
119
122
  o as deleteCustomView,
120
- qr as fetcherV1,
121
- zr as fetcherV2,
122
- Re as getAsyncOptions,
123
- ye as getFetcherFunction,
124
- Ne as isValidDateRange,
125
- Xr as onlyJSON,
123
+ Kr as fetcherV1,
124
+ Qr as fetcherV2,
125
+ Ne as getAsyncOptions,
126
+ Le as getFetcherFunction,
127
+ Se as isValidDateRange,
128
+ jr as onlyJSON,
126
129
  i as patchCurrentUser,
127
130
  m as patchCustomView,
128
131
  d as setMockedBusinessLogic,
129
132
  n as useBusinessLogic,
130
- le as useCustomViews,
131
- Qr as useDropdownManager,
132
- Yr as useDuplicateActiveView,
133
- $r as useFilterArrayLabel,
134
- ee as useFilterLabel,
135
- Er as useModal,
136
- te as usePersistUnsavedChanges,
137
- pe as useStores,
138
- ae as useViewUrlChange,
139
- fe as useViews,
140
- Le as viewsAdapter,
141
- _r as vndAPI,
142
- Hr as withCSRF
133
+ ce as useCustomViews,
134
+ Yr as useDropdownManager,
135
+ $r as useDuplicateActiveView,
136
+ ee as useFilterArrayLabel,
137
+ te as useFilterLabel,
138
+ Fe as useHiddenColumns,
139
+ Hr as useModal,
140
+ pe as usePersistUnsavedChanges,
141
+ fe as useStores,
142
+ le as useViewUrlChange,
143
+ ae as useViews,
144
+ Be as viewsAdapter,
145
+ qr as vndAPI,
146
+ Xr as withCSRF
143
147
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),b=require("@dnd-kit/sortable"),w=({items:d,setItems:g})=>{const[C,i]=O.useState(null),[h,v]=O.useState(null),s=n=>{var e;return n&&(n.id in d?n.id:(e=n==null?void 0:n.data.current)==null?void 0:e.sortable.containerId)};return{activeId:C,handleDragStart:n=>{const{active:e}=n;i(e.id),v(d)},handleDragOver:n=>{const{active:e,over:t}=n,o=t==null?void 0:t.id;if(o==null)return;const c=s(t),a=s(e);!c||!a||a!==c&&g(r=>{const u=r[a],l=r[c],D=l.indexOf(o),S=u.indexOf(e.id);let f;if(o in r)f=l.length+1;else{const I=t&&e.rect.current.translated&&e.rect.current.translated.top>t.rect.top+t.rect.height?1:0;f=D>=0?D+I:l.length+1}return{...r,[a]:r[a].filter(x=>x!==e.id),[c]:[...r[c].slice(0,f),r[a][S],...r[c].slice(f,r[c].length)]}})},handleDragEnd:n=>{const{active:e,over:t}=n,o=s(e);if(!o){i(null);return}const c=t==null?void 0:t.id;if(c==null){i(null);return}const a=s(t);if(a){const r=d[o].indexOf(e.id),u=d[a].indexOf(c);r!==u&&g(l=>({...l,[a]:b.arrayMove(l[a],r,u)}))}i(null)},handleDragCancel:()=>{h&&g(h),i(null),v(null)}}};exports.useDragHandlers=w;
@@ -0,0 +1,66 @@
1
+ import { useState as C } from "react";
2
+ import { arrayMove as S } from "@dnd-kit/sortable";
3
+ const M = ({ items: d, setItems: g }) => {
4
+ const [O, i] = C(null), [h, v] = C(null), s = (n) => {
5
+ var t;
6
+ return n && (n.id in d ? n.id : (t = n == null ? void 0 : n.data.current) == null ? void 0 : t.sortable.containerId);
7
+ };
8
+ return {
9
+ activeId: O,
10
+ handleDragStart: (n) => {
11
+ const { active: t } = n;
12
+ i(t.id), v(d);
13
+ },
14
+ handleDragOver: (n) => {
15
+ const { active: t, over: e } = n, a = e == null ? void 0 : e.id;
16
+ if (a == null) return;
17
+ const c = s(e), o = s(t);
18
+ !c || !o || o !== c && g((r) => {
19
+ const u = r[o], l = r[c], x = l.indexOf(a), I = u.indexOf(t.id);
20
+ let f;
21
+ if (a in r)
22
+ f = l.length + 1;
23
+ else {
24
+ const w = e && t.rect.current.translated && t.rect.current.translated.top > e.rect.top + e.rect.height ? 1 : 0;
25
+ f = x >= 0 ? x + w : l.length + 1;
26
+ }
27
+ return {
28
+ ...r,
29
+ [o]: r[o].filter((D) => D !== t.id),
30
+ [c]: [
31
+ ...r[c].slice(0, f),
32
+ r[o][I],
33
+ ...r[c].slice(f, r[c].length)
34
+ ]
35
+ };
36
+ });
37
+ },
38
+ handleDragEnd: (n) => {
39
+ const { active: t, over: e } = n, a = s(t);
40
+ if (!a) {
41
+ i(null);
42
+ return;
43
+ }
44
+ const c = e == null ? void 0 : e.id;
45
+ if (c == null) {
46
+ i(null);
47
+ return;
48
+ }
49
+ const o = s(e);
50
+ if (o) {
51
+ const r = d[a].indexOf(t.id), u = d[o].indexOf(c);
52
+ r !== u && g((l) => ({
53
+ ...l,
54
+ [o]: S(l[o], r, u)
55
+ }));
56
+ }
57
+ i(null);
58
+ },
59
+ handleDragCancel: () => {
60
+ h && g(h), i(null), v(null);
61
+ }
62
+ };
63
+ };
64
+ export {
65
+ M as useDragHandlers
66
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),n=require("@dnd-kit/core"),a=({items:i})=>{const o=u.useRef(null);return{collisionDetectionStrategy:u.useCallback(t=>{var c;const r=n.pointerWithin(t),d=r.length>0?r:n.rectIntersection(t);let e=n.getFirstCollision(d,"id");if(e!=null){if(e in i){const l=i[e];l.length>0&&(e=((c=n.closestCenter({...t,droppableContainers:t.droppableContainers.filter(s=>s.id!==e&&l.includes(s.id))})[0])==null?void 0:c.id)??e)}return o.current=e,[{id:e}]}return o.current?[{id:o.current}]:[]},[i])}};exports.useCollisionDetectionStrategy=a;
@@ -0,0 +1,32 @@
1
+ import { useRef as u, useCallback as d } from "react";
2
+ import { pointerWithin as p, rectIntersection as a, getFirstCollision as f, closestCenter as C } from "@dnd-kit/core";
3
+ const h = ({ items: n }) => {
4
+ const i = u(null);
5
+ return { collisionDetectionStrategy: d(
6
+ (e) => {
7
+ var r;
8
+ const o = p(e), s = o.length > 0 ? (
9
+ // If there are droppables intersecting with the pointer, return those
10
+ o
11
+ ) : a(e);
12
+ let t = f(s, "id");
13
+ if (t != null) {
14
+ if (t in n) {
15
+ const l = n[t];
16
+ l.length > 0 && (t = ((r = C({
17
+ ...e,
18
+ droppableContainers: e.droppableContainers.filter(
19
+ (c) => c.id !== t && l.includes(c.id)
20
+ )
21
+ })[0]) == null ? void 0 : r.id) ?? t);
22
+ }
23
+ return i.current = t, [{ id: t }];
24
+ }
25
+ return i.current ? [{ id: i.current }] : [];
26
+ },
27
+ [n]
28
+ ) };
29
+ };
30
+ export {
31
+ h as useCollisionDetectionStrategy
32
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("styled-components"),e=require("@veeqo/ui"),a=t=>t&&t.__esModule?t:{default:t},i=a(o),s=i.default(e.BaseContainer)`
2
+ padding: ${e.theme.sizes.sm};
3
+ // This calculation limits the height to a max of 100% of the viewport and uses offset as the position of the CTA button
4
+ // with an additional sizes.base offset at the bottom.
5
+ max-height: calc(100vh ${({offset:t})=>t&&`- ${t}px`} - ${e.theme.sizes.base});
6
+ overflow-y: auto;
7
+ `;exports.AdaptiveStyledContainer=s;
@@ -0,0 +1,12 @@
1
+ import o from "styled-components";
2
+ import { theme as e, BaseContainer as i } from "@veeqo/ui";
3
+ const h = o(i)`
4
+ padding: ${e.sizes.sm};
5
+ // This calculation limits the height to a max of 100% of the viewport and uses offset as the position of the CTA button
6
+ // with an additional sizes.base offset at the bottom.
7
+ max-height: calc(100vh ${({ offset: t }) => t && `- ${t}px`} - ${e.sizes.base});
8
+ overflow-y: auto;
9
+ `;
10
+ export {
11
+ h as AdaptiveStyledContainer
12
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react");const n=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:r}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:r}=t;return"scaleX("+e+") scaleY("+r+")"}},Transform:{toString(t){if(t)return[n.Translate.toString(t),n.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:r,easing:i}=t;return e+" "+r+"ms "+i}}});exports.CSS=n;
@@ -0,0 +1,44 @@
1
+ import "react";
2
+ const n = /* @__PURE__ */ Object.freeze({
3
+ Translate: {
4
+ toString(t) {
5
+ if (!t)
6
+ return;
7
+ const {
8
+ x: r,
9
+ y: e
10
+ } = t;
11
+ return "translate3d(" + (r ? Math.round(r) : 0) + "px, " + (e ? Math.round(e) : 0) + "px, 0)";
12
+ }
13
+ },
14
+ Scale: {
15
+ toString(t) {
16
+ if (!t)
17
+ return;
18
+ const {
19
+ scaleX: r,
20
+ scaleY: e
21
+ } = t;
22
+ return "scaleX(" + r + ") scaleY(" + e + ")";
23
+ }
24
+ },
25
+ Transform: {
26
+ toString(t) {
27
+ if (t)
28
+ return [n.Translate.toString(t), n.Scale.toString(t)].join(" ");
29
+ }
30
+ },
31
+ Transition: {
32
+ toString(t) {
33
+ let {
34
+ property: r,
35
+ duration: e,
36
+ easing: i
37
+ } = t;
38
+ return r + " " + e + "ms " + i;
39
+ }
40
+ }
41
+ });
42
+ export {
43
+ n as CSS
44
+ };