@pisell/materials 1.0.977 → 1.0.979

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 (141) 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 +6 -6
  6. package/build/lowcode/preview.js +9 -9
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +15 -15
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +23 -23
  11. package/es/components/PisellProcedure/PisellProcedure.d.ts +27 -0
  12. package/es/components/PisellProcedure/components/ProcedureAction.d.ts +8 -0
  13. package/es/components/PisellProcedure/components/ProcedureContent.d.ts +8 -0
  14. package/es/components/PisellProcedure/components/ProcedureHeader.d.ts +8 -0
  15. package/es/components/PisellProcedure/components/ProcedureSummary.d.ts +8 -0
  16. package/es/components/PisellProcedure/hooks/useResponsive.d.ts +6 -0
  17. package/es/components/PisellProcedure/index.d.ts +4 -0
  18. package/es/components/PisellProcedure/types.d.ts +303 -0
  19. package/es/components/PisellSteps/PisellSteps.d.ts +14 -0
  20. package/es/components/PisellSteps/PisellSteps.js +170 -148
  21. package/es/components/PisellSteps/PisellSteps.less +248 -383
  22. package/es/components/PisellSteps/hooks/index.d.ts +4 -0
  23. package/es/components/PisellSteps/hooks/index.js +4 -0
  24. package/es/components/PisellSteps/hooks/useAnchor.d.ts +9 -0
  25. package/es/components/PisellSteps/hooks/useAnchor.js +55 -0
  26. package/es/components/PisellSteps/hooks/useResponsive.d.ts +8 -0
  27. package/es/components/PisellSteps/hooks/useResponsive.js +43 -0
  28. package/es/components/PisellSteps/hooks/useStepClick.d.ts +11 -0
  29. package/es/components/PisellSteps/hooks/useStepClick.js +35 -0
  30. package/es/components/PisellSteps/hooks/useStepsState.d.ts +9 -0
  31. package/es/components/PisellSteps/hooks/useStepsState.js +60 -0
  32. package/es/components/PisellSteps/index.d.ts +3 -0
  33. package/es/components/PisellSteps/index.js +2 -5
  34. package/es/components/PisellSteps/types.d.ts +271 -0
  35. package/es/components/PisellSteps/utils/index.d.ts +54 -0
  36. package/es/components/PisellSteps/utils/index.js +118 -0
  37. package/es/components/Template/PisellSteps.d.ts +0 -0
  38. package/es/components/Template/PisellSteps.js +1 -0
  39. package/es/components/Template/PisellSteps.less +1 -0
  40. package/es/components/Template/components/index.d.ts +0 -0
  41. package/es/components/Template/components/index.js +1 -0
  42. package/es/components/Template/hooks/index.d.ts +0 -0
  43. package/es/components/Template/hooks/index.js +1 -0
  44. package/es/components/Template/utils/index.d.ts +0 -0
  45. package/es/components/Template/utils/index.js +1 -0
  46. package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +5 -5
  47. package/es/components/dataSourceComponents/dataSourceForm/urlUtils.d.ts +0 -10
  48. package/es/components/dataSourceComponents/dataSourceForm/urlUtils.js +13 -64
  49. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  50. package/es/components/dataSourceComponents/dataSourceForm/utils.js +3 -4
  51. package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
  52. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +101 -0
  53. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +17 -0
  54. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
  55. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  56. package/es/components/dataSourceComponents/fields/Switch/ReadPretty.d.ts +5 -0
  57. package/es/components/dataSourceComponents/fields/Switch/ReadPretty.js +16 -0
  58. package/es/components/dataSourceComponents/fields/Switch/ReadPretty.less +2 -0
  59. package/es/components/dataSourceComponents/fields/Switch/WithMode.d.ts +3 -0
  60. package/es/components/dataSourceComponents/fields/Switch/WithMode.js +5 -0
  61. package/es/components/dataSourceComponents/fields/Switch/index.d.ts +3 -0
  62. package/es/components/dataSourceComponents/fields/Switch/index.js +8 -0
  63. package/es/components/dataSourceComponents/fields/Switch/type.d.ts +16 -0
  64. package/es/components/dataSourceComponents/fields/Switch/type.js +1 -0
  65. package/es/components/dataSourceComponents/fields/index.d.ts +12 -12
  66. package/es/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +4 -0
  67. package/es/components/pisellCardList/index.d.ts +107 -0
  68. package/es/components/pisellGoodPassCard/index.d.ts +50 -0
  69. package/es/components/pisellWalletPassCard/index.d.ts +146 -0
  70. package/es/components/productCard/index.d.ts +7 -0
  71. package/es/index.d.ts +149 -0
  72. package/es/index.js +1 -1
  73. package/lib/components/PisellProcedure/PisellProcedure.d.ts +27 -0
  74. package/lib/components/PisellProcedure/components/ProcedureAction.d.ts +8 -0
  75. package/lib/components/PisellProcedure/components/ProcedureContent.d.ts +8 -0
  76. package/lib/components/PisellProcedure/components/ProcedureHeader.d.ts +8 -0
  77. package/lib/components/PisellProcedure/components/ProcedureSummary.d.ts +8 -0
  78. package/lib/components/PisellProcedure/hooks/useResponsive.d.ts +6 -0
  79. package/lib/components/PisellProcedure/index.d.ts +4 -0
  80. package/lib/components/PisellProcedure/types.d.ts +303 -0
  81. package/lib/components/PisellSteps/PisellSteps.d.ts +14 -0
  82. package/lib/components/PisellSteps/PisellSteps.js +155 -102
  83. package/lib/components/PisellSteps/PisellSteps.less +248 -383
  84. package/lib/components/PisellSteps/hooks/index.d.ts +4 -0
  85. package/lib/components/PisellSteps/hooks/index.js +38 -0
  86. package/lib/components/PisellSteps/hooks/useAnchor.d.ts +9 -0
  87. package/lib/components/PisellSteps/hooks/useAnchor.js +63 -0
  88. package/lib/components/PisellSteps/hooks/useResponsive.d.ts +8 -0
  89. package/lib/components/PisellSteps/hooks/useResponsive.js +48 -0
  90. package/lib/components/PisellSteps/hooks/useStepClick.d.ts +11 -0
  91. package/lib/components/PisellSteps/hooks/useStepClick.js +55 -0
  92. package/lib/components/PisellSteps/hooks/useStepsState.d.ts +9 -0
  93. package/lib/components/PisellSteps/hooks/useStepsState.js +54 -0
  94. package/lib/components/PisellSteps/index.d.ts +3 -0
  95. package/lib/components/PisellSteps/index.js +2 -7
  96. package/lib/components/PisellSteps/types.d.ts +271 -0
  97. package/lib/components/PisellSteps/utils/index.d.ts +54 -0
  98. package/lib/components/PisellSteps/utils/index.js +88 -0
  99. package/lib/components/Template/PisellSteps.d.ts +0 -0
  100. package/lib/components/Template/PisellSteps.js +0 -0
  101. package/lib/components/Template/PisellSteps.less +1 -0
  102. package/lib/components/Template/components/index.d.ts +0 -0
  103. package/lib/components/Template/components/index.js +0 -0
  104. package/lib/components/Template/hooks/index.d.ts +0 -0
  105. package/lib/components/Template/hooks/index.js +0 -0
  106. package/lib/components/Template/utils/index.d.ts +0 -0
  107. package/lib/components/Template/utils/index.js +0 -0
  108. package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +4 -4
  109. package/lib/components/dataSourceComponents/dataSourceForm/urlUtils.d.ts +0 -10
  110. package/lib/components/dataSourceComponents/dataSourceForm/urlUtils.js +3 -25
  111. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  112. package/lib/components/dataSourceComponents/dataSourceForm/utils.js +3 -3
  113. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
  114. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +101 -0
  115. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +17 -0
  116. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
  117. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  118. package/lib/components/dataSourceComponents/fields/Switch/ReadPretty.d.ts +5 -0
  119. package/lib/components/dataSourceComponents/fields/Switch/ReadPretty.js +52 -0
  120. package/lib/components/dataSourceComponents/fields/Switch/ReadPretty.less +2 -0
  121. package/lib/components/dataSourceComponents/fields/Switch/WithMode.d.ts +3 -0
  122. package/lib/components/dataSourceComponents/fields/Switch/WithMode.js +39 -0
  123. package/lib/components/dataSourceComponents/fields/Switch/index.d.ts +3 -0
  124. package/lib/components/dataSourceComponents/fields/Switch/index.js +42 -0
  125. package/lib/components/dataSourceComponents/fields/Switch/type.d.ts +16 -0
  126. package/lib/components/dataSourceComponents/fields/Switch/type.js +17 -0
  127. package/lib/components/dataSourceComponents/fields/index.d.ts +12 -12
  128. package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +4 -0
  129. package/lib/components/pisellCardList/index.d.ts +107 -0
  130. package/lib/components/pisellGoodPassCard/index.d.ts +50 -0
  131. package/lib/components/pisellWalletPassCard/index.d.ts +146 -0
  132. package/lib/components/productCard/index.d.ts +7 -0
  133. package/lib/index.d.ts +149 -0
  134. package/lib/index.js +3 -3
  135. package/lowcode/data-source-form/constants.ts +3 -0
  136. package/lowcode/data-source-form/utils.ts +36 -7
  137. package/lowcode/form-item-switch/meta.ts +145 -0
  138. package/lowcode/form-item-switch/snippets.ts +15 -0
  139. package/lowcode/pisell-steps/meta.ts +621 -271
  140. package/lowcode/pisell-steps/snippets.ts +27 -69
  141. package/package.json +3 -3
@@ -0,0 +1,88 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/PisellSteps/utils/index.ts
20
+ var utils_exports = {};
21
+ __export(utils_exports, {
22
+ calculateProgress: () => calculateProgress,
23
+ getChangeDirection: () => getChangeDirection,
24
+ getStepStatus: () => getStepStatus,
25
+ isStepClickable: () => isStepClickable,
26
+ isValidStepIndex: () => isValidStepIndex,
27
+ mergeStepClassName: () => mergeStepClassName
28
+ });
29
+ module.exports = __toCommonJS(utils_exports);
30
+ function calculateProgress(current, total) {
31
+ if (total <= 0) return 0;
32
+ if (current < 0) return 0;
33
+ if (current >= total) return 100;
34
+ return Math.round((current + 1) / total * 100);
35
+ }
36
+ function isStepClickable(index, current, status, clickable, allowClickFinished) {
37
+ if (!clickable) {
38
+ return false;
39
+ }
40
+ if (index === current) {
41
+ return false;
42
+ }
43
+ if (status === "finish" || index < current) {
44
+ return allowClickFinished;
45
+ }
46
+ if (status === "wait") {
47
+ return false;
48
+ }
49
+ if (status === "error") {
50
+ return true;
51
+ }
52
+ return true;
53
+ }
54
+ function getStepStatus(index, current, customStatus) {
55
+ if (customStatus) {
56
+ return customStatus;
57
+ }
58
+ if (index < current) {
59
+ return "finish";
60
+ } else if (index === current) {
61
+ return "process";
62
+ } else {
63
+ return "wait";
64
+ }
65
+ }
66
+ function mergeStepClassName(baseClass, status, customClass) {
67
+ const classes = [baseClass];
68
+ classes.push(`${baseClass}-${status}`);
69
+ if (customClass) {
70
+ classes.push(customClass);
71
+ }
72
+ return classes.join(" ");
73
+ }
74
+ function getChangeDirection(from, to) {
75
+ return to > from ? "forward" : "backward";
76
+ }
77
+ function isValidStepIndex(index, total) {
78
+ return index >= 0 && index < total;
79
+ }
80
+ // Annotate the CommonJS export names for ESM import in node:
81
+ 0 && (module.exports = {
82
+ calculateProgress,
83
+ getChangeDirection,
84
+ getStepStatus,
85
+ isStepClickable,
86
+ isValidStepIndex,
87
+ mergeStepClassName
88
+ });
File without changes
File without changes
@@ -0,0 +1 @@
1
+ // 这里是组件的样式
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -68,10 +68,10 @@ var SubmitButton = (props) => {
68
68
  setLoading(true);
69
69
  try {
70
70
  if (dataSource == null ? void 0 : dataSource.fromSettingMeta) {
71
- const urlParams = (0, import_urlUtils.getUrlParams)();
72
- const business_code = urlParams.business_code;
73
- const channel_code = urlParams.channel_code;
74
- const board_code = urlParams.isBoard === "1" && channel_code && channel_code ? `${business_code}+${channel_code}` : void 0;
71
+ const urlParams = (0, import_urlUtils.getFormSettingParams)();
72
+ const business_code = urlParams.businessCode;
73
+ const channel_code = urlParams.channelCode;
74
+ const board_code = urlParams.isBoard && business_code && channel_code ? `${business_code}+${channel_code}` : void 0;
75
75
  return await (0, import_serve.updateTenantSetting)({
76
76
  business_code,
77
77
  channel_code,
@@ -16,16 +16,6 @@ export declare const getFormSettingParams: (urlParams?: Record<string, string>)
16
16
  channelCode: string;
17
17
  isBoard: boolean;
18
18
  };
19
- /**
20
- * 保存formSettingMeta数据
21
- * @param sectionCodes 配置段代码数组,如 ['payment']
22
- * @param data 要保存的数据
23
- * @param businessCode 业务代码
24
- * @param channelCode 渠道代码
25
- * @param isBoard 是否包含board_code参数
26
- * @returns Promise<any> 返回保存结果
27
- */
28
- export declare const saveFormSettingMeta: (sectionCodes: string[], data: Record<string, any>, businessCode: string, channelCode: string, isBoard: boolean) => Promise<any>;
29
19
  /**
30
20
  * 根据URL参数更新租户设置数据
31
21
  * @param data 要更新的数据对象,如 {"order.prefix":"","order.suffix":"","payment.number":""}
@@ -21,7 +21,6 @@ var urlUtils_exports = {};
21
21
  __export(urlUtils_exports, {
22
22
  getFormSettingParams: () => getFormSettingParams,
23
23
  getUrlParams: () => getUrlParams,
24
- saveFormSettingMeta: () => saveFormSettingMeta,
25
24
  updateTenantSettingFromUrl: () => updateTenantSettingFromUrl
26
25
  });
27
26
  module.exports = __toCommonJS(urlUtils_exports);
@@ -42,32 +41,12 @@ var getFormSettingParams = (urlParams) => {
42
41
  isBoard: params.is_board === "1"
43
42
  };
44
43
  };
45
- var saveFormSettingMeta = async (sectionCodes, data, businessCode, channelCode, isBoard) => {
46
- const queryParams = new URLSearchParams();
47
- sectionCodes.forEach((code) => {
48
- queryParams.append("section_code[]", code);
49
- });
50
- if (businessCode) {
51
- queryParams.append("business_code", businessCode);
52
- }
53
- if (channelCode) {
54
- queryParams.append("channel_code", channelCode);
55
- }
56
- if (isBoard && businessCode && channelCode) {
57
- queryParams.append("board_code", `${businessCode}×${channelCode}`);
58
- }
59
- const url = `/setting?${queryParams.toString()}`;
60
- return import_utils.request.getRequest().post(url, data, {
61
- headers: {
62
- "Content-Type": "application/json"
63
- }
64
- });
65
- };
66
44
  var updateTenantSettingFromUrl = async (data) => {
67
- const urlParams = getUrlParams();
45
+ debugger;
46
+ const urlParams = getFormSettingParams();
68
47
  const businessCode = urlParams.businessCode;
69
48
  const channelCode = urlParams.channelCode;
70
- const boardCode = urlParams.is_board === "1" && businessCode && channelCode ? `${businessCode}x${channelCode}` : void 0;
49
+ const boardCode = urlParams.isBoard && businessCode && channelCode ? `${businessCode}+${channelCode}` : void 0;
71
50
  const requestBody = {
72
51
  business_code: businessCode || "",
73
52
  channel_code: channelCode || "",
@@ -85,6 +64,5 @@ var updateTenantSettingFromUrl = async (data) => {
85
64
  0 && (module.exports = {
86
65
  getFormSettingParams,
87
66
  getUrlParams,
88
- saveFormSettingMeta,
89
67
  updateTenantSettingFromUrl
90
68
  });
@@ -0,0 +1,56 @@
1
+ import React from 'react';
2
+ import { FormInstance } from 'antd';
3
+ import { ModeType } from './type';
4
+ import './style.less';
5
+ export interface WithModeProps {
6
+ renderMode?: ModeType;
7
+ value?: any;
8
+ onChange?: (value: any) => void;
9
+ [key: string]: any;
10
+ }
11
+ /**
12
+ * @title: 增加renderMode属性
13
+ * @description: 基于renderMode属性控制渲染模式
14
+ * @return: *
15
+ * @Author: shengjie.zuo
16
+ * @Date: 2024-11-23 17:13:18
17
+ */
18
+ export declare const withMode: <P extends object>(FieldComponent: React.ComponentType<P>, ReadPrettyComponent?: React.ComponentType<P & {
19
+ renderMode: ModeType;
20
+ }> | undefined, transformProps?: ((props: P, renderMode: ModeType) => P) | undefined) => React.FC<P & WithModeProps>;
21
+ export interface WithFormItemProps {
22
+ name: string;
23
+ label?: string;
24
+ mode?: ModeType;
25
+ [key: string]: any;
26
+ }
27
+ export declare const formItemNameReplace: (name: string) => string;
28
+ export declare const formItemNameReverse: (name: string) => string;
29
+ export declare const isValidDomain: (value: string) => boolean;
30
+ /**
31
+ * @title: 追加formItem层
32
+ * @description:
33
+ * @return: *
34
+ * @Author: shengjie.zuo
35
+ * @Date: 2024-11-23 17:14:25
36
+ */
37
+ export declare const withFormItem: <P extends object>(WrappedComponent: React.ComponentType<P>, overlayProps?: {
38
+ otherFormItemProps?: Record<string, any> | ((props: Record<string, any>, others?: Record<string, any>) => Record<string, any>) | undefined;
39
+ innerProps?: Record<string, any> | undefined;
40
+ } | undefined) => React.FC<P & WithFormItemProps>;
41
+ export declare const withDataSource: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
42
+ dataSource?: any;
43
+ }) => JSX.Element;
44
+ export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
45
+ options?: any;
46
+ optionSourceType?: "custom" | "api" | "default" | undefined;
47
+ labelField: string;
48
+ valueField: string;
49
+ extraParams?: Record<string, any> | undefined;
50
+ }) => JSX.Element;
51
+ export declare const getNestedValue: (obj: Record<string, any>, path: string) => Record<string, any>;
52
+ export declare const renderValueWithMap: (value: any, valueMap?: Record<string, string>, renderMode?: ModeType) => JSX.Element | null;
53
+ export declare function toArr(str: string | number | (string | number)[]): (string | number)[];
54
+ export declare const filterSystemFields: (params: Record<string, any>) => Record<string, any>;
55
+ export declare const transformFormObjToArrayWithUntouched: (obj: Record<string, any>) => any[];
56
+ export declare const setFormFieldsUntouched: (form: FormInstance) => void;
@@ -136,13 +136,13 @@ var withFormItem = (WrappedComponent, overlayProps) => {
136
136
  return /* @__PURE__ */ import_react.default.createElement(
137
137
  WrappedComponent,
138
138
  {
139
+ ...overlayProps == null ? void 0 : overlayProps.innerProps,
139
140
  ...otherProps,
140
141
  mode: propsMode,
141
142
  renderMode: effectiveMode,
142
- ...overlayProps == null ? void 0 : overlayProps.innerProps,
143
143
  style: {
144
- ...innerStyle || {},
145
- ...((_a2 = overlayProps == null ? void 0 : overlayProps.innerProps) == null ? void 0 : _a2.style) || {}
144
+ ...((_a2 = overlayProps == null ? void 0 : overlayProps.innerProps) == null ? void 0 : _a2.style) || {},
145
+ ...innerStyle || {}
146
146
  },
147
147
  fieldKey: name,
148
148
  isVerification: typeobj == null ? void 0 : typeobj.enabled,
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface BaseFilterItem {
3
4
  name?: string;
@@ -0,0 +1,101 @@
1
+ import React from 'react';
2
+ import { DataSourceTableProps } from '../type';
3
+ import { OperationItem } from '../type';
4
+ interface UseTablePropsProps {
5
+ data: any;
6
+ originProps: DataSourceTableProps;
7
+ openDrawer: (type: OperationItem) => void;
8
+ closeDrawer: () => void;
9
+ refreshData: () => void;
10
+ handleFilterChange: (changedFields: any, allFields: any) => void;
11
+ tableRef: any;
12
+ getInitialValues: () => Record<string, any>;
13
+ }
14
+ /**
15
+ * 处理table的props
16
+ * 转换title
17
+ * @param props
18
+ * @returns
19
+ */
20
+ declare const useTableProps: (props: UseTablePropsProps) => {
21
+ currentComponentId: any;
22
+ title: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
23
+ pagination: {
24
+ total: number;
25
+ current: number;
26
+ pageSize: number;
27
+ size: string;
28
+ showSizeChanger: boolean;
29
+ };
30
+ columns: import("./useColumns").Column[];
31
+ subTitle: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
32
+ buttons: any[] | null;
33
+ filter: {
34
+ dom: any;
35
+ items: any;
36
+ } | null;
37
+ onRow: (record: any) => any;
38
+ actionButtons: any[] | null;
39
+ __id?: string | undefined;
40
+ currentSettingKey?: string | undefined;
41
+ titleButtons?: {
42
+ show: boolean;
43
+ maxCount: number;
44
+ items: OperationItem[];
45
+ } | undefined;
46
+ tableButtons?: {
47
+ show: boolean;
48
+ maxCount: number;
49
+ items: OperationItem[];
50
+ } | undefined;
51
+ operation?: {
52
+ show: boolean;
53
+ title: string;
54
+ width: number;
55
+ align: "center" | "left" | "right";
56
+ fixed: false | "left" | "right";
57
+ type: "link" | "button";
58
+ items: OperationItem[];
59
+ } | undefined;
60
+ operationContent?: {
61
+ [key: string]: React.ReactNode;
62
+ } | undefined;
63
+ dataSource: import("../../provider/dataSource/DataSourceContext").DataSourceType;
64
+ search?: {
65
+ show: boolean;
66
+ placeholder: string;
67
+ } | undefined;
68
+ __designMode: string;
69
+ componentId: string;
70
+ clickToDetail?: {
71
+ show: boolean;
72
+ useCustomAction: boolean;
73
+ actionType: string;
74
+ openMode: "modal" | "drawer";
75
+ openContentSize: "small" | "middle" | "large";
76
+ openTitle: string;
77
+ key: string;
78
+ } | undefined;
79
+ filterBy?: Record<string, any> | undefined;
80
+ sortBy: string;
81
+ tabs?: {
82
+ show: boolean;
83
+ type: string;
84
+ items: {
85
+ name: string;
86
+ filterBy: Record<string, any>;
87
+ sortBy: string;
88
+ }[];
89
+ } | undefined;
90
+ onValuesChange?: ((changedValues: any, values: any) => void) | undefined;
91
+ onDeleteFinish?: ((record: Record<string, any>) => void) | undefined;
92
+ extraParams?: {
93
+ list?: Record<string, any> | undefined;
94
+ get?: Record<string, any> | undefined;
95
+ update?: Record<string, any> | undefined;
96
+ create?: Record<string, any> | undefined;
97
+ destroy?: Record<string, any> | undefined;
98
+ } | undefined;
99
+ localSettings?: import("../../../table/types").LocalSettingsType | undefined;
100
+ };
101
+ export default useTableProps;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { InputProps } from 'antd';
3
+ import { ModeType } from '../../dataSourceForm/type';
4
+ declare type PhoneValue = string | {
5
+ phone: string;
6
+ countryCallingCode: string;
7
+ countryCode?: string;
8
+ };
9
+ export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
10
+ renderMode: ModeType;
11
+ value?: PhoneValue;
12
+ onChange?: (value: PhoneValue) => void;
13
+ returnFormat?: 'string' | 'object';
14
+ inputRef?: any;
15
+ }
16
+ declare const MobileNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
17
+ export default MobileNumberInputWithMode;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { InputProps } from 'antd';
3
+ import { ModeType } from "../../dataSourceForm/type";
4
+ declare type PhoneValue = string | {
5
+ phone: string;
6
+ countryCallingCode: string;
7
+ };
8
+ export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
9
+ renderMode: ModeType;
10
+ value?: PhoneValue;
11
+ onChange?: (value: PhoneValue) => void;
12
+ returnFormat?: 'string' | 'object';
13
+ inputRef?: any;
14
+ }
15
+ declare const PhoneNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
16
+ export default PhoneNumberInputWithMode;
@@ -1,6 +1,6 @@
1
1
  declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
2
2
  options?: any;
3
- optionSourceType?: "default" | "custom" | "api" | undefined;
3
+ optionSourceType?: "custom" | "api" | "default" | undefined;
4
4
  labelField: string;
5
5
  valueField: string;
6
6
  extraParams?: Record<string, any> | undefined;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { SwitchProps } from './type';
3
+ import './ReadPretty.less';
4
+ declare const SwitchReadPretty: React.FC<SwitchProps>;
5
+ export default SwitchReadPretty;
@@ -0,0 +1,52 @@
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/dataSourceComponents/fields/Switch/ReadPretty.tsx
30
+ var ReadPretty_exports = {};
31
+ __export(ReadPretty_exports, {
32
+ default: () => ReadPretty_default
33
+ });
34
+ module.exports = __toCommonJS(ReadPretty_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_iconfont = __toESM(require("../../../iconfont"));
37
+ var import_ReadPretty = require("./ReadPretty.less");
38
+ var SwitchReadPretty = (props) => {
39
+ const { value, checked } = props;
40
+ const isChecked = value !== void 0 ? value : checked;
41
+ return isChecked ? /* @__PURE__ */ import_react.default.createElement(
42
+ import_iconfont.default,
43
+ {
44
+ type: "pisell2-check",
45
+ style: {
46
+ color: "var(--theme-color)",
47
+ fontSize: 20
48
+ }
49
+ }
50
+ ) : null;
51
+ };
52
+ var ReadPretty_default = SwitchReadPretty;
@@ -0,0 +1,2 @@
1
+ // Switch ReadPretty styles
2
+
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const SwitchWithMode: import("react").FC<import("antd").SwitchProps & import("react").RefAttributes<HTMLElement> & import("../../dataSourceForm/utils").WithModeProps>;
3
+ export default SwitchWithMode;
@@ -0,0 +1,39 @@
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/dataSourceComponents/fields/Switch/WithMode.ts
30
+ var WithMode_exports = {};
31
+ __export(WithMode_exports, {
32
+ default: () => WithMode_default
33
+ });
34
+ module.exports = __toCommonJS(WithMode_exports);
35
+ var import_utils = require("../../dataSourceForm/utils");
36
+ var import_antd = require("antd");
37
+ var import_ReadPretty = __toESM(require("./ReadPretty"));
38
+ var SwitchWithMode = (0, import_utils.withMode)(import_antd.Switch, import_ReadPretty.default);
39
+ var WithMode_default = SwitchWithMode;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Switch: React.FC<import("antd").SwitchProps & React.RefAttributes<HTMLElement> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
3
+ export default Switch;
@@ -0,0 +1,42 @@
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/dataSourceComponents/fields/Switch/index.tsx
30
+ var Switch_exports = {};
31
+ __export(Switch_exports, {
32
+ default: () => Switch_default
33
+ });
34
+ module.exports = __toCommonJS(Switch_exports);
35
+ var import_WithMode = __toESM(require("./WithMode"));
36
+ var import_utils = require("../../dataSourceForm/utils");
37
+ var Switch = (0, import_utils.withFormItem)(import_WithMode.default, {
38
+ otherFormItemProps: {
39
+ valuePropName: "checked"
40
+ }
41
+ });
42
+ var Switch_default = Switch;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ export interface SwitchProps {
3
+ value?: boolean;
4
+ checked?: boolean;
5
+ defaultChecked?: boolean;
6
+ disabled?: boolean;
7
+ loading?: boolean;
8
+ size?: 'default' | 'small';
9
+ checkedChildren?: React.ReactNode;
10
+ unCheckedChildren?: React.ReactNode;
11
+ autoFocus?: boolean;
12
+ onChange?: (checked: boolean, event: React.MouseEvent<HTMLButtonElement>) => void;
13
+ onClick?: (checked: boolean, event: React.MouseEvent<HTMLButtonElement>) => void;
14
+ renderMode?: 'view' | 'edit' | 'disabled' | 'hidden';
15
+ [key: string]: any;
16
+ }
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/components/dataSourceComponents/fields/Switch/type.ts
16
+ var type_exports = {};
17
+ module.exports = __toCommonJS(type_exports);