@empathyco/x-components 6.2.3 → 6.3.1

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 (42) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/docs/API-reference/api/x-adapter-platform.md +0 -189
  3. package/docs/API-reference/api/x-adapter-platform.platformresult.__prices.md +1 -1
  4. package/docs/API-reference/api/x-adapter-platform.platformresult.md +1 -1
  5. package/docs/API-reference/api/x-types.resultprice.md +6 -6
  6. package/docs/API-reference/api/x-types.resultprice.originalvalue.md +1 -1
  7. package/docs/API-reference/api/x-types.resultprice.value.md +1 -1
  8. package/docs/API-reference/api/x-types.xcomponentsadapter.md +0 -51
  9. package/js/components/result/base-result-current-price.vue.js +1 -1
  10. package/js/components/result/base-result-current-price.vue.js.map +1 -1
  11. package/js/components/result/base-result-current-price.vue2.js.map +1 -1
  12. package/js/components/result/base-result-previous-price.vue.js +4 -3
  13. package/js/components/result/base-result-previous-price.vue.js.map +1 -1
  14. package/js/components/result/base-result-previous-price.vue2.js.map +1 -1
  15. package/package.json +4 -4
  16. package/report/x-adapter-platform.api.json +118 -1079
  17. package/report/x-types.api.json +6 -156
  18. package/docs/API-reference/api/x-adapter-platform.aiquestionsendpointadapter.md +0 -13
  19. package/docs/API-reference/api/x-adapter-platform.aiquestionsrequestmapper.md +0 -13
  20. package/docs/API-reference/api/x-adapter-platform.aiquestionsrequestschema.md +0 -13
  21. package/docs/API-reference/api/x-adapter-platform.aiquestionsresponsemapper.md +0 -13
  22. package/docs/API-reference/api/x-adapter-platform.aiquestionsresponseschema.md +0 -13
  23. package/docs/API-reference/api/x-adapter-platform.aiquestionsschema.md +0 -13
  24. package/docs/API-reference/api/x-adapter-platform.aisummarizeendpointadapter.md +0 -15
  25. package/docs/API-reference/api/x-adapter-platform.aitasksendpointadapter.md +0 -13
  26. package/docs/API-reference/api/x-adapter-platform.aitasksrequestmapper.md +0 -13
  27. package/docs/API-reference/api/x-adapter-platform.aitasksrequestschema.md +0 -13
  28. package/docs/API-reference/api/x-adapter-platform.aitasksresponsemapper.md +0 -13
  29. package/docs/API-reference/api/x-adapter-platform.aitasksresponseschema.md +0 -13
  30. package/docs/API-reference/api/x-adapter-platform.aitasksschema.md +0 -13
  31. package/docs/API-reference/api/x-adapter-platform.platformadapter.aiquestions.md +0 -11
  32. package/docs/API-reference/api/x-adapter-platform.platformadapter.aisummarize.md +0 -11
  33. package/docs/API-reference/api/x-adapter-platform.platformadapter.aitasks.md +0 -11
  34. package/docs/API-reference/api/x-adapter-platform.platformaiquestionsrequest.context.md +0 -16
  35. package/docs/API-reference/api/x-adapter-platform.platformaiquestionsrequest.md +0 -56
  36. package/docs/API-reference/api/x-adapter-platform.platformaiquestionsresponse.md +0 -15
  37. package/docs/API-reference/api/x-adapter-platform.platformaitasksrequest.md +0 -56
  38. package/docs/API-reference/api/x-adapter-platform.platformaitasksrequest.taskid.md +0 -11
  39. package/docs/API-reference/api/x-adapter-platform.platformaitasksresponse.md +0 -15
  40. package/docs/API-reference/api/x-types.xcomponentsadapter.aiquestions.md +0 -11
  41. package/docs/API-reference/api/x-types.xcomponentsadapter.aisummarize.md +0 -11
  42. package/docs/API-reference/api/x-types.xcomponentsadapter.aitasks.md +0 -11
package/CHANGELOG.md CHANGED
@@ -3,6 +3,21 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [6.3.1](https://github.com/empathyco/x/compare/@empathyco/x-components@6.3.0...@empathyco/x-components@6.3.1) (2026-05-21)
7
+
8
+ **Note:** Version bump only for package @empathyco/x-components
9
+
10
+
11
+
12
+
13
+
14
+ ## [6.3.0](https://github.com/empathyco/x/compare/@empathyco/x-components@6.2.3...@empathyco/x-components@6.3.0) (2026-05-21)
15
+
16
+ ### Features
17
+
18
+ * allow empty prices (#2108)
19
+
20
+
6
21
  ## [6.2.3](https://github.com/empathyco/x/compare/@empathyco/x-components@6.2.2...@empathyco/x-components@6.2.3) (2026-05-20)
7
22
 
8
23
  ### Code Refactoring
@@ -108,28 +108,6 @@ Facet configuration containing the model name and the schema.
108
108
  Platform adapter interface.
109
109
 
110
110
 
111
- </td></tr>
112
- <tr><td>
113
-
114
- [PlatformAiQuestionsRequest](./x-adapter-platform.platformaiquestionsrequest.md)
115
-
116
-
117
- </td><td>
118
-
119
- Request for the `Questions v1` endpoint.
120
-
121
-
122
- </td></tr>
123
- <tr><td>
124
-
125
- [PlatformAiQuestionsResponse](./x-adapter-platform.platformaiquestionsresponse.md)
126
-
127
-
128
- </td><td>
129
-
130
- Response for the `questions` endpoint.
131
-
132
-
133
111
  </td></tr>
134
112
  <tr><td>
135
113
 
@@ -174,28 +152,6 @@ Request for the `AI suggestions search` endpoint.
174
152
  Response for the `AI suggestions search` endpoint.
175
153
 
176
154
 
177
- </td></tr>
178
- <tr><td>
179
-
180
- [PlatformAiTasksRequest](./x-adapter-platform.platformaitasksrequest.md)
181
-
182
-
183
- </td><td>
184
-
185
- Request for the `Tasks v1` endpoint.
186
-
187
-
188
- </td></tr>
189
- <tr><td>
190
-
191
- [PlatformAiTasksResponse](./x-adapter-platform.platformaitasksresponse.md)
192
-
193
-
194
- </td><td>
195
-
196
- Response for the `tasks` endpoint.
197
-
198
-
199
155
  </td></tr>
200
156
  <tr><td>
201
157
 
@@ -632,72 +588,6 @@ Description
632
588
  </th></tr></thead>
633
589
  <tbody><tr><td>
634
590
 
635
- [aiQuestionsEndpointAdapter](./x-adapter-platform.aiquestionsendpointadapter.md)
636
-
637
-
638
- </td><td>
639
-
640
- Default adapter for the questions v1 endpoint.
641
-
642
-
643
- </td></tr>
644
- <tr><td>
645
-
646
- [aiQuestionsRequestMapper](./x-adapter-platform.aiquestionsrequestmapper.md)
647
-
648
-
649
- </td><td>
650
-
651
- Default implementation for the AIQuestionsRequestMapper.
652
-
653
-
654
- </td></tr>
655
- <tr><td>
656
-
657
- [aiQuestionsRequestSchema](./x-adapter-platform.aiquestionsrequestschema.md)
658
-
659
-
660
- </td><td>
661
-
662
- Default implementation for the AiQuestionsRequestSchema.
663
-
664
-
665
- </td></tr>
666
- <tr><td>
667
-
668
- [aiQuestionsResponseMapper](./x-adapter-platform.aiquestionsresponsemapper.md)
669
-
670
-
671
- </td><td>
672
-
673
- Default implementation for the AiQuestionsResponseMapper.
674
-
675
-
676
- </td></tr>
677
- <tr><td>
678
-
679
- [aiQuestionsResponseSchema](./x-adapter-platform.aiquestionsresponseschema.md)
680
-
681
-
682
- </td><td>
683
-
684
- Default implementation for the AIQuestionsResponseSchema.
685
-
686
-
687
- </td></tr>
688
- <tr><td>
689
-
690
- [aiQuestionsSchema](./x-adapter-platform.aiquestionsschema.md)
691
-
692
-
693
- </td><td>
694
-
695
- Default implementation for the AIQuestionsSchema.
696
-
697
-
698
- </td></tr>
699
- <tr><td>
700
-
701
591
  [aiSuggestionSearchSchema](./x-adapter-platform.aisuggestionsearchschema.md)
702
592
 
703
593
 
@@ -794,85 +684,6 @@ Default implementation for the AIOverviewSuggestionsSearchResponseSchema.
794
684
  Default implementation for the AIOverviewSuggestionsSearchSchema.
795
685
 
796
686
 
797
- </td></tr>
798
- <tr><td>
799
-
800
- [aiSummarizeEndpointAdapter](./x-adapter-platform.aisummarizeendpointadapter.md)
801
-
802
-
803
- </td><td>
804
-
805
- Default adapter for the Overview summarize streaming endpoint.
806
-
807
- Mirrors the aiSuggestions endpoint adapter.
808
-
809
-
810
- </td></tr>
811
- <tr><td>
812
-
813
- [aiTasksEndpointAdapter](./x-adapter-platform.aitasksendpointadapter.md)
814
-
815
-
816
- </td><td>
817
-
818
- Default adapter for the questions v1 endpoint.
819
-
820
-
821
- </td></tr>
822
- <tr><td>
823
-
824
- [aiTasksRequestMapper](./x-adapter-platform.aitasksrequestmapper.md)
825
-
826
-
827
- </td><td>
828
-
829
- Default implementation for the AiTasksRequestMapper.
830
-
831
-
832
- </td></tr>
833
- <tr><td>
834
-
835
- [aiTasksRequestSchema](./x-adapter-platform.aitasksrequestschema.md)
836
-
837
-
838
- </td><td>
839
-
840
- Default implementation for the AiTasksRequestSchema.
841
-
842
-
843
- </td></tr>
844
- <tr><td>
845
-
846
- [aiTasksResponseMapper](./x-adapter-platform.aitasksresponsemapper.md)
847
-
848
-
849
- </td><td>
850
-
851
- Default implementation for the AiTasksResponseMapper.
852
-
853
-
854
- </td></tr>
855
- <tr><td>
856
-
857
- [aiTasksResponseSchema](./x-adapter-platform.aitasksresponseschema.md)
858
-
859
-
860
- </td><td>
861
-
862
- Default implementation for the AITasksResponseSchema.
863
-
864
-
865
- </td></tr>
866
- <tr><td>
867
-
868
- [aiTasksSchema](./x-adapter-platform.aitasksschema.md)
869
-
870
-
871
- </td><td>
872
-
873
- Default implementation for the AITasksSchema.
874
-
875
-
876
687
  </td></tr>
877
688
  <tr><td>
878
689
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  ```typescript
10
10
  __prices: {
11
- current: {
11
+ current?: {
12
12
  value: number;
13
13
  };
14
14
  previous?: {
@@ -113,7 +113,7 @@ string
113
113
 
114
114
  </td><td>
115
115
 
116
- { current: { value: number; }; previous?: { value: number; }; future?: { value: number; }; }
116
+ { current?: { value: number; }; previous?: { value: number; }; future?: { value: number; }; }
117
117
 
118
118
 
119
119
  </td><td>
@@ -56,7 +56,7 @@ Whether this result has a discount.
56
56
  </td></tr>
57
57
  <tr><td>
58
58
 
59
- [originalValue](./x-types.resultprice.originalvalue.md)
59
+ [originalValue?](./x-types.resultprice.originalvalue.md)
60
60
 
61
61
 
62
62
  </td><td>
@@ -64,18 +64,18 @@ Whether this result has a discount.
64
64
 
65
65
  </td><td>
66
66
 
67
- number
67
+ number \| undefined
68
68
 
69
69
 
70
70
  </td><td>
71
71
 
72
- The old value.
72
+ _(Optional)_ The old value.
73
73
 
74
74
 
75
75
  </td></tr>
76
76
  <tr><td>
77
77
 
78
- [value](./x-types.resultprice.value.md)
78
+ [value?](./x-types.resultprice.value.md)
79
79
 
80
80
 
81
81
  </td><td>
@@ -83,12 +83,12 @@ The old value.
83
83
 
84
84
  </td><td>
85
85
 
86
- number
86
+ number \| undefined
87
87
 
88
88
 
89
89
  </td><td>
90
90
 
91
- The current value.
91
+ _(Optional)_ The current value.
92
92
 
93
93
 
94
94
  </td></tr>
@@ -9,5 +9,5 @@ The old value.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- originalValue: number;
12
+ originalValue?: number | undefined;
13
13
  ```
@@ -9,5 +9,5 @@ The current value.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- value: number;
12
+ value?: number | undefined;
13
13
  ```
@@ -37,23 +37,6 @@ Description
37
37
  </th></tr></thead>
38
38
  <tbody><tr><td>
39
39
 
40
- [aiQuestions](./x-types.xcomponentsadapter.aiquestions.md)
41
-
42
-
43
- </td><td>
44
-
45
-
46
- </td><td>
47
-
48
- EndpointAdapter&lt;[AiQuestionsRequest](./x-types.aiquestionsrequest.md)<!-- -->, [AiQuestionsResponse](./x-types.aiquestionsresponse.md)<!-- -->&gt;
49
-
50
-
51
- </td><td>
52
-
53
-
54
- </td></tr>
55
- <tr><td>
56
-
57
40
  [aiSuggestions](./x-types.xcomponentsadapter.aisuggestions.md)
58
41
 
59
42
 
@@ -85,40 +68,6 @@ EndpointAdapter&lt;[AiSuggestionsSearchRequest](./x-types.aisuggestionssearchreq
85
68
  </td><td>
86
69
 
87
70
 
88
- </td></tr>
89
- <tr><td>
90
-
91
- [aiSummarize](./x-types.xcomponentsadapter.aisummarize.md)
92
-
93
-
94
- </td><td>
95
-
96
-
97
- </td><td>
98
-
99
- EndpointAdapter&lt;[AiSuggestionsRequest](./x-types.aisuggestionsrequest.md)<!-- -->, Response&gt;
100
-
101
-
102
- </td><td>
103
-
104
-
105
- </td></tr>
106
- <tr><td>
107
-
108
- [aiTasks](./x-types.xcomponentsadapter.aitasks.md)
109
-
110
-
111
- </td><td>
112
-
113
-
114
- </td><td>
115
-
116
- EndpointAdapter&lt;[AiTasksRequest](./x-types.aitasksrequest.md)<!-- -->, [AiTasksResponse](./x-types.aitasksresponse.md)<!-- -->&gt;
117
-
118
-
119
- </td><td>
120
-
121
-
122
71
  </td></tr>
123
72
  <tr><td>
124
73
 
@@ -12,7 +12,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
12
12
  },
13
13
  [
14
14
  renderSlot(_ctx.$slots, "default", { result: _ctx.result }, () => [
15
- _ctx.result.price ? (openBlock(), createBlock(_component_BaseCurrency, {
15
+ _ctx.result.price?.value ? (openBlock(), createBlock(_component_BaseCurrency, {
16
16
  key: 0,
17
17
  value: _ctx.result.price.value,
18
18
  format: _ctx.format
@@ -1 +1 @@
1
- {"version":3,"file":"base-result-current-price.vue.js","sources":["../../../../src/components/result/base-result-current-price.vue"],"sourcesContent":["<template>\n <div :class=\"dynamicClasses\" class=\"x-result-current-price\" data-test=\"result-current-price\">\n <!--\n @slot Base currency item\n @binding {result} result - Result data\n -->\n <slot :result=\"result\">\n <BaseCurrency v-if=\"result.price\" :value=\"result.price.value\" :format=\"format\" />\n </slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { VueCSSClasses } from '../../utils/types'\nimport { computed, defineComponent } from 'vue'\nimport BaseCurrency from '../currency/base-currency.vue'\n\n/**\n * Component that renders the {@link @empathyco/x-types#Result} current price\n * that may or may not be on sale.\n *\n * @public\n */\nexport default defineComponent({\n components: { BaseCurrency },\n props: {\n /**\n * (Required) The {@link @empathyco/x-types#Result} information.\n *\n * @public\n */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n /**\n * Format or mask to be defined as string.\n * - Use 'i' to define integer numbers.\n * - Use 'd' to define decimal numbers. You can define the length of the decimal part. If the\n * doesn't include decimals, it is filled with zeros until reach the length defined with 'd's.\n * - Integer separator must be defined between the 3rd and the 4th integer 'i' of a group.\n * - Decimal separator must be defined between the last 'i' and the first 'd'. It can be more\n * than one character.\n * - Set whatever you need around the integers and decimals marks.\n * - Default mask: 'i.iii,dd' which returns '1.345,67'.\n *\n * @remarks The number of 'd', which is the maximum decimal length, MUST match with the length\n * of decimals provided from the adapter. Otherwise, when the component truncate the decimal\n * part, delete significant digits.\n *\n * @public\n */\n format: {\n type: String,\n },\n },\n setup(props) {\n /**\n * Dynamic CSS classes to add to the root element of this component.\n *\n * @returns A booleans dictionary where each key is the class name to add,\n * and the boolean value tells if it should be added or not.\n * @internal\n */\n const dynamicClasses = computed<VueCSSClasses>(() => ({\n 'x-result-current-price--on-sale': props.result.price?.hasDiscount ?? false,\n }))\n\n return {\n dynamicClasses,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThis component shows the current price formatted. You can provide the `format` by property or let\nthe `BaseCurrency` component use an injected one.\n\n```vue\n<template>\n <BaseResultCurrentPrice :result=\"result\" :format=\"'i.iii,ddd €'\" />\n</template>\n\n<script setup>\nimport { BaseResultCurrentPrice } from '@empathyco/x-components'\nconst result = {\n price: { value: 123.45, hasDiscount: false },\n // ...other result properties\n}\n</script>\n```\n\n### Overriding default slot\n\n```vue\n<template>\n <BaseResultCurrentPrice :result=\"result\">\n <span class=\"custom-base-result-current-price\">{{ result.price.value }}</span>\n </BaseResultCurrentPrice>\n</template>\n\n<script setup>\nimport { BaseResultCurrentPrice } from '@empathyco/x-components'\nconst result = {\n price: { value: 123.45, hasDiscount: false },\n // ...other result properties\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createBlock","_createCommentVNode"],"mappings":";;;;;;AACE,EAAA,OAAAA,SAAA,EAAA,EAAAC,kBAAA;AAAA,IAQM,KAAA;AAAA,IAAA;AAAA,MARA,KAAA,EAAKC,cAAA,CAAA,CAAE,IAAA,CAAA,cAAA,EAAsB,wBAAwB,CAAA,CAAA;AAAA,MAAC,WAAA,EAAU;AAAA,KAAA;;AAKpE,MAAAC,UAAA,CAEO,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAFA,MAAA,EAAQ,IAAA,CAAA,MAAA,EAAM,EAArB,MAEO;AAAA,QADe,IAAA,CAAA,MAAA,CAAO,sBAA3BC,WAAA,CAAiF,uBAAA,EAAA;AAAA,UAAA,GAAA,EAAA,CAAA;AAA9C,UAAA,KAAA,EAAO,YAAO,KAAA,CAAM,KAAA;AAAA,UAAQ,MAAA,EAAQ,IAAA,CAAA;AAAA,SAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,OAAA,EAAA,QAAA,CAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA;;;;;;;;;;;"}
1
+ {"version":3,"file":"base-result-current-price.vue.js","sources":["../../../../src/components/result/base-result-current-price.vue"],"sourcesContent":["<template>\n <div :class=\"dynamicClasses\" class=\"x-result-current-price\" data-test=\"result-current-price\">\n <!--\n @slot Base currency item\n @binding {result} result - Result data\n -->\n <slot :result=\"result\">\n <BaseCurrency v-if=\"result.price?.value\" :value=\"result.price.value\" :format=\"format\" />\n </slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { VueCSSClasses } from '../../utils/types'\nimport { computed, defineComponent } from 'vue'\nimport BaseCurrency from '../currency/base-currency.vue'\n\n/**\n * Component that renders the {@link @empathyco/x-types#Result} current price\n * that may or may not be on sale.\n *\n * @public\n */\nexport default defineComponent({\n components: { BaseCurrency },\n props: {\n /**\n * (Required) The {@link @empathyco/x-types#Result} information.\n *\n * @public\n */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n /**\n * Format or mask to be defined as string.\n * - Use 'i' to define integer numbers.\n * - Use 'd' to define decimal numbers. You can define the length of the decimal part. If the\n * doesn't include decimals, it is filled with zeros until reach the length defined with 'd's.\n * - Integer separator must be defined between the 3rd and the 4th integer 'i' of a group.\n * - Decimal separator must be defined between the last 'i' and the first 'd'. It can be more\n * than one character.\n * - Set whatever you need around the integers and decimals marks.\n * - Default mask: 'i.iii,dd' which returns '1.345,67'.\n *\n * @remarks The number of 'd', which is the maximum decimal length, MUST match with the length\n * of decimals provided from the adapter. Otherwise, when the component truncate the decimal\n * part, delete significant digits.\n *\n * @public\n */\n format: {\n type: String,\n },\n },\n setup(props) {\n /**\n * Dynamic CSS classes to add to the root element of this component.\n *\n * @returns A booleans dictionary where each key is the class name to add,\n * and the boolean value tells if it should be added or not.\n * @internal\n */\n const dynamicClasses = computed<VueCSSClasses>(() => ({\n 'x-result-current-price--on-sale': props.result.price?.hasDiscount ?? false,\n }))\n\n return {\n dynamicClasses,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThis component shows the current price formatted. You can provide the `format` by property or let\nthe `BaseCurrency` component use an injected one.\n\n```vue\n<template>\n <BaseResultCurrentPrice :result=\"result\" :format=\"'i.iii,ddd €'\" />\n</template>\n\n<script setup>\nimport { BaseResultCurrentPrice } from '@empathyco/x-components'\nconst result = {\n price: { value: 123.45, hasDiscount: false },\n // ...other result properties\n}\n</script>\n```\n\n### Overriding default slot\n\n```vue\n<template>\n <BaseResultCurrentPrice :result=\"result\">\n <span class=\"custom-base-result-current-price\">{{ result.price.value }}</span>\n </BaseResultCurrentPrice>\n</template>\n\n<script setup>\nimport { BaseResultCurrentPrice } from '@empathyco/x-components'\nconst result = {\n price: { value: 123.45, hasDiscount: false },\n // ...other result properties\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createBlock","_createCommentVNode"],"mappings":";;;;;;AACE,EAAA,OAAAA,SAAA,EAAA,EAAAC,kBAAA;AAAA,IAQM,KAAA;AAAA,IAAA;AAAA,MARA,KAAA,EAAKC,cAAA,CAAA,CAAE,IAAA,CAAA,cAAA,EAAsB,wBAAwB,CAAA,CAAA;AAAA,MAAC,WAAA,EAAU;AAAA,KAAA;;AAKpE,MAAAC,UAAA,CAEO,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAFA,MAAA,EAAQ,IAAA,CAAA,MAAA,EAAM,EAArB,MAEO;AAAA,QADe,IAAA,CAAA,MAAA,CAAO,KAAA,EAAO,KAAA,IAAAH,SAAA,EAAA,EAAlCI,WAAA,CAAwF,uBAAA,EAAA;AAAA,UAAA,GAAA,EAAA,CAAA;AAA9C,UAAA,KAAA,EAAO,YAAO,KAAA,CAAM,KAAA;AAAA,UAAQ,MAAA,EAAQ,IAAA,CAAA;AAAA,SAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,OAAA,EAAA,QAAA,CAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"base-result-current-price.vue2.js","sources":["../../../../src/components/result/base-result-current-price.vue"],"sourcesContent":["<template>\n <div :class=\"dynamicClasses\" class=\"x-result-current-price\" data-test=\"result-current-price\">\n <!--\n @slot Base currency item\n @binding {result} result - Result data\n -->\n <slot :result=\"result\">\n <BaseCurrency v-if=\"result.price\" :value=\"result.price.value\" :format=\"format\" />\n </slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { VueCSSClasses } from '../../utils/types'\nimport { computed, defineComponent } from 'vue'\nimport BaseCurrency from '../currency/base-currency.vue'\n\n/**\n * Component that renders the {@link @empathyco/x-types#Result} current price\n * that may or may not be on sale.\n *\n * @public\n */\nexport default defineComponent({\n components: { BaseCurrency },\n props: {\n /**\n * (Required) The {@link @empathyco/x-types#Result} information.\n *\n * @public\n */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n /**\n * Format or mask to be defined as string.\n * - Use 'i' to define integer numbers.\n * - Use 'd' to define decimal numbers. You can define the length of the decimal part. If the\n * doesn't include decimals, it is filled with zeros until reach the length defined with 'd's.\n * - Integer separator must be defined between the 3rd and the 4th integer 'i' of a group.\n * - Decimal separator must be defined between the last 'i' and the first 'd'. It can be more\n * than one character.\n * - Set whatever you need around the integers and decimals marks.\n * - Default mask: 'i.iii,dd' which returns '1.345,67'.\n *\n * @remarks The number of 'd', which is the maximum decimal length, MUST match with the length\n * of decimals provided from the adapter. Otherwise, when the component truncate the decimal\n * part, delete significant digits.\n *\n * @public\n */\n format: {\n type: String,\n },\n },\n setup(props) {\n /**\n * Dynamic CSS classes to add to the root element of this component.\n *\n * @returns A booleans dictionary where each key is the class name to add,\n * and the boolean value tells if it should be added or not.\n * @internal\n */\n const dynamicClasses = computed<VueCSSClasses>(() => ({\n 'x-result-current-price--on-sale': props.result.price?.hasDiscount ?? false,\n }))\n\n return {\n dynamicClasses,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThis component shows the current price formatted. You can provide the `format` by property or let\nthe `BaseCurrency` component use an injected one.\n\n```vue\n<template>\n <BaseResultCurrentPrice :result=\"result\" :format=\"'i.iii,ddd €'\" />\n</template>\n\n<script setup>\nimport { BaseResultCurrentPrice } from '@empathyco/x-components'\nconst result = {\n price: { value: 123.45, hasDiscount: false },\n // ...other result properties\n}\n</script>\n```\n\n### Overriding default slot\n\n```vue\n<template>\n <BaseResultCurrentPrice :result=\"result\">\n <span class=\"custom-base-result-current-price\">{{ result.price.value }}</span>\n </BaseResultCurrentPrice>\n</template>\n\n<script setup>\nimport { BaseResultCurrentPrice } from '@empathyco/x-components'\nconst result = {\n price: { value: 123.45, hasDiscount: false },\n // ...other result properties\n}\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;AAmBA;;;;;AAKE;AACF,gBAAe,eAAe,CAAC;IAC7B,UAAU,EAAE,EAAE,YAAW,EAAG;AAC5B,IAAA,KAAK,EAAE;AACL;;;;AAIE;AACF,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA;AACD;;;;;;;;;;;;;;;;AAgBE;AACF,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAAM;AACb,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT;;;;;;AAME;AACF,QAAA,MAAM,cAAa,GAAI,QAAQ,CAAgB,OAAO;YACpD,iCAAiC,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,WAAU,IAAK,KAAK;AAC5E,SAAA,CAAC,CAAA;QAEF,OAAO;YACL,cAAc;SAChB;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"base-result-current-price.vue2.js","sources":["../../../../src/components/result/base-result-current-price.vue"],"sourcesContent":["<template>\n <div :class=\"dynamicClasses\" class=\"x-result-current-price\" data-test=\"result-current-price\">\n <!--\n @slot Base currency item\n @binding {result} result - Result data\n -->\n <slot :result=\"result\">\n <BaseCurrency v-if=\"result.price?.value\" :value=\"result.price.value\" :format=\"format\" />\n </slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { VueCSSClasses } from '../../utils/types'\nimport { computed, defineComponent } from 'vue'\nimport BaseCurrency from '../currency/base-currency.vue'\n\n/**\n * Component that renders the {@link @empathyco/x-types#Result} current price\n * that may or may not be on sale.\n *\n * @public\n */\nexport default defineComponent({\n components: { BaseCurrency },\n props: {\n /**\n * (Required) The {@link @empathyco/x-types#Result} information.\n *\n * @public\n */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n /**\n * Format or mask to be defined as string.\n * - Use 'i' to define integer numbers.\n * - Use 'd' to define decimal numbers. You can define the length of the decimal part. If the\n * doesn't include decimals, it is filled with zeros until reach the length defined with 'd's.\n * - Integer separator must be defined between the 3rd and the 4th integer 'i' of a group.\n * - Decimal separator must be defined between the last 'i' and the first 'd'. It can be more\n * than one character.\n * - Set whatever you need around the integers and decimals marks.\n * - Default mask: 'i.iii,dd' which returns '1.345,67'.\n *\n * @remarks The number of 'd', which is the maximum decimal length, MUST match with the length\n * of decimals provided from the adapter. Otherwise, when the component truncate the decimal\n * part, delete significant digits.\n *\n * @public\n */\n format: {\n type: String,\n },\n },\n setup(props) {\n /**\n * Dynamic CSS classes to add to the root element of this component.\n *\n * @returns A booleans dictionary where each key is the class name to add,\n * and the boolean value tells if it should be added or not.\n * @internal\n */\n const dynamicClasses = computed<VueCSSClasses>(() => ({\n 'x-result-current-price--on-sale': props.result.price?.hasDiscount ?? false,\n }))\n\n return {\n dynamicClasses,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThis component shows the current price formatted. You can provide the `format` by property or let\nthe `BaseCurrency` component use an injected one.\n\n```vue\n<template>\n <BaseResultCurrentPrice :result=\"result\" :format=\"'i.iii,ddd €'\" />\n</template>\n\n<script setup>\nimport { BaseResultCurrentPrice } from '@empathyco/x-components'\nconst result = {\n price: { value: 123.45, hasDiscount: false },\n // ...other result properties\n}\n</script>\n```\n\n### Overriding default slot\n\n```vue\n<template>\n <BaseResultCurrentPrice :result=\"result\">\n <span class=\"custom-base-result-current-price\">{{ result.price.value }}</span>\n </BaseResultCurrentPrice>\n</template>\n\n<script setup>\nimport { BaseResultCurrentPrice } from '@empathyco/x-components'\nconst result = {\n price: { value: 123.45, hasDiscount: false },\n // ...other result properties\n}\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;AAmBA;;;;;AAKE;AACF,gBAAe,eAAe,CAAC;IAC7B,UAAU,EAAE,EAAE,YAAW,EAAG;AAC5B,IAAA,KAAK,EAAE;AACL;;;;AAIE;AACF,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA;AACD;;;;;;;;;;;;;;;;AAgBE;AACF,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAAM;AACb,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT;;;;;;AAME;AACF,QAAA,MAAM,cAAa,GAAI,QAAQ,CAAgB,OAAO;YACpD,iCAAiC,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,WAAU,IAAK,KAAK;AAC5E,SAAA,CAAC,CAAA;QAEF,OAAO;YACL,cAAc;SAChB;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './base-result-previous-price.vue2.js';
2
- import { resolveComponent, openBlock, createElementBlock, renderSlot, createVNode, createCommentVNode } from 'vue';
2
+ import { resolveComponent, openBlock, createElementBlock, renderSlot, createBlock, createCommentVNode } from 'vue';
3
3
  import _export_sfc from '../../_virtual/_plugin-vue_export-helper.js';
4
4
 
5
5
  const _hoisted_1 = {
@@ -11,10 +11,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
11
11
  const _component_BaseCurrency = resolveComponent("BaseCurrency");
12
12
  return _ctx.result.price?.hasDiscount ? (openBlock(), createElementBlock("div", _hoisted_1, [
13
13
  renderSlot(_ctx.$slots, "default", { result: _ctx.result }, () => [
14
- createVNode(_component_BaseCurrency, {
14
+ _ctx.result.price?.originalValue ? (openBlock(), createBlock(_component_BaseCurrency, {
15
+ key: 0,
15
16
  value: _ctx.result.price.originalValue,
16
17
  format: _ctx.format
17
- }, null, 8, ["value", "format"])
18
+ }, null, 8, ["value", "format"])) : createCommentVNode("v-if", true)
18
19
  ])
19
20
  ])) : createCommentVNode("v-if", true);
20
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base-result-previous-price.vue.js","sources":["../../../../src/components/result/base-result-previous-price.vue"],"sourcesContent":["<template>\n <div\n v-if=\"result.price?.hasDiscount\"\n class=\"x-result-previous-price\"\n data-test=\"result-previous-price\"\n >\n <!--\n @slot Base currency item\n @binding {result} result - Result data\n -->\n <slot :result=\"result\">\n <BaseCurrency :value=\"result.price.originalValue\" :format=\"format\" />\n </slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { defineComponent } from 'vue'\nimport BaseCurrency from '../currency/base-currency.vue'\n\n/**\n * Component that renders the {@link @empathyco/x-types#Result} previous price.\n *\n * @public\n */\nexport default defineComponent({\n components: { BaseCurrency },\n props: {\n /**\n * (Required) The {@link @empathyco/x-types#Result} information.\n *\n * @public\n */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n /**\n * Format or mask to be defined as string.\n * - Use 'i' to define integer numbers.\n * - Use 'd' to define decimal numbers. You can define the length of the decimal part. If the\n * doesn't include decimals, it is filled with zeros until reach the length defined with 'd's.\n * - Integer separator must be defined between the 3rd and the 4th integer 'i' of a group.\n * - Decimal separator must be defined between the last 'i' and the first 'd'. It can be more\n * than one character.\n * - Set whatever you need around the integers and decimals marks.\n *\n * @remarks The number of 'd', which is the maximum decimal length, MUST match with the length\n * of decimals provided from the adapter. Otherwise, when the component truncate the decimal\n * part, delete significant digits.\n *\n * @public\n */\n format: {\n type: String,\n },\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThis component shows the previous price formatted if it has discount. The component has an optional\n`format` prop to select the currency format to be applied.\n\n```vue\n<template>\n <BaseResultPreviousPrice :result=\"result\" :format=\"'i.iii,ddd €'\" />\n</template>\n\n<script setup>\nimport { BaseResultPreviousPrice } from '@empathyco/x-components'\nconst result = {\n price: { originalValue: 199.99, hasDiscount: true },\n // ...other result properties\n}\n</script>\n```\n\n### Overriding default slot\n\n```vue\n<template>\n <BaseResultPreviousPrice :result=\"result\">\n <span class=\"custom-base-result-previous-price\">{{ result.price.originalValue }}</span>\n </BaseResultPreviousPrice>\n</template>\n\n<script setup>\nimport { BaseResultPreviousPrice } from '@empathyco/x-components'\nconst result = {\n price: { originalValue: 199.99, hasDiscount: true },\n // ...other result properties\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_renderSlot","_createVNode"],"mappings":";;;;;;EAGI,KAAA,EAAM,yBAAA;AAAA,EACN,WAAA,EAAU;;;;AAFJ,EAAA,OAAA,IAAA,CAAA,MAAA,CAAO,KAAA,EAAO,WAAA,IAAAA,SAAA,EAAA,EADtBC,kBAAA,CAYM,KAAA,EAZN,UAAA,EAYM;AAAA,IAHJC,UAAA,CAEO,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAFA,MAAA,EAAQ,IAAA,CAAA,MAAA,IAAf,MAEO;AAAA,MADLC,WAAA,CAAqE,uBAAA,EAAA;AAAA,QAAtD,KAAA,EAAO,YAAO,KAAA,CAAM,aAAA;AAAA,QAAgB,MAAA,EAAQ,IAAA,CAAA;AAAA,OAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,OAAA,EAAA,QAAA,CAAA;;;;;;;;"}
1
+ {"version":3,"file":"base-result-previous-price.vue.js","sources":["../../../../src/components/result/base-result-previous-price.vue"],"sourcesContent":["<template>\n <div\n v-if=\"result.price?.hasDiscount\"\n class=\"x-result-previous-price\"\n data-test=\"result-previous-price\"\n >\n <!--\n @slot Base currency item\n @binding {result} result - Result data\n -->\n <slot :result=\"result\">\n <BaseCurrency\n v-if=\"result.price?.originalValue\"\n :value=\"result.price.originalValue\"\n :format=\"format\"\n />\n </slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { defineComponent } from 'vue'\nimport BaseCurrency from '../currency/base-currency.vue'\n\n/**\n * Component that renders the {@link @empathyco/x-types#Result} previous price.\n *\n * @public\n */\nexport default defineComponent({\n components: { BaseCurrency },\n props: {\n /**\n * (Required) The {@link @empathyco/x-types#Result} information.\n *\n * @public\n */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n /**\n * Format or mask to be defined as string.\n * - Use 'i' to define integer numbers.\n * - Use 'd' to define decimal numbers. You can define the length of the decimal part. If the\n * doesn't include decimals, it is filled with zeros until reach the length defined with 'd's.\n * - Integer separator must be defined between the 3rd and the 4th integer 'i' of a group.\n * - Decimal separator must be defined between the last 'i' and the first 'd'. It can be more\n * than one character.\n * - Set whatever you need around the integers and decimals marks.\n *\n * @remarks The number of 'd', which is the maximum decimal length, MUST match with the length\n * of decimals provided from the adapter. Otherwise, when the component truncate the decimal\n * part, delete significant digits.\n *\n * @public\n */\n format: {\n type: String,\n },\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThis component shows the previous price formatted if it has discount. The component has an optional\n`format` prop to select the currency format to be applied.\n\n```vue\n<template>\n <BaseResultPreviousPrice :result=\"result\" :format=\"'i.iii,ddd €'\" />\n</template>\n\n<script setup>\nimport { BaseResultPreviousPrice } from '@empathyco/x-components'\nconst result = {\n price: { originalValue: 199.99, hasDiscount: true },\n // ...other result properties\n}\n</script>\n```\n\n### Overriding default slot\n\n```vue\n<template>\n <BaseResultPreviousPrice :result=\"result\">\n <span class=\"custom-base-result-previous-price\">{{ result.price.originalValue }}</span>\n </BaseResultPreviousPrice>\n</template>\n\n<script setup>\nimport { BaseResultPreviousPrice } from '@empathyco/x-components'\nconst result = {\n price: { originalValue: 199.99, hasDiscount: true },\n // ...other result properties\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_renderSlot","_createBlock","_createCommentVNode"],"mappings":";;;;;;EAGI,KAAA,EAAM,yBAAA;AAAA,EACN,WAAA,EAAU;;;;AAFJ,EAAA,OAAA,IAAA,CAAA,MAAA,CAAO,KAAA,EAAO,WAAA,IAAAA,SAAA,EAAA,EADtBC,kBAAA,CAgBM,KAAA,EAhBN,UAAA,EAgBM;AAAA,IAPJC,UAAA,CAMO,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EANA,MAAA,EAAQ,IAAA,CAAA,MAAA,IAAf,MAMO;AAAA,MAJG,IAAA,CAAA,MAAA,CAAO,KAAA,EAAO,aAAA,IAAAF,SAAA,EAAA,EADtBG,WAAA,CAIE,uBAAA,EAAA;AAAA,QAAA,GAAA,EAAA,CAAA;AAFC,QAAA,KAAA,EAAO,YAAO,KAAA,CAAM,aAAA;AAAA,QACpB,MAAA,EAAQ,IAAA,CAAA;AAAA,OAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,OAAA,EAAA,QAAA,CAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"base-result-previous-price.vue2.js","sources":["../../../../src/components/result/base-result-previous-price.vue"],"sourcesContent":["<template>\n <div\n v-if=\"result.price?.hasDiscount\"\n class=\"x-result-previous-price\"\n data-test=\"result-previous-price\"\n >\n <!--\n @slot Base currency item\n @binding {result} result - Result data\n -->\n <slot :result=\"result\">\n <BaseCurrency :value=\"result.price.originalValue\" :format=\"format\" />\n </slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { defineComponent } from 'vue'\nimport BaseCurrency from '../currency/base-currency.vue'\n\n/**\n * Component that renders the {@link @empathyco/x-types#Result} previous price.\n *\n * @public\n */\nexport default defineComponent({\n components: { BaseCurrency },\n props: {\n /**\n * (Required) The {@link @empathyco/x-types#Result} information.\n *\n * @public\n */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n /**\n * Format or mask to be defined as string.\n * - Use 'i' to define integer numbers.\n * - Use 'd' to define decimal numbers. You can define the length of the decimal part. If the\n * doesn't include decimals, it is filled with zeros until reach the length defined with 'd's.\n * - Integer separator must be defined between the 3rd and the 4th integer 'i' of a group.\n * - Decimal separator must be defined between the last 'i' and the first 'd'. It can be more\n * than one character.\n * - Set whatever you need around the integers and decimals marks.\n *\n * @remarks The number of 'd', which is the maximum decimal length, MUST match with the length\n * of decimals provided from the adapter. Otherwise, when the component truncate the decimal\n * part, delete significant digits.\n *\n * @public\n */\n format: {\n type: String,\n },\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThis component shows the previous price formatted if it has discount. The component has an optional\n`format` prop to select the currency format to be applied.\n\n```vue\n<template>\n <BaseResultPreviousPrice :result=\"result\" :format=\"'i.iii,ddd €'\" />\n</template>\n\n<script setup>\nimport { BaseResultPreviousPrice } from '@empathyco/x-components'\nconst result = {\n price: { originalValue: 199.99, hasDiscount: true },\n // ...other result properties\n}\n</script>\n```\n\n### Overriding default slot\n\n```vue\n<template>\n <BaseResultPreviousPrice :result=\"result\">\n <span class=\"custom-base-result-previous-price\">{{ result.price.originalValue }}</span>\n </BaseResultPreviousPrice>\n</template>\n\n<script setup>\nimport { BaseResultPreviousPrice } from '@empathyco/x-components'\nconst result = {\n price: { originalValue: 199.99, hasDiscount: true },\n // ...other result properties\n}\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;AAsBA;;;;AAIE;AACF,gBAAe,eAAe,CAAC;IAC7B,UAAU,EAAE,EAAE,YAAW,EAAG;AAC5B,IAAA,KAAK,EAAE;AACL;;;;AAIE;AACF,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA;AACD;;;;;;;;;;;;;;;AAeE;AACF,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAAM;AACb,SAAA;AACF,KAAA;AACF,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"base-result-previous-price.vue2.js","sources":["../../../../src/components/result/base-result-previous-price.vue"],"sourcesContent":["<template>\n <div\n v-if=\"result.price?.hasDiscount\"\n class=\"x-result-previous-price\"\n data-test=\"result-previous-price\"\n >\n <!--\n @slot Base currency item\n @binding {result} result - Result data\n -->\n <slot :result=\"result\">\n <BaseCurrency\n v-if=\"result.price?.originalValue\"\n :value=\"result.price.originalValue\"\n :format=\"format\"\n />\n </slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { defineComponent } from 'vue'\nimport BaseCurrency from '../currency/base-currency.vue'\n\n/**\n * Component that renders the {@link @empathyco/x-types#Result} previous price.\n *\n * @public\n */\nexport default defineComponent({\n components: { BaseCurrency },\n props: {\n /**\n * (Required) The {@link @empathyco/x-types#Result} information.\n *\n * @public\n */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n /**\n * Format or mask to be defined as string.\n * - Use 'i' to define integer numbers.\n * - Use 'd' to define decimal numbers. You can define the length of the decimal part. If the\n * doesn't include decimals, it is filled with zeros until reach the length defined with 'd's.\n * - Integer separator must be defined between the 3rd and the 4th integer 'i' of a group.\n * - Decimal separator must be defined between the last 'i' and the first 'd'. It can be more\n * than one character.\n * - Set whatever you need around the integers and decimals marks.\n *\n * @remarks The number of 'd', which is the maximum decimal length, MUST match with the length\n * of decimals provided from the adapter. Otherwise, when the component truncate the decimal\n * part, delete significant digits.\n *\n * @public\n */\n format: {\n type: String,\n },\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThis component shows the previous price formatted if it has discount. The component has an optional\n`format` prop to select the currency format to be applied.\n\n```vue\n<template>\n <BaseResultPreviousPrice :result=\"result\" :format=\"'i.iii,ddd €'\" />\n</template>\n\n<script setup>\nimport { BaseResultPreviousPrice } from '@empathyco/x-components'\nconst result = {\n price: { originalValue: 199.99, hasDiscount: true },\n // ...other result properties\n}\n</script>\n```\n\n### Overriding default slot\n\n```vue\n<template>\n <BaseResultPreviousPrice :result=\"result\">\n <span class=\"custom-base-result-previous-price\">{{ result.price.originalValue }}</span>\n </BaseResultPreviousPrice>\n</template>\n\n<script setup>\nimport { BaseResultPreviousPrice } from '@empathyco/x-components'\nconst result = {\n price: { originalValue: 199.99, hasDiscount: true },\n // ...other result properties\n}\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;AA0BA;;;;AAIE;AACF,gBAAe,eAAe,CAAC;IAC7B,UAAU,EAAE,EAAE,YAAW,EAAG;AAC5B,IAAA,KAAK,EAAE;AACL;;;;AAIE;AACF,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA;AACD;;;;;;;;;;;;;;;AAeE;AACF,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAAM;AACb,SAAA;AACF,KAAA;AACF,CAAA,CAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-components",
3
- "version": "6.2.3",
3
+ "version": "6.3.1",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -68,8 +68,8 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@empathyco/x-adapter": "8.1.6",
71
- "@empathyco/x-adapter-platform": "1.3.0",
72
- "@empathyco/x-types": "10.2.2",
71
+ "@empathyco/x-adapter-platform": "1.4.1",
72
+ "@empathyco/x-types": "10.3.1",
73
73
  "@empathyco/x-utils": "1.0.7",
74
74
  "@vue/devtools-api": "~6.6.4",
75
75
  "@vueuse/core": "~12.8.2",
@@ -117,5 +117,5 @@
117
117
  "access": "public",
118
118
  "directory": "dist"
119
119
  },
120
- "gitHead": "af88135eb04f0769bce8975638ee469496cef5a6"
120
+ "gitHead": "c07fa0a7e9896c172425db00488e932b005bf2e9"
121
121
  }