@fctc/widget-logic 2.4.3 → 2.4.6
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/hooks.d.mts +559 -346
- package/dist/hooks.d.ts +559 -346
- package/dist/hooks.js +604 -480
- package/dist/hooks.mjs +615 -498
- package/dist/index.d.mts +4 -5
- package/dist/index.d.ts +4 -5
- package/dist/index.js +706 -612
- package/dist/index.mjs +799 -647
- package/dist/utils.d.mts +1 -9
- package/dist/utils.d.ts +1 -9
- package/dist/utils.js +0 -12
- package/dist/utils.mjs +0 -10
- package/dist/widget.d.mts +6 -6
- package/dist/widget.d.ts +6 -6
- package/dist/widget.js +168 -713
- package/dist/widget.mjs +258 -745
- package/package.json +2 -2
package/dist/utils.d.mts
CHANGED
|
@@ -4,14 +4,6 @@ declare const languages: {
|
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
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
7
|
|
|
16
8
|
declare const countSum: (data: any[], field: string) => number;
|
|
17
9
|
declare function mergeButtons(fields: any): any;
|
|
@@ -31,4 +23,4 @@ type StorageKey = keyof typeof STORAGES;
|
|
|
31
23
|
declare function setStorageItemAsync(key: StorageKey, value: string | null): Promise<void>;
|
|
32
24
|
declare function useStorageState(key: StorageKey): UseStateHook<string>;
|
|
33
25
|
|
|
34
|
-
export {
|
|
26
|
+
export { STORAGES, combineContexts, convertFieldsToArray, countSum, getDateRange, languages, mergeButtons, setStorageItemAsync, useStorageState };
|
package/dist/utils.d.ts
CHANGED
|
@@ -4,14 +4,6 @@ declare const languages: {
|
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
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
7
|
|
|
16
8
|
declare const countSum: (data: any[], field: string) => number;
|
|
17
9
|
declare function mergeButtons(fields: any): any;
|
|
@@ -31,4 +23,4 @@ type StorageKey = keyof typeof STORAGES;
|
|
|
31
23
|
declare function setStorageItemAsync(key: StorageKey, value: string | null): Promise<void>;
|
|
32
24
|
declare function useStorageState(key: StorageKey): UseStateHook<string>;
|
|
33
25
|
|
|
34
|
-
export {
|
|
26
|
+
export { STORAGES, combineContexts, convertFieldsToArray, countSum, getDateRange, languages, mergeButtons, setStorageItemAsync, useStorageState };
|
package/dist/utils.js
CHANGED
|
@@ -21,8 +21,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
// src/utils.ts
|
|
22
22
|
var utils_exports = {};
|
|
23
23
|
__export(utils_exports, {
|
|
24
|
-
API_APP_URL: () => API_APP_URL,
|
|
25
|
-
API_PRESCHOOL_URL: () => API_PRESCHOOL_URL,
|
|
26
24
|
STORAGES: () => STORAGES,
|
|
27
25
|
combineContexts: () => combineContexts,
|
|
28
26
|
convertFieldsToArray: () => convertFieldsToArray,
|
|
@@ -40,14 +38,6 @@ var languages = [
|
|
|
40
38
|
{ id: "vi_VN", name: "VIE" },
|
|
41
39
|
{ id: "en_US", name: "ENG" }
|
|
42
40
|
];
|
|
43
|
-
var API_PRESCHOOL_URL = {
|
|
44
|
-
baseURL: "https://preschool.vitrust.app"
|
|
45
|
-
};
|
|
46
|
-
var API_APP_URL = {
|
|
47
|
-
baseUrl: "https://api.vitrust.app",
|
|
48
|
-
c2: "https://api.vitrust.app/c2",
|
|
49
|
-
apiV2: "https://api.vitrust.app/c2/api/v2"
|
|
50
|
-
};
|
|
51
41
|
|
|
52
42
|
// src/utils/function.ts
|
|
53
43
|
var import_react = require("react");
|
|
@@ -211,8 +201,6 @@ function useStorageState(key) {
|
|
|
211
201
|
__reExport(utils_exports, require("@fctc/interface-logic/utils"), module.exports);
|
|
212
202
|
// Annotate the CommonJS export names for ESM import in node:
|
|
213
203
|
0 && (module.exports = {
|
|
214
|
-
API_APP_URL,
|
|
215
|
-
API_PRESCHOOL_URL,
|
|
216
204
|
STORAGES,
|
|
217
205
|
combineContexts,
|
|
218
206
|
convertFieldsToArray,
|
package/dist/utils.mjs
CHANGED
|
@@ -3,14 +3,6 @@ var languages = [
|
|
|
3
3
|
{ id: "vi_VN", name: "VIE" },
|
|
4
4
|
{ id: "en_US", name: "ENG" }
|
|
5
5
|
];
|
|
6
|
-
var API_PRESCHOOL_URL = {
|
|
7
|
-
baseURL: "https://preschool.vitrust.app"
|
|
8
|
-
};
|
|
9
|
-
var API_APP_URL = {
|
|
10
|
-
baseUrl: "https://api.vitrust.app",
|
|
11
|
-
c2: "https://api.vitrust.app/c2",
|
|
12
|
-
apiV2: "https://api.vitrust.app/c2/api/v2"
|
|
13
|
-
};
|
|
14
6
|
|
|
15
7
|
// src/utils/function.ts
|
|
16
8
|
import { useCallback, useEffect, useReducer } from "react";
|
|
@@ -173,8 +165,6 @@ function useStorageState(key) {
|
|
|
173
165
|
// src/utils.ts
|
|
174
166
|
export * from "@fctc/interface-logic/utils";
|
|
175
167
|
export {
|
|
176
|
-
API_APP_URL,
|
|
177
|
-
API_PRESCHOOL_URL,
|
|
178
168
|
STORAGES,
|
|
179
169
|
combineContexts,
|
|
180
170
|
convertFieldsToArray,
|
package/dist/widget.d.mts
CHANGED
|
@@ -200,6 +200,12 @@ declare const binaryFieldController: (props: IInputFieldProps) => {
|
|
|
200
200
|
getImageBase64WithMimeType: (base64: any) => string | null;
|
|
201
201
|
};
|
|
202
202
|
|
|
203
|
+
declare const tableHeadController: (props: any) => {
|
|
204
|
+
handleCheckBoxAll: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
205
|
+
checkedAll: any;
|
|
206
|
+
selectedRowKeysRef: react.MutableRefObject<any[]>;
|
|
207
|
+
};
|
|
208
|
+
|
|
203
209
|
interface ITableHeadProps {
|
|
204
210
|
typeTable: string;
|
|
205
211
|
rows: any[];
|
|
@@ -208,12 +214,6 @@ interface ITableHeadProps {
|
|
|
208
214
|
selectedRowKeys: any;
|
|
209
215
|
}
|
|
210
216
|
|
|
211
|
-
declare const tableHeadController: (props: ITableHeadProps) => {
|
|
212
|
-
handleCheckBoxAll: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
213
|
-
checkedAll: any;
|
|
214
|
-
selectedRowKeysRef: react.MutableRefObject<any[]>;
|
|
215
|
-
};
|
|
216
|
-
|
|
217
217
|
interface ITableProps {
|
|
218
218
|
data: {
|
|
219
219
|
fields: any[];
|
package/dist/widget.d.ts
CHANGED
|
@@ -200,6 +200,12 @@ declare const binaryFieldController: (props: IInputFieldProps) => {
|
|
|
200
200
|
getImageBase64WithMimeType: (base64: any) => string | null;
|
|
201
201
|
};
|
|
202
202
|
|
|
203
|
+
declare const tableHeadController: (props: any) => {
|
|
204
|
+
handleCheckBoxAll: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
205
|
+
checkedAll: any;
|
|
206
|
+
selectedRowKeysRef: react.MutableRefObject<any[]>;
|
|
207
|
+
};
|
|
208
|
+
|
|
203
209
|
interface ITableHeadProps {
|
|
204
210
|
typeTable: string;
|
|
205
211
|
rows: any[];
|
|
@@ -208,12 +214,6 @@ interface ITableHeadProps {
|
|
|
208
214
|
selectedRowKeys: any;
|
|
209
215
|
}
|
|
210
216
|
|
|
211
|
-
declare const tableHeadController: (props: ITableHeadProps) => {
|
|
212
|
-
handleCheckBoxAll: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
213
|
-
checkedAll: any;
|
|
214
|
-
selectedRowKeysRef: react.MutableRefObject<any[]>;
|
|
215
|
-
};
|
|
216
|
-
|
|
217
217
|
interface ITableProps {
|
|
218
218
|
data: {
|
|
219
219
|
fields: any[];
|