cja-phoenix 1.2.39 → 1.2.41
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/dist/module.d.mts +6 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +29 -16
- package/dist/runtime/assets/iconia/fonts/CGG-icomoon.svg +94 -0
- package/dist/runtime/assets/iconia/fonts/CGG-icomoon.ttf +0 -0
- package/dist/runtime/assets/iconia/fonts/CGG-icomoon.woff +0 -0
- package/dist/runtime/assets/iconia/selection.json +1 -0
- package/dist/runtime/assets/iconia/style.css +281 -0
- package/dist/runtime/assets/scss/main.scss +6 -0
- package/dist/runtime/assets/scss/mixins/_funnel.scss +15 -0
- package/dist/runtime/assets/scss/mixins/_index.scss +46 -0
- package/dist/runtime/assets/scss/mixins/_media-queries.scss +109 -0
- package/dist/runtime/assets/scss/mixins/_results.scss +235 -0
- package/dist/runtime/assets/scss/tippy.scss +31 -0
- package/dist/runtime/assets/scss/variables/_breakpoints.scss +18 -0
- package/dist/runtime/assets/scss/variables/_colors.scss +100 -0
- package/dist/runtime/assets/scss/variables/_forms.scss +121 -0
- package/dist/runtime/assets/scss/variables/_grid.scss +12 -0
- package/dist/runtime/assets/scss/variables/_index.scss +6 -0
- package/dist/runtime/assets/scss/variables/_shadows.scss +7 -0
- package/dist/runtime/assets/scss/variables/_z-index.scss +6 -0
- package/dist/runtime/components/CjaButton.d.vue.ts +33 -0
- package/dist/runtime/components/CjaButton.vue +437 -0
- package/dist/runtime/components/CjaButton.vue.d.ts +33 -0
- package/dist/runtime/components/CollapseContainer.d.vue.ts +35 -0
- package/dist/runtime/components/CollapseContainer.vue +112 -0
- package/dist/runtime/components/CollapseContainer.vue.d.ts +35 -0
- package/dist/runtime/components/ContentTabs.d.vue.ts +23 -0
- package/dist/runtime/components/ContentTabs.vue +103 -0
- package/dist/runtime/components/ContentTabs.vue.d.ts +23 -0
- package/dist/runtime/components/Drawer.d.vue.ts +52 -0
- package/dist/runtime/components/Drawer.vue +169 -0
- package/dist/runtime/components/Drawer.vue.d.ts +52 -0
- package/dist/runtime/components/FixedContainer.d.vue.ts +37 -0
- package/dist/runtime/components/FixedContainer.vue +95 -0
- package/dist/runtime/components/FixedContainer.vue.d.ts +37 -0
- package/dist/runtime/components/GridContainer.d.vue.ts +13 -0
- package/dist/runtime/components/GridContainer.vue +37 -0
- package/dist/runtime/components/GridContainer.vue.d.ts +13 -0
- package/dist/runtime/components/GridItem.d.vue.ts +29 -0
- package/dist/runtime/components/GridItem.vue +93 -0
- package/dist/runtime/components/GridItem.vue.d.ts +29 -0
- package/dist/runtime/components/InfoMessage.d.vue.ts +28 -0
- package/dist/runtime/components/InfoMessage.vue +141 -0
- package/dist/runtime/components/InfoMessage.vue.d.ts +28 -0
- package/dist/runtime/components/LoadingSpinner.d.vue.ts +10 -0
- package/dist/runtime/components/LoadingSpinner.vue +39 -0
- package/dist/runtime/components/LoadingSpinner.vue.d.ts +10 -0
- package/dist/runtime/components/Modal.d.vue.ts +39 -0
- package/dist/runtime/components/Modal.vue +195 -0
- package/dist/runtime/components/Modal.vue.d.ts +39 -0
- package/dist/runtime/components/Scaffold.d.vue.ts +13 -0
- package/dist/runtime/components/Scaffold.vue +3 -0
- package/dist/runtime/components/Scaffold.vue.d.ts +13 -0
- package/dist/runtime/components/StickyContainer.d.vue.ts +21 -0
- package/dist/runtime/components/StickyContainer.vue +57 -0
- package/dist/runtime/components/StickyContainer.vue.d.ts +21 -0
- package/dist/runtime/components/form/CheckboxInput.d.vue.ts +42 -0
- package/dist/runtime/components/form/CheckboxInput.vue +163 -0
- package/dist/runtime/components/form/CheckboxInput.vue.d.ts +42 -0
- package/dist/runtime/components/form/CheckboxInputList.d.vue.ts +37 -0
- package/dist/runtime/components/form/CheckboxInputList.vue +84 -0
- package/dist/runtime/components/form/CheckboxInputList.vue.d.ts +37 -0
- package/dist/runtime/components/form/CurrencyInput.d.vue.ts +37 -0
- package/dist/runtime/components/form/CurrencyInput.vue +134 -0
- package/dist/runtime/components/form/CurrencyInput.vue.d.ts +37 -0
- package/dist/runtime/components/form/DateInput.d.vue.ts +40 -0
- package/dist/runtime/components/form/DateInput.vue +325 -0
- package/dist/runtime/components/form/DateInput.vue.d.ts +40 -0
- package/dist/runtime/components/form/FileInput.d.vue.ts +46 -0
- package/dist/runtime/components/form/FileInput.vue +202 -0
- package/dist/runtime/components/form/FileInput.vue.d.ts +46 -0
- package/dist/runtime/components/form/NumberInput.d.vue.ts +41 -0
- package/dist/runtime/components/form/NumberInput.vue +162 -0
- package/dist/runtime/components/form/NumberInput.vue.d.ts +41 -0
- package/dist/runtime/components/form/PhoneInput.d.vue.ts +44 -0
- package/dist/runtime/components/form/PhoneInput.vue +143 -0
- package/dist/runtime/components/form/PhoneInput.vue.d.ts +44 -0
- package/dist/runtime/components/form/RadioInput.d.vue.ts +42 -0
- package/dist/runtime/components/form/RadioInput.vue +181 -0
- package/dist/runtime/components/form/RadioInput.vue.d.ts +42 -0
- package/dist/runtime/components/form/RadioInputList.d.vue.ts +57 -0
- package/dist/runtime/components/form/RadioInputList.vue +130 -0
- package/dist/runtime/components/form/RadioInputList.vue.d.ts +57 -0
- package/dist/runtime/components/form/SelectInput.d.vue.ts +46 -0
- package/dist/runtime/components/form/SelectInput.vue +362 -0
- package/dist/runtime/components/form/SelectInput.vue.d.ts +46 -0
- package/dist/runtime/components/form/SelectionTiles.d.vue.ts +44 -0
- package/dist/runtime/components/form/SelectionTiles.vue +329 -0
- package/dist/runtime/components/form/SelectionTiles.vue.d.ts +44 -0
- package/dist/runtime/components/form/SliderInput.d.vue.ts +51 -0
- package/dist/runtime/components/form/SliderInput.vue +175 -0
- package/dist/runtime/components/form/SliderInput.vue.d.ts +51 -0
- package/dist/runtime/components/form/TextInput.d.vue.ts +56 -0
- package/dist/runtime/components/form/TextInput.vue +227 -0
- package/dist/runtime/components/form/TextInput.vue.d.ts +56 -0
- package/dist/runtime/components/form/TextareaInput.d.vue.ts +37 -0
- package/dist/runtime/components/form/TextareaInput.vue +76 -0
- package/dist/runtime/components/form/TextareaInput.vue.d.ts +37 -0
- package/dist/runtime/components/form/TileCheckboxInput.d.vue.ts +40 -0
- package/dist/runtime/components/form/TileCheckboxInput.vue +108 -0
- package/dist/runtime/components/form/TileCheckboxInput.vue.d.ts +40 -0
- package/dist/runtime/components/form/ToggleInput.d.vue.ts +43 -0
- package/dist/runtime/components/form/ToggleInput.vue +119 -0
- package/dist/runtime/components/form/ToggleInput.vue.d.ts +43 -0
- package/dist/runtime/components/form/structure/Container.d.vue.ts +16 -0
- package/dist/runtime/components/form/structure/Container.vue +31 -0
- package/dist/runtime/components/form/structure/Container.vue.d.ts +16 -0
- package/dist/runtime/components/form/structure/Description.d.vue.ts +9 -0
- package/dist/runtime/components/form/structure/Description.vue +26 -0
- package/dist/runtime/components/form/structure/Description.vue.d.ts +9 -0
- package/dist/runtime/components/form/structure/Error.d.vue.ts +9 -0
- package/dist/runtime/components/form/structure/Error.vue +23 -0
- package/dist/runtime/components/form/structure/Error.vue.d.ts +9 -0
- package/dist/runtime/components/form/structure/Title.d.vue.ts +12 -0
- package/dist/runtime/components/form/structure/Title.vue +43 -0
- package/dist/runtime/components/form/structure/Title.vue.d.ts +12 -0
- package/dist/runtime/components/funnel/Header.d.vue.ts +18 -0
- package/dist/runtime/components/funnel/Header.vue +62 -0
- package/dist/runtime/components/funnel/Header.vue.d.ts +18 -0
- package/dist/runtime/composables/useCjaGtm.d.ts +19 -0
- package/dist/runtime/composables/useCjaGtm.js +164 -0
- package/dist/runtime/composables/useFunnelConfig.d.ts +11 -0
- package/dist/runtime/composables/useFunnelConfig.js +51 -0
- package/dist/runtime/composables/useFunnelSummary.d.ts +14 -0
- package/dist/runtime/composables/useFunnelSummary.js +16 -0
- package/dist/runtime/composables/useHeaderHeight.d.ts +3 -0
- package/dist/runtime/composables/useHeaderHeight.js +24 -0
- package/dist/runtime/composables/useJourneyConfig.d.ts +11 -0
- package/dist/runtime/composables/useJourneyConfig.js +13 -0
- package/dist/runtime/composables/useValidateForm.d.ts +11 -0
- package/dist/runtime/composables/useValidateForm.js +33 -0
- package/dist/runtime/data/dialCodes.d.ts +7 -0
- package/dist/runtime/data/dialCodes.js +1466 -0
- package/dist/runtime/data/phoneDigits.d.ts +2 -0
- package/dist/runtime/data/phoneDigits.js +231 -0
- package/dist/runtime/plugins/tippy.d.ts +4 -0
- package/dist/runtime/plugins/tippy.js +12 -0
- package/dist/runtime/plugins/v-calendar.d.ts +3 -0
- package/dist/runtime/plugins/v-calendar.js +6 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/types/Form.d.ts +34 -0
- package/dist/runtime/types/Form.js +20 -0
- package/dist/runtime/types/Grid.d.ts +4 -0
- package/dist/runtime/types/Grid.js +0 -0
- package/dist/runtime/types/Icon.d.ts +2 -0
- package/dist/runtime/types/Icon.js +85 -0
- package/dist/runtime/types/JourneyConfig.d.ts +9 -0
- package/dist/runtime/types/JourneyConfig.js +0 -0
- package/dist/runtime/types/index.d.ts +4 -0
- package/dist/runtime/types/index.js +4 -0
- package/dist/runtime/utils/applyProductData.d.ts +10 -0
- package/dist/runtime/utils/applyProductData.js +22 -0
- package/dist/runtime/utils/convertDate.d.ts +5 -0
- package/dist/runtime/utils/convertDate.js +17 -0
- package/dist/runtime/utils/findScrollAncestor.d.ts +1 -0
- package/dist/runtime/utils/findScrollAncestor.js +14 -0
- package/dist/runtime/utils/formValidations.d.ts +78 -0
- package/dist/runtime/utils/formValidations.js +180 -0
- package/dist/runtime/utils/formatValue.d.ts +4 -0
- package/dist/runtime/utils/formatValue.js +20 -0
- package/dist/runtime/utils/getAbTestVersion.d.ts +9 -0
- package/dist/runtime/utils/getAbTestVersion.js +48 -0
- package/dist/runtime/utils/getCalendarUrl.d.ts +8 -0
- package/dist/runtime/utils/getCalendarUrl.js +24 -0
- package/dist/runtime/utils/getFromUrl.d.ts +2 -0
- package/dist/runtime/utils/getFromUrl.js +25 -0
- package/dist/runtime/utils/getStoryblokUrl.d.ts +71 -0
- package/dist/runtime/utils/getStoryblokUrl.js +35 -0
- package/dist/runtime/utils/jsonReviver.d.ts +1 -0
- package/dist/runtime/utils/jsonReviver.js +18 -0
- package/dist/runtime/utils/mediaBreakpoints.d.ts +28 -0
- package/dist/runtime/utils/mediaBreakpoints.js +28 -0
- package/dist/runtime/utils/toggleScroll.d.ts +1 -0
- package/dist/runtime/utils/toggleScroll.js +6 -0
- package/dist/runtime/utils/updateForm.d.ts +11 -0
- package/dist/runtime/utils/updateForm.js +74 -0
- package/dist/runtime/utils/updateMarketingConsent.d.ts +4 -0
- package/dist/runtime/utils/updateMarketingConsent.js +13 -0
- package/dist/runtime/utils/uploadFile.d.ts +8 -0
- package/dist/runtime/utils/uploadFile.js +13 -0
- package/dist/types.d.mts +6 -10
- package/package.json +9 -8
- package/dist/module.d.cts +0 -2
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FormStructureContainer layout="vertical">
|
|
3
|
+
<label
|
|
4
|
+
class="input-wrapper"
|
|
5
|
+
:class="[`size-${size}`, { 'disabled': disabled, 'full-width': fullWidth }]"
|
|
6
|
+
>
|
|
7
|
+
<div class="text-container">
|
|
8
|
+
<slot v-if="$slots.default" />
|
|
9
|
+
<Scaffold v-else>
|
|
10
|
+
{{ label }}
|
|
11
|
+
</Scaffold>
|
|
12
|
+
</div>
|
|
13
|
+
<input
|
|
14
|
+
v-model="model"
|
|
15
|
+
type="checkbox"
|
|
16
|
+
v-bind="{ value, disabled, name }"
|
|
17
|
+
:aria-label="label"
|
|
18
|
+
>
|
|
19
|
+
<div class="switch">
|
|
20
|
+
<div class="thumb" />
|
|
21
|
+
</div>
|
|
22
|
+
</label>
|
|
23
|
+
|
|
24
|
+
<FormStructureError
|
|
25
|
+
v-if="errorMessage && errorDisplay"
|
|
26
|
+
v-bind="{ size, errorMessage }"
|
|
27
|
+
/>
|
|
28
|
+
</FormStructureContainer>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script setup>
|
|
32
|
+
import { useField } from "vee-validate";
|
|
33
|
+
const props = defineProps({
|
|
34
|
+
size: { type: String, required: false, default: "md" },
|
|
35
|
+
value: { type: null, required: false },
|
|
36
|
+
disabled: { type: null, required: false },
|
|
37
|
+
name: { type: null, required: false },
|
|
38
|
+
label: { type: String, required: false },
|
|
39
|
+
fullWidth: { type: Boolean, required: false, default: true },
|
|
40
|
+
validation: { type: Object, required: false },
|
|
41
|
+
errorDisplay: { type: Boolean, required: false, default: true },
|
|
42
|
+
validationMode: { type: String, required: false, default: "change" }
|
|
43
|
+
});
|
|
44
|
+
const model = defineModel({
|
|
45
|
+
required: true
|
|
46
|
+
});
|
|
47
|
+
const { errorMessage, meta, validate } = useField("input", props.validation, {
|
|
48
|
+
validateOnValueUpdate: props.validationMode == "change",
|
|
49
|
+
syncVModel: true
|
|
50
|
+
});
|
|
51
|
+
defineExpose({ errorMessage, meta, validate });
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<style lang="scss" scoped>
|
|
55
|
+
.input-wrapper {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: row;
|
|
58
|
+
align-items: center;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
gap: 12px;
|
|
61
|
+
@include input-title;
|
|
62
|
+
|
|
63
|
+
&.disabled {
|
|
64
|
+
cursor: auto;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.full-width {
|
|
68
|
+
.text-container {
|
|
69
|
+
flex-grow: 1;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.text-container {
|
|
74
|
+
user-select: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
input {
|
|
78
|
+
display: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.switch {
|
|
82
|
+
position: relative;
|
|
83
|
+
width: 36px;
|
|
84
|
+
height: 14px;
|
|
85
|
+
border-radius: 7px;
|
|
86
|
+
background-color: $light-grey;
|
|
87
|
+
transition: all 0.2s ease-in-out;
|
|
88
|
+
|
|
89
|
+
.thumb {
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: -3px;
|
|
92
|
+
left: 0;
|
|
93
|
+
width: 20px;
|
|
94
|
+
height: 20px;
|
|
95
|
+
border-radius: 50%;
|
|
96
|
+
background-color: $dark-grey;
|
|
97
|
+
box-shadow: $box-shadow-s;
|
|
98
|
+
transition: all 0.2s ease-in-out;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
input:checked + .switch {
|
|
103
|
+
background-color: $light-blue;
|
|
104
|
+
|
|
105
|
+
.thumb {
|
|
106
|
+
background-color: $main-blue;
|
|
107
|
+
left: 16px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
input:disabled + .switch {
|
|
112
|
+
background-color: $disabled-grey;
|
|
113
|
+
|
|
114
|
+
.thumb {
|
|
115
|
+
background-color: $blue-grey;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'vue';
|
|
2
|
+
import type { Lazy, Schema } from 'yup';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
size?: 'sm' | 'md' | 'lg';
|
|
5
|
+
value?: InputHTMLAttributes['value'];
|
|
6
|
+
disabled?: InputHTMLAttributes['disabled'];
|
|
7
|
+
name?: InputHTMLAttributes['name'];
|
|
8
|
+
label?: string;
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
validation?: Schema | Lazy<any>;
|
|
11
|
+
errorDisplay?: boolean;
|
|
12
|
+
validationMode?: 'change' | 'none';
|
|
13
|
+
};
|
|
14
|
+
type __VLS_ModelProps = {
|
|
15
|
+
modelValue: any;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
18
|
+
declare var __VLS_8: {};
|
|
19
|
+
type __VLS_Slots = {} & {
|
|
20
|
+
default?: (props: typeof __VLS_8) => any;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
23
|
+
errorMessage: import("vue").Ref<string | undefined, string | undefined>;
|
|
24
|
+
meta: import("vee-validate").FieldMeta<unknown>;
|
|
25
|
+
validate: import("vee-validate").FieldValidator<unknown>;
|
|
26
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
"update:modelValue": (value: any) => any;
|
|
28
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
29
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
30
|
+
}>, {
|
|
31
|
+
size: "sm" | "md" | "lg";
|
|
32
|
+
errorDisplay: boolean;
|
|
33
|
+
validationMode: "change" | "none";
|
|
34
|
+
fullWidth: boolean;
|
|
35
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
layout?: 'vertical' | 'horizontal';
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="input-container"
|
|
4
|
+
:class="[layout]"
|
|
5
|
+
>
|
|
6
|
+
<slot />
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
defineProps({
|
|
12
|
+
layout: { type: String, required: false }
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<style lang="scss" scoped>
|
|
17
|
+
.input-container {
|
|
18
|
+
display: flex;
|
|
19
|
+
|
|
20
|
+
&.vertical {
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: 8px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.horizontal {
|
|
26
|
+
flex-direction: row;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: 16px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
layout?: 'vertical' | 'horizontal';
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
description: string;
|
|
4
|
+
size: 'sm' | 'md' | 'lg';
|
|
5
|
+
disabled: InputHTMLAttributes['disabled'];
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="input-description"
|
|
4
|
+
:class="[`size-${size}`, { disabled }]"
|
|
5
|
+
v-html="description"
|
|
6
|
+
/>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup>
|
|
10
|
+
defineProps({
|
|
11
|
+
description: { type: String, required: true },
|
|
12
|
+
size: { type: String, required: true },
|
|
13
|
+
disabled: { type: null, required: true }
|
|
14
|
+
});
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<style lang="scss" scoped>
|
|
18
|
+
.input-description {
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
line-height: 18px;
|
|
21
|
+
|
|
22
|
+
&.disabled {
|
|
23
|
+
color: $light-grey;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
description: string;
|
|
4
|
+
size: 'sm' | 'md' | 'lg';
|
|
5
|
+
disabled: InputHTMLAttributes['disabled'];
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
errorMessage: string;
|
|
3
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
size: "sm" | "md" | "lg";
|
|
7
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="input-error"
|
|
4
|
+
:class="`size-${size}`"
|
|
5
|
+
>
|
|
6
|
+
{{ errorMessage }}
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
defineProps({
|
|
12
|
+
errorMessage: { type: String, required: true },
|
|
13
|
+
size: { type: String, required: false, default: "md" }
|
|
14
|
+
});
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<style lang="scss" scoped>
|
|
18
|
+
.input-error {
|
|
19
|
+
color: $alert-red;
|
|
20
|
+
font-size: 13px;
|
|
21
|
+
line-height: 17px;
|
|
22
|
+
}
|
|
23
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
errorMessage: string;
|
|
3
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
size: "sm" | "md" | "lg";
|
|
7
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from "vue";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
title: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
disabled?: InputHTMLAttributes["disabled"];
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
size: "sm" | "md" | "lg";
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="title" class="input-title" :class="[`size-${size}`, { disabled }]">
|
|
3
|
+
<span>{{ title }}</span>
|
|
4
|
+
<span
|
|
5
|
+
v-if="tooltip"
|
|
6
|
+
v-tippy="{ content: tooltip }"
|
|
7
|
+
class="tooltip m-cgg-icon--question"
|
|
8
|
+
/>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
defineProps({
|
|
14
|
+
title: { type: String, required: true },
|
|
15
|
+
tooltip: { type: String, required: false },
|
|
16
|
+
disabled: { type: null, required: false },
|
|
17
|
+
size: { type: String, required: false, default: "md" }
|
|
18
|
+
});
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
.input-title {
|
|
23
|
+
@include input-title;
|
|
24
|
+
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
gap: 8px;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
|
|
30
|
+
.tooltip {
|
|
31
|
+
font-size: 18px;
|
|
32
|
+
color: $main-blue;
|
|
33
|
+
|
|
34
|
+
@include screen-md-min {
|
|
35
|
+
font-size: 20px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.disabled {
|
|
40
|
+
color: $light-grey;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from "vue";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
title: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
disabled?: InputHTMLAttributes["disabled"];
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
size: "sm" | "md" | "lg";
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
description?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="funnel-header">
|
|
3
|
+
<div class="header-container">
|
|
4
|
+
<h2>{{ title }}</h2>
|
|
5
|
+
<span v-if="tooltip" v-tippy="tooltip" class="m-cgg-icon--question" />
|
|
6
|
+
</div>
|
|
7
|
+
<p v-if="description || $slots.description">
|
|
8
|
+
<slot name="description" v-if="$slots.description" />
|
|
9
|
+
<scaffold v-else>
|
|
10
|
+
{{ description }}
|
|
11
|
+
</scaffold>
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
defineProps({
|
|
18
|
+
title: { type: String, required: true },
|
|
19
|
+
description: { type: String, required: false },
|
|
20
|
+
tooltip: { type: String, required: false }
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style lang="scss" scoped>
|
|
25
|
+
.funnel-header {
|
|
26
|
+
display: grid;
|
|
27
|
+
gap: 16px;
|
|
28
|
+
margin-bottom: 32px;
|
|
29
|
+
text-align: center;
|
|
30
|
+
|
|
31
|
+
.header-container {
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: 12px;
|
|
36
|
+
|
|
37
|
+
.m-cgg-icon--question {
|
|
38
|
+
color: $main-blue;
|
|
39
|
+
font-size: 24px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
h2 {
|
|
44
|
+
color: $main-blue;
|
|
45
|
+
font-size: 20px;
|
|
46
|
+
line-height: 26px;
|
|
47
|
+
font-weight: 700;
|
|
48
|
+
margin: 0;
|
|
49
|
+
|
|
50
|
+
@include screen-lg-min {
|
|
51
|
+
font-size: 24px;
|
|
52
|
+
line-height: 30px;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
p {
|
|
57
|
+
font-size: 16px;
|
|
58
|
+
line-height: 20px;
|
|
59
|
+
margin: 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
description?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { JourneyLocation, VerticalCode } from '../types/JourneyConfig.js';
|
|
2
|
+
export declare const useCjaGtm: (vertical: VerticalCode, source: JourneyLocation | {
|
|
3
|
+
formType: string;
|
|
4
|
+
location: string;
|
|
5
|
+
}) => {
|
|
6
|
+
trackStepEvent: (options: {
|
|
7
|
+
stepName: string;
|
|
8
|
+
stepNumber: number;
|
|
9
|
+
stepDetails?: any;
|
|
10
|
+
action?: string;
|
|
11
|
+
}) => void;
|
|
12
|
+
trackPurchase: (options: {
|
|
13
|
+
source: string;
|
|
14
|
+
product: any;
|
|
15
|
+
label: string;
|
|
16
|
+
listing?: string;
|
|
17
|
+
index?: number;
|
|
18
|
+
}) => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { useGtm } from "@gtm-support/vue-gtm";
|
|
2
|
+
export const useCjaGtm = (vertical, source) => {
|
|
3
|
+
const gtm = useGtm();
|
|
4
|
+
const category = (() => {
|
|
5
|
+
switch (vertical) {
|
|
6
|
+
case "HL":
|
|
7
|
+
return "mortgage";
|
|
8
|
+
case "PL":
|
|
9
|
+
return "personal-loan new-funnel";
|
|
10
|
+
case "EN":
|
|
11
|
+
return "energy";
|
|
12
|
+
case "BB":
|
|
13
|
+
return "broadband";
|
|
14
|
+
case "CI":
|
|
15
|
+
return "car-insurance-funnel";
|
|
16
|
+
case "CC":
|
|
17
|
+
return "credit-card";
|
|
18
|
+
}
|
|
19
|
+
})();
|
|
20
|
+
const { formType, location } = (() => {
|
|
21
|
+
switch (source) {
|
|
22
|
+
case "funnel":
|
|
23
|
+
return { formType: "FUNNEL", location: "Funnel" };
|
|
24
|
+
case "results":
|
|
25
|
+
return { formType: "RESULTS", location: "Results" };
|
|
26
|
+
case "checkout":
|
|
27
|
+
return { formType: "CHECKOUT", location: "Checkout" };
|
|
28
|
+
case "contact":
|
|
29
|
+
return { formType: "CONTACT", location: "Contact" };
|
|
30
|
+
default:
|
|
31
|
+
return source;
|
|
32
|
+
}
|
|
33
|
+
})();
|
|
34
|
+
const trackStepEvent = (options) => {
|
|
35
|
+
gtm?.trackEvent({
|
|
36
|
+
event: `${location} Step`,
|
|
37
|
+
eventDetails: {
|
|
38
|
+
category,
|
|
39
|
+
value: options.stepName,
|
|
40
|
+
noninteraction: false,
|
|
41
|
+
location,
|
|
42
|
+
action: options.action,
|
|
43
|
+
properties: {
|
|
44
|
+
stepName: options.stepName,
|
|
45
|
+
stepNumber: options.stepNumber,
|
|
46
|
+
stepDetails: options.stepDetails,
|
|
47
|
+
formType
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
const trackPurchase = (options) => {
|
|
53
|
+
const {
|
|
54
|
+
source: source2,
|
|
55
|
+
product,
|
|
56
|
+
label,
|
|
57
|
+
listing,
|
|
58
|
+
index
|
|
59
|
+
} = options;
|
|
60
|
+
gtm?.trackEvent({
|
|
61
|
+
event: "purchase",
|
|
62
|
+
eventDetails: {
|
|
63
|
+
source: `Conversion - ${source2}`,
|
|
64
|
+
action: "Results Purchase",
|
|
65
|
+
label,
|
|
66
|
+
category,
|
|
67
|
+
location,
|
|
68
|
+
properties: {
|
|
69
|
+
list: listing
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
ecommerce: {
|
|
73
|
+
purchase: {
|
|
74
|
+
actionField: {
|
|
75
|
+
id: Math.floor(
|
|
76
|
+
Math.random() * (999999999999 - Math.pow(10, 11)) + Math.pow(10, 11)
|
|
77
|
+
),
|
|
78
|
+
revenue: "5.00",
|
|
79
|
+
action: "purchase"
|
|
80
|
+
},
|
|
81
|
+
products: (() => {
|
|
82
|
+
switch (category) {
|
|
83
|
+
case "energy":
|
|
84
|
+
return [
|
|
85
|
+
{
|
|
86
|
+
name: label,
|
|
87
|
+
id: product.productId,
|
|
88
|
+
brand: product.provider,
|
|
89
|
+
position: product.index + 1,
|
|
90
|
+
dimension3: source2,
|
|
91
|
+
category,
|
|
92
|
+
list: listing,
|
|
93
|
+
price: "5.00",
|
|
94
|
+
quantity: 1
|
|
95
|
+
}
|
|
96
|
+
];
|
|
97
|
+
case "mortgage":
|
|
98
|
+
return [
|
|
99
|
+
{
|
|
100
|
+
name: product.name,
|
|
101
|
+
id: product.cggId,
|
|
102
|
+
brand: product.provider.name,
|
|
103
|
+
position: index,
|
|
104
|
+
scoreValue: null,
|
|
105
|
+
approvalRate: "unavailable",
|
|
106
|
+
dimension3: source2,
|
|
107
|
+
dimension6: `apr:${product.attributes.taeg}, totalRepayment:${product.attributes.mtic}, monthlyRepayment:${product.attributes.installment}`,
|
|
108
|
+
category,
|
|
109
|
+
list: listing,
|
|
110
|
+
price: "5.00",
|
|
111
|
+
quantity: 1
|
|
112
|
+
}
|
|
113
|
+
];
|
|
114
|
+
case "broadband":
|
|
115
|
+
return [
|
|
116
|
+
{
|
|
117
|
+
name: product.description,
|
|
118
|
+
id: product.cggId,
|
|
119
|
+
brand: product.name,
|
|
120
|
+
position: index,
|
|
121
|
+
dimension3: source2,
|
|
122
|
+
dimension4: product.banner.bannerType,
|
|
123
|
+
dimension5: product.showCTALeadCapture,
|
|
124
|
+
dimension6: `service: ${product.offer.service}, noOfChannels: ${product.tv.noOfChannels}, maxSpeedDownload: ${product.speed.maxSpeedDownload}, publicPrice: ${product.fee.publicPrice}`,
|
|
125
|
+
category,
|
|
126
|
+
list: listing,
|
|
127
|
+
price: "5.00",
|
|
128
|
+
quantity: 1
|
|
129
|
+
}
|
|
130
|
+
];
|
|
131
|
+
case "credit-card":
|
|
132
|
+
return [
|
|
133
|
+
{
|
|
134
|
+
name: product.description,
|
|
135
|
+
id: product.cggId,
|
|
136
|
+
brand: product.name,
|
|
137
|
+
position: index,
|
|
138
|
+
approvalRate: product.approvalRate,
|
|
139
|
+
dimension3: source2,
|
|
140
|
+
dimension4: product.banner.bannerType,
|
|
141
|
+
dimension5: product.showCTALeadCapture,
|
|
142
|
+
dimension6: `annualFee: ${product.fee.annualFee}, basicAPR: ${product.fee.taeg}, basic: ${product.fee.tan}`,
|
|
143
|
+
category: "credit-card",
|
|
144
|
+
list: listing,
|
|
145
|
+
price: "5.00",
|
|
146
|
+
quantity: 1
|
|
147
|
+
}
|
|
148
|
+
];
|
|
149
|
+
default:
|
|
150
|
+
console.error(
|
|
151
|
+
`Unrecognized category ${category}, implement vertical specific gtm product`
|
|
152
|
+
);
|
|
153
|
+
return [{}];
|
|
154
|
+
}
|
|
155
|
+
})()
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
return {
|
|
161
|
+
trackStepEvent,
|
|
162
|
+
trackPurchase
|
|
163
|
+
};
|
|
164
|
+
};
|