@pisell/private-materials 3.0.174 → 3.0.175
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 +3 -3
- package/build/lowcode/view.js +3 -3
- package/es/components/booking/addons/model.d.ts +2 -1
- package/es/components/booking/forms/model.d.ts +2 -1
- package/es/components/booking/info2/service/addService/utils.js +3 -2
- package/es/components/booking/info2/service/addTimeModal/utils.js +2 -2
- 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/booking/utils.js +1 -0
- 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/info2/service/addService/utils.js +3 -2
- package/lib/components/booking/info2/service/addTimeModal/utils.js +2 -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/booking/utils.js +1 -0
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +2 -1
- 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) =>
|
|
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: {
|
|
@@ -32,8 +32,9 @@ export var getUsableTime = function getUsableTime(cacheItem) {
|
|
|
32
32
|
|
|
33
33
|
// 取最小的时间
|
|
34
34
|
var minEndAt = items.reduce(function (pre, event) {
|
|
35
|
-
var
|
|
36
|
-
|
|
35
|
+
var _event$_extend, _event$_extend$usable, _pre$_extend, _pre$_extend$usableTi;
|
|
36
|
+
var endAt = dayjs((_event$_extend = event._extend) === null || _event$_extend === void 0 ? void 0 : (_event$_extend$usable = _event$_extend.usableTime) === null || _event$_extend$usable === void 0 ? void 0 : _event$_extend$usable.end_at);
|
|
37
|
+
return endAt.isBefore((_pre$_extend = pre._extend) === null || _pre$_extend === void 0 ? void 0 : (_pre$_extend$usableTi = _pre$_extend.usableTime) === null || _pre$_extend$usableTi === void 0 ? void 0 : _pre$_extend$usableTi.end_at) ? event : pre;
|
|
37
38
|
}, items[0]);
|
|
38
39
|
return minEndAt;
|
|
39
40
|
} catch (err) {
|
|
@@ -51,11 +51,11 @@ export var getAddTimeSplits = function getAddTimeSplits(product, cacheItem) {
|
|
|
51
51
|
|
|
52
52
|
// 灵活时长
|
|
53
53
|
if (add_time.additional_time_options === 'unlimited') {
|
|
54
|
-
var _getUsableTime;
|
|
54
|
+
var _getUsableTime, _getUsableTime$_exten, _getUsableTime$_exten2;
|
|
55
55
|
// 1. 当前服务的时长和结束时间
|
|
56
56
|
// 2. 当前资源的结束时间
|
|
57
57
|
// 3. 当前店铺的结束时间
|
|
58
|
-
var maxEndDate = getEndDate(cacheItem._extend.startDate, 'flexible', (_getUsableTime = getUsableTime(cacheItem)) === null || _getUsableTime === void 0 ? void 0 : _getUsableTime.end_at);
|
|
58
|
+
var maxEndDate = getEndDate(cacheItem._extend.startDate, 'flexible', (_getUsableTime = getUsableTime(cacheItem)) === null || _getUsableTime === void 0 ? void 0 : (_getUsableTime$_exten = _getUsableTime._extend) === null || _getUsableTime$_exten === void 0 ? void 0 : (_getUsableTime$_exten2 = _getUsableTime$_exten.usableTime) === null || _getUsableTime$_exten2 === void 0 ? void 0 : _getUsableTime$_exten2.end_at);
|
|
59
59
|
var _value = maxEndDate.diff(cacheItem._extend.endDate, 'minute');
|
|
60
60
|
// 店铺营业时间大于当前服务的结束时间, 则取店铺营业时间, 否则就不可选
|
|
61
61
|
if (_value > 0) {
|
|
@@ -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: {
|
|
@@ -414,6 +414,7 @@ export var getEndDate = function getEndDate(startDate, duration, endDate) {
|
|
|
414
414
|
if (!endDate) {
|
|
415
415
|
return openingDate;
|
|
416
416
|
}
|
|
417
|
+
endDate = dayjs(endDate);
|
|
417
418
|
|
|
418
419
|
// 如果最佳time时间 大于 店铺营业结束时间, 则 取店铺营业时间, 否则为time的结束时间
|
|
419
420
|
if (endDate.isAfter(openingDate)) {
|
|
@@ -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: {
|
|
@@ -57,8 +57,9 @@ var getUsableTime = (cacheItem) => {
|
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
59
|
const minEndAt = items.reduce((pre, event) => {
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
var _a, _b, _c, _d;
|
|
61
|
+
const endAt = (0, import_dayjs.default)((_b = (_a = event._extend) == null ? void 0 : _a.usableTime) == null ? void 0 : _b.end_at);
|
|
62
|
+
return endAt.isBefore((_d = (_c = pre._extend) == null ? void 0 : _c.usableTime) == null ? void 0 : _d.end_at) ? event : pre;
|
|
62
63
|
}, items[0]);
|
|
63
64
|
return minEndAt;
|
|
64
65
|
} catch (err) {
|
|
@@ -40,7 +40,7 @@ var import_utils2 = require("@pisell/utils");
|
|
|
40
40
|
var import_lodash = require("lodash");
|
|
41
41
|
var import_utils3 = require("../addService/utils");
|
|
42
42
|
var getAddTimeSplits = (product, cacheItem) => {
|
|
43
|
-
var _a;
|
|
43
|
+
var _a, _b, _c;
|
|
44
44
|
const { add_time = {
|
|
45
45
|
calculate_type: "select_quantity",
|
|
46
46
|
// 最大时长
|
|
@@ -53,7 +53,7 @@ var getAddTimeSplits = (product, cacheItem) => {
|
|
|
53
53
|
unit_duration: 30
|
|
54
54
|
}, price = 0 } = product;
|
|
55
55
|
if (add_time.additional_time_options === "unlimited") {
|
|
56
|
-
let maxEndDate = (0, import_utils.getEndDate)(cacheItem._extend.startDate, "flexible", (_a = (0, import_utils3.getUsableTime)(cacheItem)) == null ? void 0 : _a.end_at);
|
|
56
|
+
let maxEndDate = (0, import_utils.getEndDate)(cacheItem._extend.startDate, "flexible", (_c = (_b = (_a = (0, import_utils3.getUsableTime)(cacheItem)) == null ? void 0 : _a._extend) == null ? void 0 : _b.usableTime) == null ? void 0 : _c.end_at);
|
|
57
57
|
let _value = maxEndDate.diff(cacheItem._extend.endDate, "minute");
|
|
58
58
|
if (_value > 0) {
|
|
59
59
|
return [
|
|
@@ -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.175",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
62
|
"@pisell/utils": "1.0.42",
|
|
63
|
-
"@pisell/
|
|
63
|
+
"@pisell/icon": "0.0.11",
|
|
64
64
|
"@pisell/date-picker": "1.0.100",
|
|
65
|
-
"@pisell/
|
|
65
|
+
"@pisell/materials": "3.0.51"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0",
|