aq-fe-framework 0.1.423 → 0.1.424

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.
@@ -633,6 +633,7 @@ function MySelectFromAPI(_a) {
633
633
  axiosFn,
634
634
  labelWithCode,
635
635
  onChange,
636
+ value,
636
637
  setObjectData,
637
638
  autoSelectFirstItem
638
639
  } = _b, rest = __objRest(_b, [
@@ -640,6 +641,7 @@ function MySelectFromAPI(_a) {
640
641
  "axiosFn",
641
642
  "labelWithCode",
642
643
  "onChange",
644
+ "value",
643
645
  "setObjectData",
644
646
  "autoSelectFirstItem"
645
647
  ]);
@@ -658,24 +660,25 @@ function MySelectFromAPI(_a) {
658
660
  };
659
661
  })) != null ? _a2 : [];
660
662
  }, [query.data]);
661
- const handleChange = (value, options2) => {
663
+ const handleChange = (value2, options2) => {
662
664
  var _a2;
663
- onChange == null ? void 0 : onChange(value, options2);
665
+ onChange == null ? void 0 : onChange(value2, options2);
664
666
  if (setObjectData) {
665
667
  const selected = (_a2 = query.data) == null ? void 0 : _a2.find((item) => {
666
668
  var _a3;
667
- return ((_a3 = item.id) == null ? void 0 : _a3.toString()) === value;
669
+ return ((_a3 = item.id) == null ? void 0 : _a3.toString()) === value2;
668
670
  });
669
671
  setObjectData(selected);
670
672
  }
671
673
  };
672
674
  useEffect3(() => {
673
675
  var _a2, _b2, _c;
676
+ if (value) return;
674
677
  if (autoSelectFirstItem && query.data && query.data.length > 0) {
675
678
  const firstItem = query.data[0];
676
- const value = (_b2 = (_a2 = firstItem.id) == null ? void 0 : _a2.toString()) != null ? _b2 : "";
679
+ const value2 = (_b2 = (_a2 = firstItem.id) == null ? void 0 : _a2.toString()) != null ? _b2 : "";
677
680
  const label = labelWithCode ? `${firstItem.code} - ${firstItem.name}` : (_c = firstItem.name) != null ? _c : "";
678
- onChange == null ? void 0 : onChange(value, { value, label });
681
+ onChange == null ? void 0 : onChange(value2, { value: value2, label });
679
682
  setObjectData == null ? void 0 : setObjectData(firstItem);
680
683
  }
681
684
  }, [query.data, autoSelectFirstItem]);
@@ -685,7 +688,8 @@ function MySelectFromAPI(_a) {
685
688
  isLoading: query.isLoading,
686
689
  isError: query.isError,
687
690
  data: options,
688
- onChange: (value, options2) => handleChange == null ? void 0 : handleChange(value, options2)
691
+ onChange: (value2, options2) => handleChange == null ? void 0 : handleChange(value2, options2),
692
+ value
689
693
  }, rest)
690
694
  );
691
695
  }
@@ -62,8 +62,7 @@ import {
62
62
  useS_BasicAppShell,
63
63
  useS_ButtonImport,
64
64
  utils_layout_getItemsWithoutLinks
65
- } from "../chunk-DZXMICDD.mjs";
66
- import "../chunk-Y3YGC5IH.mjs";
65
+ } from "../chunk-5DY43WTW.mjs";
67
66
  import "../chunk-5U2JSHSJ.mjs";
68
67
  import {
69
68
  MyDataTable,
@@ -73,6 +72,7 @@ import {
73
72
  import "../chunk-OMJJAHOC.mjs";
74
73
  import "../chunk-PRN7KYPD.mjs";
75
74
  import "../chunk-7ZCOFATU.mjs";
75
+ import "../chunk-Y3YGC5IH.mjs";
76
76
  import "../chunk-FWCSY2DS.mjs";
77
77
  export {
78
78
  AQButtonCreateByImportFile,
@@ -112,7 +112,7 @@ interface MySelectFromAPIProps<IRes extends IBaseEntity, IBody = any> extends Om
112
112
  setObjectData?: (item: IRes | undefined) => void;
113
113
  autoSelectFirstItem?: boolean;
114
114
  }
115
- declare function MySelectFromAPI<IRes extends IBaseEntity, IBody = any>({ queryKey, axiosFn, labelWithCode, onChange, setObjectData, autoSelectFirstItem, ...rest }: MySelectFromAPIProps<IRes, IBody>): react_jsx_runtime.JSX.Element;
115
+ declare function MySelectFromAPI<IRes extends IBaseEntity, IBody = any>({ queryKey, axiosFn, labelWithCode, onChange, value, setObjectData, autoSelectFirstItem, ...rest }: MySelectFromAPIProps<IRes, IBody>): react_jsx_runtime.JSX.Element;
116
116
 
117
117
  interface CoreTextInputProps extends TextInputProps {
118
118
  label?: string;
@@ -13,9 +13,9 @@ import {
13
13
  MyStatsCard,
14
14
  MyTextInput,
15
15
  MyWeeklySessionSchedulerPicker
16
- } from "../chunk-AQDTIRC5.mjs";
17
- import "../chunk-GFEMKKFH.mjs";
16
+ } from "../chunk-H2EKWUUT.mjs";
18
17
  import "../chunk-GEYCGM75.mjs";
18
+ import "../chunk-GFEMKKFH.mjs";
19
19
  import "../chunk-OMJJAHOC.mjs";
20
20
  import "../chunk-K6S7R6LU.mjs";
21
21
  import "../chunk-PRN7KYPD.mjs";
@@ -33,24 +33,21 @@ import {
33
33
  groupToTwoLevels,
34
34
  useS_authenticate,
35
35
  utils_layout_getItemsWithoutLinks
36
- } from "../chunk-DZXMICDD.mjs";
37
- import {
38
- createGenericStore
39
- } from "../chunk-Y3YGC5IH.mjs";
36
+ } from "../chunk-5DY43WTW.mjs";
40
37
  import "../chunk-5U2JSHSJ.mjs";
41
38
  import {
42
39
  MyButton as MyButton2,
43
40
  MyDataTableSelectOne,
44
41
  MyTextInput as MyTextInput2
45
- } from "../chunk-AQDTIRC5.mjs";
46
- import {
47
- const_object_documentTypes
48
- } from "../chunk-GFEMKKFH.mjs";
42
+ } from "../chunk-H2EKWUUT.mjs";
49
43
  import {
50
44
  MyDataTable,
51
45
  MyFlexColumn,
52
46
  MyFlexRow
53
47
  } from "../chunk-GEYCGM75.mjs";
48
+ import {
49
+ const_object_documentTypes
50
+ } from "../chunk-GFEMKKFH.mjs";
54
51
  import {
55
52
  const_object_colors
56
53
  } from "../chunk-OMJJAHOC.mjs";
@@ -71,6 +68,9 @@ import {
71
68
  import {
72
69
  utils_notification_show
73
70
  } from "../chunk-7ZCOFATU.mjs";
71
+ import {
72
+ createGenericStore
73
+ } from "../chunk-Y3YGC5IH.mjs";
74
74
  import {
75
75
  __objRest,
76
76
  __spreadProps,
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "types": "./dist/columns/index.d.mts"
43
43
  }
44
44
  },
45
- "version": "0.1.423",
45
+ "version": "0.1.424",
46
46
  "private": false,
47
47
  "files": [
48
48
  "dist"
@@ -1,6 +1,3 @@
1
- import {
2
- createGenericStore
3
- } from "./chunk-Y3YGC5IH.mjs";
4
1
  import {
5
2
  utils_pdf_download
6
3
  } from "./chunk-5U2JSHSJ.mjs";
@@ -20,6 +17,9 @@ import {
20
17
  import {
21
18
  utils_notification_show
22
19
  } from "./chunk-7ZCOFATU.mjs";
20
+ import {
21
+ createGenericStore
22
+ } from "./chunk-Y3YGC5IH.mjs";
23
23
  import {
24
24
  __objRest,
25
25
  __spreadProps,