@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.
Files changed (205) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +13 -13
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +13 -13
  11. package/es/components/PisellCards/index.d.ts +1 -0
  12. package/es/components/PisellFields/index.d.ts +1 -0
  13. package/es/components/PisellLayouts/index.d.ts +1 -0
  14. package/es/components/PisellMetrics/index.d.ts +1 -0
  15. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
  16. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
  17. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
  18. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
  19. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
  20. package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -1
  21. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  22. package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +2 -1
  23. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  24. package/es/components/dataSourceComponents/fields/index.d.ts +16 -15
  25. package/es/components/date-picker/index.d.ts +1 -0
  26. package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
  27. package/es/components/pisellFloorMapLayout/components/FigmaTableCard.js +12 -8
  28. package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.js +4 -2
  29. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +1 -1
  30. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +4 -3
  31. package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.js +4 -2
  32. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +16 -13
  33. package/es/components/pisellFloorMapLayout/components/ViewControls.js +8 -6
  34. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +2 -1
  35. package/es/components/pisellFloorMapLayout/locales-ja.d.ts +104 -0
  36. package/es/components/pisellFloorMapLayout/locales-ja.js +103 -0
  37. package/es/components/pisellFloorMapLayout/locales-pt.d.ts +104 -0
  38. package/es/components/pisellFloorMapLayout/locales-pt.js +103 -0
  39. package/es/components/pisellFloorMapLayout/locales.d.ts +314 -0
  40. package/es/components/pisellFloorMapLayout/locales.js +123 -4
  41. package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +2 -3
  42. package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +3 -12
  43. package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +4 -3
  44. package/es/components/pisellModal/components/index.d.ts +1 -0
  45. package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +3 -2
  46. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  47. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  48. package/es/components/table/Table/fields/date/index.d.ts +1 -0
  49. package/es/components/table/Table/fields/index.d.ts +3 -2
  50. package/es/components/table/Table/fields/link/index.d.ts +1 -0
  51. package/es/components/table/Table/fields/number/index.d.ts +1 -0
  52. package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
  53. package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
  54. package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
  55. package/es/components/table/Table/fields/search/index.d.ts +1 -0
  56. package/es/components/table/Table/fields/select/index.d.ts +1 -0
  57. package/es/components/table/Table/fields/text/index.d.ts +1 -0
  58. package/es/components/table/Table/fields/treeSelect/index.d.ts +1 -0
  59. package/es/components/table/Table/utils.d.ts +1 -1
  60. package/es/hooks/useResponsive.d.ts +1 -1
  61. package/es/locales/en-US.d.ts +1 -0
  62. package/es/locales/en-US.js +1 -0
  63. package/es/locales/ja.d.ts +8 -0
  64. package/es/locales/ja.js +25 -7
  65. package/es/locales/pt.d.ts +8 -0
  66. package/es/locales/pt.js +21 -3
  67. package/es/locales/zh-CN.d.ts +1 -0
  68. package/es/locales/zh-CN.js +1 -0
  69. package/es/locales/zh-TW.d.ts +1 -0
  70. package/es/locales/zh-TW.js +1 -0
  71. package/lib/components/PisellCards/index.d.ts +1 -0
  72. package/lib/components/PisellFields/index.d.ts +1 -0
  73. package/lib/components/PisellLayouts/index.d.ts +1 -0
  74. package/lib/components/PisellMetrics/index.d.ts +1 -0
  75. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
  76. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
  77. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
  78. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
  79. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
  80. package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -1
  81. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  82. package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +2 -1
  83. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  84. package/lib/components/dataSourceComponents/fields/index.d.ts +16 -15
  85. package/lib/components/date-picker/index.d.ts +1 -0
  86. package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
  87. package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.js +13 -9
  88. package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.js +4 -2
  89. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +5 -1
  90. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +4 -3
  91. package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.js +4 -2
  92. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +24 -13
  93. package/lib/components/pisellFloorMapLayout/components/ViewControls.js +12 -6
  94. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +2 -1
  95. package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +104 -0
  96. package/lib/components/pisellFloorMapLayout/locales-ja.js +124 -0
  97. package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +104 -0
  98. package/lib/components/pisellFloorMapLayout/locales-pt.js +124 -0
  99. package/lib/components/pisellFloorMapLayout/locales.d.ts +314 -0
  100. package/lib/components/pisellFloorMapLayout/locales.js +132 -4
  101. package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +2 -3
  102. package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +1 -7
  103. package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +6 -3
  104. package/lib/components/pisellModal/components/index.d.ts +1 -0
  105. package/lib/components/pisellRecordBoard/utils/recordBoardColumns.js +11 -1
  106. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  107. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  108. package/lib/components/table/Table/fields/date/index.d.ts +1 -0
  109. package/lib/components/table/Table/fields/index.d.ts +3 -2
  110. package/lib/components/table/Table/fields/link/index.d.ts +1 -0
  111. package/lib/components/table/Table/fields/number/index.d.ts +1 -0
  112. package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
  113. package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
  114. package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
  115. package/lib/components/table/Table/fields/search/index.d.ts +1 -0
  116. package/lib/components/table/Table/fields/select/index.d.ts +1 -0
  117. package/lib/components/table/Table/fields/text/index.d.ts +1 -0
  118. package/lib/components/table/Table/fields/treeSelect/index.d.ts +1 -0
  119. package/lib/components/table/Table/utils.d.ts +1 -1
  120. package/lib/hooks/useResponsive.d.ts +1 -1
  121. package/lib/locales/en-US.d.ts +1 -0
  122. package/lib/locales/en-US.js +1 -0
  123. package/lib/locales/ja.d.ts +8 -0
  124. package/lib/locales/ja.js +22 -1
  125. package/lib/locales/pt.d.ts +8 -0
  126. package/lib/locales/pt.js +22 -1
  127. package/lib/locales/zh-CN.d.ts +1 -0
  128. package/lib/locales/zh-CN.js +1 -0
  129. package/lib/locales/zh-TW.d.ts +1 -0
  130. package/lib/locales/zh-TW.js +1 -0
  131. package/package.json +3 -3
  132. package/es/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
  133. package/es/components/PisellCards/components/TextCard/TextCard.d.ts +0 -8
  134. package/es/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
  135. package/es/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
  136. package/es/components/PisellCards/components/TextCard/types.d.ts +0 -270
  137. package/es/components/PisellSteps/PisellSteps.d.ts +0 -14
  138. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -4
  139. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
  140. package/es/components/drag-sort-tree/index.d.ts +0 -5
  141. package/es/components/iconfont/index.d.ts +0 -8
  142. package/es/components/login-and-register/index.d.ts +0 -82
  143. package/es/components/pisell-config-provider/index.d.ts +0 -13
  144. package/es/components/pisellEmpty/index.d.ts +0 -19
  145. package/es/components/pisellFloorMapLayout/components/ItemLayer.d.ts +0 -48
  146. package/es/components/pisellGridPro/index.d.ts +0 -4
  147. package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +0 -10
  148. package/es/components/pisellHierarchicalSummaryList/components/index.d.ts +0 -1
  149. package/es/components/pisellHierarchicalSummaryList/hooks/index.d.ts +0 -2
  150. package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +0 -15
  151. package/es/components/pisellHierarchicalSummaryList/index.d.ts +0 -5
  152. package/es/components/pisellHierarchicalSummaryList/types.d.ts +0 -248
  153. package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
  154. package/es/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +0 -14
  155. package/es/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +0 -14
  156. package/es/components/pisellTimeNavigator/hooks/useRealtime.d.ts +0 -5
  157. package/es/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +0 -27
  158. package/es/components/pisellTimeNavigator/types.d.ts +0 -160
  159. package/es/components/pisellTimeNavigator/utils/index.d.ts +0 -30
  160. package/es/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
  161. package/es/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
  162. package/es/components/productCard/cartSkuCard/locales.d.ts +0 -178
  163. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
  164. package/es/components/productCard/status.d.ts +0 -32
  165. package/es/components/productCard/types.d.ts +0 -95
  166. package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -9
  167. package/es/components/table/types.d.ts +0 -268
  168. package/es/components/versionModal/index.d.ts +0 -23
  169. package/lib/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
  170. package/lib/components/PisellCards/components/TextCard/TextCard.d.ts +0 -8
  171. package/lib/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
  172. package/lib/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
  173. package/lib/components/PisellCards/components/TextCard/types.d.ts +0 -270
  174. package/lib/components/PisellSteps/PisellSteps.d.ts +0 -14
  175. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -4
  176. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
  177. package/lib/components/drag-sort-tree/index.d.ts +0 -5
  178. package/lib/components/iconfont/index.d.ts +0 -8
  179. package/lib/components/login-and-register/index.d.ts +0 -82
  180. package/lib/components/pisell-config-provider/index.d.ts +0 -13
  181. package/lib/components/pisellEmpty/index.d.ts +0 -19
  182. package/lib/components/pisellFloorMapLayout/components/ItemLayer.d.ts +0 -48
  183. package/lib/components/pisellGridPro/index.d.ts +0 -4
  184. package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +0 -10
  185. package/lib/components/pisellHierarchicalSummaryList/components/index.d.ts +0 -1
  186. package/lib/components/pisellHierarchicalSummaryList/hooks/index.d.ts +0 -2
  187. package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +0 -15
  188. package/lib/components/pisellHierarchicalSummaryList/index.d.ts +0 -5
  189. package/lib/components/pisellHierarchicalSummaryList/types.d.ts +0 -248
  190. package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
  191. package/lib/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +0 -14
  192. package/lib/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +0 -14
  193. package/lib/components/pisellTimeNavigator/hooks/useRealtime.d.ts +0 -5
  194. package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +0 -27
  195. package/lib/components/pisellTimeNavigator/types.d.ts +0 -160
  196. package/lib/components/pisellTimeNavigator/utils/index.d.ts +0 -30
  197. package/lib/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
  198. package/lib/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
  199. package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -178
  200. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
  201. package/lib/components/productCard/status.d.ts +0 -32
  202. package/lib/components/productCard/types.d.ts +0 -95
  203. package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -9
  204. package/lib/components/table/types.d.ts +0 -268
  205. package/lib/components/versionModal/index.d.ts +0 -23
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const PisellCards: {
2
3
  TabCard: (props: any) => import("react").JSX.Element;
3
4
  TextCard: (props: any) => import("react").JSX.Element;
@@ -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?: "default" | "custom" | "api" | undefined;
47
+ optionSourceType?: "custom" | "default" | "api" | undefined;
48
48
  labelField: string;
49
49
  valueField: string;
50
50
  extraParams?: Record<string, any> | undefined;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const DataSourceQRCode: (props: any) => import("react").JSX.Element;
2
3
  export default DataSourceQRCode;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const useDataSourceKey: () => {
2
3
  dataSourceKey: string | undefined;
3
4
  dataSourceKeyRef: import("react").MutableRefObject<string | 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: "button" | "link";
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" | "middle" | "large";
75
+ openContentSize: "small" | "large" | "middle";
76
76
  openTitle: string;
77
77
  key: string;
78
78
  } | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DataSourceTableProps } from '../type';
2
3
  declare type Params = {
3
4
  pagination?: {
@@ -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?: "default" | "custom" | "api" | undefined;
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?: "default" | "custom" | "api" | undefined;
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?: "default" | "custom" | "api" | undefined;
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) => 2000 | 1000 | 4000 | 8000;
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?: "default" | "custom" | "api" | undefined;
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?: "default" | "custom" | "api" | undefined;
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?: "default" | "custom" | "api" | undefined;
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("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
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("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
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?: "default" | "custom" | "api" | undefined;
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("./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 & {
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?: "default" | "custom" | "api" | undefined;
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?: "default" | "custom" | "api" | undefined;
134
+ optionSourceType?: "custom" | "default" | "api" | undefined;
134
135
  labelField: string;
135
136
  valueField: string;
136
137
  extraParams?: Record<string, any> | undefined;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const DatePicker: (props: any) => import("react").JSX.Element;
2
3
  export default DatePicker;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const useDataSourceKey: () => {
2
3
  dataSourceKey: string | undefined;
3
4
  dataSourceKeyRef: import("react").MutableRefObject<string | 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 ? '已选择数据源,请在侧栏选择数据行' : '未绑定数据行:请在侧栏选择数据源与记录' : rid.startsWith('new_') ? "\u65B0".concat(kindLabel, "\u5360\u4F4D\uFF0C\u53EF\u5728\u4FA7\u680F\u7ED1\u5B9A\u5177\u4F53\u8BB0\u5F55") : '未找到对应记录:请检查绑定或数据列表';
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, "\u53EF\u5750 ", cardItem.capacity, " \u4EBA")), hasArea && /*#__PURE__*/React.createElement(FigmaCardRow, {
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, cardItem.guests, " \u4EBA")), cardItem.dishes && /*#__PURE__*/React.createElement(FigmaCardRow, {
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
- }), "\u53EF\u5750 ", cardItem.capacity, " \u4EBA"), cardItem.area != null && cardItem.area !== '' && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(EnvironmentOutlined, {
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
- }, cardItem.guests, " \u4EBA"), (cardItem.capacity != null || cardItem.area != null && cardItem.area !== '') && /*#__PURE__*/React.createElement("div", {
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 && "\u53EF\u5750 ".concat(cardItem.capacity, " \u4EBA"), cardItem.capacity != null && cardItem.area && ' · ', cardItem.area))));
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
- }, "\u65E0\u989D\u5916\u5B57\u6BB5\u53EF\u7F16\u8F91"));
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
- }, "\u4FDD\u5B58\u8BB0\u5F55"))));
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` 并列)与编辑态 compact
133
- * 与左侧 Tab 同一浅灰底,去掉右侧白底与竖线分割。
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: "\u70B9\u51FB\u540E\u753B\u5E03\u843D\u70B9\uFF0C\u6216\u62D6\u62FD\u5230\u753B\u5E03\u751F\u6210\u300C".concat(k.label, "\u300D")
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
- }, "\u6570\u636E\u7ED1\u5B9A\uFF08\u53EF\u9009\uFF09"), /*#__PURE__*/React.createElement(Select, {
265
- placeholder: "\u9009\u62E9\u6570\u636E\u6E90",
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
- }, "\u9009\u62E9\u6570\u636E\u6E90\u540E\u53EF\u9009\u7ED1\u5B9A\u6570\u636E\u884C\uFF0C\u6216\u76F4\u63A5\u843D\u70B9\u5360\u4F4D\u3002");
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
- }, "\u5F53\u524D\u6570\u636E\u6E90\u65E0\u672A\u7ED1\u5B9A\u8BB0\u5F55\uFF0C\u6216\u5217\u8868\u4E3A\u7A7A\uFF1B\u53EF\u76F4\u63A5\u5728\u753B\u5E03\u843D\u70B9\u5360\u4F4D\u3002");
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: "\u9009\u62E9\u8981\u5C55\u793A\u7684\u8BB0\u5F55\uFF08\u53EF\u9009\uFF0C\u53EF\u591A\u9009\uFF09",
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
- }, "\u53EF\u9009\u591A\u6761\uFF0C\u5728\u753B\u5E03\u70B9\u51FB\u4E00\u6B21\u5C06\u6309\u9636\u68AF\u504F\u79FB\u843D\u591A\u6761\uFF1B\u7559\u7A7A\u5219\u5148\u5360\u4F4D\uFF0C\u7A0D\u540E\u5728\u4FA7\u680F\u7ED1\u5B9A\u3002"));
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
- }, "\u65E0\u53EF\u7528\u6570\u636E\u6E90"), /*#__PURE__*/React.createElement("button", {
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
- }, "\u53D6\u6D88\u65B0\u5EFA")), isActive && policy === 'none' && /*#__PURE__*/React.createElement("button", {
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
- }, "\u53D6\u6D88\u65B0\u5EFA"));
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
- }, "\u5E03\u5C40\u5DF2\u4FEE\u6539\uFF0C\u8BF7\u70B9\u51FB\u300C\u4FDD\u5B58\u300D\u6301\u4E45\u5316\u3002") : null, saveError && /*#__PURE__*/React.createElement("span", {
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": "\u7F29\u5C0F"
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": "\u653E\u5927"
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": "\u590D\u4F4D"
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": "\u533A\u57DF\u5B9A\u4F4D"
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) {