@pisell/materials 6.11.261 → 6.11.263
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.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +48 -48
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +48 -48
- package/es/components/PisellFields/index.js +11 -0
- package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +2 -0
- package/es/components/filter/components/FilterItem/index.js +11 -0
- package/es/components/page/dateLocale.js +33 -0
- package/es/components/page/index.d.ts +1 -0
- package/es/components/page/index.js +30 -4
- package/es/components/pisellCurrency/index.js +13 -0
- package/es/components/pisellEmail/index.js +13 -0
- package/es/components/pisellLongText/index.js +13 -0
- package/es/components/pisellMultipleSelect/index.js +13 -0
- package/es/components/pisellNumber/index.js +13 -0
- package/es/components/pisellPercent/index.js +13 -0
- package/es/components/pisellPhone/index.js +14 -0
- package/es/components/pisellRating/index.js +13 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.js +13 -7
- 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/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js +2 -0
- package/es/components/pisellRecordBoard/types.d.ts +2 -0
- package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +11 -0
- package/es/components/pisellSingleLineText/index.js +13 -0
- package/es/components/pisellSingleSelect/index.js +13 -0
- package/es/components/pisellUrl/index.js +13 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +14 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +2 -2
- package/es/components/productCard/lineItem/BookingLineItem.js +3 -2
- package/es/index.js +11 -0
- package/lib/components/page/dateLocale.js +35 -0
- package/lib/components/page/index.d.ts +1 -0
- package/lib/components/page/index.js +33 -4
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.js +12 -6
- 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/productCard/cartSkuCard/components/AmountFooter/index.less +14 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +2 -2
- package/lib/components/productCard/lineItem/BookingLineItem.js +3 -2
- package/package.json +3 -3
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
import PisellSingleLineText_default from "../pisellSingleLineText/PisellSingleLineText.js";
|
|
2
|
+
import "../pisellSingleLineText/index.js";
|
|
2
3
|
import PisellLongText_default from "../pisellLongText/PisellLongText.js";
|
|
4
|
+
import "../pisellLongText/index.js";
|
|
3
5
|
import MemoizedPisellNumber from "../pisellNumber/PisellNumber.js";
|
|
6
|
+
import "../pisellNumber/index.js";
|
|
4
7
|
import MemoizedPisellCurrency from "../pisellCurrency/PisellCurrency.js";
|
|
8
|
+
import "../pisellCurrency/index.js";
|
|
5
9
|
import MemoizedPisellPercent from "../pisellPercent/PisellPercent.js";
|
|
10
|
+
import "../pisellPercent/index.js";
|
|
6
11
|
import PisellPhone_default from "../pisellPhone/PisellPhone.js";
|
|
12
|
+
import "../pisellPhone/index.js";
|
|
7
13
|
import PisellEmail_default from "../pisellEmail/PisellEmail.js";
|
|
14
|
+
import "../pisellEmail/index.js";
|
|
8
15
|
import PisellUrl_default from "../pisellUrl/PisellUrl.js";
|
|
16
|
+
import "../pisellUrl/index.js";
|
|
9
17
|
import PisellRating_default from "../pisellRating/PisellRating.js";
|
|
18
|
+
import "../pisellRating/index.js";
|
|
10
19
|
import PisellSingleSelect from "../pisellSingleSelect/PisellSingleSelect.js";
|
|
20
|
+
import "../pisellSingleSelect/index.js";
|
|
11
21
|
import PisellMultipleSelect from "../pisellMultipleSelect/PisellMultipleSelect.js";
|
|
22
|
+
import "../pisellMultipleSelect/index.js";
|
|
12
23
|
//#region src/components/PisellFields/index.tsx
|
|
13
24
|
/**
|
|
14
25
|
* PisellFields 命名空间
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
2
|
import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
3
3
|
import PisellSingleSelect from "../../../pisellSingleSelect/PisellSingleSelect.js";
|
|
4
|
+
import "../../../pisellSingleSelect/index.js";
|
|
4
5
|
import PisellMultipleSelect from "../../../pisellMultipleSelect/PisellMultipleSelect.js";
|
|
6
|
+
import "../../../pisellMultipleSelect/index.js";
|
|
5
7
|
import React, { useEffect, useState } from "react";
|
|
6
8
|
import { Spin } from "antd";
|
|
7
9
|
//#region src/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.tsx
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
import { getText } from "../../../../locales/index.js";
|
|
2
2
|
import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
3
|
import PisellSingleLineText_default from "../../../pisellSingleLineText/PisellSingleLineText.js";
|
|
4
|
+
import "../../../pisellSingleLineText/index.js";
|
|
4
5
|
import PisellLongText_default from "../../../pisellLongText/PisellLongText.js";
|
|
6
|
+
import "../../../pisellLongText/index.js";
|
|
5
7
|
import MemoizedPisellNumber from "../../../pisellNumber/PisellNumber.js";
|
|
8
|
+
import "../../../pisellNumber/index.js";
|
|
6
9
|
import MemoizedPisellCurrency from "../../../pisellCurrency/PisellCurrency.js";
|
|
10
|
+
import "../../../pisellCurrency/index.js";
|
|
7
11
|
import MemoizedPisellPercent from "../../../pisellPercent/PisellPercent.js";
|
|
12
|
+
import "../../../pisellPercent/index.js";
|
|
8
13
|
import PisellPhone_default from "../../../pisellPhone/PisellPhone.js";
|
|
14
|
+
import "../../../pisellPhone/index.js";
|
|
9
15
|
import PisellEmail_default from "../../../pisellEmail/PisellEmail.js";
|
|
16
|
+
import "../../../pisellEmail/index.js";
|
|
10
17
|
import PisellUrl_default from "../../../pisellUrl/PisellUrl.js";
|
|
18
|
+
import "../../../pisellUrl/index.js";
|
|
11
19
|
import PisellRating_default from "../../../pisellRating/PisellRating.js";
|
|
20
|
+
import "../../../pisellRating/index.js";
|
|
12
21
|
import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
13
22
|
import PisellSingleSelect from "../../../pisellSingleSelect/PisellSingleSelect.js";
|
|
23
|
+
import "../../../pisellSingleSelect/index.js";
|
|
14
24
|
import PisellMultipleSelect from "../../../pisellMultipleSelect/PisellMultipleSelect.js";
|
|
25
|
+
import "../../../pisellMultipleSelect/index.js";
|
|
15
26
|
import { fieldMaps } from "../../../table/Table/fields/index.js";
|
|
16
27
|
import { PisellMobileDateRangePicker } from "../../../pisellMobileDateRangePicker/PisellMobileDateRangePicker.js";
|
|
17
28
|
import AsyncOptionsSelectWrapper from "./AsyncOptionsSelectWrapper.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/components/page/dateLocale.ts
|
|
2
|
+
const COUNTRY_WEEK_STARTS_ON = {
|
|
3
|
+
US: 0,
|
|
4
|
+
CA: 0,
|
|
5
|
+
AU: 1,
|
|
6
|
+
NZ: 1,
|
|
7
|
+
SG: 0,
|
|
8
|
+
HK: 0,
|
|
9
|
+
TW: 0,
|
|
10
|
+
CN: 1,
|
|
11
|
+
JP: 0,
|
|
12
|
+
KR: 0,
|
|
13
|
+
MY: 1,
|
|
14
|
+
GB: 1,
|
|
15
|
+
FR: 1,
|
|
16
|
+
IT: 1
|
|
17
|
+
};
|
|
18
|
+
function normalizePageCountryCode(value) {
|
|
19
|
+
const countryCode = String(value !== null && value !== void 0 ? value : "").trim().toUpperCase();
|
|
20
|
+
return /^[A-Z]{2}$/.test(countryCode) ? countryCode : void 0;
|
|
21
|
+
}
|
|
22
|
+
/** Undefined tells Page to preserve its previous locale behaviour. */
|
|
23
|
+
function getPageWeekStartsOn(countryCode) {
|
|
24
|
+
const normalized = normalizePageCountryCode(countryCode);
|
|
25
|
+
return normalized ? COUNTRY_WEEK_STARTS_ON[normalized] : void 0;
|
|
26
|
+
}
|
|
27
|
+
function getPageEnglishAdapterLocale(countryCode) {
|
|
28
|
+
const weekStartsOn = getPageWeekStartsOn(countryCode);
|
|
29
|
+
if (weekStartsOn === void 0) return void 0;
|
|
30
|
+
return weekStartsOn === 1 ? "en-gb" : "en";
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { getPageEnglishAdapterLocale, getPageWeekStartsOn, normalizePageCountryCode };
|
|
@@ -5,25 +5,31 @@ import ConfigProvider$1 from "../config-provider/index.js";
|
|
|
5
5
|
import VariablesProvider from "../dataSourceComponents/provider/variables/VariablesProvider.js";
|
|
6
6
|
import PisellConfigProvider from "../pisell-config-provider/index.js";
|
|
7
7
|
import { getThemeConfig } from "../../theme/tokens.js";
|
|
8
|
+
import { getPageEnglishAdapterLocale, getPageWeekStartsOn, normalizePageCountryCode } from "./dateLocale.js";
|
|
8
9
|
import React, { useEffect, useMemo } from "react";
|
|
9
10
|
import { App } from "antd";
|
|
11
|
+
import dayjs from "dayjs";
|
|
10
12
|
import { LocaleProvider, LocalizationProvider, ThemeProvider, createTheme } from "@pisell/date-picker";
|
|
11
13
|
import zhCN from "antd/es/locale/zh_CN";
|
|
12
14
|
import { AdapterDayjs } from "@pisell/date-picker/es/AdapterDayjs";
|
|
13
15
|
import enUS from "antd/es/locale/en_US";
|
|
16
|
+
import enGB from "antd/es/locale/en_GB";
|
|
14
17
|
import zhTW from "antd/es/locale/zh_TW";
|
|
15
18
|
import zhHK from "antd/es/locale/zh_HK";
|
|
16
19
|
import jaJP from "antd/es/locale/ja_JP";
|
|
17
20
|
import ptPT from "antd/es/locale/pt_PT";
|
|
21
|
+
import enGbLocale from "dayjs/locale/en-gb";
|
|
18
22
|
//#region src/components/page/index.tsx
|
|
19
23
|
const _excluded = [
|
|
20
24
|
"children",
|
|
21
25
|
"style",
|
|
22
26
|
"className",
|
|
23
27
|
"locale",
|
|
28
|
+
"countryCode",
|
|
24
29
|
"variablesConfig",
|
|
25
30
|
"isRenderPisellConfigProvider"
|
|
26
31
|
];
|
|
32
|
+
dayjs.locale(enGbLocale, void 0, true);
|
|
27
33
|
const localMap = {
|
|
28
34
|
"zh-TW": zhTW,
|
|
29
35
|
"zh-CN": zhCN,
|
|
@@ -43,11 +49,31 @@ const localeDateMap = {
|
|
|
43
49
|
"pt": { adapterLocale: "pt" }
|
|
44
50
|
};
|
|
45
51
|
const Page = (props) => {
|
|
46
|
-
var _context$appHelper, _context$engine, _localeDateMap, _context$engine2;
|
|
47
|
-
const { children, style, className, locale: propsLocale, variablesConfig, isRenderPisellConfigProvider = true } = props, others = _objectWithoutProperties(props, _excluded);
|
|
52
|
+
var _context$appHelper, _context$engine, _context$appHelper2, _localeDateMap, _context$engine2;
|
|
53
|
+
const { children, style, className, locale: propsLocale, countryCode: propsCountryCode, variablesConfig, isRenderPisellConfigProvider = true } = props, others = _objectWithoutProperties(props, _excluded);
|
|
48
54
|
const context = useEngineContext();
|
|
49
55
|
const { platform, themeColor } = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.constants) || {};
|
|
50
56
|
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";
|
|
57
|
+
const utils = context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils;
|
|
58
|
+
let countryCode = normalizePageCountryCode(propsCountryCode);
|
|
59
|
+
try {
|
|
60
|
+
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;
|
|
61
|
+
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));
|
|
62
|
+
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");
|
|
63
|
+
countryCode = [
|
|
64
|
+
countryCode,
|
|
65
|
+
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,
|
|
66
|
+
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,
|
|
67
|
+
appCore === null || appCore === void 0 ? void 0 : appCore.country_code,
|
|
68
|
+
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,
|
|
69
|
+
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,
|
|
70
|
+
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
|
|
71
|
+
].map(normalizePageCountryCode).find((candidate) => candidate !== void 0);
|
|
72
|
+
} catch (_unused) {}
|
|
73
|
+
const englishAdapterLocale = getPageEnglishAdapterLocale(countryCode);
|
|
74
|
+
const weekStartsOn = getPageWeekStartsOn(countryCode);
|
|
75
|
+
const isEnglish = String(locale).toLowerCase().startsWith("en");
|
|
76
|
+
const antdLocale = isEnglish && weekStartsOn !== void 0 ? weekStartsOn === 1 ? enGB : enUS : localMap[locale];
|
|
51
77
|
const theme = useMemo(() => {
|
|
52
78
|
if (props === null || props === void 0 ? void 0 : props.theme) {
|
|
53
79
|
var _props$theme;
|
|
@@ -64,7 +90,7 @@ const Page = (props) => {
|
|
|
64
90
|
document.body.id = "body";
|
|
65
91
|
}, []);
|
|
66
92
|
return /* @__PURE__ */ React.createElement(ConfigProvider$1, _objectSpread2(_objectSpread2({}, others), {}, {
|
|
67
|
-
locale:
|
|
93
|
+
locale: antdLocale,
|
|
68
94
|
prefixCls: props.prefixCls || "pisell-lowcode",
|
|
69
95
|
theme
|
|
70
96
|
}), /* @__PURE__ */ React.createElement(App, {
|
|
@@ -72,7 +98,7 @@ const Page = (props) => {
|
|
|
72
98
|
message: { maxCount: 1 }
|
|
73
99
|
}, /* @__PURE__ */ React.createElement(LocalizationProvider, {
|
|
74
100
|
dateAdapter: AdapterDayjs,
|
|
75
|
-
adapterLocale: (localeDateMap === null || localeDateMap === void 0 || (_localeDateMap = localeDateMap[locale]) === null || _localeDateMap === void 0 ? void 0 : _localeDateMap.adapterLocale) || "en"
|
|
101
|
+
adapterLocale: isEnglish && englishAdapterLocale || (localeDateMap === null || localeDateMap === void 0 || (_localeDateMap = localeDateMap[locale]) === null || _localeDateMap === void 0 ? void 0 : _localeDateMap.adapterLocale) || "en"
|
|
76
102
|
}, /* @__PURE__ */ React.createElement(ThemeProvider, { theme: datePickerTheme }, /* @__PURE__ */ React.createElement(LocaleProvider, { value: { locale } }, /* @__PURE__ */ React.createElement(PisellConfigProvid, { locale }, /* @__PURE__ */ React.createElement(VariablesProvider, {
|
|
77
103
|
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) || {},
|
|
78
104
|
config: variablesConfig
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getText } from "../../locales/index.js";
|
|
2
|
+
import MemoizedPisellCurrency from "./PisellCurrency.js";
|
|
3
|
+
//#region src/components/pisellCurrency/index.tsx
|
|
4
|
+
/** RecordBoard 列 type 联动排序:内置 0 → 9 / 9 → 0 */
|
|
5
|
+
MemoizedPisellCurrency.SortOptions = { getSortItems: (fieldKey) => [{
|
|
6
|
+
key: `${fieldKey}:asc`,
|
|
7
|
+
label: getText("sort-0-9")
|
|
8
|
+
}, {
|
|
9
|
+
key: `${fieldKey}:desc`,
|
|
10
|
+
label: getText("sort-9-0")
|
|
11
|
+
}] };
|
|
12
|
+
//#endregion
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getText } from "../../locales/index.js";
|
|
2
|
+
import PisellEmail_default from "./PisellEmail.js";
|
|
3
|
+
//#region src/components/pisellEmail/index.tsx
|
|
4
|
+
/** RecordBoard 列 type 联动排序:内置 A → Z / Z → A */
|
|
5
|
+
PisellEmail_default.SortOptions = { getSortItems: (fieldKey) => [{
|
|
6
|
+
key: `${fieldKey}:asc`,
|
|
7
|
+
label: getText("sort-a-z")
|
|
8
|
+
}, {
|
|
9
|
+
key: `${fieldKey}:desc`,
|
|
10
|
+
label: getText("sort-z-a")
|
|
11
|
+
}] };
|
|
12
|
+
//#endregion
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getText } from "../../locales/index.js";
|
|
2
|
+
import PisellLongText_default from "./PisellLongText.js";
|
|
3
|
+
//#region src/components/pisellLongText/index.tsx
|
|
4
|
+
/** RecordBoard 列 type 联动排序:内置 A → Z / Z → A */
|
|
5
|
+
PisellLongText_default.SortOptions = { getSortItems: (fieldKey) => [{
|
|
6
|
+
key: `${fieldKey}:asc`,
|
|
7
|
+
label: getText("sort-a-z")
|
|
8
|
+
}, {
|
|
9
|
+
key: `${fieldKey}:desc`,
|
|
10
|
+
label: getText("sort-z-a")
|
|
11
|
+
}] };
|
|
12
|
+
//#endregion
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getText } from "../../locales/index.js";
|
|
2
|
+
import PisellMultipleSelect from "./PisellMultipleSelect.js";
|
|
3
|
+
//#region src/components/pisellMultipleSelect/index.tsx
|
|
4
|
+
/** RecordBoard 列 type 联动排序:内置 First → Last / Last → First */
|
|
5
|
+
PisellMultipleSelect.SortOptions = { getSortItems: (fieldKey) => [{
|
|
6
|
+
key: `${fieldKey}:asc`,
|
|
7
|
+
label: getText("sort-first-last")
|
|
8
|
+
}, {
|
|
9
|
+
key: `${fieldKey}:desc`,
|
|
10
|
+
label: getText("sort-last-first")
|
|
11
|
+
}] };
|
|
12
|
+
//#endregion
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getText } from "../../locales/index.js";
|
|
2
|
+
import MemoizedPisellNumber from "./PisellNumber.js";
|
|
3
|
+
//#region src/components/pisellNumber/index.tsx
|
|
4
|
+
/** RecordBoard 列 type 联动排序:内置 0 → 9 / 9 → 0 */
|
|
5
|
+
MemoizedPisellNumber.SortOptions = { getSortItems: (fieldKey) => [{
|
|
6
|
+
key: `${fieldKey}:asc`,
|
|
7
|
+
label: getText("sort-0-9")
|
|
8
|
+
}, {
|
|
9
|
+
key: `${fieldKey}:desc`,
|
|
10
|
+
label: getText("sort-9-0")
|
|
11
|
+
}] };
|
|
12
|
+
//#endregion
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getText } from "../../locales/index.js";
|
|
2
|
+
import MemoizedPisellPercent from "./PisellPercent.js";
|
|
3
|
+
//#region src/components/pisellPercent/index.tsx
|
|
4
|
+
/** RecordBoard 列 type 联动排序:内置 0 → 9 / 9 → 0 */
|
|
5
|
+
MemoizedPisellPercent.SortOptions = { getSortItems: (fieldKey) => [{
|
|
6
|
+
key: `${fieldKey}:asc`,
|
|
7
|
+
label: getText("sort-0-9")
|
|
8
|
+
}, {
|
|
9
|
+
key: `${fieldKey}:desc`,
|
|
10
|
+
label: getText("sort-9-0")
|
|
11
|
+
}] };
|
|
12
|
+
//#endregion
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getText } from "../../locales/index.js";
|
|
2
|
+
import "./constants/countryCodes.js";
|
|
3
|
+
import PisellPhone_default from "./PisellPhone.js";
|
|
4
|
+
//#region src/components/pisellPhone/index.tsx
|
|
5
|
+
/** RecordBoard 列 type 联动排序:内置 A → Z / Z → A */
|
|
6
|
+
PisellPhone_default.SortOptions = { getSortItems: (fieldKey) => [{
|
|
7
|
+
key: `${fieldKey}:asc`,
|
|
8
|
+
label: getText("sort-a-z")
|
|
9
|
+
}, {
|
|
10
|
+
key: `${fieldKey}:desc`,
|
|
11
|
+
label: getText("sort-z-a")
|
|
12
|
+
}] };
|
|
13
|
+
//#endregion
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getText } from "../../locales/index.js";
|
|
2
|
+
import PisellRating_default from "./PisellRating.js";
|
|
3
|
+
//#region src/components/pisellRating/index.tsx
|
|
4
|
+
/** RecordBoard 列 type 联动排序:内置 0 → 9 / 9 → 0 */
|
|
5
|
+
PisellRating_default.SortOptions = { getSortItems: (fieldKey) => [{
|
|
6
|
+
key: `${fieldKey}:asc`,
|
|
7
|
+
label: getText("sort-0-9")
|
|
8
|
+
}, {
|
|
9
|
+
key: `${fieldKey}:desc`,
|
|
10
|
+
label: getText("sort-9-0")
|
|
11
|
+
}] };
|
|
12
|
+
//#endregion
|
|
13
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { _asyncToGenerator } from "../../../../_virtual/_@oxc-project_runtime@0.
|
|
|
3
3
|
import { buildCalendarTimelineSlotStartsFromRange } from "../../../pisellTimeNavigator/utils/index.js";
|
|
4
4
|
import { useCalendarPersist } from "./calendarPersistGuard.js";
|
|
5
5
|
import { DEFAULT_CALENDAR_TIMELINE } from "./const/bookingCalendarConstants.js";
|
|
6
|
-
import { tCal } from "./calendarI18n.js";
|
|
6
|
+
import { CALENDAR_WEEKDAY_IDS, SUNDAY_FIRST_CALENDAR_WEEKDAY_IDS, tCal } from "./calendarI18n.js";
|
|
7
7
|
import { addDays, dayAndHourToDayjs, fmtDate, groupSelectedSlots, isCrossDayBooking, isFreeSelectionContiguousSameResource, isHourInTimelineSlots, monthCalendarDays, monthGrid, rangeDays, startOfWeek } from "./utils/bookingCalendarDateUtils.js";
|
|
8
8
|
import { MoveConfirmModal } from "./modal/MoveConfirmModal.js";
|
|
9
9
|
import { BookingCalendarBlockPanel } from "./modal/BookingCalendarBlockPanel.js";
|
|
@@ -32,7 +32,9 @@ import "./BookingCalendar.less";
|
|
|
32
32
|
*/
|
|
33
33
|
/** 看板日历根组件:内含主题 CSS 与 Spin,按 `view` 挂载月 / 周 / 日子组件 */
|
|
34
34
|
function BookingCalendar(props = {}) {
|
|
35
|
-
var _hourSlots$;
|
|
35
|
+
var _props$weekStartsOn, _hourSlots$;
|
|
36
|
+
const weekStartsOn = (_props$weekStartsOn = props.weekStartsOn) !== null && _props$weekStartsOn !== void 0 ? _props$weekStartsOn : 1;
|
|
37
|
+
const weekdayIds = weekStartsOn === 0 ? SUNDAY_FIRST_CALENDAR_WEEKDAY_IDS : CALENDAR_WEEKDAY_IDS;
|
|
36
38
|
const allowPersist = useCalendarPersist();
|
|
37
39
|
/** 将 `resources` 规范为 `{ id, name, type }`,供分组与三视图共用 */
|
|
38
40
|
const courts = useMemo(() => {
|
|
@@ -97,7 +99,7 @@ function BookingCalendar(props = {}) {
|
|
|
97
99
|
rangeStart = new Date(a.getFullYear(), a.getMonth(), 1);
|
|
98
100
|
rangeEnd = new Date(a.getFullYear(), a.getMonth() + 1, 0);
|
|
99
101
|
} else if (view === "week") {
|
|
100
|
-
rangeStart = startOfWeek(a);
|
|
102
|
+
rangeStart = startOfWeek(a, weekStartsOn);
|
|
101
103
|
rangeEnd = addDays(rangeStart, 6);
|
|
102
104
|
} else {
|
|
103
105
|
rangeStart = new Date(a);
|
|
@@ -112,7 +114,8 @@ function BookingCalendar(props = {}) {
|
|
|
112
114
|
}, [
|
|
113
115
|
view,
|
|
114
116
|
anchorDate,
|
|
115
|
-
props.onViewportChange
|
|
117
|
+
props.onViewportChange,
|
|
118
|
+
weekStartsOn
|
|
116
119
|
]);
|
|
117
120
|
const [selectedFreeSlots, setSelectedFreeSlots] = useState([]);
|
|
118
121
|
const [selectedBlockSlots, setSelectedBlockSlots] = useState([]);
|
|
@@ -175,7 +178,7 @@ function BookingCalendar(props = {}) {
|
|
|
175
178
|
*/
|
|
176
179
|
const { dayRowHeights, overlayBookings, courtDayDisplayLaneCount, hiddenDayOverlayIdSet, dayOverlayOverflowPluses } = useBookingCalendarDayOverlayLayout(visibleCourtRows, dayKey, bookings, hourSlots, slotStepHours);
|
|
177
180
|
/** 周视图表头对应的 7 个自然日 */
|
|
178
|
-
const weekDays = useMemo(() => rangeDays(anchorDate), [anchorDate]);
|
|
181
|
+
const weekDays = useMemo(() => rangeDays(anchorDate, weekStartsOn), [anchorDate, weekStartsOn]);
|
|
179
182
|
/** 资源视图:当月每日一列 */
|
|
180
183
|
const resourceMonthDays = useMemo(() => monthCalendarDays(anchorDate), [anchorDate]);
|
|
181
184
|
useMemo(() => new Set(weekDays.map((d) => fmtDate(d))), [weekDays]);
|
|
@@ -211,12 +214,13 @@ function BookingCalendar(props = {}) {
|
|
|
211
214
|
}
|
|
212
215
|
}, [view]);
|
|
213
216
|
/** 月历每格摘要(占用点、锁台等),供月视图渲染 */
|
|
214
|
-
const monthDays = useMemo(() => monthGrid(anchorDate, bookings, courts, hourSlots, slotStepHours), [
|
|
217
|
+
const monthDays = useMemo(() => monthGrid(anchorDate, bookings, courts, hourSlots, slotStepHours, weekStartsOn), [
|
|
215
218
|
anchorDate,
|
|
216
219
|
bookings,
|
|
217
220
|
courts,
|
|
218
221
|
hourSlots,
|
|
219
|
-
slotStepHours
|
|
222
|
+
slotStepHours,
|
|
223
|
+
weekStartsOn
|
|
220
224
|
]);
|
|
221
225
|
/** 日视图内容区总高度(表头 + 各资源行叠加以 overlay 抬高后的高度) */
|
|
222
226
|
const dayContentHeight = 56 + dayRowHeights.reduce((sum, h) => sum + h, 0);
|
|
@@ -610,6 +614,7 @@ function BookingCalendar(props = {}) {
|
|
|
610
614
|
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",
|
|
611
615
|
style: { paddingRight: 0 }
|
|
612
616
|
}, /* @__PURE__ */ React.createElement("div", { className: "flex min-h-0 flex-1 flex-col" }, view === "month" && /* @__PURE__ */ React.createElement(BookingCalendarMonthView, {
|
|
617
|
+
weekdayIds,
|
|
613
618
|
isLight,
|
|
614
619
|
anchorDate,
|
|
615
620
|
monthDays,
|
|
@@ -622,6 +627,7 @@ function BookingCalendar(props = {}) {
|
|
|
622
627
|
renderMonthWeekBooking: props.renderMonthWeekBooking,
|
|
623
628
|
tickFillMode: resolveTickFillMode("month", props.tickFillMode)
|
|
624
629
|
}), view === "week" && /* @__PURE__ */ React.createElement(BookingCalendarWeekView, {
|
|
630
|
+
weekdayIds,
|
|
625
631
|
calendarProps: props,
|
|
626
632
|
isLight,
|
|
627
633
|
weekDays,
|
|
@@ -18,5 +18,6 @@ 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
|
-
export { CALENDAR_WEEKDAY_IDS, tCal };
|
|
23
|
+
export { CALENDAR_WEEKDAY_IDS, SUNDAY_FIRST_CALENDAR_WEEKDAY_IDS, tCal };
|
package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.js
CHANGED
|
@@ -24,16 +24,16 @@ function addDays(date, n) {
|
|
|
24
24
|
next.setDate(next.getDate() + n);
|
|
25
25
|
return next;
|
|
26
26
|
}
|
|
27
|
-
function startOfWeek(date) {
|
|
27
|
+
function startOfWeek(date, weekStartsOn = 1) {
|
|
28
28
|
const d = new Date(date);
|
|
29
29
|
const day = d.getDay();
|
|
30
|
-
const diff = day === 0 ? -6 : 1 - day;
|
|
30
|
+
const diff = weekStartsOn === 0 ? -day : day === 0 ? -6 : 1 - day;
|
|
31
31
|
d.setDate(d.getDate() + diff);
|
|
32
32
|
d.setHours(0, 0, 0, 0);
|
|
33
33
|
return d;
|
|
34
34
|
}
|
|
35
|
-
function rangeDays(anchor) {
|
|
36
|
-
const start = startOfWeek(anchor);
|
|
35
|
+
function rangeDays(anchor, weekStartsOn = 1) {
|
|
36
|
+
const start = startOfWeek(anchor, weekStartsOn);
|
|
37
37
|
return Array.from({ length: 7 }, (_, i) => addDays(start, i));
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
@@ -67,11 +67,11 @@ function formatShortMonthDay(dateKey) {
|
|
|
67
67
|
if (!m || !d) return dateKey;
|
|
68
68
|
return `${m}/${d}`;
|
|
69
69
|
}
|
|
70
|
-
function monthGrid(date, bookings, courtsList = [], hourSlotsIn, slotStepHours = 1) {
|
|
70
|
+
function monthGrid(date, bookings, courtsList = [], hourSlotsIn, slotStepHours = 1, weekStartsOn = 1) {
|
|
71
71
|
const hourSlots = hourSlotsIn && hourSlotsIn.length ? hourSlotsIn : buildCalendarTimelineSlotStartsFromRange(DEFAULT_CALENDAR_TIMELINE, date, 60);
|
|
72
72
|
const year = date.getFullYear();
|
|
73
73
|
const month = date.getMonth();
|
|
74
|
-
const start = startOfWeek(new Date(year, month, 1));
|
|
74
|
+
const start = startOfWeek(new Date(year, month, 1), weekStartsOn);
|
|
75
75
|
return Array.from({ length: 35 }, (_, i) => addDays(start, i)).map((day) => {
|
|
76
76
|
const key = fmtDate(day);
|
|
77
77
|
const dayBookings = bookings.filter((b) => b.kind === "booking" && getBookingSegmentForDate(b, key) != null);
|
package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { monthViewEffectiveMaxLanes } from "../const/bookingCalendarConstants.js";
|
|
2
|
-
import {
|
|
2
|
+
import { tCal } from "../calendarI18n.js";
|
|
3
3
|
import { assignPerDateLanesCrossDayUnified, clipBookingDaySpanToWindow, fmtDate, formatHourLabel, formatShortMonthDay, getBookingSegmentForDate, isCrossDayBooking } from "../utils/bookingCalendarDateUtils.js";
|
|
4
4
|
import { getGridBookingRowStateClasses } from "../utils/BookingCalendarStyle.js";
|
|
5
5
|
import { CalendarGridBookingClipMarkers } from "../bookingCalendarViewShared.js";
|
|
@@ -15,7 +15,7 @@ const MONTH_GRID_COLS = 7;
|
|
|
15
15
|
* - 行高内自适应 effectiveMaxLane,超出 → cell 级 `+N` tile;
|
|
16
16
|
* - cell 层只负责日期 header / 点击跳日 / drop 改期,不再渲染 booking 列表(被 overlay 替代)。
|
|
17
17
|
*/
|
|
18
|
-
function BookingCalendarMonthView({ isLight, anchorDate, monthDays, bookings, goToDayFromCell, handleGridDropMove, setDraggingItem, openBookingDetail, setOverflowListModal, renderMonthWeekBooking, tickFillMode }) {
|
|
18
|
+
function BookingCalendarMonthView({ weekdayIds, isLight, anchorDate, monthDays, bookings, goToDayFromCell, handleGridDropMove, setDraggingItem, openBookingDetail, setOverflowListModal, renderMonthWeekBooking, tickFillMode }) {
|
|
19
19
|
const todayKey = fmtDate(/* @__PURE__ */ new Date());
|
|
20
20
|
const weekRows = useMemo(() => {
|
|
21
21
|
const out = [];
|
|
@@ -48,7 +48,7 @@ function BookingCalendarMonthView({ isLight, anchorDate, monthDays, bookings, go
|
|
|
48
48
|
return /* @__PURE__ */ React.createElement("div", {
|
|
49
49
|
key: `month-${anchorDate.getFullYear()}-${anchorDate.getMonth()}`,
|
|
50
50
|
className: "flex min-h-0 flex-1 flex-col"
|
|
51
|
-
}, /* @__PURE__ */ React.createElement("div", { className: "relative flex min-h-0 flex-1 flex-col overflow-hidden" }, /* @__PURE__ */ React.createElement("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-x-auto overflow-y-hidden" }, /* @__PURE__ */ React.createElement("div", { className: "theme-panel flex min-h-[0] min-w-[980px] flex-1 flex-col overflow-hidden" }, /* @__PURE__ */ React.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)]" },
|
|
51
|
+
}, /* @__PURE__ */ React.createElement("div", { className: "relative flex min-h-0 flex-1 flex-col overflow-hidden" }, /* @__PURE__ */ React.createElement("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-x-auto overflow-y-hidden" }, /* @__PURE__ */ React.createElement("div", { className: "theme-panel flex min-h-[0] min-w-[980px] flex-1 flex-col overflow-hidden" }, /* @__PURE__ */ React.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.createElement("div", {
|
|
52
52
|
key: id,
|
|
53
53
|
className: "px-4 py-2.5 text-center text-sm font-medium"
|
|
54
54
|
}, tCal(id)))), /* @__PURE__ */ React.createElement("div", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CALENDAR_EMPTY_DASHED_SLOT_CLASSNAME } from "../const/bookingCalendarConstants.js";
|
|
2
|
-
import {
|
|
2
|
+
import { tCal } from "../calendarI18n.js";
|
|
3
3
|
import { assignLanesByInterval, bookingIntersectsDateWindow, courtDaySummary, dayOccupancy, fmtDate, formatHourLabel, formatShortMonthDay, getBookingSegmentForDate, isCrossDayBooking } from "../utils/bookingCalendarDateUtils.js";
|
|
4
4
|
import { getGridBookingRowStateClasses } from "../utils/BookingCalendarStyle.js";
|
|
5
5
|
import { CalendarGridBookingClipMarkers, getRemainingToneClass } from "../bookingCalendarViewShared.js";
|
|
@@ -13,7 +13,7 @@ const WEEK_VIEW_OVERLAY_LANE_GAP = 4;
|
|
|
13
13
|
/**
|
|
14
14
|
* 周视图:7 日网格 + 左侧分组(可折叠),单元格调起日视图;格内 drop 触发改期草稿。
|
|
15
15
|
*/
|
|
16
|
-
function BookingCalendarWeekView({ calendarProps, isLight, weekDays, bookings, courts, hourSlots, slotStepHours, visibleCourts, visibleCourtRows, isBusinessHour, goToDayFromCell, handleGridDropMove, openBookingDetail, setDraggingItem, setCollapsedGroups, setOverflowListModal, tickFillMode }) {
|
|
16
|
+
function BookingCalendarWeekView({ weekdayIds, calendarProps, isLight, weekDays, bookings, courts, hourSlots, slotStepHours, visibleCourts, visibleCourtRows, isBusinessHour, goToDayFromCell, handleGridDropMove, openBookingDetail, setDraggingItem, setCollapsedGroups, setOverflowListModal, tickFillMode }) {
|
|
17
17
|
const props = calendarProps;
|
|
18
18
|
const todayKey = fmtDate(/* @__PURE__ */ new Date());
|
|
19
19
|
/** 与下方 grid `minmax(…px, 1fr)` 一致:窄屏由外层 overflow-auto + min-w-0 定视口宽,本值撑开 scrollWidth */
|
|
@@ -142,7 +142,7 @@ function BookingCalendarWeekView({ calendarProps, isLight, weekDays, bookings, c
|
|
|
142
142
|
return /* @__PURE__ */ React.createElement("div", {
|
|
143
143
|
key,
|
|
144
144
|
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]"}`
|
|
145
|
-
}, /* @__PURE__ */ React.createElement("div", { className: `text-sm leading-tight ${isLight ? "theme-text-faint" : "text-zinc-400"}` }, tCal(
|
|
145
|
+
}, /* @__PURE__ */ React.createElement("div", { className: `text-sm leading-tight ${isLight ? "theme-text-faint" : "text-zinc-400"}` }, tCal(weekdayIds[i])), /* @__PURE__ */ React.createElement("div", { className: "mt-0.5 flex justify-center" }, /* @__PURE__ */ React.createElement("span", {
|
|
146
146
|
className: "grid h-10 w-10 place-items-center text-3xl font-semibold leading-none",
|
|
147
147
|
"aria-label": isToday ? "Today" : void 0
|
|
148
148
|
}, day.getDate())));
|
package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { getText } from "../../../../locales/index.js";
|
|
2
2
|
import MemoizedPisellNumber from "../../../pisellNumber/PisellNumber.js";
|
|
3
|
+
import "../../../pisellNumber/index.js";
|
|
3
4
|
import PisellSingleSelect from "../../../pisellSingleSelect/PisellSingleSelect.js";
|
|
5
|
+
import "../../../pisellSingleSelect/index.js";
|
|
4
6
|
import React from "react";
|
|
5
7
|
//#region src/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.tsx
|
|
6
8
|
/** 控制台「资源 / 布局」分页:预设、自定义行列、翻页停留、主文案宽度 */
|
|
@@ -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` 为深色(默认)。
|
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import { getText } from "../../../locales/index.js";
|
|
2
2
|
import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
3
|
import PisellSingleLineText_default from "../../pisellSingleLineText/PisellSingleLineText.js";
|
|
4
|
+
import "../../pisellSingleLineText/index.js";
|
|
4
5
|
import PisellLongText_default from "../../pisellLongText/PisellLongText.js";
|
|
6
|
+
import "../../pisellLongText/index.js";
|
|
5
7
|
import MemoizedPisellNumber from "../../pisellNumber/PisellNumber.js";
|
|
8
|
+
import "../../pisellNumber/index.js";
|
|
6
9
|
import MemoizedPisellCurrency from "../../pisellCurrency/PisellCurrency.js";
|
|
10
|
+
import "../../pisellCurrency/index.js";
|
|
7
11
|
import MemoizedPisellPercent from "../../pisellPercent/PisellPercent.js";
|
|
12
|
+
import "../../pisellPercent/index.js";
|
|
8
13
|
import PisellPhone_default from "../../pisellPhone/PisellPhone.js";
|
|
14
|
+
import "../../pisellPhone/index.js";
|
|
9
15
|
import PisellEmail_default from "../../pisellEmail/PisellEmail.js";
|
|
16
|
+
import "../../pisellEmail/index.js";
|
|
10
17
|
import PisellUrl_default from "../../pisellUrl/PisellUrl.js";
|
|
18
|
+
import "../../pisellUrl/index.js";
|
|
11
19
|
import PisellRating_default from "../../pisellRating/PisellRating.js";
|
|
20
|
+
import "../../pisellRating/index.js";
|
|
12
21
|
import PisellSingleSelect from "../../pisellSingleSelect/PisellSingleSelect.js";
|
|
22
|
+
import "../../pisellSingleSelect/index.js";
|
|
13
23
|
import PisellMultipleSelect from "../../pisellMultipleSelect/PisellMultipleSelect.js";
|
|
24
|
+
import "../../pisellMultipleSelect/index.js";
|
|
14
25
|
import PisellDateTimeDisplay_default from "../../pisellDateTimeDisplay/PisellDateTimeDisplay.js";
|
|
15
26
|
import React, { useEffect, useState } from "react";
|
|
16
27
|
//#region src/components/pisellRecordBoard/utils/recordBoardColumns.tsx
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getText } from "../../locales/index.js";
|
|
2
|
+
import PisellSingleLineText_default from "./PisellSingleLineText.js";
|
|
3
|
+
//#region src/components/pisellSingleLineText/index.tsx
|
|
4
|
+
/** RecordBoard 列 type 联动排序:内置 A → Z / Z → A */
|
|
5
|
+
PisellSingleLineText_default.SortOptions = { getSortItems: (fieldKey) => [{
|
|
6
|
+
key: `${fieldKey}:asc`,
|
|
7
|
+
label: getText("sort-a-z")
|
|
8
|
+
}, {
|
|
9
|
+
key: `${fieldKey}:desc`,
|
|
10
|
+
label: getText("sort-z-a")
|
|
11
|
+
}] };
|
|
12
|
+
//#endregion
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getText } from "../../locales/index.js";
|
|
2
|
+
import PisellSingleSelect from "./PisellSingleSelect.js";
|
|
3
|
+
//#region src/components/pisellSingleSelect/index.tsx
|
|
4
|
+
/** RecordBoard 列 type 联动排序:内置 First → Last / Last → First */
|
|
5
|
+
PisellSingleSelect.SortOptions = { getSortItems: (fieldKey) => [{
|
|
6
|
+
key: `${fieldKey}:asc`,
|
|
7
|
+
label: getText("sort-first-last")
|
|
8
|
+
}, {
|
|
9
|
+
key: `${fieldKey}:desc`,
|
|
10
|
+
label: getText("sort-last-first")
|
|
11
|
+
}] };
|
|
12
|
+
//#endregion
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getText } from "../../locales/index.js";
|
|
2
|
+
import PisellUrl_default from "./PisellUrl.js";
|
|
3
|
+
//#region src/components/pisellUrl/index.tsx
|
|
4
|
+
/** RecordBoard 列 type 联动排序:内置 A → Z / Z → A */
|
|
5
|
+
PisellUrl_default.SortOptions = { getSortItems: (fieldKey) => [{
|
|
6
|
+
key: `${fieldKey}:asc`,
|
|
7
|
+
label: getText("sort-a-z")
|
|
8
|
+
}, {
|
|
9
|
+
key: `${fieldKey}:desc`,
|
|
10
|
+
label: getText("sort-z-a")
|
|
11
|
+
}] };
|
|
12
|
+
//#endregion
|
|
13
|
+
export {};
|
|
@@ -23,9 +23,23 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&__footer-price-wrap--weighing {
|
|
26
|
+
flex-wrap: wrap;
|
|
27
|
+
justify-content: flex-start;
|
|
28
|
+
column-gap: 12px;
|
|
29
|
+
row-gap: 4px;
|
|
26
30
|
font-size: var(--pisell-cart-sku-card-physical-text-height, 18px);
|
|
27
31
|
line-height: 1.3;
|
|
28
32
|
letter-spacing: -0.02em;
|
|
33
|
+
|
|
34
|
+
> .pisell-cart-sku-card__footer-price,
|
|
35
|
+
> span {
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pisell-cart-sku-card__footer-total {
|
|
41
|
+
margin-left: auto;
|
|
42
|
+
}
|
|
29
43
|
}
|
|
30
44
|
|
|
31
45
|
&__footer-discount {
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
|
|
154
154
|
&--weighing {
|
|
155
155
|
.product-info .product-name {
|
|
156
|
-
font-size:
|
|
156
|
+
font-size: var(--pisell-cart-sku-card-physical-text-height);
|
|
157
157
|
line-height: 1.3;
|
|
158
158
|
letter-spacing: -0.01em;
|
|
159
159
|
}
|
|
@@ -201,4 +201,4 @@
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
}
|
|
204
|
+
}
|