@windstream/react-shared-components 0.2.59 → 0.2.61
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 +29 -1
- package/dist/contentful/index.esm.js +2 -2
- package/dist/contentful/index.esm.js.map +1 -1
- package/dist/contentful/index.js +4 -4
- package/dist/contentful/index.js.map +1 -1
- package/dist/core.d.ts +3 -3
- package/dist/index.d.ts +3 -3
- 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/brand-button/index.tsx +1 -1
- package/src/contentful/blocks/award-marquee/index.test.tsx +20 -0
- package/src/contentful/blocks/award-marquee/index.tsx +15 -2
- package/src/contentful/blocks/award-marquee/types.ts +2 -0
- package/src/contentful/blocks/cards/product-card/index.test.tsx +14 -1
- package/src/contentful/blocks/cards/product-card/index.tsx +189 -136
- package/src/contentful/blocks/cards/product-card/types.ts +1 -1
- package/src/contentful/blocks/carousel/Carousel.stories.tsx +59 -0
- package/src/contentful/blocks/carousel/helper.test.tsx +23 -0
- package/src/contentful/blocks/carousel/helper.tsx +18 -5
- package/src/contentful/blocks/carousel/types.ts +3 -0
- package/src/contentful/blocks/dynamic-form/conditional-fields.test.tsx +3 -0
- package/src/contentful/blocks/dynamic-form/conditional-fields.tsx +30 -4
- package/src/contentful/blocks/dynamic-form/context.ts +2 -0
- package/src/contentful/blocks/dynamic-form/field-map.test.tsx +21 -0
- package/src/contentful/blocks/dynamic-form/field-map.tsx +15 -0
- package/src/contentful/blocks/dynamic-form/form-field.tsx +2 -0
- package/src/contentful/blocks/dynamic-form/index.tsx +48 -16
- package/src/contentful/blocks/dynamic-form/render.tsx +1 -0
- package/src/contentful/blocks/dynamic-form/types.ts +26 -0
- package/src/contentful/blocks/dynamic-form/utils.test.ts +86 -0
- package/src/contentful/blocks/dynamic-form/utils.ts +57 -0
|
@@ -42,6 +42,8 @@ type AwardMarqueeBackground = "cream" | "gray90" | "white";
|
|
|
42
42
|
type AwardMarqueeItem = {
|
|
43
43
|
iconUrl: string;
|
|
44
44
|
iconAlt?: string;
|
|
45
|
+
iconWidth?: number;
|
|
46
|
+
iconHeight?: number;
|
|
45
47
|
title?: string;
|
|
46
48
|
description?: string;
|
|
47
49
|
};
|
|
@@ -232,6 +234,7 @@ interface carouselFieldsInterface {
|
|
|
232
234
|
initialSlideIndex?: number;
|
|
233
235
|
infiniteScroll?: boolean;
|
|
234
236
|
mobileNavigationType?: boolean;
|
|
237
|
+
twoColumn?: boolean;
|
|
235
238
|
disclaimerText?: {
|
|
236
239
|
json: any;
|
|
237
240
|
};
|
|
@@ -267,6 +270,7 @@ interface ProductCardFields {
|
|
|
267
270
|
speed?: string;
|
|
268
271
|
price?: string;
|
|
269
272
|
priceSuffix?: string;
|
|
273
|
+
priceSuffixBottom?: string;
|
|
270
274
|
techType?: string;
|
|
271
275
|
highlighted?: boolean;
|
|
272
276
|
productCardDescription?: string;
|
|
@@ -618,6 +622,7 @@ interface ProductCardProps {
|
|
|
618
622
|
techType?: string;
|
|
619
623
|
ismaxSpeed?: boolean;
|
|
620
624
|
price: string;
|
|
625
|
+
priceSuffixBottom?: string;
|
|
621
626
|
description: string;
|
|
622
627
|
bestValue?: boolean;
|
|
623
628
|
bestValueText?: string;
|
|
@@ -637,7 +642,6 @@ interface ProductCardProps {
|
|
|
637
642
|
ctaText?: string;
|
|
638
643
|
cta?: ButtonProps$1;
|
|
639
644
|
onCtaClick: () => void;
|
|
640
|
-
hostType: "residential" | "smb";
|
|
641
645
|
renderCheckPlans?: (overrides?: CheckPlansProps) => React__default.ReactNode;
|
|
642
646
|
}
|
|
643
647
|
|
|
@@ -983,6 +987,8 @@ interface DynamicFormFieldConfig {
|
|
|
983
987
|
regexPattern?: string;
|
|
984
988
|
applyPresetValidations?: boolean;
|
|
985
989
|
selectPresetValidationsToApply?: string;
|
|
990
|
+
/** When true, a Text field renders the app-injected address autocomplete. */
|
|
991
|
+
enableAddressAutocomplete?: boolean;
|
|
986
992
|
}
|
|
987
993
|
interface ConditionalFieldConfig {
|
|
988
994
|
fieldId: string;
|
|
@@ -991,6 +997,11 @@ interface ConditionalFieldConfig {
|
|
|
991
997
|
dataSource?: DynamicFormFieldOption[] | null;
|
|
992
998
|
note?: string;
|
|
993
999
|
formFieldsToShow: DynamicFormItem[];
|
|
1000
|
+
/**
|
|
1001
|
+
* When true, the app has opted this field into the grouped layout styling.
|
|
1002
|
+
* Injected by the consuming app so the shared package stays route-agnostic.
|
|
1003
|
+
*/
|
|
1004
|
+
grouped?: boolean;
|
|
994
1005
|
}
|
|
995
1006
|
/**
|
|
996
1007
|
* A flat list item rendered by the form. Either a form field, a conditional
|
|
@@ -1059,6 +1070,7 @@ interface FieldRenderProps {
|
|
|
1059
1070
|
hasError: boolean;
|
|
1060
1071
|
existingDataSource?: string;
|
|
1061
1072
|
isConsentCheckbox?: boolean;
|
|
1073
|
+
enableAddressAutocomplete?: boolean;
|
|
1062
1074
|
[key: string]: any;
|
|
1063
1075
|
}
|
|
1064
1076
|
/**
|
|
@@ -1121,6 +1133,22 @@ interface DynamicFormProps {
|
|
|
1121
1133
|
/** Field customization + async data. */
|
|
1122
1134
|
fieldComponentOverrides?: Partial<Record<DynamicFormFieldType, React__default.FC<FieldRenderProps>>>;
|
|
1123
1135
|
resolveExistingDataSource?: ExistingDataSourceResolver;
|
|
1136
|
+
/**
|
|
1137
|
+
* App-injected renderer for address-autocomplete Text fields. The package is
|
|
1138
|
+
* transport-agnostic, so address suggestion fetching lives in the app.
|
|
1139
|
+
*/
|
|
1140
|
+
renderAddressAutocomplete?: React__default.FC<FieldRenderProps>;
|
|
1141
|
+
/**
|
|
1142
|
+
* App-injected submit button, so the app can attach its own CTA analytics,
|
|
1143
|
+
* query-param preservation and animation. When omitted a default button is
|
|
1144
|
+
* rendered.
|
|
1145
|
+
*/
|
|
1146
|
+
renderSubmitButton?: (args: {
|
|
1147
|
+
isLoading: boolean;
|
|
1148
|
+
disabled: boolean;
|
|
1149
|
+
submitLabel: string;
|
|
1150
|
+
onSubmit: (event: any) => void;
|
|
1151
|
+
}) => React__default.ReactNode;
|
|
1124
1152
|
}
|
|
1125
1153
|
|
|
1126
1154
|
declare const DynamicForm: React__default.FC<DynamicFormProps>;
|