@pisell/private-materials 3.0.176 → 3.0.178
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/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/booking/addons/model.d.ts +2 -1
- package/es/components/booking/forms/model.d.ts +2 -1
- package/es/components/booking/info/service/addService/index.js +19 -5
- package/es/components/booking/info2/service/addService/index.js +19 -5
- 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/model.d.ts +2 -1
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +2 -1
- package/lib/components/booking/addons/model.d.ts +2 -1
- package/lib/components/booking/forms/model.d.ts +2 -1
- package/lib/components/booking/info/service/addService/index.js +12 -2
- package/lib/components/booking/info2/service/addService/index.js +12 -2
- 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/model.d.ts +2 -1
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +2 -1
- package/package.json +4 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: 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: {
|
|
@@ -150,19 +150,33 @@ var Info = function Info(props) {
|
|
|
150
150
|
}();
|
|
151
151
|
var getServices = /*#__PURE__*/function () {
|
|
152
152
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
153
|
-
var _state$eventOtherPara;
|
|
153
|
+
var _state$eventOtherPara, _state$eventOtherPara2, _state$eventOtherPara3;
|
|
154
154
|
var data;
|
|
155
155
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
156
156
|
while (1) switch (_context2.prev = _context2.next) {
|
|
157
157
|
case 0:
|
|
158
158
|
setLoading(true);
|
|
159
|
-
|
|
159
|
+
// 活动预约如果没有绑定商品id不查询
|
|
160
|
+
if (!(state.renderType === 'eventBooking' && !((_state$eventOtherPara = state.eventOtherParams) !== null && _state$eventOtherPara !== void 0 && (_state$eventOtherPara2 = _state$eventOtherPara.productIds) !== null && _state$eventOtherPara2 !== void 0 && _state$eventOtherPara2.length))) {
|
|
161
|
+
_context2.next = 5;
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
dispatch({
|
|
165
|
+
type: 'setService',
|
|
166
|
+
payload: {
|
|
167
|
+
services: []
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
setLoading(false);
|
|
171
|
+
return _context2.abrupt("return");
|
|
172
|
+
case 5:
|
|
173
|
+
_context2.next = 7;
|
|
160
174
|
return state.apis.getServices(_objectSpread({
|
|
161
175
|
skip: 1,
|
|
162
176
|
num: 500,
|
|
163
177
|
extension_type: state.renderType === 'eventBooking' ? undefined : ['product_appointment', 'appointment_ticket'],
|
|
164
178
|
with: ['category'],
|
|
165
|
-
ids: state.renderType === 'eventBooking' ? (_state$
|
|
179
|
+
ids: state.renderType === 'eventBooking' ? (_state$eventOtherPara3 = state.eventOtherParams) === null || _state$eventOtherPara3 === void 0 ? void 0 : _state$eventOtherPara3.productIds : undefined,
|
|
166
180
|
open_quotation: 1,
|
|
167
181
|
with_schedule: 1,
|
|
168
182
|
with_count: ['bundleGroup', 'optionGroup'],
|
|
@@ -175,7 +189,7 @@ var Info = function Info(props) {
|
|
|
175
189
|
useCache: true
|
|
176
190
|
}
|
|
177
191
|
}));
|
|
178
|
-
case
|
|
192
|
+
case 7:
|
|
179
193
|
data = _context2.sent;
|
|
180
194
|
setLoading(false);
|
|
181
195
|
|
|
@@ -189,7 +203,7 @@ var Info = function Info(props) {
|
|
|
189
203
|
services: (data === null || data === void 0 ? void 0 : data.list) || []
|
|
190
204
|
}
|
|
191
205
|
});
|
|
192
|
-
case
|
|
206
|
+
case 11:
|
|
193
207
|
case "end":
|
|
194
208
|
return _context2.stop();
|
|
195
209
|
}
|
|
@@ -150,19 +150,33 @@ var Info = function Info(props) {
|
|
|
150
150
|
}();
|
|
151
151
|
var getServices = /*#__PURE__*/function () {
|
|
152
152
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
153
|
-
var _state$eventOtherPara;
|
|
153
|
+
var _state$eventOtherPara, _state$eventOtherPara2, _state$eventOtherPara3;
|
|
154
154
|
var data;
|
|
155
155
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
156
156
|
while (1) switch (_context2.prev = _context2.next) {
|
|
157
157
|
case 0:
|
|
158
158
|
setLoading(true);
|
|
159
|
-
|
|
159
|
+
// 活动预约如果没有绑定商品id不查询
|
|
160
|
+
if (!(state.renderType === 'eventBooking' && !((_state$eventOtherPara = state.eventOtherParams) !== null && _state$eventOtherPara !== void 0 && (_state$eventOtherPara2 = _state$eventOtherPara.productIds) !== null && _state$eventOtherPara2 !== void 0 && _state$eventOtherPara2.length))) {
|
|
161
|
+
_context2.next = 5;
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
dispatch({
|
|
165
|
+
type: 'setService',
|
|
166
|
+
payload: {
|
|
167
|
+
services: []
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
setLoading(false);
|
|
171
|
+
return _context2.abrupt("return");
|
|
172
|
+
case 5:
|
|
173
|
+
_context2.next = 7;
|
|
160
174
|
return state.apis.getServices(_objectSpread({
|
|
161
175
|
skip: 1,
|
|
162
176
|
num: 500,
|
|
163
177
|
extension_type: state.renderType === 'eventBooking' ? undefined : ['product_appointment', 'appointment_ticket', 'service_product'],
|
|
164
178
|
with: ['category'],
|
|
165
|
-
ids: state.renderType === 'eventBooking' ? (_state$
|
|
179
|
+
ids: state.renderType === 'eventBooking' ? (_state$eventOtherPara3 = state.eventOtherParams) === null || _state$eventOtherPara3 === void 0 ? void 0 : _state$eventOtherPara3.productIds : undefined,
|
|
166
180
|
open_quotation: 1,
|
|
167
181
|
with_schedule: 1,
|
|
168
182
|
with_count: ['bundleGroup', 'optionGroup'],
|
|
@@ -175,7 +189,7 @@ var Info = function Info(props) {
|
|
|
175
189
|
useCache: true
|
|
176
190
|
}
|
|
177
191
|
}));
|
|
178
|
-
case
|
|
192
|
+
case 7:
|
|
179
193
|
data = _context2.sent;
|
|
180
194
|
setLoading(false);
|
|
181
195
|
|
|
@@ -189,7 +203,7 @@ var Info = function Info(props) {
|
|
|
189
203
|
services: (data === null || data === void 0 ? void 0 : data.list) || []
|
|
190
204
|
}
|
|
191
205
|
});
|
|
192
|
-
case
|
|
206
|
+
case 11:
|
|
193
207
|
case "end":
|
|
194
208
|
return _context2.stop();
|
|
195
209
|
}
|
|
@@ -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,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: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: 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: {
|
|
@@ -124,14 +124,24 @@ var Info = (props) => {
|
|
|
124
124
|
});
|
|
125
125
|
};
|
|
126
126
|
const getServices = async (params) => {
|
|
127
|
-
var _a2;
|
|
127
|
+
var _a2, _b2, _c2;
|
|
128
128
|
setLoading(true);
|
|
129
|
+
if (state.renderType === "eventBooking" && !((_b2 = (_a2 = state.eventOtherParams) == null ? void 0 : _a2.productIds) == null ? void 0 : _b2.length)) {
|
|
130
|
+
dispatch({
|
|
131
|
+
type: "setService",
|
|
132
|
+
payload: {
|
|
133
|
+
services: []
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
setLoading(false);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
129
139
|
let data = await state.apis.getServices({
|
|
130
140
|
skip: 1,
|
|
131
141
|
num: 500,
|
|
132
142
|
extension_type: state.renderType === "eventBooking" ? void 0 : ["product_appointment", "appointment_ticket"],
|
|
133
143
|
with: ["category"],
|
|
134
|
-
ids: state.renderType === "eventBooking" ? (
|
|
144
|
+
ids: state.renderType === "eventBooking" ? (_c2 = state.eventOtherParams) == null ? void 0 : _c2.productIds : void 0,
|
|
135
145
|
open_quotation: 1,
|
|
136
146
|
with_schedule: 1,
|
|
137
147
|
with_count: ["bundleGroup", "optionGroup"],
|
|
@@ -124,14 +124,24 @@ var Info = (props) => {
|
|
|
124
124
|
});
|
|
125
125
|
};
|
|
126
126
|
const getServices = async (params) => {
|
|
127
|
-
var _a2;
|
|
127
|
+
var _a2, _b2, _c2;
|
|
128
128
|
setLoading(true);
|
|
129
|
+
if (state.renderType === "eventBooking" && !((_b2 = (_a2 = state.eventOtherParams) == null ? void 0 : _a2.productIds) == null ? void 0 : _b2.length)) {
|
|
130
|
+
dispatch({
|
|
131
|
+
type: "setService",
|
|
132
|
+
payload: {
|
|
133
|
+
services: []
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
setLoading(false);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
129
139
|
let data = await state.apis.getServices({
|
|
130
140
|
skip: 1,
|
|
131
141
|
num: 500,
|
|
132
142
|
extension_type: state.renderType === "eventBooking" ? void 0 : ["product_appointment", "appointment_ticket", "service_product"],
|
|
133
143
|
with: ["category"],
|
|
134
|
-
ids: state.renderType === "eventBooking" ? (
|
|
144
|
+
ids: state.renderType === "eventBooking" ? (_c2 = state.eventOtherParams) == null ? void 0 : _c2.productIds : void 0,
|
|
135
145
|
open_quotation: 1,
|
|
136
146
|
with_schedule: 1,
|
|
137
147
|
with_count: ["bundleGroup", "optionGroup"],
|
|
@@ -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,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: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.178",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
|
-
"@pisell/icon": "0.0.11",
|
|
63
|
-
"@pisell/materials": "3.0.51",
|
|
64
62
|
"@pisell/date-picker": "1.0.100",
|
|
65
|
-
"@pisell/utils": "1.0.42"
|
|
63
|
+
"@pisell/utils": "1.0.42",
|
|
64
|
+
"@pisell/icon": "0.0.11",
|
|
65
|
+
"@pisell/materials": "3.0.52"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0",
|