@pisell/materials 6.12.61 → 6.12.62
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/meta.js +3 -3
- package/build/lowcode/preview.css +1 -1
- package/build/lowcode/preview.js +1 -1
- package/build/lowcode/render/default/view.js +48 -48
- package/build/lowcode/view.js +48 -48
- package/es/components/PisellBasicGrid/PisellBasicGrid.d.ts +2 -1
- package/es/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +2 -1
- package/es/components/PisellCards/components/MultilevelCard/MultilevelCard.d.ts +1 -1
- package/es/components/PisellCards/components/PisellImageCard/PisellImageCard.d.ts +2 -1
- package/es/components/PisellCards/components/TabCard/TabCard.d.ts +2 -1
- package/es/components/PisellCards/components/TextCard/TextCard.d.ts +2 -1
- package/es/components/PisellCards/index.d.ts +6 -5
- package/es/components/PisellGroupView/PisellGroupView.d.ts +2 -1
- package/es/components/PisellLayouts/index.d.ts +2 -2
- package/es/components/PisellMetrics/index.d.ts +2 -2
- package/es/components/appVersionControl/index.d.ts +2 -1
- package/es/components/auto-complete-number/index.d.ts +2 -1
- package/es/components/badge/index.d.ts +2 -1
- package/es/components/batch-editor/index.d.ts +2 -1
- package/es/components/calendar/index.d.ts +4 -1
- package/es/components/cardMetricItem/index.d.ts +1 -1
- package/es/components/cardPro/index.d.ts +2 -1
- package/es/components/checkbox/index.d.ts +4 -1
- package/es/components/classicLayout/index.d.ts +2 -1
- package/es/components/config-provider/index.d.ts +2 -1
- package/es/components/customSelect/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/group/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +4 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +2 -1
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +2 -1
- package/es/components/date-picker/index.d.ts +4 -1
- package/es/components/drag-sort-tree/index.d.ts +2 -1
- package/es/components/dropdown/index.d.ts +3 -1
- package/es/components/filter/index.d.ts +2 -1
- package/es/components/keyboard/index.d.ts +1 -1
- package/es/components/list/index.d.ts +2 -2
- package/es/components/lowCodePage/index.d.ts +3 -1
- package/es/components/page/dateLocale.js +33 -0
- package/es/components/page/index.d.ts +3 -1
- package/es/components/page/index.js +30 -4
- package/es/components/page-header/index.d.ts +1 -1
- package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +2 -1
- package/es/components/pisellAdjustPrice/index.d.ts +2 -1
- package/es/components/pisellAlert/index.d.ts +1 -1
- package/es/components/pisellCard/index.d.ts +2 -1
- package/es/components/pisellCheckboxGroup/index.d.ts +1 -1
- package/es/components/pisellCountdown/index.d.ts +1 -1
- package/es/components/pisellDatePicker/index.d.ts +4 -1
- package/es/components/pisellDraggable/index.d.ts +1 -1
- package/es/components/pisellEmpty/index.d.ts +1 -1
- package/es/components/pisellFilter/index.d.ts +2 -1
- package/es/components/pisellFloatingPanel/index.d.ts +1 -1
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +5 -5
- package/es/components/pisellFloorMapLayout/components/FloorMapBuiltinShapeElement.d.ts +2 -2
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +3 -2
- package/es/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +2 -2
- package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +1 -1
- package/es/components/pisellGoodPassCard/index.d.ts +1 -1
- package/es/components/pisellGridPro/GridView/index.d.ts +2 -1
- package/es/components/pisellInformationEntry/index.d.ts +1 -1
- package/es/components/pisellInput/components/BankCard/index.d.ts +1 -0
- package/es/components/pisellInput/components/Copy/index.d.ts +1 -0
- package/es/components/pisellInput/components/SecurityCode/index.d.ts +1 -0
- package/es/components/pisellInput/index.d.ts +5 -5
- package/es/components/pisellLoading/index.d.ts +2 -1
- package/es/components/pisellModal/index.d.ts +2 -2
- package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.js +13 -7
- package/es/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts +2 -2
- package/es/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.js +2 -1
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.js +6 -6
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.js +3 -3
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.js +3 -3
- package/es/components/pisellRecordBoard/types.d.ts +2 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +2 -2
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +2 -2
- package/es/components/pisellRow/index.d.ts +1 -1
- package/es/components/pisellSort/index.d.ts +2 -1
- package/es/components/pisellStatisticList/index.d.ts +1 -1
- package/es/components/pisellTags/index.d.ts +1 -1
- package/es/components/pisellText/index.d.ts +2 -2
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +2 -2
- package/es/components/pisellTooltip/index.d.ts +2 -1
- package/es/components/pisellUpload/index.d.ts +2 -1
- package/es/components/pisellWalletPassCard/index.d.ts +1 -1
- package/es/components/qrcode/index.d.ts +3 -1
- package/es/components/radio/index.d.ts +4 -1
- package/es/components/section-footers/index.d.ts +3 -1
- package/es/components/segmented/index.d.ts +2 -1
- package/es/components/select-time/index.d.ts +2 -1
- package/es/components/skeleton/index.d.ts +4 -1
- package/es/components/slider/index.d.ts +3 -1
- package/es/components/tabs/index.d.ts +2 -2
- package/es/components/time-picker/index.d.ts +4 -1
- package/es/components/upload/index.d.ts +4 -1
- package/es/components/versionSelect/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Amount/index.d.ts +2 -1
- package/es/components/virtual-keyboard/Number/index.d.ts +2 -1
- package/es/components/virtual-keyboard/Time/index.d.ts +1 -1
- package/es/components/virtual-keyboard/index.d.ts +1 -1
- package/lib/components/PisellBasicGrid/PisellBasicGrid.d.ts +2 -2
- package/lib/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +2 -2
- package/lib/components/PisellCards/components/MultilevelCard/MultilevelCard.d.ts +1 -1
- package/lib/components/PisellCards/components/PisellImageCard/PisellImageCard.d.ts +2 -2
- package/lib/components/PisellCards/components/TabCard/TabCard.d.ts +2 -2
- package/lib/components/PisellCards/components/TextCard/TextCard.d.ts +2 -2
- package/lib/components/PisellCards/index.d.ts +6 -5
- package/lib/components/PisellGroupView/PisellGroupView.d.ts +2 -2
- package/lib/components/PisellLayouts/index.d.ts +2 -2
- package/lib/components/PisellMetrics/index.d.ts +2 -2
- package/lib/components/appVersionControl/index.d.ts +2 -2
- package/lib/components/auto-complete-number/index.d.ts +2 -2
- package/lib/components/badge/index.d.ts +2 -2
- package/lib/components/batch-editor/index.d.ts +2 -2
- package/lib/components/calendar/index.d.ts +3 -1
- package/lib/components/cardMetricItem/index.d.ts +1 -1
- package/lib/components/cardPro/index.d.ts +2 -2
- package/lib/components/checkbox/index.d.ts +3 -1
- package/lib/components/classicLayout/index.d.ts +2 -2
- package/lib/components/config-provider/index.d.ts +2 -2
- package/lib/components/customSelect/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +3 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +2 -1
- package/lib/components/date-picker/index.d.ts +3 -1
- package/lib/components/drag-sort-tree/index.d.ts +2 -2
- package/lib/components/dropdown/index.d.ts +3 -2
- package/lib/components/filter/index.d.ts +2 -2
- package/lib/components/keyboard/index.d.ts +1 -1
- package/lib/components/list/index.d.ts +2 -2
- package/lib/components/lowCodePage/index.d.ts +3 -2
- package/lib/components/page/dateLocale.js +35 -0
- package/lib/components/page/index.d.ts +3 -2
- package/lib/components/page/index.js +33 -4
- package/lib/components/page-header/index.d.ts +1 -1
- package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +2 -2
- package/lib/components/pisellAdjustPrice/index.d.ts +2 -2
- package/lib/components/pisellAlert/index.d.ts +1 -1
- package/lib/components/pisellCard/index.d.ts +2 -2
- package/lib/components/pisellCheckboxGroup/index.d.ts +1 -1
- package/lib/components/pisellCountdown/index.d.ts +1 -1
- package/lib/components/pisellDatePicker/index.d.ts +3 -1
- package/lib/components/pisellDraggable/index.d.ts +1 -1
- package/lib/components/pisellEmpty/index.d.ts +1 -1
- package/lib/components/pisellFilter/index.d.ts +2 -2
- package/lib/components/pisellFloatingPanel/index.d.ts +1 -1
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +5 -5
- package/lib/components/pisellFloorMapLayout/components/FloorMapBuiltinShapeElement.d.ts +2 -2
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +3 -2
- package/lib/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +2 -2
- package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +1 -1
- package/lib/components/pisellGoodPassCard/index.d.ts +1 -1
- package/lib/components/pisellGridPro/GridView/index.d.ts +2 -2
- package/lib/components/pisellInformationEntry/index.d.ts +1 -1
- package/lib/components/pisellInput/components/BankCard/index.d.ts +1 -1
- package/lib/components/pisellInput/components/Copy/index.d.ts +1 -1
- package/lib/components/pisellInput/components/SecurityCode/index.d.ts +1 -1
- package/lib/components/pisellInput/index.d.ts +5 -5
- package/lib/components/pisellLoading/index.d.ts +2 -2
- package/lib/components/pisellModal/index.d.ts +2 -2
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.js +12 -6
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts +2 -2
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.js +2 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.js +6 -6
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.js +2 -2
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.js +2 -2
- package/lib/components/pisellRecordBoard/types.d.ts +2 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +2 -2
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +2 -2
- package/lib/components/pisellRow/index.d.ts +1 -1
- package/lib/components/pisellSort/index.d.ts +2 -2
- package/lib/components/pisellStatisticList/index.d.ts +1 -1
- package/lib/components/pisellTags/index.d.ts +1 -1
- package/lib/components/pisellText/index.d.ts +2 -2
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +2 -2
- package/lib/components/pisellTooltip/index.d.ts +2 -2
- package/lib/components/pisellUpload/index.d.ts +2 -2
- package/lib/components/pisellWalletPassCard/index.d.ts +1 -1
- package/lib/components/qrcode/index.d.ts +3 -2
- package/lib/components/radio/index.d.ts +3 -1
- package/lib/components/section-footers/index.d.ts +3 -1
- package/lib/components/segmented/index.d.ts +2 -2
- package/lib/components/select-time/index.d.ts +2 -2
- package/lib/components/skeleton/index.d.ts +3 -1
- package/lib/components/slider/index.d.ts +3 -2
- package/lib/components/tabs/index.d.ts +2 -2
- package/lib/components/time-picker/index.d.ts +3 -1
- package/lib/components/upload/index.d.ts +3 -1
- package/lib/components/versionSelect/index.d.ts +1 -1
- package/lib/components/virtual-keyboard/Amount/index.d.ts +2 -2
- package/lib/components/virtual-keyboard/Number/index.d.ts +2 -2
- package/lib/components/virtual-keyboard/Time/index.d.ts +1 -1
- package/lib/components/virtual-keyboard/index.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ConfigProviderProps } from "../config-provider/index.js";
|
|
2
|
+
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/page/index.d.ts
|
|
5
5
|
interface PageProps extends ConfigProviderProps {
|
|
6
|
+
countryCode?: string;
|
|
6
7
|
variablesConfig?: {
|
|
7
8
|
disabledHistoryListener?: boolean;
|
|
8
9
|
};
|
|
9
10
|
}
|
|
10
|
-
declare const Page: (props: PageProps) => JSX.Element;
|
|
11
|
+
declare const Page: (props: PageProps) => React.JSX.Element;
|
|
11
12
|
//#endregion
|
|
12
13
|
export { Page };
|
|
@@ -6,15 +6,20 @@ const require_index = require("../config-provider/index.js");
|
|
|
6
6
|
const require_VariablesProvider = require("../dataSourceComponents/provider/variables/VariablesProvider.js");
|
|
7
7
|
const require_index$1 = require("../pisell-config-provider/index.js");
|
|
8
8
|
const require_tokens = require("../../theme/tokens.js");
|
|
9
|
+
const require_dateLocale = require("./dateLocale.js");
|
|
9
10
|
let react = require("react");
|
|
10
11
|
react = require_runtime.__toESM(react);
|
|
11
12
|
let antd = require("antd");
|
|
13
|
+
let dayjs = require("dayjs");
|
|
14
|
+
dayjs = require_runtime.__toESM(dayjs);
|
|
12
15
|
let _pisell_date_picker = require("@pisell/date-picker");
|
|
13
16
|
let antd_es_locale_zh_CN = require("antd/es/locale/zh_CN");
|
|
14
17
|
antd_es_locale_zh_CN = require_runtime.__toESM(antd_es_locale_zh_CN);
|
|
15
18
|
let _pisell_date_picker_es_AdapterDayjs = require("@pisell/date-picker/es/AdapterDayjs");
|
|
16
19
|
let antd_es_locale_en_US = require("antd/es/locale/en_US");
|
|
17
20
|
antd_es_locale_en_US = require_runtime.__toESM(antd_es_locale_en_US);
|
|
21
|
+
let antd_es_locale_en_GB = require("antd/es/locale/en_GB");
|
|
22
|
+
antd_es_locale_en_GB = require_runtime.__toESM(antd_es_locale_en_GB);
|
|
18
23
|
let antd_es_locale_zh_TW = require("antd/es/locale/zh_TW");
|
|
19
24
|
antd_es_locale_zh_TW = require_runtime.__toESM(antd_es_locale_zh_TW);
|
|
20
25
|
let antd_es_locale_zh_HK = require("antd/es/locale/zh_HK");
|
|
@@ -23,15 +28,19 @@ let antd_es_locale_ja_JP = require("antd/es/locale/ja_JP");
|
|
|
23
28
|
antd_es_locale_ja_JP = require_runtime.__toESM(antd_es_locale_ja_JP);
|
|
24
29
|
let antd_es_locale_pt_PT = require("antd/es/locale/pt_PT");
|
|
25
30
|
antd_es_locale_pt_PT = require_runtime.__toESM(antd_es_locale_pt_PT);
|
|
31
|
+
let dayjs_locale_en_gb = require("dayjs/locale/en-gb");
|
|
32
|
+
dayjs_locale_en_gb = require_runtime.__toESM(dayjs_locale_en_gb);
|
|
26
33
|
//#region src/components/page/index.tsx
|
|
27
34
|
const _excluded = [
|
|
28
35
|
"children",
|
|
29
36
|
"style",
|
|
30
37
|
"className",
|
|
31
38
|
"locale",
|
|
39
|
+
"countryCode",
|
|
32
40
|
"variablesConfig",
|
|
33
41
|
"isRenderPisellConfigProvider"
|
|
34
42
|
];
|
|
43
|
+
dayjs.default.locale(dayjs_locale_en_gb.default, void 0, true);
|
|
35
44
|
const localMap = {
|
|
36
45
|
"zh-TW": antd_es_locale_zh_TW.default,
|
|
37
46
|
"zh-CN": antd_es_locale_zh_CN.default,
|
|
@@ -51,11 +60,31 @@ const localeDateMap = {
|
|
|
51
60
|
"pt": { adapterLocale: "pt" }
|
|
52
61
|
};
|
|
53
62
|
const Page = (props) => {
|
|
54
|
-
var _context$appHelper, _context$engine, _localeDateMap, _context$engine2;
|
|
55
|
-
const { children, style, className, locale: propsLocale, variablesConfig, isRenderPisellConfigProvider = true } = props, others = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
|
|
63
|
+
var _context$appHelper, _context$engine, _context$appHelper2, _localeDateMap, _context$engine2;
|
|
64
|
+
const { children, style, className, locale: propsLocale, countryCode: propsCountryCode, variablesConfig, isRenderPisellConfigProvider = true } = props, others = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
|
|
56
65
|
const context = require_useEngineContext.default();
|
|
57
66
|
const { platform, themeColor } = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.constants) || {};
|
|
58
67
|
const locale = propsLocale || (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || "en";
|
|
68
|
+
const utils = context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils;
|
|
69
|
+
let countryCode = require_dateLocale.normalizePageCountryCode(propsCountryCode);
|
|
70
|
+
try {
|
|
71
|
+
var _utils$getStore, _utils$getStore$getSt, _utils$store, _utils$store$getState, _utils$getApp, _utils$getApp$getStor, _utils$getApp$getStor2, _hostState$global, _utils$getData, _context$appHelper3, _context$appHelper4, _context$appHelper5;
|
|
72
|
+
const hostState = (utils === null || utils === void 0 || (_utils$getStore = utils.getStore) === null || _utils$getStore === void 0 || (_utils$getStore = _utils$getStore.call(utils)) === null || _utils$getStore === void 0 || (_utils$getStore$getSt = _utils$getStore.getState) === null || _utils$getStore$getSt === void 0 ? void 0 : _utils$getStore$getSt.call(_utils$getStore)) || (utils === null || utils === void 0 || (_utils$store = utils.store) === null || _utils$store === void 0 || (_utils$store$getState = _utils$store.getState) === null || _utils$store$getState === void 0 ? void 0 : _utils$store$getState.call(_utils$store));
|
|
73
|
+
const appCore = utils === null || utils === void 0 || (_utils$getApp = utils.getApp) === null || _utils$getApp === void 0 || (_utils$getApp = _utils$getApp.call(utils)) === null || _utils$getApp === void 0 || (_utils$getApp = _utils$getApp.data) === null || _utils$getApp === void 0 || (_utils$getApp = _utils$getApp.store) === null || _utils$getApp === void 0 || (_utils$getApp$getStor = _utils$getApp.getStore) === null || _utils$getApp$getStor === void 0 || (_utils$getApp$getStor = _utils$getApp$getStor.call(_utils$getApp)) === null || _utils$getApp$getStor === void 0 || (_utils$getApp$getStor2 = _utils$getApp$getStor.getDataByModel) === null || _utils$getApp$getStor2 === void 0 ? void 0 : _utils$getApp$getStor2.call(_utils$getApp$getStor, "core", "core");
|
|
74
|
+
countryCode = [
|
|
75
|
+
countryCode,
|
|
76
|
+
hostState === null || hostState === void 0 || (_hostState$global = hostState.global) === null || _hostState$global === void 0 || (_hostState$global = _hostState$global.shopDetail) === null || _hostState$global === void 0 ? void 0 : _hostState$global.country_code,
|
|
77
|
+
utils === null || utils === void 0 || (_utils$getData = utils.getData) === null || _utils$getData === void 0 || (_utils$getData = _utils$getData.call(utils, "shop_info")) === null || _utils$getData === void 0 ? void 0 : _utils$getData.country_code,
|
|
78
|
+
appCore === null || appCore === void 0 ? void 0 : appCore.country_code,
|
|
79
|
+
context === null || context === void 0 || (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.constants) === null || _context$appHelper3 === void 0 ? void 0 : _context$appHelper3.countryCode,
|
|
80
|
+
context === null || context === void 0 || (_context$appHelper4 = context.appHelper) === null || _context$appHelper4 === void 0 || (_context$appHelper4 = _context$appHelper4.constants) === null || _context$appHelper4 === void 0 ? void 0 : _context$appHelper4.country_code,
|
|
81
|
+
context === null || context === void 0 || (_context$appHelper5 = context.appHelper) === null || _context$appHelper5 === void 0 || (_context$appHelper5 = _context$appHelper5.constants) === null || _context$appHelper5 === void 0 ? void 0 : _context$appHelper5.country
|
|
82
|
+
].map(require_dateLocale.normalizePageCountryCode).find((candidate) => candidate !== void 0);
|
|
83
|
+
} catch (_unused) {}
|
|
84
|
+
const englishAdapterLocale = require_dateLocale.getPageEnglishAdapterLocale(countryCode);
|
|
85
|
+
const weekStartsOn = require_dateLocale.getPageWeekStartsOn(countryCode);
|
|
86
|
+
const isEnglish = String(locale).toLowerCase().startsWith("en");
|
|
87
|
+
const antdLocale = isEnglish && weekStartsOn !== void 0 ? weekStartsOn === 1 ? antd_es_locale_en_GB.default : antd_es_locale_en_US.default : localMap[locale];
|
|
59
88
|
const theme = (0, react.useMemo)(() => {
|
|
60
89
|
if (props === null || props === void 0 ? void 0 : props.theme) {
|
|
61
90
|
var _props$theme;
|
|
@@ -72,7 +101,7 @@ const Page = (props) => {
|
|
|
72
101
|
document.body.id = "body";
|
|
73
102
|
}, []);
|
|
74
103
|
return /* @__PURE__ */ react.default.createElement(require_index.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, others), {}, {
|
|
75
|
-
locale:
|
|
104
|
+
locale: antdLocale,
|
|
76
105
|
prefixCls: props.prefixCls || "pisell-lowcode",
|
|
77
106
|
theme
|
|
78
107
|
}), /* @__PURE__ */ react.default.createElement(antd.App, {
|
|
@@ -80,7 +109,7 @@ const Page = (props) => {
|
|
|
80
109
|
message: { maxCount: 1 }
|
|
81
110
|
}, /* @__PURE__ */ react.default.createElement(_pisell_date_picker.LocalizationProvider, {
|
|
82
111
|
dateAdapter: _pisell_date_picker_es_AdapterDayjs.AdapterDayjs,
|
|
83
|
-
adapterLocale: (localeDateMap === null || localeDateMap === void 0 || (_localeDateMap = localeDateMap[locale]) === null || _localeDateMap === void 0 ? void 0 : _localeDateMap.adapterLocale) || "en"
|
|
112
|
+
adapterLocale: isEnglish && englishAdapterLocale || (localeDateMap === null || localeDateMap === void 0 || (_localeDateMap = localeDateMap[locale]) === null || _localeDateMap === void 0 ? void 0 : _localeDateMap.adapterLocale) || "en"
|
|
84
113
|
}, /* @__PURE__ */ react.default.createElement(_pisell_date_picker.ThemeProvider, { theme: datePickerTheme }, /* @__PURE__ */ react.default.createElement(_pisell_date_picker.LocaleProvider, { value: { locale } }, /* @__PURE__ */ react.default.createElement(PisellConfigProvid, { locale }, /* @__PURE__ */ react.default.createElement(require_VariablesProvider.default, {
|
|
85
114
|
variables: ((_context$engine2 = context.engine) === null || _context$engine2 === void 0 || (_context$engine2 = _context$engine2.props) === null || _context$engine2 === void 0 ? void 0 : _context$engine2.variables) || {},
|
|
86
115
|
config: variablesConfig
|
|
@@ -10,6 +10,6 @@ interface PageHeaderProps {
|
|
|
10
10
|
className?: string;
|
|
11
11
|
style?: React.CSSProperties;
|
|
12
12
|
}
|
|
13
|
-
declare const PageHeader: (props: PageHeaderProps) => JSX.Element | null;
|
|
13
|
+
declare const PageHeader: (props: PageHeaderProps) => React.JSX.Element | null;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { PageHeader };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { InputNumberProps } from "antd/es/input-number";
|
|
3
3
|
|
|
4
4
|
//#region src/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts
|
|
@@ -8,6 +8,6 @@ interface PisellAdjustPriceInputNumberProps extends Omit<InputNumberProps, 'onCh
|
|
|
8
8
|
defaultValue?: number;
|
|
9
9
|
onChange?: (val: number) => void;
|
|
10
10
|
}
|
|
11
|
-
declare const PisellAdjustPriceInputNumber: (props: PisellAdjustPriceInputNumberProps) => JSX.Element;
|
|
11
|
+
declare const PisellAdjustPriceInputNumber: (props: PisellAdjustPriceInputNumberProps) => React.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { PisellAdjustPriceInputNumber };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PisellAdjustPriceProps } from "./type.js";
|
|
2
|
+
import React from "react";
|
|
3
3
|
//#region src/components/pisellAdjustPrice/index.d.ts
|
|
4
|
-
declare const PisellAdjustPrice: (props: PisellAdjustPriceProps) => JSX.Element;
|
|
4
|
+
declare const PisellAdjustPrice: (props: PisellAdjustPriceProps) => React.JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { PisellAdjustPrice };
|
|
@@ -18,6 +18,6 @@ interface PisellAlertProps extends AlertProps {
|
|
|
18
18
|
* @param props
|
|
19
19
|
* @constructor
|
|
20
20
|
*/
|
|
21
|
-
declare const PisellAlert: (props: PisellAlertProps) => false | JSX.Element;
|
|
21
|
+
declare const PisellAlert: (props: PisellAlertProps) => false | React.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { PisellAlert };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { CardProps } from "antd";
|
|
3
3
|
//#region src/components/pisellCard/index.d.ts
|
|
4
4
|
interface PisellCardProps extends CardProps {
|
|
@@ -16,6 +16,6 @@ interface PisellCardProps extends CardProps {
|
|
|
16
16
|
* @param props
|
|
17
17
|
* @constructor
|
|
18
18
|
*/
|
|
19
|
-
declare const PisellCard: (props: PisellCardProps) => JSX.Element;
|
|
19
|
+
declare const PisellCard: (props: PisellCardProps) => React.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { PisellCard };
|
|
@@ -36,6 +36,6 @@ interface PisellCheckboxGroupProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
36
36
|
* @Author: zhiwei.Wang
|
|
37
37
|
* @Date: 2024-08-16 10:34
|
|
38
38
|
*/
|
|
39
|
-
declare const PisellCheckboxGroup: (props: PisellCheckboxGroupProps) => JSX.Element;
|
|
39
|
+
declare const PisellCheckboxGroup: (props: PisellCheckboxGroupProps) => React.JSX.Element;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { PisellCheckboxGroup, PisellCheckboxGroupProps };
|
|
@@ -16,6 +16,6 @@ type PisellCountdownProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
|
16
16
|
interval?: number; /** 格式化倒计时展示 参考 dayjs */
|
|
17
17
|
format?: string;
|
|
18
18
|
};
|
|
19
|
-
declare const PisellCountdown: (props: PisellCountdownProps) => JSX.Element;
|
|
19
|
+
declare const PisellCountdown: (props: PisellCountdownProps) => React.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { PisellCountdown };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import * as _$react from "react";
|
|
3
|
+
|
|
2
4
|
//#region src/components/pisellDatePicker/index.d.ts
|
|
3
|
-
declare const PisellDatePicker: (props: any) => JSX.Element;
|
|
5
|
+
declare const PisellDatePicker: (props: any) => _$react.JSX.Element;
|
|
4
6
|
//#endregion
|
|
5
7
|
export { PisellDatePicker };
|
|
@@ -28,6 +28,6 @@ interface Props {
|
|
|
28
28
|
/** 自定义拖拽判断函数,返回false时阻止拖拽 */
|
|
29
29
|
canDrop?: (dragItem: FlattenedItem, dropTarget: FlattenedItem, parentId: UniqueIdentifier | null, parentNode: any) => boolean;
|
|
30
30
|
}
|
|
31
|
-
declare const Demo: (props: Props) => JSX.Element;
|
|
31
|
+
declare const Demo: (props: Props) => React.JSX.Element;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { Demo };
|
|
@@ -15,6 +15,6 @@ interface PisellEmptyProps extends EmptyProps {
|
|
|
15
15
|
/** 最大宽度 */
|
|
16
16
|
maxWidth?: number;
|
|
17
17
|
}
|
|
18
|
-
declare const PisellEmpty: (props: PisellEmptyProps) => JSX.Element;
|
|
18
|
+
declare const PisellEmpty: (props: PisellEmptyProps) => React.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { PisellEmpty };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PisellFilterProps } from "./type.js";
|
|
2
|
+
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/pisellFilter/index.d.ts
|
|
5
|
-
declare const PisellFilter: (props: PisellFilterProps) => JSX.Element;
|
|
5
|
+
declare const PisellFilter: (props: PisellFilterProps) => React.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { PisellFilter };
|
|
@@ -13,6 +13,6 @@ interface PisellFloatingPanelProps {
|
|
|
13
13
|
style?: React.CSSProperties;
|
|
14
14
|
retractIconStyle?: React.CSSProperties;
|
|
15
15
|
}
|
|
16
|
-
declare const PisellFloatingPanel: (props: PisellFloatingPanelProps) => JSX.Element;
|
|
16
|
+
declare const PisellFloatingPanel: (props: PisellFloatingPanelProps) => React.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { PisellFloatingPanel };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FloorMapDataSources, FloorMapMergedItem } from "../types.js";
|
|
2
|
+
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts
|
|
5
5
|
type FigmaTableStatus = 'available' | 'reserved' | 'waiting' | 'dining' | 'billed' | 'availableSoon';
|
|
@@ -32,12 +32,12 @@ interface FigmaTableCardItem {
|
|
|
32
32
|
/** 从 merged item + dataSources 得到卡片数据 */
|
|
33
33
|
declare function getFigmaTableCardFromMerged(item: FloorMapMergedItem, dataSources: FloorMapDataSources): FigmaTableCardItem;
|
|
34
34
|
/** 渲染 Figma 样式的方桌卡片(上下小条 + 资源信息标题栏 + 白底卡片 + 状态色边框) */
|
|
35
|
-
declare function renderFigmaStyleTableCard(cardItem: FigmaTableCardItem): JSX.Element;
|
|
35
|
+
declare function renderFigmaStyleTableCard(cardItem: FigmaTableCardItem): React.JSX.Element;
|
|
36
36
|
/** 渲染 Figma 样式的圆桌卡片(顶部资源信息 chip + 圆形主体,圆形主体只展示状态相关内容) */
|
|
37
|
-
declare function renderFigmaStyleRoundTableCard(cardItem: FigmaTableCardItem): JSX.Element;
|
|
37
|
+
declare function renderFigmaStyleRoundTableCard(cardItem: FigmaTableCardItem): React.JSX.Element;
|
|
38
38
|
/** 返回用于 renderItemByKind.table 的渲染函数(方桌) */
|
|
39
|
-
declare function getRenderItemByKindTable(dataSources: FloorMapDataSources): (item: unknown) => JSX.Element;
|
|
39
|
+
declare function getRenderItemByKindTable(dataSources: FloorMapDataSources): (item: unknown) => React.JSX.Element;
|
|
40
40
|
/** 返回用于 renderItemByKind.roundTable 的渲染函数(圆桌) */
|
|
41
|
-
declare function getRenderItemByKindRoundTable(dataSources: FloorMapDataSources): (item: unknown) => JSX.Element;
|
|
41
|
+
declare function getRenderItemByKindRoundTable(dataSources: FloorMapDataSources): (item: unknown) => React.JSX.Element;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { FigmaTableCardItem, FigmaTableStatus, getFigmaTableCardFromMerged, getRenderItemByKindRoundTable, getRenderItemByKindTable, renderFigmaStyleRoundTableCard, renderFigmaStyleTableCard };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FloorMapBuiltinShapeRenderProps } from "../utils/floorMapBuiltinShapes.js";
|
|
2
|
+
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/pisellFloorMapLayout/components/FloorMapBuiltinShapeElement.d.ts
|
|
5
5
|
interface FloorMapBuiltinShapeElementProps extends FloorMapBuiltinShapeRenderProps {
|
|
6
6
|
builtinShapeKey?: string;
|
|
7
7
|
name?: string;
|
|
8
8
|
}
|
|
9
|
-
declare function FloorMapBuiltinShapeElement(props: FloorMapBuiltinShapeElementProps): JSX.Element;
|
|
9
|
+
declare function FloorMapBuiltinShapeElement(props: FloorMapBuiltinShapeElementProps): React.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { FloorMapBuiltinShapeElement };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
2
3
|
//#region src/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts
|
|
3
4
|
interface FloorMapImageElementProps {
|
|
4
5
|
imageUrl?: string;
|
|
5
6
|
name?: string;
|
|
6
7
|
}
|
|
7
|
-
declare function FloorMapImageElement(props: FloorMapImageElementProps): JSX.Element;
|
|
8
|
+
declare function FloorMapImageElement(props: FloorMapImageElementProps): React.JSX.Element;
|
|
8
9
|
//#endregion
|
|
9
10
|
export { FloorMapImageElement };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
//#region src/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts
|
|
3
3
|
interface FloorMapSelectionZoneElementProps {
|
|
4
4
|
/** 选区名称;为空时展示「未命名选区」占位 */
|
|
5
5
|
name?: string;
|
|
6
6
|
}
|
|
7
|
-
declare function FloorMapSelectionZoneElement(props: FloorMapSelectionZoneElementProps): JSX.Element;
|
|
7
|
+
declare function FloorMapSelectionZoneElement(props: FloorMapSelectionZoneElementProps): React.JSX.Element;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { FloorMapSelectionZoneElement };
|
|
@@ -15,6 +15,6 @@ interface FloorMapLayoutProviderProps {
|
|
|
15
15
|
declare function FloorMapLayoutProvider({
|
|
16
16
|
value,
|
|
17
17
|
children
|
|
18
|
-
}: FloorMapLayoutProviderProps): JSX.Element;
|
|
18
|
+
}: FloorMapLayoutProviderProps): React.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { EMPTY_FLOOR_MAP_LAYOUT_CONTEXT, FloorMapLayoutProvider, FloorMapLayoutProviderProps, useFloorMapLayoutContext };
|
|
@@ -46,6 +46,6 @@ interface PisellGoodPassCardProps {
|
|
|
46
46
|
mixedSort?: (val: Discount[]) => Discount[];
|
|
47
47
|
isInModal: boolean;
|
|
48
48
|
}
|
|
49
|
-
declare const index: (props: PisellGoodPassCardProps) => JSX.Element;
|
|
49
|
+
declare const index: (props: PisellGoodPassCardProps) => React.JSX.Element;
|
|
50
50
|
//#endregion
|
|
51
51
|
export { index };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { GridViewProps } from "./type.js";
|
|
2
|
+
import React from "react";
|
|
3
3
|
//#region src/components/pisellGridPro/GridView/index.d.ts
|
|
4
|
-
declare const GridView: (props: GridViewProps) => JSX.Element;
|
|
4
|
+
declare const GridView: (props: GridViewProps) => React.JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { GridView };
|
|
@@ -29,6 +29,6 @@ interface PisellInformationEntryProps extends Omit<React.HTMLAttributes<HTMLDivE
|
|
|
29
29
|
/** 录入类型切换时候触发的 */
|
|
30
30
|
onChangeType?: (val: null | EntryModeType['type']) => void;
|
|
31
31
|
}
|
|
32
|
-
declare const PisellInformationEntry: (props: PisellInformationEntryProps) => JSX.Element;
|
|
32
|
+
declare const PisellInformationEntry: (props: PisellInformationEntryProps) => React.JSX.Element;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { PisellInformationEntry };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PisellContextType } from "../../../pisell-config-provider/context.js";
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { InputProps } from "antd";
|
|
4
4
|
//#region src/components/pisellInput/components/BankCard/index.d.ts
|
|
5
5
|
type BankCardProps = InputProps & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PisellContextType } from "../../../pisell-config-provider/context.js";
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { InputProps } from "antd";
|
|
4
4
|
//#region src/components/pisellInput/components/SecurityCode/index.d.ts
|
|
5
5
|
interface SecurityCodeProps extends Omit<InputProps, 'onChange'> {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PisellContextType } from "../pisell-config-provider/context.js";
|
|
3
2
|
import { BankCardProps } from "./components/BankCard/index.js";
|
|
4
3
|
import { SecurityCodeProps } from "./components/SecurityCode/index.js";
|
|
5
4
|
import { CopyProps } from "./components/Copy/index.js";
|
|
5
|
+
import React from "react";
|
|
6
6
|
import { InputProps } from "antd";
|
|
7
7
|
|
|
8
8
|
//#region src/components/pisellInput/index.d.ts
|
|
9
9
|
declare const PisellInput: {
|
|
10
10
|
(props: InputProps & {
|
|
11
11
|
/** 平台 */platform?: PisellContextType['platform'];
|
|
12
|
-
}): JSX.Element;
|
|
13
|
-
BankCard: (props: BankCardProps) => JSX.Element;
|
|
14
|
-
SecurityCode: (props: SecurityCodeProps) => JSX.Element;
|
|
15
|
-
Copy: (props: CopyProps) => JSX.Element;
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
BankCard: (props: BankCardProps) => React.JSX.Element;
|
|
14
|
+
SecurityCode: (props: SecurityCodeProps) => React.JSX.Element;
|
|
15
|
+
Copy: (props: CopyProps) => React.JSX.Element;
|
|
16
16
|
};
|
|
17
17
|
//#endregion
|
|
18
18
|
export { PisellInput };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { SpinProps } from "antd";
|
|
3
3
|
//#region src/components/pisellLoading/index.d.ts
|
|
4
4
|
type MaskType = {
|
|
@@ -16,6 +16,6 @@ interface PisellLoadingProps extends SpinProps {
|
|
|
16
16
|
/** 延迟显示加载效果的时间(防止闪烁) */
|
|
17
17
|
delay?: number;
|
|
18
18
|
}
|
|
19
|
-
declare const PisellLoading: (props: PisellLoadingProps) => JSX.Element;
|
|
19
|
+
declare const PisellLoading: (props: PisellLoadingProps) => React.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { PisellLoading };
|
|
@@ -40,7 +40,7 @@ interface PisellModalProps extends ModalProps {
|
|
|
40
40
|
maskProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
41
41
|
}
|
|
42
42
|
declare const PisellModal: {
|
|
43
|
-
(props: PisellModalProps): JSX.Element;
|
|
43
|
+
(props: PisellModalProps): React.JSX.Element;
|
|
44
44
|
confirm: (props: PisellModalFuncProps) => {
|
|
45
45
|
destroy: () => void;
|
|
46
46
|
update: (configUpdate: _$antd.ModalFuncProps | ((prevConfig: _$antd.ModalFuncProps) => _$antd.ModalFuncProps)) => void;
|
|
@@ -62,7 +62,7 @@ declare const PisellModal: {
|
|
|
62
62
|
destroy: () => void;
|
|
63
63
|
update: (configUpdate: _$antd.ModalFuncProps | ((prevConfig: _$antd.ModalFuncProps) => _$antd.ModalFuncProps)) => void;
|
|
64
64
|
};
|
|
65
|
-
Information: (props: InformationProps) => JSX.Element;
|
|
65
|
+
Information: (props: InformationProps) => React.JSX.Element;
|
|
66
66
|
};
|
|
67
67
|
//#endregion
|
|
68
68
|
export { PisellModal, PisellModalProps };
|
|
@@ -34,7 +34,9 @@ require("./BookingCalendar.less");
|
|
|
34
34
|
*/
|
|
35
35
|
/** 看板日历根组件:内含主题 CSS 与 Spin,按 `view` 挂载月 / 周 / 日子组件 */
|
|
36
36
|
function BookingCalendar(props = {}) {
|
|
37
|
-
var _hourSlots$;
|
|
37
|
+
var _props$weekStartsOn, _hourSlots$;
|
|
38
|
+
const weekStartsOn = (_props$weekStartsOn = props.weekStartsOn) !== null && _props$weekStartsOn !== void 0 ? _props$weekStartsOn : 1;
|
|
39
|
+
const weekdayIds = weekStartsOn === 0 ? require_calendarI18n.SUNDAY_FIRST_CALENDAR_WEEKDAY_IDS : require_calendarI18n.CALENDAR_WEEKDAY_IDS;
|
|
38
40
|
const allowPersist = require_calendarPersistGuard.useCalendarPersist();
|
|
39
41
|
/** 将 `resources` 规范为 `{ id, name, type }`,供分组与三视图共用 */
|
|
40
42
|
const courts = (0, react.useMemo)(() => {
|
|
@@ -99,7 +101,7 @@ function BookingCalendar(props = {}) {
|
|
|
99
101
|
rangeStart = new Date(a.getFullYear(), a.getMonth(), 1);
|
|
100
102
|
rangeEnd = new Date(a.getFullYear(), a.getMonth() + 1, 0);
|
|
101
103
|
} else if (view === "week") {
|
|
102
|
-
rangeStart = require_bookingCalendarDateUtils.startOfWeek(a);
|
|
104
|
+
rangeStart = require_bookingCalendarDateUtils.startOfWeek(a, weekStartsOn);
|
|
103
105
|
rangeEnd = require_bookingCalendarDateUtils.addDays(rangeStart, 6);
|
|
104
106
|
} else {
|
|
105
107
|
rangeStart = new Date(a);
|
|
@@ -114,7 +116,8 @@ function BookingCalendar(props = {}) {
|
|
|
114
116
|
}, [
|
|
115
117
|
view,
|
|
116
118
|
anchorDate,
|
|
117
|
-
props.onViewportChange
|
|
119
|
+
props.onViewportChange,
|
|
120
|
+
weekStartsOn
|
|
118
121
|
]);
|
|
119
122
|
const [selectedFreeSlots, setSelectedFreeSlots] = (0, react.useState)([]);
|
|
120
123
|
const [selectedBlockSlots, setSelectedBlockSlots] = (0, react.useState)([]);
|
|
@@ -177,7 +180,7 @@ function BookingCalendar(props = {}) {
|
|
|
177
180
|
*/
|
|
178
181
|
const { dayRowHeights, overlayBookings, courtDayDisplayLaneCount, hiddenDayOverlayIdSet, dayOverlayOverflowPluses } = require_useBookingCalendarDayOverlayLayout.useBookingCalendarDayOverlayLayout(visibleCourtRows, dayKey, bookings, hourSlots, slotStepHours);
|
|
179
182
|
/** 周视图表头对应的 7 个自然日 */
|
|
180
|
-
const weekDays = (0, react.useMemo)(() => require_bookingCalendarDateUtils.rangeDays(anchorDate), [anchorDate]);
|
|
183
|
+
const weekDays = (0, react.useMemo)(() => require_bookingCalendarDateUtils.rangeDays(anchorDate, weekStartsOn), [anchorDate, weekStartsOn]);
|
|
181
184
|
/** 资源视图:当月每日一列 */
|
|
182
185
|
const resourceMonthDays = (0, react.useMemo)(() => require_bookingCalendarDateUtils.monthCalendarDays(anchorDate), [anchorDate]);
|
|
183
186
|
(0, react.useMemo)(() => new Set(weekDays.map((d) => require_bookingCalendarDateUtils.fmtDate(d))), [weekDays]);
|
|
@@ -213,12 +216,13 @@ function BookingCalendar(props = {}) {
|
|
|
213
216
|
}
|
|
214
217
|
}, [view]);
|
|
215
218
|
/** 月历每格摘要(占用点、锁台等),供月视图渲染 */
|
|
216
|
-
const monthDays = (0, react.useMemo)(() => require_bookingCalendarDateUtils.monthGrid(anchorDate, bookings, courts, hourSlots, slotStepHours), [
|
|
219
|
+
const monthDays = (0, react.useMemo)(() => require_bookingCalendarDateUtils.monthGrid(anchorDate, bookings, courts, hourSlots, slotStepHours, weekStartsOn), [
|
|
217
220
|
anchorDate,
|
|
218
221
|
bookings,
|
|
219
222
|
courts,
|
|
220
223
|
hourSlots,
|
|
221
|
-
slotStepHours
|
|
224
|
+
slotStepHours,
|
|
225
|
+
weekStartsOn
|
|
222
226
|
]);
|
|
223
227
|
/** 日视图内容区总高度(表头 + 各资源行叠加以 overlay 抬高后的高度) */
|
|
224
228
|
const dayContentHeight = 56 + dayRowHeights.reduce((sum, h) => sum + h, 0);
|
|
@@ -612,6 +616,7 @@ function BookingCalendar(props = {}) {
|
|
|
612
616
|
className: "theme-shell soft-shadow mx-0 flex h-full min-h-0 w-full max-w-none flex-1 flex-col overflow-hidden transition-[padding-right] duration-200",
|
|
613
617
|
style: { paddingRight: 0 }
|
|
614
618
|
}, /* @__PURE__ */ react.default.createElement("div", { className: "flex min-h-0 flex-1 flex-col" }, view === "month" && /* @__PURE__ */ react.default.createElement(require_BookingCalendarMonthView.BookingCalendarMonthView, {
|
|
619
|
+
weekdayIds,
|
|
615
620
|
isLight,
|
|
616
621
|
anchorDate,
|
|
617
622
|
monthDays,
|
|
@@ -624,6 +629,7 @@ function BookingCalendar(props = {}) {
|
|
|
624
629
|
renderMonthWeekBooking: props.renderMonthWeekBooking,
|
|
625
630
|
tickFillMode: require_bookingCalendarAxis.resolveTickFillMode("month", props.tickFillMode)
|
|
626
631
|
}), view === "week" && /* @__PURE__ */ react.default.createElement(require_BookingCalendarWeekView.BookingCalendarWeekView, {
|
|
632
|
+
weekdayIds,
|
|
627
633
|
calendarProps: props,
|
|
628
634
|
isLight,
|
|
629
635
|
weekDays,
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { RecordBoardCalendarProps } from "../../types.js";
|
|
2
|
+
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts
|
|
5
5
|
type PisellRecordBoardCalendarViewProps = RecordBoardCalendarProps;
|
|
@@ -10,6 +10,6 @@ type PisellRecordBoardCalendarViewProps = RecordBoardCalendarProps;
|
|
|
10
10
|
* 只做「占位与裁剪高度」;本组件根节点负责在同一 flex 列里向下传递 **min-height:0**,避免 `BookingCalendar`
|
|
11
11
|
* 撑破壳层(一层即可,历史上曾双包一层重复 flex+overflow)。
|
|
12
12
|
*/
|
|
13
|
-
declare function PisellRecordBoardCalendarView(props: PisellRecordBoardCalendarViewProps): JSX.Element;
|
|
13
|
+
declare function PisellRecordBoardCalendarView(props: PisellRecordBoardCalendarViewProps): React.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { PisellRecordBoardCalendarView, PisellRecordBoardCalendarViewProps };
|
|
@@ -18,6 +18,8 @@ const CALENDAR_WEEKDAY_IDS = [
|
|
|
18
18
|
"pisell2.recordBoard.calendar.weekday.sat",
|
|
19
19
|
"pisell2.recordBoard.calendar.weekday.sun"
|
|
20
20
|
];
|
|
21
|
+
const SUNDAY_FIRST_CALENDAR_WEEKDAY_IDS = [CALENDAR_WEEKDAY_IDS[6], ...CALENDAR_WEEKDAY_IDS.slice(0, 6)];
|
|
21
22
|
//#endregion
|
|
22
23
|
exports.CALENDAR_WEEKDAY_IDS = CALENDAR_WEEKDAY_IDS;
|
|
24
|
+
exports.SUNDAY_FIRST_CALENDAR_WEEKDAY_IDS = SUNDAY_FIRST_CALENDAR_WEEKDAY_IDS;
|
|
23
25
|
exports.tCal = tCal;
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.js
CHANGED
|
@@ -26,16 +26,16 @@ function addDays(date, n) {
|
|
|
26
26
|
next.setDate(next.getDate() + n);
|
|
27
27
|
return next;
|
|
28
28
|
}
|
|
29
|
-
function startOfWeek(date) {
|
|
29
|
+
function startOfWeek(date, weekStartsOn = 1) {
|
|
30
30
|
const d = new Date(date);
|
|
31
31
|
const day = d.getDay();
|
|
32
|
-
const diff = day === 0 ? -6 : 1 - day;
|
|
32
|
+
const diff = weekStartsOn === 0 ? -day : day === 0 ? -6 : 1 - day;
|
|
33
33
|
d.setDate(d.getDate() + diff);
|
|
34
34
|
d.setHours(0, 0, 0, 0);
|
|
35
35
|
return d;
|
|
36
36
|
}
|
|
37
|
-
function rangeDays(anchor) {
|
|
38
|
-
const start = startOfWeek(anchor);
|
|
37
|
+
function rangeDays(anchor, weekStartsOn = 1) {
|
|
38
|
+
const start = startOfWeek(anchor, weekStartsOn);
|
|
39
39
|
return Array.from({ length: 7 }, (_, i) => addDays(start, i));
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
@@ -69,11 +69,11 @@ function formatShortMonthDay(dateKey) {
|
|
|
69
69
|
if (!m || !d) return dateKey;
|
|
70
70
|
return `${m}/${d}`;
|
|
71
71
|
}
|
|
72
|
-
function monthGrid(date, bookings, courtsList = [], hourSlotsIn, slotStepHours = 1) {
|
|
72
|
+
function monthGrid(date, bookings, courtsList = [], hourSlotsIn, slotStepHours = 1, weekStartsOn = 1) {
|
|
73
73
|
const hourSlots = hourSlotsIn && hourSlotsIn.length ? hourSlotsIn : require_index.buildCalendarTimelineSlotStartsFromRange(require_bookingCalendarConstants.DEFAULT_CALENDAR_TIMELINE, date, 60);
|
|
74
74
|
const year = date.getFullYear();
|
|
75
75
|
const month = date.getMonth();
|
|
76
|
-
const start = startOfWeek(new Date(year, month, 1));
|
|
76
|
+
const start = startOfWeek(new Date(year, month, 1), weekStartsOn);
|
|
77
77
|
return Array.from({ length: 35 }, (_, i) => addDays(start, i)).map((day) => {
|
|
78
78
|
const key = fmtDate(day);
|
|
79
79
|
const dayBookings = bookings.filter((b) => b.kind === "booking" && getBookingSegmentForDate(b, key) != null);
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.js
CHANGED
|
@@ -17,7 +17,7 @@ const MONTH_GRID_COLS = 7;
|
|
|
17
17
|
* - 行高内自适应 effectiveMaxLane,超出 → cell 级 `+N` tile;
|
|
18
18
|
* - cell 层只负责日期 header / 点击跳日 / drop 改期,不再渲染 booking 列表(被 overlay 替代)。
|
|
19
19
|
*/
|
|
20
|
-
function BookingCalendarMonthView({ isLight, anchorDate, monthDays, bookings, goToDayFromCell, handleGridDropMove, setDraggingItem, openBookingDetail, setOverflowListModal, renderMonthWeekBooking, tickFillMode }) {
|
|
20
|
+
function BookingCalendarMonthView({ weekdayIds, isLight, anchorDate, monthDays, bookings, goToDayFromCell, handleGridDropMove, setDraggingItem, openBookingDetail, setOverflowListModal, renderMonthWeekBooking, tickFillMode }) {
|
|
21
21
|
const todayKey = require_bookingCalendarDateUtils.fmtDate(/* @__PURE__ */ new Date());
|
|
22
22
|
const weekRows = (0, react.useMemo)(() => {
|
|
23
23
|
const out = [];
|
|
@@ -50,7 +50,7 @@ function BookingCalendarMonthView({ isLight, anchorDate, monthDays, bookings, go
|
|
|
50
50
|
return /* @__PURE__ */ react.default.createElement("div", {
|
|
51
51
|
key: `month-${anchorDate.getFullYear()}-${anchorDate.getMonth()}`,
|
|
52
52
|
className: "flex min-h-0 flex-1 flex-col"
|
|
53
|
-
}, /* @__PURE__ */ react.default.createElement("div", { className: "relative flex min-h-0 flex-1 flex-col overflow-hidden" }, /* @__PURE__ */ react.default.createElement("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-x-auto overflow-y-hidden" }, /* @__PURE__ */ react.default.createElement("div", { className: "theme-panel flex min-h-[0] min-w-[980px] flex-1 flex-col overflow-hidden" }, /* @__PURE__ */ react.default.createElement("div", { className: "theme-panel-alt grid shrink-0 grid-cols-7 border-b theme-border shadow-[0_6px_12px_rgba(0,0,0,0.08)]" },
|
|
53
|
+
}, /* @__PURE__ */ react.default.createElement("div", { className: "relative flex min-h-0 flex-1 flex-col overflow-hidden" }, /* @__PURE__ */ react.default.createElement("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-x-auto overflow-y-hidden" }, /* @__PURE__ */ react.default.createElement("div", { className: "theme-panel flex min-h-[0] min-w-[980px] flex-1 flex-col overflow-hidden" }, /* @__PURE__ */ react.default.createElement("div", { className: "theme-panel-alt grid shrink-0 grid-cols-7 border-b theme-border shadow-[0_6px_12px_rgba(0,0,0,0.08)]" }, weekdayIds.map((id) => /* @__PURE__ */ react.default.createElement("div", {
|
|
54
54
|
key: id,
|
|
55
55
|
className: "px-4 py-2.5 text-center text-sm font-medium"
|
|
56
56
|
}, require_calendarI18n.tCal(id)))), /* @__PURE__ */ react.default.createElement("div", {
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.js
CHANGED
|
@@ -15,7 +15,7 @@ const WEEK_VIEW_OVERLAY_LANE_GAP = 4;
|
|
|
15
15
|
/**
|
|
16
16
|
* 周视图:7 日网格 + 左侧分组(可折叠),单元格调起日视图;格内 drop 触发改期草稿。
|
|
17
17
|
*/
|
|
18
|
-
function BookingCalendarWeekView({ calendarProps, isLight, weekDays, bookings, courts, hourSlots, slotStepHours, visibleCourts, visibleCourtRows, isBusinessHour, goToDayFromCell, handleGridDropMove, openBookingDetail, setDraggingItem, setCollapsedGroups, setOverflowListModal, tickFillMode }) {
|
|
18
|
+
function BookingCalendarWeekView({ weekdayIds, calendarProps, isLight, weekDays, bookings, courts, hourSlots, slotStepHours, visibleCourts, visibleCourtRows, isBusinessHour, goToDayFromCell, handleGridDropMove, openBookingDetail, setDraggingItem, setCollapsedGroups, setOverflowListModal, tickFillMode }) {
|
|
19
19
|
const props = calendarProps;
|
|
20
20
|
const todayKey = require_bookingCalendarDateUtils.fmtDate(/* @__PURE__ */ new Date());
|
|
21
21
|
/** 与下方 grid `minmax(…px, 1fr)` 一致:窄屏由外层 overflow-auto + min-w-0 定视口宽,本值撑开 scrollWidth */
|
|
@@ -144,7 +144,7 @@ function BookingCalendarWeekView({ calendarProps, isLight, weekDays, bookings, c
|
|
|
144
144
|
return /* @__PURE__ */ react.default.createElement("div", {
|
|
145
145
|
key,
|
|
146
146
|
className: `relative z-20 border-b border-l px-1.5 py-2 text-center shadow-[0_8px_16px_rgba(0,0,0,0.06)] ${isLight ? "theme-border theme-text" : "border-zinc-800"} ${isToday ? isLight ? "bg-gradient-to-b from-violet-50 to-white" : "bg-gradient-to-b from-violet-950 to-[#1a1a22]" : isLight ? "theme-panel-soft" : "bg-[#1a1a22]"}`
|
|
147
|
-
}, /* @__PURE__ */ react.default.createElement("div", { className: `text-sm leading-tight ${isLight ? "theme-text-faint" : "text-zinc-400"}` }, require_calendarI18n.tCal(
|
|
147
|
+
}, /* @__PURE__ */ react.default.createElement("div", { className: `text-sm leading-tight ${isLight ? "theme-text-faint" : "text-zinc-400"}` }, require_calendarI18n.tCal(weekdayIds[i])), /* @__PURE__ */ react.default.createElement("div", { className: "mt-0.5 flex justify-center" }, /* @__PURE__ */ react.default.createElement("span", {
|
|
148
148
|
className: "grid h-10 w-10 place-items-center text-3xl font-semibold leading-none",
|
|
149
149
|
"aria-label": isToday ? "Today" : void 0
|
|
150
150
|
}, day.getDate())));
|
|
@@ -329,6 +329,8 @@ interface RecordBoardBlockedTimePanelPayload {
|
|
|
329
329
|
}
|
|
330
330
|
/** 日历视图槽位 props:由 Shell 合并根级与子槽后传入 PisellRecordBoardCalendarView */
|
|
331
331
|
interface RecordBoardCalendarProps {
|
|
332
|
+
/** 0 = Sunday, 1 = Monday. Omitted keeps the original Monday-first behaviour. */
|
|
333
|
+
weekStartsOn?: 0 | 1;
|
|
332
334
|
persistGuard?: CalendarPersistContextValue;
|
|
333
335
|
/**
|
|
334
336
|
* 日历画布外观:亮色切换 `theme-root.theme-light`;未传或 `dark` 为深色(默认)。
|