@authing/vue-ui-components 3.1.10 → 3.1.13-rc.8

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.
@@ -15,7 +15,14 @@ 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 { getAuthClient, initAuthClient, GuardMode, GuardScenes, LoginMethods, RegisterMethods };
18
+ export {
19
+ getAuthClient,
20
+ initAuthClient,
21
+ GuardMode,
22
+ GuardScenes,
23
+ LoginMethods,
24
+ RegisterMethods,
25
+ };
19
26
 
20
27
  const callbackEvent = ["before-login", "before-register"];
21
28
 
@@ -24,12 +31,21 @@ export default {
24
31
  props: {
25
32
  appId: {
26
33
  type: String,
27
- required: true,
34
+ required: false,
28
35
  },
36
+ tenantId: {
37
+ type: String,
38
+ required: false,
39
+ },
40
+
29
41
  config: {
30
42
  type: Object,
31
43
  required: false,
32
44
  },
45
+ authClient: {
46
+ type: Object,
47
+ required: false,
48
+ },
33
49
  visible: {
34
50
  type: Boolean,
35
51
  default: false,
@@ -109,14 +125,22 @@ export default {
109
125
  },
110
126
  },
111
127
  mounted() {
112
- this.guardInstance = new NativeGuard(this.appId, this.mergeConfig);
128
+ this.guardInstance = new NativeGuard(
129
+ this.appId,
130
+ this.mergeConfig,
131
+ this.tenantId,
132
+ this.authClient
133
+ );
113
134
 
114
135
  const evts = Object.values(GuardEventsCamelToKebabMap);
115
- const kebabToCamelMap = Object.entries(GuardEventsCamelToKebabMap).reduce((acc, [camel, kebab]) => {
116
- return Object.assign({}, acc, {
117
- [kebab]: camel,
118
- });
119
- }, {});
136
+ const kebabToCamelMap = Object.entries(GuardEventsCamelToKebabMap).reduce(
137
+ (acc, [camel, kebab]) => {
138
+ return Object.assign({}, acc, {
139
+ [kebab]: camel,
140
+ });
141
+ },
142
+ {}
143
+ );
120
144
 
121
145
  const listeners = evts.reduce((acc, evtName) => {
122
146
  return Object.assign({}, acc, {
@@ -138,7 +162,9 @@ export default {
138
162
  });
139
163
  }, {});
140
164
 
141
- evts.forEach((evtName) => this.guardInstance.on(evtName, listeners[evtName]));
165
+ evts.forEach((evtName) =>
166
+ this.guardInstance.on(evtName, listeners[evtName])
167
+ );
142
168
 
143
169
  if (this.localVisible) {
144
170
  this.guardInstance.show();