@declarion/react 0.141.0 → 0.146.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/dist-lib/{Icons-Dzl-AkD_.d.ts → Icons-BdXCxyw3.d.ts} +0 -4
- package/dist-lib/api/access-expiry.js +1 -2
- package/dist-lib/api/agents.js +1 -2
- package/dist-lib/api/audience.js +1 -2
- package/dist-lib/api/auth-redirect.js +1 -2
- package/dist-lib/api/auth.js +1 -2
- package/dist-lib/api/batch.js +1 -2
- package/dist-lib/api/client.js +27 -28
- package/dist-lib/api/data.js +23 -24
- package/dist-lib/api/entities.js +36 -37
- package/dist-lib/api/events.js +6 -7
- package/dist-lib/api/fileReferences.js +1 -2
- package/dist-lib/api/params.js +1 -2
- package/dist-lib/api/properties.js +1 -2
- package/dist-lib/api/request-bounds.js +1 -2
- package/dist-lib/api/schema.js +5 -6
- package/dist-lib/api/session-renewal.js +6 -7
- package/dist-lib/api/status.js +1 -2
- package/dist-lib/app.js +154 -155
- package/dist-lib/components/actions/ActionButton.js +32 -33
- package/dist-lib/components/actions/ActionDialog.js +85 -86
- package/dist-lib/components/actions/ActionResultDialog.impl.js +48 -49
- package/dist-lib/components/actions/ActionResultDialog.js +1 -2
- package/dist-lib/components/actions/ActionRunner.js +96 -97
- package/dist-lib/components/actions/ObjectActionBar.js +49 -50
- package/dist-lib/components/actions/PropertyGridEditor.js +50 -51
- package/dist-lib/components/actions/ResponsiveActionBar.js +127 -128
- package/dist-lib/components/actions/RowActionsKebab.js +27 -28
- package/dist-lib/components/agents/AgentChatPanel.impl.js +317 -318
- package/dist-lib/components/agents/AgentChatPanel.js +1 -2
- package/dist-lib/components/agents/AgentConversationDrawer.js +6 -7
- package/dist-lib/components/agents/AgentElicitForm.js +13 -14
- package/dist-lib/components/agents/AgentOpenFollower.impl.js +1 -2
- package/dist-lib/components/agents/AgentOpenFollower.js +1 -2
- package/dist-lib/components/agents/AgentPicker.js +1 -2
- package/dist-lib/components/agents/ChatAttachments.js +22 -23
- package/dist-lib/components/agents/transcript-runs.js +1 -2
- package/dist-lib/components/chrome/AssociationTabs.js +44 -45
- package/dist-lib/components/chrome/AuditMetaStrip.js +1 -2
- package/dist-lib/components/chrome/Breadcrumbs.js +1 -2
- package/dist-lib/components/chrome/HighlightsStrip.js +1 -2
- package/dist-lib/components/chrome/PageHeader.js +12 -13
- package/dist-lib/components/chrome/PageShell.js +1 -2
- package/dist-lib/components/chrome/RecordHeader.js +1 -2
- package/dist-lib/components/chrome/headerActionZone.js +0 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.js +463 -464
- package/dist-lib/components/detail-layout/AssociatedToolbar.js +43 -44
- package/dist-lib/components/detail-layout/ChildrenBlock.js +24 -25
- package/dist-lib/components/detail-layout/ChildrenCards.js +29 -30
- package/dist-lib/components/detail-layout/ChildrenList.js +23 -24
- package/dist-lib/components/detail-layout/ChildrenTable.js +50 -51
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +164 -165
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +14 -15
- package/dist-lib/components/detail-layout/DetailHighlights.js +23 -24
- package/dist-lib/components/detail-layout/DraggableChildrenTable.js +76 -77
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +90 -91
- package/dist-lib/components/detail-layout/ErrorSummary.js +7 -8
- package/dist-lib/components/detail-layout/EvidenceBlock.js +15 -16
- package/dist-lib/components/detail-layout/FieldRow.js +11 -12
- package/dist-lib/components/detail-layout/FieldsBlock.js +31 -32
- package/dist-lib/components/detail-layout/LayoutColumn.js +1 -2
- package/dist-lib/components/detail-layout/LayoutRenderer.js +11 -12
- package/dist-lib/components/detail-layout/LayoutRow.js +1 -2
- package/dist-lib/components/detail-layout/LayoutTabs.js +23 -24
- package/dist-lib/components/detail-layout/PropertiesBlock.js +38 -39
- package/dist-lib/components/detail-layout/QuickAddForm.js +28 -29
- package/dist-lib/components/detail-layout/SectionBlock.js +9 -10
- package/dist-lib/components/detail-layout/StatusesBlock.js +1 -2
- package/dist-lib/components/detail-layout/TimelineComposer.js +19 -20
- package/dist-lib/components/detail-layout/blockMeta.js +1 -2
- package/dist-lib/components/detail-layout/useManualColumnResize.js +1 -2
- package/dist-lib/components/detail-layout/useQuickAdd.js +21 -22
- package/dist-lib/components/detail-layout/visibility.js +1 -2
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +25 -26
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +18 -19
- package/dist-lib/components/detail-layout/widgets/MonacoJson.js +1 -2
- package/dist-lib/components/detail-layout/widgets/WidgetHost.js +10 -11
- package/dist-lib/components/detail-layout/widgets/builtins.js +1 -2
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +1 -2
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +1 -2
- package/dist-lib/components/detail-layout/widgets/registry.js +1 -2
- package/dist-lib/components/fields/BoolField.js +1 -2
- package/dist-lib/components/fields/EmailField.js +5 -6
- package/dist-lib/components/fields/EnumField.js +7 -8
- package/dist-lib/components/fields/FileReferenceField.js +18 -19
- package/dist-lib/components/fields/IntArrayField.js +11 -12
- package/dist-lib/components/fields/JsonEditor.js +1 -2
- package/dist-lib/components/fields/JsonField.js +1 -2
- package/dist-lib/components/fields/MultilangArrayField.js +22 -23
- package/dist-lib/components/fields/MultilangField.js +13 -14
- package/dist-lib/components/fields/MultilangTextField.js +13 -14
- package/dist-lib/components/fields/NumberField.js +5 -6
- package/dist-lib/components/fields/PasswordField.js +1 -2
- package/dist-lib/components/fields/PhoneField.js +24 -25
- package/dist-lib/components/fields/RefCombobox.js +42 -43
- package/dist-lib/components/fields/RefField.js +14 -15
- package/dist-lib/components/fields/RichTextField.js +29 -30
- package/dist-lib/components/fields/SecretField.js +1 -2
- package/dist-lib/components/fields/StringArrayField.js +29 -30
- package/dist-lib/components/fields/StringField.js +12 -13
- package/dist-lib/components/fields/StructureField.js +60 -61
- package/dist-lib/components/fields/TextField.js +18 -19
- package/dist-lib/components/fields/TimestampField.js +17 -18
- package/dist-lib/components/fields/UrlField.js +5 -6
- package/dist-lib/components/fields/cells/factories/badge.js +5 -6
- package/dist-lib/components/fields/cells/factories/boolPill.js +1 -2
- package/dist-lib/components/fields/cells/factories/code.js +1 -2
- package/dist-lib/components/fields/cells/factories/date.js +1 -2
- package/dist-lib/components/fields/cells/factories/email.js +1 -2
- package/dist-lib/components/fields/cells/factories/emptyCell.js +0 -1
- package/dist-lib/components/fields/cells/factories/fileReference.js +1 -2
- package/dist-lib/components/fields/cells/factories/host-icons.js +1 -2
- package/dist-lib/components/fields/cells/factories/json.js +1 -2
- package/dist-lib/components/fields/cells/factories/link.js +10 -11
- package/dist-lib/components/fields/cells/factories/markdown.js +14 -15
- package/dist-lib/components/fields/cells/factories/markdownPreview.js +1 -2
- package/dist-lib/components/fields/cells/factories/money.js +1 -2
- package/dist-lib/components/fields/cells/factories/multilangInline.js +1 -2
- package/dist-lib/components/fields/cells/factories/nextRun.js +8 -9
- package/dist-lib/components/fields/cells/factories/number.js +1 -2
- package/dist-lib/components/fields/cells/factories/passwordMask.js +1 -2
- package/dist-lib/components/fields/cells/factories/phone.js +1 -2
- package/dist-lib/components/fields/cells/factories/refLink.js +13 -14
- package/dist-lib/components/fields/cells/factories/richTextPreview.js +16 -17
- package/dist-lib/components/fields/cells/factories/statusPill.js +5 -6
- package/dist-lib/components/fields/cells/factories/tagList.js +6 -7
- package/dist-lib/components/fields/cells/factories/text.js +1 -2
- package/dist-lib/components/fields/cells/factories/timestamp.js +1 -2
- package/dist-lib/components/fields/cells/factories/url-helpers.js +1 -2
- package/dist-lib/components/fields/cells/factories/url.js +13 -14
- package/dist-lib/components/fields/cells/registry.js +1 -2
- package/dist-lib/components/fields/index.js +19 -20
- package/dist-lib/components/fields/langMap.js +1 -2
- package/dist-lib/components/fields/secretValue.js +1 -2
- package/dist-lib/components/file-widgets/CircleImage.js +1 -2
- package/dist-lib/components/file-widgets/DocumentCard.js +101 -102
- package/dist-lib/components/file-widgets/FileList.js +35 -36
- package/dist-lib/components/file-widgets/Grid.js +119 -120
- package/dist-lib/components/file-widgets/GridLazy.js +1 -2
- package/dist-lib/components/file-widgets/ImageWidget.js +189 -190
- package/dist-lib/components/file-widgets/LabeledSlots.js +14 -15
- package/dist-lib/components/file-widgets/SquareImage.js +1 -2
- package/dist-lib/components/file-widgets/UnknownFileWidget.js +1 -2
- package/dist-lib/components/file-widgets/UploadFailureText.js +1 -2
- package/dist-lib/components/file-widgets/WideBanner.js +1 -2
- package/dist-lib/components/file-widgets/builtins.js +1 -2
- package/dist-lib/components/file-widgets/cropper.js +1 -2
- package/dist-lib/components/file-widgets/draft-scope.js +1 -2
- package/dist-lib/components/file-widgets/helpers.js +1 -2
- package/dist-lib/components/file-widgets/host.js +33 -34
- package/dist-lib/components/file-widgets/payload.js +1 -2
- package/dist-lib/components/file-widgets/registry.js +1 -2
- package/dist-lib/components/file-widgets/upload.js +41 -42
- package/dist-lib/components/file-widgets/useEmbedFileSrc.js +12 -13
- package/dist-lib/components/file-widgets/useFileSelection.js +1 -2
- package/dist-lib/components/file-widgets/value.js +1 -2
- package/dist-lib/components/filters/FilterChips.js +15 -16
- package/dist-lib/components/filters/FilterConditionValue.js +15 -16
- package/dist-lib/components/filters/FilterDrawer.js +141 -142
- package/dist-lib/components/filters/FilterOmittedNotice.js +1 -2
- package/dist-lib/components/filters/filter-op-label.js +1 -2
- package/dist-lib/components/layout/CommandPalette.impl.js +24 -25
- package/dist-lib/components/layout/CommandPalette.js +1 -2
- package/dist-lib/components/layout/DirtyTabsCloseDialog.impl.js +15 -16
- package/dist-lib/components/layout/DirtyTabsCloseDialog.js +1 -2
- package/dist-lib/components/layout/ImpersonationBanner.impl.js +6 -7
- package/dist-lib/components/layout/ImpersonationBanner.js +1 -2
- package/dist-lib/components/layout/ImpersonationFrame.js +4 -5
- package/dist-lib/components/layout/ImpersonationStartModal.impl.js +4 -5
- package/dist-lib/components/layout/ImpersonationStartModal.js +1 -2
- package/dist-lib/components/layout/Layout.js +132 -140
- package/dist-lib/components/layout/Rail.js +11 -12
- package/dist-lib/components/layout/Sidebar.js +60 -61
- package/dist-lib/components/layout/TabStrip.js +66 -67
- package/dist-lib/components/layout/TenantChip.js +21 -22
- package/dist-lib/components/layout/TopBar.js +89 -90
- package/dist-lib/components/layout/tab-close.js +1 -2
- package/dist-lib/components/list/ColumnPicker.js +35 -36
- package/dist-lib/components/list/InlineEditCell.js +22 -23
- package/dist-lib/components/list/PeekFieldCell.js +7 -8
- package/dist-lib/components/list/QuickPeek.js +29 -30
- package/dist-lib/components/list/ViewSwitcher.js +44 -45
- package/dist-lib/components/list/peekDraftStore.js +1 -2
- package/dist-lib/components/pages/AdminCatalogPage.impl.js +59 -60
- package/dist-lib/components/pages/AdminCatalogPage.js +1 -2
- package/dist-lib/components/pages/DocumentsMenu.js +53 -54
- package/dist-lib/components/pages/ExportMenu.js +37 -38
- package/dist-lib/components/pages/NoScreensPage.impl.js +5 -6
- package/dist-lib/components/pages/NoScreensPage.js +1 -2
- package/dist-lib/components/pages/NotFoundPage.impl.js +7 -8
- package/dist-lib/components/pages/NotFoundPage.js +1 -2
- package/dist-lib/components/pages/RecordDocumentsPanel.js +40 -41
- package/dist-lib/components/pages/RecordNotesPanel.js +43 -44
- package/dist-lib/components/pages/RecordPanels.js +1 -2
- package/dist-lib/components/pages/SSOCallbackPage.impl.js +6 -7
- package/dist-lib/components/pages/SSOCallbackPage.js +1 -2
- package/dist-lib/components/pages/SmartDetailPage.impl.js +501 -502
- package/dist-lib/components/pages/SmartDetailPage.js +1 -2
- package/dist-lib/components/pages/SmartListPage.impl.js +316 -317
- package/dist-lib/components/pages/SmartListPage.js +1 -2
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +316 -317
- package/dist-lib/components/pages/SmartRecordListPage.js +1 -2
- package/dist-lib/components/pages/auth/AuthShell.js +14 -15
- package/dist-lib/components/pages/auth/CodeInput.js +0 -1
- package/dist-lib/components/pages/auth/Forgot.impl.js +12 -13
- package/dist-lib/components/pages/auth/Forgot.js +1 -2
- package/dist-lib/components/pages/auth/Reset.impl.js +20 -21
- package/dist-lib/components/pages/auth/Reset.js +1 -2
- package/dist-lib/components/pages/auth/SignIn.js +44 -45
- package/dist-lib/components/pages/auth/SignUp.impl.js +35 -36
- package/dist-lib/components/pages/auth/SignUp.js +1 -2
- package/dist-lib/components/pages/auth/SignUpCode.js +17 -18
- package/dist-lib/components/pages/auth/TwoFA.impl.js +9 -10
- package/dist-lib/components/pages/auth/TwoFA.js +1 -2
- package/dist-lib/components/pages/auth/icons.js +1 -2
- package/dist-lib/components/pages/exportRequest.js +1 -2
- package/dist-lib/components/pages/list/DataCell.js +1 -2
- package/dist-lib/components/pages/list/DeleteViewDialog.js +5 -6
- package/dist-lib/components/pages/list/ListCardRow.js +53 -54
- package/dist-lib/components/pages/list/ListCardsBody.js +1 -2
- package/dist-lib/components/pages/list/ListFloatbar.js +25 -26
- package/dist-lib/components/pages/list/ListFooter.js +17 -18
- package/dist-lib/components/pages/list/ListHeader.js +31 -32
- package/dist-lib/components/pages/list/ListNoRows.js +32 -33
- package/dist-lib/components/pages/list/ListTable.js +29 -30
- package/dist-lib/components/pages/list/ListTableRow.js +1 -2
- package/dist-lib/components/pages/list/ListToolbar.js +58 -59
- package/dist-lib/components/pages/list/ListUrlBanner.js +1 -2
- package/dist-lib/components/pages/list/RowActionsCell.js +6 -7
- package/dist-lib/components/pages/list/RowContextMenu.js +1 -2
- package/dist-lib/components/pages/list/SaveViewDialog.js +5 -6
- package/dist-lib/components/pages/list/SortHeaderMenu.js +25 -26
- package/dist-lib/components/pages/list/cardProjection.js +16 -17
- package/dist-lib/components/pages/list/column-sizing.js +1 -2
- package/dist-lib/components/pages/list/columns.js +74 -75
- package/dist-lib/components/pages/list/filter-meta.js +1 -2
- package/dist-lib/components/pages/list/page-size.js +1 -2
- package/dist-lib/components/pages/list/sortable-header.js +1 -2
- package/dist-lib/components/pages/list/table-features.js +1 -2
- package/dist-lib/components/pages/list/use-filter-value-labels.js +15 -16
- package/dist-lib/components/pages/list/useActiveView.js +1 -2
- package/dist-lib/components/pages/list/useHeaderReorder.js +1 -2
- package/dist-lib/components/pages/list/useListColumnLayout.js +6 -7
- package/dist-lib/components/pages/list/useListFilterPresentation.js +1 -2
- package/dist-lib/components/pages/list/useListQuery.js +1 -2
- package/dist-lib/components/pages/list/useListRowInteraction.js +37 -38
- package/dist-lib/components/pages/list/useListSelection.js +16 -17
- package/dist-lib/components/pages/list/useListSort.js +1 -2
- package/dist-lib/components/pages/list/useListViews.js +31 -32
- package/dist-lib/components/pages/list/useRowMenu.js +20 -21
- package/dist-lib/components/pages/list/visible-filters.js +1 -2
- package/dist-lib/components/pages/profile/Preferences.impl.js +44 -45
- package/dist-lib/components/pages/profile/Preferences.js +1 -2
- package/dist-lib/components/pages/profile/Profile.impl.js +223 -224
- package/dist-lib/components/pages/profile/Profile.js +1 -2
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +133 -134
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +1 -2
- package/dist-lib/components/params/ParamsBlock.js +30 -31
- package/dist-lib/components/params/param-editors.js +58 -59
- package/dist-lib/components/primitives/Avatar.js +1 -2
- package/dist-lib/components/primitives/BoolToggle.js +1 -2
- package/dist-lib/components/primitives/BrandGlyph.js +1 -2
- package/dist-lib/components/primitives/BrandLogo.js +1 -2
- package/dist-lib/components/primitives/Btn.js +1 -2
- package/dist-lib/components/primitives/Check.js +1 -2
- package/dist-lib/components/primitives/Chip.js +1 -2
- package/dist-lib/components/primitives/ClassifiedFieldLocked.js +1 -2
- package/dist-lib/components/primitives/Dropdown.js +2 -3
- package/dist-lib/components/primitives/Fields.js +128 -129
- package/dist-lib/components/primitives/HoverCard.js +2 -3
- package/dist-lib/components/primitives/IconBtn.js +1 -2
- package/dist-lib/components/primitives/Icons.js +1 -2
- package/dist-lib/components/primitives/Kbd.js +1 -2
- package/dist-lib/components/primitives/MenuItem.js +1 -2
- package/dist-lib/components/primitives/Pill.js +1 -2
- package/dist-lib/components/primitives/RecordIdBadge.js +1 -2
- package/dist-lib/components/primitives/RetryButton.js +5 -6
- package/dist-lib/components/primitives/RowField.js +1 -2
- package/dist-lib/components/primitives/SectionCard.js +1 -2
- package/dist-lib/components/primitives/Spinner.js +1 -2
- package/dist-lib/components/primitives/StatTile.js +1 -2
- package/dist-lib/components/primitives/Tooltip.js +1 -2
- package/dist-lib/components/primitives/dataTableStyles.js +1 -2
- package/dist-lib/components/shared/BlankScreen.js +1 -2
- package/dist-lib/components/shared/ChangePasswordDialog.impl.js +20 -21
- package/dist-lib/components/shared/ChangePasswordDialog.js +1 -2
- package/dist-lib/components/shared/ConfirmDialog.js +7 -8
- package/dist-lib/components/shared/ConnectionNotice.js +1 -2
- package/dist-lib/components/shared/CopyButton.js +1 -2
- package/dist-lib/components/shared/DynamicIcon.js +1 -2
- package/dist-lib/components/shared/EmptyState.js +1 -2
- package/dist-lib/components/shared/ErrorBoundary.js +10 -11
- package/dist-lib/components/shared/LoadingSkeleton.js +1 -2
- package/dist-lib/components/shared/LucideIcon.js +1 -2
- package/dist-lib/components/shared/Markdown.js +1 -2
- package/dist-lib/components/shared/MarkdownRenderer.js +22 -23
- package/dist-lib/components/shared/ModalFrame.js +1 -2
- package/dist-lib/components/shared/RefreshControl.js +6 -7
- package/dist-lib/components/shared/StatusGroupsDisplay.js +16 -17
- package/dist-lib/components/shared/StatusStepper.js +1 -2
- package/dist-lib/components/shared/toast/DeclarionToast.js +1 -2
- package/dist-lib/components/shared/useOwnRefresh.js +1 -2
- package/dist-lib/embed/EmbedAuthBootstrap.js +30 -31
- package/dist-lib/embed/EmbedContext.js +1 -2
- package/dist-lib/embed/EmbedDirtyReporter.js +6 -7
- package/dist-lib/embed/EmbedHistoryTracker.js +1 -2
- package/dist-lib/embed/EmbedLocationReporter.js +11 -12
- package/dist-lib/embed/EmbedResizeReporter.js +9 -10
- package/dist-lib/embed/EmbedUnsavedGuard.js +5 -6
- package/dist-lib/embed/embed-dirty.js +1 -2
- package/dist-lib/embed/embed-history.js +1 -2
- package/dist-lib/embed/embed-nav-guard.js +1 -2
- package/dist-lib/embed/file-src.js +12 -13
- package/dist-lib/embed/handshake.js +1 -2
- package/dist-lib/embed/params.js +1 -2
- package/dist-lib/embed/protocol.js +1 -2
- package/dist-lib/embed/screen-location.js +1 -2
- package/dist-lib/embed/theme.js +1 -2
- package/dist-lib/embed/token.js +1 -2
- package/dist-lib/embed/useEmbedNavigate.js +25 -26
- package/dist-lib/embed/useGlobalLinkInterceptor.js +9 -10
- package/dist-lib/hooks/useActionData.js +1 -2
- package/dist-lib/hooks/useActiveTabFollowsRoute.js +7 -8
- package/dist-lib/hooks/useAgentConversation.js +122 -123
- package/dist-lib/hooks/useAggregate.js +1 -2
- package/dist-lib/hooks/useAllEntityData.js +9 -10
- package/dist-lib/hooks/useAssociatedData.js +1 -2
- package/dist-lib/hooks/useAuth.js +26 -27
- package/dist-lib/hooks/useBranding.js +1 -2
- package/dist-lib/hooks/useBrandingChrome.js +16 -17
- package/dist-lib/hooks/useChildrenData.js +4 -5
- package/dist-lib/hooks/useColumns.js +1 -2
- package/dist-lib/hooks/useConnectionNotice.js +16 -17
- package/dist-lib/hooks/useCurrentLocation.js +1 -2
- package/dist-lib/hooks/useCurrentScreen.js +1 -2
- package/dist-lib/hooks/useCursorEntityData.js +1 -2
- package/dist-lib/hooks/useDebounce.js +1 -2
- package/dist-lib/hooks/useDisplayTimeZone.js +4 -5
- package/dist-lib/hooks/useDocumentTitle.js +5 -6
- package/dist-lib/hooks/useEntity.js +1 -2
- package/dist-lib/hooks/useEntityData.js +1 -2
- package/dist-lib/hooks/useFileReferenceJSON.js +9 -10
- package/dist-lib/hooks/useFilters.js +5 -6
- package/dist-lib/hooks/useFollowAgentOpen.js +40 -41
- package/dist-lib/hooks/useImpersonation.js +15 -16
- package/dist-lib/hooks/useIntentPrefetch.js +6 -7
- package/dist-lib/hooks/useJsonSnapshot.js +1 -2
- package/dist-lib/hooks/useLanguage.js +11 -12
- package/dist-lib/hooks/useLiveObject.js +6 -7
- package/dist-lib/hooks/useLongPress.js +1 -2
- package/dist-lib/hooks/useMutations.js +31 -32
- package/dist-lib/hooks/useObject.js +1 -2
- package/dist-lib/hooks/useObjectStatus.js +4 -5
- package/dist-lib/hooks/usePageState.js +9 -10
- package/dist-lib/hooks/usePageStateRuntime.js +16 -17
- package/dist-lib/hooks/usePageStateTtl.js +1 -2
- package/dist-lib/hooks/useParams.js +58 -59
- package/dist-lib/hooks/useProperties.js +5 -6
- package/dist-lib/hooks/useRealtimeThresholds.js +4 -5
- package/dist-lib/hooks/useRefRecords.js +31 -32
- package/dist-lib/hooks/useRegisterScreenTab.js +12 -13
- package/dist-lib/hooks/useResponsiveMode.js +1 -2
- package/dist-lib/hooks/useRowTenant.js +1 -2
- package/dist-lib/hooks/useSSE.js +100 -101
- package/dist-lib/hooks/useSchema.js +16 -17
- package/dist-lib/hooks/useScreen.js +1 -2
- package/dist-lib/hooks/useScreenBack.js +17 -18
- package/dist-lib/hooks/useScreenTab.js +1 -2
- package/dist-lib/hooks/useTabNavigate.js +25 -26
- package/dist-lib/hooks/useTabSearchMirror.js +6 -7
- package/dist-lib/hooks/useTabTitle.js +10 -11
- package/dist-lib/hooks/useText.js +6 -7
- package/dist-lib/hooks/useTimelineData.js +5 -6
- package/dist-lib/hooks/useUiPreferences.js +31 -32
- package/dist-lib/hooks/useUnsavedInput.js +1 -2
- package/dist-lib/hooks/useVersionWatcher.js +16 -17
- package/dist-lib/hooks/useViews.js +16 -17
- package/dist-lib/hooks/useWindowConversation.js +1 -2
- package/dist-lib/{icon-registry-CUT4eF63.d.ts → icon-registry-BY2tt-GF.d.ts} +0 -2
- package/dist-lib/icons.d.ts +2 -4
- package/dist-lib/icons.js +5 -5
- package/dist-lib/index.d.ts +4 -272
- package/dist-lib/index.js +129 -129
- package/dist-lib/lib/action-dispatch.js +1 -2
- package/dist-lib/lib/actions.js +26 -27
- package/dist-lib/lib/anchor.js +1 -2
- package/dist-lib/lib/brand-tokens.js +1 -2
- package/dist-lib/lib/branding.js +1 -2
- package/dist-lib/lib/canonical-url.js +1 -2
- package/dist-lib/lib/capabilityPrefetch.js +1 -2
- package/dist-lib/lib/child-config.js +1 -2
- package/dist-lib/lib/children-validation.js +2 -3
- package/dist-lib/lib/date-text.js +1 -2
- package/dist-lib/lib/decimal-text.js +1 -2
- package/dist-lib/lib/display-value.js +1 -2
- package/dist-lib/lib/document-templates.js +1 -2
- package/dist-lib/lib/download.js +13 -14
- package/dist-lib/lib/evidence-verdict.js +1 -2
- package/dist-lib/lib/failure.js +4 -5
- package/dist-lib/lib/field-classification.js +1 -2
- package/dist-lib/lib/field-regions.js +1 -2
- package/dist-lib/lib/filter-evaluator.js +1 -2
- package/dist-lib/lib/filters.js +1 -2
- package/dist-lib/lib/format-count.js +1 -2
- package/dist-lib/lib/html-state.js +1 -2
- package/dist-lib/lib/language.js +1 -2
- package/dist-lib/lib/longPressGesture.js +0 -1
- package/dist-lib/lib/mass-edit.js +1 -2
- package/dist-lib/lib/money-text.js +1 -2
- package/dist-lib/lib/number-text.js +1 -2
- package/dist-lib/lib/page-inset.js +1 -2
- package/dist-lib/lib/phone.js +1 -2
- package/dist-lib/lib/profile.js +1 -2
- package/dist-lib/lib/query-retry.js +1 -2
- package/dist-lib/lib/quick-add.js +1 -2
- package/dist-lib/lib/read-display-state.js +1 -2
- package/dist-lib/lib/realtime-query-keys.js +2 -3
- package/dist-lib/lib/realtime-reconcile.js +32 -33
- package/dist-lib/lib/realtime-resync.js +40 -41
- package/dist-lib/lib/record-documents-key.js +1 -2
- package/dist-lib/lib/ref-choices.js +1 -2
- package/dist-lib/lib/refetch-when-idle.js +1 -2
- package/dist-lib/lib/rich-text.js +1 -2
- package/dist-lib/lib/role-label.js +1 -2
- package/dist-lib/lib/rowClickGesture.js +1 -2
- package/dist-lib/lib/safe-url.js +1 -2
- package/dist-lib/lib/schema-routing.js +1 -2
- package/dist-lib/lib/screen-back.js +1 -2
- package/dist-lib/lib/scroll-restoration.js +21 -22
- package/dist-lib/lib/shortcut.js +1 -2
- package/dist-lib/lib/size-value.js +1 -2
- package/dist-lib/lib/sort.js +1 -2
- package/dist-lib/lib/timestamp.js +1 -2
- package/dist-lib/lib/toast.js +1 -2
- package/dist-lib/lib/ui-actions.js +43 -44
- package/dist-lib/lib/utils.js +1 -2
- package/dist-lib/lib/variants.js +1 -2
- package/dist-lib/lib/versionTracker.js +26 -27
- package/dist-lib/lib/viewport-category.js +1 -2
- package/dist-lib/lib/window-election.js +1 -2
- package/dist-lib/stores/auth.js +32 -33
- package/dist-lib/stores/icon-registry.js +1 -2
- package/dist-lib/stores/list-layout.js +0 -1
- package/dist-lib/stores/page-state.js +1 -2
- package/dist-lib/stores/preferences.js +1 -2
- package/dist-lib/stores/realtime.js +1 -2
- package/dist-lib/stores/screen-registry.js +1 -2
- package/dist-lib/stores/tabs.js +1 -2
- package/dist-lib/test/seed-schema.js +4 -5
- package/dist-lib/testing.d.ts +2 -4
- package/dist-lib/testing.js +49 -50
- package/dist-lib/types/api.js +1 -2
- package/dist-lib/types/fieldType.js +1 -2
- package/dist-lib/types/ordmap.js +1 -2
- package/dist-lib/types/schema.js +1 -2
- package/dist-lib/{useResponsiveMode-C4MeAgoS.d.ts → useResponsiveMode-BElw02Gh.d.ts} +1 -19
- package/dist-lib/vite/index.d.ts +0 -2
- package/dist-lib/vite/index.js +1 -2
- package/package.json +11 -11
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { Btn as e } from "../primitives/Btn.js";
|
|
2
|
+
import { Icon as t } from "../primitives/Icons.js";
|
|
3
|
+
import { Spinner as n } from "../primitives/Spinner.js";
|
|
4
|
+
import { TextInput as r } from "../primitives/Fields.js";
|
|
5
|
+
import { Markdown as i } from "../shared/Markdown.js";
|
|
6
|
+
import { createRichTextValue as a, extractDeclarionFileIds as o, richTextTokenForFile as s, withRichTextFile as c, withoutRichTextFiles as l } from "../../lib/rich-text.js";
|
|
7
|
+
import { discardFile as u, uploadCheckFailure as d, uploadFailure as f, uploadFile as p, validateClientSide as m } from "../file-widgets/upload.js";
|
|
8
|
+
import { useDraftRegistration as h } from "../file-widgets/draft-scope.js";
|
|
9
|
+
import { useText as g } from "../../hooks/useText.js";
|
|
10
10
|
import { useMemo as _, useRef as v, useState as y } from "react";
|
|
11
11
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
12
|
-
|
|
12
|
+
// src/components/fields/RichTextField.tsx
|
|
13
13
|
function S(S) {
|
|
14
|
-
let { field: T, entityCode: E, fieldName: D, value: O, mode: k, onChange: A, record: j, compact: M, fieldId: N, t: P } = S, F =
|
|
15
|
-
let n = new Set(
|
|
14
|
+
let { field: T, entityCode: E, fieldName: D, value: O, mode: k, onChange: A, record: j, compact: M, fieldId: N, t: P } = S, F = g("errors"), I = v(null), L = v(null), R = v(/* @__PURE__ */ new Map()), z = v(/* @__PURE__ */ new Set()), [B, V] = y(0), [H, U] = y(null), { register: W, unregister: G } = h(), K = j?.$files?.[D], q = _(() => a(O, K), [K, O]), J = q.markdown, Y = T.files?.accepts, X = T.files?.max_size_bytes, Z = (e, t = q.files) => {
|
|
15
|
+
let n = new Set(o(e)), r = [];
|
|
16
16
|
for (let e of z.current) n.has(e) || r.push(e);
|
|
17
17
|
if (r.length > 0) {
|
|
18
18
|
for (let e of r) {
|
|
19
|
-
z.current.delete(e), G(e),
|
|
19
|
+
z.current.delete(e), G(e), u(e).catch(() => {});
|
|
20
20
|
let t = R.current.get(e);
|
|
21
21
|
t && (URL.revokeObjectURL(t), R.current.delete(e));
|
|
22
22
|
}
|
|
23
|
-
A?.(
|
|
23
|
+
A?.(l({
|
|
24
24
|
markdown: e,
|
|
25
25
|
files: t
|
|
26
26
|
}, r));
|
|
@@ -29,7 +29,7 @@ function S(S) {
|
|
|
29
29
|
files: t
|
|
30
30
|
});
|
|
31
31
|
}, Q = (e, t, n) => {
|
|
32
|
-
let r = I.current, i = r?.selectionStart ?? e.markdown.length, a = r?.selectionEnd ?? e.markdown.length, o = `${e.markdown.slice(0, i)}${t}${e.markdown.slice(a)}`, s = n ?
|
|
32
|
+
let r = I.current, i = r?.selectionStart ?? e.markdown.length, a = r?.selectionEnd ?? e.markdown.length, o = `${e.markdown.slice(0, i)}${t}${e.markdown.slice(a)}`, s = n ? c(e, n).files : e.files;
|
|
33
33
|
Z(o, s), requestAnimationFrame(() => {
|
|
34
34
|
if (!r) return;
|
|
35
35
|
let e = i + t.length;
|
|
@@ -45,37 +45,37 @@ function S(S) {
|
|
|
45
45
|
files: q.files
|
|
46
46
|
};
|
|
47
47
|
for (let e of t) {
|
|
48
|
-
let r =
|
|
49
|
-
if (r) U(
|
|
48
|
+
let r = m(e, Y, X);
|
|
49
|
+
if (r) U(d(P, F, r).message), V((e) => e - 1);
|
|
50
50
|
else try {
|
|
51
|
-
let r = await
|
|
51
|
+
let r = await p({
|
|
52
52
|
file: e,
|
|
53
53
|
entityCode: E,
|
|
54
54
|
fieldCode: D
|
|
55
55
|
}), i = e.type.startsWith("image/") ? URL.createObjectURL(e) : void 0;
|
|
56
56
|
i && R.current.set(r.id, i);
|
|
57
57
|
let a = w(r, i);
|
|
58
|
-
if (W(r.id, () =>
|
|
59
|
-
let e = C(n.markdown,
|
|
60
|
-
Q(n, e, a), n =
|
|
58
|
+
if (W(r.id, () => u(r.id)), z.current.add(r.id), t.length === 1) {
|
|
59
|
+
let e = C(n.markdown, s(a));
|
|
60
|
+
Q(n, e, a), n = c({
|
|
61
61
|
markdown: `${n.markdown}${e}`,
|
|
62
62
|
files: n.files
|
|
63
63
|
}, a);
|
|
64
64
|
} else {
|
|
65
|
-
let e = C(n.markdown,
|
|
66
|
-
n =
|
|
65
|
+
let e = C(n.markdown, s(a));
|
|
66
|
+
n = c({
|
|
67
67
|
markdown: `${n.markdown}${e}`,
|
|
68
68
|
files: n.files
|
|
69
69
|
}, a), Z(n.markdown, n.files);
|
|
70
70
|
}
|
|
71
71
|
} catch (e) {
|
|
72
|
-
U(
|
|
72
|
+
U(f(P, F, e).message);
|
|
73
73
|
} finally {
|
|
74
74
|
V((e) => e - 1);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
return k === "display" ? J ? /* @__PURE__ */ b(
|
|
78
|
+
return k === "display" ? J ? /* @__PURE__ */ b(i, {
|
|
79
79
|
content: J,
|
|
80
80
|
files: q.files
|
|
81
81
|
}) : /* @__PURE__ */ b("span", {
|
|
@@ -84,7 +84,7 @@ function S(S) {
|
|
|
84
84
|
color: "var(--text-4)"
|
|
85
85
|
},
|
|
86
86
|
children: "—"
|
|
87
|
-
}) : M ? /* @__PURE__ */ b(
|
|
87
|
+
}) : M ? /* @__PURE__ */ b(r, {
|
|
88
88
|
id: N,
|
|
89
89
|
name: D,
|
|
90
90
|
"aria-required": T.required || void 0,
|
|
@@ -105,10 +105,10 @@ function S(S) {
|
|
|
105
105
|
flexWrap: "wrap"
|
|
106
106
|
},
|
|
107
107
|
children: [
|
|
108
|
-
/* @__PURE__ */ b(
|
|
108
|
+
/* @__PURE__ */ b(e, {
|
|
109
109
|
kind: "ghost",
|
|
110
110
|
size: "xs",
|
|
111
|
-
icon: b(B > 0 ?
|
|
111
|
+
icon: b(B > 0 ? n : t.plus, { size: 12 }),
|
|
112
112
|
onClick: () => L.current?.click(),
|
|
113
113
|
disabled: !E || !T.files || B > 0,
|
|
114
114
|
children: B > 0 ? P("field.rich_text.uploading", "Uploading…") : P("field.rich_text.insert_file", "Insert file")
|
|
@@ -191,7 +191,7 @@ function S(S) {
|
|
|
191
191
|
marginBottom: 8
|
|
192
192
|
},
|
|
193
193
|
children: P("field.rich_text.preview", "Preview")
|
|
194
|
-
}), J ? /* @__PURE__ */ b(
|
|
194
|
+
}), J ? /* @__PURE__ */ b(i, {
|
|
195
195
|
content: J,
|
|
196
196
|
files: q.files
|
|
197
197
|
}) : /* @__PURE__ */ b("span", {
|
|
@@ -221,5 +221,4 @@ function w(e, t) {
|
|
|
221
221
|
url: t ?? e.url
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
|
-
//#endregion
|
|
225
224
|
export { S as RichTextField };
|
|
@@ -2,7 +2,7 @@ import { PasswordInput as e } from "../primitives/Fields.js";
|
|
|
2
2
|
import { SECRET_SENTINEL as t, holdsSecret as n } from "./secretValue.js";
|
|
3
3
|
import { useState as r } from "react";
|
|
4
4
|
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/fields/SecretField.tsx
|
|
6
6
|
function a({ field: a, fieldName: o, value: s, mode: c, onChange: l, record: u, fieldId: d, t: f }) {
|
|
7
7
|
let [p, m] = r(""), h = u !== void 0, g = n(s);
|
|
8
8
|
return c === "display" ? g ? /* @__PURE__ */ i("span", {
|
|
@@ -30,5 +30,4 @@ function a({ field: a, fieldName: o, value: s, mode: c, onChange: l, record: u,
|
|
|
30
30
|
placeholder: h ? f("field.secret.keep_existing", "Leave blank to keep existing value") : f("field.secret.placeholder", "Enter value")
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { a as SecretField };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Btn as e } from "../primitives/Btn.js";
|
|
2
|
+
import { Chip as t } from "../primitives/Chip.js";
|
|
3
|
+
import { Icon as n } from "../primitives/Icons.js";
|
|
4
4
|
import { TextInput as r } from "../primitives/Fields.js";
|
|
5
5
|
import { useState as i } from "react";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/fields/StringArrayField.tsx
|
|
8
8
|
function s(e) {
|
|
9
9
|
return Array.isArray(e) ? e.filter((e) => e != null).map(String) : [];
|
|
10
10
|
}
|
|
@@ -27,11 +27,11 @@ function c({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: o,
|
|
|
27
27
|
t: c
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
function l({ values:
|
|
31
|
-
let u = new Set(r), d = (
|
|
32
|
-
let n =
|
|
33
|
-
return n && l(n.name) ||
|
|
34
|
-
}, f = r.filter((
|
|
30
|
+
function l({ values: e, selected: r, mode: i, required: s, onChange: c, t: l }) {
|
|
31
|
+
let u = new Set(r), d = (t) => {
|
|
32
|
+
let n = e.find((e) => e.code === t);
|
|
33
|
+
return n && l(n.name) || t;
|
|
34
|
+
}, f = r.filter((t) => !e.some((e) => e.code === t));
|
|
35
35
|
if (i === "display") return r.length === 0 ? /* @__PURE__ */ a("span", {
|
|
36
36
|
style: {
|
|
37
37
|
fontSize: 12.5,
|
|
@@ -44,10 +44,10 @@ function l({ values: t, selected: r, mode: i, required: s, onChange: c, t: l })
|
|
|
44
44
|
flexWrap: "wrap",
|
|
45
45
|
gap: 4
|
|
46
46
|
},
|
|
47
|
-
children: [
|
|
47
|
+
children: [e.filter((e) => u.has(e.code)).map((e) => /* @__PURE__ */ a(t, {
|
|
48
48
|
tone: "slate",
|
|
49
49
|
children: l(e.name) || e.code
|
|
50
|
-
}, e.code)), f.map((e) => /* @__PURE__ */ a(
|
|
50
|
+
}, e.code)), f.map((e) => /* @__PURE__ */ a(t, {
|
|
51
51
|
tone: "slate",
|
|
52
52
|
children: d(e)
|
|
53
53
|
}, e))]
|
|
@@ -75,22 +75,22 @@ function l({ values: t, selected: r, mode: i, required: s, onChange: c, t: l })
|
|
|
75
75
|
flexWrap: "wrap",
|
|
76
76
|
gap: 6
|
|
77
77
|
},
|
|
78
|
-
children: [
|
|
79
|
-
let
|
|
78
|
+
children: [e.map((e) => {
|
|
79
|
+
let t = u.has(e.code);
|
|
80
80
|
return /* @__PURE__ */ o("button", {
|
|
81
81
|
type: "button",
|
|
82
|
-
"aria-pressed":
|
|
83
|
-
onClick: () => p(
|
|
84
|
-
style: m(
|
|
85
|
-
children: [
|
|
86
|
-
},
|
|
87
|
-
}), f.map((
|
|
82
|
+
"aria-pressed": t,
|
|
83
|
+
onClick: () => p(e.code),
|
|
84
|
+
style: m(t),
|
|
85
|
+
children: [t && /* @__PURE__ */ a(n.check, { size: 12 }), d(e.code)]
|
|
86
|
+
}, e.code);
|
|
87
|
+
}), f.map((e) => /* @__PURE__ */ o("button", {
|
|
88
88
|
type: "button",
|
|
89
89
|
"aria-pressed": !0,
|
|
90
|
-
onClick: () => p(
|
|
90
|
+
onClick: () => p(e),
|
|
91
91
|
style: m(!0),
|
|
92
|
-
children: [/* @__PURE__ */ a(
|
|
93
|
-
},
|
|
92
|
+
children: [/* @__PURE__ */ a(n.check, { size: 12 }), d(e)]
|
|
93
|
+
}, e))]
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
function u({ items: s, fieldName: c, required: l, mode: u, onChange: d, fieldId: f, t: p }) {
|
|
@@ -107,10 +107,10 @@ function u({ items: s, fieldName: c, required: l, mode: u, onChange: d, fieldId:
|
|
|
107
107
|
flexWrap: "wrap",
|
|
108
108
|
gap: 4
|
|
109
109
|
},
|
|
110
|
-
children: s.map((e,
|
|
110
|
+
children: s.map((e, n) => /* @__PURE__ */ a(t, {
|
|
111
111
|
tone: "slate",
|
|
112
112
|
children: e
|
|
113
|
-
},
|
|
113
|
+
}, n))
|
|
114
114
|
});
|
|
115
115
|
let g = () => {
|
|
116
116
|
let e = m.trim();
|
|
@@ -130,11 +130,11 @@ function u({ items: s, fieldName: c, required: l, mode: u, onChange: d, fieldId:
|
|
|
130
130
|
flexWrap: "wrap",
|
|
131
131
|
gap: 4
|
|
132
132
|
},
|
|
133
|
-
children: s.map((e,
|
|
133
|
+
children: s.map((e, n) => /* @__PURE__ */ a(t, {
|
|
134
134
|
tone: "slate",
|
|
135
|
-
onRemove: () => _(
|
|
135
|
+
onRemove: () => _(n),
|
|
136
136
|
children: e
|
|
137
|
-
},
|
|
137
|
+
}, n))
|
|
138
138
|
}), /* @__PURE__ */ o("div", {
|
|
139
139
|
style: {
|
|
140
140
|
display: "flex",
|
|
@@ -153,13 +153,12 @@ function u({ items: s, fieldName: c, required: l, mode: u, onChange: d, fieldId:
|
|
|
153
153
|
},
|
|
154
154
|
placeholder: p("field.array.add_item", "Add item…")
|
|
155
155
|
})
|
|
156
|
-
}), /* @__PURE__ */ a(
|
|
157
|
-
icon: /* @__PURE__ */ a(
|
|
156
|
+
}), /* @__PURE__ */ a(e, {
|
|
157
|
+
icon: /* @__PURE__ */ a(n.plus, { size: 13 }),
|
|
158
158
|
onClick: g,
|
|
159
159
|
children: p("field.array.add", "Add")
|
|
160
160
|
})]
|
|
161
161
|
})]
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
//#endregion
|
|
165
164
|
export { c as StringArrayField };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { TextInput as e } from "../primitives/Fields.js";
|
|
2
|
+
import { CopyButton as t } from "../shared/CopyButton.js";
|
|
3
|
+
import { coerceDisplayString as n } from "../../lib/display-value.js";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/fields/StringField.tsx
|
|
6
6
|
function a({ field: a, fieldName: o, value: s, mode: c, onChange: l, fieldId: u }) {
|
|
7
7
|
if (c === "display") {
|
|
8
|
-
let
|
|
9
|
-
return a.copyable &&
|
|
8
|
+
let e = n(s);
|
|
9
|
+
return a.copyable && e ? /* @__PURE__ */ i("span", {
|
|
10
10
|
style: {
|
|
11
11
|
display: "inline-flex",
|
|
12
12
|
alignItems: "center",
|
|
@@ -14,26 +14,25 @@ function a({ field: a, fieldName: o, value: s, mode: c, onChange: l, fieldId: u
|
|
|
14
14
|
},
|
|
15
15
|
children: [/* @__PURE__ */ r("span", {
|
|
16
16
|
style: { fontSize: 12.5 },
|
|
17
|
-
children:
|
|
18
|
-
}), /* @__PURE__ */ r(
|
|
19
|
-
value:
|
|
17
|
+
children: e
|
|
18
|
+
}), /* @__PURE__ */ r(t, {
|
|
19
|
+
value: e,
|
|
20
20
|
size: "sm"
|
|
21
21
|
})]
|
|
22
22
|
}) : /* @__PURE__ */ r("span", {
|
|
23
23
|
style: { fontSize: 12.5 },
|
|
24
|
-
children:
|
|
24
|
+
children: e || /* @__PURE__ */ r("span", {
|
|
25
25
|
style: { color: "var(--text-4)" },
|
|
26
26
|
children: "—"
|
|
27
27
|
})
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
return /* @__PURE__ */ r(
|
|
30
|
+
return /* @__PURE__ */ r(e, {
|
|
31
31
|
id: u,
|
|
32
32
|
name: o,
|
|
33
33
|
"aria-required": a.required || void 0,
|
|
34
|
-
value:
|
|
34
|
+
value: n(s),
|
|
35
35
|
onChange: (e) => l?.(e)
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { a as StringField };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Btn as e } from "../primitives/Btn.js";
|
|
2
|
+
import { FieldLabel as t } from "../primitives/Fields.js";
|
|
3
|
+
import { Icon as n } from "../primitives/Icons.js";
|
|
4
4
|
import { IconBtn as r } from "../primitives/IconBtn.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useSchema as i } from "../../hooks/useSchema.js";
|
|
6
|
+
import { renderField as a } from "./index.js";
|
|
7
7
|
import { JsonField as o } from "./JsonField.js";
|
|
8
|
-
import {
|
|
8
|
+
import { useText as s } from "../../hooks/useText.js";
|
|
9
9
|
import { useId as c } from "react";
|
|
10
10
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
11
|
-
|
|
12
|
-
function d(
|
|
13
|
-
let { field:
|
|
14
|
-
return g ?
|
|
11
|
+
// src/components/fields/StructureField.tsx
|
|
12
|
+
function d(e) {
|
|
13
|
+
let { field: t, value: n, mode: r, onChange: a, fieldId: s, labelId: c, nested: u, refs: d, entities: m } = e, { data: h } = i(), g = t.structure ? h?.structures?.[t.structure] : void 0;
|
|
14
|
+
return g ? t.array ? /* @__PURE__ */ l(p, {
|
|
15
15
|
structDef: g,
|
|
16
|
-
value:
|
|
17
|
-
mode:
|
|
16
|
+
value: n,
|
|
17
|
+
mode: r,
|
|
18
18
|
onChange: a,
|
|
19
19
|
fieldId: s,
|
|
20
20
|
labelId: c,
|
|
@@ -23,27 +23,27 @@ function d(t) {
|
|
|
23
23
|
entities: m
|
|
24
24
|
}) : /* @__PURE__ */ l(f, {
|
|
25
25
|
structDef: g,
|
|
26
|
-
value:
|
|
27
|
-
mode:
|
|
26
|
+
value: n,
|
|
27
|
+
mode: r,
|
|
28
28
|
onChange: a,
|
|
29
29
|
fieldId: s,
|
|
30
30
|
labelId: c,
|
|
31
31
|
nested: u,
|
|
32
32
|
refs: d,
|
|
33
33
|
entities: m
|
|
34
|
-
}) : /* @__PURE__ */ l(o, { ...
|
|
34
|
+
}) : /* @__PURE__ */ l(o, { ...e });
|
|
35
35
|
}
|
|
36
|
-
function f({ structDef: e, value:
|
|
37
|
-
let g =
|
|
36
|
+
function f({ structDef: e, value: n, mode: r, onChange: i, fieldId: o, labelId: f, nested: p = !1, refs: m, entities: h }) {
|
|
37
|
+
let g = s(), _ = c(), v = o ?? _, y = typeof n == "object" && n && !Array.isArray(n) ? n : {}, b = e.fields.names(), x = {
|
|
38
38
|
display: "flex",
|
|
39
39
|
flexDirection: "column",
|
|
40
|
-
gap:
|
|
40
|
+
gap: r === "display" ? 8 : 12,
|
|
41
41
|
border: "1px solid var(--border)",
|
|
42
42
|
borderRadius: "var(--radius-md)",
|
|
43
43
|
padding: 12,
|
|
44
44
|
background: "var(--surface-2)"
|
|
45
45
|
};
|
|
46
|
-
if (
|
|
46
|
+
if (r === "display") return b.some((e) => y[e] != null && y[e] !== "") ? /* @__PURE__ */ l("div", {
|
|
47
47
|
style: p ? {
|
|
48
48
|
display: "flex",
|
|
49
49
|
flexDirection: "column",
|
|
@@ -84,7 +84,7 @@ function f({ structDef: e, value: t, mode: n, onChange: r, fieldId: o, labelId:
|
|
|
84
84
|
nested: !0,
|
|
85
85
|
refs: m,
|
|
86
86
|
entities: h
|
|
87
|
-
}) :
|
|
87
|
+
}) : a({
|
|
88
88
|
field: n,
|
|
89
89
|
fieldName: t,
|
|
90
90
|
value: r,
|
|
@@ -104,7 +104,7 @@ function f({ structDef: e, value: t, mode: n, onChange: r, fieldId: o, labelId:
|
|
|
104
104
|
children: "—"
|
|
105
105
|
});
|
|
106
106
|
let S = (e) => (t) => {
|
|
107
|
-
|
|
107
|
+
i?.({
|
|
108
108
|
...y,
|
|
109
109
|
[e]: t
|
|
110
110
|
});
|
|
@@ -114,47 +114,47 @@ function f({ structDef: e, value: t, mode: n, onChange: r, fieldId: o, labelId:
|
|
|
114
114
|
id: o,
|
|
115
115
|
role: "group",
|
|
116
116
|
"aria-labelledby": f,
|
|
117
|
-
children: b.map((
|
|
118
|
-
let
|
|
119
|
-
if (!
|
|
120
|
-
let
|
|
117
|
+
children: b.map((n) => {
|
|
118
|
+
let r = e.fields.get(n);
|
|
119
|
+
if (!r) return null;
|
|
120
|
+
let i = r.type === "structure" && !!r.structure, o = `${v}-${n}`, s = `${o}-label`;
|
|
121
121
|
return /* @__PURE__ */ u("div", {
|
|
122
122
|
style: {
|
|
123
123
|
display: "flex",
|
|
124
124
|
flexDirection: "column",
|
|
125
125
|
gap: 2
|
|
126
126
|
},
|
|
127
|
-
children: [/* @__PURE__ */ l(
|
|
128
|
-
required:
|
|
129
|
-
id:
|
|
130
|
-
htmlFor:
|
|
131
|
-
children:
|
|
132
|
-
}),
|
|
133
|
-
field:
|
|
127
|
+
children: [/* @__PURE__ */ l(t, {
|
|
128
|
+
required: r.required,
|
|
129
|
+
id: s,
|
|
130
|
+
htmlFor: i ? void 0 : o,
|
|
131
|
+
children: r.display ? g(r.display.name) : n
|
|
132
|
+
}), i ? /* @__PURE__ */ l(d, {
|
|
133
|
+
field: r,
|
|
134
134
|
t: g,
|
|
135
|
-
fieldName:
|
|
136
|
-
value: y[
|
|
135
|
+
fieldName: n,
|
|
136
|
+
value: y[n],
|
|
137
137
|
mode: "edit",
|
|
138
|
-
onChange: S(
|
|
139
|
-
fieldId:
|
|
140
|
-
labelId:
|
|
141
|
-
}) :
|
|
142
|
-
field:
|
|
143
|
-
fieldName:
|
|
144
|
-
value: y[
|
|
138
|
+
onChange: S(n),
|
|
139
|
+
fieldId: o,
|
|
140
|
+
labelId: s
|
|
141
|
+
}) : a({
|
|
142
|
+
field: r,
|
|
143
|
+
fieldName: n,
|
|
144
|
+
value: y[n],
|
|
145
145
|
mode: "edit",
|
|
146
|
-
onChange: S(
|
|
147
|
-
fieldId:
|
|
148
|
-
labelId:
|
|
146
|
+
onChange: S(n),
|
|
147
|
+
fieldId: o,
|
|
148
|
+
labelId: s,
|
|
149
149
|
t: g
|
|
150
150
|
})]
|
|
151
|
-
},
|
|
151
|
+
}, n);
|
|
152
152
|
})
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
-
function p({ structDef:
|
|
156
|
-
let _ =
|
|
157
|
-
if (
|
|
155
|
+
function p({ structDef: t, value: i, mode: a, onChange: o, fieldId: d, labelId: p, nested: m = !1, refs: h, entities: g }) {
|
|
156
|
+
let _ = s(), v = c(), y = d ?? v, b = Array.isArray(i) ? i : [];
|
|
157
|
+
if (a === "display") return b.length === 0 ? /* @__PURE__ */ l("span", {
|
|
158
158
|
style: {
|
|
159
159
|
fontSize: 12.5,
|
|
160
160
|
color: "var(--text-4)"
|
|
@@ -166,14 +166,14 @@ function p({ structDef: e, value: a, mode: o, onChange: s, fieldId: d, labelId:
|
|
|
166
166
|
flexDirection: "column",
|
|
167
167
|
gap: 8
|
|
168
168
|
},
|
|
169
|
-
children: b.map((
|
|
169
|
+
children: b.map((e, n) => /* @__PURE__ */ l("div", {
|
|
170
170
|
style: m && n > 0 ? {
|
|
171
171
|
borderTop: "1px solid var(--border)",
|
|
172
172
|
paddingTop: 8
|
|
173
173
|
} : void 0,
|
|
174
174
|
children: /* @__PURE__ */ l(f, {
|
|
175
|
-
structDef:
|
|
176
|
-
value:
|
|
175
|
+
structDef: t,
|
|
176
|
+
value: e,
|
|
177
177
|
mode: "display",
|
|
178
178
|
nested: m,
|
|
179
179
|
refs: h,
|
|
@@ -183,12 +183,12 @@ function p({ structDef: e, value: a, mode: o, onChange: s, fieldId: d, labelId:
|
|
|
183
183
|
});
|
|
184
184
|
let x = (e) => (t) => {
|
|
185
185
|
let n = [...b];
|
|
186
|
-
n[e] = t,
|
|
186
|
+
n[e] = t, o?.(n);
|
|
187
187
|
}, S = () => {
|
|
188
|
-
|
|
188
|
+
o?.([...b, {}]);
|
|
189
189
|
}, C = (e) => () => {
|
|
190
190
|
let t = b.filter((t, n) => n !== e);
|
|
191
|
-
|
|
191
|
+
o?.(t);
|
|
192
192
|
};
|
|
193
193
|
return /* @__PURE__ */ u("div", {
|
|
194
194
|
style: {
|
|
@@ -199,11 +199,11 @@ function p({ structDef: e, value: a, mode: o, onChange: s, fieldId: d, labelId:
|
|
|
199
199
|
id: d,
|
|
200
200
|
role: "group",
|
|
201
201
|
"aria-labelledby": p,
|
|
202
|
-
children: [b.map((
|
|
202
|
+
children: [b.map((e, i) => /* @__PURE__ */ u("div", {
|
|
203
203
|
style: { position: "relative" },
|
|
204
204
|
children: [/* @__PURE__ */ l(f, {
|
|
205
|
-
structDef:
|
|
206
|
-
value:
|
|
205
|
+
structDef: t,
|
|
206
|
+
value: e,
|
|
207
207
|
mode: "edit",
|
|
208
208
|
onChange: x(i),
|
|
209
209
|
fieldId: `${y}-${i}`
|
|
@@ -215,17 +215,16 @@ function p({ structDef: e, value: a, mode: o, onChange: s, fieldId: d, labelId:
|
|
|
215
215
|
},
|
|
216
216
|
children: /* @__PURE__ */ l(r, {
|
|
217
217
|
size: 24,
|
|
218
|
-
icon: /* @__PURE__ */ l(
|
|
218
|
+
icon: /* @__PURE__ */ l(n.trash, { size: 12 }),
|
|
219
219
|
onClick: C(i),
|
|
220
220
|
title: _("field.structure.remove", "Remove")
|
|
221
221
|
})
|
|
222
222
|
})]
|
|
223
|
-
}, i)), /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
|
|
224
|
-
icon: /* @__PURE__ */ l(
|
|
223
|
+
}, i)), /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(e, {
|
|
224
|
+
icon: /* @__PURE__ */ l(n.plus, { size: 13 }),
|
|
225
225
|
onClick: S,
|
|
226
226
|
children: _("field.array.add", "Add")
|
|
227
227
|
}) })]
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
|
-
//#endregion
|
|
231
230
|
export { d as StructureField };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { TextArea as e, TextInput as t } from "../primitives/Fields.js";
|
|
2
|
+
import { CopyButton as n } from "../shared/CopyButton.js";
|
|
3
|
+
import { Markdown as r } from "../shared/Markdown.js";
|
|
4
|
+
import { coerceDisplayString as i } from "../../lib/display-value.js";
|
|
5
5
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/components/fields/TextField.tsx
|
|
7
7
|
function s({ field: s, fieldName: c, value: l, mode: u, onChange: d, fill: f, compact: p, fieldId: m }) {
|
|
8
8
|
let h = s.display?.widget;
|
|
9
9
|
if (u === "display") {
|
|
10
|
-
let
|
|
11
|
-
if (!
|
|
10
|
+
let e = i(l);
|
|
11
|
+
if (!e) return /* @__PURE__ */ a("span", {
|
|
12
12
|
style: {
|
|
13
13
|
fontSize: 12.5,
|
|
14
14
|
color: "var(--text-4)"
|
|
15
15
|
},
|
|
16
16
|
children: "—"
|
|
17
17
|
});
|
|
18
|
-
let
|
|
18
|
+
let t = h === "markdown" ? /* @__PURE__ */ a(r, { content: e }) : h === "code" ? /* @__PURE__ */ a("pre", {
|
|
19
19
|
className: "mono",
|
|
20
20
|
style: {
|
|
21
21
|
fontSize: 12,
|
|
@@ -29,7 +29,7 @@ function s({ field: s, fieldName: c, value: l, mode: u, onChange: d, fill: f, co
|
|
|
29
29
|
overflowY: "auto",
|
|
30
30
|
whiteSpace: "pre"
|
|
31
31
|
},
|
|
32
|
-
children:
|
|
32
|
+
children: e
|
|
33
33
|
}) : /* @__PURE__ */ a("p", {
|
|
34
34
|
style: {
|
|
35
35
|
fontSize: 12.5,
|
|
@@ -37,40 +37,39 @@ function s({ field: s, fieldName: c, value: l, mode: u, onChange: d, fill: f, co
|
|
|
37
37
|
wordBreak: "break-word",
|
|
38
38
|
margin: 0
|
|
39
39
|
},
|
|
40
|
-
children:
|
|
40
|
+
children: e
|
|
41
41
|
});
|
|
42
42
|
return s.copyable ? /* @__PURE__ */ o("div", {
|
|
43
43
|
style: { position: "relative" },
|
|
44
|
-
children: [
|
|
44
|
+
children: [t, /* @__PURE__ */ a("div", {
|
|
45
45
|
style: {
|
|
46
46
|
position: "absolute",
|
|
47
47
|
top: 0,
|
|
48
48
|
right: 0
|
|
49
49
|
},
|
|
50
|
-
children: /* @__PURE__ */ a(
|
|
51
|
-
value:
|
|
50
|
+
children: /* @__PURE__ */ a(n, {
|
|
51
|
+
value: e,
|
|
52
52
|
size: "sm"
|
|
53
53
|
})
|
|
54
54
|
})]
|
|
55
|
-
}) :
|
|
55
|
+
}) : t;
|
|
56
56
|
}
|
|
57
|
-
if (p) return /* @__PURE__ */ a(
|
|
57
|
+
if (p) return /* @__PURE__ */ a(t, {
|
|
58
58
|
id: m,
|
|
59
59
|
name: c,
|
|
60
60
|
"aria-required": s.required || void 0,
|
|
61
|
-
value:
|
|
61
|
+
value: i(l),
|
|
62
62
|
onChange: (e) => d?.(e)
|
|
63
63
|
});
|
|
64
64
|
let g = h === "markdown" || h === "code" ? 10 : 4;
|
|
65
|
-
return /* @__PURE__ */ a(
|
|
65
|
+
return /* @__PURE__ */ a(e, {
|
|
66
66
|
id: m,
|
|
67
67
|
name: c,
|
|
68
68
|
ariaRequired: s.required,
|
|
69
|
-
value:
|
|
69
|
+
value: i(l),
|
|
70
70
|
onChange: (e) => d?.(e),
|
|
71
71
|
rows: g,
|
|
72
72
|
fill: f
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
//#endregion
|
|
76
75
|
export { s as TextField };
|