@licklist/design 0.67.2-dev.3 → 0.67.2-dev.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.
@@ -3,7 +3,7 @@ interface useSortableTreeFunctionsProps {
3
3
  remove: (index?: number | number[]) => void;
4
4
  isOverrides?: boolean;
5
5
  }
6
- export declare const useSortableTreeFunctions: ({ fieldName, remove, isOverrides, }: useSortableTreeFunctionsProps) => {
6
+ export declare const useSortableTreeFunctions: ({ fieldName, remove, }: useSortableTreeFunctionsProps) => {
7
7
  edit: (index: number) => void;
8
8
  cancelChanges: (index: number) => void;
9
9
  saveValidField: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useSortableTreeFunctions.d.ts","sourceRoot":"","sources":["../../../src/product-set/hooks/useSortableTreeFunctions.ts"],"names":[],"mappings":"AAGA,UAAU,6BAA6B;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AACD,eAAO,MAAM,wBAAwB,wCAIlC,6BAA6B;kBAIT,MAAM;2BAOG,MAAM;;CAkBrC,CAAC"}
1
+ {"version":3,"file":"useSortableTreeFunctions.d.ts","sourceRoot":"","sources":["../../../src/product-set/hooks/useSortableTreeFunctions.ts"],"names":[],"mappings":"AAGA,UAAU,6BAA6B;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AACD,eAAO,MAAM,wBAAwB,2BAGlC,6BAA6B;kBAIT,MAAM;2BAMG,MAAM;;CAkBrC,CAAC"}
@@ -48,11 +48,10 @@ function _unsupported_iterable_to_array(o, minLen) {
48
48
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
49
49
  }
50
50
  var useSortableTreeFunctions = function(param) {
51
- var fieldName = param.fieldName, remove = param.remove, isOverrides = param.isOverrides;
51
+ var fieldName = param.fieldName, remove = param.remove;
52
52
  var _useFormContext = useFormContext(), getValues = _useFormContext.getValues, setValue = _useFormContext.setValue;
53
53
  var _useState = _sliced_to_array(useState(null), 2), previousValue = _useState[0], setEditValue = _useState[1];
54
54
  var edit = function(index) {
55
- if (isOverrides) return;
56
55
  var currentCategoryProduct = getValues("".concat(fieldName, ".").concat(index));
57
56
  var cloneCategoryProduct = structuredClone(currentCategoryProduct);
58
57
  setEditValue(cloneCategoryProduct);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.67.2-dev.3",
3
+ "version": "0.67.2-dev.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -9,13 +9,11 @@ interface useSortableTreeFunctionsProps {
9
9
  export const useSortableTreeFunctions = ({
10
10
  fieldName,
11
11
  remove,
12
- isOverrides,
13
12
  }: useSortableTreeFunctionsProps) => {
14
13
  const { getValues, setValue } = useFormContext();
15
14
  const [previousValue, setEditValue] = useState(null);
16
15
 
17
16
  const edit = (index: number) => {
18
- if (isOverrides) return;
19
17
  const currentCategoryProduct = getValues(`${fieldName}.${index}` as const);
20
18
  const cloneCategoryProduct = structuredClone(currentCategoryProduct);
21
19
  setEditValue(cloneCategoryProduct);