@fishawack/lab-velocity 2.0.0-beta.7 → 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.
Files changed (3) hide show
  1. package/README.md +149 -38
  2. package/_defaults.scss +2 -2
  3. package/package.json +1 -2
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
- ### Auth Module
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
- Frontend files to to work with the Hydrate Module.
48
+ ##### router.js
22
49
 
23
- #### Installation
50
+ ```js
51
+ import { Auth } from "@fishawack/lab-velocity";
52
+ import store from "./store.js";
24
53
 
25
- ##### Import Axios File
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
- import axios from "axios";
28
- import "@fishawack/lab-velocity/AuthModule/js/AuthAxios.js";
66
+ [
67
+ // ... other routes
29
68
 
30
- ##### Import Routes File
69
+ // End user routes for login, register, chang password etc
70
+ ...Auth.Router.routes(node),
31
71
 
32
- Inside Router.js file
33
- import { authRoutes, configureRoutes } from "@fishawack/lab-velocity/AuthModule/js/AuthRoutes";
72
+ // Admin routes for headless login & managing users & companies
73
+ ...Auth.Router.adminRoutes(node),
34
74
 
35
- let routes = require("./routes.js")(null, store).concat(authRoutes(null,store,store.state.auth.authBase));
36
- Add routes to createRouter call
75
+ // ... wildcard 404 routes etc
76
+ ];
77
+ ```
78
+
79
+ ### Configure store
37
80
 
38
- add method call after createRouter
39
- configureRoutes(router);
81
+ ##### store.js
40
82
 
41
- ##### Import Store
83
+ ```js
84
+ import { Auth } from "@fishawack/lab-velocity";
42
85
 
43
- import AuthStore from "@fishawack/lab-velocity/AuthModule/js/AuthStore.js";
44
- Inside createStore method add
45
- modules: {
46
- auth: AuthStore
47
- },
48
- Inside VuexPersistedState add
49
- paths:["auth"]
86
+ // Call in store
87
+ {
88
+ plugins: [
89
+ VuexPersistedState({
90
+ // ...
91
+ paths: ["auth.user"],
92
+ }),
93
+ ],
50
94
 
51
- At bottom of file set
52
- window.store = store;
95
+ modules: {
96
+ auth: Auth.Store,
97
+ },
53
98
 
54
- ##### SVGS
99
+ // ...
100
+ }
101
+ ```
55
102
 
56
- Ensure Content has Velocity pulled in
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
- ##### ENV VARS
105
+ For the **admin only** you should replace the two references to variables & defaults with @fishawack/lab-velocity ones.
64
106
 
65
- HYDRATE_LOGO=example-logo
107
+ #### \_variables.scss
66
108
 
67
- HYDRATE_LOGO=example-logo(No Default set, name of svg logo to display on page)
68
- HYDRATE_REDIRECT=(Default index if not configured)
69
- HYDRATE_CONTACT=(Default mailto:EP@avalerehealth, Email for contact us button)
109
+ ```sass
110
+ @import "@fishawack/lab-velocity/variables";
111
+
112
+ // Set global variables here, e.g $color6: red;
113
+ ```
70
114
 
71
- ##### Verify dependencies are installed
115
+ #### \_defaults.scss
72
116
 
73
- Axios
74
- form-backend-validation
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
+ ```
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: $color6 !default;
9
- $fontFamily: $primaryFont, sans-serif !default;
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.7",
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"