@pisell/lowcode-renderer 1.0.11 → 1.0.12
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/es/Render/index.d.ts +1 -0
- package/es/Render/index.js +6 -2
- package/es/api/report/index.js +8 -3
- package/lib/Render/index.d.ts +1 -0
- package/lib/Render/index.js +6 -2
- package/lib/api/report/index.js +3 -2
- package/package.json +1 -1
package/es/Render/index.d.ts
CHANGED
package/es/Render/index.js
CHANGED
|
@@ -24,7 +24,8 @@ var Render = function Render(props) {
|
|
|
24
24
|
var packages = props.packages,
|
|
25
25
|
projectSchema = props.projectSchema,
|
|
26
26
|
className = props.className,
|
|
27
|
-
propsAppHelper = props.appHelper
|
|
27
|
+
propsAppHelper = props.appHelper,
|
|
28
|
+
locale = props.locale;
|
|
28
29
|
var _useState = useState({}),
|
|
29
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
30
31
|
data = _useState2[0],
|
|
@@ -131,13 +132,16 @@ var Render = function Render(props) {
|
|
|
131
132
|
return objValue.concat(srcValue || []);
|
|
132
133
|
}
|
|
133
134
|
}
|
|
135
|
+
console.log(locale, 'locale');
|
|
134
136
|
return /*#__PURE__*/React.createElement(ReactRenderer, {
|
|
135
137
|
className: "lowcode-plugin-sample-preview-content ".concat(className),
|
|
136
138
|
schema: _objectSpread(_objectSpread({}, schema), {}, {
|
|
137
139
|
dataSource: mergeWith(schema.dataSource, projectDataSource, customizer)
|
|
138
140
|
}),
|
|
139
141
|
appHelper: mergeWith(appHelper, propsAppHelper),
|
|
140
|
-
components: components
|
|
142
|
+
components: components,
|
|
143
|
+
messages: i18n,
|
|
144
|
+
locale: locale
|
|
141
145
|
});
|
|
142
146
|
};
|
|
143
147
|
export default Render;
|
package/es/api/report/index.js
CHANGED
|
@@ -35,7 +35,8 @@ var getParams = function getParams(values, url) {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
var _ref = values || {},
|
|
38
|
-
date = _ref.date
|
|
38
|
+
date = _ref.date,
|
|
39
|
+
exportFile = _ref.exportFile;
|
|
39
40
|
|
|
40
41
|
// 存储筛选日期
|
|
41
42
|
var start_at = 0;
|
|
@@ -54,12 +55,16 @@ var getParams = function getParams(values, url) {
|
|
|
54
55
|
// 转换时间戳
|
|
55
56
|
start_at = start_at.unix();
|
|
56
57
|
end_at = end_at.unix();
|
|
57
|
-
return _objectSpread({
|
|
58
|
+
return _objectSpread(_objectSpread({
|
|
58
59
|
shop_id: id,
|
|
59
60
|
start_at: start_at,
|
|
60
61
|
end_at: end_at
|
|
61
|
-
}, timezoneObj)
|
|
62
|
+
}, timezoneObj), {}, {
|
|
63
|
+
exportFile: exportFile
|
|
64
|
+
// email: 'nick.li@pisell.com',
|
|
65
|
+
});
|
|
62
66
|
};
|
|
67
|
+
|
|
63
68
|
var getReportList = /*#__PURE__*/function () {
|
|
64
69
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(values, url) {
|
|
65
70
|
var params, data;
|
package/lib/Render/index.d.ts
CHANGED
package/lib/Render/index.js
CHANGED
|
@@ -44,7 +44,8 @@ var Render = (props) => {
|
|
|
44
44
|
packages,
|
|
45
45
|
projectSchema,
|
|
46
46
|
className,
|
|
47
|
-
appHelper: propsAppHelper
|
|
47
|
+
appHelper: propsAppHelper,
|
|
48
|
+
locale
|
|
48
49
|
} = props;
|
|
49
50
|
const [data, setData] = (0, import_react.useState)({});
|
|
50
51
|
const { schema, components, i18n = {}, projectDataSource = {} } = data;
|
|
@@ -105,6 +106,7 @@ var Render = (props) => {
|
|
|
105
106
|
return objValue.concat(srcValue || []);
|
|
106
107
|
}
|
|
107
108
|
}
|
|
109
|
+
console.log(locale, "locale");
|
|
108
110
|
return /* @__PURE__ */ React.createElement(
|
|
109
111
|
import_ReactRenderer.default,
|
|
110
112
|
{
|
|
@@ -114,7 +116,9 @@ var Render = (props) => {
|
|
|
114
116
|
dataSource: (0, import_lodash_es.mergeWith)(schema.dataSource, projectDataSource, customizer)
|
|
115
117
|
},
|
|
116
118
|
appHelper: (0, import_lodash_es.mergeWith)(import_appHelper.default, propsAppHelper),
|
|
117
|
-
components
|
|
119
|
+
components,
|
|
120
|
+
messages: i18n,
|
|
121
|
+
locale
|
|
118
122
|
}
|
|
119
123
|
);
|
|
120
124
|
};
|
package/lib/api/report/index.js
CHANGED
|
@@ -57,7 +57,7 @@ var getParams = (values, url) => {
|
|
|
57
57
|
timezone: getTimeDiff(timezone2)
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
let { date } = values || {};
|
|
60
|
+
let { date, exportFile } = values || {};
|
|
61
61
|
let start_at = 0;
|
|
62
62
|
let end_at = 0;
|
|
63
63
|
if (date && Array.isArray(date) && date[0]) {
|
|
@@ -73,7 +73,8 @@ var getParams = (values, url) => {
|
|
|
73
73
|
shop_id: id,
|
|
74
74
|
start_at,
|
|
75
75
|
end_at,
|
|
76
|
-
...timezoneObj
|
|
76
|
+
...timezoneObj,
|
|
77
|
+
exportFile
|
|
77
78
|
// email: 'nick.li@pisell.com',
|
|
78
79
|
};
|
|
79
80
|
};
|