pixel-react 1.10.5 → 1.10.7

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 (34) hide show
  1. package/lib/components/MenuOption/types.d.ts +1 -1
  2. package/lib/components/Select/components/types.d.ts +6 -1
  3. package/lib/components/Select/types.d.ts +17 -0
  4. package/lib/components/Table/Table.d.ts +1 -1
  5. package/lib/components/Table/Types.d.ts +1 -0
  6. package/lib/index.d.ts +20 -3
  7. package/lib/index.esm.js +245 -93
  8. package/lib/index.esm.js.map +1 -1
  9. package/lib/index.js +245 -93
  10. package/lib/index.js.map +1 -1
  11. package/lib/tsconfig.tsbuildinfo +1 -1
  12. package/lib/utils/getAnchorElement/getAnchorElement.d.ts +1 -0
  13. package/lib/utils/getTreeDetails/getTreeDetails.d.ts +1 -1
  14. package/package.json +1 -1
  15. package/src/components/MenuOption/MenuOption.scss +4 -0
  16. package/src/components/MenuOption/MenuOption.stories.tsx +2 -2
  17. package/src/components/MenuOption/MenuOption.tsx +72 -60
  18. package/src/components/MenuOption/types.ts +1 -1
  19. package/src/components/Select/Select.stories.tsx +43 -1
  20. package/src/components/Select/Select.tsx +16 -1
  21. package/src/components/Select/components/Dropdown.scss +41 -1
  22. package/src/components/Select/components/Dropdown.tsx +52 -6
  23. package/src/components/Select/components/types.ts +7 -2
  24. package/src/components/Select/types.ts +22 -0
  25. package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.tsx +8 -2
  26. package/src/components/SequentialConnectingBranch/components/Branches/Branches.tsx +1 -1
  27. package/src/components/SequentialConnectingBranch/components/DatasetTooltip/DataSetTooltip.scss +14 -0
  28. package/src/components/SequentialConnectingBranch/components/DatasetTooltip/DataSetTooltip.tsx +6 -11
  29. package/src/components/Table/Table.tsx +47 -0
  30. package/src/components/Table/Types.ts +4 -1
  31. package/src/components/TableTree/Components/TableBody.tsx +0 -1
  32. package/src/utils/getAnchorElement/getAnchorElement.ts +7 -0
  33. package/src/utils/getTreeDetails/getTreeDetails.stories.tsx +59 -9
  34. package/src/utils/getTreeDetails/getTreeDetails.ts +66 -13
@@ -173,7 +173,7 @@ interface MenuOptionProps {
173
173
  * @optional
174
174
  */
175
175
  optionCardVariant?: 'primary';
176
- targetRef?: string | React.RefObject<HTMLElement>;
176
+ targetRef?: string | React.RefObject<HTMLElement> | null;
177
177
  treeRowRef?: React.RefObject<any | null>;
178
178
  }
179
179
  interface OptionProps {
@@ -1,5 +1,5 @@
1
1
  import { DropdownPosition, Option } from '../types';
2
- import { RefObject } from 'react';
2
+ import { ReactNode, RefObject } from 'react';
3
3
  export interface DropdownProps {
4
4
  options: Option[];
5
5
  dropdownPosition: DropdownPosition;
@@ -14,6 +14,11 @@ export interface DropdownProps {
14
14
  selectedOption?: Option;
15
15
  showIcon?: boolean;
16
16
  showToolTip?: boolean;
17
+ customReccurenece?: boolean;
18
+ onCancelModal?: () => void;
19
+ onSaveModal?: () => void;
20
+ modalJSXProps?: ReactNode;
21
+ recurrence?: boolean;
17
22
  }
18
23
  export declare const dropdownDefaultCSSData: {
19
24
  margin: number;
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  export interface SelectProps {
2
3
  label?: string;
3
4
  showLabel?: boolean;
@@ -36,6 +37,22 @@ export interface SelectProps {
36
37
  * Provide the background color for the select label on the hover state
37
38
  */
38
39
  labelBackgroundColor?: string;
40
+ /**
41
+ * To close the modal in the select dropdown
42
+ */
43
+ onCancelModal?: () => void;
44
+ /**
45
+ * To close the modal in the select dropdown
46
+ */
47
+ onSaveModal?: () => void;
48
+ /**
49
+ * Pass the custom Jsx for the Modal
50
+ */
51
+ modalJSXProps?: ReactNode;
52
+ /**
53
+ * Pass the recurrence boolean for the exeception cases
54
+ */
55
+ recurrence?: boolean;
39
56
  }
40
57
  export interface DropdownPosition {
41
58
  positionX: number;
@@ -1,4 +1,4 @@
1
1
  import './Table.scss';
2
2
  import { TableProps } from './Types';
3
- declare const Table: ({ data, columns, headerType, withCheckbox, onSelect, allSelected, partialSelected, withFixedHeader, borderWithRadius, headerCheckboxDisabled, noDataContent, height, className, tableHeadClass, tableBodyRowClass, headerTextColor, tableDataTextColor, headerIconName, headerIconOnClick, draggable, onDragEnd, }: TableProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const Table: ({ data, columns, headerType, withCheckbox, onSelect, allSelected, partialSelected, withFixedHeader, borderWithRadius, headerCheckboxDisabled, noDataContent, height, className, tableHeadClass, tableBodyRowClass, headerTextColor, tableDataTextColor, headerIconName, headerIconOnClick, draggable, onDragEnd, loadMore, }: TableProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export default Table;
@@ -127,4 +127,5 @@ export interface TableProps {
127
127
  * Drag and Drop indexes
128
128
  */
129
129
  onDragEnd?: (startIndex: number, endIndex: number) => void | undefined;
130
+ loadMore?: (_direction?: string) => void;
130
131
  }
package/lib/index.d.ts CHANGED
@@ -812,6 +812,22 @@ interface SelectProps$1 {
812
812
  * Provide the background color for the select label on the hover state
813
813
  */
814
814
  labelBackgroundColor?: string;
815
+ /**
816
+ * To close the modal in the select dropdown
817
+ */
818
+ onCancelModal?: () => void;
819
+ /**
820
+ * To close the modal in the select dropdown
821
+ */
822
+ onSaveModal?: () => void;
823
+ /**
824
+ * Pass the custom Jsx for the Modal
825
+ */
826
+ modalJSXProps?: ReactNode;
827
+ /**
828
+ * Pass the recurrence boolean for the exeception cases
829
+ */
830
+ recurrence?: boolean;
815
831
  }
816
832
  type OptionValue = any;
817
833
  interface Option$2 {
@@ -1056,7 +1072,7 @@ interface MenuOptionProps {
1056
1072
  * @optional
1057
1073
  */
1058
1074
  optionCardVariant?: 'primary';
1059
- targetRef?: string | React.RefObject<HTMLElement>;
1075
+ targetRef?: string | React.RefObject<HTMLElement> | null;
1060
1076
  treeRowRef?: React.RefObject<any | null>;
1061
1077
  }
1062
1078
 
@@ -1167,9 +1183,10 @@ interface TableProps$1 {
1167
1183
  * Drag and Drop indexes
1168
1184
  */
1169
1185
  onDragEnd?: (startIndex: number, endIndex: number) => void | undefined;
1186
+ loadMore?: (_direction?: string) => void;
1170
1187
  }
1171
1188
 
1172
- declare const Table: ({ data, columns, headerType, withCheckbox, onSelect, allSelected, partialSelected, withFixedHeader, borderWithRadius, headerCheckboxDisabled, noDataContent, height, className, tableHeadClass, tableBodyRowClass, headerTextColor, tableDataTextColor, headerIconName, headerIconOnClick, draggable, onDragEnd, }: TableProps$1) => react_jsx_runtime.JSX.Element;
1189
+ declare const Table: ({ data, columns, headerType, withCheckbox, onSelect, allSelected, partialSelected, withFixedHeader, borderWithRadius, headerCheckboxDisabled, noDataContent, height, className, tableHeadClass, tableBodyRowClass, headerTextColor, tableDataTextColor, headerIconName, headerIconOnClick, draggable, onDragEnd, loadMore, }: TableProps$1) => react_jsx_runtime.JSX.Element;
1173
1190
 
1174
1191
  /**
1175
1192
  * Props for the Add Resource Button component.
@@ -3467,7 +3484,7 @@ interface TreeDetailsResult {
3467
3484
  endId: string;
3468
3485
  root?: TreeNodeProps;
3469
3486
  }
3470
- declare const getTreeDetails: (action: "above" | "below" | "expand" | "collapse" | "start", oldData: TreeNodeProps[], newData: TreeNodeProps[], index?: number) => TreeDetailsResult;
3487
+ declare const getTreeDetails: (action: "above" | "below" | "expand" | "collapse" | "start" | "addAbove" | "addBelow", oldData: TreeNodeProps[], newData: TreeNodeProps[], index?: number, sourceId?: string) => TreeDetailsResult;
3471
3488
 
3472
3489
  declare const handleTreeNodeSect: (data: TreeNodeProps[], key: string | undefined, isChecked: boolean | "partial") => TreeNodeProps[];
3473
3490