@next-core/brick-kit 2.160.2 → 2.161.0
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 +72 -8
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +71 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/Router.d.ts +4 -2
- package/dist/types/core/Router.d.ts.map +1 -1
- package/dist/types/core/Runtime.d.ts +2 -1
- package/dist/types/core/Runtime.d.ts.map +1 -1
- package/dist/types/developHelper.d.ts +2 -1
- package/dist/types/developHelper.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.bundle.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('history'), require('@babel/runtime/helpers/objectSpread2'), require('@babel/runtime/helpers/objectWithoutProperties'), require('@babel/runtime/helpers/
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'history', '@babel/runtime/helpers/objectSpread2', '@babel/runtime/helpers/objectWithoutProperties', '@babel/runtime/helpers/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.BrickKit = {}, global.history$1, global._objectSpread, global._objectWithoutProperties, global.
|
|
5
|
-
})(this, (function (exports, history$1, _objectSpread, _objectWithoutProperties,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('history'), require('@babel/runtime/helpers/objectSpread2'), require('@babel/runtime/helpers/objectWithoutProperties'), require('@babel/runtime/helpers/defineProperty'), require('@babel/runtime/helpers/asyncToGenerator'), require('lodash'), require('@next-core/brick-utils'), require('react'), require('@next-core/brick-http'), require('antd'), require('@ant-design/icons'), require('i18next'), require('moment'), require('@next-core/pipes'), require('@next-core/easyops-analytics'), require('js-yaml'), require('react-i18next'), require('@babel/runtime/helpers/esm/extends'), require('@next-core/illustrations'), require('@babel/runtime/helpers/decorate')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'history', '@babel/runtime/helpers/objectSpread2', '@babel/runtime/helpers/objectWithoutProperties', '@babel/runtime/helpers/defineProperty', '@babel/runtime/helpers/asyncToGenerator', 'lodash', '@next-core/brick-utils', 'react', '@next-core/brick-http', 'antd', '@ant-design/icons', 'i18next', 'moment', '@next-core/pipes', '@next-core/easyops-analytics', 'js-yaml', 'react-i18next', '@babel/runtime/helpers/esm/extends', '@next-core/illustrations', '@babel/runtime/helpers/decorate'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.BrickKit = {}, global.history$1, global._objectSpread, global._objectWithoutProperties, global._defineProperty$1, global._asyncToGenerator$3, global._, global.brickUtils, global.React, global.brickHttp, global.antd, global.icons, global.i18next, global.moment, global.pipes, global.easyopsAnalytics, global.yaml, global.reactI18next, global._extends, global.illustrations, global._decorate));
|
|
5
|
+
})(this, (function (exports, history$1, _objectSpread, _objectWithoutProperties, _defineProperty$1, _asyncToGenerator$3, _, brickUtils, React, brickHttp, antd, icons, i18next, moment, pipes, easyopsAnalytics, yaml, reactI18next, _extends, illustrations, _decorate) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
9
|
var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
|
|
10
10
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
11
|
-
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator$3);
|
|
12
11
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty$1);
|
|
13
|
-
var
|
|
12
|
+
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator$3);
|
|
14
13
|
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
15
|
-
var
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
15
|
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
|
|
16
|
+
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
17
17
|
var yaml__default = /*#__PURE__*/_interopDefaultLegacy(yaml);
|
|
18
18
|
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
19
19
|
var _decorate__default = /*#__PURE__*/_interopDefaultLegacy(_decorate);
|
|
@@ -3265,6 +3265,7 @@
|
|
|
3265
3265
|
bootstrapData: kernel.bootstrapData,
|
|
3266
3266
|
getFeatureFlags: kernel.getFeatureFlags.bind(kernel),
|
|
3267
3267
|
loadDynamicBricksInBrickConf: kernel.loadDynamicBricksInBrickConf.bind(kernel),
|
|
3268
|
+
loadDynamicBricks: kernel.loadDynamicBricks.bind(kernel),
|
|
3268
3269
|
getProviderBrick: kernel.getProviderBrick.bind(kernel)
|
|
3269
3270
|
}, overrides);
|
|
3270
3271
|
}
|
|
@@ -3299,6 +3300,59 @@
|
|
|
3299
3300
|
function _dev_only_updateFormPreviewSettings(appId, formId, settings) {
|
|
3300
3301
|
kernel._dev_only_updateFormPreviewSettings(appId, formId, settings);
|
|
3301
3302
|
}
|
|
3303
|
+
function _dev_only_render(_x, _x2) {
|
|
3304
|
+
return _dev_only_render2.apply(this, arguments);
|
|
3305
|
+
}
|
|
3306
|
+
function _dev_only_render2() {
|
|
3307
|
+
_dev_only_render2 = _asyncToGenerator__default["default"](function* (mountPoints, conf) {
|
|
3308
|
+
var _kernel$router;
|
|
3309
|
+
unmountTree(mountPoints.bg);
|
|
3310
|
+
if (!getRuntime()) {
|
|
3311
|
+
var runtime = createRuntime();
|
|
3312
|
+
yield runtime.bootstrap(mountPoints);
|
|
3313
|
+
}
|
|
3314
|
+
if ((_kernel$router = kernel.router) !== null && _kernel$router !== void 0 && _kernel$router.getResolver()) {
|
|
3315
|
+
kernel.router.getResolver().resetRefreshQueue();
|
|
3316
|
+
}
|
|
3317
|
+
var mountRoutesResult = {
|
|
3318
|
+
main: [],
|
|
3319
|
+
portal: [],
|
|
3320
|
+
failed: false
|
|
3321
|
+
};
|
|
3322
|
+
try {
|
|
3323
|
+
var mutableConf = _.cloneDeep(conf);
|
|
3324
|
+
yield brickUtils.asyncProcessBrick(mutableConf, brickTemplateRegistry, kernel.bootstrapData.templatePackages);
|
|
3325
|
+
yield kernel.loadDynamicBricksInBrickConf(mutableConf);
|
|
3326
|
+
yield kernel.router.getMountBrick(mutableConf, null, "", mountRoutesResult);
|
|
3327
|
+
} catch (error) {
|
|
3328
|
+
// eslint-disable-next-line no-console
|
|
3329
|
+
console.error(error);
|
|
3330
|
+
mountRoutesResult.failed = true;
|
|
3331
|
+
mountRoutesResult.main = [{
|
|
3332
|
+
type: "basic-bricks.page-error",
|
|
3333
|
+
properties: {
|
|
3334
|
+
error: httpErrorToString(error)
|
|
3335
|
+
},
|
|
3336
|
+
events: {}
|
|
3337
|
+
}];
|
|
3338
|
+
mountRoutesResult.portal = [];
|
|
3339
|
+
}
|
|
3340
|
+
var {
|
|
3341
|
+
main,
|
|
3342
|
+
failed,
|
|
3343
|
+
portal
|
|
3344
|
+
} = mountRoutesResult;
|
|
3345
|
+
mountTree(main, mountPoints.main);
|
|
3346
|
+
mountTree(portal, mountPoints.portal);
|
|
3347
|
+
afterMountTree(main);
|
|
3348
|
+
afterMountTree(portal);
|
|
3349
|
+
if (!failed) {
|
|
3350
|
+
kernel.router.getHandlePageLoad();
|
|
3351
|
+
kernel.router.getResolver().scheduleRefreshing();
|
|
3352
|
+
}
|
|
3353
|
+
});
|
|
3354
|
+
return _dev_only_render2.apply(this, arguments);
|
|
3355
|
+
}
|
|
3302
3356
|
class Runtime {
|
|
3303
3357
|
constructor() {
|
|
3304
3358
|
_defineProperty__default["default"](this, "registerBrickTemplate", registerBrickTemplate);
|
|
@@ -11006,6 +11060,9 @@
|
|
|
11006
11060
|
// And the API Analyzer maybe disabled.
|
|
11007
11061
|
var tracePageEnd = (_apiAnalyzer$getInsta = easyopsAnalytics.apiAnalyzer.getInstance()) === null || _apiAnalyzer$getInsta === void 0 ? void 0 : _apiAnalyzer$getInsta.tracePage();
|
|
11008
11062
|
var locationContext = _this3.locationContext = new LocationContext(_this3.kernel, location);
|
|
11063
|
+
if (window.DEVELOPER_PREVIEW) {
|
|
11064
|
+
return;
|
|
11065
|
+
}
|
|
11009
11066
|
var storyboard = locationContext.matchStoryboard(_this3.kernel.bootstrapData.storyboards);
|
|
11010
11067
|
|
|
11011
11068
|
/** Pending task for loading bricks */
|
|
@@ -11390,6 +11447,12 @@
|
|
|
11390
11447
|
getResolver() {
|
|
11391
11448
|
return this.locationContext.resolver;
|
|
11392
11449
|
}
|
|
11450
|
+
getMountBrick() {
|
|
11451
|
+
return this.locationContext.mountBrick(...arguments);
|
|
11452
|
+
}
|
|
11453
|
+
getHandlePageLoad() {
|
|
11454
|
+
return this.locationContext.handlePageLoad();
|
|
11455
|
+
}
|
|
11393
11456
|
getState() {
|
|
11394
11457
|
return this.state;
|
|
11395
11458
|
}
|
|
@@ -13352,7 +13415,8 @@
|
|
|
13352
13415
|
updateStoryboardBySnippet: _dev_only_updateStoryboardBySnippet,
|
|
13353
13416
|
updateTemplatePreviewSettings: _dev_only_updateTemplatePreviewSettings,
|
|
13354
13417
|
updateSnippetPreviewSettings: _dev_only_updateSnippetPreviewSettings,
|
|
13355
|
-
updateFormPreviewSettings: _dev_only_updateFormPreviewSettings
|
|
13418
|
+
updateFormPreviewSettings: _dev_only_updateFormPreviewSettings,
|
|
13419
|
+
render: _dev_only_render
|
|
13356
13420
|
};
|
|
13357
13421
|
|
|
13358
13422
|
var _excluded$2 = ["type"];
|