aq-fe-framework 0.1.1039 → 0.1.1040

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.
Files changed (45) hide show
  1. package/dist/IAQModule-bW0dxQvX.d.mts +23 -0
  2. package/dist/IBaseDomain-CUxofYh8.d.mts +14 -0
  3. package/dist/IBaseEntity-Am9Cgybw.d.mts +14 -0
  4. package/dist/IEmailTemplate-D7pkIZbk.d.mts +46 -0
  5. package/dist/IPagePermission-992CbJhp.d.mts +11 -0
  6. package/dist/MyDataTable-gxL6qCfE.d.mts +61 -0
  7. package/dist/MySelect-CEgpggSF.d.mts +12 -0
  8. package/dist/build-object/index.d.mts +33 -0
  9. package/dist/build-object/index.mjs +51 -0
  10. package/dist/components/index.d.mts +570 -0
  11. package/dist/components/index.mjs +9024 -0
  12. package/dist/const/index.d.mts +35 -0
  13. package/dist/const/index.mjs +92 -0
  14. package/dist/const_aqModuleId-Ch0-3u_X.d.mts +8 -0
  15. package/dist/core/index.d.mts +318 -0
  16. package/dist/core/index.mjs +7568 -0
  17. package/dist/enum/index.d.mts +20 -0
  18. package/dist/enum/index.mjs +24 -0
  19. package/dist/hooks/index.d.mts +80 -0
  20. package/dist/hooks/index.mjs +366 -0
  21. package/dist/interfaces/index.d.mts +162 -0
  22. package/dist/interfaces/index.mjs +1 -0
  23. package/dist/modules-features/index.d.mts +909 -0
  24. package/dist/{index.mjs → modules-features/index.mjs} +3588 -8836
  25. package/dist/shared/index.d.mts +10 -0
  26. package/dist/shared/index.mjs +5193 -0
  27. package/dist/stores/index.d.mts +53 -0
  28. package/dist/stores/index.mjs +76 -0
  29. package/dist/type_action-hMF6_2Mr.d.mts +3 -0
  30. package/dist/type_mutation-CCtnyeP3.d.mts +4 -0
  31. package/dist/types/index.d.mts +10 -0
  32. package/dist/types/index.mjs +10 -0
  33. package/dist/types-km2g-xx5.d.mts +20 -0
  34. package/dist/useMyReactMutation-XkhMBQeB.d.mts +52 -0
  35. package/dist/useMyReactQuery-io2elEak.d.mts +17 -0
  36. package/dist/utils/index.d.mts +167 -0
  37. package/dist/utils/index.mjs +524 -0
  38. package/dist/utils-v2/index.d.mts +54 -0
  39. package/dist/utils-v2/index.mjs +320 -0
  40. package/dist/utils_excel-CuudSzBR.d.mts +24 -0
  41. package/dist/utils_file-JlhzjLGS.d.mts +19 -0
  42. package/dist/zod-schemas/index.d.mts +3 -0
  43. package/dist/zod-schemas/index.mjs +4 -0
  44. package/package.json +3 -2
  45. package/dist/index.d.mts +0 -2577
@@ -0,0 +1,23 @@
1
+ import { I as IBaseEntity } from './IBaseEntity-Am9Cgybw.mjs';
2
+
3
+ interface IAQModule extends IBaseEntity {
4
+ officelName?: string;
5
+ phoneNumber?: string;
6
+ email?: string;
7
+ faviconPath?: string;
8
+ logoPath?: string;
9
+ registrationDate?: Date;
10
+ limiteDate?: Date;
11
+ faviconFileDetail?: {
12
+ fileName?: string;
13
+ fileExtension?: string;
14
+ fileBase64String?: string;
15
+ };
16
+ logoFileDetail?: {
17
+ fileName?: string;
18
+ fileExtension?: string;
19
+ fileBase64String?: string;
20
+ };
21
+ }
22
+
23
+ export type { IAQModule as I };
@@ -0,0 +1,14 @@
1
+ interface IBaseDomain {
2
+ id?: string;
3
+ code?: string;
4
+ name?: string;
5
+ description?: string;
6
+ createDate?: Date;
7
+ createByUserName?: string;
8
+ editDate?: Date;
9
+ editByUserName?: string;
10
+ concurrencyStamp?: string;
11
+ isEnabled?: boolean;
12
+ }
13
+
14
+ export type { IBaseDomain as I };
@@ -0,0 +1,14 @@
1
+ interface IBaseEntity {
2
+ id?: number;
3
+ tempId?: string;
4
+ code?: string;
5
+ name?: string;
6
+ concurrencyStamp?: string;
7
+ isEnabled?: boolean;
8
+ modifiedWhen?: Date;
9
+ modifiedFullName?: string;
10
+ createdBy?: number;
11
+ createWhen?: string;
12
+ }
13
+
14
+ export type { IBaseEntity as I };
@@ -0,0 +1,46 @@
1
+ import { I as IBaseEntity } from './IBaseEntity-Am9Cgybw.mjs';
2
+
3
+ /**
4
+ * interface của năm học dùng chung
5
+ */
6
+ interface IAcademicYear {
7
+ id?: number;
8
+ code?: string;
9
+ name?: string;
10
+ /** Ngày bắt đầu năm học */
11
+ academicYearStart?: Date;
12
+ /** Ngày kết thúc năm học */
13
+ academicYearEnd?: Date;
14
+ /** Ngày bắt đầu năm hành chính */
15
+ administrativeYearStart?: Date;
16
+ /** Ngày kết thúc năm hành chính */
17
+ administrativeYearEnd?: Date;
18
+ isEnabled?: boolean;
19
+ isCurrent?: boolean;
20
+ concurrencyStamp?: string;
21
+ note?: string;
22
+ }
23
+ type AcademicYearUpdateDto = Omit<IAcademicYear, 'academicYearStart' | 'academicYearEnd' | 'administrativeYearStart' | 'administrativeYearEnd'> & {
24
+ academicYearStart?: string | null;
25
+ academicYearEnd?: string | null;
26
+ administrativeYearStart?: string | null;
27
+ administrativeYearEnd?: string | null;
28
+ };
29
+
30
+ interface IEmailConfig extends IBaseEntity {
31
+ aqModuleId?: number;
32
+ hostMailServer?: string;
33
+ outgoingPort?: number;
34
+ incomingPort?: number;
35
+ isSslEnabled?: boolean;
36
+ emailAddress?: string;
37
+ }
38
+
39
+ interface IEmailTemplate extends IBaseEntity {
40
+ order?: number;
41
+ body?: string;
42
+ type?: number;
43
+ aqModuleId?: number;
44
+ }
45
+
46
+ export type { AcademicYearUpdateDto as A, IAcademicYear as I, IEmailConfig as a, IEmailTemplate as b };
@@ -0,0 +1,11 @@
1
+ interface IPagePermission {
2
+ pageId?: number;
3
+ isCreate?: boolean;
4
+ isUpdate?: boolean;
5
+ isDelete?: boolean;
6
+ isRead?: boolean;
7
+ isPrint?: boolean;
8
+ isExport?: boolean;
9
+ }
10
+
11
+ export type { IPagePermission as I };
@@ -0,0 +1,61 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ActionIconProps, TooltipProps, ButtonProps, ModalProps } from '@mantine/core';
3
+ import { useDisclosure } from '@mantine/hooks';
4
+ import { ReactNode } from 'react';
5
+ import { t as type_action } from './type_action-hMF6_2Mr.mjs';
6
+ import { DeepKeys } from '@tanstack/react-table';
7
+ import { MRT_RowData, MRT_TableOptions, MRT_ColumnDef } from 'mantine-react-table';
8
+
9
+ interface MyActionIconProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ActionIconProps {
10
+ actionType?: type_action;
11
+ isCheckPermission?: boolean;
12
+ toolTipProps?: TooltipProps;
13
+ }
14
+ declare function MyActionIcon({ children, actionType, isCheckPermission, toolTipProps, ...rest }: MyActionIconProps): react_jsx_runtime.JSX.Element;
15
+
16
+ interface MyButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ButtonProps {
17
+ actionType?: type_action;
18
+ children?: ReactNode;
19
+ /** Không cần bật kiểm tra quyền mặc định = true */
20
+ isCheckPermission?: boolean;
21
+ }
22
+ declare function MyButton({ children, actionType, isCheckPermission, ...rest }: MyButtonProps): react_jsx_runtime.JSX.Element;
23
+
24
+ interface MyButtonModalProps {
25
+ children?: ReactNode;
26
+ disclosure: ReturnType<typeof useDisclosure>;
27
+ buttonProps?: MyButtonProps;
28
+ actionIconProps?: MyActionIconProps;
29
+ modalProps?: Omit<ModalProps, "opened" | "onClose">;
30
+ isActionIcon?: boolean;
31
+ /**
32
+ * @deprecated
33
+ * Xài actionIconProps trong đó có tooltipProps xài trong đó nhé.
34
+ */
35
+ toolTipProps?: Omit<TooltipProps, "children">;
36
+ }
37
+ declare function MyButtonModal({ disclosure, children, buttonProps, actionIconProps, modalProps, isActionIcon, toolTipProps, }: MyButtonModalProps): react_jsx_runtime.JSX.Element;
38
+
39
+ interface MyDataTableInternalProps<TData extends MRT_RowData> extends Omit<MyDataTableProps<TData>, "columns" | "data"> {
40
+ }
41
+ interface PaginationState {
42
+ pageIndex: number;
43
+ pageSize: number;
44
+ }
45
+ interface MyDataTableProps<TData extends MRT_RowData> extends MRT_TableOptions<TData> {
46
+ columns: MRT_ColumnDef<TData>[];
47
+ data: TData[];
48
+ rowActionSize?: number;
49
+ setSelectedRow?: (data: TData[]) => void;
50
+ isError?: boolean;
51
+ /** Dùng để loading bảng khi gọi api fetch data */
52
+ isLoading?: boolean;
53
+ exportAble?: boolean;
54
+ pagination?: PaginationState;
55
+ idSelectionOne?: string;
56
+ setIdSelectionOne?: (value: string) => void;
57
+ visibleFields?: (({} & string) | DeepKeys<TData>)[];
58
+ }
59
+ declare function MyDataTable<TData extends MRT_RowData>({ rowActionSize, columns, data, setSelectedRow, isError, isLoading, pagination, idSelectionOne, setIdSelectionOne, renderTopToolbarCustomActions, visibleFields, ...rest }: MyDataTableProps<TData>): react_jsx_runtime.JSX.Element;
60
+
61
+ export { type MyButtonModalProps as M, type PaginationState as P, type MyActionIconProps as a, type MyButtonProps as b, type MyDataTableProps as c, MyActionIcon as d, MyButton as e, MyButtonModal as f, type MyDataTableInternalProps as g, MyDataTable as h };
@@ -0,0 +1,12 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { SelectProps } from '@mantine/core';
3
+ import { ReactNode } from 'react';
4
+
5
+ interface MySelectProps extends SelectProps {
6
+ label?: ReactNode;
7
+ isLoading?: boolean;
8
+ isError?: boolean;
9
+ }
10
+ declare function MySelect({ label, isLoading, isError, ...rest }: MySelectProps): react_jsx_runtime.JSX.Element;
11
+
12
+ export { type MySelectProps as M, MySelect as a };
@@ -0,0 +1,33 @@
1
+ import * as zustand from 'zustand';
2
+
3
+ interface GenericStore<T> {
4
+ state: T;
5
+ setState: (newState: T) => void;
6
+ setProperty: <K extends keyof T>(key: K, value: T[K]) => void;
7
+ resetState: () => void;
8
+ }
9
+ declare function createGenericStore<T>({ initialState, storageKey }: {
10
+ initialState: T;
11
+ storageKey?: string;
12
+ }): zustand.UseBoundStore<zustand.StoreApi<GenericStore<T>>>;
13
+
14
+ interface ITenantSetting<TKey = string> {
15
+ settingKey?: TKey;
16
+ settingValue?: string | boolean | number;
17
+ description?: string;
18
+ }
19
+ interface IStoreState<TKey = string> {
20
+ tenantSettings?: ITenantSetting<TKey>[];
21
+ }
22
+ declare function createTenantSettingsStore<TKey>(params: {
23
+ storageKey?: string;
24
+ initialState?: Partial<IStoreState<TKey>>;
25
+ }): () => {
26
+ getSetting: (settingKey: TKey) => string | boolean | number | undefined;
27
+ state: IStoreState<TKey>;
28
+ setState: (newState: IStoreState<TKey>) => void;
29
+ setProperty: <K extends "tenantSettings">(key: K, value: IStoreState<TKey>[K]) => void;
30
+ resetState: () => void;
31
+ };
32
+
33
+ export { type IStoreState, type ITenantSetting, createGenericStore, createTenantSettingsStore };
@@ -0,0 +1,51 @@
1
+ import { create } from 'zustand';
2
+ import { persist } from 'zustand/middleware';
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __defProps = Object.defineProperties;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ function createGenericStore({ initialState, storageKey }) {
24
+ const storeCreator = (set) => ({
25
+ state: initialState,
26
+ setState: (newState) => set({ state: newState }),
27
+ setProperty: (key, value) => set((store) => ({ state: __spreadProps(__spreadValues({}, store.state), { [key]: value }) })),
28
+ resetState: () => set({ state: initialState })
29
+ });
30
+ return storageKey ? create(persist(storeCreator, { name: storageKey })) : create(storeCreator);
31
+ }
32
+
33
+ // src/build-object/createTenantSettingsStore.ts
34
+ function createTenantSettingsStore(params) {
35
+ const useStore = createGenericStore({
36
+ initialState: params.initialState || {},
37
+ storageKey: params.storageKey || "useStore_TenantSettings"
38
+ });
39
+ return function useTenantSettingsStore() {
40
+ const store = useStore();
41
+ function getSetting(settingKey) {
42
+ var _a, _b;
43
+ return (_b = (_a = store.state.tenantSettings) == null ? void 0 : _a.find((s) => s.settingKey === settingKey)) == null ? void 0 : _b.settingValue;
44
+ }
45
+ return __spreadProps(__spreadValues({}, store), {
46
+ getSetting
47
+ });
48
+ };
49
+ }
50
+
51
+ export { createGenericStore, createTenantSettingsStore };