@declarion/react 0.65.0 → 0.66.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/api/access-expiry.js +32 -0
- package/dist-lib/api/agents.js +105 -0
- package/dist-lib/api/auth-redirect.js +30 -0
- package/dist-lib/api/auth.js +67 -0
- package/dist-lib/api/batch.js +34 -0
- package/dist-lib/api/client.js +241 -0
- package/dist-lib/api/data.js +122 -0
- package/dist-lib/api/entities.js +160 -0
- package/dist-lib/api/events.js +120 -0
- package/dist-lib/api/fileReferences.js +8 -0
- package/dist-lib/api/params.js +20 -0
- package/dist-lib/api/properties.js +25 -0
- package/dist-lib/api/request-bounds.js +28 -0
- package/dist-lib/api/schema.js +71 -0
- package/dist-lib/api/session-renewal.js +36 -0
- package/dist-lib/api/status.js +17 -0
- package/dist-lib/app.js +262 -0
- package/dist-lib/components/actions/ActionButton.js +116 -0
- package/dist-lib/{ActionDialog-C6EG-AmC.js → components/actions/ActionDialog.js} +63 -53
- package/dist-lib/{ActionResultDialog.impl-BATutW8J.js → components/actions/ActionResultDialog.impl.js} +53 -48
- package/dist-lib/components/actions/ActionResultDialog.js +12 -0
- package/dist-lib/components/actions/ActionRunner.js +274 -0
- package/dist-lib/components/actions/ObjectActionBar.js +127 -0
- package/dist-lib/components/actions/PropertyGridEditor.js +202 -0
- package/dist-lib/components/actions/ResponsiveActionBar.js +773 -0
- package/dist-lib/components/actions/RowActionsKebab.js +90 -0
- package/dist-lib/{AgentChatPanel.impl-D5y_qEex.js → components/agents/AgentChatPanel.impl.js} +314 -362
- package/dist-lib/components/agents/AgentChatPanel.js +12 -0
- package/dist-lib/components/agents/AgentConversationDrawer.js +59 -0
- package/dist-lib/components/agents/AgentElicitForm.js +152 -0
- package/dist-lib/components/agents/AgentOpenFollower.impl.js +7 -0
- package/dist-lib/components/agents/AgentOpenFollower.js +12 -0
- package/dist-lib/components/agents/AgentPicker.js +58 -0
- package/dist-lib/components/agents/transcript-runs.js +52 -0
- package/dist-lib/components/chrome/AssociationTabs.js +176 -0
- package/dist-lib/components/chrome/AuditMetaStrip.js +64 -0
- package/dist-lib/components/chrome/Breadcrumbs.js +67 -0
- package/dist-lib/components/chrome/HighlightsStrip.js +39 -0
- package/dist-lib/{PageHeader-DiwLe7CO.js → components/chrome/PageHeader.js} +19 -15
- package/dist-lib/{PageShell-BJz1MiTH.js → components/chrome/PageShell.js} +3 -3
- package/dist-lib/components/chrome/RecordHeader.js +119 -0
- package/dist-lib/{headerActionZone-bef-tZZ7.js → components/chrome/headerActionZone.js} +1 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.js +1244 -0
- package/dist-lib/components/detail-layout/AssociatedToolbar.js +87 -0
- package/dist-lib/components/detail-layout/ChildrenBlock.js +80 -0
- package/dist-lib/components/detail-layout/ChildrenCards.js +156 -0
- package/dist-lib/components/detail-layout/ChildrenList.js +135 -0
- package/dist-lib/components/detail-layout/ChildrenTable.js +189 -0
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +609 -0
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +40 -0
- package/dist-lib/components/detail-layout/DetailHighlights.js +54 -0
- package/dist-lib/{DraggableChildrenTable-Dd5SeuF6.js → components/detail-layout/DraggableChildrenTable.js} +56 -53
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +341 -0
- package/dist-lib/components/detail-layout/ErrorSummary.js +89 -0
- package/dist-lib/components/detail-layout/EvidenceBlock.js +66 -0
- package/dist-lib/{FieldRow-DedGIY9R.js → components/detail-layout/FieldRow.js} +8 -7
- package/dist-lib/components/detail-layout/FieldsBlock.js +74 -0
- package/dist-lib/components/detail-layout/LayoutColumn.js +16 -0
- package/dist-lib/components/detail-layout/LayoutRenderer.js +54 -0
- package/dist-lib/components/detail-layout/LayoutRow.js +83 -0
- package/dist-lib/components/detail-layout/LayoutTabs.js +195 -0
- package/dist-lib/components/detail-layout/PropertiesBlock.js +74 -0
- package/dist-lib/components/detail-layout/QuickAddForm.js +81 -0
- package/dist-lib/components/detail-layout/SectionBlock.js +48 -0
- package/dist-lib/components/detail-layout/StatusesBlock.js +18 -0
- package/dist-lib/components/detail-layout/TimelineComposer.js +205 -0
- package/dist-lib/components/detail-layout/blockMeta.js +27 -0
- package/dist-lib/components/detail-layout/useManualColumnResize.js +94 -0
- package/dist-lib/components/detail-layout/useQuickAdd.js +85 -0
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +295 -0
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +107 -0
- package/dist-lib/components/detail-layout/widgets/MonacoJson.js +47 -0
- package/dist-lib/components/detail-layout/widgets/WidgetHost.js +36 -0
- package/dist-lib/components/detail-layout/widgets/builtins.js +10 -0
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +32 -0
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +16 -0
- package/dist-lib/components/detail-layout/widgets/registry.js +13 -0
- package/dist-lib/components/fields/BoolField.js +13 -0
- package/dist-lib/components/fields/EmailField.js +16 -0
- package/dist-lib/components/fields/EnumField.js +38 -0
- package/dist-lib/components/fields/FileReferenceField.js +60 -0
- package/dist-lib/components/fields/IntArrayField.js +83 -0
- package/dist-lib/components/fields/JsonField.js +51 -0
- package/dist-lib/components/fields/MultilangArrayField.js +56 -0
- package/dist-lib/components/fields/MultilangField.js +65 -0
- package/dist-lib/components/fields/MultilangTextField.js +65 -0
- package/dist-lib/components/fields/NumberField.js +64 -0
- package/dist-lib/components/fields/PasswordField.js +34 -0
- package/dist-lib/components/fields/PhoneField.js +84 -0
- package/dist-lib/components/fields/RefCombobox.js +112 -0
- package/dist-lib/components/fields/RefField.js +45 -0
- package/dist-lib/components/fields/RichTextField.js +225 -0
- package/dist-lib/components/fields/SecretField.js +34 -0
- package/dist-lib/components/fields/StringArrayField.js +165 -0
- package/dist-lib/components/fields/StringField.js +39 -0
- package/dist-lib/components/fields/StructureField.js +221 -0
- package/dist-lib/components/fields/TextField.js +76 -0
- package/dist-lib/components/fields/TimestampField.js +110 -0
- package/dist-lib/components/fields/UrlField.js +18 -0
- package/dist-lib/components/fields/cells/factories/badge.js +42 -0
- package/dist-lib/components/fields/cells/factories/boolPill.js +17 -0
- package/dist-lib/components/fields/cells/factories/code.js +11 -0
- package/dist-lib/components/fields/cells/factories/date.js +30 -0
- package/dist-lib/components/fields/cells/factories/email.js +26 -0
- package/dist-lib/components/fields/cells/factories/emptyCell.js +10 -0
- package/dist-lib/components/fields/cells/factories/fileReference.js +17 -0
- package/dist-lib/components/fields/cells/factories/host-icons.js +146 -0
- package/dist-lib/components/fields/cells/factories/json.js +61 -0
- package/dist-lib/components/fields/cells/factories/link.js +32 -0
- package/dist-lib/components/fields/cells/factories/markdown.js +31 -0
- package/dist-lib/components/fields/cells/factories/markdownPreview.js +81 -0
- package/dist-lib/components/fields/cells/factories/money.js +37 -0
- package/dist-lib/components/fields/cells/factories/multilangInline.js +35 -0
- package/dist-lib/components/fields/cells/factories/nextRun.js +46 -0
- package/dist-lib/components/fields/cells/factories/number.js +42 -0
- package/dist-lib/components/fields/cells/factories/passwordMask.js +23 -0
- package/dist-lib/components/fields/cells/factories/phone.js +35 -0
- package/dist-lib/components/fields/cells/factories/refLink.js +57 -0
- package/dist-lib/components/fields/cells/factories/richTextPreview.js +34 -0
- package/dist-lib/components/fields/cells/factories/statusPill.js +35 -0
- package/dist-lib/components/fields/cells/factories/tagList.js +44 -0
- package/dist-lib/components/fields/cells/factories/text.js +5 -0
- package/dist-lib/components/fields/cells/factories/timestamp.js +18 -0
- package/dist-lib/components/fields/cells/factories/url-helpers.js +49 -0
- package/dist-lib/components/fields/cells/factories/url.js +45 -0
- package/dist-lib/components/fields/cells/registry.js +58 -0
- package/dist-lib/components/fields/index.js +80 -0
- package/dist-lib/components/fields/langMap.js +6 -0
- package/dist-lib/components/fields/secretValue.js +7 -0
- package/dist-lib/components/file-widgets/CircleImage.js +11 -0
- package/dist-lib/components/file-widgets/DocumentCard.js +277 -0
- package/dist-lib/components/file-widgets/FileList.js +213 -0
- package/dist-lib/{Grid-XUHm5SDe.js → components/file-widgets/Grid.js} +45 -40
- package/dist-lib/components/file-widgets/GridLazy.js +15 -0
- package/dist-lib/components/file-widgets/ImageWidget.js +354 -0
- package/dist-lib/components/file-widgets/LabeledSlots.js +69 -0
- package/dist-lib/components/file-widgets/SquareImage.js +11 -0
- package/dist-lib/components/file-widgets/UnknownFileWidget.js +22 -0
- package/dist-lib/components/file-widgets/UploadFailureText.js +10 -0
- package/dist-lib/components/file-widgets/WideBanner.js +11 -0
- package/dist-lib/components/file-widgets/builtins.js +15 -0
- package/dist-lib/components/file-widgets/cropper.js +13 -0
- package/dist-lib/components/file-widgets/draft-scope.js +59 -0
- package/dist-lib/components/file-widgets/helpers.js +75 -0
- package/dist-lib/components/file-widgets/host.js +75 -0
- package/dist-lib/{payload-DioMoxMX.js → components/file-widgets/payload.js} +14 -14
- package/dist-lib/components/file-widgets/registry.js +13 -0
- package/dist-lib/components/file-widgets/upload.js +180 -0
- package/dist-lib/components/file-widgets/useEmbedFileSrc.js +45 -0
- package/dist-lib/components/file-widgets/value.js +12 -0
- package/dist-lib/components/filters/FilterChips.js +123 -0
- package/dist-lib/components/filters/FilterConditionValue.js +40 -0
- package/dist-lib/components/filters/FilterDrawer.js +670 -0
- package/dist-lib/components/filters/FilterOmittedNotice.js +14 -0
- package/dist-lib/components/filters/filter-op-label.js +8 -0
- package/dist-lib/{CommandPalette.impl-DRI5kxVY.js → components/layout/CommandPalette.impl.js} +62 -61
- package/dist-lib/components/layout/CommandPalette.js +12 -0
- package/dist-lib/{DirtyTabsCloseDialog.impl-FhAiOmEb.js → components/layout/DirtyTabsCloseDialog.impl.js} +16 -14
- package/dist-lib/components/layout/DirtyTabsCloseDialog.js +12 -0
- package/dist-lib/{ImpersonationBanner.impl--g0iYwcV.js → components/layout/ImpersonationBanner.impl.js} +4 -3
- package/dist-lib/components/layout/ImpersonationBanner.js +12 -0
- package/dist-lib/components/layout/ImpersonationFrame.js +29 -0
- package/dist-lib/{ImpersonationStartModal.impl-BFBN0YJe.js → components/layout/ImpersonationStartModal.impl.js} +9 -9
- package/dist-lib/components/layout/ImpersonationStartModal.js +12 -0
- package/dist-lib/components/layout/Layout.js +755 -0
- package/dist-lib/components/layout/Rail.js +149 -0
- package/dist-lib/components/layout/Sidebar.js +362 -0
- package/dist-lib/components/layout/TabStrip.js +321 -0
- package/dist-lib/components/layout/TenantChip.js +355 -0
- package/dist-lib/components/layout/TopBar.js +305 -0
- package/dist-lib/components/layout/tab-close.js +24 -0
- package/dist-lib/components/list/ColumnPicker.js +112 -0
- package/dist-lib/components/list/InlineEditCell.js +107 -0
- package/dist-lib/components/list/PeekFieldCell.js +143 -0
- package/dist-lib/components/list/QuickPeek.js +263 -0
- package/dist-lib/components/list/ViewSwitcher.js +156 -0
- package/dist-lib/components/list/peekDraftStore.js +14 -0
- package/dist-lib/{AdminCatalogPage.impl-B-7MLqa1.js → components/pages/AdminCatalogPage.impl.js} +53 -49
- package/dist-lib/components/pages/AdminCatalogPage.js +12 -0
- package/dist-lib/components/pages/DocumentsMenu.js +150 -0
- package/dist-lib/components/pages/ExportMenu.js +123 -0
- package/dist-lib/{NotFoundPage.impl-BoX11u-P.js → components/pages/NotFoundPage.impl.js} +6 -4
- package/dist-lib/components/pages/NotFoundPage.js +12 -0
- package/dist-lib/components/pages/RecordDocumentsPanel.js +230 -0
- package/dist-lib/components/pages/RecordNotesPanel.js +200 -0
- package/dist-lib/components/pages/RecordPanels.js +18 -0
- package/dist-lib/components/pages/SSOCallbackPage.impl.js +28 -0
- package/dist-lib/components/pages/SSOCallbackPage.js +12 -0
- package/dist-lib/components/pages/SmartDetailPage.impl.js +986 -0
- package/dist-lib/components/pages/SmartDetailPage.js +12 -0
- package/dist-lib/components/pages/SmartListPage.impl.js +708 -0
- package/dist-lib/components/pages/SmartListPage.js +12 -0
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +818 -0
- package/dist-lib/components/pages/SmartRecordListPage.js +12 -0
- package/dist-lib/components/pages/auth/AuthShell.js +350 -0
- package/dist-lib/{Forgot.impl-6tL6SBlS.js → components/pages/auth/Forgot.impl.js} +13 -12
- package/dist-lib/components/pages/auth/Forgot.js +12 -0
- package/dist-lib/{Reset.impl-D0pjhS6d.js → components/pages/auth/Reset.impl.js} +17 -15
- package/dist-lib/components/pages/auth/Reset.js +12 -0
- package/dist-lib/components/pages/auth/SignIn.js +252 -0
- package/dist-lib/{SignUp.impl-CfEXrUeg.js → components/pages/auth/SignUp.impl.js} +31 -27
- package/dist-lib/components/pages/auth/SignUp.js +12 -0
- package/dist-lib/{TwoFA.impl-B2HtPduH.js → components/pages/auth/TwoFA.impl.js} +9 -8
- package/dist-lib/components/pages/auth/TwoFA.js +12 -0
- package/dist-lib/components/pages/auth/icons.js +56 -0
- package/dist-lib/components/pages/exportRequest.js +17 -0
- package/dist-lib/components/pages/list/DataCell.js +27 -0
- package/dist-lib/components/pages/list/DeleteViewDialog.js +22 -0
- package/dist-lib/{ListCardsBody-BEoYjSZ2.js → components/pages/list/ListCardRow.js} +47 -72
- package/dist-lib/components/pages/list/ListCardsBody.js +31 -0
- package/dist-lib/components/pages/list/ListFloatbar.js +130 -0
- package/dist-lib/components/pages/list/ListFooter.js +138 -0
- package/dist-lib/components/pages/list/ListHeader.js +120 -0
- package/dist-lib/components/pages/list/ListNoRows.js +72 -0
- package/dist-lib/components/pages/list/ListTable.js +191 -0
- package/dist-lib/components/pages/list/ListTableRow.js +37 -0
- package/dist-lib/components/pages/list/ListToolbar.js +261 -0
- package/dist-lib/components/pages/list/ListUrlBanner.js +45 -0
- package/dist-lib/components/pages/list/RowActionsCell.js +49 -0
- package/dist-lib/components/pages/list/RowContextMenu.js +55 -0
- package/dist-lib/components/pages/list/SaveViewDialog.js +111 -0
- package/dist-lib/{SortHeaderMenu-Co5PvhTA.js → components/pages/list/SortHeaderMenu.js} +18 -17
- package/dist-lib/{cardProjection-Cxlogzh8.js → components/pages/list/cardProjection.js} +3 -3
- package/dist-lib/components/pages/list/column-sizing.js +17 -0
- package/dist-lib/components/pages/list/columns.js +168 -0
- package/dist-lib/components/pages/list/filter-meta.js +84 -0
- package/dist-lib/components/pages/list/page-size.js +11 -0
- package/dist-lib/components/pages/list/sortable-header.js +18 -0
- package/dist-lib/components/pages/list/table-features.js +11 -0
- package/dist-lib/components/pages/list/use-filter-value-labels.js +115 -0
- package/dist-lib/components/pages/list/useActiveView.js +98 -0
- package/dist-lib/components/pages/list/useHeaderReorder.js +93 -0
- package/dist-lib/components/pages/list/useListColumnLayout.js +56 -0
- package/dist-lib/components/pages/list/useListFilterPresentation.js +34 -0
- package/dist-lib/components/pages/list/useListQuery.js +101 -0
- package/dist-lib/components/pages/list/useListRowInteraction.js +120 -0
- package/dist-lib/components/pages/list/useListSelection.js +53 -0
- package/dist-lib/components/pages/list/useListSort.js +44 -0
- package/dist-lib/components/pages/list/useListViews.js +148 -0
- package/dist-lib/components/pages/list/useRowMenu.js +106 -0
- package/dist-lib/components/pages/list/visible-filters.js +19 -0
- package/dist-lib/{Preferences.impl-Ct5xwZtT.js → components/pages/profile/Preferences.impl.js} +34 -31
- package/dist-lib/components/pages/profile/Preferences.js +12 -0
- package/dist-lib/components/pages/profile/Profile.impl.js +437 -0
- package/dist-lib/components/pages/profile/Profile.js +12 -0
- package/dist-lib/{TenantParamsPage.impl-BGpdmEZg.js → components/pages/tenant-params/TenantParamsPage.impl.js} +45 -40
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +12 -0
- package/dist-lib/components/params/ParamsBlock.js +119 -0
- package/dist-lib/{param-editors-TYYU7HKK.js → components/params/param-editors.js} +32 -28
- package/dist-lib/components/primitives/Avatar.js +33 -0
- package/dist-lib/components/primitives/BoolToggle.js +35 -0
- package/dist-lib/components/primitives/BrandGlyph.js +38 -0
- package/dist-lib/components/primitives/BrandLogo.js +20 -0
- package/dist-lib/components/primitives/Btn.js +67 -0
- package/dist-lib/{Check-DAfMbQIw.js → components/primitives/Check.js} +2 -2
- package/dist-lib/components/primitives/Chip.js +44 -0
- package/dist-lib/components/primitives/ClassifiedFieldLocked.js +15 -0
- package/dist-lib/components/primitives/Dropdown.js +85 -0
- package/dist-lib/components/primitives/Fields.js +751 -0
- package/dist-lib/components/primitives/HoverCard.js +115 -0
- package/dist-lib/components/primitives/IconBtn.js +37 -0
- package/dist-lib/{Icons-lt-7lhYR.js → components/primitives/Icons.js} +1 -1
- package/dist-lib/{Kbd-CNttVu0z.js → components/primitives/Kbd.js} +2 -2
- package/dist-lib/components/primitives/MenuItem.js +57 -0
- package/dist-lib/{Pill-D-wsfRhx.js → components/primitives/Pill.js} +1 -1
- package/dist-lib/{RecordIdBadge-wbigZaFc.js → components/primitives/RecordIdBadge.js} +5 -5
- package/dist-lib/components/primitives/RowField.js +47 -0
- package/dist-lib/{SectionCard-BYHoHWJc.js → components/primitives/SectionCard.js} +10 -10
- package/dist-lib/components/primitives/Spinner.js +31 -0
- package/dist-lib/components/primitives/StatTile.js +108 -0
- package/dist-lib/components/primitives/Tooltip.js +115 -0
- package/dist-lib/{dataTableStyles-vwD1mVOP.js → components/primitives/dataTableStyles.js} +1 -1
- package/dist-lib/components/shared/BlankScreen.js +13 -0
- package/dist-lib/{ChangePasswordDialog.impl-5hDc0wpE.js → components/shared/ChangePasswordDialog.impl.js} +27 -22
- package/dist-lib/{ChangePasswordDialog-C_T_3pjl.js → components/shared/ChangePasswordDialog.js} +2 -2
- package/dist-lib/components/shared/ConfirmDialog.js +129 -0
- package/dist-lib/components/shared/ConnectionNotice.js +12 -0
- package/dist-lib/components/shared/CopyButton.js +25 -0
- package/dist-lib/components/shared/DynamicIcon.js +73 -0
- package/dist-lib/components/shared/EmptyState.js +56 -0
- package/dist-lib/components/shared/ErrorBoundary.js +96 -0
- package/dist-lib/components/shared/LoadingSkeleton.js +117 -0
- package/dist-lib/components/shared/LucideIcon.js +43 -0
- package/dist-lib/components/shared/Markdown.js +15 -0
- package/dist-lib/{MarkdownRenderer-sK2TRZS-.js → components/shared/MarkdownRenderer.js} +10 -9
- package/dist-lib/components/shared/RefreshControl.js +42 -0
- package/dist-lib/components/shared/StatusGroupsDisplay.js +123 -0
- package/dist-lib/components/shared/StatusStepper.js +70 -0
- package/dist-lib/components/shared/toast/DeclarionToast.js +308 -0
- package/dist-lib/components/shared/useOwnRefresh.js +19 -0
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/embed/EmbedAuthBootstrap.js +71 -0
- package/dist-lib/embed/EmbedContext.js +38 -0
- package/dist-lib/embed/EmbedDirtyReporter.js +17 -0
- package/dist-lib/embed/EmbedHistoryTracker.js +17 -0
- package/dist-lib/embed/EmbedLocationReporter.js +26 -0
- package/dist-lib/embed/EmbedResizeReporter.js +25 -0
- package/dist-lib/embed/EmbedUnsavedGuard.js +23 -0
- package/dist-lib/embed/embed-dirty.js +21 -0
- package/dist-lib/embed/embed-history.js +17 -0
- package/dist-lib/embed/embed-nav-guard.js +13 -0
- package/dist-lib/embed/file-src.js +60 -0
- package/dist-lib/embed/handshake.js +37 -0
- package/dist-lib/embed/params.js +45 -0
- package/dist-lib/embed/protocol.js +26 -0
- package/dist-lib/embed/screen-location.js +44 -0
- package/dist-lib/embed/theme.js +11 -0
- package/dist-lib/embed/token.js +54 -0
- package/dist-lib/embed/useEmbedNavigate.js +65 -0
- package/dist-lib/embed/useGlobalLinkInterceptor.js +63 -0
- package/dist-lib/hooks/useActionData.js +58 -0
- package/dist-lib/hooks/useAgentConversation.js +311 -0
- package/dist-lib/hooks/useAggregate.js +18 -0
- package/dist-lib/hooks/useAllEntityData.js +53 -0
- package/dist-lib/hooks/useAssociatedData.js +37 -0
- package/dist-lib/hooks/useAuth.js +56 -0
- package/dist-lib/hooks/useBranding.js +18 -0
- package/dist-lib/hooks/useBrandingChrome.js +58 -0
- package/dist-lib/hooks/useChildrenData.js +33 -0
- package/dist-lib/hooks/useColumns.js +44 -0
- package/dist-lib/hooks/useConnectionNotice.js +35 -0
- package/dist-lib/{useCurrentLocation-Bq1T72AW.js → hooks/useCurrentLocation.js} +2 -2
- package/dist-lib/hooks/useCurrentScreen.js +20 -0
- package/dist-lib/hooks/useCursorEntityData.js +77 -0
- package/dist-lib/hooks/useDebounce.js +11 -0
- package/dist-lib/hooks/useEntity.js +8 -0
- package/dist-lib/hooks/useEntityData.js +64 -0
- package/dist-lib/hooks/useFileReferenceJSON.js +29 -0
- package/dist-lib/hooks/useFilters.js +28 -0
- package/dist-lib/hooks/useFollowAgentOpen.js +84 -0
- package/dist-lib/hooks/useImpersonation.js +40 -0
- package/dist-lib/hooks/useIntentPrefetch.js +43 -0
- package/dist-lib/hooks/useJsonSnapshot.js +8 -0
- package/dist-lib/hooks/useLanguage.js +21 -0
- package/dist-lib/hooks/useLiveObject.js +17 -0
- package/dist-lib/hooks/useLongPress.js +49 -0
- package/dist-lib/hooks/useMutations.js +70 -0
- package/dist-lib/{useObject-B45F96rC.js → hooks/useObject.js} +2 -2
- package/dist-lib/hooks/useObjectStatus.js +20 -0
- package/dist-lib/hooks/usePageState.js +18 -0
- package/dist-lib/hooks/usePageStateRuntime.js +46 -0
- package/dist-lib/hooks/usePageStateTtl.js +10 -0
- package/dist-lib/hooks/useParams.js +123 -0
- package/dist-lib/hooks/useProperties.js +32 -0
- package/dist-lib/hooks/useRealtimeThresholds.js +31 -0
- package/dist-lib/hooks/useRegisterScreenTab.js +28 -0
- package/dist-lib/hooks/useResponsiveMode.js +84 -0
- package/dist-lib/hooks/useSSE.js +307 -0
- package/dist-lib/hooks/useSchema.js +73 -0
- package/dist-lib/hooks/useScreen.js +8 -0
- package/dist-lib/hooks/useScreenBack.js +60 -0
- package/dist-lib/hooks/useScreenTab.js +11 -0
- package/dist-lib/hooks/useTabNavigate.js +82 -0
- package/dist-lib/hooks/useTabSearchMirror.js +19 -0
- package/dist-lib/{useTabTitle-KrzEo118.js → hooks/useTabTitle.js} +9 -7
- package/dist-lib/hooks/useText.js +15 -0
- package/dist-lib/hooks/useTimelineData.js +44 -0
- package/dist-lib/hooks/useUnsavedInput.js +18 -0
- package/dist-lib/hooks/useVersionWatcher.js +62 -0
- package/dist-lib/hooks/useViews.js +88 -0
- package/dist-lib/hooks/useWindowConversation.js +11 -0
- package/dist-lib/icons.js +5 -3
- package/dist-lib/index.d.ts +42 -20
- package/dist-lib/index.js +131 -3926
- package/dist-lib/lib/action-dispatch.js +7 -0
- package/dist-lib/lib/actions.js +279 -0
- package/dist-lib/lib/anchor.js +41 -0
- package/dist-lib/lib/brand-tokens.js +95 -0
- package/dist-lib/lib/branding.js +25 -0
- package/dist-lib/lib/canonical-url.js +17 -0
- package/dist-lib/lib/capabilityPrefetch.js +57 -0
- package/dist-lib/lib/child-config.js +111 -0
- package/dist-lib/lib/children-validation.js +52 -0
- package/dist-lib/lib/decimal-text.js +15 -0
- package/dist-lib/lib/display-value.js +19 -0
- package/dist-lib/lib/document-templates.js +6 -0
- package/dist-lib/lib/download.js +41 -0
- package/dist-lib/lib/evidence-verdict.js +23 -0
- package/dist-lib/lib/failure.js +9 -0
- package/dist-lib/lib/field-classification.js +58 -0
- package/dist-lib/lib/field-regions.js +13 -0
- package/dist-lib/lib/filter-evaluator.js +98 -0
- package/dist-lib/lib/filters.js +118 -0
- package/dist-lib/lib/format-count.js +24 -0
- package/dist-lib/lib/html-state.js +9 -0
- package/dist-lib/lib/language.js +52 -0
- package/dist-lib/lib/longPressGesture.js +34 -0
- package/dist-lib/lib/mass-edit.js +65 -0
- package/dist-lib/{page-inset-D_kkVwwN.js → lib/page-inset.js} +1 -1
- package/dist-lib/lib/phone.js +28 -0
- package/dist-lib/lib/query-retry.js +7 -0
- package/dist-lib/lib/quick-add.js +23 -0
- package/dist-lib/lib/realtime-query-keys.js +23 -0
- package/dist-lib/lib/realtime-reconcile.js +148 -0
- package/dist-lib/lib/realtime-resync.js +192 -0
- package/dist-lib/lib/record-documents-key.js +4 -0
- package/dist-lib/lib/ref-choices.js +6 -0
- package/dist-lib/lib/refetch-when-idle.js +25 -0
- package/dist-lib/lib/rich-text.js +46 -0
- package/dist-lib/lib/rowClickGesture.js +10 -0
- package/dist-lib/lib/safe-url.js +34 -0
- package/dist-lib/lib/schema-routing.js +51 -0
- package/dist-lib/{screen-back-BtbEp5sO.js → lib/screen-back.js} +2 -2
- package/dist-lib/lib/scroll-restoration.js +156 -0
- package/dist-lib/lib/size-value.js +22 -0
- package/dist-lib/lib/sort.js +59 -0
- package/dist-lib/lib/timestamp.js +97 -0
- package/dist-lib/lib/toast.js +78 -0
- package/dist-lib/lib/ui-actions.js +81 -0
- package/dist-lib/{utils-D_QDpB8_.js → lib/utils.js} +1 -1
- package/dist-lib/lib/variants.js +63 -0
- package/dist-lib/lib/versionTracker.js +102 -0
- package/dist-lib/lib/viewport-category.js +12 -0
- package/dist-lib/{window-election-CHIvIZwx.js → lib/window-election.js} +1 -1
- package/dist-lib/stores/auth.js +84 -0
- package/dist-lib/stores/icon-registry.js +24 -0
- package/dist-lib/stores/list-layout.js +178 -0
- package/dist-lib/{page-state-eA6J_KIR.js → stores/page-state.js} +1 -1
- package/dist-lib/stores/preferences.js +126 -0
- package/dist-lib/stores/realtime.js +115 -0
- package/dist-lib/stores/screen-registry.js +10 -0
- package/dist-lib/stores/tabs.js +220 -0
- package/dist-lib/test/seed-schema.js +8 -0
- package/dist-lib/testing.d.ts +1 -1
- package/dist-lib/testing.js +80 -76
- package/dist-lib/types/api.js +48 -0
- package/dist-lib/types/fieldType.js +4 -0
- package/dist-lib/types/ordmap.js +50 -0
- package/dist-lib/types/schema.js +173 -0
- package/dist-lib/{useResponsiveMode-DIR1bZfo.d.ts → useResponsiveMode-DmrpMbZX.d.ts} +44 -16
- package/package.json +13 -12
- package/dist-lib/ActionRunner-DdBFhqGe.js +0 -1440
- package/dist-lib/AgentOpenFollower.impl-BAs_wGEZ.js +0 -81
- package/dist-lib/AssociatedBlock-BOoPLOjw.js +0 -1515
- package/dist-lib/AuthShell-C8aVwHS7.js +0 -361
- package/dist-lib/BlankScreen-DVc7fh8C.js +0 -61
- package/dist-lib/CopyButton-DRIT_f0k.js +0 -119
- package/dist-lib/DynamicIcon-DuBSz6TZ.js +0 -133
- package/dist-lib/FilterChips-Cv1tlXyo.js +0 -1031
- package/dist-lib/LayoutRenderer-d-tXYPze.js +0 -3239
- package/dist-lib/MenuItem-CfkVXPvC.js +0 -140
- package/dist-lib/MonacoJson-BG3S3GHX.js +0 -60
- package/dist-lib/Profile.impl-Cypk27ah.js +0 -527
- package/dist-lib/PropertyGridEditor-XrP6TZ5s.js +0 -4378
- package/dist-lib/RecordHeader-BfQ0_4wq.js +0 -217
- package/dist-lib/RefreshControl-CRdWPoF5.js +0 -195
- package/dist-lib/SSOCallbackPage.impl-Cfi2pQ59.js +0 -31
- package/dist-lib/SmartDetailPage.impl-BiIX0n7K.js +0 -1609
- package/dist-lib/SmartListPage.impl-Cu83Gv_G.js +0 -2818
- package/dist-lib/SmartRecordListPage.impl-DR6lq7HA.js +0 -795
- package/dist-lib/format-count-lyB4CPen.js +0 -943
- package/dist-lib/peekDraftStore-CaimrOhW.js +0 -200
- package/dist-lib/registry-CGe5kCXN.js +0 -119
- package/dist-lib/use-filter-value-labels-D3YDgUzg.js +0 -413
- package/dist-lib/useAgentConversation-rru-7hnF.js +0 -612
- package/dist-lib/useBranding-zcxEic2k.js +0 -41
- package/dist-lib/useBrandingChrome-bxaR3G1R.js +0 -170
- package/dist-lib/useCurrentScreen-BZOHBGQZ.js +0 -2522
- package/dist-lib/useImpersonation-DBIRRR70.js +0 -35
- package/dist-lib/useOwnRefresh-DJjaje52.js +0 -435
- package/dist-lib/useParams-BFLJi4n3.js +0 -133
- package/dist-lib/useProperties-B7opZ-iy.js +0 -81
- package/dist-lib/useScreenBack-DENlz844.js +0 -71
- package/dist-lib/useTabNavigate-CUqOmcMj.js +0 -78
- package/dist-lib/value-BuQVYx52.js +0 -194
- package/dist-lib/variants-vUtfBbE6.js +0 -1961
- /package/dist-lib/{JsonEditor-Dz1PQHC8.js → components/fields/JsonEditor.js} +0 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { pluralText as e } from "../../lib/language.js";
|
|
2
|
+
import { Icon as t } from "../primitives/Icons.js";
|
|
3
|
+
import { Dropdown as n } from "../primitives/Dropdown.js";
|
|
4
|
+
import { useText as r } from "../../hooks/useText.js";
|
|
5
|
+
import { MenuItem as i } from "../primitives/MenuItem.js";
|
|
6
|
+
import { DynamicIcon as a } from "../shared/DynamicIcon.js";
|
|
7
|
+
import { usePreferencesStore as o } from "../../stores/preferences.js";
|
|
8
|
+
import { tabIdsForCloseScope as s, useTabStore as c } from "../../stores/tabs.js";
|
|
9
|
+
import { pageInsetX as l } from "../../lib/page-inset.js";
|
|
10
|
+
import { useTabTitle as u } from "../../hooks/useTabTitle.js";
|
|
11
|
+
import { useCallback as d, useEffect as f, useRef as p, useState as m } from "react";
|
|
12
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
|
+
import { useNavigate as _ } from "react-router";
|
|
14
|
+
//#region src/components/layout/TabStrip.tsx
|
|
15
|
+
function v({ onNew: n, onCloseRequest: i } = {}) {
|
|
16
|
+
let v = r(), b = u(), x = _(), S = p(null), C = p(null), w = p(null), T = p(!1), [E, D] = m(!1), O = c((e) => e.tabs), k = c((e) => e.activeTabId), A = o((e) => e.tabsMaxOpen), j = c((e) => e.switchTab), M = c((e) => e.closeTab), N = O.findIndex((e) => e.id === k);
|
|
17
|
+
f(() => {
|
|
18
|
+
let e = N === O.length - 1 ? w.current : C.current;
|
|
19
|
+
e && (e.scrollIntoView({
|
|
20
|
+
block: "nearest",
|
|
21
|
+
inline: "nearest",
|
|
22
|
+
behavior: T.current ? "smooth" : "auto"
|
|
23
|
+
}), T.current = !0);
|
|
24
|
+
}, [
|
|
25
|
+
k,
|
|
26
|
+
N,
|
|
27
|
+
O.length
|
|
28
|
+
]);
|
|
29
|
+
let P = d((e, t) => {
|
|
30
|
+
let n = O[e];
|
|
31
|
+
n && (j(n.id), x({
|
|
32
|
+
pathname: n.pathname,
|
|
33
|
+
search: n.search || void 0
|
|
34
|
+
}));
|
|
35
|
+
}, [
|
|
36
|
+
O,
|
|
37
|
+
j,
|
|
38
|
+
x
|
|
39
|
+
]), F = d((e) => {
|
|
40
|
+
let t = O[e];
|
|
41
|
+
if (!t) return;
|
|
42
|
+
if (i) {
|
|
43
|
+
i("current", t.id);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
let n = t.id === k;
|
|
47
|
+
if (M(t.id), n) {
|
|
48
|
+
let n = O.filter((e) => e.id !== t.id);
|
|
49
|
+
if (n.length > 0) {
|
|
50
|
+
let t = n[e < n.length ? e : n.length - 1];
|
|
51
|
+
x({
|
|
52
|
+
pathname: t.pathname,
|
|
53
|
+
search: t.search || void 0
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, [
|
|
58
|
+
O,
|
|
59
|
+
k,
|
|
60
|
+
M,
|
|
61
|
+
x,
|
|
62
|
+
i
|
|
63
|
+
]), I = d((e) => {
|
|
64
|
+
D(!1), i ? i(e) : e === "current" && N >= 0 && F(N);
|
|
65
|
+
}, [
|
|
66
|
+
N,
|
|
67
|
+
F,
|
|
68
|
+
i
|
|
69
|
+
]), L = d(() => {
|
|
70
|
+
n ? n() : x("/");
|
|
71
|
+
}, [n, x]);
|
|
72
|
+
if (O.length === 0) return null;
|
|
73
|
+
let R = N >= 0 && O.length > 1 && O[N]?.closable !== !1, z = s(O, k, "others").length > 0, B = s(O, k, "right").length > 0, V = O.length >= A ? "danger" : O.length >= Math.ceil(A * .8) ? "warning" : "normal", H = V === "danger" ? "var(--danger)" : V === "warning" ? "var(--warn)" : "var(--text-3)";
|
|
74
|
+
return /* @__PURE__ */ g("div", {
|
|
75
|
+
style: {
|
|
76
|
+
display: "flex",
|
|
77
|
+
alignItems: "stretch",
|
|
78
|
+
height: 34,
|
|
79
|
+
background: "var(--surface-2)",
|
|
80
|
+
borderBottom: "1px solid var(--border)",
|
|
81
|
+
overflow: "hidden",
|
|
82
|
+
flexShrink: 0
|
|
83
|
+
},
|
|
84
|
+
children: [/* @__PURE__ */ g("div", {
|
|
85
|
+
className: "scrollbar-none",
|
|
86
|
+
style: {
|
|
87
|
+
display: "flex",
|
|
88
|
+
alignItems: "stretch",
|
|
89
|
+
overflowX: "auto",
|
|
90
|
+
flex: 1,
|
|
91
|
+
gap: 0
|
|
92
|
+
},
|
|
93
|
+
children: [O.map((e, n) => {
|
|
94
|
+
let r = n === N, i = O.length > 1 && e.closable !== !1;
|
|
95
|
+
return /* @__PURE__ */ g("div", {
|
|
96
|
+
"data-testid": "tabstrip-tab",
|
|
97
|
+
ref: r ? C : void 0,
|
|
98
|
+
onClick: (e) => P(n, { newTab: e.metaKey || e.ctrlKey }),
|
|
99
|
+
onAuxClick: (e) => {
|
|
100
|
+
e.button === 1 && (e.preventDefault(), F(n));
|
|
101
|
+
},
|
|
102
|
+
title: b(e),
|
|
103
|
+
style: {
|
|
104
|
+
display: "flex",
|
|
105
|
+
alignItems: "center",
|
|
106
|
+
gap: 6,
|
|
107
|
+
height: "100%",
|
|
108
|
+
...l(11),
|
|
109
|
+
background: r ? "var(--surface)" : "transparent",
|
|
110
|
+
borderRight: "1px solid var(--border)",
|
|
111
|
+
borderTop: r ? "2px solid var(--accent)" : "2px solid transparent",
|
|
112
|
+
borderBottom: r ? "1px solid var(--surface)" : "1px solid transparent",
|
|
113
|
+
marginBottom: r ? -1 : 0,
|
|
114
|
+
cursor: "pointer",
|
|
115
|
+
position: "relative",
|
|
116
|
+
maxWidth: 220,
|
|
117
|
+
minWidth: 120,
|
|
118
|
+
color: r ? "var(--text)" : "var(--text-3)",
|
|
119
|
+
fontSize: 12,
|
|
120
|
+
fontWeight: r ? 500 : 400
|
|
121
|
+
},
|
|
122
|
+
children: [
|
|
123
|
+
e.icon && /* @__PURE__ */ h("span", {
|
|
124
|
+
style: {
|
|
125
|
+
color: r ? "var(--accent)" : "var(--text-4)",
|
|
126
|
+
display: "flex"
|
|
127
|
+
},
|
|
128
|
+
children: /* @__PURE__ */ h(a, {
|
|
129
|
+
name: e.icon,
|
|
130
|
+
size: 12
|
|
131
|
+
})
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ h("span", {
|
|
134
|
+
style: {
|
|
135
|
+
flex: 1,
|
|
136
|
+
whiteSpace: "nowrap",
|
|
137
|
+
overflow: "hidden",
|
|
138
|
+
textOverflow: "ellipsis"
|
|
139
|
+
},
|
|
140
|
+
children: b(e)
|
|
141
|
+
}),
|
|
142
|
+
e.dirty && /* @__PURE__ */ h("span", {
|
|
143
|
+
style: {
|
|
144
|
+
width: 6,
|
|
145
|
+
height: 6,
|
|
146
|
+
borderRadius: 999,
|
|
147
|
+
background: "var(--warn)",
|
|
148
|
+
flexShrink: 0
|
|
149
|
+
},
|
|
150
|
+
title: v("shell.tabs.unsaved", "Unsaved changes")
|
|
151
|
+
}),
|
|
152
|
+
i && /* @__PURE__ */ h("button", {
|
|
153
|
+
onClick: (e) => {
|
|
154
|
+
e.stopPropagation(), F(n);
|
|
155
|
+
},
|
|
156
|
+
"aria-label": v("shell.tabs.close_named", "Close {title}", { title: b(e) }),
|
|
157
|
+
title: v("shell.tabs.close_tab", "Close tab"),
|
|
158
|
+
style: {
|
|
159
|
+
display: "flex",
|
|
160
|
+
background: "transparent",
|
|
161
|
+
border: 0,
|
|
162
|
+
padding: 2,
|
|
163
|
+
borderRadius: "var(--radius-xs)",
|
|
164
|
+
cursor: "pointer",
|
|
165
|
+
color: "var(--text-4)",
|
|
166
|
+
opacity: r ? 1 : .5
|
|
167
|
+
},
|
|
168
|
+
onMouseEnter: (e) => {
|
|
169
|
+
e.currentTarget.style.background = "var(--surface-3)", e.currentTarget.style.color = "var(--text)";
|
|
170
|
+
},
|
|
171
|
+
onMouseLeave: (e) => {
|
|
172
|
+
e.currentTarget.style.background = "transparent", e.currentTarget.style.color = "var(--text-4)";
|
|
173
|
+
},
|
|
174
|
+
children: /* @__PURE__ */ h(t.x, { size: 11 })
|
|
175
|
+
})
|
|
176
|
+
]
|
|
177
|
+
}, e.id);
|
|
178
|
+
}), /* @__PURE__ */ h("button", {
|
|
179
|
+
ref: w,
|
|
180
|
+
onClick: L,
|
|
181
|
+
title: v("shell.tabs.new", "New tab (⌘T)"),
|
|
182
|
+
style: {
|
|
183
|
+
width: 32,
|
|
184
|
+
background: "transparent",
|
|
185
|
+
border: 0,
|
|
186
|
+
borderRight: "1px solid var(--border)",
|
|
187
|
+
cursor: "pointer",
|
|
188
|
+
color: "var(--text-3)",
|
|
189
|
+
display: "flex",
|
|
190
|
+
alignItems: "center",
|
|
191
|
+
justifyContent: "center"
|
|
192
|
+
},
|
|
193
|
+
children: /* @__PURE__ */ h(t.plus, { size: 13 })
|
|
194
|
+
})]
|
|
195
|
+
}), /* @__PURE__ */ g("div", {
|
|
196
|
+
className: "tabstrip-utility",
|
|
197
|
+
style: {
|
|
198
|
+
...l(10),
|
|
199
|
+
fontSize: 11,
|
|
200
|
+
color: "var(--text-4)",
|
|
201
|
+
display: "flex",
|
|
202
|
+
alignItems: "center",
|
|
203
|
+
gap: 8,
|
|
204
|
+
borderLeft: "1px solid var(--border)",
|
|
205
|
+
flexShrink: 0
|
|
206
|
+
},
|
|
207
|
+
children: [
|
|
208
|
+
/* @__PURE__ */ g("span", {
|
|
209
|
+
"data-testid": "tabstrip-tab-count",
|
|
210
|
+
style: {
|
|
211
|
+
display: "flex",
|
|
212
|
+
alignItems: "center",
|
|
213
|
+
gap: 3,
|
|
214
|
+
color: H,
|
|
215
|
+
fontWeight: V === "normal" ? 400 : 600
|
|
216
|
+
},
|
|
217
|
+
children: [/* @__PURE__ */ g("span", {
|
|
218
|
+
className: "mono num",
|
|
219
|
+
children: [
|
|
220
|
+
O.length,
|
|
221
|
+
"/",
|
|
222
|
+
A
|
|
223
|
+
]
|
|
224
|
+
}), /* @__PURE__ */ h("span", {
|
|
225
|
+
className: "tabstrip-tabs-label",
|
|
226
|
+
style: { color: "var(--text-3)" },
|
|
227
|
+
children: e(v, "shell.tabs.count_label", A, {
|
|
228
|
+
one: "tab",
|
|
229
|
+
other: "tabs"
|
|
230
|
+
})
|
|
231
|
+
})]
|
|
232
|
+
}),
|
|
233
|
+
/* @__PURE__ */ h("span", {
|
|
234
|
+
className: "tabstrip-utility-divider",
|
|
235
|
+
style: {
|
|
236
|
+
width: 1,
|
|
237
|
+
height: 14,
|
|
238
|
+
background: "var(--border)"
|
|
239
|
+
}
|
|
240
|
+
}),
|
|
241
|
+
/* @__PURE__ */ h("button", {
|
|
242
|
+
ref: S,
|
|
243
|
+
onClick: () => D(!0),
|
|
244
|
+
title: v("shell.tabs.actions", "Tab actions"),
|
|
245
|
+
"aria-label": v("shell.tabs.actions", "Tab actions"),
|
|
246
|
+
"data-testid": "tabstrip-actions-button",
|
|
247
|
+
style: {
|
|
248
|
+
width: 24,
|
|
249
|
+
height: 24,
|
|
250
|
+
border: 0,
|
|
251
|
+
background: "transparent",
|
|
252
|
+
borderRadius: "var(--radius-sm)",
|
|
253
|
+
cursor: "pointer",
|
|
254
|
+
color: "var(--text-3)",
|
|
255
|
+
display: "flex",
|
|
256
|
+
alignItems: "center",
|
|
257
|
+
justifyContent: "center"
|
|
258
|
+
},
|
|
259
|
+
onMouseEnter: (e) => {
|
|
260
|
+
e.currentTarget.style.background = "var(--surface-3)";
|
|
261
|
+
},
|
|
262
|
+
onMouseLeave: (e) => {
|
|
263
|
+
e.currentTarget.style.background = "transparent";
|
|
264
|
+
},
|
|
265
|
+
children: /* @__PURE__ */ h(t.more, { size: 13 })
|
|
266
|
+
}),
|
|
267
|
+
/* @__PURE__ */ h(y, {
|
|
268
|
+
open: E,
|
|
269
|
+
anchor: S.current,
|
|
270
|
+
onClose: () => D(!1),
|
|
271
|
+
canCloseCurrent: R,
|
|
272
|
+
canCloseOthers: z,
|
|
273
|
+
canCloseRight: B,
|
|
274
|
+
onAction: I
|
|
275
|
+
})
|
|
276
|
+
]
|
|
277
|
+
})]
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
function y({ open: e, anchor: a, onClose: o, canCloseCurrent: s, canCloseOthers: c, canCloseRight: l, onAction: u }) {
|
|
281
|
+
let d = r();
|
|
282
|
+
return /* @__PURE__ */ g(n, {
|
|
283
|
+
open: e,
|
|
284
|
+
onClose: o,
|
|
285
|
+
anchor: a,
|
|
286
|
+
align: "end",
|
|
287
|
+
width: 230,
|
|
288
|
+
children: [
|
|
289
|
+
/* @__PURE__ */ h(i, {
|
|
290
|
+
icon: /* @__PURE__ */ h(t.x, { size: 13 }),
|
|
291
|
+
disabled: !s,
|
|
292
|
+
title: s ? void 0 : d("shell.tabs.none_closable", "No current tab can be closed"),
|
|
293
|
+
onClick: () => u("current"),
|
|
294
|
+
children: d("shell.tabs.close_current", "Close current tab")
|
|
295
|
+
}),
|
|
296
|
+
/* @__PURE__ */ h(i, {
|
|
297
|
+
icon: /* @__PURE__ */ h(t.x, { size: 13 }),
|
|
298
|
+
disabled: !c,
|
|
299
|
+
title: c ? void 0 : d("shell.tabs.no_others", "No other tabs"),
|
|
300
|
+
onClick: () => u("others"),
|
|
301
|
+
children: d("shell.tabs.close_others", "Close others")
|
|
302
|
+
}),
|
|
303
|
+
/* @__PURE__ */ h(i, {
|
|
304
|
+
icon: /* @__PURE__ */ h(t.x, { size: 13 }),
|
|
305
|
+
disabled: !l,
|
|
306
|
+
title: l ? void 0 : d("shell.tabs.none_right", "No tabs to the right"),
|
|
307
|
+
onClick: () => u("right"),
|
|
308
|
+
children: d("shell.tabs.close_right", "Close tabs to the right")
|
|
309
|
+
}),
|
|
310
|
+
/* @__PURE__ */ h(i, { divider: !0 }),
|
|
311
|
+
/* @__PURE__ */ h(i, {
|
|
312
|
+
icon: /* @__PURE__ */ h(t.trash, { size: 13 }),
|
|
313
|
+
danger: !0,
|
|
314
|
+
onClick: () => u("all"),
|
|
315
|
+
children: d("shell.tabs.close_all", "Close all tabs")
|
|
316
|
+
})
|
|
317
|
+
]
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
//#endregion
|
|
321
|
+
export { v as TabStrip };
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { textWithNodes as e } from "../../lib/language.js";
|
|
2
|
+
import { Icon as t } from "../primitives/Icons.js";
|
|
3
|
+
import { Dropdown as n } from "../primitives/Dropdown.js";
|
|
4
|
+
import { useText as r } from "../../hooks/useText.js";
|
|
5
|
+
import { useMemo as i, useRef as a, useState as o } from "react";
|
|
6
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/layout/TenantChip.tsx
|
|
8
|
+
var u = 6;
|
|
9
|
+
function d(e) {
|
|
10
|
+
return e.startsWith("_");
|
|
11
|
+
}
|
|
12
|
+
var f = {
|
|
13
|
+
production: {
|
|
14
|
+
fg: "var(--danger)",
|
|
15
|
+
bg: "var(--danger-soft)",
|
|
16
|
+
border: "var(--danger-border)"
|
|
17
|
+
},
|
|
18
|
+
staging: {
|
|
19
|
+
fg: "var(--warn)",
|
|
20
|
+
bg: "var(--warn-soft)",
|
|
21
|
+
border: "var(--warn-border)"
|
|
22
|
+
},
|
|
23
|
+
dev: {
|
|
24
|
+
fg: "var(--info)",
|
|
25
|
+
bg: "var(--info-soft)",
|
|
26
|
+
border: "var(--info-border)"
|
|
27
|
+
}
|
|
28
|
+
}, p = {
|
|
29
|
+
fg: "var(--text-3)",
|
|
30
|
+
bg: "var(--surface-2)",
|
|
31
|
+
border: "var(--border)"
|
|
32
|
+
};
|
|
33
|
+
function m(e) {
|
|
34
|
+
return e ? f[e] ?? p : f.production;
|
|
35
|
+
}
|
|
36
|
+
function h({ tenant: s, tenants: d, onSwitch: f, busy: p, compact: h, locked: _, lockedReason: v }) {
|
|
37
|
+
let y = r(), [b, x] = o(!1), [S, C] = o(""), w = a(null), T = s?.env, E = m(T), D = s?.name || "—", O = s?.role || "—", k = i(() => d.filter((e) => e.is_member !== !1), [d]), A = i(() => d.filter((e) => e.is_member === !1), [d]), j = d.length >= u, M = (e) => {
|
|
38
|
+
if (!S) return !0;
|
|
39
|
+
let t = S.toLowerCase();
|
|
40
|
+
return e.name.toLowerCase().includes(t) || e.code.toLowerCase().includes(t);
|
|
41
|
+
}, N = k.filter(M), P = A.filter(M), F = S !== "" && N.length === 0 && P.length === 0;
|
|
42
|
+
return /* @__PURE__ */ l("div", {
|
|
43
|
+
style: { position: "relative" },
|
|
44
|
+
children: [/* @__PURE__ */ l("button", {
|
|
45
|
+
ref: w,
|
|
46
|
+
onClick: () => !_ && x((e) => !e),
|
|
47
|
+
"data-testid": "tenant-chip",
|
|
48
|
+
"data-locked": _ ? "true" : void 0,
|
|
49
|
+
style: {
|
|
50
|
+
display: "flex",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
gap: 8,
|
|
53
|
+
height: 28,
|
|
54
|
+
padding: "0 8px 0 8px",
|
|
55
|
+
maxWidth: h ? "100%" : void 0,
|
|
56
|
+
minWidth: 0,
|
|
57
|
+
background: "var(--surface-2)",
|
|
58
|
+
border: "1px solid var(--border)",
|
|
59
|
+
borderRadius: "var(--radius-md)",
|
|
60
|
+
cursor: _ ? "not-allowed" : "pointer",
|
|
61
|
+
color: "var(--text)",
|
|
62
|
+
fontSize: 12.5,
|
|
63
|
+
fontWeight: 500,
|
|
64
|
+
opacity: _ ? .6 : 1
|
|
65
|
+
},
|
|
66
|
+
title: _ ? v || y("shell.tenant.switch_disabled", "Tenant switching is disabled") : y("shell.tenant.current", "Current tenant / environment"),
|
|
67
|
+
disabled: p || _,
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ c(t.tenant, {
|
|
70
|
+
size: 13,
|
|
71
|
+
style: {
|
|
72
|
+
color: "var(--text-3)",
|
|
73
|
+
flex: "none"
|
|
74
|
+
}
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ c("span", {
|
|
77
|
+
style: {
|
|
78
|
+
fontWeight: 600,
|
|
79
|
+
minWidth: 0,
|
|
80
|
+
overflow: h ? "hidden" : void 0,
|
|
81
|
+
textOverflow: h ? "ellipsis" : void 0,
|
|
82
|
+
whiteSpace: h ? "nowrap" : void 0
|
|
83
|
+
},
|
|
84
|
+
children: D
|
|
85
|
+
}),
|
|
86
|
+
T && /* @__PURE__ */ c("span", {
|
|
87
|
+
className: "mono",
|
|
88
|
+
style: {
|
|
89
|
+
padding: "2px 6px",
|
|
90
|
+
borderRadius: "var(--radius-xs)",
|
|
91
|
+
fontSize: 10,
|
|
92
|
+
fontWeight: 700,
|
|
93
|
+
letterSpacing: "0.06em",
|
|
94
|
+
textTransform: "uppercase",
|
|
95
|
+
background: E.bg,
|
|
96
|
+
color: E.fg,
|
|
97
|
+
border: `1px solid ${E.border}`,
|
|
98
|
+
flex: "none"
|
|
99
|
+
},
|
|
100
|
+
children: T
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ c(t.down, {
|
|
103
|
+
size: 11,
|
|
104
|
+
style: {
|
|
105
|
+
color: "var(--text-3)",
|
|
106
|
+
flex: "none"
|
|
107
|
+
}
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
}), /* @__PURE__ */ l(n, {
|
|
111
|
+
open: b,
|
|
112
|
+
anchor: w.current,
|
|
113
|
+
onClose: () => x(!1),
|
|
114
|
+
width: 300,
|
|
115
|
+
align: "start",
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ l("div", {
|
|
118
|
+
style: {
|
|
119
|
+
padding: "10px 10px 6px",
|
|
120
|
+
borderBottom: "1px solid var(--divider)"
|
|
121
|
+
},
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ c("div", {
|
|
124
|
+
style: {
|
|
125
|
+
fontSize: 10.5,
|
|
126
|
+
color: "var(--text-3)",
|
|
127
|
+
letterSpacing: "0.08em",
|
|
128
|
+
fontWeight: 700,
|
|
129
|
+
textTransform: "uppercase"
|
|
130
|
+
},
|
|
131
|
+
children: y("shell.tenant.active_scope", "Active scope")
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ l("div", {
|
|
134
|
+
style: {
|
|
135
|
+
display: "flex",
|
|
136
|
+
alignItems: "center",
|
|
137
|
+
gap: 6,
|
|
138
|
+
marginTop: 4
|
|
139
|
+
},
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ c(t.tenant, {
|
|
142
|
+
size: 13,
|
|
143
|
+
style: { color: "var(--accent)" }
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ c("span", {
|
|
146
|
+
style: {
|
|
147
|
+
fontSize: 13,
|
|
148
|
+
fontWeight: 600
|
|
149
|
+
},
|
|
150
|
+
children: D
|
|
151
|
+
}),
|
|
152
|
+
T && /* @__PURE__ */ c("span", {
|
|
153
|
+
className: "mono",
|
|
154
|
+
style: {
|
|
155
|
+
marginLeft: "auto",
|
|
156
|
+
padding: "2px 6px",
|
|
157
|
+
borderRadius: "var(--radius-xs)",
|
|
158
|
+
fontSize: 10,
|
|
159
|
+
fontWeight: 700,
|
|
160
|
+
background: E.bg,
|
|
161
|
+
color: E.fg
|
|
162
|
+
},
|
|
163
|
+
children: T
|
|
164
|
+
})
|
|
165
|
+
]
|
|
166
|
+
}),
|
|
167
|
+
/* @__PURE__ */ c("div", {
|
|
168
|
+
style: {
|
|
169
|
+
marginTop: 4,
|
|
170
|
+
fontSize: 11,
|
|
171
|
+
color: "var(--text-3)"
|
|
172
|
+
},
|
|
173
|
+
children: e(y("shell.tenant.role", "Role: {role}"), { role: /* @__PURE__ */ c("span", {
|
|
174
|
+
style: {
|
|
175
|
+
color: "var(--text-2)",
|
|
176
|
+
fontWeight: 500
|
|
177
|
+
},
|
|
178
|
+
children: O
|
|
179
|
+
}) })
|
|
180
|
+
})
|
|
181
|
+
]
|
|
182
|
+
}),
|
|
183
|
+
j && /* @__PURE__ */ c("div", {
|
|
184
|
+
style: {
|
|
185
|
+
padding: "8px 10px 4px",
|
|
186
|
+
borderBottom: "1px solid var(--divider)"
|
|
187
|
+
},
|
|
188
|
+
children: /* @__PURE__ */ c("input", {
|
|
189
|
+
type: "text",
|
|
190
|
+
value: S,
|
|
191
|
+
onChange: (e) => C(e.target.value),
|
|
192
|
+
placeholder: y("shell.tenant.search", "Search tenants…"),
|
|
193
|
+
autoFocus: !0,
|
|
194
|
+
"data-testid": "tenant-switch-search",
|
|
195
|
+
style: {
|
|
196
|
+
width: "100%",
|
|
197
|
+
height: 28,
|
|
198
|
+
padding: "0 8px",
|
|
199
|
+
fontSize: 12.5,
|
|
200
|
+
background: "var(--surface-1)",
|
|
201
|
+
color: "var(--text)",
|
|
202
|
+
border: "1px solid var(--border)",
|
|
203
|
+
borderRadius: "var(--radius-sm)",
|
|
204
|
+
outline: "none"
|
|
205
|
+
}
|
|
206
|
+
})
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ l("div", {
|
|
209
|
+
style: {
|
|
210
|
+
maxHeight: 320,
|
|
211
|
+
overflowY: "auto"
|
|
212
|
+
},
|
|
213
|
+
children: [
|
|
214
|
+
/* @__PURE__ */ c(g, {
|
|
215
|
+
label: A.length > 0 ? y("shell.tenant.yours", "Your tenants") : y("shell.tenant.switch", "Switch tenant"),
|
|
216
|
+
tenants: N,
|
|
217
|
+
activeID: s?.id,
|
|
218
|
+
onPick: (e) => {
|
|
219
|
+
x(!1), f(e);
|
|
220
|
+
}
|
|
221
|
+
}),
|
|
222
|
+
P.length > 0 && /* @__PURE__ */ c(g, {
|
|
223
|
+
label: y("shell.tenant.all_admin", "All tenants (admin)"),
|
|
224
|
+
tenants: P,
|
|
225
|
+
activeID: s?.id,
|
|
226
|
+
onPick: (e) => {
|
|
227
|
+
x(!1), f(e);
|
|
228
|
+
}
|
|
229
|
+
}),
|
|
230
|
+
F && /* @__PURE__ */ c("div", {
|
|
231
|
+
style: {
|
|
232
|
+
padding: "12px 12px",
|
|
233
|
+
fontSize: 12,
|
|
234
|
+
color: "var(--text-3)",
|
|
235
|
+
textAlign: "center"
|
|
236
|
+
},
|
|
237
|
+
children: y("shell.tenant.no_matches", "No tenants match “{query}”.", { query: S })
|
|
238
|
+
})
|
|
239
|
+
]
|
|
240
|
+
}),
|
|
241
|
+
/* @__PURE__ */ l("div", {
|
|
242
|
+
style: {
|
|
243
|
+
padding: "8px 10px",
|
|
244
|
+
borderTop: "1px solid var(--divider)",
|
|
245
|
+
fontSize: 10.5,
|
|
246
|
+
color: "var(--text-4)",
|
|
247
|
+
display: "flex",
|
|
248
|
+
alignItems: "flex-start",
|
|
249
|
+
gap: 6
|
|
250
|
+
},
|
|
251
|
+
children: [/* @__PURE__ */ c(t.info, {
|
|
252
|
+
size: 11,
|
|
253
|
+
style: {
|
|
254
|
+
marginTop: 2,
|
|
255
|
+
flexShrink: 0
|
|
256
|
+
}
|
|
257
|
+
}), /* @__PURE__ */ c("span", { children: y("shell.tenant.switch_hint", "Switching tenant reloads all data. Unsaved changes in open tabs will prompt.") })]
|
|
258
|
+
})
|
|
259
|
+
]
|
|
260
|
+
})]
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
function g({ label: e, tenants: t, activeID: n, onPick: r }) {
|
|
264
|
+
return t.length === 0 ? null : /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("div", {
|
|
265
|
+
style: {
|
|
266
|
+
padding: "6px 10px 4px",
|
|
267
|
+
fontSize: 10,
|
|
268
|
+
color: "var(--text-4)",
|
|
269
|
+
letterSpacing: "0.08em",
|
|
270
|
+
fontWeight: 700,
|
|
271
|
+
textTransform: "uppercase"
|
|
272
|
+
},
|
|
273
|
+
children: e
|
|
274
|
+
}), t.map((e) => /* @__PURE__ */ c(_, {
|
|
275
|
+
tenant: e,
|
|
276
|
+
tone: m(e.env),
|
|
277
|
+
active: e.id === n,
|
|
278
|
+
onPick: () => r(e)
|
|
279
|
+
}, e.id))] });
|
|
280
|
+
}
|
|
281
|
+
function _({ tenant: e, tone: n, active: i, onPick: a }) {
|
|
282
|
+
let s = r(), [u, f] = o(!1), p = i || u ? "var(--surface-3)" : "transparent", m = d(e.code);
|
|
283
|
+
return /* @__PURE__ */ l("button", {
|
|
284
|
+
onClick: a,
|
|
285
|
+
onMouseEnter: () => f(!0),
|
|
286
|
+
onMouseLeave: () => f(!1),
|
|
287
|
+
style: {
|
|
288
|
+
display: "flex",
|
|
289
|
+
alignItems: "center",
|
|
290
|
+
gap: 8,
|
|
291
|
+
width: "100%",
|
|
292
|
+
padding: "7px 10px",
|
|
293
|
+
background: p,
|
|
294
|
+
border: 0,
|
|
295
|
+
cursor: "pointer",
|
|
296
|
+
textAlign: "left"
|
|
297
|
+
},
|
|
298
|
+
children: [
|
|
299
|
+
/* @__PURE__ */ c(t.tenant, {
|
|
300
|
+
size: 12,
|
|
301
|
+
style: { color: "var(--text-3)" }
|
|
302
|
+
}),
|
|
303
|
+
/* @__PURE__ */ c("span", {
|
|
304
|
+
style: {
|
|
305
|
+
fontSize: 12.5,
|
|
306
|
+
color: "var(--text)",
|
|
307
|
+
fontWeight: 500
|
|
308
|
+
},
|
|
309
|
+
children: e.name
|
|
310
|
+
}),
|
|
311
|
+
m ? /* @__PURE__ */ c("span", {
|
|
312
|
+
className: "mono",
|
|
313
|
+
title: s("shell.tenant.system_hint", "Platform-internal workspace"),
|
|
314
|
+
style: {
|
|
315
|
+
padding: "1px 5px",
|
|
316
|
+
borderRadius: "var(--radius-xs)",
|
|
317
|
+
fontSize: 9.5,
|
|
318
|
+
fontWeight: 700,
|
|
319
|
+
background: "var(--surface-3)",
|
|
320
|
+
color: "var(--text-2)",
|
|
321
|
+
border: "1px solid var(--border)"
|
|
322
|
+
},
|
|
323
|
+
children: s("shell.tenant.system", "system")
|
|
324
|
+
}) : e.env ? /* @__PURE__ */ c("span", {
|
|
325
|
+
className: "mono",
|
|
326
|
+
style: {
|
|
327
|
+
padding: "1px 5px",
|
|
328
|
+
borderRadius: "var(--radius-xs)",
|
|
329
|
+
fontSize: 9.5,
|
|
330
|
+
fontWeight: 700,
|
|
331
|
+
background: n.bg,
|
|
332
|
+
color: n.fg
|
|
333
|
+
},
|
|
334
|
+
children: e.env
|
|
335
|
+
}) : null,
|
|
336
|
+
/* @__PURE__ */ c("span", { style: { flex: 1 } }),
|
|
337
|
+
e.role && /* @__PURE__ */ c("span", {
|
|
338
|
+
style: {
|
|
339
|
+
fontSize: 10.5,
|
|
340
|
+
color: "var(--text-3)"
|
|
341
|
+
},
|
|
342
|
+
children: e.role
|
|
343
|
+
}),
|
|
344
|
+
i && /* @__PURE__ */ c(t.check, {
|
|
345
|
+
size: 12,
|
|
346
|
+
style: {
|
|
347
|
+
color: "var(--accent)",
|
|
348
|
+
marginLeft: 4
|
|
349
|
+
}
|
|
350
|
+
})
|
|
351
|
+
]
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
//#endregion
|
|
355
|
+
export { h as TenantChip, m as envTone };
|