@authing/vue-ui-components 2.4.55 → 2.4.59
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/lib/index.min.js +1 -1
- package/package.json +4 -4
- package/src/components/AuthingGuard.vue +9 -15
- package/src/components/index.js +19 -2
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authing/vue-ui-components",
|
|
3
3
|
"description": "Authing Vue UI components",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.59",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
7
7
|
"vuejs",
|
|
8
8
|
"authing"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"main": "
|
|
11
|
+
"main": "src/components/index.js",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"demo:serve": "vue-cli-service serve",
|
|
14
14
|
"demo:build": "vue-cli-service build",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"registry": "https://registry.npmjs.org"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@authing/native-js-ui-components": "^2.4.
|
|
36
|
+
"@authing/native-js-ui-components": "^2.4.59"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@babel/core": "^7.4.0",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"> 10%",
|
|
80
80
|
"last 2 versions"
|
|
81
81
|
],
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "6a20b0d25cc459993f2884dad32e56ea23d17b59"
|
|
83
83
|
}
|
|
@@ -4,18 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
<script>
|
|
6
6
|
import {
|
|
7
|
-
getAuthClient,
|
|
8
|
-
initAuthClient,
|
|
9
7
|
AuthingGuard as NativeAuthingGuard,
|
|
10
8
|
GuardEventsCamelToKebabMap,
|
|
11
|
-
GuardMode,
|
|
12
|
-
GuardScenes,
|
|
13
|
-
LoginMethods,
|
|
14
|
-
RegisterMethods,
|
|
15
9
|
} from "@authing/native-js-ui-components";
|
|
16
|
-
import "@authing/native-js-ui-components/lib/index.min.css";
|
|
17
10
|
|
|
18
|
-
|
|
11
|
+
import "@authing/native-js-ui-components/lib/index.min.css";
|
|
19
12
|
|
|
20
13
|
const format = (a, b) => {
|
|
21
14
|
return !a || a === "false" ? b : true;
|
|
@@ -77,6 +70,7 @@ export default {
|
|
|
77
70
|
return {
|
|
78
71
|
localVisible: false,
|
|
79
72
|
$guard: null,
|
|
73
|
+
localConfig: this.config
|
|
80
74
|
};
|
|
81
75
|
},
|
|
82
76
|
watch: {
|
|
@@ -103,19 +97,19 @@ export default {
|
|
|
103
97
|
},
|
|
104
98
|
},
|
|
105
99
|
mounted() {
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
108
|
-
this.
|
|
109
|
-
this.
|
|
110
|
-
this.
|
|
111
|
-
this.
|
|
100
|
+
this.localConfig = this.localConfig || {};
|
|
101
|
+
this.localConfig.mode = this.mode ? this.mode : this.localConfig.mode;
|
|
102
|
+
this.localConfig.autoRegister = this.autoRegister ? this.autoRegister : this.localConfig.autoRegister;
|
|
103
|
+
this.localConfig.isSSO = this.isSSO ? this.isSSO : this.localConfig.isSSO;
|
|
104
|
+
this.localConfig.clickCloseable = this.clickCloseable ? this.clickCloseable : this.localConfig.clickCloseable;
|
|
105
|
+
this.localConfig.escCloseable = this.escCloseable ? this.escCloseable : this.localConfig.escCloseable;
|
|
112
106
|
|
|
113
107
|
// this.config.autoRegister = format(this.autoRegister, this.config.autoRegister)
|
|
114
108
|
// this.config.isSSO = format(this.isSSO, this.config.isSSO)
|
|
115
109
|
// this.config.clickCloseable = format(this.clickCloseable, this.config.clickCloseable)
|
|
116
110
|
// this.config.escCloseable = format(this.escCloseable, this.config.escCloseable)
|
|
117
111
|
|
|
118
|
-
const guard = new NativeAuthingGuard(this.appId, this.
|
|
112
|
+
const guard = new NativeAuthingGuard(this.appId, this.localConfig, this.tenantId);
|
|
119
113
|
|
|
120
114
|
const evts = Object.values(GuardEventsCamelToKebabMap);
|
|
121
115
|
const kebabToCamelMap = Object.entries(GuardEventsCamelToKebabMap).reduce((acc, [camel, kebab]) => {
|
package/src/components/index.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import AuthingGuard from './AuthingGuard.vue'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
getAuthClient,
|
|
5
|
+
initAuthClient,
|
|
6
|
+
GuardMode,
|
|
7
|
+
GuardScenes,
|
|
8
|
+
LoginMethods,
|
|
9
|
+
RegisterMethods,
|
|
10
|
+
} from "@authing/native-js-ui-components";
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
AuthingGuard,
|
|
15
|
+
getAuthClient,
|
|
16
|
+
initAuthClient,
|
|
17
|
+
GuardMode,
|
|
18
|
+
GuardScenes,
|
|
19
|
+
LoginMethods,
|
|
20
|
+
RegisterMethods
|
|
21
|
+
}
|