@enso-ui/roles 3.0.0 → 4.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enso-ui/roles",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "Basic roles package",
5
5
  "main": "src/bulma/pages/roles/Index.vue",
6
6
  "scripts": {
@@ -21,28 +21,25 @@
21
21
  },
22
22
  "homepage": "https://github.com/enso-ui/roles#readme",
23
23
  "dependencies": {
24
- "@enso-ui/card": "^2.0",
25
- "@enso-ui/checkbox": "^2.0",
26
- "@enso-ui/forms": "^2.0",
27
- "@enso-ui/permissions": "^3.0",
28
- "@enso-ui/tables": "^2.0",
29
- "@enso-ui/ui": "^4.0",
24
+ "@enso-ui/checkbox": "^3.0",
25
+ "@enso-ui/forms": "^3.0",
26
+ "@enso-ui/permissions": "^4.0",
27
+ "@enso-ui/tables": "^3.0",
28
+ "@enso-ui/ui": "^5.0",
30
29
  "@fortawesome/fontawesome-svg-core": "^1.2.2",
31
30
  "@fortawesome/free-solid-svg-icons": "^5.2.0",
32
- "v-tooltip": "^2.0.0-rc.32",
33
- "vue": "^2.5.16"
31
+ "vue": "^3.0",
32
+ "vuex": "^4.0.0"
34
33
  },
35
34
  "devDependencies": {
36
- "@babel/plugin-syntax-dynamic-import": "^7.2.0",
37
- "@vue/cli-plugin-babel": "^4.0.5",
38
- "@vue/cli-plugin-eslint": "^4.0.5",
39
- "@vue/cli-service": "^4.0.5",
35
+ "@vue/cli-plugin-babel": "5.0.0-beta.6",
36
+ "@vue/cli-plugin-eslint": "5.0.0-beta.6",
40
37
  "@vue/eslint-config-airbnb": "^5.0.0",
41
38
  "autoprefixer": "^9.6.1",
42
39
  "babel-eslint": "^10.0.1",
43
40
  "cross-env": "^6.0.0",
44
- "eslint": "^6.8.0",
41
+ "eslint": "^7.0",
45
42
  "eslint-import-resolver-alias": "^1.1.2",
46
- "eslint-plugin-vue": "^6.0.0"
43
+ "eslint-plugin-vue": "^8.0.0"
47
44
  }
48
45
  }
@@ -3,12 +3,12 @@
3
3
  <div class="column is-half is-three-fifths-desktop is-full-touch">
4
4
  <div class="animated fadeIn"
5
5
  v-if="data">
6
- <checkbox-manager class="is-rounded has-margin-top-large"
6
+ <checkbox-manager class="is-rounded mt-3"
7
7
  :title="`${i18n('Permissions')}: ${data.role.display_name}`"
8
8
  v-model="data.rolePermissions"
9
9
  :items="data.permissions">
10
- <template v-slot:item="{ item }">
11
- <div class="level permission is-hoverable has-padding-medium is-mobile">
10
+ <template #:item="{ item }">
11
+ <div class="level permission is-hoverable p-2 is-mobile">
12
12
  <div class="level-left">
13
13
  <div class="level-item">
14
14
  <label class="checkbox">
@@ -22,7 +22,7 @@
22
22
  </div>
23
23
  <div class="level-right">
24
24
  <div class="level-item">
25
- <span class="tag is-small is-info is-bold has-margin-right-medium"
25
+ <span class="tag is-small is-info is-bold mr-2"
26
26
  v-if="item.isDefault">
27
27
  {{ i18n('Default') }}
28
28
  </span>
@@ -35,7 +35,7 @@
35
35
  </div>
36
36
  </template>
37
37
  </checkbox-manager>
38
- <button class="button is-success has-margin-top-large is-pulled-right"
38
+ <button class="button is-success mt-3 is-pulled-right"
39
39
  @click="update"
40
40
  :disabled="!canAccess('system.roles.permissions.set')">
41
41
  {{ i18n("Update") }}
@@ -54,10 +54,10 @@ import { CheckboxManager } from '@enso-ui/checkbox/bulma';
54
54
  export default {
55
55
  name: 'Configure',
56
56
 
57
- inject: ['canAccess', 'errorHandler', 'i18n', 'route', 'toastr'],
58
-
59
57
  components: { CheckboxManager },
60
58
 
59
+ inject: ['canAccess', 'errorHandler', 'i18n', 'route', 'toastr'],
60
+
61
61
  data: () => ({
62
62
  data: null,
63
63
  }),
@@ -4,14 +4,14 @@
4
4
  <enso-form class="box has-background-light raises-on-hover"
5
5
  @ready="ready = true"
6
6
  ref="form">
7
- <template v-slot:actions-left
7
+ <template #:actions-left
8
8
  v-if="ready">
9
- <div class=level-item>
9
+ <div class="level-item">
10
10
  <a class="button is-warning"
11
11
  @click="$router.push({
12
12
  name: 'system.roles.configure',
13
13
  params: { role: $refs.form.routeParam('role') }
14
- })">
14
+ }).catch(routerErrorHandler)">
15
15
  <span class="is-hidden-mobile">
16
16
  {{ i18n('Configure') }}
17
17
  </span>
@@ -21,7 +21,7 @@
21
21
  <span class="is-hidden-mobile"/>
22
22
  </a>
23
23
  </div>
24
- <div class=level-item>
24
+ <div class="level-item">
25
25
  <a class="button is-link"
26
26
  @click="writeConfig">
27
27
  <span class="is-hidden-mobile">
@@ -49,10 +49,10 @@ library.add([faSave, faSlidersH]);
49
49
  export default {
50
50
  name: 'Edit',
51
51
 
52
- inject: ['errorHandler', 'i18n', 'route', 'toastr'],
53
-
54
52
  components: { EnsoForm },
55
53
 
54
+ inject: ['errorHandler', 'i18n', 'route', 'routerErrorHandler', 'toastr'],
55
+
56
56
  data: () => ({
57
57
  ready: false,
58
58
  }),
@@ -61,7 +61,7 @@ export default {
61
61
  writeConfig() {
62
62
  axios.post(this.route(
63
63
  'system.roles.permissions.write',
64
- this.$refs.form.routeParam('role')
64
+ this.$refs.form.routeParam('role'),
65
65
  )).then(({ data }) => this.toastr.success(data.message))
66
66
  .catch(this.errorHandler);
67
67
  },
@@ -1,7 +1,10 @@
1
1
  <template>
2
2
  <enso-table class="box is-paddingless raises-on-hover"
3
3
  id="roles"
4
- @configure-role="redirect"
4
+ @configure-role="$router.push({
5
+ name: 'system.roles.configure',
6
+ params: { role: $event.id },
7
+ }).catch(routerErrorHandler)"
5
8
  @write-config-file="toastr.success($event.message)"/>
6
9
  </template>
7
10
 
@@ -17,15 +20,6 @@ export default {
17
20
 
18
21
  components: { EnsoTable },
19
22
 
20
- inject: ['toastr'],
21
-
22
- methods: {
23
- redirect($event) {
24
- this.$router.push({
25
- name: 'system.roles.configure',
26
- params: { role: $event.id },
27
- });
28
- },
29
- },
23
+ inject: ['routerErrorHandler', 'toastr'],
30
24
  };
31
25
  </script>