@eturnity/eturnity_reusable_components 9.19.4 → 9.19.5

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 (46) hide show
  1. package/package.json +25 -20
  2. package/src/DemoChart.vue +16 -16
  3. package/src/assets/svgIcons/3d_house.svg +3 -0
  4. package/src/assets/svgIcons/activities_app.svg +3 -0
  5. package/src/assets/svgIcons/apps_navigation.svg +3 -0
  6. package/src/assets/svgIcons/chevron_down.svg +3 -0
  7. package/src/assets/svgIcons/chevron_up.svg +3 -0
  8. package/src/assets/svgIcons/collapse_sidebar.svg +3 -0
  9. package/src/assets/svgIcons/consumption_profile.svg +3 -0
  10. package/src/assets/svgIcons/cross_filled.svg +3 -0
  11. package/src/assets/svgIcons/data_transfer.svg +2 -2
  12. package/src/assets/svgIcons/esdec.svg +3 -0
  13. package/src/assets/svgIcons/expand_sidebar.svg +3 -0
  14. package/src/assets/svgIcons/folder_unfilled.svg +3 -0
  15. package/src/assets/svgIcons/leads_app.svg +9 -0
  16. package/src/assets/svgIcons/library_app.svg +3 -0
  17. package/src/assets/svgIcons/mounting_system.svg +2 -2
  18. package/src/assets/svgIcons/projects_app.svg +9 -0
  19. package/src/assets/svgIcons/question_mark.svg +2 -2
  20. package/src/assets/svgIcons/recurring_costs.svg +3 -0
  21. package/src/assets/svgIcons/settings.svg +8 -2
  22. package/src/assets/svgIcons/shading_snow.svg +3 -0
  23. package/src/assets/svgIcons/signature.svg +3 -0
  24. package/src/assets/svgIcons/tariff_menu.svg +3 -0
  25. package/src/assets/svgIcons/zev_community_solar.svg +3 -0
  26. package/src/components/banner/actionBanner/index.vue +1 -1
  27. package/src/components/barchart/BottomFields.vue +5 -2
  28. package/src/components/barchart/ChartControls.vue +5 -5
  29. package/src/components/barchart/index.vue +7 -2
  30. package/src/components/buttons/buttonIcon/index.vue +9 -0
  31. package/src/components/buttons/mainButton/index.vue +26 -26
  32. package/src/components/buttons/splitButtons/index.vue +1 -1
  33. package/src/components/dropdown/index.vue +7 -7
  34. package/src/components/inputs/searchInput/SearchInput.stories.js +1 -1
  35. package/src/components/inputs/searchInput/searchInput.spec.js +1 -1
  36. package/src/components/inputs/select/index.vue +406 -79
  37. package/src/components/inputs/select/option/index.vue +9 -1
  38. package/src/components/modals/cookieConsent/CookieConsent.vue +4 -4
  39. package/src/components/navigationSideMenu/index.vue +1098 -0
  40. package/src/components/pageSubtitle/index.vue +1 -1
  41. package/src/components/projectMarker/ProjectMarker.stories.js +26 -36
  42. package/src/components/projectMarker/index.vue +172 -93
  43. package/src/components/tabsHeader/index.vue +9 -1
  44. package/src/components/videoThumbnail/index.vue +1 -1
  45. package/src/helpers/cookieHelper.js +23 -13
  46. package/src/helpers/dateTimeFormatting.js +0 -1
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <SubtitleText
3
- data-test-id="page_wrapper"
4
3
  :color="color"
4
+ data-test-id="page_wrapper"
5
5
  :has-info-text="!!infoText"
6
6
  :margin-bottom="marginBottom"
7
7
  >
@@ -9,7 +9,7 @@ export default {
9
9
  markerData: {
10
10
  control: 'object',
11
11
  description:
12
- 'Object containing marker data including translations and color',
12
+ 'Object containing marker data including translations, color, and choice (sold/lost/transferred)',
13
13
  },
14
14
  activeLanguage: {
15
15
  control: 'text',
@@ -19,9 +19,18 @@ export default {
19
19
  control: 'text',
20
20
  description: 'Optional date to display next to the marker',
21
21
  },
22
+ cursor: {
23
+ control: 'text',
24
+ description: 'Cursor style for the marker',
25
+ },
26
+ theme: {
27
+ control: false,
28
+ description: 'Optional theme object for sold/lost icon colors',
29
+ },
22
30
  isEditable: {
23
31
  control: 'boolean',
24
- description: 'Whether the marker can be edited',
32
+ description:
33
+ 'Whether the marker can be edited/deleted (shows three-dots menu)',
25
34
  },
26
35
  isGroupSupport: {
27
36
  control: 'boolean',
@@ -31,14 +40,6 @@ export default {
31
40
  control: 'boolean',
32
41
  description: 'Whether the user is a limited partner',
33
42
  },
34
- cursor: {
35
- control: 'text',
36
- description: 'Cursor style for the marker',
37
- },
38
- hasBorderRadius: {
39
- control: 'boolean',
40
- description: 'Whether to show border radius',
41
- },
42
43
  },
43
44
  }
44
45
 
@@ -48,9 +49,6 @@ const Template = (args) => ({
48
49
  return { args }
49
50
  },
50
51
  template: '<ProjectMarker v-bind="args" />',
51
- provide: {
52
- theme,
53
- },
54
52
  })
55
53
 
56
54
  export const Default = Template.bind({})
@@ -65,11 +63,11 @@ Default.args = {
65
63
  },
66
64
  activeLanguage: 'en-us',
67
65
  date: '23.07.2022',
66
+ cursor: 'pointer',
67
+ theme,
68
68
  isEditable: true,
69
69
  isGroupSupport: false,
70
70
  isLimitedPartner: false,
71
- cursor: 'pointer',
72
- hasBorderRadius: true,
73
71
  }
74
72
 
75
73
  export const Lost = Template.bind({})
@@ -81,8 +79,8 @@ Lost.args = {
81
79
  'en-us': { name: 'Lost' },
82
80
  },
83
81
  color: '#F44336',
84
- can_be_deleted: true,
85
82
  },
83
+ theme,
86
84
  }
87
85
 
88
86
  export const Transferred = Template.bind({})
@@ -94,7 +92,6 @@ Transferred.args = {
94
92
  'en-us': { name: 'Transferred' },
95
93
  },
96
94
  color: '#2196F3',
97
- can_be_deleted: true,
98
95
  },
99
96
  }
100
97
 
@@ -104,27 +101,20 @@ WithoutDate.args = {
104
101
  date: null,
105
102
  }
106
103
 
107
- export const NotEditable = Template.bind({})
108
- NotEditable.args = {
109
- ...Default.args,
110
- isEditable: false,
111
- }
112
-
113
- export const LimitedPartner = Template.bind({})
114
- LimitedPartner.args = {
115
- ...Default.args,
116
- isLimitedPartner: true,
117
- }
118
-
119
- export const WithGroupSupport = Template.bind({})
120
- WithGroupSupport.args = {
104
+ export const CustomColor = Template.bind({})
105
+ CustomColor.args = {
121
106
  ...Default.args,
122
- isGroupSupport: true,
123
- isLimitedPartner: true,
107
+ markerData: {
108
+ choice: null,
109
+ translations: {
110
+ 'en-us': { name: 'In progress' },
111
+ },
112
+ color: '#9C27B0',
113
+ },
124
114
  }
125
115
 
126
- export const WithoutBorderRadius = Template.bind({})
127
- WithoutBorderRadius.args = {
116
+ export const NotEditable = Template.bind({})
117
+ NotEditable.args = {
128
118
  ...Default.args,
129
- hasBorderRadius: false,
119
+ isEditable: false,
130
120
  }
@@ -1,35 +1,41 @@
1
1
  <template>
2
- <PageContainer>
3
- <MarkerContainer
2
+ <PageContainer :truncate-label="truncateLabel">
3
+ <PillWrapper
4
4
  v-if="markerData && markerData.translations[activeLanguage]"
5
- :background-color="markerData.color"
6
- :cursor="cursor"
7
- :has-border-radius="hasBorderRadius"
8
- :has-icon="!!iconName"
9
- :is-active="activated"
10
- :is-edition-allowed="editionAllowed"
5
+ :cursor="editionAllowed ? 'pointer' : cursor"
11
6
  :with-date="!!date"
12
- @click="editionAllowed ? (activated = !activated) : ''"
7
+ :truncate-label="truncateLabel"
8
+ @click="editionAllowed ? (activated = !activated) : null"
13
9
  >
14
- <Icon
15
- v-if="!!iconName"
16
- color="white"
17
- :cursor="cursor"
18
- :name="iconName"
19
- size="10px"
20
- />
21
- <span>{{
22
- markerData.translations[activeLanguage]
23
- ? markerData.translations[activeLanguage].name
24
- : '-'
25
- }}</span>
26
- <DotWrapper v-if="editionAllowed" class="dotContainer">
27
- <DotIcon />
28
- <DotIcon />
29
- <DotIcon />
30
- </DotWrapper>
10
+ <PillContent :truncate-label="truncateLabel">
11
+ <MarkerDotPill
12
+ v-if="!markerIcon"
13
+ :color="markerData.color || themeGrey3"
14
+ />
15
+ <Icon
16
+ v-if="markerIcon"
17
+ :color="markerIcon.color"
18
+ :cursor="cursor"
19
+ :name="markerIcon.name"
20
+ size="10px"
21
+ />
22
+ <MarkerName :truncate-label="truncateLabel">{{
23
+ markerData.translations[activeLanguage]
24
+ ? markerData.translations[activeLanguage].name
25
+ : '-'
26
+ }}</MarkerName>
27
+ <DotWrapper
28
+ v-if="editionAllowed"
29
+ class="dotContainer"
30
+ :class="{ visible: activated }"
31
+ >
32
+ <DotIcon />
33
+ <DotIcon />
34
+ <DotIcon />
35
+ </DotWrapper>
36
+ </PillContent>
31
37
  <EditContainer
32
- v-if="activated"
38
+ v-if="editionAllowed && activated"
33
39
  v-click-outside="clickOutsideActionHandler"
34
40
  >
35
41
  <EditItem @click="deleteModalOpened = !deleteModalOpened">
@@ -43,10 +49,10 @@
43
49
  <div>{{ $gettext('Edit') }}</div>
44
50
  </EditItem>
45
51
  </EditContainer>
46
- </MarkerContainer>
47
- <Date v-if="!!date">
52
+ </PillWrapper>
53
+ <PillDate v-if="!!date">
48
54
  {{ date }}
49
- </Date>
55
+ </PillDate>
50
56
  <Modal
51
57
  :is-open="deleteModalOpened"
52
58
  :prevent-outside-close="true"
@@ -73,14 +79,15 @@
73
79
  // import ProjectMarker from "@eturnity/eturnity_reusable_components/src/components/projectMarker"
74
80
  // To use:
75
81
  // <project-marker
76
- // :activeLanguage="'en-us'"
77
- // :markerData="{"choice":"sold","translations":{"en-us":{"name":"Sold"}}","color":"#000"}"
78
- // :isLimitedPartner="false"
79
- // :isGroupSupport="false"
80
- // :isEditable='false'
81
- // :date="'23.07.2022'"
82
- // @editHandler="onMarkerEdit($event)"
83
- // @deleteHandler="onMarkerDelete($event)"
82
+ // :active-language="'en-us'"
83
+ // :marker-data="{ choice, color, translations, can_be_deleted }"
84
+ // :date="'23.07.2022'" (optional)
85
+ // :theme="theme" (optional)
86
+ // :is-editable="true"
87
+ // :is-limited-partner="false"
88
+ // :is-group-support="false"
89
+ // @edit-handler="onEdit"
90
+ // @delete-handler="onDelete"
84
91
  // />
85
92
 
86
93
  import styled from 'vue3-styled-components'
@@ -92,11 +99,18 @@
92
99
  import PageSubtitle from '../pageSubtitle'
93
100
  import MainButton from '../buttons/mainButton'
94
101
 
95
- const PageContainer = styled.div`
102
+ const PageContainerProps = { truncateLabel: Boolean }
103
+ const PageContainer = styled('div', PageContainerProps)`
96
104
  display: flex;
97
105
  align-items: center;
98
106
  font-size: 12px;
99
107
  line-height: 14px;
108
+ ${(props) =>
109
+ props.truncateLabel &&
110
+ `
111
+ min-width: 0;
112
+ max-width: 100%;
113
+ `}
100
114
  `
101
115
 
102
116
  const ModalContainer = styled.div`
@@ -110,47 +124,66 @@
110
124
  margin-top: 30px;
111
125
  `
112
126
 
113
- const MarkerAttrs = {
114
- hasBorderRadius: Boolean,
115
- backgroundColor: String,
127
+ const PillWrapperProps = {
116
128
  withDate: Boolean,
117
- hasIcon: Boolean,
118
- isEditionAllowed: Boolean,
119
- isActive: Boolean,
120
129
  cursor: String,
130
+ truncateLabel: Boolean,
121
131
  }
122
- const MarkerContainer = styled('div', MarkerAttrs)`
123
- display: grid;
124
- grid-template-columns: ${(props) =>
125
- props.hasIcon || props.isEditionAllowed ? 'auto 1fr' : '1fr'};
126
- grid-gap: 5px;
132
+ const PillWrapper = styled('div', PillWrapperProps)`
127
133
  position: relative;
134
+ display: flex;
135
+ gap: 8px;
128
136
  align-items: center;
129
- padding: 2px 7px;
130
- color: ${(props) => props.theme.colors.white};
131
- background-color: ${(props) =>
132
- props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
137
+ ${(props) =>
138
+ props.truncateLabel &&
139
+ `
140
+ flex: 1 1 0;
141
+ min-width: 0;
142
+ `}
143
+ font-size: 12px;
144
+ font-weight: 400;
133
145
  border: 1px solid
134
146
  ${(props) =>
135
- props.backgroundColor
136
- ? props.backgroundColor
137
- : props.theme.colors.grey3};
138
- border-radius: ${(props) =>
139
- props.hasBorderRadius ? (props.withDate ? '4px 0 0 4px' : '4px') : '0'};
140
- white-space: nowrap;
141
- cursor: ${(props) => (props.isEditionAllowed ? 'pointer' : props.cursor)};
147
+ props.theme.semanticColors?.teal?.[100] || props.theme.colors.grey4};
148
+ padding: 2px 8px;
149
+ border-radius: ${(props) => (props.withDate ? '8px 0 0 8px' : '8px')};
150
+ color: ${(props) =>
151
+ props.theme.semanticColors?.teal?.[800] || props.theme.colors.black};
152
+ cursor: ${(props) => props.cursor || 'default'};
153
+ `
154
+
155
+ const PillContentProps = { truncateLabel: Boolean }
156
+ const PillContent = styled('div', PillContentProps)`
157
+ display: flex;
158
+ gap: 8px;
159
+ align-items: center;
160
+ ${(props) =>
161
+ props.truncateLabel &&
162
+ `
163
+ flex: 1 1 0;
164
+ min-width: 0;
165
+ `}
142
166
 
143
167
  .dotContainer {
144
- display: ${(props) => (props.isActive ? 'flex' : 'none')};
168
+ display: none;
145
169
  }
146
170
 
147
- &:hover {
148
- .dotContainer {
149
- display: flex;
150
- }
171
+ &:hover .dotContainer,
172
+ .dotContainer.visible {
173
+ display: flex;
151
174
  }
152
175
  `
153
176
 
177
+ const MarkerDotPillProps = {
178
+ color: String,
179
+ }
180
+ const MarkerDotPill = styled('div', MarkerDotPillProps)`
181
+ width: 9px;
182
+ height: 9px;
183
+ border-radius: 100%;
184
+ background-color: ${(props) => props.color};
185
+ `
186
+
154
187
  const DotWrapper = styled.div`
155
188
  display: flex;
156
189
  gap: 2px;
@@ -161,13 +194,16 @@
161
194
  width: 4px;
162
195
  height: 4px;
163
196
  border-radius: 100%;
164
- background-color: ${(props) => props.theme.colors.white};
197
+ background-color: ${(props) =>
198
+ props.theme.semanticColors?.grey?.[600] || props.theme.colors.grey6};
165
199
  `
166
200
 
167
201
  const EditContainer = styled.div`
168
202
  position: absolute;
169
203
  z-index: 99;
170
- top: 22px;
204
+ top: 100%;
205
+ left: 0;
206
+ margin-top: 4px;
171
207
  display: grid;
172
208
  background-color: ${(props) => props.theme.colors.white};
173
209
  border: 1px solid ${(props) => props.theme.colors.grey4};
@@ -194,11 +230,37 @@
194
230
  line-height: 0;
195
231
  `
196
232
 
197
- const Date = styled.div`
198
- padding: 2px 5px;
199
- border: 1px solid ${(props) => props.theme.colors.grey4};
200
- border-left: none;
201
- border-radius: 0 4px 4px 0;
233
+ const PillDate = styled.div`
234
+ flex-shrink: 0;
235
+ border-top: 1px solid
236
+ ${(props) =>
237
+ props.theme.semanticColors?.teal?.[100] || props.theme.colors.grey4};
238
+ border-right: 1px solid
239
+ ${(props) =>
240
+ props.theme.semanticColors?.teal?.[100] || props.theme.colors.grey4};
241
+ border-bottom: 1px solid
242
+ ${(props) =>
243
+ props.theme.semanticColors?.teal?.[100] || props.theme.colors.grey4};
244
+ border-radius: 0 8px 8px 0;
245
+ padding: 2px 8px;
246
+ white-space: nowrap;
247
+ font-size: 12px;
248
+ font-weight: 400;
249
+ color: ${(props) =>
250
+ props.theme.semanticColors?.grey?.[800] || props.theme.colors.grey6};
251
+ `
252
+
253
+ const MarkerNameProps = { truncateLabel: Boolean }
254
+ const MarkerName = styled('div', MarkerNameProps)`
255
+ overflow: hidden;
256
+ text-overflow: ellipsis;
257
+ white-space: nowrap;
258
+ ${(props) =>
259
+ props.truncateLabel &&
260
+ `
261
+ flex: 1 1 0;
262
+ min-width: 0;
263
+ `}
202
264
  `
203
265
 
204
266
  export default {
@@ -208,7 +270,9 @@
208
270
  },
209
271
  components: {
210
272
  PageContainer,
211
- MarkerContainer,
273
+ PillWrapper,
274
+ PillContent,
275
+ MarkerDotPill,
212
276
  DotWrapper,
213
277
  DotIcon,
214
278
  EditContainer,
@@ -222,7 +286,8 @@
222
286
  PageTitle,
223
287
  PageSubtitle,
224
288
  MainButton,
225
- Date,
289
+ PillDate,
290
+ MarkerName,
226
291
  },
227
292
  props: {
228
293
  markerData: {
@@ -235,25 +300,31 @@
235
300
  required: false,
236
301
  default: null,
237
302
  },
238
- isEditable: {
303
+ cursor: {
239
304
  required: false,
305
+ default: 'default',
306
+ },
307
+ /** Optional theme (e.g. from @/assets/theme) for sold/lost icon colors */
308
+ theme: {
309
+ type: Object,
310
+ default: null,
311
+ },
312
+ isEditable: {
313
+ type: Boolean,
240
314
  default: false,
241
315
  },
242
316
  isGroupSupport: {
243
- required: false,
317
+ type: Boolean,
244
318
  default: false,
245
319
  },
246
320
  isLimitedPartner: {
247
- required: false,
321
+ type: Boolean,
248
322
  default: false,
249
323
  },
250
- cursor: {
251
- required: false,
252
- default: 'default',
253
- },
254
- hasBorderRadius: {
255
- required: false,
256
- default: true,
324
+ /** When true, label ellipsizes inside a width-constrained parent (e.g. dropdown rows). */
325
+ truncateLabel: {
326
+ type: Boolean,
327
+ default: false,
257
328
  },
258
329
  },
259
330
  data() {
@@ -270,16 +341,24 @@
270
341
  this.isEditable
271
342
  )
272
343
  },
273
- iconName() {
344
+ /** sold => checkmark (green), lost => cross_filled (red) */
345
+ markerIcon() {
274
346
  if (this.markerData.choice === 'sold') {
275
- return 'all_good'
276
- } else if (this.markerData.choice === 'lost') {
277
- return 'cross'
278
- } else if (this.markerData.choice === 'transferred') {
279
- return 'transfer'
280
- } else {
281
- return ''
347
+ return {
348
+ name: 'checkmark',
349
+ color: this.theme?.semanticColors?.green?.[400] || '#22c55e',
350
+ }
282
351
  }
352
+ if (this.markerData.choice === 'lost') {
353
+ return {
354
+ name: 'cross_filled',
355
+ color: this.theme?.semanticColors?.red?.[400] || '#ef4444',
356
+ }
357
+ }
358
+ return null
359
+ },
360
+ themeGrey3() {
361
+ return this.theme?.colors?.grey3 || '#b2b9c5'
283
362
  },
284
363
  },
285
364
  methods: {
@@ -169,6 +169,11 @@
169
169
  type: Boolean,
170
170
  default: true,
171
171
  },
172
+ /** When true, emit on-tab-change even when clicking the currently active tab */
173
+ emitWhenActiveTabClicked: {
174
+ type: Boolean,
175
+ default: false,
176
+ },
172
177
  },
173
178
  emits: ['on-tab-change'],
174
179
  data() {
@@ -178,7 +183,10 @@
178
183
  },
179
184
  methods: {
180
185
  onTabClick({ id, isDisabled }) {
181
- if (id === this.activeTab || isDisabled) {
186
+ if (isDisabled) {
187
+ return
188
+ }
189
+ if (id === this.activeTab && !this.emitWhenActiveTabClicked) {
182
190
  return
183
191
  }
184
192
  this.$emit('on-tab-change', id)
@@ -83,7 +83,7 @@
83
83
  mounted() {
84
84
  document.addEventListener('click', this.clickOutside)
85
85
  },
86
- beforeDestroy() {
86
+ beforeUnmount() {
87
87
  document.removeEventListener('click', this.clickOutside)
88
88
  },
89
89
  methods: {
@@ -19,9 +19,13 @@ let consentBridgeAppType = null
19
19
  let parentCookieSyncOrigin = null
20
20
 
21
21
  function hasKnownParentCookieSyncOrigin() {
22
- const hasKnownOrigin = typeof parentCookieSyncOrigin === 'string' && parentCookieSyncOrigin.trim() !== ''
22
+ const hasKnownOrigin =
23
+ typeof parentCookieSyncOrigin === 'string' &&
24
+ parentCookieSyncOrigin.trim() !== ''
23
25
  if (!hasKnownOrigin) {
24
- console.warn('[cookieHelper] Cannot sync cookie to parent: origin unknown. Skipping.')
26
+ console.warn(
27
+ '[cookieHelper] Cannot sync cookie to parent: origin unknown. Skipping.'
28
+ )
25
29
  }
26
30
  return hasKnownOrigin
27
31
  }
@@ -66,8 +70,12 @@ function getCookieAttributes() {
66
70
  export function setupParentCookieSyncListener(options = {}) {
67
71
  if (typeof window === 'undefined' || !isRunningInIframe()) return
68
72
 
69
- consentBridgeAppType = typeof options?.consentBridgeAppType === 'string' ? options.consentBridgeAppType : null
70
- const onCookieSync = typeof options?.onCookieSync === 'function' ? options.onCookieSync : null
73
+ consentBridgeAppType =
74
+ typeof options?.consentBridgeAppType === 'string'
75
+ ? options.consentBridgeAppType
76
+ : null
77
+ const onCookieSync =
78
+ typeof options?.onCookieSync === 'function' ? options.onCookieSync : null
71
79
  parentCookieSyncOrigin =
72
80
  typeof options?.parentOrigin === 'string' && options.parentOrigin.trim()
73
81
  ? options.parentOrigin.trim()
@@ -139,7 +147,12 @@ export function setCookieWithThirdPartyFallback(cookieName, cookieValue) {
139
147
  // If the cookie value is not immediately readable after
140
148
  // document.cookie = cookieStr (common in third-party iframes), we keep the intended
141
149
  // value in syncedCookieFallback and notify the parent to persist it.
142
- if (!cookieName || typeof cookieName !== 'string' || typeof cookieValue !== 'string') return
150
+ if (
151
+ !cookieName ||
152
+ typeof cookieName !== 'string' ||
153
+ typeof cookieValue !== 'string'
154
+ )
155
+ return
143
156
 
144
157
  const expiryDate = new Date()
145
158
  expiryDate.setMonth(expiryDate.getMonth() + 6)
@@ -164,8 +177,8 @@ export function setCookieWithThirdPartyFallback(cookieName, cookieValue) {
164
177
  type: `eturnity_${consentBridgeAppType}_cookie_fallback`,
165
178
  payload: {
166
179
  cookieName,
167
- cookieValue
168
- }
180
+ cookieValue,
181
+ },
169
182
  },
170
183
  parentCookieSyncOrigin
171
184
  )
@@ -193,7 +206,7 @@ export function deleteCookieWithThirdPartyFallback(cookieName) {
193
206
  window.parent.postMessage(
194
207
  {
195
208
  type: `eturnity_${consentBridgeAppType}_cookie_delete`,
196
- payload: { cookieName }
209
+ payload: { cookieName },
197
210
  },
198
211
  parentCookieSyncOrigin
199
212
  )
@@ -207,10 +220,7 @@ export function saveCookieConsent(categories) {
207
220
  const cookieData = {
208
221
  categories,
209
222
  timestamp: new Date().toISOString(),
210
- consent_given: true
223
+ consent_given: true,
211
224
  }
212
- setCookieWithThirdPartyFallback(
213
- 'cookieConsent',
214
- JSON.stringify(cookieData)
215
- )
225
+ setCookieWithThirdPartyFallback('cookieConsent', JSON.stringify(cookieData))
216
226
  }
@@ -11,7 +11,6 @@ export const toLocaleDate = ({
11
11
  month: 'numeric',
12
12
  day: 'numeric',
13
13
  }
14
-
15
14
  return new Intl.DateTimeFormat(localeLC, options).format(Date.parse(value))
16
15
  }
17
16