@oods/components-vue 0.4.1 → 0.4.2
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/README.md +1 -1
- package/dist/index.cjs +13 -4
- package/dist/index.d.cts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +13 -4
- package/dist/ported.cjs +4 -1
- package/dist/ported.d.cts +10 -1
- package/dist/ported.d.ts +10 -1
- package/dist/ported.js +4 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -34,4 +34,4 @@ Use matching versions of the OODS packages. These packages are separate from the
|
|
|
34
34
|
|
|
35
35
|
## License
|
|
36
36
|
|
|
37
|
-
Apache License 2.0. See [LICENSE](https://cdn.jsdelivr.net/npm/@oods/components-vue@0.4.
|
|
37
|
+
Apache License 2.0. See [LICENSE](https://cdn.jsdelivr.net/npm/@oods/components-vue@0.4.2/LICENSE) and [NOTICE](https://cdn.jsdelivr.net/npm/@oods/components-vue@0.4.2/NOTICE). Generated output belongs to its user; installed package dependencies retain their own licenses.
|
package/dist/index.cjs
CHANGED
|
@@ -1523,11 +1523,14 @@ var CancellationBadge = createBadgeFamily({
|
|
|
1523
1523
|
booleanLabels: ["Cancellation scheduled", "No cancellation scheduled"]
|
|
1524
1524
|
});
|
|
1525
1525
|
var ArchiveSummary = vue.defineComponent({
|
|
1526
|
+
// s224-m01 (#2542 ruling 6): hideWhenDefault is Boolean first, as the badges' hideWhenFalse is: a generated template writes
|
|
1527
|
+
// the bare attribute, which Vue casts to true only then.
|
|
1526
1528
|
name: "OodsArchiveSummary",
|
|
1527
|
-
props: { title: String, label: String, heading: String, name: String, isArchived: { type: [String, Boolean], default: void 0 }, archived: { type: [String, Boolean], default: void 0 }, status: { type: [String, Boolean], default: void 0 }, archivedAt: String, reason: String, archiveReason: String, summary: String, text: String, description: String },
|
|
1529
|
+
props: { title: String, label: String, heading: String, name: String, isArchived: { type: [String, Boolean], default: void 0 }, archived: { type: [String, Boolean], default: void 0 }, status: { type: [String, Boolean], default: void 0 }, archivedAt: String, reason: String, archiveReason: String, summary: String, text: String, description: String, hideWhenDefault: { type: [Boolean, String], default: void 0 } },
|
|
1528
1530
|
setup(props, { slots }) {
|
|
1529
1531
|
return () => {
|
|
1530
1532
|
const content = authoredContent(slots.default?.());
|
|
1533
|
+
if (props.hideWhenDefault === true && (props.isArchived ?? props.archived ?? props.status) === false && !props.archivedAt && !firstText(props.reason, props.archiveReason) && !content.length) return null;
|
|
1531
1534
|
const terms = [["Archived", componentContracts.summaryValue(props.isArchived ?? props.archived ?? props.status)], ["Archived At", props.archivedAt ? componentContracts.formatDateTime(props.archivedAt) : void 0], ["Reason", firstText(props.reason, props.archiveReason)]].filter((entry) => entry[1] !== void 0);
|
|
1532
1535
|
const fallback = firstText(props.summary, props.text, props.description);
|
|
1533
1536
|
return vue.h("section", { class: "oods-archive-summary", "data-oods-component": "ArchiveSummary", "data-summary-type": "archive" }, [
|
|
@@ -2183,13 +2186,16 @@ var Tabs = vue.defineComponent({
|
|
|
2183
2186
|
onClick: () => selectTab(item.id),
|
|
2184
2187
|
onKeydown: (event) => onTabKeydown(event, item.id)
|
|
2185
2188
|
}, slots.itemLabel?.({ item, selected: item.id === activeId.value }) ?? [item.label])),
|
|
2186
|
-
|
|
2189
|
+
// s224-m01 (#2542 ruling 2): the overflow markup is React's too: both class families, the trigger's data
|
|
2190
|
+
// attribute and aria-current="true" on an item.
|
|
2191
|
+
overflowItems.value.length > 0 ? vue.h("div", { class: "oods-tabs-overflow oods-tabs__overflow" }, [
|
|
2187
2192
|
vue.h("button", {
|
|
2188
2193
|
type: "button",
|
|
2189
2194
|
class: "oods-tabs-overflow-trigger",
|
|
2190
2195
|
"aria-label": `${props.overflowLabel} tabs`,
|
|
2191
2196
|
"aria-haspopup": "menu",
|
|
2192
2197
|
"aria-expanded": overflowOpen.value,
|
|
2198
|
+
"data-tabs-overflow-trigger": "true",
|
|
2193
2199
|
onClick: () => {
|
|
2194
2200
|
overflowOpen.value = !overflowOpen.value;
|
|
2195
2201
|
}
|
|
@@ -2199,7 +2205,7 @@ var Tabs = vue.defineComponent({
|
|
|
2199
2205
|
type: "button",
|
|
2200
2206
|
role: "menuitem",
|
|
2201
2207
|
disabled: itemDisabled(item),
|
|
2202
|
-
"aria-current": item.id === activeId.value ? "
|
|
2208
|
+
"aria-current": item.id === activeId.value ? "true" : void 0,
|
|
2203
2209
|
onClick: () => {
|
|
2204
2210
|
selectTab(item.id);
|
|
2205
2211
|
overflowOpen.value = false;
|
|
@@ -2613,12 +2619,15 @@ var CancellationSummary = vue.defineComponent({
|
|
|
2613
2619
|
cancelAtPeriodEndField: String,
|
|
2614
2620
|
requestedAtField: String,
|
|
2615
2621
|
reasonField: String,
|
|
2616
|
-
codeField: String
|
|
2622
|
+
codeField: String,
|
|
2623
|
+
// s224-m01 (#2542 ruling 6): Boolean first, as the badges' hideWhenFalse is (a bare attribute casts to true).
|
|
2624
|
+
hideWhenDefault: { type: [Boolean, String], default: void 0 }
|
|
2617
2625
|
},
|
|
2618
2626
|
setup(props, { attrs, slots }) {
|
|
2619
2627
|
return () => {
|
|
2620
2628
|
const slotValue = slotSummaryValue(slots);
|
|
2621
2629
|
const cancellationValue = props.cancelAtPeriodEnd ?? slotValue;
|
|
2630
|
+
if (props.hideWhenDefault === true && props.cancelAtPeriodEnd === false && !props.requestedAt && !props.reason && !props.code && slotValue === void 0) return null;
|
|
2622
2631
|
const rows = [];
|
|
2623
2632
|
if (cancellationValue !== void 0) {
|
|
2624
2633
|
rows.push(summaryEntry(
|
package/dist/index.d.cts
CHANGED
|
@@ -1695,9 +1695,13 @@ declare const ArchiveSummary: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1695
1695
|
summary: StringConstructor;
|
|
1696
1696
|
text: StringConstructor;
|
|
1697
1697
|
description: StringConstructor;
|
|
1698
|
+
hideWhenDefault: {
|
|
1699
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
1700
|
+
default: undefined;
|
|
1701
|
+
};
|
|
1698
1702
|
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
1699
1703
|
[key: string]: any;
|
|
1700
|
-
}
|
|
1704
|
+
}> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
1701
1705
|
title: StringConstructor;
|
|
1702
1706
|
label: StringConstructor;
|
|
1703
1707
|
heading: StringConstructor;
|
|
@@ -1720,10 +1724,15 @@ declare const ArchiveSummary: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1720
1724
|
summary: StringConstructor;
|
|
1721
1725
|
text: StringConstructor;
|
|
1722
1726
|
description: StringConstructor;
|
|
1727
|
+
hideWhenDefault: {
|
|
1728
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
1729
|
+
default: undefined;
|
|
1730
|
+
};
|
|
1723
1731
|
}>> & Readonly<{}>, {
|
|
1724
1732
|
status: string | boolean;
|
|
1725
1733
|
isArchived: string | boolean;
|
|
1726
1734
|
archived: string | boolean;
|
|
1735
|
+
hideWhenDefault: string | boolean;
|
|
1727
1736
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1728
1737
|
declare const PriceCardMeta: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
1729
1738
|
title: StringConstructor;
|
|
@@ -2722,9 +2731,13 @@ declare const CancellationSummary: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
2722
2731
|
requestedAtField: StringConstructor;
|
|
2723
2732
|
reasonField: StringConstructor;
|
|
2724
2733
|
codeField: StringConstructor;
|
|
2734
|
+
hideWhenDefault: {
|
|
2735
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
2736
|
+
default: undefined;
|
|
2737
|
+
};
|
|
2725
2738
|
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
2726
2739
|
[key: string]: any;
|
|
2727
|
-
}
|
|
2740
|
+
}> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
2728
2741
|
title: StringConstructor;
|
|
2729
2742
|
label: StringConstructor;
|
|
2730
2743
|
cancelAtPeriodEnd: {
|
|
@@ -2739,8 +2752,13 @@ declare const CancellationSummary: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
2739
2752
|
requestedAtField: StringConstructor;
|
|
2740
2753
|
reasonField: StringConstructor;
|
|
2741
2754
|
codeField: StringConstructor;
|
|
2755
|
+
hideWhenDefault: {
|
|
2756
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
2757
|
+
default: undefined;
|
|
2758
|
+
};
|
|
2742
2759
|
}>> & Readonly<{}>, {
|
|
2743
2760
|
cancelAtPeriodEnd: boolean;
|
|
2761
|
+
hideWhenDefault: string | boolean;
|
|
2744
2762
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
2745
2763
|
declare const SearchInput: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
2746
2764
|
id: StringConstructor;
|
package/dist/index.d.ts
CHANGED
|
@@ -1695,9 +1695,13 @@ declare const ArchiveSummary: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1695
1695
|
summary: StringConstructor;
|
|
1696
1696
|
text: StringConstructor;
|
|
1697
1697
|
description: StringConstructor;
|
|
1698
|
+
hideWhenDefault: {
|
|
1699
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
1700
|
+
default: undefined;
|
|
1701
|
+
};
|
|
1698
1702
|
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
1699
1703
|
[key: string]: any;
|
|
1700
|
-
}
|
|
1704
|
+
}> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
1701
1705
|
title: StringConstructor;
|
|
1702
1706
|
label: StringConstructor;
|
|
1703
1707
|
heading: StringConstructor;
|
|
@@ -1720,10 +1724,15 @@ declare const ArchiveSummary: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1720
1724
|
summary: StringConstructor;
|
|
1721
1725
|
text: StringConstructor;
|
|
1722
1726
|
description: StringConstructor;
|
|
1727
|
+
hideWhenDefault: {
|
|
1728
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
1729
|
+
default: undefined;
|
|
1730
|
+
};
|
|
1723
1731
|
}>> & Readonly<{}>, {
|
|
1724
1732
|
status: string | boolean;
|
|
1725
1733
|
isArchived: string | boolean;
|
|
1726
1734
|
archived: string | boolean;
|
|
1735
|
+
hideWhenDefault: string | boolean;
|
|
1727
1736
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1728
1737
|
declare const PriceCardMeta: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
1729
1738
|
title: StringConstructor;
|
|
@@ -2722,9 +2731,13 @@ declare const CancellationSummary: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
2722
2731
|
requestedAtField: StringConstructor;
|
|
2723
2732
|
reasonField: StringConstructor;
|
|
2724
2733
|
codeField: StringConstructor;
|
|
2734
|
+
hideWhenDefault: {
|
|
2735
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
2736
|
+
default: undefined;
|
|
2737
|
+
};
|
|
2725
2738
|
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
2726
2739
|
[key: string]: any;
|
|
2727
|
-
}
|
|
2740
|
+
}> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
2728
2741
|
title: StringConstructor;
|
|
2729
2742
|
label: StringConstructor;
|
|
2730
2743
|
cancelAtPeriodEnd: {
|
|
@@ -2739,8 +2752,13 @@ declare const CancellationSummary: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
2739
2752
|
requestedAtField: StringConstructor;
|
|
2740
2753
|
reasonField: StringConstructor;
|
|
2741
2754
|
codeField: StringConstructor;
|
|
2755
|
+
hideWhenDefault: {
|
|
2756
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
2757
|
+
default: undefined;
|
|
2758
|
+
};
|
|
2742
2759
|
}>> & Readonly<{}>, {
|
|
2743
2760
|
cancelAtPeriodEnd: boolean;
|
|
2761
|
+
hideWhenDefault: string | boolean;
|
|
2744
2762
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
2745
2763
|
declare const SearchInput: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
2746
2764
|
id: StringConstructor;
|
package/dist/index.js
CHANGED
|
@@ -1521,11 +1521,14 @@ var CancellationBadge = createBadgeFamily({
|
|
|
1521
1521
|
booleanLabels: ["Cancellation scheduled", "No cancellation scheduled"]
|
|
1522
1522
|
});
|
|
1523
1523
|
var ArchiveSummary = defineComponent({
|
|
1524
|
+
// s224-m01 (#2542 ruling 6): hideWhenDefault is Boolean first, as the badges' hideWhenFalse is: a generated template writes
|
|
1525
|
+
// the bare attribute, which Vue casts to true only then.
|
|
1524
1526
|
name: "OodsArchiveSummary",
|
|
1525
|
-
props: { title: String, label: String, heading: String, name: String, isArchived: { type: [String, Boolean], default: void 0 }, archived: { type: [String, Boolean], default: void 0 }, status: { type: [String, Boolean], default: void 0 }, archivedAt: String, reason: String, archiveReason: String, summary: String, text: String, description: String },
|
|
1527
|
+
props: { title: String, label: String, heading: String, name: String, isArchived: { type: [String, Boolean], default: void 0 }, archived: { type: [String, Boolean], default: void 0 }, status: { type: [String, Boolean], default: void 0 }, archivedAt: String, reason: String, archiveReason: String, summary: String, text: String, description: String, hideWhenDefault: { type: [Boolean, String], default: void 0 } },
|
|
1526
1528
|
setup(props, { slots }) {
|
|
1527
1529
|
return () => {
|
|
1528
1530
|
const content = authoredContent(slots.default?.());
|
|
1531
|
+
if (props.hideWhenDefault === true && (props.isArchived ?? props.archived ?? props.status) === false && !props.archivedAt && !firstText(props.reason, props.archiveReason) && !content.length) return null;
|
|
1529
1532
|
const terms = [["Archived", summaryValue(props.isArchived ?? props.archived ?? props.status)], ["Archived At", props.archivedAt ? formatDateTime(props.archivedAt) : void 0], ["Reason", firstText(props.reason, props.archiveReason)]].filter((entry) => entry[1] !== void 0);
|
|
1530
1533
|
const fallback = firstText(props.summary, props.text, props.description);
|
|
1531
1534
|
return h("section", { class: "oods-archive-summary", "data-oods-component": "ArchiveSummary", "data-summary-type": "archive" }, [
|
|
@@ -2181,13 +2184,16 @@ var Tabs = defineComponent({
|
|
|
2181
2184
|
onClick: () => selectTab(item.id),
|
|
2182
2185
|
onKeydown: (event) => onTabKeydown(event, item.id)
|
|
2183
2186
|
}, slots.itemLabel?.({ item, selected: item.id === activeId.value }) ?? [item.label])),
|
|
2184
|
-
|
|
2187
|
+
// s224-m01 (#2542 ruling 2): the overflow markup is React's too: both class families, the trigger's data
|
|
2188
|
+
// attribute and aria-current="true" on an item.
|
|
2189
|
+
overflowItems.value.length > 0 ? h("div", { class: "oods-tabs-overflow oods-tabs__overflow" }, [
|
|
2185
2190
|
h("button", {
|
|
2186
2191
|
type: "button",
|
|
2187
2192
|
class: "oods-tabs-overflow-trigger",
|
|
2188
2193
|
"aria-label": `${props.overflowLabel} tabs`,
|
|
2189
2194
|
"aria-haspopup": "menu",
|
|
2190
2195
|
"aria-expanded": overflowOpen.value,
|
|
2196
|
+
"data-tabs-overflow-trigger": "true",
|
|
2191
2197
|
onClick: () => {
|
|
2192
2198
|
overflowOpen.value = !overflowOpen.value;
|
|
2193
2199
|
}
|
|
@@ -2197,7 +2203,7 @@ var Tabs = defineComponent({
|
|
|
2197
2203
|
type: "button",
|
|
2198
2204
|
role: "menuitem",
|
|
2199
2205
|
disabled: itemDisabled(item),
|
|
2200
|
-
"aria-current": item.id === activeId.value ? "
|
|
2206
|
+
"aria-current": item.id === activeId.value ? "true" : void 0,
|
|
2201
2207
|
onClick: () => {
|
|
2202
2208
|
selectTab(item.id);
|
|
2203
2209
|
overflowOpen.value = false;
|
|
@@ -2611,12 +2617,15 @@ var CancellationSummary = defineComponent({
|
|
|
2611
2617
|
cancelAtPeriodEndField: String,
|
|
2612
2618
|
requestedAtField: String,
|
|
2613
2619
|
reasonField: String,
|
|
2614
|
-
codeField: String
|
|
2620
|
+
codeField: String,
|
|
2621
|
+
// s224-m01 (#2542 ruling 6): Boolean first, as the badges' hideWhenFalse is (a bare attribute casts to true).
|
|
2622
|
+
hideWhenDefault: { type: [Boolean, String], default: void 0 }
|
|
2615
2623
|
},
|
|
2616
2624
|
setup(props, { attrs, slots }) {
|
|
2617
2625
|
return () => {
|
|
2618
2626
|
const slotValue = slotSummaryValue(slots);
|
|
2619
2627
|
const cancellationValue = props.cancelAtPeriodEnd ?? slotValue;
|
|
2628
|
+
if (props.hideWhenDefault === true && props.cancelAtPeriodEnd === false && !props.requestedAt && !props.reason && !props.code && slotValue === void 0) return null;
|
|
2620
2629
|
const rows = [];
|
|
2621
2630
|
if (cancellationValue !== void 0) {
|
|
2622
2631
|
rows.push(summaryEntry(
|
package/dist/ported.cjs
CHANGED
|
@@ -1110,12 +1110,15 @@ var CancellationSummary = vue.defineComponent({
|
|
|
1110
1110
|
cancelAtPeriodEndField: String,
|
|
1111
1111
|
requestedAtField: String,
|
|
1112
1112
|
reasonField: String,
|
|
1113
|
-
codeField: String
|
|
1113
|
+
codeField: String,
|
|
1114
|
+
// s224-m01 (#2542 ruling 6): Boolean first, as the badges' hideWhenFalse is (a bare attribute casts to true).
|
|
1115
|
+
hideWhenDefault: { type: [Boolean, String], default: void 0 }
|
|
1114
1116
|
},
|
|
1115
1117
|
setup(props, { attrs, slots }) {
|
|
1116
1118
|
return () => {
|
|
1117
1119
|
const slotValue = slotSummaryValue(slots);
|
|
1118
1120
|
const cancellationValue = props.cancelAtPeriodEnd ?? slotValue;
|
|
1121
|
+
if (props.hideWhenDefault === true && props.cancelAtPeriodEnd === false && !props.requestedAt && !props.reason && !props.code && slotValue === void 0) return null;
|
|
1119
1122
|
const rows = [];
|
|
1120
1123
|
if (cancellationValue !== void 0) {
|
|
1121
1124
|
rows.push(summaryEntry(
|
package/dist/ported.d.cts
CHANGED
|
@@ -401,9 +401,13 @@ declare const CancellationSummary: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
401
401
|
requestedAtField: StringConstructor;
|
|
402
402
|
reasonField: StringConstructor;
|
|
403
403
|
codeField: StringConstructor;
|
|
404
|
+
hideWhenDefault: {
|
|
405
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
406
|
+
default: undefined;
|
|
407
|
+
};
|
|
404
408
|
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
405
409
|
[key: string]: any;
|
|
406
|
-
}
|
|
410
|
+
}> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
407
411
|
title: StringConstructor;
|
|
408
412
|
label: StringConstructor;
|
|
409
413
|
cancelAtPeriodEnd: {
|
|
@@ -418,8 +422,13 @@ declare const CancellationSummary: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
418
422
|
requestedAtField: StringConstructor;
|
|
419
423
|
reasonField: StringConstructor;
|
|
420
424
|
codeField: StringConstructor;
|
|
425
|
+
hideWhenDefault: {
|
|
426
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
427
|
+
default: undefined;
|
|
428
|
+
};
|
|
421
429
|
}>> & Readonly<{}>, {
|
|
422
430
|
cancelAtPeriodEnd: boolean;
|
|
431
|
+
hideWhenDefault: string | boolean;
|
|
423
432
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
424
433
|
declare const SearchInput: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
425
434
|
id: StringConstructor;
|
package/dist/ported.d.ts
CHANGED
|
@@ -401,9 +401,13 @@ declare const CancellationSummary: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
401
401
|
requestedAtField: StringConstructor;
|
|
402
402
|
reasonField: StringConstructor;
|
|
403
403
|
codeField: StringConstructor;
|
|
404
|
+
hideWhenDefault: {
|
|
405
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
406
|
+
default: undefined;
|
|
407
|
+
};
|
|
404
408
|
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
405
409
|
[key: string]: any;
|
|
406
|
-
}
|
|
410
|
+
}> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
407
411
|
title: StringConstructor;
|
|
408
412
|
label: StringConstructor;
|
|
409
413
|
cancelAtPeriodEnd: {
|
|
@@ -418,8 +422,13 @@ declare const CancellationSummary: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
418
422
|
requestedAtField: StringConstructor;
|
|
419
423
|
reasonField: StringConstructor;
|
|
420
424
|
codeField: StringConstructor;
|
|
425
|
+
hideWhenDefault: {
|
|
426
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
427
|
+
default: undefined;
|
|
428
|
+
};
|
|
421
429
|
}>> & Readonly<{}>, {
|
|
422
430
|
cancelAtPeriodEnd: boolean;
|
|
431
|
+
hideWhenDefault: string | boolean;
|
|
423
432
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
424
433
|
declare const SearchInput: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
425
434
|
id: StringConstructor;
|
package/dist/ported.js
CHANGED
|
@@ -1108,12 +1108,15 @@ var CancellationSummary = defineComponent({
|
|
|
1108
1108
|
cancelAtPeriodEndField: String,
|
|
1109
1109
|
requestedAtField: String,
|
|
1110
1110
|
reasonField: String,
|
|
1111
|
-
codeField: String
|
|
1111
|
+
codeField: String,
|
|
1112
|
+
// s224-m01 (#2542 ruling 6): Boolean first, as the badges' hideWhenFalse is (a bare attribute casts to true).
|
|
1113
|
+
hideWhenDefault: { type: [Boolean, String], default: void 0 }
|
|
1112
1114
|
},
|
|
1113
1115
|
setup(props, { attrs, slots }) {
|
|
1114
1116
|
return () => {
|
|
1115
1117
|
const slotValue = slotSummaryValue(slots);
|
|
1116
1118
|
const cancellationValue = props.cancelAtPeriodEnd ?? slotValue;
|
|
1119
|
+
if (props.hideWhenDefault === true && props.cancelAtPeriodEnd === false && !props.requestedAt && !props.reason && !props.code && slotValue === void 0) return null;
|
|
1117
1120
|
const rows = [];
|
|
1118
1121
|
if (cancellationValue !== void 0) {
|
|
1119
1122
|
rows.push(summaryEntry(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oods/components-vue",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Vue 3 components for OODS Foundry: the controls, layouts and domain views its generated screens use.",
|
|
5
5
|
"homepage": "https://oods-foundry.com/",
|
|
6
6
|
"bugs": {
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"**/*.css"
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@oods/component-contracts": "0.4.
|
|
57
|
-
"@oods/component-styles": "0.4.
|
|
56
|
+
"@oods/component-contracts": "0.4.2",
|
|
57
|
+
"@oods/component-styles": "0.4.2"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"vue": "^3.5.0"
|