@pisell/materials 6.11.45 → 6.11.47
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +3 -31
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +5 -5
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +45 -64
- package/es/components/pisellFloorMapLayout/components/ViewControls.less +65 -131
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +1 -1
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +41 -15
- package/es/components/productCard/cartSkuCard/components/weighing/index.d.ts +18 -0
- package/es/components/productCard/cartSkuCard/components/weighing/index.js +39 -0
- package/es/components/productCard/cartSkuCard/components/weighing/index.less +25 -0
- package/es/components/productCard/cartSkuCard/locales.d.ts +20 -0
- package/es/components/productCard/cartSkuCard/locales.js +20 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +1 -25
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +5 -5
- package/lib/components/pisellFloorMapLayout/components/ViewControls.js +62 -107
- package/lib/components/pisellFloorMapLayout/components/ViewControls.less +65 -131
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +1 -1
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +50 -12
- package/lib/components/productCard/cartSkuCard/components/weighing/index.d.ts +18 -0
- package/lib/components/productCard/cartSkuCard/components/weighing/index.js +61 -0
- package/lib/components/productCard/cartSkuCard/components/weighing/index.less +25 -0
- package/lib/components/productCard/cartSkuCard/locales.d.ts +20 -0
- package/lib/components/productCard/cartSkuCard/locales.js +20 -0
- package/package.json +1 -1
- package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +0 -8
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +0 -14
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +0 -12
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarI18n.d.ts +0 -13
- package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +0 -17
- package/es/components/pisellRecordBoard/shellFrame/index.d.ts +0 -30
- package/es/components/pisellRecordBoard/types.d.ts +0 -789
- package/es/index.d.ts +0 -265
- package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +0 -8
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +0 -14
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +0 -12
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarI18n.d.ts +0 -13
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +0 -17
- package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +0 -30
- package/lib/components/pisellRecordBoard/types.d.ts +0 -789
- package/lib/index.d.ts +0 -265
|
@@ -195,9 +195,15 @@
|
|
|
195
195
|
*/
|
|
196
196
|
.pisell-floor-map-layout-view-controls-dock-slide {
|
|
197
197
|
box-sizing: border-box;
|
|
198
|
-
|
|
198
|
+
/**
|
|
199
|
+
* 折叠态必须露出 slide 内首位的合并 toggle(42px)+ bar 左 padding(12px)≈ 54px。
|
|
200
|
+
* 历史上曾用 max-width:0 + 外层覆写,但与 `&--align-end &-dock-slide` 同优先级时
|
|
201
|
+
* 打包顺序可能导致 0 压过 54px → slide 宽度为 0、toggle 整块被裁掉。
|
|
202
|
+
*/
|
|
203
|
+
max-width: 54px;
|
|
199
204
|
overflow: hidden;
|
|
200
205
|
min-width: 0;
|
|
206
|
+
flex-shrink: 0;
|
|
201
207
|
display: flex;
|
|
202
208
|
flex-direction: row;
|
|
203
209
|
align-items: center;
|
|
@@ -279,82 +285,10 @@
|
|
|
279
285
|
}
|
|
280
286
|
}
|
|
281
287
|
|
|
282
|
-
&-dock-expand-btn {
|
|
283
|
-
box-sizing: border-box;
|
|
284
|
-
width: @dock-chrome-outer;
|
|
285
|
-
height: @dock-chrome-outer;
|
|
286
|
-
min-width: @dock-chrome-outer;
|
|
287
|
-
min-height: @dock-chrome-outer;
|
|
288
|
-
padding: 0;
|
|
289
|
-
margin: 0;
|
|
290
|
-
display: inline-flex;
|
|
291
|
-
align-items: center;
|
|
292
|
-
justify-content: center;
|
|
293
|
-
border: 1px solid transparent;
|
|
294
|
-
border-radius: 14px;
|
|
295
|
-
/**
|
|
296
|
-
* 主题色背景:与左下「Today sales」chip 同步走 antd primary 变量;
|
|
297
|
-
* 兜底 #5d3f9f 跟随项目其它主色 token,主题改色时自动同步。
|
|
298
|
-
* 边框透明保留圆角,避免主题色与浅灰描边混色。
|
|
299
|
-
*/
|
|
300
|
-
background: var(--color-primary, var(--ant-color-primary, #5d3f9f));
|
|
301
|
-
box-shadow: 0 4px 16px rgba(15, 23, 42, 0.22);
|
|
302
|
-
cursor: pointer;
|
|
303
|
-
color: #fff;
|
|
304
|
-
font-size: @dock-icon-px;
|
|
305
|
-
line-height: 0;
|
|
306
|
-
appearance: none;
|
|
307
|
-
flex-shrink: 0;
|
|
308
|
-
overflow: hidden;
|
|
309
|
-
transition: width @dock-slide-ms linear,
|
|
310
|
-
min-width @dock-slide-ms linear,
|
|
311
|
-
max-width @dock-slide-ms linear,
|
|
312
|
-
opacity @dock-slide-ms linear,
|
|
313
|
-
border-color @dock-slide-ms linear,
|
|
314
|
-
box-shadow @dock-slide-ms linear,
|
|
315
|
-
filter @dock-slide-ms linear,
|
|
316
|
-
margin @dock-slide-ms linear;
|
|
317
|
-
|
|
318
|
-
/** 与右侧条带同时:条带变长时入口收起为 0 宽;收起条带时入口从 0 拉回到正方形 */
|
|
319
|
-
|
|
320
|
-
&--panel-open {
|
|
321
|
-
width: 0;
|
|
322
|
-
min-width: 0;
|
|
323
|
-
max-width: 0;
|
|
324
|
-
margin: 0;
|
|
325
|
-
opacity: 0;
|
|
326
|
-
border-color: transparent;
|
|
327
|
-
box-shadow: none;
|
|
328
|
-
pointer-events: none;
|
|
329
|
-
cursor: default;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
&:hover {
|
|
333
|
-
/** 与 Today chip 一致:主题色上用 brightness 让 hover 永远比静态色暗一档 */
|
|
334
|
-
filter: brightness(0.92);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.anticon {
|
|
338
|
-
font-size: @dock-icon-px !important;
|
|
339
|
-
line-height: 0;
|
|
340
|
-
display: inline-flex;
|
|
341
|
-
align-items: center;
|
|
342
|
-
justify-content: center;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.anticon svg {
|
|
346
|
-
width: @dock-icon-px !important;
|
|
347
|
-
height: @dock-icon-px !important;
|
|
348
|
-
display: block;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
288
|
/**
|
|
353
|
-
*
|
|
354
|
-
* -
|
|
355
|
-
*
|
|
356
|
-
* - 默认 align(左下):extras 在左缘,用 margin-right:8px 与 expand-btn 留缝;
|
|
357
|
-
* - align-end(右下)row-reverse 后 extras 贴右缘,用 margin-left:8px 与左侧 expand 留缝。
|
|
289
|
+
* dockChrome 屏右缘常驻 pill:「锁 / 全览」。
|
|
290
|
+
* 整组与 slide 共用同一外壳(dock-row 提供 border / radius / shadow),
|
|
291
|
+
* 左侧留 padding,与左侧展开条 / toggle 拉开,避免贴太紧;右侧保留与屏缘的呼吸。
|
|
358
292
|
*/
|
|
359
293
|
&-dock-collapsed-extras {
|
|
360
294
|
box-sizing: border-box;
|
|
@@ -364,38 +298,27 @@
|
|
|
364
298
|
align-items: center;
|
|
365
299
|
justify-content: center;
|
|
366
300
|
gap: 5px;
|
|
367
|
-
padding: 0 10px;
|
|
368
|
-
margin-right: 8px;
|
|
369
|
-
border: 1px solid #e8eaed;
|
|
370
|
-
border-radius: 14px;
|
|
301
|
+
padding: 0 10px 0 10px;
|
|
371
302
|
background: #fff;
|
|
372
|
-
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
373
303
|
flex-shrink: 0;
|
|
374
|
-
overflow: hidden;
|
|
375
|
-
transition: max-width @dock-slide-ms linear,
|
|
376
|
-
opacity @dock-slide-ms linear,
|
|
377
|
-
border-color @dock-slide-ms linear,
|
|
378
|
-
box-shadow @dock-slide-ms linear,
|
|
379
|
-
margin @dock-slide-ms linear,
|
|
380
|
-
padding @dock-slide-ms linear;
|
|
381
304
|
max-width: 240px;
|
|
382
305
|
}
|
|
383
306
|
|
|
384
307
|
/**
|
|
385
|
-
* 右下 dock:row-reverse 后 DOM [extras][
|
|
308
|
+
* 右下 dock:row-reverse 后 DOM [extras][slide] 呈 [slide][extras],
|
|
386
309
|
* extras 贴右缘。本场景下整组按钮做成「连体 pill」:
|
|
387
310
|
*
|
|
388
|
-
* - 折叠态视觉:[
|
|
311
|
+
* - 折叠态视觉:[slide 内紫色 toggle][锁定/全览 extras]
|
|
389
312
|
* - 展开态视觉:[slide-bar 工具条][锁定/全览 extras]
|
|
390
|
-
* - 展开方向:slide max-width 由
|
|
313
|
+
* - 展开方向:slide max-width 由 54 → 720px,由于父级锚定 `right:14px`,
|
|
391
314
|
* 整组横向"从右往左"伸长,视觉上工具条从 extras 左侧扩出来。
|
|
392
315
|
*
|
|
393
316
|
* 实现方式:把 box-shadow / border / border-radius 统一挂到外层 `dock-row` 容器上,
|
|
394
|
-
* 内层 slide-bar /
|
|
317
|
+
* 内层 slide-bar / extras 全部去掉自己的边框圆角与投影,
|
|
395
318
|
* 由 `overflow: hidden` 的外壳负责整体裁剪。这样:
|
|
396
319
|
* - 整组只有一道阴影,无相邻拼接处的接缝阴影;
|
|
397
320
|
* - 子元素切换宽度(max-width / width)时阴影边界跟随容器自然增长,无需 clip-path 修补;
|
|
398
|
-
* - 紫色
|
|
321
|
+
* - 紫色 toggle / 白色 extras / 白色 slide-bar 在同一个外壳里平铺,自动呈现连体观感。
|
|
399
322
|
*/
|
|
400
323
|
&--align-end .pisell-floor-map-layout-view-controls-dock-row {
|
|
401
324
|
border: 1px solid #e8eaed;
|
|
@@ -427,35 +350,58 @@
|
|
|
427
350
|
padding-right: 0;
|
|
428
351
|
}
|
|
429
352
|
|
|
430
|
-
/** 紫色入口:去掉自身投影圆角与边框,仅保留紫色底色,由外壳裁出连体圆角 */
|
|
431
|
-
&--align-end &-dock-expand-btn {
|
|
432
|
-
border: 0;
|
|
433
|
-
border-radius: 0;
|
|
434
|
-
box-shadow: none;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
353
|
/**
|
|
438
|
-
*
|
|
439
|
-
*
|
|
354
|
+
* 合并入口:紫底白 icon,主题色与原 `dock-expand-btn` 一致。
|
|
355
|
+
* 尺寸对齐 dock 内其他工具按钮(@dock-btn-size),由外壳负责连体圆角与阴影。
|
|
440
356
|
*/
|
|
441
|
-
|
|
357
|
+
&-dock-toggle-btn {
|
|
358
|
+
box-sizing: border-box;
|
|
359
|
+
width: @dock-btn-size;
|
|
360
|
+
min-width: @dock-btn-size;
|
|
361
|
+
max-width: @dock-btn-size;
|
|
362
|
+
height: @dock-btn-size;
|
|
363
|
+
min-height: @dock-btn-size !important;
|
|
364
|
+
max-height: @dock-btn-size !important;
|
|
365
|
+
flex-shrink: 0;
|
|
366
|
+
padding: 0;
|
|
442
367
|
margin: 0;
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
368
|
+
display: inline-flex;
|
|
369
|
+
align-items: center;
|
|
370
|
+
justify-content: center;
|
|
371
|
+
border: none;
|
|
372
|
+
border-radius: 8px;
|
|
373
|
+
background: var(--color-primary, var(--ant-color-primary, #5d3f9f));
|
|
374
|
+
color: #fff;
|
|
375
|
+
font-size: @dock-icon-px;
|
|
376
|
+
line-height: 0;
|
|
377
|
+
cursor: pointer;
|
|
378
|
+
appearance: none;
|
|
379
|
+
transition: filter @dock-slide-ms linear;
|
|
448
380
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
381
|
+
&:hover {
|
|
382
|
+
/** 与原 expand-btn 一致:主题色上用 brightness 让 hover 暗一档 */
|
|
383
|
+
filter: brightness(0.92);
|
|
384
|
+
background: var(--color-primary, var(--ant-color-primary, #5d3f9f));
|
|
385
|
+
color: #fff;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.anticon,
|
|
389
|
+
.pisell-lowcode-icon,
|
|
390
|
+
span[role='img'] {
|
|
391
|
+
font-size: @dock-icon-px !important;
|
|
392
|
+
line-height: 0;
|
|
393
|
+
display: inline-flex;
|
|
394
|
+
align-items: center;
|
|
395
|
+
justify-content: center;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.anticon svg,
|
|
399
|
+
.pisell-lowcode-icon svg,
|
|
400
|
+
span[role='img'] svg {
|
|
401
|
+
width: @dock-icon-px !important;
|
|
402
|
+
height: @dock-icon-px !important;
|
|
403
|
+
display: block;
|
|
404
|
+
}
|
|
459
405
|
}
|
|
460
406
|
|
|
461
407
|
&-dock-collapsed-extras-btn {
|
|
@@ -488,17 +434,6 @@
|
|
|
488
434
|
}
|
|
489
435
|
}
|
|
490
436
|
|
|
491
|
-
&-dock-collapsed-extras--panel-open {
|
|
492
|
-
max-width: 0;
|
|
493
|
-
margin-left: 0;
|
|
494
|
-
margin-right: 0;
|
|
495
|
-
padding: 0;
|
|
496
|
-
opacity: 0;
|
|
497
|
-
border-color: transparent;
|
|
498
|
-
box-shadow: none;
|
|
499
|
-
pointer-events: none;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
437
|
&-dock-trailing {
|
|
503
438
|
display: inline-flex;
|
|
504
439
|
align-items: center;
|
|
@@ -521,8 +456,7 @@
|
|
|
521
456
|
|
|
522
457
|
@media (prefers-reduced-motion: reduce) {
|
|
523
458
|
.pisell-floor-map-layout-view-controls--dock .pisell-floor-map-layout-view-controls-dock-slide,
|
|
524
|
-
.pisell-floor-map-layout-view-controls--dock .pisell-floor-map-layout-view-controls-dock-
|
|
525
|
-
.pisell-floor-map-layout-view-controls--dock .pisell-floor-map-layout-view-controls-dock-collapsed-extras {
|
|
459
|
+
.pisell-floor-map-layout-view-controls--dock .pisell-floor-map-layout-view-controls-dock-toggle-btn {
|
|
526
460
|
transition-duration: 0.01ms;
|
|
527
461
|
}
|
|
528
462
|
}
|
|
@@ -213,7 +213,7 @@ var RecordBoardToolBar = (props) => {
|
|
|
213
213
|
String
|
|
214
214
|
) : [];
|
|
215
215
|
const allowedKeys = [
|
|
216
|
-
...DEFAULT_RESOURCE_WALL_STATUS_SORT_FIELD_KEYS.map(String),
|
|
216
|
+
...import_venueWallUtils.DEFAULT_RESOURCE_WALL_STATUS_SORT_FIELD_KEYS.map(String),
|
|
217
217
|
...extraWallKeys
|
|
218
218
|
];
|
|
219
219
|
const filtered = base.filter(
|
|
@@ -37,10 +37,18 @@ var import_classnames = __toESM(require("classnames"));
|
|
|
37
37
|
var import_utils = require("@pisell/utils");
|
|
38
38
|
var import_specs = __toESM(require("../specs"));
|
|
39
39
|
var import_holders = __toESM(require("../holders"));
|
|
40
|
+
var import_weighing = __toESM(require("../weighing"));
|
|
40
41
|
var import__ = require("../../index");
|
|
41
42
|
var import_EditButton = __toESM(require("../../../components/Header/EditButton"));
|
|
42
43
|
var import_index = require("./index.less");
|
|
44
|
+
var UNIT_LABEL = {
|
|
45
|
+
KILOGRAMS: "kg",
|
|
46
|
+
GRAMS: "g",
|
|
47
|
+
POUNDS: "lb",
|
|
48
|
+
OUNCES: "oz"
|
|
49
|
+
};
|
|
43
50
|
var BasicInfo = (props) => {
|
|
51
|
+
var _a, _b;
|
|
44
52
|
const {
|
|
45
53
|
isShowImage,
|
|
46
54
|
dataSource = {},
|
|
@@ -82,6 +90,31 @@ var BasicInfo = (props) => {
|
|
|
82
90
|
);
|
|
83
91
|
};
|
|
84
92
|
const hasSpecs = (bundle == null ? void 0 : bundle.length) || (options == null ? void 0 : options.length) || product_option_string;
|
|
93
|
+
const weighingInfo = (_b = (_a = dataSource == null ? void 0 : dataSource._origin) == null ? void 0 : _a._extend) == null ? void 0 : _b.weighing;
|
|
94
|
+
const hasWeighingInfo = Boolean(
|
|
95
|
+
weighingInfo && (Number.isFinite(Number(weighingInfo == null ? void 0 : weighingInfo.weight)) || Number.isFinite(Number(weighingInfo == null ? void 0 : weighingInfo.net_weight)))
|
|
96
|
+
);
|
|
97
|
+
const hasProductMeta = hasSpecs || hasWeighingInfo;
|
|
98
|
+
const renderProductMeta = () => {
|
|
99
|
+
if (!hasProductMeta) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, hasWeighingInfo ? /* @__PURE__ */ import_react.default.createElement(import_weighing.default, { dataSource: weighingInfo }) : null, hasSpecs ? /* @__PURE__ */ import_react.default.createElement(
|
|
103
|
+
import_specs.default,
|
|
104
|
+
{
|
|
105
|
+
dataSource,
|
|
106
|
+
maxSpecsCount,
|
|
107
|
+
type
|
|
108
|
+
}
|
|
109
|
+
) : null);
|
|
110
|
+
};
|
|
111
|
+
const renderProductPrice = () => {
|
|
112
|
+
if (weighingInfo) {
|
|
113
|
+
const { unit, unit_price } = weighingInfo;
|
|
114
|
+
return `${(0, import_utils.formatAmount)(unit_price, 2, symbol)}/${UNIT_LABEL[unit]}`;
|
|
115
|
+
}
|
|
116
|
+
return (0, import_utils.formatAmount)(price, 2, symbol);
|
|
117
|
+
};
|
|
85
118
|
const renderImage = () => {
|
|
86
119
|
if (!isShowImage) return null;
|
|
87
120
|
if (image) {
|
|
@@ -92,16 +125,22 @@ var BasicInfo = (props) => {
|
|
|
92
125
|
};
|
|
93
126
|
const renderEdit = (0, import_react.useMemo)(() => {
|
|
94
127
|
if (!isShowEditProduct) return null;
|
|
95
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
128
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
129
|
+
import_EditButton.default,
|
|
130
|
+
{
|
|
131
|
+
onEdit: () => onEditProduct == null ? void 0 : onEditProduct(dataSource),
|
|
132
|
+
disabledEditClick
|
|
133
|
+
}
|
|
134
|
+
);
|
|
96
135
|
}, [disabledEditClick]);
|
|
97
136
|
const _isShowOriginalPrice = (0, import_react.useMemo)(() => {
|
|
98
137
|
if (!isShowOriginalPrice) return false;
|
|
99
|
-
if (hasSpecs) return false;
|
|
138
|
+
if (hasSpecs || hasWeighingInfo) return false;
|
|
100
139
|
const _originalTotal = parseFloat(String(origin_total || 0));
|
|
101
140
|
const _total = parseFloat(String(total || 0));
|
|
102
141
|
if (isNaN(_originalTotal) || isNaN(total)) return false;
|
|
103
142
|
return _originalTotal !== 0 && _originalTotal != _total;
|
|
104
|
-
}, [isShowOriginalPrice, origin_total, total, hasSpecs]);
|
|
143
|
+
}, [isShowOriginalPrice, origin_total, total, hasSpecs, hasWeighingInfo]);
|
|
105
144
|
if (type === "a5") {
|
|
106
145
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a5` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement(
|
|
107
146
|
"div",
|
|
@@ -109,20 +148,19 @@ var BasicInfo = (props) => {
|
|
|
109
148
|
className: `product-name ${renderEdit ? "product-name-edit" : ""}`
|
|
110
149
|
},
|
|
111
150
|
name
|
|
112
|
-
), (!holder_id || !(holder_id == null ? void 0 : holder_id.length)) && !isFormSubject ? /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, (
|
|
151
|
+
), renderProductMeta(), (!holder_id || !(holder_id == null ? void 0 : holder_id.length)) && !isFormSubject ? /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, renderProductPrice()) : /* @__PURE__ */ import_react.default.createElement(import_holders.default, { dataSource })), renderEdit));
|
|
113
152
|
}
|
|
114
153
|
if (type === "a9") {
|
|
115
154
|
const showAmount = isBundle && !showFooter;
|
|
116
155
|
const _price = showAmount ? Number(price ?? 0) * num : price;
|
|
117
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a9` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info ${isBundle ? "row" : ""}` }, /* @__PURE__ */ import_react.default.createElement(
|
|
118
|
-
|
|
156
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a9` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info ${isBundle ? "row" : ""}` }, /* @__PURE__ */ import_react.default.createElement(
|
|
157
|
+
"div",
|
|
119
158
|
{
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
) : null), renderEdit));
|
|
159
|
+
className: `product-name ${renderEdit ? "product-name-edit" : ""}`
|
|
160
|
+
},
|
|
161
|
+
name
|
|
162
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, /* @__PURE__ */ import_react.default.createElement("span", null, renderProductPrice()), _isShowOriginalPrice ? /* @__PURE__ */ import_react.default.createElement("span", { className: `original-price` }, (0, import_utils.formatAmount)(origin_total, 2, symbol)) : null)), renderProductMeta()), renderEdit));
|
|
125
163
|
}
|
|
126
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name),
|
|
164
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasProductMeta ? renderProductMeta() : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, renderProductPrice())), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num - (totalDifference ?? 0), 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
|
|
127
165
|
};
|
|
128
166
|
var basicInfo_default = BasicInfo;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
declare type WeightUnit = 'KILOGRAMS' | 'GRAMS' | 'POUNDS' | 'OUNCES';
|
|
3
|
+
interface WeighingInfo {
|
|
4
|
+
weight?: number;
|
|
5
|
+
tare?: {
|
|
6
|
+
id?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
value?: number;
|
|
9
|
+
unit?: WeightUnit;
|
|
10
|
+
};
|
|
11
|
+
net_weight?: number;
|
|
12
|
+
unit?: WeightUnit;
|
|
13
|
+
}
|
|
14
|
+
interface WeighingProps {
|
|
15
|
+
dataSource?: WeighingInfo;
|
|
16
|
+
}
|
|
17
|
+
declare const Weighing: (props: WeighingProps) => JSX.Element | null;
|
|
18
|
+
export default Weighing;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/productCard/cartSkuCard/components/weighing/index.tsx
|
|
30
|
+
var weighing_exports = {};
|
|
31
|
+
__export(weighing_exports, {
|
|
32
|
+
default: () => weighing_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(weighing_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import__ = require("../../index");
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var UNIT_LABEL_MAP = {
|
|
40
|
+
KILOGRAMS: "kg",
|
|
41
|
+
GRAMS: "g",
|
|
42
|
+
POUNDS: "lb",
|
|
43
|
+
OUNCES: "oz"
|
|
44
|
+
};
|
|
45
|
+
var formatWeight = (value, unit) => {
|
|
46
|
+
const parsedValue = Number(value);
|
|
47
|
+
const displayValue = Number.isFinite(parsedValue) ? parsedValue : 0;
|
|
48
|
+
const displayUnit = UNIT_LABEL_MAP[unit || "KILOGRAMS"];
|
|
49
|
+
return `${displayValue.toFixed(3)} ${displayUnit}`;
|
|
50
|
+
};
|
|
51
|
+
var Weighing = (props) => {
|
|
52
|
+
const { dataSource } = props;
|
|
53
|
+
if (!dataSource) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
const { weight, tare, net_weight, unit = "KILOGRAMS" } = dataSource;
|
|
57
|
+
const tareValue = Number((tare == null ? void 0 : tare.value) || 0);
|
|
58
|
+
const tareLabel = (tare == null ? void 0 : tare.label) || import_utils.locales.getText("pisell2.cart.sku-card.weighing.tare");
|
|
59
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__weighing` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__weighing-row` }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.cart.sku-card.weighing.gross"), ":"), /* @__PURE__ */ import_react.default.createElement("span", null, formatWeight(weight, unit))), tareValue > 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__weighing-row` }, /* @__PURE__ */ import_react.default.createElement("span", null, tareLabel, ":"), /* @__PURE__ */ import_react.default.createElement("span", null, "-", formatWeight(tareValue, (tare == null ? void 0 : tare.unit) || unit))) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__weighing-row` }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.cart.sku-card.weighing.net"), ":"), /* @__PURE__ */ import_react.default.createElement("span", null, formatWeight(net_weight, unit))));
|
|
60
|
+
};
|
|
61
|
+
var weighing_default = Weighing;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.pisell-cart-sku-card__weighing {
|
|
2
|
+
user-select: none;
|
|
3
|
+
color: #667085;
|
|
4
|
+
font-size: 14px;
|
|
5
|
+
font-weight: 400;
|
|
6
|
+
line-height: 20px;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
|
|
11
|
+
&-row {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 4px;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
text-overflow: ellipsis;
|
|
18
|
+
|
|
19
|
+
> span {
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
text-overflow: ellipsis;
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -6,6 +6,10 @@ declare const _default: {
|
|
|
6
6
|
'pisell2.cart.sku-card.sales.title': string;
|
|
7
7
|
'pisell2.cart.sku-card.actions.delete': string;
|
|
8
8
|
'pisell2.cart.sku-card.unassigned': string;
|
|
9
|
+
'pisell2.cart.sku-card.weighing.gross': string;
|
|
10
|
+
'pisell2.cart.sku-card.weighing.tare': string;
|
|
11
|
+
'pisell2.cart.sku-card.weighing.net': string;
|
|
12
|
+
'pisell2.cart.sku-card.weighing.noTare': string;
|
|
9
13
|
'pisell2.cart.sku-card.gift.title': string;
|
|
10
14
|
'pisell2.cart.sku-card.gift.select.title': string;
|
|
11
15
|
'pisell2.cart.sku-card.gift.total': (num: number) => string;
|
|
@@ -41,6 +45,10 @@ declare const _default: {
|
|
|
41
45
|
'pisell2.cart.sku-card.sales.title': string;
|
|
42
46
|
'pisell2.cart.sku-card.actions.delete': string;
|
|
43
47
|
'pisell2.cart.sku-card.unassigned': string;
|
|
48
|
+
'pisell2.cart.sku-card.weighing.gross': string;
|
|
49
|
+
'pisell2.cart.sku-card.weighing.tare': string;
|
|
50
|
+
'pisell2.cart.sku-card.weighing.net': string;
|
|
51
|
+
'pisell2.cart.sku-card.weighing.noTare': string;
|
|
44
52
|
'pisell2.cart.sku-card.gift.title': string;
|
|
45
53
|
'pisell2.cart.sku-card.gift.select.title': string;
|
|
46
54
|
'pisell2.cart.sku-card.gift.total': (num: number) => string;
|
|
@@ -76,6 +84,10 @@ declare const _default: {
|
|
|
76
84
|
'pisell2.cart.sku-card.sales.title': string;
|
|
77
85
|
'pisell2.cart.sku-card.actions.delete': string;
|
|
78
86
|
'pisell2.cart.sku-card.unassigned': string;
|
|
87
|
+
'pisell2.cart.sku-card.weighing.gross': string;
|
|
88
|
+
'pisell2.cart.sku-card.weighing.tare': string;
|
|
89
|
+
'pisell2.cart.sku-card.weighing.net': string;
|
|
90
|
+
'pisell2.cart.sku-card.weighing.noTare': string;
|
|
79
91
|
'pisell2.cart.sku-card.gift.title': string;
|
|
80
92
|
'pisell2.cart.sku-card.gift.select.title': string;
|
|
81
93
|
'pisell2.cart.sku-card.gift.total': (num: number) => string;
|
|
@@ -111,6 +123,10 @@ declare const _default: {
|
|
|
111
123
|
'pisell2.cart.sku-card.sales.title': string;
|
|
112
124
|
'pisell2.cart.sku-card.actions.delete': string;
|
|
113
125
|
'pisell2.cart.sku-card.unassigned': string;
|
|
126
|
+
'pisell2.cart.sku-card.weighing.gross': string;
|
|
127
|
+
'pisell2.cart.sku-card.weighing.tare': string;
|
|
128
|
+
'pisell2.cart.sku-card.weighing.net': string;
|
|
129
|
+
'pisell2.cart.sku-card.weighing.noTare': string;
|
|
114
130
|
'pisell2.cart.sku-card.gift.title': string;
|
|
115
131
|
'pisell2.cart.sku-card.gift.select.title': string;
|
|
116
132
|
'pisell2.cart.sku-card.gift.total': (num: number) => string;
|
|
@@ -146,6 +162,10 @@ declare const _default: {
|
|
|
146
162
|
'pisell2.cart.sku-card.sales.title': string;
|
|
147
163
|
'pisell2.cart.sku-card.actions.delete': string;
|
|
148
164
|
'pisell2.cart.sku-card.unassigned': string;
|
|
165
|
+
'pisell2.cart.sku-card.weighing.gross': string;
|
|
166
|
+
'pisell2.cart.sku-card.weighing.tare': string;
|
|
167
|
+
'pisell2.cart.sku-card.weighing.net': string;
|
|
168
|
+
'pisell2.cart.sku-card.weighing.noTare': string;
|
|
149
169
|
'pisell2.cart.sku-card.gift.title': string;
|
|
150
170
|
'pisell2.cart.sku-card.gift.select.title': string;
|
|
151
171
|
'pisell2.cart.sku-card.gift.total': (num: number) => string;
|
|
@@ -42,6 +42,10 @@ var locales_default = {
|
|
|
42
42
|
"pisell2.cart.sku-card.sales.title": "Sales",
|
|
43
43
|
"pisell2.cart.sku-card.actions.delete": "Delete",
|
|
44
44
|
"pisell2.cart.sku-card.unassigned": "Unassigned",
|
|
45
|
+
"pisell2.cart.sku-card.weighing.gross": "Gross",
|
|
46
|
+
"pisell2.cart.sku-card.weighing.tare": "Tare",
|
|
47
|
+
"pisell2.cart.sku-card.weighing.net": "Net",
|
|
48
|
+
"pisell2.cart.sku-card.weighing.noTare": "No tare",
|
|
45
49
|
"pisell2.cart.sku-card.gift.title": "Gift",
|
|
46
50
|
"pisell2.cart.sku-card.gift.select.title": "Select Gift",
|
|
47
51
|
"pisell2.cart.sku-card.gift.total": (num) => `${num} ${num > 1 ? "items" : "item"}`
|
|
@@ -54,6 +58,10 @@ var locales_default = {
|
|
|
54
58
|
"pisell2.cart.sku-card.sales.title": "销售",
|
|
55
59
|
"pisell2.cart.sku-card.actions.delete": "删除",
|
|
56
60
|
"pisell2.cart.sku-card.unassigned": "未分配",
|
|
61
|
+
"pisell2.cart.sku-card.weighing.gross": "毛重",
|
|
62
|
+
"pisell2.cart.sku-card.weighing.tare": "皮重",
|
|
63
|
+
"pisell2.cart.sku-card.weighing.net": "净重",
|
|
64
|
+
"pisell2.cart.sku-card.weighing.noTare": "无皮重",
|
|
57
65
|
"pisell2.cart.sku-card.gift.title": "赠品",
|
|
58
66
|
"pisell2.cart.sku-card.gift.select.title": "选择赠品",
|
|
59
67
|
"pisell2.cart.sku-card.gift.total": (num) => `共${num}件`
|
|
@@ -66,6 +74,10 @@ var locales_default = {
|
|
|
66
74
|
"pisell2.cart.sku-card.sales.title": "銷售",
|
|
67
75
|
"pisell2.cart.sku-card.actions.delete": "刪除",
|
|
68
76
|
"pisell2.cart.sku-card.unassigned": "未分配",
|
|
77
|
+
"pisell2.cart.sku-card.weighing.gross": "毛重",
|
|
78
|
+
"pisell2.cart.sku-card.weighing.tare": "皮重",
|
|
79
|
+
"pisell2.cart.sku-card.weighing.net": "淨重",
|
|
80
|
+
"pisell2.cart.sku-card.weighing.noTare": "無皮重",
|
|
69
81
|
"pisell2.cart.sku-card.gift.title": "贈品",
|
|
70
82
|
"pisell2.cart.sku-card.gift.select.title": "選擇贈品",
|
|
71
83
|
"pisell2.cart.sku-card.gift.total": (num) => `共${num}件`
|
|
@@ -78,6 +90,10 @@ var locales_default = {
|
|
|
78
90
|
"pisell2.cart.sku-card.sales.title": "セール",
|
|
79
91
|
"pisell2.cart.sku-card.actions.delete": "削除",
|
|
80
92
|
"pisell2.cart.sku-card.unassigned": "未割り当て",
|
|
93
|
+
"pisell2.cart.sku-card.weighing.gross": "総重量",
|
|
94
|
+
"pisell2.cart.sku-card.weighing.tare": "風袋",
|
|
95
|
+
"pisell2.cart.sku-card.weighing.net": "正味重量",
|
|
96
|
+
"pisell2.cart.sku-card.weighing.noTare": "風袋なし",
|
|
81
97
|
"pisell2.cart.sku-card.gift.title": "プレゼント",
|
|
82
98
|
"pisell2.cart.sku-card.gift.select.title": "プレゼントを選択",
|
|
83
99
|
"pisell2.cart.sku-card.gift.total": (num) => `計${num}点`
|
|
@@ -90,6 +106,10 @@ var locales_default = {
|
|
|
90
106
|
"pisell2.cart.sku-card.sales.title": "Vendas",
|
|
91
107
|
"pisell2.cart.sku-card.actions.delete": "Excluir",
|
|
92
108
|
"pisell2.cart.sku-card.unassigned": "Não atribuído",
|
|
109
|
+
"pisell2.cart.sku-card.weighing.gross": "Peso bruto",
|
|
110
|
+
"pisell2.cart.sku-card.weighing.tare": "Tara",
|
|
111
|
+
"pisell2.cart.sku-card.weighing.net": "Peso líquido",
|
|
112
|
+
"pisell2.cart.sku-card.weighing.noTare": "Sem tara",
|
|
93
113
|
"pisell2.cart.sku-card.gift.title": "Brinde",
|
|
94
114
|
"pisell2.cart.sku-card.gift.select.title": "Escolher brinde",
|
|
95
115
|
"pisell2.cart.sku-card.gift.total": (num) => `${num} itens no total`
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { RecordBoardProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* RecordBoard 容器:提供统一的 data / pagination / search 上下文。
|
|
5
|
-
* 打散 props:列表/分页/搜索/多选、grid/toolBar/…;可选根级 **floorMap**(兼容透传)。
|
|
6
|
-
* 平面图推荐在 ShellFrame 内使用 **PisellRecordBoard.FloorMap** 声明,与根级 `floorMap` 合并(子优先)。
|
|
7
|
-
*/
|
|
8
|
-
declare const PisellRecordBoard: React.FC<RecordBoardProps>;
|
|
9
|
-
export default PisellRecordBoard;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
import type { RecordBoardContextValue } from '../../types';
|
|
4
|
-
export interface RecordBoardPaginationProps extends Partial<Pick<RecordBoardContextValue, 'pagination' | 'total' | 'onPageChange' | 'loading'>> {
|
|
5
|
-
className?: string;
|
|
6
|
-
style?: React.CSSProperties;
|
|
7
|
-
render?: (ctx: RecordBoardContextValue) => React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* RecordBoard 下的分页:接入 packages/materials 的 Pagination,从 context 取 pagination / total / onPageChange;可透传 childComponentProps.pagination。
|
|
11
|
-
* 当 context 中 pagination 缺失时使用默认分页,避免在 Storybook 或未完整注入 context 时报错。
|
|
12
|
-
*/
|
|
13
|
-
declare const RecordBoardPagination: React.FC<RecordBoardPaginationProps>;
|
|
14
|
-
export default RecordBoardPagination;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { RecordBoardToolBarProps as ToolBarPropsType } from '../../types';
|
|
3
|
-
import './ToolBarFilter.less';
|
|
4
|
-
import './recordBoardToolbar.less';
|
|
5
|
-
/**
|
|
6
|
-
* RecordBoard 下的工具栏:使用 PisellToolBar。
|
|
7
|
-
* 左侧默认 PisellFind(inline);右侧默认 PisellFilter。通过 childComponentProps.toolBar.search / toolBar.filter 为对象时透传对应组件 props,为 false 时不渲染。
|
|
8
|
-
* 可透传 topLeft、topRight、bottomLeft、bottomRight、tabs。
|
|
9
|
-
*/
|
|
10
|
-
declare const RecordBoardToolBar: React.FC<RecordBoardToolBarProps>;
|
|
11
|
-
export declare type RecordBoardToolBarProps = ToolBarPropsType;
|
|
12
|
-
export default RecordBoardToolBar;
|