@pisell/materials 6.11.18 → 6.11.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +13 -13
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +13 -13
- package/es/components/PisellCards/index.d.ts +1 -0
- package/es/components/PisellFields/index.d.ts +1 -0
- package/es/components/PisellLayouts/index.d.ts +1 -0
- package/es/components/PisellMetrics/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +2 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +16 -15
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.js +12 -8
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.js +4 -2
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +1 -1
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +4 -3
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.js +4 -2
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +16 -13
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +8 -6
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +2 -1
- package/es/components/pisellFloorMapLayout/locales-ja.d.ts +104 -0
- package/es/components/pisellFloorMapLayout/locales-ja.js +103 -0
- package/es/components/pisellFloorMapLayout/locales-pt.d.ts +104 -0
- package/es/components/pisellFloorMapLayout/locales-pt.js +103 -0
- package/es/components/pisellFloorMapLayout/locales.d.ts +314 -0
- package/es/components/pisellFloorMapLayout/locales.js +123 -4
- package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +2 -3
- package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +3 -12
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +4 -3
- package/es/components/pisellModal/components/index.d.ts +1 -0
- package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +3 -2
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/link/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/hooks/useResponsive.d.ts +1 -1
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +1 -0
- package/es/locales/ja.d.ts +8 -0
- package/es/locales/ja.js +25 -7
- package/es/locales/pt.d.ts +8 -0
- package/es/locales/pt.js +21 -3
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +1 -0
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +1 -0
- package/lib/components/PisellCards/index.d.ts +1 -0
- package/lib/components/PisellFields/index.d.ts +1 -0
- package/lib/components/PisellLayouts/index.d.ts +1 -0
- package/lib/components/PisellMetrics/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +2 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +16 -15
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.js +13 -9
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.js +4 -2
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +5 -1
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +4 -3
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.js +4 -2
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +24 -13
- package/lib/components/pisellFloorMapLayout/components/ViewControls.js +12 -6
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +2 -1
- package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +104 -0
- package/lib/components/pisellFloorMapLayout/locales-ja.js +124 -0
- package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +104 -0
- package/lib/components/pisellFloorMapLayout/locales-pt.js +124 -0
- package/lib/components/pisellFloorMapLayout/locales.d.ts +314 -0
- package/lib/components/pisellFloorMapLayout/locales.js +132 -4
- package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +2 -3
- package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +1 -7
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +6 -3
- package/lib/components/pisellModal/components/index.d.ts +1 -0
- package/lib/components/pisellRecordBoard/utils/recordBoardColumns.js +11 -1
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/link/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/hooks/useResponsive.d.ts +1 -1
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +1 -0
- package/lib/locales/ja.d.ts +8 -0
- package/lib/locales/ja.js +22 -1
- package/lib/locales/pt.d.ts +8 -0
- package/lib/locales/pt.js +22 -1
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +1 -0
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +1 -0
- package/package.json +3 -3
- package/es/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
- package/es/components/PisellCards/components/TextCard/TextCard.d.ts +0 -8
- package/es/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
- package/es/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
- package/es/components/PisellCards/components/TextCard/types.d.ts +0 -270
- package/es/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -4
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/es/components/drag-sort-tree/index.d.ts +0 -5
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisell-config-provider/index.d.ts +0 -13
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/pisellFloorMapLayout/components/ItemLayer.d.ts +0 -48
- package/es/components/pisellGridPro/index.d.ts +0 -4
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +0 -10
- package/es/components/pisellHierarchicalSummaryList/components/index.d.ts +0 -1
- package/es/components/pisellHierarchicalSummaryList/hooks/index.d.ts +0 -2
- package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +0 -15
- package/es/components/pisellHierarchicalSummaryList/index.d.ts +0 -5
- package/es/components/pisellHierarchicalSummaryList/types.d.ts +0 -248
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/es/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +0 -14
- package/es/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +0 -14
- package/es/components/pisellTimeNavigator/hooks/useRealtime.d.ts +0 -5
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +0 -27
- package/es/components/pisellTimeNavigator/types.d.ts +0 -160
- package/es/components/pisellTimeNavigator/utils/index.d.ts +0 -30
- package/es/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
- package/es/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -178
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/types.d.ts +0 -95
- package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -9
- package/es/components/table/types.d.ts +0 -268
- package/es/components/versionModal/index.d.ts +0 -23
- package/lib/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
- package/lib/components/PisellCards/components/TextCard/TextCard.d.ts +0 -8
- package/lib/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
- package/lib/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
- package/lib/components/PisellCards/components/TextCard/types.d.ts +0 -270
- package/lib/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -4
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/lib/components/drag-sort-tree/index.d.ts +0 -5
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisell-config-provider/index.d.ts +0 -13
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.d.ts +0 -48
- package/lib/components/pisellGridPro/index.d.ts +0 -4
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +0 -10
- package/lib/components/pisellHierarchicalSummaryList/components/index.d.ts +0 -1
- package/lib/components/pisellHierarchicalSummaryList/hooks/index.d.ts +0 -2
- package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +0 -15
- package/lib/components/pisellHierarchicalSummaryList/index.d.ts +0 -5
- package/lib/components/pisellHierarchicalSummaryList/types.d.ts +0 -248
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/lib/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +0 -14
- package/lib/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +0 -14
- package/lib/components/pisellTimeNavigator/hooks/useRealtime.d.ts +0 -5
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +0 -27
- package/lib/components/pisellTimeNavigator/types.d.ts +0 -160
- package/lib/components/pisellTimeNavigator/utils/index.d.ts +0 -30
- package/lib/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
- package/lib/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -178
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -95
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -9
- package/lib/components/table/types.d.ts +0 -268
- package/lib/components/versionModal/index.d.ts +0 -23
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* <PisellFields.Number value={123} viewMode="readonly" />
|
|
10
10
|
* <PisellFields.Currency value={1000} currencySymbol="$" />
|
|
11
11
|
*/
|
|
12
|
+
/// <reference types="react" />
|
|
12
13
|
declare const PisellFields: {
|
|
13
14
|
SingleLineText: import("react").NamedExoticComponent<import("../pisellSingleLineText").PisellSingleLineTextProps>;
|
|
14
15
|
LongText: import("react").NamedExoticComponent<import("../pisellLongText").PisellLongTextProps>;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* <Content />
|
|
14
14
|
* </PisellLayouts.ScrollView>
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
declare const PisellLayouts: {
|
|
17
18
|
BasicGrid: <T>(props: import("../PisellBasicGrid").PisellBasicGridProps<T>) => import("react").JSX.Element;
|
|
18
19
|
ScrollView: import("react").ForwardRefExoticComponent<Omit<import("../PisellScrollView").PisellScrollViewProps, "ref"> & import("react").RefAttributes<import("../PisellScrollView").PisellScrollViewRef>>;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* />
|
|
14
14
|
* <PisellMetrics.StatisticList data={[...]} />
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
declare const PisellMetrics: {
|
|
17
18
|
MetricCard: import("react").FC<import("../pisellMetricCard").PisellMetricCardProps>;
|
|
18
19
|
StatisticList: (props: import("../pisellStatisticList").PisellStatisticListProps) => import("react").JSX.Element;
|
|
@@ -44,7 +44,7 @@ export declare const withDataSource: <P extends unknown>(WrappedComponent: React
|
|
|
44
44
|
}) => React.JSX.Element;
|
|
45
45
|
export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
|
|
46
46
|
options?: any;
|
|
47
|
-
optionSourceType?: "
|
|
47
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
48
48
|
labelField: string;
|
|
49
49
|
valueField: string;
|
|
50
50
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -54,7 +54,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
54
54
|
width: number;
|
|
55
55
|
align: "center" | "left" | "right";
|
|
56
56
|
fixed: false | "left" | "right";
|
|
57
|
-
type: "
|
|
57
|
+
type: "link" | "button";
|
|
58
58
|
items: OperationItem[];
|
|
59
59
|
} | undefined;
|
|
60
60
|
operationContent?: {
|
|
@@ -72,7 +72,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
72
72
|
useCustomAction: boolean;
|
|
73
73
|
actionType: string;
|
|
74
74
|
openMode: "modal" | "drawer";
|
|
75
|
-
openContentSize: "small" | "
|
|
75
|
+
openContentSize: "small" | "large" | "middle";
|
|
76
76
|
openTitle: string;
|
|
77
77
|
key: string;
|
|
78
78
|
} | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const RecordListWrapperWithDataSource: (props: import("./type").RecordListWrapperProps & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
3
3
|
options?: any;
|
|
4
|
-
optionSourceType?: "
|
|
4
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
5
5
|
labelField: string;
|
|
6
6
|
valueField: string;
|
|
7
7
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
3
3
|
options?: any;
|
|
4
|
-
optionSourceType?: "
|
|
4
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
5
5
|
labelField: string;
|
|
6
6
|
valueField: string;
|
|
7
7
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
/** 包装 DataSource 层(提供数据源上下文) */
|
|
2
3
|
declare const FormItemTabs: (props: import("./type").TabsProps & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
3
4
|
options?: any;
|
|
4
|
-
optionSourceType?: "
|
|
5
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
5
6
|
labelField: string;
|
|
6
7
|
valueField: string;
|
|
7
8
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
|
|
|
15
15
|
metadata?: MediaMetadata;
|
|
16
16
|
}) => Record<string, any>;
|
|
17
17
|
export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
|
|
18
|
-
export declare const getBaseTime: (size: number) =>
|
|
18
|
+
export declare const getBaseTime: (size: number) => 1000 | 2000 | 4000 | 8000;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const formFieldMap: {
|
|
2
3
|
FormItemCheckbox: import("react").FC<{}> & {
|
|
3
4
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -34,7 +35,7 @@ declare const formFieldMap: {
|
|
|
34
35
|
};
|
|
35
36
|
FormItemSelect: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
36
37
|
options?: any;
|
|
37
|
-
optionSourceType?: "
|
|
38
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
38
39
|
labelField: string;
|
|
39
40
|
valueField: string;
|
|
40
41
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -61,7 +62,7 @@ declare const formFieldMap: {
|
|
|
61
62
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
62
63
|
FormItemRecordListWrapper: (props: import("./RecordListWrapper/type").RecordListWrapperProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
63
64
|
options?: any;
|
|
64
|
-
optionSourceType?: "
|
|
65
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
65
66
|
labelField: string;
|
|
66
67
|
valueField: string;
|
|
67
68
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -71,7 +72,7 @@ declare const formFieldMap: {
|
|
|
71
72
|
}) => import("react").JSX.Element;
|
|
72
73
|
FormItemTabs: (props: import("./Tabs/type").TabsProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
73
74
|
options?: any;
|
|
74
|
-
optionSourceType?: "
|
|
75
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
75
76
|
labelField: string;
|
|
76
77
|
valueField: string;
|
|
77
78
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -80,13 +81,7 @@ declare const formFieldMap: {
|
|
|
80
81
|
extraParams?: Record<string, any> | undefined;
|
|
81
82
|
}) => import("react").JSX.Element;
|
|
82
83
|
};
|
|
83
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./
|
|
84
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
85
|
-
} & {
|
|
86
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
87
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
88
|
-
onChange: (value: string) => void;
|
|
89
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
84
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
90
85
|
JSON: import("react").FC<any>;
|
|
91
86
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
92
87
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -106,22 +101,28 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
106
101
|
name?: string | undefined;
|
|
107
102
|
fieldKey?: string | undefined;
|
|
108
103
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
109
|
-
}) | import("react").FC<import("./
|
|
104
|
+
}) | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
105
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
106
|
+
} & {
|
|
107
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
108
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
110
109
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
111
110
|
} & {
|
|
112
111
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
113
112
|
}) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
114
113
|
options?: any;
|
|
115
|
-
optionSourceType?: "
|
|
114
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
116
115
|
labelField: string;
|
|
117
116
|
valueField: string;
|
|
118
117
|
extraParams?: Record<string, any> | undefined;
|
|
119
118
|
} & {
|
|
120
119
|
dataSource?: any;
|
|
121
120
|
extraParams?: Record<string, any> | undefined;
|
|
122
|
-
}) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./
|
|
121
|
+
}) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
122
|
+
onChange: (value: string) => void;
|
|
123
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | ((props: import("./RecordListWrapper/type").RecordListWrapperProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
123
124
|
options?: any;
|
|
124
|
-
optionSourceType?: "
|
|
125
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
125
126
|
labelField: string;
|
|
126
127
|
valueField: string;
|
|
127
128
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -130,7 +131,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
130
131
|
extraParams?: Record<string, any> | undefined;
|
|
131
132
|
}) => import("react").JSX.Element) | ((props: import("./Tabs/type").TabsProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
132
133
|
options?: any;
|
|
133
|
-
optionSourceType?: "
|
|
134
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
134
135
|
labelField: string;
|
|
135
136
|
valueField: string;
|
|
136
137
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { Avatar } from 'antd';
|
|
7
7
|
import { UserOutlined, ClockCircleOutlined, TeamOutlined, AuditOutlined, FieldTimeOutlined, EnvironmentOutlined } from '@ant-design/icons';
|
|
8
|
+
import { locales } from '@pisell/utils';
|
|
9
|
+
var I18N_CARD = 'pisell-floor-map-layout.card-placeholder';
|
|
10
|
+
var I18N_FIGMA = 'pisell-floor-map-layout.figma-card';
|
|
11
|
+
|
|
8
12
|
/** Figma 设计 token(Pisell 2.0 Component Library) */
|
|
9
13
|
var FIGMA = {
|
|
10
14
|
white: '#FFFFFF',
|
|
@@ -53,7 +57,7 @@ export function getFigmaTableCardFromMerged(item, dataSources) {
|
|
|
53
57
|
var el = item._sceneElement;
|
|
54
58
|
var binding = el === null || el === void 0 ? void 0 : el.dataBinding;
|
|
55
59
|
var titleFromElement = (el === null || el === void 0 ? void 0 : el.name) != null && String(el.name).trim() ? String(el.name).trim() : '';
|
|
56
|
-
var kindLabel = item.elementKind === 'roundTable' ?
|
|
60
|
+
var kindLabel = locales.getText(item.elementKind === 'roundTable' ? "".concat(I18N_FIGMA, ".kind-round-table") : "".concat(I18N_FIGMA, ".kind-square-table"));
|
|
57
61
|
var hasDataSource = Boolean((binding === null || binding === void 0 ? void 0 : binding.dataSourceKey) && String(binding.dataSourceKey).trim() !== '');
|
|
58
62
|
var rid = (binding === null || binding === void 0 ? void 0 : binding.recordId) != null ? String(binding.recordId).trim() : '';
|
|
59
63
|
var boundToData = Boolean(hasDataSource && rid !== '');
|
|
@@ -65,7 +69,7 @@ export function getFigmaTableCardFromMerged(item, dataSources) {
|
|
|
65
69
|
if (!hasLiveRow) {
|
|
66
70
|
/** 记录缺失或与「未选数据源」占位同一视觉(虚线 #bfbfbf),便于识别为待处理态 */
|
|
67
71
|
var borderColor = '#bfbfbf';
|
|
68
|
-
var hint = !hasDataSource || !rid ? hasDataSource ?
|
|
72
|
+
var hint = !hasDataSource || !rid ? hasDataSource ? locales.getText("".concat(I18N_CARD, ".hint-select-row")) : locales.getText("".concat(I18N_CARD, ".hint-bind-datasource")) : rid.startsWith('new_') ? locales.getText("".concat(I18N_CARD, ".hint-new-slot")).replace(/\{kind\}/g, kindLabel) : locales.getText("".concat(I18N_CARD, ".hint-row-not-found"));
|
|
69
73
|
return {
|
|
70
74
|
id: item.id,
|
|
71
75
|
isNoDataPlaceholder: true,
|
|
@@ -165,7 +169,7 @@ function TableCardInfoRows(_ref3) {
|
|
|
165
169
|
if (!hasCapacity && !hasArea) return null;
|
|
166
170
|
return /*#__PURE__*/React.createElement(React.Fragment, null, hasCapacity && /*#__PURE__*/React.createElement(FigmaCardRow, {
|
|
167
171
|
icon: /*#__PURE__*/React.createElement(TeamOutlined, null)
|
|
168
|
-
}, /*#__PURE__*/React.createElement("span", null, "
|
|
172
|
+
}, /*#__PURE__*/React.createElement("span", null, locales.getText("".concat(I18N_FIGMA, ".capacity-seats")).replace(/\{n\}/g, String(cardItem.capacity)))), hasArea && /*#__PURE__*/React.createElement(FigmaCardRow, {
|
|
169
173
|
icon: /*#__PURE__*/React.createElement(EnvironmentOutlined, null)
|
|
170
174
|
}, /*#__PURE__*/React.createElement("span", null, cardItem.area)));
|
|
171
175
|
}
|
|
@@ -234,7 +238,7 @@ function TableCardContent(_ref4) {
|
|
|
234
238
|
icon: /*#__PURE__*/React.createElement(ClockCircleOutlined, null)
|
|
235
239
|
}, /*#__PURE__*/React.createElement("span", null, cardItem.reserveTime))), (status === 'dining' || status === 'waiting' || status === 'billed' || status === 'availableSoon') && cardItem.guests != null && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FigmaCardRow, {
|
|
236
240
|
icon: /*#__PURE__*/React.createElement(TeamOutlined, null)
|
|
237
|
-
}, /*#__PURE__*/React.createElement("span", null,
|
|
241
|
+
}, /*#__PURE__*/React.createElement("span", null, locales.getText("".concat(I18N_FIGMA, ".guests-count")).replace(/\{n\}/g, String(cardItem.guests)))), cardItem.dishes && /*#__PURE__*/React.createElement(FigmaCardRow, {
|
|
238
242
|
icon: /*#__PURE__*/React.createElement(AuditOutlined, null)
|
|
239
243
|
}, /*#__PURE__*/React.createElement("span", null, cardItem.dishes)), cardItem.duration && /*#__PURE__*/React.createElement(FigmaCardRow, {
|
|
240
244
|
icon: /*#__PURE__*/React.createElement(FieldTimeOutlined, null)
|
|
@@ -247,7 +251,7 @@ function TableCardContent(_ref4) {
|
|
|
247
251
|
function renderTableKindNoDataPlaceholder(cardItem, shape) {
|
|
248
252
|
var _cardItem$placeholder, _cardItem$placeholder2, _cardItem$placeholder3;
|
|
249
253
|
var borderColor = (_cardItem$placeholder = cardItem.placeholderBorderColor) !== null && _cardItem$placeholder !== void 0 ? _cardItem$placeholder : '#bfbfbf';
|
|
250
|
-
var title = (_cardItem$placeholder2 = cardItem.placeholderTitle) !== null && _cardItem$placeholder2 !== void 0 ? _cardItem$placeholder2 :
|
|
254
|
+
var title = (_cardItem$placeholder2 = cardItem.placeholderTitle) !== null && _cardItem$placeholder2 !== void 0 ? _cardItem$placeholder2 : locales.getText("".concat(I18N_FIGMA, ".default-table"));
|
|
251
255
|
var hint = (_cardItem$placeholder3 = cardItem.placeholderHint) !== null && _cardItem$placeholder3 !== void 0 ? _cardItem$placeholder3 : '';
|
|
252
256
|
return /*#__PURE__*/React.createElement("div", {
|
|
253
257
|
style: {
|
|
@@ -382,7 +386,7 @@ export function renderFigmaStyleRoundTableCard(cardItem) {
|
|
|
382
386
|
style: {
|
|
383
387
|
marginRight: 4
|
|
384
388
|
}
|
|
385
|
-
}), "
|
|
389
|
+
}), locales.getText("".concat(I18N_FIGMA, ".capacity-seats")).replace(/\{n\}/g, String(cardItem.capacity))), cardItem.area != null && cardItem.area !== '' && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(EnvironmentOutlined, {
|
|
386
390
|
style: {
|
|
387
391
|
marginRight: 4
|
|
388
392
|
}
|
|
@@ -406,13 +410,13 @@ export function renderFigmaStyleRoundTableCard(cardItem) {
|
|
|
406
410
|
color: FIGMA.gray700,
|
|
407
411
|
marginTop: 2
|
|
408
412
|
}
|
|
409
|
-
},
|
|
413
|
+
}, locales.getText("".concat(I18N_FIGMA, ".guests-count")).replace(/\{n\}/g, String(cardItem.guests))), (cardItem.capacity != null || cardItem.area != null && cardItem.area !== '') && /*#__PURE__*/React.createElement("div", {
|
|
410
414
|
style: {
|
|
411
415
|
fontSize: 12,
|
|
412
416
|
color: FIGMA.gray700,
|
|
413
417
|
marginTop: 2
|
|
414
418
|
}
|
|
415
|
-
}, cardItem.capacity != null && "
|
|
419
|
+
}, cardItem.capacity != null && locales.getText("".concat(I18N_FIGMA, ".capacity-seats")).replace(/\{n\}/g, String(cardItem.capacity)), cardItem.capacity != null && cardItem.area && ' · ', cardItem.area))));
|
|
416
420
|
}
|
|
417
421
|
|
|
418
422
|
/** 返回用于 renderItemByKind.table 的渲染函数(方桌) */
|
|
@@ -17,8 +17,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
17
17
|
import React, { useState, useCallback, useEffect } from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import { Form, Input, InputNumber, Select, Button } from 'antd';
|
|
20
|
+
import { locales } from '@pisell/utils';
|
|
20
21
|
import "./FloorMapDataForm.less";
|
|
21
22
|
var PREFIX = 'pisell-floor-map-layout';
|
|
23
|
+
var I18N_DF = 'pisell-floor-map-layout.data-form';
|
|
22
24
|
function renderFormControl(col, value) {
|
|
23
25
|
var _col$type, _col$options;
|
|
24
26
|
var type = (_col$type = col.type) !== null && _col$type !== void 0 ? _col$type : 'string';
|
|
@@ -97,7 +99,7 @@ export function FloorMapDataForm(props) {
|
|
|
97
99
|
className: classNames("".concat(PREFIX, "-data-form"), className)
|
|
98
100
|
}, /*#__PURE__*/React.createElement("p", {
|
|
99
101
|
className: "".concat(PREFIX, "-data-form-empty")
|
|
100
|
-
}, "
|
|
102
|
+
}, locales.getText("".concat(I18N_DF, ".empty"))));
|
|
101
103
|
}
|
|
102
104
|
return /*#__PURE__*/React.createElement("div", {
|
|
103
105
|
className: classNames("".concat(PREFIX, "-data-form"), className)
|
|
@@ -126,6 +128,6 @@ export function FloorMapDataForm(props) {
|
|
|
126
128
|
htmlType: "submit",
|
|
127
129
|
loading: saving,
|
|
128
130
|
disabled: !changed
|
|
129
|
-
}, "
|
|
131
|
+
}, locales.getText("".concat(I18N_DF, ".save-record"))))));
|
|
130
132
|
}
|
|
131
133
|
export default FloorMapDataForm;
|
|
@@ -92,7 +92,7 @@ export function FloorMapEditTopBar(props) {
|
|
|
92
92
|
}, /*#__PURE__*/React.createElement(FullscreenOutlined, null)) : null) : null);
|
|
93
93
|
}
|
|
94
94
|
return /*#__PURE__*/React.createElement("div", {
|
|
95
|
-
className: classNames("".concat(PREFIX, "-edit-top-bar"), className),
|
|
95
|
+
className: classNames("".concat(PREFIX, "-edit-top-bar"), "".concat(PREFIX, "-edit-top-bar--full-chrome"), className),
|
|
96
96
|
role: "toolbar",
|
|
97
97
|
"aria-label": topBarLabels.aria
|
|
98
98
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -129,12 +129,13 @@
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
|
-
* 只读顶栏(`edit-top-bar` + `read-canvas-tabs-bar`
|
|
133
|
-
*
|
|
132
|
+
* 只读顶栏(`edit-top-bar` + `read-canvas-tabs-bar` 并列)、编辑态 compact、
|
|
133
|
+
* 以及全屏/locked 时的 full 顶栏:与左侧 Tab 同一浅灰底,去掉右侧大块白底与竖线分割。
|
|
134
134
|
*/
|
|
135
135
|
|
|
136
136
|
&.pisell-floor-map-layout-read-canvas-tabs-bar,
|
|
137
|
-
&--compact
|
|
137
|
+
&--compact,
|
|
138
|
+
&--full-chrome {
|
|
138
139
|
background: rgba(0, 0, 0, 0.04);
|
|
139
140
|
|
|
140
141
|
.pisell-floor-map-layout-edit-top-bar-actions {
|
|
@@ -8,7 +8,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
8
8
|
* 平面图「图片图元」内层展示:支持 URL、object-fit 铺满;无地址或加载失败时占位
|
|
9
9
|
*/
|
|
10
10
|
import React, { useEffect, useState } from 'react';
|
|
11
|
+
import { locales } from '@pisell/utils';
|
|
11
12
|
var PREFIX = 'pisell-floor-map-layout';
|
|
13
|
+
var I18N_IMG = 'pisell-floor-map-layout.image-element';
|
|
12
14
|
export function FloorMapImageElement(props) {
|
|
13
15
|
var imageUrl = props.imageUrl,
|
|
14
16
|
name = props.name;
|
|
@@ -20,7 +22,7 @@ export function FloorMapImageElement(props) {
|
|
|
20
22
|
useEffect(function () {
|
|
21
23
|
setBroken(false);
|
|
22
24
|
}, [trimmed]);
|
|
23
|
-
var label = name != null && String(name).trim() ? String(name).trim() :
|
|
25
|
+
var label = name != null && String(name).trim() ? String(name).trim() : locales.getText("".concat(I18N_IMG, ".default-name"));
|
|
24
26
|
if (!trimmed || broken) {
|
|
25
27
|
return /*#__PURE__*/React.createElement("div", {
|
|
26
28
|
className: "".concat(PREFIX, "-image-element-placeholder"),
|
|
@@ -48,7 +50,7 @@ export function FloorMapImageElement(props) {
|
|
|
48
50
|
color: '#595959',
|
|
49
51
|
marginBottom: 4
|
|
50
52
|
}
|
|
51
|
-
}, label), /*#__PURE__*/React.createElement("span", null, !trimmed ?
|
|
53
|
+
}, label), /*#__PURE__*/React.createElement("span", null, !trimmed ? locales.getText("".concat(I18N_IMG, ".hint-no-url")) : locales.getText("".concat(I18N_IMG, ".hint-load-fail"))));
|
|
52
54
|
}
|
|
53
55
|
return /*#__PURE__*/React.createElement("img", {
|
|
54
56
|
src: trimmed,
|
|
@@ -21,8 +21,11 @@ import { FLOOR_MAP_IMAGE_ELEMENT_KIND, FLOOR_MAP_STAGE_ELEMENT_KIND } from "../t
|
|
|
21
21
|
import { resolveDataBindingPolicy } from "../utils/floorMapElementKindUtils";
|
|
22
22
|
import { FLOOR_MAP_PALETTE_DRAG_MIME } from "../utils/floorMapDropUtils";
|
|
23
23
|
import { formatDataRecordOptionLabel } from "../utils/floorMapDataRecordLabel";
|
|
24
|
+
import { locales } from '@pisell/utils';
|
|
24
25
|
import "./FloorMapToolbar.less";
|
|
25
26
|
var PREFIX = 'pisell-floor-map-layout';
|
|
27
|
+
var I18N_TB = 'pisell-floor-map-layout.toolbar';
|
|
28
|
+
var I18N_EP_DS = 'pisell-floor-map-layout.edit-panel.ph-data-source';
|
|
26
29
|
var DEFAULT_PLACEMENT_SIZE = {
|
|
27
30
|
width: 180,
|
|
28
31
|
height: 120
|
|
@@ -115,7 +118,7 @@ export function FloorMapToolbar(props) {
|
|
|
115
118
|
});
|
|
116
119
|
return sorted.length ? sorted : [{
|
|
117
120
|
id: '_uncat',
|
|
118
|
-
label:
|
|
121
|
+
label: locales.getText("".concat(I18N_TB, ".category-fallback")),
|
|
119
122
|
order: 0
|
|
120
123
|
}];
|
|
121
124
|
}, [config.elementKindCategories]);
|
|
@@ -233,7 +236,7 @@ export function FloorMapToolbar(props) {
|
|
|
233
236
|
e.dataTransfer.setData(FLOOR_MAP_PALETTE_DRAG_MIME, JSON.stringify(paletteDragPayload));
|
|
234
237
|
e.dataTransfer.effectAllowed = 'copy';
|
|
235
238
|
},
|
|
236
|
-
title: "
|
|
239
|
+
title: locales.getText("".concat(I18N_TB, ".palette-card-title")).replace(/\{name\}/g, k.label)
|
|
237
240
|
}, /*#__PURE__*/React.createElement("div", {
|
|
238
241
|
className: "".concat(PREFIX, "-toolbar-preview-cell"),
|
|
239
242
|
style: {
|
|
@@ -261,8 +264,8 @@ export function FloorMapToolbar(props) {
|
|
|
261
264
|
className: "".concat(PREFIX, "-toolbar-record-pick")
|
|
262
265
|
}, /*#__PURE__*/React.createElement("div", {
|
|
263
266
|
className: "".concat(PREFIX, "-toolbar-record-pick-label")
|
|
264
|
-
}, "
|
|
265
|
-
placeholder:
|
|
267
|
+
}, locales.getText("".concat(I18N_TB, ".data-binding-optional"))), /*#__PURE__*/React.createElement(Select, {
|
|
268
|
+
placeholder: locales.getText(I18N_EP_DS),
|
|
266
269
|
allowClear: true,
|
|
267
270
|
value: placeMode.type === 'scene' ? placeMode.dataSourceKey : undefined,
|
|
268
271
|
options: allowedKeys.map(function (key) {
|
|
@@ -285,18 +288,18 @@ export function FloorMapToolbar(props) {
|
|
|
285
288
|
if (!key) {
|
|
286
289
|
return /*#__PURE__*/React.createElement("div", {
|
|
287
290
|
className: "".concat(PREFIX, "-toolbar-record-pick-hint")
|
|
288
|
-
}, "
|
|
291
|
+
}, locales.getText("".concat(I18N_TB, ".hint-after-select-ds")));
|
|
289
292
|
}
|
|
290
293
|
var unplaced = getUnplacedRecordsForKey(key, dataSources, sceneElements);
|
|
291
294
|
if (unplaced.length === 0) {
|
|
292
295
|
return /*#__PURE__*/React.createElement("div", {
|
|
293
296
|
className: "".concat(PREFIX, "-toolbar-record-pick-hint")
|
|
294
|
-
}, "
|
|
297
|
+
}, locales.getText("".concat(I18N_TB, ".hint-no-unplaced-rows")));
|
|
295
298
|
}
|
|
296
299
|
var recordValue = mode !== null && mode !== void 0 && mode.recordIds && mode.recordIds.length > 0 ? mode.recordIds : mode !== null && mode !== void 0 && mode.recordId ? [mode.recordId] : undefined;
|
|
297
300
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
|
|
298
301
|
mode: "multiple",
|
|
299
|
-
placeholder: "
|
|
302
|
+
placeholder: locales.getText("".concat(I18N_TB, ".ph-select-records")),
|
|
300
303
|
allowClear: true,
|
|
301
304
|
maxTagCount: "responsive",
|
|
302
305
|
value: recordValue,
|
|
@@ -316,18 +319,18 @@ export function FloorMapToolbar(props) {
|
|
|
316
319
|
}
|
|
317
320
|
}), /*#__PURE__*/React.createElement("div", {
|
|
318
321
|
className: "".concat(PREFIX, "-toolbar-record-pick-hint")
|
|
319
|
-
}, "
|
|
322
|
+
}, locales.getText("".concat(I18N_TB, ".hint-multi-drop"))));
|
|
320
323
|
}()), allowedKeys.length === 0 && /*#__PURE__*/React.createElement("div", {
|
|
321
324
|
className: "".concat(PREFIX, "-toolbar-record-hint")
|
|
322
|
-
}, "
|
|
325
|
+
}, locales.getText("".concat(I18N_TB, ".no-data-sources"))), /*#__PURE__*/React.createElement("button", {
|
|
323
326
|
type: "button",
|
|
324
327
|
className: "".concat(PREFIX, "-toolbar-btn cancel-inline"),
|
|
325
328
|
onClick: cancelPlaceMode
|
|
326
|
-
}, "
|
|
329
|
+
}, locales.getText("".concat(I18N_TB, ".cancel-place")))), isActive && policy === 'none' && /*#__PURE__*/React.createElement("button", {
|
|
327
330
|
type: "button",
|
|
328
331
|
className: "".concat(PREFIX, "-toolbar-btn cancel-inline"),
|
|
329
332
|
onClick: cancelPlaceMode
|
|
330
|
-
}, "
|
|
333
|
+
}, locales.getText("".concat(I18N_TB, ".cancel-place"))));
|
|
331
334
|
};
|
|
332
335
|
return /*#__PURE__*/React.createElement("div", {
|
|
333
336
|
className: classNames("".concat(PREFIX, "-toolbar"), "".concat(PREFIX, "-toolbar-sidebar"), className)
|
|
@@ -354,13 +357,13 @@ export function FloorMapToolbar(props) {
|
|
|
354
357
|
}, layoutDirty ? /*#__PURE__*/React.createElement("span", {
|
|
355
358
|
className: "".concat(PREFIX, "-toolbar-dirty-hint"),
|
|
356
359
|
role: "status"
|
|
357
|
-
}, "
|
|
360
|
+
}, locales.getText("".concat(I18N_TB, ".layout-dirty-hint"))) : null, saveError && /*#__PURE__*/React.createElement("span", {
|
|
358
361
|
className: "".concat(PREFIX, "-toolbar-error")
|
|
359
362
|
}, typeof saveError === 'string' ? saveError : saveError === null || saveError === void 0 ? void 0 : saveError.message), /*#__PURE__*/React.createElement("button", {
|
|
360
363
|
type: "button",
|
|
361
364
|
className: classNames("".concat(PREFIX, "-toolbar-btn"), 'primary', _defineProperty({}, "".concat(PREFIX, "-toolbar-save-dirty"), layoutDirty)),
|
|
362
365
|
disabled: saving,
|
|
363
366
|
onClick: onSave
|
|
364
|
-
}, saving ?
|
|
367
|
+
}, saving ? locales.getText("".concat(I18N_TB, ".saving")) : locales.getText("".concat(I18N_TB, ".save")))));
|
|
365
368
|
}
|
|
366
369
|
export default FloorMapToolbar;
|
|
@@ -8,8 +8,10 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
import { MinusOutlined, PlusOutlined, FullscreenOutlined, FullscreenExitOutlined, BorderInnerOutlined } from '@ant-design/icons';
|
|
11
|
+
import { locales } from '@pisell/utils';
|
|
11
12
|
import "./ViewControls.less";
|
|
12
13
|
var PREFIX = 'pisell-floor-map-layout';
|
|
14
|
+
var I18N_VC = 'pisell-floor-map-layout.view-controls';
|
|
13
15
|
|
|
14
16
|
/** 从 react-zoom-pan-pinch 拿到的控制 API(由主组件传入) */
|
|
15
17
|
|
|
@@ -42,7 +44,7 @@ export function ViewControls(props) {
|
|
|
42
44
|
onClick: function onClick() {
|
|
43
45
|
return api.zoomOut();
|
|
44
46
|
},
|
|
45
|
-
"aria-label": "
|
|
47
|
+
"aria-label": locales.getText("".concat(I18N_VC, ".zoom-out-aria"))
|
|
46
48
|
}, /*#__PURE__*/React.createElement(MinusOutlined, null)), /*#__PURE__*/React.createElement("span", {
|
|
47
49
|
className: "".concat(PREFIX, "-view-controls-zoom-stepper-value")
|
|
48
50
|
}, scalePercent, "%"), /*#__PURE__*/React.createElement("button", {
|
|
@@ -51,7 +53,7 @@ export function ViewControls(props) {
|
|
|
51
53
|
onClick: function onClick() {
|
|
52
54
|
return api.zoomIn();
|
|
53
55
|
},
|
|
54
|
-
"aria-label": "
|
|
56
|
+
"aria-label": locales.getText("".concat(I18N_VC, ".zoom-in-aria"))
|
|
55
57
|
}, /*#__PURE__*/React.createElement(PlusOutlined, null))), showToolsCapsule && /*#__PURE__*/React.createElement("div", {
|
|
56
58
|
className: "".concat(PREFIX, "-view-controls-tools-capsule")
|
|
57
59
|
}, showReset && /*#__PURE__*/React.createElement("button", {
|
|
@@ -60,14 +62,14 @@ export function ViewControls(props) {
|
|
|
60
62
|
onClick: function onClick() {
|
|
61
63
|
return api.resetTransform();
|
|
62
64
|
},
|
|
63
|
-
"aria-label": "
|
|
65
|
+
"aria-label": locales.getText("".concat(I18N_VC, ".reset-aria"))
|
|
64
66
|
}, "\u27F2"), showFitBounds && api.fitBounds && /*#__PURE__*/React.createElement("button", {
|
|
65
67
|
type: "button",
|
|
66
68
|
className: "".concat(PREFIX, "-view-controls-tool-btn"),
|
|
67
69
|
onClick: function onClick() {
|
|
68
70
|
return api.fitBounds();
|
|
69
71
|
},
|
|
70
|
-
"aria-label": "
|
|
72
|
+
"aria-label": locales.getText("".concat(I18N_VC, ".fit-bounds-aria"))
|
|
71
73
|
}, "\u229E"), showGridToggle && /*#__PURE__*/React.createElement("button", {
|
|
72
74
|
type: "button",
|
|
73
75
|
className: classNames("".concat(PREFIX, "-view-controls-tool-btn"), _defineProperty({}, "".concat(PREFIX, "-view-controls-tool-btn--active"), mapGridVisible)),
|
|
@@ -75,14 +77,14 @@ export function ViewControls(props) {
|
|
|
75
77
|
return onToggleMapGrid();
|
|
76
78
|
},
|
|
77
79
|
"aria-pressed": mapGridVisible,
|
|
78
|
-
"aria-label": mapGridVisible ?
|
|
80
|
+
"aria-label": locales.getText(mapGridVisible ? "".concat(I18N_VC, ".grid-hide-aria") : "".concat(I18N_VC, ".grid-show-aria"))
|
|
79
81
|
}, /*#__PURE__*/React.createElement(BorderInnerOutlined, null)), showFullscreen && api.toggleFullscreen && /*#__PURE__*/React.createElement("button", {
|
|
80
82
|
type: "button",
|
|
81
83
|
className: "".concat(PREFIX, "-view-controls-tool-btn"),
|
|
82
84
|
onClick: function onClick() {
|
|
83
85
|
return api.toggleFullscreen();
|
|
84
86
|
},
|
|
85
|
-
"aria-label": isFullscreen ?
|
|
87
|
+
"aria-label": locales.getText(isFullscreen ? "".concat(I18N_VC, ".fullscreen-exit-aria") : "".concat(I18N_VC, ".fullscreen-aria"))
|
|
86
88
|
}, isFullscreen ? /*#__PURE__*/React.createElement(FullscreenExitOutlined, null) : /*#__PURE__*/React.createElement(FullscreenOutlined, null))));
|
|
87
89
|
}
|
|
88
90
|
export default ViewControls;
|
|
@@ -36,6 +36,7 @@ var IMAGE_PLACE_DEFAULT = {
|
|
|
36
36
|
width: 400,
|
|
37
37
|
height: 240
|
|
38
38
|
};
|
|
39
|
+
var I18N_PLACEMENT_FALLBACK_IMAGE = 'pisell-floor-map-layout.placement.fallback-image-name';
|
|
39
40
|
var GRID_VIS_STORAGE_PREFIX = 'pisell-floor-map-layout.grid-visible';
|
|
40
41
|
function getGridVisStorageKey(canvasId) {
|
|
41
42
|
return "".concat(GRID_VIS_STORAGE_PREFIX, ":").concat(canvasId);
|
|
@@ -411,7 +412,7 @@ export function useFloorMapEditState(params) {
|
|
|
411
412
|
}
|
|
412
413
|
var placementName = function (_kindConfig$defaultPr, _kindConfig$defaultPr2) {
|
|
413
414
|
if (isStage) return STAGE_DECO_DEFAULT.name;
|
|
414
|
-
if (isImage) return
|
|
415
|
+
if (isImage) return locales.getText(I18N_PLACEMENT_FALLBACK_IMAGE);
|
|
415
416
|
var db = dataBinding;
|
|
416
417
|
var rid = recordIdsToPlace[0];
|
|
417
418
|
if (db && rid) {
|