project-booster-vue 9.20.0 → 9.22.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-booster-vue",
3
- "version": "9.20.0",
3
+ "version": "9.22.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1462,3 +1462,25 @@ export const TemplateSandbox = (args, { argTypes }) => ({
1462
1462
  }}
1463
1463
  </Story>
1464
1464
  </Canvas>
1465
+
1466
+ ## **Card Link** prop
1467
+
1468
+ <Canvas>
1469
+ <Story name="Features/Card Link" parameters={{ controls: { disable: true } }}>
1470
+ {{
1471
+ components: { PbCard },
1472
+ template: `
1473
+ <div style="display: flex;gap: 1rem;flex-wrap: wrap;">
1474
+ <pb-card
1475
+ image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
1476
+ title="The card title"
1477
+ text="The card text should have two lines"
1478
+ card-link="http://www.google.com"
1479
+ type-icon="https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Payment_Bill_24px.svg"
1480
+ class="pb-card--story"
1481
+ />
1482
+ </div>
1483
+ `,
1484
+ }}
1485
+ </Story>
1486
+ </Canvas>
@@ -196,6 +196,13 @@ export default defineComponent({
196
196
  type: String,
197
197
  default: null,
198
198
  },
199
+ /**
200
+ * The button HREF. Will turn the button into a link.
201
+ */
202
+ cardLink: {
203
+ type: String,
204
+ default: null,
205
+ },
199
206
  /**
200
207
  * The button HREF. Will turn the button into a link.
201
208
  */
@@ -321,6 +328,7 @@ export default defineComponent({
321
328
  this.$emit('link-click');
322
329
  },
323
330
  handleCardClick() {
331
+ this.cardLink ? window.open(this.cardLink, '_blank') : '';
324
332
  !this.buttonLabel && !this.linkLabel ? this.$emit('card-click') : '';
325
333
  },
326
334
  handleButtonLinkClicked(href: string) {
@@ -85,6 +85,9 @@
85
85
  :hero="decorate(answers, runtimeOptions, answer.viewModel.hero, payload.defaultDecoratorValue)"
86
86
  :title="decorate(answers, runtimeOptions, answer.viewModel.title, payload.defaultDecoratorValue)"
87
87
  :text="decorate(answers, runtimeOptions, answer.viewModel.text, payload.defaultDecoratorValue)"
88
+ :card-link="
89
+ decorate(answers, runtimeOptions, answer.viewModel.cardLink, payload.defaultDecoratorValue)
90
+ "
88
91
  :button-label="
89
92
  decorate(answers, runtimeOptions, answer.viewModel.buttonLabel, payload.defaultDecoratorValue)
90
93
  "
@@ -102,6 +102,7 @@ import PbSmartProgressionPrice from '../progression-price/PbSmartProgressionPric
102
102
  import PbSpaceInput from '../question/space-input/PbSpaceInput.vue';
103
103
  import PbUploadDocument from '../question/upload-document/PbUploadDocument.vue';
104
104
  import PbConfigurationsImport from '../question/configurations-import/PbConfigurationsImport.vue';
105
+ import PbCitySearch from '../question/city-search/PbCitySearch.vue';
105
106
  import { areConditionsValid } from '../../services/scenarioConditionals';
106
107
  import {
107
108
  Scenario,
@@ -136,6 +137,7 @@ export default defineComponent({
136
137
  PbUploadDocument,
137
138
  PbConfigurationsImport,
138
139
  PbAppointmentForm,
140
+ PbCitySearch,
139
141
  },
140
142
 
141
143
  props: {