glass-easel-miniprogram-adapter 0.9.0 → 0.10.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/glass_easel_miniprogram_adapter.d.ts +1 -0
- package/dist/glass_easel_miniprogram_adapter.es.js +1 -1
- package/dist/glass_easel_miniprogram_adapter.es.js.map +1 -1
- package/dist/glass_easel_miniprogram_adapter.js +1 -1
- package/dist/glass_easel_miniprogram_adapter.js.map +1 -1
- package/package.json +4 -4
- package/src/behavior.ts +4 -0
- package/src/builder/behavior_builder.ts +6 -1
- package/src/builder/component_builder.ts +3 -0
- package/tests/space.test.ts +1 -1
|
@@ -43,6 +43,7 @@ export class BehaviorBuilder<
|
|
|
43
43
|
TExtraThisFields
|
|
44
44
|
> {
|
|
45
45
|
private _$definitionFilter: DefinitionFilter | undefined
|
|
46
|
+
private _$chainingFilter?: ChainingFilterFunc<any, any>
|
|
46
47
|
|
|
47
48
|
/** @internal */
|
|
48
49
|
static create(codeSpace: CodeSpace): BehaviorBuilder {
|
|
@@ -74,7 +75,7 @@ export class BehaviorBuilder<
|
|
|
74
75
|
>,
|
|
75
76
|
TChainingFilter
|
|
76
77
|
> {
|
|
77
|
-
this._
|
|
78
|
+
this._$chainingFilter = func
|
|
78
79
|
return this as any
|
|
79
80
|
}
|
|
80
81
|
|
|
@@ -103,6 +104,9 @@ export class BehaviorBuilder<
|
|
|
103
104
|
this._$parents.push(behavior as GeneralBehavior)
|
|
104
105
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
105
106
|
this._$ = this._$.behavior(behavior._$)
|
|
107
|
+
if (behavior._$chainingFilter) {
|
|
108
|
+
return behavior._$chainingFilter(this as any)
|
|
109
|
+
}
|
|
106
110
|
return this as any
|
|
107
111
|
}
|
|
108
112
|
|
|
@@ -284,6 +288,7 @@ export class BehaviorBuilder<
|
|
|
284
288
|
this._$.registerBehavior(),
|
|
285
289
|
this._$parents,
|
|
286
290
|
this._$definitionFilter,
|
|
291
|
+
this._$chainingFilter,
|
|
287
292
|
this._$export,
|
|
288
293
|
)
|
|
289
294
|
}
|
|
@@ -125,6 +125,9 @@ export class ComponentBuilder<
|
|
|
125
125
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
126
126
|
this._$export = behavior._$export as any
|
|
127
127
|
}
|
|
128
|
+
if (behavior._$chainingFilter) {
|
|
129
|
+
return behavior._$chainingFilter(this as any)
|
|
130
|
+
}
|
|
128
131
|
return this as any
|
|
129
132
|
}
|
|
130
133
|
|
package/tests/space.test.ts
CHANGED