@cratis/event-models 0.0.0-stage → 0.105.6
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/README.md +44 -2
- package/dist/Board/BoardActions.d.ts +37 -0
- package/dist/Board/BoardCanvas.d.ts +6 -0
- package/dist/Board/BoardCanvasChrome.d.ts +9 -0
- package/dist/Board/BoardCollectionView.d.ts +22 -0
- package/dist/Board/BoardCollections.d.ts +17 -0
- package/dist/Board/BoardContextValue.d.ts +8 -0
- package/dist/Board/BoardEditing.d.ts +22 -0
- package/dist/Board/BoardInteraction.d.ts +10 -0
- package/dist/Board/BoardInteractionContext.d.ts +3 -0
- package/dist/Board/BoardInteractionProvider.d.ts +6 -0
- package/dist/Board/BoardNavigation.d.ts +4 -0
- package/dist/Board/BoardProvider.d.ts +7 -0
- package/dist/Board/BoardReadOnlyContext.d.ts +1 -0
- package/dist/Board/BoardSelection.d.ts +5 -0
- package/dist/Board/BoardToolbar.d.ts +7 -0
- package/dist/Board/EventModelBoard.d.ts +13 -0
- package/dist/Board/EventModelBoardEditor.d.ts +16 -0
- package/dist/Board/EventModelBoardHandle.d.ts +5 -0
- package/dist/Board/HostedEventModelBoard.d.ts +18 -0
- package/dist/Board/boardMinimap.d.ts +20 -0
- package/dist/Board/index.d.ts +19 -0
- package/dist/Board/isLargeBoard.d.ts +4 -0
- package/dist/Board/useBoard.d.ts +2 -0
- package/dist/Cards/ArtifactCard.d.ts +17 -0
- package/dist/Cards/ArtifactCardKind.d.ts +5 -0
- package/dist/Cards/Card.d.ts +18 -0
- package/dist/Cards/CardAction.d.ts +12 -0
- package/dist/Cards/CardActionButton.d.ts +9 -0
- package/dist/Cards/CardCorner.d.ts +4 -0
- package/dist/Cards/CardNameInput.d.ts +11 -0
- package/dist/Cards/CardSurface.d.ts +6 -0
- package/dist/Cards/EventTags.d.ts +8 -0
- package/dist/Cards/autoFitTitle.d.ts +29 -0
- package/dist/Cards/cardColors.d.ts +30 -0
- package/dist/Cards/index.d.ts +12 -0
- package/dist/Cards/pascalCaseBreak.d.ts +20 -0
- package/dist/Cards/useAutoFitTitle.d.ts +21 -0
- package/dist/Collections/CollectionGrid.d.ts +28 -0
- package/dist/Collections/CollectionGridEditor.d.ts +16 -0
- package/dist/Collections/CollectionGridFeature.d.ts +19 -0
- package/dist/Collections/CollectionGridFeatureColumn.d.ts +26 -0
- package/dist/Collections/CollectionGridFeatureHeaderControls.d.ts +13 -0
- package/dist/Collections/CollectionGridModule.d.ts +23 -0
- package/dist/Collections/CollectionGridModuleHeaderControls.d.ts +8 -0
- package/dist/Collections/CollectionGridSlice.d.ts +19 -0
- package/dist/Collections/CollectionGridSliceHeaderControls.d.ts +14 -0
- package/dist/Collections/CollectionGridSlots.d.ts +20 -0
- package/dist/Collections/CollectionGridTemplate.d.ts +6 -0
- package/dist/Collections/CollectionMoveHandle.d.ts +12 -0
- package/dist/Collections/CollectionMoved.d.ts +4 -0
- package/dist/Collections/CollectionViewport.d.ts +27 -0
- package/dist/Collections/collectionGridLayout.d.ts +11 -0
- package/dist/Collections/collectionState.d.ts +24 -0
- package/dist/Collections/estimateCollectionSize.d.ts +7 -0
- package/dist/Collections/index.d.ts +13 -0
- package/dist/Collections/useCollectionMove.d.ts +10 -0
- package/dist/Collections/useCollectionsArea.d.ts +27 -0
- package/dist/Connections/Connectors.d.ts +23 -0
- package/dist/Connections/FlowNodeActor.d.ts +13 -0
- package/dist/Connections/SliceConnections.d.ts +7 -0
- package/dist/Connections/SliceConnectionsContext.d.ts +11 -0
- package/dist/Connections/computeSliceConnections.d.ts +23 -0
- package/dist/Connections/flowNodeOrder.d.ts +3 -0
- package/dist/Connections/index.d.ts +7 -0
- package/dist/Connections/useConnectionHighlight.d.ts +7 -0
- package/dist/Features/FeatureAddMenu.d.ts +10 -0
- package/dist/Features/FeatureColumnFrame.d.ts +10 -0
- package/dist/Features/FeatureGridSurface.d.ts +15 -0
- package/dist/Features/FeatureHeader.d.ts +21 -0
- package/dist/Features/FeatureHeaderAction.d.ts +12 -0
- package/dist/Features/FeatureHeaderCell.d.ts +10 -0
- package/dist/Features/FeatureHeaderMenu.d.ts +10 -0
- package/dist/Features/FeatureHeaderMenuAction.d.ts +14 -0
- package/dist/Features/FeatureHeaderSuggestion.d.ts +9 -0
- package/dist/Features/FeatureSuggestions.d.ts +4 -0
- package/dist/Features/FeaturesArea.d.ts +42 -0
- package/dist/Features/FeaturesReordered.d.ts +2 -0
- package/dist/Features/featureAreaState.d.ts +27 -0
- package/dist/Features/featureDropEdge.d.ts +2 -0
- package/dist/Features/featureHeaderMenuItems.d.ts +4 -0
- package/dist/Features/index.d.ts +12 -0
- package/dist/Features/useFeatureDrag.d.ts +16 -0
- package/dist/Features/useFeatureSlotTargets.d.ts +11 -0
- package/dist/Geometry/CurveAxis.d.ts +5 -0
- package/dist/Geometry/connectionCurve.d.ts +13 -0
- package/dist/Geometry/index.d.ts +5 -0
- package/dist/Geometry/linkGeometry.d.ts +62 -0
- package/dist/Geometry/pillLabelWidth.d.ts +38 -0
- package/dist/Geometry/rowLabelWidth.d.ts +1 -0
- package/dist/HeaderDragging/HeaderDragGhost.d.ts +6 -0
- package/dist/HeaderDragging/HeaderDragStart.d.ts +8 -0
- package/dist/HeaderDragging/HeaderDragState.d.ts +8 -0
- package/dist/HeaderDragging/createHeaderDragGhost.d.ts +1 -0
- package/dist/HeaderDragging/headerDropIndex.d.ts +5 -0
- package/dist/HeaderDragging/index.d.ts +8 -0
- package/dist/HeaderDragging/reorderedIds.d.ts +2 -0
- package/dist/HeaderDragging/useHeaderDragIntent.d.ts +8 -0
- package/dist/HeaderDragging/zoomOfAncestor.d.ts +1 -0
- package/dist/Headers/CollapseButton.d.ts +6 -0
- package/dist/Headers/DetailsToggle.d.ts +5 -0
- package/dist/Headers/EditableLabel.d.ts +10 -0
- package/dist/Headers/EntityErrorIndicator.d.ts +10 -0
- package/dist/Headers/EntityErrorKind.d.ts +6 -0
- package/dist/Headers/ErroredEntity.d.ts +17 -0
- package/dist/Headers/PillHeader.d.ts +25 -0
- package/dist/Headers/index.d.ts +7 -0
- package/dist/Icons/CogWheel.d.ts +1 -0
- package/dist/Icons/index.d.ts +1 -0
- package/dist/Layout/boardMetrics.d.ts +20 -0
- package/dist/Layout/index.d.ts +3 -0
- package/dist/Layout/sliceLayout.d.ts +14 -0
- package/dist/Layout/sliceRows.d.ts +7 -0
- package/dist/Links/ModuleCollectionLinks.d.ts +19 -0
- package/dist/Links/drawableLinks.d.ts +8 -0
- package/dist/Links/index.d.ts +2 -0
- package/dist/Links/linkState.d.ts +17 -0
- package/dist/Menus/MenuDropdown.d.ts +29 -0
- package/dist/Menus/index.d.ts +1 -0
- package/dist/Messages/EventModelMessages.d.ts +153 -0
- package/dist/Messages/EventModelMessagesContext.d.ts +3 -0
- package/dist/Messages/EventModelMessagesProvider.d.ts +7 -0
- package/dist/Messages/defaultEventModelMessages.d.ts +2 -0
- package/dist/Messages/index.d.ts +4 -0
- package/dist/Model/Actor.d.ts +9 -0
- package/dist/Model/ActorType.d.ts +5 -0
- package/dist/Model/Assignee.d.ts +8 -0
- package/dist/Model/AssigneeKind.d.ts +5 -0
- package/dist/Model/AutomationTrigger.d.ts +9 -0
- package/dist/Model/AutomationTriggerSchedule.d.ts +8 -0
- package/dist/Model/AutomationTriggerType.d.ts +6 -0
- package/dist/Model/CommandConcurrency.d.ts +9 -0
- package/dist/Model/CommandItem.d.ts +13 -0
- package/dist/Model/CommandPropertyRules.d.ts +5 -0
- package/dist/Model/CommandRule.d.ts +4 -0
- package/dist/Model/ConcurrencyBinding.d.ts +5 -0
- package/dist/Model/ConcurrencyValueSource.d.ts +5 -0
- package/dist/Model/EventConstraint.d.ts +4 -0
- package/dist/Model/EventConstraints.d.ts +5 -0
- package/dist/Model/EventItem.d.ts +11 -0
- package/dist/Model/EventModel.d.ts +11 -0
- package/dist/Model/ExternalEventItem.d.ts +6 -0
- package/dist/Model/Feature.d.ts +14 -0
- package/dist/Model/Module.d.ts +12 -0
- package/dist/Model/ModuleCollection.d.ts +10 -0
- package/dist/Model/ModuleCollectionLink.d.ts +6 -0
- package/dist/Model/PersonaReference.d.ts +5 -0
- package/dist/Model/Position.d.ts +4 -0
- package/dist/Model/QueryItem.d.ts +7 -0
- package/dist/Model/QueryParameter.d.ts +5 -0
- package/dist/Model/QueryParameterType.d.ts +8 -0
- package/dist/Model/ReadModelItem.d.ts +8 -0
- package/dist/Model/ScreenTemplate.d.ts +4 -0
- package/dist/Model/Slice.d.ts +31 -0
- package/dist/Model/SliceSpecification.d.ts +19 -0
- package/dist/Model/SliceStatus.d.ts +9 -0
- package/dist/Model/SliceType.d.ts +6 -0
- package/dist/Model/SpecificationCommand.d.ts +7 -0
- package/dist/Model/SpecificationError.d.ts +7 -0
- package/dist/Model/SpecificationErrorRuleKind.d.ts +5 -0
- package/dist/Model/SpecificationErrorRuleReference.d.ts +8 -0
- package/dist/Model/SpecificationGivenEvent.d.ts +7 -0
- package/dist/Model/SpecificationReadModel.d.ts +6 -0
- package/dist/Model/SpecificationRunOutcome.d.ts +5 -0
- package/dist/Model/SpecificationThenEvent.d.ts +7 -0
- package/dist/Model/StickyNote.d.ts +8 -0
- package/dist/Model/UserExperienceActor.d.ts +10 -0
- package/dist/Model/index.d.ts +43 -0
- package/dist/Modules/ModuleColumnFrame.d.ts +11 -0
- package/dist/Modules/ModuleDropIndicator.d.ts +1 -0
- package/dist/Modules/ModuleHeader.d.ts +20 -0
- package/dist/Modules/ModuleHeaderAction.d.ts +14 -0
- package/dist/Modules/ModuleHeaderCell.d.ts +7 -0
- package/dist/Modules/ModuleHeaderMenu.d.ts +10 -0
- package/dist/Modules/ModulePlaceholder.d.ts +6 -0
- package/dist/Modules/ModuleSurface.d.ts +15 -0
- package/dist/Modules/ModulesArea.d.ts +23 -0
- package/dist/Modules/ModulesReordered.d.ts +2 -0
- package/dist/Modules/index.d.ts +12 -0
- package/dist/Modules/moduleAreaState.d.ts +27 -0
- package/dist/Modules/moduleWidth.d.ts +2 -0
- package/dist/Modules/persistModuleChange.d.ts +1 -0
- package/dist/Modules/useModuleDrag.d.ts +15 -0
- package/dist/Pickers/EventReferencePicker.d.ts +10 -0
- package/dist/Pickers/PickerPanel.d.ts +16 -0
- package/dist/Pickers/index.d.ts +2 -0
- package/dist/Pickers/useDismissOnOutsidePointer.d.ts +2 -0
- package/dist/Presentation/DetailLevel.d.ts +20 -0
- package/dist/Presentation/EventModelPresentation.d.ts +8 -0
- package/dist/Presentation/EventModelPresentationContext.d.ts +3 -0
- package/dist/Presentation/EventModelPresentationProvider.d.ts +7 -0
- package/dist/Presentation/VisualizationMode.d.ts +1 -0
- package/dist/Presentation/defaultEventModelPresentation.d.ts +2 -0
- package/dist/Presentation/detailsVisibility.d.ts +12 -0
- package/dist/Presentation/index.d.ts +7 -0
- package/dist/Properties/SchemaTooltipProperties.d.ts +9 -0
- package/dist/Properties/TypeBadge.d.ts +10 -0
- package/dist/Properties/index.d.ts +3 -0
- package/dist/Properties/schemaProperties.d.ts +6 -0
- package/dist/Reading/DocumentNode.d.ts +22 -0
- package/dist/Reading/InvalidEventModelDocument.d.ts +4 -0
- package/dist/Reading/index.d.ts +4 -0
- package/dist/Reading/isKnownValue.d.ts +1 -0
- package/dist/Reading/readActors.d.ts +4 -0
- package/dist/Reading/readBoardItems.d.ts +5 -0
- package/dist/Reading/readEventModelDocument.d.ts +2 -0
- package/dist/Reading/readJsonSchema.d.ts +2 -0
- package/dist/Reading/readModules.d.ts +3 -0
- package/dist/Reading/readSlice.d.ts +3 -0
- package/dist/Reading/readSliceItems.d.ts +7 -0
- package/dist/Reading/readSpecification.d.ts +3 -0
- package/dist/References/EventNavigateButton.d.ts +5 -0
- package/dist/References/ExternalEventCard.d.ts +14 -0
- package/dist/References/index.d.ts +3 -0
- package/dist/References/useReferenceHover.d.ts +12 -0
- package/dist/RowLabels/ActorRowDragGhost.d.ts +5 -0
- package/dist/RowLabels/ActorRowDropIndicator.d.ts +1 -0
- package/dist/RowLabels/ActorsReordered.d.ts +3 -0
- package/dist/RowLabels/RowLabel.d.ts +19 -0
- package/dist/RowLabels/RowLabelAction.d.ts +8 -0
- package/dist/RowLabels/RowLabelBadge.d.ts +8 -0
- package/dist/RowLabels/RowLabelsColumn.d.ts +20 -0
- package/dist/RowLabels/RowLabelsColumnFrame.d.ts +7 -0
- package/dist/RowLabels/actorKinds.d.ts +8 -0
- package/dist/RowLabels/actorRows.d.ts +4 -0
- package/dist/RowLabels/index.d.ts +12 -0
- package/dist/RowLabels/rowTypeName.d.ts +3 -0
- package/dist/RowLabels/useActorRowDrag.d.ts +30 -0
- package/dist/Rows/CellAction.d.ts +8 -0
- package/dist/Rows/CellActionButton.d.ts +6 -0
- package/dist/Rows/CellCorner.d.ts +7 -0
- package/dist/Rows/CellCornerAction.d.ts +7 -0
- package/dist/Rows/CellCornerPlacement.d.ts +4 -0
- package/dist/Rows/Chat/ChatCell.d.ts +9 -0
- package/dist/Rows/Chat/index.d.ts +1 -0
- package/dist/Rows/Events/EventCard.d.ts +9 -0
- package/dist/Rows/Events/EventReferenceCard.d.ts +7 -0
- package/dist/Rows/Events/EventsCell.d.ts +12 -0
- package/dist/Rows/Events/SliceEvents.d.ts +11 -0
- package/dist/Rows/Events/index.d.ts +5 -0
- package/dist/Rows/Events/referenceableEvents.d.ts +2 -0
- package/dist/Rows/Interaction/InteractionCard.d.ts +14 -0
- package/dist/Rows/Interaction/InteractionCell.d.ts +31 -0
- package/dist/Rows/Interaction/InteractionMiniCard.d.ts +4 -0
- package/dist/Rows/Interaction/OptionalReadModel.d.ts +6 -0
- package/dist/Rows/Interaction/SliceInteraction.d.ts +11 -0
- package/dist/Rows/Interaction/index.d.ts +5 -0
- package/dist/Rows/RowType.d.ts +7 -0
- package/dist/Rows/System/SystemCell.d.ts +12 -0
- package/dist/Rows/System/TriggerControl.d.ts +8 -0
- package/dist/Rows/System/TriggerKind.d.ts +5 -0
- package/dist/Rows/System/index.d.ts +4 -0
- package/dist/Rows/System/triggerBadges.d.ts +4 -0
- package/dist/Rows/UserExperience/AddPrototypeButton.d.ts +7 -0
- package/dist/Rows/UserExperience/PrototypeTemplate.d.ts +6 -0
- package/dist/Rows/UserExperience/UiCell.d.ts +17 -0
- package/dist/Rows/UserExperience/addPrototypeMenuItems.d.ts +8 -0
- package/dist/Rows/UserExperience/index.d.ts +4 -0
- package/dist/Rows/eventRowAffordances.d.ts +5 -0
- package/dist/Rows/index.d.ts +12 -0
- package/dist/SliceDragging/SliceDragGestureVerdict.d.ts +5 -0
- package/dist/SliceDragging/SliceDragGhost.d.ts +6 -0
- package/dist/SliceDragging/SliceDropIndicator.d.ts +5 -0
- package/dist/SliceDragging/SliceDropTarget.d.ts +14 -0
- package/dist/SliceDragging/SliceDropVerdict.d.ts +4 -0
- package/dist/SliceDragging/SliceMoved.d.ts +2 -0
- package/dist/SliceDragging/ValidateSliceDrop.d.ts +3 -0
- package/dist/SliceDragging/dropIndicatorClassName.d.ts +1 -0
- package/dist/SliceDragging/index.d.ts +14 -0
- package/dist/SliceDragging/readSliceDragGesture.d.ts +5 -0
- package/dist/SliceDragging/readSlicePress.d.ts +20 -0
- package/dist/SliceDragging/sliceMove.d.ts +10 -0
- package/dist/SliceDragging/snapshotSlice.d.ts +8 -0
- package/dist/SliceDragging/useSliceDrag.d.ts +30 -0
- package/dist/SliceDragging/useSliceDragIntent.d.ts +10 -0
- package/dist/SliceTypes/SliceTypeIcon.d.ts +5 -0
- package/dist/SliceTypes/SliceTypeMenu.d.ts +6 -0
- package/dist/SliceTypes/index.d.ts +3 -0
- package/dist/SliceTypes/sliceTypeMenuItems.d.ts +7 -0
- package/dist/Slices/SliceColumn.d.ts +18 -0
- package/dist/Slices/SliceColumnFrame.d.ts +20 -0
- package/dist/Slices/SliceContext.d.ts +2 -0
- package/dist/Slices/SliceContextValue.d.ts +7 -0
- package/dist/Slices/SliceHeader.d.ts +14 -0
- package/dist/Slices/SliceHeaderAction.d.ts +10 -0
- package/dist/Slices/SliceHeaderSlice.d.ts +2 -0
- package/dist/Slices/SliceNames.d.ts +6 -0
- package/dist/Slices/SlicePlaceholder.d.ts +15 -0
- package/dist/Slices/SliceProvider.d.ts +10 -0
- package/dist/Slices/SliceRows.d.ts +28 -0
- package/dist/Slices/SlicesArea.d.ts +38 -0
- package/dist/Slices/createOptimisticSlice.d.ts +3 -0
- package/dist/Slices/index.d.ts +15 -0
- package/dist/Slices/resolveSliceReadOnly.d.ts +3 -0
- package/dist/Slices/sliceAreaState.d.ts +43 -0
- package/dist/Slices/useSlice.d.ts +3 -0
- package/dist/Specifications/GivenSection.d.ts +12 -0
- package/dist/Specifications/SpecificationAction.d.ts +19 -0
- package/dist/Specifications/SpecificationAddPicker.d.ts +11 -0
- package/dist/Specifications/SpecificationCollection.d.ts +16 -0
- package/dist/Specifications/SpecificationEditing.d.ts +20 -0
- package/dist/Specifications/SpecificationErrorCard.d.ts +5 -0
- package/dist/Specifications/SpecificationHeader.d.ts +14 -0
- package/dist/Specifications/SpecificationItemCard.d.ts +7 -0
- package/dist/Specifications/SpecificationItemKind.d.ts +5 -0
- package/dist/Specifications/SpecificationItemToOpen.d.ts +14 -0
- package/dist/Specifications/SpecificationRow.d.ts +8 -0
- package/dist/Specifications/SpecificationRunButton.d.ts +7 -0
- package/dist/Specifications/SpecificationRunState.d.ts +23 -0
- package/dist/Specifications/SpecificationSection.d.ts +8 -0
- package/dist/Specifications/SpecificationStatus.d.ts +14 -0
- package/dist/Specifications/ThenSection.d.ts +15 -0
- package/dist/Specifications/WhenSection.d.ts +12 -0
- package/dist/Specifications/index.d.ts +10 -0
- package/dist/Specifications/itemValues.d.ts +7 -0
- package/dist/Specifications/ruleErrors.d.ts +8 -0
- package/dist/Specifications/specificationCollectionState.d.ts +7 -0
- package/dist/Specifications/specificationEvents.d.ts +3 -0
- package/dist/Statuses/SliceStatusIcon.d.ts +5 -0
- package/dist/Statuses/SliceStatusPicker.d.ts +8 -0
- package/dist/Statuses/changeSliceStatus.d.ts +2 -0
- package/dist/Statuses/index.d.ts +4 -0
- package/dist/Statuses/sliceStatuses.d.ts +6 -0
- package/dist/StickyNotes/StickyNoteBounds.d.ts +6 -0
- package/dist/StickyNotes/StickyNoteChanges.d.ts +9 -0
- package/dist/StickyNotes/StickyNoteHandle.d.ts +4 -0
- package/dist/StickyNotes/StickyNoteState.d.ts +16 -0
- package/dist/StickyNotes/StickyNotes.d.ts +6 -0
- package/dist/StickyNotes/index.d.ts +6 -0
- package/dist/StickyNotes/isEditableTarget.d.ts +1 -0
- package/dist/Tooltips/AnchoredOverlay.d.ts +27 -0
- package/dist/Tooltips/GridTooltip.d.ts +21 -0
- package/dist/Tooltips/index.d.ts +2 -0
- package/dist/Viewport/index.d.ts +2 -0
- package/dist/Viewport/useInViewport.d.ts +3 -0
- package/dist/Viewport/viewportFlushScheduler.d.ts +7 -0
- package/dist/event-model-document.schema.json +827 -0
- package/dist/event-models.css +2 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +7682 -0
- package/dist/index.js.map +1 -0
- package/dist/theme.css +53 -0
- package/package.json +66 -3
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type CellConnectors } from '../../Connections';
|
|
3
|
+
import { InteractionMiniCard } from './InteractionMiniCard';
|
|
4
|
+
export type InteractionLayout = {
|
|
5
|
+
kind: 'centered';
|
|
6
|
+
cards: ReactNode;
|
|
7
|
+
corners?: ReactNode;
|
|
8
|
+
hasItems: boolean;
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'sideBySide';
|
|
11
|
+
cards: ReactNode;
|
|
12
|
+
readModelOnTop: boolean;
|
|
13
|
+
commandBelow: boolean;
|
|
14
|
+
hasLeftCard: boolean;
|
|
15
|
+
hasRightCard: boolean;
|
|
16
|
+
} | {
|
|
17
|
+
kind: 'split';
|
|
18
|
+
left: ReactNode;
|
|
19
|
+
leftCorner?: ReactNode;
|
|
20
|
+
right: ReactNode;
|
|
21
|
+
rightCorner?: ReactNode;
|
|
22
|
+
hasItems: boolean;
|
|
23
|
+
};
|
|
24
|
+
export interface InteractionCellProps {
|
|
25
|
+
collapsed?: boolean;
|
|
26
|
+
conn: CellConnectors;
|
|
27
|
+
rowHeight: number;
|
|
28
|
+
miniCards: readonly InteractionMiniCard[];
|
|
29
|
+
layout: InteractionLayout;
|
|
30
|
+
}
|
|
31
|
+
export declare const InteractionCell: ({ collapsed, conn, rowHeight, miniCards, layout }: InteractionCellProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CellConnectors } from '../../Connections';
|
|
2
|
+
import { type EventItem, type Slice } from '../../Model';
|
|
3
|
+
export interface SliceInteractionProps {
|
|
4
|
+
slice: Slice;
|
|
5
|
+
collapsed?: boolean;
|
|
6
|
+
conn: CellConnectors;
|
|
7
|
+
rowHeight: number;
|
|
8
|
+
externalEventOptions?: readonly EventItem[];
|
|
9
|
+
showDetails?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const SliceInteraction: ({ slice, collapsed, conn, rowHeight, externalEventOptions, showDetails }: SliceInteractionProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type CellConnectors } from '../../Connections';
|
|
3
|
+
import { type AutomationTriggerType, SliceType } from '../../Model';
|
|
4
|
+
export interface SystemCellProps {
|
|
5
|
+
sliceType: SliceType;
|
|
6
|
+
isSystemSlice: boolean;
|
|
7
|
+
collapsed?: boolean;
|
|
8
|
+
conn: CellConnectors;
|
|
9
|
+
rowHeight: number;
|
|
10
|
+
triggerType?: AutomationTriggerType;
|
|
11
|
+
}
|
|
12
|
+
export declare const SystemCell: ({ sliceType, isSystemSlice, collapsed, conn, rowHeight, triggerType }: SystemCellProps) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AutomationTriggerType } from '../../Model';
|
|
2
|
+
import { TriggerKind } from './TriggerKind';
|
|
3
|
+
export interface TriggerControlProps {
|
|
4
|
+
triggerType?: AutomationTriggerType;
|
|
5
|
+
onTriggerKindChosen: (kind: TriggerKind) => void;
|
|
6
|
+
onTriggerOpened: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const TriggerControl: ({ triggerType, onTriggerKindChosen, onTriggerOpened }: TriggerControlProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AutomationTriggerType } from '../../Model';
|
|
2
|
+
import type { EventModelMessages } from '../../Messages';
|
|
3
|
+
export declare const triggerIcon: (type: AutomationTriggerType) => string | undefined;
|
|
4
|
+
export declare const triggerTitle: (type: AutomationTriggerType, messages: EventModelMessages) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PrototypeTemplate } from './PrototypeTemplate';
|
|
2
|
+
export interface AddPrototypeButtonProps {
|
|
3
|
+
templates: readonly PrototypeTemplate[];
|
|
4
|
+
onFromScratch: (host: DOMRect) => void;
|
|
5
|
+
onFromTemplate: (template: PrototypeTemplate, host: DOMRect) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const AddPrototypeButton: ({ templates, onFromScratch, onFromTemplate }: AddPrototypeButtonProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PrototypeLayout } from '@cratis/scene/Prototypes';
|
|
3
|
+
import type { UIElement, IComponent } from '@cratis/scene';
|
|
4
|
+
import { type CellConnectors } from '../../Connections';
|
|
5
|
+
export interface UiCellProps {
|
|
6
|
+
elements: readonly (UIElement | IComponent)[];
|
|
7
|
+
windowSize?: {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
11
|
+
layout?: PrototypeLayout;
|
|
12
|
+
collapsed?: boolean;
|
|
13
|
+
conn: CellConnectors;
|
|
14
|
+
rowHeight: number;
|
|
15
|
+
actorId: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const UiCell: ({ elements, windowSize, layout, collapsed, conn, rowHeight, actorId }: UiCellProps) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EventModelMessages } from '../../Messages';
|
|
2
|
+
import type { MenuDropdownItem } from '../../Menus';
|
|
3
|
+
import type { PrototypeTemplate } from './PrototypeTemplate';
|
|
4
|
+
export interface AddPrototypeMenuActions {
|
|
5
|
+
onFromScratch: () => void;
|
|
6
|
+
onFromTemplate: (template: PrototypeTemplate) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const addPrototypeMenuItems: (templates: readonly PrototypeTemplate[], messages: EventModelMessages['prototypes'], actions: AddPrototypeMenuActions) => MenuDropdownItem[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SliceType } from '../Model';
|
|
2
|
+
export declare const usesEventReferencePicker: (sliceType: SliceType) => boolean;
|
|
3
|
+
export declare const showsAddNewEventButton: (sliceType: SliceType) => boolean;
|
|
4
|
+
export declare const showsEventReferencePlaceholder: (sliceType: SliceType, eventCount: number) => boolean;
|
|
5
|
+
export declare const showsExternalEventPicker: (sliceType: SliceType) => boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './RowType';
|
|
2
|
+
export * from './CellAction';
|
|
3
|
+
export * from './CellActionButton';
|
|
4
|
+
export * from './CellCorner';
|
|
5
|
+
export * from './CellCornerAction';
|
|
6
|
+
export * from './CellCornerPlacement';
|
|
7
|
+
export * from './eventRowAffordances';
|
|
8
|
+
export * from './System';
|
|
9
|
+
export * from './UserExperience';
|
|
10
|
+
export * from './Chat';
|
|
11
|
+
export * from './Events';
|
|
12
|
+
export * from './Interaction';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SliceDragState } from './useSliceDrag';
|
|
2
|
+
export interface SliceDragGhostProps {
|
|
3
|
+
drag?: SliceDragState;
|
|
4
|
+
headerHeight: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const SliceDragGhost: ({ drag, headerHeight }: SliceDragGhostProps) => import("react").ReactPortal | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
export interface SliceDropTargetProps {
|
|
4
|
+
moduleId: Guid;
|
|
5
|
+
featureId: Guid;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
busy?: boolean;
|
|
8
|
+
acceptsReorder?: boolean;
|
|
9
|
+
acceptsMove?: boolean;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
className?: string;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const SliceDropTarget: ({ moduleId, featureId, active, busy, acceptsReorder, acceptsMove, style, className, children }: SliceDropTargetProps) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dropIndicatorClassName: (isValid: boolean) => "event-modeling-grid-slice-drop-indicator" | "event-modeling-grid-slice-drop-indicator event-modeling-grid-slice-drop-indicator--invalid";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './dropIndicatorClassName';
|
|
2
|
+
export * from './readSliceDragGesture';
|
|
3
|
+
export * from './readSlicePress';
|
|
4
|
+
export * from './SliceDragGestureVerdict';
|
|
5
|
+
export * from './SliceDragGhost';
|
|
6
|
+
export * from './snapshotSlice';
|
|
7
|
+
export * from './SliceDropIndicator';
|
|
8
|
+
export * from './SliceDropTarget';
|
|
9
|
+
export * from './SliceDropVerdict';
|
|
10
|
+
export * from './sliceMove';
|
|
11
|
+
export * from './SliceMoved';
|
|
12
|
+
export * from './useSliceDrag';
|
|
13
|
+
export * from './useSliceDragIntent';
|
|
14
|
+
export * from './ValidateSliceDrop';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SliceDragGestureVerdict } from './SliceDragGestureVerdict';
|
|
2
|
+
export declare const DRAG_THRESHOLD = 4;
|
|
3
|
+
export declare const TOUCH_LONG_PRESS_MS = 450;
|
|
4
|
+
export declare const TOUCH_LONG_PRESS_TOLERANCE = 10;
|
|
5
|
+
export declare function readSliceDragGesture(pointerType: string, deltaX: number, deltaY: number): SliceDragGestureVerdict;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const INTERACTIVE_SELECTOR = "input, textarea, select, button, a, [role=\"button\"], [contenteditable=\"true\"], .p-dropdown, .p-checkbox";
|
|
2
|
+
export interface PressedElement {
|
|
3
|
+
closest(selectors: string): unknown;
|
|
4
|
+
}
|
|
5
|
+
export interface SlicePressEvent {
|
|
6
|
+
target: PressedElement | null;
|
|
7
|
+
clientX: number;
|
|
8
|
+
clientY: number;
|
|
9
|
+
pointerId: number;
|
|
10
|
+
pointerType: string;
|
|
11
|
+
elementTop: number;
|
|
12
|
+
}
|
|
13
|
+
export interface SlicePress {
|
|
14
|
+
startX: number;
|
|
15
|
+
startY: number;
|
|
16
|
+
grabOffsetY: number;
|
|
17
|
+
pointerId: number;
|
|
18
|
+
pointerType: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function readSlicePress(event: SlicePressEvent, disabled: boolean): SlicePress | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
2
|
+
export interface SliceDropPosition {
|
|
3
|
+
featureId: Guid;
|
|
4
|
+
targetFeatureId: Guid;
|
|
5
|
+
sourceIndex: number;
|
|
6
|
+
dropIndex: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const sliceMove: (position: SliceDropPosition) => {
|
|
9
|
+
index: number;
|
|
10
|
+
} | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const HIT_TEST_ATTRIBUTES: string[];
|
|
2
|
+
export interface GhostNode {
|
|
3
|
+
removeAttribute(name: string): void;
|
|
4
|
+
setAttribute(name: string, value: string): void;
|
|
5
|
+
readonly children: ArrayLike<GhostNode>;
|
|
6
|
+
}
|
|
7
|
+
export declare function prepareGhost(node: GhostNode): void;
|
|
8
|
+
export declare function createSliceDragGhost(element: HTMLElement): HTMLElement | null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Guid } from '@cratis/fundamentals';
|
|
2
|
+
import type { SliceMoved } from './SliceMoved';
|
|
3
|
+
import type { ValidateSliceDrop } from './ValidateSliceDrop';
|
|
4
|
+
export interface DraggableFeature {
|
|
5
|
+
id: Guid;
|
|
6
|
+
slices: ReadonlyArray<{
|
|
7
|
+
id: Guid;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
export interface SliceDragState {
|
|
11
|
+
sliceId: Guid;
|
|
12
|
+
moduleId: Guid;
|
|
13
|
+
featureId: Guid;
|
|
14
|
+
targetFeatureId: Guid;
|
|
15
|
+
sourceIndex: number;
|
|
16
|
+
ghostLabel: string;
|
|
17
|
+
ghostWidth: number;
|
|
18
|
+
ghost: HTMLElement | null;
|
|
19
|
+
currentX: number;
|
|
20
|
+
currentY: number;
|
|
21
|
+
dropIndex: number;
|
|
22
|
+
headerY: number;
|
|
23
|
+
zoom: number;
|
|
24
|
+
isValid: boolean;
|
|
25
|
+
invalidReason?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function useSliceDrag(feature: DraggableFeature, moduleId: Guid, onSliceMoved?: SliceMoved, validateSliceDrop?: ValidateSliceDrop): {
|
|
28
|
+
sliceDrag: SliceDragState | undefined;
|
|
29
|
+
handleSliceDragStart: ((sliceId: Guid, sliceName: string, clientX: number, clientY: number, columnWidth: number, headerY: number, zoom: number, ghost?: HTMLElement | null) => void) | undefined;
|
|
30
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { Guid } from '@cratis/fundamentals';
|
|
3
|
+
export type SliceDragStartHandler = (sliceId: Guid, sliceName: string, clientX: number, clientY: number, columnWidth: number, headerY: number, zoom: number, ghost: HTMLElement | null) => void;
|
|
4
|
+
export interface SliceDragIntentHandlers {
|
|
5
|
+
onPointerDown: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
6
|
+
onPointerMove: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
7
|
+
onPointerUp: () => void;
|
|
8
|
+
onContextMenu: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function useSliceDragIntent(sliceId: Guid | undefined, sliceName: string, columnWidth: number, disabled: boolean, onSliceDragStart?: SliceDragStartHandler): SliceDragIntentHandlers;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SliceType } from '../Model';
|
|
2
|
+
import type { EventModelMessages } from '../Messages';
|
|
3
|
+
import type { MenuDropdownItem } from '../Menus';
|
|
4
|
+
export declare const sliceTypes: readonly SliceType[];
|
|
5
|
+
export declare const sliceTypeLabel: (type: SliceType, messages: EventModelMessages) => string;
|
|
6
|
+
export declare const sliceTypeDescription: (type: SliceType, messages: EventModelMessages) => string;
|
|
7
|
+
export declare const sliceTypeMenuItems: (messages: EventModelMessages, onSelect: (type: SliceType) => void) => MenuDropdownItem[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import type { SliceHeaderSlice } from './SliceHeaderSlice';
|
|
4
|
+
import type { SliceDragStartHandler } from '../SliceDragging';
|
|
5
|
+
export interface SliceColumnProps {
|
|
6
|
+
featureId: Guid;
|
|
7
|
+
slice: SliceHeaderSlice;
|
|
8
|
+
eventCount: number;
|
|
9
|
+
collapsed: boolean;
|
|
10
|
+
isDragging?: boolean;
|
|
11
|
+
onSliceDragStart?: SliceDragStartHandler;
|
|
12
|
+
header?: ReactNode;
|
|
13
|
+
headerHeight?: number;
|
|
14
|
+
body: ReactNode | ((inView: boolean) => ReactNode);
|
|
15
|
+
specifications?: ReactNode | ((inView: boolean, width: number) => ReactNode);
|
|
16
|
+
collapsedWidth: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const SliceColumn: ({ featureId, slice, eventCount, collapsed, isDragging, onSliceDragStart, header, headerHeight, body, specifications, collapsedWidth }: SliceColumnProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import type { SliceStatus } from '../Model';
|
|
4
|
+
import { type SliceDragStartHandler } from '../SliceDragging';
|
|
5
|
+
export interface SliceColumnFrameProps {
|
|
6
|
+
featureId: Guid;
|
|
7
|
+
name: string;
|
|
8
|
+
status: SliceStatus;
|
|
9
|
+
width: number;
|
|
10
|
+
collapsed: boolean;
|
|
11
|
+
isDragging?: boolean;
|
|
12
|
+
onDragStart?: SliceDragStartHandler;
|
|
13
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
14
|
+
onMouseEnter?: () => void;
|
|
15
|
+
onMouseLeave?: () => void;
|
|
16
|
+
onFocusCapture?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
17
|
+
onBlurCapture?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare const SliceColumnFrame: ({ featureId, name, status, width, collapsed, isDragging, onDragStart, ref, onMouseEnter, onMouseLeave, onFocusCapture, onBlurCapture, children, }: SliceColumnFrameProps) => React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SliceStatus } from '../Model';
|
|
3
|
+
import type { SliceHeaderSlice } from './SliceHeaderSlice';
|
|
4
|
+
export interface SliceHeaderProps {
|
|
5
|
+
slice: SliceHeaderSlice;
|
|
6
|
+
height: number;
|
|
7
|
+
collapsed: boolean;
|
|
8
|
+
selectableStatuses?: readonly SliceStatus[];
|
|
9
|
+
unselectableStatusReason?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
leading?: React.ReactNode;
|
|
12
|
+
trailing?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const SliceHeader: ({ slice, height, collapsed, selectableStatuses, unselectableStatusReason, error, leading, trailing, }: SliceHeaderProps) => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import type { SliceHeaderSlice } from './SliceHeaderSlice';
|
|
4
|
+
export interface SliceHeaderAction {
|
|
5
|
+
icon: ReactNode;
|
|
6
|
+
tooltip: string;
|
|
7
|
+
when?: (slice: SliceHeaderSlice) => boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onActivate: (sliceId: Guid, host: DOMRect) => void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SliceType } from '../Model';
|
|
3
|
+
import { RowType } from '../Rows/RowType';
|
|
4
|
+
export interface SlicePlaceholderSlice {
|
|
5
|
+
sliceType: SliceType;
|
|
6
|
+
hasCommand: boolean;
|
|
7
|
+
hasReadModel: boolean;
|
|
8
|
+
eventCount: number;
|
|
9
|
+
}
|
|
10
|
+
export interface SlicePlaceholderProps {
|
|
11
|
+
slice: SlicePlaceholderSlice;
|
|
12
|
+
contentRows: readonly RowType[];
|
|
13
|
+
rowHeights: Readonly<Record<RowType, number>>;
|
|
14
|
+
}
|
|
15
|
+
export declare const SlicePlaceholder: React.FC<SlicePlaceholderProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import type { SliceStatus, SliceType } from '../Model';
|
|
4
|
+
export interface SliceProviderProps {
|
|
5
|
+
sliceId: Guid;
|
|
6
|
+
sliceType: SliceType;
|
|
7
|
+
status: SliceStatus;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const SliceProvider: ({ sliceId, sliceType, status, children }: SliceProviderProps) => React.JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { ActorType, SliceType } from '../Model';
|
|
3
|
+
import { type CellConnectors } from '../Connections';
|
|
4
|
+
import { RowType } from '../Rows/RowType';
|
|
5
|
+
export interface SliceRowCell<TActor> {
|
|
6
|
+
rowType: RowType;
|
|
7
|
+
conn: CellConnectors;
|
|
8
|
+
rowHeight: number;
|
|
9
|
+
actor?: TActor;
|
|
10
|
+
}
|
|
11
|
+
export interface SliceRowsProps<TActor extends {
|
|
12
|
+
id: {
|
|
13
|
+
toString(): string;
|
|
14
|
+
};
|
|
15
|
+
actorType: ActorType;
|
|
16
|
+
}> {
|
|
17
|
+
sliceType: SliceType;
|
|
18
|
+
contentRows: readonly RowType[];
|
|
19
|
+
rowHeights: Readonly<Record<RowType, number>>;
|
|
20
|
+
actors: readonly TActor[];
|
|
21
|
+
renderCell: (cell: SliceRowCell<TActor>) => ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare const SliceRows: <TActor extends {
|
|
24
|
+
id: {
|
|
25
|
+
toString(): string;
|
|
26
|
+
};
|
|
27
|
+
actorType: ActorType;
|
|
28
|
+
}>({ sliceType, contentRows, rowHeights, actors, renderCell }: SliceRowsProps<TActor>) => import("react").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import { useSliceDrag, type ValidateSliceDrop } from '../SliceDragging';
|
|
4
|
+
import type { Slice, SliceType } from '../Model';
|
|
5
|
+
import type { SliceNames } from './SliceNames';
|
|
6
|
+
import { type SliceAreaItem } from './sliceAreaState';
|
|
7
|
+
export interface SlicesAreaHandle<T extends SliceAreaItem> {
|
|
8
|
+
addSlice: (sliceType: SliceType, afterSliceId?: Guid, names?: SliceNames) => void;
|
|
9
|
+
updateSlices: (update: (previous: T[]) => T[]) => void;
|
|
10
|
+
addProjectedSlice: (slice: T, afterSliceId?: Guid) => void;
|
|
11
|
+
moveIn: (slice: T, index: number) => void;
|
|
12
|
+
completeMoveIn: (id: Guid, succeeded: boolean) => void;
|
|
13
|
+
moveOut: (id: Guid) => boolean;
|
|
14
|
+
completeMoveOut: (id: Guid, succeeded: boolean) => void;
|
|
15
|
+
}
|
|
16
|
+
export interface SlicesAreaProps<T extends SliceAreaItem> {
|
|
17
|
+
initialSlices: T[];
|
|
18
|
+
ref?: Ref<SlicesAreaHandle<T>>;
|
|
19
|
+
moduleId: Guid;
|
|
20
|
+
featureId: Guid;
|
|
21
|
+
featureCollapsed: boolean;
|
|
22
|
+
hideEmptyPlaceholder?: boolean;
|
|
23
|
+
onSlicesChanged?: (slices: T[]) => void;
|
|
24
|
+
createSlice: (slice: Slice) => T;
|
|
25
|
+
onAddSlice?: (slice: T, afterSliceId?: Guid) => Promise<Guid | undefined>;
|
|
26
|
+
onReorderSlices?: (sliceIds: Guid[]) => Promise<boolean>;
|
|
27
|
+
onMoveSlice?: (slice: T, targetFeatureId: Guid, targetIndex: number) => Promise<boolean>;
|
|
28
|
+
validateSliceDrop?: ValidateSliceDrop;
|
|
29
|
+
renderSlice: (slice: T, options: {
|
|
30
|
+
collapsed: boolean;
|
|
31
|
+
sliceCollapsed: boolean;
|
|
32
|
+
isDragging: boolean;
|
|
33
|
+
onSliceDragStart: ReturnType<typeof useSliceDrag>['handleSliceDragStart'];
|
|
34
|
+
addSlice: SlicesAreaHandle<T>['addSlice'];
|
|
35
|
+
updateSlices: SlicesAreaHandle<T>['updateSlices'];
|
|
36
|
+
}) => ReactNode;
|
|
37
|
+
}
|
|
38
|
+
export declare function SlicesArea<T extends SliceAreaItem>({ ref, initialSlices, moduleId, featureId, featureCollapsed, hideEmptyPlaceholder, onSlicesChanged, createSlice, onAddSlice, onReorderSlices, onMoveSlice, validateSliceDrop, renderSlice, }: SlicesAreaProps<T>): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './resolveSliceReadOnly';
|
|
2
|
+
export * from './SliceContextValue';
|
|
3
|
+
export * from './SliceProvider';
|
|
4
|
+
export * from './useSlice';
|
|
5
|
+
export * from './SliceHeader';
|
|
6
|
+
export * from './SliceHeaderAction';
|
|
7
|
+
export * from './SliceHeaderSlice';
|
|
8
|
+
export * from './SliceColumn';
|
|
9
|
+
export * from './SlicesArea';
|
|
10
|
+
export * from './SliceNames';
|
|
11
|
+
export * from './createOptimisticSlice';
|
|
12
|
+
export * from './sliceAreaState';
|
|
13
|
+
export * from './SliceColumnFrame';
|
|
14
|
+
export * from './SliceRows';
|
|
15
|
+
export * from './SlicePlaceholder';
|