aq-fe-framework 0.1.1107 → 0.1.1109
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.
|
@@ -4,6 +4,14 @@ import {
|
|
|
4
4
|
useStore_Permission,
|
|
5
5
|
useStore_ProjectInfo
|
|
6
6
|
} from "./chunk-WW55EZ4B.mjs";
|
|
7
|
+
import {
|
|
8
|
+
utils_currency,
|
|
9
|
+
utils_date,
|
|
10
|
+
utils_excel,
|
|
11
|
+
utils_file,
|
|
12
|
+
utils_mantineReactTable,
|
|
13
|
+
utils_text
|
|
14
|
+
} from "./chunk-7ZI7IOEP.mjs";
|
|
7
15
|
import {
|
|
8
16
|
utils_aq_mapBaseEntityToDomain,
|
|
9
17
|
utils_aq_mapDomainToEntity,
|
|
@@ -17,14 +25,6 @@ import {
|
|
|
17
25
|
utils_notification_show,
|
|
18
26
|
utils_pdf_download
|
|
19
27
|
} from "./chunk-KGBXMHKR.mjs";
|
|
20
|
-
import {
|
|
21
|
-
utils_currency,
|
|
22
|
-
utils_date,
|
|
23
|
-
utils_excel,
|
|
24
|
-
utils_file,
|
|
25
|
-
utils_mantineReactTable,
|
|
26
|
-
utils_text
|
|
27
|
-
} from "./chunk-7ZI7IOEP.mjs";
|
|
28
28
|
import {
|
|
29
29
|
createGenericStore
|
|
30
30
|
} from "./chunk-BTITP4TN.mjs";
|
|
@@ -10357,41 +10357,44 @@ import { jsx as jsx99 } from "react/jsx-runtime";
|
|
|
10357
10357
|
function CustomSelectAPI(_a) {
|
|
10358
10358
|
var _b = _a, {
|
|
10359
10359
|
query,
|
|
10360
|
-
autoSelectFirst = false,
|
|
10361
10360
|
value,
|
|
10362
|
-
onChange
|
|
10361
|
+
onChange,
|
|
10362
|
+
autoSelectFirst = false
|
|
10363
10363
|
} = _b, rest = __objRest(_b, [
|
|
10364
10364
|
"query",
|
|
10365
|
-
"autoSelectFirst",
|
|
10366
10365
|
"value",
|
|
10367
|
-
"onChange"
|
|
10366
|
+
"onChange",
|
|
10367
|
+
"autoSelectFirst"
|
|
10368
10368
|
]);
|
|
10369
|
-
var _a2;
|
|
10369
|
+
var _a2, _b2, _c;
|
|
10370
|
+
const options = (_b2 = (_a2 = query.data) == null ? void 0 : _a2.map((item) => {
|
|
10371
|
+
var _a3;
|
|
10372
|
+
return {
|
|
10373
|
+
label: `${item.code} - ${item.name}`,
|
|
10374
|
+
value: (_a3 = item.id) == null ? void 0 : _a3.toString()
|
|
10375
|
+
};
|
|
10376
|
+
})) != null ? _b2 : [];
|
|
10370
10377
|
useEffect18(() => {
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
query.data && query.data.length > 0) {
|
|
10374
|
-
const first = query.data[0];
|
|
10375
|
-
onChange == null ? void 0 : onChange((_a3 = first.id) == null ? void 0 : _a3.toString(), {
|
|
10376
|
-
label: first.code + " - " + first.name,
|
|
10377
|
-
value: (_b2 = first.id) == null ? void 0 : _b2.toString()
|
|
10378
|
-
});
|
|
10378
|
+
if (autoSelectFirst && !value && query.data && query.data.length > 0) {
|
|
10379
|
+
onChange == null ? void 0 : onChange(query.data[0]);
|
|
10379
10380
|
}
|
|
10380
10381
|
}, [autoSelectFirst, query.data, value, onChange]);
|
|
10382
|
+
const handleChange = (selectedId) => {
|
|
10383
|
+
var _a3, _b3;
|
|
10384
|
+
const selectedItem = (_b3 = (_a3 = query.data) == null ? void 0 : _a3.find((item) => {
|
|
10385
|
+
var _a4;
|
|
10386
|
+
return ((_a4 = item.id) == null ? void 0 : _a4.toString()) === selectedId;
|
|
10387
|
+
})) != null ? _b3 : null;
|
|
10388
|
+
onChange == null ? void 0 : onChange(selectedItem);
|
|
10389
|
+
};
|
|
10381
10390
|
return /* @__PURE__ */ jsx99(
|
|
10382
10391
|
MySelect2,
|
|
10383
10392
|
__spreadValues({
|
|
10384
10393
|
isLoading: query.isLoading,
|
|
10385
10394
|
isError: query.isError,
|
|
10386
|
-
data:
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
label: item.code + " - " + item.name,
|
|
10390
|
-
value: (_a3 = item.id) == null ? void 0 : _a3.toString()
|
|
10391
|
-
};
|
|
10392
|
-
}),
|
|
10393
|
-
value,
|
|
10394
|
-
onChange
|
|
10395
|
+
data: options,
|
|
10396
|
+
value: (_c = value == null ? void 0 : value.id) == null ? void 0 : _c.toString(),
|
|
10397
|
+
onChange: handleChange
|
|
10395
10398
|
}, rest)
|
|
10396
10399
|
);
|
|
10397
10400
|
}
|
|
@@ -65,10 +65,10 @@ import {
|
|
|
65
65
|
getReadablePageIdSet,
|
|
66
66
|
useHeaderMegaMenuStore,
|
|
67
67
|
useStore_BasicAppShell
|
|
68
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-USK22KVK.mjs";
|
|
69
69
|
import "../chunk-WW55EZ4B.mjs";
|
|
70
|
-
import "../chunk-KGBXMHKR.mjs";
|
|
71
70
|
import "../chunk-7ZI7IOEP.mjs";
|
|
71
|
+
import "../chunk-KGBXMHKR.mjs";
|
|
72
72
|
import "../chunk-NYAWQRB7.mjs";
|
|
73
73
|
import "../chunk-BTITP4TN.mjs";
|
|
74
74
|
import "../chunk-S5NCYRRY.mjs";
|
package/dist/core/index.d.mts
CHANGED
|
@@ -324,11 +324,13 @@ interface CustomDeleteListAPIProps<TData extends MRT_RowData> extends Omit<MyBut
|
|
|
324
324
|
}
|
|
325
325
|
declare function CustomButtonDeleteListAPI<TData extends MRT_RowData>({ deleteListFn, table, ...rest }: CustomDeleteListAPIProps<TData>): react_jsx_runtime.JSX.Element;
|
|
326
326
|
|
|
327
|
-
interface CustomSelectAPIProps<IRes extends IBaseEntity> extends MySelectProps {
|
|
327
|
+
interface CustomSelectAPIProps<IRes extends IBaseEntity> extends Omit<MySelectProps, "onChange" | "data" | "value"> {
|
|
328
328
|
query: ReturnType<typeof useMyReactQuery<IRes[], any>>;
|
|
329
|
+
value?: IRes | null;
|
|
330
|
+
onChange?: (item: IRes | null) => void;
|
|
329
331
|
autoSelectFirst?: boolean;
|
|
330
332
|
}
|
|
331
|
-
declare function CustomSelectAPI<IRes extends IBaseEntity>({ query,
|
|
333
|
+
declare function CustomSelectAPI<IRes extends IBaseEntity>({ query, value, onChange, autoSelectFirst, ...rest }: CustomSelectAPIProps<IRes>): react_jsx_runtime.JSX.Element;
|
|
332
334
|
|
|
333
335
|
interface MyButtonViewFileAPIProps extends MyButtonViewFileProps {
|
|
334
336
|
filePath?: string;
|
package/dist/core/index.mjs
CHANGED
|
@@ -35,10 +35,10 @@ import {
|
|
|
35
35
|
MyStatsCard,
|
|
36
36
|
MyTextInput2 as MyTextInput,
|
|
37
37
|
MyWeeklySessionSchedulerPicker
|
|
38
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-USK22KVK.mjs";
|
|
39
39
|
import "../chunk-WW55EZ4B.mjs";
|
|
40
|
-
import "../chunk-KGBXMHKR.mjs";
|
|
41
40
|
import "../chunk-7ZI7IOEP.mjs";
|
|
41
|
+
import "../chunk-KGBXMHKR.mjs";
|
|
42
42
|
import "../chunk-NYAWQRB7.mjs";
|
|
43
43
|
import "../chunk-BTITP4TN.mjs";
|
|
44
44
|
import "../chunk-S5NCYRRY.mjs";
|
|
@@ -64,10 +64,10 @@ import {
|
|
|
64
64
|
MailTemplateDeleteButton,
|
|
65
65
|
useS_moduleConfig,
|
|
66
66
|
useStore_Authenticate
|
|
67
|
-
} from "../chunk-
|
|
67
|
+
} from "../chunk-USK22KVK.mjs";
|
|
68
68
|
import "../chunk-WW55EZ4B.mjs";
|
|
69
|
-
import "../chunk-KGBXMHKR.mjs";
|
|
70
69
|
import "../chunk-7ZI7IOEP.mjs";
|
|
70
|
+
import "../chunk-KGBXMHKR.mjs";
|
|
71
71
|
import "../chunk-NYAWQRB7.mjs";
|
|
72
72
|
import "../chunk-BTITP4TN.mjs";
|
|
73
73
|
import "../chunk-S5NCYRRY.mjs";
|
package/dist/shared/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MySelect2 as MySelect,
|
|
3
3
|
Shared_DocTypeSelect
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-USK22KVK.mjs";
|
|
5
5
|
import "../chunk-WW55EZ4B.mjs";
|
|
6
|
-
import "../chunk-KGBXMHKR.mjs";
|
|
7
6
|
import {
|
|
8
7
|
utils_converter
|
|
9
8
|
} from "../chunk-7ZI7IOEP.mjs";
|
|
9
|
+
import "../chunk-KGBXMHKR.mjs";
|
|
10
10
|
import "../chunk-NYAWQRB7.mjs";
|
|
11
11
|
import "../chunk-BTITP4TN.mjs";
|
|
12
12
|
import "../chunk-S5NCYRRY.mjs";
|