@pisell/materials 1.0.1057 → 1.0.1059

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 (202) 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 +3 -3
  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 +20 -20
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +23 -23
  11. package/es/components/PisellCards/index.d.ts +3 -0
  12. package/es/components/PisellCards/index.js +3 -1
  13. package/es/components/PisellContactBrief/PisellContactBrief.d.ts +13 -0
  14. package/es/components/PisellContactBrief/PisellContactBrief.js +223 -0
  15. package/es/components/PisellContactBrief/PisellContactBrief.less +192 -0
  16. package/es/components/PisellContactBrief/PisellContactBrief.stories.d.ts +31 -0
  17. package/es/components/PisellContactBrief/PisellContactBrief.stories.js +196 -0
  18. package/es/components/PisellContactBrief/components/ContactFormModal.d.ts +23 -0
  19. package/es/components/PisellContactBrief/components/ContactFormModal.js +177 -0
  20. package/es/components/PisellContactBrief/components/index.d.ts +5 -0
  21. package/es/components/PisellContactBrief/components/index.js +4 -0
  22. package/es/components/PisellContactBrief/index.d.ts +6 -0
  23. package/es/components/PisellContactBrief/index.js +5 -0
  24. package/es/components/PisellContactBrief/locales.d.ts +55 -0
  25. package/es/components/PisellContactBrief/locales.js +54 -0
  26. package/es/components/PisellContactBrief/types.d.ts +82 -0
  27. package/es/components/PisellContactBrief/types.js +1 -0
  28. package/es/components/dataSourceComponents/fields/Tabs/Tabs.less +8 -0
  29. package/es/components/pisellActionPanel/PisellActionPanel.d.ts +13 -0
  30. package/es/components/pisellActionPanel/PisellActionPanel.js +98 -0
  31. package/es/components/pisellActionPanel/PisellActionPanel.less +69 -0
  32. package/es/components/pisellActionPanel/PisellActionPanel.stories.d.ts +19 -0
  33. package/es/components/pisellActionPanel/PisellActionPanel.stories.js +208 -0
  34. package/es/components/pisellActionPanel/index.d.ts +6 -0
  35. package/es/components/pisellActionPanel/index.js +5 -0
  36. package/es/components/pisellActionPanel/types.d.ts +83 -0
  37. package/es/components/pisellActionPanel/types.js +1 -0
  38. package/es/components/pisellBaseCard/PisellBaseCard.d.ts +8 -0
  39. package/es/components/pisellBaseCard/PisellBaseCard.js +96 -0
  40. package/es/components/pisellBaseCard/PisellBaseCard.less +25 -0
  41. package/es/components/pisellBaseCard/PisellBaseCard.stories.d.ts +19 -0
  42. package/es/components/pisellBaseCard/PisellBaseCard.stories.js +99 -0
  43. package/es/components/pisellBaseCard/index.d.ts +5 -0
  44. package/es/components/pisellBaseCard/index.js +4 -0
  45. package/es/components/pisellBaseCard/types.d.ts +45 -0
  46. package/es/components/pisellBaseCard/types.js +1 -0
  47. package/es/components/pisellCurrency/PisellCurrency.js +18 -12
  48. package/es/components/pisellCurrency/PisellCurrency.less +0 -123
  49. package/es/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +15 -0
  50. package/es/components/pisellCustomerBrief/PisellCustomerBrief.js +145 -0
  51. package/es/components/pisellCustomerBrief/PisellCustomerBrief.less +8 -0
  52. package/es/components/pisellCustomerBrief/PisellCustomerBrief.stories.d.ts +23 -0
  53. package/es/components/pisellCustomerBrief/PisellCustomerBrief.stories.js +193 -0
  54. package/es/components/pisellCustomerBrief/index.d.ts +6 -0
  55. package/es/components/pisellCustomerBrief/index.js +5 -0
  56. package/es/components/pisellCustomerBrief/types.d.ts +82 -0
  57. package/es/components/pisellCustomerBrief/types.js +1 -0
  58. package/es/components/pisellEmail/PisellEmail.js +48 -42
  59. package/es/components/pisellEmail/PisellEmail.less +0 -92
  60. package/es/components/pisellEntityCard/PisellEntityCard.d.ts +8 -0
  61. package/es/components/pisellEntityCard/PisellEntityCard.js +474 -0
  62. package/es/components/pisellEntityCard/PisellEntityCard.less +362 -0
  63. package/es/components/pisellEntityCard/PisellEntityCard.stories.d.ts +47 -0
  64. package/es/components/pisellEntityCard/PisellEntityCard.stories.js +450 -0
  65. package/es/components/pisellEntityCard/index.d.ts +5 -0
  66. package/es/components/pisellEntityCard/index.js +4 -0
  67. package/es/components/pisellEntityCard/types.d.ts +144 -0
  68. package/es/components/pisellEntityCard/types.js +1 -0
  69. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +32 -4
  70. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +4 -2
  71. package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +4 -0
  72. package/es/components/pisellFloorMapLayout/components/ViewControls.js +12 -2
  73. package/es/components/pisellFloorMapLayout/types.d.ts +2 -0
  74. package/es/components/pisellLongText/PisellLongText.js +18 -12
  75. package/es/components/pisellLongText/PisellLongText.less +0 -67
  76. package/es/components/pisellLookup/PisellLookup.js +8 -1
  77. package/es/components/pisellMultipleSelect/PisellMultipleSelect.js +14 -6
  78. package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +18 -139
  79. package/es/components/pisellMultipleSelect/components/EditView.js +1 -0
  80. package/es/components/pisellNumber/PisellNumber.js +18 -12
  81. package/es/components/pisellNumber/PisellNumber.less +0 -103
  82. package/es/components/pisellPhone/PisellPhone.js +18 -12
  83. package/es/components/pisellPhone/PisellPhone.less +0 -119
  84. package/es/components/pisellPhone/components/EditView.js +44 -33
  85. package/es/components/pisellPhone/constants/countryCodes.d.ts +1 -0
  86. package/es/components/pisellPhone/constants/countryCodes.js +26 -25
  87. package/es/components/pisellPhone/types.d.ts +2 -2
  88. package/es/components/pisellPhone/utils/countryCodeHelper.d.ts +4 -4
  89. package/es/components/pisellPhone/utils/countryCodeHelper.js +5 -5
  90. package/es/components/pisellRating/PisellRating.js +7 -3
  91. package/es/components/pisellSingleLineText/PisellSingleLineText.js +27 -20
  92. package/es/components/pisellSingleLineText/PisellSingleLineText.less +58 -201
  93. package/es/components/pisellSingleSelect/PisellSingleSelect.js +14 -5
  94. package/es/components/pisellSingleSelect/PisellSingleSelect.less +5 -106
  95. package/es/components/pisellUrl/PisellUrl.js +48 -42
  96. package/es/components/pisellWalletPassCard/index.js +2 -1
  97. package/es/index.d.ts +15 -4
  98. package/es/index.js +8 -4
  99. package/es/theme/pisell-components.d.ts +14 -0
  100. package/es/theme/pisell-components.js +74 -0
  101. package/lib/components/PisellCards/index.d.ts +3 -0
  102. package/lib/components/PisellCards/index.js +3 -1
  103. package/lib/components/PisellContactBrief/PisellContactBrief.d.ts +13 -0
  104. package/lib/components/PisellContactBrief/PisellContactBrief.js +231 -0
  105. package/lib/components/PisellContactBrief/PisellContactBrief.less +192 -0
  106. package/lib/components/PisellContactBrief/PisellContactBrief.stories.d.ts +31 -0
  107. package/lib/components/PisellContactBrief/PisellContactBrief.stories.js +188 -0
  108. package/lib/components/PisellContactBrief/components/ContactFormModal.d.ts +23 -0
  109. package/lib/components/PisellContactBrief/components/ContactFormModal.js +154 -0
  110. package/lib/components/PisellContactBrief/components/index.d.ts +5 -0
  111. package/lib/components/PisellContactBrief/components/index.js +29 -0
  112. package/lib/components/PisellContactBrief/index.d.ts +6 -0
  113. package/lib/components/PisellContactBrief/index.js +29 -0
  114. package/lib/components/PisellContactBrief/locales.d.ts +55 -0
  115. package/lib/components/PisellContactBrief/locales.js +74 -0
  116. package/lib/components/PisellContactBrief/types.d.ts +82 -0
  117. package/lib/components/PisellContactBrief/types.js +17 -0
  118. package/lib/components/dataSourceComponents/fields/Tabs/Tabs.less +8 -0
  119. package/lib/components/pisellActionPanel/PisellActionPanel.d.ts +13 -0
  120. package/lib/components/pisellActionPanel/PisellActionPanel.js +124 -0
  121. package/lib/components/pisellActionPanel/PisellActionPanel.less +69 -0
  122. package/lib/components/pisellActionPanel/PisellActionPanel.stories.d.ts +19 -0
  123. package/lib/components/pisellActionPanel/PisellActionPanel.stories.js +186 -0
  124. package/lib/components/pisellActionPanel/index.d.ts +6 -0
  125. package/lib/components/pisellActionPanel/index.js +29 -0
  126. package/lib/components/pisellActionPanel/types.d.ts +83 -0
  127. package/lib/components/pisellActionPanel/types.js +17 -0
  128. package/lib/components/pisellBaseCard/PisellBaseCard.d.ts +8 -0
  129. package/lib/components/pisellBaseCard/PisellBaseCard.js +124 -0
  130. package/lib/components/pisellBaseCard/PisellBaseCard.less +25 -0
  131. package/lib/components/pisellBaseCard/PisellBaseCard.stories.d.ts +19 -0
  132. package/lib/components/pisellBaseCard/PisellBaseCard.stories.js +107 -0
  133. package/lib/components/pisellBaseCard/index.d.ts +5 -0
  134. package/lib/components/pisellBaseCard/index.js +29 -0
  135. package/lib/components/pisellBaseCard/types.d.ts +45 -0
  136. package/lib/components/pisellBaseCard/types.js +17 -0
  137. package/lib/components/pisellCurrency/PisellCurrency.js +16 -10
  138. package/lib/components/pisellCurrency/PisellCurrency.less +0 -123
  139. package/lib/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +15 -0
  140. package/lib/components/pisellCustomerBrief/PisellCustomerBrief.js +143 -0
  141. package/lib/components/pisellCustomerBrief/PisellCustomerBrief.less +8 -0
  142. package/lib/components/pisellCustomerBrief/PisellCustomerBrief.stories.d.ts +23 -0
  143. package/lib/components/pisellCustomerBrief/PisellCustomerBrief.stories.js +171 -0
  144. package/lib/components/pisellCustomerBrief/index.d.ts +6 -0
  145. package/lib/components/pisellCustomerBrief/index.js +29 -0
  146. package/lib/components/pisellCustomerBrief/types.d.ts +82 -0
  147. package/lib/components/pisellCustomerBrief/types.js +17 -0
  148. package/lib/components/pisellEmail/PisellEmail.js +16 -10
  149. package/lib/components/pisellEmail/PisellEmail.less +0 -92
  150. package/lib/components/pisellEntityCard/PisellEntityCard.d.ts +8 -0
  151. package/lib/components/pisellEntityCard/PisellEntityCard.js +426 -0
  152. package/lib/components/pisellEntityCard/PisellEntityCard.less +362 -0
  153. package/lib/components/pisellEntityCard/PisellEntityCard.stories.d.ts +47 -0
  154. package/lib/components/pisellEntityCard/PisellEntityCard.stories.js +349 -0
  155. package/lib/components/pisellEntityCard/index.d.ts +5 -0
  156. package/lib/components/pisellEntityCard/index.js +29 -0
  157. package/lib/components/pisellEntityCard/types.d.ts +144 -0
  158. package/lib/components/pisellEntityCard/types.js +17 -0
  159. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +22 -3
  160. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +2 -2
  161. package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +4 -0
  162. package/lib/components/pisellFloorMapLayout/components/ViewControls.js +11 -1
  163. package/lib/components/pisellFloorMapLayout/types.d.ts +2 -0
  164. package/lib/components/pisellLongText/PisellLongText.js +16 -10
  165. package/lib/components/pisellLongText/PisellLongText.less +0 -67
  166. package/lib/components/pisellLookup/PisellLookup.js +5 -1
  167. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.js +62 -53
  168. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +18 -139
  169. package/lib/components/pisellMultipleSelect/components/EditView.js +42 -30
  170. package/lib/components/pisellNumber/PisellNumber.js +16 -10
  171. package/lib/components/pisellNumber/PisellNumber.less +0 -103
  172. package/lib/components/pisellPhone/PisellPhone.js +16 -10
  173. package/lib/components/pisellPhone/PisellPhone.less +0 -119
  174. package/lib/components/pisellPhone/components/EditView.js +40 -24
  175. package/lib/components/pisellPhone/constants/countryCodes.d.ts +1 -0
  176. package/lib/components/pisellPhone/constants/countryCodes.js +24 -24
  177. package/lib/components/pisellPhone/types.d.ts +2 -2
  178. package/lib/components/pisellPhone/utils/countryCodeHelper.d.ts +4 -4
  179. package/lib/components/pisellPhone/utils/countryCodeHelper.js +1 -1
  180. package/lib/components/pisellRating/PisellRating.js +4 -2
  181. package/lib/components/pisellSingleLineText/PisellSingleLineText.js +16 -10
  182. package/lib/components/pisellSingleLineText/PisellSingleLineText.less +58 -201
  183. package/lib/components/pisellSingleSelect/PisellSingleSelect.js +34 -35
  184. package/lib/components/pisellSingleSelect/PisellSingleSelect.less +5 -106
  185. package/lib/components/pisellUrl/PisellUrl.js +16 -10
  186. package/lib/components/pisellWalletPassCard/index.js +1 -1
  187. package/lib/index.d.ts +15 -4
  188. package/lib/index.js +18 -3
  189. package/lib/theme/pisell-components.d.ts +14 -0
  190. package/lib/theme/pisell-components.js +89 -0
  191. package/lowcode/pisell-action-panel/meta.ts +146 -0
  192. package/lowcode/pisell-action-panel/snippets.ts +42 -0
  193. package/lowcode/pisell-base-card/meta.ts +98 -0
  194. package/lowcode/pisell-base-card/snippets.ts +13 -0
  195. package/lowcode/pisell-contact-brief/meta.ts +178 -0
  196. package/lowcode/pisell-contact-brief/snippets.ts +40 -0
  197. package/lowcode/pisell-customer-brief/meta.ts +262 -0
  198. package/lowcode/pisell-customer-brief/snippets.ts +46 -0
  199. package/lowcode/pisell-entity-card/meta.ts +296 -0
  200. package/lowcode/pisell-entity-card/snippets.ts +41 -0
  201. package/lowcode/pisell-floor-map-layout/meta.ts +37 -1
  202. package/package.json +4 -4
@@ -0,0 +1,143 @@
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/pisellCustomerBrief/PisellCustomerBrief.tsx
30
+ var PisellCustomerBrief_exports = {};
31
+ __export(PisellCustomerBrief_exports, {
32
+ PisellCustomerBrief: () => PisellCustomerBrief
33
+ });
34
+ module.exports = __toCommonJS(PisellCustomerBrief_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_pisellEntityCard = require("../pisellEntityCard");
37
+ var import_PisellCustomerBrief = require("./PisellCustomerBrief.less");
38
+ function PisellCustomerBrief({
39
+ name,
40
+ subtitle,
41
+ avatar,
42
+ email,
43
+ address,
44
+ company,
45
+ date,
46
+ extendedFields = [],
47
+ tags = [],
48
+ actions = [],
49
+ showActions = false,
50
+ showAvatar = true,
51
+ showPrimaryText = true,
52
+ showSubtitle = true,
53
+ showExtended = true,
54
+ showTags = true,
55
+ density = "B2",
56
+ layout = "horizontal",
57
+ width = "content",
58
+ swipeToDelete = false,
59
+ onDelete,
60
+ tagPosition = "below",
61
+ contentGap,
62
+ primaryLineClamp,
63
+ secondaryLineClamp,
64
+ renderMedia,
65
+ renderPrimary,
66
+ renderSubtitle,
67
+ renderSecondary,
68
+ renderTags,
69
+ renderActions,
70
+ className,
71
+ style,
72
+ hoverStyle,
73
+ activeStyle,
74
+ disabledStyle,
75
+ clickable = true,
76
+ disabled = false,
77
+ onClick
78
+ }) {
79
+ const media = (0, import_react.useMemo)(() => {
80
+ if (!showAvatar) return void 0;
81
+ return {
82
+ type: "avatar",
83
+ src: avatar,
84
+ alt: name,
85
+ size: 40,
86
+ shape: "circle"
87
+ };
88
+ }, [showAvatar, avatar, name]);
89
+ const secondaryTexts = (0, import_react.useMemo)(() => {
90
+ if (!showExtended) return [];
91
+ const list = [];
92
+ if (email) list.push({ text: email });
93
+ if (address) list.push({ text: address });
94
+ if (company) list.push({ text: company });
95
+ if (date) list.push({ text: date });
96
+ extendedFields.forEach((f) => list.push({ text: f.text, showTooltip: f.showTooltip }));
97
+ return list;
98
+ }, [showExtended, email, address, company, date, extendedFields]);
99
+ return /* @__PURE__ */ import_react.default.createElement(
100
+ import_pisellEntityCard.PisellEntityCard,
101
+ {
102
+ className: `pisell-customer-brief-root ${className ?? ""}`.trim(),
103
+ style,
104
+ hoverStyle,
105
+ activeStyle,
106
+ disabledStyle,
107
+ clickable,
108
+ disabled,
109
+ onClick,
110
+ media,
111
+ primaryText: name,
112
+ subtitleText: subtitle,
113
+ secondaryTexts,
114
+ tags,
115
+ actions,
116
+ showMedia: showAvatar,
117
+ showPrimaryText,
118
+ showSubtitle,
119
+ showSecondaryText: showExtended,
120
+ showTags,
121
+ showActions,
122
+ density,
123
+ layout,
124
+ width,
125
+ swipeToDelete,
126
+ onDelete,
127
+ tagPosition,
128
+ contentGap,
129
+ primaryLineClamp,
130
+ secondaryLineClamp,
131
+ renderMedia,
132
+ renderPrimary,
133
+ renderSubtitle,
134
+ renderSecondary,
135
+ renderTags,
136
+ renderActions
137
+ }
138
+ );
139
+ }
140
+ // Annotate the CommonJS export names for ESM import in node:
141
+ 0 && (module.exports = {
142
+ PisellCustomerBrief
143
+ });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * PisellCustomerBrief 组件样式
3
+ * 基于 Entity Card 结构,仅做根类名作用域;具体样式由 PisellEntityCard 提供
4
+ */
5
+
6
+ .pisell-customer-brief-root {
7
+ /* 客户卡片根节点,扩展时可在此追加样式 */
8
+ }
@@ -0,0 +1,23 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { PisellCustomerBrief } from './PisellCustomerBrief';
3
+ declare const meta: Meta<typeof PisellCustomerBrief>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof PisellCustomerBrief>;
6
+ /** 默认:客户名称 + 副标题 + 扩展信息 + 标签 */
7
+ export declare const Default: Story;
8
+ /** 无头像(默认占位) */
9
+ export declare const NoAvatar: Story;
10
+ /** 有头像 */
11
+ export declare const WithAvatar: Story;
12
+ /** B5 密度:扩展信息多行 */
13
+ export declare const B5Extended: Story;
14
+ /** 带操作区:图标 + 文本 + 按钮 */
15
+ export declare const WithActions: Story;
16
+ /** 竖向布局 */
17
+ export declare const VerticalLayout: Story;
18
+ /** 左滑删除 */
19
+ export declare const SwipeToDelete: Story;
20
+ /** 可点击卡片 */
21
+ export declare const Clickable: Story;
22
+ /** 禁用态 */
23
+ export declare const Disabled: Story;
@@ -0,0 +1,171 @@
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/pisellCustomerBrief/PisellCustomerBrief.stories.tsx
20
+ var PisellCustomerBrief_stories_exports = {};
21
+ __export(PisellCustomerBrief_stories_exports, {
22
+ B5Extended: () => B5Extended,
23
+ Clickable: () => Clickable,
24
+ Default: () => Default,
25
+ Disabled: () => Disabled,
26
+ NoAvatar: () => NoAvatar,
27
+ SwipeToDelete: () => SwipeToDelete,
28
+ VerticalLayout: () => VerticalLayout,
29
+ WithActions: () => WithActions,
30
+ WithAvatar: () => WithAvatar,
31
+ default: () => PisellCustomerBrief_stories_default
32
+ });
33
+ module.exports = __toCommonJS(PisellCustomerBrief_stories_exports);
34
+ var import_icons = require("@ant-design/icons");
35
+ var import_PisellCustomerBrief = require("./PisellCustomerBrief");
36
+ var meta = {
37
+ title: "Data Display/PisellCustomerBrief",
38
+ component: import_PisellCustomerBrief.PisellCustomerBrief,
39
+ tags: ["autodocs"],
40
+ decorators: [
41
+ (Story) => /* @__PURE__ */ React.createElement("div", { style: { width: 340 } }, /* @__PURE__ */ React.createElement(Story, null))
42
+ ],
43
+ argTypes: {
44
+ density: {
45
+ description: "信息密度",
46
+ control: "select",
47
+ options: ["B1", "B2", "B5", "B9"]
48
+ },
49
+ layout: {
50
+ description: "布局方向",
51
+ control: "radio",
52
+ options: ["horizontal", "vertical"]
53
+ },
54
+ showAvatar: { description: "显示头像", control: "boolean" },
55
+ showExtended: { description: "显示扩展信息", control: "boolean" },
56
+ showTags: { description: "显示标签", control: "boolean" },
57
+ showActions: { description: "显示操作区", control: "boolean" }
58
+ },
59
+ args: {
60
+ name: "某某科技有限公司"
61
+ }
62
+ };
63
+ var PisellCustomerBrief_stories_default = meta;
64
+ var Default = {
65
+ args: {
66
+ name: "某某科技有限公司",
67
+ subtitle: "+86 138 0000 0000",
68
+ email: "contact@company.com",
69
+ company: "某某科技有限公司",
70
+ tags: [{ text: "VIP" }, { text: "已签约" }],
71
+ density: "B2",
72
+ layout: "horizontal"
73
+ }
74
+ };
75
+ var NoAvatar = {
76
+ args: {
77
+ name: "新客户",
78
+ subtitle: "待完善信息"
79
+ }
80
+ };
81
+ var WithAvatar = {
82
+ args: {
83
+ name: "某某科技有限公司",
84
+ subtitle: "客户编号 C001",
85
+ avatar: "https://ui-avatars.com/api/?name=Company&background=4a90d9&color=fff&size=40",
86
+ email: "contact@company.com",
87
+ company: "某某科技有限公司",
88
+ tags: [{ text: "VIP" }]
89
+ }
90
+ };
91
+ var B5Extended = {
92
+ args: {
93
+ name: "某某科技有限公司",
94
+ subtitle: "+86 138 0000 0000",
95
+ email: "contact@company.com",
96
+ address: "浙江省杭州市余杭区",
97
+ company: "某某科技有限公司",
98
+ date: "2024-01-15 创建",
99
+ extendedFields: [
100
+ { text: "自定义属性 A" },
101
+ { text: "自定义属性 B", showTooltip: true }
102
+ ],
103
+ tags: [{ text: "VIP" }, { text: "已签约" }],
104
+ density: "B5",
105
+ layout: "horizontal"
106
+ }
107
+ };
108
+ var WithActions = {
109
+ args: {
110
+ name: "某某科技有限公司",
111
+ subtitle: "contact@company.com",
112
+ email: "contact@company.com",
113
+ company: "某某科技有限公司",
114
+ tags: [{ text: "VIP" }],
115
+ showActions: true,
116
+ actions: [
117
+ { type: "icon", icon: /* @__PURE__ */ React.createElement(import_icons.EditOutlined, null), onClick: () => console.log("编辑") },
118
+ { type: "text", label: "查看详情", onClick: () => console.log("查看详情") },
119
+ { type: "button", label: "选择", onClick: () => console.log("选择") }
120
+ ]
121
+ }
122
+ };
123
+ var VerticalLayout = {
124
+ args: {
125
+ name: "某某科技有限公司",
126
+ subtitle: "客户编号 C001",
127
+ avatar: "https://ui-avatars.com/api/?name=Company&background=4a90d9&color=fff&size=64",
128
+ email: "contact@company.com",
129
+ company: "某某科技有限公司",
130
+ tags: [{ text: "VIP" }],
131
+ density: "B2",
132
+ layout: "vertical"
133
+ }
134
+ };
135
+ var SwipeToDelete = {
136
+ args: {
137
+ name: "某某科技有限公司",
138
+ subtitle: "+86 138 0000 0000",
139
+ email: "contact@company.com",
140
+ swipeToDelete: true,
141
+ onDelete: () => console.log("onDelete")
142
+ }
143
+ };
144
+ var Clickable = {
145
+ args: {
146
+ name: "某某科技有限公司",
147
+ subtitle: "点击整卡",
148
+ email: "contact@company.com",
149
+ onClick: () => console.log("卡片被点击")
150
+ }
151
+ };
152
+ var Disabled = {
153
+ args: {
154
+ name: "某某科技有限公司",
155
+ subtitle: "+86 138 0000 0000",
156
+ email: "contact@company.com",
157
+ disabled: true
158
+ }
159
+ };
160
+ // Annotate the CommonJS export names for ESM import in node:
161
+ 0 && (module.exports = {
162
+ B5Extended,
163
+ Clickable,
164
+ Default,
165
+ Disabled,
166
+ NoAvatar,
167
+ SwipeToDelete,
168
+ VerticalLayout,
169
+ WithActions,
170
+ WithAvatar
171
+ });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * PisellCustomerBrief 组件导出
3
+ * 客户简要卡片,基于 PisellEntityCard
4
+ */
5
+ export { PisellCustomerBrief } from './PisellCustomerBrief';
6
+ export type { PisellCustomerBriefProps, CustomerBriefExtendedField } from './types';
@@ -0,0 +1,29 @@
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/pisellCustomerBrief/index.tsx
20
+ var pisellCustomerBrief_exports = {};
21
+ __export(pisellCustomerBrief_exports, {
22
+ PisellCustomerBrief: () => import_PisellCustomerBrief.PisellCustomerBrief
23
+ });
24
+ module.exports = __toCommonJS(pisellCustomerBrief_exports);
25
+ var import_PisellCustomerBrief = require("./PisellCustomerBrief");
26
+ // Annotate the CommonJS export names for ESM import in node:
27
+ 0 && (module.exports = {
28
+ PisellCustomerBrief
29
+ });
@@ -0,0 +1,82 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { PisellBaseCardProps } from '../pisellBaseCard/types';
3
+ import type { EntityCardActionItem, EntityCardDensity, EntityCardLayout, EntityCardTagItem, EntityCardWidth } from '../pisellEntityCard/types';
4
+ /**
5
+ * 客户简要卡片扩展字段项(用于 B5/B9 等多行展示)
6
+ * 与 Entity Card 的 secondaryTexts 对应,语义为客户领域
7
+ */
8
+ export interface CustomerBriefExtendedField {
9
+ /** 展示文案(如 Email、Address、Company、Date、自定义属性) */
10
+ text: string;
11
+ /** 是否显示提示图标 */
12
+ showTooltip?: boolean;
13
+ }
14
+ /**
15
+ * PisellCustomerBrief 组件 Props
16
+ * 基于 PisellEntityCard,用于展示客户(Customer)实体的核心识别信息与客户级属性
17
+ * 设计文档:Customer Info (pcl_customerInfon_V1.0)
18
+ */
19
+ export interface PisellCustomerBriefProps extends Pick<PisellBaseCardProps, 'className' | 'style' | 'hoverStyle' | 'activeStyle' | 'disabledStyle' | 'clickable' | 'disabled' | 'onClick'> {
20
+ /** 客户名称(主文案) */
21
+ name: string;
22
+ /** 副标题,与主标题同行(如电话、客户编号) */
23
+ subtitle?: string;
24
+ /** 头像图片地址;不传则显示默认占位 Avatar */
25
+ avatar?: string;
26
+ /** 邮箱 */
27
+ email?: string;
28
+ /** 地址 */
29
+ address?: string;
30
+ /** 公司 */
31
+ company?: string;
32
+ /** 日期类信息(如创建日期、跟进日期) */
33
+ date?: string;
34
+ /** 自定义扩展字段,顺序即展示顺序 */
35
+ extendedFields?: CustomerBriefExtendedField[];
36
+ /** 标签列表(如等级、状态) */
37
+ tags?: EntityCardTagItem[];
38
+ /** 操作项:仅图标 / 图标+文本 / 按钮 */
39
+ actions?: EntityCardActionItem[];
40
+ /** 是否显示操作区 @default false */
41
+ showActions?: boolean;
42
+ /** 是否显示头像 @default true */
43
+ showAvatar?: boolean;
44
+ /** 是否显示主文案 @default true */
45
+ showPrimaryText?: boolean;
46
+ /** 是否显示副标题 @default true */
47
+ showSubtitle?: boolean;
48
+ /** 是否显示扩展信息(email/address/company/date/extendedFields) @default true */
49
+ showExtended?: boolean;
50
+ /** 是否显示标签 @default true */
51
+ showTags?: boolean;
52
+ /** 信息密度 @default 'B2' */
53
+ density?: EntityCardDensity;
54
+ /** 布局方向 @default 'horizontal' */
55
+ layout?: EntityCardLayout;
56
+ /** 卡片宽度 @default 'content' */
57
+ width?: EntityCardWidth;
58
+ /** 是否开启左滑删除 @default false */
59
+ swipeToDelete?: boolean;
60
+ /** 左滑删除回调 */
61
+ onDelete?: () => void;
62
+ /** 标签位置 @default 'below' */
63
+ tagPosition?: 'inline' | 'below';
64
+ /** 内容区间距 */
65
+ contentGap?: number | string;
66
+ /** 主文案行数限制 */
67
+ primaryLineClamp?: number;
68
+ /** 扩展信息行数限制(按密度有默认值) */
69
+ secondaryLineClamp?: number;
70
+ /** 自定义渲染媒体区 */
71
+ renderMedia?: () => ReactNode;
72
+ /** 自定义渲染主文案区 */
73
+ renderPrimary?: () => ReactNode;
74
+ /** 自定义渲染副标题区 */
75
+ renderSubtitle?: () => ReactNode;
76
+ /** 自定义渲染扩展信息区 */
77
+ renderSecondary?: () => ReactNode;
78
+ /** 自定义渲染标签区 */
79
+ renderTags?: () => ReactNode;
80
+ /** 自定义渲染操作区 */
81
+ renderActions?: () => ReactNode;
82
+ }
@@ -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/pisellCustomerBrief/types.ts
16
+ var types_exports = {};
17
+ module.exports = __toCommonJS(types_exports);
@@ -34,24 +34,30 @@ __export(PisellEmail_exports, {
34
34
  });
35
35
  module.exports = __toCommonJS(PisellEmail_exports);
36
36
  var import_react = __toESM(require("react"));
37
+ var import_antd = require("antd");
37
38
  var import_utils = require("@pisell/utils");
38
39
  var import_ReadOnlyView = __toESM(require("./components/ReadOnlyView"));
39
40
  var import_EditView = __toESM(require("./components/EditView"));
40
41
  var import_DisabledView = __toESM(require("./components/DisabledView"));
42
+ var import_pisell_components = require("../../theme/pisell-components");
41
43
  var import_PisellEmail = require("./PisellEmail.less");
42
44
  var PisellEmail = (props) => {
43
45
  const { mode = "edit", disabled = false } = props;
44
46
  const displayState = (0, import_utils.getDisplayState)(mode, disabled);
45
- switch (displayState) {
46
- case "read":
47
- return /* @__PURE__ */ import_react.default.createElement(import_ReadOnlyView.default, { ...props });
48
- case "edit":
49
- return /* @__PURE__ */ import_react.default.createElement(import_EditView.default, { ...props });
50
- case "disabled":
51
- return /* @__PURE__ */ import_react.default.createElement(import_DisabledView.default, { ...props });
52
- default:
53
- return null;
54
- }
47
+ const render = () => {
48
+ switch (displayState) {
49
+ case "read":
50
+ return /* @__PURE__ */ import_react.default.createElement(import_ReadOnlyView.default, { ...props });
51
+ case "edit":
52
+ return /* @__PURE__ */ import_react.default.createElement(import_EditView.default, { ...props });
53
+ case "disabled":
54
+ return /* @__PURE__ */ import_react.default.createElement(import_DisabledView.default, { ...props });
55
+ default:
56
+ return null;
57
+ }
58
+ };
59
+ const theme = (0, import_pisell_components.getPisellComponentsThemeConfig)();
60
+ return /* @__PURE__ */ import_react.default.createElement(import_antd.ConfigProvider, { theme }, render());
55
61
  };
56
62
  var PisellEmail_default = import_react.default.memo(PisellEmail, (prevProps, nextProps) => {
57
63
  return prevProps.value === nextProps.value && prevProps.mode === nextProps.mode && prevProps.disabled === nextProps.disabled && prevProps.enableAutoComplete === nextProps.enableAutoComplete;
@@ -7,98 +7,6 @@
7
7
  &-edit {
8
8
  position: relative;
9
9
  width: 100%;
10
-
11
- // 仅对 affix-wrapper 设边框,避免与内层 input 双边框(Figma 设计规范)
12
- .pisell-lowcode-input-affix-wrapper {
13
- font-size: 16px !important;
14
- line-height: 24px !important;
15
- border-radius: 8px !important;
16
- border: 1px solid #d0d5dd !important; // Gray/300
17
- padding: 0 !important;
18
- height: 48px !important;
19
- color: #101828 !important; // Gray/900
20
- background-color: #ffffff !important;
21
-
22
- &:focus,
23
- &:focus-within {
24
- border-color: #d6bbfb !important; // Primary/300
25
- box-shadow: 0 0 0 4px #f4ebff !important; // Primary/100
26
- outline: none !important;
27
- }
28
-
29
- &:hover:not(:focus):not(:focus-within):not([disabled]) {
30
- border-color: #b692f6 !important; // Primary/400
31
- }
32
-
33
- &[disabled],
34
- &.pisell-lowcode-input-disabled {
35
- background-color: #f9fafb !important; // Gray/50
36
- color: #98a2b3 !important; // Gray/400
37
- border-color: #d0d5dd !important;
38
- cursor: not-allowed !important;
39
- }
40
- }
41
-
42
- // 内层 input(无边框,由 wrapper 统一描边)
43
- .pisell-lowcode-input-affix-wrapper .pisell-lowcode-input {
44
- &::placeholder {
45
- color: #667085 !important; // Gray/500
46
- }
47
- }
48
-
49
- // 带前缀(邮箱图标)的 Input 容器
50
- .pisell-lowcode-input-affix-wrapper {
51
-
52
- .pisell-lowcode-input-prefix {
53
- margin-right: 8px;
54
- margin-left: 16px;
55
- color: #667085; // Gray/500
56
- font-size: 16px;
57
- }
58
-
59
- .pisell-lowcode-input-suffix {
60
- margin-left: 8px;
61
- margin-right: 16px;
62
- color: #667085;
63
- font-size: 16px;
64
- }
65
-
66
- .pisell-lowcode-input {
67
- padding: 12px 0 !important;
68
- border: none !important;
69
- box-shadow: none !important;
70
-
71
- &:focus {
72
- box-shadow: none !important;
73
- }
74
- }
75
- }
76
-
77
- // 清空按钮
78
- .pisell-lowcode-input-clear-icon {
79
- color: #667085 !important;
80
- font-size: 14px !important;
81
-
82
- &:hover {
83
- color: #344054 !important; // Gray/700
84
- }
85
- }
86
-
87
- // 错误状态
88
- .pisell-lowcode-input-status-error,
89
- .pisell-lowcode-input-affix-wrapper-status-error {
90
- border-color: #fda29b !important; // Error/300
91
-
92
- &:focus,
93
- &:focus-within {
94
- border-color: #f97066 !important; // Error/400
95
- box-shadow: 0 0 0 4px #fee4e2 !important; // Error/100
96
- }
97
-
98
- &:hover:not(:focus):not(:focus-within) {
99
- border-color: #f97066 !important; // Error/400
100
- }
101
- }
102
10
  }
103
11
 
104
12
  // 错误提示(与设计体系一致)
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import type { PisellEntityCardProps } from './types';
3
+ import './PisellEntityCard.less';
4
+ /**
5
+ * PisellEntityCard 实体卡片
6
+ * 基于 PisellBaseCard,使用结构化配置展示实体信息,支持密度、布局、左滑删除与插槽
7
+ */
8
+ export declare function PisellEntityCard({ children, className, style, hoverStyle, activeStyle, disabledStyle, clickable, disabled, onClick, media, primaryText, subtitleText, secondaryTexts, tags, actions, showMedia, showPrimaryText, showSubtitle, showSecondaryText, showTags, showActions, density, layout, width, swipeToDelete, onDelete, tagPosition, contentGap, primaryLineClamp, secondaryLineClamp: secondaryLineClampProp, renderMedia, renderPrimary, renderSubtitle, renderSecondary, renderTags, renderActions, }: PisellEntityCardProps): JSX.Element;