+
+
-
-
-
+
+
+
+
+
+
+
-
-
-
-
- Select Vehicle Year
-
-
-
-
-
+
+
+
+
Select Vehicle Year
+
+
+
+
+
+
+
+
+
+
This is default body copy font size/weight
+
This is small body copy using .small class
+
This is also small using <small> tag
+
+
+
+
+
+
+
+
+
+
+
+
-
This is default body copy font size/weight
-
- This is small body copy using .small class
-
-
- This is also small using <small> tag
-
-
+
+
-
-
-
h4 Heading
-
+
-
-
-
h5 Heading
-
+
-
-
-
-
+
diff --git a/src/layouts/loader-demo/loader-demo.vue b/src/layouts/loader-demo/loader-demo.vue
new file mode 100644
index 000000000..4c19c4d21
--- /dev/null
+++ b/src/layouts/loader-demo/loader-demo.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
diff --git a/src/layouts/vehicle-year/vehicle-year.vue b/src/layouts/vehicle-year/vehicle-year.vue
index 86c89c9f8..ec6838b10 100644
--- a/src/layouts/vehicle-year/vehicle-year.vue
+++ b/src/layouts/vehicle-year/vehicle-year.vue
@@ -55,3 +55,15 @@ export default {
},
};
+
+
\ No newline at end of file
diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js
index 39df28b9b..db2e75618 100644
--- a/src/mixins/base-mixin.js
+++ b/src/mixins/base-mixin.js
@@ -8,13 +8,13 @@ export default {
}
},
methods: {
- dispatchBlockingStoreAction(type, payload) {
- // globalMethods.showWaitingModal(true);
+ // dispatchBlockingStoreAction(type, payload) {
+ // // globalMethods.showWaitingModal(true);
- return this.dispatchNonBlockingStoreAction(type, payload).finally(() => {
- // globalMethods.showWaitingModal(false);
- });
- },
+ // return this.dispatchNonBlockingStoreAction(type, payload).finally(() => {
+ // // globalMethods.showWaitingModal(false);
+ // });
+ // },
dispatchNonBlockingStoreAction(type, payload, encodePayload = false) {
// Encode the payload if required
if (encodePayload) {
@@ -23,6 +23,30 @@ export default {
return this.$store.dispatch(type, payload);
},
+ GetContentFromCms() {
+ return this.dispatchNonBlockingStoreAction(this.storeActions.GET_PAGE_DATA,{ pageName: this.$route.query.fmgPage }).then((response) => {
+
+ const pageDataFromCms = {};
+
+ response.data.Result.forEach((widget) => {
+ if (Object.values(this.widgetNames).includes(widget.Type)) {
+ // If we already have this widget, push it on the collection
+ if (widget.Type in pageDataFromCms) {
+ pageDataFromCms[widget.Type].push(widget.Model);
+ return;
+ }
+
+ pageDataFromCms[widget.Type] = [widget.Model];
+
+ }
+ });
+
+ // Our 'Page' is ready because we have data now
+ this.isCmsContentReady = true;
+
+ return pageDataFromCms;
+ });
+ },
},
computed: {
storeActions() {
diff --git a/src/router/index.js b/src/router/index.js
index 1042b093f..2b3d566a1 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -2,6 +2,7 @@ import { createWebHistory, createRouter } from "vue-router";
import { storeActions } from "@/constants/store-actions.js";
import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js";
import ComponentTest from "@/layouts/component-test/component-test.vue";
+import LoaderDemo from "@/layouts/loader-demo/loader-demo.vue";
import NotFound from "@/layouts/not-found/not-found.vue";
import store from "@/store";
@@ -16,6 +17,11 @@ const routes = [
name: "ComponentTest",
component: ComponentTest,
},
+ {
+ path: "/loader-demo", // This is a temporary route for testing.
+ name: "LoaderDemo",
+ component: LoaderDemo,
+ },
{
path: "/",
beforeEnter(to, from, next) {
diff --git a/src/store/index.js b/src/store/index.js
index 7bed83a55..0976690b7 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -22,6 +22,7 @@ export default createStore({
evoxImageId: null,
hasSplitWindshieldOption: null,
hasBackglassSliderOption: null,
+ imageSrc: '',
registration: {
rawAddress: null,
zipCode: null,
@@ -62,7 +63,11 @@ export default createStore({
experiments: null,
}
},
- mutations: {},
+ mutations: {
+ updateVehicleImage(state, data) {
+ state.order.vehicle.imageSrc = data.imgSrc;
+ },
+ },
actions: {
// Vehicle API Actions
getVehicleYears(context) {
@@ -72,6 +77,22 @@ export default createStore({
payload: {},
});
},
+ lookupVehicleByYmms(context, { year, make, model, style }) {
+ return globalMethods.callHttpClient({
+ method: endpoints.LookupVehicleByYmms.method,
+ endpoint: `${endpoints.LookupVehicleByYmms.url}/${year}/${make}/${model}/${style}`,
+ payload: {},
+ });
+ },
+ lookupVehicleByVin(context, { vin }) {
+ return globalMethods.callHttpClient({
+ method: endpoints.LookupVehicleByVin.method,
+ endpoint: endpoints.LookupVehicleByVin.url,
+ payload: {
+ "vin": vin // EX "1J4GW58S4XC541166"
+ },
+ });
+ },
getVehicleMakes(context, { year }) {
return globalMethods.callHttpClient({
method: endpoints.GetVehicleMakes.method,
@@ -111,5 +132,12 @@ export default createStore({
payload: {},
});
},
+ getEvoxImage(context, { relativeUrl }) {
+ return globalMethods.callMockHttpClient({
+ method: endpoints.GetPageData.method,
+ endpoint: relativeUrl,
+ payload: {},
+ });
+ },
},
});
diff --git a/src/store/store.spec.js b/src/store/store.spec.js
new file mode 100644
index 000000000..3442d35bf
--- /dev/null
+++ b/src/store/store.spec.js
@@ -0,0 +1,112 @@
+import store from './index'
+import globalMethods from '@/global-methods'
+
+describe("Actions", () => {
+ it("Should return list of years retrieved", async () => {
+ // Arrange
+ let years = [];
+
+ // Act
+ globalMethods.callHttpClient = jest.fn();
+ globalMethods.callHttpClient.mockImplementation(() => {
+ return Promise.resolve({ data: [2023,2022,2021]});
+ });
+ await store.dispatch('getVehicleYears')
+ .then( (response) => {
+ years = response.data;
+ console.log(response);
+ });
+
+ // Assert
+ expect(years[0]).toBe(2023);
+ });
+
+ it("Should return list of makes retrieved", async () => {
+ // Arrange
+ let makes = [];
+
+ // Act
+ globalMethods.callHttpClient.mockImplementation(() => {
+ return Promise.resolve({ data: ['Baic','Honda','Ford']});
+ });
+ await store.dispatch('getVehicleMakes', {year: 2023})
+ .then( (response) => {
+ makes = response.data;
+ });
+
+ // Assert
+ expect(makes[0]).toBe('Baic');
+ });
+
+ it("Should return list of models retrieved", async () => {
+ // Arrange
+ let models = [];
+
+ // Act
+ globalMethods.callHttpClient.mockImplementation(() => {
+ return Promise.resolve({ data: ['BJ40 (MEX)','Civic','Accord']});
+ });
+ await store.dispatch('getVehicleModels', {year: 2023, make: 'Baic'})
+ .then( (response) => {
+ models = response.data;
+ });
+
+ // Assert
+ expect(models[0]).toBe('BJ40 (MEX)');
+ });
+
+ it("Should return list of styles retrieved", async () => {
+ // Arrange
+ let styles = [];
+
+ // Act
+ globalMethods.callHttpClient.mockImplementation(() => {
+ return Promise.resolve({ data: ['4 DOOR UTILITY','2 DOOR']});
+ });
+ await store.dispatch('getVehicleStyles', {year: 2023, make: 'Baic', model: 'BJ40 (MEX)'})
+ .then( (response) => {
+ styles = response.data;
+ });
+
+ // Assert
+ expect(styles[0]).toBe('4 DOOR UTILITY');
+ });
+
+ it("Should return data from url retrieved", async () => {
+ // Arrange
+ let routeInfo = [];
+
+ // Act
+ globalMethods.callHttpClient.mockImplementation(() => {
+ return Promise.resolve({ data: {
+ Result: 'Route Info Data'
+ }});
+ });
+ await store.dispatch('getRouteInfo', { pageName: 'vehicle-year' })
+ .then( (response) => {
+ routeInfo = response.data.Result;
+ });
+
+ // Assert
+ expect(routeInfo).toBe('Route Info Data');
+ });
+
+ it("Should return page data from url retrieved", async () => {
+ // Arrange
+ let pageData = [];
+
+ // Act
+ globalMethods.callHttpClient.mockImplementation(() => {
+ return Promise.resolve({ data: {
+ Result: 'Page Info Data'
+ }});
+ });
+ await store.dispatch('getPageData', { pageName: 'vehicle-year' })
+ .then( (response) => {
+ pageData = response.data.Result;
+ });
+
+ // Assert
+ expect(pageData).toBe('Page Info Data');
+ });
+})
\ No newline at end of file
diff --git a/src/styles/common-button-styles.scss b/src/styles/common-button-styles.scss
index 889b3a3f5..323ad5552 100644
--- a/src/styles/common-button-styles.scss
+++ b/src/styles/common-button-styles.scss
@@ -16,23 +16,8 @@
&:focus-visible { // Keyboard focus for accessibility
outline: none;
box-shadow: 0 0 0 3px, 0 0 0 5.5px $blue-700;
- }
- &.button-loader {
- padding: 0 40px 0 12px;
- &:after {
- content: url(../../assets/img/icons/button-spinner-white.svg);
- position: absolute;
- right: 14px;
- width: 16px;
- height: 16px;
- margin-left: 12px;
- animation: rotation 1s infinite linear;
- @keyframes rotation {
- 100% {
- transform:rotate(360deg);
- }
- }
- }
+ color: $white;
+ @include blue-gradient;
}
&:disabled {
background: $gray-100 !important;
@@ -59,39 +44,8 @@
&:focus-visible { // Keyboard focus for accessibility
outline: none;
box-shadow: 0 0 0 3px $white, 0 0 0 5.5px $blue-700;
- }
- &.button-loader {
- padding: 0 40px 0 12px;
- &:after {
- content: url(../../assets/img/icons/button-spinner-blue.svg);
- position: absolute;
- right: 14px;
- width: 16px;
- height: 16px;
- margin-left: 12px;
- animation: rotation 1s infinite linear;
- @keyframes rotation {
- 100% {
- transform:rotate(360deg);
- }
- }
- }
- &:focus:hover {
- &:after {
- content: url(../../assets/img/icons/button-spinner-white.svg);
- position: absolute;
- right: 14px;
- width: 16px;
- height: 16px;
- margin-left: 12px;
- animation: rotation 1s infinite linear;
- @keyframes rotation {
- 100% {
- transform:rotate(360deg);
- }
- }
- }
- }
+ color: $white;
+ @include blue-gradient;
}
&:disabled {
background: transparent;
@@ -130,22 +84,5 @@
color: $danger;
}
}
- &.button-loader {
- padding: 0 40px 0 12px;
- &:after {
- content: url(../../assets/img/icons/button-spinner-blue.svg);
- position: absolute;
- right: 14px;
- width: 16px;
- height: 16px;
- margin-left: 12px;
- animation: rotation 1s infinite linear;
- @keyframes rotation {
- 100% {
- transform:rotate(360deg);
- }
- }
- }
- }
}
}
diff --git a/src/styles/common-component-styles/ymms-common-styles.scss b/src/styles/common-component-styles/ymms-common-styles.scss
deleted file mode 100644
index 7fd2a4f18..000000000
--- a/src/styles/common-component-styles/ymms-common-styles.scss
+++ /dev/null
@@ -1,41 +0,0 @@
-.select-car {
- height: calc(100vh - 1rem);
-
- .car_list {
- // Height will be determined by overall height of content above list
- height: calc(100% - 100px);
- width: calc(100% - 1rem);
- }
-}
-
-// Animations
-.slide-enter-from {
- opacity: 0;
- transform: translateX(30vw);
-}
-.slide-enter-active, .slide-leave-active {
- transition: all .4s;
-}
-.slide-leave-to {
- opacity: 0;
- transform: translateX(-30vw);
-}
-
-.slide_reverse-enter-from {
- opacity: 0;
- transform: translateX(-30vw);
-}
-.slide_reverse-enter-active, .slide_reverse-leave-active {
- transition: all .4s;
-}
-.slide_reverse-leave-to {
- opacity: 0;
- transform: translateX(30vw);
-}
-
-.fade-enter-from, .fade-leave-to {
- opacity: 0;
-}
-.fade-enter-active, .fade-leave-active {
- transition: all .5s ease;
-}
\ No newline at end of file
diff --git a/src/styles/common-radio-styles.scss b/src/styles/common-radio-styles.scss
index 953a75985..e49361708 100644
--- a/src/styles/common-radio-styles.scss
+++ b/src/styles/common-radio-styles.scss
@@ -18,7 +18,7 @@
label {
position: relative;
background: $white;
- height: 3rem;
+ min-height: 3rem;
transition: all 150ms linear;
border-radius: $border-radius-lg;
border: 1px solid $gray-500;
@@ -37,23 +37,6 @@
color: $danger;
}
}
- &.button-loader {
- padding: 0 40px 0 12px;
- &:after {
- content: url(../../assets/img/icons/button-spinner-blue.svg);
- position: absolute;
- right: 14px;
- width: 16px;
- height: 16px;
- margin-left: 12px;
- animation: rotation 1s infinite linear;
- @keyframes rotation {
- 100% {
- transform:rotate(360deg);
- }
- }
- }
- }
}
}
}
diff --git a/src/styles/common-styles.scss b/src/styles/common-styles.scss
index d47d79fa4..ab36e35c5 100644
--- a/src/styles/common-styles.scss
+++ b/src/styles/common-styles.scss
@@ -22,10 +22,3 @@ body {
cursor: pointer;
}
}
-
-//Custom Mixins
-
-//Blue gradient background mixin
-@mixin blue-gradient {
- background: linear-gradient(270deg, $blue-500 0%, $blue-700 100%);
-}
diff --git a/src/styles/common-typography-styles.scss b/src/styles/common-typography-styles.scss
index 37081a8a4..05af0defc 100644
--- a/src/styles/common-typography-styles.scss
+++ b/src/styles/common-typography-styles.scss
@@ -43,3 +43,15 @@ caption {
line-height: 1.7;
font-weight: 400;
}
+
+
+// Font size
+.fs-5 {
+ line-height: 2;
+}
+
+.fs-6 {
+ font-size: 1rem !important;
+ line-height: 1.4;
+ font-weight: 500;
+}
\ No newline at end of file
diff --git a/src/styles/mixins/customMixins.scss b/src/styles/mixins/customMixins.scss
new file mode 100644
index 000000000..267abb64b
--- /dev/null
+++ b/src/styles/mixins/customMixins.scss
@@ -0,0 +1,6 @@
+//Custom Mixins
+
+//Blue gradient background mixin
+@mixin blue-gradient {
+ background: linear-gradient(270deg, $blue-500 0%, $blue-700 100%);
+}
diff --git a/src/ux-components/alert/alert.vue b/src/ux-components/alert/alert.vue
index b47d75f3c..7358073df 100644
--- a/src/ux-components/alert/alert.vue
+++ b/src/ux-components/alert/alert.vue
@@ -1,10 +1,10 @@
-
-
{{alertHeadline}}
-
{{alertCopy}}
-
diff --git a/src/ux-components/list-button/list-button.vue b/src/ux-components/list-button/list-button.vue
index 2580b0f83..5bad044b3 100644
--- a/src/ux-components/list-button/list-button.vue
+++ b/src/ux-components/list-button/list-button.vue
@@ -1,36 +1,48 @@
- {{ this.buttonText }}
-
-
-
+ {{ this.buttonText }}
+
+
+
+
diff --git a/src/ux-components/loader/loader.spec.js b/src/ux-components/loader/loader.spec.js
new file mode 100644
index 000000000..3d0843e10
--- /dev/null
+++ b/src/ux-components/loader/loader.spec.js
@@ -0,0 +1 @@
+test.todo("some test to be written in the future");
diff --git a/src/ux-components/loader/loader.vue b/src/ux-components/loader/loader.vue
new file mode 100644
index 000000000..448e39b78
--- /dev/null
+++ b/src/ux-components/loader/loader.vue
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
diff --git a/src/ux-components/radio-list/radio-list.vue b/src/ux-components/radio-list/radio-list.vue
index b6a02eca2..2976ce87e 100644
--- a/src/ux-components/radio-list/radio-list.vue
+++ b/src/ux-components/radio-list/radio-list.vue
@@ -1,28 +1,51 @@
-
diff --git a/vue.config.js b/vue.config.js
index d54265f0c..aba5fd140 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -13,12 +13,12 @@ module.exports = {
@import "@/styles/ux-variables.scss";
@import "./node_modules/bootstrap/scss/variables";
@import "./node_modules/bootstrap/scss/mixins";
+ @import "@/styles/mixins/customMixins";
@import "./node_modules/bootstrap/scss/bootstrap";
@import "@/styles/common-styles.scss";
@import "@/styles/common-button-styles.scss";
@import "@/styles/common-radio-styles.scss";
@import "@/styles/common-typography-styles.scss";
- @import "@/styles/common-component-styles/ymms-common-styles.scss";
`,
},
},
diff --git a/vue.release.config.js b/vue.release.config.js
index f85e8ffa8..6cf78123c 100644
--- a/vue.release.config.js
+++ b/vue.release.config.js
@@ -12,12 +12,12 @@ module.exports = {
@import "@/styles/ux-variables.scss";
@import "./node_modules/bootstrap/scss/variables";
@import "./node_modules/bootstrap/scss/mixins";
+ @import "@/styles/mixins/customMixins";
@import "./node_modules/bootstrap/scss/bootstrap";
@import "@/styles/common-styles.scss";
@import "@/styles/common-button-styles.scss";
@import "@/styles/common-radio-styles.scss";
@import "@/styles/common-typography-styles.scss";
- @import "@/styles/common-component-styles/ymms-common-styles.scss";
`,
},
},