@eox/pages-theme-eox 1.4.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 +6 -0
- package/README.md +8 -0
- package/package.json +1 -1
- package/src/components/PricingTable.vue +37 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
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
|
+
|
|
3
9
|
# [1.4.0](https://gitlab.eox.at/eox/hub/eoxhub-portal/compare/v1.3.0...v1.4.0) (2026-04-23)
|
|
4
10
|
|
|
5
11
|
### 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
|
@@ -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,15 +81,25 @@
|
|
|
81
81
|
:class="`cell orig-col-${index + 2}`"
|
|
82
82
|
>
|
|
83
83
|
<div class="small-round surface-container medium-padding">
|
|
84
|
-
<
|
|
84
|
+
<h6
|
|
85
85
|
v-if="typeof plan.basePrice === 'string'"
|
|
86
86
|
class="primary-text bold"
|
|
87
87
|
>
|
|
88
88
|
{{ t(plan.basePrice, theme.i18n) }}
|
|
89
|
-
</
|
|
89
|
+
</h6>
|
|
90
90
|
<h4 v-else class="primary-text bold">
|
|
91
91
|
€ {{ calculatePrice(plan) }},-
|
|
92
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>
|
|
93
103
|
</div>
|
|
94
104
|
</div>
|
|
95
105
|
|
|
@@ -98,11 +108,10 @@
|
|
|
98
108
|
:key="'row-' + rowIndex"
|
|
99
109
|
>
|
|
100
110
|
<div
|
|
101
|
-
v-if="typeof row === 'string'"
|
|
111
|
+
v-if="typeof row === 'string' && showDescriptionColumn"
|
|
102
112
|
class="cell orig-col-1 l"
|
|
103
113
|
v-html="row + ':'"
|
|
104
114
|
></div>
|
|
105
|
-
|
|
106
115
|
<div
|
|
107
116
|
v-for="(plan, planIndex) in localPlans"
|
|
108
117
|
:key="`${planIndex}-${row}`"
|
|
@@ -111,7 +120,7 @@
|
|
|
111
120
|
>
|
|
112
121
|
<div
|
|
113
122
|
v-if="typeof plan.details[row] === 'string'"
|
|
114
|
-
class="s m
|
|
123
|
+
:class="`grey-text ${showDescriptionColumn ? 's m' : 'small-text row-label'}`"
|
|
115
124
|
v-html="row"
|
|
116
125
|
></div>
|
|
117
126
|
<div
|
|
@@ -147,7 +156,7 @@
|
|
|
147
156
|
</template>
|
|
148
157
|
</div>
|
|
149
158
|
</template>
|
|
150
|
-
<div class="cell orig-col-1 l"></div>
|
|
159
|
+
<div v-if="showDescriptionColumn" class="cell orig-col-1 l"></div>
|
|
151
160
|
<div
|
|
152
161
|
v-for="(plan, index) in localPlans"
|
|
153
162
|
:key="'cta-' + index"
|
|
@@ -168,7 +177,7 @@
|
|
|
168
177
|
</a>
|
|
169
178
|
</div>
|
|
170
179
|
<!-- Contact us section -->
|
|
171
|
-
<div class="cell orig-col-1 l"></div>
|
|
180
|
+
<div v-if="showDescriptionColumn" class="cell orig-col-1 l"></div>
|
|
172
181
|
<div
|
|
173
182
|
v-if="showSales"
|
|
174
183
|
v-for="(plan, index) in localPlans"
|
|
@@ -196,7 +205,7 @@
|
|
|
196
205
|
</div>
|
|
197
206
|
|
|
198
207
|
<div class="wrapper" :style="secondaryGridStyle">
|
|
199
|
-
<div class="cell cell orig-col-1 l">
|
|
208
|
+
<div v-if="showDescriptionColumn" class="cell cell orig-col-1 l">
|
|
200
209
|
<div class="">{{ t("Additional price:", theme.i18n) }}</div>
|
|
201
210
|
</div>
|
|
202
211
|
<div
|
|
@@ -215,7 +224,7 @@
|
|
|
215
224
|
:key="'row-' + rowIndex"
|
|
216
225
|
>
|
|
217
226
|
<div
|
|
218
|
-
v-if="typeof row === 'string'"
|
|
227
|
+
v-if="typeof row === 'string' && showDescriptionColumn"
|
|
219
228
|
class="cell orig-col-1 l"
|
|
220
229
|
v-html="row + ':'"
|
|
221
230
|
></div>
|
|
@@ -277,6 +286,10 @@ export default {
|
|
|
277
286
|
details: [],
|
|
278
287
|
}),
|
|
279
288
|
},
|
|
289
|
+
showDescriptionColumn: {
|
|
290
|
+
type: Boolean,
|
|
291
|
+
default: true,
|
|
292
|
+
},
|
|
280
293
|
},
|
|
281
294
|
data() {
|
|
282
295
|
return {
|
|
@@ -295,14 +308,14 @@ export default {
|
|
|
295
308
|
// dynamically asign number of cols in grid when not on mobile
|
|
296
309
|
if (!this.isMobile) {
|
|
297
310
|
return {
|
|
298
|
-
"grid-template-columns": `repeat(${this.localPlans.length + 1}, 1fr)`,
|
|
311
|
+
"grid-template-columns": `repeat(${this.localPlans.length + (this.showDescriptionColumn ? 1 : 0)}, 1fr)`,
|
|
299
312
|
};
|
|
300
313
|
}
|
|
301
314
|
},
|
|
302
315
|
secondaryGridStyle() {
|
|
303
316
|
if (!this.isMobile && this.localDetails) {
|
|
304
317
|
return {
|
|
305
|
-
"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)`,
|
|
306
319
|
};
|
|
307
320
|
}
|
|
308
321
|
},
|
|
@@ -361,10 +374,13 @@ export default {
|
|
|
361
374
|
if (typeof window === "undefined") {
|
|
362
375
|
return;
|
|
363
376
|
}
|
|
364
|
-
const count =
|
|
377
|
+
const count =
|
|
378
|
+
this.localPlans.length + (this.showDescriptionColumn ? 1 : 0);
|
|
365
379
|
for (let i = 1; i <= count; i++) {
|
|
366
|
-
const
|
|
380
|
+
const colIndex = this.showDescriptionColumn ? i : i + 1;
|
|
381
|
+
const elements = document.querySelectorAll(`.orig-col-${colIndex}`);
|
|
367
382
|
elements.forEach((el) => {
|
|
383
|
+
// The order should be based on `i` for mobile layout
|
|
368
384
|
el.style.order = this.isMobile ? i : "";
|
|
369
385
|
});
|
|
370
386
|
}
|
|
@@ -448,7 +464,7 @@ export default {
|
|
|
448
464
|
|
|
449
465
|
<style scoped>
|
|
450
466
|
.container {
|
|
451
|
-
padding:
|
|
467
|
+
padding: 1rem 0;
|
|
452
468
|
z-index: 0;
|
|
453
469
|
}
|
|
454
470
|
|
|
@@ -458,7 +474,7 @@ export default {
|
|
|
458
474
|
}
|
|
459
475
|
|
|
460
476
|
.cell {
|
|
461
|
-
padding:
|
|
477
|
+
padding: 4px 16px 8px 16px;
|
|
462
478
|
overflow: hidden;
|
|
463
479
|
}
|
|
464
480
|
|
|
@@ -484,6 +500,10 @@ export default {
|
|
|
484
500
|
}
|
|
485
501
|
}
|
|
486
502
|
|
|
503
|
+
.row-label {
|
|
504
|
+
font-weight: normal;
|
|
505
|
+
}
|
|
506
|
+
|
|
487
507
|
.alternative:has(input:not(:checked)) + span,
|
|
488
508
|
span:has(+ * + * > input:checked) {
|
|
489
509
|
text-decoration: line-through;
|