@fishawack/lab-velocity 1.11.0 → 2.0.0-beta.1

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 (95) hide show
  1. package/README.md +13 -7
  2. package/_base.scss +1 -1
  3. package/_defaults.scss +2 -3
  4. package/_variables.scss +16 -18
  5. package/components/_alert.scss +2 -2
  6. package/components/_basic.scss +5 -4
  7. package/components/_breadcrumbs.scss +7 -8
  8. package/components/_button.scss +11 -12
  9. package/components/_cascader.scss +1 -1
  10. package/components/_checkbox.scss +27 -26
  11. package/components/_chip.scss +24 -0
  12. package/components/_collapse.scss +2 -3
  13. package/components/_datepicker.scss +7 -6
  14. package/components/_footer.scss +1 -1
  15. package/components/_form.scss +6 -4
  16. package/components/_header.scss +4 -5
  17. package/components/_icon.scss +4 -3
  18. package/components/_inputNumber.scss +4 -3
  19. package/components/_link.scss +7 -7
  20. package/components/_loader.scss +3 -4
  21. package/components/_menu.scss +22 -22
  22. package/components/_pageTitle.scss +3 -3
  23. package/components/_permissionLegend.scss +18 -0
  24. package/components/_select.scss +3 -2
  25. package/components/_sidebar.scss +5 -6
  26. package/components/_switch.scss +2 -2
  27. package/components/_table.scss +3 -3
  28. package/components/_tooltip.scss +2 -2
  29. package/components/_typography.scss +71 -62
  30. package/components/_upload.scss +1 -1
  31. package/components/_wysiwyg.scss +3 -2
  32. package/components/_wysiwyg2.scss +37 -31
  33. package/general.scss +1 -2
  34. package/index.js +38 -30
  35. package/modules/_AuthModule.scss +32 -29
  36. package/modules/_AuthVariables.scss +3 -3
  37. package/modules/_modal.scss +3 -3
  38. package/package.json +109 -102
  39. package/vendor.scss +2 -2
  40. package/AuthModule/components/AuthModal.vue +0 -110
  41. package/AuthModule/components/VPasswordValidation.vue +0 -66
  42. package/AuthModule/js/AuthAxios.js +0 -59
  43. package/AuthModule/js/AuthRoutes.js +0 -186
  44. package/AuthModule/js/AuthStore.js +0 -99
  45. package/AuthModule/js/FakeAPI.js +0 -84
  46. package/AuthModule/routes/account-exists.vue +0 -35
  47. package/AuthModule/routes/change-password.vue +0 -162
  48. package/AuthModule/routes/container.vue +0 -38
  49. package/AuthModule/routes/expired-reset.vue +0 -76
  50. package/AuthModule/routes/expired-verification.vue +0 -100
  51. package/AuthModule/routes/force-reset.vue +0 -142
  52. package/AuthModule/routes/forgot.vue +0 -87
  53. package/AuthModule/routes/login.vue +0 -138
  54. package/AuthModule/routes/logincallback.vue +0 -46
  55. package/AuthModule/routes/loginheadless.vue +0 -16
  56. package/AuthModule/routes/loginsso.vue +0 -127
  57. package/AuthModule/routes/logout.vue +0 -21
  58. package/AuthModule/routes/register.vue +0 -151
  59. package/AuthModule/routes/reset.vue +0 -123
  60. package/AuthModule/routes/success-forgot.vue +0 -117
  61. package/AuthModule/routes/success-reset.vue +0 -35
  62. package/AuthModule/routes/success-verify.vue +0 -29
  63. package/AuthModule/routes/verify.vue +0 -110
  64. package/Icon.vue +0 -33
  65. package/Svg.vue +0 -40
  66. package/basic/Button.vue +0 -111
  67. package/basic/link.vue +0 -63
  68. package/form/Cascader.vue +0 -85
  69. package/form/Checkbox.vue +0 -39
  70. package/form/CheckboxGroup.vue +0 -69
  71. package/form/DatePicker.vue +0 -100
  72. package/form/InputNumber.vue +0 -90
  73. package/form/Select.vue +0 -110
  74. package/form/Switch.vue +0 -63
  75. package/form/Upload.vue +0 -103
  76. package/form/Wysiwyg.vue +0 -127
  77. package/form/Wysiwyg2.vue +0 -278
  78. package/form/basic.vue +0 -88
  79. package/form/color.vue +0 -22
  80. package/form/file.vue +0 -89
  81. package/form/input.js +0 -79
  82. package/form/input.vue +0 -85
  83. package/layout/Alert.vue +0 -38
  84. package/layout/Footer.vue +0 -35
  85. package/layout/Header.vue +0 -15
  86. package/layout/Loader.vue +0 -39
  87. package/layout/Tooltip.vue +0 -46
  88. package/layout/pageTitle.vue +0 -18
  89. package/layout/sideBar.vue +0 -27
  90. package/navigation/Breadcrumbs.vue +0 -32
  91. package/navigation/BreadcrumbsItem.vue +0 -19
  92. package/navigation/Menu.vue +0 -16
  93. package/navigation/MenuItem.vue +0 -20
  94. package/navigation/MenuItemGroup.vue +0 -20
  95. package/navigation/SubMenu.vue +0 -20
@@ -11,7 +11,8 @@
11
11
  background-color: black;
12
12
  height: 100vh;
13
13
  width: 100%;
14
- background: url('../media/content/images/hero-auth-background-desktop.jpg') center top no-repeat;
14
+ background: url("../media/content/images/hero-auth-background-desktop.jpg")
15
+ center top no-repeat;
15
16
  background-size: cover;
16
17
  z-index: 10;
17
18
 
@@ -19,11 +20,13 @@
19
20
  width: 13.3rem;
20
21
  z-index: 99;
21
22
  }
22
- @include breakpoint (max-width $tabletMax) {
23
- background: url('../media/content/images/hero-auth-background-tablet.jpg') center top no-repeat;
23
+ @include breakpoint(max-width $tabletMax) {
24
+ background: url("../media/content/images/hero-auth-background-tablet.jpg")
25
+ center top no-repeat;
24
26
  }
25
- @include breakpoint (max-width $mobileMax) {
26
- background: url('../media/content/images/hero-auth-background-mobile.jpg') center top no-repeat;
27
+ @include breakpoint(max-width $mobileMax) {
28
+ background: url("../media/content/images/hero-auth-background-mobile.jpg")
29
+ center top no-repeat;
27
30
  }
28
31
  }
29
32
 
@@ -38,7 +41,7 @@
38
41
  padding: 48px 40px 40px;
39
42
  z-index: 1;
40
43
 
41
- @include breakpoint (max-width $mobileMax) {
44
+ @include breakpoint(max-width $mobileMax) {
42
45
  top: 84px;
43
46
  transform: translate(-50%, 0);
44
47
  padding: 24px;
@@ -49,7 +52,8 @@
49
52
  }
50
53
  }
51
54
 
52
- h2, .h2 {
55
+ h2,
56
+ .h2 {
53
57
  line-height: 50px;
54
58
  font-size: 48px;
55
59
  }
@@ -82,7 +86,7 @@
82
86
  width: 200px;
83
87
  padding: 9px 23.5px;
84
88
  font-size: 14px;
85
- @include breakpoint (max-width $mobileMax) {
89
+ @include breakpoint(max-width $mobileMax) {
86
90
  max-width: unset;
87
91
  width: 100%;
88
92
  }
@@ -96,7 +100,7 @@
96
100
  }
97
101
  }
98
102
  .form__input.error {
99
- border:none;
103
+ border: none;
100
104
  .el-input__wrapper {
101
105
  border: 0.4px solid red;
102
106
  }
@@ -119,28 +123,29 @@
119
123
  color: rgba($color1, 0.5);
120
124
  }
121
125
  .vel-basic__textbox {
122
- --el-border-color:#CFD8DD;
123
- --el-input-text-color :#666666;
124
- --el-input-focus-border-color:#CFD8DD;
125
- --el-input-hover-border-color:#CFD8DD;
126
+ --el-border-color: #cfd8dd;
127
+ --el-input-text-color: #666666;
128
+ --el-input-focus-border-color: #cfd8dd;
129
+ --el-input-hover-border-color: #cfd8dd;
126
130
  font-size: 14px;
127
131
  padding-bottom: $am-spacing * 2.5;
128
132
  .el-input__inner {
129
- --el-input-inner-height:38px;
133
+ --el-input-inner-height: 38px;
130
134
  }
131
135
  }
132
136
  .el-button--primary {
133
- --el-button-text-color:#ffffff;
137
+ --el-button-text-color: #ffffff;
134
138
  }
135
- input, input:focus {
139
+ input,
140
+ input:focus {
136
141
  @extend .el-input__inner;
137
142
  }
138
143
  }
139
144
 
140
145
  .AuthModule__logo__container {
141
146
  position: absolute;
142
- top:48px;
143
- left:0%;
147
+ top: 48px;
148
+ left: 0%;
144
149
  }
145
150
  .AuthModule__logo {
146
151
  position: relative;
@@ -156,27 +161,25 @@
156
161
  height: 100%;
157
162
  }
158
163
 
159
-
160
- .AM-mb{
164
+ .AM-mb {
161
165
  margin-bottom: $am-spacing !important;
162
166
  }
163
- .AM-mt{
167
+ .AM-mt {
164
168
  margin-top: $am-spacing !important;
165
169
  }
166
- .AM-pb{
170
+ .AM-pb {
167
171
  padding-bottom: $am-spacing !important;
168
172
  }
169
- .AM-pt{
173
+ .AM-pt {
170
174
  padding-top: $am-spacing !important;
171
175
  }
172
176
  @for $i from 1 through 5 {
173
-
174
177
  .AM-mb-#{$i - 1} {
175
178
  margin-bottom: ($i - 1) * $am-spacing !important;
176
179
  }
177
180
 
178
181
  .AM-mb-#{$i - 1}\.5 {
179
- margin-bottom: ($i - .5) * $am-spacing !important;
182
+ margin-bottom: ($i - 0.5) * $am-spacing !important;
180
183
  }
181
184
 
182
185
  .AM-mt-#{$i - 1} {
@@ -184,7 +187,7 @@
184
187
  }
185
188
 
186
189
  .AM-mt-#{$i - 1}\.5 {
187
- margin-top: ($i - .5) * $am-spacing !important;
190
+ margin-top: ($i - 0.5) * $am-spacing !important;
188
191
  }
189
192
 
190
193
  .AM-pt-#{$i - 1} {
@@ -192,7 +195,7 @@
192
195
  }
193
196
 
194
197
  .AM-pt-#{$i - 1}\.5 {
195
- padding-top: ($i - .5) * $am-spacing !important;
198
+ padding-top: ($i - 0.5) * $am-spacing !important;
196
199
  }
197
200
 
198
201
  .AM-pb-#{$i - 1} {
@@ -200,10 +203,10 @@
200
203
  }
201
204
 
202
205
  .AM-pb-#{$i - 1}\.5 {
203
- padding-bottom: ($i - .5) * $am-spacing !important;
206
+ padding-bottom: ($i - 0.5) * $am-spacing !important;
204
207
  }
205
208
  }
206
209
 
207
210
  .AM-color-highlight {
208
211
  color: $am-highlight;
209
- }
212
+ }
@@ -1,7 +1,7 @@
1
1
  $am-spacing: 8px;
2
- $am-highlight: #3C976E;
2
+ $am-highlight: #3c976e;
3
3
 
4
4
  $color8: #f2f2f2; //Used
5
5
  $color10: #dcdbdb;
6
- $color12: #5C5C5C;
7
- $colorAlert: #D53A3A;
6
+ $color12: #5c5c5c;
7
+ $colorAlert: #d53a3a;
@@ -5,8 +5,8 @@
5
5
 
6
6
  transition: all 500ms ease-in-out;
7
7
 
8
- &::before{
9
- content: '';
8
+ &::before {
9
+ content: "";
10
10
  pointer-events: none;
11
11
  z-index: 0 !important;
12
12
  position: fixed;
@@ -21,4 +21,4 @@
21
21
  }
22
22
  .AuthModule__form.modal__box {
23
23
  position: absolute;
24
- }
24
+ }
package/package.json CHANGED
@@ -1,104 +1,111 @@
1
1
  {
2
- "name": "@fishawack/lab-velocity",
3
- "version": "1.11.0",
4
- "description": "Avalere Health branded style system",
5
- "scripts": {
6
- "setup": "npm ci || npm i && npm run content",
7
- "content": "npm run content --prefix node_modules/@fishawack/core/",
8
- "start": "npm run production && npm run story:dev",
9
- "start-modules": "npm start --prefix node_modules/@fishawack/core/",
10
- "production": "npm run production --prefix node_modules/@fishawack/core/ && npm run story:build",
11
- "test": "npm test --prefix node_modules/@fishawack/core/",
12
- "package": "npm run package --prefix node_modules/@fishawack/core/",
13
- "deploy": "npm run deploy --prefix node_modules/@fishawack/core/",
14
- "mail": "npm run mail --prefix node_modules/@fishawack/core/",
15
- "story:dev": "histoire dev",
16
- "story:build": "histoire build",
17
- "preversion": "cp -r _Build/sass/** ./ && cp -r _Build/vue/components/** ./ && cp -r _Build/vue/modules/AuthModule ./"
18
- },
19
- "license": "BSD-3-Clause",
20
- "author": {
21
- "name": "Fishawack",
22
- "url": "https://fishawack.com/"
23
- },
24
- "keywords": [
25
- "css",
26
- "components"
27
- ],
28
- "devDependencies": {
29
- "@fishawack/core": "^8.16.1",
30
- "@fishawack/lab-ui": "^12.5.0",
31
- "@histoire/plugin-vue": "^0.17.17",
32
- "@vitejs/plugin-vue": "^5.1.1",
33
- "histoire": "^0.17.17",
34
- "sass": "^1.77.8",
35
- "vite": "^5.3.5",
36
- "vite-svg-loader": "^5.1.0",
37
- "vue": "^3.4.34",
38
- "vue-loader": "^17.2.2",
39
- "vue-router": "^4.4.0",
40
- "vuex": "^4.1.0",
41
- "vuex-persistedstate": "^4.1.0",
42
- "form-backend-validation": "github:mikemellor11/form-backend-validation#master",
43
- "mitt": "^3.0.1"
44
- },
45
- "dependencies": {
46
- "@tiptap/extension-link": "^2.11.2",
47
- "@tiptap/extension-subscript": "^2.11.2",
48
- "@tiptap/extension-superscript": "^2.11.2",
49
- "@tiptap/extension-table": "^2.11.2",
50
- "@tiptap/extension-table-cell": "^2.11.2",
51
- "@tiptap/extension-table-header": "^2.11.2",
52
- "@tiptap/extension-table-row": "^2.11.2",
53
- "@tiptap/extension-underline": "^2.11.2",
54
- "@tiptap/pm": "^2.11.2",
55
- "@tiptap/starter-kit": "^2.11.2",
56
- "@tiptap/vue-3": "^2.11.2",
57
- "element-plus": "^2.7.8",
58
- "quill": "^1.3.7",
59
- "sanitize-html": "^2.13.1"
60
- },
61
- "files": [
62
- "*.scss",
63
- "*.vue",
64
- "form",
65
- "components",
66
- "layout",
67
- "navigation",
68
- "basic",
69
- "modules",
70
- "AuthModule"
71
- ],
72
- "main": "index.js",
73
- "release": {
74
- "plugins": [
75
- [
76
- "@semantic-release/commit-analyzer",
77
- {
78
- "preset": "conventionalcommits"
79
- }
80
- ],
81
- [
82
- "@semantic-release/release-notes-generator",
83
- {
84
- "preset": "conventionalcommits",
85
- "writerOpts": {
86
- "headerPartial": "### {{version}} ({{date}})\n",
87
- "mainTemplate": "{{> header}}\n{{#each commitGroups}}\n\n{{#if title}}\n#### {{title}}\n\n{{/if}}\n{{#each commits}}\n{{> commit root=@root}}\n{{/each}}\n{{/each}}"
88
- },
89
- "presetConfig": {
90
- "commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commits/{{hash}}"
91
- }
92
- }
93
- ],
94
- [
95
- "@semantic-release/changelog",
96
- {
97
- "changelogTitle": "## Changelog"
98
- }
99
- ],
100
- "@semantic-release/npm",
101
- "@semantic-release/git"
102
- ]
103
- }
2
+ "name": "@fishawack/lab-velocity",
3
+ "version": "2.0.0-beta.1",
4
+ "description": "Avalere Health branded style system",
5
+ "scripts": {
6
+ "setup": "npm ci || npm i && npm run content",
7
+ "content": "npm run content --prefix node_modules/@fishawack/core/",
8
+ "start": "npm run production && npm run story:dev",
9
+ "start-modules": "npm start --prefix node_modules/@fishawack/core/",
10
+ "production": "npm run production --prefix node_modules/@fishawack/core/ && npm run story:build",
11
+ "test": "npm test --prefix node_modules/@fishawack/core/",
12
+ "package": "npm run package --prefix node_modules/@fishawack/core/",
13
+ "deploy": "npm run deploy --prefix node_modules/@fishawack/core/",
14
+ "mail": "npm run mail --prefix node_modules/@fishawack/core/",
15
+ "story:dev": "histoire dev",
16
+ "story:build": "histoire build",
17
+ "preversion": "cp -r _Build/sass/** ./"
18
+ },
19
+ "license": "BSD-3-Clause",
20
+ "author": {
21
+ "name": "Fishawack",
22
+ "url": "https://fishawack.com/"
23
+ },
24
+ "keywords": [
25
+ "css",
26
+ "components"
27
+ ],
28
+ "devDependencies": {
29
+ "@fishawack/core": "^8.16.1",
30
+ "@fishawack/lab-ui": "^12.5.0",
31
+ "@histoire/plugin-vue": "^0.17.17",
32
+ "@vitejs/plugin-vue": "^5.1.1",
33
+ "histoire": "^0.17.17",
34
+ "mitt": "^3.0.1",
35
+ "sass": "^1.77.8",
36
+ "vite": "^5.3.5",
37
+ "vite-svg-loader": "^5.1.0",
38
+ "vue": "^3.4.34",
39
+ "vue-loader": "^17.2.2",
40
+ "vue-router": "^4.4.0",
41
+ "vuex": "^4.1.0",
42
+ "vuex-persistedstate": "^4.1.0"
43
+ },
44
+ "dependencies": {
45
+ "@tiptap/extension-link": "^2.11.2",
46
+ "@tiptap/extension-subscript": "^2.11.2",
47
+ "@tiptap/extension-superscript": "^2.11.2",
48
+ "@tiptap/extension-table": "^2.11.2",
49
+ "@tiptap/extension-table-cell": "^2.11.2",
50
+ "@tiptap/extension-table-header": "^2.11.2",
51
+ "@tiptap/extension-table-row": "^2.11.2",
52
+ "@tiptap/extension-underline": "^2.11.2",
53
+ "@tiptap/pm": "^2.11.2",
54
+ "@tiptap/starter-kit": "^2.11.2",
55
+ "@tiptap/vue-3": "^2.11.2",
56
+ "axios": "^1.11.0",
57
+ "element-plus": "^2.7.8",
58
+ "form-backend-validation": "github:mikemellor11/form-backend-validation#master",
59
+ "lodash": "^4.17.21",
60
+ "quill": "^1.3.7",
61
+ "sanitize-html": "^2.13.1"
62
+ },
63
+ "files": [
64
+ "*.scss",
65
+ "*.vue",
66
+ "form",
67
+ "components",
68
+ "layout",
69
+ "navigation",
70
+ "basic",
71
+ "modules",
72
+ "AuthModule"
73
+ ],
74
+ "main": "index.js",
75
+ "release": {
76
+ "plugins": [
77
+ [
78
+ "@semantic-release/commit-analyzer",
79
+ {
80
+ "preset": "conventionalcommits"
81
+ }
82
+ ],
83
+ [
84
+ "@semantic-release/release-notes-generator",
85
+ {
86
+ "preset": "conventionalcommits",
87
+ "writerOpts": {
88
+ "headerPartial": "### {{version}} ({{date}})\n",
89
+ "mainTemplate": "{{> header}}\n{{#each commitGroups}}\n\n{{#if title}}\n#### {{title}}\n\n{{/if}}\n{{#each commits}}\n{{> commit root=@root}}\n{{/each}}\n{{/each}}"
90
+ },
91
+ "presetConfig": {
92
+ "commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commits/{{hash}}"
93
+ }
94
+ }
95
+ ],
96
+ [
97
+ "@semantic-release/changelog",
98
+ {
99
+ "changelogTitle": "## Changelog"
100
+ }
101
+ ],
102
+ "@semantic-release/npm",
103
+ [
104
+ "@semantic-release/git",
105
+ {
106
+ "message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
107
+ }
108
+ ]
109
+ ]
110
+ }
104
111
  }
package/vendor.scss CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  @import "normalize.css/normalize";
6
6
 
7
- #svgSprite{
7
+ #svgSprite {
8
8
  position: absolute;
9
9
  width: 0;
10
10
  height: 0;
@@ -19,4 +19,4 @@
19
19
  @import "@fishawack/lab-ui/_utilities.scss";
20
20
 
21
21
  // Element-plus base style
22
- @import "./_base.scss";
22
+ @import "./_base.scss";
@@ -1,110 +0,0 @@
1
- <template>
2
- <div :class="{'active': open}"
3
- class="modal modal--auth">
4
-
5
- <div class="modal__container"
6
- v-on:click.self="close">
7
-
8
- <div class="modal__box AuthModule__form" :class="boxCls">
9
- <component v-if="compName"
10
- :is="compName"
11
- v-bind="compProps"
12
- @close="close"
13
- />
14
- </div>
15
- </div>
16
-
17
- </div>
18
- </template>
19
-
20
- <script>
21
- "use strict";
22
-
23
- export default {
24
- name: "AuthModal",
25
-
26
- data() {
27
- return {
28
- open: false,
29
- compName: null,
30
- compProps: null,
31
- cb: null,
32
- boxCls: null,
33
- validComponents: {
34
- "force-reset" : 'VForceReset',
35
- "password-change" : 'VPasswordChange'
36
- }
37
- };
38
- },
39
-
40
- methods: {
41
- reset(){
42
- this.compName = null;
43
- this.compProps = null;
44
- this.boxCls = null;
45
- this.cb = null;
46
- },
47
- close() {
48
- if(this.compName === 'VForceReset') {
49
- if(!this.$store.state.auth.forcePasswordChange) {
50
- this.open = false;
51
- }
52
- } else {
53
- this.open = false;
54
- }
55
- }
56
- },
57
-
58
- created() {
59
- this.$emitter.on('AuthModal', (comp) => {
60
- this.compName = this.validComponents[comp.type];
61
- this.open = comp;
62
-
63
- });
64
-
65
- window.addEventListener('keydown', (e) => {
66
- if (e.key === 'Escape') {
67
- this.open = false;
68
- }
69
- });
70
- },
71
-
72
- watch: {
73
- open(isOpen) {
74
- this.$emitter.emit('toggleBackgroundScroll', isOpen);
75
-
76
- if(this.cb){
77
- this.cb();
78
- }
79
-
80
- if (!isOpen) {
81
- this.reset();
82
- }
83
- },
84
- '$route'(to,from) {
85
- if(from.fullPath !== to.fullPath) {
86
- this.open = false;
87
- }
88
- },
89
- '$store.state.auth.forcePasswordChange': {
90
- async handler(forcePasswordChange) {
91
- if(forcePasswordChange) {
92
- this.compName = this.validComponents["force-reset"];
93
- this.open = true;
94
- }
95
- }
96
- }
97
- },
98
-
99
- components: {
100
- VForceReset: require("../routes/force-reset.vue").default,
101
- VPasswordChange: require("../routes/change-password.vue").default,
102
- },
103
- mounted() {
104
- if(this.$store.state.auth.forcePasswordChange) {
105
- this.compName = this.validComponents["force-reset"];
106
- this.open = true;
107
- }
108
- }
109
- };
110
- </script>
@@ -1,66 +0,0 @@
1
- <template>
2
- <div class="">
3
- <p class="font-700 AM-mb-0.5">Your password must contain:</p>
4
- <p class="flex m-0">
5
- <GSvg name="icon-list-tick" embed artboard class="mr-0.5 icon icon--0.4 fill-7"
6
- v-if="passwordLengthValid" />
7
- <GSvg name="icon-list-tick" embed artboard class="mr-0.5 icon icon--0.4 fill-3" v-else />
8
- At least 8 characters
9
- </p>
10
- <p class="flex m-0">
11
- <GSvg name="icon-list-tick" embed artboard class="mr-0.5 icon icon--0.4 fill-7" v-if="hasLetter" />
12
- <GSvg name="icon-list-tick" embed artboard class="mr-0.5 icon icon--0.4 fill-3" v-else />
13
- At least one letter
14
- </p>
15
- <p class="flex AM-mt-0 ml-0 mr-0 AM-mb-3">
16
- <GSvg name="icon-list-tick" embed artboard class="mr-0.5 icon icon--0.4 fill-7" v-if="hasNumberOrSymbol" />
17
- <GSvg name="icon-list-tick" embed artboard class="mr-0.5 icon icon--0.4 fill-3" v-else />
18
- At least one number or symbol
19
- </p>
20
- </div>
21
- </template>
22
-
23
- <script>
24
-
25
- export default {
26
- props: {
27
- password: {
28
- type: String,
29
- default: '',
30
- },
31
- },
32
- computed: {
33
- passwordLengthValid() {
34
- return this.password?.length >= 8;
35
- },
36
- hasLetter() {
37
- return this.tests.letter.test(this.password);
38
- },
39
- hasNumberOrSymbol() {
40
- return this.tests.number.test(this.password) || this.tests.symbol.test(this.password);
41
- },
42
- passwordValid() {
43
- return this.passwordLengthValid && this.hasLetter && this.hasNumberOrSymbol;
44
- },
45
- },
46
- data() {
47
- return {
48
- tests: {
49
- letter: /[a-zA-Z]+/,
50
- number: /[0-9]+/,
51
- symbol: /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]+/,
52
- }
53
- };
54
- },
55
- watch: {
56
- password(newPassword) {
57
- this.$emit('passwordValid', this.passwordValid);
58
- },
59
- },
60
- methods: {
61
- },
62
- mounted() {
63
- this.$emit('passwordValid', this.passwordValid);
64
- },
65
- }
66
- </script>
@@ -1,59 +0,0 @@
1
- import axios from "axios";
2
-
3
- function setAxiosDefaults() {
4
- axios.defaults.baseURL = process.env.APP_URL;
5
- axios.defaults.withCredentials = true;
6
- axios.defaults.withXSRFToken = true;
7
-
8
- // Some libraries will utilize the globally available version of axios so make sure it's our exact axios instance
9
- window.axios = axios;
10
- }
11
-
12
- // Redirect to login page if 401
13
- axios.interceptors.response.use(null, (error) => {
14
- if (error.response) {
15
- if (error.response.status === 401) {
16
- store.commit("setAuth", false);
17
- window.router.push({ name: `${store.state.auth.authBase}.login` });
18
- }
19
-
20
- if (error.response.status === 404) {
21
- window.router.push({ name: "index" });
22
- }
23
- }
24
-
25
- return Promise.reject(error);
26
- });
27
-
28
- // Pull all paginated data
29
- axios.getAll = (url, options = {}) => {
30
- // eslint-disable-next-line no-async-promise-executor
31
- return new Promise(async (resolve, reject) => {
32
- try {
33
- const arr = { data: { data: [] } };
34
- let page = 0;
35
-
36
- // eslint-disable-next-line no-constant-condition
37
- while (true) {
38
- // eslint-disable-next-line no-await-in-loop
39
- const res = await axios.get(
40
- // eslint-disable-next-line no-plusplus
41
- `${url}${url.includes("?") ? "&" : "?"}page=${++page}`,
42
- options
43
- );
44
- arr.data.data = arr.data.data.concat(res.data.data);
45
- if (
46
- res.data.next_page_url === null ||
47
- (res.data.links && res.data.links.next === null)
48
- )
49
- break;
50
- }
51
-
52
- resolve(arr);
53
- } catch (e) {
54
- reject(e);
55
- }
56
- });
57
- };
58
-
59
- setAxiosDefaults();