@pisell/materials 3.3.41 → 3.3.43

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 (132) 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 +146 -146
  7. package/build/lowcode/render/default/view.js +24 -24
  8. package/build/lowcode/view.js +30 -30
  9. package/dist/umd/materials.min.css +1 -0
  10. package/dist/umd/materials.min.js +1 -0
  11. package/dist/umd/static/DotsSix.57d66266.svg +1 -0
  12. package/dist/umd/static/arrow-left.e542294f.svg +1 -0
  13. package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
  14. package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
  15. package/dist/umd/static/help-circle.31c9be40.svg +1 -0
  16. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
  17. package/es/components/DragSortList/index.js +6 -6
  18. package/es/components/appVersionControl/index.d.ts +4 -0
  19. package/es/components/classicLayout/index.js +5 -4
  20. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
  21. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
  22. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  23. package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
  24. package/es/components/date-picker/index.d.ts +0 -1
  25. package/es/components/drag-sort-tree/index.d.ts +4 -0
  26. package/es/components/icon/index.js +5 -5
  27. package/es/components/list/index.js +6 -6
  28. package/es/components/page/index.d.ts +0 -1
  29. package/es/components/pisell-config-provider/index.d.ts +12 -0
  30. package/es/components/pisellAdjustPrice/index.d.ts +9 -0
  31. package/es/components/pisellEmpty/index.d.ts +19 -0
  32. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  33. package/es/components/productCard/components/Warning/index.d.ts +7 -0
  34. package/es/components/productCard/components/Warning/index.js +48 -0
  35. package/es/components/productCard/index.js +8 -8
  36. package/es/components/productCard/locales.d.ts +84 -0
  37. package/es/components/productCard/locales.js +6 -3
  38. package/es/components/productCard/status.d.ts +32 -0
  39. package/es/components/productCard/status.js +3 -1
  40. package/es/components/productCard/types.d.ts +84 -0
  41. package/es/components/qrcode/index.js +1 -1
  42. package/es/components/sort/components/InlineMenu/index.js +1 -1
  43. package/es/components/table/Actions/component/ButtonIcon/index.js +5 -5
  44. package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  45. package/es/components/table/Actions/component/ViewMode/index.js +1 -1
  46. package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.js +5 -4
  47. package/es/components/table/Header/Buttons/index.js +5 -5
  48. package/es/components/table/Table/AddFieldModal/index.js +6 -6
  49. package/es/components/table/Table/SelectField/index.js +4 -4
  50. package/es/components/table/Table/fields/date/Edit/index.js +1 -1
  51. package/es/components/table/Table/fields/link/Edit/index.js +5 -5
  52. package/es/components/table/Table/fields/rangePicker/filterUtil/index.js +1 -1
  53. package/es/components/table/Table/fields/search/filterUtil/index.js +1 -0
  54. package/es/components/table/Table/fields/text/Show/index.js +4 -4
  55. package/es/components/table/Table/fields/text/filterUtil/index.js +1 -0
  56. package/es/components/table/Table/index.d.ts +4 -0
  57. package/es/components/table/Table/tableConfig/SortRow/index.js +2 -2
  58. package/es/components/table/Table/tableConfig/body/CellContent/index.js +3 -3
  59. package/es/components/table/Table/tableConfig/body/CellProvider/index.js +8 -8
  60. package/es/components/table/Table/utils.d.ts +1 -1
  61. package/es/components/table/hooks/useMergeColumnSetting.js +2 -1
  62. package/es/components/table/hooks/useTransDataSourceGroupSetting.js +5 -5
  63. package/es/components/table/hooks/useTransFilterSetting.js +5 -5
  64. package/es/components/table/types.d.ts +251 -0
  65. package/es/components/translation/utils.js +5 -5
  66. package/es/components/versionModal/index.d.ts +23 -0
  67. package/es/components/virtual-keyboard/Amount/index.d.ts +22 -0
  68. package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
  69. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +11 -0
  70. package/es/hooks/useResponsive.js +2 -2
  71. package/es/utils/hoc.js +1 -1
  72. package/es/utils/miniRedux.js +9 -8
  73. package/lib/components/appVersionControl/index.d.ts +4 -0
  74. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
  75. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
  76. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  77. package/lib/components/dataSourceComponents/fields/index.d.ts +6 -6
  78. package/lib/components/date-picker/index.d.ts +0 -1
  79. package/lib/components/drag-sort-tree/index.d.ts +4 -0
  80. package/lib/components/lowCodePage/index.js +2 -1
  81. package/lib/components/page/index.d.ts +0 -1
  82. package/lib/components/pisell-config-provider/index.d.ts +12 -0
  83. package/lib/components/pisellAdjustPrice/index.d.ts +9 -0
  84. package/lib/components/pisellEmpty/index.d.ts +19 -0
  85. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  86. package/lib/components/productCard/components/Warning/index.d.ts +7 -0
  87. package/lib/components/productCard/components/Warning/index.js +68 -0
  88. package/lib/components/productCard/index.js +4 -11
  89. package/lib/components/productCard/locales.d.ts +84 -0
  90. package/lib/components/productCard/locales.js +6 -3
  91. package/lib/components/productCard/status.d.ts +32 -0
  92. package/lib/components/productCard/status.js +3 -1
  93. package/lib/components/productCard/types.d.ts +84 -0
  94. package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  95. package/lib/components/table/Table/fields/date/filterUtil/index.js +6 -3
  96. package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +8 -4
  97. package/lib/components/table/Table/fields/utils/index.js +2 -1
  98. package/lib/components/table/Table/index.d.ts +4 -0
  99. package/lib/components/table/Table/utils.d.ts +1 -1
  100. package/lib/components/table/types.d.ts +251 -0
  101. package/lib/components/versionModal/index.d.ts +23 -0
  102. package/lib/components/virtual-keyboard/Amount/index.d.ts +22 -0
  103. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
  104. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +11 -0
  105. package/lib/hooks/useResponsive.js +6 -3
  106. package/package.json +3 -3
  107. package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +0 -8
  108. package/es/components/div/index.d.ts +0 -19
  109. package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +0 -9
  110. package/es/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +0 -24
  111. package/es/components/pisellDraggable/components/TreeItem/index.d.ts +0 -2
  112. package/es/components/pisellDraggable/index.d.ts +0 -35
  113. package/es/components/pisellDropSort/PisellDropSort.d.ts +0 -5
  114. package/es/components/pisellDropSort/components/SortableItem/index.d.ts +0 -26
  115. package/es/components/pisellDropSort/types.d.ts +0 -58
  116. package/es/components/pisellMenu/PisellMenu.d.ts +0 -11
  117. package/es/components/pisellMenu/types.d.ts +0 -27
  118. package/es/components/pisellNavigationMenu/types.d.ts +0 -85
  119. package/es/components/walletCard/Guide/index.d.ts +0 -3
  120. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +0 -8
  121. package/lib/components/div/index.d.ts +0 -19
  122. package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +0 -9
  123. package/lib/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +0 -24
  124. package/lib/components/pisellDraggable/components/TreeItem/index.d.ts +0 -2
  125. package/lib/components/pisellDraggable/index.d.ts +0 -35
  126. package/lib/components/pisellDropSort/PisellDropSort.d.ts +0 -5
  127. package/lib/components/pisellDropSort/components/SortableItem/index.d.ts +0 -26
  128. package/lib/components/pisellDropSort/types.d.ts +0 -58
  129. package/lib/components/pisellMenu/PisellMenu.d.ts +0 -11
  130. package/lib/components/pisellMenu/types.d.ts +0 -27
  131. package/lib/components/pisellNavigationMenu/types.d.ts +0 -85
  132. package/lib/components/walletCard/Guide/index.d.ts +0 -3
@@ -0,0 +1,38 @@
1
+ import { Drawer } from 'antd';
2
+ import { OperationItem } from '../type';
3
+ declare const useDrawerState: (operationContent?: {
4
+ [key: string]: import("react").ReactNode;
5
+ } | undefined) => {
6
+ drawerVisible: boolean;
7
+ setDrawerVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
8
+ openDrawer: (item: OperationItem) => void;
9
+ closeDrawer: () => void;
10
+ drawerContent: import("react").ReactNode;
11
+ Container: {
12
+ (props: import("../../../pisellModal").PisellModalProps): JSX.Element;
13
+ confirm: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
14
+ destroy: () => void;
15
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
16
+ };
17
+ info: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
18
+ destroy: () => void;
19
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
20
+ };
21
+ error: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
22
+ destroy: () => void;
23
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
24
+ };
25
+ warn: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => any;
26
+ warning: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
27
+ destroy: () => void;
28
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
29
+ };
30
+ success: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
31
+ destroy: () => void;
32
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
33
+ };
34
+ Information: (props: import("../../../pisellModal/components/Information").InformationProps) => JSX.Element;
35
+ } | typeof Drawer;
36
+ containerProps: {};
37
+ };
38
+ export default useDrawerState;
@@ -0,0 +1,78 @@
1
+ /// <reference types="react" />
2
+ import { ColumnType } from 'antd/es/table';
3
+ import { DataSourceType } from '../provider/dataSource/DataSourceContext';
4
+ export declare type OperationItem = {
5
+ label?: string;
6
+ openMode: 'modal' | 'drawer' | 'custom';
7
+ openContentSize: 'small' | 'middle' | 'large';
8
+ openTitle: string;
9
+ actionType: 'detail' | 'edit' | 'delete' | 'custom';
10
+ key: string;
11
+ buttonProps?: any;
12
+ onClick?: (record: any) => void;
13
+ };
14
+ export interface DataSourceTableProps {
15
+ title?: string | React.ReactNode | (() => React.ReactNode);
16
+ subTitle?: string | React.ReactNode | (() => React.ReactNode);
17
+ titleButtons?: {
18
+ show: boolean;
19
+ maxCount: number;
20
+ items: OperationItem[];
21
+ };
22
+ tableButtons?: {
23
+ show: boolean;
24
+ maxCount: number;
25
+ items: OperationItem[];
26
+ };
27
+ buttons?: any[];
28
+ operation?: {
29
+ show: boolean;
30
+ title: string;
31
+ width: number;
32
+ align: 'left' | 'center' | 'right';
33
+ fixed: 'left' | 'right' | false;
34
+ type: 'link' | 'button';
35
+ items: OperationItem[];
36
+ };
37
+ operationContent?: {
38
+ [key: string]: React.ReactNode;
39
+ };
40
+ dataSource: DataSourceType;
41
+ columns: ColumnType<any>[];
42
+ filter: any;
43
+ search?: {
44
+ show: boolean;
45
+ placeholder: string;
46
+ };
47
+ __designMode: string;
48
+ componentId: string;
49
+ clickToDetail?: {
50
+ show: boolean;
51
+ useCustomAction: boolean;
52
+ actionType: string;
53
+ openMode: 'modal' | 'drawer';
54
+ openContentSize: 'small' | 'middle' | 'large';
55
+ openTitle: string;
56
+ key: string;
57
+ };
58
+ onRow?: any;
59
+ filterBy?: Record<string, any>;
60
+ sortBy: string;
61
+ tabs?: {
62
+ show: boolean;
63
+ type: string;
64
+ items: {
65
+ name: string;
66
+ filterBy: Record<string, any>;
67
+ sortBy: string;
68
+ }[];
69
+ };
70
+ onValuesChange?: (changedValues: any, values: any) => void;
71
+ extraParams?: {
72
+ list?: Record<string, any>;
73
+ get?: Record<string, any>;
74
+ update?: Record<string, any>;
75
+ create?: Record<string, any>;
76
+ destroy?: Record<string, any>;
77
+ };
78
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * 获取nocobase数据列表
3
+ */
4
+ export declare const getCountryDataList: () => Promise<any>;
5
+ export interface Country {
6
+ id: number;
7
+ name: {
8
+ en: string;
9
+ "zh-CN": string;
10
+ "zh-HK": string;
11
+ original: string;
12
+ };
13
+ code: string;
14
+ calling_code: string;
15
+ currency_code: string;
16
+ sort: number;
17
+ status: string;
18
+ created_at: string;
19
+ updated_at: string;
20
+ prefix: string;
21
+ }
22
+ export declare const useCountries: () => {
23
+ data: Country[];
24
+ };
@@ -59,11 +59,13 @@ declare const formFieldMap: {
59
59
  FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
60
60
  FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
61
61
  };
62
- declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
62
+ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
63
63
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
64
64
  } & {
65
65
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
66
- }) | 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("./Input/type").InputProps> & {
66
+ }) | 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 & {
67
+ onChange: (value: string) => void;
68
+ } & 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> & {
67
69
  JSON: import("react").FC<any>;
68
70
  Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
69
71
  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>;
@@ -83,7 +85,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
83
85
  name?: string | undefined;
84
86
  fieldKey?: string | undefined;
85
87
  } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
86
- }) | (import("react").FC<{}> & {
88
+ }) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
87
89
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
88
90
  } & {
89
91
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -95,7 +97,5 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
95
97
  extraParams?: Record<string, any> | undefined;
96
98
  } & {
97
99
  dataSource?: any;
98
- }) => JSX.Element) | import("react").FC<any> | 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 & {
99
- onChange: (value: string) => void;
100
- } & 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("./Checkbox/type").CheckboxGroupProps & 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>;
100
+ }) => 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>;
101
101
  export { getFieldComponent, formFieldMap };
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const DatePicker: (props: any) => JSX.Element;
3
2
  export default DatePicker;
@@ -0,0 +1,4 @@
1
+ import './index.less';
2
+ import { SortType } from './types';
3
+ declare const DragSortTree: (props: SortType) => JSX.Element;
4
+ export default DragSortTree;
@@ -41,7 +41,8 @@ var LowCodePage = (props) => {
41
41
  const context = (0, import_useEngineContext.default)();
42
42
  const { RenderLowCodeByKey, getRenderLowCodeByKey } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
43
43
  const Com = (0, import_utils.isFunction)(getRenderLowCodeByKey) ? getRenderLowCodeByKey() : RenderLowCodeByKey;
44
- if (!Com) return /* @__PURE__ */ import_react.default.createElement("div", null, "RenderLowCodeByKey is not found");
44
+ if (!Com)
45
+ return /* @__PURE__ */ import_react.default.createElement("div", null, "RenderLowCodeByKey is not found");
45
46
  return /* @__PURE__ */ import_react.default.createElement(Com, { ...others, id, key: id });
46
47
  };
47
48
  var lowCodePage_default = LowCodePage;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ConfigProviderProps } from '../config-provider';
3
2
  interface PageProps extends ConfigProviderProps {
4
3
  }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { PisellContextType } from './context';
3
+ interface PisellConfigProviderType {
4
+ platform?: PisellContextType['platform'];
5
+ children: React.ReactNode;
6
+ /** 货币符号 */
7
+ symbol?: string;
8
+ /** 当前语言环境 */
9
+ locale?: string;
10
+ }
11
+ declare const PisellConfigProvider: React.FC<PisellConfigProviderType>;
12
+ export default PisellConfigProvider;
@@ -0,0 +1,9 @@
1
+ import './index.less';
2
+ export interface PisellAdjustPriceProps {
3
+ value?: number;
4
+ originValue: number;
5
+ defaultValue?: number;
6
+ onChange?: (val: number) => void;
7
+ }
8
+ declare const PisellAdjustPrice: (props: PisellAdjustPriceProps) => JSX.Element;
9
+ export default PisellAdjustPrice;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { EmptyProps } from 'antd';
3
+ import { PisellContextType } from '../pisell-config-provider/context';
4
+ import './index.less';
5
+ export interface PisellEmptyProps extends EmptyProps {
6
+ /** 平台 */
7
+ platform?: PisellContextType['platform'];
8
+ /** 额外内容描述 */
9
+ extraDescription?: React.ReactNode;
10
+ /** 额外内容描述 */
11
+ icon?: React.ReactNode;
12
+ /** 自定义底部额外操作区域 */
13
+ footer?: React.ReactNode;
14
+ [key: string]: any;
15
+ /** 最大宽度 */
16
+ maxWidth?: number;
17
+ }
18
+ declare const PisellEmpty: (props: PisellEmptyProps) => JSX.Element;
19
+ export default PisellEmpty;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const DeleteButton: ({ onDelete }: any) => JSX.Element;
3
+ export default DeleteButton;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import '../../index.less';
3
+ declare const Warning: React.FC<{
4
+ errorMessage: string | Array<string>;
5
+ osWarnTips: Array<string>;
6
+ }>;
7
+ export default Warning;
@@ -0,0 +1,68 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/productCard/components/Warning/index.tsx
30
+ var Warning_exports = {};
31
+ __export(Warning_exports, {
32
+ default: () => Warning_default
33
+ });
34
+ module.exports = __toCommonJS(Warning_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_utils = require("@pisell/utils");
37
+ var import_antd = require("antd");
38
+ var import__ = require("../../index.less");
39
+ var Warning = ({ errorMessage, osWarnTips }) => {
40
+ const errorLists = (0, import_react.useMemo)(() => {
41
+ if (errorMessage) {
42
+ if (Array.isArray(errorMessage)) {
43
+ return errorMessage;
44
+ }
45
+ if (typeof errorMessage === "string") {
46
+ return [errorMessage];
47
+ }
48
+ }
49
+ if ((osWarnTips == null ? void 0 : osWarnTips.length) > 0) {
50
+ return osWarnTips.map((item) => import_utils.locales.getText(item));
51
+ }
52
+ return [];
53
+ }, [errorMessage, osWarnTips]);
54
+ if ((errorLists == null ? void 0 : errorLists.length) === 0) {
55
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null);
56
+ }
57
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, errorLists.map((item, index) => /* @__PURE__ */ import_react.default.createElement(
58
+ import_antd.Alert,
59
+ {
60
+ key: index,
61
+ message: item,
62
+ type: "warning",
63
+ showIcon: true,
64
+ className: "pisell-lowcode-product-card-error"
65
+ }
66
+ )));
67
+ };
68
+ var Warning_default = Warning;
@@ -34,7 +34,6 @@ __export(productCard_exports, {
34
34
  module.exports = __toCommonJS(productCard_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_classnames = __toESM(require("classnames"));
37
- var import_antd = require("antd");
38
37
  var import_utils = require("@pisell/utils");
39
38
  var import_cardPro = __toESM(require("../cardPro"));
40
39
  var import_Header = __toESM(require("./components/Header"));
@@ -50,6 +49,7 @@ var import_useOpenNote = __toESM(require("./hooks/useOpenNote"));
50
49
  var import_locales = __toESM(require("./locales"));
51
50
  var import_status = require("./status");
52
51
  var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
52
+ var import_Warning = __toESM(require("./components/Warning"));
53
53
  var import_index = require("./index.less");
54
54
  var ProductCard = (props) => {
55
55
  var _a, _b;
@@ -84,7 +84,8 @@ var ProductCard = (props) => {
84
84
  isShowAction,
85
85
  actionText,
86
86
  errorMessage,
87
- isNormalProduct
87
+ isNormalProduct,
88
+ osWarnTips = []
88
89
  } = dataSource;
89
90
  const showImage = (0, import_react.useMemo)(() => {
90
91
  return isShowImage && image;
@@ -180,15 +181,7 @@ var ProductCard = (props) => {
180
181
  onAction: () => onAction == null ? void 0 : onAction(dataSource)
181
182
  }
182
183
  ) : null,
183
- errorMessage ? /* @__PURE__ */ import_react.default.createElement(
184
- import_antd.Alert,
185
- {
186
- message: errorMessage,
187
- type: "warning",
188
- showIcon: true,
189
- className: "pisell-lowcode-product-card-error"
190
- }
191
- ) : null
184
+ /* @__PURE__ */ import_react.default.createElement(import_Warning.default, { errorMessage, osWarnTips })
192
185
  ), /* @__PURE__ */ import_react.default.createElement(
193
186
  import_useOpenNote.default,
194
187
  {
@@ -0,0 +1,84 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'pisell2.product.card.day': (val: number) => string;
4
+ 'pisell2.product.card.day.event': (val: number) => string;
5
+ 'pisell2.product.card.minute': (val: number) => string;
6
+ 'pisell2.product.card.discount.reason': string;
7
+ 'pisell2.product.card.discount.note': string;
8
+ 'pisell2.product.card.edit': string;
9
+ 'pisell2.product.card.discount.add.note': string;
10
+ 'pisell2.product.card.discount.edit.note': string;
11
+ 'pisell2.product.card.confirm': string;
12
+ 'pisell2.product.card.cancel': string;
13
+ 'pisell2.product.card.note.pla': string;
14
+ 'pisell2.product.card.items.package': string;
15
+ 'pisell2.product.card.view-all': string;
16
+ 'pisell2.product.card.view-less': string;
17
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
18
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
19
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
20
+ 'pisell2.product.card.add.holder.modal.title.1': string;
21
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
22
+ 'pisell2.product.card.sales': string;
23
+ 'pisell2.product.card.add.holder.modal.cancel': string;
24
+ 'pisell2.product.card.add.holder.modal.clear': string;
25
+ 'pisell2.product.card.add.holder.modal.apply': string;
26
+ 'pisell2.product.card.add.holder.modal.add': string;
27
+ 'pisell2.product.card.closing-soon.warning': string;
28
+ };
29
+ 'zh-CN': {
30
+ 'pisell2.product.card.edit': string;
31
+ 'pisell2.product.card.day': (val: number) => string;
32
+ 'pisell2.product.card.day.event': (val: number) => string;
33
+ 'pisell2.product.card.minute': (val: number) => string;
34
+ 'pisell2.product.card.discount.reason': string;
35
+ 'pisell2.product.card.discount.note': string;
36
+ 'pisell2.product.card.discount.add.note': string;
37
+ 'pisell2.product.card.discount.edit.note': string;
38
+ 'pisell2.product.card.confirm': string;
39
+ 'pisell2.product.card.cancel': string;
40
+ 'pisell2.product.card.note.pla': string;
41
+ 'pisell2.product.card.items.package': string;
42
+ 'pisell2.product.card.view-all': string;
43
+ 'pisell2.product.card.view-less': string;
44
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
45
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
46
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
47
+ 'pisell2.product.card.add.holder.modal.title.1': string;
48
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
49
+ 'pisell2.product.card.sales': string;
50
+ 'pisell2.product.card.add.holder.modal.cancel': string;
51
+ 'pisell2.product.card.add.holder.modal.clear': string;
52
+ 'pisell2.product.card.add.holder.modal.apply': string;
53
+ 'pisell2.product.card.add.holder.modal.add': string;
54
+ 'pisell2.product.card.closing-soon.warning': string;
55
+ };
56
+ 'zh-HK': {
57
+ 'pisell2.product.card.edit': string;
58
+ 'pisell2.product.card.day': (val: number) => string;
59
+ 'pisell2.product.card.day.event': (val: number) => string;
60
+ 'pisell2.product.card.minute': (val: number) => string;
61
+ 'pisell2.product.card.discount.reason': string;
62
+ 'pisell2.product.card.discount.note': string;
63
+ 'pisell2.product.card.discount.add.note': string;
64
+ 'pisell2.product.card.discount.edit.note': string;
65
+ 'pisell2.product.card.confirm': string;
66
+ 'pisell2.product.card.cancel': string;
67
+ 'pisell2.product.card.note.pla': string;
68
+ 'pisell2.product.card.items.package': string;
69
+ 'pisell2.product.card.view-all': string;
70
+ 'pisell2.product.card.view-less': string;
71
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
72
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
73
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
74
+ 'pisell2.product.card.add.holder.modal.title.1': string;
75
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
76
+ 'pisell2.product.card.sales': string;
77
+ 'pisell2.product.card.add.holder.modal.cancel': string;
78
+ 'pisell2.product.card.add.holder.modal.clear': string;
79
+ 'pisell2.product.card.add.holder.modal.apply': string;
80
+ 'pisell2.product.card.add.holder.modal.add': string;
81
+ 'pisell2.product.card.closing-soon.warning': string;
82
+ };
83
+ };
84
+ export default _default;
@@ -47,7 +47,8 @@ var locales_default = {
47
47
  "pisell2.product.card.add.holder.modal.cancel": "Cancel",
48
48
  "pisell2.product.card.add.holder.modal.clear": "Clear",
49
49
  "pisell2.product.card.add.holder.modal.apply": "Apply",
50
- "pisell2.product.card.add.holder.modal.add": "Add New"
50
+ "pisell2.product.card.add.holder.modal.add": "Add New",
51
+ "pisell2.product.card.closing-soon.warning": "The venue will close soon. Please make sure you have enough time for your visit."
51
52
  },
52
53
  "zh-CN": {
53
54
  "pisell2.product.card.edit": "编辑",
@@ -73,7 +74,8 @@ var locales_default = {
73
74
  "pisell2.product.card.add.holder.modal.cancel": "取消",
74
75
  "pisell2.product.card.add.holder.modal.clear": "清除",
75
76
  "pisell2.product.card.add.holder.modal.apply": "应用",
76
- "pisell2.product.card.add.holder.modal.add": "添加"
77
+ "pisell2.product.card.add.holder.modal.add": "添加",
78
+ "pisell2.product.card.closing-soon.warning": "当前入场时间临近营业结束,请确认是否仍要购买。"
77
79
  },
78
80
  "zh-HK": {
79
81
  "pisell2.product.card.edit": "編輯",
@@ -99,6 +101,7 @@ var locales_default = {
99
101
  "pisell2.product.card.add.holder.modal.cancel": "取消",
100
102
  "pisell2.product.card.add.holder.modal.clear": "清除",
101
103
  "pisell2.product.card.add.holder.modal.apply": "應用",
102
- "pisell2.product.card.add.holder.modal.add": "添加"
104
+ "pisell2.product.card.add.holder.modal.add": "添加",
105
+ "pisell2.product.card.closing-soon.warning": "當前入場時間臨近營業結束,請確認是否仍要購買。"
103
106
  }
104
107
  };
@@ -0,0 +1,32 @@
1
+ import { ProductCardTypes, bundleType, optionType, productType } from './types';
2
+ /**
3
+ * @title: 套餐数据
4
+ * @description:
5
+ * @return {*}
6
+ * @Author: WangHan
7
+ * @Date: 2025-01-02 23:21
8
+ */
9
+ export declare const defaultBundle: bundleType;
10
+ /**
11
+ * @description: 单规格
12
+ * @return {*}
13
+ * @Author: WangHan
14
+ * @Date: 2025-01-02 23:00
15
+ */
16
+ export declare const defaultOption: optionType;
17
+ /**
18
+ * @title: 商品商品类型
19
+ * @description:
20
+ * @return {*}
21
+ * @Author: WangHan
22
+ * @Date: 2025-01-02 22:48
23
+ */
24
+ export declare const defaultProduct: productType;
25
+ /**
26
+ * @title: 默认数据
27
+ * @description:
28
+ * @return {*}
29
+ * @Author: WangHan
30
+ * @Date: 2024-12-12 16:49
31
+ */
32
+ export declare const defaultValue: ProductCardTypes;
@@ -61,7 +61,9 @@ var defaultValue = {
61
61
  isShowPackageNote: true,
62
62
  isShowEditProduct: false,
63
63
  locale: "en-US",
64
- symbol: "$"
64
+ symbol: "$",
65
+ // os层自定义错误提示
66
+ osWarnTips: []
65
67
  };
66
68
  // Annotate the CommonJS export names for ESM import in node:
67
69
  0 && (module.exports = {
@@ -0,0 +1,84 @@
1
+ export declare type bundleType = {
2
+ id: number;
3
+ name: string;
4
+ num: number;
5
+ price: number;
6
+ total: number;
7
+ origin_total?: number;
8
+ price_type?: string;
9
+ options?: optionType[];
10
+ };
11
+ /**
12
+ * @description:
13
+ * @return {*}
14
+ * @Author: WangHan
15
+ * @Date: 2025-01-02 23:00
16
+ */
17
+ export declare type optionType = {
18
+ id: number;
19
+ name: string;
20
+ num: number;
21
+ price: number;
22
+ total: number;
23
+ origin_total?: number;
24
+ };
25
+ /**
26
+ * @title: 商品商品类型
27
+ * @description:
28
+ * @return {*}
29
+ * @Author: WangHan
30
+ * @Date: 2025-01-02 22:48
31
+ */
32
+ export declare type productType = {
33
+ _id: string | number;
34
+ id: number;
35
+ name: string;
36
+ price: number;
37
+ total: number;
38
+ num: number;
39
+ origin_total?: number;
40
+ image?: string;
41
+ isShowNote?: boolean;
42
+ note?: string;
43
+ like_status?: string;
44
+ bundle?: bundleType[];
45
+ options?: optionType[];
46
+ isShowAction?: boolean;
47
+ actionText?: string;
48
+ errorMessage?: string;
49
+ product_option_string?: string;
50
+ discount_reason?: string;
51
+ relation_products?: any[];
52
+ resource_id?: string | number;
53
+ relation_form_name?: string;
54
+ holder_title?: string;
55
+ start_date?: string;
56
+ end_date?: string;
57
+ is_show_duration?: boolean;
58
+ is_show_week?: boolean;
59
+ };
60
+ /**
61
+ * 排序总配置
62
+ */
63
+ export declare type ProductCardTypes = {
64
+ dataSource: productType;
65
+ isShowImage?: boolean;
66
+ isShowHolder?: boolean;
67
+ isShowNote?: boolean;
68
+ isShowPackageNote?: boolean;
69
+ isShowDelete?: boolean;
70
+ disabledEdit?: boolean;
71
+ locale?: string;
72
+ symbol?: string;
73
+ isShowChangeHolder?: boolean;
74
+ isShowChangeResource?: boolean;
75
+ isShowChangeDate?: boolean;
76
+ onAction?: (val: any) => void;
77
+ onDelete?: (val: any) => void;
78
+ onNote?: (val: any) => void;
79
+ onLike?: (val: any) => void;
80
+ onCard?: (val: any) => void;
81
+ onChangeResource?: (val: any) => void;
82
+ osWarnTips?: Array<string>;
83
+ [key: string]: any;
84
+ };
@@ -0,0 +1,7 @@
1
+ import { ExportImportType } from '../../../types';
2
+ import './index.less';
3
+ declare type ExportImportProps = {
4
+ exportImport: ExportImportType;
5
+ };
6
+ declare const ExportImport: ({ exportImport }: ExportImportProps) => JSX.Element;
7
+ export default ExportImport;