@pisell/private-materials 6.1.22 → 6.1.24
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +150 -150
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/walletList/index.js +1 -3
- package/es/hooks/useEngineContext.d.ts +1 -8
- package/es/hooks/useEngineContext.js +4 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/hooks/useEngineContext.d.ts +1 -8
- package/lib/hooks/useEngineContext.js +4 -3
- package/package.json +12 -12
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
165
165
|
export declare const getDuration: (duration: number | {
|
166
166
|
type: string;
|
167
167
|
value: number;
|
168
|
-
}) => number | {
|
168
|
+
}) => number | "flexible" | {
|
169
169
|
type: string;
|
170
170
|
value: number;
|
171
|
-
}
|
171
|
+
};
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
174
174
|
export {};
|
@@ -8,7 +8,7 @@ import { PosProps } from './const';
|
|
8
8
|
*/
|
9
9
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
10
10
|
className?: string | undefined;
|
11
|
-
onChange?: ((status: "
|
11
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
12
12
|
[keys: string]: unknown;
|
13
13
|
} | undefined, other?: any) => void) | undefined;
|
14
14
|
onClose: () => void;
|
@@ -10,7 +10,7 @@ import './device.less';
|
|
10
10
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
11
11
|
api: PayProps['api'];
|
12
12
|
className?: string | undefined;
|
13
|
-
onChange?: ((status: "
|
13
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
14
14
|
[keys: string]: unknown;
|
15
15
|
} | undefined, other?: any) => void) | undefined;
|
16
16
|
onClose: () => void;
|
@@ -295,7 +295,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
295
295
|
name?: string | undefined;
|
296
296
|
symbol?: string | undefined;
|
297
297
|
amount?: string | number | undefined;
|
298
|
-
mode?: "
|
298
|
+
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
299
299
|
order_id?: string | number | undefined;
|
300
300
|
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
@@ -303,7 +303,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
303
303
|
step?: number | undefined;
|
304
304
|
title?: string | undefined;
|
305
305
|
subTitle?: string | undefined;
|
306
|
-
type?: "
|
306
|
+
type?: "step" | "unset" | undefined;
|
307
307
|
render?: boolean | undefined;
|
308
308
|
net?: boolean | undefined;
|
309
309
|
component?: string | undefined;
|
@@ -29,7 +29,7 @@ import localeTexts from "./locales";
|
|
29
29
|
import "./index.less";
|
30
30
|
import classNames from 'classnames';
|
31
31
|
// 导入所有类型
|
32
|
-
import {
|
32
|
+
import { DEFAULT_CARD_CONFIG } from "./types";
|
33
33
|
|
34
34
|
// 添加 localStorage 相关的操作函数
|
35
35
|
var STORAGE_KEY = 'pisell_wallet_list_data';
|
@@ -74,8 +74,6 @@ var getFromLocalStorage = function getFromLocalStorage(key) {
|
|
74
74
|
|
75
75
|
// @ts-ignore
|
76
76
|
|
77
|
-
// @ts-ignore
|
78
|
-
|
79
77
|
// 定义轮播图配置
|
80
78
|
var CAROUSEL_CONFIG = {
|
81
79
|
className: 'pisell-lowcode__walletList',
|
@@ -1,10 +1,3 @@
|
|
1
|
-
declare
|
2
|
-
appHelper: any;
|
3
|
-
engine: any;
|
4
|
-
blockContext: any;
|
5
|
-
components: any;
|
6
|
-
pageContext: any;
|
7
|
-
};
|
8
|
-
declare const useEngineContext: () => IEngineContext;
|
1
|
+
declare const useEngineContext: () => any;
|
9
2
|
export declare const usePisellOS: () => any;
|
10
3
|
export default useEngineContext;
|
@@ -2,11 +2,14 @@ import { createContext, useContext } from "react";
|
|
2
2
|
var defaultContext = /*#__PURE__*/createContext({});
|
3
3
|
var useEngineContext = function useEngineContext() {
|
4
4
|
var context = useContext(window.__appContext || defaultContext);
|
5
|
+
if (!Object.keys(context).length) {
|
6
|
+
return window.__injectedContext;
|
7
|
+
}
|
5
8
|
return context || {};
|
6
9
|
};
|
7
10
|
export var usePisellOS = function usePisellOS() {
|
8
11
|
var _context$appHelper;
|
9
|
-
var context =
|
12
|
+
var context = useEngineContext();
|
10
13
|
var _ref = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
|
11
14
|
pisellos = _ref.pisellos;
|
12
15
|
return pisellos;
|
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
165
165
|
export declare const getDuration: (duration: number | {
|
166
166
|
type: string;
|
167
167
|
value: number;
|
168
|
-
}) => number | {
|
168
|
+
}) => number | "flexible" | {
|
169
169
|
type: string;
|
170
170
|
value: number;
|
171
|
-
}
|
171
|
+
};
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
174
174
|
export {};
|
@@ -8,7 +8,7 @@ import { PosProps } from './const';
|
|
8
8
|
*/
|
9
9
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
10
10
|
className?: string | undefined;
|
11
|
-
onChange?: ((status: "
|
11
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
12
12
|
[keys: string]: unknown;
|
13
13
|
} | undefined, other?: any) => void) | undefined;
|
14
14
|
onClose: () => void;
|
@@ -10,7 +10,7 @@ import './device.less';
|
|
10
10
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
11
11
|
api: PayProps['api'];
|
12
12
|
className?: string | undefined;
|
13
|
-
onChange?: ((status: "
|
13
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
14
14
|
[keys: string]: unknown;
|
15
15
|
} | undefined, other?: any) => void) | undefined;
|
16
16
|
onClose: () => void;
|
@@ -295,7 +295,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
295
295
|
name?: string | undefined;
|
296
296
|
symbol?: string | undefined;
|
297
297
|
amount?: string | number | undefined;
|
298
|
-
mode?: "
|
298
|
+
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
299
299
|
order_id?: string | number | undefined;
|
300
300
|
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
@@ -303,7 +303,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
303
303
|
step?: number | undefined;
|
304
304
|
title?: string | undefined;
|
305
305
|
subTitle?: string | undefined;
|
306
|
-
type?: "
|
306
|
+
type?: "step" | "unset" | undefined;
|
307
307
|
render?: boolean | undefined;
|
308
308
|
net?: boolean | undefined;
|
309
309
|
component?: string | undefined;
|
@@ -1,10 +1,3 @@
|
|
1
|
-
declare
|
2
|
-
appHelper: any;
|
3
|
-
engine: any;
|
4
|
-
blockContext: any;
|
5
|
-
components: any;
|
6
|
-
pageContext: any;
|
7
|
-
};
|
8
|
-
declare const useEngineContext: () => IEngineContext;
|
1
|
+
declare const useEngineContext: () => any;
|
9
2
|
export declare const usePisellOS: () => any;
|
10
3
|
export default useEngineContext;
|
@@ -29,13 +29,14 @@ var useEngineContext = () => {
|
|
29
29
|
const context = (0, import_react.useContext)(
|
30
30
|
window.__appContext || defaultContext
|
31
31
|
);
|
32
|
+
if (!Object.keys(context).length) {
|
33
|
+
return window.__injectedContext;
|
34
|
+
}
|
32
35
|
return context || {};
|
33
36
|
};
|
34
37
|
var usePisellOS = () => {
|
35
38
|
var _a;
|
36
|
-
const context = (
|
37
|
-
window.__appContext || defaultContext
|
38
|
-
);
|
39
|
+
const context = useEngineContext();
|
39
40
|
const { pisellos } = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
|
40
41
|
return pisellos;
|
41
42
|
};
|
package/package.json
CHANGED
@@ -1,12 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pisell/private-materials",
|
3
|
-
"version": "6.1.
|
4
|
-
"scripts": {
|
5
|
-
"dev": "father dev",
|
6
|
-
"build": "father build",
|
7
|
-
"lowcode:dev": "build-scripts start --config ./build.lowcode.js",
|
8
|
-
"lowcode:build": " build-scripts build --config ./build.lowcode.js"
|
9
|
-
},
|
3
|
+
"version": "6.1.24",
|
10
4
|
"main": "./lib/index.js",
|
11
5
|
"module": "./es/index.js",
|
12
6
|
"types": "./lib/index.d.ts",
|
@@ -56,10 +50,6 @@
|
|
56
50
|
"@dnd-kit/modifiers": "^6.0.1",
|
57
51
|
"@dnd-kit/sortable": "^7.0.2",
|
58
52
|
"@dnd-kit/utilities": "^3.2.1",
|
59
|
-
"@pisell/date-picker": "workspace:*",
|
60
|
-
"@pisell/icon": "workspace:*",
|
61
|
-
"@pisell/materials": "workspace:*",
|
62
|
-
"@pisell/utils": "workspace:*",
|
63
53
|
"ahooks": "^3.7.6",
|
64
54
|
"antd": "^5.6.3",
|
65
55
|
"classnames": "^2.3.2",
|
@@ -68,7 +58,11 @@
|
|
68
58
|
"rc-virtual-list": "^3.11.3",
|
69
59
|
"react-infinite-scroll-component": "^6.1.0",
|
70
60
|
"react-resizable": "^3.0.5",
|
71
|
-
"styled-components": "^6.0.0-rc.3"
|
61
|
+
"styled-components": "^6.0.0-rc.3",
|
62
|
+
"@pisell/utils": "3.0.0",
|
63
|
+
"@pisell/materials": "6.1.8",
|
64
|
+
"@pisell/icon": "0.0.11",
|
65
|
+
"@pisell/date-picker": "3.0.4"
|
72
66
|
},
|
73
67
|
"peerDependencies": {
|
74
68
|
"react": "^18.0.0",
|
@@ -76,5 +70,11 @@
|
|
76
70
|
},
|
77
71
|
"componentConfig": {
|
78
72
|
"materialSchema": "https://unpkg.com/@pisell/materials@1.0.1/build/lowcode/assets-prod.json"
|
73
|
+
},
|
74
|
+
"scripts": {
|
75
|
+
"dev": "father dev",
|
76
|
+
"build": "father build",
|
77
|
+
"lowcode:dev": "build-scripts start --config ./build.lowcode.js",
|
78
|
+
"lowcode:build": " build-scripts build --config ./build.lowcode.js"
|
79
79
|
}
|
80
80
|
}
|