@pisell/private-materials 3.4.1 → 3.4.2
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 +13 -13
- package/build/lowcode/render/default/view.js +4 -4
- package/build/lowcode/view.js +7 -7
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info2/index.js +6 -4
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/index.js +70 -21
- package/es/components/pay/toC/index.js +46 -14
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/ticketBooking/components/ticketBooking/index.js +121 -2
- package/es/components/ticketBooking/locales.d.ts +164 -146
- package/es/components/ticketBooking/locales.js +195 -147
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
- package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/es/components/ticketBooking/utils/formatTime.js +144 -0
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/hooks/useComponents.js +1 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info2/index.js +21 -11
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/pay/toC/PaymentMethods/index.js +30 -2
- package/lib/components/pay/toC/index.js +29 -9
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +141 -22
- package/lib/components/ticketBooking/locales.d.ts +164 -146
- package/lib/components/ticketBooking/locales.js +22 -4
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
- package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/lib/components/ticketBooking/utils/formatTime.js +139 -0
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/utils/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -23,7 +23,7 @@ __export(locales_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(locales_exports);
|
|
25
25
|
var locales_default = {
|
|
26
|
-
|
|
26
|
+
en: {
|
|
27
27
|
"pisell2.ticket-booking.info": "Info",
|
|
28
28
|
"pisell2.ticket-booking.notes": "Notes",
|
|
29
29
|
"pisell2.ticket-booking.forms": "Forms",
|
|
@@ -71,7 +71,13 @@ var locales_default = {
|
|
|
71
71
|
"pisell2.ticket-booking.add-to-cart": "Added to Cart",
|
|
72
72
|
"pisell2.ticket-booking.not-available-title": "Sorry, Not available at current time.",
|
|
73
73
|
"pisell2.ticket-booking.not-available-ok": "OK",
|
|
74
|
-
"pisell2.ticket-booking.in-cart": (number) => `${number} in cart
|
|
74
|
+
"pisell2.ticket-booking.in-cart": (number) => `${number} in cart`,
|
|
75
|
+
"pisell2.product.card.cart-items": (number) => `${number}items`,
|
|
76
|
+
"pisell2.product.card.subtotal": "Subtotal",
|
|
77
|
+
"pisell2.product.card.hour.minute": (hour, minute) => `${hour > 0 ? `${hour}h` : ""}${hour > 0 && minute > 0 ? " " : ""}${minute > 0 ? `${minute}min` : ""}`,
|
|
78
|
+
"pisell2.product.card.day": (val) => `${val > 1 ? " days" : " day"}`,
|
|
79
|
+
"pisell2.product.card.day.event": (val) => `${val > 1 ? " events" : " event"}`,
|
|
80
|
+
"pisell2.product.card.minute": (val) => `${val > 1 ? " minutes" : " minute"}`
|
|
75
81
|
},
|
|
76
82
|
"zh-CN": {
|
|
77
83
|
"pisell2.ticket-booking.info": "信息",
|
|
@@ -121,7 +127,13 @@ var locales_default = {
|
|
|
121
127
|
"pisell2.ticket-booking.add-to-cart": "已加入购物车",
|
|
122
128
|
"pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售时间。",
|
|
123
129
|
"pisell2.ticket-booking.not-available-ok": "好的",
|
|
124
|
-
"pisell2.
|
|
130
|
+
"pisell2.product.card.cart-items": (number) => `${number}件商品`,
|
|
131
|
+
"pisell2.product.card.subtotal": "小计",
|
|
132
|
+
"pisell2.ticket-booking.in-cart": (number) => `已有${number}件`,
|
|
133
|
+
"pisell2.product.card.hour.minute": (hour, minute) => `${hour > 0 ? `${hour}小时` : ""}${minute > 0 ? `${minute}分钟` : ""}`,
|
|
134
|
+
"pisell2.product.card.day": (val) => "天",
|
|
135
|
+
"pisell2.product.card.day.event": (val) => "个活动",
|
|
136
|
+
"pisell2.product.card.minute": (val) => "分钟"
|
|
125
137
|
},
|
|
126
138
|
"zh-HK": {
|
|
127
139
|
"pisell2.ticket-booking.info": "資訊",
|
|
@@ -171,6 +183,12 @@ var locales_default = {
|
|
|
171
183
|
"pisell2.ticket-booking.add-to-cart": "已加入购物车",
|
|
172
184
|
"pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售時間。",
|
|
173
185
|
"pisell2.ticket-booking.not-available-ok": "好的",
|
|
174
|
-
"pisell2.ticket-booking.in-cart": (number) => `已有${number}
|
|
186
|
+
"pisell2.ticket-booking.in-cart": (number) => `已有${number}件`,
|
|
187
|
+
"pisell2.product.card.cart-items": (number) => `${number}件商品`,
|
|
188
|
+
"pisell2.product.card.subtotal": "小計",
|
|
189
|
+
"pisell2.product.card.hour.minute": (hour, minute) => `${hour > 0 ? `${hour}小時` : ""}${minute > 0 ? `${minute}分鐘` : ""}`,
|
|
190
|
+
"pisell2.product.card.day": (val) => "天",
|
|
191
|
+
"pisell2.product.card.day.event": (val) => "个活動",
|
|
192
|
+
"pisell2.product.card.minute": (val) => "分鐘"
|
|
175
193
|
}
|
|
176
194
|
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/ticketBooking/utils/formatProductMessage.ts
|
|
20
|
+
var formatProductMessage_exports = {};
|
|
21
|
+
__export(formatProductMessage_exports, {
|
|
22
|
+
default: () => formatProductMessage_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(formatProductMessage_exports);
|
|
25
|
+
var import_utils = require("@pisell/utils");
|
|
26
|
+
var import_formatTime = require("./formatTime");
|
|
27
|
+
var formatProductMessage = (product, utils) => {
|
|
28
|
+
const {
|
|
29
|
+
product_option_string,
|
|
30
|
+
options,
|
|
31
|
+
bundle,
|
|
32
|
+
currency_symbol,
|
|
33
|
+
start_date,
|
|
34
|
+
end_date,
|
|
35
|
+
holder_id,
|
|
36
|
+
holders,
|
|
37
|
+
multiResources
|
|
38
|
+
} = product;
|
|
39
|
+
let str = "";
|
|
40
|
+
if (start_date && end_date) {
|
|
41
|
+
str += `${(0, import_formatTime.getServiceTime)(product, start_date, utils)}
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
44
|
+
if (holder_id && Array.isArray(holders)) {
|
|
45
|
+
const targetHolder = holders.find((holder) => holder.id === holder_id);
|
|
46
|
+
if (targetHolder == null ? void 0 : targetHolder.label) {
|
|
47
|
+
str += `${targetHolder.label}
|
|
48
|
+
`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (Array.isArray(multiResources) && multiResources.length > 0) {
|
|
52
|
+
multiResources.forEach((resource) => {
|
|
53
|
+
const { id: ids, lists } = resource;
|
|
54
|
+
if (Array.isArray(ids)) {
|
|
55
|
+
ids.forEach((id) => {
|
|
56
|
+
const targetRes = lists.find((l) => l.id === id);
|
|
57
|
+
if (targetRes == null ? void 0 : targetRes.label) str += `${targetRes == null ? void 0 : targetRes.label}
|
|
58
|
+
`;
|
|
59
|
+
});
|
|
60
|
+
} else {
|
|
61
|
+
const targetRes = lists.find((l) => l.id === ids);
|
|
62
|
+
if (targetRes == null ? void 0 : targetRes.label) str += `${targetRes == null ? void 0 : targetRes.label}
|
|
63
|
+
`;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
if (product_option_string) str += `${product_option_string}
|
|
68
|
+
`;
|
|
69
|
+
if (Array.isArray(options) && options.length) {
|
|
70
|
+
options.forEach((opt) => {
|
|
71
|
+
str += `${opt.name} ${(0, import_utils.formatAmount)(opt == null ? void 0 : opt.price, 2, currency_symbol)} x ${opt.num}
|
|
72
|
+
`;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
if (Array.isArray(bundle) && bundle.length) {
|
|
76
|
+
bundle.forEach((item) => {
|
|
77
|
+
str += `${item.title}
|
|
78
|
+
`;
|
|
79
|
+
str += `${(0, import_utils.formatAmount)(item.price, 2, currency_symbol)} x ${item.num}`;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return str;
|
|
83
|
+
};
|
|
84
|
+
var formatProductMessage_default = formatProductMessage;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import 'dayjs/locale/zh-cn';
|
|
2
|
+
import 'dayjs/locale/en';
|
|
3
|
+
import 'dayjs/locale/zh-tw';
|
|
4
|
+
/**
|
|
5
|
+
* @title: 是否英文
|
|
6
|
+
* @description:
|
|
7
|
+
* @param {any} item
|
|
8
|
+
* @return {*}
|
|
9
|
+
* @Author: WangHan
|
|
10
|
+
* @Date: 2024-12-28 22:49
|
|
11
|
+
*/
|
|
12
|
+
export declare const isEn: (item: any) => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @title: 跨日预约时间
|
|
15
|
+
* @description:
|
|
16
|
+
* @param {any} item
|
|
17
|
+
* @return {*}
|
|
18
|
+
* @Author: WangHan
|
|
19
|
+
* @Date: 2024-12-28 22:50
|
|
20
|
+
*/
|
|
21
|
+
export declare const formatMultiDayDate: (item: any) => string;
|
|
22
|
+
/**
|
|
23
|
+
* @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
|
|
24
|
+
* @description:
|
|
25
|
+
* @param {any} item
|
|
26
|
+
* @param {any} currentDate
|
|
27
|
+
* @return {*}
|
|
28
|
+
* @Author: zhiwei.Wang
|
|
29
|
+
* @Date: 2024-04-26 14:04
|
|
30
|
+
*/
|
|
31
|
+
export declare const getServiceTime: (item: any, currentDate: any, utils: any) => string;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/ticketBooking/utils/formatTime.ts
|
|
30
|
+
var formatTime_exports = {};
|
|
31
|
+
__export(formatTime_exports, {
|
|
32
|
+
formatMultiDayDate: () => formatMultiDayDate,
|
|
33
|
+
getServiceTime: () => getServiceTime,
|
|
34
|
+
isEn: () => isEn
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(formatTime_exports);
|
|
37
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_zh_cn = require("dayjs/locale/zh-cn");
|
|
40
|
+
var import_en = require("dayjs/locale/en");
|
|
41
|
+
var import_zh_tw = require("dayjs/locale/zh-tw");
|
|
42
|
+
var isEn = (item) => {
|
|
43
|
+
const locale = (item == null ? void 0 : item.locale) || "en-US";
|
|
44
|
+
const _isEn = locale === "en-US" || locale === "en";
|
|
45
|
+
const localeTypes = {
|
|
46
|
+
"en-US": "en",
|
|
47
|
+
"zh-CN": "zh-cn",
|
|
48
|
+
"zh-HK": "zh-tw"
|
|
49
|
+
};
|
|
50
|
+
import_dayjs.default.locale(localeTypes[locale]);
|
|
51
|
+
return _isEn;
|
|
52
|
+
};
|
|
53
|
+
var formatMultiDayDate = (item) => {
|
|
54
|
+
const _isEn = isEn(item);
|
|
55
|
+
const startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
|
|
56
|
+
const endDate = (0, import_dayjs.default)(item == null ? void 0 : item.end_date);
|
|
57
|
+
const _format = _isEn ? "ddd, DD/MM/YYYY" : "YYYY-MM-DD,ddd";
|
|
58
|
+
const date = `${startDate.format(_format)} ~ ${endDate.format(_format)}`;
|
|
59
|
+
return date;
|
|
60
|
+
};
|
|
61
|
+
var getServiceTime = (item, currentDate, utils) => {
|
|
62
|
+
var _a, _b, _c, _d;
|
|
63
|
+
if (!(0, import_dayjs.default)(currentDate).isValid()) return "";
|
|
64
|
+
const locale = (item == null ? void 0 : item.locale) || ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en-US";
|
|
65
|
+
const isEn2 = locale === "en-US" || locale === "en";
|
|
66
|
+
const localeTypes = {
|
|
67
|
+
"en-US": "en",
|
|
68
|
+
"zh-CN": "zh-cn",
|
|
69
|
+
"zh-HK": "zh-tw"
|
|
70
|
+
};
|
|
71
|
+
import_dayjs.default.locale(localeTypes[locale]);
|
|
72
|
+
let startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
|
|
73
|
+
let endDate = (0, import_dayjs.default)(item == null ? void 0 : item.end_date);
|
|
74
|
+
let diffInDays = (item == null ? void 0 : item.custom_day_count) || endDate.diff(startDate, "day");
|
|
75
|
+
if (item == null ? void 0 : item.duration_type) {
|
|
76
|
+
const sameDay = startDate.isSame(endDate, "day");
|
|
77
|
+
const dateFormat = isEn2 ? "DD/MM/YYYY" : "YYYY-MM-DD";
|
|
78
|
+
const timeFormat = "HH:mm";
|
|
79
|
+
const startTime = (item == null ? void 0 : item.start_time) || startDate.format(timeFormat);
|
|
80
|
+
const endTime = (item == null ? void 0 : item.end_time) || endDate.format(timeFormat);
|
|
81
|
+
let dateTime = "";
|
|
82
|
+
if (sameDay) {
|
|
83
|
+
if (isEn2) {
|
|
84
|
+
dateTime = `${startTime} ~ ${endTime} ${startDate.format(dateFormat)}`;
|
|
85
|
+
} else {
|
|
86
|
+
dateTime = `${startDate.format(dateFormat)} ${startTime} ~ ${endTime}`;
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
if (isEn2) {
|
|
90
|
+
dateTime = `${startTime} ${startDate.format(dateFormat)} ~ ${endTime} ${endDate.format(dateFormat)}`;
|
|
91
|
+
} else {
|
|
92
|
+
dateTime = `${startDate.format(dateFormat)} ${startTime} ~ ${endDate.format(dateFormat)} ${endTime}`;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const startDateTime = `${startDate.format("YYYY-MM-DD")} ${startTime}`;
|
|
96
|
+
const endDateTime = `${endDate.format("YYYY-MM-DD")} ${endTime}`;
|
|
97
|
+
let _duration = (0, import_dayjs.default)(endDateTime).diff((0, import_dayjs.default)(startDateTime), item == null ? void 0 : item.duration_type);
|
|
98
|
+
let durationText = "";
|
|
99
|
+
if ((item == null ? void 0 : item.duration_type) === "minutes") {
|
|
100
|
+
const hours = Math.floor(_duration / 60);
|
|
101
|
+
const minutes = _duration % 60;
|
|
102
|
+
durationText = import_utils.locales.getText("pisell2.product.card.hour.minute")(hours, minutes);
|
|
103
|
+
} else if ((item == null ? void 0 : item.duration_type) === "days") {
|
|
104
|
+
durationText = import_utils.locales.getText("pisell2.product.card.day")(_duration);
|
|
105
|
+
} else {
|
|
106
|
+
durationText = `${_duration}`;
|
|
107
|
+
}
|
|
108
|
+
return `${dateTime} (${durationText})`;
|
|
109
|
+
}
|
|
110
|
+
let _format = isEn2 ? "ddd, DD/MM/YYYY" : "YYYY-MM-DD,ddd";
|
|
111
|
+
if ((item == null ? void 0 : item.hasOwnProperty("format")) && ((_b = item == null ? void 0 : item.format) == null ? void 0 : _b.length) > 0) {
|
|
112
|
+
_format = isEn2 ? (_c = item == null ? void 0 : item.format) == null ? void 0 : _c[0] : (_d = item == null ? void 0 : item.format) == null ? void 0 : _d[1];
|
|
113
|
+
}
|
|
114
|
+
if (item == null ? void 0 : item.show_time) {
|
|
115
|
+
startDate = (0, import_dayjs.default)((item == null ? void 0 : item.start_time) ? `${item == null ? void 0 : item.start_date} ${item == null ? void 0 : item.start_time}` : startDate.format("YYYY-MM-DD HH:mm"));
|
|
116
|
+
endDate = (0, import_dayjs.default)((item == null ? void 0 : item.end_time) ? `${item == null ? void 0 : item.end_date} ${item == null ? void 0 : item.end_time}` : endDate.format("YYYY-MM-DD HH:mm"));
|
|
117
|
+
}
|
|
118
|
+
if ((item == null ? void 0 : item.duration_type) === "minutes") {
|
|
119
|
+
diffInDays = endDate.diff(startDate, "minute");
|
|
120
|
+
}
|
|
121
|
+
const date = `${startDate.format(_format)} ~ ${endDate.format(_format)}`;
|
|
122
|
+
let text = import_utils.locales.getText("pisell2.product.card.day")(diffInDays);
|
|
123
|
+
if (item == null ? void 0 : item.custom_day_count) {
|
|
124
|
+
text = import_utils.locales.getText("pisell2.product.card.day.event")(diffInDays);
|
|
125
|
+
}
|
|
126
|
+
const textTypes = {
|
|
127
|
+
"minutes": import_utils.locales.getText("pisell2.product.card.minute")(diffInDays),
|
|
128
|
+
"event": import_utils.locales.getText("pisell2.product.card.day.event")(diffInDays)
|
|
129
|
+
};
|
|
130
|
+
text = (textTypes == null ? void 0 : textTypes[item == null ? void 0 : item.duration_type]) || text;
|
|
131
|
+
let duration = `${diffInDays}${text}`;
|
|
132
|
+
return `${date} (${duration})`;
|
|
133
|
+
};
|
|
134
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
135
|
+
0 && (module.exports = {
|
|
136
|
+
formatMultiDayDate,
|
|
137
|
+
getServiceTime,
|
|
138
|
+
isEn
|
|
139
|
+
});
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
addWalletCard: any;
|
|
4
|
-
}
|
|
5
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
-
walletDetailState: RechargeState;
|
|
7
|
-
} & {
|
|
8
|
-
dispatch: (params: {
|
|
9
|
-
type: string;
|
|
10
|
-
payload: any;
|
|
11
|
-
}) => void;
|
|
12
|
-
}>;
|
|
13
|
-
export {};
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
total: number;
|
|
4
|
-
setup?: 'menu' | 'list' | 'detail' | string;
|
|
5
|
-
}
|
|
6
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
7
|
-
state: RechargeState;
|
|
8
|
-
} & {
|
|
9
|
-
dispatch: (params: {
|
|
10
|
-
type: string;
|
|
11
|
-
payload: any;
|
|
12
|
-
}) => void;
|
|
13
|
-
}>;
|
|
14
|
-
export {};
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
total: number;
|
|
4
|
-
}
|
|
5
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
-
state: RechargeState;
|
|
7
|
-
} & {
|
|
8
|
-
dispatch: (params: {
|
|
9
|
-
type: string;
|
|
10
|
-
payload: any;
|
|
11
|
-
}) => void;
|
|
12
|
-
}>;
|
|
13
|
-
export {};
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,29 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
selectedGiftOptionId: string | null;
|
|
4
|
-
cardList: Array<{
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
price: number;
|
|
8
|
-
}>;
|
|
9
|
-
selectedItem: {
|
|
10
|
-
id?: string;
|
|
11
|
-
gift_price?: number;
|
|
12
|
-
price?: number;
|
|
13
|
-
name?: string;
|
|
14
|
-
variant_id?: string;
|
|
15
|
-
};
|
|
16
|
-
productId?: string;
|
|
17
|
-
detailId?: string;
|
|
18
|
-
total: string | number;
|
|
19
|
-
rechargeModalOpen: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
22
|
-
state: RechargeState;
|
|
23
|
-
} & {
|
|
24
|
-
dispatch: (params: {
|
|
25
|
-
type: string;
|
|
26
|
-
payload: any;
|
|
27
|
-
}) => void;
|
|
28
|
-
}>;
|
|
29
|
-
export {};
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
total: 0;
|
|
4
|
-
}
|
|
5
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
-
state: RechargeState;
|
|
7
|
-
} & {
|
|
8
|
-
dispatch: (params: {
|
|
9
|
-
type: string;
|
|
10
|
-
payload: any;
|
|
11
|
-
}) => void;
|
|
12
|
-
}>;
|
|
13
|
-
export {};
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IWalletListItemProps } from './serve';
|
|
3
2
|
export interface WalletCardItemProps {
|
|
4
3
|
id: string;
|
|
@@ -27,11 +26,4 @@ export interface WalletListProps {
|
|
|
27
26
|
currentSearchListItemCode?: string;
|
|
28
27
|
[key: string]: any;
|
|
29
28
|
}
|
|
30
|
-
export declare const Provider:
|
|
31
|
-
global_wallet: WalletListProps;
|
|
32
|
-
} & {
|
|
33
|
-
dispatch: (params: {
|
|
34
|
-
type: string;
|
|
35
|
-
payload: any;
|
|
36
|
-
}) => void;
|
|
37
|
-
}>;
|
|
29
|
+
export declare const Provider: any, Context: any;
|
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,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
62
|
"@pisell/utils": "3.0.0",
|
|
63
63
|
"@pisell/icon": "0.0.11",
|
|
64
|
-
"@pisell/materials": "3.3.
|
|
64
|
+
"@pisell/materials": "3.3.37",
|
|
65
65
|
"@pisell/date-picker": "3.0.2"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|