@enso-ui/tutorials 5.0.0 → 5.2.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 +1 -1
- package/README.md +1 -1
- package/package.json +10 -21
- package/src/bulma/components/settings/Tutorial.vue +15 -10
- package/src/bulma/pages/tutorials/Create.vue +1 -1
- package/src/bulma/pages/tutorials/Edit.vue +1 -1
- package/src/bulma/pages/tutorials/Index.vue +2 -2
- package/src/bulma/register.js +3 -2
- package/src/bulma/routes/system/tutorials.js +1 -1
- package/src/bulma/routes/system.js +1 -1
- package/src/core/components/settings/Tutorial.vue +38 -13
package/LICENSE
CHANGED
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enso-ui/tutorials",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Basic tutorials package",
|
|
5
5
|
"main": "src/bulma/pages/tutorials/Index.vue",
|
|
6
6
|
"scripts": {
|
|
@@ -15,31 +15,20 @@
|
|
|
15
15
|
"vue"
|
|
16
16
|
],
|
|
17
17
|
"author": "Adrian Ocneanu <aocneanu@gmail.com>",
|
|
18
|
-
"license": "
|
|
18
|
+
"license": "MIT",
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/enso-ui/tutorials/issues"
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/enso-ui/tutorials#readme",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@enso-ui/forms": "^
|
|
25
|
-
"@enso-ui/tables": "^
|
|
26
|
-
"@enso-ui/ui": "^
|
|
27
|
-
"@fortawesome/fontawesome-svg-core": "^
|
|
28
|
-
"@fortawesome/free-solid-svg-icons": "^
|
|
29
|
-
"@fortawesome/
|
|
30
|
-
"@fortawesome/vue-fontawesome": "3.0.0-5",
|
|
24
|
+
"@enso-ui/forms": "^4.0.0",
|
|
25
|
+
"@enso-ui/tables": "^4.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",
|
|
31
30
|
"driver.js": "^0.9.8",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
},
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@vue/cli-plugin-babel": "5.0.0-beta.6",
|
|
37
|
-
"@vue/cli-plugin-eslint": "5.0.0-beta.6",
|
|
38
|
-
"@vue/eslint-config-airbnb": "^5.0.0",
|
|
39
|
-
"autoprefixer": "^9.6.1",
|
|
40
|
-
"babel-eslint": "^10.0.1",
|
|
41
|
-
"eslint-plugin-vue": "^8.0.0",
|
|
42
|
-
"eslint": "^7.0.0",
|
|
43
|
-
"eslint-import-resolver-alias": "^1.1.2"
|
|
31
|
+
"pinia": "^3.0.3",
|
|
32
|
+
"vue": "^3.0"
|
|
44
33
|
}
|
|
45
34
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="level is-mobile">
|
|
2
|
+
<div class="level is-mobile tutorial-setting">
|
|
3
3
|
<div class="level-left">
|
|
4
|
-
<div class="level-item">
|
|
4
|
+
<div class="level-item m-0 is-flex is-align-items-center">
|
|
5
5
|
{{ i18n('Tutorial') }}
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
8
8
|
<div class="level-right">
|
|
9
|
-
<div class="level-item">
|
|
9
|
+
<div class="level-item m-0 is-flex is-align-items-center">
|
|
10
10
|
<core-tutorial>
|
|
11
11
|
<template #default="{ itemEvents }">
|
|
12
|
-
<a class="button is-naked"
|
|
12
|
+
<a class="button is-small is-naked p-0 is-flex is-align-items-center is-justify-content-center"
|
|
13
13
|
v-on="itemEvents">
|
|
14
|
-
<span class="icon is-small">
|
|
15
|
-
<fa icon="
|
|
14
|
+
<span class="icon is-small m-0 is-flex is-align-items-center is-justify-content-center">
|
|
15
|
+
<fa :icon="faQuestion"/>
|
|
16
16
|
</span>
|
|
17
17
|
</a>
|
|
18
18
|
</template>
|
|
@@ -24,21 +24,26 @@
|
|
|
24
24
|
|
|
25
25
|
<script>
|
|
26
26
|
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
27
|
-
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
28
27
|
import { faQuestion } from '@fortawesome/free-solid-svg-icons';
|
|
29
28
|
import CoreTutorial from '../../../core/components/settings/Tutorial.vue';
|
|
30
29
|
|
|
31
|
-
library.add(faQuestion);
|
|
32
|
-
|
|
33
30
|
export default {
|
|
34
31
|
name: 'Tutorial',
|
|
35
32
|
|
|
36
33
|
components: { CoreTutorial, Fa },
|
|
37
34
|
|
|
38
35
|
inject: ['i18n'],
|
|
36
|
+
|
|
37
|
+
data: () => ({
|
|
38
|
+
faQuestion,
|
|
39
|
+
}),
|
|
39
40
|
};
|
|
40
41
|
</script>
|
|
41
42
|
|
|
42
43
|
<style lang="scss">
|
|
43
|
-
@import '
|
|
44
|
+
@import 'driver.js/dist/driver.min.css';
|
|
45
|
+
|
|
46
|
+
.tutorial-setting .svg-inline--fa {
|
|
47
|
+
vertical-align: 0;
|
|
48
|
+
}
|
|
44
49
|
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<enso-table class="box
|
|
2
|
+
<enso-table class="box p-0"
|
|
3
3
|
id="tutorials">
|
|
4
4
|
<template #placement="{ column, row }">
|
|
5
|
-
<span class="tag is-
|
|
5
|
+
<span class="tag is-info">
|
|
6
6
|
{{ column.enum._get(row.placement) }}
|
|
7
7
|
</span>
|
|
8
8
|
</template>
|
package/src/bulma/register.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import routeImporter from '@enso-ui/ui/src/modules/importers/routeImporter';
|
|
2
2
|
|
|
3
|
-
const routes = routeImporter(
|
|
3
|
+
const routes = routeImporter.fromGlob(import.meta.glob('./tutorials/*.js', { eager: true }));
|
|
4
4
|
const Router = () => import('@enso-ui/ui/src/bulma/pages/Router.vue');
|
|
5
5
|
|
|
6
6
|
export default {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import routeImporter from '@enso-ui/ui/src/modules/importers/routeImporter';
|
|
2
2
|
|
|
3
|
-
const routes = routeImporter(
|
|
3
|
+
const routes = routeImporter.fromGlob(import.meta.glob('./system/*.js', { eager: true }));
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
path: '/system',
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { getActivePinia } from 'pinia';
|
|
3
|
+
|
|
4
|
+
const useStore = id => {
|
|
5
|
+
const store = getActivePinia()?._s?.get(id);
|
|
6
|
+
|
|
7
|
+
if (!store) {
|
|
8
|
+
throw new Error(`Missing Pinia store: ${id}`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return store;
|
|
12
|
+
};
|
|
4
13
|
|
|
5
14
|
export default {
|
|
6
15
|
name: 'Tutorial',
|
|
@@ -19,19 +28,35 @@ export default {
|
|
|
19
28
|
},
|
|
20
29
|
},
|
|
21
30
|
|
|
22
|
-
data:
|
|
23
|
-
driver:
|
|
24
|
-
animate: false,
|
|
25
|
-
doneBtnText: v.i18n(v.labels.done),
|
|
26
|
-
closeBtnText: v.i18n(v.labels.close),
|
|
27
|
-
nextBtnText: v.i18n(v.labels.next),
|
|
28
|
-
prevBtnText: v.i18n(v.labels.previous),
|
|
29
|
-
}),
|
|
31
|
+
data: () => ({
|
|
32
|
+
driver: null,
|
|
30
33
|
}),
|
|
31
34
|
|
|
32
35
|
methods: {
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
async resolveDriver() {
|
|
37
|
+
if (this.driver) {
|
|
38
|
+
return this.driver;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const module = await import('driver.js');
|
|
42
|
+
const Driver = module.default?.default
|
|
43
|
+
?? module.default
|
|
44
|
+
?? module.Driver
|
|
45
|
+
?? module;
|
|
46
|
+
|
|
47
|
+
this.driver = new Driver({
|
|
48
|
+
animate: false,
|
|
49
|
+
doneBtnText: this.i18n(this.labels.done),
|
|
50
|
+
closeBtnText: this.i18n(this.labels.close),
|
|
51
|
+
nextBtnText: this.i18n(this.labels.next),
|
|
52
|
+
prevBtnText: this.i18n(this.labels.previous),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
return this.driver;
|
|
56
|
+
},
|
|
57
|
+
async fetch() {
|
|
58
|
+
await this.resolveDriver();
|
|
59
|
+
|
|
35
60
|
this.http.get(this.route('system.tutorials.load'), {
|
|
36
61
|
params: { route: this.$route.name },
|
|
37
62
|
}).then(({ data }) => this.start(data))
|
|
@@ -42,7 +67,7 @@ export default {
|
|
|
42
67
|
return;
|
|
43
68
|
}
|
|
44
69
|
|
|
45
|
-
|
|
70
|
+
useStore('layout').toggleSettings();
|
|
46
71
|
this.driver.defineSteps(this.localise(steps));
|
|
47
72
|
this.driver.start();
|
|
48
73
|
},
|