awing-library 2.1.24 → 2.1.25
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.
|
@@ -73,16 +73,16 @@ var Recoil_1 = require("../Recoil");
|
|
|
73
73
|
var Utils_1 = require("../Utils");
|
|
74
74
|
var Styles_1 = require("./Styles");
|
|
75
75
|
var ViewContent = function (_a) {
|
|
76
|
-
var _b, _c, _d;
|
|
76
|
+
var _b, _c, _d, _e, _f;
|
|
77
77
|
var viewInfoData = _a.viewInfoData, pageId = _a.pageId, viewNumber = _a.viewNumber, onChange = _a.onChange, isCreate = _a.isCreate;
|
|
78
|
-
var
|
|
78
|
+
var _g = (0, Context_2.default)(), service = _g.service, pageCode = _g.pageCode, domainId = _g.domainId, CONFIGS = _g.configs;
|
|
79
79
|
var appHelper = (0, Context_1.useAwing)().appHelper;
|
|
80
|
-
var
|
|
81
|
-
var
|
|
82
|
-
var
|
|
80
|
+
var _h = react_1.default.useState(''), scriptValidationTemplate = _h[0], setScriptValidationTemplate = _h[1];
|
|
81
|
+
var _j = react_1.default.useState(''), scriptAutoField = _j[0], setScriptAutoField = _j[1];
|
|
82
|
+
var _k = react_1.default.useState(false), loading = _k[0], setLoading = _k[1];
|
|
83
83
|
var isUniq = react_1.default.useRef(false);
|
|
84
84
|
var rootDirectory = (0, recoil_1.useRecoilValue)(Recoil_1.pageRootDeirectory);
|
|
85
|
-
var
|
|
85
|
+
var _l = (0, recoil_1.useRecoilState)(Recoil_1.pageEventState), events = _l[0], setEvent = _l[1];
|
|
86
86
|
react_1.default.useEffect(function () {
|
|
87
87
|
if (viewInfoData === null || viewInfoData === void 0 ? void 0 : viewInfoData.templateId) {
|
|
88
88
|
setLoading(true);
|
|
@@ -174,9 +174,9 @@ var ViewContent = function (_a) {
|
|
|
174
174
|
? CONFIGS.FILE_TEMP_PATH
|
|
175
175
|
: CONFIGS.FILE_STATIC_PATH, "/").concat(pageCode === enums_1.PageCode.Lgn
|
|
176
176
|
? 'lgn'
|
|
177
|
-
: 'wlc', "/").concat((_d = (_c = viewInfoData.viewDatas) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.pageId), enablePreview: pageCode === enums_1.PageCode.Lgn, advanceFields: viewInfoData.viewDatas.filter(function (item) { return item === null || item === void 0 ? void 0 : item.isAdvanced; }).map(function (field) { return field.fieldName; }), scriptValidate: scriptValidationTemplate, scriptAutoField: scriptAutoField, domainId: domainId, configs: CONFIGS,
|
|
177
|
+
: 'wlc', "/").concat((_d = (_c = viewInfoData.viewDatas) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.pageId), enablePreview: pageCode === enums_1.PageCode.Lgn, advanceFields: (_f = (_e = viewInfoData.viewDatas) === null || _e === void 0 ? void 0 : _e.filter(function (item) { return item === null || item === void 0 ? void 0 : item.isAdvanced; })) === null || _f === void 0 ? void 0 : _f.map(function (field) { return field.fieldName; }), scriptValidate: scriptValidationTemplate, scriptAutoField: scriptAutoField, domainId: domainId, configs: CONFIGS,
|
|
178
178
|
// validStatus={validStatus}
|
|
179
|
-
validStatus: viewInfoData.validStatus, viewEvents: events.filter(function (item) { return item.viewNumber === viewNumber + 1; }), onChange: handleOnChange, onChangeViewValid: function (status) {
|
|
179
|
+
validStatus: viewInfoData.validStatus, viewEvents: events === null || events === void 0 ? void 0 : events.filter(function (item) { return item.viewNumber === viewNumber + 1; }), onChange: handleOnChange, onChangeViewValid: function (status) {
|
|
180
180
|
onChange(['isValidationFields'], [status]);
|
|
181
181
|
}, onChangeValidateProcess: function (processValue) {
|
|
182
182
|
onChange(['validProcessStatus'], processValue);
|