formica-ui-lib 1.0.247 → 1.0.249
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/componentProps/atoms/input/TextareaProps.d.ts +16 -0
- package/dist/componentProps/atoms/input/inputProps.d.ts +1 -1
- package/dist/componentProps/molecules/cards/localizationstatuscard/LocalizationStatusCardProps.d.ts +16 -0
- package/dist/componentProps/organisms/collections/localizationmarketcollection/LocalizationMarketCollectionProps.d.ts +21 -0
- package/dist/componentProps/organisms/forms/dynamicform/DynamicFormProps.d.ts +15 -2
- package/dist/componentProps/organisms/sections/commercesyncpanel/CommerceSyncPanelProps.d.ts +33 -0
- package/dist/componentProps/templates/admin/dataissues/AdminDataIssuesTemplateProps.d.ts +101 -0
- package/dist/componentProps/templates/admin/dataissuessource/AdminDataIssuesSourceTemplateProps.d.ts +50 -0
- package/dist/componentProps/templates/admin/datareport/AdminDataReportTemplateProps.d.ts +10 -0
- package/dist/componentProps/templates/admin/issuegroupreview/AdminIssueGroupReviewTemplateProps.d.ts +47 -0
- package/dist/componentProps/templates/admin/productlocalization/ProductLocalizationTemplateProps.d.ts +96 -0
- package/dist/componentProps/templates/admin/skudashboard/AdminSkuDashboardTemplateProps.d.ts +25 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.ts +21 -1
- package/dist/index.js +2190 -792
- package/dist/stories/atoms/input/Textarea.d.ts +4 -0
- package/dist/stories/molecules/cards/localizationstatuscard/LocalizationStatusCard.d.ts +4 -0
- package/dist/stories/molecules/cards/localizationstatuscard/LocalizationStatusCardStatusConfig.d.ts +8 -0
- package/dist/stories/organisms/collections/localizationmarketcollection/LocalizationMarketCollection.d.ts +4 -0
- package/dist/stories/organisms/sections/commercesyncpanel/CommerceSyncPanel.d.ts +4 -0
- package/dist/stories/templates/admin/dataissues/AdminDataIssuesTemplate.d.ts +4 -0
- package/dist/stories/templates/admin/dataissuessource/AdminDataIssuesSourceTemplate.d.ts +4 -0
- package/dist/stories/templates/admin/datareport/AdminDataReportTemplate.d.ts +4 -0
- package/dist/stories/templates/admin/issuegroupreview/AdminIssueGroupReviewTemplate.d.ts +4 -0
- package/dist/stories/templates/admin/productlocalization/ProductLocalizationTemplate.d.ts +4 -0
- package/dist/stories/templates/admin/skudashboard/AdminSkuDashboardTemplate.d.ts +4 -0
- package/dist/tailwind.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
export interface TextareaProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
hasError?: boolean;
|
|
12
|
+
rows?: number;
|
|
13
|
+
onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
14
|
+
onBlur?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
15
|
+
onFocus?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
16
|
+
}
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
export interface InputProps {
|
|
3
3
|
id?: string;
|
|
4
4
|
name?: string;
|
|
5
|
-
type?: "text" | "email" | "password" | "tel" | "number" | "search";
|
|
5
|
+
type?: "text" | "email" | "password" | "tel" | "number" | "search" | "date";
|
|
6
6
|
value?: string;
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
ariaLabel?: string;
|
package/dist/componentProps/molecules/cards/localizationstatuscard/LocalizationStatusCardProps.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type LocalizationStatus = "complete" | "partial" | "missing" | "notRequired";
|
|
2
|
+
export interface LocalizationStatusCardClickPayload {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
status: LocalizationStatus;
|
|
6
|
+
statusLabel: string;
|
|
7
|
+
}
|
|
8
|
+
export interface LocalizationStatusCardProps {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
status: LocalizationStatus;
|
|
13
|
+
statusLabel: string;
|
|
14
|
+
selected?: boolean;
|
|
15
|
+
onCardClick?: (payload: LocalizationStatusCardClickPayload) => void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { LocalizationStatus, LocalizationStatusCardClickPayload } from "../../../molecules/cards/localizationstatuscard/LocalizationStatusCardProps";
|
|
2
|
+
export interface LocalizationLanguageItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
status: LocalizationStatus;
|
|
7
|
+
statusLabel: string;
|
|
8
|
+
}
|
|
9
|
+
export interface LocalizationMarketItem extends LocalizationLanguageItem {
|
|
10
|
+
languages?: LocalizationLanguageItem[];
|
|
11
|
+
}
|
|
12
|
+
export interface LocalizationMarketCollectionProps {
|
|
13
|
+
title?: string;
|
|
14
|
+
markets: LocalizationMarketItem[];
|
|
15
|
+
selectedLocalizationId?: string;
|
|
16
|
+
saveAndNextLabel?: string;
|
|
17
|
+
saveAndNextHelpText?: string;
|
|
18
|
+
saveAndNextDisabled?: boolean;
|
|
19
|
+
onLocalizationSelect?: (payload: LocalizationStatusCardClickPayload) => void;
|
|
20
|
+
onSaveAndNext?: () => void;
|
|
21
|
+
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
export type DynamicFormFieldType = "text" | "number" | "currency" | "radio" | "select";
|
|
1
|
+
export type DynamicFormFieldType = "text" | "number" | "currency" | "radio" | "select" | "multiSelectTiles" | "textarea" | "date" | "information";
|
|
2
2
|
export type DynamicFormFieldSeverity = "blocking" | "recommended" | "optional";
|
|
3
3
|
export type DynamicFormFieldState = "neutral" | "valid" | "warning" | "error";
|
|
4
|
-
export type DynamicFormFieldValue = string | number | null;
|
|
4
|
+
export type DynamicFormFieldValue = string | number | string[] | null;
|
|
5
5
|
export type DynamicFormDensity = "compact" | "comfortable";
|
|
6
6
|
export type DynamicFormSeverityDisplay = "icon" | "label" | "none";
|
|
7
|
+
export type DynamicFormFieldLayoutWidth = "full" | "half";
|
|
8
|
+
export type DynamicFormInformationLayout = "singleLine" | "multiline";
|
|
7
9
|
export interface DynamicFormFieldOption {
|
|
8
10
|
label: string;
|
|
9
11
|
value: string;
|
|
10
12
|
disabled?: boolean;
|
|
13
|
+
color?: string;
|
|
14
|
+
checkIconColor?: IconColor;
|
|
11
15
|
}
|
|
12
16
|
export interface DynamicFormFieldConfig {
|
|
13
17
|
id: string;
|
|
@@ -23,6 +27,10 @@ export interface DynamicFormFieldConfig {
|
|
|
23
27
|
message?: string;
|
|
24
28
|
helpText?: string;
|
|
25
29
|
readOnly?: boolean;
|
|
30
|
+
rows?: number;
|
|
31
|
+
layoutWidth?: DynamicFormFieldLayoutWidth;
|
|
32
|
+
informationLayout?: DynamicFormInformationLayout;
|
|
33
|
+
selectionLimit?: number;
|
|
26
34
|
}
|
|
27
35
|
export interface DynamicFormFieldGroup {
|
|
28
36
|
id: string;
|
|
@@ -46,7 +54,12 @@ export interface DynamicFormProps {
|
|
|
46
54
|
severityDisplay?: DynamicFormSeverityDisplay;
|
|
47
55
|
submitLabel?: string;
|
|
48
56
|
cancelLabel?: string;
|
|
57
|
+
submitDisabled?: boolean;
|
|
58
|
+
showActions?: boolean;
|
|
59
|
+
validationSummary?: React.ReactNode;
|
|
49
60
|
onDynamicFormFieldChange?: (payload: DynamicFormFieldChangePayload) => void;
|
|
50
61
|
onDynamicFormSubmit?: (payload: DynamicFormSubmitPayload) => void;
|
|
51
62
|
onDynamicFormCancel?: () => void;
|
|
52
63
|
}
|
|
64
|
+
import type React from "react";
|
|
65
|
+
import type { IconColor } from "../../../atoms/icon/IconProps";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type CommerceSyncStatus = "synced" | "actionRequired" | "checking" | "error" | "notApplicable";
|
|
2
|
+
export type CommerceSyncFieldStatus = "match" | "mismatch" | "neutral";
|
|
3
|
+
export interface CommerceSyncField {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
detail?: string;
|
|
8
|
+
status?: CommerceSyncFieldStatus;
|
|
9
|
+
}
|
|
10
|
+
export interface CommerceSyncStage {
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
status: CommerceSyncStatus;
|
|
14
|
+
statusLabel: string;
|
|
15
|
+
fields: CommerceSyncField[];
|
|
16
|
+
actionLabel?: string;
|
|
17
|
+
actionDisabled?: boolean;
|
|
18
|
+
actionHelpText?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface CommerceSyncPanelProps {
|
|
21
|
+
title?: string;
|
|
22
|
+
summary: string;
|
|
23
|
+
detail?: string;
|
|
24
|
+
overallStatus: CommerceSyncStatus;
|
|
25
|
+
overallStatusLabel: string;
|
|
26
|
+
lxStage: CommerceSyncStage;
|
|
27
|
+
salsifyStage: CommerceSyncStage;
|
|
28
|
+
bigCommerceStage: CommerceSyncStage;
|
|
29
|
+
refreshLabel?: string;
|
|
30
|
+
onLxSyncClick?: () => void;
|
|
31
|
+
onBigCommerceSyncClick?: () => void;
|
|
32
|
+
onRefreshClick?: () => void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { AdminSideNavProps } from "../../../organisms/navigation/AdminSideNavProps";
|
|
2
|
+
import type { DataHealthSummaryCardProps } from "../../../molecules/cards/datahealthsummarycard/DataHealthSummaryCardProps";
|
|
3
|
+
import type { DataIssueActionCardActionPayload, DataIssueActionCardProps } from "../../../molecules/cards/dataissueactioncard/DataIssueActionCardProps";
|
|
4
|
+
import type { DataIssueMetricCardProps } from "../../../molecules/cards/dataissuemetriccard/DataIssueMetricCardProps";
|
|
5
|
+
import type { IssueTypeBreakdownCardProps } from "../../../molecules/cards/issuetypebreakdowncard/IssueTypeBreakdownCardProps";
|
|
6
|
+
import type { RecommendedNextStepCardProps } from "../../../molecules/cards/recommendednextstepcard/RecommendedNextStepCardProps";
|
|
7
|
+
export type AdminDataIssuesDataSourceType = "salsify-export" | "salsify-api";
|
|
8
|
+
export interface AdminDataIssuesDataSource {
|
|
9
|
+
id: string;
|
|
10
|
+
source: AdminDataIssuesReportSource;
|
|
11
|
+
recordCount: number;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
latestReport?: AdminDataIssuesLatestReport;
|
|
15
|
+
}
|
|
16
|
+
export interface AdminDataIssuesReportSource {
|
|
17
|
+
sourceType: AdminDataIssuesDataSourceType;
|
|
18
|
+
label: string;
|
|
19
|
+
locale: string;
|
|
20
|
+
rangeCode?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface AdminDataIssuesReportSummary {
|
|
23
|
+
automationCoverage?: number;
|
|
24
|
+
duplicateGroups: number;
|
|
25
|
+
duplicateRecords: number;
|
|
26
|
+
goodSkuRows: number;
|
|
27
|
+
healthScore: number;
|
|
28
|
+
missingHierarchyRecords: number;
|
|
29
|
+
problemSkuRows: number;
|
|
30
|
+
requiredDataGapRecords: number;
|
|
31
|
+
safelyResolvableGroups?: number;
|
|
32
|
+
}
|
|
33
|
+
export type AdminDataIssuesIssueSeverity = "success" | "warning" | "error" | "review" | "neutral";
|
|
34
|
+
export interface AdminDataIssuesIssueType {
|
|
35
|
+
id: string;
|
|
36
|
+
label: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
groups: number;
|
|
39
|
+
records: number;
|
|
40
|
+
severity: AdminDataIssuesIssueSeverity;
|
|
41
|
+
stepNumber?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface AdminDataIssuesReportSection {
|
|
44
|
+
id: string;
|
|
45
|
+
title: string;
|
|
46
|
+
groupCount: number;
|
|
47
|
+
recordCount?: number;
|
|
48
|
+
description: string;
|
|
49
|
+
severity: AdminDataIssuesIssueSeverity;
|
|
50
|
+
stepNumber?: number;
|
|
51
|
+
recommendedActionTitle?: string;
|
|
52
|
+
recommendedAction: string[];
|
|
53
|
+
confidenceLabel?: string;
|
|
54
|
+
estimatedRuntimeLabel?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface AdminDataIssuesWhatToDoNext {
|
|
57
|
+
actionLabel: string;
|
|
58
|
+
groups: number;
|
|
59
|
+
issueType: string;
|
|
60
|
+
label: string;
|
|
61
|
+
message: string;
|
|
62
|
+
records: number;
|
|
63
|
+
severity: AdminDataIssuesIssueSeverity;
|
|
64
|
+
stepNumber: number;
|
|
65
|
+
steps: string[];
|
|
66
|
+
title: string;
|
|
67
|
+
}
|
|
68
|
+
export interface AdminDataIssuesLatestReport {
|
|
69
|
+
generatedAt: string;
|
|
70
|
+
recordsScanned: number;
|
|
71
|
+
skuRowsScanned: number;
|
|
72
|
+
summary: AdminDataIssuesReportSummary;
|
|
73
|
+
issueTypes: AdminDataIssuesIssueType[];
|
|
74
|
+
sections: AdminDataIssuesReportSection[];
|
|
75
|
+
source: AdminDataIssuesReportSource;
|
|
76
|
+
whatToDoNext?: AdminDataIssuesWhatToDoNext;
|
|
77
|
+
}
|
|
78
|
+
export interface AdminDataIssuesResponse {
|
|
79
|
+
ok: boolean;
|
|
80
|
+
exists?: boolean;
|
|
81
|
+
report?: AdminDataIssuesLatestReport;
|
|
82
|
+
dataSource?: AdminDataIssuesDataSource | null;
|
|
83
|
+
}
|
|
84
|
+
export interface AdminDataIssuesTemplateProps {
|
|
85
|
+
pageTitle: string;
|
|
86
|
+
pageDescription?: string;
|
|
87
|
+
lastScanLabel?: string;
|
|
88
|
+
updateCacheLabel?: string;
|
|
89
|
+
deleteAndRebuildLabel?: string;
|
|
90
|
+
sideNavProps: AdminSideNavProps;
|
|
91
|
+
dataIssuesResponse?: AdminDataIssuesResponse | null;
|
|
92
|
+
dataHealthSummaryCardProps?: DataHealthSummaryCardProps;
|
|
93
|
+
metricCardProps?: DataIssueMetricCardProps[];
|
|
94
|
+
issueTypeBreakdownCardProps?: IssueTypeBreakdownCardProps;
|
|
95
|
+
recommendedNextStepCardProps?: RecommendedNextStepCardProps;
|
|
96
|
+
issueActionCardProps?: DataIssueActionCardProps[];
|
|
97
|
+
onUpdateCacheClick?: () => void;
|
|
98
|
+
onDeleteAndRebuildClick?: () => void;
|
|
99
|
+
onIssuePrimaryActionClick?: (payload: DataIssueActionCardActionPayload) => void;
|
|
100
|
+
onIssueSecondaryActionClick?: (payload: DataIssueActionCardActionPayload) => void;
|
|
101
|
+
}
|
package/dist/componentProps/templates/admin/dataissuessource/AdminDataIssuesSourceTemplateProps.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { AdminSideNavProps } from "../../../organisms/navigation/AdminSideNavProps";
|
|
2
|
+
import type { DropdownOption } from "../../../atoms/dropdown/DropdownProps";
|
|
3
|
+
import type { AdminDataIssuesDataSourceType } from "../dataissues/AdminDataIssuesTemplateProps";
|
|
4
|
+
export interface AdminDataIssuesDataSourceSummary {
|
|
5
|
+
id: string;
|
|
6
|
+
source: {
|
|
7
|
+
sourceType: AdminDataIssuesDataSourceType;
|
|
8
|
+
label: string;
|
|
9
|
+
locale: string;
|
|
10
|
+
};
|
|
11
|
+
recordCount: number;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
latestReport?: {
|
|
15
|
+
label?: string;
|
|
16
|
+
createdAt?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface AdminDataIssuesFileSelectPayload {
|
|
20
|
+
files: File[];
|
|
21
|
+
}
|
|
22
|
+
export interface AdminDataIssuesRangeChangePayload {
|
|
23
|
+
value: string;
|
|
24
|
+
}
|
|
25
|
+
export interface AdminDataIssuesSourceTemplateProps {
|
|
26
|
+
pageTitle: string;
|
|
27
|
+
pageDescription?: string;
|
|
28
|
+
sideNavProps: AdminSideNavProps;
|
|
29
|
+
dataSource?: AdminDataIssuesDataSourceSummary | null;
|
|
30
|
+
existingDataTitle?: string;
|
|
31
|
+
existingDataEmptyTitle?: string;
|
|
32
|
+
existingDataEmptyDescription?: string;
|
|
33
|
+
useExistingDataLabel?: string;
|
|
34
|
+
uploadTitle?: string;
|
|
35
|
+
uploadDescription?: string;
|
|
36
|
+
uploadDropLabel?: string;
|
|
37
|
+
uploadBrowseLabel?: string;
|
|
38
|
+
uploadHelpText?: string;
|
|
39
|
+
directDownloadTitle?: string;
|
|
40
|
+
directDownloadDescription?: string;
|
|
41
|
+
rangeLabel?: string;
|
|
42
|
+
rangePlaceholder?: string;
|
|
43
|
+
rangeOptions: DropdownOption[];
|
|
44
|
+
selectedRangeValue?: string;
|
|
45
|
+
directDownloadLabel?: string;
|
|
46
|
+
onUseExistingDataClick?: () => void;
|
|
47
|
+
onReportFileSelect?: (payload: AdminDataIssuesFileSelectPayload) => void;
|
|
48
|
+
onRangeChange?: (payload: AdminDataIssuesRangeChangePayload) => void;
|
|
49
|
+
onDirectDownloadClick?: () => void;
|
|
50
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AdminSideNavProps } from "../../../organisms/navigation/AdminSideNavProps";
|
|
2
|
+
import type { DataReportCollectionProps } from "../../../organisms/collections/datareportcollection/DataReportCollectionProps";
|
|
3
|
+
export interface AdminDataReportTemplateProps {
|
|
4
|
+
pageTitle: string;
|
|
5
|
+
pageDescription?: string;
|
|
6
|
+
backLabel?: string;
|
|
7
|
+
sideNavProps: AdminSideNavProps;
|
|
8
|
+
report: DataReportCollectionProps;
|
|
9
|
+
onBackClick?: () => void;
|
|
10
|
+
}
|
package/dist/componentProps/templates/admin/issuegroupreview/AdminIssueGroupReviewTemplateProps.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AdminSideNavProps } from "../../../organisms/navigation/AdminSideNavProps";
|
|
2
|
+
import type { IssueRecordCandidateSelectPayload } from "../../../molecules/cards/issuerecordcandidatecard/IssueRecordCandidateCardProps";
|
|
3
|
+
import type { IssueGroupResolvePayload } from "../../../molecules/cards/issuegroupreviewcard/IssueGroupReviewCardProps";
|
|
4
|
+
export interface AdminIssueGroupReviewRecord {
|
|
5
|
+
hierarchyLevel?: string;
|
|
6
|
+
itemPartNumber?: string;
|
|
7
|
+
itemSku?: string;
|
|
8
|
+
productName?: string;
|
|
9
|
+
salsifyId?: string;
|
|
10
|
+
score?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface AdminIssueGroupReviewGroup {
|
|
13
|
+
conflictFields: string[];
|
|
14
|
+
groupId: string;
|
|
15
|
+
issueType: string;
|
|
16
|
+
matchReasons: string[];
|
|
17
|
+
reason: string;
|
|
18
|
+
records: AdminIssueGroupReviewRecord[];
|
|
19
|
+
}
|
|
20
|
+
export interface AdminIssueGroupReviewResponse {
|
|
21
|
+
groups: AdminIssueGroupReviewGroup[];
|
|
22
|
+
hasMore: boolean;
|
|
23
|
+
issueType: string;
|
|
24
|
+
limit: number;
|
|
25
|
+
offset: number;
|
|
26
|
+
ok: boolean;
|
|
27
|
+
totalGroups: number;
|
|
28
|
+
}
|
|
29
|
+
export interface AdminIssueGroupReviewTemplateProps {
|
|
30
|
+
pageTitle: string;
|
|
31
|
+
pageDescription?: string;
|
|
32
|
+
issueTypeLabel?: string;
|
|
33
|
+
backLabel?: string;
|
|
34
|
+
previousLabel?: string;
|
|
35
|
+
nextLabel?: string;
|
|
36
|
+
resolveLabel?: string;
|
|
37
|
+
selectLabel?: string;
|
|
38
|
+
selectedLabel?: string;
|
|
39
|
+
sideNavProps: AdminSideNavProps;
|
|
40
|
+
issueGroupResponse: AdminIssueGroupReviewResponse;
|
|
41
|
+
selectedRecordIds?: Record<string, string>;
|
|
42
|
+
onBackClick?: () => void;
|
|
43
|
+
onPreviousPageClick?: () => void;
|
|
44
|
+
onNextPageClick?: () => void;
|
|
45
|
+
onRecordSelect?: (payload: IssueRecordCandidateSelectPayload) => void;
|
|
46
|
+
onResolveGroupClick?: (payload: IssueGroupResolvePayload) => void;
|
|
47
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { DynamicFormFieldConfig, DynamicFormFieldValue } from "../../../organisms/forms/dynamicform/DynamicFormProps";
|
|
2
|
+
import type { LocalizationMarketItem } from "../../../organisms/collections/localizationmarketcollection/LocalizationMarketCollectionProps";
|
|
3
|
+
import type { LocalizationStatusCardClickPayload } from "../../../molecules/cards/localizationstatuscard/LocalizationStatusCardProps";
|
|
4
|
+
import type { CommerceSyncPanelProps } from "../../../organisms/sections/commercesyncpanel/CommerceSyncPanelProps";
|
|
5
|
+
export type ProductLocalizationTabId = string;
|
|
6
|
+
export interface ProductLocalizationProduct {
|
|
7
|
+
name: string;
|
|
8
|
+
sku: string;
|
|
9
|
+
partNumber: string;
|
|
10
|
+
imageUrl: string;
|
|
11
|
+
imageAlt: string;
|
|
12
|
+
statusLabel: string;
|
|
13
|
+
completedLocalizationCount: number;
|
|
14
|
+
requiredLocalizationCount: number;
|
|
15
|
+
requiredMarketsLabel: string;
|
|
16
|
+
hierarchy?: ProductLocalizationHierarchy;
|
|
17
|
+
}
|
|
18
|
+
export interface ProductLocalizationHierarchy {
|
|
19
|
+
parentId: string;
|
|
20
|
+
levelLabel: string;
|
|
21
|
+
status: "valid" | "missing";
|
|
22
|
+
statusLabel: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ProductLocalizationActiveRecord {
|
|
25
|
+
id: string;
|
|
26
|
+
heading: string;
|
|
27
|
+
completionStatus: "complete" | "incomplete";
|
|
28
|
+
completionStatusLabel: string;
|
|
29
|
+
saveStatus: "saved" | "unsaved";
|
|
30
|
+
saveStatusLabel: string;
|
|
31
|
+
lastSavedLabel: string;
|
|
32
|
+
missingRequiredFieldLabels: string[];
|
|
33
|
+
}
|
|
34
|
+
interface ProductLocalizationTabBase {
|
|
35
|
+
id: ProductLocalizationTabId;
|
|
36
|
+
label: string;
|
|
37
|
+
heading?: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ProductLocalizationFormTab extends ProductLocalizationTabBase {
|
|
41
|
+
type: "form";
|
|
42
|
+
fields: DynamicFormFieldConfig[];
|
|
43
|
+
}
|
|
44
|
+
export interface ProductLocalizationInformationTab extends ProductLocalizationTabBase {
|
|
45
|
+
type: "information";
|
|
46
|
+
fields: DynamicFormFieldConfig[];
|
|
47
|
+
}
|
|
48
|
+
export interface ProductLocalizationCommerceSyncTab extends ProductLocalizationTabBase {
|
|
49
|
+
type: "commerceSync";
|
|
50
|
+
panel: Omit<CommerceSyncPanelProps, "onLxSyncClick" | "onBigCommerceSyncClick" | "onRefreshClick">;
|
|
51
|
+
}
|
|
52
|
+
export type ProductLocalizationTab = ProductLocalizationFormTab | ProductLocalizationInformationTab | ProductLocalizationCommerceSyncTab;
|
|
53
|
+
export interface ProductLocalizationSaveControls {
|
|
54
|
+
cancelLabel: string;
|
|
55
|
+
saveLabel: string;
|
|
56
|
+
saveDisabled: boolean;
|
|
57
|
+
saveAndNextLabel: string;
|
|
58
|
+
saveAndNextHelpText?: string;
|
|
59
|
+
saveAndNextDisabled: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface ProductLocalizationTemplateData {
|
|
62
|
+
pageTitle: string;
|
|
63
|
+
pageDescription?: string;
|
|
64
|
+
product: ProductLocalizationProduct;
|
|
65
|
+
localization: ProductLocalizationActiveRecord;
|
|
66
|
+
markets: LocalizationMarketItem[];
|
|
67
|
+
tabs: ProductLocalizationTab[];
|
|
68
|
+
activeTabId: ProductLocalizationTabId;
|
|
69
|
+
saveControls: ProductLocalizationSaveControls;
|
|
70
|
+
}
|
|
71
|
+
export interface ProductLocalizationFieldChangePayload {
|
|
72
|
+
localizationId: string;
|
|
73
|
+
tabId: ProductLocalizationTabId;
|
|
74
|
+
fieldId: string;
|
|
75
|
+
value: DynamicFormFieldValue;
|
|
76
|
+
}
|
|
77
|
+
export interface ProductLocalizationTabSelectPayload {
|
|
78
|
+
tabId: ProductLocalizationTabId;
|
|
79
|
+
label: string;
|
|
80
|
+
}
|
|
81
|
+
export interface ProductLocalizationActionPayload {
|
|
82
|
+
localizationId: string;
|
|
83
|
+
}
|
|
84
|
+
export interface ProductLocalizationTemplateProps {
|
|
85
|
+
data: ProductLocalizationTemplateData;
|
|
86
|
+
onLocalizationSelect?: (payload: LocalizationStatusCardClickPayload) => void;
|
|
87
|
+
onTabSelect?: (payload: ProductLocalizationTabSelectPayload) => void;
|
|
88
|
+
onFieldChange?: (payload: ProductLocalizationFieldChangePayload) => void;
|
|
89
|
+
onSave?: (payload: ProductLocalizationActionPayload) => void;
|
|
90
|
+
onCancel?: (payload: ProductLocalizationActionPayload) => void;
|
|
91
|
+
onSaveAndNext?: (payload: ProductLocalizationActionPayload) => void;
|
|
92
|
+
onLxSyncClick?: () => void;
|
|
93
|
+
onBigCommerceSyncClick?: () => void;
|
|
94
|
+
onCommerceRefreshClick?: () => void;
|
|
95
|
+
}
|
|
96
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AdminSideNavProps } from "../../../organisms/navigation/AdminSideNavProps";
|
|
2
|
+
import type { DynamicFormProps } from "../../../organisms/forms/dynamicform/DynamicFormProps";
|
|
3
|
+
import type { MessageListCardProps } from "../../../molecules/cards/messagelistcard/MessageListCardProps";
|
|
4
|
+
import type { SearchComboboxOption, SearchComboboxSelectPayload } from "../../../molecules/searchcombobox/SearchComboboxProps";
|
|
5
|
+
import type { StatusFlowPanelProps } from "../../../organisms/sections/statusflowpanel/StatusFlowPanelProps";
|
|
6
|
+
export interface AdminSkuDashboardSearchPayload {
|
|
7
|
+
value: string;
|
|
8
|
+
}
|
|
9
|
+
export interface AdminSkuDashboardTemplateProps {
|
|
10
|
+
pageTitle: string;
|
|
11
|
+
searchPlaceholder?: string;
|
|
12
|
+
searchValue?: string;
|
|
13
|
+
searchOptions?: SearchComboboxOption[];
|
|
14
|
+
checkButtonLabel?: string;
|
|
15
|
+
sideNavProps: AdminSideNavProps;
|
|
16
|
+
statusFlowPanelProps: Omit<StatusFlowPanelProps, "diagram" | "legend" | "actions">;
|
|
17
|
+
messageListCardProps: MessageListCardProps;
|
|
18
|
+
productDataFormProps: DynamicFormProps;
|
|
19
|
+
productDataModalTitle?: string;
|
|
20
|
+
productDataModalDescription?: string;
|
|
21
|
+
onSearchChange?: (payload: AdminSkuDashboardSearchPayload) => void;
|
|
22
|
+
onSearchClear?: (payload: AdminSkuDashboardSearchPayload) => void;
|
|
23
|
+
onSearchOptionSelect?: (payload: SearchComboboxSelectPayload) => void;
|
|
24
|
+
onCheckClick?: (payload: AdminSkuDashboardSearchPayload) => void;
|
|
25
|
+
}
|