@authing/vue-ui-components 3.0.13 → 3.0.21
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/configs/rollup.config.base.js +1 -4
- package/lib/.gitkeep +0 -0
- package/lib/index.min.css +2 -21602
- package/lib/index.min.js +1 -1
- package/package.json +6 -5
- package/src/components/AuthingGuard.vue +13 -26
- package/src/components/Guard.vue +13 -42
- package/yarn-error.log +0 -20225
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authing/vue-ui-components",
|
|
3
3
|
"description": "Authing Vue UI components",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.21",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
7
7
|
"vuejs",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"registry": "https://registry.npmjs.org"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@authing/native-js-ui-components": "^3.0.
|
|
36
|
+
"@authing/native-js-ui-components": "^3.0.21"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@babel/core": "^7.
|
|
39
|
+
"@babel/core": "^7.4.0",
|
|
40
40
|
"@babel/plugin-transform-runtime": "7.4.0",
|
|
41
|
-
"@babel/preset-env": "
|
|
41
|
+
"@babel/preset-env": "7.4.2",
|
|
42
42
|
"@vue/babel-preset-jsx": "1.0.0-beta.3",
|
|
43
43
|
"@vue/cli-plugin-babel": "^3.5.1",
|
|
44
44
|
"@vue/cli-plugin-eslint": "^3.5.1",
|
|
@@ -78,5 +78,6 @@
|
|
|
78
78
|
"browserslist": [
|
|
79
79
|
"> 10%",
|
|
80
80
|
"last 2 versions"
|
|
81
|
-
]
|
|
81
|
+
],
|
|
82
|
+
"gitHead": "4fb7d208335fade01debb23e53a7986ddc2fbbff"
|
|
82
83
|
}
|
|
@@ -108,33 +108,20 @@ export default {
|
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
110
|
},
|
|
111
|
-
},
|
|
112
|
-
computed: {
|
|
113
|
-
mergeConfig: function () {
|
|
114
|
-
return {
|
|
115
|
-
...this.config,
|
|
116
|
-
appId: this.appId,
|
|
117
|
-
mode: this.mode ?? this.config?.mode,
|
|
118
|
-
autoRegister: this.autoRegister ?? this.config?.autoRegister,
|
|
119
|
-
isSSO: this.isSSO ?? this.config?.isSSO,
|
|
120
|
-
clickCloseable: this.clickCloseable ?? this.config?.clickCloseable,
|
|
121
|
-
escCloseable: this.escCloseable ?? this.config?.escCloseable,
|
|
122
|
-
};
|
|
123
|
-
},
|
|
124
111
|
},
|
|
125
112
|
mounted() {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
113
|
+
this.config = this.config || {};
|
|
114
|
+
this.config.mode = this.mode ? this.mode : this.config.mode;
|
|
115
|
+
this.config.autoRegister = this.autoRegister
|
|
116
|
+
? this.autoRegister
|
|
117
|
+
: this.config.autoRegister;
|
|
118
|
+
this.config.isSSO = this.isSSO ? this.isSSO : this.config.isSSO;
|
|
119
|
+
this.config.clickCloseable = this.clickCloseable
|
|
120
|
+
? this.clickCloseable
|
|
121
|
+
: this.config.clickCloseable;
|
|
122
|
+
this.config.escCloseable = this.escCloseable
|
|
123
|
+
? this.escCloseable
|
|
124
|
+
: this.config.escCloseable;
|
|
138
125
|
|
|
139
126
|
// this.config.autoRegister = format(this.autoRegister, this.config.autoRegister)
|
|
140
127
|
// this.config.isSSO = format(this.isSSO, this.config.isSSO)
|
|
@@ -143,7 +130,7 @@ export default {
|
|
|
143
130
|
|
|
144
131
|
const guard = new NativeAuthingGuard(
|
|
145
132
|
this.appId,
|
|
146
|
-
this.
|
|
133
|
+
this.config,
|
|
147
134
|
this.tenantId
|
|
148
135
|
);
|
|
149
136
|
|
package/src/components/Guard.vue
CHANGED
|
@@ -15,14 +15,7 @@ import {
|
|
|
15
15
|
import "@authing/native-js-ui-components/lib/index.min.css";
|
|
16
16
|
import { Guard as NativeGuard } from "@authing/native-js-ui-components/lib/index.min.js";
|
|
17
17
|
|
|
18
|
-
export {
|
|
19
|
-
getAuthClient,
|
|
20
|
-
initAuthClient,
|
|
21
|
-
GuardMode,
|
|
22
|
-
GuardScenes,
|
|
23
|
-
LoginMethods,
|
|
24
|
-
RegisterMethods,
|
|
25
|
-
};
|
|
18
|
+
export { getAuthClient, initAuthClient, GuardMode, GuardScenes, LoginMethods, RegisterMethods };
|
|
26
19
|
|
|
27
20
|
const format = (a, b) => {
|
|
28
21
|
return !a || a === "false" ? b : true;
|
|
@@ -105,49 +98,27 @@ export default {
|
|
|
105
98
|
},
|
|
106
99
|
},
|
|
107
100
|
},
|
|
108
|
-
computed: {
|
|
109
|
-
mergeConfig: function () {
|
|
110
|
-
return {
|
|
111
|
-
...this.config,
|
|
112
|
-
appId: this.appId,
|
|
113
|
-
mode: this.mode ?? this.config?.mode,
|
|
114
|
-
autoRegister: this.autoRegister ?? this.config?.autoRegister,
|
|
115
|
-
isSSO: this.isSSO ?? this.config?.isSSO,
|
|
116
|
-
clickCloseable: this.clickCloseable ?? this.config?.clickCloseable,
|
|
117
|
-
escCloseable: this.escCloseable ?? this.config?.escCloseable,
|
|
118
|
-
};
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
101
|
mounted() {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
// this.config.clickCloseable = this.clickCloseable
|
|
129
|
-
// ? this.clickCloseable
|
|
130
|
-
// : this.config.clickCloseable;
|
|
131
|
-
// this.config.escCloseable = this.escCloseable
|
|
132
|
-
// ? this.escCloseable
|
|
133
|
-
// : this.config.escCloseable;
|
|
102
|
+
this.config = this.config || {};
|
|
103
|
+
this.config.mode = this.mode ? this.mode : this.config.mode;
|
|
104
|
+
this.config.autoRegister = this.autoRegister ? this.autoRegister : this.config.autoRegister;
|
|
105
|
+
this.config.isSSO = this.isSSO ? this.isSSO : this.config.isSSO;
|
|
106
|
+
this.config.clickCloseable = this.clickCloseable ? this.clickCloseable : this.config.clickCloseable;
|
|
107
|
+
this.config.escCloseable = this.escCloseable ? this.escCloseable : this.config.escCloseable;
|
|
134
108
|
|
|
135
109
|
// this.config.autoRegister = format(this.autoRegister, this.config.autoRegister)
|
|
136
110
|
// this.config.isSSO = format(this.isSSO, this.config.isSSO)
|
|
137
111
|
// this.config.clickCloseable = format(this.clickCloseable, this.config.clickCloseable)
|
|
138
112
|
// this.config.escCloseable = format(this.escCloseable, this.config.escCloseable)
|
|
139
113
|
|
|
140
|
-
const guard = new NativeGuard(this.appId, this.
|
|
114
|
+
const guard = new NativeGuard(this.appId, this.config);
|
|
141
115
|
|
|
142
116
|
const evts = Object.values(GuardEventsCamelToKebabMap);
|
|
143
|
-
const kebabToCamelMap = Object.entries(GuardEventsCamelToKebabMap).reduce(
|
|
144
|
-
(
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
{}
|
|
150
|
-
);
|
|
117
|
+
const kebabToCamelMap = Object.entries(GuardEventsCamelToKebabMap).reduce((acc, [camel, kebab]) => {
|
|
118
|
+
return Object.assign({}, acc, {
|
|
119
|
+
[kebab]: camel,
|
|
120
|
+
});
|
|
121
|
+
}, {});
|
|
151
122
|
|
|
152
123
|
const listeners = evts.reduce((acc, evtName) => {
|
|
153
124
|
return Object.assign({}, acc, {
|