@mercurjs/dashboard-shared 2.4.2-canary.3 → 2.4.2-canary.5
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/index.d.ts +21 -1
- package/dist/index.js +492 -310
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -65,11 +65,19 @@ type AttributeChange = {
|
|
|
65
65
|
removeValueIds: string[];
|
|
66
66
|
/** Free-form scalar for text / unit / toggle attributes. */
|
|
67
67
|
scalarValue?: string | number | boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Snapshot of the selection before the change, when the action carries one
|
|
70
|
+
* (variant-level attributes). Product-level changes resolve the previous
|
|
71
|
+
* side from the product payload instead.
|
|
72
|
+
*/
|
|
73
|
+
previousValueIds?: string[];
|
|
74
|
+
previousScalar?: string | number | boolean | null;
|
|
68
75
|
};
|
|
69
76
|
type VariantGroup = {
|
|
70
77
|
variantId: string;
|
|
71
78
|
fieldDiffs: FieldDiff[];
|
|
72
79
|
media: MediaDiff;
|
|
80
|
+
attributes: AttributeChange[];
|
|
73
81
|
};
|
|
74
82
|
type ProductChangeView = {
|
|
75
83
|
productUpdated: FieldDiff[];
|
|
@@ -1288,6 +1296,18 @@ type ProductAttributeSectionProps = {
|
|
|
1288
1296
|
};
|
|
1289
1297
|
declare const ProductAttributeSection: ({ product, requiredAttributes, onDeleteAttribute, getEditHref, addExistingHref, createNewHref, }: ProductAttributeSectionProps) => react_jsx_runtime.JSX.Element;
|
|
1290
1298
|
|
|
1299
|
+
type VariantWithAttributes = {
|
|
1300
|
+
id: string;
|
|
1301
|
+
attributes?: ProductAttributeDTO[] | null;
|
|
1302
|
+
};
|
|
1303
|
+
type VariantAttributeSectionProps = {
|
|
1304
|
+
variant: VariantWithAttributes;
|
|
1305
|
+
onDeleteAttribute: (attribute: ProductAttributeDTO) => Promise<void>;
|
|
1306
|
+
getEditHref?: (attribute: ProductAttributeDTO) => string;
|
|
1307
|
+
addExistingHref?: string;
|
|
1308
|
+
};
|
|
1309
|
+
declare const VariantAttributeSection: ({ variant, onDeleteAttribute, getEditHref, addExistingHref, }: VariantAttributeSectionProps) => react_jsx_runtime.JSX.Element;
|
|
1310
|
+
|
|
1291
1311
|
interface TabDefinition<T extends FieldValues = FieldValues> {
|
|
1292
1312
|
id: string;
|
|
1293
1313
|
labelKey: string;
|
|
@@ -2620,4 +2640,4 @@ declare const plainTextToHtml: (value?: string | null) => string;
|
|
|
2620
2640
|
|
|
2621
2641
|
declare const getListInitialData: <TData>(queryParams: Record<string, string | undefined>, loaderData: TData | undefined) => TData | undefined;
|
|
2622
2642
|
|
|
2623
|
-
export { type Action, type ActionGroup, ActionMenu, type AdditionalDataScope, AddressForm, AddressSchema, type AttributeChange, type AttributeChangeKind, AttributeValueInput, BadgeListSummary, type BuiltInFieldDefaults, type BuiltInFieldScope, CORE_ENTRY_PREFIX, CORE_LAYOUTS, ChipGroup, ChipInput, CodeCell, CodeHeader, Combobox, type Command, ConditionalTooltip, ConfirmPrompt, type ConfirmPromptProps, type CoreNavItem, CountrySelect, CreatedAtCell, CreatedAtHeader, type CurrencyInfo, type CustomFieldsModule, CustomerInfo, DataGrid, DataTable, DateCell, DateHeader, DateRangeDisplay, DeprecatedPercentageInput, type DetailPageDefaultsOptions, type DisplayEntry, DisplayExtensionZone, type DisplayExtensionZoneProps, DisplayField, type DisplayFieldProps, DisplaySection, type DisplaySectionField, type DisplaySectionProps, type EditAttributeAttribute, EditAttributeForm, type EditAttributeFormProps, EmailCell, EmailForm, EmailHeader, EmailSchema, type EntryRenderer, ErrorBoundary, ExtendableFormField, type ExtendableFormFieldProps, type ExtendableTable, type ExtensionGridColumnArgs, ExtensionProvider, type ExtensionProviderProps, ExtensionRegistry, type ExtractableOffer, type ExtractableOffers, type FeedbackSubmitHandler, type FieldDiff, FilePreview, type FileType, FileUpload, type FileUploadProps, type Filter, FilterGroup, Form, FormExtensionZone, type FormExtensionZoneProps, type FormFieldInputType, type FormFieldOverride, GeneralSectionSkeleton, type GridFieldName, HandleInput, HeadingSkeleton, IconAvatar, IconButtonSkeleton, ImageAvatar, type ImageRef, IncludesTaxTooltip, InfiniteList, JsonViewSection, JsonViewSectionSkeleton, KeyboundForm, LayoutComposer, type LayoutComposerProps, LayoutEntry, type LayoutEntryProps, type LayoutModule, LinkButton, ListBadge, ListSummary, Listicle, type ListicleProps, LocalizedTablePagination, type MediaDiff, MetadataForm, MetadataSection, MoneyAmountCell, NameCell, NameHeader, type NavGroup, type NavGroupItem, type NavItemGroup, type NavigationModule, NoRecords, type NoRecordsProps, NoResults, type NoResultsProps, type OnboardingStep, type OnboardingStepDefault, OrderBy, PercentageInput, PermissionAction, type PermissionActionProps, PermissionGuard, type PermissionGuardProps, type PermissionedCommand, PermissionsContext, PermissionsProvider, type PermissionsProviderProps, PlaceholderCell, type PreferenceModule, PriceListDateStatus, type PriceListGridGroupRow, type PriceListGridOfferRow, type PriceListGridRow, PriceListStatus, PriceListType, type ProductAttributeBatchPayload, ProductAttributeSection, type ProductAttributeSectionProps, type ProductChangeAttribute, ProductChangePanel, type ProductChangePanelProps, type ProductChangeProduct, type ProductChangeResolvers, type ProductChangeVariant, type ProductChangeView, ProgressBar, ProvinceSelect, Query, REFERENCE_FIELDS, RICH_TEXT_ALLOWED_ATTRIBUTES, RICH_TEXT_ALLOWED_TAGS, type RawEntry, type ReferenceField, type RenderDefaultProps, type ResolvedAttribute, type ResolvedDisplays, type ResolvedFormField, RichText, RichTextEditor, type RichTextEditorProps, RouteDrawer, RouteFocusModal, RoutePermissionGuard, SIDEBAR_MENU_CONTENT, SIDEBAR_RAIL_FADE, SectionNoAccess, SectionRow, type SectionRowProps, type SectionWidget, type SectionWidgetMap, SegmentedControl, type SegmentedControlOption, SidebarContext, type SidebarContextValue, SidebarLink, type SidebarLinkProps, SidebarProvider, type SidebarState, SingleColumnLayoutComponent, SingleColumnPage, SingleColumnPageSkeleton, Skeleton, SortableList, SortableTree, StackedDrawer, StackedFocusModal, type StaticCountry, StatusCell, SwitchBox, type TQueryKey, type TabDefinition, TabbedForm, TableFooterSkeleton, TableSectionSkeleton, TableSkeleton, TextCell, TextHeader, TextSkeleton, Thumbnail, TopbarActions, TransferOwnershipSchema, TwoColumnLayoutComponent, TwoColumnPage, TwoColumnPageSkeleton, type UseExtendableFormProps, type UseExtendableGridProps, type UseExtendableTableProps, type UseQueryOptionsWrapper, type VariantGroup, VisuallyHidden, type Widget, type WidgetModule, type WidgetPlacement, type WidgetTab, type WidgetTabs, WidgetZone, type WidgetZoneProps, type ZoneWidgets, _DataTable, applyActionPermissions, applyNavGroups, applyNavOverrides, applyReplacements, buildAdditionalDataDefaults, buildAdditionalDataSchema, buildCoreEntries, buildDisplayEntries, buildOfferGridData, buildProductChangeView, buildScopedAdditionalData, buildWidgetEntries, countries, createDataGridHelper, createDataGridPriceColumns, createFormHelper, createWithPermission, currencies, detailPageDefaultEntries, extractPricesFromOffers, extractReferenceIds, extractSectionElements, filterCommandsByPermission, formatFieldValue, genericForwardRef, getCountryByIso2, getCurrencySymbol, getDecimalDigits, getExtensionRegistry, getFormattedAddress, getFormattedCountry, getLinkQuery, getListInitialData, getLocaleAmount, getNativeSymbol, getPriceListStatus, getStylizedAmount, groupNavItems, humanizeFieldName, isAmountLessThenRoundingError, isForbidden, isHtml, isImageList, isOrderActionable, isOrderAwaitingAction, isPermitted, isPriceListGroupRow, isProductRow, isReferenceField, isSameAddress, linkFields, mergeLayoutPreferences, mergeListFilters, navOverridesFromPreferences, overrideLazyRoute, permissionMapAllows, plainTextToHtml, productChangeViewHasContent, queryClient, queryKeysFactory, refineAdditionalData, resolveBuiltInFieldDefault, resolveFormFieldType, resolveRouteOverrides, richTextContentClasses, sanitizeRichText, toPermissionList, useActionLocks, useBuiltInFieldDefaults, useCan, useCollapsedSidebar, useCombinedRefs, useCommandHistory, useDataTable, useDate, useDisplayFieldOverride, useDocumentDirection, useExpandedSidebar, useExtendableForm, useExtendableGrid, useExtendableTable, useExtension, useExtensionActivity, useLinkQuery, usePermissionGate, usePermissions, usePermittedCommands, useQueryParams, useResourcePermissions, useRouteModal, useSidebar, useSidebarMenuPlacement, useStackedModal, useTabManagement, useTabbedForm, useWidgetTabs, withLinkFields };
|
|
2643
|
+
export { type Action, type ActionGroup, ActionMenu, type AdditionalDataScope, AddressForm, AddressSchema, type AttributeChange, type AttributeChangeKind, AttributeValueInput, BadgeListSummary, type BuiltInFieldDefaults, type BuiltInFieldScope, CORE_ENTRY_PREFIX, CORE_LAYOUTS, ChipGroup, ChipInput, CodeCell, CodeHeader, Combobox, type Command, ConditionalTooltip, ConfirmPrompt, type ConfirmPromptProps, type CoreNavItem, CountrySelect, CreatedAtCell, CreatedAtHeader, type CurrencyInfo, type CustomFieldsModule, CustomerInfo, DataGrid, DataTable, DateCell, DateHeader, DateRangeDisplay, DeprecatedPercentageInput, type DetailPageDefaultsOptions, type DisplayEntry, DisplayExtensionZone, type DisplayExtensionZoneProps, DisplayField, type DisplayFieldProps, DisplaySection, type DisplaySectionField, type DisplaySectionProps, type EditAttributeAttribute, EditAttributeForm, type EditAttributeFormProps, EmailCell, EmailForm, EmailHeader, EmailSchema, type EntryRenderer, ErrorBoundary, ExtendableFormField, type ExtendableFormFieldProps, type ExtendableTable, type ExtensionGridColumnArgs, ExtensionProvider, type ExtensionProviderProps, ExtensionRegistry, type ExtractableOffer, type ExtractableOffers, type FeedbackSubmitHandler, type FieldDiff, FilePreview, type FileType, FileUpload, type FileUploadProps, type Filter, FilterGroup, Form, FormExtensionZone, type FormExtensionZoneProps, type FormFieldInputType, type FormFieldOverride, GeneralSectionSkeleton, type GridFieldName, HandleInput, HeadingSkeleton, IconAvatar, IconButtonSkeleton, ImageAvatar, type ImageRef, IncludesTaxTooltip, InfiniteList, JsonViewSection, JsonViewSectionSkeleton, KeyboundForm, LayoutComposer, type LayoutComposerProps, LayoutEntry, type LayoutEntryProps, type LayoutModule, LinkButton, ListBadge, ListSummary, Listicle, type ListicleProps, LocalizedTablePagination, type MediaDiff, MetadataForm, MetadataSection, MoneyAmountCell, NameCell, NameHeader, type NavGroup, type NavGroupItem, type NavItemGroup, type NavigationModule, NoRecords, type NoRecordsProps, NoResults, type NoResultsProps, type OnboardingStep, type OnboardingStepDefault, OrderBy, PercentageInput, PermissionAction, type PermissionActionProps, PermissionGuard, type PermissionGuardProps, type PermissionedCommand, PermissionsContext, PermissionsProvider, type PermissionsProviderProps, PlaceholderCell, type PreferenceModule, PriceListDateStatus, type PriceListGridGroupRow, type PriceListGridOfferRow, type PriceListGridRow, PriceListStatus, PriceListType, type ProductAttributeBatchPayload, ProductAttributeSection, type ProductAttributeSectionProps, type ProductChangeAttribute, ProductChangePanel, type ProductChangePanelProps, type ProductChangeProduct, type ProductChangeResolvers, type ProductChangeVariant, type ProductChangeView, ProgressBar, ProvinceSelect, Query, REFERENCE_FIELDS, RICH_TEXT_ALLOWED_ATTRIBUTES, RICH_TEXT_ALLOWED_TAGS, type RawEntry, type ReferenceField, type RenderDefaultProps, type ResolvedAttribute, type ResolvedDisplays, type ResolvedFormField, RichText, RichTextEditor, type RichTextEditorProps, RouteDrawer, RouteFocusModal, RoutePermissionGuard, SIDEBAR_MENU_CONTENT, SIDEBAR_RAIL_FADE, SectionNoAccess, SectionRow, type SectionRowProps, type SectionWidget, type SectionWidgetMap, SegmentedControl, type SegmentedControlOption, SidebarContext, type SidebarContextValue, SidebarLink, type SidebarLinkProps, SidebarProvider, type SidebarState, SingleColumnLayoutComponent, SingleColumnPage, SingleColumnPageSkeleton, Skeleton, SortableList, SortableTree, StackedDrawer, StackedFocusModal, type StaticCountry, StatusCell, SwitchBox, type TQueryKey, type TabDefinition, TabbedForm, TableFooterSkeleton, TableSectionSkeleton, TableSkeleton, TextCell, TextHeader, TextSkeleton, Thumbnail, TopbarActions, TransferOwnershipSchema, TwoColumnLayoutComponent, TwoColumnPage, TwoColumnPageSkeleton, type UseExtendableFormProps, type UseExtendableGridProps, type UseExtendableTableProps, type UseQueryOptionsWrapper, VariantAttributeSection, type VariantAttributeSectionProps, type VariantGroup, VisuallyHidden, type Widget, type WidgetModule, type WidgetPlacement, type WidgetTab, type WidgetTabs, WidgetZone, type WidgetZoneProps, type ZoneWidgets, _DataTable, applyActionPermissions, applyNavGroups, applyNavOverrides, applyReplacements, buildAdditionalDataDefaults, buildAdditionalDataSchema, buildCoreEntries, buildDisplayEntries, buildOfferGridData, buildProductChangeView, buildScopedAdditionalData, buildWidgetEntries, countries, createDataGridHelper, createDataGridPriceColumns, createFormHelper, createWithPermission, currencies, detailPageDefaultEntries, extractPricesFromOffers, extractReferenceIds, extractSectionElements, filterCommandsByPermission, formatFieldValue, genericForwardRef, getCountryByIso2, getCurrencySymbol, getDecimalDigits, getExtensionRegistry, getFormattedAddress, getFormattedCountry, getLinkQuery, getListInitialData, getLocaleAmount, getNativeSymbol, getPriceListStatus, getStylizedAmount, groupNavItems, humanizeFieldName, isAmountLessThenRoundingError, isForbidden, isHtml, isImageList, isOrderActionable, isOrderAwaitingAction, isPermitted, isPriceListGroupRow, isProductRow, isReferenceField, isSameAddress, linkFields, mergeLayoutPreferences, mergeListFilters, navOverridesFromPreferences, overrideLazyRoute, permissionMapAllows, plainTextToHtml, productChangeViewHasContent, queryClient, queryKeysFactory, refineAdditionalData, resolveBuiltInFieldDefault, resolveFormFieldType, resolveRouteOverrides, richTextContentClasses, sanitizeRichText, toPermissionList, useActionLocks, useBuiltInFieldDefaults, useCan, useCollapsedSidebar, useCombinedRefs, useCommandHistory, useDataTable, useDate, useDisplayFieldOverride, useDocumentDirection, useExpandedSidebar, useExtendableForm, useExtendableGrid, useExtendableTable, useExtension, useExtensionActivity, useLinkQuery, usePermissionGate, usePermissions, usePermittedCommands, useQueryParams, useResourcePermissions, useRouteModal, useSidebar, useSidebarMenuPlacement, useStackedModal, useTabManagement, useTabbedForm, useWidgetTabs, withLinkFields };
|