@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 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
+ ```
@@ -34,7 +34,7 @@ export default {
34
34
  },
35
35
  type: {
36
36
  type: String,
37
- default: null,
37
+ default: "default",
38
38
  },
39
39
  name: {
40
40
  type: String,
@@ -159,8 +159,8 @@ export default {
159
159
  type: Function,
160
160
  },
161
161
  method: {
162
- required: true,
163
162
  type: String,
163
+ default: "post",
164
164
  },
165
165
  },
166
166
 
@@ -2,7 +2,7 @@
2
2
  <template>
3
3
  <form class="" @submit.prevent="submit">
4
4
  <template v-if="method !== 'patch'">
5
- <el-basic
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
- <el-basic
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
- <el-basic
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
- <el-basic
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
@@ -3,4 +3,3 @@
3
3
  @import "element-plus/theme-chalk/el-message";
4
4
  @import "element-plus/theme-chalk/el-notification";
5
5
  @import "element-plus/theme-chalk/el-overlay";
6
- @import "./components/input.scss";
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.6",
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"
File without changes