@windstream/react-shared-components 0.2.67 → 0.2.69
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/dist/contentful/index.d.ts +26 -6
- package/dist/contentful/index.esm.js +2 -2
- package/dist/contentful/index.esm.js.map +1 -1
- package/dist/contentful/index.js +2 -2
- package/dist/contentful/index.js.map +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/select-plan-button/index.test.tsx +27 -0
- package/src/components/select-plan-button/index.tsx +6 -1
- package/src/contentful/blocks/cards/product-card/index.test.tsx +47 -2
- package/src/contentful/blocks/cards/product-card/index.tsx +46 -44
- package/src/contentful/blocks/cards/product-card/types.ts +3 -0
- package/src/contentful/blocks/carousel/helper.tsx +6 -0
- package/src/contentful/blocks/carousel/index.tsx +1 -1
- package/src/contentful/blocks/dynamic-form/DynamicForm.stories.tsx +3 -0
- package/src/contentful/blocks/dynamic-form/field-map.tsx +1 -1
- package/src/contentful/blocks/dynamic-form/index.test.tsx +96 -0
- package/src/contentful/blocks/dynamic-form/index.tsx +24 -1
- package/src/contentful/blocks/dynamic-form/render.test.tsx +25 -0
- package/src/contentful/blocks/dynamic-form/render.tsx +15 -0
- package/src/contentful/blocks/dynamic-form/types.ts +21 -5
- package/src/contentful/blocks/navigation/index.tsx +4 -1
- package/src/contentful/blocks/primary-hero/index.test.tsx +11 -2
- package/src/contentful/blocks/primary-hero/index.tsx +3 -2
|
@@ -622,6 +622,9 @@ interface ProductCardProps {
|
|
|
622
622
|
techType?: string;
|
|
623
623
|
ismaxSpeed?: boolean;
|
|
624
624
|
price: string;
|
|
625
|
+
/** The price unit rendered after the cents, e.g. "/mo" or "/mo*". Defaults
|
|
626
|
+
* to "/mo". Lets Contentful control a trailing disclaimer star. */
|
|
627
|
+
priceUnit?: string;
|
|
625
628
|
priceSuffixBottom?: string;
|
|
626
629
|
description: string;
|
|
627
630
|
bestValue?: boolean;
|
|
@@ -1030,16 +1033,22 @@ interface ConditionalFieldConfig {
|
|
|
1030
1033
|
*/
|
|
1031
1034
|
grouped?: boolean;
|
|
1032
1035
|
}
|
|
1036
|
+
interface DynamicFormDividerConfig {
|
|
1037
|
+
dividerLength?: boolean;
|
|
1038
|
+
dividerThickness?: number;
|
|
1039
|
+
}
|
|
1033
1040
|
/**
|
|
1034
|
-
* A flat list item rendered by the form
|
|
1035
|
-
*
|
|
1036
|
-
* the app rendered itself and passes through).
|
|
1041
|
+
* A flat list item rendered by the form: a form field, conditional field,
|
|
1042
|
+
* divider, or custom React node.
|
|
1037
1043
|
*/
|
|
1038
1044
|
type DynamicFormItem = ({
|
|
1039
1045
|
itemType: "formField";
|
|
1040
1046
|
} & DynamicFormFieldConfig) | ({
|
|
1041
1047
|
itemType: "conditional";
|
|
1042
|
-
} & ConditionalFieldConfig) | {
|
|
1048
|
+
} & ConditionalFieldConfig) | ({
|
|
1049
|
+
itemType: "divider";
|
|
1050
|
+
fieldId?: string;
|
|
1051
|
+
} & DynamicFormDividerConfig) | {
|
|
1043
1052
|
itemType: "custom";
|
|
1044
1053
|
fieldId?: string;
|
|
1045
1054
|
content: React__default.ReactNode;
|
|
@@ -1131,6 +1140,15 @@ interface DynamicFormProps {
|
|
|
1131
1140
|
emailSubject?: string;
|
|
1132
1141
|
emailTemplateName?: string;
|
|
1133
1142
|
toEmail?: string;
|
|
1143
|
+
/**
|
|
1144
|
+
* Test recipient(s) for the `email` action in non-production environments.
|
|
1145
|
+
* When `isProduction === false` and the `email` action runs, the payload's
|
|
1146
|
+
* `toEmail` is rerouted here so real recipients never receive non-prod
|
|
1147
|
+
* submissions. Supports multiple comma-separated addresses (each is trimmed);
|
|
1148
|
+
* when empty, the `email` action is skipped. Mirrors the residential form's
|
|
1149
|
+
* `testEmail`.
|
|
1150
|
+
*/
|
|
1151
|
+
testEmail?: string;
|
|
1134
1152
|
segmentEventId?: string;
|
|
1135
1153
|
/** Injected per-action async submit handlers. */
|
|
1136
1154
|
onEmailSubmit?: SubmitHandler;
|
|
@@ -1154,8 +1172,10 @@ interface DynamicFormProps {
|
|
|
1154
1172
|
error: unknown;
|
|
1155
1173
|
metadata?: Record<string, any>;
|
|
1156
1174
|
}) => void;
|
|
1157
|
-
/** Whether the current environment is production
|
|
1158
|
-
*
|
|
1175
|
+
/** Whether the current environment is production. When explicitly `false`,
|
|
1176
|
+
* the `email` action is rerouted to `testEmail` (or skipped when `testEmail`
|
|
1177
|
+
* is empty) so non-prod submissions never reach real recipients. Leaving it
|
|
1178
|
+
* `undefined` preserves the prior behavior (no rerouting). */
|
|
1159
1179
|
isProduction?: boolean;
|
|
1160
1180
|
/** Field customization + async data. */
|
|
1161
1181
|
fieldComponentOverrides?: Partial<Record<DynamicFormFieldType, React__default.FC<FieldRenderProps>>>;
|