@next-core/brick-kit 2.118.2 → 2.118.3

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.118.3](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.118.2...@next-core/brick-kit@2.118.3) (2022-05-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **BrickAsComponent:** fix update error ([9eedb23](https://github.com/easyops-cn/next-core/commit/9eedb230ddb05ec18cd1207972ce0cf79aa3dd8d))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [2.118.2](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.118.1...@next-core/brick-kit@2.118.2) (2022-04-26)
7
18
 
8
19
  **Note:** Version bump only for package @next-core/brick-kit
@@ -11630,64 +11630,6 @@
11630
11630
  }));
11631
11631
  return brick;
11632
11632
  };
11633
-
11634
- var handleProxyOfParentTemplate = (brick, tplContextId) => {
11635
- if (tplContextId) {
11636
- var tplBrick = getCustomTemplateContext(tplContextId).getBrick();
11637
- /**
11638
- * 如果存在brick.ref, 表明当前brick为custom-template对外暴露的插槽部分
11639
- * 此部分构件不被 expandCustomTemplate 方法正常解析, 需要额外处理
11640
- * 保证父构件上proxyRefs指向的准确性, 并执行其代理方法属性
11641
- */
11642
-
11643
- if (brick.ref && tplBrick) {
11644
- var getFilterProxy = function () {
11645
- var proxy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11646
- var ref = arguments.length > 1 ? arguments[1] : undefined;
11647
-
11648
- var getFilterByRef = (obj, ref) => {
11649
- if (!obj) return;
11650
- return Object.fromEntries(Object.entries(obj).filter(_ref => {
11651
- var [k, v] = _ref;
11652
-
11653
- if (v.ref === ref) {
11654
- return [k, v];
11655
- }
11656
- }));
11657
- };
11658
-
11659
- var events = getFilterByRef(proxy.events, ref);
11660
- var properties = getFilterByRef(proxy.properties, ref);
11661
- var methods = getFilterByRef(proxy.methods, ref);
11662
- var $$properties = getFilterByRef(proxy.$$properties, ref);
11663
- return {
11664
- $$properties,
11665
- events,
11666
- properties,
11667
- methods
11668
- };
11669
- };
11670
-
11671
- var proxyBrick = _objectSpread__default["default"](_objectSpread__default["default"]({}, tplBrick), {}, {
11672
- element: brick.element
11673
- });
11674
-
11675
- tplBrick.proxyRefs.set(brick.ref, {
11676
- brick: proxyBrick
11677
- }); // 对单独ref brick进行proxy赋值
11678
-
11679
- var singleRefBrickProxyMap = new Map();
11680
- singleRefBrickProxyMap.set(brick.ref, {
11681
- brick: proxyBrick
11682
- });
11683
- handleProxyOfCustomTemplate(_objectSpread__default["default"](_objectSpread__default["default"]({}, tplBrick), {}, {
11684
- proxyRefs: singleRefBrickProxyMap,
11685
- proxy: getFilterProxy(tplBrick.proxy, brick.ref)
11686
- }));
11687
- setRealProperties(tplBrick.element, tplBrick.properties || {});
11688
- }
11689
- }
11690
- };
11691
11633
  /**
11692
11634
  * 可以渲染单个 `useBrick` 的 React 组件。
11693
11635
  *
@@ -11806,8 +11748,7 @@
11806
11748
  } // 设置proxyEvent
11807
11749
 
11808
11750
 
11809
- handleProxyOfCustomTemplate(brick);
11810
- handleProxyOfParentTemplate(brick, tplContextId);
11751
+ handleProxyOfCustomTemplate(brick); // handleProxyOfParentTemplate(brick, tplContextId);
11811
11752
 
11812
11753
  if (element.$$typeof !== "custom-template") {
11813
11754
  if (!useBrick.brick.includes("-")) {
@@ -12009,8 +11950,7 @@
12009
11950
  } // 设置proxyEvent
12010
11951
 
12011
11952
 
12012
- handleProxyOfCustomTemplate(brick);
12013
- handleProxyOfParentTemplate(brick, tplContextId);
11953
+ handleProxyOfCustomTemplate(brick); // handleProxyOfParentTemplate(brick, tplContextId);
12014
11954
 
12015
11955
  if (element.$$typeof !== "custom-template") {
12016
11956
  if (!useBrick.brick.includes("-")) {