@cratis/components 4.19.1 → 4.20.0
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 +2 -2
- package/compat-manifest.json +11 -11
- package/dist/esm/Canvas/Canvas.d.ts +1 -0
- package/dist/esm/Canvas/Canvas.d.ts.map +1 -0
- package/dist/esm/Canvas/Canvas.js.map +1 -1
- package/dist/esm/Canvas/CanvasControls.d.ts +1 -0
- package/dist/esm/Canvas/CanvasControls.d.ts.map +1 -0
- package/dist/esm/Canvas/CanvasControls.js.map +1 -1
- package/dist/esm/Canvas/CanvasItem.js.map +1 -1
- package/dist/esm/Canvas/CanvasMinimap.js.map +1 -1
- package/dist/esm/Canvas/CanvasOverlay.js.map +1 -1
- package/dist/esm/Canvas/canvasGesture.js.map +1 -1
- package/dist/esm/Canvas/canvasTransformActivity.js.map +1 -1
- package/dist/esm/Canvas/index.d.ts +1 -0
- package/dist/esm/Canvas/index.d.ts.map +1 -0
- package/dist/esm/Canvas/isBackgroundPointerTarget.js.map +1 -1
- package/dist/esm/Canvas/isWithinScrollableContent.js.map +1 -1
- package/dist/esm/Canvas/panMomentum.js.map +1 -1
- package/dist/esm/Canvas/pinchGesture.js.map +1 -1
- package/dist/esm/Canvas/selfSuspendingFrameLoop.js.map +1 -1
- package/dist/esm/Canvas/shapes/ChatBubble/index.d.ts +1 -0
- package/dist/esm/Canvas/shapes/ChatBubble/index.d.ts.map +1 -0
- package/dist/esm/Canvas/shapes/ChatBubble/index.js +1 -0
- package/dist/esm/Canvas/shapes/ChatBubble/index.js.map +1 -0
- package/dist/esm/Canvas/shapes/Note/Note.js.map +1 -1
- package/dist/esm/Canvas/shapes/Note/NoteTextChanged.js.map +1 -1
- package/dist/esm/Canvas/shapes/Note/index.d.ts +1 -0
- package/dist/esm/Canvas/shapes/Note/index.d.ts.map +1 -0
- package/dist/esm/Canvas/shapes/Note/index.js +1 -0
- package/dist/esm/Canvas/shapes/Note/index.js.map +1 -0
- package/dist/esm/Canvas/shapes/Note/noteFont.js.map +1 -1
- package/dist/esm/Canvas/shapes/Region/ItemAddedToRegion.js.map +1 -1
- package/dist/esm/Canvas/shapes/Region/ItemRemovedFromRegion.js.map +1 -1
- package/dist/esm/Canvas/shapes/Region/Region.js.map +1 -1
- package/dist/esm/Canvas/shapes/Region/index.d.ts +1 -0
- package/dist/esm/Canvas/shapes/Region/index.d.ts.map +1 -0
- package/dist/esm/Canvas/shapes/Region/index.js +1 -0
- package/dist/esm/Canvas/shapes/Region/index.js.map +1 -0
- package/dist/esm/Canvas/shapes/Region/regionContainment.js.map +1 -1
- package/dist/esm/Canvas/useDragSelectionGuard.js.map +1 -1
- package/dist/esm/Canvas/zoomMechanism.js.map +1 -1
- package/dist/esm/Chat/ChatAuthor.d.ts +1 -0
- package/dist/esm/Chat/ChatAuthor.d.ts.map +1 -0
- package/dist/esm/Chat/ChatAuthor.js.map +1 -1
- package/dist/esm/Chat/ChatConversation.d.ts +1 -0
- package/dist/esm/Chat/ChatConversation.d.ts.map +1 -0
- package/dist/esm/Chat/ChatConversation.js.map +1 -1
- package/dist/esm/Chat/ChatIdentifier.js.map +1 -1
- package/dist/esm/Chat/ChatMention.d.ts +1 -0
- package/dist/esm/Chat/ChatMention.d.ts.map +1 -0
- package/dist/esm/Chat/ChatMention.js.map +1 -1
- package/dist/esm/Chat/ChatMessage.d.ts +1 -0
- package/dist/esm/Chat/ChatMessage.d.ts.map +1 -0
- package/dist/esm/Chat/ChatMessage.js.map +1 -1
- package/dist/esm/Chat/ChatMessageAction.d.ts +1 -0
- package/dist/esm/Chat/ChatMessageAction.d.ts.map +1 -0
- package/dist/esm/Chat/ChatMessageAction.js.map +1 -1
- package/dist/esm/Chat/ChatMessageBody.d.ts +1 -0
- package/dist/esm/Chat/ChatMessageBody.d.ts.map +1 -0
- package/dist/esm/Chat/ChatMessageBody.js.map +1 -1
- package/dist/esm/Chat/ChatSidebar.d.ts +5 -1
- package/dist/esm/Chat/ChatSidebar.d.ts.map +1 -0
- package/dist/esm/Chat/ChatSidebar.js +2 -2
- package/dist/esm/Chat/ChatSidebar.js.map +1 -1
- package/dist/esm/Chat/ChatSidebarForObservableQueries.d.ts +1 -0
- package/dist/esm/Chat/ChatSidebarForObservableQueries.d.ts.map +1 -0
- package/dist/esm/Chat/ChatSidebarForObservableQueries.js.map +1 -1
- package/dist/esm/Chat/ChatStatus.js.map +1 -1
- package/dist/esm/Chat/ChatTopic.d.ts +1 -0
- package/dist/esm/Chat/ChatTopic.d.ts.map +1 -0
- package/dist/esm/Chat/ChatTopic.js.map +1 -1
- package/dist/esm/Chat/ChatTopicAction.d.ts +23 -0
- package/dist/esm/Chat/ChatTopicAction.d.ts.map +1 -0
- package/dist/esm/Chat/ChatTopicAction.js +4 -0
- package/dist/esm/Chat/ChatTopicAction.js.map +1 -0
- package/dist/esm/Chat/ChatTopicActions.d.ts +25 -0
- package/dist/esm/Chat/ChatTopicActions.d.ts.map +1 -0
- package/dist/esm/Chat/ChatTopicActions.js +6 -0
- package/dist/esm/Chat/ChatTopicActions.js.map +1 -0
- package/dist/esm/Chat/ChatTopicList.d.ts +6 -2
- package/dist/esm/Chat/ChatTopicList.d.ts.map +1 -0
- package/dist/esm/Chat/ChatTopicList.js +17 -9
- package/dist/esm/Chat/ChatTopicList.js.map +1 -1
- package/dist/esm/Chat/Kit/AnchoredOverlay.js.map +1 -1
- package/dist/esm/Chat/Kit/Avatar/PersonAvatarCircle.js.map +1 -1
- package/dist/esm/Chat/Kit/Avatar/getAvatarColor.js.map +1 -1
- package/dist/esm/Chat/Kit/Avatar/getInitials.js.map +1 -1
- package/dist/esm/Chat/Kit/Avatar/index.d.ts +1 -0
- package/dist/esm/Chat/Kit/Avatar/index.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/Avatar/index.js +1 -0
- package/dist/esm/Chat/Kit/Avatar/index.js.map +1 -0
- package/dist/esm/Chat/Kit/Chat.d.ts +1 -0
- package/dist/esm/Chat/Kit/Chat.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/Chat.js.map +1 -1
- package/dist/esm/Chat/Kit/ChatAuthorKind.js.map +1 -1
- package/dist/esm/Chat/Kit/ChatBubble.d.ts +1 -0
- package/dist/esm/Chat/Kit/ChatBubble.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/ChatBubble.js.map +1 -1
- package/dist/esm/Chat/Kit/ChatComposer.d.ts +1 -0
- package/dist/esm/Chat/Kit/ChatComposer.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/ChatComposer.js.map +1 -1
- package/dist/esm/Chat/Kit/ChatMessage.d.ts +1 -0
- package/dist/esm/Chat/Kit/ChatMessage.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/ChatMessage.js.map +1 -1
- package/dist/esm/Chat/Kit/ChatMessageAdded.js.map +1 -1
- package/dist/esm/Chat/Kit/ChatMessageBubble.d.ts +1 -0
- package/dist/esm/Chat/Kit/ChatMessageBubble.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/ChatMessageBubble.js.map +1 -1
- package/dist/esm/Chat/Kit/ChatMessageReaction.d.ts +1 -0
- package/dist/esm/Chat/Kit/ChatMessageReaction.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/ChatMessageReaction.js.map +1 -1
- package/dist/esm/Chat/Kit/ChatMessageReactionUser.js.map +1 -1
- package/dist/esm/Chat/Kit/ChatOwnReaction.js.map +1 -1
- package/dist/esm/Chat/Kit/ChatTypingAuthor.d.ts +1 -0
- package/dist/esm/Chat/Kit/ChatTypingAuthor.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/ChatTypingAuthor.js.map +1 -1
- package/dist/esm/Chat/Kit/ChatVariant.js.map +1 -1
- package/dist/esm/Chat/Kit/Emoji/EmojiCategory.d.ts +1 -0
- package/dist/esm/Chat/Kit/Emoji/EmojiCategory.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/Emoji/EmojiCategory.js.map +1 -1
- package/dist/esm/Chat/Kit/Emoji/EmojiCategoryKey.js.map +1 -1
- package/dist/esm/Chat/Kit/Emoji/EmojiMemory.js.map +1 -1
- package/dist/esm/Chat/Kit/Emoji/EmojiPicker.d.ts +1 -0
- package/dist/esm/Chat/Kit/Emoji/EmojiPicker.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/Emoji/EmojiPicker.js.map +1 -1
- package/dist/esm/Chat/Kit/Emoji/emojiCatalog.d.ts +1 -0
- package/dist/esm/Chat/Kit/Emoji/emojiCatalog.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/Emoji/emojiCatalog.js.map +1 -1
- package/dist/esm/Chat/Kit/Emoji/index.d.ts +1 -0
- package/dist/esm/Chat/Kit/Emoji/index.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/Emoji/index.js +1 -0
- package/dist/esm/Chat/Kit/Emoji/index.js.map +1 -0
- package/dist/esm/Chat/Kit/Emoji/recentEmojis.d.ts +1 -0
- package/dist/esm/Chat/Kit/Emoji/recentEmojis.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/Emoji/recentEmojis.js.map +1 -1
- package/dist/esm/Chat/Kit/FailedReply.d.ts +1 -0
- package/dist/esm/Chat/Kit/FailedReply.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/FailedReply.js.map +1 -1
- package/dist/esm/Chat/Kit/Mentions/MentionCandidate.d.ts +1 -0
- package/dist/esm/Chat/Kit/Mentions/MentionCandidate.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/Mentions/MentionCandidate.js.map +1 -1
- package/dist/esm/Chat/Kit/Mentions/MentionQuery.js.map +1 -1
- package/dist/esm/Chat/Kit/Mentions/MentionSuggestions.d.ts +1 -0
- package/dist/esm/Chat/Kit/Mentions/MentionSuggestions.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/Mentions/MentionSuggestions.js.map +1 -1
- package/dist/esm/Chat/Kit/Mentions/activeMentionQuery.d.ts +1 -0
- package/dist/esm/Chat/Kit/Mentions/activeMentionQuery.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/Mentions/activeMentionQuery.js.map +1 -1
- package/dist/esm/Chat/Kit/Mentions/applyMention.d.ts +1 -0
- package/dist/esm/Chat/Kit/Mentions/applyMention.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/Mentions/applyMention.js.map +1 -1
- package/dist/esm/Chat/Kit/Mentions/extractMentions.js.map +1 -1
- package/dist/esm/Chat/Kit/Mentions/findMentionRanges.js.map +1 -1
- package/dist/esm/Chat/Kit/Mentions/index.d.ts +1 -0
- package/dist/esm/Chat/Kit/Mentions/index.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/Mentions/index.js +1 -0
- package/dist/esm/Chat/Kit/Mentions/index.js.map +1 -0
- package/dist/esm/Chat/Kit/Mentions/matchCandidates.d.ts +1 -0
- package/dist/esm/Chat/Kit/Mentions/matchCandidates.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/Mentions/matchCandidates.js.map +1 -1
- package/dist/esm/Chat/Kit/Mentions/mentionSegments.js.map +1 -1
- package/dist/esm/Chat/Kit/MessageReactions.d.ts +1 -0
- package/dist/esm/Chat/Kit/MessageReactions.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/MessageReactions.js.map +1 -1
- package/dist/esm/Chat/Kit/ReactionPicker.d.ts +1 -0
- package/dist/esm/Chat/Kit/ReactionPicker.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/ReactionPicker.js.map +1 -1
- package/dist/esm/Chat/Kit/TypingIndicator.d.ts +1 -0
- package/dist/esm/Chat/Kit/TypingIndicator.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/TypingIndicator.js.map +1 -1
- package/dist/esm/Chat/Kit/findOwnReaction.d.ts +1 -0
- package/dist/esm/Chat/Kit/findOwnReaction.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/findOwnReaction.js.map +1 -1
- package/dist/esm/Chat/Kit/index.d.ts +1 -0
- package/dist/esm/Chat/Kit/index.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/index.js +1 -0
- package/dist/esm/Chat/Kit/index.js.map +1 -0
- package/dist/esm/Chat/Kit/reactionsExcludingUser.d.ts +1 -0
- package/dist/esm/Chat/Kit/reactionsExcludingUser.d.ts.map +1 -0
- package/dist/esm/Chat/Kit/reactionsExcludingUser.js.map +1 -1
- package/dist/esm/Chat/index.d.ts +2 -0
- package/dist/esm/Chat/index.d.ts.map +1 -0
- package/dist/esm/Chat/isTopicUnnamed.d.ts +1 -0
- package/dist/esm/Chat/isTopicUnnamed.d.ts.map +1 -0
- package/dist/esm/Chat/isTopicUnnamed.js.map +1 -1
- package/dist/esm/Chat/relativeTimestamp.js.map +1 -1
- package/dist/esm/Chat/shouldRequestTopicName.js.map +1 -1
- package/dist/esm/Chat/topicsByActivity.d.ts +1 -0
- package/dist/esm/Chat/topicsByActivity.d.ts.map +1 -0
- package/dist/esm/Chat/topicsByActivity.js.map +1 -1
- package/dist/esm/Chat/useTopicActionFocusRecovery.d.ts +19 -0
- package/dist/esm/Chat/useTopicActionFocusRecovery.d.ts.map +1 -0
- package/dist/esm/Chat/useTopicActionFocusRecovery.js +41 -0
- package/dist/esm/Chat/useTopicActionFocusRecovery.js.map +1 -0
- package/dist/esm/CommandDialog/CommandDialog.d.ts +1 -0
- package/dist/esm/CommandDialog/CommandDialog.d.ts.map +1 -0
- package/dist/esm/CommandDialog/CommandDialog.js.map +1 -1
- package/dist/esm/CommandDialog/CommandStepper.d.ts +1 -0
- package/dist/esm/CommandDialog/CommandStepper.d.ts.map +1 -0
- package/dist/esm/CommandDialog/CommandStepper.js.map +1 -1
- package/dist/esm/CommandDialog/CommandStepperContent.d.ts +1 -0
- package/dist/esm/CommandDialog/CommandStepperContent.d.ts.map +1 -0
- package/dist/esm/CommandDialog/CommandStepperContent.js.map +1 -1
- package/dist/esm/CommandDialog/StepperCommandDialog.d.ts +1 -0
- package/dist/esm/CommandDialog/StepperCommandDialog.d.ts.map +1 -0
- package/dist/esm/CommandDialog/StepperCommandDialog.js.map +1 -1
- package/dist/esm/CommandDialog/StepperPanel.js.map +1 -1
- package/dist/esm/CommandDialog/applyBeforeExecute.js.map +1 -1
- package/dist/esm/CommandDialog/commandValuesUnchanged.js.map +1 -1
- package/dist/esm/CommandDialog/confirmBeforeExecute.js.map +1 -1
- package/dist/esm/CommandDialog/index.d.ts +1 -0
- package/dist/esm/CommandDialog/index.d.ts.map +1 -0
- package/dist/esm/CommandDialog/stepChildren.js.map +1 -1
- package/dist/esm/CommandDialog/transitionStep.d.ts +1 -0
- package/dist/esm/CommandDialog/transitionStep.d.ts.map +1 -0
- package/dist/esm/CommandDialog/transitionStep.js.map +1 -1
- package/dist/esm/CommandDialog/useCommandExecution.d.ts +1 -0
- package/dist/esm/CommandDialog/useCommandExecution.d.ts.map +1 -0
- package/dist/esm/CommandDialog/useCommandExecution.js.map +1 -1
- package/dist/esm/CommandDialog/useSubmissionFlight.js.map +1 -1
- package/dist/esm/CommandForm/AutoCommandForm.js.map +1 -1
- package/dist/esm/CommandForm/FieldTypeProvider.js.map +1 -1
- package/dist/esm/CommandForm/commandFormMarkers.js.map +1 -1
- package/dist/esm/CommandForm/defaultFieldTypeProviders.js.map +1 -1
- package/dist/esm/CommandForm/fieldTypeProviderRegistry.d.ts +1 -0
- package/dist/esm/CommandForm/fieldTypeProviderRegistry.d.ts.map +1 -0
- package/dist/esm/CommandForm/fieldTypeProviderRegistry.js.map +1 -1
- package/dist/esm/CommandForm/fields/CalendarField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/CalendarField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/CalendarField.js.map +1 -1
- package/dist/esm/CommandForm/fields/CheckboxField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/CheckboxField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/CheckboxField.js.map +1 -1
- package/dist/esm/CommandForm/fields/ChipsField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/ChipsField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/ChipsField.js.map +1 -1
- package/dist/esm/CommandForm/fields/ColorPickerField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/ColorPickerField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/ColorPickerField.js.map +1 -1
- package/dist/esm/CommandForm/fields/DropdownField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/DropdownField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/DropdownField.js.map +1 -1
- package/dist/esm/CommandForm/fields/InputTextField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/InputTextField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/InputTextField.js.map +1 -1
- package/dist/esm/CommandForm/fields/MultiSelectField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/MultiSelectField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/MultiSelectField.js.map +1 -1
- package/dist/esm/CommandForm/fields/NumberField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/NumberField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/NumberField.js.map +1 -1
- package/dist/esm/CommandForm/fields/NumberInputField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/NumberInputField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/NumberInputField.js.map +1 -1
- package/dist/esm/CommandForm/fields/PasswordField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/PasswordField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/PasswordField.js.map +1 -1
- package/dist/esm/CommandForm/fields/RadioButtonField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/RadioButtonField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/RadioButtonField.js.map +1 -1
- package/dist/esm/CommandForm/fields/RadioGroupField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/RadioGroupField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/RadioGroupField.js.map +1 -1
- package/dist/esm/CommandForm/fields/RatingField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/RatingField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/RatingField.js.map +1 -1
- package/dist/esm/CommandForm/fields/SliderField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/SliderField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/SliderField.js.map +1 -1
- package/dist/esm/CommandForm/fields/TextAreaField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/TextAreaField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/TextAreaField.js.map +1 -1
- package/dist/esm/CommandForm/fields/ToggleSwitchField.d.ts +1 -0
- package/dist/esm/CommandForm/fields/ToggleSwitchField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/ToggleSwitchField.js.map +1 -1
- package/dist/esm/CommandForm/fields/chipValues.js.map +1 -1
- package/dist/esm/CommandForm/fields/fieldAccessibility.js.map +1 -1
- package/dist/esm/CommandForm/fields/fieldValueFromEvent.js.map +1 -1
- package/dist/esm/CommandForm/fields/index.d.ts +1 -0
- package/dist/esm/CommandForm/fields/index.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/index.js +1 -0
- package/dist/esm/CommandForm/fields/index.js.map +1 -0
- package/dist/esm/CommandForm/index.d.ts +1 -0
- package/dist/esm/CommandForm/index.d.ts.map +1 -0
- package/dist/esm/Common/ActionMenubar.d.ts +1 -0
- package/dist/esm/Common/ActionMenubar.d.ts.map +1 -0
- package/dist/esm/Common/ActionMenubar.js.map +1 -1
- package/dist/esm/Common/Breadcrumbs.js.map +1 -1
- package/dist/esm/Common/Button.d.ts +1 -0
- package/dist/esm/Common/Button.d.ts.map +1 -0
- package/dist/esm/Common/Button.js.map +1 -1
- package/dist/esm/Common/ButtonImplementation.d.ts +1 -0
- package/dist/esm/Common/ButtonImplementation.d.ts.map +1 -0
- package/dist/esm/Common/ButtonImplementation.js.map +1 -1
- package/dist/esm/Common/Checkbox.d.ts +1 -0
- package/dist/esm/Common/Checkbox.d.ts.map +1 -0
- package/dist/esm/Common/Checkbox.js.map +1 -1
- package/dist/esm/Common/CheckboxImplementation.d.ts +1 -0
- package/dist/esm/Common/CheckboxImplementation.d.ts.map +1 -0
- package/dist/esm/Common/CheckboxImplementation.js.map +1 -1
- package/dist/esm/Common/ComboBox.js.map +1 -1
- package/dist/esm/Common/CratisComponentsProvider.d.ts +1 -0
- package/dist/esm/Common/CratisComponentsProvider.d.ts.map +1 -0
- package/dist/esm/Common/CratisComponentsProvider.js.map +1 -1
- package/dist/esm/Common/DatePickerInput.d.ts +1 -0
- package/dist/esm/Common/DatePickerInput.d.ts.map +1 -0
- package/dist/esm/Common/DatePickerInput.js.map +1 -1
- package/dist/esm/Common/DatePickerInputImplementation.d.ts +1 -0
- package/dist/esm/Common/DatePickerInputImplementation.d.ts.map +1 -0
- package/dist/esm/Common/DatePickerInputImplementation.js.map +1 -1
- package/dist/esm/Common/ErrorBoundary.js.map +1 -1
- package/dist/esm/Common/FormElement.js.map +1 -1
- package/dist/esm/Common/Icon.js.map +1 -1
- package/dist/esm/Common/IconButton.d.ts +1 -0
- package/dist/esm/Common/IconButton.d.ts.map +1 -0
- package/dist/esm/Common/IconButton.js.map +1 -1
- package/dist/esm/Common/IconButtonImplementation.d.ts +1 -0
- package/dist/esm/Common/IconButtonImplementation.d.ts.map +1 -0
- package/dist/esm/Common/IconButtonImplementation.js.map +1 -1
- package/dist/esm/Common/NumberInput.d.ts +1 -0
- package/dist/esm/Common/NumberInput.d.ts.map +1 -0
- package/dist/esm/Common/NumberInput.js.map +1 -1
- package/dist/esm/Common/NumberInputCommitReason.js.map +1 -1
- package/dist/esm/Common/NumberInputPartAttributes.js.map +1 -1
- package/dist/esm/Common/Page.js.map +1 -1
- package/dist/esm/Common/Radio.d.ts +1 -0
- package/dist/esm/Common/Radio.d.ts.map +1 -0
- package/dist/esm/Common/Radio.js.map +1 -1
- package/dist/esm/Common/RadioImplementation.d.ts +1 -0
- package/dist/esm/Common/RadioImplementation.d.ts.map +1 -0
- package/dist/esm/Common/RadioImplementation.js.map +1 -1
- package/dist/esm/Common/Surface.js.map +1 -1
- package/dist/esm/Common/SurfaceImplementation.d.ts +1 -0
- package/dist/esm/Common/SurfaceImplementation.d.ts.map +1 -0
- package/dist/esm/Common/SurfaceImplementation.js.map +1 -1
- package/dist/esm/Common/Switch.d.ts +1 -0
- package/dist/esm/Common/Switch.d.ts.map +1 -0
- package/dist/esm/Common/Switch.js.map +1 -1
- package/dist/esm/Common/SwitchImplementation.d.ts +1 -0
- package/dist/esm/Common/SwitchImplementation.d.ts.map +1 -0
- package/dist/esm/Common/SwitchImplementation.js.map +1 -1
- package/dist/esm/Common/Tabs.js.map +1 -1
- package/dist/esm/Common/TagGroup.js.map +1 -1
- package/dist/esm/Common/TextArea.d.ts +1 -0
- package/dist/esm/Common/TextArea.d.ts.map +1 -0
- package/dist/esm/Common/TextArea.js.map +1 -1
- package/dist/esm/Common/TextAreaImplementation.d.ts +1 -0
- package/dist/esm/Common/TextAreaImplementation.d.ts.map +1 -0
- package/dist/esm/Common/TextAreaImplementation.js.map +1 -1
- package/dist/esm/Common/TextInput.d.ts +1 -0
- package/dist/esm/Common/TextInput.d.ts.map +1 -0
- package/dist/esm/Common/TextInput.js.map +1 -1
- package/dist/esm/Common/TextInputImplementation.d.ts +1 -0
- package/dist/esm/Common/TextInputImplementation.d.ts.map +1 -0
- package/dist/esm/Common/TextInputImplementation.js.map +1 -1
- package/dist/esm/Common/ToggleGroup.js.map +1 -1
- package/dist/esm/Common/ToolbarFocusMode.js.map +1 -1
- package/dist/esm/Common/Tooltip.js.map +1 -1
- package/dist/esm/Common/TooltipImplementation.d.ts +1 -0
- package/dist/esm/Common/TooltipImplementation.d.ts.map +1 -0
- package/dist/esm/Common/TooltipImplementation.js.map +1 -1
- package/dist/esm/Common/index.d.ts +1 -0
- package/dist/esm/Common/index.d.ts.map +1 -0
- package/dist/esm/Common/messaging/useOptionalMessenger.js.map +1 -1
- package/dist/esm/Common/normalizeIconClass.js.map +1 -1
- package/dist/esm/Common/reactAriaProps.js.map +1 -1
- package/dist/esm/Common/useNativeCheckedState.js.map +1 -1
- package/dist/esm/Common/useToolbarKeyboardNavigation.d.ts +1 -0
- package/dist/esm/Common/useToolbarKeyboardNavigation.d.ts.map +1 -0
- package/dist/esm/Common/useToolbarKeyboardNavigation.js.map +1 -1
- package/dist/esm/DataPage/DataPage.d.ts +1 -0
- package/dist/esm/DataPage/DataPage.d.ts.map +1 -0
- package/dist/esm/DataPage/DataPage.js.map +1 -1
- package/dist/esm/DataPage/DataPageLayout.js.map +1 -1
- package/dist/esm/DataPage/index.d.ts +1 -0
- package/dist/esm/DataPage/index.d.ts.map +1 -0
- package/dist/esm/DataTables/Column.d.ts +1 -0
- package/dist/esm/DataTables/Column.d.ts.map +1 -0
- package/dist/esm/DataTables/Column.js.map +1 -1
- package/dist/esm/DataTables/ColumnFilterMenu.d.ts +1 -0
- package/dist/esm/DataTables/ColumnFilterMenu.d.ts.map +1 -0
- package/dist/esm/DataTables/ColumnFilterMenu.js.map +1 -1
- package/dist/esm/DataTables/DataTableCore.d.ts +1 -0
- package/dist/esm/DataTables/DataTableCore.d.ts.map +1 -0
- package/dist/esm/DataTables/DataTableCore.js.map +1 -1
- package/dist/esm/DataTables/DataTableFilterMatcherRegistry.d.ts +1 -0
- package/dist/esm/DataTables/DataTableFilterMatcherRegistry.d.ts.map +1 -0
- package/dist/esm/DataTables/DataTableFilterMatcherRegistry.js.map +1 -1
- package/dist/esm/DataTables/DataTableFilterMeta.js.map +1 -1
- package/dist/esm/DataTables/DataTableForObservableQuery.d.ts +1 -0
- package/dist/esm/DataTables/DataTableForObservableQuery.d.ts.map +1 -0
- package/dist/esm/DataTables/DataTableForObservableQuery.js.map +1 -1
- package/dist/esm/DataTables/DataTableForQuery.d.ts +1 -0
- package/dist/esm/DataTables/DataTableForQuery.d.ts.map +1 -0
- package/dist/esm/DataTables/DataTableForQuery.js.map +1 -1
- package/dist/esm/DataTables/DataTableSelectionChangeEvent.js.map +1 -1
- package/dist/esm/DataTables/DataTableStatus.js.map +1 -1
- package/dist/esm/DataTables/TablePaginator.d.ts +1 -0
- package/dist/esm/DataTables/TablePaginator.d.ts.map +1 -0
- package/dist/esm/DataTables/TablePaginator.js.map +1 -1
- package/dist/esm/DataTables/TablePaginatorImplementation.d.ts +1 -0
- package/dist/esm/DataTables/TablePaginatorImplementation.d.ts.map +1 -0
- package/dist/esm/DataTables/TablePaginatorImplementation.js.map +1 -1
- package/dist/esm/DataTables/index.d.ts +1 -0
- package/dist/esm/DataTables/index.d.ts.map +1 -0
- package/dist/esm/DataTables/paginatorRange.js.map +1 -1
- package/dist/esm/DataTables/resolveDataTableStatus.d.ts +1 -0
- package/dist/esm/DataTables/resolveDataTableStatus.d.ts.map +1 -0
- package/dist/esm/DataTables/resolveDataTableStatus.js.map +1 -1
- package/dist/esm/DataTables/selectionKeys.js.map +1 -1
- package/dist/esm/Dialogs/BusyIndicatorDialog.js.map +1 -1
- package/dist/esm/Dialogs/ConfirmationDialog.js.map +1 -1
- package/dist/esm/Dialogs/Dialog.d.ts +1 -0
- package/dist/esm/Dialogs/Dialog.d.ts.map +1 -0
- package/dist/esm/Dialogs/Dialog.js.map +1 -1
- package/dist/esm/Dialogs/DialogImplementation.d.ts +1 -0
- package/dist/esm/Dialogs/DialogImplementation.d.ts.map +1 -0
- package/dist/esm/Dialogs/DialogImplementation.js.map +1 -1
- package/dist/esm/Dialogs/DialogInitialFocus.js.map +1 -1
- package/dist/esm/Dialogs/index.d.ts +1 -0
- package/dist/esm/Dialogs/index.d.ts.map +1 -0
- package/dist/esm/Display/Avatar.js.map +1 -1
- package/dist/esm/Display/Badge.js.map +1 -1
- package/dist/esm/Display/Chip.js.map +1 -1
- package/dist/esm/Display/Message.js.map +1 -1
- package/dist/esm/Display/ProgressBar.js.map +1 -1
- package/dist/esm/Display/ProgressBarImplementation.d.ts +1 -0
- package/dist/esm/Display/ProgressBarImplementation.d.ts.map +1 -0
- package/dist/esm/Display/ProgressBarImplementation.js.map +1 -1
- package/dist/esm/Display/ProgressSpinner.js.map +1 -1
- package/dist/esm/Display/Skeleton.js.map +1 -1
- package/dist/esm/Display/Tag.js.map +1 -1
- package/dist/esm/Display/index.d.ts +1 -0
- package/dist/esm/Display/index.d.ts.map +1 -0
- package/dist/esm/Dropdown/Dropdown.d.ts +1 -0
- package/dist/esm/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/esm/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/Dropdown/DropdownImplementation.d.ts +1 -0
- package/dist/esm/Dropdown/DropdownImplementation.d.ts.map +1 -0
- package/dist/esm/Dropdown/DropdownImplementation.js.map +1 -1
- package/dist/esm/Dropdown/index.d.ts +1 -0
- package/dist/esm/Dropdown/index.d.ts.map +1 -0
- package/dist/esm/Dropdown/observeLabelAssociations.js.map +1 -1
- package/dist/esm/Dropdown/useExternalLabel.js.map +1 -1
- package/dist/esm/Filter/CheckboxListFilter.d.ts +1 -0
- package/dist/esm/Filter/CheckboxListFilter.d.ts.map +1 -0
- package/dist/esm/Filter/CheckboxListFilter.js.map +1 -1
- package/dist/esm/Filter/FilterEditor.d.ts +1 -0
- package/dist/esm/Filter/FilterEditor.d.ts.map +1 -0
- package/dist/esm/Filter/FilterEditor.js.map +1 -1
- package/dist/esm/Filter/FilterEditorProps.d.ts +1 -0
- package/dist/esm/Filter/FilterEditorProps.d.ts.map +1 -0
- package/dist/esm/Filter/FilterEditorProps.js.map +1 -1
- package/dist/esm/Filter/FilterPanel.d.ts +1 -0
- package/dist/esm/Filter/FilterPanel.d.ts.map +1 -0
- package/dist/esm/Filter/FilterPanel.js.map +1 -1
- package/dist/esm/Filter/RangeHistogramFilter.d.ts +1 -0
- package/dist/esm/Filter/RangeHistogramFilter.d.ts.map +1 -0
- package/dist/esm/Filter/RangeHistogramFilter.js.map +1 -1
- package/dist/esm/Filter/index.d.ts +1 -0
- package/dist/esm/Filter/index.d.ts.map +1 -0
- package/dist/esm/Filter/types.js.map +1 -1
- package/dist/esm/Filter/useFilterState.d.ts +1 -0
- package/dist/esm/Filter/useFilterState.d.ts.map +1 -0
- package/dist/esm/Filter/useFilterState.js.map +1 -1
- package/dist/esm/Filter/useOptionListOverflow.js.map +1 -1
- package/dist/esm/Filter/utils.d.ts +1 -0
- package/dist/esm/Filter/utils.d.ts.map +1 -0
- package/dist/esm/Filter/utils.js.map +1 -1
- package/dist/esm/Notifications/Toaster.js.map +1 -1
- package/dist/esm/Notifications/index.d.ts +1 -0
- package/dist/esm/Notifications/index.d.ts.map +1 -0
- package/dist/esm/Notifications/toast.js.map +1 -1
- package/dist/esm/Notifications/toastCommandResult.js.map +1 -1
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.d.ts +1 -0
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.d.ts.map +1 -0
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.js.map +1 -1
- package/dist/esm/ObjectContentEditor/index.d.ts +1 -0
- package/dist/esm/ObjectContentEditor/index.d.ts.map +1 -0
- package/dist/esm/ObjectContentEditor/objectHelpers.d.ts +1 -0
- package/dist/esm/ObjectContentEditor/objectHelpers.d.ts.map +1 -0
- package/dist/esm/ObjectContentEditor/objectHelpers.js.map +1 -1
- package/dist/esm/ObjectNavigationalBar/ObjectNavigationalBar.js.map +1 -1
- package/dist/esm/ObjectNavigationalBar/breadcrumbHelpers.js.map +1 -1
- package/dist/esm/ObjectNavigationalBar/index.d.ts +1 -0
- package/dist/esm/ObjectNavigationalBar/index.d.ts.map +1 -0
- package/dist/esm/PivotViewer/PivotViewer.d.ts +1 -0
- package/dist/esm/PivotViewer/PivotViewer.d.ts.map +1 -0
- package/dist/esm/PivotViewer/PivotViewer.js.map +1 -1
- package/dist/esm/PivotViewer/PivotViewerLabels.js.map +1 -1
- package/dist/esm/PivotViewer/components/AxisLabels.d.ts +1 -0
- package/dist/esm/PivotViewer/components/AxisLabels.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/AxisLabels.js.map +1 -1
- package/dist/esm/PivotViewer/components/DetailPanel.js.map +1 -1
- package/dist/esm/PivotViewer/components/FilterPanel.d.ts +1 -0
- package/dist/esm/PivotViewer/components/FilterPanel.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/FilterPanel.js.map +1 -1
- package/dist/esm/PivotViewer/components/FilterPanelContainer.d.ts +1 -0
- package/dist/esm/PivotViewer/components/FilterPanelContainer.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/FilterPanelContainer.js.map +1 -1
- package/dist/esm/PivotViewer/components/PivotCanvas.d.ts +1 -0
- package/dist/esm/PivotViewer/components/PivotCanvas.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/PivotCanvas.js.map +1 -1
- package/dist/esm/PivotViewer/components/PivotViewerMain.d.ts +1 -0
- package/dist/esm/PivotViewer/components/PivotViewerMain.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/PivotViewerMain.js.map +1 -1
- package/dist/esm/PivotViewer/components/RangeHistogramFilter.d.ts +1 -0
- package/dist/esm/PivotViewer/components/RangeHistogramFilter.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/RangeHistogramFilter.js.map +1 -1
- package/dist/esm/PivotViewer/components/Spinner.js.map +1 -1
- package/dist/esm/PivotViewer/components/Toolbar.d.ts +1 -0
- package/dist/esm/PivotViewer/components/Toolbar.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/Toolbar.js.map +1 -1
- package/dist/esm/PivotViewer/components/ToolbarContainer.d.ts +1 -0
- package/dist/esm/PivotViewer/components/ToolbarContainer.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/ToolbarContainer.js.map +1 -1
- package/dist/esm/PivotViewer/components/index.d.ts +1 -0
- package/dist/esm/PivotViewer/components/index.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/index.js +1 -0
- package/dist/esm/PivotViewer/components/index.js.map +1 -0
- package/dist/esm/PivotViewer/components/pivot/animation.d.ts +1 -0
- package/dist/esm/PivotViewer/components/pivot/animation.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/pivot/animation.js.map +1 -1
- package/dist/esm/PivotViewer/components/pivot/colorResolver.d.ts +1 -0
- package/dist/esm/PivotViewer/components/pivot/colorResolver.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/pivot/colorResolver.js.map +1 -1
- package/dist/esm/PivotViewer/components/pivot/constants.js.map +1 -1
- package/dist/esm/PivotViewer/components/pivot/ellipsize.js.map +1 -1
- package/dist/esm/PivotViewer/components/pivot/groups.d.ts +1 -0
- package/dist/esm/PivotViewer/components/pivot/groups.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/pivot/groups.js.map +1 -1
- package/dist/esm/PivotViewer/components/pivot/sprites.d.ts +1 -0
- package/dist/esm/PivotViewer/components/pivot/sprites.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/pivot/sprites.js.map +1 -1
- package/dist/esm/PivotViewer/components/pivot/syncScrollSprites.d.ts +1 -0
- package/dist/esm/PivotViewer/components/pivot/syncScrollSprites.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/pivot/syncScrollSprites.js.map +1 -1
- package/dist/esm/PivotViewer/components/pivot/visibility.d.ts +1 -0
- package/dist/esm/PivotViewer/components/pivot/visibility.d.ts.map +1 -0
- package/dist/esm/PivotViewer/components/pivot/visibility.js.map +1 -1
- package/dist/esm/PivotViewer/constants.js.map +1 -1
- package/dist/esm/PivotViewer/engine/layout.d.ts +1 -0
- package/dist/esm/PivotViewer/engine/layout.d.ts.map +1 -0
- package/dist/esm/PivotViewer/engine/layout.js.map +1 -1
- package/dist/esm/PivotViewer/engine/pivot.worker.js +1 -0
- package/dist/esm/PivotViewer/engine/pivot.worker.js.map +1 -0
- package/dist/esm/PivotViewer/engine/requestCorrelator.js.map +1 -1
- package/dist/esm/PivotViewer/engine/store.d.ts +1 -0
- package/dist/esm/PivotViewer/engine/store.d.ts.map +1 -0
- package/dist/esm/PivotViewer/engine/store.js.map +1 -1
- package/dist/esm/PivotViewer/engine/types.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/index.d.ts +1 -0
- package/dist/esm/PivotViewer/hooks/index.d.ts.map +1 -0
- package/dist/esm/PivotViewer/hooks/index.js +1 -0
- package/dist/esm/PivotViewer/hooks/index.js.map +1 -0
- package/dist/esm/PivotViewer/hooks/useAnimationModeTracking.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useCardSelection.d.ts +1 -0
- package/dist/esm/PivotViewer/hooks/useCardSelection.d.ts.map +1 -0
- package/dist/esm/PivotViewer/hooks/useCardSelection.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useContainerDimensions.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useCurrentFilters.d.ts +1 -0
- package/dist/esm/PivotViewer/hooks/useCurrentFilters.d.ts.map +1 -0
- package/dist/esm/PivotViewer/hooks/useCurrentFilters.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useDetailPanelClose.d.ts +1 -0
- package/dist/esm/PivotViewer/hooks/useDetailPanelClose.d.ts.map +1 -0
- package/dist/esm/PivotViewer/hooks/useDetailPanelClose.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useDimensionState.d.ts +1 -0
- package/dist/esm/PivotViewer/hooks/useDimensionState.d.ts.map +1 -0
- package/dist/esm/PivotViewer/hooks/useDimensionState.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useFieldExtractors.d.ts +1 -0
- package/dist/esm/PivotViewer/hooks/useFieldExtractors.d.ts.map +1 -0
- package/dist/esm/PivotViewer/hooks/useFieldExtractors.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useFilterOptions.d.ts +1 -0
- package/dist/esm/PivotViewer/hooks/useFilterOptions.d.ts.map +1 -0
- package/dist/esm/PivotViewer/hooks/useFilterOptions.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useFilterPanelDrag.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useFilterState.d.ts +1 -0
- package/dist/esm/PivotViewer/hooks/useFilterState.d.ts.map +1 -0
- package/dist/esm/PivotViewer/hooks/useFilterState.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useFilteredData.d.ts +1 -0
- package/dist/esm/PivotViewer/hooks/useFilteredData.d.ts.map +1 -0
- package/dist/esm/PivotViewer/hooks/useFilteredData.js +1 -0
- package/dist/esm/PivotViewer/hooks/useFilteredData.js.map +1 -0
- package/dist/esm/PivotViewer/hooks/usePanning.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/usePivotEngine.d.ts +1 -0
- package/dist/esm/PivotViewer/hooks/usePivotEngine.d.ts.map +1 -0
- package/dist/esm/PivotViewer/hooks/usePivotEngine.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useScrollSync.d.ts +1 -0
- package/dist/esm/PivotViewer/hooks/useScrollSync.d.ts.map +1 -0
- package/dist/esm/PivotViewer/hooks/useScrollSync.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useSelectedItem.js +1 -0
- package/dist/esm/PivotViewer/hooks/useSelectedItem.js.map +1 -0
- package/dist/esm/PivotViewer/hooks/useViewModeScrollHandling.d.ts +1 -0
- package/dist/esm/PivotViewer/hooks/useViewModeScrollHandling.d.ts.map +1 -0
- package/dist/esm/PivotViewer/hooks/useViewModeScrollHandling.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useWheelZoom.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useZoomScrollAnchor.js.map +1 -1
- package/dist/esm/PivotViewer/hooks/useZoomState.js.map +1 -1
- package/dist/esm/PivotViewer/index.d.ts +1 -0
- package/dist/esm/PivotViewer/index.d.ts.map +1 -0
- package/dist/esm/PivotViewer/types.d.ts +1 -0
- package/dist/esm/PivotViewer/types.d.ts.map +1 -0
- package/dist/esm/PivotViewer/types.js.map +1 -1
- package/dist/esm/PivotViewer/utils/animations.js.map +1 -1
- package/dist/esm/PivotViewer/utils/cardPosition.d.ts +1 -0
- package/dist/esm/PivotViewer/utils/cardPosition.d.ts.map +1 -0
- package/dist/esm/PivotViewer/utils/cardPosition.js.map +1 -1
- package/dist/esm/PivotViewer/utils/constants.js.map +1 -1
- package/dist/esm/PivotViewer/utils/idResolution.d.ts +1 -0
- package/dist/esm/PivotViewer/utils/idResolution.d.ts.map +1 -0
- package/dist/esm/PivotViewer/utils/idResolution.js.map +1 -1
- package/dist/esm/PivotViewer/utils/index.d.ts +1 -0
- package/dist/esm/PivotViewer/utils/index.d.ts.map +1 -0
- package/dist/esm/PivotViewer/utils/index.js +1 -0
- package/dist/esm/PivotViewer/utils/index.js.map +1 -0
- package/dist/esm/PivotViewer/utils/presentGrouping.d.ts +1 -0
- package/dist/esm/PivotViewer/utils/presentGrouping.d.ts.map +1 -0
- package/dist/esm/PivotViewer/utils/presentGrouping.js.map +1 -1
- package/dist/esm/PivotViewer/utils/search.d.ts +1 -0
- package/dist/esm/PivotViewer/utils/search.d.ts.map +1 -0
- package/dist/esm/PivotViewer/utils/search.js.map +1 -1
- package/dist/esm/PivotViewer/utils/selection.d.ts +1 -0
- package/dist/esm/PivotViewer/utils/selection.d.ts.map +1 -0
- package/dist/esm/PivotViewer/utils/selection.js.map +1 -1
- package/dist/esm/PivotViewer/utils/utils.d.ts +1 -0
- package/dist/esm/PivotViewer/utils/utils.d.ts.map +1 -0
- package/dist/esm/PivotViewer/utils/utils.js.map +1 -1
- package/dist/esm/QueryStatus/QueryStatus.js.map +1 -1
- package/dist/esm/QueryStatus/resolveQueryStatus.d.ts +1 -0
- package/dist/esm/QueryStatus/resolveQueryStatus.d.ts.map +1 -0
- package/dist/esm/QueryStatus/resolveQueryStatus.js.map +1 -1
- package/dist/esm/SchemaEditor/NameCell.d.ts +1 -0
- package/dist/esm/SchemaEditor/NameCell.d.ts.map +1 -0
- package/dist/esm/SchemaEditor/NameCell.js.map +1 -1
- package/dist/esm/SchemaEditor/SchemaEditor.d.ts +1 -0
- package/dist/esm/SchemaEditor/SchemaEditor.d.ts.map +1 -0
- package/dist/esm/SchemaEditor/SchemaEditor.js.map +1 -1
- package/dist/esm/SchemaEditor/TypeCell.d.ts +1 -0
- package/dist/esm/SchemaEditor/TypeCell.d.ts.map +1 -0
- package/dist/esm/SchemaEditor/TypeCell.js.map +1 -1
- package/dist/esm/SchemaEditor/index.d.ts +1 -0
- package/dist/esm/SchemaEditor/index.d.ts.map +1 -0
- package/dist/esm/SchemaEditor/schemaHelpers.d.ts +1 -0
- package/dist/esm/SchemaEditor/schemaHelpers.d.ts.map +1 -0
- package/dist/esm/SchemaEditor/schemaHelpers.js.map +1 -1
- package/dist/esm/TimeMachine/EventsView.d.ts +1 -0
- package/dist/esm/TimeMachine/EventsView.d.ts.map +1 -0
- package/dist/esm/TimeMachine/EventsView.js.map +1 -1
- package/dist/esm/TimeMachine/Properties.js.map +1 -1
- package/dist/esm/TimeMachine/ReadModelView.d.ts +1 -0
- package/dist/esm/TimeMachine/ReadModelView.d.ts.map +1 -0
- package/dist/esm/TimeMachine/ReadModelView.js.map +1 -1
- package/dist/esm/TimeMachine/TimeMachine.d.ts +1 -0
- package/dist/esm/TimeMachine/TimeMachine.d.ts.map +1 -0
- package/dist/esm/TimeMachine/TimeMachine.js.map +1 -1
- package/dist/esm/TimeMachine/TimeMachineLabels.js.map +1 -1
- package/dist/esm/TimeMachine/index.d.ts +1 -0
- package/dist/esm/TimeMachine/index.d.ts.map +1 -0
- package/dist/esm/TimeMachine/propertiesHelpers.js.map +1 -1
- package/dist/esm/TimeMachine/types.js.map +1 -1
- package/dist/esm/Toolbar/Toolbar.d.ts +1 -0
- package/dist/esm/Toolbar/Toolbar.d.ts.map +1 -0
- package/dist/esm/Toolbar/Toolbar.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarButton.d.ts +1 -0
- package/dist/esm/Toolbar/ToolbarButton.d.ts.map +1 -0
- package/dist/esm/Toolbar/ToolbarButton.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarContext.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarDragContext.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarFanOutItem.d.ts +1 -0
- package/dist/esm/Toolbar/ToolbarFanOutItem.d.ts.map +1 -0
- package/dist/esm/Toolbar/ToolbarFanOutItem.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarFolder.d.ts +1 -0
- package/dist/esm/Toolbar/ToolbarFolder.d.ts.map +1 -0
- package/dist/esm/Toolbar/ToolbarFolder.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarFolderContext.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarGroup.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarItemVisibilityContext.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarLayout.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarSection.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarSeparator.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarSlot.js.map +1 -1
- package/dist/esm/Toolbar/index.d.ts +1 -0
- package/dist/esm/Toolbar/index.d.ts.map +1 -0
- package/dist/esm/configuration/CratisComponentsContext.d.ts +1 -0
- package/dist/esm/configuration/CratisComponentsContext.d.ts.map +1 -0
- package/dist/esm/configuration/CratisComponentsContext.js.map +1 -1
- package/dist/esm/configuration/CratisComponentsDefaults.d.ts +1 -0
- package/dist/esm/configuration/CratisComponentsDefaults.d.ts.map +1 -0
- package/dist/esm/configuration/CratisComponentsDefaults.js.map +1 -1
- package/dist/esm/configuration/useCratisIcon.d.ts +1 -0
- package/dist/esm/configuration/useCratisIcon.d.ts.map +1 -0
- package/dist/esm/configuration/useCratisIcon.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/renderer/DialogStackContext.js.map +1 -1
- package/dist/esm/renderer/RendererContext.d.ts +1 -0
- package/dist/esm/renderer/RendererContext.d.ts.map +1 -0
- package/dist/esm/renderer/RendererContext.js.map +1 -1
- package/dist/esm/renderer/RendererScope.d.ts +1 -0
- package/dist/esm/renderer/RendererScope.d.ts.map +1 -0
- package/dist/esm/renderer/RendererScope.js.map +1 -1
- package/dist/esm/renderer/builtin/index.js.map +1 -1
- package/dist/esm/renderer/capabilities.js.map +1 -1
- package/dist/esm/renderer/coreSlots.d.ts +1 -0
- package/dist/esm/renderer/coreSlots.d.ts.map +1 -0
- package/dist/esm/renderer/coreSlots.js.map +1 -1
- package/dist/esm/renderer/dialogStack.js.map +1 -1
- package/dist/esm/renderer/errors.d.ts +1 -0
- package/dist/esm/renderer/errors.d.ts.map +1 -0
- package/dist/esm/renderer/errors.js.map +1 -1
- package/dist/esm/renderer/index.d.ts +1 -0
- package/dist/esm/renderer/index.d.ts.map +1 -0
- package/dist/esm/renderer/manifest.d.ts +1 -0
- package/dist/esm/renderer/manifest.d.ts.map +1 -0
- package/dist/esm/renderer/manifest.js.map +1 -1
- package/dist/esm/renderer/overlayEnvironment.js.map +1 -1
- package/dist/esm/renderer/presentation.d.ts +1 -0
- package/dist/esm/renderer/presentation.d.ts.map +1 -0
- package/dist/esm/renderer/presentation.js.map +1 -1
- package/dist/esm/renderer/renderSlot.js.map +1 -1
- package/dist/esm/renderer/resolve.d.ts +1 -0
- package/dist/esm/renderer/resolve.d.ts.map +1 -0
- package/dist/esm/renderer/resolve.js.map +1 -1
- package/dist/esm/renderer/slots.js.map +1 -1
- package/dist/esm/styles.Canvas.css +17 -1
- package/dist/esm/styles.Chat.css +17 -1
- package/dist/esm/styles.css +17 -1
- package/dist/esm/types/ChangeHandler.d.ts +1 -0
- package/dist/esm/types/ChangeHandler.d.ts.map +1 -0
- package/dist/esm/types/ChangeHandler.js.map +1 -1
- package/dist/esm/types/ChangeMeta.js.map +1 -1
- package/dist/esm/types/ExactPartKeys.js.map +1 -1
- package/dist/esm/types/JsonSchema.js.map +1 -1
- package/dist/esm/types/TypeFormat.js.map +1 -1
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/index.d.ts.map +1 -0
- package/dist/esm/types/parts.js.map +1 -1
- package/package.json +7 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Chat/index.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAc,CAAC;AA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BAAgB,EAAE,MAAM,uBAAoB,CAAC;AAItD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAsB,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAAwB,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAc,CAAC;AACzD,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAoB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,yBAAgB,CAAC;AACrF,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isTopicUnnamed.d.ts","sourceRoot":"","sources":["../../../Chat/isTopicUnnamed.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAa,CAAC;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,UAAW,SAAS,KAAG,OACY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isTopicUnnamed.js","sources":["../../../Chat/isTopicUnnamed.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"isTopicUnnamed.js","sources":["../../../Chat/isTopicUnnamed.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { ChatTopic } from './ChatTopic';\n\n/**\n * Whether a topic has not been named yet — no name, or only whitespace. Unnamed topics render a\n * placeholder until the host supplies the real name. Hosts whose backend stores a literal\n * placeholder for \"unnamed\" (rather than leaving the name blank) override this through the\n * `isTopicUnnamed` prop on the components.\n * @param topic The topic to check.\n * @returns True when the topic has no usable name.\n */\nexport const isTopicUnnamed = (topic: ChatTopic): boolean =>\n topic.name === undefined || topic.name.trim().length === 0;\n"],"names":[],"mappings":"AAaO,MAAM,cAAc,GAAG,CAAC,KAAgB,KAC3C,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relativeTimestamp.js","sources":["../../../Chat/relativeTimestamp.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"relativeTimestamp.js","sources":["../../../Chat/relativeTimestamp.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/** Overrides for the strings {@link relativeTimestamp} composes. `{minutes}`/`{hours}` are substituted. */\nexport interface RelativeTimestampLabels {\n /** Under a minute ago. Defaults to `'just now'`. */\n justNow?: string;\n\n /** Under an hour ago. Defaults to `'{minutes}m ago'`. */\n minutesAgo?: string;\n\n /** Under a day ago. Defaults to `'{hours}h ago'`. */\n hoursAgo?: string;\n}\n\n/**\n * A short relative rendering of a moment — `just now`, `5m ago`, `3h ago`, and a locale date\n * once it is older than a day.\n * @param moment The moment to render. Data that traveled through JSON may carry it as a string, so it is coerced rather than trusted to be a `Date`.\n * @param now What time it is, injectable so specs are not tied to the wall clock.\n * @param labels Overrides for the composed strings. Unset fields fall back to literal English defaults.\n * @returns The relative rendering.\n */\nexport const relativeTimestamp = (\n moment: Date,\n now: Date = new Date(),\n labels?: RelativeTimestampLabels,\n): string => {\n const date = moment instanceof Date ? moment : new Date(moment);\n const differenceInMinutes = Math.floor((now.getTime() - date.getTime()) / 60_000);\n if (differenceInMinutes < 1) return labels?.justNow ?? 'just now';\n if (differenceInMinutes < 60)\n return (labels?.minutesAgo ?? '{minutes}m ago').replace(\n '{minutes}',\n differenceInMinutes.toString(),\n );\n const differenceInHours = Math.floor(differenceInMinutes / 60);\n if (differenceInHours < 24)\n return (labels?.hoursAgo ?? '{hours}h ago').replace(\n '{hours}',\n differenceInHours.toString(),\n );\n return date.toLocaleDateString(undefined, { month: 'short', day: 'numeric' });\n};\n"],"names":[],"mappings":"AAuBO,MAAM,iBAAiB,GAAG,CAC7B,MAAY,EACZ,GAAA,GAAY,IAAI,IAAI,EAAE,EACtB,MAAgC,KACxB;AACR,IAAA,MAAM,IAAI,GAAG,MAAM,YAAY,IAAI,GAAG,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC;IAC/D,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,MAAM,CAAC;IACjF,IAAI,mBAAmB,GAAG,CAAC;AAAE,QAAA,OAAO,MAAM,EAAE,OAAO,IAAI,UAAU;IACjE,IAAI,mBAAmB,GAAG,EAAE;AACxB,QAAA,OAAO,CAAC,MAAM,EAAE,UAAU,IAAI,gBAAgB,EAAE,OAAO,CACnD,WAAW,EACX,mBAAmB,CAAC,QAAQ,EAAE,CACjC;IACL,MAAM,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,GAAG,EAAE,CAAC;IAC9D,IAAI,iBAAiB,GAAG,EAAE;AACtB,QAAA,OAAO,CAAC,MAAM,EAAE,QAAQ,IAAI,cAAc,EAAE,OAAO,CAC/C,SAAS,EACT,iBAAiB,CAAC,QAAQ,EAAE,CAC/B;AACL,IAAA,OAAO,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;AACjF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shouldRequestTopicName.js","sources":["../../../Chat/shouldRequestTopicName.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"shouldRequestTopicName.js","sources":["../../../Chat/shouldRequestTopicName.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * Whether sending a message should ask the host to name the topic. A topic is named exactly\n * once, from the very first message sent in it — a topic that already carries a name keeps it\n * (somebody's choice wins over automation), and a topic that already has messages had its\n * chance when the first one was sent.\n * @param topicIsUnnamed Whether the topic is still unnamed.\n * @param existingMessageCount How many messages the topic already holds, before this send.\n * @returns True when the host should be asked for a name.\n */\nexport const shouldRequestTopicName = (\n topicIsUnnamed: boolean,\n existingMessageCount: number,\n): boolean => topicIsUnnamed && existingMessageCount === 0;\n"],"names":[],"mappings":"AAYO,MAAM,sBAAsB,GAAG,CAClC,cAAuB,EACvB,oBAA4B,KAClB,cAAc,IAAI,oBAAoB,KAAK;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topicsByActivity.d.ts","sourceRoot":"","sources":["../../../Chat/topicsByActivity.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAa,CAAC;AAe7C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,SAAS,SAAS,UAAU,MAAM,EAAE,KAAG,MAAM,EACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topicsByActivity.js","sources":["../../../Chat/topicsByActivity.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"topicsByActivity.js","sources":["../../../Chat/topicsByActivity.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { ChatTopic } from './ChatTopic';\n\n/**\n * When a topic last saw something happen. Data that traveled through JSON may carry dates as\n * strings, so the value is coerced rather than trusted to be a `Date`.\n * @param topic The topic to read.\n * @returns The time of last activity, the start time when nothing happened since, or the epoch when neither is known.\n */\nconst lastActivityOf = (topic: ChatTopic): number => {\n const moment = topic.lastActivity ?? topic.started;\n if (moment === undefined) return 0;\n const time = moment instanceof Date ? moment.getTime() : new Date(moment).getTime();\n return Number.isNaN(time) ? 0 : time;\n};\n\n/**\n * The topics ordered by most recent activity first, so the conversation somebody is most likely\n * looking for sits on top. Non-mutating.\n * @param topics The topics in any order.\n * @returns A new array, most recently active first.\n */\nexport const topicsByActivity = <TTopic extends ChatTopic>(topics: TTopic[]): TTopic[] =>\n [...topics].sort((left, right) => lastActivityOf(right) - lastActivityOf(left));\n"],"names":[],"mappings":"AAWA,MAAM,cAAc,GAAG,CAAC,KAAgB,KAAY;IAChD,MAAM,MAAM,GAAG,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,OAAO;IAClD,IAAI,MAAM,KAAK,SAAS;AAAE,QAAA,OAAO,CAAC;IAClC,MAAM,IAAI,GAAG,MAAM,YAAY,IAAI,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE;AACnF,IAAA,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI;AACxC,CAAC;AAQM,MAAM,gBAAgB,GAAG,CAA2B,MAAgB,KACvE,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK,cAAc,CAAC,KAAK,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type FocusEvent, type RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Keeps keyboard focus in a topic list when a focused topic action disappears, because
|
|
4
|
+
* invoking it made the action unavailable or removed its topic. Without this, the unmounted
|
|
5
|
+
* button drops focus to the document body.
|
|
6
|
+
*
|
|
7
|
+
* Focus moves to the same topic's opening button, or, when the topic is gone, to the topic that
|
|
8
|
+
* took its place in the order last rendered, then to the list's New topic button. Focus that the
|
|
9
|
+
* host already moved elsewhere, such as into a rename dialog, is left alone, and an action that
|
|
10
|
+
* lost focus while still mounted is forgotten.
|
|
11
|
+
* @param listRef The list whose rows each hold one topic.
|
|
12
|
+
* @param orderedTopicKeys The topic keys in rendered row order.
|
|
13
|
+
* @returns Focus and blur handlers to attach to each topic action button.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useTopicActionFocusRecovery: (listRef: RefObject<HTMLUListElement | null>, orderedTopicKeys: readonly string[]) => {
|
|
16
|
+
onActionFocus: (topicKey: string) => (event: FocusEvent<HTMLElement>) => void;
|
|
17
|
+
onActionBlur: (event: FocusEvent<HTMLElement>) => void;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useTopicActionFocusRecovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTopicActionFocusRecovery.d.ts","sourceRoot":"","sources":["../../../Chat/useTopicActionFocusRecovery.ts"],"names":[],"mappings":"AAGA,OAAO,EAA2B,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,2BAA2B,YAC3B,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,oBACzB,SAAS,MAAM,EAAE;IA0B/B,aAAa,aAAa,MAAM,aAAa,UAAU,CAAC,WAAW,CAAC;IAGpE,YAAY,UAAU,UAAU,CAAC,WAAW,CAAC;CAWpD,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useRef, useLayoutEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
const useTopicActionFocusRecovery = (listRef, orderedTopicKeys) => {
|
|
4
|
+
const focusedActionRef = useRef(null);
|
|
5
|
+
const committedTopicKeysRef = useRef([]);
|
|
6
|
+
useLayoutEffect(() => {
|
|
7
|
+
const previousTopicKeys = committedTopicKeysRef.current;
|
|
8
|
+
committedTopicKeysRef.current = orderedTopicKeys;
|
|
9
|
+
const focused = focusedActionRef.current;
|
|
10
|
+
if (!focused || focused.element.isConnected)
|
|
11
|
+
return;
|
|
12
|
+
focusedActionRef.current = null;
|
|
13
|
+
const active = document.activeElement;
|
|
14
|
+
if (active && active !== document.body)
|
|
15
|
+
return;
|
|
16
|
+
const rows = Array.from(listRef.current?.children ?? []);
|
|
17
|
+
const sameTopic = orderedTopicKeys.indexOf(focused.topicKey);
|
|
18
|
+
const row = sameTopic >= 0
|
|
19
|
+
? rows[sameTopic]
|
|
20
|
+
: rows[Math.min(Math.max(previousTopicKeys.indexOf(focused.topicKey), 0), rows.length - 1)];
|
|
21
|
+
const target = row?.querySelector('.cratis-chat-topics__topic') ??
|
|
22
|
+
listRef.current?.parentElement?.querySelector('.cratis-chat-topics__start');
|
|
23
|
+
target?.focus();
|
|
24
|
+
});
|
|
25
|
+
return {
|
|
26
|
+
onActionFocus: (topicKey) => (event) => {
|
|
27
|
+
focusedActionRef.current = { element: event.currentTarget, topicKey };
|
|
28
|
+
},
|
|
29
|
+
onActionBlur: (event) => {
|
|
30
|
+
const element = event.currentTarget;
|
|
31
|
+
queueMicrotask(() => {
|
|
32
|
+
if (focusedActionRef.current?.element === element && element.isConnected) {
|
|
33
|
+
focusedActionRef.current = null;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { useTopicActionFocusRecovery };
|
|
41
|
+
//# sourceMappingURL=useTopicActionFocusRecovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTopicActionFocusRecovery.js","sources":["../../../Chat/useTopicActionFocusRecovery.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useLayoutEffect, useRef, type FocusEvent, type RefObject } from 'react';\n\n/**\n * Keeps keyboard focus in a topic list when a focused topic action disappears, because\n * invoking it made the action unavailable or removed its topic. Without this, the unmounted\n * button drops focus to the document body.\n *\n * Focus moves to the same topic's opening button, or, when the topic is gone, to the topic that\n * took its place in the order last rendered, then to the list's New topic button. Focus that the\n * host already moved elsewhere, such as into a rename dialog, is left alone, and an action that\n * lost focus while still mounted is forgotten.\n * @param listRef The list whose rows each hold one topic.\n * @param orderedTopicKeys The topic keys in rendered row order.\n * @returns Focus and blur handlers to attach to each topic action button.\n */\nexport const useTopicActionFocusRecovery = (\n listRef: RefObject<HTMLUListElement | null>,\n orderedTopicKeys: readonly string[],\n) => {\n const focusedActionRef = useRef<{ element: HTMLElement; topicKey: string } | null>(null);\n // The row order from the last commit, so a removed topic's position reflects any re-sorting\n // that happened after its action gained focus.\n const committedTopicKeysRef = useRef<readonly string[]>([]);\n\n useLayoutEffect(() => {\n const previousTopicKeys = committedTopicKeysRef.current;\n committedTopicKeysRef.current = orderedTopicKeys;\n const focused = focusedActionRef.current;\n if (!focused || focused.element.isConnected) return;\n focusedActionRef.current = null;\n const active = document.activeElement;\n if (active && active !== document.body) return;\n const rows = Array.from(listRef.current?.children ?? []);\n const sameTopic = orderedTopicKeys.indexOf(focused.topicKey);\n const row = sameTopic >= 0\n ? rows[sameTopic]\n : rows[Math.min(Math.max(previousTopicKeys.indexOf(focused.topicKey), 0), rows.length - 1)];\n const target = row?.querySelector<HTMLElement>('.cratis-chat-topics__topic') ??\n listRef.current?.parentElement?.querySelector<HTMLElement>('.cratis-chat-topics__start');\n target?.focus();\n });\n\n return {\n onActionFocus: (topicKey: string) => (event: FocusEvent<HTMLElement>) => {\n focusedActionRef.current = { element: event.currentTarget, topicKey };\n },\n onActionBlur: (event: FocusEvent<HTMLElement>) => {\n // A button removed while focused is already disconnected here, so only a deliberate\n // focus change on a still-mounted action clears the tracking.\n const element = event.currentTarget;\n queueMicrotask(() => {\n if (focusedActionRef.current?.element === element && element.isConnected) {\n focusedActionRef.current = null;\n }\n });\n },\n };\n};\n"],"names":[],"mappings":";;MAkBa,2BAA2B,GAAG,CACvC,OAA2C,EAC3C,gBAAmC,KACnC;AACA,IAAA,MAAM,gBAAgB,GAAG,MAAM,CAAoD,IAAI,CAAC;AAGxF,IAAA,MAAM,qBAAqB,GAAG,MAAM,CAAoB,EAAE,CAAC;IAE3D,eAAe,CAAC,MAAK;AACjB,QAAA,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,OAA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d,OAAO;QACP,OAAO;QACP,SAAS;QACT,QAAQ;QACR,SAAS;QACT,EAAE;QACF,SAAS;QACT,QAAQ;KACoB;IAEhC,QACIA,GAAA,CAAC,WAAW,EAAA,EAAA,GAA0B,gBAAgB,YAClDA,GAAA,CAAC,oBAAoB,EAAA,EAAA,GACb,WAAW,EACf,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAC9C,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,oBAAoB,EAAA,QAAA,EAEzC,QAAQ,EAAA,CACU,EAAA,CACb;AAEtB,CAAC;AAED,MAAM,0BAA0B,GAAG,CAAC,EAAE,QAAQ,EAAiC,MAC3EA,GAAA,CAAC,WAAW,CAAC,MAAM,cAAE,QAAQ,EAAA,CAAsB,CACtD;AACD,uBAAuB,CAAC,0BAA0B,CAAC;AAEnD,sBAAsB,CAAC,MAAM,GAAG,0BAA0B;AAcnD,MAAM,aAAa,GAAG;;"}
|
|
1
|
+
{"version":3,"file":"CommandDialog.js","sources":["../../../CommandDialog/CommandDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DialogButtons, DialogResult } from '@cratis/arc.react/dialogs';\nimport { Dialog, type DialogProps } from '../Dialogs/Dialog';\nimport React from 'react';\nimport {\n CommandForm,\n CommandFormFieldWrapper,\n useCommandFormContext,\n useCommandInstance,\n type CommandFormProps,\n} from '@cratis/arc.react/commands';\nimport type { BeforeExecuteCallback } from './applyBeforeExecute';\nimport type { ConfirmBeforeExecute } from './confirmBeforeExecute';\nimport { useCommandExecution } from './useCommandExecution';\nimport {\n isCommandFormField,\n markAsCommandFormColumn,\n} from '../CommandForm/commandFormMarkers';\n\n/**\n * Props for {@link CommandDialog}. Combines the props of a `CommandForm`\n * (`command`, `initialValues`, `onSuccess`, `onValidationFailure`, `onFailed`,\n * `onBeforeExecute`, etc.) with the props of a {@link Dialog} (`title`,\n * `buttons`, `width`, `pt`, `unstyled`, …). Dialog presentation props\n * such as `subtitle`, `placement`, and `closeIcon` are forwarded to the dialog.\n *\n * @typeParam TCommand - The command record type (must extend `object`).\n * @typeParam TResponse - The response payload type returned by a successful command. Defaults to `object`.\n */\nexport interface CommandDialogProps<TCommand extends object, TResponse = object>\n extends\n Omit<CommandFormProps<TCommand, TResponse>, 'children' | 'onBeforeExecute'>,\n Omit<DialogProps, 'children' | 'isBusy'> {\n /**\n * A transformer invoked with the current command values immediately before\n * the command executes on confirm. It **must return** the values to run with\n * (mutated or not) — a callback that returns nothing does not execute the\n * command with `undefined`; the current values are kept and a warning is\n * logged. May be async.\n *\n * ⚠️ It runs **only on submit**, after the form has already been validated,\n * so a value produced here can never satisfy required-field validation — the\n * submit button stays disabled if a required value is only seeded here. Seed\n * required values through `initialValues`; reserve `onBeforeExecute` for\n * transforms that do not affect validity (for example a generated id).\n */\n onBeforeExecute?: BeforeExecuteCallback<TCommand>;\n\n /**\n * Ask whether to run the command after validation and `onBeforeExecute`.\n * Receives the transformed values. Only `true` executes; all other outcomes\n * keep the dialog open. May return a promise (for example from a confirmation dialog).\n * If command values change while confirmation is pending, execution is skipped\n * and the dialog stays open; confirm the new values again.\n * Unlike `onConfirm`, this runs before execution, not after success.\n */\n confirmBeforeExecute?: ConfirmBeforeExecute<TCommand>;\n\n /**\n * Form fields and arbitrary content for the dialog body. Children that are\n * `CommandFormField` instances are automatically wrapped so they bind to\n * the command instance.\n */\n children?: React.ReactNode;\n}\n\n// Requiring each key here makes a newly added Dialog prop fail compilation until it is routed.\ntype ForwardedDialogProps = Omit<DialogProps, 'children' | 'isBusy'> &\n Record<keyof Omit<DialogProps, 'children' | 'isBusy'>, unknown>;\n\nconst CommandDialogWrapper = <TCommand extends object, TResponse = object>({\n isValid,\n onClose,\n onConfirm,\n onSuccess,\n onValidationFailure,\n onFailed,\n onException,\n onUnauthorized,\n onBeforeExecute,\n confirmBeforeExecute,\n children,\n ...dialogProps\n}: Omit<DialogProps, 'isBusy'> & {\n onSuccess?: CommandFormProps<TCommand, TResponse>['onSuccess'];\n onValidationFailure?: CommandFormProps<TCommand, TResponse>['onValidationFailure'];\n onFailed?: CommandFormProps<TCommand, TResponse>['onFailed'];\n onException?: CommandFormProps<TCommand, TResponse>['onException'];\n onUnauthorized?: CommandFormProps<TCommand, TResponse>['onUnauthorized'];\n onBeforeExecute?: BeforeExecuteCallback<TCommand>;\n confirmBeforeExecute?: ConfirmBeforeExecute<TCommand>;\n}) => {\n const {\n setCommandValues,\n setCommandResult,\n isValid: isCommandFormValid,\n } = useCommandFormContext<TCommand>();\n const commandInstance = useCommandInstance<TCommand>();\n const submission = useCommandExecution<TCommand, TResponse>(\n commandInstance, setCommandValues, onBeforeExecute, confirmBeforeExecute, onException,\n );\n\n const handleConfirm = async () => {\n const result = await submission.run();\n if (!result) return false;\n\n if (!result.isSuccess) {\n await onFailed?.(result);\n if (result.hasExceptions) {\n await onException?.(result.exceptionMessages, result.exceptionStackTrace);\n }\n if (!result.isAuthorized) await onUnauthorized?.();\n if (!result.isValid) {\n await onValidationFailure?.(result.validationResults);\n }\n if (submission.isMounted()) setCommandResult(result);\n return false;\n }\n\n await onSuccess?.(result.response as TResponse);\n if (onConfirm) {\n const closeResult = await onConfirm();\n return closeResult === true;\n }\n if (onClose) {\n const closeResult = await onClose(DialogResult.Ok);\n return closeResult !== false;\n }\n return true;\n };\n\n const processChildren = (nodes: React.ReactNode): React.ReactNode => {\n return React.Children.map(nodes, (child) => {\n if (!React.isValidElement(child)) return child;\n\n const component = child.type as React.ComponentType<unknown>;\n if (isCommandFormField(component)) {\n type FieldElement = Parameters<\n typeof CommandFormFieldWrapper\n >[0]['field'];\n // SAFETY: isCommandFormField guards that child.type is a command form field component.\n return (\n <CommandFormFieldWrapper field={child as unknown as FieldElement} />\n );\n }\n\n const childProps = child.props as Record<string, unknown>;\n if (childProps.children != null) {\n return React.cloneElement(\n child as React.ReactElement<Record<string, unknown>>,\n {\n children: processChildren(childProps.children as React.ReactNode),\n },\n );\n }\n\n return child;\n });\n };\n\n const processedChildren = processChildren(children);\n const isDialogValid = isValid !== false && isCommandFormValid;\n\n return (\n <Dialog\n {...dialogProps}\n onClose={onClose}\n onConfirm={handleConfirm}\n isValid={isDialogValid}\n isBusy={submission.isSubmitting}\n >\n <div style={{ display: 'flex', flexDirection: 'column', width: '100%' }}>\n {processedChildren}\n </div>\n </Dialog>\n );\n};\n\n/**\n * A {@link Dialog} that hosts a Cratis Arc `CommandForm`, runs the bound\n * command on confirm, and only closes when the command succeeds. This is\n * the standard pattern for \"user fills in a form, clicks OK, command runs\n * server-side, dialog dismisses\" — `CommandDialog` collapses about thirty\n * lines of orchestration into the props on a single component.\n *\n * ## Where `TCommand` comes from\n *\n * `TCommand` is an auto-generated TypeScript class produced by the Arc proxy\n * generator from a C# `[Command]` record. `dotnet build` writes a `.ts` file\n * per command with the right property types and a typed `execute()` method;\n * importing the class is all the connection-to-the-backend you need. The\n * class also exposes a `.use()` hook for direct (non-dialog) usage and a\n * `useWithChangeTracking()` variant.\n *\n * ## What happens on confirm\n *\n * 1. If `onBeforeExecute` is supplied, it transforms the command values.\n * Used for generated IDs (`Guid.create()`) that the user did not type in.\n * 2. The command's `execute()` runs through Arc's command pipeline. The\n * backend handler returns either a typed response (mapped to `TResponse`)\n * or a `ValidationResult[]`.\n * 3. On `IsSuccess: true`, `onSuccess(response)` fires and the dialog closes\n * through the dialog host context.\n * 4. On a validation failure, `onValidationFailure(errors)` fires and the\n * form's per-field error display is updated. The dialog stays open.\n * 5. On a domain or transport failure, `onFailed(result)` fires. The dialog\n * stays open and the `CommandResult` is set on the form context so the\n * UI can surface the error to the user.\n *\n * Throughout, the dialog is in the `isBusy` state — every action button is\n * disabled and the confirm button shows a spinner.\n *\n * ## Destructive commands and initial focus\n *\n * The confirm button is focused when the dialog opens, and a focused native\n * button fires `click` from the `keydown` of `Enter`. A command whose form\n * has required fields is protected from a held or double-tapped `Enter` for\n * free, because `isCommandFormValid` keeps confirm disabled until something\n * is filled in. A command that takes **no** input — the typical \"delete\n * this, permanently\" command — has no such gate, so its confirm button is\n * armed the instant the dialog appears.\n *\n * Pass `initialFocus` (forwarded straight to {@link Dialog}) for those:\n *\n * ```tsx\n * <CommandDialog<DeletePerson>\n * command={DeletePerson}\n * title=\"Delete personal data?\"\n * okLabel=\"Delete\"\n * initialFocus={DialogInitialFocus.Cancel}\n * onSuccess={() => closeDialog(DialogResult.Ok)}>\n * This cannot be undone.\n * </CommandDialog>\n * ```\n *\n * Everything else — the footer, the close (X), `Escape`, and the confirm\n * wiring that runs the command — is untouched.\n *\n * ## Field binding\n *\n * Children that are `CommandFormField` instances (`InputTextField`,\n * `NumberField`, `DropdownField`, every `@cratis/components/CommandForm/fields`\n * widget) bind to a property on the command via the `value` accessor:\n *\n * ```tsx\n * <InputTextField value={c => c.name} title=\"Name\" />\n * ```\n *\n * The accessor's argument is the command instance — TypeScript infers\n * `c.name` is a string and the field type-checks against that. Arbitrary\n * non-field children (custom layout, additional text, decorative elements)\n * are rendered as plain content.\n *\n * ## Typed dialog host usage\n *\n * Combine with `useDialog<CommandResult<TResponse>>()` from\n * `@cratis/arc.react/dialogs` to get a fully-typed result at the call site:\n *\n * ```tsx\n * import { useDialog, DialogResult } from '@cratis/arc.react/dialogs';\n * import { CommandDialog } from '@cratis/components/CommandDialog';\n * import { RegisterAuthor } from './RegisterAuthor'; // proxy from C#\n *\n * type RegisterAuthorResponse = { authorId: string };\n *\n * const RegisterAuthorDialog = () => {\n * const { closeDialog } = useDialogContext<CommandResult<RegisterAuthorResponse>>();\n * return (\n * <CommandDialog<RegisterAuthor, RegisterAuthorResponse>\n * command={RegisterAuthor}\n * title=\"Register author\"\n * okLabel=\"Register\"\n * onSuccess={(response) => closeDialog(DialogResult.Ok)}\n * onCancel={() => closeDialog(DialogResult.Cancelled)}>\n * <InputTextField value={c => c.name} title=\"Name\" />\n * <InputTextField value={c => c.email} title=\"Email\" />\n * </CommandDialog>\n * );\n * };\n * ```\n *\n * ## What's special vs. raw Dialog + CommandForm\n *\n * - Confirm wiring (`onConfirm` → `commandInstance.execute()`) is handled\n * internally; you only supply `onSuccess` / `onValidationFailure` / `onFailed`.\n * - The dialog's `isBusy` state tracks the in-flight command without manual\n * `useState`.\n * - Field error propagation from `CommandResult.validationResults` to the\n * form context is automatic.\n *\n * @typeParam TCommand - The command class (proxy generated from C# `[Command]`).\n * @typeParam TResponse - The success payload type returned by the command's `Handle()` method on the backend.\n * @param props - {@link CommandDialogProps}.\n */\nconst CommandDialogComponent = <TCommand extends object = object, TResponse = object>(\n props: CommandDialogProps<TCommand, TResponse>,\n) => {\n const {\n title,\n subtitle,\n placement,\n closeIcon,\n visible,\n width,\n style,\n contentStyle,\n resizable,\n buttons = DialogButtons.OkCancel,\n initialFocus,\n okLabel,\n cancelLabel,\n yesLabel,\n noLabel,\n dismissable,\n closeAriaLabel,\n isValid,\n onClose,\n onConfirm,\n onCancel,\n onBeforeExecute,\n confirmBeforeExecute,\n className,\n pt,\n ptOptions,\n unstyled,\n children,\n ...commandFormProps\n } = props;\n\n const dialogProps = {\n title,\n subtitle,\n placement,\n closeIcon,\n visible,\n width,\n style,\n contentStyle,\n resizable,\n buttons,\n initialFocus,\n okLabel,\n cancelLabel,\n yesLabel,\n noLabel,\n dismissable,\n closeAriaLabel,\n isValid,\n onClose,\n onConfirm,\n onCancel,\n className,\n pt,\n ptOptions,\n unstyled,\n } satisfies ForwardedDialogProps;\n\n return (\n <CommandForm<TCommand, TResponse> {...commandFormProps}>\n <CommandDialogWrapper<TCommand, TResponse>\n {...dialogProps}\n onSuccess={props.onSuccess}\n onValidationFailure={props.onValidationFailure}\n onFailed={props.onFailed}\n onException={props.onException}\n onUnauthorized={props.onUnauthorized}\n onBeforeExecute={onBeforeExecute}\n confirmBeforeExecute={confirmBeforeExecute}\n >\n {children}\n </CommandDialogWrapper>\n </CommandForm>\n );\n};\n\nconst CommandDialogColumnWrapper = ({ children }: { children: React.ReactNode }) => (\n <CommandForm.Column>{children}</CommandForm.Column>\n);\nmarkAsCommandFormColumn(CommandDialogColumnWrapper);\n\nCommandDialogComponent.Column = CommandDialogColumnWrapper;\n\n/**\n * A {@link Dialog} that hosts a Cratis Arc `CommandForm`, runs the bound\n * command on confirm, and only closes when the command succeeds. This is\n * the standard pattern for \"user fills in a form, clicks OK, command runs\n * server-side, dialog dismisses\" — `CommandDialog` collapses about thirty\n * lines of orchestration into the props on a single component.\n *\n * See {@link CommandDialogComponent} for full documentation.\n *\n * @typeParam TCommand - The command class (proxy generated from C# `[Command]`).\n * @typeParam TResponse - The success payload type returned by the command's `Handle()` method on the backend.\n */\nexport const CommandDialog = CommandDialogComponent;\n"],"names":["_jsx"],"mappings":";;;;;;;;AAwEA,MAAM,oBAAoB,GAAG,CAA8C,EACvE,OAAO,EACP,OAAO,EACP,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,QAAQ,EACR,GAAG,WAAW,EASjB,KAAI;AACD,IAAA,MAAM,EACF,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,EAAE,kBAAkB,GAC9B,GAAG,qBAAqB,EAAY;AACrC,IAAA,MAAM,eAAe,GAAG,kBAAkB,EAAY;AACtD,IAAA,MAAM,UAAU,GAAG,mBAAmB,CAClC,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,WAAW,CACxF;AAED,IAAA,MAAM,aAAa,GAAG,YAAW;AAC7B,QAAA,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,GAAG,EAAE;AACrC,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,KAAK;AAEzB,QAAA,IAAI,CAAC,MAAM,CAAC,SAAS,EAA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,SAAS;QACT,OAAO;QACP,KAAK;QACL,KAAK;QACL,YAAY;QACZ,SAAS;QACT,OAAO;QACP,YAAY;QACZ,OAAO;QACP,WAAW;QACX,QAAQ;QACR,OAAO;QACP,WAAW;QACX,cAAc;QACd,OAAO;QACP,OAAO;QACP,SAAS;QACT,QAAQ;QACR,SAAS;QACT,EAAE;QACF,SAAS;QACT,QAAQ;KACoB;IAEhC,QACIA,GAAA,CAAC,WAAW,EAAA,EAAA,GAA0B,gBAAgB,YAClDA,GAAA,CAAC,oBAAoB,EAAA,EAAA,GACb,WAAW,EACf,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAC9C,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,oBAAoB,EAAA,QAAA,EAEzC,QAAQ,EAAA,CACU,EAAA,CACb;AAEtB,CAAC;AAED,MAAM,0BAA0B,GAAG,CAAC,EAAE,QAAQ,EAAiC,MAC3EA,GAAA,CAAC,WAAW,CAAC,MAAM,cAAE,QAAQ,EAAA,CAAsB,CACtD;AACD,uBAAuB,CAAC,0BAA0B,CAAC;AAEnD,sBAAsB,CAAC,MAAM,GAAG,0BAA0B;AAcnD,MAAM,aAAa,GAAG;;"}
|
|
@@ -157,3 +157,4 @@ export interface CommandStepperProps<TCommand extends object, TResponse = object
|
|
|
157
157
|
* @param props - {@link CommandStepperProps}.
|
|
158
158
|
*/
|
|
159
159
|
export declare const CommandStepper: <TCommand extends object = object, TResponse = object>(props: CommandStepperProps<TCommand, TResponse>) => React.JSX.Element;
|
|
160
|
+
//# sourceMappingURL=CommandStepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandStepper.d.ts","sourceRoot":"","sources":["../../../CommandDialog/CommandStepper.tsx"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,QAAQ,SAAS,MAAM,GAAG,MAAM,EAAE,SAAS,GAAG,MAAM,SACxE,mBAAmB,CAAC,QAAQ,EAAE,SAAS,CAAC,sBAwDlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandStepper.js","sources":["../../../CommandDialog/CommandStepper.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;AA4JA,MAAM,qBAAqB,GAAG,CAA8C,EACxE,QAAQ,EACR,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,SAAS,EACT,aAAa,EACb,OAAO,EACP,MAAM,EACN,MAAM,EACN,WAAW,EACX,cAAc,EACd,KAAK,EACL,GAAG,EACH,YAAY,EACZ,EAAE,EACF,SAAS,EACT,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,eAAe,EACf,oBAAoB,GAC0B,KAAI;AAClD,IAAA,MAAM,EACF,aAAa,EACb,OAAO,EAAE,kBAAkB,EAC3B,gBAAgB,EAChB,gBAAgB,GACnB,GAAG,qBAAqB,EAAY;AACrC,IAAA,MAAM,eAAe,GAAG,kBAAkB,EAAY;IACtD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;AAC/C,IAAA,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAc,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3E,IAAA,MAAM,UAAU,GAAG,mBAAmB,CAClC,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,WAAW,CACxF;AAED,IAAA,MAAM,YAAY,GAAG,YAAW;AAC5B,QAAA,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,GAAG,EAAE;AACrC,QAAA,IAAI,CAAC,MAAM;YAAE;AAEb,QAAA,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;AACnB,YAAA,MAAM,QAAQ,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cAAc,GAAG,CAC1B,KAA+C,KAC/C;IACA,MAAM,EACF,QAAQ,EACR,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,SAAS,EACT,aAAa,EACb,OAAO,EACP,MAAM,EACN,MAAM,EACN,WAAW,EACX,cAAc,EACd,KAAK,EACL,GAAG,EACH,YAAY,EACZ,EAAE,EACF,SAAS,EACT,QAAQ,EACR,eAAe,EACf,oBAAoB,EACpB,GAAG,gBAAgB,EACtB,GAAG,KAAK;IAET,QACIA,GAAA,CAAC,WAAW,EAAA,EAAA,GAA0B,gBAAgB,YAClDA,GAAA,CAAC,qBAAqB,EAAA,EAClB,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAC9C,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,oBAAoB,EAAA,QAAA,EAEzC,QAAQ,EAAA,CACW,EAAA,CACd;AAEtB;;"}
|
|
1
|
+
{"version":3,"file":"CommandStepper.js","sources":["../../../CommandDialog/CommandStepper.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport React, { useState, type ButtonHTMLAttributes, type HTMLAttributes } from 'react';\nimport {\n CommandForm,\n useCommandFormContext,\n useCommandInstance,\n type CommandFormProps,\n} from '@cratis/arc.react/commands';\nimport type { BeforeExecuteCallback } from './applyBeforeExecute';\nimport type { ConfirmBeforeExecute } from './confirmBeforeExecute';\nimport { useCommandExecution } from './useCommandExecution';\nimport {\n CommandStepperContent,\n type CommandStepperContentProps,\n} from './CommandStepperContent';\nimport type { ExactPartKeys } from '../types/ExactPartKeys';\nimport type { PartsOf } from '../types/parts';\n\n/**\n * Event passed to {@link StepperCustomizationProps.onChangeStep} when the user\n * navigates to a different step.\n */\nexport interface StepperChangeEvent {\n /** Zero-based index of the step being navigated to. */\n index: number;\n}\n\n/** Orientation of a {@link CommandStepper} / {@link StepperCommandDialog}. */\nexport type StepperOrientation = 'horizontal' | 'vertical';\n\n/** Where the step headers sit relative to the panels. */\nexport type StepperHeaderPosition = 'top' | 'bottom';\n\n/**\n * Stepper-specific customization surface exposed by {@link CommandStepper} and\n * {@link StepperCommandDialog}. This is a Cratis-owned type — it no longer\n * leaks renderer-specific stepper props — so the Cratis-owned Stepper\n * can evolve underneath without changing the public API. Orientation, start/end\n * content, and header position are implemented over stable Cratis parts.\n */\nexport interface StepperParts {\n /** Stepper composition root. */\n root?: HTMLAttributes<HTMLDivElement>;\n /** Ordered step-header list. */\n list?: HTMLAttributes<HTMLOListElement>;\n /** One step list item and its state attributes. */\n step?: HTMLAttributes<HTMLLIElement>;\n /** Interactive step-header button. */\n header?: ButtonHTMLAttributes<HTMLButtonElement>;\n /** Step number/status indicator. */\n number?: HTMLAttributes<HTMLSpanElement>;\n /** Step title. */\n title?: HTMLAttributes<HTMLSpanElement>;\n /** Visual separator between steps. */\n separator?: HTMLAttributes<HTMLSpanElement>;\n /** Panels wrapper. */\n panels?: HTMLAttributes<HTMLDivElement>;\n /** Active step panel. */\n panel?: HTMLAttributes<HTMLElement>;\n}\n\nconst stepperPartsMatchManifest: ExactPartKeys<StepperParts, PartsOf<'CommandStepper'>> = true;\nvoid stepperPartsMatchManifest;\n\n/** Public layout, navigation, and stable-part customization shared by both steppers. */\nexport interface StepperCustomizationProps {\n /**\n * Whether the wizard is linear. In linear mode the step headers are not\n * directly clickable — the user advances through the Previous / Next\n * buttons. Set to `false` to let the user jump between steps by clicking\n * their headers. Defaults to `true`.\n */\n linear?: boolean;\n /** Lays the steps out horizontally (default) or stacked vertically. */\n orientation?: StepperOrientation;\n /** Places the step-header row above (default) or below the panels. */\n headerPosition?: StepperHeaderPosition;\n /** Content rendered before the stepper (e.g. a logo or title). */\n start?: React.ReactNode;\n /** Content rendered after the stepper. */\n end?: React.ReactNode;\n /** Invoked when the active step changes (via navigation or a header click). */\n onChangeStep?: (event: StepperChangeEvent) => void;\n /** Cratis-owned per-part attributes for the stepper. */\n pt?: StepperParts;\n /**\n * @deprecated Cratis parts always merge. Remove this renderer-era option.\n */\n ptOptions?: object;\n /**\n * @deprecated Components always uses consumer-owned CSS. Customize through `pt` and CSS instead.\n */\n unstyled?: boolean;\n}\n\n/** Props for a standalone stepper bound to one Arc command form. */\nexport interface CommandStepperProps<TCommand extends object, TResponse = object>\n extends\n Omit<CommandFormProps<TCommand, TResponse>, 'children' | 'onBeforeExecute'>,\n Omit<\n CommandStepperContentProps,\n | 'activeStep'\n | 'visitedSteps'\n | 'onActiveStepChange'\n | 'onVisitedStepsChange'\n | 'getFieldError'\n | 'isSubmitting'\n | 'isSubmitDisabled'\n | 'onSubmit'\n > {\n /**\n * A transformer invoked with the current command values immediately before\n * the command executes on submit. It **must return** the values to run with\n * (mutated or not) — a callback that returns nothing does not execute the\n * command with `undefined`; the current values are kept and a warning is\n * logged. May be async.\n *\n * ⚠️ It runs **only on submit**, after every step has already been validated,\n * so a value produced here can never satisfy required-field validation. Seed\n * required values through `initialValues`; reserve `onBeforeExecute` for\n * transforms that do not affect validity (for example a generated id).\n */\n onBeforeExecute?: BeforeExecuteCallback<TCommand>;\n /**\n * Ask before executing the transformed command values; only `true` executes.\n * Fields are disabled from submit until the guarded submission settles. If command values change\n * during that time, execution is skipped; confirm the new values again.\n */\n confirmBeforeExecute?: ConfirmBeforeExecute<TCommand>;\n /** StepperPanel children defining each wizard step. */\n children?: React.ReactNode;\n}\n\ntype CommandStepperWrapperProps<TCommand extends object, TResponse = object> = Omit<\n CommandStepperContentProps,\n | 'activeStep'\n | 'visitedSteps'\n | 'onActiveStepChange'\n | 'onVisitedStepsChange'\n | 'getFieldError'\n | 'isSubmitting'\n | 'isSubmitDisabled'\n | 'onSubmit'\n> & {\n children?: React.ReactNode;\n onSuccess?: CommandFormProps<TCommand, TResponse>['onSuccess'];\n onValidationFailure?: CommandFormProps<TCommand, TResponse>['onValidationFailure'];\n onFailed?: CommandFormProps<TCommand, TResponse>['onFailed'];\n onException?: CommandFormProps<TCommand, TResponse>['onException'];\n onUnauthorized?: CommandFormProps<TCommand, TResponse>['onUnauthorized'];\n onBeforeExecute?: BeforeExecuteCallback<TCommand>;\n confirmBeforeExecute?: ConfirmBeforeExecute<TCommand>;\n};\n\nconst CommandStepperWrapper = <TCommand extends object, TResponse = object>({\n children,\n onStepErrorsChange,\n showNavigation,\n showSubmit,\n nextLabel,\n previousLabel,\n okLabel,\n isBusy,\n linear,\n orientation,\n headerPosition,\n start,\n end,\n onChangeStep,\n pt,\n ptOptions,\n unstyled,\n onSuccess,\n onValidationFailure,\n onFailed,\n onException,\n onUnauthorized,\n onBeforeExecute,\n confirmBeforeExecute,\n}: CommandStepperWrapperProps<TCommand, TResponse>) => {\n const {\n getFieldError,\n isValid: isCommandFormValid,\n setCommandValues,\n setCommandResult,\n } = useCommandFormContext<TCommand>();\n const commandInstance = useCommandInstance<TCommand>();\n const [activeStep, setActiveStep] = useState(0);\n const [visitedSteps, setVisitedSteps] = useState<Set<number>>(new Set([0]));\n const submission = useCommandExecution<TCommand, TResponse>(\n commandInstance, setCommandValues, onBeforeExecute, confirmBeforeExecute, onException,\n );\n\n const handleSubmit = async () => {\n const result = await submission.run();\n if (!result) return;\n\n if (!result.isSuccess) {\n await onFailed?.(result);\n if (result.hasExceptions) {\n await onException?.(result.exceptionMessages, result.exceptionStackTrace);\n }\n if (!result.isAuthorized) await onUnauthorized?.();\n if (!result.isValid) {\n await onValidationFailure?.(result.validationResults);\n }\n if (submission.isMounted()) setCommandResult(result);\n return;\n }\n\n await onSuccess?.(result.response as TResponse);\n };\n\n return (\n <CommandStepperContent\n activeStep={activeStep}\n visitedSteps={visitedSteps}\n onActiveStepChange={setActiveStep}\n onVisitedStepsChange={setVisitedSteps}\n onStepErrorsChange={onStepErrorsChange}\n getFieldError={getFieldError}\n showNavigation={showNavigation}\n showSubmit={showSubmit}\n nextLabel={nextLabel}\n previousLabel={previousLabel}\n okLabel={okLabel}\n isBusy={isBusy}\n isSubmitting={submission.isSubmitting}\n disableFieldsWhileSubmitting={confirmBeforeExecute !== undefined}\n isSubmitDisabled={!isCommandFormValid}\n onSubmit={handleSubmit}\n linear={linear}\n orientation={orientation}\n headerPosition={headerPosition}\n start={start}\n end={end}\n onChangeStep={onChangeStep}\n pt={pt}\n ptOptions={ptOptions}\n unstyled={unstyled}\n >\n {children}\n </CommandStepperContent>\n );\n};\n\n/**\n * A multi-step wizard backed by a single Cratis Arc command — the embedded,\n * non-modal counterpart of {@link StepperCommandDialog}. Renders directly\n * inside a page region (a panel, a route, a wizard view) rather than inside\n * a modal dialog. Use this when the wizard *is* the page; use\n * {@link StepperCommandDialog} when the same wizard should appear over the\n * current page in a modal.\n *\n * ## Mechanics\n *\n * - Wraps the Cratis-owned Stepper inside an Arc `CommandForm` so each\n * `<StepperPanel>` becomes a logical grouping of fields that all bind to\n * the same single command.\n * - Provides a built-in Previous / Next / Submit footer. The Submit button\n * only appears on the last step and only when the form passes its\n * validity gate.\n * - Steps with field errors are visually marked (red step indicator) so\n * the user can see at a glance which step needs attention — useful in\n * wizards long enough that a missed-required-field on page 1 would\n * otherwise be hidden behind page 4.\n * - On final Submit, the bound command runs through Arc's command pipeline.\n * Failure paths (`onFailed`, `onException`, `onUnauthorized`, and\n * `onValidationFailure`) keep the wizard\n * open and re-surface field errors automatically.\n *\n * ## What `TCommand` is\n *\n * `TCommand` is the auto-generated TypeScript class produced by the Arc\n * proxy generator from a C# `[Command]` record. The wizard's UI is a\n * presentation grouping of one command's fields — every panel binds to\n * properties on the same single command instance.\n *\n * ## What's unique vs. {@link StepperCommandDialog}\n *\n * Mechanically identical, but lives inline on a page instead of inside a\n * modal Dialog. There is no `dialogPt` / `dialogUnstyled` prop because\n * there is no outer dialog — `pt` / `ptOptions` / `unstyled` target the\n * Stepper directly.\n *\n * ```tsx\n * import { CommandStepper, StepperPanel } from '@cratis/components/CommandDialog';\n * import { RegisterAuthor } from './RegisterAuthor'; // proxy from C#\n *\n * export const RegisterAuthorPage = () => (\n * <CommandStepper<RegisterAuthor> command={RegisterAuthor}\n * onSuccess={() => navigate('/authors')}>\n * <StepperPanel header=\"Basics\">\n * <InputTextField value={c => c.name} title=\"Name\" />\n * </StepperPanel>\n * <StepperPanel header=\"Contact\">\n * <InputTextField value={c => c.email} title=\"Email\" />\n * </StepperPanel>\n * </CommandStepper>\n * );\n * ```\n *\n * @typeParam TCommand - The command class (proxy generated from C# `[Command]`).\n * @typeParam TResponse - The success payload type returned by the command's `Handle()` method on the backend.\n * @param props - {@link CommandStepperProps}.\n */\nexport const CommandStepper = <TCommand extends object = object, TResponse = object>(\n props: CommandStepperProps<TCommand, TResponse>,\n) => {\n const {\n children,\n onStepErrorsChange,\n showNavigation,\n showSubmit,\n nextLabel,\n previousLabel,\n okLabel,\n isBusy,\n linear,\n orientation,\n headerPosition,\n start,\n end,\n onChangeStep,\n pt,\n ptOptions,\n unstyled,\n onBeforeExecute,\n confirmBeforeExecute,\n ...commandFormProps\n } = props;\n\n return (\n <CommandForm<TCommand, TResponse> {...commandFormProps}>\n <CommandStepperWrapper<TCommand, TResponse>\n onStepErrorsChange={onStepErrorsChange}\n showNavigation={showNavigation}\n showSubmit={showSubmit}\n nextLabel={nextLabel}\n previousLabel={previousLabel}\n okLabel={okLabel}\n isBusy={isBusy}\n linear={linear}\n orientation={orientation}\n headerPosition={headerPosition}\n start={start}\n end={end}\n onChangeStep={onChangeStep}\n pt={pt}\n ptOptions={ptOptions}\n unstyled={unstyled}\n onSuccess={props.onSuccess}\n onValidationFailure={props.onValidationFailure}\n onFailed={props.onFailed}\n onException={props.onException}\n onUnauthorized={props.onUnauthorized}\n onBeforeExecute={onBeforeExecute}\n confirmBeforeExecute={confirmBeforeExecute}\n >\n {children}\n </CommandStepperWrapper>\n </CommandForm>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;;AA4JA,MAAM,qBAAqB,GAAG,CAA8C,EACxE,QAAQ,EACR,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,SAAS,EACT,aAAa,EACb,OAAO,EACP,MAAM,EACN,MAAM,EACN,WAAW,EACX,cAAc,EACd,KAAK,EACL,GAAG,EACH,YAAY,EACZ,EAAE,EACF,SAAS,EACT,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,eAAe,EACf,oBAAoB,GAC0B,KAAI;AAClD,IAAA,MAAM,EACF,aAAa,EACb,OAAO,EAAE,kBAAkB,EAC3B,gBAAgB,EAChB,gBAAgB,GACnB,GAAG,qBAAqB,EAAY;AACrC,IAAA,MAAM,eAAe,GAAG,kBAAkB,EAAY;IACtD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;AAC/C,IAAA,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAc,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3E,IAAA,MAAM,UAAU,GAAG,mBAAmB,CAClC,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,WAAW,CACxF;AAED,IAAA,MAAM,YAAY,GAAG,YAAW;AAC5B,QAAA,MAAM,MAAM,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AW,GAAG,CAAC,CAAC,EAC1C,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAExBA,GAAA,CAAA,MAAA,EAAA,EAAA,QAAA,EAAO,qBAAqB,EAAA,CAAQ,EAAA,CAC/B,CACZ,EACDA,aAAK,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAA,CAAI,EAC1B,CAAC,UAAU,KACRA,GAAA,CAAC,MAAM,EAAA,EACH,OAAO,EAAE,MAAM,UAAU,CAAC,WAAW,GAAG,CAAC,CAAC,EAC1C,QAAQ,EAAE,MAAM,IAAI,YAAY,IAAI,oBAAoB,EACxD,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAExBA,GAAA,CAAA,MAAA,EAAA,EAAA,QAAA,EAAO,iBAAiB,EAAA,CAAQ,EAAA,CAC3B,CACZ,EACA,UAAU,IAAI,UAAU,KACrBC,IAAA,CAAC,MAAM,IACH,OAAO,EAAE,MAAM,KAAK,QAAQ,IAAI,EAChC,QAAQ,EACJ,MAAM;4BACN,YAAY;4BACZ,gBAAgB;AAChB,4BAAA,gBAAgB,EAEpB,SAAS,EAAA,IAAA,EACT,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAA,QAAA,EAAA,CAEvB,YAAY,KACTD,GAAA,CAAA,MAAA,EAAA,EACI,SAAS,EAAC,wBAAwB,EAAA,aAAA,EACtB,MAAM,EAAA,CACpB,CACL,EACDA,GAAA,CAAA,MAAA,EAAA,EAAA,QAAA,EAAO,eAAe,EAAA,CAAQ,CAAA,EAAA,CACzB,CACZ,CAAA,EAAA,CACC,CACT,CAAA,EAAA,CACC;AAEd;;"}
|
|
1
|
+
{"version":3,"file":"CommandStepperContent.js","sources":["../../../CommandDialog/CommandStepperContent.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport React, { useEffect, useId, useMemo } from 'react';\nimport { Button } from '../Common/Button';\nimport { useCratisComponentsConfig } from '../Common/CratisComponentsProvider';\nimport { CommandFormFieldWrapper } from '@cratis/arc.react/commands';\nimport { isCommandFormField } from '../CommandForm/commandFormMarkers';\nimport type { StepperPanelProps } from './StepperPanel';\nimport { getStepPanels } from './stepChildren';\nimport { transitionStep } from './transitionStep';\nimport type { StepperCustomizationProps } from './CommandStepper';\n\n/**\n * Controlled state and validation props for {@link CommandStepperContent}.\n *\n * @remarks\n * `CommandStepperContent` is a private implementation primitive shared by\n * {@link CommandStepper} and `StepperCommandDialog` — it is deliberately not\n * re-exported from the `./CommandStepper` or `./CommandDialog` package\n * subpaths, so this type is documented for maintainers only.\n */\nexport interface CommandStepperContentProps extends StepperCustomizationProps {\n /** The active step index. */\n activeStep: number;\n /** The indices that have been visited. */\n visitedSteps: Set<number>;\n /** StepperPanel children defining each wizard step. */\n children?: React.ReactNode;\n /** Callback for active step changes. */\n onActiveStepChange?: (stepIndex: number) => void;\n /** Callback for visited step changes. */\n onVisitedStepsChange?: (visitedSteps: Set<number>) => void;\n /** Callback that receives validation state for each step. */\n onStepErrorsChange?: (stepErrors: boolean[]) => void;\n /** Provides validation errors for individual fields. */\n getFieldError?: (fieldName: string) => unknown;\n /** Whether to show built-in previous and next buttons. Defaults to `true`. */\n showNavigation?: boolean;\n /** Whether to show built-in submit on the last step. Defaults to `true`. */\n showSubmit?: boolean;\n /** Label for the next step button. Falls back to the provider's `stepper.next` message, then `'Next'`. */\n nextLabel?: string;\n /** Label for the previous step button. Falls back to the provider's `stepper.previous` message, then `'Previous'`. */\n previousLabel?: string;\n /** Label for the submit button. Falls back to the provider's `stepper.submit` message, then `'Submit'`. */\n okLabel?: string;\n /** Whether navigation controls are busy. */\n isBusy?: boolean;\n /** Whether submit is currently executing. */\n isSubmitting?: boolean;\n /** Locks form fields during a guarded submission without changing unguarded forms. */\n disableFieldsWhileSubmitting?: boolean;\n /** Disables submit regardless of current step state. */\n isSubmitDisabled?: boolean;\n /** Submit callback invoked on the last step. */\n onSubmit?: () => void | Promise<void>;\n}\n\n/** Extracts the property name from an accessor function like `c => c.name`. */\nconst getPropertyName = (accessor: ((obj: unknown) => unknown) | unknown): string => {\n if (typeof accessor !== 'function') return '';\n const fnStr = accessor.toString();\n const match = fnStr.match(/\\.([a-zA-Z_$][a-zA-Z0-9_$]*)/);\n return match ? match[1] : '';\n};\n\n/** Recursively collects all CommandFormField property names from a React node tree. */\nconst extractFieldNamesFromNode = (nodes: React.ReactNode): string[] => {\n const names: string[] = [];\n React.Children.forEach(nodes, (child) => {\n if (!React.isValidElement(child)) return;\n const component = child.type as React.ComponentType<unknown>;\n if (isCommandFormField(component)) {\n const fieldProps = child.props as { value?: (obj: unknown) => unknown };\n const name = getPropertyName(fieldProps.value);\n if (name) names.push(name);\n }\n\n const childProps = child.props as Record<string, unknown>;\n if (childProps.children != null) {\n names.push(\n ...extractFieldNamesFromNode(childProps.children as React.ReactNode),\n );\n }\n });\n return names;\n};\n\nconst processChildren = (nodes: React.ReactNode): React.ReactNode => {\n return React.Children.map(nodes, (child) => {\n if (!React.isValidElement(child)) return child;\n\n const component = child.type as React.ComponentType<unknown>;\n if (isCommandFormField(component)) {\n type FieldElement = Parameters<typeof CommandFormFieldWrapper>[0]['field'];\n // SAFETY: displayName identifies the Arc command field shape before it reaches the wrapper.\n return <CommandFormFieldWrapper field={child as unknown as FieldElement} />;\n }\n\n const childProps = child.props as Record<string, unknown>;\n if (childProps.children != null) {\n return React.cloneElement(\n child as React.ReactElement<Record<string, unknown>>,\n {\n children: processChildren(childProps.children as React.ReactNode),\n },\n );\n }\n\n return child;\n });\n};\n\n/**\n * @internal Renders the visual stepper body — step headers, panels, and the\n * built-in Previous / Next / Submit navigation — without any Arc\n * `CommandForm` wiring. This is a private implementation primitive shared by\n * {@link CommandStepper} and `StepperCommandDialog`; it is intentionally\n * **not** re-exported from the `./CommandStepper` or `./CommandDialog`\n * package subpaths and may change shape without a major version bump.\n */\nexport const CommandStepperContent = ({\n activeStep,\n visitedSteps,\n children,\n onActiveStepChange,\n onVisitedStepsChange,\n onStepErrorsChange,\n getFieldError,\n showNavigation = true,\n showSubmit = true,\n nextLabel,\n previousLabel,\n okLabel,\n isBusy = false,\n isSubmitting = false,\n disableFieldsWhileSubmitting = false,\n isSubmitDisabled = false,\n onSubmit,\n linear = true,\n orientation = 'horizontal',\n headerPosition = 'top',\n start,\n end,\n onChangeStep,\n pt,\n}: CommandStepperContentProps) => {\n const { messages } = useCratisComponentsConfig();\n const stepperId = useId();\n const resolvedNextLabel = nextLabel ?? messages?.stepper?.next ?? 'Next';\n const resolvedPreviousLabel =\n previousLabel ?? messages?.stepper?.previous ?? 'Previous';\n const resolvedOkLabel = okLabel ?? messages?.stepper?.submit ?? 'Submit';\n\n // The steps that actually render. Conditional steps (`{condition && <StepperPanel/>}`)\n // leave falsy children behind, so the count, the per-step validation state and what the\n // Stepper renders are all derived from this one list — they cannot drift apart.\n const panels = useMemo(\n () => getStepPanels(children) as React.ReactElement<StepperPanelProps>[],\n [children],\n );\n const stepCount = panels.length;\n\n // A conditional step can vanish after the user has advanced past it, which leaves the\n // incoming index pointing at a step that is no longer rendered. Clamp it into the set that\n // is, so the panel shown, the validation state read and the buttons offered all belong to a\n // step that exists.\n const currentStep = Math.min(Math.max(activeStep, 0), Math.max(stepCount - 1, 0));\n const isLastStep = currentStep >= stepCount - 1;\n const isFirstStep = currentStep <= 0;\n\n const stepFieldNames = useMemo(\n () => panels.map((panel) => extractFieldNamesFromNode(panel.props.children)),\n [panels],\n );\n\n const stepErrors = useMemo(\n () =>\n stepFieldNames.map((fields) =>\n fields.some((fieldName) => !!getFieldError?.(fieldName)),\n ),\n [stepFieldNames, getFieldError],\n );\n\n useEffect(() => {\n onStepErrorsChange?.(stepErrors);\n }, [onStepErrorsChange, stepErrors]);\n\n const isCurrentStepInvalid = stepErrors[currentStep] ?? false;\n const hasAnyStepErrors = stepErrors.some((hasError) => hasError);\n\n const changeStep = (index: number, fromHeader = false) => transitionStep({\n index,\n currentStep,\n stepCount,\n isCurrentStepInvalid,\n linear,\n fromHeader,\n visitedSteps,\n onActiveStepChange,\n onVisitedStepsChange,\n onChangeStep,\n });\n\n const isStepperBusy = isBusy || isSubmitting;\n\n const stepperList = (\n <ol\n {...pt?.list}\n className={['cratis-command-stepper__list', pt?.list?.className]\n .filter(Boolean)\n .join(' ')}\n data-cratis-part='list'\n data-part='list'\n data-busy={isStepperBusy || undefined}\n data-invalid={hasAnyStepErrors || undefined}\n >\n {panels.map((panel, index) => {\n const selected = index === currentStep;\n const visited = visitedSteps.has(index);\n const invalid = stepErrors[index] ?? false;\n const headerDisabled = linear && !selected;\n\n return (\n <li\n key={index}\n {...pt?.step}\n className={['cratis-command-stepper__step', pt?.step?.className]\n .filter(Boolean)\n .join(' ')}\n data-cratis-part='step'\n data-part='step'\n data-active={selected || undefined}\n data-selected={selected || undefined}\n data-visited={visited || undefined}\n data-invalid={invalid || undefined}\n data-busy={isStepperBusy || undefined}\n >\n <button\n {...pt?.header}\n type='button'\n id={pt?.header?.id ?? `${stepperId}-step-${index}`}\n className={[\n 'cratis-command-stepper__header',\n pt?.header?.className,\n ]\n .filter(Boolean)\n .join(' ')}\n data-cratis-part='header'\n data-part='header'\n data-busy={isStepperBusy || undefined}\n data-disabled={headerDisabled || undefined}\n data-invalid={invalid || undefined}\n data-selected={selected || undefined}\n data-visited={visited || undefined}\n disabled={headerDisabled}\n aria-current={selected ? 'step' : undefined}\n onClick={() => changeStep(index, true)}\n >\n <span\n {...pt?.number}\n className={[\n 'cratis-command-stepper__number',\n pt?.number?.className,\n ]\n .filter(Boolean)\n .join(' ')}\n style={pt?.number?.style}\n data-cratis-part='number'\n data-part='number'\n data-busy={isStepperBusy || undefined}\n data-invalid={invalid || undefined}\n data-selected={selected || undefined}\n data-visited={visited || undefined}\n >\n {index + 1}\n </span>\n <span\n {...pt?.title}\n className={[\n 'cratis-command-stepper__title',\n pt?.title?.className,\n ]\n .filter(Boolean)\n .join(' ')}\n data-cratis-part='title'\n data-part='title'\n data-busy={isStepperBusy || undefined}\n data-invalid={invalid || undefined}\n data-selected={selected || undefined}\n data-visited={visited || undefined}\n >\n {panel.props.header}\n </span>\n </button>\n {index < stepCount - 1 && (\n <span\n {...pt?.separator}\n className={[\n 'cratis-command-stepper__separator',\n pt?.separator?.className,\n ]\n .filter(Boolean)\n .join(' ')}\n data-cratis-part='separator'\n data-part='separator'\n data-busy={isStepperBusy || undefined}\n data-invalid={invalid || undefined}\n data-visited={visited || undefined}\n aria-hidden='true'\n />\n )}\n </li>\n );\n })}\n </ol>\n );\n\n const stepperPanels = (\n <div\n {...pt?.panels}\n className={['cratis-command-stepper__panels', pt?.panels?.className]\n .filter(Boolean)\n .join(' ')}\n data-cratis-part='panels'\n data-part='panels'\n data-busy={isStepperBusy || undefined}\n data-invalid={hasAnyStepErrors || undefined}\n >\n {panels.map((panel, index) => (\n <section\n key={index}\n {...pt?.panel}\n hidden={index !== currentStep}\n className={['cratis-command-stepper__panel', pt?.panel?.className]\n .filter(Boolean)\n .join(' ')}\n data-cratis-part='panel'\n data-part='panel'\n data-busy={isStepperBusy || undefined}\n data-invalid={stepErrors[index] || undefined}\n data-selected={index === currentStep || undefined}\n data-visited={visitedSteps.has(index) || undefined}\n aria-label={String(panel.props.header ?? `Step ${index + 1}`)}\n aria-labelledby={pt?.panel?.['aria-labelledby'] ?? (pt?.header?.id == null ? `${stepperId}-step-${index}` : undefined)}\n >\n {disableFieldsWhileSubmitting ? (\n <fieldset disabled={isSubmitting} inert={isSubmitting} style={{ display: 'contents' }}>\n {processChildren(panel.props.children)}\n </fieldset>\n ) : processChildren(panel.props.children)}\n </section>\n ))}\n </div>\n );\n\n return (\n <div\n className={`cratis-command-stepper cratis-command-stepper--${orientation}`}\n data-orientation={orientation}\n >\n {start}\n <div\n {...pt?.root}\n className={['cratis-command-stepper__root', pt?.root?.className]\n .filter(Boolean)\n .join(' ')}\n data-cratis-part='root'\n data-part='root'\n data-value={currentStep}\n data-orientation={orientation}\n data-busy={isStepperBusy || undefined}\n data-invalid={hasAnyStepErrors || undefined}\n >\n {headerPosition === 'bottom' ? (\n <>\n {stepperPanels}\n {stepperList}\n </>\n ) : (\n <>\n {stepperList}\n {stepperPanels}\n </>\n )}\n </div>\n {end}\n\n {showNavigation && (\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n gap: '0.75rem',\n }}\n >\n {!isFirstStep && (\n <Button\n variant='outline'\n onClick={() => changeStep(currentStep - 1)}\n disabled={isBusy}\n style={{ width: 'auto' }}\n >\n <span>{resolvedPreviousLabel}</span>\n </Button>\n )}\n <div style={{ flex: 1 }} />\n {!isLastStep && (\n <Button\n onClick={() => changeStep(currentStep + 1)}\n disabled={isBusy || isSubmitting || isCurrentStepInvalid}\n style={{ width: 'auto' }}\n >\n <span>{resolvedNextLabel}</span>\n </Button>\n )}\n {isLastStep && showSubmit && (\n <Button\n onClick={() => void onSubmit?.()}\n disabled={\n isBusy ||\n isSubmitting ||\n isSubmitDisabled ||\n hasAnyStepErrors\n }\n autoFocus\n style={{ width: 'auto' }}\n >\n {isSubmitting && (\n <span\n className='cratis-dialog__spinner'\n aria-hidden='true'\n />\n )}\n <span>{resolvedOkLabel}</span>\n </Button>\n )}\n </div>\n )}\n </div>\n );\n};\n"],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;;;AA4DA,MAAM,eAAe,GAAG,CAAC,QAA+C,KAAY;IAChF,IAAI,OAAO,QAAQ,KAAK,UAAU;AAAE,QAAA,OAAO,EAAE;AAC7C,IAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE;IACjC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,8BAA8B,CAAC;AACzD,IAAA,OAAO,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE;AAChC,CAAC;AAGD,MAAM,yBAAyB,GAAG,CAAC,KAAsB,KAAc;IACnE,MAAM,KAAK,GAAa,E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;GAoFG;AACH,QAAA,MAAM,6BAA6B,GAC/B,QAAQ,SAAS,MAAM,GAAG,MAAM,EAChC,SAAS,GAAG,MAAM,SAEX,yBAAyB,CAAC,QAAQ,EAAE,SAAS,CAAC,sBAgFxD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,sCAAgC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepperCommandDialog.js","sources":["../../../CommandDialog/StepperCommandDialog.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;AAuJA,MAAM,2BAA2B,GAAG,CAA8C,EAC9E,KAAK,EACL,OAAO,GAAG,IAAI,EACd,KAAK,GAAG,OAAO,EACf,KAAK,EACL,YAAY,EACZ,SAAS,GAAG,KAAK,EACjB,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,OAAO,EACP,SAAS,EACT,aAAa,EACb,UAAU,GAAG,KAAK,EAClB,WAAW,EACX,MAAM,GAAG,IAAI,EACb,WAAW,EACX,cAAc,EACd,KAAK,EACL,GAAG,EACH,YAAY,EACZ,EAAE,EACF,SAAS,EACT,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,eAAe,EACf,cAAc,EACd,QAAQ,GAC4C,KAAI;AACxD,IAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,yBAAyB,EAAE;AAChD,IAAA,MAAM,eAAe,GAAG,QAAQ,EAAE,OAAO;AACzC,IAAA,MAAM,cAAc,GAAG,QAAQ,EAAE,MAAM;IACvC,MAAM,eAAe,GAAG,OAAO,IAAI,eAAe,EAAE,MAAM,IAAI,QAAQ;IACtE,MAAM,iBAAiB,GAAG,SAAS,IAAI,eAAe,EAAE,IAAI,IAAI,MAAM;IACtE,MAAM,qBAAqB,GACvB,aAAa,IAAI,eA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EACZ,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAC9C,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,oBAAoB,EAC1C,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAAA,QAAA,EAE7B,QAAQ,EAAA,CACiB,EAAA,CACpB;AAEtB,CAAC;AAgBM,MAAM,oBAAoB,GAAG;;"}
|
|
1
|
+
{"version":3,"file":"StepperCommandDialog.js","sources":["../../../CommandDialog/StepperCommandDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport React, { useState, type CSSProperties } from 'react';\nimport { DialogResult, useDialogContext } from '@cratis/arc.react/dialogs';\nimport { Button } from '../Common/Button';\nimport { useCratisComponentsConfig } from '../Common/CratisComponentsProvider';\nimport {\n CommandForm,\n useCommandFormContext,\n useCommandInstance,\n type CommandFormProps,\n} from '@cratis/arc.react/commands';\nimport {\n Dialog,\n type DialogProps,\n type CloseDialog,\n type ConfirmCallback,\n type CancelCallback,\n} from '../Dialogs/Dialog';\nimport type { StepperCustomizationProps } from './CommandStepper';\nimport { CommandStepperContent } from './CommandStepperContent';\nimport type { BeforeExecuteCallback } from './applyBeforeExecute';\nimport type { ConfirmBeforeExecute } from './confirmBeforeExecute';\nimport { useCommandExecution } from './useCommandExecution';\nimport { getStepPanels } from './stepChildren';\nimport { transitionStep } from './transitionStep';\n\n/**\n * Props for {@link StepperCommandDialog}. Combines the command-form props,\n * the stepper customization props (`linear`, `pt`, …), and dialog-specific\n * props for the outer modal.\n *\n * The Stepper customization props (`pt`/`ptOptions`/`unstyled`) target the\n * inner Stepper. To customize the outer Dialog use `dialogPt`, `dialogPtOptions`,\n * `dialogUnstyled`, and `dialogClassName`.\n *\n * @typeParam TCommand - The command record type.\n * @typeParam TResponse - The response payload type returned by a successful command.\n */\nexport interface StepperCommandDialogProps<TCommand extends object, TResponse = object>\n extends\n Omit<CommandFormProps<TCommand, TResponse>, 'children' | 'onBeforeExecute'>,\n StepperCustomizationProps {\n /**\n * A transformer invoked with the current command values immediately before\n * the command executes on submit. It **must return** the values to run with\n * (mutated or not) — a callback that returns nothing does not execute the\n * command with `undefined`; the current values are kept and a warning is\n * logged. May be async.\n *\n * ⚠️ It runs **only on submit**, after every step has already been validated,\n * so a value produced here can never satisfy required-field validation. Seed\n * required values through `initialValues`; reserve `onBeforeExecute` for\n * transforms that do not affect validity (for example a generated id).\n */\n onBeforeExecute?: BeforeExecuteCallback<TCommand>;\n /**\n * Ask before executing the transformed command values; only `true` executes.\n * Fields are disabled from submit until the guarded submission settles. If command values change\n * during that time, execution is skipped; confirm the new values again.\n */\n confirmBeforeExecute?: ConfirmBeforeExecute<TCommand>;\n /** Dialog title text. */\n title: string;\n /** Controls dialog visibility. Defaults to `true`. */\n visible?: boolean;\n /** Dialog width. */\n width?: string;\n /** Custom CSS styles applied to the dialog. */\n style?: CSSProperties;\n /** Custom CSS styles applied to the dialog content area. */\n contentStyle?: CSSProperties;\n /** Whether the dialog can be resized. Defaults to `false`. */\n resizable?: boolean;\n /** Additional validity gate combined with command form validity. */\n isValid?: boolean;\n /** Fallback close callback. */\n onClose?: CloseDialog;\n /** Confirm callback — called only after successful command execution. */\n onConfirm?: ConfirmCallback;\n /**\n * Cancel callback — invoked for every dismissal that is not a successful submit: the X in the\n * dialog header, the Escape key, and the footer Cancel button when `showCancel` is on. Return\n * `true` to let the dialog close through the dialog context. None of the three is offered while\n * the command is executing.\n */\n onCancel?: CancelCallback;\n /** Label for the submit button shown on the last step when valid. Falls back to the provider's `stepper.submit` message, then `'Submit'`. */\n okLabel?: string;\n /** Label for the next step button. Falls back to the provider's `stepper.next` message, then `'Next'`. */\n nextLabel?: string;\n /** Label for the previous step button. Falls back to the provider's `stepper.previous` message, then `'Previous'`. */\n previousLabel?: string;\n /**\n * Show a Cancel action in the footer. Defaults to `false`, leaving the X in the header as the\n * only way to dismiss. Turn it on for a wizard whose dismissal should be as reachable as its\n * submit — a destructive or long flow, or one presented without a visible header.\n */\n showCancel?: boolean;\n /** Label for the footer cancel button. Falls back to the provider's `dialog.cancel` message, then `'Cancel'`. */\n cancelLabel?: string;\n /**\n * Extra CSS class name forwarded to the underlying Cratis Dialog root.\n * Use the inherited `pt`/`ptOptions`/`unstyled` props to customize the Stepper.\n */\n dialogClassName?: string;\n /** Cratis-owned per-part attributes applied to the outer Dialog. */\n dialogPt?: DialogProps['pt'];\n /**\n * @deprecated Cratis dialog parts always merge. Remove this renderer-era option.\n */\n dialogPtOptions?: DialogProps['ptOptions'];\n /**\n * @deprecated Components always uses consumer-owned CSS. Customize through `dialogPt` and CSS instead.\n */\n dialogUnstyled?: boolean;\n /** StepperPanel children defining each wizard step. */\n children?: React.ReactNode;\n}\n\ntype StepperCommandDialogWrapperProps<TCommand extends object, TResponse = object> = {\n title: string;\n visible?: boolean;\n width?: string;\n style?: CSSProperties;\n contentStyle?: CSSProperties;\n resizable?: boolean;\n isValid?: boolean;\n onClose?: CloseDialog;\n onConfirm?: ConfirmCallback;\n onCancel?: CancelCallback;\n onSuccess?: CommandFormProps<TCommand, TResponse>['onSuccess'];\n onValidationFailure?: CommandFormProps<TCommand, TResponse>['onValidationFailure'];\n onFailed?: CommandFormProps<TCommand, TResponse>['onFailed'];\n onException?: CommandFormProps<TCommand, TResponse>['onException'];\n onUnauthorized?: CommandFormProps<TCommand, TResponse>['onUnauthorized'];\n onBeforeExecute?: BeforeExecuteCallback<TCommand>;\n confirmBeforeExecute?: ConfirmBeforeExecute<TCommand>;\n okLabel?: string;\n nextLabel?: string;\n previousLabel?: string;\n showCancel?: boolean;\n cancelLabel?: string;\n dialogClassName?: string;\n dialogPt?: DialogProps['pt'];\n dialogPtOptions?: DialogProps['ptOptions'];\n dialogUnstyled?: boolean;\n children?: React.ReactNode;\n} & StepperCustomizationProps;\n\nconst StepperCommandDialogWrapper = <TCommand extends object, TResponse = object>({\n title,\n visible = true,\n width = '600px',\n style,\n contentStyle,\n resizable = false,\n isValid,\n onClose,\n onConfirm,\n onCancel,\n onSuccess,\n onValidationFailure,\n onFailed,\n onException,\n onUnauthorized,\n onBeforeExecute,\n confirmBeforeExecute,\n okLabel,\n nextLabel,\n previousLabel,\n showCancel = false,\n cancelLabel,\n linear = true,\n orientation,\n headerPosition,\n start,\n end,\n onChangeStep,\n pt,\n ptOptions,\n unstyled,\n dialogClassName,\n dialogPt,\n dialogPtOptions,\n dialogUnstyled,\n children,\n}: StepperCommandDialogWrapperProps<TCommand, TResponse>) => {\n const { messages } = useCratisComponentsConfig();\n const stepperMessages = messages?.stepper;\n const dialogMessages = messages?.dialog;\n const resolvedOkLabel = okLabel ?? stepperMessages?.submit ?? 'Submit';\n const resolvedNextLabel = nextLabel ?? stepperMessages?.next ?? 'Next';\n const resolvedPreviousLabel =\n previousLabel ?? stepperMessages?.previous ?? 'Previous';\n const resolvedCancelLabel = cancelLabel ?? dialogMessages?.cancel ?? 'Cancel';\n const {\n setCommandValues,\n setCommandResult,\n isValid: isCommandFormValid,\n getFieldError,\n } = useCommandFormContext<TCommand>();\n const commandInstance = useCommandInstance<TCommand>();\n const submission = useCommandExecution<TCommand, TResponse>(\n commandInstance, setCommandValues, onBeforeExecute, confirmBeforeExecute, onException,\n );\n const isBusy = submission.isSubmitting;\n const [activeStep, setActiveStep] = useState(0);\n const [visitedSteps, setVisitedSteps] = useState<Set<number>>(new Set([0]));\n const [stepErrors, setStepErrors] = useState<boolean[]>([]);\n\n // useDialogContext() is called unconditionally on every render — the try/catch only suppresses\n // the exception when the dialog is used standalone (outside a provider). React's Rules of Hooks\n // are not violated because the hook is always called; the try/catch never skips the call.\n let contextCloseDialog: ((result: DialogResult) => void) | undefined;\n try {\n const context = useDialogContext();\n contextCloseDialog = context?.closeDialog;\n } catch {\n contextCloseDialog = undefined;\n }\n\n // Only the steps that actually render count. That count is not fixed: a conditional step\n // (`{condition && <StepperPanel/>}`) can disappear after the user has already advanced past\n // it — a late-resolving query or a `currentValues` overlay flipping the condition is enough.\n // The step the wizard is on is therefore clamped into the set that still renders, and the\n // last/first tests are inequalities, so an index left stranded above the end still resolves\n // to the last surviving step instead of a step that is neither last nor navigable. Same\n // shape as CommandStepperContent, which this dialog's body is.\n const stepCount = getStepPanels(children).length;\n const currentStep = Math.min(Math.max(activeStep, 0), Math.max(stepCount - 1, 0));\n const isLastStep = currentStep >= stepCount - 1;\n const isFirstStep = currentStep <= 0;\n const isDialogValid = isValid !== false && isCommandFormValid;\n const isCurrentStepInvalid = stepErrors[currentStep] ?? false;\n const changeStep = (index: number) => transitionStep({\n index,\n currentStep,\n stepCount,\n isCurrentStepInvalid,\n linear,\n visitedSteps,\n onActiveStepChange: setActiveStep,\n onVisitedStepsChange: setVisitedSteps,\n onChangeStep,\n });\n\n // Both close paths this wrapper owns — the footer Cancel and the successful Submit — run the\n // caller's gate before closing through the dialog host. The header X and Escape are owned by\n // the outer Cratis Dialog instead, which runs the same `onCancel` / `onClose` callbacks; that\n // keeps one contract for the caller no matter which affordance was used.\n const handleClose = async (result: DialogResult) => {\n let shouldCloseThroughContext = true;\n\n if (result === DialogResult.Ok || result === DialogResult.Yes) {\n if (onConfirm) {\n const closeResult = await onConfirm();\n shouldCloseThroughContext = closeResult === true;\n } else if (onClose) {\n const closeResult = await onClose(result);\n shouldCloseThroughContext = closeResult !== false;\n }\n } else if (onCancel) {\n const closeResult = await onCancel();\n shouldCloseThroughContext = closeResult === true;\n } else if (onClose) {\n const closeResult = await onClose(result);\n shouldCloseThroughContext = closeResult !== false;\n }\n\n if (shouldCloseThroughContext) {\n contextCloseDialog?.(result);\n }\n };\n\n // Busy is set before anything is awaited, not just around execute(). `onBeforeExecute` may be\n // async, and from the moment Submit is pressed the dialog is committed to running the command -\n // so every dismissal has to be withdrawn for the whole window, not only for the part of it the\n // request is in flight. Setting it after the transform would leave Cancel live while the command\n // is already on its way: the operator cancels, the dialog closes reporting cancellation, the\n // transform resolves, and the command executes anyway. The `finally` is what releases it, so the\n // flag is cleared on the failure paths and on a transform that throws just as it is on success.\n // Result callbacks run after the submission releases busy.\n const handleSubmit = async () => {\n const result = await submission.run();\n if (!result) return;\n\n if (!result.isSuccess) {\n await onFailed?.(result);\n if (result.hasExceptions) {\n await onException?.(result.exceptionMessages, result.exceptionStackTrace);\n }\n if (!result.isAuthorized) await onUnauthorized?.();\n if (!result.isValid) {\n await onValidationFailure?.(result.validationResults);\n }\n if (submission.isMounted()) setCommandResult(result);\n return;\n }\n\n await onSuccess?.(result.response as TResponse);\n await handleClose(DialogResult.Ok);\n };\n\n const footer = (\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n gap: '0.75rem',\n }}\n >\n {showCancel && (\n <Button\n variant='outline'\n onClick={() => handleClose(DialogResult.Cancelled)}\n disabled={isBusy}\n style={{ width: 'auto' }}\n >\n <span>{resolvedCancelLabel}</span>\n </Button>\n )}\n {!isFirstStep && (\n <Button\n variant='outline'\n onClick={() => changeStep(currentStep - 1)}\n disabled={isBusy}\n style={{ width: 'auto' }}\n >\n <span>{resolvedPreviousLabel}</span>\n </Button>\n )}\n <div style={{ flex: 1 }} />\n {!isLastStep && (\n <Button\n onClick={() => changeStep(currentStep + 1)}\n disabled={isBusy || isCurrentStepInvalid}\n style={{ width: 'auto' }}\n >\n <span>{resolvedNextLabel}</span>\n </Button>\n )}\n {isLastStep && isDialogValid && (\n <Button\n onClick={handleSubmit}\n disabled={isBusy}\n autoFocus\n style={{ width: 'auto' }}\n >\n {isBusy && (\n <span className='cratis-dialog__spinner' aria-hidden='true' />\n )}\n <span>{resolvedOkLabel}</span>\n </Button>\n )}\n </div>\n );\n\n // The header X and the Escape key are withdrawn on the same flag as the footer Cancel. A\n // dismissal that still worked mid-flight would close the dialog and then let onSuccess fire on\n // a dialog that is already gone. `dismissable` is the single switch on the Cratis Dialog that\n // governs all three affordances — the header close button, the backdrop click\n // and `closeOnEscape` — so withdrawing it withdraws every dismissal at once.\n return (\n <Dialog\n title={title}\n visible={visible}\n width={width}\n style={style}\n contentStyle={contentStyle}\n resizable={resizable}\n dismissable={!isBusy}\n buttons={footer}\n onCancel={onCancel}\n onClose={onClose}\n className={dialogClassName}\n pt={dialogPt}\n ptOptions={dialogPtOptions}\n unstyled={dialogUnstyled}\n >\n <CommandStepperContent\n activeStep={currentStep}\n visitedSteps={visitedSteps}\n getFieldError={getFieldError}\n onActiveStepChange={setActiveStep}\n onVisitedStepsChange={setVisitedSteps}\n onStepErrorsChange={setStepErrors}\n showNavigation={false}\n showSubmit={false}\n isSubmitting={confirmBeforeExecute !== undefined && isBusy}\n disableFieldsWhileSubmitting={confirmBeforeExecute !== undefined}\n linear={linear}\n orientation={orientation}\n headerPosition={headerPosition}\n start={start}\n end={end}\n onChangeStep={onChangeStep}\n pt={pt}\n ptOptions={ptOptions}\n unstyled={unstyled}\n >\n {children}\n </CommandStepperContent>\n </Dialog>\n );\n};\n\n/**\n * A multi-step wizard dialog backed by a single Cratis Arc command. Wraps\n * the Cratis-owned Stepper inside a Cratis {@link Dialog}, tracks per-step\n * visit state, surfaces inline error indicators on steps with invalid\n * fields, and executes the bound command when the user submits the last\n * step. Use it when one command has enough fields that they should be\n * broken into named stages; for single-stage commands, use\n * {@link CommandDialog}.\n *\n * ## What `TCommand` is\n *\n * `TCommand` is the auto-generated TypeScript class produced by the Arc\n * proxy generator from a C# `[Command]` record. The wizard fields all bind\n * to properties on this single command — the multi-step UI is purely a\n * presentation grouping of one command's fields, not multiple commands.\n *\n * ## What's unique vs. {@link CommandDialog}\n *\n * - **Progressive disclosure**: fields are grouped into `<StepperPanel>`\n * children and the user advances through them with explicit Previous /\n * Next buttons before reaching Submit on the last step.\n * - **Per-step error indicators**: the step number circle paints red when\n * any field inside that step has a validation error and the step has\n * been visited, so a long wizard doesn't hide a single-field error on\n * page 1 behind page 4. The CratisStepper handles this by reading\n * `getFieldError` from the form context and inspecting which fields\n * belong to which step.\n * - **Visited tracking**: only visited steps show error indicators; an\n * un-visited step is never marked red just because its fields are blank.\n * - **Linear mode (default)**: the user must complete a step before\n * advancing. Set `linear={false}` to allow free navigation.\n * - **Submit only fires on the last step**: the command runs through Arc's\n * command pipeline only when the user clicks the final Submit button —\n * not on every Next click. Failure paths\n * (`onValidationFailure` / `onFailed`) work exactly like\n * {@link CommandDialog}: dialog stays open, errors surface back to the\n * form.\n *\n * ## Typed dialog host usage\n *\n * Same pattern as {@link CommandDialog} — combine with\n * `useDialog<CommandResult<TResponse>>()` from `@cratis/arc.react/dialogs`\n * to get a fully-typed result at the call site:\n *\n * ```tsx\n * import { useDialog, DialogResult } from '@cratis/arc.react/dialogs';\n * import { StepperCommandDialog, StepperPanel } from '@cratis/components/CommandDialog';\n * import { RegisterOrder } from './RegisterOrder'; // proxy from C#\n *\n * const RegisterOrderDialog = () => {\n * const { closeDialog } = useDialogContext<CommandResult<RegisterOrderResponse>>();\n * return (\n * <StepperCommandDialog<RegisterOrder, RegisterOrderResponse>\n * command={RegisterOrder}\n * title=\"New order\"\n * onSuccess={() => closeDialog(DialogResult.Ok)}\n * onCancel={() => closeDialog(DialogResult.Cancelled)}>\n * <StepperPanel header=\"Customer\">\n * <InputTextField value={c => c.customerName} title=\"Name\" />\n * <InputTextField value={c => c.email} title=\"Email\" />\n * </StepperPanel>\n * <StepperPanel header=\"Items\">\n * <ChipsField value={c => c.items} title=\"Items\" />\n * <NumberField value={c => c.quantity} title=\"Quantity\" min={1} />\n * </StepperPanel>\n * <StepperPanel header=\"Confirm\">\n * <CheckboxField value={c => c.confirmed} label=\"I confirm the order\" />\n * </StepperPanel>\n * </StepperCommandDialog>\n * );\n * };\n * ```\n *\n * ## Styling\n *\n * The inherited `pt` / `ptOptions` / `unstyled` props target the inner\n * **Stepper**. Use `dialogPt` / `dialogPtOptions` / `dialogUnstyled` /\n * `dialogClassName` to style the outer **Dialog** independently. See the\n * [pass-through cheat sheet](../../Documentation/Styling/pass-through.md)\n * for the slot reference.\n *\n * @typeParam TCommand - The command class (proxy generated from C# `[Command]`).\n * @typeParam TResponse - The success payload type returned by the command's `Handle()` method on the backend.\n * @param props - {@link StepperCommandDialogProps}.\n */\nconst StepperCommandDialogComponent = <\n TCommand extends object = object,\n TResponse = object,\n>(\n props: StepperCommandDialogProps<TCommand, TResponse>,\n) => {\n const {\n title,\n visible,\n width,\n style,\n contentStyle,\n resizable,\n isValid,\n onClose,\n onConfirm,\n onCancel,\n onBeforeExecute,\n confirmBeforeExecute,\n okLabel,\n nextLabel,\n previousLabel,\n showCancel,\n cancelLabel,\n linear,\n orientation,\n headerPosition,\n start,\n end,\n onChangeStep,\n pt,\n ptOptions,\n unstyled,\n dialogClassName,\n dialogPt,\n dialogPtOptions,\n dialogUnstyled,\n children,\n ...commandFormProps\n } = props;\n\n return (\n <CommandForm<TCommand, TResponse> {...commandFormProps}>\n <StepperCommandDialogWrapper<TCommand, TResponse>\n title={title}\n visible={visible}\n width={width}\n style={style}\n contentStyle={contentStyle}\n resizable={resizable}\n isValid={isValid}\n onClose={onClose}\n onConfirm={onConfirm}\n onCancel={onCancel}\n onSuccess={props.onSuccess}\n onValidationFailure={props.onValidationFailure}\n onFailed={props.onFailed}\n onException={props.onException}\n onUnauthorized={props.onUnauthorized}\n onBeforeExecute={onBeforeExecute}\n confirmBeforeExecute={confirmBeforeExecute}\n okLabel={okLabel}\n nextLabel={nextLabel}\n previousLabel={previousLabel}\n showCancel={showCancel}\n cancelLabel={cancelLabel}\n linear={linear}\n orientation={orientation}\n headerPosition={headerPosition}\n start={start}\n end={end}\n onChangeStep={onChangeStep}\n pt={pt}\n ptOptions={ptOptions}\n unstyled={unstyled}\n dialogClassName={dialogClassName}\n dialogPt={dialogPt}\n dialogPtOptions={dialogPtOptions}\n dialogUnstyled={dialogUnstyled}\n >\n {children}\n </StepperCommandDialogWrapper>\n </CommandForm>\n );\n};\n\n/**\n * A multi-step wizard dialog backed by a single Cratis Arc command. Wraps\n * the Cratis-owned Stepper inside a Cratis {@link Dialog}, tracks per-step\n * visit state, surfaces inline error indicators on steps with invalid\n * fields, and executes the bound command when the user submits the last\n * step. Use it when one command has enough fields that they should be\n * broken into named stages; for single-stage commands, use\n * {@link CommandDialog}.\n *\n * See {@link StepperCommandDialogComponent} for full documentation.\n *\n * @typeParam TCommand - The command class (proxy generated from C# `[Command]`).\n * @typeParam TResponse - The success payload type returned by the command's `Handle()` method on the backend.\n */\nexport const StepperCommandDialog = StepperCommandDialogComponent;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;AAuJA,MAAM,2BAA2B,GAAG,CAA8C,EAC9E,KAAK,EACL,OAAO,GAAG,IAAI,EACd,KAAK,GAAG,OAAO,EACf,KAAK,EACL,YAAY,EACZ,SAAS,GAAG,KAAK,EACjB,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,eAAe,EACf,oBAAoB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AAE,YAAY,EAC1B,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAAA,QAAA,EAE7B,QAAQ,EAAA,CACiB,EAAA,CACpB;AAEtB,CAAC;AAgBM,MAAM,oBAAoB,GAAG;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepperPanel.js","sources":["../../../CommandDialog/StepperPanel.tsx"],"sourcesContent":[null],"names":[],"mappings":"AAuCO,MAAM,YAAY,GAAG,CAAC,MAAyB,KAClD;AACJ,YAAY,CAAC,WAAW,GAAG,cAAc;;"}
|
|
1
|
+
{"version":3,"file":"StepperPanel.js","sources":["../../../CommandDialog/StepperPanel.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport React from 'react';\n\n/**\n * Props for {@link StepperPanel}.\n */\nexport interface StepperPanelProps {\n /**\n * Content shown in the step's header (the label next to the step number).\n * Accepts a string or any node, so a custom/template header works as it did\n * with earlier renderer-specific step panels.\n */\n header?: React.ReactNode;\n /** The command form fields that make up this step. */\n children?: React.ReactNode;\n}\n\n/**\n * Declares a single step of a {@link CommandStepper} / {@link StepperCommandDialog}\n * wizard. Group the command form fields that belong to a step inside a\n * `<StepperPanel header=\"…\">`; the enclosing stepper reads each panel's\n * `header` and `children` to build the Cratis-owned step header and matching\n * content panel.\n *\n * It is a pure marker: it is never rendered on its own — the parent stepper consumes\n * its props — so it renders nothing when mounted directly.\n *\n * ```tsx\n * import { StepperPanel } from '@cratis/components/CommandDialog';\n *\n * <StepperPanel header=\"Basics\">\n * <InputTextField value={c => c.name} title=\"Name\" />\n * </StepperPanel>\n * ```\n *\n * @param props - {@link StepperPanelProps}.\n */\nexport const StepperPanel = (_props: StepperPanelProps): React.ReactElement | null =>\n null;\nStepperPanel.displayName = 'StepperPanel';\n"],"names":[],"mappings":"AAuCO,MAAM,YAAY,GAAG,CAAC,MAAyB,KAClD;AACJ,YAAY,CAAC,WAAW,GAAG,cAAc;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyBeforeExecute.js","sources":["../../../CommandDialog/applyBeforeExecute.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"applyBeforeExecute.js","sources":["../../../CommandDialog/applyBeforeExecute.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * A transformer invoked with the current command values immediately before the\n * command executes. It **must return** the values to run with (mutated or not),\n * and may do so asynchronously.\n *\n * ⚠️ It runs **only on submit**, after the form has already been validated — so a\n * value produced here can never satisfy required-field validation and the submit\n * button stays disabled if you rely on it for a required value. Seed required\n * values through `initialValues`; reserve `onBeforeExecute` for transforms that do\n * not affect validity (for example a generated id).\n *\n * @typeParam TCommand - The command values type.\n */\nexport type BeforeExecuteCallback<TCommand> = (values: TCommand) => TCommand | Promise<TCommand>;\n\n/**\n * Applies an `onBeforeExecute` transformer safely.\n *\n * The typed callback contract requires the transformed values to be returned, but\n * JavaScript consumers (and mistyped call sites) can still return `undefined` by\n * using the callback as a side-effect hook. Executing with `undefined` would wipe\n * every command value — silent data loss at submit time. This guard treats a\n * missing return as \"keep the current values\" and warns, so the command always\n * executes with a real object.\n *\n * A **synchronous** callback is applied synchronously (the result is returned\n * directly, not wrapped in a promise) so the command values are set before the same\n * tick's execution proceeds; an **async** callback returns a promise to await.\n *\n * @typeParam TCommand - The command values type.\n * @param onBeforeExecute - The transformer to apply (sync or async).\n * @param currentValues - The command values to transform.\n * @returns The transformed values, or `currentValues` when the callback returned nothing.\n */\nexport function applyBeforeExecute<TCommand>(\n onBeforeExecute: BeforeExecuteCallback<TCommand>,\n currentValues: TCommand\n): TCommand | Promise<TCommand> {\n const transformed = onBeforeExecute(currentValues);\n if (transformed instanceof Promise) {\n return transformed.then((resolved) => keepCurrentWhenMissing(resolved, currentValues));\n }\n return keepCurrentWhenMissing(transformed, currentValues);\n}\n\nfunction keepCurrentWhenMissing<TCommand>(transformed: TCommand | undefined, currentValues: TCommand): TCommand {\n if (transformed === undefined) {\n console.warn(\n 'onBeforeExecute returned no value. It is a transformer and must return the command values ' +\n '(mutated or not). Keeping the current values so the command does not execute with undefined. ' +\n 'If you only need a side effect, return the values you received.'\n );\n return currentValues;\n }\n return transformed;\n}\n"],"names":[],"mappings":"AAqCM,SAAU,kBAAkB,CAC9B,eAAgD,EAChD,aAAuB,EAAA;AAEvB,IAAA,MAAM,WAAW,GAAG,eAAe,CAAC,aAAa,CAAC;AAClD,IAAA,IAAI,WAAW,YAAY,OAAO,EAAE;AAChC,QAAA,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,sBAAsB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAC1F;AACA,IAAA,OAAO,sBAAsB,CAAC,WAAW,EAAE,aAAa,CAAC;AAC7D;AAEA,SAAS,sBAAsB,CAAW,WAAiC,EAAE,aAAuB,EAAA;AAChG,IAAA,IAAI,WAAW,KAAK,SAAS,EAAE;QAC3B,OAAO,CAAC,IAAI,CACR,4FAA4F;YAC5F,+FAA+F;AAC/F,YAAA,iEAAiE,CACpE;AACD,QAAA,OAAO,aAAa;IACxB;AACA,IAAA,OAAO,WAAW;AACtB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandValuesUnchanged.js","sources":["../../../CommandDialog/commandValuesUnchanged.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"commandValuesUnchanged.js","sources":["../../../CommandDialog/commandValuesUnchanged.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { JsonSerializer } from '@cratis/fundamentals';\n\n// Arc serializes a payload object; this also preserves its handling of optional undefined properties.\nconst serializeProperty = (name: string, value: unknown): string => JsonSerializer.serialize({ [name]: value });\n\n/** Capture only the properties Arc will send, before an asynchronous confirmation can change them. */\nexport const snapshotCommandValues = (command: object): Record<string, string> => {\n const instance = command as { propertyDescriptors: { name: string }[] };\n const values = command as Record<string, unknown>;\n const snapshot: Record<string, string> = {};\n for (const { name } of instance.propertyDescriptors ?? []) {\n snapshot[name] = serializeProperty(name, values[name]);\n }\n return snapshot;\n};\n\n/** A changed form value invalidates approval, even if it is nested in a command property. */\nexport const commandValuesUnchanged = (command: object, snapshot: Record<string, string>): boolean => {\n const instance = command as { propertyDescriptors: { name: string }[] };\n const values = command as Record<string, unknown>;\n const descriptors = instance.propertyDescriptors ?? [];\n return descriptors.length === Object.keys(snapshot).length &&\n descriptors.every(({ name }) => Object.hasOwn(snapshot, name) && snapshot[name] === serializeProperty(name, values[name]));\n};\n"],"names":[],"mappings":";;AAMA,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,KAAc,KAAa,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,GAAG,KAAK,EAAE,CAAC;AAGxG,MAAM,qBAAqB,GAAG,CAAC,OAAe,KAA4B;IAC7E,MAAM,QAAQ,GAAG,OAAsD;IACvE,MAAM,MAAM,GAAG,OAAkC;IACjD,MAAM,QAAQ,GAA2B,EAAE;IAC3C,KAAK,MAAM,EAAE,IAAI,EAAE,IAAI,QAAQ,CAAC,mBAAmB,IAAI,EAAE,EAAE;AACvD,QAAA,QAAQ,CAAC,IAAI,CAAC,GAAG,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAC1D;AACA,IAAA,OAAO,QAAQ;AACnB;MAGa,sBAAsB,GAAG,CAAC,OAAe,EAAE,QAAgC,KAAa;IACjG,MAAM,QAAQ,GAAG,OAAsD;IACvE,MAAM,MAAM,GAAG,OAAkC;AACjD,IAAA,MAAM,WAAW,GAAG,QAAQ,CAAC,mBAAmB,IAAI,EAAE;IACtD,OAAO,WAAW,CAAC,MAAM,KAAK,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM;AACtD,QAAA,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAClI;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirmBeforeExecute.js","sources":["../../../CommandDialog/confirmBeforeExecute.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"confirmBeforeExecute.js","sources":["../../../CommandDialog/confirmBeforeExecute.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * Receives values after onBeforeExecute; only `true` approves execution.\n * If command property values change while confirmation is pending, approval is\n * discarded without executing or reporting a result. Confirm the new values again.\n */\nexport type ConfirmBeforeExecute<TCommand> = (values: TCommand) => boolean | Promise<boolean>;\n\n/** Report a rejected guard through the same exception callback used for command failures. */\nexport const reportConfirmationError = async (\n error: unknown,\n onException?: (messages: string[], stackTrace: string) => void | Promise<void>,\n) => {\n const exception = error instanceof Error ? error : new Error(String(error));\n if (onException) {\n await onException([exception.message], exception.stack ?? '');\n } else {\n console.error(exception);\n }\n};\n"],"names":[],"mappings":"AAWO,MAAM,uBAAuB,GAAG,OACnC,KAAc,EACd,WAA8E,KAC9E;IACA,MAAM,SAAS,GAAG,KAAK,YAAY,KAAK,GAAG,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3E,IAAI,WAAW,EAAE;AACb,QAAA,MAAM,WAAW,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,KAAK,IAAI,EAAE,CAAC;IACjE;SAAO;AACH,QAAA,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC;IAC5B;AACJ;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../CommandDialog/index.ts"],"names":[],"mappings":"AAGA,cAAc,yBAAsB,CAAC;AACrC,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAAwB,CAAC;AACnE,cAAc,oBAAiB,CAAC;AAChC,cAAc,qBAAkB,CAAC;AACjC,cAAc,2BAAwB,CAAC;AACvC,cAAc,mBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepChildren.js","sources":["../../../CommandDialog/stepChildren.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAwBM,SAAU,aAAa,CAAC,QAAyB,EAAA;IACnD,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,KAAkC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AACvH;;"}
|
|
1
|
+
{"version":3,"file":"stepChildren.js","sources":["../../../CommandDialog/stepChildren.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport React from 'react';\n\n/**\n * Gets the step panels a stepper will actually render, in render order.\n *\n * A conditional step is written as `{condition && <StepperPanel/>}` — which yields\n * `false` when the condition does not hold — and explicit `null` / `undefined` children\n * are just as common. `React.Children.count` counts those, so anything deriving a step\n * count from it believes the wizard has more steps than it renders: navigation runs past\n * the last real panel and the per-step validation gate reads off the end of its array.\n *\n * `React.Children.toArray` already drops `null`, `undefined` and booleans; filtering to\n * valid elements additionally drops bare text children, which are not steps either.\n *\n * Fragments are deliberately **not** flattened — a `<>…</>` wrapping several panels stays\n * one entry, which is the behavior the stepper has always had. Supporting fragments as a\n * container for multiple steps is a separate, additive change.\n *\n * @param children - The stepper children to inspect.\n * @returns The child elements that render as steps.\n */\nexport function getStepPanels(children: React.ReactNode): React.ReactElement[] {\n return React.Children.toArray(children).filter((child): child is React.ReactElement => React.isValidElement(child));\n}\n"],"names":[],"mappings":";;AAwBM,SAAU,aAAa,CAAC,QAAyB,EAAA;IACnD,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,KAAkC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AACvH;;"}
|
|
@@ -14,3 +14,4 @@ type StepTransition = {
|
|
|
14
14
|
/** One navigation gate for both wizard footers and their step headers. */
|
|
15
15
|
export declare const transitionStep: ({ index, currentStep, stepCount, isCurrentStepInvalid, linear, fromHeader, visitedSteps, onActiveStepChange, onVisitedStepsChange, onChangeStep, }: StepTransition) => void;
|
|
16
16
|
export {};
|
|
17
|
+
//# sourceMappingURL=transitionStep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transitionStep.d.ts","sourceRoot":"","sources":["../../../CommandDialog/transitionStep.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAkB,CAAC;AAE3D,KAAK,cAAc,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IAC3D,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,cAAc,uJAWxB,cAAc,SAchB,CAAC"}
|