@pisell/materials 1.0.530 → 1.0.531
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/render/default/view.js +7 -7
- package/build/lowcode/view.js +7 -7
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/es/components/productCard/index.js +6 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/lib/components/productCard/index.js +7 -3
- package/package.json +3 -3
|
@@ -65,7 +65,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
65
65
|
useCustomAction: boolean;
|
|
66
66
|
actionType: string;
|
|
67
67
|
openMode: "modal" | "drawer";
|
|
68
|
-
openContentSize: "small" | "
|
|
68
|
+
openContentSize: "small" | "large" | "middle";
|
|
69
69
|
openTitle: string;
|
|
70
70
|
key: string;
|
|
71
71
|
} | undefined;
|
|
@@ -24,10 +24,12 @@ import Action from "./components/Action";
|
|
|
24
24
|
import UseOpenNote from "./hooks/useOpenNote";
|
|
25
25
|
import localeTexts from "./locales";
|
|
26
26
|
import { defaultValue } from "./status";
|
|
27
|
+
import useEngineContext from "../../hooks/useEngineContext";
|
|
27
28
|
import "./index.less";
|
|
28
|
-
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
29
29
|
var ProductCard = function ProductCard(props) {
|
|
30
|
-
var _classNames, _dataSource$items;
|
|
30
|
+
var _utils$storage, _classNames, _dataSource$items;
|
|
31
|
+
var context = useEngineContext();
|
|
32
|
+
var utils = context.appHelper.utils || {};
|
|
31
33
|
var _props$dataSource = props.dataSource,
|
|
32
34
|
dataSource = _props$dataSource === void 0 ? defaultValue.dataSource : _props$dataSource,
|
|
33
35
|
_props$isShowImage = props.isShowImage,
|
|
@@ -47,6 +49,8 @@ var ProductCard = function ProductCard(props) {
|
|
|
47
49
|
onCard = props.onCard,
|
|
48
50
|
other = _objectWithoutProperties(props, _excluded);
|
|
49
51
|
var useOpenNoteRef = useRef();
|
|
52
|
+
var locale = (utils === null || utils === void 0 ? void 0 : (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || localStorage.getItem('umi_locale');
|
|
53
|
+
locales.init(localeTexts, locale || 'en');
|
|
50
54
|
console.log(dataSource, isShowImage, isShowNote, 'dataSource');
|
|
51
55
|
var image = dataSource.image,
|
|
52
56
|
bundle = dataSource.bundle,
|
|
@@ -65,7 +65,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
65
65
|
useCustomAction: boolean;
|
|
66
66
|
actionType: string;
|
|
67
67
|
openMode: "modal" | "drawer";
|
|
68
|
-
openContentSize: "small" | "
|
|
68
|
+
openContentSize: "small" | "large" | "middle";
|
|
69
69
|
openTitle: string;
|
|
70
70
|
key: string;
|
|
71
71
|
} | undefined;
|
|
@@ -48,10 +48,12 @@ var import_Action = __toESM(require("./components/Action"));
|
|
|
48
48
|
var import_useOpenNote = __toESM(require("./hooks/useOpenNote"));
|
|
49
49
|
var import_locales = __toESM(require("./locales"));
|
|
50
50
|
var import_status = require("./status");
|
|
51
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
51
52
|
var import_index = require("./index.less");
|
|
52
|
-
import_utils.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
|
|
53
53
|
var ProductCard = (props) => {
|
|
54
|
-
var _a;
|
|
54
|
+
var _a, _b;
|
|
55
|
+
const context = (0, import_useEngineContext.default)();
|
|
56
|
+
const utils = context.appHelper.utils || {};
|
|
55
57
|
const {
|
|
56
58
|
dataSource = import_status.defaultValue.dataSource,
|
|
57
59
|
isShowImage = import_status.defaultValue.isShowImage,
|
|
@@ -67,6 +69,8 @@ var ProductCard = (props) => {
|
|
|
67
69
|
...other
|
|
68
70
|
} = props;
|
|
69
71
|
const useOpenNoteRef = (0, import_react.useRef)();
|
|
72
|
+
const locale = ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || localStorage.getItem("umi_locale");
|
|
73
|
+
import_utils.locales.init(import_locales.default, locale || "en");
|
|
70
74
|
console.log(dataSource, isShowImage, isShowNote, "dataSource");
|
|
71
75
|
const {
|
|
72
76
|
image,
|
|
@@ -126,7 +130,7 @@ var ProductCard = (props) => {
|
|
|
126
130
|
),
|
|
127
131
|
/* @__PURE__ */ import_react.default.createElement(import_Packages.default, { item: dataSource, isShowPackageNote }),
|
|
128
132
|
/* @__PURE__ */ import_react.default.createElement(import_Sales.default, { item: dataSource, isShowNote }),
|
|
129
|
-
((
|
|
133
|
+
((_b = dataSource.items) == null ? void 0 : _b.length) ? /* @__PURE__ */ import_react.default.createElement(import_MultiDay.default, { dataSource, hideDivider }) : /* @__PURE__ */ import_react.default.createElement(
|
|
130
134
|
import_AmountFooter.default,
|
|
131
135
|
{
|
|
132
136
|
item: dataSource,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.531",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"swiper": "^8.4.7",
|
|
71
71
|
"react-barcode": "^1.5.3",
|
|
72
72
|
"@pisell/date-picker": "1.0.115",
|
|
73
|
-
"@pisell/
|
|
74
|
-
"@pisell/
|
|
73
|
+
"@pisell/icon": "0.0.10",
|
|
74
|
+
"@pisell/utils": "1.0.43"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"react": "^18.0.0",
|