@stencil/angular-output-target 0.7.2-dev.11691677969.1304fff5 → 0.7.2-dev.11691686383.1d6a2c07
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/generate-angular-component.js +11 -1
- package/dist/index.cjs.js +11 -1
- package/dist/index.js +11 -1
- package/package.json +2 -2
|
@@ -82,7 +82,17 @@ const formatOutputType = (componentClassName, event) => {
|
|
|
82
82
|
return (renamedType
|
|
83
83
|
.replace(new RegExp(`^${src}$`, 'g'), `${dst}`)
|
|
84
84
|
// Capture all instances of the `src` field surrounded by non-word characters on each side and join them.
|
|
85
|
-
.replace(new RegExp(`([^\\w])${src}([^\\w])`, 'g'), (v, p1, p2) =>
|
|
85
|
+
.replace(new RegExp(`([^\\w])${src}([^\\w])`, 'g'), (v, p1, p2) => {
|
|
86
|
+
if ((dst === null || dst === void 0 ? void 0 : dst.location) === 'import') {
|
|
87
|
+
/**
|
|
88
|
+
* Replaces a complex type reference within a generic type.
|
|
89
|
+
* For example, remapping a type like `EventEmitter<CustomEvent<MyEvent<T>>>` to
|
|
90
|
+
* `EventEmitter<CustomEvent<IMyComponentMyEvent<IMyComponentT>>`.
|
|
91
|
+
*/
|
|
92
|
+
return [p1, `I${componentClassName}${v.substring(1, v.length - 1)}`, p2].join('');
|
|
93
|
+
}
|
|
94
|
+
return [p1, dst, p2].join('');
|
|
95
|
+
}));
|
|
86
96
|
}, event.complexType.original
|
|
87
97
|
.replace(/\n/g, ' ')
|
|
88
98
|
.replace(/\s{2,}/g, ' ')
|
package/dist/index.cjs.js
CHANGED
|
@@ -227,7 +227,17 @@ const formatOutputType = (componentClassName, event) => {
|
|
|
227
227
|
return (renamedType
|
|
228
228
|
.replace(new RegExp(`^${src}$`, 'g'), `${dst}`)
|
|
229
229
|
// Capture all instances of the `src` field surrounded by non-word characters on each side and join them.
|
|
230
|
-
.replace(new RegExp(`([^\\w])${src}([^\\w])`, 'g'), (v, p1, p2) =>
|
|
230
|
+
.replace(new RegExp(`([^\\w])${src}([^\\w])`, 'g'), (v, p1, p2) => {
|
|
231
|
+
if ((dst === null || dst === void 0 ? void 0 : dst.location) === 'import') {
|
|
232
|
+
/**
|
|
233
|
+
* Replaces a complex type reference within a generic type.
|
|
234
|
+
* For example, remapping a type like `EventEmitter<CustomEvent<MyEvent<T>>>` to
|
|
235
|
+
* `EventEmitter<CustomEvent<IMyComponentMyEvent<IMyComponentT>>`.
|
|
236
|
+
*/
|
|
237
|
+
return [p1, `I${componentClassName}${v.substring(1, v.length - 1)}`, p2].join('');
|
|
238
|
+
}
|
|
239
|
+
return [p1, dst, p2].join('');
|
|
240
|
+
}));
|
|
231
241
|
}, event.complexType.original
|
|
232
242
|
.replace(/\n/g, ' ')
|
|
233
243
|
.replace(/\s{2,}/g, ' ')
|
package/dist/index.js
CHANGED
|
@@ -219,7 +219,17 @@ const formatOutputType = (componentClassName, event) => {
|
|
|
219
219
|
return (renamedType
|
|
220
220
|
.replace(new RegExp(`^${src}$`, 'g'), `${dst}`)
|
|
221
221
|
// Capture all instances of the `src` field surrounded by non-word characters on each side and join them.
|
|
222
|
-
.replace(new RegExp(`([^\\w])${src}([^\\w])`, 'g'), (v, p1, p2) =>
|
|
222
|
+
.replace(new RegExp(`([^\\w])${src}([^\\w])`, 'g'), (v, p1, p2) => {
|
|
223
|
+
if ((dst === null || dst === void 0 ? void 0 : dst.location) === 'import') {
|
|
224
|
+
/**
|
|
225
|
+
* Replaces a complex type reference within a generic type.
|
|
226
|
+
* For example, remapping a type like `EventEmitter<CustomEvent<MyEvent<T>>>` to
|
|
227
|
+
* `EventEmitter<CustomEvent<IMyComponentMyEvent<IMyComponentT>>`.
|
|
228
|
+
*/
|
|
229
|
+
return [p1, `I${componentClassName}${v.substring(1, v.length - 1)}`, p2].join('');
|
|
230
|
+
}
|
|
231
|
+
return [p1, dst, p2].join('');
|
|
232
|
+
}));
|
|
223
233
|
}, event.complexType.original
|
|
224
234
|
.replace(/\n/g, ' ')
|
|
225
235
|
.replace(/\s{2,}/g, ' ')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/angular-output-target",
|
|
3
|
-
"version": "0.7.2-dev.
|
|
3
|
+
"version": "0.7.2-dev.11691686383.1d6a2c07",
|
|
4
4
|
"description": "Angular output target for @stencil/core components.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
],
|
|
59
59
|
"testURL": "http://localhost"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "d6a2c0758150ee7856d2e86d7ce563f9b0b434a7",
|
|
62
62
|
"volta": {
|
|
63
63
|
"extends": "../../package.json"
|
|
64
64
|
}
|