@pisell/materials 6.11.5 → 6.11.7
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 +7 -7
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +23 -23
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +19 -19
- package/es/components/PisellTabbar/PisellTabbar.js +47 -44
- package/es/components/PisellTabbar/locales.d.ts +8 -0
- package/es/components/PisellTabbar/locales.js +8 -0
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +3 -18
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.js +124 -28
- package/es/components/PisellTabbar/template/Template1/constants.js +1 -1
- package/es/components/PisellTabbar2/locales.d.ts +8 -0
- package/es/components/PisellTabbar2/locales.js +8 -0
- package/es/components/PisellTabbar3/locales.d.ts +8 -0
- package/es/components/PisellTabbar3/locales.js +8 -0
- package/es/components/config-provider/index.d.ts +2 -0
- package/es/components/config-provider/index.js +6 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +2 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +2 -0
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.js +8 -0
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +2 -0
- package/es/components/dataSourceComponents/fields/Upload/constants.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/constants.js +1 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.js +1 -1
- package/es/components/page/index.js +11 -1
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +47 -34
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.d.ts +19 -0
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.js +74 -0
- package/es/components/pisellDateTimeDisplay/components/DateDisplay.d.ts +6 -1
- package/es/components/pisellDateTimeDisplay/components/DateDisplay.js +10 -3
- package/es/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.d.ts +7 -0
- package/es/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.js +81 -0
- package/es/components/pisellDateTimeDisplay/formats/index.d.ts +1 -0
- package/es/components/pisellDateTimeDisplay/formats/index.js +1 -0
- package/es/components/pisellDateTimeDisplay/hooks/useCurrentTime.d.ts +2 -2
- package/es/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +2 -2
- package/es/components/pisellDateTimeDisplay/types.d.ts +48 -2
- package/es/components/pisellDateTimeDisplay/utils/formatDate.js +25 -6
- package/es/components/pisellDateTimeDisplay/utils/formatDateOrRelative.d.ts +17 -0
- package/es/components/pisellDateTimeDisplay/utils/formatDateOrRelative.js +38 -0
- package/es/components/pisellDateTimeDisplay/utils/formatWeekday.js +11 -12
- package/es/components/pisellDateTimeDisplay/utils/index.d.ts +3 -1
- package/es/components/pisellDateTimeDisplay/utils/index.js +3 -1
- package/es/components/pisellDateTimeDisplay/utils/localeUtils.d.ts +2 -7
- package/es/components/pisellDateTimeDisplay/utils/localeUtils.js +4 -17
- package/es/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +23 -0
- package/es/components/pisellDateTimeDisplay/utils/relativeDay.js +45 -0
- package/es/components/pisellLookup/components/LookupTrigger.js +66 -6
- package/es/components/pisellText/components/Editable/index.d.ts +3 -0
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +32 -0
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +197 -0
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.less +49 -0
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.stories.d.ts +61 -0
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.stories.js +209 -0
- package/es/components/pisellTimeRangeDisplay/components/DateBlock.d.ts +20 -0
- package/es/components/pisellTimeRangeDisplay/components/DateBlock.js +30 -0
- package/es/components/pisellTimeRangeDisplay/components/DurationBlock.d.ts +19 -0
- package/es/components/pisellTimeRangeDisplay/components/DurationBlock.js +25 -0
- package/es/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +30 -0
- package/es/components/pisellTimeRangeDisplay/components/TimeRangeBlock.js +86 -0
- package/es/components/pisellTimeRangeDisplay/components/WeekdayBlock.d.ts +18 -0
- package/es/components/pisellTimeRangeDisplay/components/WeekdayBlock.js +23 -0
- package/es/components/pisellTimeRangeDisplay/components/index.d.ts +8 -0
- package/es/components/pisellTimeRangeDisplay/components/index.js +4 -0
- package/es/components/pisellTimeRangeDisplay/index.d.ts +3 -0
- package/es/components/pisellTimeRangeDisplay/index.js +1 -0
- package/es/components/pisellTimeRangeDisplay/types.d.ts +137 -0
- package/es/components/pisellTimeRangeDisplay/types.js +1 -0
- package/es/components/pisellTimeRangeDisplay/utils/formatDuration.d.ts +14 -0
- package/es/components/pisellTimeRangeDisplay/utils/formatDuration.js +53 -0
- package/es/components/pisellTimeRangeDisplay/utils/index.d.ts +4 -0
- package/es/components/pisellTimeRangeDisplay/utils/index.js +5 -0
- package/es/components/pisellTimeRangeDisplay/utils/parseTimeRange.d.ts +23 -0
- package/es/components/pisellTimeRangeDisplay/utils/parseTimeRange.js +27 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +2 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.js +5 -1
- package/es/components/productCard/cartSkuCard/locales.d.ts +64 -0
- package/es/components/productCard/cartSkuCard/locales.js +16 -0
- package/es/components/productCard/locales.d.ts +54 -0
- package/es/components/productCard/locales.js +84 -0
- package/es/components/productCard/utils.d.ts +2 -0
- package/es/components/productCard/utils.js +8 -2
- package/es/components/translation/index.d.ts +2 -0
- package/es/components/translation/index.js +12 -0
- package/es/components/translation/utils.d.ts +2 -0
- package/es/components/translation/utils.js +3 -1
- package/es/components/walletCard/index.d.ts +2 -0
- package/es/components/walletCard/index.js +11 -3
- package/es/index.d.ts +2 -0
- package/es/index.js +7 -0
- package/es/locales/index.js +6 -2
- package/es/locales/ja.d.ts +337 -0
- package/es/locales/ja.js +416 -0
- package/es/locales/pt.d.ts +337 -0
- package/es/locales/pt.js +416 -0
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/PisellTabbar/PisellTabbar.js +64 -57
- package/lib/components/PisellTabbar/locales.d.ts +8 -0
- package/lib/components/PisellTabbar/locales.js +8 -0
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +3 -18
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.js +171 -55
- package/lib/components/PisellTabbar/template/Template1/constants.js +1 -1
- package/lib/components/PisellTabbar2/locales.d.ts +8 -0
- package/lib/components/PisellTabbar2/locales.js +8 -0
- package/lib/components/PisellTabbar3/locales.d.ts +8 -0
- package/lib/components/PisellTabbar3/locales.js +8 -0
- package/lib/components/config-provider/index.d.ts +2 -0
- package/lib/components/config-provider/index.js +6 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +2 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +2 -0
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.js +5 -1
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +2 -0
- package/lib/components/dataSourceComponents/fields/Upload/constants.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/constants.js +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.js +1 -1
- package/lib/components/page/index.js +11 -1
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +27 -17
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.d.ts +19 -0
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.js +63 -0
- package/lib/components/pisellDateTimeDisplay/components/DateDisplay.d.ts +6 -1
- package/lib/components/pisellDateTimeDisplay/components/DateDisplay.js +5 -1
- package/lib/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.d.ts +7 -0
- package/lib/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.js +98 -0
- package/lib/components/pisellDateTimeDisplay/formats/index.d.ts +1 -0
- package/lib/components/pisellDateTimeDisplay/formats/index.js +29 -0
- package/lib/components/pisellDateTimeDisplay/hooks/useCurrentTime.d.ts +2 -2
- package/lib/components/pisellDateTimeDisplay/types.d.ts +48 -2
- package/lib/components/pisellDateTimeDisplay/utils/formatDate.js +14 -1
- package/lib/components/pisellDateTimeDisplay/utils/formatDateOrRelative.d.ts +17 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatDateOrRelative.js +54 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatWeekday.js +6 -6
- package/lib/components/pisellDateTimeDisplay/utils/index.d.ts +3 -1
- package/lib/components/pisellDateTimeDisplay/utils/index.js +8 -2
- package/lib/components/pisellDateTimeDisplay/utils/localeUtils.d.ts +2 -7
- package/lib/components/pisellDateTimeDisplay/utils/localeUtils.js +2 -11
- package/lib/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +23 -0
- package/lib/components/pisellDateTimeDisplay/utils/relativeDay.js +54 -0
- package/lib/components/pisellLookup/components/LookupTrigger.js +45 -7
- package/lib/components/pisellText/components/Editable/index.d.ts +3 -0
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +32 -0
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +193 -0
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.less +49 -0
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.stories.d.ts +61 -0
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.stories.js +187 -0
- package/lib/components/pisellTimeRangeDisplay/components/DateBlock.d.ts +20 -0
- package/lib/components/pisellTimeRangeDisplay/components/DateBlock.js +69 -0
- package/lib/components/pisellTimeRangeDisplay/components/DurationBlock.d.ts +19 -0
- package/lib/components/pisellTimeRangeDisplay/components/DurationBlock.js +65 -0
- package/lib/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +30 -0
- package/lib/components/pisellTimeRangeDisplay/components/TimeRangeBlock.js +120 -0
- package/lib/components/pisellTimeRangeDisplay/components/WeekdayBlock.d.ts +18 -0
- package/lib/components/pisellTimeRangeDisplay/components/WeekdayBlock.js +64 -0
- package/lib/components/pisellTimeRangeDisplay/components/index.d.ts +8 -0
- package/lib/components/pisellTimeRangeDisplay/components/index.js +38 -0
- package/lib/components/pisellTimeRangeDisplay/index.d.ts +3 -0
- package/lib/components/pisellTimeRangeDisplay/index.js +40 -0
- package/lib/components/pisellTimeRangeDisplay/types.d.ts +137 -0
- package/lib/components/pisellTimeRangeDisplay/types.js +17 -0
- package/lib/components/pisellTimeRangeDisplay/utils/formatDuration.d.ts +14 -0
- package/lib/components/pisellTimeRangeDisplay/utils/formatDuration.js +52 -0
- package/lib/components/pisellTimeRangeDisplay/utils/index.d.ts +4 -0
- package/lib/components/pisellTimeRangeDisplay/utils/index.js +47 -0
- package/lib/components/pisellTimeRangeDisplay/utils/parseTimeRange.d.ts +23 -0
- package/lib/components/pisellTimeRangeDisplay/utils/parseTimeRange.js +49 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +2 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +5 -1
- package/lib/components/productCard/cartSkuCard/locales.d.ts +64 -0
- package/lib/components/productCard/cartSkuCard/locales.js +18 -0
- package/lib/components/productCard/locales.d.ts +54 -0
- package/lib/components/productCard/locales.js +60 -0
- package/lib/components/productCard/utils.d.ts +2 -0
- package/lib/components/productCard/utils.js +8 -2
- package/lib/components/translation/index.d.ts +2 -0
- package/lib/components/translation/index.js +14 -0
- package/lib/components/translation/utils.d.ts +2 -0
- package/lib/components/translation/utils.js +3 -1
- package/lib/components/walletCard/index.d.ts +2 -0
- package/lib/components/walletCard/index.js +11 -3
- package/lib/index.d.ts +2 -0
- package/lib/index.js +3 -0
- package/lib/locales/index.js +6 -2
- package/lib/locales/ja.d.ts +337 -0
- package/lib/locales/ja.js +396 -0
- package/lib/locales/pt.d.ts +337 -0
- package/lib/locales/pt.js +396 -0
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/pisell-time-range-display/index.ts +3 -0
- package/lowcode/pisell-time-range-display/meta.ts +375 -0
- package/lowcode/pisell-time-range-display/snippets.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,52 @@
|
|
|
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/pisellTimeRangeDisplay/utils/formatDuration.ts
|
|
20
|
+
var formatDuration_exports = {};
|
|
21
|
+
__export(formatDuration_exports, {
|
|
22
|
+
formatDuration: () => formatDuration
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(formatDuration_exports);
|
|
25
|
+
function isChineseLocale(locale) {
|
|
26
|
+
if (!locale) return false;
|
|
27
|
+
const n = locale.toLowerCase();
|
|
28
|
+
return n.startsWith("zh");
|
|
29
|
+
}
|
|
30
|
+
function formatDuration(ms, showSeconds = false, locale) {
|
|
31
|
+
if (!Number.isFinite(ms) || ms < 0) {
|
|
32
|
+
return isChineseLocale(locale) ? "0分钟" : "0m";
|
|
33
|
+
}
|
|
34
|
+
const d = Math.floor(ms / 864e5);
|
|
35
|
+
const h = Math.floor(ms % 864e5 / 36e5);
|
|
36
|
+
const m = Math.floor(ms % 36e5 / 6e4);
|
|
37
|
+
const s = Math.floor(ms % 6e4 / 1e3);
|
|
38
|
+
const useZh = isChineseLocale(locale);
|
|
39
|
+
const units = useZh ? { d: "天", h: "时", m: "分钟", s: "秒" } : { d: "d", h: "h", m: "m", s: "s" };
|
|
40
|
+
const parts = [];
|
|
41
|
+
if (d > 0) parts.push(`${d}${units.d}`);
|
|
42
|
+
if (h > 0) parts.push(`${h}${units.h}`);
|
|
43
|
+
if (m > 0) parts.push(`${m}${units.m}`);
|
|
44
|
+
if (showSeconds || parts.length === 0 && s >= 0) {
|
|
45
|
+
parts.push(`${s}${units.s}`);
|
|
46
|
+
}
|
|
47
|
+
return parts.length > 0 ? parts.join("") : useZh ? "0分钟" : "0m";
|
|
48
|
+
}
|
|
49
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
+
0 && (module.exports = {
|
|
51
|
+
formatDuration
|
|
52
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { parseTimeRange } from './parseTimeRange';
|
|
2
|
+
export type { ParseTimeRangeResult } from './parseTimeRange';
|
|
3
|
+
export { formatDuration } from './formatDuration';
|
|
4
|
+
export { formatTime, formatDate, formatWeekday, getDayjsLocale, getRelativeDay, getRelativeDayLabel, getDatePartDisplay, } from '../../pisellDateTimeDisplay/utils';
|
|
@@ -0,0 +1,47 @@
|
|
|
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/pisellTimeRangeDisplay/utils/index.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
formatDate: () => import_utils.formatDate,
|
|
23
|
+
formatDuration: () => import_formatDuration.formatDuration,
|
|
24
|
+
formatTime: () => import_utils.formatTime,
|
|
25
|
+
formatWeekday: () => import_utils.formatWeekday,
|
|
26
|
+
getDatePartDisplay: () => import_utils.getDatePartDisplay,
|
|
27
|
+
getDayjsLocale: () => import_utils.getDayjsLocale,
|
|
28
|
+
getRelativeDay: () => import_utils.getRelativeDay,
|
|
29
|
+
getRelativeDayLabel: () => import_utils.getRelativeDayLabel,
|
|
30
|
+
parseTimeRange: () => import_parseTimeRange.parseTimeRange
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(utils_exports);
|
|
33
|
+
var import_parseTimeRange = require("./parseTimeRange");
|
|
34
|
+
var import_formatDuration = require("./formatDuration");
|
|
35
|
+
var import_utils = require("../../pisellDateTimeDisplay/utils");
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
formatDate,
|
|
39
|
+
formatDuration,
|
|
40
|
+
formatTime,
|
|
41
|
+
formatWeekday,
|
|
42
|
+
getDatePartDisplay,
|
|
43
|
+
getDayjsLocale,
|
|
44
|
+
getRelativeDay,
|
|
45
|
+
getRelativeDayLabel,
|
|
46
|
+
parseTimeRange
|
|
47
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Dayjs } from 'dayjs';
|
|
2
|
+
import type { DayjsLike } from '../types';
|
|
3
|
+
export interface ParseTimeRangeResult {
|
|
4
|
+
/** 开始时间(已应用 locale) */
|
|
5
|
+
start: Dayjs;
|
|
6
|
+
/** 结束时间(已应用 locale) */
|
|
7
|
+
end: Dayjs;
|
|
8
|
+
/** 是否同一天(按本地时区自然日判定) */
|
|
9
|
+
isSameDay: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 解析 startAt / endAt 为 Dayjs,并判定是否同一天
|
|
13
|
+
*
|
|
14
|
+
* @param startAt 开始时间(dayjs 兼容值)
|
|
15
|
+
* @param endAt 结束时间(dayjs 兼容值)
|
|
16
|
+
* @param locale dayjs locale,可选
|
|
17
|
+
* @returns { start, end, isSameDay }
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* parseTimeRange('2026-02-04 09:00', '2026-02-04 18:00', 'zh-cn')
|
|
21
|
+
* // => { start: Dayjs, end: Dayjs, isSameDay: true }
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseTimeRange(startAt: DayjsLike, endAt: DayjsLike, locale?: string): ParseTimeRangeResult;
|
|
@@ -0,0 +1,49 @@
|
|
|
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/pisellTimeRangeDisplay/utils/parseTimeRange.ts
|
|
30
|
+
var parseTimeRange_exports = {};
|
|
31
|
+
__export(parseTimeRange_exports, {
|
|
32
|
+
parseTimeRange: () => parseTimeRange
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(parseTimeRange_exports);
|
|
35
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
36
|
+
function parseTimeRange(startAt, endAt, locale) {
|
|
37
|
+
let start = (0, import_dayjs.default)(startAt);
|
|
38
|
+
let end = (0, import_dayjs.default)(endAt);
|
|
39
|
+
if (locale) {
|
|
40
|
+
start = start.locale(locale);
|
|
41
|
+
end = end.locale(locale);
|
|
42
|
+
}
|
|
43
|
+
const isSameDay = start.isSame(end, "day");
|
|
44
|
+
return { start, end, isSameDay };
|
|
45
|
+
}
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
parseTimeRange
|
|
49
|
+
});
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import 'dayjs/locale/zh-cn';
|
|
3
3
|
import 'dayjs/locale/en';
|
|
4
4
|
import 'dayjs/locale/zh-tw';
|
|
5
|
+
import 'dayjs/locale/ja';
|
|
6
|
+
import 'dayjs/locale/pt';
|
|
5
7
|
import './index.less';
|
|
6
8
|
declare const TimeRange: (props: any) => React.JSX.Element | null;
|
|
7
9
|
export default TimeRange;
|
|
@@ -40,12 +40,16 @@ var import_dayjs = __toESM(require("dayjs"));
|
|
|
40
40
|
var import_zh_cn = require("dayjs/locale/zh-cn");
|
|
41
41
|
var import_en = require("dayjs/locale/en");
|
|
42
42
|
var import_zh_tw = require("dayjs/locale/zh-tw");
|
|
43
|
+
var import_ja = require("dayjs/locale/ja");
|
|
44
|
+
var import_pt = require("dayjs/locale/pt");
|
|
43
45
|
var import_index = require("./index.less");
|
|
44
46
|
var import__ = require("../../index");
|
|
45
47
|
var localeTypes = {
|
|
46
48
|
"en-US": "en",
|
|
47
49
|
"zh-CN": "zh-cn",
|
|
48
|
-
"zh-HK": "zh-tw"
|
|
50
|
+
"zh-HK": "zh-tw",
|
|
51
|
+
"ja": "ja",
|
|
52
|
+
"pt": "pt"
|
|
49
53
|
};
|
|
50
54
|
var TimeRange = (props) => {
|
|
51
55
|
const { dataSource = {} } = props;
|
|
@@ -95,5 +95,69 @@ declare const _default: {
|
|
|
95
95
|
'pisell2.product.card.add.holder.modal.add': string;
|
|
96
96
|
'pisell2.product.card.closing-soon.warning': string;
|
|
97
97
|
};
|
|
98
|
+
ja: {
|
|
99
|
+
'pisell2.product.card.discount.reason': string;
|
|
100
|
+
'pisell2.cart.sku-card.more': string;
|
|
101
|
+
'pisell2.cart.sku-card.packages.title': string;
|
|
102
|
+
'pisell2.cart.sku-card.sales.title': string;
|
|
103
|
+
'pisell2.cart.sku-card.actions.delete': string;
|
|
104
|
+
'pisell2.cart.sku-card.unassigned': string;
|
|
105
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
106
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
107
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
108
|
+
'pisell2.product.card.discount.note': string;
|
|
109
|
+
'pisell2.product.card.edit': string;
|
|
110
|
+
'pisell2.product.card.discount.add.note': string;
|
|
111
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
112
|
+
'pisell2.product.card.confirm': string;
|
|
113
|
+
'pisell2.product.card.cancel': string;
|
|
114
|
+
'pisell2.product.card.note.pla': string;
|
|
115
|
+
'pisell2.product.card.items.package': string;
|
|
116
|
+
'pisell2.product.card.view-all': string;
|
|
117
|
+
'pisell2.product.card.view-less': string;
|
|
118
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
119
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
120
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
121
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
122
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
123
|
+
'pisell2.product.card.sales': string;
|
|
124
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
125
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
126
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
127
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
128
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
129
|
+
};
|
|
130
|
+
pt: {
|
|
131
|
+
'pisell2.product.card.discount.reason': string;
|
|
132
|
+
'pisell2.cart.sku-card.more': string;
|
|
133
|
+
'pisell2.cart.sku-card.packages.title': string;
|
|
134
|
+
'pisell2.cart.sku-card.sales.title': string;
|
|
135
|
+
'pisell2.cart.sku-card.actions.delete': string;
|
|
136
|
+
'pisell2.cart.sku-card.unassigned': string;
|
|
137
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
138
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
139
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
140
|
+
'pisell2.product.card.discount.note': string;
|
|
141
|
+
'pisell2.product.card.edit': string;
|
|
142
|
+
'pisell2.product.card.discount.add.note': string;
|
|
143
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
144
|
+
'pisell2.product.card.confirm': string;
|
|
145
|
+
'pisell2.product.card.cancel': string;
|
|
146
|
+
'pisell2.product.card.note.pla': string;
|
|
147
|
+
'pisell2.product.card.items.package': string;
|
|
148
|
+
'pisell2.product.card.view-all': string;
|
|
149
|
+
'pisell2.product.card.view-less': string;
|
|
150
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
151
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
152
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
153
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
154
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
155
|
+
'pisell2.product.card.sales': string;
|
|
156
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
157
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
158
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
159
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
160
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
161
|
+
};
|
|
98
162
|
};
|
|
99
163
|
export default _default;
|
|
@@ -60,5 +60,23 @@ var locales_default = {
|
|
|
60
60
|
"pisell2.cart.sku-card.sales.title": "銷售",
|
|
61
61
|
"pisell2.cart.sku-card.actions.delete": "刪除",
|
|
62
62
|
"pisell2.cart.sku-card.unassigned": "未分配"
|
|
63
|
+
},
|
|
64
|
+
ja: {
|
|
65
|
+
...import_locales.default.ja,
|
|
66
|
+
"pisell2.product.card.discount.reason": "割引理由",
|
|
67
|
+
"pisell2.cart.sku-card.more": "もっと...",
|
|
68
|
+
"pisell2.cart.sku-card.packages.title": "パッケージ内のアイテム",
|
|
69
|
+
"pisell2.cart.sku-card.sales.title": "セール",
|
|
70
|
+
"pisell2.cart.sku-card.actions.delete": "削除",
|
|
71
|
+
"pisell2.cart.sku-card.unassigned": "未割り当て"
|
|
72
|
+
},
|
|
73
|
+
pt: {
|
|
74
|
+
...import_locales.default.pt,
|
|
75
|
+
"pisell2.product.card.discount.reason": "Motivo do desconto",
|
|
76
|
+
"pisell2.cart.sku-card.more": "mais...",
|
|
77
|
+
"pisell2.cart.sku-card.packages.title": "Itens no pacote",
|
|
78
|
+
"pisell2.cart.sku-card.sales.title": "Vendas",
|
|
79
|
+
"pisell2.cart.sku-card.actions.delete": "Excluir",
|
|
80
|
+
"pisell2.cart.sku-card.unassigned": "Não atribuído"
|
|
63
81
|
}
|
|
64
82
|
};
|
|
@@ -80,5 +80,59 @@ declare const _default: {
|
|
|
80
80
|
'pisell2.product.card.add.holder.modal.add': string;
|
|
81
81
|
'pisell2.product.card.closing-soon.warning': string;
|
|
82
82
|
};
|
|
83
|
+
ja: {
|
|
84
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
85
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
86
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
87
|
+
'pisell2.product.card.discount.reason': string;
|
|
88
|
+
'pisell2.product.card.discount.note': string;
|
|
89
|
+
'pisell2.product.card.edit': string;
|
|
90
|
+
'pisell2.product.card.discount.add.note': string;
|
|
91
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
92
|
+
'pisell2.product.card.confirm': string;
|
|
93
|
+
'pisell2.product.card.cancel': string;
|
|
94
|
+
'pisell2.product.card.note.pla': string;
|
|
95
|
+
'pisell2.product.card.items.package': string;
|
|
96
|
+
'pisell2.product.card.view-all': string;
|
|
97
|
+
'pisell2.product.card.view-less': string;
|
|
98
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
99
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
100
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
101
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
102
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
103
|
+
'pisell2.product.card.sales': string;
|
|
104
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
105
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
106
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
107
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
108
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
109
|
+
};
|
|
110
|
+
pt: {
|
|
111
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
112
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
113
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
114
|
+
'pisell2.product.card.discount.reason': string;
|
|
115
|
+
'pisell2.product.card.discount.note': string;
|
|
116
|
+
'pisell2.product.card.edit': string;
|
|
117
|
+
'pisell2.product.card.discount.add.note': string;
|
|
118
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
119
|
+
'pisell2.product.card.confirm': string;
|
|
120
|
+
'pisell2.product.card.cancel': string;
|
|
121
|
+
'pisell2.product.card.note.pla': string;
|
|
122
|
+
'pisell2.product.card.items.package': string;
|
|
123
|
+
'pisell2.product.card.view-all': string;
|
|
124
|
+
'pisell2.product.card.view-less': string;
|
|
125
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
126
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
127
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
128
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
129
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
130
|
+
'pisell2.product.card.sales': string;
|
|
131
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
132
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
133
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
134
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
135
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
136
|
+
};
|
|
83
137
|
};
|
|
84
138
|
export default _default;
|
|
@@ -112,5 +112,65 @@ var locales_default = {
|
|
|
112
112
|
"pisell2.product.card.add.holder.modal.apply": "應用",
|
|
113
113
|
"pisell2.product.card.add.holder.modal.add": "添加",
|
|
114
114
|
"pisell2.product.card.closing-soon.warning": "當前入場時間臨近營業結束,請確認是否仍要購買。"
|
|
115
|
+
},
|
|
116
|
+
ja: {
|
|
117
|
+
"pisell2.product.card.day": (val) => `${val > 1 ? "日" : "日"}`,
|
|
118
|
+
"pisell2.product.card.day.event": (val) => `${val > 1 ? "個のイベント" : "個のイベント"}`,
|
|
119
|
+
"pisell2.product.card.minute": (val) => `${val > 1 ? "分" : "分"}`,
|
|
120
|
+
"pisell2.product.card.discount.reason": "割引理由",
|
|
121
|
+
"pisell2.product.card.discount.note": "備考",
|
|
122
|
+
"pisell2.product.card.edit": "編集",
|
|
123
|
+
"pisell2.product.card.discount.add.note": "備考を追加",
|
|
124
|
+
"pisell2.product.card.discount.edit.note": "備考を編集",
|
|
125
|
+
"pisell2.product.card.confirm": "確認",
|
|
126
|
+
"pisell2.product.card.cancel": "キャンセル",
|
|
127
|
+
"pisell2.product.card.note.pla": "備考を入力してください",
|
|
128
|
+
"pisell2.product.card.items.package": "パッケージ内のアイテム",
|
|
129
|
+
"pisell2.product.card.view-all": "すべて表示",
|
|
130
|
+
"pisell2.product.card.view-less": "折りたたむ",
|
|
131
|
+
"pisell2.product.card.add.holder.button.text": (val) => `${val || ""}を追加`,
|
|
132
|
+
"pisell2.product.card.add.holder.placeholder": (val) => `${val || ""}を選択してください`,
|
|
133
|
+
"pisell2.product.card.add.holder.placeholder.multiple": (num, val) => `${num}${val || ""}を選択してください`,
|
|
134
|
+
"pisell2.product.card.add.holder.modal.title.1": `選択してください`,
|
|
135
|
+
"pisell2.product.card.hour.minute": (hour, minute) => {
|
|
136
|
+
if (hour <= 0 && minute <= 0) return `${0}分`;
|
|
137
|
+
return `${hour > 0 ? `${hour}時間` : ""}${hour > 0 && minute > 0 ? " " : ""}${minute > 0 ? `${minute}分` : ""}`;
|
|
138
|
+
},
|
|
139
|
+
"pisell2.product.card.sales": "販売",
|
|
140
|
+
"pisell2.product.card.add.holder.modal.cancel": "キャンセル",
|
|
141
|
+
"pisell2.product.card.add.holder.modal.clear": "クリア",
|
|
142
|
+
"pisell2.product.card.add.holder.modal.apply": "適用",
|
|
143
|
+
"pisell2.product.card.add.holder.modal.add": "新規追加",
|
|
144
|
+
"pisell2.product.card.closing-soon.warning": "会場はまもなく閉場します。訪問に十分な時間があることを確認してください。"
|
|
145
|
+
},
|
|
146
|
+
pt: {
|
|
147
|
+
"pisell2.product.card.day": (val) => `${val > 1 ? " dias" : " dia"}`,
|
|
148
|
+
"pisell2.product.card.day.event": (val) => `${val > 1 ? " eventos" : " evento"}`,
|
|
149
|
+
"pisell2.product.card.minute": (val) => `${val > 1 ? " minutos" : " minuto"}`,
|
|
150
|
+
"pisell2.product.card.discount.reason": "Motivo do desconto",
|
|
151
|
+
"pisell2.product.card.discount.note": "Nota",
|
|
152
|
+
"pisell2.product.card.edit": "Editar",
|
|
153
|
+
"pisell2.product.card.discount.add.note": "Adicionar nota",
|
|
154
|
+
"pisell2.product.card.discount.edit.note": "Editar nota",
|
|
155
|
+
"pisell2.product.card.confirm": "Confirmar",
|
|
156
|
+
"pisell2.product.card.cancel": "Cancelar",
|
|
157
|
+
"pisell2.product.card.note.pla": "Por favor, insira a nota",
|
|
158
|
+
"pisell2.product.card.items.package": "Itens no pacote",
|
|
159
|
+
"pisell2.product.card.view-all": "Ver tudo",
|
|
160
|
+
"pisell2.product.card.view-less": "Ver menos",
|
|
161
|
+
"pisell2.product.card.add.holder.button.text": (val) => `Adicionar ${val || ""}`,
|
|
162
|
+
"pisell2.product.card.add.holder.placeholder": (val) => `Por favor, selecione ${val || ""}`,
|
|
163
|
+
"pisell2.product.card.add.holder.placeholder.multiple": (num, val) => `Por favor, selecione ${num} ${val || ""}`,
|
|
164
|
+
"pisell2.product.card.add.holder.modal.title.1": `Por favor, selecione`,
|
|
165
|
+
"pisell2.product.card.hour.minute": (hour, minute) => {
|
|
166
|
+
if (hour <= 0 && minute <= 0) return `${0}min`;
|
|
167
|
+
return `${hour > 0 ? `${hour}h` : ""}${hour > 0 && minute > 0 ? " " : ""}${minute > 0 ? `${minute}min` : ""}`;
|
|
168
|
+
},
|
|
169
|
+
"pisell2.product.card.sales": "Vendas",
|
|
170
|
+
"pisell2.product.card.add.holder.modal.cancel": "Cancelar",
|
|
171
|
+
"pisell2.product.card.add.holder.modal.clear": "Limpar",
|
|
172
|
+
"pisell2.product.card.add.holder.modal.apply": "Aplicar",
|
|
173
|
+
"pisell2.product.card.add.holder.modal.add": "Adicionar Novo",
|
|
174
|
+
"pisell2.product.card.closing-soon.warning": "O local fechará em breve. Por favor, certifique-se de ter tempo suficiente para sua visita."
|
|
115
175
|
}
|
|
116
176
|
};
|
|
@@ -39,6 +39,8 @@ var import_utils = require("@pisell/utils");
|
|
|
39
39
|
var import_zh_cn = require("dayjs/locale/zh-cn");
|
|
40
40
|
var import_en = require("dayjs/locale/en");
|
|
41
41
|
var import_zh_tw = require("dayjs/locale/zh-tw");
|
|
42
|
+
var import_ja = require("dayjs/locale/ja");
|
|
43
|
+
var import_pt = require("dayjs/locale/pt");
|
|
42
44
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
43
45
|
var isEn = (item) => {
|
|
44
46
|
const locale = (item == null ? void 0 : item.locale) || "en-US";
|
|
@@ -46,7 +48,9 @@ var isEn = (item) => {
|
|
|
46
48
|
const localeTypes = {
|
|
47
49
|
"en-US": "en",
|
|
48
50
|
"zh-CN": "zh-cn",
|
|
49
|
-
"zh-HK": "zh-tw"
|
|
51
|
+
"zh-HK": "zh-tw",
|
|
52
|
+
"ja": "ja",
|
|
53
|
+
"pt": "pt"
|
|
50
54
|
};
|
|
51
55
|
import_dayjs.default.locale(localeTypes[locale]);
|
|
52
56
|
return _isEn;
|
|
@@ -70,7 +74,9 @@ var getServiceTime = (item, currentDate) => {
|
|
|
70
74
|
const localeTypes = {
|
|
71
75
|
"en-US": "en",
|
|
72
76
|
"zh-CN": "zh-cn",
|
|
73
|
-
"zh-HK": "zh-tw"
|
|
77
|
+
"zh-HK": "zh-tw",
|
|
78
|
+
"ja": "ja",
|
|
79
|
+
"pt": "pt"
|
|
74
80
|
};
|
|
75
81
|
import_dayjs.default.locale(localeTypes[locale]);
|
|
76
82
|
let startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
|
|
@@ -64,6 +64,20 @@ var defaultGlobal = {
|
|
|
64
64
|
text: "繁體中文",
|
|
65
65
|
primary: 0,
|
|
66
66
|
status: "published"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 4,
|
|
70
|
+
code: "ja",
|
|
71
|
+
text: "日本語",
|
|
72
|
+
primary: 0,
|
|
73
|
+
status: "published"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 5,
|
|
77
|
+
code: "pt",
|
|
78
|
+
text: "Português",
|
|
79
|
+
primary: 0,
|
|
80
|
+
status: "published"
|
|
67
81
|
}
|
|
68
82
|
]
|
|
69
83
|
},
|
|
@@ -2,6 +2,8 @@ export declare const locales: {
|
|
|
2
2
|
en: string;
|
|
3
3
|
"zh-CN": string;
|
|
4
4
|
"zh-HK": string;
|
|
5
|
+
ja: string;
|
|
6
|
+
pt: string;
|
|
5
7
|
};
|
|
6
8
|
export declare const checkIfAllValuesAreEqual: (obj: any) => boolean;
|
|
7
9
|
export declare const createTranslationText: (text: string, isAll?: boolean) => any;
|
|
@@ -74,7 +74,9 @@ var DEFAULT_PROPS = {
|
|
|
74
74
|
original: "Balance",
|
|
75
75
|
"zh-CN": "充值卡",
|
|
76
76
|
"zh-HK": "充值卡",
|
|
77
|
-
en: "Balance"
|
|
77
|
+
en: "Balance",
|
|
78
|
+
"ja": "残高",
|
|
79
|
+
"pt": "Saldo"
|
|
78
80
|
}
|
|
79
81
|
},
|
|
80
82
|
{
|
|
@@ -84,7 +86,9 @@ var DEFAULT_PROPS = {
|
|
|
84
86
|
original: "Points",
|
|
85
87
|
"zh-CN": "积分卡",
|
|
86
88
|
"zh-HK": "積分卡",
|
|
87
|
-
en: "Points"
|
|
89
|
+
en: "Points",
|
|
90
|
+
"ja": "ポイント",
|
|
91
|
+
"pt": "Pontos"
|
|
88
92
|
}
|
|
89
93
|
},
|
|
90
94
|
{
|
|
@@ -94,7 +98,9 @@ var DEFAULT_PROPS = {
|
|
|
94
98
|
original: "Voucher",
|
|
95
99
|
"zh-CN": "代金券",
|
|
96
100
|
"zh-HK": "代金券",
|
|
97
|
-
en: "Voucher"
|
|
101
|
+
en: "Voucher",
|
|
102
|
+
"ja": "クーポン",
|
|
103
|
+
"pt": "Cupom"
|
|
98
104
|
}
|
|
99
105
|
},
|
|
100
106
|
{
|
|
@@ -104,6 +110,8 @@ var DEFAULT_PROPS = {
|
|
|
104
110
|
original: "Discount",
|
|
105
111
|
"zh-CN": "折扣卡",
|
|
106
112
|
"zh-HK": "折扣卡",
|
|
113
|
+
"ja": "割引カード",
|
|
114
|
+
"pt": "Cartão de desconto",
|
|
107
115
|
en: "Discount"
|
|
108
116
|
}
|
|
109
117
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -61,6 +61,8 @@ export type { PisellStatisticProps as CardMetricItemProps } from './components/c
|
|
|
61
61
|
export { default as CardPro } from './components/cardPro';
|
|
62
62
|
export { default as Cascader } from './components/cascader';
|
|
63
63
|
export { default as Checkbox } from './components/checkbox';
|
|
64
|
+
export { PisellTimeRangeDisplay } from './components/pisellTimeRangeDisplay';
|
|
65
|
+
export type { PisellTimeRangeDisplayProps } from './components/pisellTimeRangeDisplay';
|
|
64
66
|
export { default as ClassicLayout } from './components/classicLayout';
|
|
65
67
|
export { default as Collapse } from './components/collapse';
|
|
66
68
|
export { default as Component } from './components/component';
|
package/lib/index.js
CHANGED
|
@@ -189,6 +189,7 @@ __export(src_exports, {
|
|
|
189
189
|
PisellTabbarTemplate1: () => import_Template1.default,
|
|
190
190
|
PisellTags: () => import_pisellTags.default,
|
|
191
191
|
PisellText: () => import_pisellText.default,
|
|
192
|
+
PisellTimeRangeDisplay: () => import_pisellTimeRangeDisplay.PisellTimeRangeDisplay,
|
|
192
193
|
PisellToast: () => import_pisellToast.default,
|
|
193
194
|
PisellToolBar: () => import_ToolBar.default,
|
|
194
195
|
PisellTooltip: () => import_pisellTooltip.default,
|
|
@@ -282,6 +283,7 @@ var import_cardMetricItem = __toESM(require("./components/cardMetricItem"));
|
|
|
282
283
|
var import_cardPro = __toESM(require("./components/cardPro"));
|
|
283
284
|
var import_cascader = __toESM(require("./components/cascader"));
|
|
284
285
|
var import_checkbox = __toESM(require("./components/checkbox"));
|
|
286
|
+
var import_pisellTimeRangeDisplay = require("./components/pisellTimeRangeDisplay");
|
|
285
287
|
var import_classicLayout = __toESM(require("./components/classicLayout"));
|
|
286
288
|
var import_collapse = __toESM(require("./components/collapse"));
|
|
287
289
|
var import_component = __toESM(require("./components/component"));
|
|
@@ -594,6 +596,7 @@ var import_pisellFind = require("./components/pisellFind");
|
|
|
594
596
|
PisellTabbarTemplate1,
|
|
595
597
|
PisellTags,
|
|
596
598
|
PisellText,
|
|
599
|
+
PisellTimeRangeDisplay,
|
|
597
600
|
PisellToast,
|
|
598
601
|
PisellToolBar,
|
|
599
602
|
PisellTooltip,
|
package/lib/locales/index.js
CHANGED
|
@@ -35,6 +35,8 @@ module.exports = __toCommonJS(locales_exports);
|
|
|
35
35
|
var import_zh_CN = __toESM(require("./zh-CN"));
|
|
36
36
|
var import_en_US = __toESM(require("./en-US"));
|
|
37
37
|
var import_zh_TW = __toESM(require("./zh-TW"));
|
|
38
|
+
var import_ja = __toESM(require("./ja"));
|
|
39
|
+
var import_pt = __toESM(require("./pt"));
|
|
38
40
|
var import_locale = require("../utils/locale");
|
|
39
41
|
var langMap = {
|
|
40
42
|
"zh-CN": import_zh_CN.default,
|
|
@@ -42,7 +44,9 @@ var langMap = {
|
|
|
42
44
|
"zh-TW": import_zh_TW.default,
|
|
43
45
|
"zh-HK": import_zh_TW.default,
|
|
44
46
|
en: import_en_US.default,
|
|
45
|
-
original: import_en_US.default
|
|
47
|
+
original: import_en_US.default,
|
|
48
|
+
"ja": import_ja.default,
|
|
49
|
+
"pt": import_pt.default
|
|
46
50
|
};
|
|
47
51
|
var getText = (id) => {
|
|
48
52
|
var _a;
|
|
@@ -50,7 +54,7 @@ var getText = (id) => {
|
|
|
50
54
|
return;
|
|
51
55
|
}
|
|
52
56
|
let locale = (0, import_locale.getCurrentLocale)();
|
|
53
|
-
return ((_a = langMap == null ? void 0 : langMap[locale]) == null ? void 0 : _a[id]) || id;
|
|
57
|
+
return ((_a = langMap == null ? void 0 : langMap[locale]) == null ? void 0 : _a[id]) || langMap["en-US"][id] || id;
|
|
54
58
|
};
|
|
55
59
|
// Annotate the CommonJS export names for ESM import in node:
|
|
56
60
|
0 && (module.exports = {
|