@sedoo/unidoo 0.1.10 → 0.1.12
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/dist/auth/auth.common.js +1 -1
- package/dist/auth/auth.common.js.map +1 -1
- package/dist/auth/auth.umd.js +1 -1
- package/dist/auth/auth.umd.js.map +1 -1
- package/dist/auth/auth.umd.min.js +1 -1
- package/dist/auth/auth.umd.min.js.map +1 -1
- package/dist/unidoo/unidoo.common.js.map +1 -1
- package/dist/unidoo/unidoo.umd.js.map +1 -1
- package/dist/unidoo/unidoo.umd.min.js.map +1 -1
- package/index.js +8 -0
- package/package.json +87 -85
- package/src/auth.js +7 -3
package/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// legacy support import Unidoo from "@sedoo/unidoo"
|
|
2
|
+
import plugin from "./src/plugin";
|
|
3
|
+
const Unidoo = plugin;
|
|
4
|
+
export default Unidoo;
|
|
5
|
+
|
|
6
|
+
// Enables "cherry pick" imports (e.g: import { Unidoo, UnidooKeycloak } from "@sedoo/unidoo")
|
|
7
|
+
export { default as Unidoo} from "./src/plugin";
|
|
8
|
+
export { default as UnidooKeycloak} from "./src/auth";
|
package/package.json
CHANGED
|
@@ -1,90 +1,92 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
"name": "@sedoo/unidoo",
|
|
3
|
+
"version": "0.1.12",
|
|
4
|
+
"private": false,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "npm run build:unidoo && npm run build:auth",
|
|
7
|
+
"build:unidoo": "vue-cli-service build --target lib --dest dist/unidoo --name unidoo src/plugin.js",
|
|
8
|
+
"build:auth": "vue-cli-service build --target lib --dest dist/auth --name auth src/auth.js",
|
|
9
|
+
"lint": "vue-cli-service lint --fix && vue-cli-service lint dev --fix",
|
|
10
|
+
"docs:dev": "vuepress dev docs",
|
|
11
|
+
"docs:build": "vuepress build docs"
|
|
12
|
+
},
|
|
13
|
+
"comments": {
|
|
14
|
+
"scripts": "The build and docs:build script are used in the continuous integration process. They musn't be removed."
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"index.js",
|
|
18
|
+
"dist",
|
|
19
|
+
"src/**/*"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"date-fns": "^2.28.0",
|
|
23
|
+
"date-fns-tz": "^1.3.6",
|
|
24
|
+
"keycloak-js": "^8.0.2",
|
|
25
|
+
"ol": "^6.8.1",
|
|
26
|
+
"v-tooltip": "^2.1.3",
|
|
27
|
+
"vue-axios": "3.2.4"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@vue/cli-plugin-babel": "4.5.7",
|
|
31
|
+
"@vue/cli-plugin-eslint": "4.5.7",
|
|
32
|
+
"@vue/cli-service": "4.5.7",
|
|
33
|
+
"@vue/eslint-config-standard": "5.1.2",
|
|
34
|
+
"axios": "0.21.2",
|
|
35
|
+
"babel-eslint": "10.1.0",
|
|
36
|
+
"core-js": "3.6.5",
|
|
37
|
+
"eslint": "7.10.0",
|
|
38
|
+
"eslint-plugin-import": "2.22.1",
|
|
39
|
+
"eslint-plugin-node": "11.1.0",
|
|
40
|
+
"eslint-plugin-promise": "4.2.1",
|
|
41
|
+
"eslint-plugin-standard": "4.0.0",
|
|
42
|
+
"eslint-plugin-vue": "7.0.1",
|
|
43
|
+
"sass": "1.27.0",
|
|
44
|
+
"sass-loader": "10.0.2",
|
|
45
|
+
"vue": "2.6.14",
|
|
46
|
+
"vue-cli-plugin-vuetify": "2.0.7",
|
|
47
|
+
"vue-json-tree": "0.4.3",
|
|
48
|
+
"vue-json-tree-view": "2.1.6",
|
|
49
|
+
"vue-template-compiler": "2.6.14",
|
|
50
|
+
"vuepress": "1.8.2",
|
|
51
|
+
"vuetify": "2.3.13",
|
|
52
|
+
"vuetify-loader": "1.6.0",
|
|
53
|
+
"webpack-cdn-upload-plugin": "2.0.2"
|
|
54
|
+
},
|
|
55
|
+
"eslintConfig": {
|
|
56
|
+
"root": true,
|
|
57
|
+
"env": {
|
|
58
|
+
"node": true
|
|
12
59
|
},
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"files": [
|
|
17
|
-
"dist",
|
|
18
|
-
"src/**/*"
|
|
19
|
-
],
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"date-fns": "^2.28.0",
|
|
22
|
-
"date-fns-tz": "^1.3.6",
|
|
23
|
-
"keycloak-js": "^8.0.2",
|
|
24
|
-
"ol": "^6.8.1",
|
|
25
|
-
"v-tooltip": "^2.1.3",
|
|
26
|
-
"vue-axios": "3.2.4"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@vue/cli-plugin-babel": "4.5.7",
|
|
30
|
-
"@vue/cli-plugin-eslint": "4.5.7",
|
|
31
|
-
"@vue/cli-service": "4.5.7",
|
|
32
|
-
"@vue/eslint-config-standard": "5.1.2",
|
|
33
|
-
"axios": "0.21.2",
|
|
34
|
-
"babel-eslint": "10.1.0",
|
|
35
|
-
"core-js": "3.6.5",
|
|
36
|
-
"eslint": "7.10.0",
|
|
37
|
-
"eslint-plugin-import": "2.22.1",
|
|
38
|
-
"eslint-plugin-node": "11.1.0",
|
|
39
|
-
"eslint-plugin-promise": "4.2.1",
|
|
40
|
-
"eslint-plugin-standard": "4.0.0",
|
|
41
|
-
"eslint-plugin-vue": "7.0.1",
|
|
42
|
-
"sass": "1.27.0",
|
|
43
|
-
"sass-loader": "10.0.2",
|
|
44
|
-
"vue": "2.6.14",
|
|
45
|
-
"vue-cli-plugin-vuetify": "2.0.7",
|
|
46
|
-
"vue-json-tree": "0.4.3",
|
|
47
|
-
"vue-json-tree-view": "2.1.6",
|
|
48
|
-
"vue-template-compiler": "2.6.14",
|
|
49
|
-
"vuepress": "1.8.2",
|
|
50
|
-
"vuetify": "2.3.13",
|
|
51
|
-
"vuetify-loader": "1.6.0",
|
|
52
|
-
"webpack-cdn-upload-plugin": "2.0.2"
|
|
53
|
-
},
|
|
54
|
-
"eslintConfig": {
|
|
55
|
-
"root": true,
|
|
56
|
-
"env": {
|
|
57
|
-
"node": true
|
|
58
|
-
},
|
|
59
|
-
"extends": [
|
|
60
|
-
"plugin:vue/essential",
|
|
61
|
-
"eslint:recommended"
|
|
62
|
-
],
|
|
63
|
-
"rules": {
|
|
64
|
-
"no-console": 0,
|
|
65
|
-
"no-debugger": 0,
|
|
66
|
-
"no-trailing-spaces": 0,
|
|
67
|
-
"comma-dangle": 0,
|
|
68
|
-
"indent": 0
|
|
69
|
-
},
|
|
70
|
-
"parserOptions": {
|
|
71
|
-
"parser": "babel-eslint"
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"browserslist": [
|
|
75
|
-
"> 1%",
|
|
76
|
-
"last 2 versions"
|
|
60
|
+
"extends": [
|
|
61
|
+
"plugin:vue/essential",
|
|
62
|
+
"eslint:recommended"
|
|
77
63
|
],
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
"author": "SEDOO",
|
|
86
|
-
"bugs": {
|
|
87
|
-
"url": "https://gitlab.in2p3.fr/sedoo/unidoo/-/issues"
|
|
64
|
+
"rules": {
|
|
65
|
+
"no-console": 0,
|
|
66
|
+
"no-debugger": 0,
|
|
67
|
+
"no-trailing-spaces": 0,
|
|
68
|
+
"comma-dangle": 0,
|
|
69
|
+
"indent": 0
|
|
88
70
|
},
|
|
89
|
-
"
|
|
71
|
+
"parserOptions": {
|
|
72
|
+
"parser": "babel-eslint"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"browserslist": [
|
|
76
|
+
"> 1%",
|
|
77
|
+
"last 2 versions"
|
|
78
|
+
],
|
|
79
|
+
"description": "Commons components to simplify vuetify based application developement",
|
|
80
|
+
"exports": {
|
|
81
|
+
".": "./index.js"
|
|
82
|
+
},
|
|
83
|
+
"repository": {
|
|
84
|
+
"type": "git",
|
|
85
|
+
"url": "https://gitlab.in2p3.fr/sedoo/unidoo.git"
|
|
86
|
+
},
|
|
87
|
+
"author": "SEDOO",
|
|
88
|
+
"bugs": {
|
|
89
|
+
"url": "https://gitlab.in2p3.fr/sedoo/unidoo/-/issues"
|
|
90
|
+
},
|
|
91
|
+
"homepage": "https://sedoo.pages.in2p3.fr/unidoo"
|
|
90
92
|
}
|
package/src/auth.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { isEmpty } from "lodash";
|
|
2
2
|
import Keycloak from "keycloak-js";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const UnidooKeycloak = {
|
|
5
5
|
install(Vue, { axios }) {
|
|
6
6
|
if (this.installed) return;
|
|
7
7
|
this.installed = true;
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Init keycloak with SSO parameters
|
|
11
|
+
* @param {*} options SSO parameters
|
|
12
|
+
*/
|
|
13
|
+
Vue.prototype.$unidooInitKeycloak = async (options) => {
|
|
10
14
|
handleErrors(options);
|
|
11
15
|
|
|
12
16
|
let defaultOptions = {
|
|
@@ -36,7 +40,7 @@ const SedooKeycloak = {
|
|
|
36
40
|
}
|
|
37
41
|
};
|
|
38
42
|
|
|
39
|
-
export default
|
|
43
|
+
export default UnidooKeycloak;
|
|
40
44
|
|
|
41
45
|
function handleErrors(options) {
|
|
42
46
|
if (!options.ssoParams || Object.keys(options.ssoParams).length === 0) {
|