funda-ui 4.1.125 → 4.1.143

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.
@@ -36,9 +36,9 @@ declare type DynamicFieldsProps = {
36
36
  innerAppendEmptyContent?: React.ReactNode;
37
37
  /** -- */
38
38
  id?: string;
39
- onAdd?: (items: HTMLDivElement[]) => void;
40
- onRemove?: (items: HTMLDivElement[], key: number | string, index: number | string) => void;
41
- onLoad?: (addbtn: any) => void;
39
+ onAdd?: (items: HTMLDivElement[], rootNode: HTMLDivElement, btnNode: HTMLAnchorElement, perRowDomClassName: string) => void;
40
+ onRemove?: (items: HTMLDivElement[], key: number | string, index: number | string, rootNode: HTMLDivElement, btnNode: HTMLAnchorElement, perRowDomClassName: string) => void;
41
+ onLoad?: (addbtn: any, rootNode: HTMLDivElement, perRowDomClassName: string) => void;
42
42
  };
43
43
  declare const DynamicFields: (props: DynamicFieldsProps) => JSX.Element;
44
44
  export default DynamicFields;
@@ -233,7 +233,7 @@ var DynamicFields = function DynamicFields(props) {
233
233
  }
234
234
 
235
235
  //
236
- onAdd === null || onAdd === void 0 ? void 0 : onAdd(perRow);
236
+ onAdd === null || onAdd === void 0 ? void 0 : onAdd(perRow, rootRef.current, addBtnRef.current, PER_ROW_DOM_STRING);
237
237
  }, 0);
238
238
  }
239
239
  function handleClickRemove(e) {
@@ -275,7 +275,7 @@ var DynamicFields = function DynamicFields(props) {
275
275
  }
276
276
 
277
277
  //
278
- onRemove === null || onRemove === void 0 ? void 0 : onRemove(perRow, curKey, curIndex);
278
+ onRemove === null || onRemove === void 0 ? void 0 : onRemove(perRow, curKey, curIndex, rootRef.current, e.currentTarget, PER_ROW_DOM_STRING);
279
279
  }, 0);
280
280
  }
281
281
  }
@@ -335,7 +335,9 @@ var DynamicFields = function DynamicFields(props) {
335
335
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
336
336
  setVal(data ? data.init : []);
337
337
  setTmpl(data ? data.tmpl : null);
338
- onLoad === null || onLoad === void 0 ? void 0 : onLoad(addBtnIdRef.current);
338
+
339
+ //
340
+ onLoad === null || onLoad === void 0 ? void 0 : onLoad(addBtnIdRef.current, rootRef.current, PER_ROW_DOM_STRING);
339
341
  }, [data]);
340
342
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
341
343
  className: wrapperClassName || wrapperClassName === '' ? wrapperClassName : "mb-3 position-relative",
@@ -36,9 +36,9 @@ declare type DynamicFieldsProps = {
36
36
  innerAppendEmptyContent?: React.ReactNode;
37
37
  /** -- */
38
38
  id?: string;
39
- onAdd?: (items: HTMLDivElement[]) => void;
40
- onRemove?: (items: HTMLDivElement[], key: number | string, index: number | string) => void;
41
- onLoad?: (addbtn: any) => void;
39
+ onAdd?: (items: HTMLDivElement[], rootNode: HTMLDivElement, btnNode: HTMLAnchorElement, perRowDomClassName: string) => void;
40
+ onRemove?: (items: HTMLDivElement[], key: number | string, index: number | string, rootNode: HTMLDivElement, btnNode: HTMLAnchorElement, perRowDomClassName: string) => void;
41
+ onLoad?: (addbtn: any, rootNode: HTMLDivElement, perRowDomClassName: string) => void;
42
42
  };
43
43
  declare const DynamicFields: (props: DynamicFieldsProps) => JSX.Element;
44
44
  export default DynamicFields;
@@ -233,7 +233,7 @@ var DynamicFields = function DynamicFields(props) {
233
233
  }
234
234
 
235
235
  //
236
- onAdd === null || onAdd === void 0 ? void 0 : onAdd(perRow);
236
+ onAdd === null || onAdd === void 0 ? void 0 : onAdd(perRow, rootRef.current, addBtnRef.current, PER_ROW_DOM_STRING);
237
237
  }, 0);
238
238
  }
239
239
  function handleClickRemove(e) {
@@ -275,7 +275,7 @@ var DynamicFields = function DynamicFields(props) {
275
275
  }
276
276
 
277
277
  //
278
- onRemove === null || onRemove === void 0 ? void 0 : onRemove(perRow, curKey, curIndex);
278
+ onRemove === null || onRemove === void 0 ? void 0 : onRemove(perRow, curKey, curIndex, rootRef.current, e.currentTarget, PER_ROW_DOM_STRING);
279
279
  }, 0);
280
280
  }
281
281
  }
@@ -335,7 +335,9 @@ var DynamicFields = function DynamicFields(props) {
335
335
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
336
336
  setVal(data ? data.init : []);
337
337
  setTmpl(data ? data.tmpl : null);
338
- onLoad === null || onLoad === void 0 ? void 0 : onLoad(addBtnIdRef.current);
338
+
339
+ //
340
+ onLoad === null || onLoad === void 0 ? void 0 : onLoad(addBtnIdRef.current, rootRef.current, PER_ROW_DOM_STRING);
339
341
  }, [data]);
340
342
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
341
343
  className: wrapperClassName || wrapperClassName === '' ? wrapperClassName : "mb-3 position-relative",
@@ -40,9 +40,9 @@ type DynamicFieldsProps = {
40
40
  innerAppendEmptyContent?: React.ReactNode;
41
41
  /** -- */
42
42
  id?: string;
43
- onAdd?: (items: HTMLDivElement[]) => void;
44
- onRemove?: (items: HTMLDivElement[], key: number | string, index: number | string) => void;
45
- onLoad?: (addbtn: any) => void;
43
+ onAdd?: (items: HTMLDivElement[], rootNode: HTMLDivElement, btnNode: HTMLAnchorElement, perRowDomClassName: string) => void;
44
+ onRemove?: (items: HTMLDivElement[], key: number | string, index: number | string, rootNode: HTMLDivElement, btnNode: HTMLAnchorElement, perRowDomClassName: string) => void;
45
+ onLoad?: (addbtn: any, rootNode: HTMLDivElement, perRowDomClassName: string) => void;
46
46
 
47
47
  };
48
48
 
@@ -179,7 +179,7 @@ const DynamicFields = (props: DynamicFieldsProps) => {
179
179
  }
180
180
 
181
181
  //
182
- onAdd?.(perRow);
182
+ onAdd?.(perRow, rootRef.current, addBtnRef.current, PER_ROW_DOM_STRING);
183
183
  }, 0);
184
184
  }
185
185
 
@@ -232,7 +232,7 @@ const DynamicFields = (props: DynamicFieldsProps) => {
232
232
 
233
233
 
234
234
  //
235
- onRemove?.(perRow, curKey as never, curIndex as number);
235
+ onRemove?.(perRow, curKey as never, curIndex as number, rootRef.current, e.currentTarget as HTMLAnchorElement, PER_ROW_DOM_STRING);
236
236
  }, 0);
237
237
  }
238
238
 
@@ -283,8 +283,9 @@ const DynamicFields = (props: DynamicFieldsProps) => {
283
283
 
284
284
  setVal(data ? data.init : []);
285
285
  setTmpl(data ? data.tmpl : null);
286
- onLoad?.(addBtnIdRef.current);
287
-
286
+
287
+ //
288
+ onLoad?.(addBtnIdRef.current, rootRef.current, PER_ROW_DOM_STRING);
288
289
  }, [data]);
289
290
 
290
291
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "UIUX Lab",
3
3
  "email": "uiuxlab@gmail.com",
4
4
  "name": "funda-ui",
5
- "version": "4.1.125",
5
+ "version": "4.1.143",
6
6
  "description": "React components using pure Bootstrap 5+ which does not contain any external style and script libraries.",
7
7
  "repository": {
8
8
  "type": "git",