@enso-ui/roles 4.0.10 → 5.1.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2018 laravel-enso
3
+ Copyright (c) 2026 laravel-enso
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -25,4 +25,4 @@ Thank you to all the people who already contributed to Enso!
25
25
 
26
26
  ## License
27
27
 
28
- [ISC](https://opensource.org/licenses/ISC)
28
+ MIT
package/package.json CHANGED
@@ -1,11 +1,8 @@
1
1
  {
2
2
  "name": "@enso-ui/roles",
3
- "version": "4.0.10",
3
+ "version": "5.1.0",
4
4
  "description": "Basic roles package",
5
- "main": "src/bulma/pages/roles/Index.vue",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
5
+ "main": "bulma/index.js",
9
6
  "repository": {
10
7
  "type": "git",
11
8
  "url": "git+https://github.com/enso-ui/roles.git"
@@ -15,33 +12,22 @@
15
12
  "vue"
16
13
  ],
17
14
  "author": "Adrian Ocneanu <aocneanu@gmail.com>",
18
- "license": "ISC",
15
+ "license": "MIT",
19
16
  "bugs": {
20
17
  "url": "https://github.com/enso-ui/roles/issues"
21
18
  },
22
19
  "homepage": "https://github.com/enso-ui/roles#readme",
23
20
  "dependencies": {
24
21
  "@enso-ui/checkbox": "^3.0",
25
- "@enso-ui/forms": "^3.0",
26
- "@enso-ui/permissions": "^4.0",
27
- "@enso-ui/tables": "^3.0",
22
+ "@enso-ui/forms": "^4.0.0",
23
+ "@enso-ui/permissions": "^5.0",
24
+ "@enso-ui/tables": "^4.0.0",
28
25
  "@enso-ui/transitions": "^2.0",
29
- "@enso-ui/ui": "^5.0",
30
- "@fortawesome/fontawesome-svg-core": "^1.2.2",
31
- "@fortawesome/free-solid-svg-icons": "^5.11.2",
32
- "@fortawesome/vue-fontawesome": "3.0.0-5",
33
- "vue": "^3.0",
34
- "vuex": "^4.0.0"
35
- },
36
- "devDependencies": {
37
- "@vue/cli-plugin-babel": "5.0.0-beta.6",
38
- "@vue/cli-plugin-eslint": "5.0.0-beta.6",
39
- "@vue/eslint-config-airbnb": "^5.0.0",
40
- "autoprefixer": "^9.6.1",
41
- "babel-eslint": "^10.0.1",
42
- "cross-env": "^6.0.0",
43
- "eslint": "^7.0.0",
44
- "eslint-import-resolver-alias": "^1.1.2",
45
- "eslint-plugin-vue": "^8.0.0"
26
+ "@enso-ui/ui": "^7.0.0",
27
+ "@fortawesome/fontawesome-svg-core": "^7.2.0",
28
+ "@fortawesome/free-solid-svg-icons": "^7.2.0",
29
+ "@fortawesome/vue-fontawesome": "3.1.3",
30
+ "pinia": "^3.0.3",
31
+ "vue": "^3.0"
46
32
  }
47
33
  }
@@ -51,9 +51,9 @@
51
51
 
52
52
  <script>
53
53
  import { Fade } from '@enso-ui/transitions';
54
- import { mapState } from 'vuex';
55
54
  import cssClass from '@enso-ui/permissions/src/bulma/modules/permission';
56
55
  import { CheckboxManager } from '@enso-ui/checkbox/bulma';
56
+ import { useStore } from '../../../utils/pinia';
57
57
 
58
58
  export default {
59
59
  name: 'Configure',
@@ -69,7 +69,9 @@ export default {
69
69
  }),
70
70
 
71
71
  computed: {
72
- ...mapState(['enums']),
72
+ enums() {
73
+ return useStore('enums').enums;
74
+ },
73
75
  },
74
76
 
75
77
  created() {
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="columns is-centered">
3
3
  <div class="column is-three-quarters-desktop is-full-touch">
4
- <enso-form class="box has-background-light raises-on-hover"/>
4
+ <enso-form class="box"/>
5
5
  </div>
6
6
  </div>
7
7
  </template>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="columns is-centered">
3
3
  <div class="column is-three-quarters-desktop is-full-touch">
4
- <enso-form class="box has-background-light raises-on-hover"
4
+ <enso-form class="box"
5
5
  @ready="ready = true"
6
6
  ref="form">
7
7
  <template #actions-left
@@ -16,7 +16,7 @@
16
16
  {{ i18n('Configure') }}
17
17
  </span>
18
18
  <span class="icon">
19
- <fa icon="sliders-h"/>
19
+ <fa :icon="faSliders"/>
20
20
  </span>
21
21
  <span class="is-hidden-mobile"/>
22
22
  </a>
@@ -28,7 +28,7 @@
28
28
  {{ i18n('File') }}
29
29
  </span>
30
30
  <span class="icon">
31
- <fa icon="save"/>
31
+ <fa :icon="faFloppyDisk"/>
32
32
  </span>
33
33
  <span class="is-hidden-mobile"/>
34
34
  </a>
@@ -41,12 +41,9 @@
41
41
 
42
42
  <script>
43
43
  import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
44
- import { library } from '@fortawesome/fontawesome-svg-core';
45
- import { faSave, faSlidersH } from '@fortawesome/free-solid-svg-icons';
44
+ import { faFloppyDisk, faSliders } from '@fortawesome/free-solid-svg-icons';
46
45
  import { EnsoForm } from '@enso-ui/forms/bulma';
47
46
 
48
- library.add(faSave, faSlidersH);
49
-
50
47
  export default {
51
48
  name: 'Edit',
52
49
 
@@ -57,6 +54,8 @@ export default {
57
54
  ],
58
55
 
59
56
  data: () => ({
57
+ faFloppyDisk,
58
+ faSliders,
60
59
  ready: false,
61
60
  }),
62
61
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <enso-table class="box is-paddingless raises-on-hover"
2
+ <enso-table class="box p-0"
3
3
  id="roles"
4
4
  @configure-role="$router.push({
5
5
  name: 'system.roles.configure',
@@ -9,12 +9,8 @@
9
9
  </template>
10
10
 
11
11
  <script>
12
- import { library } from '@fortawesome/fontawesome-svg-core';
13
- import { faSave, faSlidersH } from '@fortawesome/free-solid-svg-icons';
14
12
  import { EnsoTable } from '@enso-ui/tables/bulma';
15
13
 
16
- library.add([faSave, faSlidersH]);
17
-
18
14
  export default {
19
15
  name: 'Index',
20
16
 
@@ -1,6 +1,6 @@
1
1
  import routeImporter from '@enso-ui/ui/src/modules/importers/routeImporter';
2
2
 
3
- const routes = routeImporter(require.context('./roles', false, /.*\.js$/));
3
+ const routes = routeImporter.fromGlob(import.meta.glob('./roles/*.js', { eager: true }));
4
4
  const Router = () => import('@enso-ui/ui/src/bulma/pages/Router.vue');
5
5
 
6
6
 
@@ -1,6 +1,6 @@
1
1
  import routeImporter from '@enso-ui/ui/src/modules/importers/routeImporter';
2
2
 
3
- const routes = routeImporter(require.context('./system', false, /.*\.js$/));
3
+ const routes = routeImporter.fromGlob(import.meta.glob('./system/*.js', { eager: true }));
4
4
 
5
5
  export default {
6
6
  path: '/system',
@@ -0,0 +1,11 @@
1
+ import { getActivePinia } from 'pinia';
2
+
3
+ export const useStore = id => {
4
+ const store = getActivePinia()?._s?.get(id);
5
+
6
+ if (!store) {
7
+ throw new Error(`Missing Pinia store: ${id}`);
8
+ }
9
+
10
+ return store;
11
+ };