@next-core/brick-kit 2.160.3 → 2.162.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 +82 -9
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +81 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/CustomForms/ExpandCustomForm.d.ts.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);
|
|
@@ -3300,6 +3300,59 @@
|
|
|
3300
3300
|
function _dev_only_updateFormPreviewSettings(appId, formId, settings) {
|
|
3301
3301
|
kernel._dev_only_updateFormPreviewSettings(appId, formId, settings);
|
|
3302
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
|
+
}
|
|
3303
3356
|
class Runtime {
|
|
3304
3357
|
constructor() {
|
|
3305
3358
|
_defineProperty__default["default"](this, "registerBrickTemplate", registerBrickTemplate);
|
|
@@ -9500,7 +9553,9 @@
|
|
|
9500
9553
|
return formData;
|
|
9501
9554
|
}
|
|
9502
9555
|
function getFinalStoryBoard(formData, brickConf, isPreview, formContext) {
|
|
9556
|
+
var _brickConf$properties;
|
|
9503
9557
|
var result = null;
|
|
9558
|
+
var renderRoot = typeof ((_brickConf$properties = brickConf.properties) === null || _brickConf$properties === void 0 ? void 0 : _brickConf$properties.renderRoot) === "boolean" ? brickConf.properties.renderRoot : true;
|
|
9504
9559
|
var errorBrick = {
|
|
9505
9560
|
brick: "presentational-bricks.brick-illustration",
|
|
9506
9561
|
properties: {
|
|
@@ -9526,7 +9581,7 @@
|
|
|
9526
9581
|
});
|
|
9527
9582
|
formStoryboard[0].events = events;
|
|
9528
9583
|
}
|
|
9529
|
-
result = _objectSpread__default["default"](_objectSpread__default["default"]({}, brickConf), {}, {
|
|
9584
|
+
result = renderRoot ? _objectSpread__default["default"](_objectSpread__default["default"]({}, brickConf), {}, {
|
|
9530
9585
|
brick: "div",
|
|
9531
9586
|
slots: {
|
|
9532
9587
|
"": {
|
|
@@ -9547,6 +9602,14 @@
|
|
|
9547
9602
|
type: "bricks"
|
|
9548
9603
|
}
|
|
9549
9604
|
}
|
|
9605
|
+
}) : _objectSpread__default["default"](_objectSpread__default["default"]({}, brickConf), {}, {
|
|
9606
|
+
brick: "div",
|
|
9607
|
+
slots: {
|
|
9608
|
+
"": {
|
|
9609
|
+
bricks: formStoryboard,
|
|
9610
|
+
type: "bricks"
|
|
9611
|
+
}
|
|
9612
|
+
}
|
|
9550
9613
|
});
|
|
9551
9614
|
} catch (error) {
|
|
9552
9615
|
// eslint-disable-next-line no-console
|
|
@@ -11007,6 +11070,9 @@
|
|
|
11007
11070
|
// And the API Analyzer maybe disabled.
|
|
11008
11071
|
var tracePageEnd = (_apiAnalyzer$getInsta = easyopsAnalytics.apiAnalyzer.getInstance()) === null || _apiAnalyzer$getInsta === void 0 ? void 0 : _apiAnalyzer$getInsta.tracePage();
|
|
11009
11072
|
var locationContext = _this3.locationContext = new LocationContext(_this3.kernel, location);
|
|
11073
|
+
if (window.DEVELOPER_PREVIEW) {
|
|
11074
|
+
return;
|
|
11075
|
+
}
|
|
11010
11076
|
var storyboard = locationContext.matchStoryboard(_this3.kernel.bootstrapData.storyboards);
|
|
11011
11077
|
|
|
11012
11078
|
/** Pending task for loading bricks */
|
|
@@ -11391,6 +11457,12 @@
|
|
|
11391
11457
|
getResolver() {
|
|
11392
11458
|
return this.locationContext.resolver;
|
|
11393
11459
|
}
|
|
11460
|
+
getMountBrick() {
|
|
11461
|
+
return this.locationContext.mountBrick(...arguments);
|
|
11462
|
+
}
|
|
11463
|
+
getHandlePageLoad() {
|
|
11464
|
+
return this.locationContext.handlePageLoad();
|
|
11465
|
+
}
|
|
11394
11466
|
getState() {
|
|
11395
11467
|
return this.state;
|
|
11396
11468
|
}
|
|
@@ -13353,7 +13425,8 @@
|
|
|
13353
13425
|
updateStoryboardBySnippet: _dev_only_updateStoryboardBySnippet,
|
|
13354
13426
|
updateTemplatePreviewSettings: _dev_only_updateTemplatePreviewSettings,
|
|
13355
13427
|
updateSnippetPreviewSettings: _dev_only_updateSnippetPreviewSettings,
|
|
13356
|
-
updateFormPreviewSettings: _dev_only_updateFormPreviewSettings
|
|
13428
|
+
updateFormPreviewSettings: _dev_only_updateFormPreviewSettings,
|
|
13429
|
+
render: _dev_only_render
|
|
13357
13430
|
};
|
|
13358
13431
|
|
|
13359
13432
|
var _excluded$2 = ["type"];
|