Skip to content

Commit 16b32e7

Browse files
author
William Bernting
committed
maintenance upgrades
1 parent 7646d63 commit 16b32e7

7 files changed

+5656
-5082
lines changed

.babelrc

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
{
2-
"plugins": [
3-
[
4-
"transform-builtin-classes",
5-
{
6-
"globals": ["HTMLElement"],
7-
"logIfPatched": true
8-
}
9-
]
10-
],
2+
"plugins": [["@babel/plugin-transform-classes"]],
113
"presets": [
124
[
135
"@babel/preset-env",
146
{
157
"modules": false,
168
"targets": {
17-
"browsers": ["> 1%", "last 2 versions", "not ie <= 10"]
9+
"browsers": ["> 1%", "last 2 versions", "not ie <= 10", "ie 11"]
1810
}
1911
}
2012
]

dist/vue-wc-wrapper.es5.global.js

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
var wrapVueWebComponent = (function () {
22
'use strict';
33

4-
function _typeof(obj) {
5-
"@babel/helpers - typeof";
6-
7-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
8-
_typeof = function (obj) {
9-
return typeof obj;
10-
};
11-
} else {
12-
_typeof = function (obj) {
13-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
14-
};
15-
}
16-
17-
return _typeof(obj);
18-
}
19-
204
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
215
try {
226
var info = gen[key](arg);
@@ -191,11 +175,13 @@ function _possibleConstructorReturn(self, call) {
191175
}
192176

193177
function _createSuper(Derived) {
194-
return function () {
178+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
179+
180+
return function _createSuperInternal() {
195181
var Super = _getPrototypeOf(Derived),
196182
result;
197183

198-
if (_isNativeReflectConstruct()) {
184+
if (hasNativeReflectConstruct) {
199185
var NewTarget = _getPrototypeOf(this).constructor;
200186

201187
result = Reflect.construct(Super, arguments, NewTarget);
@@ -316,30 +302,6 @@ function getAttributes(node) {
316302
return res;
317303
}
318304

319-
var _fixBabelExtend = function (O) {
320-
var gPO = O.getPrototypeOf || function (o) {
321-
return o.__proto__;
322-
},
323-
sPO = O.setPrototypeOf || function (o, p) {
324-
o.__proto__ = p;
325-
return o;
326-
},
327-
construct = (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === 'object' ? Reflect.construct : function (Parent, args, Class) {
328-
var Constructor,
329-
a = [null];
330-
a.push.apply(a, args);
331-
Constructor = Parent.bind.apply(Parent, a);
332-
return sPO(new Constructor(), Class.prototype);
333-
};
334-
335-
return function fixBabelExtend(Class) {
336-
var Parent = gPO(Class);
337-
return sPO(Class, sPO(function Super() {
338-
return construct(Parent, arguments, gPO(this).constructor);
339-
}, Parent));
340-
};
341-
}(Object);
342-
343305
function wrap(Vue, Component) {
344306
var isAsync = typeof Component === 'function' && !Component.cid;
345307
var isInitialized = false;
@@ -405,7 +367,7 @@ function wrap(Vue, Component) {
405367
el._wrapper.props[camelized] = convertAttributeValue(value, key, camelizedPropsMap[camelized]);
406368
}
407369

408-
var CustomElement = _fixBabelExtend( /*#__PURE__*/function (_HTMLElement) {
370+
var CustomElement = /*#__PURE__*/function (_HTMLElement) {
409371
_inherits(CustomElement, _HTMLElement);
410372

411373
var _super = _createSuper(CustomElement);
@@ -643,7 +605,7 @@ function wrap(Vue, Component) {
643605
}]);
644606

645607
return CustomElement;
646-
}( /*#__PURE__*/_wrapNativeSuper(HTMLElement)));
608+
}( /*#__PURE__*/_wrapNativeSuper(HTMLElement));
647609

648610
if (!isAsync) {
649611
initialize(Component);

dist/vue-wc-wrapper.es5.js

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
function _typeof(obj) {
2-
"@babel/helpers - typeof";
3-
4-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
5-
_typeof = function (obj) {
6-
return typeof obj;
7-
};
8-
} else {
9-
_typeof = function (obj) {
10-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
11-
};
12-
}
13-
14-
return _typeof(obj);
15-
}
16-
171
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
182
try {
193
var info = gen[key](arg);
@@ -188,11 +172,13 @@ function _possibleConstructorReturn(self, call) {
188172
}
189173

190174
function _createSuper(Derived) {
191-
return function () {
175+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
176+
177+
return function _createSuperInternal() {
192178
var Super = _getPrototypeOf(Derived),
193179
result;
194180

195-
if (_isNativeReflectConstruct()) {
181+
if (hasNativeReflectConstruct) {
196182
var NewTarget = _getPrototypeOf(this).constructor;
197183

198184
result = Reflect.construct(Super, arguments, NewTarget);
@@ -313,30 +299,6 @@ function getAttributes(node) {
313299
return res;
314300
}
315301

316-
var _fixBabelExtend = function (O) {
317-
var gPO = O.getPrototypeOf || function (o) {
318-
return o.__proto__;
319-
},
320-
sPO = O.setPrototypeOf || function (o, p) {
321-
o.__proto__ = p;
322-
return o;
323-
},
324-
construct = (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === 'object' ? Reflect.construct : function (Parent, args, Class) {
325-
var Constructor,
326-
a = [null];
327-
a.push.apply(a, args);
328-
Constructor = Parent.bind.apply(Parent, a);
329-
return sPO(new Constructor(), Class.prototype);
330-
};
331-
332-
return function fixBabelExtend(Class) {
333-
var Parent = gPO(Class);
334-
return sPO(Class, sPO(function Super() {
335-
return construct(Parent, arguments, gPO(this).constructor);
336-
}, Parent));
337-
};
338-
}(Object);
339-
340302
function wrap(Vue, Component) {
341303
var isAsync = typeof Component === 'function' && !Component.cid;
342304
var isInitialized = false;
@@ -402,7 +364,7 @@ function wrap(Vue, Component) {
402364
el._wrapper.props[camelized] = convertAttributeValue(value, key, camelizedPropsMap[camelized]);
403365
}
404366

405-
var CustomElement = _fixBabelExtend( /*#__PURE__*/function (_HTMLElement) {
367+
var CustomElement = /*#__PURE__*/function (_HTMLElement) {
406368
_inherits(CustomElement, _HTMLElement);
407369

408370
var _super = _createSuper(CustomElement);
@@ -640,7 +602,7 @@ function wrap(Vue, Component) {
640602
}]);
641603

642604
return CustomElement;
643-
}( /*#__PURE__*/_wrapNativeSuper(HTMLElement)));
605+
}( /*#__PURE__*/_wrapNativeSuper(HTMLElement));
644606

645607
if (!isAsync) {
646608
initialize(Component);

jest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
setupFiles: ['<rootDir>/jest.init.js']
3+
}

jest.init.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('@babel/polyfill')

0 commit comments

Comments
 (0)