@energysage/es-ds-components 0.0.1 → 3.0.0-alpha.10

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 (234) hide show
  1. package/.eslintignore +9 -0
  2. package/.eslintrc.json +3 -0
  3. package/.prettierrc.json +10 -0
  4. package/README.md +0 -3
  5. package/components/es-accordion-list.vue +117 -0
  6. package/components/es-accordion.vue +7 -0
  7. package/components/es-badge.vue +20 -0
  8. package/components/es-breadcrumbs.vue +73 -0
  9. package/components/es-button.vue +122 -0
  10. package/components/es-card.vue +64 -0
  11. package/components/es-carousel.vue +316 -0
  12. package/components/es-col.vue +27 -0
  13. package/components/es-collapse.vue +83 -0
  14. package/components/es-container.vue +14 -0
  15. package/components/es-cta-banner.vue +95 -0
  16. package/components/es-cta-card.vue +60 -0
  17. package/components/es-data-table-simple.vue +73 -0
  18. package/components/es-data-table.vue +128 -0
  19. package/components/es-error-page.vue +120 -0
  20. package/components/es-file-input.vue +334 -0
  21. package/components/es-file-preview-modal.vue +61 -0
  22. package/components/es-footer.vue +163 -0
  23. package/components/es-form-checkbox.vue +40 -0
  24. package/components/es-form-input.vue +130 -0
  25. package/components/es-form-msg.vue +81 -0
  26. package/components/es-form-radio-card.vue +57 -0
  27. package/components/es-form-radio-cards.vue +78 -0
  28. package/components/es-form-textarea.vue +124 -0
  29. package/components/es-form.vue +16 -0
  30. package/components/es-modal.vue +103 -0
  31. package/components/es-nav-bar-account-menu.vue +70 -0
  32. package/components/es-nav-bar-featured-article.vue +60 -0
  33. package/components/es-nav-bar-link.vue +27 -0
  34. package/components/es-nav-bar-product-menu.vue +219 -0
  35. package/components/es-nav-bar-top-level-menu.vue +194 -0
  36. package/components/es-nav-bar-topic-menu.vue +197 -0
  37. package/components/es-nav-bar.vue +411 -0
  38. package/components/es-pagination.vue +67 -0
  39. package/components/es-popover.vue +113 -0
  40. package/components/es-progress-circle.vue +81 -0
  41. package/components/es-progress.vue +36 -0
  42. package/components/es-radio-button-group.vue +53 -0
  43. package/components/es-radio-button.vue +57 -0
  44. package/components/es-rating.vue +120 -0
  45. package/components/es-reviews-io-card-carousel.vue +279 -0
  46. package/components/es-row.vue +5 -0
  47. package/components/es-skeleton-img.vue +38 -0
  48. package/components/es-skeleton-wrapper.vue +17 -0
  49. package/components/es-skeleton.vue +97 -0
  50. package/components/es-slider.vue +218 -0
  51. package/components/es-spinner.vue +22 -0
  52. package/components/es-support-card.vue +150 -0
  53. package/components/es-support.vue +66 -0
  54. package/components/es-tab.vue +7 -0
  55. package/components/es-tabs.vue +70 -0
  56. package/components/es-verification-code.vue +94 -0
  57. package/components/es-video.vue +60 -0
  58. package/components/es-view-more.vue +64 -0
  59. package/components/es-zip-code-form.vue +204 -0
  60. package/components/icon/arrow-clockwise.vue +51 -0
  61. package/components/icon/arrow-counter-clockwise.vue +37 -0
  62. package/components/icon/arrow-cycle.vue +43 -0
  63. package/components/icon/arrow-left.vue +39 -0
  64. package/components/icon/arrow-right.vue +39 -0
  65. package/components/icon/arrow-up.vue +39 -0
  66. package/components/icon/arrow.vue +68 -0
  67. package/components/icon/bank.vue +38 -0
  68. package/components/icon/battery.vue +40 -0
  69. package/components/icon/bell.vue +42 -0
  70. package/components/icon/block.vue +46 -0
  71. package/components/icon/bolt.vue +38 -0
  72. package/components/icon/business.vue +42 -0
  73. package/components/icon/calculator.vue +37 -0
  74. package/components/icon/calendar.vue +46 -0
  75. package/components/icon/cart.vue +46 -0
  76. package/components/icon/chat-add.vue +44 -0
  77. package/components/icon/chat-approve.vue +42 -0
  78. package/components/icon/chat-bubble.vue +40 -0
  79. package/components/icon/chat-dots.vue +42 -0
  80. package/components/icon/check.vue +39 -0
  81. package/components/icon/chevron-down.vue +39 -0
  82. package/components/icon/chevron-horizontal.vue +39 -0
  83. package/components/icon/chevron-left.vue +39 -0
  84. package/components/icon/chevron-right.vue +39 -0
  85. package/components/icon/chevron-up.vue +39 -0
  86. package/components/icon/circle-alert.vue +46 -0
  87. package/components/icon/circle-check.vue +46 -0
  88. package/components/icon/circle-chevron-down.vue +47 -0
  89. package/components/icon/circle-chevron-left.vue +46 -0
  90. package/components/icon/circle-chevron-right.vue +46 -0
  91. package/components/icon/circle-chevron-up.vue +46 -0
  92. package/components/icon/circle-minus.vue +46 -0
  93. package/components/icon/circle-plus.vue +46 -0
  94. package/components/icon/circle-x.vue +46 -0
  95. package/components/icon/circle.vue +42 -0
  96. package/components/icon/clock.vue +46 -0
  97. package/components/icon/community-solar.vue +37 -0
  98. package/components/icon/companies.vue +43 -0
  99. package/components/icon/contact-us.vue +37 -0
  100. package/components/icon/copy.vue +45 -0
  101. package/components/icon/credit-card.vue +37 -0
  102. package/components/icon/document.vue +45 -0
  103. package/components/icon/electric-vehicle.vue +37 -0
  104. package/components/icon/electricity-circle.vue +39 -0
  105. package/components/icon/envelope.vue +45 -0
  106. package/components/icon/es-leaf.vue +39 -0
  107. package/components/icon/eye.vue +41 -0
  108. package/components/icon/facebook.vue +41 -0
  109. package/components/icon/file-doc.vue +72 -0
  110. package/components/icon/file-docx.vue +72 -0
  111. package/components/icon/file-pdf.vue +72 -0
  112. package/components/icon/flag.vue +37 -0
  113. package/components/icon/folder.vue +41 -0
  114. package/components/icon/gear.vue +37 -0
  115. package/components/icon/gift.vue +37 -0
  116. package/components/icon/hamburger.vue +38 -0
  117. package/components/icon/heart.vue +39 -0
  118. package/components/icon/heat-pump.vue +41 -0
  119. package/components/icon/image.vue +45 -0
  120. package/components/icon/info-blog-post.vue +47 -0
  121. package/components/icon/info.vue +45 -0
  122. package/components/icon/instagram.vue +49 -0
  123. package/components/icon/light-bulb.vue +36 -0
  124. package/components/icon/link-out.vue +38 -0
  125. package/components/icon/linkedin.vue +41 -0
  126. package/components/icon/location.vue +45 -0
  127. package/components/icon/lock-off.vue +45 -0
  128. package/components/icon/lock-on.vue +48 -0
  129. package/components/icon/marketplace.vue +43 -0
  130. package/components/icon/minus.vue +38 -0
  131. package/components/icon/money-bag.vue +37 -0
  132. package/components/icon/money.vue +35 -0
  133. package/components/icon/open-envelope.vue +45 -0
  134. package/components/icon/paper.vue +45 -0
  135. package/components/icon/payback.vue +37 -0
  136. package/components/icon/pencil.vue +45 -0
  137. package/components/icon/person-add.vue +41 -0
  138. package/components/icon/person-check.vue +41 -0
  139. package/components/icon/person-cross.vue +41 -0
  140. package/components/icon/person.vue +41 -0
  141. package/components/icon/phone.vue +41 -0
  142. package/components/icon/play.vue +41 -0
  143. package/components/icon/plus.vue +38 -0
  144. package/components/icon/roof.vue +37 -0
  145. package/components/icon/rooftop-solar.vue +37 -0
  146. package/components/icon/saving.vue +37 -0
  147. package/components/icon/search.vue +43 -0
  148. package/components/icon/settings-horizontal.vue +57 -0
  149. package/components/icon/settings-vertical.vue +57 -0
  150. package/components/icon/shield-with-check.vue +38 -0
  151. package/components/icon/shield.vue +41 -0
  152. package/components/icon/shopping-bag.vue +39 -0
  153. package/components/icon/solar.vue +37 -0
  154. package/components/icon/sound-down.vue +45 -0
  155. package/components/icon/sound-off.vue +41 -0
  156. package/components/icon/sound-on.vue +41 -0
  157. package/components/icon/sound-up.vue +41 -0
  158. package/components/icon/star-empty.vue +38 -0
  159. package/components/icon/star-full.vue +36 -0
  160. package/components/icon/star-half.vue +55 -0
  161. package/components/icon/state-ak.vue +53 -0
  162. package/components/icon/state-al.vue +38 -0
  163. package/components/icon/state-ar.vue +38 -0
  164. package/components/icon/state-az.vue +38 -0
  165. package/components/icon/state-ca.vue +38 -0
  166. package/components/icon/state-co.vue +38 -0
  167. package/components/icon/state-ct.vue +38 -0
  168. package/components/icon/state-dc.vue +52 -0
  169. package/components/icon/state-de.vue +38 -0
  170. package/components/icon/state-fl.vue +38 -0
  171. package/components/icon/state-ga.vue +38 -0
  172. package/components/icon/state-hi.vue +59 -0
  173. package/components/icon/state-ia.vue +38 -0
  174. package/components/icon/state-id.vue +38 -0
  175. package/components/icon/state-il.vue +38 -0
  176. package/components/icon/state-in.vue +38 -0
  177. package/components/icon/state-ks.vue +38 -0
  178. package/components/icon/state-ky.vue +38 -0
  179. package/components/icon/state-la.vue +38 -0
  180. package/components/icon/state-ma.vue +38 -0
  181. package/components/icon/state-md.vue +39 -0
  182. package/components/icon/state-me.vue +38 -0
  183. package/components/icon/state-mi.vue +38 -0
  184. package/components/icon/state-mn.vue +38 -0
  185. package/components/icon/state-mo.vue +38 -0
  186. package/components/icon/state-ms.vue +38 -0
  187. package/components/icon/state-mt.vue +38 -0
  188. package/components/icon/state-nc.vue +38 -0
  189. package/components/icon/state-nd.vue +38 -0
  190. package/components/icon/state-ne.vue +38 -0
  191. package/components/icon/state-nh.vue +38 -0
  192. package/components/icon/state-nj.vue +37 -0
  193. package/components/icon/state-nm.vue +38 -0
  194. package/components/icon/state-nv.vue +38 -0
  195. package/components/icon/state-ny.vue +41 -0
  196. package/components/icon/state-oh.vue +38 -0
  197. package/components/icon/state-ok.vue +38 -0
  198. package/components/icon/state-or.vue +38 -0
  199. package/components/icon/state-pa.vue +38 -0
  200. package/components/icon/state-ri.vue +38 -0
  201. package/components/icon/state-sc.vue +38 -0
  202. package/components/icon/state-sd.vue +38 -0
  203. package/components/icon/state-tn.vue +38 -0
  204. package/components/icon/state-tx.vue +38 -0
  205. package/components/icon/state-ut.vue +38 -0
  206. package/components/icon/state-va.vue +38 -0
  207. package/components/icon/state-vt.vue +38 -0
  208. package/components/icon/state-wa.vue +38 -0
  209. package/components/icon/state-wi.vue +38 -0
  210. package/components/icon/state-wv.vue +38 -0
  211. package/components/icon/state-wy.vue +38 -0
  212. package/components/icon/thumbs-up.vue +39 -0
  213. package/components/icon/trash-can.vue +41 -0
  214. package/components/icon/tree.vue +37 -0
  215. package/components/icon/twitter.vue +43 -0
  216. package/components/icon/upload.vue +41 -0
  217. package/components/icon/verified.vue +40 -0
  218. package/components/icon/video-play.vue +41 -0
  219. package/components/icon/wifi.vue +38 -0
  220. package/components/icon/x.vue +38 -0
  221. package/components/icon/youtube.vue +45 -0
  222. package/composables/forms.ts +124 -0
  223. package/nuxt.config.ts +83 -1
  224. package/package.json +47 -13
  225. package/tsconfig.json +4 -0
  226. package/types/es-carousel.ts +12 -0
  227. package/types/index.ts +1 -0
  228. package/utils/forms.ts +120 -0
  229. package/utils/get-es-footer-content.ts +90 -0
  230. package/utils/get-es-nav-bar-account-content.ts +55 -0
  231. package/utils/get-es-nav-bar-global-content.ts +482 -0
  232. package/utils/mime-type-finder.ts +48 -0
  233. package/utils/vuelidate-keys.ts +39 -0
  234. package/components/TestComponent.vue +0 -5
@@ -0,0 +1,55 @@
1
+ // rooftop account links
2
+ export default (
3
+ ES_DOMAIN = process.env.ES_DOMAIN || 'https://www.energysage.com',
4
+ ACCOUNTS_DOMAIN = process.env.ACCOUNTS_DOMAIN || 'https://accounts.energysage.com',
5
+ REGISTER_LINK = process.env.REGISTER_LINK || `${ACCOUNTS_DOMAIN}/register/?next=${ES_DOMAIN}/register-thanks/`,
6
+ ) => ({
7
+ mobileAccountButtonAltText: 'Open account menu',
8
+ loggedIn: {
9
+ items: [
10
+ {
11
+ name: 'My profile',
12
+ link: `${ES_DOMAIN}/profile/`,
13
+ },
14
+ {
15
+ name: 'My quotes',
16
+ link: `${ES_DOMAIN}/your-marketplace/`,
17
+ },
18
+ {
19
+ name: 'My messages',
20
+ link: `${ES_DOMAIN}/message/`,
21
+ },
22
+ {
23
+ name: 'My project preferences',
24
+ link: `${ES_DOMAIN}/market/solarpv/update/`,
25
+ },
26
+ {
27
+ name: 'Account settings',
28
+ link: `${ES_DOMAIN}/account-settings/router/`,
29
+ },
30
+ {
31
+ name: 'How it works',
32
+ link: `${ES_DOMAIN}/market-process/`,
33
+ },
34
+ {
35
+ name: 'Write a review',
36
+ link: `${ES_DOMAIN}/share-your-experience/`,
37
+ },
38
+ {
39
+ name: 'Sign out',
40
+ link: `${ES_DOMAIN}/logout/`,
41
+ },
42
+ ],
43
+ },
44
+ loggedOut: {
45
+ menuButtonText: 'Sign in',
46
+ signIn: {
47
+ name: 'Sign in',
48
+ link: `${ES_DOMAIN}/login/`,
49
+ },
50
+ createAccount: {
51
+ name: 'Create an account',
52
+ link: REGISTER_LINK,
53
+ },
54
+ },
55
+ });
@@ -0,0 +1,482 @@
1
+ /* eslint-disable no-unused-vars */
2
+ /* eslint-disable @typescript-eslint/no-unused-vars */
3
+ const NAV_BAR_ICONS = {
4
+ CALCULATOR: 'calculator',
5
+ ES_LEAF: 'es-leaf',
6
+ LIGHT_BULB: 'light-bulb',
7
+ };
8
+
9
+ export default (
10
+ ES_DOMAIN = process.env.ES_DOMAIN || 'https://www.energysage.com',
11
+ // exposed separately from ES_DOMAIN in case we want to use prod for images in local/dev
12
+ ES_IMAGE_DOMAIN = process.env.ES_IMAGE_DOMAIN || 'https://www.energysage.com',
13
+ // keeping NEWS_DOMAIN to minimize breaking change, but it is deprecated
14
+ NEWS_DOMAIN = process.env.NEWS_DOMAIN || 'https://www.energysage.com',
15
+ COMMUNITY_SOLAR_DOMAIN = process.env.COMMUNITY_SOLAR_DOMAIN || 'https://communitysolar.energysage.com',
16
+ HEAT_PUMPS_DOMAIN = process.env.HEAT_PUMPS_DOMAIN || 'https://heatpumps.energysage.com',
17
+ EV_RAIVEN_DOMAIN = 'https://shop.energysage.com/',
18
+ ) => ({
19
+ home: {
20
+ name: 'EnergySage',
21
+ link: ES_DOMAIN,
22
+ },
23
+ mainMenuText: 'Main menu',
24
+ mobileCloseButtonAltText: 'Close',
25
+ mobileNavButtonAltText: 'Open navigation menu',
26
+ seeAllText: 'See all',
27
+ topLevelMenus: [
28
+ {
29
+ name: 'Tips & guides',
30
+ subHeading: 'Learn from experts',
31
+ icon: NAV_BAR_ICONS.LIGHT_BULB,
32
+ topics: [
33
+ {
34
+ name: 'Solar',
35
+ subtopics: [
36
+ {
37
+ name: 'Home solar guide',
38
+ link: `${ES_DOMAIN}/solar/`,
39
+ },
40
+ {
41
+ name: 'Community solar guide',
42
+ link: `${ES_DOMAIN}/community-solar/`,
43
+ },
44
+ {
45
+ name: 'Best solar panels',
46
+ link: `${ES_DOMAIN}/solar/best-solar-panels-complete-ranking/`,
47
+ },
48
+ {
49
+ name: 'How much do solar panels cost?',
50
+ link: `${ES_DOMAIN}/local-data/solar-panel-cost/`,
51
+ },
52
+ ],
53
+ },
54
+ {
55
+ name: 'Backup power',
56
+ subtopics: [
57
+ {
58
+ name: 'Backup power guide',
59
+ link: `${ES_DOMAIN}/energy-storage/`,
60
+ },
61
+ {
62
+ name: 'Best home batteries',
63
+ link: `${ES_DOMAIN}/energy-storage/best-home-batteries/`,
64
+ },
65
+ {
66
+ name: 'Home batteries vs. generators',
67
+ // eslint-disable-next-line max-len
68
+ link: `${ES_DOMAIN}/energy-storage/battery-backup-power-vs-generators-which-is-right-for-you/`,
69
+ },
70
+ ],
71
+ },
72
+ {
73
+ name: 'Heating & cooling',
74
+ subtopics: [
75
+ {
76
+ name: 'Heat pump guide',
77
+ link: `${ES_DOMAIN}/heat-pumps/`,
78
+ },
79
+ {
80
+ name: 'How much do heat pumps cost?',
81
+ // eslint-disable-next-line max-len
82
+ link: `${ES_DOMAIN}/heat-pumps/costs-and-benefits-air-source-heat-pumps/`,
83
+ },
84
+ {
85
+ name: 'How do heat pumps work?',
86
+ link: `${ES_DOMAIN}/heat-pumps/how-do-heat-pumps-work/`,
87
+ },
88
+ ],
89
+ },
90
+ {
91
+ name: 'Electric vehicles',
92
+ subtopics: [
93
+ {
94
+ name: 'EV charging guide',
95
+ link: `${ES_DOMAIN}/ev-charging/`,
96
+ },
97
+ {
98
+ name: 'Electric vehicles guide',
99
+ link: `${ES_DOMAIN}/electric-vehicles/`,
100
+ },
101
+ {
102
+ name: 'Best EV chargers',
103
+ link: `${ES_DOMAIN}/ev-charging/ev-charging-stations/`,
104
+ },
105
+ {
106
+ name: 'How much does it cost to charge an EV?',
107
+ link: `${ES_DOMAIN}/ev-charging/electric-vehicle-charging-cost/`,
108
+ },
109
+ ],
110
+ },
111
+ {
112
+ name: 'Smart home',
113
+ subtopics: [
114
+ {
115
+ name: 'Home electricity guide',
116
+ link: `${ES_DOMAIN}/electricity/`,
117
+ },
118
+ {
119
+ name: 'Home energy management guide',
120
+ link: `${ES_DOMAIN}/energy-management/`,
121
+ },
122
+ {
123
+ name: 'Energy efficiency',
124
+ link: `${ES_DOMAIN}/energy-efficiency/`,
125
+ },
126
+ {
127
+ name: 'Best smart home gadgets',
128
+ link: `${ES_DOMAIN}/energy-products/`,
129
+ },
130
+ ],
131
+ },
132
+ {
133
+ name: 'For your business',
134
+ subtopics: [
135
+ {
136
+ name: 'Solar for businesses',
137
+ link: `${ES_DOMAIN}/business-solutions/commercial-solar-benefits/`,
138
+ },
139
+ {
140
+ name: 'Solar for nonprofit organizations',
141
+ link: `${ES_DOMAIN}/business-solutions/solar-nonprofit-benefits-financing/`,
142
+ },
143
+ {
144
+ name: 'Backup power for businesses',
145
+ link: `${ES_DOMAIN}/business-solutions/energy-storage-for-businesses/`,
146
+ },
147
+ ],
148
+ },
149
+ {
150
+ name: 'Clean energy financing',
151
+ subtopics: [
152
+ {
153
+ name: 'How to pay for solar',
154
+ link: `${ES_DOMAIN}/solar/how-to-pay-for-solar/`,
155
+ },
156
+ {
157
+ name: 'How to choose a solar loan',
158
+ link: `${ES_DOMAIN}/solar/solar-loans/`,
159
+ },
160
+ {
161
+ name: 'What to know about solar leases',
162
+ link: `${ES_DOMAIN}/solar/solar-leases/`,
163
+ },
164
+ {
165
+ name: 'Explore cost-saving clean energy incentives',
166
+ link: `${ES_DOMAIN}/shop/clean-energy-savings-and-tax-incentives/`,
167
+ },
168
+ ],
169
+ },
170
+ {
171
+ name: 'News',
172
+ subtopics: [
173
+ {
174
+ name: 'How long can you run your house on a Tesla Powerwall?',
175
+ // eslint-disable-next-line max-len
176
+ link: `${ES_DOMAIN}/energy-storage/tesla-powerwall-how-much-home-can-you-run-on-it-for-how-long/`,
177
+ },
178
+ {
179
+ name: 'How have solar panel cost and efficiency changed over time?',
180
+ link: `${ES_DOMAIN}/solar/solar-panel-efficiency-cost-over-time/`,
181
+ },
182
+ ],
183
+ link: `${ES_DOMAIN}/blog/`,
184
+ },
185
+ ],
186
+ featuredArticle: {
187
+ linkName: "Editors' pick",
188
+ linkUrl: `${ES_DOMAIN}/solar/are-solar-panels-worth-it/`,
189
+ lede: 'Are solar panels worth it?',
190
+ image500: `${ES_IMAGE_DOMAIN}/static/img/navbar/articles/are-solar-panels-worth-it-500w.png`,
191
+ imageAlt: 'home with solar panels',
192
+ },
193
+ },
194
+ {
195
+ name: 'Solar calculator',
196
+ subHeading: 'Check your savings',
197
+ icon: NAV_BAR_ICONS.CALCULATOR,
198
+ link: `${ES_DOMAIN}/solar/calculator/`,
199
+ topics: [],
200
+ },
201
+ {
202
+ name: 'About us',
203
+ subHeading: 'Why EnergySage',
204
+ icon: NAV_BAR_ICONS.ES_LEAF,
205
+ topics: [
206
+ {
207
+ name: 'Our company',
208
+ subtopics: [
209
+ {
210
+ name: 'Mission & values',
211
+ link: `${ES_DOMAIN}/about-us/company/`,
212
+ },
213
+ {
214
+ name: 'How it works',
215
+ link: `${ES_DOMAIN}/shop/home-solar/`,
216
+ },
217
+ {
218
+ name: 'Our team',
219
+ link: `${ES_DOMAIN}/about-us/team/`,
220
+ },
221
+ {
222
+ name: 'Our Energy Advisors',
223
+ link: `${ES_DOMAIN}/energy-advisors/`,
224
+ },
225
+ {
226
+ name: 'Careers',
227
+ link: `${ES_DOMAIN}/about-us/careers/`,
228
+ },
229
+ ],
230
+ },
231
+ {
232
+ name: 'Our work',
233
+ subtopics: [
234
+ {
235
+ name: 'Market intel',
236
+ link: `${ES_DOMAIN}/data/`,
237
+ },
238
+ {
239
+ name: 'Editorial guidelines',
240
+ link: `${ES_DOMAIN}/editorial-guidelines/`,
241
+ },
242
+ {
243
+ name: 'Press',
244
+ link: `${ES_DOMAIN}/press/`,
245
+ },
246
+ ],
247
+ },
248
+ {
249
+ name: 'Work with us',
250
+ subtopics: [
251
+ {
252
+ name: 'Solar & HVAC installers',
253
+ link: `${ES_DOMAIN}/installers/`,
254
+ },
255
+ {
256
+ name: 'Corporate partnerships',
257
+ link: `${ES_DOMAIN}/partners/corporations`,
258
+ },
259
+ {
260
+ name: 'Community programs',
261
+ link: `${ES_DOMAIN}/partners/non-profits`,
262
+ },
263
+ {
264
+ name: 'Utility programs',
265
+ link: `${ES_DOMAIN}/partners/utilities`,
266
+ },
267
+ {
268
+ name: 'Others',
269
+ link: `${ES_DOMAIN}/partners/`,
270
+ },
271
+ ],
272
+ },
273
+ ],
274
+ featuredArticle: {
275
+ linkName: 'New research',
276
+ linkUrl: `${ES_DOMAIN}/press/energysage-marketplace-intel-report-19`,
277
+ lede: "EnergySage Intel's latest Solar & Storage Marketplace Report",
278
+ image500: `${ES_IMAGE_DOMAIN}/static/img/navbar/articles/latest-market-intel-500w.png`,
279
+ imageAlt: 'market intel report charts',
280
+ },
281
+ },
282
+ ],
283
+ products: [
284
+ {
285
+ name: 'Home solar',
286
+ link: `${ES_DOMAIN}/shop/home-solar/`,
287
+ topics: [
288
+ {
289
+ name: 'Rooftop solar',
290
+ subHeading: 'Install solar on your property',
291
+ link: `${ES_DOMAIN}/shop/home-solar/`,
292
+ showItemsOnMobile: false,
293
+ subtopics: [
294
+ {
295
+ name: 'Home solar guide',
296
+ link: `${ES_DOMAIN}/solar/`,
297
+ },
298
+ {
299
+ name: 'Solar calculator',
300
+ link: `${ES_DOMAIN}/solar/calculator/`,
301
+ },
302
+ {
303
+ name: 'Search local installers',
304
+ // eslint-disable-next-line max-len
305
+ link: `${ES_DOMAIN}/supplier/search?selected_facets=services:installers&selected_facets=technology_types:Solar%20PV`,
306
+ },
307
+ {
308
+ name: 'Financing',
309
+ link: `${ES_DOMAIN}/financing/`,
310
+ },
311
+ {
312
+ name: 'Solar loan providers',
313
+ link: `${ES_DOMAIN}/solar/financing/loan-providers/`,
314
+ },
315
+ {
316
+ name: 'Equipment rebates',
317
+ link: `${ES_DOMAIN}/promotions/`,
318
+ },
319
+ {
320
+ name: 'Compare solar panels',
321
+ link: `${ES_DOMAIN}/solar-panels/`,
322
+ },
323
+ {
324
+ name: 'Compare inverters',
325
+ link: `${ES_DOMAIN}/solar-inverters/`,
326
+ },
327
+ {
328
+ name: 'Solar incentives',
329
+ link: `${ES_DOMAIN}/local-data/solar-rebates-incentives/`,
330
+ },
331
+ {
332
+ name: 'Backup power guide',
333
+ link: `${ES_DOMAIN}/energy-storage/`,
334
+ },
335
+ {
336
+ name: 'Get personalized quotes',
337
+ link: `${ES_DOMAIN}/market/start/`,
338
+ emphasize: true,
339
+ },
340
+ ],
341
+ },
342
+ {
343
+ name: 'Community solar',
344
+ subHeading: 'Go solar with no equipment',
345
+ link: `${ES_DOMAIN}/shop/community-solar/`,
346
+ showItemsOnMobile: false,
347
+ subtopics: [
348
+ {
349
+ name: 'Community solar guide',
350
+ link: `${ES_DOMAIN}/community-solar/`,
351
+ },
352
+ {
353
+ name: 'Search solar farms',
354
+ link: `${COMMUNITY_SOLAR_DOMAIN}/projects`,
355
+ newTab: true,
356
+ emphasize: true,
357
+ },
358
+ ],
359
+ },
360
+ ],
361
+ featuredArticle: {
362
+ eyebrow: "Editors' pick",
363
+ link: `${ES_DOMAIN}/local-data/solar-panel-cost/`,
364
+ name: 'How much do solar panels cost?',
365
+ image500: `${ES_IMAGE_DOMAIN}/static/img/navbar/articles/solar-panel-cost-500w.png`,
366
+ imageAlt: 'home with solar panels and money',
367
+ },
368
+ },
369
+ {
370
+ name: 'Community solar',
371
+ link: `${ES_DOMAIN}/shop/community-solar/`,
372
+ items: [
373
+ {
374
+ name: 'Community solar',
375
+ link: `${ES_DOMAIN}/shop/community-solar/`,
376
+ },
377
+ {
378
+ name: 'Community solar guide',
379
+ link: `${ES_DOMAIN}/community-solar/`,
380
+ },
381
+ {
382
+ name: 'Search solar farms ',
383
+ link: `${COMMUNITY_SOLAR_DOMAIN}/projects`,
384
+ newTab: true,
385
+ emphasize: true,
386
+ },
387
+ ],
388
+ },
389
+ {
390
+ name: 'Heating & cooling',
391
+ link: `${ES_DOMAIN}/shop/heat-pumps/`,
392
+ items: [
393
+ {
394
+ name: 'Heating & cooling',
395
+ link: `${ES_DOMAIN}/shop/heat-pumps/`,
396
+ },
397
+ {
398
+ name: 'Heat pump guide',
399
+ link: `${ES_DOMAIN}/heat-pumps/`,
400
+ },
401
+ {
402
+ name: 'Heat pump incentives',
403
+ link: `${ES_DOMAIN}/heat-pumps/heat-pump-incentives/`,
404
+ },
405
+ {
406
+ name: 'Financing',
407
+ link: `${ES_DOMAIN}/financing/`,
408
+ },
409
+ {
410
+ name: 'Get personalized quotes',
411
+ link: `${ES_DOMAIN}/shop/heat-pumps/`,
412
+ newTab: true,
413
+ emphasize: true,
414
+ },
415
+ ],
416
+ },
417
+ {
418
+ name: 'Backup power',
419
+ link: `${ES_DOMAIN}/energy-storage/`,
420
+ items: [
421
+ {
422
+ name: 'Backup power guide',
423
+ link: `${ES_DOMAIN}/energy-storage/`,
424
+ },
425
+ {
426
+ name: 'Home battery incentives',
427
+ link: `${ES_DOMAIN}/energy-storage/benefits-of-storage/energy-storage-incentives/`,
428
+ },
429
+ {
430
+ name: 'Compare home batteries',
431
+ link: `${ES_DOMAIN}/solar-batteries/`,
432
+ },
433
+ {
434
+ name: 'Get quotes for solar + batteries',
435
+ link: `${ES_DOMAIN}/market/start/`,
436
+ emphasize: true,
437
+ },
438
+ ],
439
+ },
440
+ {
441
+ name: 'EV charging',
442
+ link: `${ES_DOMAIN}/ev-charging/`,
443
+ items: [
444
+ {
445
+ name: 'EV charging guide',
446
+ link: `${ES_DOMAIN}/ev-charging/`,
447
+ },
448
+ {
449
+ name: 'Electric vehicle guide',
450
+ link: `${ES_DOMAIN}/electric-vehicles/`,
451
+ },
452
+ {
453
+ name: 'Shop EV chargers',
454
+ link: `${EV_RAIVEN_DOMAIN}`,
455
+ emphasize: true,
456
+ },
457
+ ],
458
+ },
459
+ {
460
+ name: 'For your business',
461
+ link: `${ES_DOMAIN}/businesses/`,
462
+ items: [
463
+ {
464
+ name: 'For your business',
465
+ link: `${ES_DOMAIN}/businesses/`,
466
+ },
467
+ {
468
+ name: 'Solar for businesses',
469
+ link: `${ES_DOMAIN}/business-solutions/commercial-solar-benefits/`,
470
+ },
471
+ {
472
+ name: 'Solar for nonprofit organizations',
473
+ link: `${ES_DOMAIN}/business-solutions/solar-nonprofit-benefits-financing/`,
474
+ },
475
+ {
476
+ name: 'Energy storage for businesses',
477
+ link: `${ES_DOMAIN}/business-solutions/energy-storage-for-businesses/`,
478
+ },
479
+ ],
480
+ },
481
+ ],
482
+ });
@@ -0,0 +1,48 @@
1
+ // Takes four bytes of a file as a string and returns a MIME type string corresponding to the file type.
2
+ const mimeTypesAndHexes = [
3
+ {
4
+ mime: 'image/jpeg',
5
+ humanReadable: '.jpeg',
6
+ hexes: ['FFD8FFE0', 'FFD8FFE1', 'FFD8FFE2', 'FFD8FFE8'],
7
+ },
8
+ {
9
+ mime: 'image/png',
10
+ humanReadable: '.png',
11
+ hexes: ['89504E47'],
12
+ },
13
+ {
14
+ mime: 'image/gif',
15
+ humanReadable: '.gif',
16
+ hexes: ['47494638'],
17
+ },
18
+ {
19
+ mime: 'image/tiff',
20
+ humanReadable: '.tiff',
21
+ hexes: ['4D4D002A', '4D4D002B', '49492A00'],
22
+ },
23
+ {
24
+ mime: 'application/msword', // .doc
25
+ humanReadable: '.doc',
26
+ hexes: ['0D444F43'],
27
+ },
28
+ {
29
+ mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', // .docx
30
+ humanReadable: '.docx',
31
+ hexes: ['504B0304'],
32
+ },
33
+ {
34
+ mime: 'application/pdf',
35
+ humanReadable: '.pdf',
36
+ hexes: ['25504446'],
37
+ },
38
+ ];
39
+
40
+ export const mimeTypes = mimeTypesAndHexes.map(({ mime }) => mime);
41
+
42
+ export function getHumanReadableTypeFromMime(mimeType: any) {
43
+ return mimeTypesAndHexes.find((mimeTypeAndHex) => mimeTypeAndHex.mime === mimeType)?.humanReadable;
44
+ }
45
+
46
+ export function findMimeType(hex: any) {
47
+ return mimeTypesAndHexes.find((mimeType) => mimeType.hexes.includes(hex))?.mime;
48
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * constants.js
3
+ *
4
+ * String constants that can be used when defining validations objects
5
+ */
6
+
7
+ const REQUIRED = 'vuelidateRequired';
8
+ const MIN_VALUE = 'vuelidateMinValue';
9
+ const MAX_VALUE = 'vuelidateMaxValue';
10
+ const REQUIRED_IF = 'vuelidateRequiredIf';
11
+ const NUMERIC = 'vuelidateNumeric';
12
+ const INTEGER = 'vuelidateInteger';
13
+ const MIN_LENGTH = 'vuelidateMinLength';
14
+ const MAX_LENGTH = 'vuelidateMaxLength';
15
+ const HAS_NUMBER = 'vuelidateHasNumber';
16
+ const HAS_SPECIAL_CHARACTER = 'vuelidateHasSpecialCharacter';
17
+ const HAS_UPPERCASE_LETTER = 'vuelidateHasUppercaseLetter';
18
+ const HAS_LOWERCASE_LETTER = 'vuelidateHasLowercaseLetter';
19
+ const EMAIL = 'vuelidateEmail';
20
+ const PHONE = 'vuelidatePhone';
21
+ const HELPERS = 'vuelidateHelpers';
22
+
23
+ export default {
24
+ REQUIRED,
25
+ REQUIRED_IF,
26
+ MIN_VALUE,
27
+ MAX_VALUE,
28
+ MIN_LENGTH,
29
+ MAX_LENGTH,
30
+ NUMERIC,
31
+ INTEGER,
32
+ EMAIL,
33
+ PHONE,
34
+ HAS_NUMBER,
35
+ HAS_SPECIAL_CHARACTER,
36
+ HAS_UPPERCASE_LETTER,
37
+ HAS_LOWERCASE_LETTER,
38
+ HELPERS,
39
+ };
@@ -1,5 +0,0 @@
1
- <template>
2
- <div>
3
- This is a test component from es-ds-components
4
- </div>
5
- </template>