@pisell/private-materials 6.1.17 → 6.1.19
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 +21 -13
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -1
- package/es/components/booking/components/actionButtons/index.js +17 -7
- package/es/components/booking/components/footer/index.js +7 -3
- package/es/components/booking/deposit/ClientItem/index.js +1 -1
- package/es/components/booking/deposit/DepositItem/index.js +1 -1
- package/es/components/booking/hooks/useQuotation.js +1 -1
- package/es/components/booking/info/hooks/useInfoHolder.js +2 -2
- package/es/components/booking/info/service/Lists.js +1 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/editService/constants.d.ts +1 -0
- package/es/components/booking/info/service/editService/constants.js +3 -0
- package/es/components/booking/info/service/editService/index.js +15 -10
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editService/index.js +6 -5
- package/es/components/booking/info2/service/index.js +0 -1
- package/es/components/booking/locales.js +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +6 -6
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/shoppingCart/components/Cart/Product.js +4 -6
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +86 -26
- package/es/components/ticketBooking/components/ticketBooking/index.js +5 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +5 -2
- package/es/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +6 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanManager.js +20 -0
- package/es/components/ticketBooking/utils/index.d.ts +2 -0
- package/es/components/ticketBooking/utils/index.js +18 -1
- package/es/pro/pisellNumberSelector/index.js +43 -24
- package/es/pro/pisellPhoneKeyboard/index.js +1 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -1
- package/lib/components/booking/components/actionButtons/index.js +15 -6
- package/lib/components/booking/components/footer/index.js +3 -0
- package/lib/components/booking/deposit/ClientItem/index.js +1 -1
- package/lib/components/booking/deposit/DepositItem/index.js +1 -1
- package/lib/components/booking/hooks/useQuotation.js +1 -1
- package/lib/components/booking/info/hooks/useInfoHolder.js +2 -2
- package/lib/components/booking/info/service/Lists.js +1 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
- package/lib/components/booking/info/service/editService/constants.js +31 -0
- package/lib/components/booking/info/service/editService/index.js +7 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editService/index.js +6 -5
- package/lib/components/booking/locales.js +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +6 -6
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +3 -8
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +58 -18
- package/lib/components/ticketBooking/components/ticketBooking/index.js +4 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +5 -2
- package/lib/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +6 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanManager.js +44 -0
- package/lib/components/ticketBooking/utils/index.d.ts +2 -0
- package/lib/components/ticketBooking/utils/index.js +22 -0
- package/lib/pro/pisellNumberSelector/index.js +30 -20
- package/lib/pro/pisellPhoneKeyboard/index.js +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/package.json +12 -12
@@ -34,9 +34,9 @@ __export(pisellNumberSelector_exports, {
|
|
34
34
|
module.exports = __toCommonJS(pisellNumberSelector_exports);
|
35
35
|
var import_react = __toESM(require("react"));
|
36
36
|
var import_antd = require("antd");
|
37
|
-
var import_Delete = __toESM(require("@pisell/icon/
|
38
|
-
var import_Plus = __toESM(require("@pisell/icon/
|
39
|
-
var import_Minus = __toESM(require("@pisell/icon/
|
37
|
+
var import_Delete = __toESM(require("@pisell/icon/es/Delete"));
|
38
|
+
var import_Plus = __toESM(require("@pisell/icon/es/Plus"));
|
39
|
+
var import_Minus = __toESM(require("@pisell/icon/es/Minus"));
|
40
40
|
var import_numberKeyboard = __toESM(require("../numberKeyboard"));
|
41
41
|
var import_classnames = __toESM(require("classnames"));
|
42
42
|
var import_utils = require("@pisell/utils");
|
@@ -55,6 +55,7 @@ var PisellNumberSelector = ({
|
|
55
55
|
}) => {
|
56
56
|
const [open, setOpen] = (0, import_react.useState)(false);
|
57
57
|
const [inputValue, setInputValue] = (0, import_react.useState)(value.toString());
|
58
|
+
const [tempValue, setTempValue] = (0, import_react.useState)(value.toString());
|
58
59
|
const KeyboardItems = (0, import_react.useMemo)(() => {
|
59
60
|
return [
|
60
61
|
{
|
@@ -145,20 +146,21 @@ var PisellNumberSelector = ({
|
|
145
146
|
};
|
146
147
|
const handleChange = (e) => {
|
147
148
|
if (!e) {
|
148
|
-
|
149
|
+
setTempValue(min.toString());
|
149
150
|
return;
|
150
151
|
}
|
151
152
|
if (e === "delete") {
|
152
|
-
|
153
|
+
const newTempValue = tempValue.slice(0, -1);
|
154
|
+
setTempValue(newTempValue || "0");
|
153
155
|
return;
|
154
156
|
} else if (e === "verify") {
|
155
|
-
const newValue = parseInt(
|
157
|
+
const newValue = parseInt(tempValue) || 0;
|
156
158
|
const clampedValue = Math.max(min, Math.min(max, newValue));
|
157
159
|
onChange == null ? void 0 : onChange(clampedValue);
|
158
160
|
setOpen(false);
|
159
161
|
return;
|
160
162
|
} else {
|
161
|
-
|
163
|
+
setTempValue(e);
|
162
164
|
}
|
163
165
|
};
|
164
166
|
const adjustPriceContent = (0, import_react.useMemo)(() => {
|
@@ -166,20 +168,35 @@ var PisellNumberSelector = ({
|
|
166
168
|
return /* @__PURE__ */ import_react.default.createElement(
|
167
169
|
import_numberKeyboard.default,
|
168
170
|
{
|
169
|
-
|
170
|
-
value: value.toString(),
|
171
|
+
value: tempValue,
|
171
172
|
max,
|
172
173
|
onChange: handleChange,
|
173
174
|
onOk: () => {
|
175
|
+
const newValue = parseInt(tempValue) || 0;
|
176
|
+
const clampedValue = Math.max(min, Math.min(max, newValue));
|
177
|
+
onChange == null ? void 0 : onChange(clampedValue);
|
174
178
|
setOpen(false);
|
175
179
|
}
|
176
180
|
}
|
177
181
|
);
|
178
|
-
}, [enablePriceAdjust,
|
182
|
+
}, [enablePriceAdjust, tempValue, max, handleChange]);
|
179
183
|
const handleNumberClick = () => {
|
180
184
|
if (disabled) return;
|
181
185
|
if (enablePriceAdjust) {
|
182
|
-
|
186
|
+
setTempValue(value.toString());
|
187
|
+
}
|
188
|
+
};
|
189
|
+
const handleOpenChange = (visible) => {
|
190
|
+
setOpen(visible);
|
191
|
+
if (visible) {
|
192
|
+
setTempValue(value.toString());
|
193
|
+
} else {
|
194
|
+
const tempNumber = parseInt(tempValue) || 0;
|
195
|
+
const clampedValue = Math.max(min, Math.min(max, tempNumber));
|
196
|
+
if (clampedValue !== value) {
|
197
|
+
onChange == null ? void 0 : onChange(clampedValue);
|
198
|
+
}
|
199
|
+
setTempValue(value.toString());
|
183
200
|
}
|
184
201
|
};
|
185
202
|
const numberDisplayElement = enablePriceAdjust ? /* @__PURE__ */ import_react.default.createElement(
|
@@ -209,20 +226,13 @@ var PisellNumberSelector = ({
|
|
209
226
|
content: adjustPriceContent,
|
210
227
|
trigger: ["click"],
|
211
228
|
overlayInnerStyle: { padding: 0 },
|
212
|
-
onOpenChange: (visible) => {
|
213
|
-
setOpen(visible);
|
214
|
-
if (visible) {
|
215
|
-
setInputValue(value.toString());
|
216
|
-
} else {
|
217
|
-
setInputValue(value.toString());
|
218
|
-
}
|
219
|
-
},
|
220
229
|
destroyTooltipOnHide: true,
|
221
230
|
arrow: false,
|
222
231
|
align: {
|
223
232
|
offset: [0, 0]
|
224
233
|
},
|
225
|
-
overlayClassName: "pisell-number-selector-popover"
|
234
|
+
overlayClassName: "pisell-number-selector-popover",
|
235
|
+
onOpenChange: handleOpenChange
|
226
236
|
},
|
227
237
|
numberDisplayElement
|
228
238
|
) : numberDisplayElement;
|
@@ -36,7 +36,7 @@ var import_react = __toESM(require("react"));
|
|
36
36
|
var import_materials = require("@pisell/materials");
|
37
37
|
var import_antd = require("antd");
|
38
38
|
var import_index = require("./index.less");
|
39
|
-
var import_Delete = __toESM(require("@pisell/icon/
|
39
|
+
var import_Delete = __toESM(require("@pisell/icon/es/Delete"));
|
40
40
|
var import_utils = require("@pisell/utils");
|
41
41
|
var import_locales = __toESM(require("./locales"));
|
42
42
|
var import_locales2 = require("../../utils/locales");
|
package/lib/utils/index.d.ts
CHANGED
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
|
|
18
18
|
export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
|
19
19
|
export declare const saveConfirm: () => Promise<{
|
20
20
|
destroy: () => void;
|
21
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
21
|
+
update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
|
22
22
|
}>;
|
23
23
|
export { modal };
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pisell/private-materials",
|
3
|
-
"version": "6.1.
|
3
|
+
"version": "6.1.19",
|
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
|
+
},
|
4
10
|
"main": "./lib/index.js",
|
5
11
|
"module": "./es/index.js",
|
6
12
|
"types": "./lib/index.d.ts",
|
@@ -50,6 +56,10 @@
|
|
50
56
|
"@dnd-kit/modifiers": "^6.0.1",
|
51
57
|
"@dnd-kit/sortable": "^7.0.2",
|
52
58
|
"@dnd-kit/utilities": "^3.2.1",
|
59
|
+
"@pisell/date-picker": "workspace:*",
|
60
|
+
"@pisell/icon": "workspace:*",
|
61
|
+
"@pisell/materials": "workspace:*",
|
62
|
+
"@pisell/utils": "workspace:*",
|
53
63
|
"ahooks": "^3.7.6",
|
54
64
|
"antd": "^5.6.3",
|
55
65
|
"classnames": "^2.3.2",
|
@@ -58,11 +68,7 @@
|
|
58
68
|
"rc-virtual-list": "^3.11.3",
|
59
69
|
"react-infinite-scroll-component": "^6.1.0",
|
60
70
|
"react-resizable": "^3.0.5",
|
61
|
-
"styled-components": "^6.0.0-rc.3"
|
62
|
-
"@pisell/date-picker": "3.0.4",
|
63
|
-
"@pisell/icon": "0.0.11",
|
64
|
-
"@pisell/materials": "6.1.5",
|
65
|
-
"@pisell/utils": "3.0.0"
|
71
|
+
"styled-components": "^6.0.0-rc.3"
|
66
72
|
},
|
67
73
|
"peerDependencies": {
|
68
74
|
"react": "^18.0.0",
|
@@ -70,11 +76,5 @@
|
|
70
76
|
},
|
71
77
|
"componentConfig": {
|
72
78
|
"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
|
}
|