@next-core/brick-kit 2.105.0 → 2.106.1
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 +24 -56
- package/dist/index.bundle.js +141 -86
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +141 -86
- package/dist/index.esm.js.map +1 -1
- package/dist/types/BrickAsComponent.d.ts.map +1 -1
- package/dist/types/core/BrickNode.d.ts +1 -0
- package/dist/types/core/BrickNode.d.ts.map +1 -1
- package/dist/types/core/LocationContext.d.ts.map +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,122 +3,90 @@
|
|
|
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
|
-
|
|
6
|
+
## [2.106.1](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.106.0...@next-core/brick-kit@2.106.1) (2022-02-28)
|
|
7
7
|
|
|
8
|
+
**Note:** Version bump only for package @next-core/brick-kit
|
|
8
9
|
|
|
9
|
-
### Features
|
|
10
10
|
|
|
11
|
-
* 新增`PATH_NAME`常量 ([094fe48](https://github.com/easyops-cn/next-core/commit/094fe4877581b7594ea297a3da5c4ae047d9cc4d))
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
|
|
14
|
+
# [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)
|
|
15
15
|
|
|
16
|
+
### Features
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
- record brick instance id in storyboard for development ([9d1193e](https://github.com/easyops-cn/next-core/commit/9d1193e11cf5cd35d10d36afe4f07a52a7f7841a))
|
|
18
19
|
|
|
20
|
+
## [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)
|
|
19
21
|
|
|
20
22
|
### Bug Fixes
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
- fix useBrick lifeCycle couldn't get TPL ([6bbb1ff](https://github.com/easyops-cn/next-core/commit/6bbb1fff00427af2bfca30074a7a8003118763b3))
|
|
25
|
+
- fix useBrick lifeCycle couldn't get TPL ([af1232f](https://github.com/easyops-cn/next-core/commit/af1232fce2fe425a24d841b05ef4d5f2b284a23e))
|
|
25
26
|
|
|
27
|
+
# [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)
|
|
26
28
|
|
|
29
|
+
### Features
|
|
27
30
|
|
|
28
|
-
|
|
31
|
+
- 新增`PATH_NAME`常量 ([094fe48](https://github.com/easyops-cn/next-core/commit/094fe4877581b7594ea297a3da5c4ae047d9cc4d))
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
## [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)
|
|
31
34
|
|
|
35
|
+
### Bug Fixes
|
|
32
36
|
|
|
37
|
+
- mark lazy useBrick for tpl property merge ([5794719](https://github.com/easyops-cn/next-core/commit/579471913e569856772e24ccdf024519b6680aaa))
|
|
33
38
|
|
|
39
|
+
## [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)
|
|
34
40
|
|
|
41
|
+
**Note:** Version bump only for package @next-core/brick-kit
|
|
35
42
|
|
|
36
43
|
## [2.104.5](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.104.4...@next-core/brick-kit@2.104.5) (2022-02-15)
|
|
37
44
|
|
|
38
|
-
|
|
39
45
|
### Bug Fixes
|
|
40
46
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
- fix re-render of useBrick of tpl ([7cbd0d8](https://github.com/easyops-cn/next-core/commit/7cbd0d83517afdb1eef9fafb5e803655f3e698b9))
|
|
46
48
|
|
|
47
49
|
## [2.104.4](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.104.3...@next-core/brick-kit@2.104.4) (2022-02-15)
|
|
48
50
|
|
|
49
|
-
|
|
50
51
|
### Bug Fixes
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
- fix targetRef on working in state.onChange ([bac0003](https://github.com/easyops-cn/next-core/commit/bac000367d82ebd428a2aa08d05193b129718eb7))
|
|
57
54
|
|
|
58
55
|
## [2.104.3](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.104.2...@next-core/brick-kit@2.104.3) (2022-02-15)
|
|
59
56
|
|
|
60
|
-
|
|
61
57
|
### Bug Fixes
|
|
62
58
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
- fix missing tpl context when setting properties by callback ([c681dd4](https://github.com/easyops-cn/next-core/commit/c681dd41baec10a9f5eb13ac6bccfa5ae559044c))
|
|
68
60
|
|
|
69
61
|
## [2.104.2](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.104.1...@next-core/brick-kit@2.104.2) (2022-02-15)
|
|
70
62
|
|
|
71
|
-
|
|
72
63
|
### Bug Fixes
|
|
73
64
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
65
|
+
- fix state.onChange ([cfdfbf8](https://github.com/easyops-cn/next-core/commit/cfdfbf80574cbaa38168b42b5c0899a71f28be12))
|
|
79
66
|
|
|
80
67
|
## [2.104.1](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.104.0...@next-core/brick-kit@2.104.1) (2022-02-14)
|
|
81
68
|
|
|
82
|
-
|
|
83
69
|
### Bug Fixes
|
|
84
70
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
71
|
+
- resume getTplContext for compatibility ([e6c40cf](https://github.com/easyops-cn/next-core/commit/e6c40cfec328776ace36cd917195da526451bad4))
|
|
90
72
|
|
|
91
73
|
# [2.104.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.103.9...@next-core/brick-kit@2.104.0) (2022-02-14)
|
|
92
74
|
|
|
93
|
-
|
|
94
75
|
### Features
|
|
95
76
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
77
|
+
- support template scoped state ([d736f85](https://github.com/easyops-cn/next-core/commit/d736f8550b4b645851e2b0a99bb2f99eee4378a2))
|
|
78
|
+
- support tpl-scoped context ([783b060](https://github.com/easyops-cn/next-core/commit/783b0605d3c74ac653120689d467384a71aaf79a))
|
|
102
79
|
|
|
103
80
|
## [2.103.9](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.103.8...@next-core/brick-kit@2.103.9) (2022-01-28)
|
|
104
81
|
|
|
105
|
-
|
|
106
82
|
### Bug Fixes
|
|
107
83
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
84
|
+
- empty image ([61d1d1e](https://github.com/easyops-cn/next-core/commit/61d1d1e751ea6a07afd6805c950ce740e52642e9))
|
|
113
85
|
|
|
114
86
|
## [2.103.8](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.103.7...@next-core/brick-kit@2.103.8) (2022-01-28)
|
|
115
87
|
|
|
116
88
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
117
89
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
90
|
## [2.103.7](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.103.6...@next-core/brick-kit@2.103.7) (2022-01-27)
|
|
123
91
|
|
|
124
92
|
### Bug Fixes
|
package/dist/index.bundle.js
CHANGED
|
@@ -4144,14 +4144,16 @@
|
|
|
4144
4144
|
|
|
4145
4145
|
var minimatch_1 = minimatch;
|
|
4146
4146
|
minimatch.Minimatch = Minimatch;
|
|
4147
|
-
|
|
4147
|
+
|
|
4148
|
+
var path = function () {
|
|
4149
|
+
try {
|
|
4150
|
+
return require('path');
|
|
4151
|
+
} catch (e) {}
|
|
4152
|
+
}() || {
|
|
4148
4153
|
sep: '/'
|
|
4149
4154
|
};
|
|
4150
4155
|
|
|
4151
|
-
|
|
4152
|
-
path = require('path');
|
|
4153
|
-
} catch (er) {}
|
|
4154
|
-
|
|
4156
|
+
minimatch.sep = path.sep;
|
|
4155
4157
|
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
|
|
4156
4158
|
var expand = braceExpansion;
|
|
4157
4159
|
var plTypes = {
|
|
@@ -4210,51 +4212,71 @@
|
|
|
4210
4212
|
}
|
|
4211
4213
|
|
|
4212
4214
|
function ext(a, b) {
|
|
4213
|
-
a = a || {};
|
|
4214
4215
|
b = b || {};
|
|
4215
4216
|
var t = {};
|
|
4216
|
-
Object.keys(b).forEach(function (k) {
|
|
4217
|
-
t[k] = b[k];
|
|
4218
|
-
});
|
|
4219
4217
|
Object.keys(a).forEach(function (k) {
|
|
4220
4218
|
t[k] = a[k];
|
|
4221
4219
|
});
|
|
4220
|
+
Object.keys(b).forEach(function (k) {
|
|
4221
|
+
t[k] = b[k];
|
|
4222
|
+
});
|
|
4222
4223
|
return t;
|
|
4223
4224
|
}
|
|
4224
4225
|
|
|
4225
4226
|
minimatch.defaults = function (def) {
|
|
4226
|
-
if (!def || !Object.keys(def).length)
|
|
4227
|
+
if (!def || typeof def !== 'object' || !Object.keys(def).length) {
|
|
4228
|
+
return minimatch;
|
|
4229
|
+
}
|
|
4230
|
+
|
|
4227
4231
|
var orig = minimatch;
|
|
4228
4232
|
|
|
4229
4233
|
var m = function minimatch(p, pattern, options) {
|
|
4230
|
-
return orig
|
|
4234
|
+
return orig(p, pattern, ext(def, options));
|
|
4231
4235
|
};
|
|
4232
4236
|
|
|
4233
4237
|
m.Minimatch = function Minimatch(pattern, options) {
|
|
4234
4238
|
return new orig.Minimatch(pattern, ext(def, options));
|
|
4235
4239
|
};
|
|
4236
4240
|
|
|
4241
|
+
m.Minimatch.defaults = function defaults(options) {
|
|
4242
|
+
return orig.defaults(ext(def, options)).Minimatch;
|
|
4243
|
+
};
|
|
4244
|
+
|
|
4245
|
+
m.filter = function filter(pattern, options) {
|
|
4246
|
+
return orig.filter(pattern, ext(def, options));
|
|
4247
|
+
};
|
|
4248
|
+
|
|
4249
|
+
m.defaults = function defaults(options) {
|
|
4250
|
+
return orig.defaults(ext(def, options));
|
|
4251
|
+
};
|
|
4252
|
+
|
|
4253
|
+
m.makeRe = function makeRe(pattern, options) {
|
|
4254
|
+
return orig.makeRe(pattern, ext(def, options));
|
|
4255
|
+
};
|
|
4256
|
+
|
|
4257
|
+
m.braceExpand = function braceExpand(pattern, options) {
|
|
4258
|
+
return orig.braceExpand(pattern, ext(def, options));
|
|
4259
|
+
};
|
|
4260
|
+
|
|
4261
|
+
m.match = function (list, pattern, options) {
|
|
4262
|
+
return orig.match(list, pattern, ext(def, options));
|
|
4263
|
+
};
|
|
4264
|
+
|
|
4237
4265
|
return m;
|
|
4238
4266
|
};
|
|
4239
4267
|
|
|
4240
4268
|
Minimatch.defaults = function (def) {
|
|
4241
|
-
if (!def || !Object.keys(def).length) return Minimatch;
|
|
4242
4269
|
return minimatch.defaults(def).Minimatch;
|
|
4243
4270
|
};
|
|
4244
4271
|
|
|
4245
4272
|
function minimatch(p, pattern, options) {
|
|
4246
|
-
|
|
4247
|
-
throw new TypeError('glob pattern string required');
|
|
4248
|
-
}
|
|
4249
|
-
|
|
4273
|
+
assertValidPattern(pattern);
|
|
4250
4274
|
if (!options) options = {}; // shortcut: comments match nothing.
|
|
4251
4275
|
|
|
4252
4276
|
if (!options.nocomment && pattern.charAt(0) === '#') {
|
|
4253
4277
|
return false;
|
|
4254
|
-
}
|
|
4255
|
-
|
|
4278
|
+
}
|
|
4256
4279
|
|
|
4257
|
-
if (pattern.trim() === '') return p === '';
|
|
4258
4280
|
return new Minimatch(pattern, options).match(p);
|
|
4259
4281
|
}
|
|
4260
4282
|
|
|
@@ -4263,14 +4285,11 @@
|
|
|
4263
4285
|
return new Minimatch(pattern, options);
|
|
4264
4286
|
}
|
|
4265
4287
|
|
|
4266
|
-
|
|
4267
|
-
throw new TypeError('glob pattern string required');
|
|
4268
|
-
}
|
|
4269
|
-
|
|
4288
|
+
assertValidPattern(pattern);
|
|
4270
4289
|
if (!options) options = {};
|
|
4271
4290
|
pattern = pattern.trim(); // windows support: need to use /, not \
|
|
4272
4291
|
|
|
4273
|
-
if (path.sep !== '/') {
|
|
4292
|
+
if (!options.allowWindowsEscape && path.sep !== '/') {
|
|
4274
4293
|
pattern = pattern.split(path.sep).join('/');
|
|
4275
4294
|
}
|
|
4276
4295
|
|
|
@@ -4280,7 +4299,8 @@
|
|
|
4280
4299
|
this.regexp = null;
|
|
4281
4300
|
this.negate = false;
|
|
4282
4301
|
this.comment = false;
|
|
4283
|
-
this.empty = false;
|
|
4302
|
+
this.empty = false;
|
|
4303
|
+
this.partial = !!options.partial; // make the set of regexps etc.
|
|
4284
4304
|
|
|
4285
4305
|
this.make();
|
|
4286
4306
|
}
|
|
@@ -4290,8 +4310,6 @@
|
|
|
4290
4310
|
Minimatch.prototype.make = make;
|
|
4291
4311
|
|
|
4292
4312
|
function make() {
|
|
4293
|
-
// don't do it more than once.
|
|
4294
|
-
if (this._made) return;
|
|
4295
4313
|
var pattern = this.pattern;
|
|
4296
4314
|
var options = this.options; // empty patterns and comments match nothing.
|
|
4297
4315
|
|
|
@@ -4309,7 +4327,9 @@
|
|
|
4309
4327
|
this.parseNegate(); // step 2: expand braces
|
|
4310
4328
|
|
|
4311
4329
|
var set = this.globSet = this.braceExpand();
|
|
4312
|
-
if (options.debug) this.debug =
|
|
4330
|
+
if (options.debug) this.debug = function debug() {
|
|
4331
|
+
console.error.apply(console, arguments);
|
|
4332
|
+
};
|
|
4313
4333
|
this.debug(this.pattern, set); // step 3: now we have a set, so turn each one into a series of path-portion
|
|
4314
4334
|
// matching patterns.
|
|
4315
4335
|
// These will be regexps, except in the case of "**", which is
|
|
@@ -4377,18 +4397,28 @@
|
|
|
4377
4397
|
}
|
|
4378
4398
|
|
|
4379
4399
|
pattern = typeof pattern === 'undefined' ? this.pattern : pattern;
|
|
4400
|
+
assertValidPattern(pattern); // Thanks to Yeting Li <https://github.com/yetingli> for
|
|
4401
|
+
// improving this regexp to avoid a ReDOS vulnerability.
|
|
4380
4402
|
|
|
4381
|
-
if (
|
|
4382
|
-
throw new TypeError('undefined pattern');
|
|
4383
|
-
}
|
|
4384
|
-
|
|
4385
|
-
if (options.nobrace || !pattern.match(/\{.*\}/)) {
|
|
4403
|
+
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
4386
4404
|
// shortcut. no need to expand.
|
|
4387
4405
|
return [pattern];
|
|
4388
4406
|
}
|
|
4389
4407
|
|
|
4390
4408
|
return expand(pattern);
|
|
4391
|
-
}
|
|
4409
|
+
}
|
|
4410
|
+
|
|
4411
|
+
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
4412
|
+
|
|
4413
|
+
var assertValidPattern = function (pattern) {
|
|
4414
|
+
if (typeof pattern !== 'string') {
|
|
4415
|
+
throw new TypeError('invalid pattern');
|
|
4416
|
+
}
|
|
4417
|
+
|
|
4418
|
+
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
4419
|
+
throw new TypeError('pattern is too long');
|
|
4420
|
+
}
|
|
4421
|
+
}; // parse a component of the expanded set.
|
|
4392
4422
|
// At this point, no pattern may contain "/" in it
|
|
4393
4423
|
// so we're going to return a 2d array, where each entry is the full
|
|
4394
4424
|
// pattern, split on '/', and then turned into a regular expression.
|
|
@@ -4405,13 +4435,13 @@
|
|
|
4405
4435
|
var SUBPARSE = {};
|
|
4406
4436
|
|
|
4407
4437
|
function parse(pattern, isSub) {
|
|
4408
|
-
|
|
4409
|
-
throw new TypeError('pattern is too long');
|
|
4410
|
-
}
|
|
4411
|
-
|
|
4438
|
+
assertValidPattern(pattern);
|
|
4412
4439
|
var options = this.options; // shortcuts
|
|
4413
4440
|
|
|
4414
|
-
if (
|
|
4441
|
+
if (pattern === '**') {
|
|
4442
|
+
if (!options.noglobstar) return GLOBSTAR;else pattern = '*';
|
|
4443
|
+
}
|
|
4444
|
+
|
|
4415
4445
|
if (pattern === '') return '';
|
|
4416
4446
|
var re = '';
|
|
4417
4447
|
var hasMagic = !!options.nocase;
|
|
@@ -4465,10 +4495,13 @@
|
|
|
4465
4495
|
}
|
|
4466
4496
|
|
|
4467
4497
|
switch (c) {
|
|
4498
|
+
/* istanbul ignore next */
|
|
4468
4499
|
case '/':
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4500
|
+
{
|
|
4501
|
+
// completely not allowed, even escaped.
|
|
4502
|
+
// Should already be path-split by now.
|
|
4503
|
+
return false;
|
|
4504
|
+
}
|
|
4472
4505
|
|
|
4473
4506
|
case '\\':
|
|
4474
4507
|
clearStateChar();
|
|
@@ -4586,28 +4619,26 @@
|
|
|
4586
4619
|
continue;
|
|
4587
4620
|
} // handle the case where we left a class open.
|
|
4588
4621
|
// "[z-a]" is valid, equivalent to "\[z-a\]"
|
|
4622
|
+
// split where the last [ was, make sure we don't have
|
|
4623
|
+
// an invalid re. if so, re-walk the contents of the
|
|
4624
|
+
// would-be class to re-translate any characters that
|
|
4625
|
+
// were passed through as-is
|
|
4626
|
+
// TODO: It would probably be faster to determine this
|
|
4627
|
+
// without a try/catch and a new RegExp, but it's tricky
|
|
4628
|
+
// to do safely. For now, this is safe and works.
|
|
4589
4629
|
|
|
4590
4630
|
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
//
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
RegExp('[' + cs + ']');
|
|
4603
|
-
} catch (er) {
|
|
4604
|
-
// not a valid class!
|
|
4605
|
-
var sp = this.parse(cs, SUBPARSE);
|
|
4606
|
-
re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]';
|
|
4607
|
-
hasMagic = hasMagic || sp[1];
|
|
4608
|
-
inClass = false;
|
|
4609
|
-
continue;
|
|
4610
|
-
}
|
|
4631
|
+
var cs = pattern.substring(classStart + 1, i);
|
|
4632
|
+
|
|
4633
|
+
try {
|
|
4634
|
+
RegExp('[' + cs + ']');
|
|
4635
|
+
} catch (er) {
|
|
4636
|
+
// not a valid class!
|
|
4637
|
+
var sp = this.parse(cs, SUBPARSE);
|
|
4638
|
+
re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]';
|
|
4639
|
+
hasMagic = hasMagic || sp[1];
|
|
4640
|
+
inClass = false;
|
|
4641
|
+
continue;
|
|
4611
4642
|
} // finish up the class.
|
|
4612
4643
|
|
|
4613
4644
|
|
|
@@ -4689,8 +4720,8 @@
|
|
|
4689
4720
|
var addPatternStart = false;
|
|
4690
4721
|
|
|
4691
4722
|
switch (re.charAt(0)) {
|
|
4692
|
-
case '.':
|
|
4693
4723
|
case '[':
|
|
4724
|
+
case '.':
|
|
4694
4725
|
case '(':
|
|
4695
4726
|
addPatternStart = true;
|
|
4696
4727
|
} // Hack to work around lack of negative lookbehind in JS
|
|
@@ -4755,7 +4786,9 @@
|
|
|
4755
4786
|
|
|
4756
4787
|
try {
|
|
4757
4788
|
var regExp = new RegExp('^' + re + '$', flags);
|
|
4758
|
-
} catch (er)
|
|
4789
|
+
} catch (er)
|
|
4790
|
+
/* istanbul ignore next - should be impossible */
|
|
4791
|
+
{
|
|
4759
4792
|
// If it was an invalid regular expression, then it can't match
|
|
4760
4793
|
// anything. This trick looks for a character after the end of
|
|
4761
4794
|
// the string, which is of course impossible, except in multi-line
|
|
@@ -4805,7 +4838,9 @@
|
|
|
4805
4838
|
|
|
4806
4839
|
try {
|
|
4807
4840
|
this.regexp = new RegExp(re, flags);
|
|
4808
|
-
} catch (ex)
|
|
4841
|
+
} catch (ex)
|
|
4842
|
+
/* istanbul ignore next - should be impossible */
|
|
4843
|
+
{
|
|
4809
4844
|
this.regexp = false;
|
|
4810
4845
|
}
|
|
4811
4846
|
|
|
@@ -4826,9 +4861,8 @@
|
|
|
4826
4861
|
return list;
|
|
4827
4862
|
};
|
|
4828
4863
|
|
|
4829
|
-
Minimatch.prototype.match = match
|
|
4830
|
-
|
|
4831
|
-
function match(f, partial) {
|
|
4864
|
+
Minimatch.prototype.match = function match(f, partial) {
|
|
4865
|
+
if (typeof partial === 'undefined') partial = this.partial;
|
|
4832
4866
|
this.debug('match', f, this.pattern); // short-circuit in the case of busted things.
|
|
4833
4867
|
// comments, etc.
|
|
4834
4868
|
|
|
@@ -4879,7 +4913,7 @@
|
|
|
4879
4913
|
|
|
4880
4914
|
if (options.flipNegate) return false;
|
|
4881
4915
|
return this.negate;
|
|
4882
|
-
} // set partial to true to test if, for example,
|
|
4916
|
+
}; // set partial to true to test if, for example,
|
|
4883
4917
|
// "/a/b" matches the start of "/*/b/*/d"
|
|
4884
4918
|
// Partial means, if you run out of file before you run
|
|
4885
4919
|
// out of pattern, then that's fine, as long as all
|
|
@@ -4902,6 +4936,8 @@
|
|
|
4902
4936
|
this.debug(pattern, p, f); // should be impossible.
|
|
4903
4937
|
// some invalid regexp stuff in the set.
|
|
4904
4938
|
|
|
4939
|
+
/* istanbul ignore if */
|
|
4940
|
+
|
|
4905
4941
|
if (p === false) return false;
|
|
4906
4942
|
|
|
4907
4943
|
if (p === GLOBSTAR) {
|
|
@@ -4971,6 +5007,8 @@
|
|
|
4971
5007
|
// However, in partial mode, we can't say this is necessarily over.
|
|
4972
5008
|
// If there's more *pattern* left, then
|
|
4973
5009
|
|
|
5010
|
+
/* istanbul ignore if */
|
|
5011
|
+
|
|
4974
5012
|
|
|
4975
5013
|
if (partial) {
|
|
4976
5014
|
// ran out of file
|
|
@@ -4987,12 +5025,7 @@
|
|
|
4987
5025
|
var hit;
|
|
4988
5026
|
|
|
4989
5027
|
if (typeof p === 'string') {
|
|
4990
|
-
|
|
4991
|
-
hit = f.toLowerCase() === p.toLowerCase();
|
|
4992
|
-
} else {
|
|
4993
|
-
hit = f === p;
|
|
4994
|
-
}
|
|
4995
|
-
|
|
5028
|
+
hit = f === p;
|
|
4996
5029
|
this.debug('string match', p, f, hit);
|
|
4997
5030
|
} else {
|
|
4998
5031
|
hit = f.match(p);
|
|
@@ -5022,14 +5055,17 @@
|
|
|
5022
5055
|
// this is ok if we're doing the match as part of
|
|
5023
5056
|
// a glob fs traversal.
|
|
5024
5057
|
return partial;
|
|
5025
|
-
} else
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5058
|
+
} else
|
|
5059
|
+
/* istanbul ignore else */
|
|
5060
|
+
if (pi === pl) {
|
|
5061
|
+
// ran out of pattern, still have file left.
|
|
5062
|
+
// this is only acceptable if we're on the very last
|
|
5063
|
+
// empty segment of a file with a trailing slash.
|
|
5064
|
+
// a/* should match a/b/
|
|
5065
|
+
return fi === fl - 1 && file[fi] === '';
|
|
5066
|
+
} // should be unreachable.
|
|
5067
|
+
|
|
5068
|
+
/* istanbul ignore next */
|
|
5033
5069
|
|
|
5034
5070
|
|
|
5035
5071
|
throw new Error('wtf?');
|
|
@@ -6320,6 +6356,10 @@
|
|
|
6320
6356
|
node.setAttribute("slot", brick.slotId);
|
|
6321
6357
|
}
|
|
6322
6358
|
|
|
6359
|
+
if (brick.iid) {
|
|
6360
|
+
node.dataset.iid = brick.iid;
|
|
6361
|
+
}
|
|
6362
|
+
|
|
6323
6363
|
setRealProperties(node, brick.properties);
|
|
6324
6364
|
bindListeners(node, brick.events, brick.context);
|
|
6325
6365
|
|
|
@@ -8909,7 +8949,8 @@
|
|
|
8909
8949
|
children: [],
|
|
8910
8950
|
slotId,
|
|
8911
8951
|
refForProxy: brickConf[symbolForRefForProxy],
|
|
8912
|
-
tplContextId
|
|
8952
|
+
tplContextId,
|
|
8953
|
+
iid: brickConf.iid
|
|
8913
8954
|
});
|
|
8914
8955
|
|
|
8915
8956
|
if (brickConf[symbolForComputedPropsFromProxy]) {
|
|
@@ -11305,7 +11346,9 @@
|
|
|
11305
11346
|
yield resolver.resolve({
|
|
11306
11347
|
brick: useBrick.brick,
|
|
11307
11348
|
lifeCycle: useBrick.lifeCycle
|
|
11308
|
-
}, brick, _internalApiGetCurrentContext())
|
|
11349
|
+
}, brick, _objectSpread__default["default"](_objectSpread__default["default"]({}, _internalApiGetCurrentContext()), {}, {
|
|
11350
|
+
tplContextId: useBrick[symbolForTplContextId]
|
|
11351
|
+
}));
|
|
11309
11352
|
}
|
|
11310
11353
|
|
|
11311
11354
|
return brick;
|
|
@@ -11332,6 +11375,11 @@
|
|
|
11332
11375
|
var {
|
|
11333
11376
|
[symbolForTplContextId]: tplContextId
|
|
11334
11377
|
} = useBrick;
|
|
11378
|
+
|
|
11379
|
+
if (useBrick.iid) {
|
|
11380
|
+
element.dataset.iid = useBrick.iid;
|
|
11381
|
+
}
|
|
11382
|
+
|
|
11335
11383
|
setRealProperties(element, brick.properties);
|
|
11336
11384
|
unbindListeners(element);
|
|
11337
11385
|
|
|
@@ -11501,7 +11549,9 @@
|
|
|
11501
11549
|
yield resolver.resolve({
|
|
11502
11550
|
brick: useBrick.brick,
|
|
11503
11551
|
lifeCycle: useBrick.lifeCycle
|
|
11504
|
-
}, brick, _internalApiGetCurrentContext())
|
|
11552
|
+
}, brick, _objectSpread__default["default"](_objectSpread__default["default"]({}, _internalApiGetCurrentContext()), {}, {
|
|
11553
|
+
tplContextId: useBrick[symbolForTplContextId]
|
|
11554
|
+
}));
|
|
11505
11555
|
}
|
|
11506
11556
|
|
|
11507
11557
|
return brick;
|
|
@@ -11528,6 +11578,11 @@
|
|
|
11528
11578
|
var {
|
|
11529
11579
|
[symbolForTplContextId]: tplContextId
|
|
11530
11580
|
} = useBrick;
|
|
11581
|
+
|
|
11582
|
+
if (useBrick.iid) {
|
|
11583
|
+
element.dataset.iid = useBrick.iid;
|
|
11584
|
+
}
|
|
11585
|
+
|
|
11531
11586
|
setRealProperties(element, brick.properties);
|
|
11532
11587
|
unbindListeners(element);
|
|
11533
11588
|
|