@pisell/private-materials 3.0.56 → 3.0.58
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 +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +2 -1
- 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 +2 -1
- 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 +2 -1
- package/es/components/booking/model.d.ts +2 -1
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +2 -1
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +2 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/ruleSetting/index.js +2 -1
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +2 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +33 -11
- package/es/components/schedules/schedules/index.js +3 -2
- package/es/components/taxSelect/index.d.ts +12 -0
- package/es/components/taxSelect/index.js +141 -0
- package/es/components/taxSelect/index.less +12 -0
- package/es/components/taxSelect/locales.d.ts +24 -0
- package/es/components/taxSelect/locales.js +23 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +2 -1
- 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 +2 -1
- 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 +2 -1
- package/lib/components/booking/model.d.ts +2 -1
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +2 -1
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +2 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +5 -2
- package/lib/components/ruleSetting/index.js +2 -1
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +2 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +39 -14
- package/lib/components/schedules/schedules/index.js +2 -2
- package/lib/components/taxSelect/index.d.ts +12 -0
- package/lib/components/taxSelect/index.js +161 -0
- package/lib/components/taxSelect/index.less +12 -0
- package/lib/components/taxSelect/locales.d.ts +24 -0
- package/lib/components/taxSelect/locales.js +47 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +5 -2
- package/lowcode/tax-select/meta.ts +107 -0
- package/package.json +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Booking: (props: any) =>
|
|
1
|
+
declare const Booking: (props: any) => any;
|
|
2
2
|
export default Booking;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
3
|
export declare const walkInData: {
|
|
3
4
|
id: number;
|
|
4
5
|
nickname: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
7
8
|
state: FormState;
|
|
8
9
|
} & {
|
|
9
10
|
dispatch: (params: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -88,7 +89,7 @@ export declare const walkInData: {
|
|
|
88
89
|
id: number;
|
|
89
90
|
nickname: string;
|
|
90
91
|
};
|
|
91
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
92
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
92
93
|
state: FormState;
|
|
93
94
|
} & {
|
|
94
95
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
package/es/components/index.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ import BookingForms from './booking/forms';
|
|
|
7
7
|
import Schedules from './schedules';
|
|
8
8
|
import ProductExtension from './productExtension';
|
|
9
9
|
import RuleSetting from './ruleSetting';
|
|
10
|
-
|
|
10
|
+
import TaxSelect from './taxSelect';
|
|
11
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect };
|
package/es/components/index.js
CHANGED
|
@@ -7,4 +7,5 @@ import BookingForms from "./booking/forms";
|
|
|
7
7
|
import Schedules from "./schedules";
|
|
8
8
|
import ProductExtension from "./productExtension";
|
|
9
9
|
import RuleSetting from "./ruleSetting";
|
|
10
|
-
|
|
10
|
+
import TaxSelect from "./taxSelect";
|
|
11
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
4
|
export interface FormState {
|
|
@@ -68,7 +69,7 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
72
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
72
73
|
state: FormState;
|
|
73
74
|
} & {
|
|
74
75
|
dispatch: (params: {
|
|
@@ -25,14 +25,15 @@ import useComponents from "../../../../../../../hooks/useComponents";
|
|
|
25
25
|
import useEngineContext from "../../../../../../../hooks/useEngineContext";
|
|
26
26
|
import "./index.less";
|
|
27
27
|
var AddSchedules = function AddSchedules(_ref) {
|
|
28
|
-
var _state$
|
|
28
|
+
var _state$schedules3;
|
|
29
29
|
var value = _ref.value,
|
|
30
30
|
onChange = _ref.onChange,
|
|
31
31
|
drawerContainer = _ref.drawerContainer,
|
|
32
32
|
isSelf = _ref.isSelf;
|
|
33
33
|
var modalRef = useRef(null);
|
|
34
34
|
var _useContext = useContext(Context),
|
|
35
|
-
state = _useContext.state
|
|
35
|
+
state = _useContext.state,
|
|
36
|
+
dispatch = _useContext.dispatch;
|
|
36
37
|
var _useEngineContext = useEngineContext(),
|
|
37
38
|
appHelper = _useEngineContext.appHelper;
|
|
38
39
|
var createSchedules = useRef();
|
|
@@ -48,8 +49,8 @@ var AddSchedules = function AddSchedules(_ref) {
|
|
|
48
49
|
onSuccess: function onSuccess(res) {}
|
|
49
50
|
});
|
|
50
51
|
var onFinish = function onFinish(e) {
|
|
51
|
-
var _getScheduleList
|
|
52
|
-
var idMap = (
|
|
52
|
+
var scheduleList = isSelf ? _getScheduleList === null || _getScheduleList === void 0 ? void 0 : _getScheduleList.data : state.schedules.list;
|
|
53
|
+
var idMap = (scheduleList === null || scheduleList === void 0 ? void 0 : scheduleList.reduce(function (p, c) {
|
|
53
54
|
return _objectSpread(_objectSpread({}, p), {}, _defineProperty({}, c.id, c));
|
|
54
55
|
}, {})) || {};
|
|
55
56
|
onChange(e.map(function (item) {
|
|
@@ -63,9 +64,19 @@ var AddSchedules = function AddSchedules(_ref) {
|
|
|
63
64
|
});
|
|
64
65
|
};
|
|
65
66
|
var handleAddSchedule = function handleAddSchedule(data) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
if (isSelf) {
|
|
68
|
+
_getScheduleList.mutate(function (oldData) {
|
|
69
|
+
return [data].concat(_toConsumableArray(oldData || []));
|
|
70
|
+
});
|
|
71
|
+
} else {
|
|
72
|
+
var _state$schedules;
|
|
73
|
+
dispatch({
|
|
74
|
+
type: "setSchedules",
|
|
75
|
+
payload: _objectSpread(_objectSpread({}, state.schedules), {}, {
|
|
76
|
+
list: [data].concat(_toConsumableArray((state === null || state === void 0 ? void 0 : (_state$schedules = state.schedules) === null || _state$schedules === void 0 ? void 0 : _state$schedules.list) || []))
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
}
|
|
69
80
|
modalRef.current.setValue(function (v) {
|
|
70
81
|
return [].concat(_toConsumableArray(v), [data]);
|
|
71
82
|
});
|
|
@@ -85,7 +96,7 @@ var AddSchedules = function AddSchedules(_ref) {
|
|
|
85
96
|
});
|
|
86
97
|
};
|
|
87
98
|
var handleChangeResData = function handleChangeResData(data) {
|
|
88
|
-
|
|
99
|
+
var updateOldData = function updateOldData(oldData) {
|
|
89
100
|
return (oldData || []).map(function (item) {
|
|
90
101
|
if (item.id === data.id) {
|
|
91
102
|
var _appHelper$utils;
|
|
@@ -95,7 +106,18 @@ var AddSchedules = function AddSchedules(_ref) {
|
|
|
95
106
|
}
|
|
96
107
|
return item;
|
|
97
108
|
});
|
|
98
|
-
}
|
|
109
|
+
};
|
|
110
|
+
if (isSelf) {
|
|
111
|
+
_getScheduleList.mutate(updateOldData);
|
|
112
|
+
} else {
|
|
113
|
+
var _state$schedules2;
|
|
114
|
+
dispatch({
|
|
115
|
+
type: "setSchedules",
|
|
116
|
+
payload: _objectSpread(_objectSpread({}, state.schedules), {}, {
|
|
117
|
+
list: updateOldData(state === null || state === void 0 ? void 0 : (_state$schedules2 = state.schedules) === null || _state$schedules2 === void 0 ? void 0 : _state$schedules2.list)
|
|
118
|
+
})
|
|
119
|
+
});
|
|
120
|
+
}
|
|
99
121
|
};
|
|
100
122
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
101
123
|
ghost: true,
|
|
@@ -114,7 +136,7 @@ var AddSchedules = function AddSchedules(_ref) {
|
|
|
114
136
|
}, locales.getText("pisell2.text.schedules.assign-schedule")), /*#__PURE__*/React.createElement(CustomSelect, {
|
|
115
137
|
ref: modalRef,
|
|
116
138
|
rowKey: "id",
|
|
117
|
-
options: isSelf ? _getScheduleList.data || [] : (state === null || state === void 0 ? void 0 : (_state$
|
|
139
|
+
options: isSelf ? _getScheduleList.data || [] : (state === null || state === void 0 ? void 0 : (_state$schedules3 = state.schedules) === null || _state$schedules3 === void 0 ? void 0 : _state$schedules3.list) || [],
|
|
118
140
|
createItemText: locales.getText('pisell2.text.schedules.create-new-schedule'),
|
|
119
141
|
loading: _getScheduleList.loading,
|
|
120
142
|
value: value,
|
|
@@ -124,7 +146,7 @@ var AddSchedules = function AddSchedules(_ref) {
|
|
|
124
146
|
drawerProps: _objectSpread({
|
|
125
147
|
title: locales.getText("pisell2.text.schedules.assign-schedule"),
|
|
126
148
|
destroyOnClose: true,
|
|
127
|
-
width:
|
|
149
|
+
width: 480,
|
|
128
150
|
getContainer: drawerContainer || document.querySelector(".pisell-lowcode__schedules-component-products") || document.body,
|
|
129
151
|
rootStyle: {
|
|
130
152
|
position: "absolute"
|
|
@@ -32,7 +32,8 @@ var SchedulesConnect = function SchedulesConnect() {
|
|
|
32
32
|
schedules = state.schedules;
|
|
33
33
|
var _ref = schedules || {},
|
|
34
34
|
scheduleAllMap = _ref.scheduleAllMap,
|
|
35
|
-
scheduleMap = _ref.scheduleMap
|
|
35
|
+
scheduleMap = _ref.scheduleMap,
|
|
36
|
+
list = _ref.list;
|
|
36
37
|
var _ref2 = currentSelectDayDetail || {},
|
|
37
38
|
date = _ref2.date,
|
|
38
39
|
scheduleIds = _ref2.scheduleIds;
|
|
@@ -187,7 +188,7 @@ var SchedulesConnect = function SchedulesConnect() {
|
|
|
187
188
|
}, /*#__PURE__*/React.createElement(Schedules, {
|
|
188
189
|
loading: loading,
|
|
189
190
|
scheduleMap: scheduleMap,
|
|
190
|
-
dataSource:
|
|
191
|
+
dataSource: list,
|
|
191
192
|
type: currentSelectDayDetail ? "forADay" : "all",
|
|
192
193
|
currentSelectDayDetail: currentSelectDayDetail,
|
|
193
194
|
detail: schedulesDetail,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SelectProps } from "antd";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
interface TaxSelectProps {
|
|
5
|
+
selectProps?: SelectProps;
|
|
6
|
+
value: string;
|
|
7
|
+
tax_rate?: string;
|
|
8
|
+
tax_title?: string;
|
|
9
|
+
onChange: (value: string) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const TaxSelect: (props: TaxSelectProps) => React.JSX.Element;
|
|
12
|
+
export default TaxSelect;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure 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 _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; }
|
|
6
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
import { Select, Modal, Form, Button, InputNumber } from "antd";
|
|
9
|
+
import React, { useState, useMemo, useEffect, useRef } from "react";
|
|
10
|
+
import useEngineContext from "../../hooks/useEngineContext";
|
|
11
|
+
import { locales } from "@pisell/utils";
|
|
12
|
+
import localeTexts from "./locales";
|
|
13
|
+
import "./index.less";
|
|
14
|
+
var TaxSelect = function TaxSelect(props) {
|
|
15
|
+
var value = props.value,
|
|
16
|
+
onChange = props.onChange,
|
|
17
|
+
selectProps = props.selectProps,
|
|
18
|
+
_props$tax_rate = props.tax_rate,
|
|
19
|
+
tax_rate = _props$tax_rate === void 0 ? 10 : _props$tax_rate,
|
|
20
|
+
_props$tax_title = props.tax_title,
|
|
21
|
+
tax_title = _props$tax_title === void 0 ? "Tax" : _props$tax_title;
|
|
22
|
+
var inputNumberRef = useRef();
|
|
23
|
+
var _Form$useForm = Form.useForm(),
|
|
24
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
25
|
+
form = _Form$useForm2[0];
|
|
26
|
+
var _useState = useState(false),
|
|
27
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
+
open = _useState2[0],
|
|
29
|
+
setOpen = _useState2[1];
|
|
30
|
+
var context = useEngineContext();
|
|
31
|
+
var useTax = Form.useWatch("tax", form);
|
|
32
|
+
locales.init(localeTexts, localStorage.getItem("umi_locale") || "en");
|
|
33
|
+
useEffect(function () {
|
|
34
|
+
document.body.id = "body";
|
|
35
|
+
}, []);
|
|
36
|
+
var options = useMemo(function () {
|
|
37
|
+
var isEn = localStorage.getItem("umi_locale") === "en-US";
|
|
38
|
+
var taxOptions = [{
|
|
39
|
+
value: 0,
|
|
40
|
+
label: (isEn ? tax_title : "") + locales.getText("pisell2.text.tax-free")
|
|
41
|
+
}, {
|
|
42
|
+
value: tax_rate,
|
|
43
|
+
label: tax_rate + "%"
|
|
44
|
+
}, {
|
|
45
|
+
value: "custom",
|
|
46
|
+
label: locales.getText("pisell2.text.custom")
|
|
47
|
+
}];
|
|
48
|
+
return taxOptions;
|
|
49
|
+
}, []);
|
|
50
|
+
var _onChange = function _onChange(val) {
|
|
51
|
+
if (val === "custom") {
|
|
52
|
+
setOpen(true);
|
|
53
|
+
setTimeout(function () {
|
|
54
|
+
var _inputNumberRef$curre, _inputNumberRef$curre2;
|
|
55
|
+
form.setFieldsValue({
|
|
56
|
+
tax: value || tax_rate
|
|
57
|
+
});
|
|
58
|
+
(_inputNumberRef$curre = (_inputNumberRef$curre2 = inputNumberRef.current).focus) === null || _inputNumberRef$curre === void 0 ? void 0 : _inputNumberRef$curre.call(_inputNumberRef$curre2);
|
|
59
|
+
}, 10);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(val);
|
|
63
|
+
};
|
|
64
|
+
var _value = useMemo(function () {
|
|
65
|
+
if (value === undefined || value === null) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (options.some(function (d) {
|
|
69
|
+
return d.value === value;
|
|
70
|
+
})) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
return "".concat(locales.getText("pisell2.text.custom"), " (").concat(value, "%)");
|
|
74
|
+
}, [value]);
|
|
75
|
+
var onCancel = function onCancel() {
|
|
76
|
+
form.resetFields();
|
|
77
|
+
setOpen(false);
|
|
78
|
+
};
|
|
79
|
+
var onFinish = function onFinish(values) {
|
|
80
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(values.tax);
|
|
81
|
+
onCancel();
|
|
82
|
+
};
|
|
83
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, _extends({
|
|
84
|
+
options: options,
|
|
85
|
+
size: "large",
|
|
86
|
+
value: _value,
|
|
87
|
+
onChange: _onChange,
|
|
88
|
+
style: {
|
|
89
|
+
width: "100%"
|
|
90
|
+
},
|
|
91
|
+
placeholder: locales.getText("pisell2.text.please-enter")
|
|
92
|
+
}, selectProps)), /*#__PURE__*/React.createElement(Modal, {
|
|
93
|
+
open: open,
|
|
94
|
+
title: "".concat(locales.getText("pisell2.text.custom"), " ").concat(tax_title),
|
|
95
|
+
footer: null,
|
|
96
|
+
onCancel: onCancel
|
|
97
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
98
|
+
form: form,
|
|
99
|
+
layout: "vertical",
|
|
100
|
+
onFinish: onFinish
|
|
101
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
102
|
+
label: tax_title,
|
|
103
|
+
name: "tax",
|
|
104
|
+
required: true
|
|
105
|
+
}, /*#__PURE__*/React.createElement(InputNumber, {
|
|
106
|
+
ref: inputNumberRef,
|
|
107
|
+
size: "large",
|
|
108
|
+
min: 0,
|
|
109
|
+
max: 100,
|
|
110
|
+
type: "number",
|
|
111
|
+
addonAfter: "%",
|
|
112
|
+
style: {
|
|
113
|
+
width: "100%"
|
|
114
|
+
}
|
|
115
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
116
|
+
className: "tax-select-footer"
|
|
117
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
118
|
+
onClick: onCancel,
|
|
119
|
+
className: "tax-select-footer-item",
|
|
120
|
+
size: "large"
|
|
121
|
+
}, locales.getText("pisell2.text.cancel")), /*#__PURE__*/React.createElement(Button, {
|
|
122
|
+
type: "primary",
|
|
123
|
+
className: "tax-select-footer-item",
|
|
124
|
+
size: "large",
|
|
125
|
+
disabled: !useTax,
|
|
126
|
+
onClick: function onClick() {
|
|
127
|
+
form.submit();
|
|
128
|
+
}
|
|
129
|
+
}, locales.getText("pisell2.text.confirm")))));
|
|
130
|
+
};
|
|
131
|
+
var Test = function Test() {
|
|
132
|
+
var _useState3 = useState(),
|
|
133
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
134
|
+
value = _useState4[0],
|
|
135
|
+
setValue = _useState4[1];
|
|
136
|
+
return /*#__PURE__*/React.createElement(TaxSelect, {
|
|
137
|
+
value: value,
|
|
138
|
+
onChange: setValue
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
export default TaxSelect;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.text.tax-free': string;
|
|
4
|
+
'pisell2.text.custom': string;
|
|
5
|
+
'pisell2.text.cancel': string;
|
|
6
|
+
'pisell2.text.confirm': string;
|
|
7
|
+
'pisell2.text.please-enter': string;
|
|
8
|
+
};
|
|
9
|
+
'zh-CN': {
|
|
10
|
+
'pisell2.text.tax-free': string;
|
|
11
|
+
'pisell2.text.custom': string;
|
|
12
|
+
'pisell2.text.cancel': string;
|
|
13
|
+
'pisell2.text.confirm': string;
|
|
14
|
+
'pisell2.text.please-enter': string;
|
|
15
|
+
};
|
|
16
|
+
'zh-HK': {
|
|
17
|
+
'pisell2.text.tax-free': string;
|
|
18
|
+
'pisell2.text.custom': string;
|
|
19
|
+
'pisell2.text.cancel': string;
|
|
20
|
+
'pisell2.text.confirm': string;
|
|
21
|
+
'pisell2.text.please-enter': string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"en": {
|
|
3
|
+
'pisell2.text.tax-free': ' free',
|
|
4
|
+
'pisell2.text.custom': 'Custom',
|
|
5
|
+
'pisell2.text.cancel': 'Cancel',
|
|
6
|
+
'pisell2.text.confirm': 'Confirm',
|
|
7
|
+
'pisell2.text.please-enter': 'Please enter'
|
|
8
|
+
},
|
|
9
|
+
'zh-CN': {
|
|
10
|
+
'pisell2.text.tax-free': '免税',
|
|
11
|
+
'pisell2.text.custom': '自定义',
|
|
12
|
+
'pisell2.text.cancel': '取消',
|
|
13
|
+
'pisell2.text.confirm': '确认',
|
|
14
|
+
'pisell2.text.please-enter': '请输入'
|
|
15
|
+
},
|
|
16
|
+
'zh-HK': {
|
|
17
|
+
'pisell2.text.tax-free': '免稅',
|
|
18
|
+
'pisell2.text.custom': '自定義',
|
|
19
|
+
'pisell2.text.cancel': '取消',
|
|
20
|
+
'pisell2.text.confirm': '確認',
|
|
21
|
+
'pisell2.text.please-enter': '請輸入'
|
|
22
|
+
}
|
|
23
|
+
};
|
package/es/index.d.ts
CHANGED
|
@@ -14,3 +14,4 @@ export { default as BookingContacts } from './components/booking/materiels/conta
|
|
|
14
14
|
export { default as ProductExtension } from './components/productExtension';
|
|
15
15
|
export { default as BookingDeposit } from './components/booking/deposit';
|
|
16
16
|
export { default as RuleSetting } from './components/ruleSetting';
|
|
17
|
+
export { default as TaxSelect } from './components/taxSelect';
|
package/es/index.js
CHANGED
|
@@ -17,4 +17,5 @@ export { default as BookingDuration } from "./components/booking/materiels/durat
|
|
|
17
17
|
export { default as BookingContacts } from "./components/booking/materiels/contacts";
|
|
18
18
|
export { default as ProductExtension } from "./components/productExtension";
|
|
19
19
|
export { default as BookingDeposit } from "./components/booking/deposit";
|
|
20
|
-
export { default as RuleSetting } from "./components/ruleSetting";
|
|
20
|
+
export { default as RuleSetting } from "./components/ruleSetting";
|
|
21
|
+
export { default as TaxSelect } from "./components/taxSelect";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Booking: (props: any) =>
|
|
1
|
+
declare const Booking: (props: any) => any;
|
|
2
2
|
export default Booking;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
3
|
export declare const walkInData: {
|
|
3
4
|
id: number;
|
|
4
5
|
nickname: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
7
8
|
state: FormState;
|
|
8
9
|
} & {
|
|
9
10
|
dispatch: (params: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -88,7 +89,7 @@ export declare const walkInData: {
|
|
|
88
89
|
id: number;
|
|
89
90
|
nickname: string;
|
|
90
91
|
};
|
|
91
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
92
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
92
93
|
state: FormState;
|
|
93
94
|
} & {
|
|
94
95
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|