@pisell/pisellos 0.0.220 → 0.0.221
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/README.md +180 -180
- package/dist/core/index.js +4 -4
- package/dist/index.js +3 -3
- package/dist/modules/Account/types.js +6 -6
- package/dist/modules/AccountList/index.js +14 -14
- package/dist/modules/AccountList/types.js +14 -14
- package/dist/modules/AccountList/utils.js +5 -5
- package/dist/modules/Cart/index.js +35 -35
- package/dist/modules/Cart/types.js +14 -14
- package/dist/modules/Cart/utils/cartAccount.js +8 -8
- package/dist/modules/Cart/utils/cartDate.js +12 -12
- package/dist/modules/Cart/utils/cartDiscount.js +8 -8
- package/dist/modules/Cart/utils/cartNote.js +8 -8
- package/dist/modules/Cart/utils/cartProduct.js +39 -39
- package/dist/modules/Cart/utils/cartRelationForms.js +8 -8
- package/dist/modules/Cart/utils/cartResource.js +8 -8
- package/dist/modules/Cart/utils/index.js +4 -4
- package/dist/modules/Customer/index.js +67 -67
- package/dist/modules/Customer/types.js +18 -18
- package/dist/modules/Date/types.js +6 -6
- package/dist/modules/Date/utils.js +25 -25
- package/dist/modules/Guests/types.js +8 -8
- package/dist/modules/Order/types.js +4 -4
- package/dist/modules/Order/utils.js +8 -8
- package/dist/modules/Payment/cash.js +2 -2
- package/dist/modules/Payment/eftpos.js +2 -2
- package/dist/modules/Payment/index.js +135 -135
- package/dist/modules/Payment/types.js +50 -50
- package/dist/modules/Payment/wallet.js +2 -2
- package/dist/modules/Product/index.js +22 -22
- package/dist/modules/Product/utils.js +12 -12
- package/dist/modules/ProductList/index.js +4 -4
- package/dist/modules/Resource/types.js +8 -8
- package/dist/modules/Resource/utils.js +14 -14
- package/dist/modules/Schedule/index.js +4 -4
- package/dist/modules/Schedule/utils.js +73 -73
- package/dist/modules/Step/index.js +18 -18
- package/dist/modules/Summary/index.js +4 -4
- package/dist/modules/Summary/utils.js +15 -15
- package/dist/plugins/app-types/app/app.d.ts +83 -83
- package/dist/plugins/app-types/app/const.d.ts +4 -4
- package/dist/plugins/app-types/app/index.d.ts +14 -14
- package/dist/plugins/app-types/applicationManager/application.d.ts +50 -50
- package/dist/plugins/app-types/applicationManager/index.d.ts +13 -13
- package/dist/plugins/app-types/config.d.ts +3 -3
- package/dist/plugins/app-types/cookie/index.d.ts +13 -13
- package/dist/plugins/app-types/data/index.d.ts +8 -8
- package/dist/plugins/app-types/history/config.d.ts +24 -24
- package/dist/plugins/app-types/history/index.d.ts +20 -20
- package/dist/plugins/app-types/history/type.d.ts +2 -2
- package/dist/plugins/app-types/hooks/index.d.ts +12 -12
- package/dist/plugins/app-types/hooks/useDelayedValue/index.d.ts +2 -2
- package/dist/plugins/app-types/hooks/useDispatch/index.d.ts +2 -2
- package/dist/plugins/app-types/hooks/useLowCode/index.d.ts +13 -13
- package/dist/plugins/app-types/hooks/useStore/index.d.ts +6 -6
- package/dist/plugins/app-types/index.d.ts +6 -6
- package/dist/plugins/app-types/indexDB/index.d.ts +178 -178
- package/dist/plugins/app-types/locales/en.d.ts +3 -3
- package/dist/plugins/app-types/locales/index.d.ts +37 -37
- package/dist/plugins/app-types/locales/original.d.ts +3 -3
- package/dist/plugins/app-types/locales/type.d.ts +19 -19
- package/dist/plugins/app-types/locales/zh-CN.d.ts +3 -3
- package/dist/plugins/app-types/locales/zh-HK.d.ts +3 -3
- package/dist/plugins/app-types/logger/feishu.d.ts +11 -11
- package/dist/plugins/app-types/logger/index.d.ts +122 -122
- package/dist/plugins/app-types/menuManager/hooks.d.ts +17 -17
- package/dist/plugins/app-types/menuManager/index.d.ts +28 -28
- package/dist/plugins/app-types/models/global.d.ts +32 -32
- package/dist/plugins/app-types/models/index.d.ts +45 -45
- package/dist/plugins/app-types/models/type.d.ts +2 -2
- package/dist/plugins/app-types/package.json +14 -14
- package/dist/plugins/app-types/pubsub/example.d.ts +5 -5
- package/dist/plugins/app-types/pubsub/index.d.ts +63 -63
- package/dist/plugins/app-types/request/cache.d.ts +46 -46
- package/dist/plugins/app-types/request/cancelToken.d.ts +38 -38
- package/dist/plugins/app-types/request/config.d.ts +3 -3
- package/dist/plugins/app-types/request/constants.d.ts +2 -2
- package/dist/plugins/app-types/request/index.d.ts +24 -24
- package/dist/plugins/app-types/request/pisell2Request.d.ts +6 -6
- package/dist/plugins/app-types/request/type.d.ts +41 -41
- package/dist/plugins/app-types/request/utils.d.ts +46 -46
- package/dist/plugins/app-types/routes/config.d.ts +7 -7
- package/dist/plugins/app-types/routes/index.d.ts +28 -28
- package/dist/plugins/app-types/socket/components/SocketMonitorPage.d.ts +6 -6
- package/dist/plugins/app-types/socket/components/index.d.ts +2 -2
- package/dist/plugins/app-types/socket/constants.d.ts +33 -33
- package/dist/plugins/app-types/socket/events.d.ts +31 -31
- package/dist/plugins/app-types/socket/heartbeat.d.ts +66 -66
- package/dist/plugins/app-types/socket/index.d.ts +61 -61
- package/dist/plugins/app-types/socket/monitor.d.ts +169 -169
- package/dist/plugins/app-types/socket/reconnect.d.ts +61 -61
- package/dist/plugins/app-types/socket/socket.d.ts +129 -129
- package/dist/plugins/app-types/socket/types.d.ts +85 -85
- package/dist/plugins/app-types/storage/index.d.ts +17 -17
- package/dist/plugins/app-types/tasks/index.d.ts +77 -77
- package/dist/plugins/app-types/tasks/type.d.ts +62 -62
- package/dist/plugins/app-types/tasks/useTasks.d.ts +5 -5
- package/dist/plugins/app-types/type.d.ts +2 -2
- package/dist/plugins/app-types/variables/VariablesProvider.d.ts +7 -7
- package/dist/plugins/app-types/variables/config.d.ts +3 -3
- package/dist/plugins/app-types/variables/index.d.ts +6 -6
- package/dist/plugins/app-types/variables/type.d.ts +2 -2
- package/dist/plugins/app-types/website/index.d.ts +6 -6
- package/dist/plugins/request.js +33 -33
- package/dist/plugins/window.js +16 -16
- package/dist/solution/BookingByStep/index.js +126 -126
- package/dist/solution/BookingByStep/utils/capacity.js +30 -30
- package/dist/solution/BookingByStep/utils/products.js +4 -4
- package/dist/solution/BookingByStep/utils/resources.js +146 -146
- package/dist/solution/BookingByStep/utils/timeslots.js +20 -20
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.js +82 -86
- package/dist/solution/BookingTicket/types.js +8 -8
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +6 -6
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -4
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +20 -28
- package/dist/solution/BookingTicket/utils/scan/index.js +19 -19
- package/dist/solution/BookingTicket/utils/scan/scanCache.js +52 -52
- package/dist/solution/BuyTickets/types.js +4 -4
- package/dist/utils/task.js +11 -11
- package/dist/utils/watch.js +59 -59
- package/lib/plugins/app-types/app/app.d.ts +83 -83
- package/lib/plugins/app-types/app/const.d.ts +4 -4
- package/lib/plugins/app-types/app/index.d.ts +14 -14
- package/lib/plugins/app-types/applicationManager/application.d.ts +50 -50
- package/lib/plugins/app-types/applicationManager/index.d.ts +13 -13
- package/lib/plugins/app-types/config.d.ts +3 -3
- package/lib/plugins/app-types/cookie/index.d.ts +13 -13
- package/lib/plugins/app-types/data/index.d.ts +8 -8
- package/lib/plugins/app-types/history/config.d.ts +24 -24
- package/lib/plugins/app-types/history/index.d.ts +20 -20
- package/lib/plugins/app-types/history/type.d.ts +2 -2
- package/lib/plugins/app-types/hooks/index.d.ts +12 -12
- package/lib/plugins/app-types/hooks/useDelayedValue/index.d.ts +2 -2
- package/lib/plugins/app-types/hooks/useDispatch/index.d.ts +2 -2
- package/lib/plugins/app-types/hooks/useLowCode/index.d.ts +13 -13
- package/lib/plugins/app-types/hooks/useStore/index.d.ts +6 -6
- package/lib/plugins/app-types/index.d.ts +6 -6
- package/lib/plugins/app-types/indexDB/index.d.ts +178 -178
- package/lib/plugins/app-types/locales/en.d.ts +3 -3
- package/lib/plugins/app-types/locales/index.d.ts +37 -37
- package/lib/plugins/app-types/locales/original.d.ts +3 -3
- package/lib/plugins/app-types/locales/type.d.ts +19 -19
- package/lib/plugins/app-types/locales/zh-CN.d.ts +3 -3
- package/lib/plugins/app-types/locales/zh-HK.d.ts +3 -3
- package/lib/plugins/app-types/logger/feishu.d.ts +11 -11
- package/lib/plugins/app-types/logger/index.d.ts +122 -122
- package/lib/plugins/app-types/menuManager/hooks.d.ts +17 -17
- package/lib/plugins/app-types/menuManager/index.d.ts +28 -28
- package/lib/plugins/app-types/models/global.d.ts +32 -32
- package/lib/plugins/app-types/models/index.d.ts +45 -45
- package/lib/plugins/app-types/models/type.d.ts +2 -2
- package/lib/plugins/app-types/package.json +14 -14
- package/lib/plugins/app-types/pubsub/example.d.ts +5 -5
- package/lib/plugins/app-types/pubsub/index.d.ts +63 -63
- package/lib/plugins/app-types/request/cache.d.ts +46 -46
- package/lib/plugins/app-types/request/cancelToken.d.ts +38 -38
- package/lib/plugins/app-types/request/config.d.ts +3 -3
- package/lib/plugins/app-types/request/constants.d.ts +2 -2
- package/lib/plugins/app-types/request/index.d.ts +24 -24
- package/lib/plugins/app-types/request/pisell2Request.d.ts +6 -6
- package/lib/plugins/app-types/request/type.d.ts +41 -41
- package/lib/plugins/app-types/request/utils.d.ts +46 -46
- package/lib/plugins/app-types/routes/config.d.ts +7 -7
- package/lib/plugins/app-types/routes/index.d.ts +28 -28
- package/lib/plugins/app-types/socket/components/SocketMonitorPage.d.ts +6 -6
- package/lib/plugins/app-types/socket/components/index.d.ts +2 -2
- package/lib/plugins/app-types/socket/constants.d.ts +33 -33
- package/lib/plugins/app-types/socket/events.d.ts +31 -31
- package/lib/plugins/app-types/socket/heartbeat.d.ts +66 -66
- package/lib/plugins/app-types/socket/index.d.ts +61 -61
- package/lib/plugins/app-types/socket/monitor.d.ts +169 -169
- package/lib/plugins/app-types/socket/reconnect.d.ts +61 -61
- package/lib/plugins/app-types/socket/socket.d.ts +129 -129
- package/lib/plugins/app-types/socket/types.d.ts +85 -85
- package/lib/plugins/app-types/storage/index.d.ts +17 -17
- package/lib/plugins/app-types/tasks/index.d.ts +77 -77
- package/lib/plugins/app-types/tasks/type.d.ts +62 -62
- package/lib/plugins/app-types/tasks/useTasks.d.ts +5 -5
- package/lib/plugins/app-types/type.d.ts +2 -2
- package/lib/plugins/app-types/variables/VariablesProvider.d.ts +7 -7
- package/lib/plugins/app-types/variables/config.d.ts +3 -3
- package/lib/plugins/app-types/variables/index.d.ts +6 -6
- package/lib/plugins/app-types/variables/type.d.ts +2 -2
- package/lib/plugins/app-types/website/index.d.ts +6 -6
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.js +1 -2
- package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -4
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -14
- package/package.json +1 -1
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import { RouterManager } from '../routes';
|
|
2
|
-
import { ApplicationManager } from '../applicationManager';
|
|
3
|
-
import { History, HistoryOptions } from '../history';
|
|
4
|
-
import { Data } from '../data';
|
|
5
|
-
import { Locales, LocalesOptions } from '../locales';
|
|
6
|
-
import { Storage, StorageOptions } from '../storage';
|
|
7
|
-
import { MenuManager } from '../menuManager';
|
|
8
|
-
import LoggerManager, { LoggerOptions } from '../logger';
|
|
9
|
-
import { TasksManager } from '../tasks';
|
|
10
|
-
import IndexDBManager, { DBOptions } from '../indexDB';
|
|
11
|
-
declare global {
|
|
12
|
-
interface Window {
|
|
13
|
-
app: App;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export interface AppOptions {
|
|
17
|
-
logger?: LoggerOptions;
|
|
18
|
-
db?: DBOptions;
|
|
19
|
-
constants?: any;
|
|
20
|
-
history?: HistoryOptions;
|
|
21
|
-
storage?: StorageOptions;
|
|
22
|
-
locales?: LocalesOptions;
|
|
23
|
-
}
|
|
24
|
-
declare class App {
|
|
25
|
-
private static instance;
|
|
26
|
-
private plugins;
|
|
27
|
-
globalData: any;
|
|
28
|
-
router: RouterManager;
|
|
29
|
-
applicationManager: ApplicationManager;
|
|
30
|
-
history: History;
|
|
31
|
-
data: Data;
|
|
32
|
-
hooks: import("../hooks").HooksExport;
|
|
33
|
-
locales: Locales;
|
|
34
|
-
models: {
|
|
35
|
-
getStore: () => import("../models").Store;
|
|
36
|
-
StoreProvider: typeof import("react-redux").Provider;
|
|
37
|
-
setConfig: (models: any[]) => void;
|
|
38
|
-
};
|
|
39
|
-
request: {
|
|
40
|
-
get: (url: import("../request").RequestWrapperProps["url"], data: import("../request").RequestWrapperProps["data"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
|
|
41
|
-
post: (url: import("../request").RequestWrapperProps["url"], data: import("../request").RequestWrapperProps["data"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
|
|
42
|
-
put: (url: import("../request").RequestWrapperProps["url"], data: import("../request").RequestWrapperProps["data"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
|
|
43
|
-
remove: (url: import("../request").RequestWrapperProps["url"], data: import("../request").RequestWrapperProps["data"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
|
|
44
|
-
custom: (url: import("../request").RequestWrapperProps["url"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
|
|
45
|
-
setConfig: (newConfig: Partial<import("../request").RequestConfig>) => void;
|
|
46
|
-
getConfig: () => import("../request").RequestConfig;
|
|
47
|
-
};
|
|
48
|
-
storage: Storage;
|
|
49
|
-
menuManager: MenuManager;
|
|
50
|
-
cookie: {
|
|
51
|
-
setCookie: (name: string, value: string, domain?: string) => void;
|
|
52
|
-
getCookie: (name: string) => string | null;
|
|
53
|
-
deleteCookie: (name: string, domain?: string) => void;
|
|
54
|
-
checkCookie: (name: string) => boolean;
|
|
55
|
-
updateCookie: (name: string, value: string, domain?: string) => void;
|
|
56
|
-
};
|
|
57
|
-
website: {
|
|
58
|
-
setTitle: (title: string) => void;
|
|
59
|
-
setIcon: (paramsIcon: string) => void;
|
|
60
|
-
setAppleWebAppTitle: (title: string) => void;
|
|
61
|
-
};
|
|
62
|
-
logger: LoggerManager;
|
|
63
|
-
pubsub: import("../pubsub").PubSub;
|
|
64
|
-
tasksManager: TasksManager;
|
|
65
|
-
dbManager: IndexDBManager | null;
|
|
66
|
-
constants: {
|
|
67
|
-
channel: string;
|
|
68
|
-
[key: string]: string;
|
|
69
|
-
};
|
|
70
|
-
private constructor();
|
|
71
|
-
static getInstance(options?: AppOptions): App;
|
|
72
|
-
setGlobalData(globalData: any): void;
|
|
73
|
-
usePlugin(name: string, plugin: any): void;
|
|
74
|
-
usePlugins(plugins: {
|
|
75
|
-
name: string;
|
|
76
|
-
plugin: any;
|
|
77
|
-
}[]): void;
|
|
78
|
-
getPlugin(name: string): any;
|
|
79
|
-
getGlobalData(): any;
|
|
80
|
-
install(): void;
|
|
81
|
-
unInstall(): void;
|
|
82
|
-
}
|
|
83
|
-
export default App;
|
|
1
|
+
import { RouterManager } from '../routes';
|
|
2
|
+
import { ApplicationManager } from '../applicationManager';
|
|
3
|
+
import { History, HistoryOptions } from '../history';
|
|
4
|
+
import { Data } from '../data';
|
|
5
|
+
import { Locales, LocalesOptions } from '../locales';
|
|
6
|
+
import { Storage, StorageOptions } from '../storage';
|
|
7
|
+
import { MenuManager } from '../menuManager';
|
|
8
|
+
import LoggerManager, { LoggerOptions } from '../logger';
|
|
9
|
+
import { TasksManager } from '../tasks';
|
|
10
|
+
import IndexDBManager, { DBOptions } from '../indexDB';
|
|
11
|
+
declare global {
|
|
12
|
+
interface Window {
|
|
13
|
+
app: App;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export interface AppOptions {
|
|
17
|
+
logger?: LoggerOptions;
|
|
18
|
+
db?: DBOptions;
|
|
19
|
+
constants?: any;
|
|
20
|
+
history?: HistoryOptions;
|
|
21
|
+
storage?: StorageOptions;
|
|
22
|
+
locales?: LocalesOptions;
|
|
23
|
+
}
|
|
24
|
+
declare class App {
|
|
25
|
+
private static instance;
|
|
26
|
+
private plugins;
|
|
27
|
+
globalData: any;
|
|
28
|
+
router: RouterManager;
|
|
29
|
+
applicationManager: ApplicationManager;
|
|
30
|
+
history: History;
|
|
31
|
+
data: Data;
|
|
32
|
+
hooks: import("../hooks").HooksExport;
|
|
33
|
+
locales: Locales;
|
|
34
|
+
models: {
|
|
35
|
+
getStore: () => import("../models").Store;
|
|
36
|
+
StoreProvider: typeof import("react-redux").Provider;
|
|
37
|
+
setConfig: (models: any[]) => void;
|
|
38
|
+
};
|
|
39
|
+
request: {
|
|
40
|
+
get: (url: import("../request").RequestWrapperProps["url"], data: import("../request").RequestWrapperProps["data"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
|
|
41
|
+
post: (url: import("../request").RequestWrapperProps["url"], data: import("../request").RequestWrapperProps["data"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
|
|
42
|
+
put: (url: import("../request").RequestWrapperProps["url"], data: import("../request").RequestWrapperProps["data"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
|
|
43
|
+
remove: (url: import("../request").RequestWrapperProps["url"], data: import("../request").RequestWrapperProps["data"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
|
|
44
|
+
custom: (url: import("../request").RequestWrapperProps["url"], config: import("../request").RequestWrapperProps["config"]) => Promise<any>;
|
|
45
|
+
setConfig: (newConfig: Partial<import("../request").RequestConfig>) => void;
|
|
46
|
+
getConfig: () => import("../request").RequestConfig;
|
|
47
|
+
};
|
|
48
|
+
storage: Storage;
|
|
49
|
+
menuManager: MenuManager;
|
|
50
|
+
cookie: {
|
|
51
|
+
setCookie: (name: string, value: string, domain?: string) => void;
|
|
52
|
+
getCookie: (name: string) => string | null;
|
|
53
|
+
deleteCookie: (name: string, domain?: string) => void;
|
|
54
|
+
checkCookie: (name: string) => boolean;
|
|
55
|
+
updateCookie: (name: string, value: string, domain?: string) => void;
|
|
56
|
+
};
|
|
57
|
+
website: {
|
|
58
|
+
setTitle: (title: string) => void;
|
|
59
|
+
setIcon: (paramsIcon: string) => void;
|
|
60
|
+
setAppleWebAppTitle: (title: string) => void;
|
|
61
|
+
};
|
|
62
|
+
logger: LoggerManager;
|
|
63
|
+
pubsub: import("../pubsub").PubSub;
|
|
64
|
+
tasksManager: TasksManager;
|
|
65
|
+
dbManager: IndexDBManager | null;
|
|
66
|
+
constants: {
|
|
67
|
+
channel: string;
|
|
68
|
+
[key: string]: string;
|
|
69
|
+
};
|
|
70
|
+
private constructor();
|
|
71
|
+
static getInstance(options?: AppOptions): App;
|
|
72
|
+
setGlobalData(globalData: any): void;
|
|
73
|
+
usePlugin(name: string, plugin: any): void;
|
|
74
|
+
usePlugins(plugins: {
|
|
75
|
+
name: string;
|
|
76
|
+
plugin: any;
|
|
77
|
+
}[]): void;
|
|
78
|
+
getPlugin(name: string): any;
|
|
79
|
+
getGlobalData(): any;
|
|
80
|
+
install(): void;
|
|
81
|
+
unInstall(): void;
|
|
82
|
+
}
|
|
83
|
+
export default App;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare enum APPEvent {
|
|
2
|
-
APP_INSTALL = "app.install",
|
|
3
|
-
APP_UNINSTALL = "app.uninstall"
|
|
4
|
-
}
|
|
1
|
+
export declare enum APPEvent {
|
|
2
|
+
APP_INSTALL = "app.install",
|
|
3
|
+
APP_UNINSTALL = "app.uninstall"
|
|
4
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import App, { AppOptions } from "./app";
|
|
3
|
-
type AppContextType = {
|
|
4
|
-
globalData: any;
|
|
5
|
-
setGlobalData: React.Dispatch<React.SetStateAction<any>>;
|
|
6
|
-
app: App;
|
|
7
|
-
};
|
|
8
|
-
export declare const AppProvider: React.FC<{
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
options: AppOptions;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const useApp: () => AppContextType;
|
|
13
|
-
export declare const getApp: typeof App.getInstance;
|
|
14
|
-
export default App;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import App, { AppOptions } from "./app";
|
|
3
|
+
type AppContextType = {
|
|
4
|
+
globalData: any;
|
|
5
|
+
setGlobalData: React.Dispatch<React.SetStateAction<any>>;
|
|
6
|
+
app: App;
|
|
7
|
+
};
|
|
8
|
+
export declare const AppProvider: React.FC<{
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
options: AppOptions;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const useApp: () => AppContextType;
|
|
13
|
+
export declare const getApp: typeof App.getInstance;
|
|
14
|
+
export default App;
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import App from "../app";
|
|
2
|
-
import { LoadLibraryByUrlParams } from "../locales/type";
|
|
3
|
-
import { MenuItem } from "../menuManager/index";
|
|
4
|
-
export type ApplicationInterface = {
|
|
5
|
-
page_type: "low_code" | "code";
|
|
6
|
-
page_id: number | string;
|
|
7
|
-
page_code: string;
|
|
8
|
-
page_version?: string;
|
|
9
|
-
page_name: string;
|
|
10
|
-
router: string;
|
|
11
|
-
category: "page" | "component" | "function";
|
|
12
|
-
Component?: any;
|
|
13
|
-
children?: any;
|
|
14
|
-
layout?: string;
|
|
15
|
-
originalUrl?: string;
|
|
16
|
-
};
|
|
17
|
-
export type ApplicationData = {
|
|
18
|
-
app_id: number;
|
|
19
|
-
app_name: string;
|
|
20
|
-
app_type: "system" | "custom";
|
|
21
|
-
interfaces: ApplicationInterface[];
|
|
22
|
-
functions?: any[];
|
|
23
|
-
menu?: {
|
|
24
|
-
[key: string]: MenuItem[];
|
|
25
|
-
};
|
|
26
|
-
locales?: LoadLibraryByUrlParams;
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
};
|
|
29
|
-
export declare class Application {
|
|
30
|
-
options: ApplicationData;
|
|
31
|
-
name: ApplicationData["app_name"];
|
|
32
|
-
interfaces: Map<ApplicationInterface["page_name"], ApplicationInterface>;
|
|
33
|
-
components: Map<string, any>;
|
|
34
|
-
functions: Map<string, any>;
|
|
35
|
-
app: App;
|
|
36
|
-
constructor(options: ApplicationData, app: App);
|
|
37
|
-
afterAdd(application: Application): Promise<void>;
|
|
38
|
-
beforeLoad(): Promise<void>;
|
|
39
|
-
load(): Promise<void>;
|
|
40
|
-
initInterfaces(interfaces: ApplicationData["interfaces"]): void;
|
|
41
|
-
initFunctions(functions: ApplicationData["functions"]): void;
|
|
42
|
-
loadInterface(interfaceItem: ApplicationInterface): Promise<ApplicationInterface>;
|
|
43
|
-
setInterface(code: string, interfaceItem: ApplicationInterface): void;
|
|
44
|
-
setComponent(code: string, component: ApplicationInterface): void;
|
|
45
|
-
setFunction(code: string, functionItem: ApplicationInterface): void;
|
|
46
|
-
getInterface(code: string): ApplicationInterface | undefined;
|
|
47
|
-
getComponent(code: string): any;
|
|
48
|
-
getFunction(code: string): any;
|
|
49
|
-
runFunction(code: string, params?: any, ...args: any): any;
|
|
50
|
-
}
|
|
1
|
+
import App from "../app";
|
|
2
|
+
import { LoadLibraryByUrlParams } from "../locales/type";
|
|
3
|
+
import { MenuItem } from "../menuManager/index";
|
|
4
|
+
export type ApplicationInterface = {
|
|
5
|
+
page_type: "low_code" | "code";
|
|
6
|
+
page_id: number | string;
|
|
7
|
+
page_code: string;
|
|
8
|
+
page_version?: string;
|
|
9
|
+
page_name: string;
|
|
10
|
+
router: string;
|
|
11
|
+
category: "page" | "component" | "function";
|
|
12
|
+
Component?: any;
|
|
13
|
+
children?: any;
|
|
14
|
+
layout?: string;
|
|
15
|
+
originalUrl?: string;
|
|
16
|
+
};
|
|
17
|
+
export type ApplicationData = {
|
|
18
|
+
app_id: number;
|
|
19
|
+
app_name: string;
|
|
20
|
+
app_type: "system" | "custom";
|
|
21
|
+
interfaces: ApplicationInterface[];
|
|
22
|
+
functions?: any[];
|
|
23
|
+
menu?: {
|
|
24
|
+
[key: string]: MenuItem[];
|
|
25
|
+
};
|
|
26
|
+
locales?: LoadLibraryByUrlParams;
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
};
|
|
29
|
+
export declare class Application {
|
|
30
|
+
options: ApplicationData;
|
|
31
|
+
name: ApplicationData["app_name"];
|
|
32
|
+
interfaces: Map<ApplicationInterface["page_name"], ApplicationInterface>;
|
|
33
|
+
components: Map<string, any>;
|
|
34
|
+
functions: Map<string, any>;
|
|
35
|
+
app: App;
|
|
36
|
+
constructor(options: ApplicationData, app: App);
|
|
37
|
+
afterAdd(application: Application): Promise<void>;
|
|
38
|
+
beforeLoad(): Promise<void>;
|
|
39
|
+
load(): Promise<void>;
|
|
40
|
+
initInterfaces(interfaces: ApplicationData["interfaces"]): void;
|
|
41
|
+
initFunctions(functions: ApplicationData["functions"]): void;
|
|
42
|
+
loadInterface(interfaceItem: ApplicationInterface): Promise<ApplicationInterface>;
|
|
43
|
+
setInterface(code: string, interfaceItem: ApplicationInterface): void;
|
|
44
|
+
setComponent(code: string, component: ApplicationInterface): void;
|
|
45
|
+
setFunction(code: string, functionItem: ApplicationInterface): void;
|
|
46
|
+
getInterface(code: string): ApplicationInterface | undefined;
|
|
47
|
+
getComponent(code: string): any;
|
|
48
|
+
getFunction(code: string): any;
|
|
49
|
+
runFunction(code: string, params?: any, ...args: any): any;
|
|
50
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import APP from "../app";
|
|
2
|
-
import { Application, ApplicationData } from "./application";
|
|
3
|
-
export declare class ApplicationManager {
|
|
4
|
-
applicationList: Application[];
|
|
5
|
-
protected app: APP;
|
|
6
|
-
applications: Map<string, Application>;
|
|
7
|
-
constructor(applicationList: Application[] | undefined, app: APP);
|
|
8
|
-
init(applicationList: Application[] | ApplicationData[]): Promise<unknown>;
|
|
9
|
-
add(application: Application): Promise<void>;
|
|
10
|
-
get(appName: Application["name"]): Application | undefined;
|
|
11
|
-
remove(appName: Application["name"]): void;
|
|
12
|
-
load(): Promise<void>;
|
|
13
|
-
}
|
|
1
|
+
import APP from "../app";
|
|
2
|
+
import { Application, ApplicationData } from "./application";
|
|
3
|
+
export declare class ApplicationManager {
|
|
4
|
+
applicationList: Application[];
|
|
5
|
+
protected app: APP;
|
|
6
|
+
applications: Map<string, Application>;
|
|
7
|
+
constructor(applicationList: Application[] | undefined, app: APP);
|
|
8
|
+
init(applicationList: Application[] | ApplicationData[]): Promise<unknown>;
|
|
9
|
+
add(application: Application): Promise<void>;
|
|
10
|
+
get(appName: Application["name"]): Application | undefined;
|
|
11
|
+
remove(appName: Application["name"]): void;
|
|
12
|
+
load(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CoreConfig } from './type';
|
|
2
|
-
export declare const setConfig: (newConfig: Partial<CoreConfig>) => void;
|
|
3
|
-
export declare const getConfig: () => CoreConfig;
|
|
1
|
+
import { CoreConfig } from './type';
|
|
2
|
+
export declare const setConfig: (newConfig: Partial<CoreConfig>) => void;
|
|
3
|
+
export declare const getConfig: () => CoreConfig;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare function setCookie(name: string, value: string, domain?: string): void;
|
|
2
|
-
declare function getCookie(name: string): string | null;
|
|
3
|
-
declare function deleteCookie(name: string, domain?: string): void;
|
|
4
|
-
declare function checkCookie(name: string): boolean;
|
|
5
|
-
declare function updateCookie(name: string, value: string, domain?: string): void;
|
|
6
|
-
declare const _default: {
|
|
7
|
-
setCookie: typeof setCookie;
|
|
8
|
-
getCookie: typeof getCookie;
|
|
9
|
-
deleteCookie: typeof deleteCookie;
|
|
10
|
-
checkCookie: typeof checkCookie;
|
|
11
|
-
updateCookie: typeof updateCookie;
|
|
12
|
-
};
|
|
13
|
-
export default _default;
|
|
1
|
+
declare function setCookie(name: string, value: string, domain?: string): void;
|
|
2
|
+
declare function getCookie(name: string): string | null;
|
|
3
|
+
declare function deleteCookie(name: string, domain?: string): void;
|
|
4
|
+
declare function checkCookie(name: string): boolean;
|
|
5
|
+
declare function updateCookie(name: string, value: string, domain?: string): void;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
setCookie: typeof setCookie;
|
|
8
|
+
getCookie: typeof getCookie;
|
|
9
|
+
deleteCookie: typeof deleteCookie;
|
|
10
|
+
checkCookie: typeof checkCookie;
|
|
11
|
+
updateCookie: typeof updateCookie;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Storage } from '../storage';
|
|
2
|
-
import App from '../app';
|
|
3
|
-
export declare class Data {
|
|
4
|
-
private app;
|
|
5
|
-
storage: Storage;
|
|
6
|
-
store: any;
|
|
7
|
-
constructor(app: App);
|
|
8
|
-
}
|
|
1
|
+
import { Storage } from '../storage';
|
|
2
|
+
import App from '../app';
|
|
3
|
+
export declare class Data {
|
|
4
|
+
private app;
|
|
5
|
+
storage: Storage;
|
|
6
|
+
store: any;
|
|
7
|
+
constructor(app: App);
|
|
8
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { HistoryConfig } from './type';
|
|
2
|
-
/**
|
|
3
|
-
* @title: 默认配置
|
|
4
|
-
* @description:
|
|
5
|
-
* @return {*}
|
|
6
|
-
* @Author: zhiwei.Wang
|
|
7
|
-
*/
|
|
8
|
-
export declare const defaultConfig: HistoryConfig;
|
|
9
|
-
/**
|
|
10
|
-
* @title: 设置配置
|
|
11
|
-
* @description:
|
|
12
|
-
* @param {Partial} newConfig
|
|
13
|
-
* @return {*}
|
|
14
|
-
* @Author: zhiwei.Wang
|
|
15
|
-
*/
|
|
16
|
-
export declare const setConfig: (newConfig: Partial<HistoryConfig>) => HistoryConfig;
|
|
17
|
-
/**
|
|
18
|
-
* @title: 获取配置
|
|
19
|
-
* @description:
|
|
20
|
-
* @param {*} HistoryConfig
|
|
21
|
-
* @return {*}
|
|
22
|
-
* @Author: zhiwei.Wang
|
|
23
|
-
*/
|
|
24
|
-
export declare const getConfig: () => HistoryConfig;
|
|
1
|
+
import { HistoryConfig } from './type';
|
|
2
|
+
/**
|
|
3
|
+
* @title: 默认配置
|
|
4
|
+
* @description:
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: zhiwei.Wang
|
|
7
|
+
*/
|
|
8
|
+
export declare const defaultConfig: HistoryConfig;
|
|
9
|
+
/**
|
|
10
|
+
* @title: 设置配置
|
|
11
|
+
* @description:
|
|
12
|
+
* @param {Partial} newConfig
|
|
13
|
+
* @return {*}
|
|
14
|
+
* @Author: zhiwei.Wang
|
|
15
|
+
*/
|
|
16
|
+
export declare const setConfig: (newConfig: Partial<HistoryConfig>) => HistoryConfig;
|
|
17
|
+
/**
|
|
18
|
+
* @title: 获取配置
|
|
19
|
+
* @description:
|
|
20
|
+
* @param {*} HistoryConfig
|
|
21
|
+
* @return {*}
|
|
22
|
+
* @Author: zhiwei.Wang
|
|
23
|
+
*/
|
|
24
|
+
export declare const getConfig: () => HistoryConfig;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import type { History as HistoryType } from "history";
|
|
2
|
-
import { useHistory, useLocation, useParams } from "react-router-dom";
|
|
3
|
-
import App from "../app";
|
|
4
|
-
export interface HistoryOptions {
|
|
5
|
-
basename?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare class History {
|
|
8
|
-
instance: HistoryType<unknown>;
|
|
9
|
-
useHistory: typeof useHistory;
|
|
10
|
-
useLocation: typeof useLocation;
|
|
11
|
-
useParams: typeof useParams;
|
|
12
|
-
app: App;
|
|
13
|
-
constructor(app: App, options?: HistoryOptions);
|
|
14
|
-
push: HistoryType["push"];
|
|
15
|
-
replace: HistoryType["replace"];
|
|
16
|
-
reload: () => void;
|
|
17
|
-
reloadTo: (path: string) => void;
|
|
18
|
-
externalPage: (path: string) => void;
|
|
19
|
-
goLogin: () => any;
|
|
20
|
-
}
|
|
1
|
+
import type { History as HistoryType } from "history";
|
|
2
|
+
import { useHistory, useLocation, useParams } from "react-router-dom";
|
|
3
|
+
import App from "../app";
|
|
4
|
+
export interface HistoryOptions {
|
|
5
|
+
basename?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class History {
|
|
8
|
+
instance: HistoryType<unknown>;
|
|
9
|
+
useHistory: typeof useHistory;
|
|
10
|
+
useLocation: typeof useLocation;
|
|
11
|
+
useParams: typeof useParams;
|
|
12
|
+
app: App;
|
|
13
|
+
constructor(app: App, options?: HistoryOptions);
|
|
14
|
+
push: HistoryType["push"];
|
|
15
|
+
replace: HistoryType["replace"];
|
|
16
|
+
reload: () => void;
|
|
17
|
+
reloadTo: (path: string) => void;
|
|
18
|
+
externalPage: (path: string) => void;
|
|
19
|
+
goLogin: () => any;
|
|
20
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export interface HistoryConfig {
|
|
2
|
-
}
|
|
1
|
+
export interface HistoryConfig {
|
|
2
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import useLowCode from './useLowCode';
|
|
2
|
-
import useDelayedValue from './useDelayedValue';
|
|
3
|
-
import useStore from './useStore';
|
|
4
|
-
import useDispatch from './useDispatch';
|
|
5
|
-
export interface HooksExport {
|
|
6
|
-
useLowCode: typeof useLowCode;
|
|
7
|
-
useDelayedValue: typeof useDelayedValue;
|
|
8
|
-
useStore: typeof useStore;
|
|
9
|
-
useDispatch: typeof useDispatch;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: HooksExport;
|
|
12
|
-
export default _default;
|
|
1
|
+
import useLowCode from './useLowCode';
|
|
2
|
+
import useDelayedValue from './useDelayedValue';
|
|
3
|
+
import useStore from './useStore';
|
|
4
|
+
import useDispatch from './useDispatch';
|
|
5
|
+
export interface HooksExport {
|
|
6
|
+
useLowCode: typeof useLowCode;
|
|
7
|
+
useDelayedValue: typeof useDelayedValue;
|
|
8
|
+
useStore: typeof useStore;
|
|
9
|
+
useDispatch: typeof useDispatch;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: HooksExport;
|
|
12
|
+
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function useDelayedValue<T>(value: T, timeout?: number): T;
|
|
2
|
-
export default useDelayedValue;
|
|
1
|
+
declare function useDelayedValue<T>(value: T, timeout?: number): T;
|
|
2
|
+
export default useDelayedValue;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { useDispatch } from "react-redux";
|
|
2
|
-
export default useDispatch;
|
|
1
|
+
import { useDispatch } from "react-redux";
|
|
2
|
+
export default useDispatch;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export interface useLowCodeProps {
|
|
2
|
-
onChange: (e: any) => void;
|
|
3
|
-
onReady: (e: any) => void;
|
|
4
|
-
}
|
|
5
|
-
export interface useLowCodeResult {
|
|
6
|
-
lowcodeRef: {
|
|
7
|
-
onReady: (e: any) => void;
|
|
8
|
-
onChange: (e: any) => void;
|
|
9
|
-
};
|
|
10
|
-
setState: (values: any, callback?: any) => any;
|
|
11
|
-
}
|
|
12
|
-
declare const useLowCode: (props: Partial<useLowCodeProps>) => useLowCodeResult;
|
|
13
|
-
export default useLowCode;
|
|
1
|
+
export interface useLowCodeProps {
|
|
2
|
+
onChange: (e: any) => void;
|
|
3
|
+
onReady: (e: any) => void;
|
|
4
|
+
}
|
|
5
|
+
export interface useLowCodeResult {
|
|
6
|
+
lowcodeRef: {
|
|
7
|
+
onReady: (e: any) => void;
|
|
8
|
+
onChange: (e: any) => void;
|
|
9
|
+
};
|
|
10
|
+
setState: (values: any, callback?: any) => any;
|
|
11
|
+
}
|
|
12
|
+
declare const useLowCode: (props: Partial<useLowCodeProps>) => useLowCodeResult;
|
|
13
|
+
export default useLowCode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ModelsState } from "../../models";
|
|
2
|
-
declare const useStore: <T extends keyof ModelsState, D extends keyof ModelsState[T]>(props: {
|
|
3
|
-
models: T;
|
|
4
|
-
key?: D;
|
|
5
|
-
}) => D extends undefined ? ModelsState[T] : ModelsState[T][D];
|
|
6
|
-
export default useStore;
|
|
1
|
+
import { ModelsState } from "../../models";
|
|
2
|
+
declare const useStore: <T extends keyof ModelsState, D extends keyof ModelsState[T]>(props: {
|
|
3
|
+
models: T;
|
|
4
|
+
key?: D;
|
|
5
|
+
}) => D extends undefined ? ModelsState[T] : ModelsState[T][D];
|
|
6
|
+
export default useStore;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as request } from './request';
|
|
2
|
-
export { default as hooks } from './hooks';
|
|
3
|
-
export { default as models } from './models';
|
|
4
|
-
export { default as pubsub } from './pubsub';
|
|
5
|
-
export { default as socket } from './socket';
|
|
6
|
-
export * from './app';
|
|
1
|
+
export { default as request } from './request';
|
|
2
|
+
export { default as hooks } from './hooks';
|
|
3
|
+
export { default as models } from './models';
|
|
4
|
+
export { default as pubsub } from './pubsub';
|
|
5
|
+
export { default as socket } from './socket';
|
|
6
|
+
export * from './app';
|