@next-core/brick-kit 2.104.6 → 2.106.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/CHANGELOG.md CHANGED
@@ -3,6 +3,51 @@
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.106.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.105.1...@next-core/brick-kit@2.106.0) (2022-02-21)
7
+
8
+
9
+ ### Features
10
+
11
+ * record brick instance id in storyboard for development ([9d1193e](https://github.com/easyops-cn/next-core/commit/9d1193e11cf5cd35d10d36afe4f07a52a7f7841a))
12
+
13
+
14
+
15
+
16
+
17
+ ## [2.105.1](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.105.0...@next-core/brick-kit@2.105.1) (2022-02-17)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * fix useBrick lifeCycle couldn't get TPL ([6bbb1ff](https://github.com/easyops-cn/next-core/commit/6bbb1fff00427af2bfca30074a7a8003118763b3))
23
+ * fix useBrick lifeCycle couldn't get TPL ([af1232f](https://github.com/easyops-cn/next-core/commit/af1232fce2fe425a24d841b05ef4d5f2b284a23e))
24
+
25
+
26
+
27
+
28
+
29
+ # [2.105.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.104.7...@next-core/brick-kit@2.105.0) (2022-02-17)
30
+
31
+
32
+ ### Features
33
+
34
+ * 新增`PATH_NAME`常量 ([094fe48](https://github.com/easyops-cn/next-core/commit/094fe4877581b7594ea297a3da5c4ae047d9cc4d))
35
+
36
+
37
+
38
+
39
+
40
+ ## [2.104.7](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.104.6...@next-core/brick-kit@2.104.7) (2022-02-17)
41
+
42
+
43
+ ### Bug Fixes
44
+
45
+ * mark lazy useBrick for tpl property merge ([5794719](https://github.com/easyops-cn/next-core/commit/579471913e569856772e24ccdf024519b6680aaa))
46
+
47
+
48
+
49
+
50
+
6
51
  ## [2.104.6](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.104.5...@next-core/brick-kit@2.104.6) (2022-02-15)
7
52
 
8
53
  **Note:** Version bump only for package @next-core/brick-kit
@@ -2292,6 +2292,7 @@
2292
2292
  sys,
2293
2293
  flags,
2294
2294
  hash,
2295
+ pathname,
2295
2296
  segues,
2296
2297
  storyboardContext
2297
2298
  } = _internalApiGetCurrentContext();
@@ -2332,6 +2333,9 @@
2332
2333
  case "HASH":
2333
2334
  return hash;
2334
2335
 
2336
+ case "PATH_NAME":
2337
+ return pathname;
2338
+
2335
2339
  case "INSTALLED_APPS":
2336
2340
  return {
2337
2341
  has: (appId, matchVersion) => getRuntime().hasInstalledApp(appId, matchVersion)
@@ -6316,6 +6320,10 @@
6316
6320
  node.setAttribute("slot", brick.slotId);
6317
6321
  }
6318
6322
 
6323
+ if (brick.iid) {
6324
+ node.dataset.iid = brick.iid;
6325
+ }
6326
+
6319
6327
  setRealProperties(node, brick.properties);
6320
6328
  bindListeners(node, brick.events, brick.context);
6321
6329
 
@@ -8507,6 +8515,7 @@
8507
8515
  var auth = getAuth();
8508
8516
  var context = {
8509
8517
  hash: this.location.hash,
8518
+ pathname: this.location.pathname,
8510
8519
  query: this.query,
8511
8520
  match,
8512
8521
  app: this.kernel.nextApp,
@@ -8904,7 +8913,8 @@
8904
8913
  children: [],
8905
8914
  slotId,
8906
8915
  refForProxy: brickConf[symbolForRefForProxy],
8907
- tplContextId
8916
+ tplContextId,
8917
+ iid: brickConf.iid
8908
8918
  });
8909
8919
 
8910
8920
  if (brickConf[symbolForComputedPropsFromProxy]) {
@@ -10144,7 +10154,9 @@
10144
10154
  // Use an approach like template-literal's quasis:
10145
10155
  // `quasi0${0}quais1${1}quasi2...`
10146
10156
  // Every quasi can be merged with multiple items.
10147
- var computedBaseValue = Array.isArray(baseValue) ? computeRealValue(baseValue, context, true) : [];
10157
+ var computedBaseValue = Array.isArray(baseValue) ? computeRealValue(baseValue, context, true, {
10158
+ $$lazyForUseBrick: true
10159
+ }) : [];
10148
10160
  var quasis = [];
10149
10161
  var size = computedBaseValue.length + 1;
10150
10162
 
@@ -11298,7 +11310,9 @@
11298
11310
  yield resolver.resolve({
11299
11311
  brick: useBrick.brick,
11300
11312
  lifeCycle: useBrick.lifeCycle
11301
- }, brick, _internalApiGetCurrentContext());
11313
+ }, brick, _objectSpread__default["default"](_objectSpread__default["default"]({}, _internalApiGetCurrentContext()), {}, {
11314
+ tplContextId: useBrick[symbolForTplContextId]
11315
+ }));
11302
11316
  }
11303
11317
 
11304
11318
  return brick;
@@ -11325,6 +11339,11 @@
11325
11339
  var {
11326
11340
  [symbolForTplContextId]: tplContextId
11327
11341
  } = useBrick;
11342
+
11343
+ if (useBrick.iid) {
11344
+ element.dataset.iid = useBrick.iid;
11345
+ }
11346
+
11328
11347
  setRealProperties(element, brick.properties);
11329
11348
  unbindListeners(element);
11330
11349
 
@@ -11494,7 +11513,9 @@
11494
11513
  yield resolver.resolve({
11495
11514
  brick: useBrick.brick,
11496
11515
  lifeCycle: useBrick.lifeCycle
11497
- }, brick, _internalApiGetCurrentContext());
11516
+ }, brick, _objectSpread__default["default"](_objectSpread__default["default"]({}, _internalApiGetCurrentContext()), {}, {
11517
+ tplContextId: useBrick[symbolForTplContextId]
11518
+ }));
11498
11519
  }
11499
11520
 
11500
11521
  return brick;
@@ -11521,6 +11542,11 @@
11521
11542
  var {
11522
11543
  [symbolForTplContextId]: tplContextId
11523
11544
  } = useBrick;
11545
+
11546
+ if (useBrick.iid) {
11547
+ element.dataset.iid = useBrick.iid;
11548
+ }
11549
+
11524
11550
  setRealProperties(element, brick.properties);
11525
11551
  unbindListeners(element);
11526
11552