@next-core/brick-kit 2.178.13 → 2.178.14
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/dist/index.bundle.js +29 -10
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +29 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/Kernel.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -8617,6 +8617,7 @@ function getRuntimeMisc() {
|
|
|
8617
8617
|
}
|
|
8618
8618
|
|
|
8619
8619
|
var _excluded$3 = ["params"];
|
|
8620
|
+
var V3WidgetMates = ["basic.v3-widget-mate"];
|
|
8620
8621
|
class Kernel {
|
|
8621
8622
|
constructor() {
|
|
8622
8623
|
var _this = this;
|
|
@@ -8673,6 +8674,7 @@ class Kernel {
|
|
|
8673
8674
|
yield loadScriptOfDll(eager.dll);
|
|
8674
8675
|
yield loadScriptOfBricksOrTemplates(eager.deps);
|
|
8675
8676
|
if ((_eager$v3Bricks = eager.v3Bricks) !== null && _eager$v3Bricks !== void 0 && _eager$v3Bricks.length) {
|
|
8677
|
+
yield catchLoad(loadBricksImperatively(V3WidgetMates, brickPackages), "brick", V3WidgetMates[0]);
|
|
8676
8678
|
yield loadBricksImperatively(eager.v3Bricks, brickPackages);
|
|
8677
8679
|
}
|
|
8678
8680
|
// 加载构件资源时,不再阻塞后续业务数据的加载,在挂载构件时再等待该任务完成。
|
|
@@ -8706,16 +8708,27 @@ class Kernel {
|
|
|
8706
8708
|
bricks: filteredBricks,
|
|
8707
8709
|
processors
|
|
8708
8710
|
}, _this.bootstrapData.brickPackages);
|
|
8711
|
+
var loadV3Bricks = /*#__PURE__*/function () {
|
|
8712
|
+
var _ref4 = _asyncToGenerator$3(function* () {
|
|
8713
|
+
if (v3Bricks !== null && v3Bricks !== void 0 && v3Bricks.some(brick => brick.includes(".tpl-"))) {
|
|
8714
|
+
yield catchLoad(loadBricksImperatively(V3WidgetMates, brickPackages), "brick", V3WidgetMates[0]);
|
|
8715
|
+
}
|
|
8716
|
+
yield Promise.all([(v3Bricks === null || v3Bricks === void 0 ? void 0 : v3Bricks.length) && loadBricksImperatively(v3Bricks, brickPackages), (v3Processors === null || v3Processors === void 0 ? void 0 : v3Processors.length) && loadProcessorsImperatively(v3Processors, brickPackages)]);
|
|
8717
|
+
});
|
|
8718
|
+
return function loadV3Bricks() {
|
|
8719
|
+
return _ref4.apply(this, arguments);
|
|
8720
|
+
};
|
|
8721
|
+
}();
|
|
8709
8722
|
yield loadScriptOfDll(dll);
|
|
8710
8723
|
yield loadScriptOfBricksOrTemplates(deps);
|
|
8711
|
-
yield Promise.all([loadLazyBricks(filteredBricks), (
|
|
8724
|
+
yield Promise.all([loadLazyBricks(filteredBricks), loadV3Bricks()]);
|
|
8712
8725
|
});
|
|
8713
8726
|
return function (_x2, _x3) {
|
|
8714
8727
|
return _ref3.apply(this, arguments);
|
|
8715
8728
|
};
|
|
8716
8729
|
}());
|
|
8717
8730
|
_defineProperty$1(this, "_loadEditorBricks", /*#__PURE__*/function () {
|
|
8718
|
-
var
|
|
8731
|
+
var _ref5 = _asyncToGenerator$3(function* (editorBricks) {
|
|
8719
8732
|
var {
|
|
8720
8733
|
dll,
|
|
8721
8734
|
deps
|
|
@@ -8728,7 +8741,7 @@ class Kernel {
|
|
|
8728
8741
|
yield loadScriptOfBricksOrTemplates(deps);
|
|
8729
8742
|
});
|
|
8730
8743
|
return function (_x4) {
|
|
8731
|
-
return
|
|
8744
|
+
return _ref5.apply(this, arguments);
|
|
8732
8745
|
};
|
|
8733
8746
|
}());
|
|
8734
8747
|
}
|
|
@@ -8922,8 +8935,8 @@ class Kernel {
|
|
|
8922
8935
|
// Prefix to avoid conflict between brick package's i18n namespace.
|
|
8923
8936
|
var i18nNamespace = getI18nNamespace("app", storyboard.app.id);
|
|
8924
8937
|
// Support any language in `meta.i18n`.
|
|
8925
|
-
Object.entries(storyboard.meta.i18n).forEach(
|
|
8926
|
-
var [lang, resources] =
|
|
8938
|
+
Object.entries(storyboard.meta.i18n).forEach(_ref6 => {
|
|
8939
|
+
var [lang, resources] = _ref6;
|
|
8927
8940
|
i18next.addResourceBundle(lang, i18nNamespace, resources);
|
|
8928
8941
|
});
|
|
8929
8942
|
}
|
|
@@ -9114,12 +9127,12 @@ class Kernel {
|
|
|
9114
9127
|
routes.splice(previewRouteIndex, 1, newPreviewRoute);
|
|
9115
9128
|
}
|
|
9116
9129
|
}
|
|
9117
|
-
_dev_only_getAddedContracts(storyboardPatch,
|
|
9130
|
+
_dev_only_getAddedContracts(storyboardPatch, _ref7) {
|
|
9118
9131
|
var {
|
|
9119
9132
|
appId,
|
|
9120
9133
|
updateStoryboardType,
|
|
9121
9134
|
formId
|
|
9122
|
-
} =
|
|
9135
|
+
} = _ref7;
|
|
9123
9136
|
var storyboard = this.bootstrapData.storyboards.find(item => item.app.id === appId);
|
|
9124
9137
|
var updatedStoryboard;
|
|
9125
9138
|
|
|
@@ -9418,8 +9431,8 @@ class Kernel {
|
|
|
9418
9431
|
});
|
|
9419
9432
|
});
|
|
9420
9433
|
if (!filterMenus.length) {
|
|
9421
|
-
var
|
|
9422
|
-
filterMenus = (
|
|
9434
|
+
var _ref8, _yield$InstanceApi_po;
|
|
9435
|
+
filterMenus = (_ref8 = _this12.getFeatureFlags()["three-level-menu-layout"] ? (yield InstalledMicroAppApi_getMenusInfo(menuId, {
|
|
9423
9436
|
menuObjectId: "STANDALONE_MENU@EASYOPS"
|
|
9424
9437
|
})).menus : (_yield$InstanceApi_po = yield InstanceApi_postSearch("STANDALONE_MENU@EASYOPS", {
|
|
9425
9438
|
page: 1,
|
|
@@ -9450,7 +9463,7 @@ class Kernel {
|
|
|
9450
9463
|
$eq: true
|
|
9451
9464
|
}
|
|
9452
9465
|
}
|
|
9453
|
-
})) === null || _yield$InstanceApi_po === void 0 ? void 0 : _yield$InstanceApi_po.list) !== null &&
|
|
9466
|
+
})) === null || _yield$InstanceApi_po === void 0 ? void 0 : _yield$InstanceApi_po.list) !== null && _ref8 !== void 0 ? _ref8 : [];
|
|
9454
9467
|
}
|
|
9455
9468
|
return filterMenus;
|
|
9456
9469
|
})();
|
|
@@ -9520,6 +9533,12 @@ function generateColorTheme(theme) {
|
|
|
9520
9533
|
}, theme.variables));
|
|
9521
9534
|
}
|
|
9522
9535
|
}
|
|
9536
|
+
function catchLoad(promise, type, name) {
|
|
9537
|
+
return promise.catch(e => {
|
|
9538
|
+
// eslint-disable-next-line no-console
|
|
9539
|
+
console.error("Load ".concat(type, " \"").concat(name, "\" failed:"), e);
|
|
9540
|
+
});
|
|
9541
|
+
}
|
|
9523
9542
|
|
|
9524
9543
|
/** @internal */
|
|
9525
9544
|
|