@pisell/private-materials 3.0.96 → 3.0.97
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +16 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +15 -8
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +1 -2
- package/es/components/booking/forms/forms.d.ts +1 -1
- package/es/components/booking/forms/index.d.ts +1 -1
- package/es/components/booking/forms/model.d.ts +1 -2
- package/es/components/booking/index.d.ts +1 -1
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/model.d.ts +1 -2
- package/es/components/booking/model.d.ts +1 -2
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -2
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +1 -2
- package/es/components/eftpos/const.d.ts +38 -0
- package/es/components/eftpos/const.js +79 -0
- package/es/components/eftpos/device.d.ts +8 -0
- package/es/components/eftpos/device.js +30 -0
- package/es/components/eftpos/form/index.d.ts +16 -0
- package/es/components/eftpos/form/index.js +113 -0
- package/es/components/eftpos/index.d.ts +37 -0
- package/es/components/eftpos/index.js +274 -0
- package/es/components/eftpos/index.less +153 -0
- package/es/components/eftpos/locales.d.ts +75 -0
- package/es/components/eftpos/locales.js +98 -0
- package/es/components/eftpos/pos.d.ts +9 -0
- package/es/components/eftpos/pos.js +33 -0
- package/es/components/eftpos/surcharge/index.css +17 -0
- package/es/components/eftpos/surcharge/index.d.ts +8 -0
- package/es/components/eftpos/surcharge/index.js +111 -0
- package/es/components/eftpos/table.d.ts +17 -0
- package/es/components/eftpos/table.js +236 -0
- package/es/components/eftposPay/amount.d.ts +14 -0
- package/es/components/eftposPay/amount.js +253 -0
- package/es/components/eftposPay/component/alert/index.d.ts +6 -0
- package/es/components/eftposPay/component/alert/index.js +11 -0
- package/es/components/eftposPay/component/alert/index.less +29 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +3 -0
- package/es/components/eftposPay/component/alert/warn.js +45 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +4 -0
- package/es/components/eftposPay/component/fail/failCustom.js +95 -0
- package/es/components/eftposPay/component/fail/index.d.ts +4 -0
- package/es/components/eftposPay/component/fail/index.js +105 -0
- package/es/components/eftposPay/component/fail/network.d.ts +4 -0
- package/es/components/eftposPay/component/fail/network.js +48 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +4 -0
- package/es/components/eftposPay/component/fail/unknow.js +43 -0
- package/es/components/eftposPay/component/header/index.d.ts +9 -0
- package/es/components/eftposPay/component/header/index.js +66 -0
- package/es/components/eftposPay/component/header/index.less +44 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +13 -0
- package/es/components/eftposPay/component/header/titlebar.js +39 -0
- package/es/components/eftposPay/component/header/titlebar.less +17 -0
- package/es/components/eftposPay/component/manual/index.d.ts +5 -0
- package/es/components/eftposPay/component/manual/index.js +91 -0
- package/es/components/eftposPay/component/manual/index.less +96 -0
- package/es/components/eftposPay/component/signature/index.d.ts +4 -0
- package/es/components/eftposPay/component/signature/index.js +63 -0
- package/es/components/eftposPay/component/step/index.d.ts +12 -0
- package/es/components/eftposPay/component/step/index.js +31 -0
- package/es/components/eftposPay/component/step/step.d.ts +9 -0
- package/es/components/eftposPay/component/step/step.js +23 -0
- package/es/components/eftposPay/const.d.ts +131 -0
- package/es/components/eftposPay/const.js +48 -0
- package/es/components/eftposPay/device.d.ts +14 -0
- package/es/components/eftposPay/device.js +124 -0
- package/es/components/eftposPay/device.less +61 -0
- package/es/components/eftposPay/eftpos/config.d.ts +11 -0
- package/es/components/eftposPay/eftpos/config.js +178 -0
- package/es/components/eftposPay/eftpos/const.d.ts +10 -0
- package/es/components/eftposPay/eftpos/const.js +139 -0
- package/es/components/eftposPay/eftpos/index.d.ts +7 -0
- package/es/components/eftposPay/eftpos/index.js +35 -0
- package/es/components/eftposPay/helper.d.ts +3 -0
- package/es/components/eftposPay/helper.js +35 -0
- package/es/components/eftposPay/hooks.d.ts +4 -0
- package/es/components/eftposPay/hooks.js +153 -0
- package/es/components/eftposPay/index.d.ts +7 -0
- package/es/components/eftposPay/index.js +188 -0
- package/es/components/eftposPay/index.less +273 -0
- package/es/components/eftposPay/locales.d.ts +264 -0
- package/es/components/eftposPay/locales.js +384 -0
- package/es/components/eftposPay/manufacturer.d.ts +6 -0
- package/es/components/eftposPay/manufacturer.js +32 -0
- package/es/components/eftposPay/pay.d.ts +10 -0
- package/es/components/eftposPay/pay.js +108 -0
- package/es/components/eftposPay/payo/config.d.ts +11 -0
- package/es/components/eftposPay/payo/config.js +357 -0
- package/es/components/eftposPay/payo/const.d.ts +6 -0
- package/es/components/eftposPay/payo/const.js +93 -0
- package/es/components/eftposPay/payo/hooks.d.ts +5 -0
- package/es/components/eftposPay/payo/hooks.js +84 -0
- package/es/components/eftposPay/payo/index.d.ts +7 -0
- package/es/components/eftposPay/payo/index.js +35 -0
- package/es/components/eftposPay/store/index.d.ts +239 -0
- package/es/components/eftposPay/store/index.js +304 -0
- package/es/components/eftposPay/store/useThunkReducer.d.ts +9 -0
- package/es/components/eftposPay/store/useThunkReducer.js +31 -0
- package/es/components/eftposPay/windcave/action.d.ts +8 -0
- package/es/components/eftposPay/windcave/action.js +104 -0
- package/es/components/eftposPay/windcave/const.d.ts +104 -0
- package/es/components/eftposPay/windcave/const.js +253 -0
- package/es/components/eftposPay/windcave/helper.d.ts +9 -0
- package/es/components/eftposPay/windcave/helper.js +314 -0
- package/es/components/eftposPay/windcave/hook.d.ts +14 -0
- package/es/components/eftposPay/windcave/hook.js +144 -0
- package/es/components/eftposPay/windcave/index.d.ts +8 -0
- package/es/components/eftposPay/windcave/index.js +49 -0
- package/es/components/eftposPay/windcave/pos.d.ts +8 -0
- package/es/components/eftposPay/windcave/pos.js +180 -0
- package/es/components/eftposPay/windcave/pwd.d.ts +8 -0
- package/es/components/eftposPay/windcave/pwd.js +124 -0
- package/es/components/eftposPay/windcave/receipet.d.ts +6 -0
- package/es/components/eftposPay/windcave/receipet.js +67 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +11 -0
- package/es/components/eftposPay/windcave/receiptAction.js +326 -0
- package/es/components/eftposPay/windcave/timer.d.ts +17 -0
- package/es/components/eftposPay/windcave/timer.js +181 -0
- package/es/components/eftposPay/windcave/wait.d.ts +12 -0
- package/es/components/eftposPay/windcave/wait.js +139 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +6 -0
- package/es/components/eftposPay/windcave/windcave.js +283 -0
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -2
- package/es/hooks/usePrefix.d.ts +1 -0
- package/es/hooks/usePrefix.js +10 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +1 -2
- package/lib/components/booking/forms/forms.d.ts +1 -1
- package/lib/components/booking/forms/index.d.ts +1 -1
- package/lib/components/booking/forms/model.d.ts +1 -2
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/model.d.ts +1 -2
- package/lib/components/booking/model.d.ts +1 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -2
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +1 -2
- package/lib/components/eftpos/const.d.ts +38 -0
- package/lib/components/eftpos/const.js +108 -0
- package/lib/components/eftpos/device.d.ts +8 -0
- package/lib/components/eftpos/device.js +55 -0
- package/lib/components/eftpos/form/index.d.ts +16 -0
- package/lib/components/eftpos/form/index.js +124 -0
- package/lib/components/eftpos/index.d.ts +37 -0
- package/lib/components/eftpos/index.js +279 -0
- package/lib/components/eftpos/index.less +153 -0
- package/lib/components/eftpos/locales.d.ts +75 -0
- package/lib/components/eftpos/locales.js +116 -0
- package/lib/components/eftpos/pos.d.ts +9 -0
- package/lib/components/eftpos/pos.js +55 -0
- package/lib/components/eftpos/surcharge/index.css +17 -0
- package/lib/components/eftpos/surcharge/index.d.ts +8 -0
- package/lib/components/eftpos/surcharge/index.js +125 -0
- package/lib/components/eftpos/table.d.ts +17 -0
- package/lib/components/eftpos/table.js +235 -0
- package/lib/components/eftposPay/amount.d.ts +14 -0
- package/lib/components/eftposPay/amount.js +239 -0
- package/lib/components/eftposPay/component/alert/index.d.ts +6 -0
- package/lib/components/eftposPay/component/alert/index.js +38 -0
- package/lib/components/eftposPay/component/alert/index.less +29 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +3 -0
- package/lib/components/eftposPay/component/alert/warn.js +80 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/failCustom.js +117 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/index.js +121 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/network.js +65 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/unknow.js +72 -0
- package/lib/components/eftposPay/component/header/index.d.ts +9 -0
- package/lib/components/eftposPay/component/header/index.js +92 -0
- package/lib/components/eftposPay/component/header/index.less +44 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +13 -0
- package/lib/components/eftposPay/component/header/titlebar.js +55 -0
- package/lib/components/eftposPay/component/header/titlebar.less +17 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +5 -0
- package/lib/components/eftposPay/component/manual/index.js +101 -0
- package/lib/components/eftposPay/component/manual/index.less +96 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +4 -0
- package/lib/components/eftposPay/component/signature/index.js +80 -0
- package/lib/components/eftposPay/component/step/index.d.ts +12 -0
- package/lib/components/eftposPay/component/step/index.js +71 -0
- package/lib/components/eftposPay/component/step/step.d.ts +9 -0
- package/lib/components/eftposPay/component/step/step.js +59 -0
- package/lib/components/eftposPay/const.d.ts +131 -0
- package/lib/components/eftposPay/const.js +86 -0
- package/lib/components/eftposPay/device.d.ts +14 -0
- package/lib/components/eftposPay/device.js +127 -0
- package/lib/components/eftposPay/device.less +61 -0
- package/lib/components/eftposPay/eftpos/config.d.ts +11 -0
- package/lib/components/eftposPay/eftpos/config.js +199 -0
- package/lib/components/eftposPay/eftpos/const.d.ts +10 -0
- package/lib/components/eftposPay/eftpos/const.js +165 -0
- package/lib/components/eftposPay/eftpos/index.d.ts +7 -0
- package/lib/components/eftposPay/eftpos/index.js +66 -0
- package/lib/components/eftposPay/helper.d.ts +3 -0
- package/lib/components/eftposPay/helper.js +62 -0
- package/lib/components/eftposPay/hooks.d.ts +4 -0
- package/lib/components/eftposPay/hooks.js +237 -0
- package/lib/components/eftposPay/index.d.ts +7 -0
- package/lib/components/eftposPay/index.js +189 -0
- package/lib/components/eftposPay/index.less +273 -0
- package/lib/components/eftposPay/locales.d.ts +264 -0
- package/lib/components/eftposPay/locales.js +304 -0
- package/lib/components/eftposPay/manufacturer.d.ts +6 -0
- package/lib/components/eftposPay/manufacturer.js +77 -0
- package/lib/components/eftposPay/pay.d.ts +10 -0
- package/lib/components/eftposPay/pay.js +120 -0
- package/lib/components/eftposPay/payo/config.d.ts +11 -0
- package/lib/components/eftposPay/payo/config.js +377 -0
- package/lib/components/eftposPay/payo/const.d.ts +6 -0
- package/lib/components/eftposPay/payo/const.js +112 -0
- package/lib/components/eftposPay/payo/hooks.d.ts +5 -0
- package/lib/components/eftposPay/payo/hooks.js +80 -0
- package/lib/components/eftposPay/payo/index.d.ts +7 -0
- package/lib/components/eftposPay/payo/index.js +63 -0
- package/lib/components/eftposPay/store/index.d.ts +239 -0
- package/lib/components/eftposPay/store/index.js +371 -0
- package/lib/components/eftposPay/store/useThunkReducer.d.ts +9 -0
- package/lib/components/eftposPay/store/useThunkReducer.js +53 -0
- package/lib/components/eftposPay/windcave/action.d.ts +8 -0
- package/lib/components/eftposPay/windcave/action.js +143 -0
- package/lib/components/eftposPay/windcave/const.d.ts +104 -0
- package/lib/components/eftposPay/windcave/const.js +300 -0
- package/lib/components/eftposPay/windcave/helper.d.ts +9 -0
- package/lib/components/eftposPay/windcave/helper.js +378 -0
- package/lib/components/eftposPay/windcave/hook.d.ts +14 -0
- package/lib/components/eftposPay/windcave/hook.js +139 -0
- package/lib/components/eftposPay/windcave/index.d.ts +8 -0
- package/lib/components/eftposPay/windcave/index.js +78 -0
- package/lib/components/eftposPay/windcave/pos.d.ts +8 -0
- package/lib/components/eftposPay/windcave/pos.js +197 -0
- package/lib/components/eftposPay/windcave/pwd.d.ts +8 -0
- package/lib/components/eftposPay/windcave/pwd.js +143 -0
- package/lib/components/eftposPay/windcave/receipet.d.ts +6 -0
- package/lib/components/eftposPay/windcave/receipet.js +93 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +11 -0
- package/lib/components/eftposPay/windcave/receiptAction.js +386 -0
- package/lib/components/eftposPay/windcave/timer.d.ts +17 -0
- package/lib/components/eftposPay/windcave/timer.js +126 -0
- package/lib/components/eftposPay/windcave/wait.d.ts +12 -0
- package/lib/components/eftposPay/windcave/wait.js +163 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +6 -0
- package/lib/components/eftposPay/windcave/windcave.js +283 -0
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -2
- package/lib/hooks/usePrefix.d.ts +1 -0
- package/lib/hooks/usePrefix.js +44 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lowcode/eftpos/meta.ts +187 -0
- package/lowcode/eftpos-pay/meta.ts +122 -0
- package/package.json +4 -3
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
2
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
4
3
|
state: FormState;
|
|
5
4
|
} & {
|
|
6
5
|
dispatch: (params: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
2
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
4
3
|
state: FormState;
|
|
5
4
|
} & {
|
|
6
5
|
dispatch: (params: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Booking: (props: any) =>
|
|
1
|
+
declare const Booking: (props: any) => JSX.Element;
|
|
2
2
|
export default Booking;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
2
|
export declare const walkInData: {
|
|
4
3
|
id: number;
|
|
5
4
|
nickname: string;
|
|
6
5
|
};
|
|
7
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
6
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
8
7
|
state: FormState;
|
|
9
8
|
} & {
|
|
10
9
|
dispatch: (params: {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
amountSymbol: string;
|
|
4
3
|
apis: {
|
|
@@ -96,7 +95,7 @@ export declare const walkInData: {
|
|
|
96
95
|
id: number;
|
|
97
96
|
nickname: string;
|
|
98
97
|
};
|
|
99
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
98
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
100
99
|
state: FormState;
|
|
101
100
|
} & {
|
|
102
101
|
dispatch: (params: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
2
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
4
3
|
state: FormState;
|
|
5
4
|
} & {
|
|
6
5
|
dispatch: (params: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
2
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
4
3
|
state: FormState;
|
|
5
4
|
} & {
|
|
6
5
|
dispatch: (params: {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare enum Eftpos {
|
|
2
|
+
Payo = "payo",
|
|
3
|
+
Tyro = "tyro",
|
|
4
|
+
Windcave = "windcave",
|
|
5
|
+
Stripe = "stripe"
|
|
6
|
+
}
|
|
7
|
+
export declare enum DeviceEnum {
|
|
8
|
+
Add = "add",
|
|
9
|
+
Edit = "edit",
|
|
10
|
+
Repair = "repair"
|
|
11
|
+
}
|
|
12
|
+
export declare type DeviceStatus = `${DeviceEnum}`;
|
|
13
|
+
export interface DeviceProp {
|
|
14
|
+
id?: string | number;
|
|
15
|
+
name: string;
|
|
16
|
+
type: Eftpos.Tyro;
|
|
17
|
+
status: "unpaired" | "paired";
|
|
18
|
+
setting: {
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
} | null;
|
|
21
|
+
connection: {
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
} | null;
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
}
|
|
26
|
+
export declare const getDefaultValue: (list: any) => any;
|
|
27
|
+
export declare function getCommByFields({ field, value, name, getComm, }: {
|
|
28
|
+
field: (string | {
|
|
29
|
+
name: string;
|
|
30
|
+
children: string[];
|
|
31
|
+
})[];
|
|
32
|
+
value?: any;
|
|
33
|
+
name?: string[];
|
|
34
|
+
getComm: (params: {
|
|
35
|
+
field: string;
|
|
36
|
+
value?: unknown;
|
|
37
|
+
}, record?: any) => any;
|
|
38
|
+
}): any;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
|
+
import { helpMapping } from "./form";
|
|
14
|
+
export var Eftpos;
|
|
15
|
+
(function (Eftpos) {
|
|
16
|
+
Eftpos["Payo"] = "payo";
|
|
17
|
+
Eftpos["Tyro"] = "tyro";
|
|
18
|
+
Eftpos["Windcave"] = "windcave";
|
|
19
|
+
Eftpos["Stripe"] = "stripe";
|
|
20
|
+
})(Eftpos || (Eftpos = {}));
|
|
21
|
+
export var DeviceEnum;
|
|
22
|
+
(function (DeviceEnum) {
|
|
23
|
+
DeviceEnum["Add"] = "add";
|
|
24
|
+
DeviceEnum["Edit"] = "edit";
|
|
25
|
+
DeviceEnum["Repair"] = "repair";
|
|
26
|
+
})(DeviceEnum || (DeviceEnum = {}));
|
|
27
|
+
export var getDefaultValue = function getDefaultValue(list) {
|
|
28
|
+
return list.reduce(function (target, item) {
|
|
29
|
+
if (Array.isArray(item.children) && item.children.length) {
|
|
30
|
+
return _objectSpread(_objectSpread({}, target), {}, _defineProperty({}, item.__sourceName, getDefaultValue(item.children)));
|
|
31
|
+
}
|
|
32
|
+
if (!item.Component) {
|
|
33
|
+
return target;
|
|
34
|
+
}
|
|
35
|
+
var ComponentName = item.Component;
|
|
36
|
+
if (helpMapping[ComponentName]) {
|
|
37
|
+
return _objectSpread(_objectSpread({}, target), helpMapping[ComponentName].getCommDefaultVal(item));
|
|
38
|
+
}
|
|
39
|
+
return _objectSpread(_objectSpread({}, target), {}, _defineProperty({}, item.__sourceName, item.input.defaultValue));
|
|
40
|
+
}, {});
|
|
41
|
+
};
|
|
42
|
+
export function getCommByFields(_ref) {
|
|
43
|
+
var field = _ref.field,
|
|
44
|
+
value = _ref.value,
|
|
45
|
+
_ref$name = _ref.name,
|
|
46
|
+
name = _ref$name === void 0 ? [] : _ref$name,
|
|
47
|
+
getComm = _ref.getComm;
|
|
48
|
+
return field.map(function (item) {
|
|
49
|
+
if (typeof item === "string") {
|
|
50
|
+
var commConfig = getComm(value ? {
|
|
51
|
+
field: item,
|
|
52
|
+
value: value[item]
|
|
53
|
+
} : {
|
|
54
|
+
field: item
|
|
55
|
+
}, value);
|
|
56
|
+
if (!commConfig) {
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
var ComponentName = commConfig.Component;
|
|
60
|
+
var helpFn = helpMapping[ComponentName];
|
|
61
|
+
if (helpFn) {
|
|
62
|
+
return helpFn.getCommName(commConfig, name);
|
|
63
|
+
}
|
|
64
|
+
commConfig.__sourceName = commConfig.name;
|
|
65
|
+
commConfig.name = name.length > 0 ? [].concat(_toConsumableArray(name), [commConfig.name]) : commConfig.name;
|
|
66
|
+
return commConfig;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
name: name.length > 0 ? [].concat(_toConsumableArray(name), [item.name]) : item.name,
|
|
70
|
+
__sourceName: item.name,
|
|
71
|
+
children: getCommByFields({
|
|
72
|
+
field: item.children,
|
|
73
|
+
value: value,
|
|
74
|
+
name: [].concat(_toConsumableArray(name || []), [item.name]),
|
|
75
|
+
getComm: getComm
|
|
76
|
+
})
|
|
77
|
+
};
|
|
78
|
+
}).filter(Boolean);
|
|
79
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Form, Button } from "antd";
|
|
3
|
+
import { locales } from "@pisell/utils";
|
|
4
|
+
import { getDefaultValue } from "./const";
|
|
5
|
+
import FormItem from "./form";
|
|
6
|
+
var Device = function Device(props) {
|
|
7
|
+
var onSave = props.onSave,
|
|
8
|
+
formItemList = props.formItemList;
|
|
9
|
+
var initialValues = getDefaultValue(formItemList);
|
|
10
|
+
return /*#__PURE__*/React.createElement(Form, {
|
|
11
|
+
layout: "vertical",
|
|
12
|
+
onFinish: onSave,
|
|
13
|
+
initialValues: initialValues,
|
|
14
|
+
className: "pisell-lowcode__pos-device"
|
|
15
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
style: {
|
|
17
|
+
flex: 1,
|
|
18
|
+
overflow: 'auto',
|
|
19
|
+
padding: '0 0 60px 0'
|
|
20
|
+
}
|
|
21
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
22
|
+
formItemList: formItemList
|
|
23
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
24
|
+
className: "pisell-lowcode__pos-device-btn"
|
|
25
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
26
|
+
htmlType: "submit",
|
|
27
|
+
block: true
|
|
28
|
+
}, locales.getText("page.eftpos.text.save"))));
|
|
29
|
+
};
|
|
30
|
+
export default Device;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const CustomFormItem: ({ formItemList, level, onChange, }: {
|
|
3
|
+
formItemList: any[];
|
|
4
|
+
level?: number | undefined;
|
|
5
|
+
onChange?: ((...agrn: unknown[]) => unknown) | undefined;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
export default CustomFormItem;
|
|
8
|
+
declare type helpMappingType = {
|
|
9
|
+
[key: string]: {
|
|
10
|
+
getCommName<T = any>(commConfig: T, name: string[]): T;
|
|
11
|
+
getCommDefaultVal: (commConfig: any) => {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const helpMapping: helpMappingType;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
var _excluded = ["direction", "options"],
|
|
2
|
+
_excluded2 = ["label", "value"],
|
|
3
|
+
_excluded3 = ["__sourceName", "Component"],
|
|
4
|
+
_excluded4 = ["input"],
|
|
5
|
+
_excluded5 = ["input"];
|
|
6
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
import React from "react";
|
|
11
|
+
import { Input, InputNumber, Checkbox, Radio, Cascader, DatePicker, Select, Slider, Switch, TimePicker, Transfer, TreeSelect, Upload, Form, Space } from "antd";
|
|
12
|
+
import Surcharge, { getCommName, getCommDefaultVal } from "../surcharge";
|
|
13
|
+
var Mapping = {
|
|
14
|
+
Input: Input,
|
|
15
|
+
InputNumber: InputNumber,
|
|
16
|
+
Checkbox: Checkbox,
|
|
17
|
+
"Checkbox.Group": Checkbox.Group,
|
|
18
|
+
Radio: Radio,
|
|
19
|
+
"Radio.Group": function RadioGroup(_ref) {
|
|
20
|
+
var direction = _ref.direction,
|
|
21
|
+
options = _ref.options,
|
|
22
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
if (direction === 'vertical') {
|
|
24
|
+
return /*#__PURE__*/React.createElement(Radio.Group, props, /*#__PURE__*/React.createElement(Space, {
|
|
25
|
+
direction: "vertical"
|
|
26
|
+
}, options === null || options === void 0 ? void 0 : options.map(function (item) {
|
|
27
|
+
if (_typeof(item) === "object") {
|
|
28
|
+
var label = item.label,
|
|
29
|
+
value = item.value,
|
|
30
|
+
other = _objectWithoutProperties(item, _excluded2);
|
|
31
|
+
return /*#__PURE__*/React.createElement(Radio, _extends({}, other, {
|
|
32
|
+
value: value,
|
|
33
|
+
key: "".concat(item.value)
|
|
34
|
+
}), label);
|
|
35
|
+
}
|
|
36
|
+
return /*#__PURE__*/React.createElement(Radio, {
|
|
37
|
+
value: item,
|
|
38
|
+
key: "".concat(item)
|
|
39
|
+
}, item);
|
|
40
|
+
})));
|
|
41
|
+
}
|
|
42
|
+
return /*#__PURE__*/React.createElement(Radio.Group, _extends({}, props, {
|
|
43
|
+
options: options
|
|
44
|
+
}));
|
|
45
|
+
},
|
|
46
|
+
"Radio.Button": Radio.Button,
|
|
47
|
+
Cascader: Cascader,
|
|
48
|
+
DatePicker: DatePicker,
|
|
49
|
+
Select: Select,
|
|
50
|
+
Slider: Slider,
|
|
51
|
+
Switch: Switch,
|
|
52
|
+
TimePicker: TimePicker,
|
|
53
|
+
Transfer: Transfer,
|
|
54
|
+
TreeSelect: TreeSelect,
|
|
55
|
+
Upload: Upload
|
|
56
|
+
};
|
|
57
|
+
var CustomMapping = {
|
|
58
|
+
Surcharge: Surcharge
|
|
59
|
+
};
|
|
60
|
+
var CustomFormItem = function CustomFormItem(_ref2) {
|
|
61
|
+
var formItemList = _ref2.formItemList,
|
|
62
|
+
_ref2$level = _ref2.level,
|
|
63
|
+
level = _ref2$level === void 0 ? 0 : _ref2$level,
|
|
64
|
+
onChange = _ref2.onChange;
|
|
65
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, formItemList.map(function (_ref3, index) {
|
|
66
|
+
var __sourceName = _ref3.__sourceName,
|
|
67
|
+
Component = _ref3.Component,
|
|
68
|
+
item = _objectWithoutProperties(_ref3, _excluded3);
|
|
69
|
+
if (Array.isArray(item.children)) {
|
|
70
|
+
return /*#__PURE__*/React.createElement(CustomFormItem, {
|
|
71
|
+
formItemList: item.children,
|
|
72
|
+
onChange: onChange,
|
|
73
|
+
key: item.name ? item.name + level : Component + index + level,
|
|
74
|
+
level: level + 1
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (_typeof(Component) === "object") {
|
|
78
|
+
return /*#__PURE__*/React.createElement(Component, _extends({}, item, {
|
|
79
|
+
key: item.name + level
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
if (Mapping[Component]) {
|
|
83
|
+
var Comm = Mapping[Component];
|
|
84
|
+
var input = item.input,
|
|
85
|
+
formItemProps = _objectWithoutProperties(item, _excluded4);
|
|
86
|
+
return /*#__PURE__*/React.createElement(Form.Item, _extends({}, formItemProps, {
|
|
87
|
+
key: item.name + level
|
|
88
|
+
}), /*#__PURE__*/React.createElement(Comm, input));
|
|
89
|
+
}
|
|
90
|
+
if (Mapping[Component]) {
|
|
91
|
+
var _Comm = Mapping[Component];
|
|
92
|
+
var _input = item.input,
|
|
93
|
+
_formItemProps = _objectWithoutProperties(item, _excluded5);
|
|
94
|
+
return /*#__PURE__*/React.createElement(Form.Item, _extends({}, _formItemProps, {
|
|
95
|
+
key: item.name + level
|
|
96
|
+
}), /*#__PURE__*/React.createElement(_Comm, _input));
|
|
97
|
+
}
|
|
98
|
+
if (CustomMapping[Component]) {
|
|
99
|
+
var _Comm2 = CustomMapping[Component];
|
|
100
|
+
return /*#__PURE__*/React.createElement(_Comm2, _extends({}, item, {
|
|
101
|
+
key: item.name + level
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
throw TypeError("pos\u7269\u6599\u5E93 \u8F93\u5165\u7EC4\u4EF6\u7C7B\u578B ".concat(Component, " \u65E0\u6CD5\u6620\u5C04,\u8BF7\u6B63\u786E\u4F20\u5165\u7EC4\u4EF6\u7C7B\u578B"));
|
|
105
|
+
}));
|
|
106
|
+
};
|
|
107
|
+
export default CustomFormItem;
|
|
108
|
+
export var helpMapping = {
|
|
109
|
+
Surcharge: {
|
|
110
|
+
getCommName: getCommName,
|
|
111
|
+
getCommDefaultVal: getCommDefaultVal
|
|
112
|
+
}
|
|
113
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Eftpos, DeviceStatus } from "./const";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
interface PosProps {
|
|
5
|
+
/** 厂商类型 */
|
|
6
|
+
type: Eftpos;
|
|
7
|
+
/** 厂商名称 */
|
|
8
|
+
name: string;
|
|
9
|
+
/** 编辑页面zIndex */
|
|
10
|
+
zIndex?: number;
|
|
11
|
+
/** table 列表宽度 */
|
|
12
|
+
tableSize: number[];
|
|
13
|
+
/** 获取字段匹配数据项 */
|
|
14
|
+
getComm: (params: {
|
|
15
|
+
field: string;
|
|
16
|
+
value?: unknown;
|
|
17
|
+
}, record?: any) => any;
|
|
18
|
+
/** 设备厂商默认数据 */
|
|
19
|
+
getField: (type: Eftpos, status?: DeviceStatus) => any;
|
|
20
|
+
/** 编辑设备数据 */
|
|
21
|
+
onEdit: (device: any, type: DeviceStatus) => Promise<any>;
|
|
22
|
+
/** 编辑厂商数据 */
|
|
23
|
+
onEditKey: () => {};
|
|
24
|
+
/** 设备列表数据 */
|
|
25
|
+
getList: (params: {
|
|
26
|
+
type: Eftpos;
|
|
27
|
+
num: number;
|
|
28
|
+
skip: number;
|
|
29
|
+
}) => any;
|
|
30
|
+
/** 删除列表数据 */
|
|
31
|
+
onDel: (id: string | number) => Promise<any>;
|
|
32
|
+
/** 获取pos刷卡机配置字段 */
|
|
33
|
+
getPosComm: (...agrn: unknown[]) => any;
|
|
34
|
+
savePos: (...agrn: unknown[]) => any;
|
|
35
|
+
}
|
|
36
|
+
declare const _default: (props: PosProps) => React.JSX.Element;
|
|
37
|
+
export default _default;
|