axitech-widget 0.0.2

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 (147) hide show
  1. package/README.md +203 -0
  2. package/dist/Modal-fab2abfa.mjs +4 -0
  3. package/dist/axitech-widget.es.js +7 -0
  4. package/dist/axitech-widget.iife.js +698 -0
  5. package/dist/axitech-widget.umd.js +698 -0
  6. package/dist/index-2839010c.mjs +30306 -0
  7. package/dist/style.css +1 -0
  8. package/dist/types/components/base/ActionCard.vue.d.ts +36 -0
  9. package/dist/types/components/base/Button.vue.d.ts +9 -0
  10. package/dist/types/components/base/Collapse.vue.d.ts +2 -0
  11. package/dist/types/components/base/DatePicker.vue.d.ts +70 -0
  12. package/dist/types/components/base/GoogleAutocomplete.vue.d.ts +23 -0
  13. package/dist/types/components/base/GoogleMap.vue.d.ts +26 -0
  14. package/dist/types/components/base/Input.vue.d.ts +43 -0
  15. package/dist/types/components/base/Modal.vue.d.ts +55 -0
  16. package/dist/types/components/base/SelectButton.vue.d.ts +56 -0
  17. package/dist/types/components/base/Spinner.vue.d.ts +34 -0
  18. package/dist/types/components/base/uploader/ImageUpload.vue.d.ts +23 -0
  19. package/dist/types/components/base/uploader/Upload.vue.d.ts +4 -0
  20. package/dist/types/components/claims-widget/ClaimsWidget.ce.vue.d.ts +2 -0
  21. package/dist/types/components/claims-widget/components/Error.vue.d.ts +2 -0
  22. package/dist/types/components/claims-widget/components/SkeletonLoader.vue.d.ts +56 -0
  23. package/dist/types/components/claims-widget/components/StepConfirm.vue.d.ts +6 -0
  24. package/dist/types/components/claims-widget/components/StepSelector.vue.d.ts +6 -0
  25. package/dist/types/components/claims-widget/components/accident/Accident.vue.d.ts +8 -0
  26. package/dist/types/components/claims-widget/components/accident/ImageSection.vue.d.ts +29 -0
  27. package/dist/types/components/claims-widget/components/accident/MapSection.vue.d.ts +29 -0
  28. package/dist/types/components/claims-widget/components/accident/NoteSection.vue.d.ts +21 -0
  29. package/dist/types/components/claims-widget/components/accident/SectionWrapper.vue.d.ts +23 -0
  30. package/dist/types/components/claims-widget/components/accident/YourVehicle.vue.d.ts +2 -0
  31. package/dist/types/components/claims-widget/components/fireWater/FireWater.vue.d.ts +6 -0
  32. package/dist/types/components/claims-widget/components/illustration/Accident.vue.d.ts +2 -0
  33. package/dist/types/components/claims-widget/components/illustration/Location.vue.d.ts +2 -0
  34. package/dist/types/components/claims-widget/components/illustration/SubmittedSuccessfully.vue.d.ts +2 -0
  35. package/dist/types/components/claims-widget/components/illustration/Unsupported.vue.d.ts +2 -0
  36. package/dist/types/components/claims-widget/components/windscreen/Windscreen.vue.d.ts +6 -0
  37. package/dist/types/components/claims-widget/components/windscreen/WindscreenLoading.vue.d.ts +2 -0
  38. package/dist/types/components/index.d.ts +2 -0
  39. package/dist/types/composables/googleMaps.d.ts +11 -0
  40. package/dist/types/constants/index.d.ts +1 -0
  41. package/dist/types/index.d.ts +34 -0
  42. package/dist/types/plugins/firebase.d.ts +2 -0
  43. package/dist/types/plugins/firebaseCloudStorage.d.ts +16 -0
  44. package/dist/types/utils/autocomplete.d.ts +2 -0
  45. package/dist/types/utils/colorHelpers.d.ts +7 -0
  46. package/dist/types/utils/config.d.ts +131 -0
  47. package/dist/types/utils/customElementRegister.d.ts +1 -0
  48. package/dist/types/utils/fontUtils.d.ts +1 -0
  49. package/dist/types/utils/index.d.ts +141 -0
  50. package/dist/types/utils/map.d.ts +21 -0
  51. package/dist/types/utils/request.d.ts +30 -0
  52. package/dist/types/utils/svgUtils.d.ts +0 -0
  53. package/dist/types/utils/themeUtils.d.ts +9 -0
  54. package/package.json +77 -0
  55. package/src/assets/fonts/Volvo Novum-Italic.eot +0 -0
  56. package/src/assets/fonts/Volvo Novum-Italic.svg +723 -0
  57. package/src/assets/fonts/Volvo Novum-Italic.woff +0 -0
  58. package/src/assets/fonts/Volvo Novum-Italic.woff2 +0 -0
  59. package/src/assets/fonts/Volvo Novum-Light.eot +0 -0
  60. package/src/assets/fonts/Volvo Novum-Light.svg +707 -0
  61. package/src/assets/fonts/Volvo Novum-Light.woff +0 -0
  62. package/src/assets/fonts/Volvo Novum-Light.woff2 +0 -0
  63. package/src/assets/fonts/Volvo Novum-LightItalic.eot +0 -0
  64. package/src/assets/fonts/Volvo Novum-LightItalic.svg +723 -0
  65. package/src/assets/fonts/Volvo Novum-LightItalic.woff +0 -0
  66. package/src/assets/fonts/Volvo Novum-LightItalic.woff2 +0 -0
  67. package/src/assets/fonts/Volvo Novum-Medium.eot +0 -0
  68. package/src/assets/fonts/Volvo Novum-Medium.svg +706 -0
  69. package/src/assets/fonts/Volvo Novum-Medium.woff +0 -0
  70. package/src/assets/fonts/Volvo Novum-Medium.woff2 +0 -0
  71. package/src/assets/fonts/Volvo Novum-MediumItalic.eot +0 -0
  72. package/src/assets/fonts/Volvo Novum-MediumItalic.svg +724 -0
  73. package/src/assets/fonts/Volvo Novum-MediumItalic.woff +0 -0
  74. package/src/assets/fonts/Volvo Novum-MediumItalic.woff2 +0 -0
  75. package/src/assets/fonts/Volvo Novum-Regular.eot +0 -0
  76. package/src/assets/fonts/Volvo Novum-Regular.svg +707 -0
  77. package/src/assets/fonts/Volvo Novum-Regular.woff +0 -0
  78. package/src/assets/fonts/Volvo Novum-Regular.woff2 +0 -0
  79. package/src/assets/fonts/Volvo Novum-SemiLight.eot +0 -0
  80. package/src/assets/fonts/Volvo Novum-SemiLight.svg +706 -0
  81. package/src/assets/fonts/Volvo Novum-SemiLight.woff +0 -0
  82. package/src/assets/fonts/Volvo Novum-SemiLight.woff2 +0 -0
  83. package/src/assets/fonts/Volvo Novum-SemiLightItalic.eot +0 -0
  84. package/src/assets/fonts/Volvo Novum-SemiLightItalic.svg +722 -0
  85. package/src/assets/fonts/Volvo Novum-SemiLightItalic.woff +0 -0
  86. package/src/assets/fonts/Volvo Novum-SemiLightItalic.woff2 +0 -0
  87. package/src/assets/styles/collapse.sass +20 -0
  88. package/src/assets/styles/datepicker.sass +14 -0
  89. package/src/assets/styles/main.sass +182 -0
  90. package/src/assets/styles/map.sass +41 -0
  91. package/src/assets/styles/togglebutton.sass +4 -0
  92. package/src/components/base/ActionCard.vue +49 -0
  93. package/src/components/base/Button.vue +16 -0
  94. package/src/components/base/Collapse.vue +41 -0
  95. package/src/components/base/DatePicker.vue +94 -0
  96. package/src/components/base/GoogleAutocomplete.vue +116 -0
  97. package/src/components/base/GoogleMap.vue +114 -0
  98. package/src/components/base/Input.vue +44 -0
  99. package/src/components/base/Modal.vue +117 -0
  100. package/src/components/base/SelectButton.vue +67 -0
  101. package/src/components/base/Spinner.vue +39 -0
  102. package/src/components/base/uploader/ImageUpload.vue +85 -0
  103. package/src/components/base/uploader/Upload.vue +14 -0
  104. package/src/components/claims-widget/ClaimsWidget.ce.vue +117 -0
  105. package/src/components/claims-widget/assets/accident.svg +181 -0
  106. package/src/components/claims-widget/assets/car.svg +6 -0
  107. package/src/components/claims-widget/assets/currentlocation.svg +3 -0
  108. package/src/components/claims-widget/assets/door.svg +3 -0
  109. package/src/components/claims-widget/assets/location.svg +20 -0
  110. package/src/components/claims-widget/assets/marker.svg +1 -0
  111. package/src/components/claims-widget/assets/unsupported.svg +107 -0
  112. package/src/components/claims-widget/assets/windscreen.svg +3 -0
  113. package/src/components/claims-widget/assets/zoomin.svg +3 -0
  114. package/src/components/claims-widget/assets/zoomout.svg +3 -0
  115. package/src/components/claims-widget/components/Error.vue +21 -0
  116. package/src/components/claims-widget/components/SkeletonLoader.vue +77 -0
  117. package/src/components/claims-widget/components/StepConfirm.vue +85 -0
  118. package/src/components/claims-widget/components/StepSelector.vue +58 -0
  119. package/src/components/claims-widget/components/accident/Accident.vue +267 -0
  120. package/src/components/claims-widget/components/accident/ImageSection.vue +82 -0
  121. package/src/components/claims-widget/components/accident/MapSection.vue +72 -0
  122. package/src/components/claims-widget/components/accident/NoteSection.vue +83 -0
  123. package/src/components/claims-widget/components/accident/SectionWrapper.vue +16 -0
  124. package/src/components/claims-widget/components/accident/YourVehicle.vue +60 -0
  125. package/src/components/claims-widget/components/fireWater/FireWater.vue +42 -0
  126. package/src/components/claims-widget/components/illustration/Accident.vue +735 -0
  127. package/src/components/claims-widget/components/illustration/Location.vue +74 -0
  128. package/src/components/claims-widget/components/illustration/SubmittedSuccessfully.vue +2270 -0
  129. package/src/components/claims-widget/components/illustration/Unsupported.vue +393 -0
  130. package/src/components/claims-widget/components/windscreen/Windscreen.vue +44 -0
  131. package/src/components/claims-widget/components/windscreen/WindscreenLoading.vue +34 -0
  132. package/src/components/index.ts +3 -0
  133. package/src/composables/googleMaps.ts +157 -0
  134. package/src/constants/index.ts +1 -0
  135. package/src/index.ts +76 -0
  136. package/src/plugins/firebase.ts +18 -0
  137. package/src/plugins/firebaseCloudStorage.ts +88 -0
  138. package/src/utils/autocomplete.ts +57 -0
  139. package/src/utils/colorHelpers.ts +96 -0
  140. package/src/utils/config.ts +140 -0
  141. package/src/utils/customElementRegister.ts +40 -0
  142. package/src/utils/fontUtils.ts +24 -0
  143. package/src/utils/index.ts +5 -0
  144. package/src/utils/map.ts +212 -0
  145. package/src/utils/request.ts +76 -0
  146. package/src/utils/svgUtils.ts +0 -0
  147. package/src/utils/themeUtils.ts +40 -0
@@ -0,0 +1,83 @@
1
+ <template>
2
+ <SectionWrapper id="notes">
3
+ <template #header>
4
+ <div class="w-full flex justify-between items-center">
5
+ <h3 class="title4-bold">Notes</h3>
6
+ <Transition name="slide-up">
7
+ <Button
8
+ v-if="note && !isNoteInputShown"
9
+ @click="showNoteInput"
10
+ :disabled="disabled"
11
+ class="!w-6 !h-6 !p-2 !rounded-full items-center justify-center flex"
12
+ >
13
+ <Icon icon="mdi:pencil"></Icon>
14
+ </Button>
15
+ </Transition>
16
+ </div>
17
+ </template>
18
+ <div class="flex flex-row flex-nowrap w-full justify-start gap-5">
19
+ <transition mode="out-in" name="slide-up">
20
+ <ActionCard
21
+ v-if="!isNoteInputShown && !note"
22
+ title="Tell us about the collision"
23
+ icon="mdi:playlist-check"
24
+ content="Add notes about the collision and any details that you think are important for your record"
25
+ action="Add a note"
26
+ :disabled="disabled"
27
+ @action="showNoteInput"
28
+ ></ActionCard>
29
+ <div v-else-if="!note" class="w-full flex flex-nowrap items-center gap-2">
30
+ <textarea
31
+ ref="textarea"
32
+ v-model="input"
33
+ :disabled="disabled"
34
+ placeholder="Tell us about the collision"
35
+ class="bg-white border w-full border-gray-300 text-fontSecondary900 text-sm rounded-lg focus:ring-primary-200 focus:border-primary-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 pr-10 overflow-hidden"
36
+ />
37
+ <Button
38
+ :disabled="disabled"
39
+ class="!w-8 !h-8 !p-2 !rounded-full items-center justify-center flex"
40
+ @click="saveNote"
41
+ >
42
+ <Icon icon="mdi:send-outline"></Icon>
43
+ </Button>
44
+ </div>
45
+ <p class="body-1 break-words" v-else>{{ note }}</p>
46
+ </transition>
47
+ </div>
48
+ </SectionWrapper>
49
+ </template>
50
+
51
+ <script lang="ts" setup>
52
+ import { useTextareaAutosize, useVModel } from '@vueuse/core';
53
+ import { nextTick, ref } from 'vue';
54
+
55
+ import ActionCard from 'components/base/ActionCard.vue';
56
+ import SectionWrapper from 'components/claims-widget/components/accident/SectionWrapper.vue';
57
+ import Button from 'components/base/Button.vue';
58
+ import { Icon } from '@iconify/vue';
59
+
60
+ const props = defineProps<{
61
+ modelValue: string;
62
+ disabled?: boolean;
63
+ }>();
64
+ const emit = defineEmits<{
65
+ (e: 'update:modelValue', value: string): void;
66
+ }>();
67
+
68
+ const { textarea, input } = useTextareaAutosize();
69
+ const note = useVModel(props, 'modelValue', emit);
70
+ const isNoteInputShown = ref(false);
71
+
72
+ function showNoteInput() {
73
+ isNoteInputShown.value = true;
74
+ note.value = '';
75
+ }
76
+
77
+ function saveNote() {
78
+ note.value = input.value;
79
+ nextTick(() => {
80
+ isNoteInputShown.value = false;
81
+ });
82
+ }
83
+ </script>
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <section class="flex flex-col items-start w-full gap-3 mb-8">
3
+ <slot name="header">
4
+ <h3 class="title4-bold">{{ title }}</h3>
5
+ </slot>
6
+ <div class="flex flex-row flex-nowrap w-full justify-start gap-5">
7
+ <slot></slot>
8
+ </div>
9
+ </section>
10
+ </template>
11
+
12
+ <script lang="ts" setup>
13
+ defineProps<{
14
+ title?: string;
15
+ }>();
16
+ </script>
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <SectionWrapper id="your-vehicle">
3
+ <template #header>
4
+ <div class="w-full flex justify-between items-center">
5
+ <h3 class="title4-bold">Your Vehicle</h3>
6
+ <Button @click="openVehicleImageUpload" class="!w-6 !h-6 !p-2 !rounded-full items-center justify-center flex">
7
+ <Icon icon="mdi:pencil"></Icon>
8
+ </Button>
9
+ </div>
10
+ </template>
11
+ <ActionCard
12
+ v-if="!vehicleImages?.length"
13
+ title="Add photos of your vehicle"
14
+ icon="mdi:car-door"
15
+ content="Adding photos and details of the damage to your vehicle helps us to assess it earlier and find the right services for you, ultimately resulting in a more efficient repair"
16
+ action="Add photos"
17
+ @action="openVehicleImageUpload"
18
+ ></ActionCard>
19
+ <div v-else class="flex flex-wrap gap-4">
20
+ <img
21
+ :src="image"
22
+ width="120"
23
+ height="120"
24
+ :alt="`vehicle-damage${index}`"
25
+ class="rounded aspect-square object-cover"
26
+ v-for="(image, index) in vehicleImages"
27
+ :key="image"
28
+ />
29
+ </div>
30
+ <ImageUpload
31
+ v-model="isVehicleImageUploadOpen"
32
+ title="Add photos of your vehicle"
33
+ info="Adding details of the damage to your vehicle helps to ensure we can book your vehicle into the right services, and may help in any Insurance decisions should you wish to claim"
34
+ @imagesAdded="saveVehicleImages"
35
+ ></ImageUpload>
36
+ </SectionWrapper>
37
+ </template>
38
+
39
+ <script setup lang="ts">
40
+ import Button from 'components/base/Button.vue';
41
+ import ActionCard from 'components/base/ActionCard.vue';
42
+ import ImageUpload from 'components/base/uploader/ImageUpload.vue';
43
+ import SectionWrapper from './SectionWrapper.vue';
44
+
45
+ import { Icon } from '@iconify/vue';
46
+ import { ref } from 'vue';
47
+
48
+ const isVehicleImageUploadOpen = ref(false);
49
+ const vehicleImages = ref<string[]>([]);
50
+
51
+ function openVehicleImageUpload() {
52
+ isVehicleImageUploadOpen.value = true;
53
+ }
54
+ function saveVehicleImages(images: string[]) {
55
+ vehicleImages.value = images;
56
+ isVehicleImageUploadOpen.value = false;
57
+ }
58
+ </script>
59
+
60
+ <style scoped></style>
@@ -0,0 +1,42 @@
1
+ <template>
2
+ <section class="w-full mx-auto flex flex-col justify-start items-center content-center">
3
+ <button class="w-full flex flex-row mb-10 items-center" @click="emit('back')">
4
+ <Icon icon="mdi-light:chevron-left" height="32" />
5
+ <p class="title3-bold">Fire, Water, Theft or Vandalism</p>
6
+ </button>
7
+ <div class="flex flex-col items-center">
8
+ <Unsupported></Unsupported>
9
+ <div class="py-5 w-full flex flex-col items-center">
10
+ <div class="flex flex-col items-start">
11
+ <h2 class="title3-bold font-medium mb-4">For claims support please call us</h2>
12
+ <p class="body3 text-fontSecondary-500 mb-9">
13
+ We're sorry, we can't support reporting these types of claims online yet
14
+ </p>
15
+ <p class="body3 text-fontSecondary-500 mb-9">
16
+ To start a claim for an incident related to Fire, Water, Theft or Vandalism, please call us 0330 058 4077
17
+ </p>
18
+ </div>
19
+
20
+ <button
21
+ class="max-w-xs w-full title2-bold rounded bg-primary py-3 text-white hover:bg-primary hover:shadow-md duration-75 uppercase"
22
+ >
23
+ <div class="flex flex-row flex-nowrap w-full justify-center items-center">
24
+ Call Us
25
+ <Icon icon="mdi-light:chevron-right" height="32" />
26
+ </div>
27
+ </button>
28
+ </div>
29
+ </div>
30
+ </section>
31
+ </template>
32
+
33
+ <script setup lang="ts">
34
+ import { Icon } from '@iconify/vue';
35
+ import Unsupported from '../illustration/Unsupported.vue';
36
+
37
+ const emit = defineEmits<{
38
+ (event: 'back'): void;
39
+ }>();
40
+ </script>
41
+
42
+ <style scoped></style>