@fctc/widget-logic 1.6.0 → 1.6.2
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/config.d.mts +6 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.js +21380 -0
- package/dist/config.mjs +21376 -0
- package/dist/constants.d.mts +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +205 -0
- package/dist/constants.mjs +166 -0
- package/dist/environment.d.mts +1 -0
- package/dist/environment.d.ts +1 -0
- package/dist/environment.js +24078 -0
- package/dist/environment.mjs +24071 -0
- package/dist/hooks.d.mts +970 -0
- package/dist/hooks.d.ts +970 -0
- package/dist/hooks.js +28158 -0
- package/dist/hooks.mjs +28073 -0
- package/dist/icons.d.mts +11 -0
- package/dist/icons.d.ts +11 -0
- package/dist/icons.js +139 -0
- package/dist/icons.mjs +110 -0
- package/dist/index.d.mts +18 -4
- package/dist/index.d.ts +18 -4
- package/dist/index.js +35803 -238
- package/dist/index.mjs +35559 -217
- package/dist/provider.d.mts +1 -0
- package/dist/provider.d.ts +1 -0
- package/dist/provider.js +24974 -0
- package/dist/provider.mjs +24968 -0
- package/dist/services.d.mts +1 -0
- package/dist/services.d.ts +1 -0
- package/dist/services.js +25660 -0
- package/dist/services.mjs +25648 -0
- package/dist/store.d.mts +1 -0
- package/dist/store.d.ts +1 -0
- package/dist/store.js +3169 -0
- package/dist/store.mjs +3083 -0
- package/dist/types.d.mts +31 -0
- package/dist/types.d.ts +31 -0
- package/dist/types.js +18 -0
- package/dist/types.mjs +0 -0
- package/dist/utils.d.mts +38 -0
- package/dist/utils.d.ts +38 -0
- package/dist/utils.js +7225 -0
- package/dist/utils.mjs +7176 -0
- package/dist/widget.d.mts +299 -0
- package/dist/widget.d.ts +299 -0
- package/dist/widget.js +32278 -0
- package/dist/widget.mjs +32256 -0
- package/package.json +93 -52
- package/dist/action.d.mts +0 -68
- package/dist/action.d.ts +0 -68
- package/dist/action.js +0 -152
- package/dist/action.mjs +0 -122
- package/dist/common.d.mts +0 -13
- package/dist/common.d.ts +0 -13
- package/dist/common.js +0 -60
- package/dist/common.mjs +0 -33
- package/dist/form.d.mts +0 -42
- package/dist/form.d.ts +0 -42
- package/dist/form.js +0 -116
- package/dist/form.mjs +0 -87
- package/dist/table.d.mts +0 -22
- package/dist/table.d.ts +0 -22
- package/dist/table.js +0 -118
- package/dist/table.mjs +0 -91
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from '@fctc/interface-logic/types';
|
|
2
|
+
|
|
3
|
+
interface ValuePropsType {
|
|
4
|
+
id: number | string;
|
|
5
|
+
display_name: number | string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
interface IInputFieldProps {
|
|
9
|
+
name?: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
defaultValue?: string | number | ValuePropsType;
|
|
15
|
+
invisible?: boolean;
|
|
16
|
+
methods?: any;
|
|
17
|
+
onChange?: (name: string, value: any) => void;
|
|
18
|
+
onBlur?: Function;
|
|
19
|
+
onRefetch?: Function;
|
|
20
|
+
isForm?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
value?: string | number | ValuePropsType | null | Record<any, any> | any;
|
|
23
|
+
string?: string;
|
|
24
|
+
isEditTable?: boolean;
|
|
25
|
+
formValues?: any;
|
|
26
|
+
model?: string;
|
|
27
|
+
relation?: string;
|
|
28
|
+
domain?: any;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type { IInputFieldProps, ValuePropsType };
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from '@fctc/interface-logic/types';
|
|
2
|
+
|
|
3
|
+
interface ValuePropsType {
|
|
4
|
+
id: number | string;
|
|
5
|
+
display_name: number | string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
interface IInputFieldProps {
|
|
9
|
+
name?: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
defaultValue?: string | number | ValuePropsType;
|
|
15
|
+
invisible?: boolean;
|
|
16
|
+
methods?: any;
|
|
17
|
+
onChange?: (name: string, value: any) => void;
|
|
18
|
+
onBlur?: Function;
|
|
19
|
+
onRefetch?: Function;
|
|
20
|
+
isForm?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
value?: string | number | ValuePropsType | null | Record<any, any> | any;
|
|
23
|
+
string?: string;
|
|
24
|
+
isEditTable?: boolean;
|
|
25
|
+
formValues?: any;
|
|
26
|
+
model?: string;
|
|
27
|
+
relation?: string;
|
|
28
|
+
domain?: any;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type { IInputFieldProps, ValuePropsType };
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/types.ts
|
|
17
|
+
var types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(types_exports);
|
package/dist/types.mjs
ADDED
|
File without changes
|
package/dist/utils.d.mts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export * from '@fctc/interface-logic/utils';
|
|
2
|
+
|
|
3
|
+
declare const languages: {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}[];
|
|
7
|
+
declare const API_PRESCHOOL_URL: {
|
|
8
|
+
baseURL: string;
|
|
9
|
+
};
|
|
10
|
+
declare const API_APP_URL: {
|
|
11
|
+
baseUrl: string;
|
|
12
|
+
c2: string;
|
|
13
|
+
apiV2: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
declare const countSum: (data: any[], field: string) => number;
|
|
17
|
+
declare function mergeButtons(fields: any): any;
|
|
18
|
+
declare function useGetRowIds(tableRef: React.RefObject<HTMLTableElement | null>): {
|
|
19
|
+
rowIds: string[];
|
|
20
|
+
refresh: () => void;
|
|
21
|
+
};
|
|
22
|
+
declare const getDateRange: (currentDate: any, unit: string) => string[][];
|
|
23
|
+
declare const convertFieldsToArray: (fields: any[] | undefined | null) => any[];
|
|
24
|
+
declare function combineContexts(contexts: ({
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
} | undefined)[]): {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
} | undefined;
|
|
29
|
+
declare const STORAGES: {
|
|
30
|
+
readonly TOKEN: "accessToken";
|
|
31
|
+
readonly USER_INFO: "USER_INFO";
|
|
32
|
+
};
|
|
33
|
+
type UseStateHook<T> = [[boolean, T | null], (value: T | null) => void];
|
|
34
|
+
type StorageKey = keyof typeof STORAGES;
|
|
35
|
+
declare function setStorageItemAsync(key: StorageKey, value: string | null): Promise<void>;
|
|
36
|
+
declare function useStorageState(key: StorageKey): UseStateHook<string>;
|
|
37
|
+
|
|
38
|
+
export { API_APP_URL, API_PRESCHOOL_URL, STORAGES, combineContexts, convertFieldsToArray, countSum, getDateRange, languages, mergeButtons, setStorageItemAsync, useGetRowIds, useStorageState };
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export * from '@fctc/interface-logic/utils';
|
|
2
|
+
|
|
3
|
+
declare const languages: {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}[];
|
|
7
|
+
declare const API_PRESCHOOL_URL: {
|
|
8
|
+
baseURL: string;
|
|
9
|
+
};
|
|
10
|
+
declare const API_APP_URL: {
|
|
11
|
+
baseUrl: string;
|
|
12
|
+
c2: string;
|
|
13
|
+
apiV2: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
declare const countSum: (data: any[], field: string) => number;
|
|
17
|
+
declare function mergeButtons(fields: any): any;
|
|
18
|
+
declare function useGetRowIds(tableRef: React.RefObject<HTMLTableElement | null>): {
|
|
19
|
+
rowIds: string[];
|
|
20
|
+
refresh: () => void;
|
|
21
|
+
};
|
|
22
|
+
declare const getDateRange: (currentDate: any, unit: string) => string[][];
|
|
23
|
+
declare const convertFieldsToArray: (fields: any[] | undefined | null) => any[];
|
|
24
|
+
declare function combineContexts(contexts: ({
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
} | undefined)[]): {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
} | undefined;
|
|
29
|
+
declare const STORAGES: {
|
|
30
|
+
readonly TOKEN: "accessToken";
|
|
31
|
+
readonly USER_INFO: "USER_INFO";
|
|
32
|
+
};
|
|
33
|
+
type UseStateHook<T> = [[boolean, T | null], (value: T | null) => void];
|
|
34
|
+
type StorageKey = keyof typeof STORAGES;
|
|
35
|
+
declare function setStorageItemAsync(key: StorageKey, value: string | null): Promise<void>;
|
|
36
|
+
declare function useStorageState(key: StorageKey): UseStateHook<string>;
|
|
37
|
+
|
|
38
|
+
export { API_APP_URL, API_PRESCHOOL_URL, STORAGES, combineContexts, convertFieldsToArray, countSum, getDateRange, languages, mergeButtons, setStorageItemAsync, useGetRowIds, useStorageState };
|