@authing/vue-ui-components 3.1.5-rc.3 → 3.1.7

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Authing
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -62,7 +62,7 @@ export default {
62
62
  data() {
63
63
  return {
64
64
  localVisible: false,
65
- $guard: null,
65
+ guardInstance: null,
66
66
  guarConfig: {},
67
67
  };
68
68
  },
@@ -78,7 +78,7 @@ export default {
78
78
  localVisible: {
79
79
  handler(val) {
80
80
  if (val !== this.visible) {
81
- this.$emit("update:visible", val);
81
+ this.$emit("visible", val);
82
82
  }
83
83
 
84
84
  if (val) {
@@ -103,19 +103,7 @@ export default {
103
103
  },
104
104
  },
105
105
  mounted() {
106
- // this.guarConfig = this.config || {};
107
- // this.guarConfig.mode = this.mode ? this.mode : this.config.mode;
108
- // this.guarConfig.autoRegister = this.autoRegister ? this.autoRegister : this.config.autoRegister;
109
- // this.guarConfig.isSSO = this.isSSO ? this.isSSO : this.config.isSSO;
110
- // this.guarConfig.clickCloseable = this.clickCloseable ? this.clickCloseable : this.config.clickCloseable;
111
- // this.guarConfig.escCloseable = this.escCloseable ? this.escCloseable : this.config.escCloseable;
112
-
113
- // this.config.autoRegister = format(this.autoRegister, this.config.autoRegister)
114
- // this.config.isSSO = format(this.isSSO, this.config.isSSO)
115
- // this.config.clickCloseable = format(this.clickCloseable, this.config.clickCloseable)
116
- // this.config.escCloseable = format(this.escCloseable, this.config.escCloseable)
117
-
118
- const guard = new NativeAuthingGuard(this.appId, this.mergeConfig, this.tenantId);
106
+ this.guardInstance = new NativeAuthingGuard(this.appId, this.mergeConfig, this.tenantId);
119
107
 
120
108
  const evts = Object.values(GuardEventsCamelToKebabMap);
121
109
  const kebabToCamelMap = Object.entries(GuardEventsCamelToKebabMap).reduce((acc, [camel, kebab]) => {
@@ -144,19 +132,18 @@ export default {
144
132
  });
145
133
  }, {});
146
134
 
147
- evts.forEach((evtName) => guard.on(evtName, listeners[evtName]));
135
+ evts.forEach((evtName) => this.guardInstance.on(evtName, listeners[evtName]));
148
136
 
149
137
  if (this.localVisible) {
150
- guard.show();
138
+ this.guardInstance.show();
151
139
  }
152
- this.$guard = guard;
153
140
  },
154
141
  methods: {
155
142
  show() {
156
- this.$guard.show();
143
+ this.guardInstance.show();
157
144
  },
158
145
  hide() {
159
- this.$guard.hide();
146
+ this.guardInstance.hide();
160
147
  },
161
148
  },
162
149
  };
@@ -68,7 +68,7 @@ export default {
68
68
  data() {
69
69
  return {
70
70
  localVisible: false,
71
- $guard: null,
71
+ guardInstance: null,
72
72
  guarConfig: {},
73
73
  };
74
74
  },
@@ -84,7 +84,7 @@ export default {
84
84
  localVisible: {
85
85
  handler(val) {
86
86
  if (val !== this.visible) {
87
- this.$emit("update:visible", val);
87
+ this.$emit("visible", val);
88
88
  }
89
89
 
90
90
  if (val) {
@@ -109,14 +109,7 @@ export default {
109
109
  },
110
110
  },
111
111
  mounted() {
112
- // this.guarConfig = this.config || {};
113
- // this.guarConfig.mode = this.mode ? this.mode : this.config.mode;
114
- // this.guarConfig.autoRegister = this.autoRegister ? this.autoRegister : this.config.autoRegister;
115
- // this.guarConfig.isSSO = this.isSSO ? this.isSSO : this.config.isSSO;
116
- // this.guarConfig.clickCloseable = this.clickCloseable ? this.clickCloseable : this.config.clickCloseable;
117
- // this.guarConfig.escCloseable = this.escCloseable ? this.escCloseable : this.config.escCloseable;
118
-
119
- const guard = new NativeGuard(this.appId, this.mergeConfig);
112
+ this.guardInstance = new NativeGuard(this.appId, this.mergeConfig);
120
113
 
121
114
  const evts = Object.values(GuardEventsCamelToKebabMap);
122
115
  const kebabToCamelMap = Object.entries(GuardEventsCamelToKebabMap).reduce((acc, [camel, kebab]) => {
@@ -145,19 +138,18 @@ export default {
145
138
  });
146
139
  }, {});
147
140
 
148
- evts.forEach((evtName) => guard.on(evtName, listeners[evtName]));
141
+ evts.forEach((evtName) => this.guardInstance.on(evtName, listeners[evtName]));
149
142
 
150
143
  if (this.localVisible) {
151
- guard.show();
144
+ this.guardInstance.show();
152
145
  }
153
- this.$guard = guard;
154
146
  },
155
147
  methods: {
156
148
  show() {
157
- this.$guard.show();
149
+ this.guardInstance.show();
158
150
  },
159
151
  hide() {
160
- this.$guard.hide();
152
+ this.guardInstance.hide();
161
153
  },
162
154
  },
163
155
  };