formica-ui-lib 1.0.318 → 1.0.319

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.
@@ -16,6 +16,7 @@ export interface DropdownProps {
16
16
  required?: boolean;
17
17
  hasError?: boolean;
18
18
  variant?: "field" | "filter" | "toolbar";
19
+ pickerVariant?: "native" | "rounded";
19
20
  onChange?: (event: React.ChangeEvent<HTMLSelectElement>) => void;
20
21
  onBlur?: (event: React.FocusEvent<HTMLSelectElement>) => void;
21
22
  }
@@ -0,0 +1,28 @@
1
+ export interface VendorImportFilePayload {
2
+ file: File;
3
+ }
4
+ export type VendorImportMode = "add" | "replace";
5
+ export interface VendorImportModePayload {
6
+ mode: VendorImportMode;
7
+ }
8
+ export interface VendorImportSectionProps {
9
+ mode: VendorImportMode;
10
+ /** Names the exact set of vendor listings affected, for example Europe. */
11
+ targetLabel: string;
12
+ /** Changing mode must invalidate any previous parse result in the app layer. */
13
+ onModeChange: (payload: VendorImportModePayload) => void;
14
+ scopeDescription: string;
15
+ importDescription: string;
16
+ acceptedExtensions: string[];
17
+ maxFileSizeBytes: number;
18
+ fileName?: string;
19
+ state: "idle" | "selected" | "processing" | "review" | "importing" | "success" | "error";
20
+ message?: string;
21
+ errors?: string[];
22
+ disabled?: boolean;
23
+ onFileSelect: (payload: VendorImportFilePayload) => void;
24
+ onFileRemove: () => void;
25
+ onParseClick: (payload: VendorImportModePayload) => void;
26
+ onImportClick: (payload: VendorImportModePayload) => void;
27
+ onTemplateDownloadClick?: () => void;
28
+ }
@@ -1,4 +1,5 @@
1
1
  import type { AdminSideNavProps } from "../../../organisms/navigation/AdminSideNavProps";
2
+ import type { VendorImportSectionProps } from "../../../organisms/sections/vendorimportsection/VendorImportSectionProps";
2
3
  import type { AdminRegionSelectorProps } from "../../../molecules/selectors/adminregionselector/AdminRegionSelectorProps";
3
4
  import type { AdminTemplateStatus } from "../shared/AdminTemplateStatus";
4
5
  import type { DynamicFormFieldChangePayload } from "../../../organisms/forms/dynamicform/DynamicFormProps";
@@ -61,6 +62,7 @@ export interface WhereToBuyAddressLookupProps {
61
62
  results: WhereToBuyAddressSuggestion[];
62
63
  }
63
64
  export interface WhereToBuyLandingPageProps {
65
+ importProps?: VendorImportSectionProps;
64
66
  sideNavProps: AdminSideNavProps;
65
67
  regionSelectorProps: AdminRegionSelectorProps;
66
68
  localities: WhereToBuyLocality[];
@@ -0,0 +1,11 @@
1
+ import { DocumentInfoCollectionProps } from "../../organisms/collections/documentinfocollection/DocumentInfoCollectionProps";
2
+ import { SearchBarProps } from "../../molecules/searchbar/SearchBarProps";
3
+ import { DropdownProps } from "../../atoms/dropdown/DropdownProps";
4
+ import { TextCardProps } from "../../molecules/cards/textcard/TextCardProps";
5
+ export type DocumentResultsTemplateProps = {
6
+ documentInfoCollectionProps: DocumentInfoCollectionProps;
7
+ textCard: Pick<TextCardProps, "heading" | "subheading" | "body">;
8
+ documentDropdownFilters: DropdownProps[];
9
+ searchBarProps: SearchBarProps;
10
+ mobileFilterLabel?: string;
11
+ };