aq-fe-framework 0.1.303 → 0.1.305
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-KOCCXYVV.mjs → chunk-ZSH3QSIH.mjs} +5 -5
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/core/index.d.mts +10 -3
- package/dist/core/index.mjs +39 -2
- package/dist/modules-features/index.mjs +5 -5
- package/dist/{types-CxfyEk70.d.mts → types-B5rmBuXz.d.mts} +1 -1
- 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";
|
@@ -232,8 +232,8 @@ import { Button as Button2 } from "@mantine/core";
|
|
232
232
|
import { IconDeviceFloppy as IconDeviceFloppy2, IconEdit as IconEdit2, IconFileExport, IconFileImport, IconPlus as IconPlus2, IconPrinter, IconTrash as IconTrash2, IconX } from "@tabler/icons-react";
|
233
233
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
234
234
|
function MyButton(_a) {
|
235
|
-
var _b = _a, { children, crudType } = _b, rest = __objRest(_b, ["children", "crudType"]);
|
236
|
-
if (
|
235
|
+
var _b = _a, { children, crudType = "default" } = _b, rest = __objRest(_b, ["children", "crudType"]);
|
236
|
+
if (crudType == "default") {
|
237
237
|
return /* @__PURE__ */ jsx7(Button2, __spreadProps(__spreadValues({ color: "indigo" }, rest), { children }));
|
238
238
|
}
|
239
239
|
if (crudType == "create") {
|
@@ -817,7 +817,7 @@ import { Fragment as Fragment6, jsx as jsx17, jsxs as jsxs9 } from "react/jsx-ru
|
|
817
817
|
function MyButtonModal(_a) {
|
818
818
|
var _b = _a, {
|
819
819
|
fullScreen = false,
|
820
|
-
crudType,
|
820
|
+
crudType = "default",
|
821
821
|
disclosure,
|
822
822
|
modalSize,
|
823
823
|
title,
|
@@ -835,7 +835,7 @@ function MyButtonModal(_a) {
|
|
835
835
|
"objectName"
|
836
836
|
]);
|
837
837
|
const objectNameLower = objectName == null ? void 0 : objectName.toLowerCase();
|
838
|
-
if (
|
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(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
2
|
import React$1, { ReactNode, ComponentProps } from 'react';
|
3
|
-
import { t as type_action, T as TYPES_MANTINE_SIZE } from '../types-
|
3
|
+
import { t as type_action, T as TYPES_MANTINE_SIZE } from '../types-B5rmBuXz.mjs';
|
4
4
|
import { ActionIconProps, ButtonProps, useModalsStack, CheckboxProps, SelectProps, NumberFormatterProps, FieldsetProps, FileInputProps, NumberInputProps, TextareaProps, MantineSize, InputWrapperProps, TextInputProps, ContainerProps, FlexProps, GroupProps, TypographyStylesProviderProps, TabsProps, SkeletonProps } from '@mantine/core';
|
5
5
|
import { M as MyApiResponse } from '../createBaseApi-BAYnbGVT.mjs';
|
6
6
|
import { AxiosResponse } from 'axios';
|
@@ -65,13 +65,13 @@ import {
|
|
65
65
|
useS_BasicAppShell,
|
66
66
|
useS_ButtonImport,
|
67
67
|
utils_layout_getItemsWithoutLinks
|
68
|
-
} from "../chunk-
|
68
|
+
} from "../chunk-ZSH3QSIH.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
|
-
import { t as type_action } from '../types-
|
3
|
-
import { ActionIconProps, ButtonProps, ModalProps } from '@mantine/core';
|
2
|
+
import { t as type_action } from '../types-B5rmBuXz.mjs';
|
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
|
@@ -29,6 +29,7 @@ import {
|
|
29
29
|
} from "@tabler/icons-react";
|
30
30
|
import { jsx } from "react/jsx-runtime";
|
31
31
|
var actionConfig = {
|
32
|
+
default: {},
|
32
33
|
create: {
|
33
34
|
color: "indigo",
|
34
35
|
type: "submit",
|
@@ -103,6 +104,9 @@ import {
|
|
103
104
|
} from "@tabler/icons-react";
|
104
105
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
105
106
|
var actionConfig2 = {
|
107
|
+
default: {
|
108
|
+
defaultText: ""
|
109
|
+
},
|
106
110
|
create: {
|
107
111
|
color: "blue",
|
108
112
|
type: "submit",
|
@@ -278,10 +282,43 @@ function CoreButtonModal({
|
|
278
282
|
)
|
279
283
|
] });
|
280
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
|
+
}
|
281
317
|
export {
|
282
318
|
CoreActionIcon,
|
283
319
|
CoreButton,
|
284
320
|
CoreButtonCreateUpdate,
|
285
321
|
CoreButtonModal,
|
286
|
-
CoreDayOfWeekPicker
|
322
|
+
CoreDayOfWeekPicker,
|
323
|
+
CoreTextInput
|
287
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-ZSH3QSIH.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,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MantineSize } from '@mantine/core';
|
2
2
|
|
3
3
|
type TYPES_MANTINE_SIZE = number | MantineSize | (string & {}) | undefined;
|
4
|
-
type type_action = "create" | "update" | "delete" | "save" | "createMultiple" | "check" | "import" | "print" | "cancel" | "export" | "select";
|
4
|
+
type type_action = "default" | "create" | "update" | "delete" | "save" | "createMultiple" | "check" | "import" | "print" | "cancel" | "export" | "select";
|
5
5
|
|
6
6
|
export type { TYPES_MANTINE_SIZE as T, type_action as t };
|