aq-fe-framework 0.1.304 → 0.1.306
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.
- package/dist/{chunk-RK2XUPT6.mjs → chunk-DRLKXVYU.mjs} +1 -1
- package/dist/{chunk-EPFONDHC.mjs → chunk-EVWPVCJT.mjs} +4 -4
- package/dist/components/index.mjs +2 -2
- package/dist/core/index.d.mts +9 -2
- package/dist/core/index.mjs +35 -2
- package/dist/modules-features/index.mjs +5 -5
- package/package.json +1 -1
@@ -23,7 +23,7 @@ function MyFlexRow(_a) {
|
|
23
23
|
return /* @__PURE__ */ jsx2(Flex2, __spreadProps(__spreadValues({ gap: "md", align: "center" }, rest), { children }));
|
24
24
|
}
|
25
25
|
|
26
|
-
// src/core/input/
|
26
|
+
// src/core/input/CoreDayOfWeekPicker.tsx
|
27
27
|
import { Badge, Group } from "@mantine/core";
|
28
28
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
29
29
|
var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
|
@@ -8,7 +8,7 @@ import {
|
|
8
8
|
CoreDayOfWeekPicker,
|
9
9
|
MyFlexColumn,
|
10
10
|
MyFlexRow
|
11
|
-
} from "./chunk-
|
11
|
+
} from "./chunk-DRLKXVYU.mjs";
|
12
12
|
import {
|
13
13
|
enum_daysOfWeek
|
14
14
|
} from "./chunk-K6S7R6LU.mjs";
|
@@ -135,8 +135,8 @@ import { ActionIcon } from "@mantine/core";
|
|
135
135
|
import { IconDeviceFloppy, IconEdit, IconPlus, IconTrash } from "@tabler/icons-react";
|
136
136
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
137
137
|
function MyActionIcon(_a) {
|
138
|
-
var _b = _a, { children, crudType } = _b, rest = __objRest(_b, ["children", "crudType"]);
|
139
|
-
if (
|
138
|
+
var _b = _a, { children, crudType = "default" } = _b, rest = __objRest(_b, ["children", "crudType"]);
|
139
|
+
if (crudType == "default") {
|
140
140
|
return /* @__PURE__ */ jsx4(ActionIcon, __spreadProps(__spreadValues({ color: "indigo" }, rest), { children }));
|
141
141
|
}
|
142
142
|
if (crudType == "create") {
|
@@ -835,7 +835,7 @@ function MyButtonModal(_a) {
|
|
835
835
|
"objectName"
|
836
836
|
]);
|
837
837
|
const objectNameLower = objectName == null ? void 0 : objectName.toLowerCase();
|
838
|
-
if (crudType
|
838
|
+
if (crudType == "default") {
|
839
839
|
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
840
840
|
/* @__PURE__ */ jsx17(Button3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, rest), { children: label })),
|
841
841
|
/* @__PURE__ */ jsx17(
|
@@ -65,13 +65,13 @@ import {
|
|
65
65
|
useS_BasicAppShell,
|
66
66
|
useS_ButtonImport,
|
67
67
|
utils_layout_getItemsWithoutLinks
|
68
|
-
} from "../chunk-
|
68
|
+
} from "../chunk-EVWPVCJT.mjs";
|
69
69
|
import "../chunk-5U2JSHSJ.mjs";
|
70
70
|
import "../chunk-NWBLJ3W3.mjs";
|
71
71
|
import {
|
72
72
|
MyFlexColumn,
|
73
73
|
MyFlexRow
|
74
|
-
} from "../chunk-
|
74
|
+
} from "../chunk-DRLKXVYU.mjs";
|
75
75
|
import "../chunk-K6S7R6LU.mjs";
|
76
76
|
import "../chunk-KKJ3OEEW.mjs";
|
77
77
|
import "../chunk-7ZCOFATU.mjs";
|
package/dist/core/index.d.mts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
2
|
import { t as type_action } from '../types-B5rmBuXz.mjs';
|
3
|
-
import { ActionIconProps, ButtonProps, ModalProps } from '@mantine/core';
|
3
|
+
import { ActionIconProps, ButtonProps, ModalProps, TextInputProps } from '@mantine/core';
|
4
4
|
import { ReactNode } from 'react';
|
5
5
|
import { M as MyApiResponse } from '../createBaseApi-BAYnbGVT.mjs';
|
6
6
|
import { AxiosResponse } from 'axios';
|
@@ -49,4 +49,11 @@ interface CoreDayOfWeekPickerProps {
|
|
49
49
|
}
|
50
50
|
declare function CoreDayOfWeekPicker({ value, onChange }: CoreDayOfWeekPickerProps): react_jsx_runtime.JSX.Element;
|
51
51
|
|
52
|
-
|
52
|
+
interface CoreTextInputProps extends TextInputProps {
|
53
|
+
label?: string;
|
54
|
+
defaultValue?: string;
|
55
|
+
isPhoneNumber?: boolean;
|
56
|
+
}
|
57
|
+
declare function CoreTextInput({ label, isPhoneNumber, ...rest }: CoreTextInputProps): react_jsx_runtime.JSX.Element;
|
58
|
+
|
59
|
+
export { CoreActionIcon, CoreButton, CoreButtonCreateUpdate, CoreButtonModal, CoreDayOfWeekPicker, CoreTextInput };
|
package/dist/core/index.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import {
|
2
2
|
CoreDayOfWeekPicker,
|
3
3
|
MyFlexColumn
|
4
|
-
} from "../chunk-
|
4
|
+
} from "../chunk-DRLKXVYU.mjs";
|
5
5
|
import "../chunk-K6S7R6LU.mjs";
|
6
6
|
import {
|
7
7
|
useMyReactMutation
|
@@ -282,10 +282,43 @@ function CoreButtonModal({
|
|
282
282
|
)
|
283
283
|
] });
|
284
284
|
}
|
285
|
+
|
286
|
+
// src/core/input/CoreTextInput.tsx
|
287
|
+
import { TextInput } from "@mantine/core";
|
288
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
289
|
+
function CoreTextInput(_a) {
|
290
|
+
var _b = _a, { label, isPhoneNumber } = _b, rest = __objRest(_b, ["label", "isPhoneNumber"]);
|
291
|
+
return /* @__PURE__ */ jsx5(
|
292
|
+
TextInput,
|
293
|
+
__spreadValues({
|
294
|
+
onKeyDown: (e) => {
|
295
|
+
if (!isPhoneNumber) return;
|
296
|
+
const allowedKeys = [
|
297
|
+
"Backspace",
|
298
|
+
"Tab",
|
299
|
+
"ArrowLeft",
|
300
|
+
"ArrowRight",
|
301
|
+
"Delete",
|
302
|
+
"+",
|
303
|
+
"-",
|
304
|
+
"(",
|
305
|
+
")",
|
306
|
+
" "
|
307
|
+
// các ký tự đặc biệt cho số điện thoại
|
308
|
+
];
|
309
|
+
if (!/[0-9]/.test(e.key) && !allowedKeys.includes(e.key)) {
|
310
|
+
e.preventDefault();
|
311
|
+
}
|
312
|
+
},
|
313
|
+
placeholder: label ? `Nh\u1EADp ${label == null ? void 0 : label.toLowerCase()}` : ""
|
314
|
+
}, rest)
|
315
|
+
);
|
316
|
+
}
|
285
317
|
export {
|
286
318
|
CoreActionIcon,
|
287
319
|
CoreButton,
|
288
320
|
CoreButtonCreateUpdate,
|
289
321
|
CoreButtonModal,
|
290
|
-
CoreDayOfWeekPicker
|
322
|
+
CoreDayOfWeekPicker,
|
323
|
+
CoreTextInput
|
291
324
|
};
|
@@ -30,7 +30,7 @@ import {
|
|
30
30
|
useS_BasicAppShell,
|
31
31
|
useS_authenticate,
|
32
32
|
utils_layout_getItemsWithoutLinks
|
33
|
-
} from "../chunk-
|
33
|
+
} from "../chunk-EVWPVCJT.mjs";
|
34
34
|
import "../chunk-5U2JSHSJ.mjs";
|
35
35
|
import {
|
36
36
|
const_object_documentTypes
|
@@ -38,13 +38,13 @@ import {
|
|
38
38
|
import {
|
39
39
|
const_object_colors
|
40
40
|
} from "../chunk-NWBLJ3W3.mjs";
|
41
|
-
import {
|
42
|
-
MyFlexColumn,
|
43
|
-
MyFlexRow
|
44
|
-
} from "../chunk-RK2XUPT6.mjs";
|
45
41
|
import {
|
46
42
|
enum_emailConfigModule
|
47
43
|
} from "../chunk-VH4ZAD6M.mjs";
|
44
|
+
import {
|
45
|
+
MyFlexColumn,
|
46
|
+
MyFlexRow
|
47
|
+
} from "../chunk-DRLKXVYU.mjs";
|
48
48
|
import "../chunk-K6S7R6LU.mjs";
|
49
49
|
import {
|
50
50
|
baseAxios_default,
|