@pisell/materials 2.2.53 → 2.2.54

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 (42) 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 +1 -1
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +14 -14
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +14 -14
  11. package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -2
  12. package/es/components/dataSourceComponents/dataSourceMenu/Basic.js +13 -3
  13. package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -2
  14. package/es/components/pisellAnchor/index.d.ts +1 -1
  15. package/es/components/pisellAnchor/index.js +109 -199
  16. package/es/components/pisellAnchor/index.less +3 -5
  17. package/es/components/pisellAvatar/index.js +2 -1
  18. package/es/components/pisellAvatar/index.less +2 -1
  19. package/es/components/pisellModal/components/MobileModal/index.less +4 -0
  20. package/es/components/productCard/locales.d.ts +3 -0
  21. package/es/components/productCard/locales.js +10 -1
  22. package/es/components/productCard/utils.js +8 -2
  23. package/es/components/virtual-keyboard/Number/index.d.ts +0 -1
  24. package/es/index.d.ts +9 -11
  25. package/es/index.js +10 -12
  26. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -2
  27. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.js +12 -3
  28. package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -2
  29. package/lib/components/pisellAnchor/index.d.ts +1 -1
  30. package/lib/components/pisellAnchor/index.js +64 -131
  31. package/lib/components/pisellAnchor/index.less +3 -5
  32. package/lib/components/pisellAvatar/index.js +1 -1
  33. package/lib/components/pisellAvatar/index.less +2 -1
  34. package/lib/components/pisellEmpty/index.js +9 -1
  35. package/lib/components/pisellModal/components/MobileModal/index.less +4 -0
  36. package/lib/components/productCard/locales.d.ts +3 -0
  37. package/lib/components/productCard/locales.js +4 -1
  38. package/lib/components/productCard/utils.js +6 -2
  39. package/lib/components/virtual-keyboard/Number/index.d.ts +0 -1
  40. package/lib/index.d.ts +9 -11
  41. package/lib/index.js +9 -15
  42. package/package.json +1 -1
package/es/index.d.ts CHANGED
@@ -117,17 +117,6 @@ export { default as Upload } from './components/upload';
117
117
  export { default as VirtualKeyboard } from './components/virtual-keyboard';
118
118
  export { default as VirtualKeyboardTime } from './components/virtual-keyboard/Time';
119
119
  export { default as WalletCard } from './components/walletCard';
120
- export { default as PisellPriceKeyboard } from './components/virtual-keyboard/Amount';
121
- export { default as PisellNumberKeyboard } from './components/virtual-keyboard/Number';
122
- export { default as ProductCard } from './components/productCard';
123
- export { default as Collapse } from './components/collapse';
124
- export { default as PisellCustomCheckboxGroup } from './components/pisellCustomCheckboxGroup';
125
- export { default as PisellDropdown } from './components/pisellDropdown';
126
- export { default as PisellSectionHeaders } from './components/pisellSectionHeaders';
127
- export { default as PisellImageCarousels } from './components/pisellImageCarousels';
128
- export { default as PisellHeaderProgressBar } from './components/pisellHeaderProgressBar';
129
- export { default as PisellList01 } from './components/pisellList01';
130
- export { default as SectionFooters } from './components/section-footers';
131
120
  export { default as PublishVersionModal } from './components/versionModal';
132
121
  export { default as IconSelect } from './components/iconSelect';
133
122
  export { default as CustomSelect } from './components/customSelect';
@@ -138,3 +127,12 @@ export { default as PisellNavigationMenu } from './components/pisellNavigationMe
138
127
  export { default as PisellAppCard } from './components/pisellAppCard';
139
128
  export type { PisellAppCardProps } from './components/pisellAppCard/types';
140
129
  export { default as BaseTranslation } from './components/dataSourceComponents/fields/Translation/BaseTranslation';
130
+ export { default as PisellCustomCheckboxGroup } from './components/pisellCustomCheckboxGroup';
131
+ export { default as PisellDropdown } from './components/pisellDropdown';
132
+ export { default as PisellSectionHeaders } from './components/pisellSectionHeaders';
133
+ export { default as PisellImageCarousels } from './components/pisellImageCarousels';
134
+ export { default as PisellHeaderProgressBar } from './components/pisellHeaderProgressBar';
135
+ export { default as PisellList01 } from './components/pisellList01';
136
+ export { default as SectionFooters } from './components/section-footers';
137
+ export { default as ProductCard } from './components/productCard';
138
+ export { default as Collapse } from './components/collapse';
package/es/index.js CHANGED
@@ -118,17 +118,6 @@ export { default as Upload } from "./components/upload";
118
118
  export { default as VirtualKeyboard } from "./components/virtual-keyboard";
119
119
  export { default as VirtualKeyboardTime } from "./components/virtual-keyboard/Time";
120
120
  export { default as WalletCard } from "./components/walletCard";
121
- export { default as PisellPriceKeyboard } from "./components/virtual-keyboard/Amount";
122
- export { default as PisellNumberKeyboard } from "./components/virtual-keyboard/Number";
123
- export { default as ProductCard } from "./components/productCard";
124
- export { default as Collapse } from "./components/collapse";
125
- export { default as PisellCustomCheckboxGroup } from "./components/pisellCustomCheckboxGroup";
126
- export { default as PisellDropdown } from "./components/pisellDropdown";
127
- export { default as PisellSectionHeaders } from "./components/pisellSectionHeaders";
128
- export { default as PisellImageCarousels } from "./components/pisellImageCarousels";
129
- export { default as PisellHeaderProgressBar } from "./components/pisellHeaderProgressBar";
130
- export { default as PisellList01 } from "./components/pisellList01";
131
- export { default as SectionFooters } from "./components/section-footers";
132
121
  export { default as PublishVersionModal } from "./components/versionModal";
133
122
  export { default as IconSelect } from "./components/iconSelect";
134
123
  export { default as CustomSelect } from "./components/customSelect";
@@ -137,4 +126,13 @@ export { default as Image } from "./components/image";
137
126
  export { default as PisellDropSort } from "./components/pisellDropSort";
138
127
  export { default as PisellNavigationMenu } from "./components/pisellNavigationMenu";
139
128
  export { default as PisellAppCard } from "./components/pisellAppCard";
140
- export { default as BaseTranslation } from "./components/dataSourceComponents/fields/Translation/BaseTranslation";
129
+ export { default as BaseTranslation } from "./components/dataSourceComponents/fields/Translation/BaseTranslation";
130
+ export { default as PisellCustomCheckboxGroup } from "./components/pisellCustomCheckboxGroup";
131
+ export { default as PisellDropdown } from "./components/pisellDropdown";
132
+ export { default as PisellSectionHeaders } from "./components/pisellSectionHeaders";
133
+ export { default as PisellImageCarousels } from "./components/pisellImageCarousels";
134
+ export { default as PisellHeaderProgressBar } from "./components/pisellHeaderProgressBar";
135
+ export { default as PisellList01 } from "./components/pisellList01";
136
+ export { default as SectionFooters } from "./components/section-footers";
137
+ export { default as ProductCard } from "./components/productCard";
138
+ export { default as Collapse } from "./components/collapse";
@@ -1,2 +1,8 @@
1
- declare const _default: any;
2
- export default _default;
1
+ import React from 'react';
2
+ import { PisellMenuProps } from '../../pisellMenu/types';
3
+ /**
4
+ * @title: 数据源表单组件
5
+ * @description: 基于数据源动态生成表单,支持编辑、查看、禁用三种模式
6
+ */
7
+ declare const DataSourceMenu: React.ForwardRefExoticComponent<PisellMenuProps & React.RefAttributes<any>>;
8
+ export default DataSourceMenu;
@@ -37,7 +37,7 @@ var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext")
37
37
  var import_pisellMenu = __toESM(require("../../pisellMenu"));
38
38
  var DataSourceMenu = (0, import_react.forwardRef)(
39
39
  (props, ref) => {
40
- var _a, _b, _c, _d;
40
+ var _a, _b, _c, _d, _e, _f, _g, _h;
41
41
  const { appHelper } = (0, import_useEngineContext.default)();
42
42
  const {
43
43
  menuItems,
@@ -47,6 +47,15 @@ var DataSourceMenu = (0, import_react.forwardRef)(
47
47
  getShowChildren,
48
48
  handleClick
49
49
  } = (_d = (_c = (_b = (_a = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a.getApp) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.menuManager) == null ? void 0 : _d.useMenu();
50
+ const translation = ((_h = (_g = (_f = (_e = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _e.getApp) == null ? void 0 : _f.call(_e)) == null ? void 0 : _g.locales) == null ? void 0 : _h.translation) || ((str) => {
51
+ if (!str) {
52
+ return "";
53
+ }
54
+ if (typeof str === "string") {
55
+ return str;
56
+ }
57
+ return JSON.stringify(str);
58
+ });
50
59
  const renderMenuItems = (items) => {
51
60
  return items.map((item) => {
52
61
  if (item.hide) {
@@ -58,14 +67,14 @@ var DataSourceMenu = (0, import_react.forwardRef)(
58
67
  import_pisellMenu.default.SubMenu,
59
68
  {
60
69
  key: item.key,
61
- title: item.label,
70
+ title: translation(item.label),
62
71
  icon: item.icon,
63
72
  router: item.path
64
73
  },
65
74
  renderMenuItems(_children)
66
75
  );
67
76
  }
68
- return /* @__PURE__ */ import_react.default.createElement(import_pisellMenu.default.Item, { key: item.key, icon: item.icon, router: item.path }, item.label);
77
+ return /* @__PURE__ */ import_react.default.createElement(import_pisellMenu.default.Item, { key: item.key, icon: item.icon, router: item.path }, translation(item.label));
69
78
  });
70
79
  };
71
80
  return /* @__PURE__ */ import_react.default.createElement(
@@ -1,2 +1,8 @@
1
- declare const _default: any;
2
- export default _default;
1
+ import React from 'react';
2
+ import { PisellMenuProps } from '../../pisellMenu/types';
3
+ /**
4
+ * @title: 数据源表单组件
5
+ * @description: 基于数据源动态生成表单,支持编辑、查看、禁用三种模式
6
+ */
7
+ declare const DataSourceMenu: (props: PisellMenuProps, ref: React.Ref<any>) => JSX.Element;
8
+ export default DataSourceMenu;
@@ -19,5 +19,5 @@ export interface PisellAnchorProps {
19
19
  */
20
20
  platform?: 'pc' | 'h5';
21
21
  }
22
- declare const PisellAnchor: React.ForwardRefExoticComponent<PisellAnchorProps & React.RefAttributes<any>>;
22
+ declare const PisellAnchor: React.FC<PisellAnchorProps>;
23
23
  export default PisellAnchor;
@@ -38,160 +38,109 @@ var import_ahooks = require("ahooks");
38
38
  var import_ChevronLeft = __toESM(require("@pisell/icon/es/ChevronLeft"));
39
39
  var import_ChevronRight = __toESM(require("@pisell/icon/es/ChevronRight"));
40
40
  var import_index = require("./index.less");
41
- var PisellAnchor = (0, import_react.forwardRef)((props, ref) => {
42
- const {
43
- options = [],
44
- tab,
45
- className,
46
- style,
47
- onChange,
48
- onTabClick,
49
- containerRef,
50
- platform = "pc"
51
- } = props;
41
+ var PisellAnchor = ({
42
+ options = [],
43
+ tab,
44
+ className,
45
+ style,
46
+ onChange,
47
+ onTabClick,
48
+ containerRef,
49
+ platform = "pc"
50
+ }) => {
52
51
  const contentRef = (0, import_react.useRef)(null);
53
- const scrollTimeoutRef = (0, import_react.useRef)(null);
54
52
  const isClickScrolling = (0, import_react.useRef)(false);
55
- const clickedTabRef = (0, import_react.useRef)(null);
56
53
  const [leftWidth, setLeftWidth] = (0, import_react.useState)(0);
57
54
  const [rightWidth, setRightWidth] = (0, import_react.useState)(40);
58
55
  const [showButtons, setShowButtons] = (0, import_react.useState)(false);
59
- const [hoveredTab, setHoveredTab] = (0, import_react.useState)(null);
60
56
  (0, import_react.useEffect)(() => {
61
57
  if (contentRef.current) {
62
58
  const { scrollWidth, clientWidth } = contentRef.current;
63
59
  setShowButtons(scrollWidth > clientWidth);
64
60
  }
65
61
  }, [options]);
66
- (0, import_react.useEffect)(() => {
67
- return () => {
68
- if (scrollTimeoutRef.current) {
69
- clearTimeout(scrollTimeoutRef.current);
70
- }
71
- };
72
- }, []);
73
- const { run: onScrollDebounced } = (0, import_ahooks.useDebounceFn)(
62
+ const handleHorizontalScroll = (0, import_ahooks.useDebounceFn)(
74
63
  (e) => {
75
- const { scrollLeft, scrollWidth, clientWidth } = e.target;
64
+ const target = e.target;
65
+ const { scrollLeft, scrollWidth, clientWidth } = target;
76
66
  setLeftWidth(scrollLeft > 0 ? 40 : 0);
77
67
  setRightWidth(scrollLeft + clientWidth >= scrollWidth ? 0 : 40);
78
68
  },
79
69
  { wait: 200 }
80
- );
81
- const { run: handleScrollThrottled } = (0, import_ahooks.useThrottleFn)(
70
+ ).run;
71
+ const handleContentScroll = (0, import_ahooks.useDebounceFn)(
82
72
  () => {
83
- if (isClickScrolling.current) return;
84
- if (!(containerRef == null ? void 0 : containerRef.current)) return;
73
+ if (isClickScrolling.current || !(containerRef == null ? void 0 : containerRef.current)) return;
85
74
  const container = containerRef.current;
86
- const headerHeight = 65;
87
- const containerRect = container.getBoundingClientRect();
88
75
  const scrollTop = container.scrollTop;
89
- const containerHeight = containerRect.height;
76
+ const containerHeight = container.clientHeight;
90
77
  const scrollHeight = container.scrollHeight;
91
- const isAtBottom = scrollTop + containerHeight >= scrollHeight - 50;
78
+ const isAtBottom = Math.abs(scrollTop + containerHeight - scrollHeight) < 1;
92
79
  if (isAtBottom) {
93
80
  const lastOption = options[options.length - 1];
94
- if (tab !== lastOption.id && lastOption.id !== clickedTabRef.current) {
81
+ if (lastOption && tab !== lastOption.id) {
95
82
  onChange == null ? void 0 : onChange(lastOption.id);
96
83
  }
97
84
  return;
98
85
  }
99
- let closestOption = null;
100
- let minDistance = Infinity;
86
+ let maxVisibleRatio = 0;
87
+ let activeOption = null;
101
88
  for (const option of options) {
102
- const elementById = document.getElementById(option.id);
103
- const elementByDataAttr = document.querySelector(`[data-section="${option.id}"]`);
104
- const element = elementById || elementByDataAttr;
105
- if (element) {
106
- const htmlElement = element;
107
- const elementOffsetTop = htmlElement.offsetTop;
108
- const elementHeight = htmlElement.offsetHeight;
109
- const elementTopRelativeToViewport = elementOffsetTop - scrollTop;
110
- const isTopVisible = elementTopRelativeToViewport >= headerHeight && elementTopRelativeToViewport <= containerHeight;
111
- const isBottomVisible = elementTopRelativeToViewport + elementHeight >= headerHeight && elementTopRelativeToViewport + elementHeight <= containerHeight;
112
- const isElementPartiallyVisible = isTopVisible || isBottomVisible || elementTopRelativeToViewport < headerHeight && elementTopRelativeToViewport + elementHeight > containerHeight;
113
- const distance = Math.abs(elementTopRelativeToViewport - headerHeight);
114
- if (distance < minDistance) {
115
- minDistance = distance;
116
- closestOption = option;
89
+ const element = document.querySelector(`[data-section="${option.id}"]`);
90
+ if (element instanceof HTMLElement) {
91
+ const elementTop = element.offsetTop;
92
+ const elementHeight = element.offsetHeight;
93
+ const elementBottom = elementTop + elementHeight;
94
+ const visibleTop = Math.max(elementTop, scrollTop);
95
+ const visibleBottom = Math.min(elementBottom, scrollTop + containerHeight);
96
+ const visibleHeight = Math.max(0, visibleBottom - visibleTop);
97
+ const visibleRatio = visibleHeight / elementHeight;
98
+ if (visibleRatio > maxVisibleRatio) {
99
+ maxVisibleRatio = visibleRatio;
100
+ activeOption = option;
117
101
  }
118
102
  }
119
103
  }
120
- if (closestOption && tab !== closestOption.id && closestOption.id !== clickedTabRef.current && minDistance < 50) {
121
- onChange == null ? void 0 : onChange(closestOption.id);
104
+ if (activeOption && tab !== activeOption.id) {
105
+ onChange == null ? void 0 : onChange(activeOption.id);
122
106
  }
123
107
  },
124
- { wait: 150 }
125
- );
108
+ { wait: 100 }
109
+ ).run;
126
110
  (0, import_react.useEffect)(() => {
127
- if (!(containerRef == null ? void 0 : containerRef.current)) return;
128
- const handleScroll = () => {
129
- if (!isClickScrolling.current) {
130
- handleScrollThrottled();
131
- }
132
- };
133
- const container = containerRef.current;
134
- container.addEventListener("scroll", handleScroll);
135
- return () => {
136
- container.removeEventListener("scroll", handleScroll);
137
- };
138
- }, [handleScrollThrottled]);
111
+ const container = containerRef == null ? void 0 : containerRef.current;
112
+ if (!container) return;
113
+ container.addEventListener("scroll", handleContentScroll);
114
+ return () => container.removeEventListener("scroll", handleContentScroll);
115
+ }, [handleContentScroll]);
139
116
  const handleOptionClick = (item) => {
140
- console.log("PisellAnchor: Tab clicked", item.id);
141
- if (scrollTimeoutRef.current) {
142
- clearTimeout(scrollTimeoutRef.current);
143
- }
144
117
  onChange == null ? void 0 : onChange(item.id);
145
118
  onTabClick == null ? void 0 : onTabClick();
146
- const elementById = document.getElementById(String(item.id));
147
- const elementByDataAttr = document.querySelector(`[data-section="${String(item.id)}"]`);
148
- const element = elementById || elementByDataAttr;
149
- console.log("PisellAnchor: Target element found?", !!element);
150
- console.log("PisellAnchor: Container ref exists?", !!(containerRef == null ? void 0 : containerRef.current));
151
- if (element && (containerRef == null ? void 0 : containerRef.current)) {
119
+ const targetElement = document.querySelector(`[data-section="${item.id}"]`);
120
+ if (targetElement instanceof HTMLElement && (containerRef == null ? void 0 : containerRef.current)) {
152
121
  isClickScrolling.current = true;
153
- clickedTabRef.current = item.id;
154
- requestAnimationFrame(() => {
155
- if (!(containerRef == null ? void 0 : containerRef.current)) return;
156
- const htmlElement = element;
157
- const headerHeight = 65;
158
- const elementOffsetTop = htmlElement.offsetTop;
159
- console.log("PisellAnchor: Scrolling using offsetTop", {
160
- elementOffsetTop,
161
- targetScrollTop: elementOffsetTop - headerHeight
162
- });
163
- containerRef.current.scrollTo({
164
- top: elementOffsetTop - headerHeight,
165
- behavior: "smooth"
166
- });
167
- setTimeout(() => {
168
- if (!(containerRef == null ? void 0 : containerRef.current)) return;
169
- containerRef.current.scrollTo({
170
- top: elementOffsetTop - headerHeight,
171
- behavior: "auto"
172
- // 使用即时滚动确保位置准确
173
- });
174
- }, 300);
122
+ let scrollDistance = 0;
123
+ for (const option of options) {
124
+ if (option.id === item.id) break;
125
+ const element = document.querySelector(`[data-section="${option.id}"]`);
126
+ if (element instanceof HTMLElement) {
127
+ scrollDistance += element.offsetHeight;
128
+ }
129
+ }
130
+ containerRef.current.scrollTo({
131
+ top: scrollDistance,
132
+ behavior: "smooth"
175
133
  });
176
- scrollTimeoutRef.current = setTimeout(() => {
134
+ setTimeout(() => {
177
135
  isClickScrolling.current = false;
178
- clickedTabRef.current = null;
179
136
  }, 1e3);
180
- } else {
181
- console.warn("PisellAnchor: Cannot scroll, element or container not found", {
182
- elementId: item.id,
183
- elementByIdExists: !!elementById,
184
- elementByDataAttrExists: !!elementByDataAttr,
185
- containerExists: !!(containerRef == null ? void 0 : containerRef.current)
186
- });
187
137
  }
188
138
  };
189
- const onPageChange = (type) => {
139
+ const handlePageChange = (type) => {
190
140
  if (contentRef.current) {
191
141
  const { scrollLeft, clientWidth } = contentRef.current;
192
- const newScrollLeft = scrollLeft + (type === "left" ? -clientWidth : clientWidth);
193
142
  contentRef.current.scrollTo({
194
- left: newScrollLeft,
143
+ left: scrollLeft + (type === "left" ? -clientWidth : clientWidth),
195
144
  behavior: "smooth"
196
145
  });
197
146
  }
@@ -201,7 +150,7 @@ var PisellAnchor = (0, import_react.forwardRef)((props, ref) => {
201
150
  {
202
151
  className: "pisell-anchor-tabs-btn-left",
203
152
  style: { width: leftWidth },
204
- onClick: () => onPageChange("left")
153
+ onClick: () => handlePageChange("left")
205
154
  },
206
155
  /* @__PURE__ */ import_react.default.createElement(import_ChevronLeft.default, { className: "pisell-anchor-tabs-btn-icon" })
207
156
  ), /* @__PURE__ */ import_react.default.createElement(
@@ -209,43 +158,27 @@ var PisellAnchor = (0, import_react.forwardRef)((props, ref) => {
209
158
  {
210
159
  ref: contentRef,
211
160
  className: "pisell-anchor-tabs-content",
212
- id: `tab-${tab}-content`,
213
- onScroll: onScrollDebounced
161
+ onScroll: handleHorizontalScroll
214
162
  },
215
163
  options.map((item) => /* @__PURE__ */ import_react.default.createElement(
216
164
  "div",
217
165
  {
218
166
  key: item.id,
219
- id: `tab-${item.id}`,
220
167
  className: (0, import_classnames.default)("pisell-anchor-tabs-tab", {
221
168
  "pisell-anchor-tabs-tab-active": tab === item.id
222
169
  }),
223
- onClick: () => {
224
- console.log("PisellAnchor: Tab div clicked", item.id);
225
- handleOptionClick(item);
226
- }
170
+ onClick: () => handleOptionClick(item)
227
171
  },
228
- /* @__PURE__ */ import_react.default.createElement(
229
- "span",
230
- {
231
- className: "pisell-anchor-tabs-tab-content",
232
- onClick: (e) => {
233
- e.stopPropagation();
234
- console.log("PisellAnchor: Tab span clicked", item.id);
235
- handleOptionClick(item);
236
- }
237
- },
238
- item.name
239
- )
172
+ /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-anchor-tabs-tab-content" }, item.name)
240
173
  ))
241
174
  ), showButtons && /* @__PURE__ */ import_react.default.createElement(
242
175
  "div",
243
176
  {
244
177
  className: "pisell-anchor-tabs-btn-right",
245
178
  style: { width: rightWidth },
246
- onClick: () => onPageChange("right")
179
+ onClick: () => handlePageChange("right")
247
180
  },
248
181
  /* @__PURE__ */ import_react.default.createElement(import_ChevronRight.default, { className: "pisell-anchor-tabs-btn-icon" })
249
182
  ));
250
- });
183
+ };
251
184
  var pisellAnchor_default = PisellAnchor;
@@ -114,7 +114,7 @@
114
114
  display: flex;
115
115
  align-items: center;
116
116
  justify-content: center;
117
- background: linear-gradient(90deg, #fff 30%, rgba(255, 255, 255, 0.8) 100%);
117
+ background:none;
118
118
  cursor: pointer;
119
119
  transition: width 300ms ease;
120
120
  user-select: none;
@@ -134,12 +134,10 @@
134
134
 
135
135
  .pisell-anchor-tabs-btn-left {
136
136
  left: 0;
137
- background: linear-gradient(270deg, rgba(255, 255, 255, 0.8) 0%, #fff 70%);
138
137
  }
139
138
 
140
139
  .pisell-anchor-tabs-btn-right {
141
140
  right: 0;
142
- background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, #fff 70%);
143
141
  }
144
142
 
145
143
  .pisell-anchor-tabs-content {
@@ -172,7 +170,7 @@
172
170
  border-radius: 100px;
173
171
 
174
172
  &:hover:not(.pisell-anchor-tabs-tab-active) {
175
- color: var(--theme-color, #7f56d9);
173
+ color: inherit;
176
174
  }
177
175
 
178
176
  &.pisell-anchor-tabs-tab-active {
@@ -189,7 +187,7 @@
189
187
  }
190
188
 
191
189
  .pisell-anchor {
192
- border-bottom: 1px solid #EAECF0;
190
+ border-bottom: 1px solid #eaecf0;
193
191
 
194
192
  &.pisell-anchor-no-border {
195
193
  border-bottom: none;
@@ -88,7 +88,7 @@ var PisellAvatar = ({
88
88
  if (useTextAvatar && children) {
89
89
  return children;
90
90
  }
91
- return /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-user-01" });
91
+ return /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-user-01", className: "pisell-avatar-icon" });
92
92
  }, [useTextAvatar, children]);
93
93
  return /* @__PURE__ */ import_react.default.createElement(
94
94
  import_antd.Avatar,
@@ -5,7 +5,7 @@
5
5
  align-items: center;
6
6
  justify-content: center;
7
7
  background: var(--Gray-100, #f2f4f7); // 默认背景色
8
- border: 1px solid #D0D5DD; // 移除默认边框
8
+ border: 1px solid #d0d5dd; // 移除默认边框
9
9
  box-sizing: border-box;
10
10
 
11
11
  img {
@@ -14,6 +14,7 @@
14
14
 
15
15
  .anticon {
16
16
  font-size: inherit !important;
17
+ color: var(--Gray-600, #475467) !important;
17
18
  }
18
19
 
19
20
  // 文本头像样式
@@ -54,7 +54,15 @@ var PisellEmpty = (props) => {
54
54
  ...others,
55
55
  className: (0, import_classnames.default)("pisell-empty-wrap", className),
56
56
  image: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-empty-icon-wrap" }, icon || /* @__PURE__ */ import_react.default.createElement(import_Inbox01.default, { style: { color: "#667085" } })),
57
- description: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-empty-wrap-description-wrap", style: { maxWidth: maxWidth || 300 } }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-empty-wrap-description" }, description), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-empty-wrap-extra-description" }, extraDescription))
57
+ description: /* @__PURE__ */ import_react.default.createElement(
58
+ "div",
59
+ {
60
+ className: "pisell-empty-wrap-description-wrap",
61
+ style: { maxWidth: maxWidth || 300 }
62
+ },
63
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-empty-wrap-description" }, description),
64
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-empty-wrap-extra-description" }, extraDescription)
65
+ )
58
66
  },
59
67
  footer
60
68
  );
@@ -17,14 +17,18 @@
17
17
  overflow: hidden;
18
18
  max-height: 90%;
19
19
  min-height: 200px;
20
+ display: flex;
21
+ flex-direction: column;
20
22
  }
21
23
  .pisell-lowcode-modal-content {
24
+ flex: 1;
22
25
  padding: 0;
23
26
  border-radius: 0;
24
27
  height: 100%;
25
28
  display: flex;
26
29
  flex-direction: column;
27
30
  max-height: none;
31
+ min-height: 200px;
28
32
  .pisell-lowcode-modal-close {
29
33
  padding: 10px;
30
34
  top: 8px;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  en: {
3
3
  'pisell2.product.card.day': (val: number) => string;
4
+ 'pisell2.product.card.day.event': (val: number) => string;
4
5
  'pisell2.product.card.discount.reason': string;
5
6
  'pisell2.product.card.discount.note': string;
6
7
  'pisell2.product.card.discount.add.note': string;
@@ -14,6 +15,7 @@ declare const _default: {
14
15
  };
15
16
  'zh-CN': {
16
17
  'pisell2.product.card.day': (val: number) => string;
18
+ 'pisell2.product.card.day.event': (val: number) => string;
17
19
  'pisell2.product.card.discount.reason': string;
18
20
  'pisell2.product.card.discount.note': string;
19
21
  'pisell2.product.card.discount.add.note': string;
@@ -27,6 +29,7 @@ declare const _default: {
27
29
  };
28
30
  'zh-HK': {
29
31
  'pisell2.product.card.day': (val: number) => string;
32
+ 'pisell2.product.card.day.event': (val: number) => string;
30
33
  'pisell2.product.card.discount.reason': string;
31
34
  'pisell2.product.card.discount.note': string;
32
35
  'pisell2.product.card.discount.add.note': string;
@@ -24,7 +24,8 @@ __export(locales_exports, {
24
24
  module.exports = __toCommonJS(locales_exports);
25
25
  var locales_default = {
26
26
  "en": {
27
- "pisell2.product.card.day": (val) => `${val > 1 ? "days" : "day"}`,
27
+ "pisell2.product.card.day": (val) => `${val > 1 ? " days" : " day"}`,
28
+ "pisell2.product.card.day.event": (val) => `${val > 1 ? " events" : " event"}`,
28
29
  "pisell2.product.card.discount.reason": "Discount reason",
29
30
  "pisell2.product.card.discount.note": "Note",
30
31
  "pisell2.product.card.discount.add.note": "Add note",
@@ -38,6 +39,7 @@ var locales_default = {
38
39
  },
39
40
  "zh-CN": {
40
41
  "pisell2.product.card.day": (val) => "天",
42
+ "pisell2.product.card.day.event": (val) => "个活动",
41
43
  "pisell2.product.card.discount.reason": "折扣原因",
42
44
  "pisell2.product.card.discount.note": "备注",
43
45
  "pisell2.product.card.discount.add.note": "添加备注",
@@ -51,6 +53,7 @@ var locales_default = {
51
53
  },
52
54
  "zh-HK": {
53
55
  "pisell2.product.card.day": (val) => "天",
56
+ "pisell2.product.card.day.event": (val) => "个活動",
54
57
  "pisell2.product.card.discount.reason": "折扣原因",
55
58
  "pisell2.product.card.discount.note": "備註",
56
59
  "pisell2.product.card.discount.add.note": "添加備註",
@@ -74,7 +74,7 @@ var getServiceTime = (item, currentDate) => {
74
74
  import_dayjs.default.locale(localeTypes[locale]);
75
75
  let startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
76
76
  let endDate = (0, import_dayjs.default)(item == null ? void 0 : item.end_date);
77
- const diffInDays = endDate.diff(startDate, "day");
77
+ const diffInDays = (item == null ? void 0 : item.custom_day_count) || endDate.diff(startDate, "day");
78
78
  let _format = isEn2 ? "ddd, DD/MM/YYYY" : "YYYY-MM-DD,ddd";
79
79
  if ((item == null ? void 0 : item.hasOwnProperty("format")) && ((_b = item == null ? void 0 : item.format) == null ? void 0 : _b.length) > 0) {
80
80
  _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];
@@ -84,7 +84,11 @@ var getServiceTime = (item, currentDate) => {
84
84
  endDate = (0, import_dayjs.default)(`${item == null ? void 0 : item.end_date} ${item == null ? void 0 : item.end_time}`);
85
85
  }
86
86
  const date = `${startDate.format(_format)} ~ ${endDate.format(_format)}`;
87
- const duration = `${diffInDays} ${import_utils.locales.getText("pisell2.product.card.day")(diffInDays)}`;
87
+ let text = import_utils.locales.getText("pisell2.product.card.day")(diffInDays);
88
+ if (item == null ? void 0 : item.custom_day_count) {
89
+ text = import_utils.locales.getText("pisell2.product.card.day.event")(diffInDays);
90
+ }
91
+ const duration = `${diffInDays}${text}`;
88
92
  return `${date} (${duration})`;
89
93
  };
90
94
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface NumberProps {
3
2
  max?: number;
4
3
  min?: number;
package/lib/index.d.ts CHANGED
@@ -117,17 +117,6 @@ export { default as Upload } from './components/upload';
117
117
  export { default as VirtualKeyboard } from './components/virtual-keyboard';
118
118
  export { default as VirtualKeyboardTime } from './components/virtual-keyboard/Time';
119
119
  export { default as WalletCard } from './components/walletCard';
120
- export { default as PisellPriceKeyboard } from './components/virtual-keyboard/Amount';
121
- export { default as PisellNumberKeyboard } from './components/virtual-keyboard/Number';
122
- export { default as ProductCard } from './components/productCard';
123
- export { default as Collapse } from './components/collapse';
124
- export { default as PisellCustomCheckboxGroup } from './components/pisellCustomCheckboxGroup';
125
- export { default as PisellDropdown } from './components/pisellDropdown';
126
- export { default as PisellSectionHeaders } from './components/pisellSectionHeaders';
127
- export { default as PisellImageCarousels } from './components/pisellImageCarousels';
128
- export { default as PisellHeaderProgressBar } from './components/pisellHeaderProgressBar';
129
- export { default as PisellList01 } from './components/pisellList01';
130
- export { default as SectionFooters } from './components/section-footers';
131
120
  export { default as PublishVersionModal } from './components/versionModal';
132
121
  export { default as IconSelect } from './components/iconSelect';
133
122
  export { default as CustomSelect } from './components/customSelect';
@@ -138,3 +127,12 @@ export { default as PisellNavigationMenu } from './components/pisellNavigationMe
138
127
  export { default as PisellAppCard } from './components/pisellAppCard';
139
128
  export type { PisellAppCardProps } from './components/pisellAppCard/types';
140
129
  export { default as BaseTranslation } from './components/dataSourceComponents/fields/Translation/BaseTranslation';
130
+ export { default as PisellCustomCheckboxGroup } from './components/pisellCustomCheckboxGroup';
131
+ export { default as PisellDropdown } from './components/pisellDropdown';
132
+ export { default as PisellSectionHeaders } from './components/pisellSectionHeaders';
133
+ export { default as PisellImageCarousels } from './components/pisellImageCarousels';
134
+ export { default as PisellHeaderProgressBar } from './components/pisellHeaderProgressBar';
135
+ export { default as PisellList01 } from './components/pisellList01';
136
+ export { default as SectionFooters } from './components/section-footers';
137
+ export { default as ProductCard } from './components/productCard';
138
+ export { default as Collapse } from './components/collapse';