@authing/vue-ui-components 3.0.0-rc.2 → 3.0.12-rc.0

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.
@@ -1,20 +1,20 @@
1
- import babel from 'rollup-plugin-babel'
2
- import resolve from 'rollup-plugin-node-resolve'
3
- import vue from 'rollup-plugin-vue'
4
- import cjs from 'rollup-plugin-commonjs'
5
- import replace from 'rollup-plugin-replace'
6
- import requireContext from 'rollup-plugin-require-context'
7
- import { string } from 'rollup-plugin-string'
8
- import fs from 'fs'
9
- import CleanCSS from 'clean-css'
10
- import autoprefixer from 'autoprefixer'
11
- import css from 'rollup-plugin-css-only'
12
- const postcss = require('rollup-plugin-postcss')
1
+ import babel from "rollup-plugin-babel";
2
+ import resolve from "rollup-plugin-node-resolve";
3
+ import vue from "rollup-plugin-vue";
4
+ import cjs from "rollup-plugin-commonjs";
5
+ import replace from "rollup-plugin-replace";
6
+ import requireContext from "rollup-plugin-require-context";
7
+ import { string } from "rollup-plugin-string";
8
+ import fs from "fs";
9
+ import CleanCSS from "clean-css";
10
+ import autoprefixer from "autoprefixer";
11
+ import css from "rollup-plugin-css-only";
12
+ const postcss = require("rollup-plugin-postcss");
13
13
 
14
- const config = require('../package.json')
14
+ const config = require("../package.json");
15
15
 
16
16
  export default {
17
- input: 'src/components/index.js',
17
+ input: "src/components/index.js",
18
18
  plugins: [
19
19
  resolve({
20
20
  jsnext: true,
@@ -22,7 +22,7 @@ export default {
22
22
  browser: true,
23
23
  }),
24
24
  string({
25
- include: '**/*.svg',
25
+ include: "**/*.svg",
26
26
  }),
27
27
  vue({
28
28
  css: false,
@@ -35,35 +35,34 @@ export default {
35
35
  }),
36
36
  css({
37
37
  output: (styles) => {
38
- fs.writeFileSync(
39
- 'lib/index.min.css',
40
- new CleanCSS().minify(styles).styles
41
- )
38
+ fs.writeFileSync("lib/index.min.css", new CleanCSS().minify(styles).styles);
42
39
  },
43
40
  }),
44
41
  babel({
45
- exclude: 'node_modules/**',
42
+ exclude: "node_modules/**",
46
43
  runtimeHelpers: true,
47
44
  }),
48
45
  cjs({
49
46
  namedExports: {
50
- '@authing/native-js-ui-components': [
51
- 'AuthingGuard',
52
- 'GuardEventsCamelToKebabMap',
53
- 'GuardMode',
54
- 'GuardScenes',
55
- 'LoginMethods',
56
- 'RegisterMethods',
47
+ "@authing/native-js-ui-components": [
48
+ "AuthingGuard",
49
+ "Guard",
50
+ "GuardEventsCamelToKebabMap",
51
+ "GuardMode",
52
+ "GuardScenes",
53
+ "LoginMethods",
54
+ "RegisterMethods",
57
55
  ],
58
- '../native-js/lib/index.min.js': [
59
- 'AuthingGuard',
60
- 'GuardEventsCamelToKebabMap',
61
- 'GuardMode',
62
- 'GuardScenes',
63
- 'LoginMethods',
64
- 'RegisterMethods',
65
- 'getAuthClient',
66
- 'initAuthClient',
56
+ "../native-js/lib/index.min.js": [
57
+ "AuthingGuard",
58
+ "Guard",
59
+ "GuardEventsCamelToKebabMap",
60
+ "GuardMode",
61
+ "GuardScenes",
62
+ "LoginMethods",
63
+ "RegisterMethods",
64
+ "getAuthClient",
65
+ "initAuthClient",
67
66
  ],
68
67
  },
69
68
  }),
@@ -73,6 +72,6 @@ export default {
73
72
  // }),
74
73
  ],
75
74
  watch: {
76
- include: 'src/**',
75
+ include: "src/**",
77
76
  },
78
- }
77
+ };
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.0-rc.2",
4
+ "version": "3.0.12-rc.0",
5
5
  "keywords": [
6
6
  "vue",
7
7
  "vuejs",
@@ -33,7 +33,7 @@
33
33
  "registry": "https://registry.npmjs.org"
34
34
  },
35
35
  "dependencies": {
36
- "@authing/native-js-ui-components": "^3.0.0-rc.2"
36
+ "@authing/native-js-ui-components": "3.0.12"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@babel/core": "^7.4.0",
@@ -78,6 +78,5 @@
78
78
  "browserslist": [
79
79
  "> 10%",
80
80
  "last 2 versions"
81
- ],
82
- "gitHead": "38168128397d6ea8bfa26f395532a493596a535d"
83
- }
81
+ ]
82
+ }
@@ -15,14 +15,7 @@ import {
15
15
  } from "@authing/native-js-ui-components";
16
16
  import "@authing/native-js-ui-components/lib/index.min.css";
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;
@@ -108,16 +101,10 @@ export default {
108
101
  mounted() {
109
102
  this.config = this.config || {};
110
103
  this.config.mode = this.mode ? this.mode : this.config.mode;
111
- this.config.autoRegister = this.autoRegister
112
- ? this.autoRegister
113
- : this.config.autoRegister;
104
+ this.config.autoRegister = this.autoRegister ? this.autoRegister : this.config.autoRegister;
114
105
  this.config.isSSO = this.isSSO ? this.isSSO : this.config.isSSO;
115
- this.config.clickCloseable = this.clickCloseable
116
- ? this.clickCloseable
117
- : this.config.clickCloseable;
118
- this.config.escCloseable = this.escCloseable
119
- ? this.escCloseable
120
- : this.config.escCloseable;
106
+ this.config.clickCloseable = this.clickCloseable ? this.clickCloseable : this.config.clickCloseable;
107
+ this.config.escCloseable = this.escCloseable ? this.escCloseable : this.config.escCloseable;
121
108
 
122
109
  // this.config.autoRegister = format(this.autoRegister, this.config.autoRegister)
123
110
  // this.config.isSSO = format(this.isSSO, this.config.isSSO)
@@ -127,14 +114,11 @@ export default {
127
114
  const guard = new NativeGuard(this.appId, this.config);
128
115
 
129
116
  const evts = Object.values(GuardEventsCamelToKebabMap);
130
- const kebabToCamelMap = Object.entries(GuardEventsCamelToKebabMap).reduce(
131
- (acc, [camel, kebab]) => {
132
- return Object.assign({}, acc, {
133
- [kebab]: camel,
134
- });
135
- },
136
- {}
137
- );
117
+ const kebabToCamelMap = Object.entries(GuardEventsCamelToKebabMap).reduce((acc, [camel, kebab]) => {
118
+ return Object.assign({}, acc, {
119
+ [kebab]: camel,
120
+ });
121
+ }, {});
138
122
 
139
123
  const listeners = evts.reduce((acc, evtName) => {
140
124
  return Object.assign({}, acc, {
@@ -1,4 +1,6 @@
1
- import AuthingGuard from './AuthingGuard.vue'
1
+ import AuthingGuard from "./AuthingGuard.vue";
2
+ import Guard from "./Guard.vue";
2
3
 
3
- export * from './AuthingGuard.vue'
4
- export { AuthingGuard }
4
+ export * from "./AuthingGuard.vue";
5
+ export * from "./Guard.vue";
6
+ export { AuthingGuard, Guard };