@windstream/react-shared-components 0.2.60 → 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 +27 -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 +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/brand-button/index.tsx +1 -1
- 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
|
@@ -234,6 +234,7 @@ interface carouselFieldsInterface {
|
|
|
234
234
|
initialSlideIndex?: number;
|
|
235
235
|
infiniteScroll?: boolean;
|
|
236
236
|
mobileNavigationType?: boolean;
|
|
237
|
+
twoColumn?: boolean;
|
|
237
238
|
disclaimerText?: {
|
|
238
239
|
json: any;
|
|
239
240
|
};
|
|
@@ -269,6 +270,7 @@ interface ProductCardFields {
|
|
|
269
270
|
speed?: string;
|
|
270
271
|
price?: string;
|
|
271
272
|
priceSuffix?: string;
|
|
273
|
+
priceSuffixBottom?: string;
|
|
272
274
|
techType?: string;
|
|
273
275
|
highlighted?: boolean;
|
|
274
276
|
productCardDescription?: string;
|
|
@@ -620,6 +622,7 @@ interface ProductCardProps {
|
|
|
620
622
|
techType?: string;
|
|
621
623
|
ismaxSpeed?: boolean;
|
|
622
624
|
price: string;
|
|
625
|
+
priceSuffixBottom?: string;
|
|
623
626
|
description: string;
|
|
624
627
|
bestValue?: boolean;
|
|
625
628
|
bestValueText?: string;
|
|
@@ -639,7 +642,6 @@ interface ProductCardProps {
|
|
|
639
642
|
ctaText?: string;
|
|
640
643
|
cta?: ButtonProps$1;
|
|
641
644
|
onCtaClick: () => void;
|
|
642
|
-
hostType: "residential" | "smb";
|
|
643
645
|
renderCheckPlans?: (overrides?: CheckPlansProps) => React__default.ReactNode;
|
|
644
646
|
}
|
|
645
647
|
|
|
@@ -985,6 +987,8 @@ interface DynamicFormFieldConfig {
|
|
|
985
987
|
regexPattern?: string;
|
|
986
988
|
applyPresetValidations?: boolean;
|
|
987
989
|
selectPresetValidationsToApply?: string;
|
|
990
|
+
/** When true, a Text field renders the app-injected address autocomplete. */
|
|
991
|
+
enableAddressAutocomplete?: boolean;
|
|
988
992
|
}
|
|
989
993
|
interface ConditionalFieldConfig {
|
|
990
994
|
fieldId: string;
|
|
@@ -993,6 +997,11 @@ interface ConditionalFieldConfig {
|
|
|
993
997
|
dataSource?: DynamicFormFieldOption[] | null;
|
|
994
998
|
note?: string;
|
|
995
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;
|
|
996
1005
|
}
|
|
997
1006
|
/**
|
|
998
1007
|
* A flat list item rendered by the form. Either a form field, a conditional
|
|
@@ -1061,6 +1070,7 @@ interface FieldRenderProps {
|
|
|
1061
1070
|
hasError: boolean;
|
|
1062
1071
|
existingDataSource?: string;
|
|
1063
1072
|
isConsentCheckbox?: boolean;
|
|
1073
|
+
enableAddressAutocomplete?: boolean;
|
|
1064
1074
|
[key: string]: any;
|
|
1065
1075
|
}
|
|
1066
1076
|
/**
|
|
@@ -1123,6 +1133,22 @@ interface DynamicFormProps {
|
|
|
1123
1133
|
/** Field customization + async data. */
|
|
1124
1134
|
fieldComponentOverrides?: Partial<Record<DynamicFormFieldType, React__default.FC<FieldRenderProps>>>;
|
|
1125
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;
|
|
1126
1152
|
}
|
|
1127
1153
|
|
|
1128
1154
|
declare const DynamicForm: React__default.FC<DynamicFormProps>;
|