@eox/pages-theme-eox 1.3.0 → 1.5.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,17 @@
1
1
  # Changelog
2
2
 
3
+ # [1.5.0](https://gitlab.eox.at/eox/hub/eoxhub-portal/compare/v1.4.0...v1.5.0) (2026-04-28)
4
+
5
+ ### Features
6
+
7
+ - optional description column in pricing table ([7f09db4](https://gitlab.eox.at/eox/hub/eoxhub-portal/commit/7f09db4582311be7d0d64a6eb5c63efc1ab649a9))
8
+
9
+ # [1.4.0](https://gitlab.eox.at/eox/hub/eoxhub-portal/compare/v1.3.0...v1.4.0) (2026-04-23)
10
+
11
+ ### Features
12
+
13
+ - support strings for baseprice ([1fd6df2](https://gitlab.eox.at/eox/hub/eoxhub-portal/commit/1fd6df2a226ff79824e0a570312030f9747eacd0))
14
+
3
15
  # [1.3.0](https://gitlab.eox.at/eox/hub/eoxhub-portal/compare/v1.2.2...v1.3.0) (2026-04-14)
4
16
 
5
17
  ### Features
package/README.md CHANGED
@@ -189,6 +189,13 @@ Use the `<FeatureSection>` component to highlight specific features.
189
189
 
190
190
  A flexible pricing table component.
191
191
 
192
+ #### Properties
193
+
194
+ | Property | Type | Default | Description |
195
+ | :---------------------- | :-------- | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
196
+ | `config` | `Object` | See component | Configuration for plans, options, and details tables. |
197
+ | `showDescriptionColumn` | `Boolean` | `true` | When `true`, shows the labels/description column on the left (e.g., "Price", "Plans"). When `false`, the column is hidden and labels are partially shown inside cells (useful for compact/mobile view). |
198
+
192
199
  ```html
193
200
  <PricingTable
194
201
  :config="{
@@ -208,6 +215,7 @@ A flexible pricing table component.
208
215
  }
209
216
  ]
210
217
  }"
218
+ :showDescriptionColumn="true"
211
219
  />
212
220
  ```
213
221
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/pages-theme-eox",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "type": "module",
5
5
  "description": "Vitepress Theme with EOX branding",
6
6
  "main": "src/index.js",
@@ -98,10 +98,10 @@ describe("<FeaturesGallery />", () => {
98
98
  },
99
99
  });
100
100
 
101
- cy.get("a.link-card")
101
+ cy.get(".link-card a.link-overlay")
102
102
  .should("have.attr", "href", "/card-2")
103
103
  .and("have.attr", "target", "_self");
104
- cy.get("a.link-card article").should("exist");
104
+ cy.get(".link-card article").should("exist");
105
105
  });
106
106
 
107
107
  it("does not wrap card when link has text", () => {
@@ -57,7 +57,7 @@
57
57
  <h6 v-if="localDetails.length" class="bold padding-4">{{ title }}</h6>
58
58
  <!-- Main Plans Table -->
59
59
  <div class="wrapper" :style="gridStyle">
60
- <div class="cell orig-col-1 l top-margin">
60
+ <div v-if="showDescriptionColumn" class="cell orig-col-1 l top-margin">
61
61
  <h6 v-if="!localDetails.length" class="bold small">
62
62
  {{ t("Plans:", theme.i18n) }}
63
63
  </h6>
@@ -71,7 +71,7 @@
71
71
  <h6 class="primary-text bold top-margin">{{ plan.name }}</h6>
72
72
  </div>
73
73
 
74
- <div class="cell orig-col-1 l">
74
+ <div v-if="showDescriptionColumn" class="cell orig-col-1 l">
75
75
  {{ t("Price (per month):", theme.i18n) }}
76
76
  </div>
77
77
  <div
@@ -81,7 +81,25 @@
81
81
  :class="`cell orig-col-${index + 2}`"
82
82
  >
83
83
  <div class="small-round surface-container medium-padding">
84
- <h4 class="primary-text bold">€ {{ calculatePrice(plan) }},-</h4>
84
+ <h6
85
+ v-if="typeof plan.basePrice === 'string'"
86
+ class="primary-text bold"
87
+ >
88
+ {{ t(plan.basePrice, theme.i18n) }}
89
+ </h6>
90
+ <h4 v-else class="primary-text bold">
91
+ € {{ calculatePrice(plan) }},-
92
+ </h4>
93
+ <span
94
+ v-if="
95
+ !showDescriptionColumn &&
96
+ typeof plan.basePrice != 'string' &&
97
+ plan.basePrice != 0
98
+ "
99
+ class="small-text grey-text row-label"
100
+ >
101
+ {{ t("per month", theme.i18n) }}
102
+ </span>
85
103
  </div>
86
104
  </div>
87
105
 
@@ -90,11 +108,10 @@
90
108
  :key="'row-' + rowIndex"
91
109
  >
92
110
  <div
93
- v-if="typeof row === 'string'"
111
+ v-if="typeof row === 'string' && showDescriptionColumn"
94
112
  class="cell orig-col-1 l"
95
113
  v-html="row + ':'"
96
114
  ></div>
97
-
98
115
  <div
99
116
  v-for="(plan, planIndex) in localPlans"
100
117
  :key="`${planIndex}-${row}`"
@@ -103,7 +120,7 @@
103
120
  >
104
121
  <div
105
122
  v-if="typeof plan.details[row] === 'string'"
106
- class="s m grey-text"
123
+ :class="`grey-text ${showDescriptionColumn ? 's m' : 'small-text row-label'}`"
107
124
  v-html="row"
108
125
  ></div>
109
126
  <div
@@ -139,7 +156,7 @@
139
156
  </template>
140
157
  </div>
141
158
  </template>
142
- <div class="cell orig-col-1 l"></div>
159
+ <div v-if="showDescriptionColumn" class="cell orig-col-1 l"></div>
143
160
  <div
144
161
  v-for="(plan, index) in localPlans"
145
162
  :key="'cta-' + index"
@@ -160,7 +177,7 @@
160
177
  </a>
161
178
  </div>
162
179
  <!-- Contact us section -->
163
- <div class="cell orig-col-1 l"></div>
180
+ <div v-if="showDescriptionColumn" class="cell orig-col-1 l"></div>
164
181
  <div
165
182
  v-if="showSales"
166
183
  v-for="(plan, index) in localPlans"
@@ -188,7 +205,7 @@
188
205
  </div>
189
206
 
190
207
  <div class="wrapper" :style="secondaryGridStyle">
191
- <div class="cell cell orig-col-1 l">
208
+ <div v-if="showDescriptionColumn" class="cell cell orig-col-1 l">
192
209
  <div class="">{{ t("Additional price:", theme.i18n) }}</div>
193
210
  </div>
194
211
  <div
@@ -207,7 +224,7 @@
207
224
  :key="'row-' + rowIndex"
208
225
  >
209
226
  <div
210
- v-if="typeof row === 'string'"
227
+ v-if="typeof row === 'string' && showDescriptionColumn"
211
228
  class="cell orig-col-1 l"
212
229
  v-html="row + ':'"
213
230
  ></div>
@@ -269,6 +286,10 @@ export default {
269
286
  details: [],
270
287
  }),
271
288
  },
289
+ showDescriptionColumn: {
290
+ type: Boolean,
291
+ default: true,
292
+ },
272
293
  },
273
294
  data() {
274
295
  return {
@@ -287,21 +308,24 @@ export default {
287
308
  // dynamically asign number of cols in grid when not on mobile
288
309
  if (!this.isMobile) {
289
310
  return {
290
- "grid-template-columns": `repeat(${this.localPlans.length + 1}, 1fr)`,
311
+ "grid-template-columns": `repeat(${this.localPlans.length + (this.showDescriptionColumn ? 1 : 0)}, 1fr)`,
291
312
  };
292
313
  }
293
314
  },
294
315
  secondaryGridStyle() {
295
316
  if (!this.isMobile && this.localDetails) {
296
317
  return {
297
- "grid-template-columns": `repeat(${this.localDetails[0].plans.length + 1}, 1fr)`,
318
+ "grid-template-columns": `repeat(${this.localDetails[0].plans.length + (this.showDescriptionColumn ? 1 : 0)}, 1fr)`,
298
319
  };
299
320
  }
300
321
  },
301
322
  },
302
323
  methods: {
303
324
  calculatePrice(plan) {
304
- const basePrice = plan.basePrice;
325
+ // Prevent Math operations from running if a string was passed
326
+ if (typeof plan.basePrice === "string") return 0;
327
+
328
+ const basePrice = plan.basePrice || 0;
305
329
  const additionalOptionPrice = this.localOptions
306
330
  .filter((option) => option.checked)
307
331
  .reduce((sum, option) => sum + (option.modifier || 0), 0);
@@ -350,10 +374,13 @@ export default {
350
374
  if (typeof window === "undefined") {
351
375
  return;
352
376
  }
353
- const count = this.localPlans.length + 1;
377
+ const count =
378
+ this.localPlans.length + (this.showDescriptionColumn ? 1 : 0);
354
379
  for (let i = 1; i <= count; i++) {
355
- const elements = document.querySelectorAll(`.orig-col-${i}`);
380
+ const colIndex = this.showDescriptionColumn ? i : i + 1;
381
+ const elements = document.querySelectorAll(`.orig-col-${colIndex}`);
356
382
  elements.forEach((el) => {
383
+ // The order should be based on `i` for mobile layout
357
384
  el.style.order = this.isMobile ? i : "";
358
385
  });
359
386
  }
@@ -437,7 +464,7 @@ export default {
437
464
 
438
465
  <style scoped>
439
466
  .container {
440
- padding: 3rem 0;
467
+ padding: 1rem 0;
441
468
  z-index: 0;
442
469
  }
443
470
 
@@ -447,7 +474,7 @@ export default {
447
474
  }
448
475
 
449
476
  .cell {
450
- padding: 8px 16px 24px 16px;
477
+ padding: 4px 16px 8px 16px;
451
478
  overflow: hidden;
452
479
  }
453
480
 
@@ -473,6 +500,10 @@ export default {
473
500
  }
474
501
  }
475
502
 
503
+ .row-label {
504
+ font-weight: normal;
505
+ }
506
+
476
507
  .alternative:has(input:not(:checked)) + span,
477
508
  span:has(+ * + * > input:checked) {
478
509
  text-decoration: line-through;