@fishawack/lab-velocity 2.0.0-beta.6 → 2.0.0-beta.8
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/README.md +149 -38
- package/_Build/vue/components/basic/Button.vue +1 -1
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/partials/form.vue +1 -1
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/partials/form.vue +7 -6
- package/_base.scss +0 -1
- package/_defaults.scss +2 -2
- package/package.json +1 -2
- package/components/_input.scss +0 -0
package/README.md
CHANGED
|
@@ -10,65 +10,176 @@ Prevent code repetition.
|
|
|
10
10
|
|
|
11
11
|
## Getting started
|
|
12
12
|
|
|
13
|
+
### Requirements
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
"vue": "^3.3.4",
|
|
17
|
+
"vue-router": "^4.2.4",
|
|
18
|
+
"vuex": "^4.1.0",
|
|
19
|
+
"vuex-persistedstate": "^4.1.0"
|
|
20
|
+
"vue-loader": "^17.2.2"
|
|
21
|
+
```
|
|
22
|
+
|
|
13
23
|
### Install
|
|
14
24
|
|
|
15
25
|
```bash
|
|
16
26
|
npm install @fishawack/lab-velocity
|
|
17
27
|
```
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
## Hydrate Views
|
|
30
|
+
|
|
31
|
+
Frontend & Admin files to work with the Hydrate Module including routes, store, axios and components.
|
|
32
|
+
|
|
33
|
+
### Installation
|
|
34
|
+
|
|
35
|
+
### Configure axios
|
|
36
|
+
|
|
37
|
+
##### script.js
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
import { Auth } from "@fishawack/lab-velocity";
|
|
41
|
+
|
|
42
|
+
// Call in your boot method
|
|
43
|
+
Auth.Axios.setAxiosDefaults(process.env.APP_URL, router);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Configure router
|
|
20
47
|
|
|
21
|
-
|
|
48
|
+
##### router.js
|
|
22
49
|
|
|
23
|
-
|
|
50
|
+
```js
|
|
51
|
+
import { Auth } from "@fishawack/lab-velocity";
|
|
52
|
+
import store from "./store.js";
|
|
24
53
|
|
|
25
|
-
|
|
54
|
+
Auth.Router.beforeEach(router, store);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Configure routes
|
|
58
|
+
|
|
59
|
+
There are two different set of routes for the admin and the frontend.
|
|
60
|
+
|
|
61
|
+
##### routes.js
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
import { Auth } from "@fishawack/lab-velocity";
|
|
26
65
|
|
|
27
|
-
|
|
28
|
-
|
|
66
|
+
[
|
|
67
|
+
// ... other routes
|
|
29
68
|
|
|
30
|
-
|
|
69
|
+
// End user routes for login, register, chang password etc
|
|
70
|
+
...Auth.Router.routes(node),
|
|
31
71
|
|
|
32
|
-
|
|
33
|
-
|
|
72
|
+
// Admin routes for headless login & managing users & companies
|
|
73
|
+
...Auth.Router.adminRoutes(node),
|
|
34
74
|
|
|
35
|
-
|
|
36
|
-
|
|
75
|
+
// ... wildcard 404 routes etc
|
|
76
|
+
];
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Configure store
|
|
37
80
|
|
|
38
|
-
|
|
39
|
-
configureRoutes(router);
|
|
81
|
+
##### store.js
|
|
40
82
|
|
|
41
|
-
|
|
83
|
+
```js
|
|
84
|
+
import { Auth } from "@fishawack/lab-velocity";
|
|
42
85
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
86
|
+
// Call in store
|
|
87
|
+
{
|
|
88
|
+
plugins: [
|
|
89
|
+
VuexPersistedState({
|
|
90
|
+
// ...
|
|
91
|
+
paths: ["auth.user"],
|
|
92
|
+
}),
|
|
93
|
+
],
|
|
50
94
|
|
|
51
|
-
|
|
52
|
-
|
|
95
|
+
modules: {
|
|
96
|
+
auth: Auth.Store,
|
|
97
|
+
},
|
|
53
98
|
|
|
54
|
-
|
|
99
|
+
// ...
|
|
100
|
+
}
|
|
101
|
+
```
|
|
55
102
|
|
|
56
|
-
|
|
57
|
-
{
|
|
58
|
-
"lftp": "ftp-fishawack.egnyte.com",
|
|
59
|
-
"location": "Shared/FW/Knutsford/Digital/Auto-Content/Lab/Velocity"
|
|
60
|
-
}
|
|
61
|
-
Copy out the svg folder contents into the svg files within vue.
|
|
103
|
+
### Base Styles (admin)
|
|
62
104
|
|
|
63
|
-
|
|
105
|
+
For the **admin only** you should replace the two references to variables & defaults with @fishawack/lab-velocity ones.
|
|
64
106
|
|
|
65
|
-
|
|
107
|
+
#### \_variables.scss
|
|
66
108
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
109
|
+
```sass
|
|
110
|
+
@import "@fishawack/lab-velocity/variables";
|
|
111
|
+
|
|
112
|
+
// Set global variables here, e.g $color6: red;
|
|
113
|
+
```
|
|
70
114
|
|
|
71
|
-
|
|
115
|
+
#### \_defaults.scss
|
|
72
116
|
|
|
73
|
-
|
|
74
|
-
|
|
117
|
+
```sass
|
|
118
|
+
@use "variables";
|
|
119
|
+
@import "@fishawack/lab-velocity/defaults";
|
|
120
|
+
|
|
121
|
+
$colors: variables.dynamic("color", module-variables("variables"));
|
|
122
|
+
|
|
123
|
+
// Override lab-ui defaults here, e.g $button: $color6;
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Route Styles
|
|
127
|
+
|
|
128
|
+
There are two different set of sass imports for the admin and the frontend routes.
|
|
129
|
+
|
|
130
|
+
#### Frontend
|
|
131
|
+
|
|
132
|
+
```sass
|
|
133
|
+
// vendor.scss
|
|
134
|
+
|
|
135
|
+
@import
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
#### Admin
|
|
139
|
+
|
|
140
|
+
##### vendor.scss
|
|
141
|
+
|
|
142
|
+
```sass
|
|
143
|
+
// Vendor imports / Lab-ui imports
|
|
144
|
+
@import "@fishawack/lab-ui/typography";
|
|
145
|
+
@import "@fishawack/lab-ui/grid";
|
|
146
|
+
@import "@fishawack/lab-ui/utilities";
|
|
147
|
+
|
|
148
|
+
// Lab velocity
|
|
149
|
+
@import "@fishawack/lab-velocity/base";
|
|
150
|
+
@import "@fishawack/lab-velocity/components/pageTitle";
|
|
151
|
+
@import "@fishawack/lab-velocity/components/breadcrumbs";
|
|
152
|
+
@import "@fishawack/lab-velocity/components/table";
|
|
153
|
+
@import "@fishawack/lab-velocity/components/icon";
|
|
154
|
+
@import "@fishawack/lab-velocity/components/basic";
|
|
155
|
+
@import "@fishawack/lab-velocity/components/button";
|
|
156
|
+
@import "@fishawack/lab-velocity/components/form";
|
|
157
|
+
@import "@fishawack/lab-velocity/components/checkbox";
|
|
158
|
+
@import "@fishawack/lab-velocity/components/select";
|
|
159
|
+
@import "@fishawack/lab-velocity/components/loader";
|
|
160
|
+
@import "@fishawack/lab-velocity/components/permissionLegend";
|
|
161
|
+
@import "@fishawack/lab-velocity/components/chip";
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Icons
|
|
165
|
+
|
|
166
|
+
Ensure Content has Velocity pulled in & copy out the svg folder contents into the svg files within vue.
|
|
167
|
+
|
|
168
|
+
```json
|
|
169
|
+
{
|
|
170
|
+
"lftp": "ftp-fishawack.egnyte.com",
|
|
171
|
+
"location": "Shared/FW/Knutsford/Digital/Auto-Content/Lab/Velocity"
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### ENV VARS (frontend)
|
|
176
|
+
|
|
177
|
+
```env
|
|
178
|
+
# Required
|
|
179
|
+
HYDRATE_LOGO=example-logo
|
|
180
|
+
|
|
181
|
+
# Descriptions
|
|
182
|
+
HYDRATE_LOGO Name of svg logo to display on page
|
|
183
|
+
HYDRATE_REDIRECT Default index if not configured
|
|
184
|
+
HYDRATE_CONTACT Default mailto:EP@avalerehealth, Email for contact us button
|
|
185
|
+
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<form class="" @submit.prevent="submit">
|
|
4
4
|
<template v-if="method !== 'patch'">
|
|
5
|
-
<
|
|
5
|
+
<VelBasic
|
|
6
6
|
v-model="form.name"
|
|
7
7
|
name="name"
|
|
8
8
|
:error="form.errors"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
label="Name"
|
|
12
12
|
/>
|
|
13
13
|
|
|
14
|
-
<
|
|
14
|
+
<VelBasic
|
|
15
15
|
v-model="form.email"
|
|
16
16
|
placeholder="Email"
|
|
17
17
|
label="Email"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
label="Auto generate password"
|
|
44
44
|
/>
|
|
45
45
|
<template v-if="!form.set_password">
|
|
46
|
-
<
|
|
46
|
+
<VelBasic
|
|
47
47
|
v-model="form.password"
|
|
48
48
|
name="password"
|
|
49
49
|
:error="form.errors"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
placeholder="Password"
|
|
52
52
|
label="Password"
|
|
53
53
|
/>
|
|
54
|
-
<
|
|
54
|
+
<VelBasic
|
|
55
55
|
v-model="form.password_confirmation"
|
|
56
56
|
name="password_confirmation"
|
|
57
57
|
:error="form.errors"
|
|
@@ -67,7 +67,6 @@
|
|
|
67
67
|
<template v-if="$store.getters.can('edit roles')">
|
|
68
68
|
<template v-if="enableRoles">
|
|
69
69
|
<VelButton
|
|
70
|
-
type="secondary"
|
|
71
70
|
@click="
|
|
72
71
|
form.roles = [];
|
|
73
72
|
enableRoles = false;
|
|
@@ -98,6 +97,7 @@ import axios from "axios";
|
|
|
98
97
|
import { debounce } from "lodash";
|
|
99
98
|
import VelButton from "../../../../../../components/basic/Button.vue";
|
|
100
99
|
import VelCheckbox from "../../../../../../components/form/Checkbox.vue";
|
|
100
|
+
import VelBasic from "../../../../../../components/form/basic.vue";
|
|
101
101
|
|
|
102
102
|
export default {
|
|
103
103
|
components: {
|
|
@@ -105,6 +105,7 @@ export default {
|
|
|
105
105
|
FormRole: require("../../../../components/FormRole.vue").default,
|
|
106
106
|
VelCheckbox,
|
|
107
107
|
VelButton,
|
|
108
|
+
VelBasic,
|
|
108
109
|
},
|
|
109
110
|
props: {
|
|
110
111
|
form: {
|
|
@@ -116,8 +117,8 @@ export default {
|
|
|
116
117
|
type: Function,
|
|
117
118
|
},
|
|
118
119
|
method: {
|
|
119
|
-
required: true,
|
|
120
120
|
type: String,
|
|
121
|
+
default: "post",
|
|
121
122
|
},
|
|
122
123
|
},
|
|
123
124
|
|
package/_base.scss
CHANGED
package/_defaults.scss
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
$colors: variables.dynamic("color", module-variables("variables"));
|
|
6
6
|
|
|
7
7
|
// Override lab-ui defaults here, e.g $button: $color6;
|
|
8
|
-
$fontColor: $
|
|
9
|
-
$fontFamily: $primaryFont, sans-serif
|
|
8
|
+
$fontColor: $color1;
|
|
9
|
+
$fontFamily: $primaryFont, sans-serif;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fishawack/lab-velocity",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.8",
|
|
4
4
|
"description": "Avalere Health branded style system",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"setup": "npm ci || npm i && npm run content",
|
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
},
|
|
63
63
|
"files": [
|
|
64
64
|
"*.scss",
|
|
65
|
-
"modules",
|
|
66
65
|
"components",
|
|
67
66
|
"_Build/vue/components",
|
|
68
67
|
"_Build/vue/modules/AuthModule"
|
package/components/_input.scss
DELETED
|
File without changes
|