@pisell/private-materials 6.4.61 → 6.4.62
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +5 -3
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +4 -3
- package/package.json +1 -1
|
@@ -4,6 +4,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { locales } from '@pisell/utils';
|
|
8
|
+
|
|
7
9
|
/**
|
|
8
10
|
* 格式化 SKU 数据源,适配 SkuCard 组件
|
|
9
11
|
*/
|
|
@@ -45,7 +47,7 @@ export var generateProductTabs = function generateProductTabs(products) {
|
|
|
45
47
|
if (!products || products.length === 0) {
|
|
46
48
|
return [{
|
|
47
49
|
key: 'all',
|
|
48
|
-
label: '
|
|
50
|
+
label: locales.getText('pisell2.ticket-booking.all')
|
|
49
51
|
}];
|
|
50
52
|
}
|
|
51
53
|
if (tabStyle === 'switch') {
|
|
@@ -71,7 +73,7 @@ export var generateProductTabs = function generateProductTabs(products) {
|
|
|
71
73
|
// 生成 tabs
|
|
72
74
|
var tabs = [{
|
|
73
75
|
key: 'all',
|
|
74
|
-
label: '
|
|
76
|
+
label: locales.getText('pisell2.ticket-booking.all')
|
|
75
77
|
}];
|
|
76
78
|
sortedCategories.forEach(function (category) {
|
|
77
79
|
tabs.push({
|
|
@@ -102,7 +104,7 @@ export var generateProductTabs = function generateProductTabs(products) {
|
|
|
102
104
|
// 生成 tabs
|
|
103
105
|
var _tabs = [{
|
|
104
106
|
key: 'all',
|
|
105
|
-
label: "
|
|
107
|
+
label: "".concat(locales.getText('pisell2.ticket-booking.all'), " (").concat(products.length, ")")
|
|
106
108
|
}];
|
|
107
109
|
|
|
108
110
|
// 按 sort 排序
|
|
@@ -23,6 +23,7 @@ __export(utils_exports, {
|
|
|
23
23
|
generateProductTabs: () => generateProductTabs
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(utils_exports);
|
|
26
|
+
var import_utils = require("@pisell/utils");
|
|
26
27
|
var formatSkuDataSource = (dataSource) => {
|
|
27
28
|
return {
|
|
28
29
|
id: dataSource.id,
|
|
@@ -37,7 +38,7 @@ var formatSkuDataSource = (dataSource) => {
|
|
|
37
38
|
};
|
|
38
39
|
var generateProductTabs = (products, tabStyle = "switch") => {
|
|
39
40
|
if (!products || products.length === 0) {
|
|
40
|
-
return [{ key: "all", label: "
|
|
41
|
+
return [{ key: "all", label: import_utils.locales.getText("pisell2.ticket-booking.all") }];
|
|
41
42
|
}
|
|
42
43
|
if (tabStyle === "switch") {
|
|
43
44
|
const categoryMap = /* @__PURE__ */ new Map();
|
|
@@ -54,7 +55,7 @@ var generateProductTabs = (products, tabStyle = "switch") => {
|
|
|
54
55
|
(a, b) => (b.sort || 0) - (a.sort || 0)
|
|
55
56
|
);
|
|
56
57
|
const tabs = [
|
|
57
|
-
{ key: "all", label: "
|
|
58
|
+
{ key: "all", label: import_utils.locales.getText("pisell2.ticket-booking.all") }
|
|
58
59
|
];
|
|
59
60
|
sortedCategories.forEach((category) => {
|
|
60
61
|
tabs.push({
|
|
@@ -78,7 +79,7 @@ var generateProductTabs = (products, tabStyle = "switch") => {
|
|
|
78
79
|
return acc;
|
|
79
80
|
}, {});
|
|
80
81
|
const tabs = [
|
|
81
|
-
{ key: "all", label:
|
|
82
|
+
{ key: "all", label: `${import_utils.locales.getText("pisell2.ticket-booking.all")} (${products.length})` }
|
|
82
83
|
];
|
|
83
84
|
const sortedEntries = Object.entries(categoryCount).sort(
|
|
84
85
|
([, a], [, b]) => (b.category.sort || 0) - (a.category.sort || 0)
|