aq-fe-framework 0.1.374 → 0.1.378

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.
@@ -13,7 +13,7 @@ import {
13
13
  baseAxios_default,
14
14
  useMyReactMutation,
15
15
  useMyReactQuery
16
- } from "./chunk-YQPDRFRL.mjs";
16
+ } from "./chunk-E3O2BCYD.mjs";
17
17
  import {
18
18
  utils_notification_show
19
19
  } from "./chunk-7ZCOFATU.mjs";
@@ -611,27 +611,32 @@ function MySelect(_a) {
611
611
 
612
612
  // src/core/input/MySelectAPI.tsx
613
613
  import { jsx as jsx11 } from "react/jsx-runtime";
614
- function MySelectFromAPI(props) {
615
- var _a;
614
+ function MySelectFromAPI(_a) {
615
+ var _b = _a, {
616
+ endPoint = ""
617
+ } = _b, rest = __objRest(_b, [
618
+ "endPoint"
619
+ ]);
620
+ var _a2;
616
621
  const query = useMyReactQuery({
617
- queryKey: [props.endPoint],
622
+ queryKey: [endPoint],
618
623
  axiosFn: () => {
619
- return baseAxios_default.get(props.endPoint || "");
624
+ return baseAxios_default.get(endPoint);
620
625
  }
621
626
  });
622
627
  return /* @__PURE__ */ jsx11(
623
628
  MySelect,
624
- {
629
+ __spreadValues({
625
630
  isLoading: query.isLoading,
626
631
  isError: query.isError,
627
- data: (_a = query.data) == null ? void 0 : _a.map((item) => {
628
- var _a2;
632
+ data: (_a2 = query.data) == null ? void 0 : _a2.map((item) => {
633
+ var _a3;
629
634
  return {
630
- value: (_a2 = item.id) == null ? void 0 : _a2.toString(),
635
+ value: (_a3 = item.id) == null ? void 0 : _a3.toString(),
631
636
  label: item.name
632
637
  };
633
638
  })
634
- }
639
+ }, rest)
635
640
  );
636
641
  }
637
642
 
@@ -80,6 +80,20 @@ function createBaseApi(baseUrl, axiosInstance) {
80
80
  };
81
81
  }
82
82
 
83
+ // src/hooks/custom-hooks/createBaseUrl.ts
84
+ function createBaseUrl(baseUrl) {
85
+ return {
86
+ get: `${baseUrl}/get`,
87
+ getAll: `${baseUrl}/GetAll`,
88
+ create: `${baseUrl}/create`,
89
+ update: `${baseUrl}/update`,
90
+ updateList: `${baseUrl}/updateList`,
91
+ createOrUpdateList: `${baseUrl}/createOrUpdateList`,
92
+ delete: `${baseUrl}/delete`,
93
+ deleteList: `${baseUrl}/deleteList`
94
+ };
95
+ }
96
+
83
97
  // src/api/config/baseAxios.ts
84
98
  import axios from "axios";
85
99
  var baseAxios = axios.create({
@@ -209,6 +223,7 @@ export {
209
223
  useMyDevice,
210
224
  useMyRouter,
211
225
  createBaseApi,
226
+ createBaseUrl,
212
227
  baseAxios_default,
213
228
  useLoadAxiosConfig,
214
229
  useMyReactMutation,
@@ -16,7 +16,7 @@ import {
16
16
  baseAxios_default,
17
17
  useMyReactMutation,
18
18
  useQ_AQ_GetAQModule
19
- } from "./chunk-YQPDRFRL.mjs";
19
+ } from "./chunk-E3O2BCYD.mjs";
20
20
  import {
21
21
  utils_notification_show
22
22
  } from "./chunk-7ZCOFATU.mjs";
@@ -62,7 +62,7 @@ import {
62
62
  useS_BasicAppShell,
63
63
  useS_ButtonImport,
64
64
  utils_layout_getItemsWithoutLinks
65
- } from "../chunk-HPW2ZXSW.mjs";
65
+ } from "../chunk-SOXRFFXD.mjs";
66
66
  import "../chunk-Y3YGC5IH.mjs";
67
67
  import "../chunk-5U2JSHSJ.mjs";
68
68
  import {
@@ -71,7 +71,7 @@ import {
71
71
  MyFlexRow
72
72
  } from "../chunk-GEYCGM75.mjs";
73
73
  import "../chunk-7ORPZMGL.mjs";
74
- import "../chunk-YQPDRFRL.mjs";
74
+ import "../chunk-E3O2BCYD.mjs";
75
75
  import "../chunk-7ZCOFATU.mjs";
76
76
  import "../chunk-FWCSY2DS.mjs";
77
77
  export {
@@ -106,7 +106,7 @@ declare function MySelect({ label, data, isLoading, isError, ...rest }: MySelect
106
106
  interface MySelectFromAPIProps extends MySelectProps {
107
107
  endPoint?: string;
108
108
  }
109
- declare function MySelectFromAPI(props: MySelectFromAPIProps): react_jsx_runtime.JSX.Element;
109
+ declare function MySelectFromAPI({ endPoint, ...rest }: MySelectFromAPIProps): react_jsx_runtime.JSX.Element;
110
110
 
111
111
  interface CoreTextInputProps extends TextInputProps {
112
112
  label?: string;
@@ -13,11 +13,11 @@ import {
13
13
  MyStatsCard,
14
14
  MyTextInput,
15
15
  MyWeeklySessionSchedulerPicker
16
- } from "../chunk-E3L2GQQZ.mjs";
16
+ } from "../chunk-A2XMKLZ3.mjs";
17
17
  import "../chunk-GEYCGM75.mjs";
18
18
  import "../chunk-7ORPZMGL.mjs";
19
19
  import "../chunk-K6S7R6LU.mjs";
20
- import "../chunk-YQPDRFRL.mjs";
20
+ import "../chunk-E3O2BCYD.mjs";
21
21
  import "../chunk-7ZCOFATU.mjs";
22
22
  import "../chunk-FWCSY2DS.mjs";
23
23
  export {
@@ -23,6 +23,17 @@ declare function useMyRouter(): {
23
23
  prefetch(href: string, options?: next_dist_shared_lib_app_router_context_shared_runtime.PrefetchOptions): void;
24
24
  };
25
25
 
26
+ declare function createBaseUrl(baseUrl: string): {
27
+ get: string;
28
+ getAll: string;
29
+ create: string;
30
+ update: string;
31
+ updateList: string;
32
+ createOrUpdateList: string;
33
+ delete: string;
34
+ deleteList: string;
35
+ };
36
+
26
37
  declare const useLoadAxiosConfig: ({ axiosInstance }: {
27
38
  axiosInstance: AxiosInstance;
28
39
  }) => void;
@@ -43,4 +54,4 @@ declare function useMyReactQuery<IRes, IBody>({ queryKey, axiosFn, options, mock
43
54
 
44
55
  declare function useQ_AQ_GetAQModule(): _tanstack_react_query.UseQueryResult<IAQModule, Error>;
45
56
 
46
- export { MyApiResponse, type MyReactQueryProps, useLoadAxiosConfig, useMyDevice, useMyReactMutation, useMyReactQuery, useMyRouter, useQ_AQ_GetAQModule };
57
+ export { MyApiResponse, type MyReactQueryProps, createBaseUrl, useLoadAxiosConfig, useMyDevice, useMyReactMutation, useMyReactQuery, useMyRouter, useQ_AQ_GetAQModule };
@@ -1,16 +1,18 @@
1
1
  import {
2
2
  createBaseApi,
3
+ createBaseUrl,
3
4
  useLoadAxiosConfig,
4
5
  useMyDevice,
5
6
  useMyReactMutation,
6
7
  useMyReactQuery,
7
8
  useMyRouter,
8
9
  useQ_AQ_GetAQModule
9
- } from "../chunk-YQPDRFRL.mjs";
10
+ } from "../chunk-E3O2BCYD.mjs";
10
11
  import "../chunk-7ZCOFATU.mjs";
11
12
  import "../chunk-FWCSY2DS.mjs";
12
13
  export {
13
14
  createBaseApi,
15
+ createBaseUrl,
14
16
  useLoadAxiosConfig,
15
17
  useMyDevice,
16
18
  useMyReactMutation,
@@ -212,9 +212,11 @@ declare function F_core18256_Create({ documentType }: {
212
212
  documentType: number;
213
213
  }): react_jsx_runtime.JSX.Element;
214
214
 
215
- declare function F_core18256_Delete({ id }: {
215
+ interface Props {
216
216
  id: number;
217
- }): react_jsx_runtime.JSX.Element;
217
+ code: string;
218
+ }
219
+ declare function F_core18256_Delete({ id, code }: Props): react_jsx_runtime.JSX.Element;
218
220
 
219
221
  declare function F_core18256_Read({ documentType }: {
220
222
  documentType: number;
@@ -33,24 +33,24 @@ import {
33
33
  groupToTwoLevels,
34
34
  useS_authenticate,
35
35
  utils_layout_getItemsWithoutLinks
36
- } from "../chunk-HPW2ZXSW.mjs";
36
+ } from "../chunk-SOXRFFXD.mjs";
37
37
  import {
38
38
  createGenericStore
39
39
  } from "../chunk-Y3YGC5IH.mjs";
40
40
  import "../chunk-5U2JSHSJ.mjs";
41
- import {
42
- const_object_documentTypes
43
- } from "../chunk-BZMQOGL6.mjs";
44
41
  import {
45
42
  MyButton as MyButton2,
46
43
  MyDataTableSelectOne,
47
44
  MyTextInput as MyTextInput2
48
- } from "../chunk-E3L2GQQZ.mjs";
45
+ } from "../chunk-A2XMKLZ3.mjs";
49
46
  import {
50
47
  MyDataTable,
51
48
  MyFlexColumn,
52
49
  MyFlexRow
53
50
  } from "../chunk-GEYCGM75.mjs";
51
+ import {
52
+ const_object_documentTypes
53
+ } from "../chunk-BZMQOGL6.mjs";
54
54
  import {
55
55
  const_object_colors
56
56
  } from "../chunk-7ORPZMGL.mjs";
@@ -67,7 +67,7 @@ import {
67
67
  useMyRouter,
68
68
  useQ_AQ_GetAQModule,
69
69
  useQ_SkillCenter_GetAll
70
- } from "../chunk-YQPDRFRL.mjs";
70
+ } from "../chunk-E3O2BCYD.mjs";
71
71
  import {
72
72
  utils_notification_show
73
73
  } from "../chunk-7ZCOFATU.mjs";
@@ -1906,10 +1906,11 @@ function F_core18256_Create({ documentType }) {
1906
1906
 
1907
1907
  // src/modules-features/admin/core/core18256/F_core18256_Delete.tsx
1908
1908
  import { jsx as jsx26 } from "react/jsx-runtime";
1909
- function F_core18256_Delete({ id }) {
1909
+ function F_core18256_Delete({ id, code }) {
1910
1910
  return /* @__PURE__ */ jsx26(
1911
1911
  MyActionIconDelete,
1912
1912
  {
1913
+ contextData: code,
1913
1914
  onSubmit: async () => await baseAxios_default.post("/DocumentAttribute/Delete", { id })
1914
1915
  }
1915
1916
  );
@@ -1964,7 +1965,7 @@ function F_core18256_Read({ documentType }) {
1964
1965
  renderRowActions: ({ row }) => {
1965
1966
  return /* @__PURE__ */ jsxs18(MyCenterFull, { children: [
1966
1967
  /* @__PURE__ */ jsx28(F_core18256_Update, { values: row.original }),
1967
- /* @__PURE__ */ jsx28(F_core18256_Delete, { id: row.original.id })
1968
+ /* @__PURE__ */ jsx28(F_core18256_Delete, { id: row.original.id, code: row.original.code || "" })
1968
1969
  ] });
1969
1970
  }
1970
1971
  }
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "types": "./dist/columns/index.d.mts"
43
43
  }
44
44
  },
45
- "version": "0.1.374",
45
+ "version": "0.1.378",
46
46
  "private": false,
47
47
  "files": [
48
48
  "dist"