@pisell/materials 2.2.41 → 2.2.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 (137) hide show
  1. package/es/components/TimeResourceSelector/index.d.ts +21 -0
  2. package/es/components/TimeResourceSelector/index.js +115 -0
  3. package/es/components/TimeResourceSelector/index.less +59 -0
  4. package/es/components/pisellAnchor/index.d.ts +15 -0
  5. package/es/components/pisellAnchor/index.js +126 -0
  6. package/es/components/pisellAnchor/index.less +177 -0
  7. package/es/components/pisellAvatar/index.d.ts +19 -0
  8. package/es/components/pisellAvatar/index.js +90 -0
  9. package/es/components/pisellAvatar/index.less +26 -0
  10. package/es/components/pisellCard/index.d.ts +8 -0
  11. package/es/components/pisellCard/index.js +34 -5
  12. package/es/components/pisellCard/index.less +31 -4
  13. package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  14. package/es/components/pisellCustomCheckboxGroup/index.js +72 -0
  15. package/es/components/pisellCustomCheckboxGroup/index.less +0 -0
  16. package/es/components/pisellDropdown/index.d.ts +20 -0
  17. package/es/components/pisellDropdown/index.js +51 -0
  18. package/es/components/pisellDropdown/index.less +44 -0
  19. package/es/components/pisellEmpty/index.d.ts +2 -1
  20. package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
  21. package/es/components/pisellHeaderProgressBar/index.js +76 -0
  22. package/es/components/pisellHeaderProgressBar/index.less +18 -0
  23. package/es/components/pisellImageCarousels/index.d.ts +18 -0
  24. package/es/components/pisellImageCarousels/index.js +108 -0
  25. package/es/components/pisellImageCarousels/index.less +92 -0
  26. package/es/components/pisellList01/index.d.ts +17 -0
  27. package/es/components/pisellList01/index.js +105 -0
  28. package/es/components/pisellList01/index.less +53 -0
  29. package/es/components/pisellSectionHeaders/index.d.ts +21 -0
  30. package/es/components/pisellSectionHeaders/index.js +35 -0
  31. package/es/components/pisellSectionHeaders/index.less +46 -0
  32. package/es/components/pisellViewGrid/index.d.ts +16 -0
  33. package/es/components/pisellViewGrid/index.js +66 -0
  34. package/es/components/pisellViewGrid/index.less +31 -0
  35. package/es/components/productCard/components/Header/index.js +3 -2
  36. package/es/components/productCard/hooks/useOpenNote.js +3 -2
  37. package/es/components/productCard/index.js +7 -3
  38. package/es/components/productCard/index.less +6 -2
  39. package/es/components/productCard/status.js +3 -1
  40. package/es/components/productCard/types.d.ts +2 -0
  41. package/es/components/productCard/utils.js +17 -1
  42. package/es/components/section-footers/index.d.ts +9 -0
  43. package/es/components/section-footers/index.js +17 -0
  44. package/es/components/section-footers/index.less +5 -0
  45. package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  46. package/es/components/table/Actions/component/ExportImport/utils/index.js +11 -0
  47. package/es/index.d.ts +10 -0
  48. package/es/index.js +11 -1
  49. package/lib/components/TimeResourceSelector/index.d.ts +21 -0
  50. package/lib/components/TimeResourceSelector/index.js +109 -0
  51. package/lib/components/TimeResourceSelector/index.less +59 -0
  52. package/lib/components/pisellAnchor/index.d.ts +15 -0
  53. package/lib/components/pisellAnchor/index.js +120 -0
  54. package/lib/components/pisellAnchor/index.less +177 -0
  55. package/lib/components/pisellAvatar/index.d.ts +19 -0
  56. package/lib/components/pisellAvatar/index.js +108 -0
  57. package/lib/components/pisellAvatar/index.less +26 -0
  58. package/lib/components/pisellCard/index.d.ts +8 -0
  59. package/lib/components/pisellCard/index.js +30 -7
  60. package/lib/components/pisellCard/index.less +31 -4
  61. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  62. package/lib/components/pisellCustomCheckboxGroup/index.js +71 -0
  63. package/lib/components/pisellCustomCheckboxGroup/index.less +0 -0
  64. package/lib/components/pisellDropdown/index.d.ts +20 -0
  65. package/lib/components/pisellDropdown/index.js +72 -0
  66. package/lib/components/pisellDropdown/index.less +44 -0
  67. package/lib/components/pisellEmpty/index.d.ts +2 -1
  68. package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
  69. package/lib/components/pisellHeaderProgressBar/index.js +88 -0
  70. package/lib/components/pisellHeaderProgressBar/index.less +18 -0
  71. package/lib/components/pisellImageCarousels/index.d.ts +18 -0
  72. package/lib/components/pisellImageCarousels/index.js +108 -0
  73. package/lib/components/pisellImageCarousels/index.less +92 -0
  74. package/lib/components/pisellList01/index.d.ts +17 -0
  75. package/lib/components/pisellList01/index.js +113 -0
  76. package/lib/components/pisellList01/index.less +53 -0
  77. package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
  78. package/lib/components/pisellSectionHeaders/index.js +52 -0
  79. package/lib/components/pisellSectionHeaders/index.less +46 -0
  80. package/lib/components/pisellViewGrid/index.d.ts +16 -0
  81. package/lib/components/pisellViewGrid/index.js +98 -0
  82. package/lib/components/pisellViewGrid/index.less +31 -0
  83. package/lib/components/productCard/components/Header/index.js +3 -2
  84. package/lib/components/productCard/hooks/useOpenNote.js +2 -1
  85. package/lib/components/productCard/index.js +9 -4
  86. package/lib/components/productCard/index.less +6 -2
  87. package/lib/components/productCard/status.js +3 -1
  88. package/lib/components/productCard/types.d.ts +2 -0
  89. package/lib/components/productCard/utils.js +15 -4
  90. package/lib/components/section-footers/index.d.ts +9 -0
  91. package/lib/components/section-footers/index.js +44 -0
  92. package/lib/components/section-footers/index.less +5 -0
  93. package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  94. package/lib/components/table/Actions/component/ExportImport/utils/index.js +31 -0
  95. package/lib/index.d.ts +10 -0
  96. package/lib/index.js +30 -0
  97. package/lowcode/pisell-anchor/meta.ts +118 -0
  98. package/lowcode/pisell-anchor/snippets.ts +26 -0
  99. package/lowcode/pisell-avatar/__screenshots__/avatar-1.jpg +0 -0
  100. package/lowcode/pisell-avatar/meta.ts +111 -0
  101. package/lowcode/pisell-avatar/snippets.ts +14 -0
  102. package/lowcode/pisell-card/meta.ts +62 -27
  103. package/lowcode/pisell-card/snippets.ts +6 -0
  104. package/lowcode/pisell-custom-checkbox-group/__screenshots__/card-1.png +0 -0
  105. package/lowcode/pisell-custom-checkbox-group/meta.ts +204 -0
  106. package/lowcode/pisell-custom-checkbox-group/snippets.ts +56 -0
  107. package/lowcode/pisell-dropdown/__screenshots__/dropdown-1.png +0 -0
  108. package/lowcode/pisell-dropdown/meta.ts +180 -0
  109. package/lowcode/pisell-dropdown/snippets.ts +69 -0
  110. package/lowcode/pisell-header-progress-bar/meta.ts +116 -0
  111. package/lowcode/pisell-header-progress-bar/snippets.ts +24 -0
  112. package/lowcode/pisell-image-carousels/meta.ts +143 -0
  113. package/lowcode/pisell-image-carousels/snippets.ts +20 -0
  114. package/lowcode/pisell-list01/meta.ts +74 -0
  115. package/lowcode/pisell-list01/snippets.ts +35 -0
  116. package/lowcode/pisell-section-headers/meta.ts +91 -0
  117. package/lowcode/pisell-section-headers/snippets.ts +22 -0
  118. package/lowcode/pisell-view-grid/__screenshots__/card-1.png +0 -0
  119. package/lowcode/pisell-view-grid/meta.ts +167 -0
  120. package/lowcode/pisell-view-grid/snippets.ts +54 -0
  121. package/lowcode/section-footers/meta.ts +66 -0
  122. package/lowcode/section-footers/snippe.ts +21 -0
  123. package/package.json +4 -3
  124. package/build/lowcode/assets-daily.json +0 -93
  125. package/build/lowcode/assets-dev.json +0 -93
  126. package/build/lowcode/assets-prod.json +0 -93
  127. package/build/lowcode/designer.html +0 -303
  128. package/build/lowcode/index.html +0 -305
  129. package/build/lowcode/index.js +0 -1
  130. package/build/lowcode/meta.js +0 -9
  131. package/build/lowcode/preview.css +0 -1
  132. package/build/lowcode/preview.html +0 -35
  133. package/build/lowcode/preview.js +0 -304
  134. package/build/lowcode/render/default/view.css +0 -1
  135. package/build/lowcode/render/default/view.js +0 -232
  136. package/build/lowcode/view.css +0 -1
  137. package/build/lowcode/view.js +0 -232
@@ -39,6 +39,7 @@ var import_utils = require("@pisell/utils");
39
39
  var import_zh_cn = require("dayjs/locale/zh-cn");
40
40
  var import_en = require("dayjs/locale/en");
41
41
  var import_zh_tw = require("dayjs/locale/zh-tw");
42
+ var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
42
43
  var isEn = (item) => {
43
44
  const locale = (item == null ? void 0 : item.locale) || "en-US";
44
45
  const _isEn = locale === "en-US" || locale === "en";
@@ -59,9 +60,12 @@ var formatMultiDayDate = (item) => {
59
60
  return date;
60
61
  };
61
62
  var getServiceTime = (item, currentDate) => {
63
+ var _a, _b, _c, _d;
62
64
  if (!(0, import_dayjs.default)(currentDate).isValid())
63
65
  return "";
64
- const locale = (item == null ? void 0 : item.locale) || "en-US";
66
+ const context = (0, import_useEngineContext.default)();
67
+ const utils = context.appHelper.utils || {};
68
+ const locale = (item == null ? void 0 : item.locale) || ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en-US";
65
69
  const isEn2 = locale === "en-US" || locale === "en";
66
70
  const localeTypes = {
67
71
  "en-US": "en",
@@ -69,10 +73,17 @@ var getServiceTime = (item, currentDate) => {
69
73
  "zh-HK": "zh-tw"
70
74
  };
71
75
  import_dayjs.default.locale(localeTypes[locale]);
72
- const startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
73
- const endDate = (0, import_dayjs.default)(item == null ? void 0 : item.end_date);
76
+ let startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
77
+ let endDate = (0, import_dayjs.default)(item == null ? void 0 : item.end_date);
74
78
  const diffInDays = endDate.diff(startDate, "day");
75
- const _format = isEn2 ? "ddd, DD/MM/YYYY" : "YYYY-MM-DD,ddd";
79
+ let _format = isEn2 ? "ddd, DD/MM/YYYY" : "YYYY-MM-DD,ddd";
80
+ if ((item == null ? void 0 : item.hasOwnProperty("format")) && ((_b = item == null ? void 0 : item.format) == null ? void 0 : _b.length) > 0) {
81
+ _format = isEn2 ? (_c = item == null ? void 0 : item.format) == null ? void 0 : _c[0] : (_d = item == null ? void 0 : item.format) == null ? void 0 : _d[1];
82
+ }
83
+ if (item == null ? void 0 : item.show_time) {
84
+ startDate = (0, import_dayjs.default)(`${item == null ? void 0 : item.start_date} ${item == null ? void 0 : item.start_time}`);
85
+ endDate = (0, import_dayjs.default)(`${item == null ? void 0 : item.end_date} ${item == null ? void 0 : item.end_time}`);
86
+ }
76
87
  const date = `${startDate.format(_format)} ~ ${endDate.format(_format)}`;
77
88
  const duration = `${diffInDays} ${import_utils.locales.getText("pisell2.product.card.day")(diffInDays)}`;
78
89
  return `${date} (${duration})`;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ interface SectionFooterProps {
3
+ left?: React.ReactNode;
4
+ middle?: React.ReactNode;
5
+ right?: React.ReactNode;
6
+ className?: string;
7
+ }
8
+ declare const SectionFooters: (props: SectionFooterProps) => import("react").JSX.Element;
9
+ export default SectionFooters;
@@ -0,0 +1,44 @@
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/section-footers/index.tsx
20
+ var section_footers_exports = {};
21
+ __export(section_footers_exports, {
22
+ default: () => section_footers_default
23
+ });
24
+ module.exports = __toCommonJS(section_footers_exports);
25
+ var import_react = require("react");
26
+ var import_antd = require("antd");
27
+ var SectionFooters = (props) => {
28
+ (0, import_react.useEffect)(() => {
29
+ document.body.id = "body";
30
+ }, []);
31
+ const { left, middle, right, className } = props;
32
+ return /* @__PURE__ */ React.createElement(
33
+ import_antd.Flex,
34
+ {
35
+ gap: "middle",
36
+ justify: "space-between",
37
+ className: `pisell-section-footers-wrapper ${className}`
38
+ },
39
+ left,
40
+ middle,
41
+ right
42
+ );
43
+ };
44
+ var section_footers_default = SectionFooters;
@@ -0,0 +1,5 @@
1
+ .pisell-section-footers-wrapper {
2
+ position: fixed;
3
+ bottom: 0;
4
+ width: 100%;
5
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @title: 格式化导出导入接口地址
3
+ * @description:
4
+ * @param {string} url
5
+ * @return {*}
6
+ * @Author: WangHan
7
+ * @Date: 2024-09-05 11:39
8
+ */
9
+ export declare const formatApiUrl: (url: string) => string;
@@ -0,0 +1,31 @@
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/table/Actions/component/ExportImport/utils/index.ts
20
+ var utils_exports = {};
21
+ __export(utils_exports, {
22
+ formatApiUrl: () => formatApiUrl
23
+ });
24
+ module.exports = __toCommonJS(utils_exports);
25
+ var formatApiUrl = (url) => {
26
+ return url || "/shop/form/data";
27
+ };
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ formatApiUrl
31
+ });
package/lib/index.d.ts CHANGED
@@ -110,3 +110,13 @@ export { default as PisellStatisticList } from './components/pisellStatisticList
110
110
  export { default as PisellFloatingPanel } from './components/pisellFloatingPanel';
111
111
  export { default as ProductCard } from './components/productCard';
112
112
  export { default as Collapse } from './components/collapse';
113
+ export { default as PisellAvatar } from './components/pisellAvatar';
114
+ export { default as PisellViewGrid } from './components/pisellViewGrid';
115
+ export { default as PisellCustomCheckboxGroup } from './components/pisellCustomCheckboxGroup';
116
+ export { default as PisellDropdown } from './components/pisellDropdown';
117
+ export { default as PisellSectionHeaders } from './components/pisellSectionHeaders';
118
+ export { default as PisellImageCarousels } from './components/pisellImageCarousels';
119
+ export { default as PisellHeaderProgressBar } from './components/pisellHeaderProgressBar';
120
+ export { default as PisellList01 } from './components/pisellList01';
121
+ export { default as PisellAnchor } from './components/pisellAnchor';
122
+ export { default as SectionFooters } from './components/section-footers';
package/lib/index.js CHANGED
@@ -77,6 +77,8 @@ __export(src_exports, {
77
77
  PisellAdjustPrice: () => import_pisellAdjustPrice.default,
78
78
  PisellAdjustPriceInputNumber: () => import_PisellAdjustPriceInputNumber.default,
79
79
  PisellAlert: () => import_pisellAlert.default,
80
+ PisellAnchor: () => import_pisellAnchor.default,
81
+ PisellAvatar: () => import_pisellAvatar.default,
80
82
  PisellCard: () => import_pisellCard.default,
81
83
  PisellCardList: () => import_pisellCardList.default,
82
84
  PisellCheckboxGroup: () => import_pisellCheckboxGroup.default,
@@ -84,21 +86,28 @@ __export(src_exports, {
84
86
  PisellContainer: () => import_pisellContainer.default,
85
87
  PisellContext: () => import_context.default,
86
88
  PisellCountdown: () => import_pisellCountdown.default,
89
+ PisellCustomCheckboxGroup: () => import_pisellCustomCheckboxGroup.default,
87
90
  PisellDatePicker: () => import_pisellDatePicker.default,
91
+ PisellDropdown: () => import_pisellDropdown.default,
88
92
  PisellEmpty: () => import_pisellEmpty.default,
89
93
  PisellFloatingPanel: () => import_pisellFloatingPanel.default,
94
+ PisellHeaderProgressBar: () => import_pisellHeaderProgressBar.default,
95
+ PisellImageCarousels: () => import_pisellImageCarousels.default,
90
96
  PisellInformationEntry: () => import_pisellInformationEntry.default,
91
97
  PisellInput: () => import_pisellInput.default,
98
+ PisellList01: () => import_pisellList01.default,
92
99
  PisellLoading: () => import_pisellLoading.default,
93
100
  PisellModal: () => import_pisellModal.default,
94
101
  PisellNumberKeyboard: () => import_Number.default,
95
102
  PisellPriceKeyboard: () => import_Amount.default,
96
103
  PisellRow: () => import_pisellRow.default,
97
104
  PisellScan: () => import_pisellScan.default,
105
+ PisellSectionHeaders: () => import_pisellSectionHeaders.default,
98
106
  PisellStatisticList: () => import_pisellStatisticList.default,
99
107
  PisellText: () => import_pisellText.default,
100
108
  PisellToast: () => import_pisellToast.default,
101
109
  PisellTooltip: () => import_pisellTooltip.default,
110
+ PisellViewGrid: () => import_pisellViewGrid.default,
102
111
  PisellWalletPassCard: () => import_pisellWalletPassCard.default,
103
112
  Popconfirm: () => import_antd22.Popconfirm,
104
113
  Popover: () => import_antd23.Popover,
@@ -110,6 +119,7 @@ __export(src_exports, {
110
119
  RecordView: () => import_record_view.default,
111
120
  Result: () => import_antd26.Result,
112
121
  Row: () => import_antd27.Row,
122
+ SectionFooters: () => import_section_footers.default,
113
123
  Segmented: () => import_segmented.default,
114
124
  Select: () => import_select.default,
115
125
  SelectTime: () => import_select_time.default,
@@ -256,6 +266,16 @@ var import_pisellStatisticList = __toESM(require("./components/pisellStatisticLi
256
266
  var import_pisellFloatingPanel = __toESM(require("./components/pisellFloatingPanel"));
257
267
  var import_productCard = __toESM(require("./components/productCard"));
258
268
  var import_collapse = __toESM(require("./components/collapse"));
269
+ var import_pisellAvatar = __toESM(require("./components/pisellAvatar"));
270
+ var import_pisellViewGrid = __toESM(require("./components/pisellViewGrid"));
271
+ var import_pisellCustomCheckboxGroup = __toESM(require("./components/pisellCustomCheckboxGroup"));
272
+ var import_pisellDropdown = __toESM(require("./components/pisellDropdown"));
273
+ var import_pisellSectionHeaders = __toESM(require("./components/pisellSectionHeaders"));
274
+ var import_pisellImageCarousels = __toESM(require("./components/pisellImageCarousels"));
275
+ var import_pisellHeaderProgressBar = __toESM(require("./components/pisellHeaderProgressBar"));
276
+ var import_pisellList01 = __toESM(require("./components/pisellList01"));
277
+ var import_pisellAnchor = __toESM(require("./components/pisellAnchor"));
278
+ var import_section_footers = __toESM(require("./components/section-footers"));
259
279
  // Annotate the CommonJS export names for ESM import in node:
260
280
  0 && (module.exports = {
261
281
  Affix,
@@ -306,6 +326,8 @@ var import_collapse = __toESM(require("./components/collapse"));
306
326
  PisellAdjustPrice,
307
327
  PisellAdjustPriceInputNumber,
308
328
  PisellAlert,
329
+ PisellAnchor,
330
+ PisellAvatar,
309
331
  PisellCard,
310
332
  PisellCardList,
311
333
  PisellCheckboxGroup,
@@ -313,21 +335,28 @@ var import_collapse = __toESM(require("./components/collapse"));
313
335
  PisellContainer,
314
336
  PisellContext,
315
337
  PisellCountdown,
338
+ PisellCustomCheckboxGroup,
316
339
  PisellDatePicker,
340
+ PisellDropdown,
317
341
  PisellEmpty,
318
342
  PisellFloatingPanel,
343
+ PisellHeaderProgressBar,
344
+ PisellImageCarousels,
319
345
  PisellInformationEntry,
320
346
  PisellInput,
347
+ PisellList01,
321
348
  PisellLoading,
322
349
  PisellModal,
323
350
  PisellNumberKeyboard,
324
351
  PisellPriceKeyboard,
325
352
  PisellRow,
326
353
  PisellScan,
354
+ PisellSectionHeaders,
327
355
  PisellStatisticList,
328
356
  PisellText,
329
357
  PisellToast,
330
358
  PisellTooltip,
359
+ PisellViewGrid,
331
360
  PisellWalletPassCard,
332
361
  Popconfirm,
333
362
  Popover,
@@ -339,6 +368,7 @@ var import_collapse = __toESM(require("./components/collapse"));
339
368
  RecordView,
340
369
  Result,
341
370
  Row,
371
+ SectionFooters,
342
372
  Segmented,
343
373
  Select,
344
374
  SelectTime,
@@ -0,0 +1,118 @@
1
+ import { IPublicTypeComponentMetadata } from '@alilc/lowcode-types';
2
+ import { uuid } from '../_utils/utils';
3
+
4
+ import snippets from "./snippets";
5
+
6
+ const AnchorMeta: IPublicTypeComponentMetadata = {
7
+ componentName: "PisellAnchor",
8
+ title: "锚点导航",
9
+ category: "导航",
10
+ docUrl: "",
11
+ screenshot: "",
12
+ devMode: "proCode",
13
+ npm: {
14
+ package: "@pisell/materials",
15
+ version: "1.0.1",
16
+ exportName: "PisellAnchor",
17
+ main: "src/index.tsx",
18
+ destructuring: true,
19
+ subName: "",
20
+ },
21
+ props: [
22
+ {
23
+ name: 'options',
24
+ title: { label: '选项列表', tip: '导航选项列表' },
25
+ propType: {
26
+ type: 'arrayOf',
27
+ value: {
28
+ type: 'shape',
29
+ value: [
30
+ {
31
+ name: 'id',
32
+ propType: 'string',
33
+ description: '选项ID',
34
+ defaultValue: '',
35
+ },
36
+ {
37
+ name: 'name',
38
+ propType: 'node',
39
+ description: '选项名称',
40
+ defaultValue: '',
41
+ }
42
+ ],
43
+ },
44
+ },
45
+ setter: {
46
+ componentName: 'ArraySetter',
47
+ props: {
48
+ itemSetter: {
49
+ componentName: 'ObjectSetter',
50
+ props: {
51
+ config: {
52
+ items: [
53
+ {
54
+ name: 'id',
55
+ title: '选项ID',
56
+ setter: 'StringSetter',
57
+ isRequired: true
58
+ },
59
+ {
60
+ name: 'name',
61
+ title: '选项名称',
62
+ setter: ['StringSetter', 'ExpressionSetter'],
63
+ isRequired: true
64
+ }
65
+ ],
66
+ },
67
+ },
68
+ initialValue: () => {
69
+ const id = uuid();
70
+ return {
71
+ id,
72
+ name: `选项${id}`,
73
+ };
74
+ },
75
+ },
76
+ },
77
+ },
78
+ },
79
+ {
80
+ name: 'tab',
81
+ title: { label: '当前选中项', tip: '当前选中的选项ID' },
82
+ propType: 'string',
83
+ },
84
+ {
85
+ name: 'className',
86
+ title: { label: '自定义类名', tip: '自定义类名' },
87
+ propType: 'string',
88
+ },
89
+ {
90
+ name: 'style',
91
+ title: { label: '自定义样式', tip: '自定义样式' },
92
+ propType: 'object',
93
+ }
94
+ ],
95
+ configure: {
96
+ supports: {
97
+ style: true,
98
+ events: [
99
+ {
100
+ name: "onChange",
101
+ template:
102
+ "onChange(key){\n// 选项切换时的回调\nconsole.log('onChange', key);}",
103
+ }
104
+ ],
105
+ },
106
+ component: {
107
+ isContainer: false,
108
+ nestingRule: {
109
+ childWhitelist: []
110
+ },
111
+ },
112
+ },
113
+ };
114
+
115
+ export default {
116
+ ...AnchorMeta,
117
+ snippets,
118
+ };
@@ -0,0 +1,26 @@
1
+ export default [
2
+ {
3
+ title: '锚点导航',
4
+ screenshot: '',
5
+ schema: {
6
+ componentName: 'PisellAnchor',
7
+ props: {
8
+ options: [
9
+ {
10
+ id: '1',
11
+ name: '选项1'
12
+ },
13
+ {
14
+ id: '2',
15
+ name: '选项2'
16
+ },
17
+ {
18
+ id: '3',
19
+ name: '选项3'
20
+ }
21
+ ],
22
+ tab: '1'
23
+ }
24
+ }
25
+ }
26
+ ];
@@ -0,0 +1,111 @@
1
+ import snippets from "./snippets";
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: "PisellAvatar",
6
+ title: "头像",
7
+ category: "数据展示",
8
+ devMode: "proCode",
9
+ npm: {
10
+ package: "@pisell/materials",
11
+ version: "1.0.1",
12
+ exportName: "PisellAvatar",
13
+ main: "src/index.tsx",
14
+ destructuring: true,
15
+ subName: "",
16
+ },
17
+ props: [
18
+ {
19
+ name: "icon",
20
+ title: { label: "头像图标", tip: "icon | 设置头像的自定义图标" },
21
+ propType: "node",
22
+ },
23
+ {
24
+ name: "shape",
25
+ title: { label: "头像形状", tip: "shape | 指定头像的形状" },
26
+ propType: { type: "oneOf", value: ["circle", "square"] },
27
+ defaultValue: "circle",
28
+ },
29
+ {
30
+ name: "borderRadius",
31
+ title: { label: "圆角度数", tip: "borderRadius | 方形头像的圆角大小" },
32
+ propType: "number",
33
+ defaultValue: 4,
34
+ condition: {
35
+ type: "JSFunction",
36
+ value: "target => target.getProps().getPropValue('shape') === 'square'",
37
+ },
38
+ },
39
+ {
40
+ name: "size",
41
+ title: { label: "尺寸", tip: "size | 设置头像的大小" },
42
+ propType: {
43
+ type: "oneOf",
44
+ value: ["xs", "sm", "md", "lg", "xl", "xxl"],
45
+ },
46
+ defaultValue: "xs",
47
+ },
48
+ {
49
+ name: "useTextAvatar",
50
+ title: { label: "使用文本头像", tip: "useTextAvatar | 是否使用文本作为头像" },
51
+ propType: "bool",
52
+ defaultValue: false,
53
+ },
54
+ {
55
+ name: "children",
56
+ title: { label: "文本内容", tip: "children | 文本头像的内容" },
57
+ propType: "string",
58
+ condition: {
59
+ type: "JSFunction",
60
+ value: "target => target.getProps().getPropValue('useTextAvatar')",
61
+ },
62
+ },
63
+ {
64
+ name: "src",
65
+ title: { label: "图片地址", tip: "src | 图片类头像的资源地址" },
66
+ propType: "string",
67
+ },
68
+ {
69
+ name: "alt",
70
+ title: {
71
+ label: "替代文本",
72
+ tip: "alt | 图像无法显示时的替代文本",
73
+ },
74
+ propType: "string",
75
+ setter: "PisellI18nSetter",
76
+ },
77
+ {
78
+ name: "onError",
79
+ title: {
80
+ label: "图片加载失败的事件",
81
+ tip: "图片加载失败的事件,返回 false 会关闭组件默认的 fallback 行为",
82
+ },
83
+ propType: "func",
84
+ },
85
+ {
86
+ name: "gap",
87
+ title: {
88
+ label: "文字边距",
89
+ tip: "gap | 字符类型距离左右两侧边界单位像素",
90
+ },
91
+ propType: "number",
92
+ },
93
+ ],
94
+ configure: {
95
+ supports: {
96
+ style: true,
97
+ events: [
98
+ {
99
+ name: "onError",
100
+ template:
101
+ "onError(${extParams}){\n// 图片加载失败的事件\nconsole.log('onError');}",
102
+ },
103
+ {
104
+ name: "onClick",
105
+ template:
106
+ "onClick(event,${extParams}){\n// 点击时的回调\nconsole.log('onClick', event);}",
107
+ }
108
+ ],
109
+ },
110
+ },
111
+ };
@@ -0,0 +1,14 @@
1
+ export default [
2
+ {
3
+ title: '头像',
4
+ screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/avatar-1.jpg',
5
+ schema: {
6
+ componentName: 'PisellAvatar',
7
+ props: {
8
+ src: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
9
+ borderRadius: 4,
10
+ size: 'xs'
11
+ },
12
+ },
13
+ },
14
+ ];
@@ -18,12 +18,12 @@ export default {
18
18
  },
19
19
  experimental: { hideSelectTools: true },
20
20
  props: [
21
- {
22
- name: "title",
23
- title: { label: "卡片标题", tip: "卡片标题" },
24
- propType: { type: "oneOfType", value: ["string", "node"] },
25
- setter: ['PisellI18nSetter', 'SlotSetter']
26
- },
21
+ // {
22
+ // name: "title",
23
+ // title: { label: "卡片标题", tip: "卡片标题" },
24
+ // propType: { type: "oneOfType", value: ["string", "node"] },
25
+ // setter: ['PisellI18nSetter', 'SlotSetter']
26
+ // },
27
27
  // {
28
28
  // name: 'actions',
29
29
  // title: { label: '卡片操作组', tip: '卡片操作组,位置在卡片底部' },
@@ -46,22 +46,28 @@ export default {
46
46
  defaultValue: true,
47
47
  },
48
48
  {
49
- name: "cover",
50
- title: { label: "卡片封面", tip: "卡片封面" },
51
- propType: "node",
52
- },
53
- {
54
- name: "extra",
55
- title: { label: "额外元素", tip: "卡片右上角的操作区域" },
56
- propType: { type: "oneOfType", value: ["string", "node"] },
57
- setter: ['PisellI18nSetter', 'SlotSetter']
58
- },
59
- {
60
- name: "hoverable",
61
- title: { label: "可浮起", tip: "鼠标移过时可浮起" },
49
+ name: "selected",
50
+ title: { label: "是否选中", tip: "是否选中" },
62
51
  propType: "bool",
63
52
  defaultValue: false,
64
53
  },
54
+ // {
55
+ // name: "cover",
56
+ // title: { label: "卡片封面", tip: "卡片封面" },
57
+ // propType: "node",
58
+ // },
59
+ // {
60
+ // name: "extra",
61
+ // title: { label: "额外元素", tip: "卡片右上角的操作区域" },
62
+ // propType: { type: "oneOfType", value: ["string", "node"] },
63
+ // setter: ['PisellI18nSetter', 'SlotSetter']
64
+ // },
65
+ // {
66
+ // name: "hoverable",
67
+ // title: { label: "可浮起", tip: "鼠标移过时可浮起" },
68
+ // propType: "bool",
69
+ // defaultValue: false,
70
+ // },
65
71
  {
66
72
  name: "loading",
67
73
  title: {
@@ -72,17 +78,46 @@ export default {
72
78
  defaultValue: false,
73
79
  },
74
80
  {
75
- name: "size",
76
- title: { label: "尺寸", tip: "card 的尺寸" },
77
- propType: { type: "oneOf", value: ["default", "small"] },
78
- defaultValue: "default",
81
+ name: "disabled",
82
+ title: {
83
+ label: "是否禁用",
84
+ tip: "是否禁用该卡片",
85
+ },
86
+ propType: "bool",
87
+ defaultValue: false,
79
88
  },
80
89
  {
81
- name: "type",
82
- title: { label: "卡片类型", tip: "卡片类型" },
83
- propType: { type: "oneOf", value: ["default", "inner"] },
84
- defaultValue: "default",
90
+ name: "padding",
91
+ title: {
92
+ label: "内边距",
93
+ tip: "控制内边距大小 数值",
94
+ },
95
+ propType: "number",
96
+ setter: "NumberSetter",
97
+ defaultValue: 16
85
98
  },
99
+ {
100
+ name: "borderRadius",
101
+ title: {
102
+ label: "边框圆角",
103
+ tip: "控制四个圆角大小 数值",
104
+ },
105
+ propType: "number",
106
+ setter: "NumberSetter",
107
+ defaultValue: 12
108
+ }
109
+ // {
110
+ // name: "size",
111
+ // title: { label: "尺寸", tip: "card 的尺寸" },
112
+ // propType: { type: "oneOf", value: ["default", "small"] },
113
+ // defaultValue: "default",
114
+ // },
115
+ // {
116
+ // name: "type",
117
+ // title: { label: "卡片类型", tip: "卡片类型" },
118
+ // propType: { type: "oneOf", value: ["default", "inner"] },
119
+ // defaultValue: "default",
120
+ // },
86
121
  ],
87
122
  configure: {
88
123
  component: { isContainer: true },
@@ -4,6 +4,12 @@ export default [
4
4
  schema: {
5
5
  componentName: 'PisellCard',
6
6
  props: {
7
+ bordered: true,
8
+ selected: false,
9
+ loading: false,
10
+ padding: 16,
11
+ disabled: false,
12
+ borderRadius: 12
7
13
  },
8
14
  },
9
15
  },