@axinom/mosaic-ui 0.35.0-rc.0 → 0.35.0-rc.10

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 (73) hide show
  1. package/dist/components/DynamicDataList/DynamicDataList.d.ts +5 -14
  2. package/dist/components/DynamicDataList/DynamicDataList.d.ts.map +1 -1
  3. package/dist/components/DynamicDataList/DynamicListDataEntry/DynamicListDataEntry.d.ts +3 -1
  4. package/dist/components/DynamicDataList/DynamicListDataEntry/DynamicListDataEntry.d.ts.map +1 -1
  5. package/dist/components/DynamicDataList/DynamicListHeader/DynamicListHeader.d.ts +5 -1
  6. package/dist/components/DynamicDataList/DynamicListHeader/DynamicListHeader.d.ts.map +1 -1
  7. package/dist/components/DynamicDataList/DynamicListRow/DynamicListRow.d.ts +9 -10
  8. package/dist/components/DynamicDataList/DynamicListRow/DynamicListRow.d.ts.map +1 -1
  9. package/dist/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.actions.d.ts +5 -0
  10. package/dist/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.actions.d.ts.map +1 -0
  11. package/dist/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.d.ts +4 -0
  12. package/dist/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.d.ts.map +1 -0
  13. package/dist/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.init.d.ts +4 -0
  14. package/dist/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.init.d.ts.map +1 -0
  15. package/dist/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.types.d.ts +38 -0
  16. package/dist/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.types.d.ts.map +1 -0
  17. package/dist/components/DynamicDataList/helpers/DynamicListReducer/index.d.ts +4 -0
  18. package/dist/components/DynamicDataList/helpers/DynamicListReducer/index.d.ts.map +1 -0
  19. package/dist/components/DynamicDataList/helpers/generateId.d.ts +6 -0
  20. package/dist/components/DynamicDataList/helpers/generateId.d.ts.map +1 -0
  21. package/dist/components/DynamicDataList/helpers/useColumnDefs.d.ts +14 -0
  22. package/dist/components/DynamicDataList/helpers/useColumnDefs.d.ts.map +1 -0
  23. package/dist/components/DynamicDataList/helpers/useDataHandler.d.ts +9 -0
  24. package/dist/components/DynamicDataList/helpers/useDataHandler.d.ts.map +1 -0
  25. package/dist/components/DynamicDataList/helpers/useRowAnimation.d.ts +12 -0
  26. package/dist/components/DynamicDataList/helpers/useRowAnimation.d.ts.map +1 -0
  27. package/dist/components/DynamicDataList/index.d.ts +1 -1
  28. package/dist/components/DynamicDataList/index.d.ts.map +1 -1
  29. package/dist/components/List/ListRow/ListRow.d.ts.map +1 -1
  30. package/dist/components/List/useColumnsSize.d.ts +1 -0
  31. package/dist/components/List/useColumnsSize.d.ts.map +1 -1
  32. package/dist/index.es.js +11 -3
  33. package/dist/index.es.js.map +1 -1
  34. package/dist/index.js +11 -3
  35. package/dist/index.js.map +1 -1
  36. package/package.json +5 -3
  37. package/src/components/DynamicDataList/DynamicDataList.scss +0 -61
  38. package/src/components/DynamicDataList/DynamicDataList.spec.tsx +126 -393
  39. package/src/components/DynamicDataList/DynamicDataList.stories.tsx +0 -5
  40. package/src/components/DynamicDataList/DynamicDataList.tsx +133 -600
  41. package/src/components/DynamicDataList/DynamicListDataEntry/DynamicListDataEntry.scss +4 -2
  42. package/src/components/DynamicDataList/DynamicListDataEntry/DynamicListDataEntry.spec.tsx +17 -44
  43. package/src/components/DynamicDataList/DynamicListDataEntry/DynamicListDataEntry.tsx +15 -22
  44. package/src/components/DynamicDataList/DynamicListHeader/DynamicListHeader.scss +15 -10
  45. package/src/components/DynamicDataList/DynamicListHeader/DynamicListHeader.spec.tsx +4 -1
  46. package/src/components/DynamicDataList/DynamicListHeader/DynamicListHeader.tsx +16 -14
  47. package/src/components/DynamicDataList/DynamicListRow/DynamicListRow.scss +16 -24
  48. package/src/components/DynamicDataList/DynamicListRow/DynamicListRow.spec.tsx +26 -253
  49. package/src/components/DynamicDataList/DynamicListRow/DynamicListRow.tsx +45 -139
  50. package/src/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.actions.spec.ts +276 -0
  51. package/src/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.actions.ts +86 -0
  52. package/src/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.init.spec.ts +118 -0
  53. package/src/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.init.ts +40 -0
  54. package/src/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.spec.ts +89 -0
  55. package/src/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.ts +42 -0
  56. package/src/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.types.ts +46 -0
  57. package/src/components/DynamicDataList/helpers/DynamicListReducer/index.ts +3 -0
  58. package/src/components/DynamicDataList/helpers/generateId.ts +10 -0
  59. package/src/components/DynamicDataList/helpers/useColumnDefs.ts +56 -0
  60. package/src/components/DynamicDataList/helpers/useDataHandler.ts +77 -0
  61. package/src/components/DynamicDataList/helpers/useRowAnimation.tsx +38 -0
  62. package/src/components/DynamicDataList/index.ts +2 -2
  63. package/src/components/FormElements/BooleanView/BooleanViewField.scss +2 -2
  64. package/src/components/FormStation/FormStation.scss +4 -0
  65. package/src/components/FormStation/FormStation.tsx +2 -2
  66. package/src/components/List/List.tsx +1 -1
  67. package/src/components/List/ListRow/ListRow.tsx +56 -50
  68. package/src/components/List/ListRow/Renderers/BooleanDotRenderer/BooleanDotRenderer.scss +6 -9
  69. package/src/components/List/ListRow/Renderers/BooleanDotRenderer/BooleanDotRenderer.spec.tsx +2 -2
  70. package/src/components/List/ListRow/Renderers/BooleanDotRenderer/BooleanDotRenderer.tsx +1 -1
  71. package/src/components/List/useColumnsSize.ts +20 -3
  72. package/src/styles/variables.scss +0 -5
  73. package/src/components/DynamicDataList/DynamicDataList.reposition.spec.tsx +0 -816
@@ -3,7 +3,7 @@ import { OptionalObjectSchema } from 'yup/lib/object';
3
3
  import { Data } from '../../types/data';
4
4
  import { ActionData } from '../Actions';
5
5
  import { ObjectSchemaDefinition } from '../FormStation';
6
- import { DynamicListColumn, DynamicListElevationOptions } from './DynamicDataList.model';
6
+ import { DynamicListColumn } from './DynamicDataList.model';
7
7
  import { DynamicListDataEntryProps } from './DynamicListDataEntry/DynamicListDataEntry';
8
8
  export interface DynamicDataListProps<T extends Data> {
9
9
  /**
@@ -21,7 +21,7 @@ export interface DynamicDataListProps<T extends Data> {
21
21
  minimumWidth?: string;
22
22
  /** Header row height */
23
23
  headerRowHeight?: string;
24
- /** List row height */
24
+ /** List row height (minimum height is 50px) */
25
25
  listRowHeight?: string;
26
26
  /** List row action button and checkbox size (default: '50px') */
27
27
  listRowActionSize?: string;
@@ -31,15 +31,13 @@ export interface DynamicDataListProps<T extends Data> {
31
31
  horizontalTextAlign?: 'left' | 'right' | 'center';
32
32
  /** Vertical alignment of text */
33
33
  verticalTextAlign?: 'start' | 'center' | 'end';
34
- /** If set, indicates the component has an error and will display this prop as the error message (not implemented yet) */
35
- error?: string | undefined;
36
34
  /** Property that contains the value used in reordering the list (default: undefined) */
37
35
  positionPropertyName?: keyof T;
38
36
  /** If sets, sets the label for the position column (default: 'Position') */
39
37
  positionLabel?: string;
40
38
  /** Whether or not rows can be repositioned (default: true) */
41
39
  allowReordering?: boolean;
42
- /** Determines if the Add and Delete action buttons are rendered (default: true) */
40
+ /** @deprecated Determines if the Add and Delete action buttons are rendered (default: true) */
43
41
  allowAddAndRemove?: boolean;
44
42
  /** Determines if data rows can be dragged for repositioning (default: true) */
45
43
  allowRowDragging?: boolean;
@@ -67,6 +65,7 @@ export interface DynamicDataListProps<T extends Data> {
67
65
  rowClassNameProvider?: (data: T) => string;
68
66
  /** Raised when the list has changed */
69
67
  onChange?: (list: T[]) => void;
68
+ /** Provide inline actions which are available through '...' context menu */
70
69
  inlineMenuActions?: (data: T) => ActionData[];
71
70
  }
72
71
  /**
@@ -78,13 +77,5 @@ export interface DynamicDataListProps<T extends Data> {
78
77
  * onChange={list => console.log(list)}
79
78
  * />
80
79
  */
81
- export declare const DynamicDataList: <T extends Data>({ columns, value, error, showHeader, minimumWidth, columnGap, rowGap, headerRowHeight, listRowHeight, listRowActionSize, horizontalTextAlign, verticalTextAlign, positionPropertyName, positionLabel, allowReordering, allowAddAndRemove, allowRowDragging, allowNewData, customDataEntry: CustomDataEntry, maxItemLimit, rowValidationSchema, defaultValuesForNewData, stickyHeader, disabled, className, onChange, onAddTransformData, rowClassNameProvider, inlineMenuActions, }: React.PropsWithChildren<DynamicDataListProps<T>>) => JSX.Element;
82
- export declare const calculateNewList: <T>(list: T[], posKey: keyof T, currentRowPosition: number, newPosition: number, eventType: 'drag' | 'input', elevation?: DynamicListElevationOptions) => T[];
83
- /**
84
- * Responsible for removing an item from the list and updating all subsequent item's positions
85
- * @param list list array
86
- * @param posKey position
87
- * @param idx index of the item being removed
88
- */
89
- export declare const removeItemFromList: <T>(list: T[], posKey: keyof T, idx: number) => T[];
80
+ export declare const DynamicDataList: <T extends Data>({ columns, value, showHeader, minimumWidth, columnGap, rowGap, headerRowHeight, listRowHeight, listRowActionSize, horizontalTextAlign, verticalTextAlign, positionPropertyName, positionLabel, allowReordering, allowRowDragging, allowNewData, customDataEntry: CustomDataEntry, maxItemLimit, rowValidationSchema, defaultValuesForNewData, stickyHeader, disabled, className, onChange, onAddTransformData, rowClassNameProvider, inlineMenuActions, }: React.PropsWithChildren<DynamicDataListProps<T>>) => JSX.Element;
90
81
  //# sourceMappingURL=DynamicDataList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicDataList.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicDataList/DynamicDataList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAA+B,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,IA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C9D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,+FAA+F;IAC/F,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4DAA4D;IAC5D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oGAAoG;IACpG,eAAe,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC;IACzD,6DAA6D;IAC7D,mBAAmB,CAAC,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtE,mFAAmF;IACnF,uBAAuB,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACrC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kEAAkE;IAClE,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC7C,sFAAsF;IACtF,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAC3C,uCAAuC;IACvC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IAC/B,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,UAAU,EAAE,CAAC;CAC/C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,mgBA4BoB,WAuL/C,CAAC"}
@@ -43,10 +43,12 @@ export interface DynamicListDataEntryProps<T extends Data> {
43
43
  sticky?: boolean;
44
44
  /** If header is shown */
45
45
  showHeader?: boolean;
46
+ /** If set to true, the position column will be shown (default: false) */
47
+ showPositionColumn?: boolean;
46
48
  /** Emits when the action button is clicked. Data is supplied as a parameter */
47
49
  onActionClicked?: (data: T) => void;
48
50
  /** override default add button (+) */
49
51
  customAddButton?: (onAddItem: () => Promise<void>) => ReactElement;
50
52
  }
51
- export declare const DynamicListDataEntry: <T extends Data>({ columns, columnSizes, columnGap, rowHeight, actionSize, horizontalTextAlign, verticalTextAlign, positionKey, allowAdd, disabled, allowReordering, allowDragging, newDataPosition, rowValidationSchema, defaultValuesForNewData, actionButtonContext, className, sticky, showHeader, onActionClicked, customAddButton, }: React.PropsWithChildren<DynamicListDataEntryProps<T>>) => JSX.Element;
53
+ export declare const DynamicListDataEntry: <T extends Data>({ columns, columnSizes, columnGap, rowHeight, actionSize, horizontalTextAlign, verticalTextAlign, positionKey, allowAdd, disabled, allowReordering, allowDragging, newDataPosition, rowValidationSchema, defaultValuesForNewData, actionButtonContext, className, sticky, showHeader, showPositionColumn, onActionClicked, customAddButton, }: React.PropsWithChildren<DynamicListDataEntryProps<T>>) => JSX.Element;
52
54
  //# sourceMappingURL=DynamicListDataEntry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicListDataEntry.d.ts","sourceRoot":"","sources":["../../../../src/components/DynamicDataList/DynamicListDataEntry/DynamicListDataEntry.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EACZ,iBAAiB,EACjB,YAAY,EAGb,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAK7D,MAAM,WAAW,yBAAyB,CAAC,CAAC,SAAS,IAAI;IACvD,4BAA4B;IAC5B,OA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M,OAAO,CAAC,IAAI,CAAC,KAAK,YAAY,CAAC;CACpE;AAED,eAAO,MAAM,oBAAoB,wYAsBoB,WAyKpD,CAAC"}
1
+ {"version":3,"file":"DynamicListDataEntry.d.ts","sourceRoot":"","sources":["../../../../src/components/DynamicDataList/DynamicListDataEntry/DynamicListDataEntry.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EACZ,iBAAiB,EACjB,YAAY,EAGb,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAK7D,MAAM,WAAW,yBAAyB,CAAC,CAAC,SAAS,IAAI;IACvD,4BAA4B;IAC5B,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAChC,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAClD,iCAAiC;IACjC,iBAAiB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC/C,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACtB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6FAA6F;IAC7F,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yEAAyE;IACzE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yCAAyC;IACzC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6DAA6D;IAC7D,mBAAmB,CAAC,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtE,mFAAmF;IACnF,uBAAuB,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACrC,2DAA2D;IAC3D,mBAAmB,CAAC,EAAE,aAAa,CAAC;IACpC,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yBAAyB;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,+EAA+E;IAC/E,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IACpC,sCAAsC;IACtC,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,YAAY,CAAC;CACpE;AAED,eAAO,MAAM,oBAAoB,4ZAuBoB,WA+JpD,CAAC"}
@@ -24,6 +24,10 @@ export interface DynamicListHeaderProps<T extends Data> {
24
24
  className?: string;
25
25
  /** Whether header should stick to the top (default: true) */
26
26
  sticky?: boolean;
27
+ /** If set to true, the position column will be shown (default: false) */
28
+ showPositionColumn?: boolean;
29
+ /** This will be used to determine the label for the position column if a positionLabel is not defined (default: false) */
30
+ allowDragging?: boolean;
27
31
  }
28
- export declare const DynamicListHeader: <T extends Data>({ columns, columnSizes, columnGap, rowHeight, horizontalTextAlign, verticalTextAlign, allowReordering, positionKey, positionLabel, className, sticky, }: React.PropsWithChildren<DynamicListHeaderProps<T>>) => JSX.Element;
32
+ export declare const DynamicListHeader: <T extends Data>({ columns, columnSizes, columnGap, rowHeight, horizontalTextAlign, verticalTextAlign, positionLabel, className, sticky, showPositionColumn, allowDragging, }: React.PropsWithChildren<DynamicListHeaderProps<T>>) => JSX.Element;
29
33
  //# sourceMappingURL=DynamicListHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicListHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/DynamicDataList/DynamicListHeader/DynamicListHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAI7D,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,IAAI;IACpD,yBAAyB;IACzB,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAChC,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAClD,iCAAiC;IACjC,iBAAiB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC/C,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACtB,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mHAAmH;IACnH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,mOAYoB,WAiDjD,CAAC"}
1
+ {"version":3,"file":"DynamicListHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/DynamicDataList/DynamicListHeader/DynamicListHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAI7D,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,IAAI;IACpD,yBAAyB;IACzB,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAChC,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAClD,iCAAiC;IACjC,iBAAiB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC/C,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACtB,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mHAAmH;IACnH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,0HAA0H;IAC1H,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,iBAAiB,wOAYoB,WA+CjD,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
+ import { DraggableProvided } from 'react-beautiful-dnd';
2
3
  import { Data } from '../../../types/data';
3
4
  import { ActionData } from '../../Actions';
4
- import { DynamicListColumn, DynamicListElevationOptions } from '../DynamicDataList.model';
5
+ import { DynamicListColumn } from '../DynamicDataList.model';
5
6
  export interface DynamicListRowProps<T extends Data> {
6
7
  /** The column definition */
7
8
  columns: DynamicListColumn<T>[];
@@ -21,8 +22,6 @@ export interface DynamicListRowProps<T extends Data> {
21
22
  verticalTextAlign?: 'start' | 'center' | 'end';
22
23
  /** If set to true, the remove action button will be rendered (default: undefined) */
23
24
  allowRemove?: boolean;
24
- /** If set to true, rows can be repositioned using the input field (default: undefined) */
25
- allowReordering?: boolean;
26
25
  /** Property name that is used to determine data position (default: undefined) */
27
26
  positionKey?: keyof T;
28
27
  /** If set to true, this component can be dragged (default: undefined) */
@@ -31,12 +30,10 @@ export interface DynamicListRowProps<T extends Data> {
31
30
  dragging?: boolean;
32
31
  /** Whether or not the DDL is disabled (default: false) */
33
32
  disabled?: boolean;
34
- /** Emits when row dragging event starts. Event and current position are supplied as parameters */
35
- onDragStart?: (e: React.DragEvent<HTMLDivElement>, position: number) => void;
36
- /** Emits when the row has dropped. Event and new position target are supplied as parameters */
37
- onDrop?: (e: React.DragEvent<HTMLDivElement>, newPosition: number, elevation: DynamicListElevationOptions) => void;
38
- /** Emits when row dragging event ends. Event and data as supplied as parameters */
39
- onDragEnd?: (e: React.DragEvent<HTMLDivElement>) => void;
33
+ /** If set to true, the position column will be shown (default: false) */
34
+ showPositionColumn?: boolean;
35
+ /** If set to true, the action column will be shown (default: false) */
36
+ showActionColumn?: boolean;
40
37
  /** Emits when the position input has changed. Row data and the new position is supplied */
41
38
  onPositionInputChanged?: (currenPosition: number, newPosition: number) => void;
42
39
  /** Emits when the action button is clicked. Data is supplied as a parameter */
@@ -45,7 +42,9 @@ export interface DynamicListRowProps<T extends Data> {
45
42
  className?: string;
46
43
  /** CSS Class name provider for each row. Allows row style to be determined by data */
47
44
  rowClassNameProvider?: (data: T) => string;
45
+ /** Provide inline actions which are available through '...' context menu */
48
46
  inlineMenuActions?: (data: T) => ActionData[];
47
+ provided?: DraggableProvided;
49
48
  }
50
- export declare const DynamicListRow: <T extends Data>({ columns, data, columnSizes, columnGap, rowHeight, actionSize, horizontalTextAlign, verticalTextAlign, allowRemove, allowReordering, positionKey, allowDragging, dragging, disabled, onDragStart, onDrop, onDragEnd, onPositionInputChanged, onActionClicked, className, rowClassNameProvider, inlineMenuActions, }: React.PropsWithChildren<DynamicListRowProps<T>>) => JSX.Element;
49
+ export declare const DynamicListRow: <T extends Data>({ columns, data, columnSizes, columnGap, rowHeight, actionSize, horizontalTextAlign, verticalTextAlign, allowRemove, positionKey, allowDragging, disabled, provided, onPositionInputChanged, onActionClicked, className, rowClassNameProvider, inlineMenuActions, dragging, showPositionColumn, showActionColumn, }: React.PropsWithChildren<DynamicListRowProps<T>>) => JSX.Element;
51
50
  //# sourceMappingURL=DynamicListRow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicListRow.d.ts","sourceRoot":"","sources":["../../../../src/components/DynamicDataList/DynamicListRow/DynamicListRow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,EACL,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AAKlC,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,IAAI;IACjD,4BAA4B;IAC5B,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAChC,gBAAgB;IAChB,IAAI,EAAE,CAAC,CAAC;IACR,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,mBA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KAAK,UAAU,EAAE,CAAC;CAC/C;AAED,eAAO,MAAM,cAAc,6XAuBoB,WAiN9C,CAAC"}
1
+ {"version":3,"file":"DynamicListRow.d.ts","sourceRoot":"","sources":["../../../../src/components/DynamicDataList/DynamicListRow/DynamicListRow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAK7D,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,IAAI;IACjD,4BAA4B;IAC5B,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAChC,gBAAgB;IAChB,IAAI,EAAE,CAAC,CAAC;IACR,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAClD,iCAAiC;IACjC,iBAAiB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC/C,qFAAqF;IACrF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACtB,yEAAyE;IACzE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,2FAA2F;IAC3F,sBAAsB,CAAC,EAAE,CACvB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,KAChB,IAAI,CAAC;IACV,+EAA+E;IAC/E,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IACpC,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAC3C,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,UAAU,EAAE,CAAC;IAC9C,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B;AAED,eAAO,MAAM,cAAc,4XAsBoB,WAmI9C,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Data } from '../../../../types';
2
+ import { DynamicListReducerState } from './DynamicListReducer.types';
3
+ export declare const addItem: <T extends Data>(item: T, items: T[], positionPropertyName: keyof T | undefined) => T[];
4
+ export declare const removeItem: <T extends Data>(item: T, items: T[], positionPropertyName: keyof T | undefined) => T[];
5
+ //# sourceMappingURL=DynamicListReducer.actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DynamicListReducer.actions.d.ts","sourceRoot":"","sources":["../../../../../src/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE,eAAO,MAAM,OAAO,yFAqCnB,CAAC;AAEF,eAAO,MAAM,UAAU,yFAkCtB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Data } from '../../../../types';
2
+ import { DynamicListReducerAction, DynamicListReducerState } from './DynamicListReducer.types';
3
+ export declare const DynamicListReducer: <T extends Data>(state: DynamicListReducerState<T>, action: DynamicListReducerAction<T>) => DynamicListReducerState<T>;
4
+ //# sourceMappingURL=DynamicListReducer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DynamicListReducer.d.ts","sourceRoot":"","sources":["../../../../../src/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGzC,OAAO,EACL,wBAAwB,EAExB,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,kBAAkB,wHAgC9B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Data } from '../../../../types';
2
+ import { DynamicListReducerInitArgs, DynamicListReducerState } from './DynamicListReducer.types';
3
+ export declare const DynamicListReducerInit: <T extends Data>(args: DynamicListReducerInitArgs<T>) => DynamicListReducerState<T>;
4
+ //# sourceMappingURL=DynamicListReducer.init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DynamicListReducer.init.d.ts","sourceRoot":"","sources":["../../../../../src/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,sBAAsB,qFAiClC,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { Data } from '../../../../types';
2
+ export interface DynamicListReducerInitArgs<T extends Data> {
3
+ initialValue: T[];
4
+ positionPropertyName: keyof T | undefined;
5
+ maxItemLimit: number | undefined;
6
+ allowNewData: boolean;
7
+ }
8
+ export declare enum DynamicListReducerActionType {
9
+ Add = "add",
10
+ Remove = "remove",
11
+ Reset = "reset"
12
+ }
13
+ export type DynamicListReducerAction<T extends Data> = DynamicListReducerAddAction<T> | DynamicListReducerRemoveAction<T> | DynamicListReducerResetAction<T>;
14
+ interface DynamicListReducerAddAction<T extends Data> {
15
+ type: DynamicListReducerActionType.Add;
16
+ item: T;
17
+ }
18
+ interface DynamicListReducerRemoveAction<T extends Data> {
19
+ type: DynamicListReducerActionType.Remove;
20
+ item: T;
21
+ }
22
+ interface DynamicListReducerResetAction<T extends Data> {
23
+ type: DynamicListReducerActionType.Reset;
24
+ items: T[];
25
+ allowNewData: boolean;
26
+ maxItemLimit: number | undefined;
27
+ positionPropertyName: keyof T | undefined;
28
+ }
29
+ export interface DynamicListReducerState<T extends Data> {
30
+ items: T[];
31
+ nextPosition: number;
32
+ canAddItems: boolean;
33
+ positionPropertyName: keyof T | undefined;
34
+ maxItemLimit: number | undefined;
35
+ allowNewData: boolean;
36
+ }
37
+ export {};
38
+ //# sourceMappingURL=DynamicListReducer.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DynamicListReducer.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/DynamicDataList/helpers/DynamicListReducer/DynamicListReducer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,WAAW,0BAA0B,CAAC,CAAC,SAAS,IAAI;IACxD,YAAY,EAAE,CAAC,EAAE,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAC1C,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,oBAAY,4BAA4B;IACtC,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,IAAI,IAC/C,2BAA2B,CAAC,CAAC,CAAC,GAC9B,8BAA8B,CAAC,CAAC,CAAC,GACjC,6BAA6B,CAAC,CAAC,CAAC,CAAC;AAErC,UAAU,2BAA2B,CAAC,CAAC,SAAS,IAAI;IAClD,IAAI,EAAE,4BAA4B,CAAC,GAAG,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC;CACT;AAED,UAAU,8BAA8B,CAAC,CAAC,SAAS,IAAI;IACrD,IAAI,EAAE,4BAA4B,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC;CACT;AAED,UAAU,6BAA6B,CAAC,CAAC,SAAS,IAAI;IACpD,IAAI,EAAE,4BAA4B,CAAC,KAAK,CAAC;IACzC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,oBAAoB,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;CAC3C;AAED,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,IAAI;IACrD,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAC1C,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,YAAY,EAAE,OAAO,CAAC;CACvB"}
@@ -0,0 +1,4 @@
1
+ export { DynamicListReducer } from './DynamicListReducer';
2
+ export { DynamicListReducerInit } from './DynamicListReducer.init';
3
+ export * from './DynamicListReducer.types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DynamicDataList/helpers/DynamicListReducer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A simple UUID generator. This is not a cryptographically secure generator.
3
+ * @returns UUID
4
+ */
5
+ export declare const uuid: () => string;
6
+ //# sourceMappingURL=generateId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateId.d.ts","sourceRoot":"","sources":["../../../../src/components/DynamicDataList/helpers/generateId.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,IAAI,QAAO,MAKvB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { Data } from '../../../types';
2
+ import { DynamicListColumn } from '../DynamicDataList.model';
3
+ /**
4
+ * Generates a combined string of all columns.columnSize values, to be used as CSS value
5
+ * Also produces property key which is used for positioning
6
+ * @param columns The list of columns that should be used
7
+ * @returns a string that consists of defined column sizes and a position key that maps to a data property
8
+ */
9
+ export declare const useColumnDefs: <T extends Data>(columns: DynamicListColumn<T>[], allowReordering: boolean, allowNewData: boolean, allowRowDragging: boolean, positionKey?: keyof T | undefined, showInlineMenu?: boolean) => {
10
+ readonly columnSizes: string;
11
+ readonly showPositionColumn: boolean;
12
+ readonly showActionColumn: boolean;
13
+ };
14
+ //# sourceMappingURL=useColumnDefs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useColumnDefs.d.ts","sourceRoot":"","sources":["../../../../src/components/DynamicDataList/helpers/useColumnDefs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,aAAa,qEAEP,OAAO,gBACV,OAAO,oBACH,OAAO,sDAER,OAAO;0BAEF,MAAM;iCACC,OAAO;+BACT,OAAO;CAoCnC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Data } from '../../../types';
2
+ export declare const useDataHandler: <T extends Data>(initialValue: T[], positionPropertyName: keyof T | undefined, maxItemLimit: number | undefined, allowNewData: boolean, onChange: (value: T[]) => void, onAddTransformData?: ((data: Partial<T>) => T) | undefined) => {
3
+ readonly items: T[];
4
+ readonly nextPosition: number;
5
+ readonly canAddItems: boolean;
6
+ readonly addItem: (item: T) => void;
7
+ readonly removeItem: (item: T) => void;
8
+ };
9
+ //# sourceMappingURL=useDataHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDataHandler.d.ts","sourceRoot":"","sources":["../../../../src/components/DynamicDataList/helpers/useDataHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAUtC,eAAO,MAAM,cAAc,+FAGX,MAAM,GAAG,SAAS,gBAClB,OAAO,4BACK,IAAI;;2BAIP,MAAM;0BACP,OAAO;mCACE,IAAI;sCACD,IAAI;CAqDvC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { Data } from '../../../types';
3
+ interface RowAnimationProps<T> {
4
+ data: T;
5
+ }
6
+ export declare const useRowAnimation: <T extends Data>() => {
7
+ AnimatedRow: React.FC<RowAnimationProps<T>>;
8
+ setLastAddedItem: React.Dispatch<React.SetStateAction<T | undefined>>;
9
+ setShouldAnimate: React.Dispatch<React.SetStateAction<boolean>>;
10
+ };
11
+ export {};
12
+ //# sourceMappingURL=useRowAnimation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRowAnimation.d.ts","sourceRoot":"","sources":["../../../../src/components/DynamicDataList/helpers/useRowAnimation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,UAAU,iBAAiB,CAAC,CAAC;IAC3B,IAAI,EAAE,CAAC,CAAC;CACT;AAED,eAAO,MAAM,eAAe;;;sBAGR,MAAM,QAAQ,CAAC,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC;CA2BhE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export * from './DynamicDataList';
2
2
  export * from './DynamicDataList.model';
3
3
  export * from './DynamicListDataEntry';
4
- export { createInputRenderer, CreateInputRendererConfig, createSelectRenderer, CreateSelectRendererConfig, } from './DynamicListDataEntry/Renderers';
4
+ export { CreateInputRendererConfig, CreateSelectRendererConfig, createInputRenderer, createSelectRenderer, } from './DynamicListDataEntry/Renderers';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicDataList/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicDataList/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,kCAAkC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ListRow.d.ts","sourceRoot":"","sources":["../../../../src/components/List/ListRow/ListRow.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAGtE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI1D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAIvD,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,IAAI;IAC1C,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC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kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC;IAClE;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,UAAU,EAAE,CAAC;CAC/C;AAMD,eAAO,MAAM,SAAS,WAAY,MAAM,KAAG,IAW1C,CAAC;AA6BF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,oVAoBoB,WA4KvC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { SetStateAction } from 'react';
1
2
  import { Data } from '../../types';
2
3
  import { Column, ListSelectMode } from './List.model';
3
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"useColumnsSize.d.ts","sourceRoot":"","sources":["../../../src/components/List/useColumnsSize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAoDtD;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,2DAEP,OAAO,cACb,cAAc,kBACV,OAAO;iBAEV,MAAM;sBACD,MAAM,IAAI;oBACZ,MAAM,QAAQ,CAAC,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;qBAC3C,OAAO;CAqCzB,CAAC;AACF,iBAAS,eAAe,CACtB,UAAU,EAAE,cAAc,EAC1B,gBAAgB,EAAE,OAAO,EACzB,cAAc,EAAE,OAAO,GACtB,OAAO,CAIT"}
1
+ {"version":3,"file":"useColumnsSize.d.ts","sourceRoot":"","sources":["../../../src/components/List/useColumnsSize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAoDtD;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,2DAEP,OAAO,cACb,cAAc,kBACV,OAAO;iBAEV,MAAM;sBACD,MAAM,IAAI;oBACZ,MAAM,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;qBAC3C,OAAO;CAsDzB,CAAC;AACF,iBAAS,eAAe,CACtB,UAAU,EAAE,cAAc,EAC1B,gBAAgB,EAAE,OAAO,EACzB,cAAc,EAAE,OAAO,GACtB,OAAO,CAIT"}