@energysage/es-ds-components 4.0.2 → 4.1.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.1.0](https://github.com/EnergySage/es-ds/compare/es-ds-components-v4.0.3...es-ds-components-v4.1.0) (2026-01-12)
4
+
5
+
6
+ ### Features
7
+
8
+ * add prop to allow replacements in zip code form URL ([#1695](https://github.com/EnergySage/es-ds/issues/1695)) ([001feb5](https://github.com/EnergySage/es-ds/commit/001feb52b9bbfd84c31390449c0810517c726a6f))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * fix dependency vulnerabilities reported by jit ([#1697](https://github.com/EnergySage/es-ds/issues/1697)) ([db13818](https://github.com/EnergySage/es-ds/commit/db13818d9e83593f06c49d774fd219e96f6702dd))
14
+
15
+ ## [4.0.3](https://github.com/EnergySage/es-ds/compare/es-ds-components-v4.0.2...es-ds-components-v4.0.3) (2025-10-30)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * prevent optimize dependency warning for unused packages ([#1690](https://github.com/EnergySage/es-ds/issues/1690)) ([f7b2dbe](https://github.com/EnergySage/es-ds/commit/f7b2dbe0d3bfd7c987026c7fbc0558d9505cb01e))
21
+
3
22
  ## [4.0.2](https://github.com/EnergySage/es-ds/compare/es-ds-components-v4.0.1...es-ds-components-v4.0.2) (2025-10-07)
4
23
 
5
24
 
@@ -4,6 +4,10 @@ const props = defineProps({
4
4
  type: Boolean,
5
5
  default: false,
6
6
  },
7
+ contextMessage: {
8
+ type: String,
9
+ default: '',
10
+ },
7
11
  dark: {
8
12
  type: Boolean,
9
13
  default: false,
@@ -24,10 +28,6 @@ const props = defineProps({
24
28
  type: String,
25
29
  default: 'ZIP code',
26
30
  },
27
- showPrivacySection: {
28
- type: Boolean,
29
- default: true,
30
- },
31
31
  privacyPolicyLink: {
32
32
  type: String,
33
33
  default: '',
@@ -36,23 +36,27 @@ const props = defineProps({
36
36
  type: Boolean,
37
37
  default: false,
38
38
  },
39
- stackUntil: {
39
+ replaceFieldNameInUrl: {
40
+ type: Boolean,
41
+ default: false,
42
+ },
43
+ selectedProduct: {
40
44
  type: String,
41
45
  default: '',
42
46
  },
43
- url: {
44
- type: String,
45
- required: true,
47
+ showPrivacySection: {
48
+ type: Boolean,
49
+ default: true,
46
50
  },
47
- zipCodeValue: {
51
+ stackUntil: {
48
52
  type: String,
49
53
  default: '',
50
54
  },
51
- selectedProduct: {
55
+ url: {
52
56
  type: String,
53
- default: '',
57
+ required: true,
54
58
  },
55
- contextMessage: {
59
+ zipCodeValue: {
56
60
  type: String,
57
61
  default: '',
58
62
  },
@@ -87,6 +91,10 @@ const rules = {
87
91
  },
88
92
  };
89
93
 
94
+ const replacementUrl = computed(() => {
95
+ return props.url.replace(`{${props.fieldName}}`, state.zipCode);
96
+ });
97
+
90
98
  const { v$, validateState } = useEsForms(rules, state);
91
99
 
92
100
  const ctaForm = useTemplateRef<HTMLFormElement>('ctaForm');
@@ -95,7 +103,16 @@ const handleSubmit = () => {
95
103
  if (v$.value.$invalid) {
96
104
  v$.value.$touch();
97
105
  } else {
98
- ctaForm.value?.submit();
106
+ if (props.replaceFieldNameInUrl) {
107
+ navigateTo(replacementUrl.value, {
108
+ external: true,
109
+ open: {
110
+ target: props.newTab ? '_blank' : '_self',
111
+ },
112
+ });
113
+ } else {
114
+ ctaForm.value?.submit();
115
+ }
99
116
  }
100
117
  };
101
118
  </script>
@@ -121,7 +138,7 @@ const handleSubmit = () => {
121
138
  [`d-${stackBreak}flex`]: stackUntil,
122
139
  'mb-100': showPrivacySection,
123
140
  }"
124
- :action="url"
141
+ :action="replaceFieldNameInUrl ? replacementUrl : url"
125
142
  method="get"
126
143
  novalidate
127
144
  :target="newTab ? '_blank' : '_self'"
package/nuxt.config.ts CHANGED
@@ -55,9 +55,7 @@ export default defineNuxtConfig({
55
55
  '@vuelidate/core',
56
56
  '@vuelidate/validators',
57
57
  '@vueuse/core',
58
- 'clipboard',
59
58
  'html-truncate',
60
- 'motion-v',
61
59
  'primevue/config',
62
60
  'primevue/accordion',
63
61
  'primevue/accordiontab',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energysage/es-ds-components",
3
- "version": "4.0.2",
3
+ "version": "4.1.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "An EnergySage Vue component library",