@declarion/react 0.65.1 → 0.66.1
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
package/dist-lib/index.js
CHANGED
|
@@ -1,3926 +1,131 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
let s = F(), c = wi(s, a), l = o?.app_name ?? "", u = sn(o?.app_logo) ? o?.app_logo : void 0;
|
|
133
|
-
return /* @__PURE__ */ X("div", {
|
|
134
|
-
style: {
|
|
135
|
-
gridArea: "rail",
|
|
136
|
-
background: "var(--rail)",
|
|
137
|
-
color: "var(--rail-fg)",
|
|
138
|
-
display: "flex",
|
|
139
|
-
flexDirection: "column",
|
|
140
|
-
alignItems: "center",
|
|
141
|
-
padding: "8px 0",
|
|
142
|
-
gap: 2
|
|
143
|
-
},
|
|
144
|
-
children: [
|
|
145
|
-
/* @__PURE__ */ Y("div", {
|
|
146
|
-
style: {
|
|
147
|
-
width: Ci,
|
|
148
|
-
height: Ci,
|
|
149
|
-
borderRadius: 8,
|
|
150
|
-
background: u ? "transparent" : "linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%)",
|
|
151
|
-
display: "flex",
|
|
152
|
-
alignItems: "center",
|
|
153
|
-
justifyContent: "center",
|
|
154
|
-
marginBottom: 8,
|
|
155
|
-
boxShadow: u ? "none" : "0 2px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.14)",
|
|
156
|
-
overflow: "hidden"
|
|
157
|
-
},
|
|
158
|
-
title: l ? s("shell.rail.home_named", "{brand} — home", { brand: l }) : s("shell.rail.home", "home"),
|
|
159
|
-
children: u ? /* @__PURE__ */ Y("img", {
|
|
160
|
-
src: u,
|
|
161
|
-
alt: l,
|
|
162
|
-
width: Ci,
|
|
163
|
-
height: Ci,
|
|
164
|
-
style: {
|
|
165
|
-
display: "block",
|
|
166
|
-
objectFit: "contain"
|
|
167
|
-
}
|
|
168
|
-
}) : l ? /* @__PURE__ */ Y("span", {
|
|
169
|
-
style: {
|
|
170
|
-
fontSize: 11,
|
|
171
|
-
fontWeight: 700,
|
|
172
|
-
letterSpacing: "0.04em"
|
|
173
|
-
},
|
|
174
|
-
children: l.charAt(0).toUpperCase()
|
|
175
|
-
}) : null
|
|
176
|
-
}),
|
|
177
|
-
c.map((n) => /* @__PURE__ */ Y(Ei, {
|
|
178
|
-
item: n,
|
|
179
|
-
active: e === n.id,
|
|
180
|
-
onPick: t
|
|
181
|
-
}, n.id)),
|
|
182
|
-
/* @__PURE__ */ Y("div", { style: { flex: 1 } }),
|
|
183
|
-
/* @__PURE__ */ Y("button", {
|
|
184
|
-
onClick: i,
|
|
185
|
-
title: s("shell.palette.open", "Command Palette (⌘K)"),
|
|
186
|
-
style: Di(!1),
|
|
187
|
-
children: I.command && /* @__PURE__ */ Y(I.command, { size: 16 })
|
|
188
|
-
}),
|
|
189
|
-
/* @__PURE__ */ Y("button", {
|
|
190
|
-
onClick: n,
|
|
191
|
-
title: s("shell.ai_assistant", "AI Assistant"),
|
|
192
|
-
style: {
|
|
193
|
-
...Di(!1),
|
|
194
|
-
background: r ? "var(--accent)" : "transparent",
|
|
195
|
-
color: r ? "var(--rail-fg)" : "var(--rail-muted)"
|
|
196
|
-
},
|
|
197
|
-
children: I.sparkle && /* @__PURE__ */ Y(I.sparkle, { size: 16 })
|
|
198
|
-
})
|
|
199
|
-
]
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
function Ei({ item: e, active: t, onPick: n }) {
|
|
203
|
-
let [r, i] = q(!1), a = K(null), o = qt(a, e.label), s = t ? "var(--rail-active)" : r ? "var(--rail-hover)" : "transparent", c = t || r ? "var(--rail-fg)" : "var(--rail-muted)";
|
|
204
|
-
return /* @__PURE__ */ X("button", {
|
|
205
|
-
ref: a,
|
|
206
|
-
onClick: () => n(e.id),
|
|
207
|
-
"aria-label": e.label,
|
|
208
|
-
"aria-describedby": o.describedBy,
|
|
209
|
-
onMouseEnter: () => {
|
|
210
|
-
i(!0), o.triggerHandlers.onMouseEnter();
|
|
211
|
-
},
|
|
212
|
-
onMouseLeave: () => {
|
|
213
|
-
i(!1), o.triggerHandlers.onMouseLeave();
|
|
214
|
-
},
|
|
215
|
-
onFocus: o.triggerHandlers.onFocus,
|
|
216
|
-
onBlur: o.triggerHandlers.onBlur,
|
|
217
|
-
style: {
|
|
218
|
-
width: 36,
|
|
219
|
-
height: 36,
|
|
220
|
-
borderRadius: 8,
|
|
221
|
-
display: "flex",
|
|
222
|
-
alignItems: "center",
|
|
223
|
-
justifyContent: "center",
|
|
224
|
-
background: s,
|
|
225
|
-
color: c,
|
|
226
|
-
border: "none",
|
|
227
|
-
cursor: "pointer",
|
|
228
|
-
position: "relative"
|
|
229
|
-
},
|
|
230
|
-
children: [
|
|
231
|
-
e.icon ? /* @__PURE__ */ Y(on, {
|
|
232
|
-
name: e.icon,
|
|
233
|
-
size: 16
|
|
234
|
-
}) : null,
|
|
235
|
-
t && /* @__PURE__ */ Y("span", { style: {
|
|
236
|
-
position: "absolute",
|
|
237
|
-
left: -1,
|
|
238
|
-
top: 8,
|
|
239
|
-
bottom: 8,
|
|
240
|
-
width: 2,
|
|
241
|
-
background: "var(--accent)",
|
|
242
|
-
borderRadius: 2
|
|
243
|
-
} }),
|
|
244
|
-
o.portal
|
|
245
|
-
]
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
function Di(e) {
|
|
249
|
-
return {
|
|
250
|
-
width: 36,
|
|
251
|
-
height: 36,
|
|
252
|
-
borderRadius: 8,
|
|
253
|
-
display: "flex",
|
|
254
|
-
alignItems: "center",
|
|
255
|
-
justifyContent: "center",
|
|
256
|
-
background: "transparent",
|
|
257
|
-
color: "var(--rail-muted)",
|
|
258
|
-
border: 0,
|
|
259
|
-
cursor: "pointer"
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
//#endregion
|
|
263
|
-
//#region src/embed/theme.ts
|
|
264
|
-
function Oi(e) {
|
|
265
|
-
let t = {
|
|
266
|
-
...B.getState(),
|
|
267
|
-
colorScheme: e
|
|
268
|
-
};
|
|
269
|
-
yt(t), B.setState({ colorScheme: e });
|
|
270
|
-
}
|
|
271
|
-
//#endregion
|
|
272
|
-
//#region src/embed/handshake.ts
|
|
273
|
-
function ki(e, t) {
|
|
274
|
-
if (e.origin !== t) return { kind: "rejected" };
|
|
275
|
-
let n = e.data;
|
|
276
|
-
if (typeof n != "object" || !n) return { kind: "rejected" };
|
|
277
|
-
let r = n;
|
|
278
|
-
return r.source !== "declarion-embed" || typeof r.protocol != "number" || typeof r.type != "string" ? { kind: "rejected" } : r.protocol === 1 ? {
|
|
279
|
-
kind: "valid",
|
|
280
|
-
message: r
|
|
281
|
-
} : {
|
|
282
|
-
kind: "protocol-mismatch",
|
|
283
|
-
received: r.protocol
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
function Ai(e, t) {
|
|
287
|
-
return (n) => {
|
|
288
|
-
let r = ki(n, e);
|
|
289
|
-
if (r.kind === "rejected") return;
|
|
290
|
-
if (r.kind === "protocol-mismatch") {
|
|
291
|
-
console.warn(`[declarion-embed] protocol version mismatch: this iframe speaks protocol 1, the host sent protocol ${String(r.received)}. Update the host @declarion/embed SDK and the Declarion deployment to matching versions.`);
|
|
292
|
-
return;
|
|
293
|
-
}
|
|
294
|
-
let { message: i } = r;
|
|
295
|
-
switch (i.type) {
|
|
296
|
-
case T.setToken:
|
|
297
|
-
t.onAuth(i.payload);
|
|
298
|
-
break;
|
|
299
|
-
case T.navigate:
|
|
300
|
-
t.onNavigate(i.payload);
|
|
301
|
-
break;
|
|
302
|
-
case T.setTheme: t.onTheme(i.payload);
|
|
303
|
-
}
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
//#endregion
|
|
307
|
-
//#region src/embed/EmbedAuthBootstrap.tsx
|
|
308
|
-
var ji = 2e4;
|
|
309
|
-
function Mi() {
|
|
310
|
-
let e = O(), t = mi(), n = Q(), r = p((e) => e.setUser), [i, a] = q("pending"), o = K(!1), s = K(n.pathname);
|
|
311
|
-
return s.current = n.pathname, W(() => {
|
|
312
|
-
if (!e.enabled) return;
|
|
313
|
-
Ue(e.parentOrigin), gn.getState().reset();
|
|
314
|
-
let n = _(() => {
|
|
315
|
-
se(e.parentOrigin, T.reloadRequired, { reason: "embed session terminated" });
|
|
316
|
-
}), i = async () => {
|
|
317
|
-
if (!o.current) {
|
|
318
|
-
o.current = !0;
|
|
319
|
-
try {
|
|
320
|
-
let e = await We();
|
|
321
|
-
r(e, e.tenant ?? void 0), a("authenticated");
|
|
322
|
-
} catch {
|
|
323
|
-
a("error");
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
}, c = e.parentOrigin ? Ai(e.parentOrigin, {
|
|
327
|
-
onAuth: (e) => {
|
|
328
|
-
ae(e), o.current || i();
|
|
329
|
-
},
|
|
330
|
-
onNavigate: (n) => {
|
|
331
|
-
let r = () => {
|
|
332
|
-
gn.getState().markRoot(), t(e.appendEmbedParams(n.route));
|
|
333
|
-
}, i = n.route.split(/[?#]/)[0];
|
|
334
|
-
D.getState().isDirty && i !== s.current ? k.getState().requestNavigation(r) : r();
|
|
335
|
-
},
|
|
336
|
-
onTheme: (e) => {
|
|
337
|
-
Oi(e.theme);
|
|
338
|
-
}
|
|
339
|
-
}) : null;
|
|
340
|
-
c && window.addEventListener("message", c), se(e.parentOrigin, T.ready, {});
|
|
341
|
-
let l = window.setTimeout(() => {
|
|
342
|
-
o.current || a("error");
|
|
343
|
-
}, ji);
|
|
344
|
-
return () => {
|
|
345
|
-
c && window.removeEventListener("message", c), window.clearTimeout(l), _(n);
|
|
346
|
-
};
|
|
347
|
-
}, [
|
|
348
|
-
e,
|
|
349
|
-
t,
|
|
350
|
-
r
|
|
351
|
-
]), !e.enabled || i !== "error" ? null : /* @__PURE__ */ Y(Ni, {});
|
|
352
|
-
}
|
|
353
|
-
function Ni() {
|
|
354
|
-
let e = F("errors");
|
|
355
|
-
return /* @__PURE__ */ Y("div", {
|
|
356
|
-
role: "alert",
|
|
357
|
-
className: "fixed inset-0 z-50 flex items-center justify-center bg-background p-6 text-center text-sm text-muted-foreground",
|
|
358
|
-
children: /* @__PURE__ */ Y("p", { children: e("embed.handshake_incomplete", "This embedded view could not authenticate. The host application did not provide a session.") })
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
//#endregion
|
|
362
|
-
//#region src/embed/EmbedResizeReporter.tsx
|
|
363
|
-
var Pi = "app-embed";
|
|
364
|
-
function Fi() {
|
|
365
|
-
let e = O(), t = e.enabled && e.parentOrigin !== null;
|
|
366
|
-
return W(() => {
|
|
367
|
-
if (!t || typeof window > "u" || typeof ResizeObserver > "u") return;
|
|
368
|
-
let n = document.getElementById(Pi);
|
|
369
|
-
if (!n) return;
|
|
370
|
-
let r = null, i = -1, a = () => {
|
|
371
|
-
r = null;
|
|
372
|
-
let t = n.scrollHeight;
|
|
373
|
-
t !== i && (i = t, se(e.parentOrigin, T.resized, { height: t }));
|
|
374
|
-
}, o = new ResizeObserver(() => {
|
|
375
|
-
r === null && (r = window.requestAnimationFrame(a));
|
|
376
|
-
});
|
|
377
|
-
return o.observe(n), () => {
|
|
378
|
-
o.disconnect(), r !== null && window.cancelAnimationFrame(r);
|
|
379
|
-
};
|
|
380
|
-
}, [t, e.parentOrigin]), null;
|
|
381
|
-
}
|
|
382
|
-
//#endregion
|
|
383
|
-
//#region src/embed/EmbedDirtyReporter.tsx
|
|
384
|
-
function Ii() {
|
|
385
|
-
let e = O(), t = D((e) => e.isDirty), n = e.enabled && e.parentOrigin !== null;
|
|
386
|
-
return W(() => {
|
|
387
|
-
n && se(e.parentOrigin, T.dirtyChanged, { dirty: t });
|
|
388
|
-
}, [
|
|
389
|
-
n,
|
|
390
|
-
t,
|
|
391
|
-
e.parentOrigin
|
|
392
|
-
]), null;
|
|
393
|
-
}
|
|
394
|
-
//#endregion
|
|
395
|
-
//#region src/embed/EmbedHistoryTracker.tsx
|
|
396
|
-
function Li() {
|
|
397
|
-
let e = O(), t = hi(), n = Q(), r = e.enabled && e.navigationMode === "self", i = K(null);
|
|
398
|
-
return W(() => {
|
|
399
|
-
r && i.current !== n.key && (i.current = n.key, gn.getState().applyNavigation(t));
|
|
400
|
-
}, [
|
|
401
|
-
r,
|
|
402
|
-
n.key,
|
|
403
|
-
t
|
|
404
|
-
]), null;
|
|
405
|
-
}
|
|
406
|
-
function Ri(e) {
|
|
407
|
-
return e instanceof HTMLAnchorElement || typeof SVGAElement < "u" && e instanceof SVGAElement;
|
|
408
|
-
}
|
|
409
|
-
function zi(e) {
|
|
410
|
-
for (let t of e.composedPath()) if (Ri(t)) return t;
|
|
411
|
-
return null;
|
|
412
|
-
}
|
|
413
|
-
function Bi(e) {
|
|
414
|
-
return e instanceof HTMLAnchorElement ? e.getAttribute("href") : e.href?.baseVal ?? e.getAttribute("href") ?? e.getAttribute("xlink:href");
|
|
415
|
-
}
|
|
416
|
-
function Vi(e, t = window.location) {
|
|
417
|
-
if (e.defaultPrevented || vn(e)) return null;
|
|
418
|
-
let n = zi(e);
|
|
419
|
-
if (!n || n.hasAttribute("data-declarion-native-link")) return null;
|
|
420
|
-
let r = Bi(n);
|
|
421
|
-
if (!r) return null;
|
|
422
|
-
let i = (n.getAttribute("target") ?? "").trim();
|
|
423
|
-
if (i && i !== "_self" || n.hasAttribute("download")) return null;
|
|
424
|
-
let a = n.getAttribute("rel") ?? "";
|
|
425
|
-
if (/(^|\s)external(\s|$)/.test(a)) return null;
|
|
426
|
-
let o;
|
|
427
|
-
try {
|
|
428
|
-
o = new URL(r, `${t.origin}${t.pathname}${t.search}`);
|
|
429
|
-
} catch {
|
|
430
|
-
return null;
|
|
431
|
-
}
|
|
432
|
-
return o.protocol !== "http:" && o.protocol !== "https:" || o.origin !== t.origin || o.pathname === t.pathname && o.search === t.search && o.hash !== "" ? null : o.pathname + o.search + o.hash;
|
|
433
|
-
}
|
|
434
|
-
function Hi(e, t = window.location) {
|
|
435
|
-
if (e.destination.sameDocument || !e.canIntercept || e.hashChange || e.downloadRequest != null || e.formData != null) return null;
|
|
436
|
-
let n;
|
|
437
|
-
try {
|
|
438
|
-
n = new URL(e.destination.url);
|
|
439
|
-
} catch {
|
|
440
|
-
return null;
|
|
441
|
-
}
|
|
442
|
-
return n.protocol !== "http:" && n.protocol !== "https:" || n.origin !== t.origin ? null : n.pathname + n.search + n.hash;
|
|
443
|
-
}
|
|
444
|
-
function Ui() {
|
|
445
|
-
let e = yn(), t = O().enabled, n = K(e);
|
|
446
|
-
n.current = e, W(() => {
|
|
447
|
-
let e = (e) => {
|
|
448
|
-
let t = Vi(e);
|
|
449
|
-
t != null && (e.preventDefault(), n.current(t));
|
|
450
|
-
};
|
|
451
|
-
document.addEventListener("click", e, { capture: !0 });
|
|
452
|
-
let r = window.navigation, i = (e) => {
|
|
453
|
-
let t = Hi(e);
|
|
454
|
-
t != null && e.cancelable && (e.preventDefault(), n.current(t));
|
|
455
|
-
};
|
|
456
|
-
return t && r?.addEventListener("navigate", i), () => {
|
|
457
|
-
document.removeEventListener("click", e, { capture: !0 }), t && r?.removeEventListener("navigate", i);
|
|
458
|
-
};
|
|
459
|
-
}, [t]);
|
|
460
|
-
}
|
|
461
|
-
//#endregion
|
|
462
|
-
//#region src/embed/EmbedLocationReporter.tsx
|
|
463
|
-
function Wi() {
|
|
464
|
-
let e = O(), t = Q(), { data: n } = l(), r = K(null), i = e.enabled && e.navigationMode === "self";
|
|
465
|
-
return W(() => {
|
|
466
|
-
if (!i) return;
|
|
467
|
-
let a = `${t.pathname}${t.search}`;
|
|
468
|
-
if (r.current === a) return;
|
|
469
|
-
r.current = a;
|
|
470
|
-
let o = m(t.pathname, n?.screens);
|
|
471
|
-
se(e.parentOrigin, T.navigated, o);
|
|
472
|
-
}, [
|
|
473
|
-
i,
|
|
474
|
-
t.pathname,
|
|
475
|
-
t.search,
|
|
476
|
-
e.parentOrigin,
|
|
477
|
-
n?.screens
|
|
478
|
-
]), null;
|
|
479
|
-
}
|
|
480
|
-
//#endregion
|
|
481
|
-
//#region src/embed/EmbedUnsavedGuard.tsx
|
|
482
|
-
function Gi() {
|
|
483
|
-
let e = F(), t = k((e) => e.pendingNavigation), n = k((e) => e.confirmNavigation), r = k((e) => e.cancelNavigation);
|
|
484
|
-
return t === null ? null : /* @__PURE__ */ Y($e, {
|
|
485
|
-
open: !0,
|
|
486
|
-
onOpenChange: (e) => {
|
|
487
|
-
e || r();
|
|
488
|
-
},
|
|
489
|
-
title: e("embed.unsaved.title", "Discard unsaved changes?"),
|
|
490
|
-
description: e("embed.unsaved.body", "This screen has unsaved changes. Leaving now discards them."),
|
|
491
|
-
confirmLabel: e("embed.unsaved.confirm", "Discard and leave"),
|
|
492
|
-
destructive: !0,
|
|
493
|
-
onConfirm: () => {
|
|
494
|
-
n();
|
|
495
|
-
}
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
//#endregion
|
|
499
|
-
//#region src/components/layout/Sidebar.tsx
|
|
500
|
-
function Ki({ activeArea: e }) {
|
|
501
|
-
let t = F(), { data: n } = l(), r = Q(), i = yn(), a = B((e) => e.sidebar), o = B((e) => e.set), s = a === "collapsed", [c, u] = q({}), d = cn(), f = d?.app_name ?? "", p = d?.app_logo, m = d?.version_label ?? "", h = G(() => qi(t, n?.navigation ?? [], e), [
|
|
502
|
-
t,
|
|
503
|
-
n?.navigation,
|
|
504
|
-
e
|
|
505
|
-
]), g = (e) => e ? r.pathname === e || r.pathname.startsWith(e + "/") : !1, _ = (e, r) => {
|
|
506
|
-
if (!e.screen) return;
|
|
507
|
-
let a = n?.screens[e.screen];
|
|
508
|
-
a && i(a.route, {
|
|
509
|
-
title: t(e.name),
|
|
510
|
-
icon: e.icon,
|
|
511
|
-
topLevel: !0
|
|
512
|
-
});
|
|
513
|
-
};
|
|
514
|
-
return /* @__PURE__ */ X("aside", {
|
|
515
|
-
style: {
|
|
516
|
-
gridArea: "sidebar",
|
|
517
|
-
background: "var(--sidebar)",
|
|
518
|
-
borderRight: "1px solid var(--border)",
|
|
519
|
-
display: "flex",
|
|
520
|
-
flexDirection: "column",
|
|
521
|
-
overflow: "hidden"
|
|
522
|
-
},
|
|
523
|
-
children: [
|
|
524
|
-
/* @__PURE__ */ Y("div", {
|
|
525
|
-
style: {
|
|
526
|
-
height: 44,
|
|
527
|
-
display: "flex",
|
|
528
|
-
alignItems: "center",
|
|
529
|
-
padding: s ? 0 : "0 12px",
|
|
530
|
-
justifyContent: s ? "center" : "flex-start",
|
|
531
|
-
borderBottom: "1px solid var(--divider)",
|
|
532
|
-
gap: 8
|
|
533
|
-
},
|
|
534
|
-
children: s ? p ? /* @__PURE__ */ Y(un, {
|
|
535
|
-
appLogo: p,
|
|
536
|
-
size: 18
|
|
537
|
-
}) : f ? /* @__PURE__ */ Y("span", {
|
|
538
|
-
style: {
|
|
539
|
-
fontSize: 11,
|
|
540
|
-
fontWeight: 700,
|
|
541
|
-
color: "var(--accent)"
|
|
542
|
-
},
|
|
543
|
-
children: f.charAt(0)
|
|
544
|
-
}) : null : /* @__PURE__ */ X(J, { children: [
|
|
545
|
-
/* @__PURE__ */ Y(un, {
|
|
546
|
-
appLogo: p,
|
|
547
|
-
size: 20
|
|
548
|
-
}),
|
|
549
|
-
/* @__PURE__ */ Y("div", {
|
|
550
|
-
style: {
|
|
551
|
-
fontSize: 13,
|
|
552
|
-
fontWeight: 600,
|
|
553
|
-
letterSpacing: "-0.01em",
|
|
554
|
-
color: "var(--text)"
|
|
555
|
-
},
|
|
556
|
-
children: f
|
|
557
|
-
}),
|
|
558
|
-
m && /* @__PURE__ */ Y("span", {
|
|
559
|
-
style: {
|
|
560
|
-
padding: "1px 6px",
|
|
561
|
-
background: "var(--accent-soft)",
|
|
562
|
-
color: "var(--accent)",
|
|
563
|
-
fontSize: 9.5,
|
|
564
|
-
fontWeight: 600,
|
|
565
|
-
borderRadius: 3,
|
|
566
|
-
letterSpacing: "0.04em",
|
|
567
|
-
textTransform: "uppercase"
|
|
568
|
-
},
|
|
569
|
-
children: m
|
|
570
|
-
})
|
|
571
|
-
] })
|
|
572
|
-
}),
|
|
573
|
-
/* @__PURE__ */ Y("nav", {
|
|
574
|
-
style: {
|
|
575
|
-
flex: 1,
|
|
576
|
-
overflowY: "auto",
|
|
577
|
-
padding: s ? "8px 4px" : "8px 6px"
|
|
578
|
-
},
|
|
579
|
-
children: h.map((e, r) => /* @__PURE__ */ X("div", {
|
|
580
|
-
style: { marginBottom: 12 },
|
|
581
|
-
children: [!s && e.title && /* @__PURE__ */ Y("div", {
|
|
582
|
-
style: {
|
|
583
|
-
fontSize: 9.5,
|
|
584
|
-
fontWeight: 700,
|
|
585
|
-
color: "var(--text-3)",
|
|
586
|
-
letterSpacing: "0.08em",
|
|
587
|
-
padding: "4px 10px 4px",
|
|
588
|
-
textTransform: "uppercase"
|
|
589
|
-
},
|
|
590
|
-
children: e.title
|
|
591
|
-
}), e.items.map((e, a) => {
|
|
592
|
-
let o = `${r}-${a}-${e.screen || t(e.name)}`, l = e.screen ? n?.screens[e.screen] : void 0, d = g(l?.route), f = !!(e.children && e.children.length > 0), p = !!c[o];
|
|
593
|
-
return /* @__PURE__ */ Y(Yi, {
|
|
594
|
-
item: e,
|
|
595
|
-
href: l?.route,
|
|
596
|
-
collapsed: s,
|
|
597
|
-
active: d,
|
|
598
|
-
hasKids: f,
|
|
599
|
-
expanded: p,
|
|
600
|
-
onToggleExpand: () => u((e) => ({
|
|
601
|
-
...e,
|
|
602
|
-
[o]: !e[o]
|
|
603
|
-
})),
|
|
604
|
-
onPick: (t) => _(e, t),
|
|
605
|
-
resolveChild: (e) => e.screen ? n?.screens[e.screen] : void 0,
|
|
606
|
-
onPickChild: (e) => {
|
|
607
|
-
let r = e.screen ? n?.screens[e.screen] : void 0;
|
|
608
|
-
r && i(r.route, {
|
|
609
|
-
title: t(e.name),
|
|
610
|
-
icon: e.icon,
|
|
611
|
-
topLevel: !0
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
}, o);
|
|
615
|
-
})]
|
|
616
|
-
}, r))
|
|
617
|
-
}),
|
|
618
|
-
/* @__PURE__ */ X("div", {
|
|
619
|
-
style: {
|
|
620
|
-
padding: "6px 8px",
|
|
621
|
-
borderTop: "1px solid var(--divider)",
|
|
622
|
-
display: "flex",
|
|
623
|
-
alignItems: "center",
|
|
624
|
-
gap: 6,
|
|
625
|
-
justifyContent: s ? "center" : "space-between"
|
|
626
|
-
},
|
|
627
|
-
children: [/* @__PURE__ */ Y("button", {
|
|
628
|
-
onClick: () => o("sidebar", s ? "wide" : "collapsed"),
|
|
629
|
-
title: s ? t("shell.sidebar.expand", "Expand sidebar (⌘B)") : t("shell.sidebar.collapse", "Collapse sidebar (⌘B)"),
|
|
630
|
-
style: {
|
|
631
|
-
display: "flex",
|
|
632
|
-
alignItems: "center",
|
|
633
|
-
justifyContent: "center",
|
|
634
|
-
width: 26,
|
|
635
|
-
height: 26,
|
|
636
|
-
borderRadius: 5,
|
|
637
|
-
background: "transparent",
|
|
638
|
-
border: 0,
|
|
639
|
-
color: "var(--text-3)",
|
|
640
|
-
cursor: "pointer"
|
|
641
|
-
},
|
|
642
|
-
children: Y(s ? I.right : I.left, { size: 14 })
|
|
643
|
-
}), !s && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("span", {
|
|
644
|
-
style: {
|
|
645
|
-
flex: 1,
|
|
646
|
-
fontSize: 11,
|
|
647
|
-
color: "var(--text-3)"
|
|
648
|
-
},
|
|
649
|
-
children: t("shell.sidebar.footer", "Docs · API · Help")
|
|
650
|
-
}), /* @__PURE__ */ Y(qe, { children: "?" })] })]
|
|
651
|
-
})
|
|
652
|
-
]
|
|
653
|
-
});
|
|
654
|
-
}
|
|
655
|
-
function qi(e, t, n) {
|
|
656
|
-
let r = [];
|
|
657
|
-
for (let i of t) if (Ji(i, n)) {
|
|
658
|
-
if (i.items && i.items.length > 0) r.push({
|
|
659
|
-
title: e(i.name) || "",
|
|
660
|
-
items: i.items
|
|
661
|
-
});
|
|
662
|
-
else if (i.screen) {
|
|
663
|
-
let e = r.find((e) => e.title === "");
|
|
664
|
-
e || (e = {
|
|
665
|
-
title: "",
|
|
666
|
-
items: []
|
|
667
|
-
}, r.push(e)), e.items.push(i);
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
return r;
|
|
671
|
-
}
|
|
672
|
-
function Ji(e, t) {
|
|
673
|
-
return (e.area || "default") === t;
|
|
674
|
-
}
|
|
675
|
-
function Yi({ item: e, href: t, collapsed: n, active: r, hasKids: i, expanded: a, onToggleExpand: o, onPick: s, onPickChild: c, resolveChild: l }) {
|
|
676
|
-
let u = F(), [d, f] = q(!1), p = !!e.icon, m = u(e.name) || e.screen || "";
|
|
677
|
-
if (n) {
|
|
678
|
-
let n = {
|
|
679
|
-
width: 40,
|
|
680
|
-
height: 32,
|
|
681
|
-
margin: "2px auto",
|
|
682
|
-
borderRadius: 6,
|
|
683
|
-
border: 0,
|
|
684
|
-
cursor: "pointer",
|
|
685
|
-
display: "flex",
|
|
686
|
-
alignItems: "center",
|
|
687
|
-
justifyContent: "center",
|
|
688
|
-
background: r ? "var(--sidebar-active)" : d ? "var(--sidebar-hover)" : "transparent",
|
|
689
|
-
color: r ? "var(--accent)" : "var(--text-3)",
|
|
690
|
-
textDecoration: "none"
|
|
691
|
-
};
|
|
692
|
-
return t ? /* @__PURE__ */ Y("a", {
|
|
693
|
-
href: t,
|
|
694
|
-
"data-declarion-native-link": "",
|
|
695
|
-
onClick: (e) => {
|
|
696
|
-
vn(e) || (e.preventDefault(), s());
|
|
697
|
-
},
|
|
698
|
-
title: m,
|
|
699
|
-
onMouseEnter: () => f(!0),
|
|
700
|
-
onMouseLeave: () => f(!1),
|
|
701
|
-
style: n,
|
|
702
|
-
children: p && /* @__PURE__ */ Y(on, {
|
|
703
|
-
name: e.icon,
|
|
704
|
-
size: 14
|
|
705
|
-
})
|
|
706
|
-
}) : /* @__PURE__ */ Y("button", {
|
|
707
|
-
onClick: () => s(),
|
|
708
|
-
title: m,
|
|
709
|
-
onMouseEnter: () => f(!0),
|
|
710
|
-
onMouseLeave: () => f(!1),
|
|
711
|
-
style: n,
|
|
712
|
-
children: p && /* @__PURE__ */ Y(on, {
|
|
713
|
-
name: e.icon,
|
|
714
|
-
size: 14
|
|
715
|
-
})
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
let h = {
|
|
719
|
-
width: "calc(100% - 4px)",
|
|
720
|
-
margin: "0 2px",
|
|
721
|
-
display: "flex",
|
|
722
|
-
alignItems: "center",
|
|
723
|
-
gap: 8,
|
|
724
|
-
padding: "5px 8px",
|
|
725
|
-
borderRadius: 5,
|
|
726
|
-
border: 0,
|
|
727
|
-
cursor: "pointer",
|
|
728
|
-
textAlign: "left",
|
|
729
|
-
background: r ? "var(--sidebar-active)" : d ? "var(--sidebar-hover)" : "transparent",
|
|
730
|
-
color: r ? "var(--accent)" : "var(--text-2)",
|
|
731
|
-
fontSize: 12.5,
|
|
732
|
-
fontWeight: r ? 600 : 500,
|
|
733
|
-
textDecoration: "none"
|
|
734
|
-
}, g = /* @__PURE__ */ X(J, { children: [
|
|
735
|
-
p && /* @__PURE__ */ Y(on, {
|
|
736
|
-
name: e.icon,
|
|
737
|
-
size: 14
|
|
738
|
-
}),
|
|
739
|
-
/* @__PURE__ */ Y("span", {
|
|
740
|
-
style: { flex: 1 },
|
|
741
|
-
children: m
|
|
742
|
-
}),
|
|
743
|
-
e.badge && /* @__PURE__ */ Y("span", {
|
|
744
|
-
style: {
|
|
745
|
-
padding: "1px 5px",
|
|
746
|
-
background: "var(--surface-3)",
|
|
747
|
-
color: "var(--text-2)",
|
|
748
|
-
borderRadius: 3,
|
|
749
|
-
fontSize: 10,
|
|
750
|
-
fontWeight: 600
|
|
751
|
-
},
|
|
752
|
-
children: e.badge
|
|
753
|
-
}),
|
|
754
|
-
i && /* @__PURE__ */ Y("span", {
|
|
755
|
-
role: "button",
|
|
756
|
-
"aria-label": a ? u("shell.sidebar.collapse_item", "Collapse") : u("shell.sidebar.expand_item", "Expand"),
|
|
757
|
-
onClick: (e) => {
|
|
758
|
-
e.stopPropagation(), e.preventDefault(), o();
|
|
759
|
-
},
|
|
760
|
-
style: {
|
|
761
|
-
display: "inline-flex",
|
|
762
|
-
padding: 2,
|
|
763
|
-
cursor: "pointer"
|
|
764
|
-
},
|
|
765
|
-
children: /* @__PURE__ */ Y(I.down, {
|
|
766
|
-
size: 11,
|
|
767
|
-
style: {
|
|
768
|
-
transform: a ? "rotate(0)" : "rotate(-90deg)",
|
|
769
|
-
transition: "transform .15s",
|
|
770
|
-
color: "var(--text-3)"
|
|
771
|
-
}
|
|
772
|
-
})
|
|
773
|
-
})
|
|
774
|
-
] });
|
|
775
|
-
return /* @__PURE__ */ X("div", { children: [t ? /* @__PURE__ */ Y("a", {
|
|
776
|
-
href: t,
|
|
777
|
-
"data-declarion-native-link": "",
|
|
778
|
-
onClick: (e) => {
|
|
779
|
-
vn(e) || (e.preventDefault(), s());
|
|
780
|
-
},
|
|
781
|
-
onMouseEnter: () => f(!0),
|
|
782
|
-
onMouseLeave: () => f(!1),
|
|
783
|
-
style: h,
|
|
784
|
-
children: g
|
|
785
|
-
}) : /* @__PURE__ */ Y("button", {
|
|
786
|
-
onClick: () => {
|
|
787
|
-
i && o();
|
|
788
|
-
},
|
|
789
|
-
onMouseEnter: () => f(!0),
|
|
790
|
-
onMouseLeave: () => f(!1),
|
|
791
|
-
style: h,
|
|
792
|
-
children: g
|
|
793
|
-
}), i && a && /* @__PURE__ */ Y("div", {
|
|
794
|
-
style: {
|
|
795
|
-
marginLeft: 22,
|
|
796
|
-
borderLeft: "1px solid var(--divider)",
|
|
797
|
-
paddingLeft: 6
|
|
798
|
-
},
|
|
799
|
-
children: (e.children || []).map((e, t) => {
|
|
800
|
-
let n = l(e), r = e.screen || `${t}`;
|
|
801
|
-
return /* @__PURE__ */ Y(Xi, {
|
|
802
|
-
label: u(e.name) || e.screen || "",
|
|
803
|
-
href: n?.route,
|
|
804
|
-
enabled: !!n,
|
|
805
|
-
onPick: () => c(e)
|
|
806
|
-
}, r);
|
|
807
|
-
})
|
|
808
|
-
})] });
|
|
809
|
-
}
|
|
810
|
-
function Xi({ label: e, href: t, enabled: n, onPick: r }) {
|
|
811
|
-
let [i, a] = q(!1), o = {
|
|
812
|
-
width: "100%",
|
|
813
|
-
display: "block",
|
|
814
|
-
padding: "4px 8px",
|
|
815
|
-
borderRadius: 5,
|
|
816
|
-
background: i ? "var(--sidebar-hover)" : "transparent",
|
|
817
|
-
border: 0,
|
|
818
|
-
textAlign: "left",
|
|
819
|
-
cursor: n ? "pointer" : "default",
|
|
820
|
-
fontSize: 12,
|
|
821
|
-
color: "var(--text-3)",
|
|
822
|
-
textDecoration: "none"
|
|
823
|
-
};
|
|
824
|
-
return n && t ? /* @__PURE__ */ Y("a", {
|
|
825
|
-
href: t,
|
|
826
|
-
"data-declarion-native-link": "",
|
|
827
|
-
onClick: (e) => {
|
|
828
|
-
vn(e) || (e.preventDefault(), r());
|
|
829
|
-
},
|
|
830
|
-
onMouseEnter: () => a(!0),
|
|
831
|
-
onMouseLeave: () => a(!1),
|
|
832
|
-
style: o,
|
|
833
|
-
children: e
|
|
834
|
-
}) : /* @__PURE__ */ Y("button", {
|
|
835
|
-
onClick: () => n && r(),
|
|
836
|
-
onMouseEnter: () => a(!0),
|
|
837
|
-
onMouseLeave: () => a(!1),
|
|
838
|
-
style: o,
|
|
839
|
-
children: e
|
|
840
|
-
});
|
|
841
|
-
}
|
|
842
|
-
//#endregion
|
|
843
|
-
//#region src/components/layout/TenantChip.tsx
|
|
844
|
-
var Zi = 6;
|
|
845
|
-
function Qi(e) {
|
|
846
|
-
return e.startsWith("_");
|
|
847
|
-
}
|
|
848
|
-
var $i = {
|
|
849
|
-
production: {
|
|
850
|
-
fg: "#C2362C",
|
|
851
|
-
bg: "#FAE8E6",
|
|
852
|
-
border: "#F4C7C2",
|
|
853
|
-
darkFg: "#EF6A60",
|
|
854
|
-
darkBg: "rgba(239,106,96,0.14)"
|
|
855
|
-
},
|
|
856
|
-
staging: {
|
|
857
|
-
fg: "#B56B00",
|
|
858
|
-
bg: "#FBF1E0",
|
|
859
|
-
border: "#F2DFB8",
|
|
860
|
-
darkFg: "#E0A44A",
|
|
861
|
-
darkBg: "rgba(224,164,74,0.14)"
|
|
862
|
-
},
|
|
863
|
-
dev: {
|
|
864
|
-
fg: "#0B6FB0",
|
|
865
|
-
bg: "#E4F1FA",
|
|
866
|
-
border: "#C9DFEE",
|
|
867
|
-
darkFg: "#5AB3EA",
|
|
868
|
-
darkBg: "rgba(90,179,234,0.14)"
|
|
869
|
-
}
|
|
870
|
-
}, ea = {
|
|
871
|
-
fg: "#5B6270",
|
|
872
|
-
bg: "#F3F4F7",
|
|
873
|
-
border: "#E6E8EE"
|
|
874
|
-
};
|
|
875
|
-
function ta(e) {
|
|
876
|
-
return e ? $i[e] ?? ea : $i.production;
|
|
877
|
-
}
|
|
878
|
-
function na({ tenant: e, tenants: t, onSwitch: n, busy: r, compact: i, locked: a, lockedReason: o }) {
|
|
879
|
-
let s = F(), [c, l] = q(!1), [u, d] = q(""), f = K(null), p = e?.env, m = ta(p), h = e?.name || "—", g = e?.role || "—", _ = G(() => t.filter((e) => e.is_member !== !1), [t]), v = G(() => t.filter((e) => e.is_member === !1), [t]), y = t.length >= Zi, b = (e) => {
|
|
880
|
-
if (!u) return !0;
|
|
881
|
-
let t = u.toLowerCase();
|
|
882
|
-
return e.name.toLowerCase().includes(t) || e.code.toLowerCase().includes(t);
|
|
883
|
-
}, S = _.filter(b), C = v.filter(b), ee = u !== "" && S.length === 0 && C.length === 0;
|
|
884
|
-
return /* @__PURE__ */ X("div", {
|
|
885
|
-
style: { position: "relative" },
|
|
886
|
-
children: [/* @__PURE__ */ X("button", {
|
|
887
|
-
ref: f,
|
|
888
|
-
onClick: () => !a && l((e) => !e),
|
|
889
|
-
"data-testid": "tenant-chip",
|
|
890
|
-
"data-locked": a ? "true" : void 0,
|
|
891
|
-
style: {
|
|
892
|
-
display: "flex",
|
|
893
|
-
alignItems: "center",
|
|
894
|
-
gap: 8,
|
|
895
|
-
height: 28,
|
|
896
|
-
padding: "0 8px 0 8px",
|
|
897
|
-
maxWidth: i ? "100%" : void 0,
|
|
898
|
-
minWidth: 0,
|
|
899
|
-
background: "var(--surface-2)",
|
|
900
|
-
border: "1px solid var(--border)",
|
|
901
|
-
borderRadius: 6,
|
|
902
|
-
cursor: a ? "not-allowed" : "pointer",
|
|
903
|
-
color: "var(--text)",
|
|
904
|
-
fontSize: 12.5,
|
|
905
|
-
fontWeight: 500,
|
|
906
|
-
opacity: a ? .6 : 1
|
|
907
|
-
},
|
|
908
|
-
title: a ? o || s("shell.tenant.switch_disabled", "Tenant switching is disabled") : s("shell.tenant.current", "Current tenant / environment"),
|
|
909
|
-
disabled: r || a,
|
|
910
|
-
children: [
|
|
911
|
-
/* @__PURE__ */ Y(I.tenant, {
|
|
912
|
-
size: 13,
|
|
913
|
-
style: {
|
|
914
|
-
color: "var(--text-3)",
|
|
915
|
-
flex: "none"
|
|
916
|
-
}
|
|
917
|
-
}),
|
|
918
|
-
/* @__PURE__ */ Y("span", {
|
|
919
|
-
style: {
|
|
920
|
-
fontWeight: 600,
|
|
921
|
-
minWidth: 0,
|
|
922
|
-
overflow: i ? "hidden" : void 0,
|
|
923
|
-
textOverflow: i ? "ellipsis" : void 0,
|
|
924
|
-
whiteSpace: i ? "nowrap" : void 0
|
|
925
|
-
},
|
|
926
|
-
children: h
|
|
927
|
-
}),
|
|
928
|
-
p && /* @__PURE__ */ Y("span", {
|
|
929
|
-
className: "mono",
|
|
930
|
-
style: {
|
|
931
|
-
padding: "2px 6px",
|
|
932
|
-
borderRadius: 3,
|
|
933
|
-
fontSize: 10,
|
|
934
|
-
fontWeight: 700,
|
|
935
|
-
letterSpacing: "0.06em",
|
|
936
|
-
textTransform: "uppercase",
|
|
937
|
-
background: m.bg,
|
|
938
|
-
color: m.fg,
|
|
939
|
-
border: `1px solid ${m.border || "transparent"}`,
|
|
940
|
-
flex: "none"
|
|
941
|
-
},
|
|
942
|
-
children: p
|
|
943
|
-
}),
|
|
944
|
-
/* @__PURE__ */ Y(I.down, {
|
|
945
|
-
size: 11,
|
|
946
|
-
style: {
|
|
947
|
-
color: "var(--text-3)",
|
|
948
|
-
flex: "none"
|
|
949
|
-
}
|
|
950
|
-
})
|
|
951
|
-
]
|
|
952
|
-
}), /* @__PURE__ */ X(st, {
|
|
953
|
-
open: c,
|
|
954
|
-
anchor: f.current,
|
|
955
|
-
onClose: () => l(!1),
|
|
956
|
-
width: 300,
|
|
957
|
-
align: "start",
|
|
958
|
-
children: [
|
|
959
|
-
/* @__PURE__ */ X("div", {
|
|
960
|
-
style: {
|
|
961
|
-
padding: "10px 10px 6px",
|
|
962
|
-
borderBottom: "1px solid var(--divider)"
|
|
963
|
-
},
|
|
964
|
-
children: [
|
|
965
|
-
/* @__PURE__ */ Y("div", {
|
|
966
|
-
style: {
|
|
967
|
-
fontSize: 10.5,
|
|
968
|
-
color: "var(--text-3)",
|
|
969
|
-
letterSpacing: "0.08em",
|
|
970
|
-
fontWeight: 700,
|
|
971
|
-
textTransform: "uppercase"
|
|
972
|
-
},
|
|
973
|
-
children: s("shell.tenant.active_scope", "Active scope")
|
|
974
|
-
}),
|
|
975
|
-
/* @__PURE__ */ X("div", {
|
|
976
|
-
style: {
|
|
977
|
-
display: "flex",
|
|
978
|
-
alignItems: "center",
|
|
979
|
-
gap: 6,
|
|
980
|
-
marginTop: 4
|
|
981
|
-
},
|
|
982
|
-
children: [
|
|
983
|
-
/* @__PURE__ */ Y(I.tenant, {
|
|
984
|
-
size: 13,
|
|
985
|
-
style: { color: "var(--accent)" }
|
|
986
|
-
}),
|
|
987
|
-
/* @__PURE__ */ Y("span", {
|
|
988
|
-
style: {
|
|
989
|
-
fontSize: 13,
|
|
990
|
-
fontWeight: 600
|
|
991
|
-
},
|
|
992
|
-
children: h
|
|
993
|
-
}),
|
|
994
|
-
p && /* @__PURE__ */ Y("span", {
|
|
995
|
-
className: "mono",
|
|
996
|
-
style: {
|
|
997
|
-
marginLeft: "auto",
|
|
998
|
-
padding: "2px 6px",
|
|
999
|
-
borderRadius: 3,
|
|
1000
|
-
fontSize: 10,
|
|
1001
|
-
fontWeight: 700,
|
|
1002
|
-
background: m.bg,
|
|
1003
|
-
color: m.fg
|
|
1004
|
-
},
|
|
1005
|
-
children: p
|
|
1006
|
-
})
|
|
1007
|
-
]
|
|
1008
|
-
}),
|
|
1009
|
-
/* @__PURE__ */ Y("div", {
|
|
1010
|
-
style: {
|
|
1011
|
-
marginTop: 4,
|
|
1012
|
-
fontSize: 11,
|
|
1013
|
-
color: "var(--text-3)"
|
|
1014
|
-
},
|
|
1015
|
-
children: x(s("shell.tenant.role", "Role: {role}"), { role: /* @__PURE__ */ Y("span", {
|
|
1016
|
-
style: {
|
|
1017
|
-
color: "var(--text-2)",
|
|
1018
|
-
fontWeight: 500
|
|
1019
|
-
},
|
|
1020
|
-
children: g
|
|
1021
|
-
}) })
|
|
1022
|
-
})
|
|
1023
|
-
]
|
|
1024
|
-
}),
|
|
1025
|
-
y && /* @__PURE__ */ Y("div", {
|
|
1026
|
-
style: {
|
|
1027
|
-
padding: "8px 10px 4px",
|
|
1028
|
-
borderBottom: "1px solid var(--divider)"
|
|
1029
|
-
},
|
|
1030
|
-
children: /* @__PURE__ */ Y("input", {
|
|
1031
|
-
type: "text",
|
|
1032
|
-
value: u,
|
|
1033
|
-
onChange: (e) => d(e.target.value),
|
|
1034
|
-
placeholder: s("shell.tenant.search", "Search tenants…"),
|
|
1035
|
-
autoFocus: !0,
|
|
1036
|
-
"data-testid": "tenant-switch-search",
|
|
1037
|
-
style: {
|
|
1038
|
-
width: "100%",
|
|
1039
|
-
height: 28,
|
|
1040
|
-
padding: "0 8px",
|
|
1041
|
-
fontSize: 12.5,
|
|
1042
|
-
background: "var(--surface-1)",
|
|
1043
|
-
color: "var(--text)",
|
|
1044
|
-
border: "1px solid var(--border)",
|
|
1045
|
-
borderRadius: 4,
|
|
1046
|
-
outline: "none"
|
|
1047
|
-
}
|
|
1048
|
-
})
|
|
1049
|
-
}),
|
|
1050
|
-
/* @__PURE__ */ X("div", {
|
|
1051
|
-
style: {
|
|
1052
|
-
maxHeight: 320,
|
|
1053
|
-
overflowY: "auto"
|
|
1054
|
-
},
|
|
1055
|
-
children: [
|
|
1056
|
-
/* @__PURE__ */ Y(ra, {
|
|
1057
|
-
label: v.length > 0 ? s("shell.tenant.yours", "Your tenants") : s("shell.tenant.switch", "Switch tenant"),
|
|
1058
|
-
tenants: S,
|
|
1059
|
-
activeID: e?.id,
|
|
1060
|
-
onPick: (e) => {
|
|
1061
|
-
l(!1), n(e);
|
|
1062
|
-
}
|
|
1063
|
-
}),
|
|
1064
|
-
C.length > 0 && /* @__PURE__ */ Y(ra, {
|
|
1065
|
-
label: s("shell.tenant.all_admin", "All tenants (admin)"),
|
|
1066
|
-
tenants: C,
|
|
1067
|
-
activeID: e?.id,
|
|
1068
|
-
onPick: (e) => {
|
|
1069
|
-
l(!1), n(e);
|
|
1070
|
-
}
|
|
1071
|
-
}),
|
|
1072
|
-
ee && /* @__PURE__ */ Y("div", {
|
|
1073
|
-
style: {
|
|
1074
|
-
padding: "12px 12px",
|
|
1075
|
-
fontSize: 12,
|
|
1076
|
-
color: "var(--text-3)",
|
|
1077
|
-
textAlign: "center"
|
|
1078
|
-
},
|
|
1079
|
-
children: s("shell.tenant.no_matches", "No tenants match “{query}”.", { query: u })
|
|
1080
|
-
})
|
|
1081
|
-
]
|
|
1082
|
-
}),
|
|
1083
|
-
/* @__PURE__ */ X("div", {
|
|
1084
|
-
style: {
|
|
1085
|
-
padding: "8px 10px",
|
|
1086
|
-
borderTop: "1px solid var(--divider)",
|
|
1087
|
-
fontSize: 10.5,
|
|
1088
|
-
color: "var(--text-4)",
|
|
1089
|
-
display: "flex",
|
|
1090
|
-
alignItems: "flex-start",
|
|
1091
|
-
gap: 6
|
|
1092
|
-
},
|
|
1093
|
-
children: [/* @__PURE__ */ Y(I.info, {
|
|
1094
|
-
size: 11,
|
|
1095
|
-
style: {
|
|
1096
|
-
marginTop: 2,
|
|
1097
|
-
flexShrink: 0
|
|
1098
|
-
}
|
|
1099
|
-
}), /* @__PURE__ */ Y("span", { children: s("shell.tenant.switch_hint", "Switching tenant reloads all data. Unsaved changes in open tabs will prompt.") })]
|
|
1100
|
-
})
|
|
1101
|
-
]
|
|
1102
|
-
})]
|
|
1103
|
-
});
|
|
1104
|
-
}
|
|
1105
|
-
function ra({ label: e, tenants: t, activeID: n, onPick: r }) {
|
|
1106
|
-
return t.length === 0 ? null : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
|
|
1107
|
-
style: {
|
|
1108
|
-
padding: "6px 10px 4px",
|
|
1109
|
-
fontSize: 10,
|
|
1110
|
-
color: "var(--text-4)",
|
|
1111
|
-
letterSpacing: "0.08em",
|
|
1112
|
-
fontWeight: 700,
|
|
1113
|
-
textTransform: "uppercase"
|
|
1114
|
-
},
|
|
1115
|
-
children: e
|
|
1116
|
-
}), t.map((e) => /* @__PURE__ */ Y(ia, {
|
|
1117
|
-
tenant: e,
|
|
1118
|
-
tone: ta(e.env),
|
|
1119
|
-
active: e.id === n,
|
|
1120
|
-
onPick: () => r(e)
|
|
1121
|
-
}, e.id))] });
|
|
1122
|
-
}
|
|
1123
|
-
function ia({ tenant: e, tone: t, active: n, onPick: r }) {
|
|
1124
|
-
let i = F(), [a, o] = q(!1), s = n || a ? "var(--surface-3)" : "transparent", c = Qi(e.code);
|
|
1125
|
-
return /* @__PURE__ */ X("button", {
|
|
1126
|
-
onClick: r,
|
|
1127
|
-
onMouseEnter: () => o(!0),
|
|
1128
|
-
onMouseLeave: () => o(!1),
|
|
1129
|
-
style: {
|
|
1130
|
-
display: "flex",
|
|
1131
|
-
alignItems: "center",
|
|
1132
|
-
gap: 8,
|
|
1133
|
-
width: "100%",
|
|
1134
|
-
padding: "7px 10px",
|
|
1135
|
-
background: s,
|
|
1136
|
-
border: 0,
|
|
1137
|
-
cursor: "pointer",
|
|
1138
|
-
textAlign: "left"
|
|
1139
|
-
},
|
|
1140
|
-
children: [
|
|
1141
|
-
/* @__PURE__ */ Y(I.tenant, {
|
|
1142
|
-
size: 12,
|
|
1143
|
-
style: { color: "var(--text-3)" }
|
|
1144
|
-
}),
|
|
1145
|
-
/* @__PURE__ */ Y("span", {
|
|
1146
|
-
style: {
|
|
1147
|
-
fontSize: 12.5,
|
|
1148
|
-
color: "var(--text)",
|
|
1149
|
-
fontWeight: 500
|
|
1150
|
-
},
|
|
1151
|
-
children: e.name
|
|
1152
|
-
}),
|
|
1153
|
-
c ? /* @__PURE__ */ Y("span", {
|
|
1154
|
-
className: "mono",
|
|
1155
|
-
title: i("shell.tenant.system_hint", "Platform-internal workspace"),
|
|
1156
|
-
style: {
|
|
1157
|
-
padding: "1px 5px",
|
|
1158
|
-
borderRadius: 3,
|
|
1159
|
-
fontSize: 9.5,
|
|
1160
|
-
fontWeight: 700,
|
|
1161
|
-
background: "var(--surface-3)",
|
|
1162
|
-
color: "var(--text-2)",
|
|
1163
|
-
border: "1px solid var(--border)"
|
|
1164
|
-
},
|
|
1165
|
-
children: i("shell.tenant.system", "system")
|
|
1166
|
-
}) : e.env ? /* @__PURE__ */ Y("span", {
|
|
1167
|
-
className: "mono",
|
|
1168
|
-
style: {
|
|
1169
|
-
padding: "1px 5px",
|
|
1170
|
-
borderRadius: 3,
|
|
1171
|
-
fontSize: 9.5,
|
|
1172
|
-
fontWeight: 700,
|
|
1173
|
-
background: t.bg,
|
|
1174
|
-
color: t.fg
|
|
1175
|
-
},
|
|
1176
|
-
children: e.env
|
|
1177
|
-
}) : null,
|
|
1178
|
-
/* @__PURE__ */ Y("span", { style: { flex: 1 } }),
|
|
1179
|
-
e.role && /* @__PURE__ */ Y("span", {
|
|
1180
|
-
style: {
|
|
1181
|
-
fontSize: 10.5,
|
|
1182
|
-
color: "var(--text-3)"
|
|
1183
|
-
},
|
|
1184
|
-
children: e.role
|
|
1185
|
-
}),
|
|
1186
|
-
n && /* @__PURE__ */ Y(I.check, {
|
|
1187
|
-
size: 12,
|
|
1188
|
-
style: {
|
|
1189
|
-
color: "var(--accent)",
|
|
1190
|
-
marginLeft: 4
|
|
1191
|
-
}
|
|
1192
|
-
})
|
|
1193
|
-
]
|
|
1194
|
-
});
|
|
1195
|
-
}
|
|
1196
|
-
//#endregion
|
|
1197
|
-
//#region src/components/chrome/Breadcrumbs.tsx
|
|
1198
|
-
function aa({ items: e, onCrumbClick: t }) {
|
|
1199
|
-
return !e || e.length === 0 ? null : /* @__PURE__ */ Y("nav", {
|
|
1200
|
-
style: {
|
|
1201
|
-
display: "flex",
|
|
1202
|
-
alignItems: "center",
|
|
1203
|
-
gap: 2,
|
|
1204
|
-
fontSize: 12,
|
|
1205
|
-
minWidth: 0,
|
|
1206
|
-
overflow: "hidden",
|
|
1207
|
-
flex: "0 1 auto"
|
|
1208
|
-
},
|
|
1209
|
-
children: e.map((n, r) => {
|
|
1210
|
-
let i = r === e.length - 1, a = !!n.onClick || !!n.target;
|
|
1211
|
-
return /* @__PURE__ */ X(ni, { children: [r > 0 && /* @__PURE__ */ Y("span", {
|
|
1212
|
-
style: {
|
|
1213
|
-
color: "var(--text-4)",
|
|
1214
|
-
padding: "0 4px"
|
|
1215
|
-
},
|
|
1216
|
-
children: /* @__PURE__ */ Y(I.right, { size: 11 })
|
|
1217
|
-
}), /* @__PURE__ */ Y(oa, {
|
|
1218
|
-
crumb: n,
|
|
1219
|
-
last: i,
|
|
1220
|
-
clickable: a,
|
|
1221
|
-
onClick: t
|
|
1222
|
-
})] }, r);
|
|
1223
|
-
})
|
|
1224
|
-
});
|
|
1225
|
-
}
|
|
1226
|
-
function oa({ crumb: e, last: t, clickable: n, onClick: r }) {
|
|
1227
|
-
let [i, a] = q(!1), o = e.icon && I[e.icon] ? I[e.icon] : I.folder;
|
|
1228
|
-
return /* @__PURE__ */ X("button", {
|
|
1229
|
-
onClick: () => {
|
|
1230
|
-
n && (r ? r(e) : e.onClick && e.onClick());
|
|
1231
|
-
},
|
|
1232
|
-
disabled: !n,
|
|
1233
|
-
onMouseEnter: () => a(!0),
|
|
1234
|
-
onMouseLeave: () => a(!1),
|
|
1235
|
-
style: {
|
|
1236
|
-
background: i && n ? "var(--surface-3)" : "transparent",
|
|
1237
|
-
border: 0,
|
|
1238
|
-
padding: "4px 6px",
|
|
1239
|
-
borderRadius: 4,
|
|
1240
|
-
color: t || i && n ? "var(--text)" : "var(--text-3)",
|
|
1241
|
-
fontWeight: t ? 600 : 500,
|
|
1242
|
-
cursor: n ? "pointer" : "default",
|
|
1243
|
-
whiteSpace: "nowrap",
|
|
1244
|
-
maxWidth: 200,
|
|
1245
|
-
overflow: "hidden",
|
|
1246
|
-
textOverflow: "ellipsis",
|
|
1247
|
-
fontSize: 12.5
|
|
1248
|
-
},
|
|
1249
|
-
children: [e.icon && o && /* @__PURE__ */ Y("span", {
|
|
1250
|
-
style: {
|
|
1251
|
-
marginRight: 4,
|
|
1252
|
-
display: "inline-block",
|
|
1253
|
-
verticalAlign: "-2px"
|
|
1254
|
-
},
|
|
1255
|
-
children: /* @__PURE__ */ Y(o, { size: 12 })
|
|
1256
|
-
}), e.label]
|
|
1257
|
-
});
|
|
1258
|
-
}
|
|
1259
|
-
//#endregion
|
|
1260
|
-
//#region src/components/layout/TopBar.tsx
|
|
1261
|
-
var sa = "⌘K";
|
|
1262
|
-
function ca({ breadcrumbs: e, onCrumbClick: t, onOpenNav: n, navButtonRef: r, showNavButton: i, onOpenTabs: a, tabsButtonRef: o, showTabsButton: s, mobileTabCount: c = 0, onCmdK: l, onToggleAI: u, aiOpen: d, onOpenProfile: f, onOpenPrefs: m, showTenantSwitcher: h = !0, showBreadcrumbs: g = !0, showThemeToggle: _ = !0 } = {}) {
|
|
1263
|
-
let v = F(), y = p((e) => e.user), b = He(), { activeTenant: x, tenants: S, switchTenant: C, isSwitchingTenant: ee, logout: te } = xn(), { isImpersonating: ne, stop: re } = Cn(), w = B((e) => e.colorScheme), T = B((e) => e.set), [ie, E] = q(!1), ae = K(null), oe = x?.env, se = ta(oe), D = y?.email ?? "", O = y?.display_name || D || v("shell.user_menu.user", "User"), k = i && b.category === "phone", ce = i && b.category !== "desktop", le = () => {
|
|
1264
|
-
T("colorScheme", w === "dark" ? "light" : "dark");
|
|
1265
|
-
}, ue = (e) => {
|
|
1266
|
-
x?.id !== e.id && (!z.getState().tabs.some((e) => e.dirty) || window.confirm(v("shell.tenant.switch_confirm", "You have unsaved changes in one or more tabs. Switching tenant will discard them. Continue?"))) && C(e.id);
|
|
1267
|
-
};
|
|
1268
|
-
return /* @__PURE__ */ X("header", {
|
|
1269
|
-
style: {
|
|
1270
|
-
gridArea: "topbar",
|
|
1271
|
-
background: "var(--surface)",
|
|
1272
|
-
borderBottom: "1px solid var(--border)",
|
|
1273
|
-
display: "flex",
|
|
1274
|
-
alignItems: "center",
|
|
1275
|
-
...wn(12),
|
|
1276
|
-
gap: ce ? 8 : 10,
|
|
1277
|
-
zIndex: 5,
|
|
1278
|
-
position: "relative",
|
|
1279
|
-
minWidth: 0,
|
|
1280
|
-
overflow: "hidden"
|
|
1281
|
-
},
|
|
1282
|
-
children: [
|
|
1283
|
-
oe === "production" && /* @__PURE__ */ Y("span", { style: {
|
|
1284
|
-
position: "absolute",
|
|
1285
|
-
left: 0,
|
|
1286
|
-
right: 0,
|
|
1287
|
-
top: 0,
|
|
1288
|
-
height: 2,
|
|
1289
|
-
background: `linear-gradient(90deg, transparent, ${se.fg}, transparent)`,
|
|
1290
|
-
opacity: .35,
|
|
1291
|
-
pointerEvents: "none"
|
|
1292
|
-
} }),
|
|
1293
|
-
i && /* @__PURE__ */ Y(L, {
|
|
1294
|
-
ref: r,
|
|
1295
|
-
icon: /* @__PURE__ */ Y(I.menu, { size: 16 }),
|
|
1296
|
-
title: v("shell.nav.open", "Open navigation"),
|
|
1297
|
-
onClick: n
|
|
1298
|
-
}),
|
|
1299
|
-
h && /* @__PURE__ */ Y("div", {
|
|
1300
|
-
style: {
|
|
1301
|
-
minWidth: 0,
|
|
1302
|
-
maxWidth: k ? "min(210px, 56vw)" : ce ? 230 : void 0,
|
|
1303
|
-
flex: k ? "1 1 auto" : "0 0 auto"
|
|
1304
|
-
},
|
|
1305
|
-
children: /* @__PURE__ */ Y(na, {
|
|
1306
|
-
tenant: x,
|
|
1307
|
-
tenants: S,
|
|
1308
|
-
onSwitch: ue,
|
|
1309
|
-
busy: ee,
|
|
1310
|
-
compact: ce,
|
|
1311
|
-
locked: ne,
|
|
1312
|
-
lockedReason: ne ? v("shell.impersonation.tenant_locked", "Exit impersonation to switch tenants") : void 0
|
|
1313
|
-
})
|
|
1314
|
-
}),
|
|
1315
|
-
ne && /* @__PURE__ */ X("span", {
|
|
1316
|
-
"data-testid": "impersonation-chip",
|
|
1317
|
-
style: {
|
|
1318
|
-
display: "inline-flex",
|
|
1319
|
-
alignItems: "center",
|
|
1320
|
-
gap: 4,
|
|
1321
|
-
height: 22,
|
|
1322
|
-
padding: "0 8px",
|
|
1323
|
-
borderRadius: 999,
|
|
1324
|
-
background: "var(--impersonation-accent-soft)",
|
|
1325
|
-
color: "var(--impersonation-accent-fg)",
|
|
1326
|
-
fontSize: 11,
|
|
1327
|
-
fontWeight: 600,
|
|
1328
|
-
textTransform: "uppercase",
|
|
1329
|
-
letterSpacing: "0.05em"
|
|
1330
|
-
},
|
|
1331
|
-
children: [
|
|
1332
|
-
/* @__PURE__ */ Y(I.users, { size: 11 }),
|
|
1333
|
-
" ",
|
|
1334
|
-
v("shell.impersonation.chip", "Impersonating")
|
|
1335
|
-
]
|
|
1336
|
-
}),
|
|
1337
|
-
!k && g && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("span", {
|
|
1338
|
-
style: {
|
|
1339
|
-
color: "var(--text-4)",
|
|
1340
|
-
fontSize: 11
|
|
1341
|
-
},
|
|
1342
|
-
children: /* @__PURE__ */ Y(I.right, { size: 10 })
|
|
1343
|
-
}), /* @__PURE__ */ Y(aa, {
|
|
1344
|
-
items: e ?? [],
|
|
1345
|
-
onCrumbClick: t
|
|
1346
|
-
})] }),
|
|
1347
|
-
/* @__PURE__ */ Y("div", { style: { flex: 1 } }),
|
|
1348
|
-
s && /* @__PURE__ */ Y(L, {
|
|
1349
|
-
ref: o,
|
|
1350
|
-
icon: /* @__PURE__ */ Y(I.layers, { size: 15 }),
|
|
1351
|
-
title: v("shell.tabs.open_tabs_count", "Open tabs ({count})", { count: c }),
|
|
1352
|
-
onClick: a
|
|
1353
|
-
}),
|
|
1354
|
-
k ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(L, {
|
|
1355
|
-
icon: /* @__PURE__ */ Y(I.search, { size: 15 }),
|
|
1356
|
-
title: v("shell.palette.search", "Search or run command"),
|
|
1357
|
-
onClick: l
|
|
1358
|
-
}), u && /* @__PURE__ */ Y(L, {
|
|
1359
|
-
icon: /* @__PURE__ */ Y(I.sparkle, { size: 15 }),
|
|
1360
|
-
title: v("shell.ai_assistant", "AI Assistant"),
|
|
1361
|
-
onClick: u,
|
|
1362
|
-
active: d
|
|
1363
|
-
})] }) : /* @__PURE__ */ X(J, { children: [
|
|
1364
|
-
/* @__PURE__ */ X("button", {
|
|
1365
|
-
onClick: l,
|
|
1366
|
-
style: {
|
|
1367
|
-
display: "flex",
|
|
1368
|
-
alignItems: "center",
|
|
1369
|
-
gap: 8,
|
|
1370
|
-
padding: "0 8px 0 10px",
|
|
1371
|
-
height: 28,
|
|
1372
|
-
background: "var(--surface-2)",
|
|
1373
|
-
border: "1px solid var(--border)",
|
|
1374
|
-
borderRadius: 6,
|
|
1375
|
-
cursor: "pointer",
|
|
1376
|
-
color: "var(--text-3)",
|
|
1377
|
-
fontSize: 12,
|
|
1378
|
-
minWidth: 240
|
|
1379
|
-
},
|
|
1380
|
-
children: [
|
|
1381
|
-
/* @__PURE__ */ Y(I.search, { size: 13 }),
|
|
1382
|
-
/* @__PURE__ */ Y("span", {
|
|
1383
|
-
style: {
|
|
1384
|
-
flex: 1,
|
|
1385
|
-
textAlign: "left"
|
|
1386
|
-
},
|
|
1387
|
-
children: v("shell.topbar.search_hint", "Search or run command…")
|
|
1388
|
-
}),
|
|
1389
|
-
/* @__PURE__ */ Y(qe, { children: sa })
|
|
1390
|
-
]
|
|
1391
|
-
}),
|
|
1392
|
-
/* @__PURE__ */ Y(L, {
|
|
1393
|
-
icon: /* @__PURE__ */ Y(I.bell, { size: 15 }),
|
|
1394
|
-
title: v("shell.topbar.notifications", "Notifications")
|
|
1395
|
-
}),
|
|
1396
|
-
_ && /* @__PURE__ */ Y(L, {
|
|
1397
|
-
icon: Y(w === "dark" ? I.sun : I.moon, { size: 15 }),
|
|
1398
|
-
title: v("shell.topbar.theme", "Theme"),
|
|
1399
|
-
onClick: le
|
|
1400
|
-
}),
|
|
1401
|
-
/* @__PURE__ */ Y(L, {
|
|
1402
|
-
icon: /* @__PURE__ */ Y(I.sparkle, { size: 15 }),
|
|
1403
|
-
title: v("shell.ai_assistant", "AI Assistant"),
|
|
1404
|
-
onClick: u,
|
|
1405
|
-
active: d
|
|
1406
|
-
}),
|
|
1407
|
-
/* @__PURE__ */ Y("div", { style: {
|
|
1408
|
-
width: 1,
|
|
1409
|
-
height: 18,
|
|
1410
|
-
background: "var(--divider)",
|
|
1411
|
-
margin: "0 2px"
|
|
1412
|
-
} })
|
|
1413
|
-
] }),
|
|
1414
|
-
/* @__PURE__ */ X("div", {
|
|
1415
|
-
style: { position: "relative" },
|
|
1416
|
-
children: [/* @__PURE__ */ X("button", {
|
|
1417
|
-
ref: ae,
|
|
1418
|
-
onClick: () => E((e) => !e),
|
|
1419
|
-
style: {
|
|
1420
|
-
display: "flex",
|
|
1421
|
-
alignItems: "center",
|
|
1422
|
-
gap: 6,
|
|
1423
|
-
padding: ce ? 0 : "0 4px 0 2px",
|
|
1424
|
-
height: 28,
|
|
1425
|
-
background: "transparent",
|
|
1426
|
-
border: 0,
|
|
1427
|
-
cursor: "pointer"
|
|
1428
|
-
},
|
|
1429
|
-
children: [/* @__PURE__ */ Y(Ze, {
|
|
1430
|
-
name: O,
|
|
1431
|
-
size: 22
|
|
1432
|
-
}), !ce && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("span", {
|
|
1433
|
-
style: {
|
|
1434
|
-
fontSize: 12,
|
|
1435
|
-
color: "var(--text-2)"
|
|
1436
|
-
},
|
|
1437
|
-
children: D
|
|
1438
|
-
}), /* @__PURE__ */ Y(I.down, {
|
|
1439
|
-
size: 11,
|
|
1440
|
-
style: { color: "var(--text-3)" }
|
|
1441
|
-
})] })]
|
|
1442
|
-
}), /* @__PURE__ */ X(st, {
|
|
1443
|
-
open: ie,
|
|
1444
|
-
anchor: ae.current,
|
|
1445
|
-
onClose: () => E(!1),
|
|
1446
|
-
width: 220,
|
|
1447
|
-
align: "end",
|
|
1448
|
-
children: [
|
|
1449
|
-
/* @__PURE__ */ X("div", {
|
|
1450
|
-
style: {
|
|
1451
|
-
padding: "10px 10px 8px",
|
|
1452
|
-
borderBottom: "1px solid var(--divider)"
|
|
1453
|
-
},
|
|
1454
|
-
children: [/* @__PURE__ */ X("div", {
|
|
1455
|
-
style: {
|
|
1456
|
-
display: "flex",
|
|
1457
|
-
gap: 8,
|
|
1458
|
-
alignItems: "center"
|
|
1459
|
-
},
|
|
1460
|
-
children: [/* @__PURE__ */ Y(Ze, {
|
|
1461
|
-
name: O,
|
|
1462
|
-
size: 28
|
|
1463
|
-
}), /* @__PURE__ */ X("div", {
|
|
1464
|
-
style: { minWidth: 0 },
|
|
1465
|
-
children: [/* @__PURE__ */ Y("div", {
|
|
1466
|
-
style: {
|
|
1467
|
-
fontSize: 12.5,
|
|
1468
|
-
fontWeight: 600,
|
|
1469
|
-
color: "var(--text)"
|
|
1470
|
-
},
|
|
1471
|
-
children: O
|
|
1472
|
-
}), /* @__PURE__ */ Y("div", {
|
|
1473
|
-
style: {
|
|
1474
|
-
fontSize: 11,
|
|
1475
|
-
color: "var(--text-3)",
|
|
1476
|
-
overflow: "hidden",
|
|
1477
|
-
textOverflow: "ellipsis",
|
|
1478
|
-
whiteSpace: "nowrap"
|
|
1479
|
-
},
|
|
1480
|
-
children: D
|
|
1481
|
-
})]
|
|
1482
|
-
})]
|
|
1483
|
-
}), x && /* @__PURE__ */ X("div", {
|
|
1484
|
-
style: {
|
|
1485
|
-
marginTop: 8,
|
|
1486
|
-
display: "flex",
|
|
1487
|
-
gap: 4,
|
|
1488
|
-
flexWrap: "wrap"
|
|
1489
|
-
},
|
|
1490
|
-
children: [/* @__PURE__ */ Y(Ke, {
|
|
1491
|
-
tone: "violet",
|
|
1492
|
-
size: "xs",
|
|
1493
|
-
dot: !0,
|
|
1494
|
-
children: x.role
|
|
1495
|
-
}), /* @__PURE__ */ X(Ke, {
|
|
1496
|
-
tone: "slate",
|
|
1497
|
-
size: "xs",
|
|
1498
|
-
children: [x.name, oe ? ` · ${oe}` : ""]
|
|
1499
|
-
})]
|
|
1500
|
-
})]
|
|
1501
|
-
}),
|
|
1502
|
-
ne && /* @__PURE__ */ Y(R, {
|
|
1503
|
-
icon: /* @__PURE__ */ Y(I.x, { size: 13 }),
|
|
1504
|
-
onClick: () => {
|
|
1505
|
-
E(!1), re();
|
|
1506
|
-
},
|
|
1507
|
-
"data-testid": "exit-impersonation-menu-item",
|
|
1508
|
-
children: v("shell.impersonation.exit", "Exit impersonation")
|
|
1509
|
-
}),
|
|
1510
|
-
/* @__PURE__ */ Y(R, {
|
|
1511
|
-
icon: /* @__PURE__ */ Y(I.users, { size: 13 }),
|
|
1512
|
-
onClick: () => {
|
|
1513
|
-
E(!1), f?.();
|
|
1514
|
-
},
|
|
1515
|
-
children: v("shell.user_menu.profile", "My profile")
|
|
1516
|
-
}),
|
|
1517
|
-
/* @__PURE__ */ Y(R, {
|
|
1518
|
-
icon: /* @__PURE__ */ Y(I.settings, { size: 13 }),
|
|
1519
|
-
onClick: () => {
|
|
1520
|
-
E(!1), m?.();
|
|
1521
|
-
},
|
|
1522
|
-
children: v("shell.user_menu.preferences", "Preferences")
|
|
1523
|
-
}),
|
|
1524
|
-
_ && /* @__PURE__ */ Y(R, {
|
|
1525
|
-
icon: /* @__PURE__ */ Y(I.moon, { size: 13 }),
|
|
1526
|
-
onClick: le,
|
|
1527
|
-
children: v("shell.user_menu.toggle_theme", "Toggle theme")
|
|
1528
|
-
}),
|
|
1529
|
-
/* @__PURE__ */ Y(R, { divider: !0 }),
|
|
1530
|
-
/* @__PURE__ */ Y(R, {
|
|
1531
|
-
icon: /* @__PURE__ */ Y(I.x, { size: 13 }),
|
|
1532
|
-
danger: !0,
|
|
1533
|
-
onClick: () => {
|
|
1534
|
-
E(!1), te();
|
|
1535
|
-
},
|
|
1536
|
-
children: v("shell.user_menu.sign_out", "Sign out")
|
|
1537
|
-
})
|
|
1538
|
-
]
|
|
1539
|
-
})]
|
|
1540
|
-
})
|
|
1541
|
-
]
|
|
1542
|
-
});
|
|
1543
|
-
}
|
|
1544
|
-
//#endregion
|
|
1545
|
-
//#region src/components/layout/TabStrip.tsx
|
|
1546
|
-
function la({ onNew: e, onCloseRequest: t } = {}) {
|
|
1547
|
-
let n = F(), r = Tn(), i = mi(), a = K(null), o = K(null), s = K(null), c = K(!1), [l, u] = q(!1), d = z((e) => e.tabs), f = z((e) => e.activeTabId), p = B((e) => e.tabsMaxOpen), m = z((e) => e.switchTab), h = z((e) => e.closeTab), g = d.findIndex((e) => e.id === f);
|
|
1548
|
-
W(() => {
|
|
1549
|
-
let e = g === d.length - 1 ? s.current : o.current;
|
|
1550
|
-
e && (e.scrollIntoView({
|
|
1551
|
-
block: "nearest",
|
|
1552
|
-
inline: "nearest",
|
|
1553
|
-
behavior: c.current ? "smooth" : "auto"
|
|
1554
|
-
}), c.current = !0);
|
|
1555
|
-
}, [
|
|
1556
|
-
f,
|
|
1557
|
-
g,
|
|
1558
|
-
d.length
|
|
1559
|
-
]);
|
|
1560
|
-
let _ = U((e, t) => {
|
|
1561
|
-
let n = d[e];
|
|
1562
|
-
n && (m(n.id), i({
|
|
1563
|
-
pathname: n.pathname,
|
|
1564
|
-
search: n.search || void 0
|
|
1565
|
-
}));
|
|
1566
|
-
}, [
|
|
1567
|
-
d,
|
|
1568
|
-
m,
|
|
1569
|
-
i
|
|
1570
|
-
]), v = U((e) => {
|
|
1571
|
-
let n = d[e];
|
|
1572
|
-
if (!n) return;
|
|
1573
|
-
if (t) {
|
|
1574
|
-
t("current", n.id);
|
|
1575
|
-
return;
|
|
1576
|
-
}
|
|
1577
|
-
let r = n.id === f;
|
|
1578
|
-
if (h(n.id), r) {
|
|
1579
|
-
let t = d.filter((e) => e.id !== n.id);
|
|
1580
|
-
if (t.length > 0) {
|
|
1581
|
-
let n = t[e < t.length ? e : t.length - 1];
|
|
1582
|
-
i({
|
|
1583
|
-
pathname: n.pathname,
|
|
1584
|
-
search: n.search || void 0
|
|
1585
|
-
});
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
}, [
|
|
1589
|
-
d,
|
|
1590
|
-
f,
|
|
1591
|
-
h,
|
|
1592
|
-
i,
|
|
1593
|
-
t
|
|
1594
|
-
]), b = U((e) => {
|
|
1595
|
-
u(!1), t ? t(e) : e === "current" && g >= 0 && v(g);
|
|
1596
|
-
}, [
|
|
1597
|
-
g,
|
|
1598
|
-
v,
|
|
1599
|
-
t
|
|
1600
|
-
]), x = U(() => {
|
|
1601
|
-
e ? e() : i("/");
|
|
1602
|
-
}, [e, i]);
|
|
1603
|
-
if (d.length === 0) return null;
|
|
1604
|
-
let S = g >= 0 && d.length > 1 && d[g]?.closable !== !1, C = mt(d, f, "others").length > 0, ee = mt(d, f, "right").length > 0, te = d.length >= p ? "danger" : d.length >= Math.ceil(p * .8) ? "warning" : "normal", ne = te === "danger" ? "var(--danger)" : te === "warning" ? "var(--warn)" : "var(--text-3)";
|
|
1605
|
-
return /* @__PURE__ */ X("div", {
|
|
1606
|
-
style: {
|
|
1607
|
-
display: "flex",
|
|
1608
|
-
alignItems: "stretch",
|
|
1609
|
-
height: 34,
|
|
1610
|
-
background: "var(--surface-2)",
|
|
1611
|
-
borderBottom: "1px solid var(--border)",
|
|
1612
|
-
overflow: "hidden",
|
|
1613
|
-
flexShrink: 0
|
|
1614
|
-
},
|
|
1615
|
-
children: [/* @__PURE__ */ X("div", {
|
|
1616
|
-
className: "scrollbar-none",
|
|
1617
|
-
style: {
|
|
1618
|
-
display: "flex",
|
|
1619
|
-
alignItems: "stretch",
|
|
1620
|
-
overflowX: "auto",
|
|
1621
|
-
flex: 1,
|
|
1622
|
-
gap: 0
|
|
1623
|
-
},
|
|
1624
|
-
children: [d.map((e, t) => {
|
|
1625
|
-
let i = t === g, a = d.length > 1 && e.closable !== !1;
|
|
1626
|
-
return /* @__PURE__ */ X("div", {
|
|
1627
|
-
"data-testid": "tabstrip-tab",
|
|
1628
|
-
ref: i ? o : void 0,
|
|
1629
|
-
onClick: (e) => _(t, { newTab: e.metaKey || e.ctrlKey }),
|
|
1630
|
-
onAuxClick: (e) => {
|
|
1631
|
-
e.button === 1 && (e.preventDefault(), v(t));
|
|
1632
|
-
},
|
|
1633
|
-
title: r(e),
|
|
1634
|
-
style: {
|
|
1635
|
-
display: "flex",
|
|
1636
|
-
alignItems: "center",
|
|
1637
|
-
gap: 6,
|
|
1638
|
-
height: "100%",
|
|
1639
|
-
...wn(11),
|
|
1640
|
-
background: i ? "var(--surface)" : "transparent",
|
|
1641
|
-
borderRight: "1px solid var(--border)",
|
|
1642
|
-
borderTop: i ? "2px solid var(--accent)" : "2px solid transparent",
|
|
1643
|
-
borderBottom: i ? "1px solid var(--surface)" : "1px solid transparent",
|
|
1644
|
-
marginBottom: i ? -1 : 0,
|
|
1645
|
-
cursor: "pointer",
|
|
1646
|
-
position: "relative",
|
|
1647
|
-
maxWidth: 220,
|
|
1648
|
-
minWidth: 120,
|
|
1649
|
-
color: i ? "var(--text)" : "var(--text-3)",
|
|
1650
|
-
fontSize: 12,
|
|
1651
|
-
fontWeight: i ? 500 : 400
|
|
1652
|
-
},
|
|
1653
|
-
children: [
|
|
1654
|
-
e.icon && /* @__PURE__ */ Y("span", {
|
|
1655
|
-
style: {
|
|
1656
|
-
color: i ? "var(--accent)" : "var(--text-4)",
|
|
1657
|
-
display: "flex"
|
|
1658
|
-
},
|
|
1659
|
-
children: /* @__PURE__ */ Y(on, {
|
|
1660
|
-
name: e.icon,
|
|
1661
|
-
size: 12
|
|
1662
|
-
})
|
|
1663
|
-
}),
|
|
1664
|
-
/* @__PURE__ */ Y("span", {
|
|
1665
|
-
style: {
|
|
1666
|
-
flex: 1,
|
|
1667
|
-
whiteSpace: "nowrap",
|
|
1668
|
-
overflow: "hidden",
|
|
1669
|
-
textOverflow: "ellipsis"
|
|
1670
|
-
},
|
|
1671
|
-
children: r(e)
|
|
1672
|
-
}),
|
|
1673
|
-
e.dirty && /* @__PURE__ */ Y("span", {
|
|
1674
|
-
style: {
|
|
1675
|
-
width: 6,
|
|
1676
|
-
height: 6,
|
|
1677
|
-
borderRadius: 999,
|
|
1678
|
-
background: "var(--warn)",
|
|
1679
|
-
flexShrink: 0
|
|
1680
|
-
},
|
|
1681
|
-
title: n("shell.tabs.unsaved", "Unsaved changes")
|
|
1682
|
-
}),
|
|
1683
|
-
a && /* @__PURE__ */ Y("button", {
|
|
1684
|
-
onClick: (e) => {
|
|
1685
|
-
e.stopPropagation(), v(t);
|
|
1686
|
-
},
|
|
1687
|
-
"aria-label": n("shell.tabs.close_named", "Close {title}", { title: r(e) }),
|
|
1688
|
-
title: n("shell.tabs.close_tab", "Close tab"),
|
|
1689
|
-
style: {
|
|
1690
|
-
display: "flex",
|
|
1691
|
-
background: "transparent",
|
|
1692
|
-
border: 0,
|
|
1693
|
-
padding: 2,
|
|
1694
|
-
borderRadius: 3,
|
|
1695
|
-
cursor: "pointer",
|
|
1696
|
-
color: "var(--text-4)",
|
|
1697
|
-
opacity: i ? 1 : .5
|
|
1698
|
-
},
|
|
1699
|
-
onMouseEnter: (e) => {
|
|
1700
|
-
e.currentTarget.style.background = "var(--surface-3)", e.currentTarget.style.color = "var(--text)";
|
|
1701
|
-
},
|
|
1702
|
-
onMouseLeave: (e) => {
|
|
1703
|
-
e.currentTarget.style.background = "transparent", e.currentTarget.style.color = "var(--text-4)";
|
|
1704
|
-
},
|
|
1705
|
-
children: /* @__PURE__ */ Y(I.x, { size: 11 })
|
|
1706
|
-
})
|
|
1707
|
-
]
|
|
1708
|
-
}, e.id);
|
|
1709
|
-
}), /* @__PURE__ */ Y("button", {
|
|
1710
|
-
ref: s,
|
|
1711
|
-
onClick: x,
|
|
1712
|
-
title: n("shell.tabs.new", "New tab (⌘T)"),
|
|
1713
|
-
style: {
|
|
1714
|
-
width: 32,
|
|
1715
|
-
background: "transparent",
|
|
1716
|
-
border: 0,
|
|
1717
|
-
borderRight: "1px solid var(--border)",
|
|
1718
|
-
cursor: "pointer",
|
|
1719
|
-
color: "var(--text-3)",
|
|
1720
|
-
display: "flex",
|
|
1721
|
-
alignItems: "center",
|
|
1722
|
-
justifyContent: "center"
|
|
1723
|
-
},
|
|
1724
|
-
children: /* @__PURE__ */ Y(I.plus, { size: 13 })
|
|
1725
|
-
})]
|
|
1726
|
-
}), /* @__PURE__ */ X("div", {
|
|
1727
|
-
className: "tabstrip-utility",
|
|
1728
|
-
style: {
|
|
1729
|
-
...wn(10),
|
|
1730
|
-
fontSize: 11,
|
|
1731
|
-
color: "var(--text-4)",
|
|
1732
|
-
display: "flex",
|
|
1733
|
-
alignItems: "center",
|
|
1734
|
-
gap: 8,
|
|
1735
|
-
borderLeft: "1px solid var(--border)",
|
|
1736
|
-
flexShrink: 0
|
|
1737
|
-
},
|
|
1738
|
-
children: [
|
|
1739
|
-
/* @__PURE__ */ X("span", {
|
|
1740
|
-
"data-testid": "tabstrip-tab-count",
|
|
1741
|
-
style: {
|
|
1742
|
-
display: "flex",
|
|
1743
|
-
alignItems: "center",
|
|
1744
|
-
gap: 3,
|
|
1745
|
-
color: ne,
|
|
1746
|
-
fontWeight: te === "normal" ? 400 : 600
|
|
1747
|
-
},
|
|
1748
|
-
children: [/* @__PURE__ */ X("span", {
|
|
1749
|
-
className: "mono num",
|
|
1750
|
-
children: [
|
|
1751
|
-
d.length,
|
|
1752
|
-
"/",
|
|
1753
|
-
p
|
|
1754
|
-
]
|
|
1755
|
-
}), /* @__PURE__ */ Y("span", {
|
|
1756
|
-
className: "tabstrip-tabs-label",
|
|
1757
|
-
style: { color: "var(--text-3)" },
|
|
1758
|
-
children: y(n, "shell.tabs.count_label", p, {
|
|
1759
|
-
one: "tab",
|
|
1760
|
-
other: "tabs"
|
|
1761
|
-
})
|
|
1762
|
-
})]
|
|
1763
|
-
}),
|
|
1764
|
-
/* @__PURE__ */ Y("span", {
|
|
1765
|
-
className: "tabstrip-utility-divider",
|
|
1766
|
-
style: {
|
|
1767
|
-
width: 1,
|
|
1768
|
-
height: 14,
|
|
1769
|
-
background: "var(--border)"
|
|
1770
|
-
}
|
|
1771
|
-
}),
|
|
1772
|
-
/* @__PURE__ */ Y("button", {
|
|
1773
|
-
ref: a,
|
|
1774
|
-
onClick: () => u(!0),
|
|
1775
|
-
title: n("shell.tabs.actions", "Tab actions"),
|
|
1776
|
-
"aria-label": n("shell.tabs.actions", "Tab actions"),
|
|
1777
|
-
"data-testid": "tabstrip-actions-button",
|
|
1778
|
-
style: {
|
|
1779
|
-
width: 24,
|
|
1780
|
-
height: 24,
|
|
1781
|
-
border: 0,
|
|
1782
|
-
background: "transparent",
|
|
1783
|
-
borderRadius: 4,
|
|
1784
|
-
cursor: "pointer",
|
|
1785
|
-
color: "var(--text-3)",
|
|
1786
|
-
display: "flex",
|
|
1787
|
-
alignItems: "center",
|
|
1788
|
-
justifyContent: "center"
|
|
1789
|
-
},
|
|
1790
|
-
onMouseEnter: (e) => {
|
|
1791
|
-
e.currentTarget.style.background = "var(--surface-3)";
|
|
1792
|
-
},
|
|
1793
|
-
onMouseLeave: (e) => {
|
|
1794
|
-
e.currentTarget.style.background = "transparent";
|
|
1795
|
-
},
|
|
1796
|
-
children: /* @__PURE__ */ Y(I.more, { size: 13 })
|
|
1797
|
-
}),
|
|
1798
|
-
/* @__PURE__ */ Y(ua, {
|
|
1799
|
-
open: l,
|
|
1800
|
-
anchor: a.current,
|
|
1801
|
-
onClose: () => u(!1),
|
|
1802
|
-
canCloseCurrent: S,
|
|
1803
|
-
canCloseOthers: C,
|
|
1804
|
-
canCloseRight: ee,
|
|
1805
|
-
onAction: b
|
|
1806
|
-
})
|
|
1807
|
-
]
|
|
1808
|
-
})]
|
|
1809
|
-
});
|
|
1810
|
-
}
|
|
1811
|
-
function ua({ open: e, anchor: t, onClose: n, canCloseCurrent: r, canCloseOthers: i, canCloseRight: a, onAction: o }) {
|
|
1812
|
-
let s = F();
|
|
1813
|
-
return /* @__PURE__ */ X(st, {
|
|
1814
|
-
open: e,
|
|
1815
|
-
onClose: n,
|
|
1816
|
-
anchor: t,
|
|
1817
|
-
align: "end",
|
|
1818
|
-
width: 230,
|
|
1819
|
-
children: [
|
|
1820
|
-
/* @__PURE__ */ Y(R, {
|
|
1821
|
-
icon: /* @__PURE__ */ Y(I.x, { size: 13 }),
|
|
1822
|
-
disabled: !r,
|
|
1823
|
-
title: r ? void 0 : s("shell.tabs.none_closable", "No current tab can be closed"),
|
|
1824
|
-
onClick: () => o("current"),
|
|
1825
|
-
children: s("shell.tabs.close_current", "Close current tab")
|
|
1826
|
-
}),
|
|
1827
|
-
/* @__PURE__ */ Y(R, {
|
|
1828
|
-
icon: /* @__PURE__ */ Y(I.x, { size: 13 }),
|
|
1829
|
-
disabled: !i,
|
|
1830
|
-
title: i ? void 0 : s("shell.tabs.no_others", "No other tabs"),
|
|
1831
|
-
onClick: () => o("others"),
|
|
1832
|
-
children: s("shell.tabs.close_others", "Close others")
|
|
1833
|
-
}),
|
|
1834
|
-
/* @__PURE__ */ Y(R, {
|
|
1835
|
-
icon: /* @__PURE__ */ Y(I.x, { size: 13 }),
|
|
1836
|
-
disabled: !a,
|
|
1837
|
-
title: a ? void 0 : s("shell.tabs.none_right", "No tabs to the right"),
|
|
1838
|
-
onClick: () => o("right"),
|
|
1839
|
-
children: s("shell.tabs.close_right", "Close tabs to the right")
|
|
1840
|
-
}),
|
|
1841
|
-
/* @__PURE__ */ Y(R, { divider: !0 }),
|
|
1842
|
-
/* @__PURE__ */ Y(R, {
|
|
1843
|
-
icon: /* @__PURE__ */ Y(I.trash, { size: 13 }),
|
|
1844
|
-
danger: !0,
|
|
1845
|
-
onClick: () => o("all"),
|
|
1846
|
-
children: s("shell.tabs.close_all", "Close all tabs")
|
|
1847
|
-
})
|
|
1848
|
-
]
|
|
1849
|
-
});
|
|
1850
|
-
}
|
|
1851
|
-
//#endregion
|
|
1852
|
-
//#region src/components/layout/DirtyTabsCloseDialog.tsx
|
|
1853
|
-
var da = H(() => import("./DirtyTabsCloseDialog.impl-FhAiOmEb.js").then((e) => ({ default: e.DirtyTabsCloseDialog })));
|
|
1854
|
-
function fa(e) {
|
|
1855
|
-
return /* @__PURE__ */ Y(V, {
|
|
1856
|
-
fallback: null,
|
|
1857
|
-
children: /* @__PURE__ */ Y(da, { ...e })
|
|
1858
|
-
});
|
|
1859
|
-
}
|
|
1860
|
-
//#endregion
|
|
1861
|
-
//#region src/components/layout/ImpersonationBanner.tsx
|
|
1862
|
-
var pa = H(() => import("./ImpersonationBanner.impl--g0iYwcV.js").then((e) => ({ default: e.ImpersonationBanner })));
|
|
1863
|
-
function ma() {
|
|
1864
|
-
return /* @__PURE__ */ Y(V, {
|
|
1865
|
-
fallback: null,
|
|
1866
|
-
children: /* @__PURE__ */ Y(pa, {})
|
|
1867
|
-
});
|
|
1868
|
-
}
|
|
1869
|
-
//#endregion
|
|
1870
|
-
//#region src/components/layout/ImpersonationFrame.tsx
|
|
1871
|
-
function ha() {
|
|
1872
|
-
let { info: e } = Cn(), { value: t } = pn(e ? "impersonation.allow_destructive" : "", !1);
|
|
1873
|
-
return W(() => {
|
|
1874
|
-
if (!e) document.body.removeAttribute("data-impersonation-destructive");
|
|
1875
|
-
else return t ? document.body.setAttribute("data-impersonation-destructive", "true") : document.body.removeAttribute("data-impersonation-destructive"), () => {
|
|
1876
|
-
document.body.removeAttribute("data-impersonation-destructive");
|
|
1877
|
-
};
|
|
1878
|
-
}, [e, t]), e ? /* @__PURE__ */ Y("div", {
|
|
1879
|
-
"data-testid": "impersonation-frame",
|
|
1880
|
-
"aria-hidden": "true",
|
|
1881
|
-
style: {
|
|
1882
|
-
position: "fixed",
|
|
1883
|
-
top: 0,
|
|
1884
|
-
left: 0,
|
|
1885
|
-
right: 0,
|
|
1886
|
-
bottom: 0,
|
|
1887
|
-
border: "4px solid var(--impersonation-accent)",
|
|
1888
|
-
pointerEvents: "none",
|
|
1889
|
-
zIndex: 9999
|
|
1890
|
-
}
|
|
1891
|
-
}) : null;
|
|
1892
|
-
}
|
|
1893
|
-
//#endregion
|
|
1894
|
-
//#region src/components/layout/tab-close.ts
|
|
1895
|
-
function ga(e, t, n, r) {
|
|
1896
|
-
if (n === "current" && e.length <= 1) return null;
|
|
1897
|
-
let i = mt(e, t, n, r);
|
|
1898
|
-
if (i.length === 0) return null;
|
|
1899
|
-
let a = new Set(i), o = e.filter((e) => a.has(e.id) && e.dirty), s = new Set(o.map((e) => e.id));
|
|
1900
|
-
return {
|
|
1901
|
-
ids: i,
|
|
1902
|
-
dirtyTabs: o,
|
|
1903
|
-
cleanIds: i.filter((e) => !s.has(e))
|
|
1904
|
-
};
|
|
1905
|
-
}
|
|
1906
|
-
function _a(e) {
|
|
1907
|
-
return e ? {
|
|
1908
|
-
pathname: e.pathname,
|
|
1909
|
-
search: e.search || void 0
|
|
1910
|
-
} : {
|
|
1911
|
-
pathname: "/",
|
|
1912
|
-
replace: !0
|
|
1913
|
-
};
|
|
1914
|
-
}
|
|
1915
|
-
//#endregion
|
|
1916
|
-
//#region src/components/layout/CommandPalette.tsx
|
|
1917
|
-
var va = H(() => import("./CommandPalette.impl-DRI5kxVY.js").then((e) => ({ default: e.CommandPalette })));
|
|
1918
|
-
function ya(e) {
|
|
1919
|
-
return /* @__PURE__ */ Y(V, {
|
|
1920
|
-
fallback: null,
|
|
1921
|
-
children: /* @__PURE__ */ Y(va, { ...e })
|
|
1922
|
-
});
|
|
1923
|
-
}
|
|
1924
|
-
//#endregion
|
|
1925
|
-
//#region src/components/agents/AgentChatPanel.tsx
|
|
1926
|
-
var ba = H(() => import("./AgentChatPanel.impl-D5y_qEex.js").then((e) => ({ default: e.AgentChatPanel })));
|
|
1927
|
-
function xa(e) {
|
|
1928
|
-
return e.open ? /* @__PURE__ */ Y(V, {
|
|
1929
|
-
fallback: null,
|
|
1930
|
-
children: /* @__PURE__ */ Y(ba, { ...e })
|
|
1931
|
-
}) : null;
|
|
1932
|
-
}
|
|
1933
|
-
//#endregion
|
|
1934
|
-
//#region src/components/agents/AgentOpenFollower.tsx
|
|
1935
|
-
var Sa = H(() => import("./AgentOpenFollower.impl-BAs_wGEZ.js").then((e) => ({ default: e.AgentOpenFollower })));
|
|
1936
|
-
function Ca() {
|
|
1937
|
-
return /* @__PURE__ */ Y(V, {
|
|
1938
|
-
fallback: null,
|
|
1939
|
-
children: /* @__PURE__ */ Y(Sa, {})
|
|
1940
|
-
});
|
|
1941
|
-
}
|
|
1942
|
-
//#endregion
|
|
1943
|
-
//#region src/components/layout/Layout.tsx
|
|
1944
|
-
var $ = "default";
|
|
1945
|
-
function wa() {
|
|
1946
|
-
let e = F();
|
|
1947
|
-
Ui(), Zn();
|
|
1948
|
-
let { isAuthenticated: t, isLoading: n, user: r, activeTenant: i } = p(), a = O(), o = mi(), s = yn(), c = U((e) => s(e, { topLevel: !0 }), [s]), d = Q(), { data: f } = l(), m = He(), h = B((e) => e.sidebar), g = B((e) => e.tabsPosition), _ = B((e) => e.aiSurface), v = B((e) => e.colorScheme), y = B((e) => e.set), b = B((e) => e.hydrateFromBranding), { branding: x } = ln(), S = Kt(), C = z((e) => e.tabs), ee = z((e) => e.activeTabId), te = z((e) => e.closeTabs), ne = z((e) => e.switchTab), re = z((e) => e.setScope), w = z((e) => e.hydrate), [T, ie] = q($), [E, ae] = q(!1), [oe, se] = q("default"), [D, k] = q(!1), [ce, le] = q(), [ue, de] = q(!1), [fe, pe] = q(!1), me = K(null), he = K(null), [A, ge] = q(null), _e = _ !== "off" && S.isVisible("show_command_palette"), j = _ === "panel" || _ === "both", ve = _ === "command" || _ === "both", ye = cn(), be = ye?.ai_name?.trim() ?? "", M = m.category === "phone" || m.category === "tablet", xe = S.isVisible("show_topbar"), Se = !M && S.isVisible("show_rail"), Ce = !M && S.isVisible("show_sidebar"), we = !M && S.isVisible("show_tabs"), Te = M && S.isVisible("show_sidebar"), Ee = M && S.isVisible("show_tabs"), De = Ta(!M && j && D), Oe = S.isVisible("show_tenant_switcher"), ke = S.isVisible("show_breadcrumbs"), Ae = S.isVisible("show_theme_toggle"), N = U((e = "default") => {
|
|
1949
|
-
_e && (se(e), ae(!0));
|
|
1950
|
-
}, [_e]), je = U((e) => {
|
|
1951
|
-
if (e.length === 0) return;
|
|
1952
|
-
let t = z.getState(), n = !t.activeTabId || e.includes(t.activeTabId), r = te(e);
|
|
1953
|
-
if (!n) return;
|
|
1954
|
-
let i = _a(r);
|
|
1955
|
-
o({
|
|
1956
|
-
pathname: i.pathname,
|
|
1957
|
-
search: i.search
|
|
1958
|
-
}, { replace: i.replace });
|
|
1959
|
-
}, [te, o]), P = U((e, t) => {
|
|
1960
|
-
let n = z.getState(), r = ga(n.tabs, n.activeTabId, e, t);
|
|
1961
|
-
r && (r.dirtyTabs.length > 0 ? ge(r) : je(r.ids));
|
|
1962
|
-
}, [je]), Me = U(() => {
|
|
1963
|
-
ge(null);
|
|
1964
|
-
}, []), Ne = U(() => {
|
|
1965
|
-
A && (ge(null), je(A.cleanIds));
|
|
1966
|
-
}, [A, je]), Pe = U(() => {
|
|
1967
|
-
A && (ge(null), je(A.ids));
|
|
1968
|
-
}, [A, je]);
|
|
1969
|
-
jn();
|
|
1970
|
-
let Fe = $n(), { isImpersonating: Ie } = Cn();
|
|
1971
|
-
W(() => {
|
|
1972
|
-
a.enabled || !n && !t && o(u(`${d.pathname}${d.search}${d.hash}`), { replace: !0 });
|
|
1973
|
-
}, [
|
|
1974
|
-
a.enabled,
|
|
1975
|
-
n,
|
|
1976
|
-
t,
|
|
1977
|
-
o,
|
|
1978
|
-
d.hash,
|
|
1979
|
-
d.pathname,
|
|
1980
|
-
d.search
|
|
1981
|
-
]), W(() => {
|
|
1982
|
-
let e = r?.id || null, t = i?.id || null;
|
|
1983
|
-
re(t, e), Qn.getState().setScope(t, e), e && t && (w(), Qn.getState().hydrate(), Hn());
|
|
1984
|
-
}, [
|
|
1985
|
-
r?.id,
|
|
1986
|
-
i?.id,
|
|
1987
|
-
re,
|
|
1988
|
-
w
|
|
1989
|
-
]), W(() => {
|
|
1990
|
-
b(x?.preferences);
|
|
1991
|
-
}, [x, b]), W(() => {
|
|
1992
|
-
if (!f) return;
|
|
1993
|
-
let e = Pa(f.navigation, f.screens, d.pathname);
|
|
1994
|
-
if (e) {
|
|
1995
|
-
ie(e);
|
|
1996
|
-
return;
|
|
1997
|
-
}
|
|
1998
|
-
let t = T;
|
|
1999
|
-
if ((f.navigation ?? []).some((e) => (e.area || $) === t)) return;
|
|
2000
|
-
let n = (f.navigation ?? [])[0]?.area || $;
|
|
2001
|
-
n !== t && ie(n);
|
|
2002
|
-
}, [
|
|
2003
|
-
f,
|
|
2004
|
-
d.pathname,
|
|
2005
|
-
T
|
|
2006
|
-
]), W(() => {
|
|
2007
|
-
de(!1), pe(!1);
|
|
2008
|
-
}, [d.pathname, d.search]), W(() => {
|
|
2009
|
-
let e = (e) => {
|
|
2010
|
-
let t = document.activeElement, n = !!t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable), r = e.metaKey || e.ctrlKey;
|
|
2011
|
-
r && e.key.toLowerCase() === "k" ? (e.preventDefault(), N("default")) : r && e.key.toLowerCase() === "t" ? (e.preventDefault(), N("new")) : r && e.key.toLowerCase() === "b" ? (e.preventDefault(), y("sidebar", h === "collapsed" ? "wide" : "collapsed")) : r && e.key.toLowerCase() === "w" ? (e.preventDefault(), P("current")) : r && e.key === "/" ? (e.preventDefault(), j && k((e) => !e)) : e.key === "/" && !n ? (e.preventDefault(), N("default")) : e.key === "Escape" && ae(!1);
|
|
2012
|
-
};
|
|
2013
|
-
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
2014
|
-
}, [
|
|
2015
|
-
N,
|
|
2016
|
-
P,
|
|
2017
|
-
y,
|
|
2018
|
-
h,
|
|
2019
|
-
j
|
|
2020
|
-
]);
|
|
2021
|
-
let Le = G(() => f ? Fa(e, f.navigation, f.screens, d.pathname, C, c) : [], [
|
|
2022
|
-
e,
|
|
2023
|
-
f,
|
|
2024
|
-
d.pathname,
|
|
2025
|
-
C,
|
|
2026
|
-
c
|
|
2027
|
-
]);
|
|
2028
|
-
if (n) return /* @__PURE__ */ Y("div", {
|
|
2029
|
-
style: {
|
|
2030
|
-
display: "flex",
|
|
2031
|
-
height: "var(--app-height)",
|
|
2032
|
-
alignItems: "center",
|
|
2033
|
-
justifyContent: "center",
|
|
2034
|
-
background: "var(--background)",
|
|
2035
|
-
color: "var(--text-3)"
|
|
2036
|
-
},
|
|
2037
|
-
children: e("shell.loading", "Loading…")
|
|
2038
|
-
});
|
|
2039
|
-
if (!t) return null;
|
|
2040
|
-
let Re = (e) => {
|
|
2041
|
-
ie(e);
|
|
2042
|
-
let t = Na(e, f);
|
|
2043
|
-
t && c(t);
|
|
2044
|
-
}, ze = (e) => {
|
|
2045
|
-
switch (e.type) {
|
|
2046
|
-
case "nav":
|
|
2047
|
-
e.route && c(e.route);
|
|
2048
|
-
break;
|
|
2049
|
-
case "new":
|
|
2050
|
-
e.route && c(e.route + "/new");
|
|
2051
|
-
break;
|
|
2052
|
-
case "open":
|
|
2053
|
-
e.route && c(e.route);
|
|
2054
|
-
break;
|
|
2055
|
-
case "ai":
|
|
2056
|
-
j && (le(e.q), k(!0));
|
|
2057
|
-
break;
|
|
2058
|
-
case "ai-panel":
|
|
2059
|
-
j && (le(void 0), k(!0));
|
|
2060
|
-
break;
|
|
2061
|
-
case "theme":
|
|
2062
|
-
y("colorScheme", v === "dark" ? "light" : "dark");
|
|
2063
|
-
break;
|
|
2064
|
-
case "tab-close": e.tabCloseScope && P(e.tabCloseScope);
|
|
2065
|
-
}
|
|
2066
|
-
};
|
|
2067
|
-
return a.enabled ? /* @__PURE__ */ X(In, { children: [
|
|
2068
|
-
/* @__PURE__ */ Y(Wi, {}),
|
|
2069
|
-
/* @__PURE__ */ Y(Li, {}),
|
|
2070
|
-
/* @__PURE__ */ Y(Gi, {}),
|
|
2071
|
-
/* @__PURE__ */ Y(Ii, {}),
|
|
2072
|
-
/* @__PURE__ */ Y(Fi, {}),
|
|
2073
|
-
/* @__PURE__ */ Y("div", {
|
|
2074
|
-
id: "app-embed",
|
|
2075
|
-
className: "flex min-h-0 flex-col overflow-auto",
|
|
2076
|
-
style: { height: "var(--app-height)" },
|
|
2077
|
-
children: /* @__PURE__ */ Y(ui, {})
|
|
2078
|
-
})
|
|
2079
|
-
] }) : /* @__PURE__ */ Y(In, { children: /* @__PURE__ */ X("div", {
|
|
2080
|
-
id: "app",
|
|
2081
|
-
"data-sidebar": h,
|
|
2082
|
-
"data-mobile-shell": M ? "true" : void 0,
|
|
2083
|
-
style: Ea({
|
|
2084
|
-
mobileShell: M,
|
|
2085
|
-
showBanner: Ie,
|
|
2086
|
-
showTopbar: xe,
|
|
2087
|
-
showRail: Se,
|
|
2088
|
-
showSidebar: Ce,
|
|
2089
|
-
sidebarMode: h,
|
|
2090
|
-
showAssistant: De
|
|
2091
|
-
}),
|
|
2092
|
-
children: [
|
|
2093
|
-
Ie && /* @__PURE__ */ Y(ma, {}),
|
|
2094
|
-
/* @__PURE__ */ Y(ha, {}),
|
|
2095
|
-
xe && /* @__PURE__ */ Y(ca, {
|
|
2096
|
-
breadcrumbs: Le,
|
|
2097
|
-
onCrumbClick: (e) => e.onClick && e.onClick(),
|
|
2098
|
-
showNavButton: Te,
|
|
2099
|
-
navButtonRef: me,
|
|
2100
|
-
onOpenNav: () => de(!0),
|
|
2101
|
-
showTabsButton: Ee,
|
|
2102
|
-
tabsButtonRef: he,
|
|
2103
|
-
onOpenTabs: () => pe(!0),
|
|
2104
|
-
mobileTabCount: C.length,
|
|
2105
|
-
onCmdK: () => N("default"),
|
|
2106
|
-
onToggleAI: () => j && k((e) => !e),
|
|
2107
|
-
aiOpen: D,
|
|
2108
|
-
onOpenProfile: () => c("/profile"),
|
|
2109
|
-
onOpenPrefs: () => c("/preferences"),
|
|
2110
|
-
showTenantSwitcher: Oe,
|
|
2111
|
-
showBreadcrumbs: ke,
|
|
2112
|
-
showThemeToggle: Ae
|
|
2113
|
-
}),
|
|
2114
|
-
Se && /* @__PURE__ */ Y(Ti, {
|
|
2115
|
-
activeArea: T,
|
|
2116
|
-
onPick: Re,
|
|
2117
|
-
onToggleAI: () => j && k((e) => !e),
|
|
2118
|
-
aiOpen: D,
|
|
2119
|
-
onCmdK: () => N("default"),
|
|
2120
|
-
areas: f?.areas,
|
|
2121
|
-
branding: ye
|
|
2122
|
-
}),
|
|
2123
|
-
Ce && /* @__PURE__ */ Y(Ki, { activeArea: T }),
|
|
2124
|
-
/* @__PURE__ */ X("main", {
|
|
2125
|
-
style: {
|
|
2126
|
-
gridArea: "main",
|
|
2127
|
-
overflow: "hidden",
|
|
2128
|
-
display: "flex",
|
|
2129
|
-
flexDirection: "column",
|
|
2130
|
-
minWidth: 0
|
|
2131
|
-
},
|
|
2132
|
-
children: [
|
|
2133
|
-
we && g === "top" && /* @__PURE__ */ Y(la, {
|
|
2134
|
-
onNew: () => N("new"),
|
|
2135
|
-
onCloseRequest: P
|
|
2136
|
-
}),
|
|
2137
|
-
/* @__PURE__ */ Y("div", {
|
|
2138
|
-
style: {
|
|
2139
|
-
flex: 1,
|
|
2140
|
-
overflow: "auto",
|
|
2141
|
-
minHeight: 0,
|
|
2142
|
-
display: "flex",
|
|
2143
|
-
flexDirection: "column"
|
|
2144
|
-
},
|
|
2145
|
-
children: /* @__PURE__ */ Y(ui, {})
|
|
2146
|
-
}),
|
|
2147
|
-
we && g === "bottom" && /* @__PURE__ */ Y(la, {
|
|
2148
|
-
onNew: () => N("new"),
|
|
2149
|
-
onCloseRequest: P
|
|
2150
|
-
})
|
|
2151
|
-
]
|
|
2152
|
-
}),
|
|
2153
|
-
_e && /* @__PURE__ */ Y(ya, {
|
|
2154
|
-
open: E,
|
|
2155
|
-
mode: oe,
|
|
2156
|
-
onClose: () => ae(!1),
|
|
2157
|
-
onAction: (e) => ze(e),
|
|
2158
|
-
navigation: f?.navigation,
|
|
2159
|
-
screens: f?.screens,
|
|
2160
|
-
includeAI: ve,
|
|
2161
|
-
aiName: be
|
|
2162
|
-
}),
|
|
2163
|
-
/* @__PURE__ */ Y(Ca, {}),
|
|
2164
|
-
j && D && /* @__PURE__ */ Y(xa, {
|
|
2165
|
-
open: D,
|
|
2166
|
-
docked: De,
|
|
2167
|
-
onClose: () => {
|
|
2168
|
-
k(!1), le(void 0);
|
|
2169
|
-
},
|
|
2170
|
-
title: be,
|
|
2171
|
-
askOnOpen: ce,
|
|
2172
|
-
context: Fe ?? void 0
|
|
2173
|
-
}),
|
|
2174
|
-
Te && /* @__PURE__ */ Y(ja, {
|
|
2175
|
-
open: ue,
|
|
2176
|
-
activeArea: T,
|
|
2177
|
-
schema: f,
|
|
2178
|
-
returnFocusRef: me,
|
|
2179
|
-
onClose: () => de(!1),
|
|
2180
|
-
onNavigate: c
|
|
2181
|
-
}),
|
|
2182
|
-
Ee && /* @__PURE__ */ Y(Ma, {
|
|
2183
|
-
open: fe,
|
|
2184
|
-
tabs: C,
|
|
2185
|
-
activeTabId: ee,
|
|
2186
|
-
returnFocusRef: he,
|
|
2187
|
-
onClose: () => pe(!1),
|
|
2188
|
-
onSwitch: (e) => {
|
|
2189
|
-
ne(e.id), o({
|
|
2190
|
-
pathname: e.pathname,
|
|
2191
|
-
search: e.search
|
|
2192
|
-
}, { replace: !1 }), pe(!1);
|
|
2193
|
-
},
|
|
2194
|
-
onCloseTab: (e) => P("current", e)
|
|
2195
|
-
}),
|
|
2196
|
-
/* @__PURE__ */ Y(fa, {
|
|
2197
|
-
pending: A,
|
|
2198
|
-
onCancel: Me,
|
|
2199
|
-
onCloseClean: Ne,
|
|
2200
|
-
onDiscardAll: Pe
|
|
2201
|
-
})
|
|
2202
|
-
]
|
|
2203
|
-
}) });
|
|
2204
|
-
}
|
|
2205
|
-
function Ta(e) {
|
|
2206
|
-
return W(() => {
|
|
2207
|
-
let t = document.documentElement.style;
|
|
2208
|
-
return t.setProperty("--assistant-open-w", e ? "var(--assistant-w)" : "0px"), () => {
|
|
2209
|
-
t.removeProperty("--assistant-open-w");
|
|
2210
|
-
};
|
|
2211
|
-
}, [e]), e;
|
|
2212
|
-
}
|
|
2213
|
-
function Ea({ mobileShell: e, showBanner: t, showTopbar: n, showRail: r, showSidebar: i, sidebarMode: a, showAssistant: o }) {
|
|
2214
|
-
let s = [
|
|
2215
|
-
...t ? ["auto"] : [],
|
|
2216
|
-
...n ? ["var(--topbar-h)"] : [],
|
|
2217
|
-
"minmax(0, 1fr)"
|
|
2218
|
-
].join(" "), c = (e) => {
|
|
2219
|
-
let r = (t) => `"${e.map(() => t).join(" ")}"`;
|
|
2220
|
-
return [
|
|
2221
|
-
...t ? [r("banner")] : [],
|
|
2222
|
-
...n ? [r("topbar")] : [],
|
|
2223
|
-
`"${e.join(" ")}"`
|
|
2224
|
-
].join(" ");
|
|
2225
|
-
};
|
|
2226
|
-
if (e) return {
|
|
2227
|
-
height: "var(--app-height)",
|
|
2228
|
-
display: "grid",
|
|
2229
|
-
gridTemplateRows: s,
|
|
2230
|
-
gridTemplateColumns: "minmax(0, 1fr)",
|
|
2231
|
-
gridTemplateAreas: c(["main"]),
|
|
2232
|
-
overflow: "hidden"
|
|
2233
|
-
};
|
|
2234
|
-
let l = [], u = [];
|
|
2235
|
-
return r && (l.push("var(--rail-w)"), u.push("rail")), i && (l.push(a === "collapsed" || a === "icon-only" ? "56px" : "var(--sidebar-w)"), u.push("sidebar")), l.push("minmax(0, 1fr)"), u.push("main"), o && (l.push("var(--assistant-w)"), u.push("assistant")), {
|
|
2236
|
-
height: "var(--app-height)",
|
|
2237
|
-
display: "grid",
|
|
2238
|
-
gridTemplateRows: s,
|
|
2239
|
-
gridTemplateColumns: l.join(" "),
|
|
2240
|
-
gridTemplateAreas: c(u),
|
|
2241
|
-
overflow: "hidden"
|
|
2242
|
-
};
|
|
2243
|
-
}
|
|
2244
|
-
var Da = [
|
|
2245
|
-
"a[href]",
|
|
2246
|
-
"button:not([disabled])",
|
|
2247
|
-
"input:not([disabled])",
|
|
2248
|
-
"select:not([disabled])",
|
|
2249
|
-
"textarea:not([disabled])",
|
|
2250
|
-
"[tabindex]:not([tabindex='-1'])"
|
|
2251
|
-
].join(",");
|
|
2252
|
-
function Oa(e) {
|
|
2253
|
-
return e ? Array.from(e.querySelectorAll(Da)).filter((e) => !e.hasAttribute("disabled") && e.getAttribute("aria-hidden") !== "true") : [];
|
|
2254
|
-
}
|
|
2255
|
-
function ka(e) {
|
|
2256
|
-
Oa(e)[0]?.focus();
|
|
2257
|
-
}
|
|
2258
|
-
function Aa(e, t) {
|
|
2259
|
-
let n = Oa(e);
|
|
2260
|
-
if (n.length === 0) {
|
|
2261
|
-
t.preventDefault();
|
|
2262
|
-
return;
|
|
2263
|
-
}
|
|
2264
|
-
let r = n[0], i = n[n.length - 1], a = document.activeElement;
|
|
2265
|
-
t.shiftKey && a === r ? (t.preventDefault(), i.focus()) : !t.shiftKey && a === i && (t.preventDefault(), r.focus());
|
|
2266
|
-
}
|
|
2267
|
-
function ja({ open: e, activeArea: t, schema: n, returnFocusRef: r, onClose: i, onNavigate: a }) {
|
|
2268
|
-
let o = F(), [s, c] = q(t), l = K(null);
|
|
2269
|
-
if (W(() => {
|
|
2270
|
-
e && c(t);
|
|
2271
|
-
}, [e, t]), W(() => {
|
|
2272
|
-
if (!e) return;
|
|
2273
|
-
let t = document.activeElement instanceof HTMLElement ? document.activeElement : null, n = r.current;
|
|
2274
|
-
requestAnimationFrame(() => ka(l.current));
|
|
2275
|
-
let a = (e) => {
|
|
2276
|
-
e.key === "Escape" ? (e.preventDefault(), i()) : e.key === "Tab" && Aa(l.current, e);
|
|
2277
|
-
};
|
|
2278
|
-
return window.addEventListener("keydown", a), () => {
|
|
2279
|
-
window.removeEventListener("keydown", a), (n ?? t)?.focus();
|
|
2280
|
-
};
|
|
2281
|
-
}, [
|
|
2282
|
-
e,
|
|
2283
|
-
i,
|
|
2284
|
-
r
|
|
2285
|
-
]), !e || !n) return null;
|
|
2286
|
-
let u = Array.from(new Set((n.navigation ?? []).map((e) => e.area || $)));
|
|
2287
|
-
u.length === 0 && u.push($);
|
|
2288
|
-
let d = (e) => {
|
|
2289
|
-
let t = n.areas?.find((t) => t.code === e);
|
|
2290
|
-
return o(t?.name) || (e === $ ? o("shell.nav.title", "Navigation") : e);
|
|
2291
|
-
}, f = (e, t) => {
|
|
2292
|
-
let r = e.screen ? n.screens[e.screen] : void 0, s = [...e.items ?? [], ...e.children ?? []], c = o(e.name) || (r ? o(r.display?.name) : "");
|
|
2293
|
-
return /* @__PURE__ */ X("div", {
|
|
2294
|
-
style: {
|
|
2295
|
-
display: "flex",
|
|
2296
|
-
flexDirection: "column",
|
|
2297
|
-
gap: 2
|
|
2298
|
-
},
|
|
2299
|
-
children: [r?.route ? /* @__PURE__ */ X("button", {
|
|
2300
|
-
type: "button",
|
|
2301
|
-
onClick: () => {
|
|
2302
|
-
a(r.route), i();
|
|
2303
|
-
},
|
|
2304
|
-
style: {
|
|
2305
|
-
minHeight: 40,
|
|
2306
|
-
border: 0,
|
|
2307
|
-
borderRadius: 6,
|
|
2308
|
-
background: "transparent",
|
|
2309
|
-
color: "var(--text-2)",
|
|
2310
|
-
display: "flex",
|
|
2311
|
-
alignItems: "center",
|
|
2312
|
-
gap: 8,
|
|
2313
|
-
padding: `0 10px 0 ${10 + t * 14}px`,
|
|
2314
|
-
fontSize: 13,
|
|
2315
|
-
textAlign: "left",
|
|
2316
|
-
cursor: "pointer"
|
|
2317
|
-
},
|
|
2318
|
-
children: [/* @__PURE__ */ Y("span", { style: { width: 12 } }), /* @__PURE__ */ Y("span", {
|
|
2319
|
-
style: {
|
|
2320
|
-
minWidth: 0,
|
|
2321
|
-
overflow: "hidden",
|
|
2322
|
-
textOverflow: "ellipsis",
|
|
2323
|
-
whiteSpace: "nowrap"
|
|
2324
|
-
},
|
|
2325
|
-
children: c || r.route
|
|
2326
|
-
})]
|
|
2327
|
-
}) : c ? /* @__PURE__ */ Y("div", {
|
|
2328
|
-
style: {
|
|
2329
|
-
padding: `7px 10px 5px ${10 + t * 14}px`,
|
|
2330
|
-
color: "var(--text-3)",
|
|
2331
|
-
fontSize: 10.5,
|
|
2332
|
-
fontWeight: 700,
|
|
2333
|
-
letterSpacing: "0.08em",
|
|
2334
|
-
textTransform: "uppercase"
|
|
2335
|
-
},
|
|
2336
|
-
children: c
|
|
2337
|
-
}) : null, s.map((e) => f(e, t + 1))]
|
|
2338
|
-
}, `${t}-${e.screen ?? c}`);
|
|
2339
|
-
};
|
|
2340
|
-
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
|
|
2341
|
-
"data-testid": "mobile-nav-backdrop",
|
|
2342
|
-
onClick: i,
|
|
2343
|
-
style: {
|
|
2344
|
-
position: "fixed",
|
|
2345
|
-
inset: 0,
|
|
2346
|
-
background: "var(--scrim-lite)",
|
|
2347
|
-
zIndex: 120
|
|
2348
|
-
}
|
|
2349
|
-
}), /* @__PURE__ */ X("aside", {
|
|
2350
|
-
ref: l,
|
|
2351
|
-
role: "dialog",
|
|
2352
|
-
"aria-modal": "true",
|
|
2353
|
-
"aria-label": o("shell.nav.title", "Navigation"),
|
|
2354
|
-
"data-testid": "mobile-nav-drawer",
|
|
2355
|
-
style: {
|
|
2356
|
-
position: "fixed",
|
|
2357
|
-
top: 0,
|
|
2358
|
-
bottom: 0,
|
|
2359
|
-
left: 0,
|
|
2360
|
-
width: 320,
|
|
2361
|
-
maxWidth: "calc(100vw - var(--safe-area-right) - 24px)",
|
|
2362
|
-
background: "var(--sidebar)",
|
|
2363
|
-
color: "var(--sidebar-fg)",
|
|
2364
|
-
borderRight: "1px solid var(--border)",
|
|
2365
|
-
boxShadow: "var(--shadow-lg)",
|
|
2366
|
-
zIndex: 121,
|
|
2367
|
-
display: "flex",
|
|
2368
|
-
flexDirection: "column",
|
|
2369
|
-
padding: "calc(10px + var(--safe-area-top)) 10px calc(10px + var(--safe-area-bottom)) calc(10px + var(--safe-area-left))",
|
|
2370
|
-
boxSizing: "border-box",
|
|
2371
|
-
overflow: "hidden"
|
|
2372
|
-
},
|
|
2373
|
-
children: [/* @__PURE__ */ X("div", {
|
|
2374
|
-
style: {
|
|
2375
|
-
display: "flex",
|
|
2376
|
-
alignItems: "center",
|
|
2377
|
-
gap: 8,
|
|
2378
|
-
minHeight: 36,
|
|
2379
|
-
padding: "0 2px 8px"
|
|
2380
|
-
},
|
|
2381
|
-
children: [/* @__PURE__ */ Y("strong", {
|
|
2382
|
-
style: {
|
|
2383
|
-
fontSize: 13,
|
|
2384
|
-
flex: 1
|
|
2385
|
-
},
|
|
2386
|
-
children: o("shell.nav.title", "Navigation")
|
|
2387
|
-
}), /* @__PURE__ */ Y(L, {
|
|
2388
|
-
icon: /* @__PURE__ */ Y(I.x, { size: 15 }),
|
|
2389
|
-
title: o("shell.nav.close", "Close navigation"),
|
|
2390
|
-
onClick: i
|
|
2391
|
-
})]
|
|
2392
|
-
}), /* @__PURE__ */ Y("nav", {
|
|
2393
|
-
style: {
|
|
2394
|
-
overflowY: "auto",
|
|
2395
|
-
overscrollBehavior: "contain",
|
|
2396
|
-
display: "flex",
|
|
2397
|
-
flexDirection: "column",
|
|
2398
|
-
gap: 6
|
|
2399
|
-
},
|
|
2400
|
-
children: u.map((e) => {
|
|
2401
|
-
let r = s === e, i = qi(o, n.navigation ?? [], e);
|
|
2402
|
-
return /* @__PURE__ */ X("section", { children: [/* @__PURE__ */ X("button", {
|
|
2403
|
-
type: "button",
|
|
2404
|
-
onClick: () => c(r ? "" : e),
|
|
2405
|
-
style: {
|
|
2406
|
-
width: "100%",
|
|
2407
|
-
minHeight: 42,
|
|
2408
|
-
border: "1px solid var(--border)",
|
|
2409
|
-
borderRadius: 7,
|
|
2410
|
-
background: e === t ? "var(--sidebar-active)" : "var(--sidebar-hover)",
|
|
2411
|
-
color: "var(--sidebar-fg)",
|
|
2412
|
-
display: "flex",
|
|
2413
|
-
alignItems: "center",
|
|
2414
|
-
gap: 8,
|
|
2415
|
-
padding: "0 10px",
|
|
2416
|
-
fontSize: 13,
|
|
2417
|
-
fontWeight: 650,
|
|
2418
|
-
cursor: "pointer"
|
|
2419
|
-
},
|
|
2420
|
-
"aria-expanded": r,
|
|
2421
|
-
children: [/* @__PURE__ */ Y("span", {
|
|
2422
|
-
style: {
|
|
2423
|
-
flex: 1,
|
|
2424
|
-
textAlign: "left"
|
|
2425
|
-
},
|
|
2426
|
-
children: d(e)
|
|
2427
|
-
}), Y(r ? I.down : I.right, { size: 13 })]
|
|
2428
|
-
}), r && /* @__PURE__ */ Y("div", {
|
|
2429
|
-
style: { padding: "6px 0 4px" },
|
|
2430
|
-
children: i.flatMap((t) => [t.title ? /* @__PURE__ */ Y("div", {
|
|
2431
|
-
style: {
|
|
2432
|
-
padding: "8px 10px 4px",
|
|
2433
|
-
color: "var(--text-3)",
|
|
2434
|
-
fontSize: 10,
|
|
2435
|
-
fontWeight: 700,
|
|
2436
|
-
letterSpacing: "0.08em",
|
|
2437
|
-
textTransform: "uppercase"
|
|
2438
|
-
},
|
|
2439
|
-
children: t.title
|
|
2440
|
-
}, `${e}-${t.title}`) : null, ...t.items.map((e) => f(e, 0))])
|
|
2441
|
-
})] }, e);
|
|
2442
|
-
})
|
|
2443
|
-
})]
|
|
2444
|
-
})] });
|
|
2445
|
-
}
|
|
2446
|
-
function Ma({ open: e, tabs: t, activeTabId: n, returnFocusRef: r, onClose: i, onSwitch: a, onCloseTab: o }) {
|
|
2447
|
-
let s = F(), c = Tn(), l = K(null);
|
|
2448
|
-
return W(() => {
|
|
2449
|
-
if (!e) return;
|
|
2450
|
-
let t = document.activeElement instanceof HTMLElement ? document.activeElement : null, n = r.current;
|
|
2451
|
-
requestAnimationFrame(() => ka(l.current));
|
|
2452
|
-
let a = (e) => {
|
|
2453
|
-
e.key === "Escape" ? (e.preventDefault(), i()) : e.key === "Tab" && Aa(l.current, e);
|
|
2454
|
-
};
|
|
2455
|
-
return window.addEventListener("keydown", a), () => {
|
|
2456
|
-
window.removeEventListener("keydown", a), (n ?? t)?.focus();
|
|
2457
|
-
};
|
|
2458
|
-
}, [
|
|
2459
|
-
e,
|
|
2460
|
-
i,
|
|
2461
|
-
r
|
|
2462
|
-
]), e ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
|
|
2463
|
-
"data-testid": "mobile-tabs-backdrop",
|
|
2464
|
-
onClick: i,
|
|
2465
|
-
style: {
|
|
2466
|
-
position: "fixed",
|
|
2467
|
-
inset: 0,
|
|
2468
|
-
background: "var(--scrim-lite)",
|
|
2469
|
-
zIndex: 122
|
|
2470
|
-
}
|
|
2471
|
-
}), /* @__PURE__ */ X("section", {
|
|
2472
|
-
ref: l,
|
|
2473
|
-
role: "dialog",
|
|
2474
|
-
"aria-modal": "true",
|
|
2475
|
-
"aria-label": s("shell.tabs.open_tabs", "Open tabs"),
|
|
2476
|
-
"data-testid": "mobile-tabs-menu",
|
|
2477
|
-
style: {
|
|
2478
|
-
position: "fixed",
|
|
2479
|
-
top: "calc(var(--topbar-h) + var(--safe-area-top) + 8px)",
|
|
2480
|
-
right: "calc(var(--safe-area-right) + 10px)",
|
|
2481
|
-
width: 320,
|
|
2482
|
-
maxWidth: "calc(100vw - var(--safe-area-left) - var(--safe-area-right) - 20px)",
|
|
2483
|
-
maxHeight: "calc(var(--app-height) - var(--topbar-h) - var(--safe-area-top) - var(--safe-area-bottom) - 16px)",
|
|
2484
|
-
overflowY: "auto",
|
|
2485
|
-
overscrollBehavior: "contain",
|
|
2486
|
-
background: "var(--surface)",
|
|
2487
|
-
border: "1px solid var(--border)",
|
|
2488
|
-
borderRadius: 8,
|
|
2489
|
-
boxShadow: "var(--shadow-lg)",
|
|
2490
|
-
zIndex: 123,
|
|
2491
|
-
padding: 6,
|
|
2492
|
-
boxSizing: "border-box"
|
|
2493
|
-
},
|
|
2494
|
-
children: [/* @__PURE__ */ X("div", {
|
|
2495
|
-
style: {
|
|
2496
|
-
display: "flex",
|
|
2497
|
-
alignItems: "center",
|
|
2498
|
-
gap: 8,
|
|
2499
|
-
padding: "4px 4px 8px"
|
|
2500
|
-
},
|
|
2501
|
-
children: [/* @__PURE__ */ Y("strong", {
|
|
2502
|
-
style: {
|
|
2503
|
-
flex: 1,
|
|
2504
|
-
fontSize: 13
|
|
2505
|
-
},
|
|
2506
|
-
children: s("shell.tabs.open_tabs", "Open tabs")
|
|
2507
|
-
}), /* @__PURE__ */ Y(L, {
|
|
2508
|
-
icon: /* @__PURE__ */ Y(I.x, { size: 14 }),
|
|
2509
|
-
title: s("shell.tabs.close_menu", "Close tabs menu"),
|
|
2510
|
-
onClick: i
|
|
2511
|
-
})]
|
|
2512
|
-
}), t.length === 0 ? /* @__PURE__ */ Y("div", {
|
|
2513
|
-
style: {
|
|
2514
|
-
padding: 10,
|
|
2515
|
-
color: "var(--text-3)",
|
|
2516
|
-
fontSize: 12
|
|
2517
|
-
},
|
|
2518
|
-
children: s("shell.tabs.none_open", "No open tabs")
|
|
2519
|
-
}) : t.map((e) => /* @__PURE__ */ X("div", {
|
|
2520
|
-
style: {
|
|
2521
|
-
display: "grid",
|
|
2522
|
-
gridTemplateColumns: "minmax(0, 1fr) auto",
|
|
2523
|
-
gap: 4,
|
|
2524
|
-
alignItems: "center",
|
|
2525
|
-
borderRadius: 6,
|
|
2526
|
-
background: e.id === n ? "var(--surface-3)" : "transparent"
|
|
2527
|
-
},
|
|
2528
|
-
children: [/* @__PURE__ */ X("button", {
|
|
2529
|
-
type: "button",
|
|
2530
|
-
onClick: () => a(e),
|
|
2531
|
-
style: {
|
|
2532
|
-
minHeight: 38,
|
|
2533
|
-
border: 0,
|
|
2534
|
-
background: "transparent",
|
|
2535
|
-
color: "var(--text-2)",
|
|
2536
|
-
display: "flex",
|
|
2537
|
-
alignItems: "center",
|
|
2538
|
-
gap: 8,
|
|
2539
|
-
minWidth: 0,
|
|
2540
|
-
padding: "0 8px",
|
|
2541
|
-
textAlign: "left",
|
|
2542
|
-
cursor: "pointer"
|
|
2543
|
-
},
|
|
2544
|
-
children: [/* @__PURE__ */ Y(I.layers, { size: 13 }), /* @__PURE__ */ Y("span", {
|
|
2545
|
-
style: {
|
|
2546
|
-
overflow: "hidden",
|
|
2547
|
-
textOverflow: "ellipsis",
|
|
2548
|
-
whiteSpace: "nowrap"
|
|
2549
|
-
},
|
|
2550
|
-
children: c(e)
|
|
2551
|
-
})]
|
|
2552
|
-
}), e.closable && /* @__PURE__ */ Y(L, {
|
|
2553
|
-
icon: /* @__PURE__ */ Y(I.x, { size: 12 }),
|
|
2554
|
-
title: s("shell.tabs.close_named", "Close {title}", { title: c(e) }),
|
|
2555
|
-
onClick: () => o(e.id)
|
|
2556
|
-
})]
|
|
2557
|
-
}, e.id))]
|
|
2558
|
-
})] }) : null;
|
|
2559
|
-
}
|
|
2560
|
-
function Na(e, t) {
|
|
2561
|
-
if (!t) return;
|
|
2562
|
-
let n = t.areas?.find((t) => t.code === e);
|
|
2563
|
-
if (n?.home_screen) {
|
|
2564
|
-
let e = t.screens[n.home_screen];
|
|
2565
|
-
if (e?.route) return e.route;
|
|
2566
|
-
}
|
|
2567
|
-
let r = (e) => {
|
|
2568
|
-
if (e.screen) {
|
|
2569
|
-
let n = t.screens[e.screen];
|
|
2570
|
-
if (n?.route) return n.route;
|
|
2571
|
-
}
|
|
2572
|
-
for (let t of e.items || []) {
|
|
2573
|
-
let e = r(t);
|
|
2574
|
-
if (e) return e;
|
|
2575
|
-
}
|
|
2576
|
-
for (let t of e.children || []) {
|
|
2577
|
-
let e = r(t);
|
|
2578
|
-
if (e) return e;
|
|
2579
|
-
}
|
|
2580
|
-
};
|
|
2581
|
-
for (let n of t.navigation ?? []) {
|
|
2582
|
-
if ((n.area || $) !== e) continue;
|
|
2583
|
-
let t = r(n);
|
|
2584
|
-
if (t) return t;
|
|
2585
|
-
}
|
|
2586
|
-
}
|
|
2587
|
-
function Pa(e, t, n) {
|
|
2588
|
-
let r = (e) => {
|
|
2589
|
-
if (!e.screen) return !1;
|
|
2590
|
-
let r = t[e.screen];
|
|
2591
|
-
return !!r && (r.route === n || n.startsWith(r.route + "/"));
|
|
2592
|
-
}, i = (e, t) => {
|
|
2593
|
-
if (r(e)) return t;
|
|
2594
|
-
for (let n of e.items || []) {
|
|
2595
|
-
let e = i(n, t);
|
|
2596
|
-
if (e) return e;
|
|
2597
|
-
}
|
|
2598
|
-
for (let n of e.children || []) {
|
|
2599
|
-
let e = i(n, t);
|
|
2600
|
-
if (e) return e;
|
|
2601
|
-
}
|
|
2602
|
-
};
|
|
2603
|
-
for (let t of e ?? []) {
|
|
2604
|
-
let e = i(t, t.area || $);
|
|
2605
|
-
if (e) return e;
|
|
2606
|
-
}
|
|
2607
|
-
}
|
|
2608
|
-
function Fa(e, t, n, r, i, a) {
|
|
2609
|
-
let o = (e, t) => {
|
|
2610
|
-
if (e.screen) {
|
|
2611
|
-
let i = n[e.screen];
|
|
2612
|
-
if (i && (i.route === r || r.startsWith(i.route + "/"))) return [...t, e];
|
|
2613
|
-
}
|
|
2614
|
-
for (let n of e.items || []) {
|
|
2615
|
-
let r = o(n, [...t, e]);
|
|
2616
|
-
if (r) return r;
|
|
2617
|
-
}
|
|
2618
|
-
for (let n of e.children || []) {
|
|
2619
|
-
let r = o(n, [...t, e]);
|
|
2620
|
-
if (r) return r;
|
|
2621
|
-
}
|
|
2622
|
-
return null;
|
|
2623
|
-
}, s = null;
|
|
2624
|
-
for (let e of t ?? []) if (s = o(e, []), s) break;
|
|
2625
|
-
if (!s || s.length === 0) {
|
|
2626
|
-
let t = Object.values(n).find((e) => e.route === r);
|
|
2627
|
-
return t?.display?.name ? [{
|
|
2628
|
-
label: e(t.display.name),
|
|
2629
|
-
icon: t.display.icon,
|
|
2630
|
-
isLast: !0
|
|
2631
|
-
}] : [];
|
|
2632
|
-
}
|
|
2633
|
-
let c = [];
|
|
2634
|
-
for (let t = 0; t < s.length; t++) {
|
|
2635
|
-
let i = s[t], o = t === s.length - 1, l = i.screen ? n[i.screen] : void 0;
|
|
2636
|
-
c.push({
|
|
2637
|
-
label: e(i.name) || i.screen || "",
|
|
2638
|
-
icon: i.icon,
|
|
2639
|
-
onClick: l ? () => {
|
|
2640
|
-
a(l.route);
|
|
2641
|
-
} : void 0,
|
|
2642
|
-
isLast: o && (!l || l.route === r)
|
|
2643
|
-
});
|
|
2644
|
-
}
|
|
2645
|
-
let l = s[s.length - 1], u = l.screen ? n[l.screen] : void 0;
|
|
2646
|
-
if (u && r !== u.route && r.startsWith(u.route + "/")) {
|
|
2647
|
-
let t = i.find((e) => e.pathname === r);
|
|
2648
|
-
c.push({
|
|
2649
|
-
label: t?.title || e("shell.crumbs.record", "Record"),
|
|
2650
|
-
icon: "file",
|
|
2651
|
-
isLast: !0
|
|
2652
|
-
});
|
|
2653
|
-
}
|
|
2654
|
-
return c;
|
|
2655
|
-
}
|
|
2656
|
-
//#endregion
|
|
2657
|
-
//#region src/components/pages/auth/icons.tsx
|
|
2658
|
-
function Ia({ size: e = 14 }) {
|
|
2659
|
-
return /* @__PURE__ */ X("svg", {
|
|
2660
|
-
width: e,
|
|
2661
|
-
height: e,
|
|
2662
|
-
viewBox: "0 0 24 24",
|
|
2663
|
-
"aria-hidden": !0,
|
|
2664
|
-
children: [
|
|
2665
|
-
/* @__PURE__ */ Y("path", {
|
|
2666
|
-
fill: "#4285F4",
|
|
2667
|
-
d: "M22.5 12.27c0-.79-.07-1.55-.2-2.27h-9.8v4.5h5.6c-.24 1.28-.97 2.37-2.07 3.1v2.57h3.35c1.96-1.8 3.12-4.47 3.12-7.9z"
|
|
2668
|
-
}),
|
|
2669
|
-
/* @__PURE__ */ Y("path", {
|
|
2670
|
-
fill: "#34A853",
|
|
2671
|
-
d: "M12.5 22c2.8 0 5.15-.92 6.87-2.5l-3.35-2.57c-.93.62-2.12.99-3.52.99-2.7 0-4.99-1.82-5.81-4.27h-3.46v2.66C4.95 19.6 8.42 22 12.5 22z"
|
|
2672
|
-
}),
|
|
2673
|
-
/* @__PURE__ */ Y("path", {
|
|
2674
|
-
fill: "#FBBC05",
|
|
2675
|
-
d: "M6.69 13.65a6 6 0 010-3.8V7.18H3.23a10 10 0 000 9.13z"
|
|
2676
|
-
}),
|
|
2677
|
-
/* @__PURE__ */ Y("path", {
|
|
2678
|
-
fill: "#EA4335",
|
|
2679
|
-
d: "M12.5 6.02c1.52 0 2.88.52 3.95 1.54l2.97-2.97C17.65 2.98 15.3 2 12.5 2c-4.08 0-7.55 2.4-9.27 5.82l3.46 2.66C7.51 7.84 9.8 6.02 12.5 6.02z"
|
|
2680
|
-
})
|
|
2681
|
-
]
|
|
2682
|
-
});
|
|
2683
|
-
}
|
|
2684
|
-
function La({ size: e = 14 }) {
|
|
2685
|
-
return /* @__PURE__ */ X("svg", {
|
|
2686
|
-
width: e,
|
|
2687
|
-
height: e,
|
|
2688
|
-
viewBox: "0 0 24 24",
|
|
2689
|
-
"aria-hidden": !0,
|
|
2690
|
-
children: [
|
|
2691
|
-
/* @__PURE__ */ Y("path", {
|
|
2692
|
-
fill: "#F25022",
|
|
2693
|
-
d: "M1 1h10v10H1z"
|
|
2694
|
-
}),
|
|
2695
|
-
/* @__PURE__ */ Y("path", {
|
|
2696
|
-
fill: "#7FBA00",
|
|
2697
|
-
d: "M13 1h10v10H13z"
|
|
2698
|
-
}),
|
|
2699
|
-
/* @__PURE__ */ Y("path", {
|
|
2700
|
-
fill: "#00A4EF",
|
|
2701
|
-
d: "M1 13h10v10H1z"
|
|
2702
|
-
}),
|
|
2703
|
-
/* @__PURE__ */ Y("path", {
|
|
2704
|
-
fill: "#FFB900",
|
|
2705
|
-
d: "M13 13h10v10H13z"
|
|
2706
|
-
})
|
|
2707
|
-
]
|
|
2708
|
-
});
|
|
2709
|
-
}
|
|
2710
|
-
//#endregion
|
|
2711
|
-
//#region src/lib/schema-routing.ts
|
|
2712
|
-
var Ra = /* @__PURE__ */ new Set(["/preferences", "/admin/catalog"]);
|
|
2713
|
-
function za(e) {
|
|
2714
|
-
if (!e?.navigation) return null;
|
|
2715
|
-
let t = e.areas ?? [];
|
|
2716
|
-
if (t.length > 0) for (let n of t) for (let t of e.navigation) {
|
|
2717
|
-
if ((t.area || "default") !== n.code) continue;
|
|
2718
|
-
let r = Ua(e, t);
|
|
2719
|
-
if (r) return r;
|
|
2720
|
-
}
|
|
2721
|
-
for (let t of e.navigation) {
|
|
2722
|
-
let n = Ua(e, t);
|
|
2723
|
-
if (n) return n;
|
|
2724
|
-
}
|
|
2725
|
-
return null;
|
|
2726
|
-
}
|
|
2727
|
-
function Ba(e, t) {
|
|
2728
|
-
let n = za(t) || "/";
|
|
2729
|
-
if (!t || e === "/" || e === "/admin") return n;
|
|
2730
|
-
let r = Va(e);
|
|
2731
|
-
if (Ra.has(r)) return e;
|
|
2732
|
-
for (let n of Object.values(t.screens ?? {})) if (n.route && Wa(t, n) && Ga(n.route).test(r)) return e;
|
|
2733
|
-
return n;
|
|
2734
|
-
}
|
|
2735
|
-
function Va(e) {
|
|
2736
|
-
let t = e.indexOf("#"), n = t >= 0 ? e.slice(0, t) : e, r = n.indexOf("?");
|
|
2737
|
-
return (r >= 0 ? n.slice(0, r) : n).replace(/\/+$/, "") || "/";
|
|
2738
|
-
}
|
|
2739
|
-
function Ha(e, t) {
|
|
2740
|
-
let n = e.screens[t];
|
|
2741
|
-
return !!n && Wa(e, n);
|
|
2742
|
-
}
|
|
2743
|
-
function Ua(e, t) {
|
|
2744
|
-
if (t.screen && Ha(e, t.screen)) return e.screens[t.screen].route;
|
|
2745
|
-
for (let n of [...t.items ?? [], ...t.children ?? []]) {
|
|
2746
|
-
let t = Ua(e, n);
|
|
2747
|
-
if (t) return t;
|
|
2748
|
-
}
|
|
2749
|
-
return null;
|
|
2750
|
-
}
|
|
2751
|
-
function Wa(e, t) {
|
|
2752
|
-
if (t.type !== "list") return !0;
|
|
2753
|
-
let n = t.entity;
|
|
2754
|
-
return !(n ? e.entities?.[n] : void 0)?.singleton;
|
|
2755
|
-
}
|
|
2756
|
-
function Ga(e) {
|
|
2757
|
-
let t = e.replace(/\/+$/, "").split("/").map((e) => e.startsWith(":") ? "[^/]+" : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
2758
|
-
return RegExp("^" + t.join("/") + "$");
|
|
2759
|
-
}
|
|
2760
|
-
//#endregion
|
|
2761
|
-
//#region src/components/pages/auth/SignIn.tsx
|
|
2762
|
-
var Ka = "sso-failure", qa = {
|
|
2763
|
-
google: {
|
|
2764
|
-
name: "Google",
|
|
2765
|
-
icon: /* @__PURE__ */ Y(Ia, { size: 14 })
|
|
2766
|
-
},
|
|
2767
|
-
microsoft: {
|
|
2768
|
-
name: "Microsoft",
|
|
2769
|
-
icon: /* @__PURE__ */ Y(La, { size: 14 })
|
|
2770
|
-
},
|
|
2771
|
-
azure: {
|
|
2772
|
-
name: "Microsoft",
|
|
2773
|
-
icon: /* @__PURE__ */ Y(La, { size: 14 })
|
|
2774
|
-
}
|
|
2775
|
-
};
|
|
2776
|
-
function Ja() {
|
|
2777
|
-
let e = mi(), [t] = vi(), { login: n, isLoginPending: r, isAuthenticated: i } = xn(), { data: a } = l(), o = F(), [s, c] = q(""), [u, d] = q(""), [f, p] = q(!0), m = g(t.get("next") || t.get("redirect")), h = t.get("sso_error"), _ = F("errors"), { data: v, isPending: y } = ai({
|
|
2778
|
-
queryKey: ["check-setup"],
|
|
2779
|
-
queryFn: ee
|
|
2780
|
-
}), { data: b } = ai({
|
|
2781
|
-
queryKey: ["sso-providers"],
|
|
2782
|
-
queryFn: () => ie(),
|
|
2783
|
-
staleTime: 6e4
|
|
2784
|
-
});
|
|
2785
|
-
if (W(() => {
|
|
2786
|
-
v?.needs_setup && e("/signup", { replace: !0 });
|
|
2787
|
-
}, [v, e]), W(() => {
|
|
2788
|
-
if (!i || !a) return;
|
|
2789
|
-
let t = Ba(m, a);
|
|
2790
|
-
Ya(m, t) && w.warning(o("auth.inaccessible_redirect", "You do not have access to that page. We opened your default page instead.")), e(t, { replace: !0 });
|
|
2791
|
-
}, [
|
|
2792
|
-
i,
|
|
2793
|
-
e,
|
|
2794
|
-
m,
|
|
2795
|
-
a,
|
|
2796
|
-
o
|
|
2797
|
-
]), W(() => {
|
|
2798
|
-
h && w.error(_(h, "Sign-in failed."), void 0, { id: Ka });
|
|
2799
|
-
}, [_, h]), y || v?.needs_setup) return /* @__PURE__ */ Y(Sn, {});
|
|
2800
|
-
function x(e) {
|
|
2801
|
-
e.preventDefault(), n({
|
|
2802
|
-
email: s,
|
|
2803
|
-
password: u,
|
|
2804
|
-
remember: f
|
|
2805
|
-
}, { onError: (e) => {
|
|
2806
|
-
w.error(S(_, e));
|
|
2807
|
-
} });
|
|
2808
|
-
}
|
|
2809
|
-
return /* @__PURE__ */ Y(dn, { children: /* @__PURE__ */ X("form", {
|
|
2810
|
-
onSubmit: x,
|
|
2811
|
-
children: [
|
|
2812
|
-
/* @__PURE__ */ Y("div", {
|
|
2813
|
-
style: {
|
|
2814
|
-
fontSize: 10.5,
|
|
2815
|
-
fontWeight: 700,
|
|
2816
|
-
color: "var(--accent)",
|
|
2817
|
-
letterSpacing: "0.1em",
|
|
2818
|
-
textTransform: "uppercase"
|
|
2819
|
-
},
|
|
2820
|
-
children: o("auth.signin.eyebrow", "Welcome back")
|
|
2821
|
-
}),
|
|
2822
|
-
/* @__PURE__ */ Y("h2", {
|
|
2823
|
-
style: {
|
|
2824
|
-
margin: "6px 0 4px",
|
|
2825
|
-
fontSize: 24,
|
|
2826
|
-
fontWeight: 600,
|
|
2827
|
-
letterSpacing: "-0.018em"
|
|
2828
|
-
},
|
|
2829
|
-
children: o("auth.signin.title", "Sign in")
|
|
2830
|
-
}),
|
|
2831
|
-
/* @__PURE__ */ Y("p", {
|
|
2832
|
-
style: {
|
|
2833
|
-
margin: "0 0 20px",
|
|
2834
|
-
fontSize: 13,
|
|
2835
|
-
color: "var(--text-3)"
|
|
2836
|
-
},
|
|
2837
|
-
children: o("auth.signin.subtitle", "Use your corporate SSO or email & password.")
|
|
2838
|
-
}),
|
|
2839
|
-
b && b.length > 0 && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
|
|
2840
|
-
style: {
|
|
2841
|
-
display: "flex",
|
|
2842
|
-
flexDirection: "column",
|
|
2843
|
-
gap: 6,
|
|
2844
|
-
marginBottom: 12
|
|
2845
|
-
},
|
|
2846
|
-
children: b.map((e) => {
|
|
2847
|
-
let t = qa[e.slug.toLowerCase()] ?? {
|
|
2848
|
-
name: e.name,
|
|
2849
|
-
icon: /* @__PURE__ */ Y(I.shield, { size: 13 })
|
|
2850
|
-
};
|
|
2851
|
-
return /* @__PURE__ */ Y(Ge, {
|
|
2852
|
-
size: "md",
|
|
2853
|
-
style: {
|
|
2854
|
-
justifyContent: "center",
|
|
2855
|
-
width: "100%"
|
|
2856
|
-
},
|
|
2857
|
-
icon: t.icon,
|
|
2858
|
-
onClick: (t) => {
|
|
2859
|
-
t.preventDefault(), window.location.href = Ne(e.slug, void 0, m);
|
|
2860
|
-
},
|
|
2861
|
-
children: o("auth.signin.sso_continue", "Continue with {provider}", { provider: t.name })
|
|
2862
|
-
}, e.slug);
|
|
2863
|
-
})
|
|
2864
|
-
}), /* @__PURE__ */ X("div", {
|
|
2865
|
-
style: {
|
|
2866
|
-
display: "flex",
|
|
2867
|
-
alignItems: "center",
|
|
2868
|
-
gap: 10,
|
|
2869
|
-
margin: "16px 0"
|
|
2870
|
-
},
|
|
2871
|
-
children: [
|
|
2872
|
-
/* @__PURE__ */ Y("span", { style: {
|
|
2873
|
-
flex: 1,
|
|
2874
|
-
height: 1,
|
|
2875
|
-
background: "var(--divider)"
|
|
2876
|
-
} }),
|
|
2877
|
-
/* @__PURE__ */ Y("span", {
|
|
2878
|
-
style: {
|
|
2879
|
-
fontSize: 10.5,
|
|
2880
|
-
color: "var(--text-4)",
|
|
2881
|
-
letterSpacing: "0.08em",
|
|
2882
|
-
textTransform: "uppercase"
|
|
2883
|
-
},
|
|
2884
|
-
children: o("auth.signin.sso_divider", "or with email")
|
|
2885
|
-
}),
|
|
2886
|
-
/* @__PURE__ */ Y("span", { style: {
|
|
2887
|
-
flex: 1,
|
|
2888
|
-
height: 1,
|
|
2889
|
-
background: "var(--divider)"
|
|
2890
|
-
} })
|
|
2891
|
-
]
|
|
2892
|
-
})] }),
|
|
2893
|
-
/* @__PURE__ */ X("div", {
|
|
2894
|
-
style: {
|
|
2895
|
-
display: "flex",
|
|
2896
|
-
flexDirection: "column",
|
|
2897
|
-
gap: 12
|
|
2898
|
-
},
|
|
2899
|
-
children: [
|
|
2900
|
-
/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(xt, { children: o("auth.field.email", "Email") }), /* @__PURE__ */ Y(Ct, {
|
|
2901
|
-
value: s,
|
|
2902
|
-
onChange: c,
|
|
2903
|
-
prefix: /* @__PURE__ */ Y(I.email, { size: 13 }),
|
|
2904
|
-
placeholder: o("auth.field.email_placeholder", "you@company.com"),
|
|
2905
|
-
autoFocus: !0,
|
|
2906
|
-
required: !0
|
|
2907
|
-
})] }),
|
|
2908
|
-
/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ X("div", {
|
|
2909
|
-
style: {
|
|
2910
|
-
display: "flex",
|
|
2911
|
-
alignItems: "center"
|
|
2912
|
-
},
|
|
2913
|
-
children: [
|
|
2914
|
-
/* @__PURE__ */ Y(xt, { children: o("auth.field.password", "Password") }),
|
|
2915
|
-
/* @__PURE__ */ Y("div", { style: { flex: 1 } }),
|
|
2916
|
-
/* @__PURE__ */ Y(ci, {
|
|
2917
|
-
to: "/forgot",
|
|
2918
|
-
style: {
|
|
2919
|
-
fontSize: 11,
|
|
2920
|
-
color: "var(--accent)",
|
|
2921
|
-
marginBottom: 4,
|
|
2922
|
-
textDecoration: "none"
|
|
2923
|
-
},
|
|
2924
|
-
children: o("auth.signin.forgot_link", "Forgot?")
|
|
2925
|
-
})
|
|
2926
|
-
]
|
|
2927
|
-
}), /* @__PURE__ */ Y(St, {
|
|
2928
|
-
value: u,
|
|
2929
|
-
onChange: d,
|
|
2930
|
-
placeholder: o("auth.signin.password_placeholder", "Your password")
|
|
2931
|
-
})] }),
|
|
2932
|
-
/* @__PURE__ */ X("label", {
|
|
2933
|
-
style: {
|
|
2934
|
-
display: "flex",
|
|
2935
|
-
alignItems: "center",
|
|
2936
|
-
gap: 6,
|
|
2937
|
-
fontSize: 12,
|
|
2938
|
-
color: "var(--text-2)"
|
|
2939
|
-
},
|
|
2940
|
-
children: [
|
|
2941
|
-
/* @__PURE__ */ Y("input", {
|
|
2942
|
-
type: "checkbox",
|
|
2943
|
-
name: "remember",
|
|
2944
|
-
checked: f,
|
|
2945
|
-
onChange: (e) => p(e.target.checked)
|
|
2946
|
-
}),
|
|
2947
|
-
" ",
|
|
2948
|
-
o("auth.signin.remember", "Keep me signed in on this device")
|
|
2949
|
-
]
|
|
2950
|
-
}),
|
|
2951
|
-
/* @__PURE__ */ Y(Ge, {
|
|
2952
|
-
type: "submit",
|
|
2953
|
-
size: "md",
|
|
2954
|
-
kind: "primary",
|
|
2955
|
-
style: {
|
|
2956
|
-
justifyContent: "center",
|
|
2957
|
-
width: "100%"
|
|
2958
|
-
},
|
|
2959
|
-
disabled: r,
|
|
2960
|
-
children: r ? o("auth.signin.submitting", "Signing in…") : o("auth.signin.submit", "Continue")
|
|
2961
|
-
}),
|
|
2962
|
-
/* @__PURE__ */ X("div", {
|
|
2963
|
-
style: {
|
|
2964
|
-
fontSize: 12,
|
|
2965
|
-
color: "var(--text-3)",
|
|
2966
|
-
textAlign: "center",
|
|
2967
|
-
marginTop: 4
|
|
2968
|
-
},
|
|
2969
|
-
children: [
|
|
2970
|
-
o("auth.signin.new_here", "New here?"),
|
|
2971
|
-
" ",
|
|
2972
|
-
/* @__PURE__ */ Y(ci, {
|
|
2973
|
-
to: "/signup",
|
|
2974
|
-
style: {
|
|
2975
|
-
color: "var(--accent)",
|
|
2976
|
-
fontWeight: 500,
|
|
2977
|
-
textDecoration: "none"
|
|
2978
|
-
},
|
|
2979
|
-
children: o("auth.signin.request_access", "Request access")
|
|
2980
|
-
})
|
|
2981
|
-
]
|
|
2982
|
-
})
|
|
2983
|
-
]
|
|
2984
|
-
})
|
|
2985
|
-
]
|
|
2986
|
-
}) });
|
|
2987
|
-
}
|
|
2988
|
-
function Ya(e, t) {
|
|
2989
|
-
if (e === t) return !1;
|
|
2990
|
-
let n = e.split(/[?#]/, 1)[0].replace(/\/+$/, "") || "/";
|
|
2991
|
-
return n !== "/" && n !== "/admin";
|
|
2992
|
-
}
|
|
2993
|
-
//#endregion
|
|
2994
|
-
//#region src/components/pages/auth/SignUp.tsx
|
|
2995
|
-
var Xa = H(() => import("./SignUp.impl-CfEXrUeg.js").then((e) => ({ default: e.SignUp })));
|
|
2996
|
-
function Za() {
|
|
2997
|
-
return /* @__PURE__ */ Y(V, {
|
|
2998
|
-
fallback: null,
|
|
2999
|
-
children: /* @__PURE__ */ Y(Xa, {})
|
|
3000
|
-
});
|
|
3001
|
-
}
|
|
3002
|
-
//#endregion
|
|
3003
|
-
//#region src/components/pages/auth/Forgot.tsx
|
|
3004
|
-
var Qa = H(() => import("./Forgot.impl-6tL6SBlS.js").then((e) => ({ default: e.Forgot })));
|
|
3005
|
-
function $a() {
|
|
3006
|
-
return /* @__PURE__ */ Y(V, {
|
|
3007
|
-
fallback: null,
|
|
3008
|
-
children: /* @__PURE__ */ Y(Qa, {})
|
|
3009
|
-
});
|
|
3010
|
-
}
|
|
3011
|
-
//#endregion
|
|
3012
|
-
//#region src/components/pages/auth/Reset.tsx
|
|
3013
|
-
var eo = H(() => import("./Reset.impl-D0pjhS6d.js").then((e) => ({ default: e.Reset })));
|
|
3014
|
-
function to() {
|
|
3015
|
-
return /* @__PURE__ */ Y(V, {
|
|
3016
|
-
fallback: null,
|
|
3017
|
-
children: /* @__PURE__ */ Y(eo, {})
|
|
3018
|
-
});
|
|
3019
|
-
}
|
|
3020
|
-
//#endregion
|
|
3021
|
-
//#region src/components/pages/auth/TwoFA.tsx
|
|
3022
|
-
var no = H(() => import("./TwoFA.impl-B2HtPduH.js").then((e) => ({ default: e.TwoFA })));
|
|
3023
|
-
function ro() {
|
|
3024
|
-
return /* @__PURE__ */ Y(V, {
|
|
3025
|
-
fallback: null,
|
|
3026
|
-
children: /* @__PURE__ */ Y(no, {})
|
|
3027
|
-
});
|
|
3028
|
-
}
|
|
3029
|
-
//#endregion
|
|
3030
|
-
//#region src/components/pages/SSOCallbackPage.tsx
|
|
3031
|
-
var io = H(() => import("./SSOCallbackPage.impl-Cfi2pQ59.js").then((e) => ({ default: e.SSOCallbackPage })));
|
|
3032
|
-
function ao() {
|
|
3033
|
-
return /* @__PURE__ */ Y(V, {
|
|
3034
|
-
fallback: null,
|
|
3035
|
-
children: /* @__PURE__ */ Y(io, {})
|
|
3036
|
-
});
|
|
3037
|
-
}
|
|
3038
|
-
//#endregion
|
|
3039
|
-
//#region src/components/pages/NotFoundPage.tsx
|
|
3040
|
-
var oo = H(() => import("./NotFoundPage.impl-BoX11u-P.js").then((e) => ({ default: e.NotFoundPage })));
|
|
3041
|
-
function so() {
|
|
3042
|
-
return /* @__PURE__ */ Y(V, {
|
|
3043
|
-
fallback: null,
|
|
3044
|
-
children: /* @__PURE__ */ Y(oo, {})
|
|
3045
|
-
});
|
|
3046
|
-
}
|
|
3047
|
-
//#endregion
|
|
3048
|
-
//#region src/components/pages/profile/Profile.tsx
|
|
3049
|
-
var co = H(() => import("./Profile.impl-Cypk27ah.js").then((e) => ({ default: e.Profile })));
|
|
3050
|
-
function lo() {
|
|
3051
|
-
return /* @__PURE__ */ Y(V, {
|
|
3052
|
-
fallback: null,
|
|
3053
|
-
children: /* @__PURE__ */ Y(co, {})
|
|
3054
|
-
});
|
|
3055
|
-
}
|
|
3056
|
-
//#endregion
|
|
3057
|
-
//#region src/components/pages/tenant-params/TenantParamsPage.tsx
|
|
3058
|
-
var uo = H(() => import("./TenantParamsPage.impl-BGpdmEZg.js").then((e) => ({ default: e.TenantParamsPage })));
|
|
3059
|
-
function fo(e) {
|
|
3060
|
-
return /* @__PURE__ */ Y(V, {
|
|
3061
|
-
fallback: null,
|
|
3062
|
-
children: /* @__PURE__ */ Y(uo, { ...e })
|
|
3063
|
-
});
|
|
3064
|
-
}
|
|
3065
|
-
//#endregion
|
|
3066
|
-
//#region src/components/pages/profile/Preferences.tsx
|
|
3067
|
-
var po = H(() => import("./Preferences.impl-Ct5xwZtT.js").then((e) => ({ default: e.Preferences })));
|
|
3068
|
-
function mo() {
|
|
3069
|
-
return /* @__PURE__ */ Y(V, {
|
|
3070
|
-
fallback: null,
|
|
3071
|
-
children: /* @__PURE__ */ Y(po, {})
|
|
3072
|
-
});
|
|
3073
|
-
}
|
|
3074
|
-
//#endregion
|
|
3075
|
-
//#region src/components/pages/AdminCatalogPage.tsx
|
|
3076
|
-
var ho = H(() => import("./AdminCatalogPage.impl-B-7MLqa1.js").then((e) => ({ default: e.AdminCatalogPage })));
|
|
3077
|
-
function go() {
|
|
3078
|
-
return /* @__PURE__ */ Y(V, {
|
|
3079
|
-
fallback: null,
|
|
3080
|
-
children: /* @__PURE__ */ Y(ho, {})
|
|
3081
|
-
});
|
|
3082
|
-
}
|
|
3083
|
-
//#endregion
|
|
3084
|
-
//#region src/components/pages/SmartListPage.tsx
|
|
3085
|
-
var _o = H(() => import("./SmartListPage.impl-Cu83Gv_G.js").then((e) => ({ default: e.SmartListPage })));
|
|
3086
|
-
function vo(e) {
|
|
3087
|
-
return /* @__PURE__ */ Y(V, {
|
|
3088
|
-
fallback: null,
|
|
3089
|
-
children: /* @__PURE__ */ Y(_o, { ...e })
|
|
3090
|
-
});
|
|
3091
|
-
}
|
|
3092
|
-
//#endregion
|
|
3093
|
-
//#region src/components/pages/SmartDetailPage.tsx
|
|
3094
|
-
var yo = H(() => import("./SmartDetailPage.impl-BiIX0n7K.js").then((e) => ({ default: e.SmartDetailPage })));
|
|
3095
|
-
function bo(e) {
|
|
3096
|
-
return /* @__PURE__ */ Y(V, {
|
|
3097
|
-
fallback: null,
|
|
3098
|
-
children: /* @__PURE__ */ Y(yo, { ...e })
|
|
3099
|
-
});
|
|
3100
|
-
}
|
|
3101
|
-
//#endregion
|
|
3102
|
-
//#region src/components/pages/SmartRecordListPage.tsx
|
|
3103
|
-
var xo = H(() => import("./SmartRecordListPage.impl-DR6lq7HA.js").then((e) => ({ default: e.SmartRecordListPage })));
|
|
3104
|
-
function So(e) {
|
|
3105
|
-
return /* @__PURE__ */ Y(V, {
|
|
3106
|
-
fallback: null,
|
|
3107
|
-
children: /* @__PURE__ */ Y(xo, { ...e })
|
|
3108
|
-
});
|
|
3109
|
-
}
|
|
3110
|
-
//#endregion
|
|
3111
|
-
//#region src/hooks/useVersionWatcher.ts
|
|
3112
|
-
function Co() {
|
|
3113
|
-
let e = oi(), t = F(), n = K(t);
|
|
3114
|
-
W(() => {
|
|
3115
|
-
n.current = t;
|
|
3116
|
-
}, [t]), W(() => {
|
|
3117
|
-
let t = !1, r = null, a = 6e4, o = a, s = 0, l = 0;
|
|
3118
|
-
function u(e) {
|
|
3119
|
-
t || (r !== null && clearTimeout(r), r = setTimeout(() => {
|
|
3120
|
-
t || (document.visibilityState === "visible" ? d() : u(a));
|
|
3121
|
-
}, e));
|
|
3122
|
-
}
|
|
3123
|
-
async function d() {
|
|
3124
|
-
if (!t) {
|
|
3125
|
-
try {
|
|
3126
|
-
await v(), s = 0, o = a;
|
|
3127
|
-
} catch (e) {
|
|
3128
|
-
s === 0 && console.warn("[declarion] version probe failed; backing off", e), s += 1, o = Math.min(1e3 * 2 ** Math.min(s - 1, 9), 3e5);
|
|
3129
|
-
}
|
|
3130
|
-
u(o);
|
|
3131
|
-
}
|
|
3132
|
-
}
|
|
3133
|
-
function f() {
|
|
3134
|
-
let e = b();
|
|
3135
|
-
e && m(e);
|
|
3136
|
-
let t = Date.now();
|
|
3137
|
-
t - l < 5e3 || (l = t, d());
|
|
3138
|
-
}
|
|
3139
|
-
function p() {
|
|
3140
|
-
document.visibilityState === "visible" && f();
|
|
3141
|
-
}
|
|
3142
|
-
let m = (t) => {
|
|
3143
|
-
if (t.kind === "schema-only") {
|
|
3144
|
-
e.invalidateQueries({ queryKey: ["schema"] });
|
|
3145
|
-
return;
|
|
3146
|
-
}
|
|
3147
|
-
if (i()) return;
|
|
3148
|
-
let r = n.current;
|
|
3149
|
-
w.info(r("toast.update.available", "A new version is available"), r("toast.update.hint", "Reload to pick up the latest UI and schema."), {
|
|
3150
|
-
id: "declarion-update-available",
|
|
3151
|
-
sticky: !0,
|
|
3152
|
-
action: {
|
|
3153
|
-
label: r("toast.update.reload", "Reload now"),
|
|
3154
|
-
onClick: () => {
|
|
3155
|
-
window.location.reload();
|
|
3156
|
-
}
|
|
3157
|
-
}
|
|
3158
|
-
});
|
|
3159
|
-
}, h = c(m);
|
|
3160
|
-
return window.addEventListener("focus", f), window.addEventListener("online", f), document.addEventListener("visibilitychange", p), d(), () => {
|
|
3161
|
-
t = !0, h(), window.removeEventListener("focus", f), window.removeEventListener("online", f), document.removeEventListener("visibilitychange", p), r !== null && clearTimeout(r);
|
|
3162
|
-
};
|
|
3163
|
-
}, [e]);
|
|
3164
|
-
}
|
|
3165
|
-
//#endregion
|
|
3166
|
-
//#region src/lib/capabilityPrefetch.ts
|
|
3167
|
-
var wo = [
|
|
3168
|
-
() => import("./MarkdownRenderer-sK2TRZS-.js"),
|
|
3169
|
-
() => import("./JsonEditor-Dz1PQHC8.js"),
|
|
3170
|
-
() => import("./Grid-XUHm5SDe.js"),
|
|
3171
|
-
() => import("./DraggableChildrenTable-Dd5SeuF6.js"),
|
|
3172
|
-
() => import("./ActionDialog-C6EG-AmC.js")
|
|
3173
|
-
];
|
|
3174
|
-
function To() {
|
|
3175
|
-
for (let e of wo) e().catch(() => {});
|
|
3176
|
-
}
|
|
3177
|
-
var Eo = !1;
|
|
3178
|
-
function Do() {
|
|
3179
|
-
if (Eo) return;
|
|
3180
|
-
Eo = !0;
|
|
3181
|
-
let e = globalThis.requestIdleCallback;
|
|
3182
|
-
typeof e == "function" ? e(To) : setTimeout(To, 0);
|
|
3183
|
-
}
|
|
3184
|
-
//#endregion
|
|
3185
|
-
//#region src/stores/screen-registry.ts
|
|
3186
|
-
var Oo = /* @__PURE__ */ new Map();
|
|
3187
|
-
function ko(e, t) {
|
|
3188
|
-
Oo.set(e, t);
|
|
3189
|
-
}
|
|
3190
|
-
function Ao(e) {
|
|
3191
|
-
return Oo.get(e);
|
|
3192
|
-
}
|
|
3193
|
-
//#endregion
|
|
3194
|
-
//#region src/lib/brand-tokens.ts
|
|
3195
|
-
var jo = ["light", "dark"], Mo = ["page_title_size", "page_title_line_height"], No = [
|
|
3196
|
-
"background",
|
|
3197
|
-
"surface",
|
|
3198
|
-
"surface_2",
|
|
3199
|
-
"surface_3",
|
|
3200
|
-
"text",
|
|
3201
|
-
"text_2",
|
|
3202
|
-
"text_3",
|
|
3203
|
-
"border",
|
|
3204
|
-
"divider",
|
|
3205
|
-
"accent",
|
|
3206
|
-
"accent_hover",
|
|
3207
|
-
"accent_foreground",
|
|
3208
|
-
"sidebar",
|
|
3209
|
-
"rail"
|
|
3210
|
-
];
|
|
3211
|
-
function Po(e) {
|
|
3212
|
-
return `--${e.replace(/_/g, "-")}`;
|
|
3213
|
-
}
|
|
3214
|
-
function Fo(e) {
|
|
3215
|
-
if (typeof e != "string") return null;
|
|
3216
|
-
let t = e.trim();
|
|
3217
|
-
return !t || /[;{}]/.test(t) ? null : t;
|
|
3218
|
-
}
|
|
3219
|
-
function Io(e) {
|
|
3220
|
-
let t = Fo(e);
|
|
3221
|
-
return !t || typeof CSS < "u" && CSS.supports && !CSS.supports("color", t) ? null : t;
|
|
3222
|
-
}
|
|
3223
|
-
var Lo = {
|
|
3224
|
-
light: {
|
|
3225
|
-
soft: 10,
|
|
3226
|
-
ring: 28,
|
|
3227
|
-
row: 10
|
|
3228
|
-
},
|
|
3229
|
-
dark: {
|
|
3230
|
-
soft: 14,
|
|
3231
|
-
ring: 35,
|
|
3232
|
-
row: 22
|
|
3233
|
-
}
|
|
3234
|
-
};
|
|
3235
|
-
function Ro(e, t) {
|
|
3236
|
-
if (!Io(t.accent)) return [];
|
|
3237
|
-
let n = Lo[e];
|
|
3238
|
-
return [
|
|
3239
|
-
`--accent-soft: color-mix(in srgb, var(--accent) ${n.soft}%, var(--surface))`,
|
|
3240
|
-
`--accent-ring: color-mix(in srgb, var(--accent) ${n.ring}%, transparent)`,
|
|
3241
|
-
`--row-selected-bg: color-mix(in srgb, var(--accent) ${n.row}%, var(--surface))`
|
|
3242
|
-
];
|
|
3243
|
-
}
|
|
3244
|
-
function zo(e, t) {
|
|
3245
|
-
let n = [];
|
|
3246
|
-
for (let e of No) {
|
|
3247
|
-
let r = Io(t[e]);
|
|
3248
|
-
r && n.push(`${Po(e)}: ${r}`);
|
|
3249
|
-
}
|
|
3250
|
-
return n.push(...Ro(e, t)), n;
|
|
3251
|
-
}
|
|
3252
|
-
function Bo(e) {
|
|
3253
|
-
if (!e) return "";
|
|
3254
|
-
let t = [], n = [], r = Fo(e.font_sans), i = Fo(e.font_mono);
|
|
3255
|
-
r && n.push(`--font-sans: ${r}`), i && n.push(`--font-mono: ${i}`);
|
|
3256
|
-
for (let t of Mo) {
|
|
3257
|
-
let r = Fo(e.typography?.[t]);
|
|
3258
|
-
r && n.push(`${Po(t)}: ${r}`);
|
|
3259
|
-
}
|
|
3260
|
-
n.length && t.push(`:root { ${n.join("; ")}; }`);
|
|
3261
|
-
for (let n of jo) {
|
|
3262
|
-
let r = e.colors?.[n];
|
|
3263
|
-
if (!r) continue;
|
|
3264
|
-
let i = zo(n, r);
|
|
3265
|
-
i.length && t.push(`html[data-color-scheme="${n}"] { ${i.join("; ")}; }`);
|
|
3266
|
-
}
|
|
3267
|
-
return t.join("\n");
|
|
3268
|
-
}
|
|
3269
|
-
var Vo = "declarion-brand-tokens", Ho = "consumer-brand-css";
|
|
3270
|
-
function Uo(e) {
|
|
3271
|
-
if (typeof document > "u") return;
|
|
3272
|
-
let t = document.head, n = document.getElementById(Vo);
|
|
3273
|
-
if (!e) {
|
|
3274
|
-
n?.remove();
|
|
3275
|
-
return;
|
|
3276
|
-
}
|
|
3277
|
-
let r = n ?? document.createElement("style");
|
|
3278
|
-
n || (r.id = Vo, t.appendChild(r)), r.textContent !== e && (r.textContent = e);
|
|
3279
|
-
let i = document.getElementById(Ho);
|
|
3280
|
-
i && i.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_FOLLOWING && t.appendChild(i);
|
|
3281
|
-
}
|
|
3282
|
-
ko("Profile", lo), ko("TenantParameters", fo);
|
|
3283
|
-
var Wo = "declarion-managed-favicon", Go = new ri({ defaultOptions: { queries: {
|
|
3284
|
-
staleTime: 3e5,
|
|
3285
|
-
retry: 1
|
|
3286
|
-
} } });
|
|
3287
|
-
Jn(Go, bn);
|
|
3288
|
-
function Ko(e) {
|
|
3289
|
-
if (typeof window > "u") return null;
|
|
3290
|
-
try {
|
|
3291
|
-
let t = new URL(e, window.location.origin);
|
|
3292
|
-
return t.protocol !== window.location.protocol || t.host !== window.location.host ? null : t.href;
|
|
3293
|
-
} catch {
|
|
3294
|
-
return null;
|
|
3295
|
-
}
|
|
3296
|
-
}
|
|
3297
|
-
function qo() {
|
|
3298
|
-
let { data: e } = l();
|
|
3299
|
-
return {
|
|
3300
|
-
routes: G(() => {
|
|
3301
|
-
if (!e) return [];
|
|
3302
|
-
let t = [];
|
|
3303
|
-
for (let [n, r] of Object.entries(e.screens ?? {})) if (r.type === "list") {
|
|
3304
|
-
let i = r.entity;
|
|
3305
|
-
if ((i ? e.entities?.[i] : void 0)?.singleton) continue;
|
|
3306
|
-
t.push(/* @__PURE__ */ Y(Z, {
|
|
3307
|
-
path: r.route,
|
|
3308
|
-
element: /* @__PURE__ */ Y($t, { children: /* @__PURE__ */ Y(Ie, {
|
|
3309
|
-
code: n,
|
|
3310
|
-
children: /* @__PURE__ */ Y(vo, { screenCode: n })
|
|
3311
|
-
}) })
|
|
3312
|
-
}, n));
|
|
3313
|
-
} else if (r.type === "detail") t.push(/* @__PURE__ */ Y(Z, {
|
|
3314
|
-
path: r.route,
|
|
3315
|
-
element: /* @__PURE__ */ Y($t, { children: /* @__PURE__ */ Y(Ie, {
|
|
3316
|
-
code: n,
|
|
3317
|
-
children: /* @__PURE__ */ Y(bo, { screenCode: n })
|
|
3318
|
-
}) })
|
|
3319
|
-
}, n));
|
|
3320
|
-
else if (r.type === "record_list") t.push(/* @__PURE__ */ Y(Z, {
|
|
3321
|
-
path: r.route,
|
|
3322
|
-
element: /* @__PURE__ */ Y($t, { children: /* @__PURE__ */ Y(Ie, {
|
|
3323
|
-
code: n,
|
|
3324
|
-
children: /* @__PURE__ */ Y(So, { screenCode: n })
|
|
3325
|
-
}) })
|
|
3326
|
-
}, n));
|
|
3327
|
-
else if (r.type === "custom") {
|
|
3328
|
-
let e = r.component ? Ao(r.component) : void 0;
|
|
3329
|
-
e && t.push(/* @__PURE__ */ Y(Z, {
|
|
3330
|
-
path: r.route,
|
|
3331
|
-
element: /* @__PURE__ */ Y($t, { children: /* @__PURE__ */ Y(Ie, {
|
|
3332
|
-
code: n,
|
|
3333
|
-
children: /* @__PURE__ */ Y(e, { screenCode: n })
|
|
3334
|
-
}) })
|
|
3335
|
-
}, n));
|
|
3336
|
-
}
|
|
3337
|
-
return t;
|
|
3338
|
-
}, [e]),
|
|
3339
|
-
defaultRoute: G(() => za(e), [e])
|
|
3340
|
-
};
|
|
3341
|
-
}
|
|
3342
|
-
function Jo() {
|
|
3343
|
-
let e = p((e) => e.initialize), t = p((e) => e.isLoading), n = p((e) => e.isAuthenticated), { data: r, isError: i } = l(), a = o(), { data: s, isLoading: c } = fn(), { branding: u, isLoading: d } = ln(), { routes: f, defaultRoute: m } = qo(), h = O();
|
|
3344
|
-
W(() => {
|
|
3345
|
-
document.documentElement.lang = a;
|
|
3346
|
-
}, [a]);
|
|
3347
|
-
let g = typeof window < "u" && window.self !== window.top && !h.enabled;
|
|
3348
|
-
W(() => {
|
|
3349
|
-
h.enabled || g || e();
|
|
3350
|
-
}, [
|
|
3351
|
-
h.enabled,
|
|
3352
|
-
g,
|
|
3353
|
-
e
|
|
3354
|
-
]);
|
|
3355
|
-
let _ = r?.icons;
|
|
3356
|
-
W(() => {
|
|
3357
|
-
rn(_ ?? {});
|
|
3358
|
-
}, [_]), W(() => {
|
|
3359
|
-
Do();
|
|
3360
|
-
}, []);
|
|
3361
|
-
let v = u?.identity, y = u?.theme;
|
|
3362
|
-
W(() => {
|
|
3363
|
-
if (typeof document > "u") return;
|
|
3364
|
-
let e = v?.app_name?.trim();
|
|
3365
|
-
e && (document.title = e);
|
|
3366
|
-
}, [v?.app_name]), W(() => {
|
|
3367
|
-
if (typeof document > "u") return;
|
|
3368
|
-
let e = v?.app_logo, t = sn(e) ? Ko(e.trim()) : null, n = document.getElementById(Wo);
|
|
3369
|
-
if (!t) n && n.remove();
|
|
3370
|
-
else if (n) n.href !== t && (n.href = t);
|
|
3371
|
-
else {
|
|
3372
|
-
document.querySelectorAll("link[rel=\"icon\"], link[rel=\"shortcut icon\"]").forEach((e) => e.remove());
|
|
3373
|
-
let e = document.createElement("link");
|
|
3374
|
-
e.id = Wo, e.rel = "icon", e.href = t, document.head.appendChild(e);
|
|
3375
|
-
}
|
|
3376
|
-
}, [v?.app_logo]);
|
|
3377
|
-
let b = y?.css_url ?? null, x = G(() => Bo(y), [y]);
|
|
3378
|
-
W(() => {
|
|
3379
|
-
Uo(x);
|
|
3380
|
-
}, [x]), W(() => {
|
|
3381
|
-
if (typeof document > "u") return;
|
|
3382
|
-
let e = document.getElementById(Ho);
|
|
3383
|
-
if (!b) {
|
|
3384
|
-
e && e.remove();
|
|
3385
|
-
return;
|
|
3386
|
-
}
|
|
3387
|
-
let t = Ko(b);
|
|
3388
|
-
if (!t) {
|
|
3389
|
-
e && e.remove(), console.error(`[declarion] branding.theme.css_url rejected: ${b}. Only same-origin, relative URLs are allowed (e.g. /modules/crm/public/brand.css).`);
|
|
3390
|
-
return;
|
|
3391
|
-
}
|
|
3392
|
-
if (e && e.href === t) return;
|
|
3393
|
-
e && e.remove();
|
|
3394
|
-
let n = document.createElement("link");
|
|
3395
|
-
n.id = Ho, n.rel = "stylesheet", n.href = t, document.head.appendChild(n);
|
|
3396
|
-
}, [b]);
|
|
3397
|
-
let S = h.enabled && !n;
|
|
3398
|
-
return g || S || t || c && !s || d || !r && (n || !i) ? /* @__PURE__ */ Y(Sn, {}) : /* @__PURE__ */ X(di, { children: [
|
|
3399
|
-
/* @__PURE__ */ Y(Z, {
|
|
3400
|
-
path: "/login",
|
|
3401
|
-
element: /* @__PURE__ */ Y(Ja, {})
|
|
3402
|
-
}),
|
|
3403
|
-
/* @__PURE__ */ Y(Z, {
|
|
3404
|
-
path: "/login/sso-callback",
|
|
3405
|
-
element: /* @__PURE__ */ Y(ao, {})
|
|
3406
|
-
}),
|
|
3407
|
-
/* @__PURE__ */ Y(Z, {
|
|
3408
|
-
path: "/signup",
|
|
3409
|
-
element: /* @__PURE__ */ Y(Za, {})
|
|
3410
|
-
}),
|
|
3411
|
-
/* @__PURE__ */ Y(Z, {
|
|
3412
|
-
path: "/forgot",
|
|
3413
|
-
element: /* @__PURE__ */ Y($a, {})
|
|
3414
|
-
}),
|
|
3415
|
-
/* @__PURE__ */ Y(Z, {
|
|
3416
|
-
path: "/reset",
|
|
3417
|
-
element: /* @__PURE__ */ Y(to, {})
|
|
3418
|
-
}),
|
|
3419
|
-
/* @__PURE__ */ Y(Z, {
|
|
3420
|
-
path: "/2fa",
|
|
3421
|
-
element: /* @__PURE__ */ Y(ro, {})
|
|
3422
|
-
}),
|
|
3423
|
-
/* @__PURE__ */ X(Z, {
|
|
3424
|
-
element: /* @__PURE__ */ Y(wa, {}),
|
|
3425
|
-
children: [
|
|
3426
|
-
m && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Z, {
|
|
3427
|
-
index: !0,
|
|
3428
|
-
element: /* @__PURE__ */ Y(li, {
|
|
3429
|
-
to: m,
|
|
3430
|
-
replace: !0
|
|
3431
|
-
})
|
|
3432
|
-
}), /* @__PURE__ */ Y(Z, {
|
|
3433
|
-
path: "/admin",
|
|
3434
|
-
element: /* @__PURE__ */ Y(li, {
|
|
3435
|
-
to: m,
|
|
3436
|
-
replace: !0
|
|
3437
|
-
})
|
|
3438
|
-
})] }),
|
|
3439
|
-
f,
|
|
3440
|
-
/* @__PURE__ */ Y(Z, {
|
|
3441
|
-
path: "/preferences",
|
|
3442
|
-
element: /* @__PURE__ */ Y(mo, {})
|
|
3443
|
-
}),
|
|
3444
|
-
/* @__PURE__ */ Y(Z, {
|
|
3445
|
-
path: "/admin/catalog",
|
|
3446
|
-
element: /* @__PURE__ */ Y(go, {})
|
|
3447
|
-
}),
|
|
3448
|
-
/* @__PURE__ */ Y(Z, {
|
|
3449
|
-
path: "*",
|
|
3450
|
-
element: /* @__PURE__ */ Y(so, {})
|
|
3451
|
-
})
|
|
3452
|
-
]
|
|
3453
|
-
})
|
|
3454
|
-
] });
|
|
3455
|
-
}
|
|
3456
|
-
function Yo() {
|
|
3457
|
-
Co();
|
|
3458
|
-
let e = B((e) => e.toastPosition);
|
|
3459
|
-
return /* @__PURE__ */ X(si, { children: [
|
|
3460
|
-
/* @__PURE__ */ Y(Mi, {}),
|
|
3461
|
-
/* @__PURE__ */ Y(Jo, {}),
|
|
3462
|
-
/* @__PURE__ */ Y(yi, {
|
|
3463
|
-
position: e,
|
|
3464
|
-
toastOptions: { unstyled: !0 },
|
|
3465
|
-
expand: !0,
|
|
3466
|
-
visibleToasts: 4,
|
|
3467
|
-
gap: 8,
|
|
3468
|
-
offset: {
|
|
3469
|
-
top: 16,
|
|
3470
|
-
bottom: 16,
|
|
3471
|
-
left: 16,
|
|
3472
|
-
right: "calc(var(--assistant-open-w) + 16px)"
|
|
3473
|
-
}
|
|
3474
|
-
})
|
|
3475
|
-
] });
|
|
3476
|
-
}
|
|
3477
|
-
function Xo({ children: e }) {
|
|
3478
|
-
let t = Wt(), n = Jt();
|
|
3479
|
-
return /* @__PURE__ */ Y(pe, {
|
|
3480
|
-
viewport: t,
|
|
3481
|
-
breakpoints: n,
|
|
3482
|
-
children: e
|
|
3483
|
-
});
|
|
3484
|
-
}
|
|
3485
|
-
function Zo() {
|
|
3486
|
-
return /* @__PURE__ */ Y($t, { children: /* @__PURE__ */ Y(ii, {
|
|
3487
|
-
client: Go,
|
|
3488
|
-
children: /* @__PURE__ */ Y(le, { children: /* @__PURE__ */ Y(Xo, { children: /* @__PURE__ */ Y(Yo, {}) }) })
|
|
3489
|
-
}) });
|
|
3490
|
-
}
|
|
3491
|
-
//#endregion
|
|
3492
|
-
//#region src/api/batch.ts
|
|
3493
|
-
var Qo = class {
|
|
3494
|
-
ops = [];
|
|
3495
|
-
call(e, t) {
|
|
3496
|
-
return this.ops.push({
|
|
3497
|
-
action: e,
|
|
3498
|
-
params: $o(t)
|
|
3499
|
-
}), this;
|
|
3500
|
-
}
|
|
3501
|
-
upsert(e, t, n = "upsert", r = []) {
|
|
3502
|
-
let i = {
|
|
3503
|
-
entity: e,
|
|
3504
|
-
records: t,
|
|
3505
|
-
mode: n
|
|
3506
|
-
};
|
|
3507
|
-
return r.length > 0 && (i.unique_by = r), this.call("data.upsert", i);
|
|
3508
|
-
}
|
|
3509
|
-
async execute() {
|
|
3510
|
-
if (this.ops.length === 0) throw Error("declarion: batch.execute() called with no ops; add ops via .call() or .upsert()");
|
|
3511
|
-
return await Ce("system.batch", {
|
|
3512
|
-
actions: this.ops,
|
|
3513
|
-
atomic: !0
|
|
3514
|
-
});
|
|
3515
|
-
}
|
|
3516
|
-
_ops() {
|
|
3517
|
-
return this.ops;
|
|
3518
|
-
}
|
|
3519
|
-
};
|
|
3520
|
-
function $o(e) {
|
|
3521
|
-
return e == null ? null : typeof e == "object" && !Array.isArray(e) ? e : { value: e };
|
|
3522
|
-
}
|
|
3523
|
-
//#endregion
|
|
3524
|
-
//#region src/hooks/useAllEntityData.ts
|
|
3525
|
-
var es = 1e3, ts = 20;
|
|
3526
|
-
function ns(e, t = {}) {
|
|
3527
|
-
return ai({
|
|
3528
|
-
queryKey: [
|
|
3529
|
-
"entity-data-all",
|
|
3530
|
-
e,
|
|
3531
|
-
t
|
|
3532
|
-
],
|
|
3533
|
-
enabled: !!e,
|
|
3534
|
-
queryFn: async ({ signal: n }) => {
|
|
3535
|
-
let r = {
|
|
3536
|
-
...t,
|
|
3537
|
-
per_page: es,
|
|
3538
|
-
count: "with"
|
|
3539
|
-
}, i;
|
|
3540
|
-
try {
|
|
3541
|
-
i = await P(e, {
|
|
3542
|
-
...r,
|
|
3543
|
-
page: 1
|
|
3544
|
-
}, { signal: n });
|
|
3545
|
-
} catch (t) {
|
|
3546
|
-
throw t instanceof Me && t.code === "cursor.cross_tier_offset_unsupported" ? Error(`useAllEntityData: entity "${e}" is cursor-paginated (cross-store archive); it cannot be eagerly fetched into memory. Use a paginated cursor list (useCursorEntityData) instead.`) : t;
|
|
3547
|
-
}
|
|
3548
|
-
let a = i.meta.total_pages ?? 1;
|
|
3549
|
-
if (a <= 1) return i;
|
|
3550
|
-
if (a > ts) throw Error(`useAllEntityData: entity "${e}" spans ${a} pages (limit ${ts}); it is not a bounded entity. Use useEntityData with server-side pagination instead.`);
|
|
3551
|
-
let o = await Promise.all(Array.from({ length: a - 1 }, (t, i) => P(e, {
|
|
3552
|
-
...r,
|
|
3553
|
-
page: i + 2
|
|
3554
|
-
}, { signal: n }))), s = new Mn();
|
|
3555
|
-
s.merge(i.$refs);
|
|
3556
|
-
let c = [...i.data];
|
|
3557
|
-
for (let e of o) c.push(...e.data), s.merge(e.$refs);
|
|
3558
|
-
return {
|
|
3559
|
-
data: c,
|
|
3560
|
-
meta: {
|
|
3561
|
-
...i.meta,
|
|
3562
|
-
page: 1,
|
|
3563
|
-
per_page: c.length,
|
|
3564
|
-
total_pages: 1
|
|
3565
|
-
},
|
|
3566
|
-
$refs: s.all()
|
|
3567
|
-
};
|
|
3568
|
-
}
|
|
3569
|
-
});
|
|
3570
|
-
}
|
|
3571
|
-
//#endregion
|
|
3572
|
-
//#region src/hooks/useFileReferenceJSON.ts
|
|
3573
|
-
function rs(e, t, n, r) {
|
|
3574
|
-
return [
|
|
3575
|
-
"file-reference-json",
|
|
3576
|
-
tr(e, t),
|
|
3577
|
-
n,
|
|
3578
|
-
r ?? null
|
|
3579
|
-
];
|
|
3580
|
-
}
|
|
3581
|
-
function is(e, t, n, r) {
|
|
3582
|
-
let i = rs(e, t, n, r);
|
|
3583
|
-
return ai({
|
|
3584
|
-
queryKey: i,
|
|
3585
|
-
queryFn: async ({ signal: r }) => {
|
|
3586
|
-
let i = await (await _t(e, t, n, { signal: r })).blob.text();
|
|
3587
|
-
try {
|
|
3588
|
-
return JSON.parse(i);
|
|
3589
|
-
} catch (e) {
|
|
3590
|
-
throw Error("The referenced file does not contain valid JSON.", { cause: e });
|
|
3591
|
-
}
|
|
3592
|
-
},
|
|
3593
|
-
enabled: !!e && !!t && t !== "new" && !!n && typeof r == "string" && r !== ""
|
|
3594
|
-
});
|
|
3595
|
-
}
|
|
3596
|
-
//#endregion
|
|
3597
|
-
//#region src/hooks/useLiveObject.ts
|
|
3598
|
-
function as(e, t) {
|
|
3599
|
-
let n = er(e, t), { data: r } = l(), i = n.data?.data ? d(n.data.data) : void 0, a = Rn(e ? r?.entities?.[e]?.realtime : void 0, e ?? ""), o = e ? a : !1;
|
|
3600
|
-
return {
|
|
3601
|
-
...n,
|
|
3602
|
-
object: i,
|
|
3603
|
-
isLive: o,
|
|
3604
|
-
isNotFound: n.error instanceof Me && n.error.status === 404
|
|
3605
|
-
};
|
|
3606
|
-
}
|
|
3607
|
-
//#endregion
|
|
3608
|
-
//#region src/hooks/useColumns.ts
|
|
3609
|
-
function os(e, t) {
|
|
3610
|
-
let [n, r] = vi(), i = G(() => {
|
|
3611
|
-
let r = n.get("columns");
|
|
3612
|
-
return r ? r.split(",").filter(Boolean).filter((t) => e.includes(t)) : t.length > 0 ? t : e;
|
|
3613
|
-
}, [
|
|
3614
|
-
n,
|
|
3615
|
-
e,
|
|
3616
|
-
t
|
|
3617
|
-
]), a = U((e) => {
|
|
3618
|
-
let i = new URLSearchParams(n);
|
|
3619
|
-
e.length === 0 || ss(e, t) ? i.delete("columns") : i.set("columns", e.join(",")), r(i);
|
|
3620
|
-
}, [
|
|
3621
|
-
n,
|
|
3622
|
-
r,
|
|
3623
|
-
t
|
|
3624
|
-
]);
|
|
3625
|
-
return {
|
|
3626
|
-
visibleColumns: i,
|
|
3627
|
-
availableColumns: e,
|
|
3628
|
-
setColumns: a,
|
|
3629
|
-
resetToDefaults: U(() => {
|
|
3630
|
-
let e = new URLSearchParams(n);
|
|
3631
|
-
e.delete("columns"), r(e);
|
|
3632
|
-
}, [n, r]),
|
|
3633
|
-
showAll: U(() => {
|
|
3634
|
-
a(e);
|
|
3635
|
-
}, [e, a]),
|
|
3636
|
-
isColumnVisible: U((e) => i.includes(e), [i]),
|
|
3637
|
-
toggleColumn: U((e) => {
|
|
3638
|
-
if (i.includes(e)) {
|
|
3639
|
-
if (i.length <= 1) return;
|
|
3640
|
-
a(i.filter((t) => t !== e));
|
|
3641
|
-
} else a([...i, e]);
|
|
3642
|
-
}, [i, a])
|
|
3643
|
-
};
|
|
3644
|
-
}
|
|
3645
|
-
function ss(e, t) {
|
|
3646
|
-
return e.length === t.length && e.every((e, n) => e === t[n]);
|
|
3647
|
-
}
|
|
3648
|
-
//#endregion
|
|
3649
|
-
//#region src/hooks/useScreenTab.ts
|
|
3650
|
-
function cs(e) {
|
|
3651
|
-
let t = Q(), [n] = vi(), r = e?.route ?? t.pathname, i = K(n.toString());
|
|
3652
|
-
Ar(r, e?.title ?? r, e?.icon, i.current), Sr(r);
|
|
3653
|
-
}
|
|
3654
|
-
//#endregion
|
|
3655
|
-
//#region src/components/actions/ObjectActionBar.tsx
|
|
3656
|
-
function ls({ entity: e, object: n, slot: i, screen: a, select: o, onAfterRun: s }) {
|
|
3657
|
-
let c = F(), u = F("errors"), { data: d } = l(), { run: p, isRunning: m } = Nn(), h = oe(), g = yn(), _ = Q(), v = d?.entities?.[e], y = G(() => ds(d, e, a, _.pathname), [
|
|
3658
|
-
d,
|
|
3659
|
-
e,
|
|
3660
|
-
a,
|
|
3661
|
-
_.pathname
|
|
3662
|
-
]), b = d?.actions, x = f(d, e);
|
|
3663
|
-
return {
|
|
3664
|
-
nodes: G(() => {
|
|
3665
|
-
if (!v || !n) return [];
|
|
3666
|
-
let e = ps(r(y?.action_layout, v.action_layout, v.actions, b, i), o);
|
|
3667
|
-
return t(c, e, v.actions, b, n, [], ar(v, n));
|
|
3668
|
-
}, [
|
|
3669
|
-
c,
|
|
3670
|
-
y?.action_layout,
|
|
3671
|
-
v,
|
|
3672
|
-
n,
|
|
3673
|
-
b,
|
|
3674
|
-
i,
|
|
3675
|
-
o
|
|
3676
|
-
]),
|
|
3677
|
-
run: (t, r) => {
|
|
3678
|
-
if (!v || !n) return;
|
|
3679
|
-
let i = cr(u, t, r, { row: n }, e);
|
|
3680
|
-
if (i === null) return;
|
|
3681
|
-
let a = E(n, v), o = a ? [a] : [], l = t === "__delete" && x ? x.route : null;
|
|
3682
|
-
return p({
|
|
3683
|
-
action: r,
|
|
3684
|
-
title: c(r.display?.name) || t,
|
|
3685
|
-
row: n,
|
|
3686
|
-
execute: (e) => ze(i, fe(e, o)),
|
|
3687
|
-
onSuccess: (e) => {
|
|
3688
|
-
l && h(l, { replace: !0 }), s?.(t, e);
|
|
3689
|
-
}
|
|
3690
|
-
});
|
|
3691
|
-
},
|
|
3692
|
-
isBusy: m,
|
|
3693
|
-
widgetContext: G(() => {
|
|
3694
|
-
if (!v || !n) return;
|
|
3695
|
-
let t = E(n, v);
|
|
3696
|
-
return {
|
|
3697
|
-
entity: v,
|
|
3698
|
-
entityCode: e,
|
|
3699
|
-
screen: y,
|
|
3700
|
-
screenRoute: y?.route ?? "",
|
|
3701
|
-
selectedRows: [n],
|
|
3702
|
-
selectedIds: t ? [t] : [],
|
|
3703
|
-
t: c,
|
|
3704
|
-
tabNavigate: (e, t) => g(e, {
|
|
3705
|
-
title: t?.title,
|
|
3706
|
-
icon: t?.icon,
|
|
3707
|
-
search: t?.search
|
|
3708
|
-
}),
|
|
3709
|
-
runActionApi: (e, t) => ze(e, t)
|
|
3710
|
-
};
|
|
3711
|
-
}, [
|
|
3712
|
-
v,
|
|
3713
|
-
e,
|
|
3714
|
-
y,
|
|
3715
|
-
n,
|
|
3716
|
-
c,
|
|
3717
|
-
g
|
|
3718
|
-
])
|
|
3719
|
-
};
|
|
3720
|
-
}
|
|
3721
|
-
function us({ entity: e, object: t, slot: n, screen: r, select: i, extraActions: a, onAfterRun: o }) {
|
|
3722
|
-
let { data: s } = l(), { nodes: c, run: u, widgetContext: d } = ls({
|
|
3723
|
-
entity: e,
|
|
3724
|
-
object: t,
|
|
3725
|
-
slot: n,
|
|
3726
|
-
screen: r,
|
|
3727
|
-
select: i,
|
|
3728
|
-
onAfterRun: o
|
|
3729
|
-
}), f = s?.entities?.[e];
|
|
3730
|
-
return c.length === 0 && !a ? null : /* @__PURE__ */ X("span", {
|
|
3731
|
-
style: { display: "contents" },
|
|
3732
|
-
children: [c.length > 0 && /* @__PURE__ */ Y(fr, {
|
|
3733
|
-
layout: c,
|
|
3734
|
-
row: t,
|
|
3735
|
-
onRun: u,
|
|
3736
|
-
kind: n === "list_row" ? "row" : "detail",
|
|
3737
|
-
entityActions: f?.actions,
|
|
3738
|
-
globalActions: s?.actions,
|
|
3739
|
-
reservedRightWidth: 0,
|
|
3740
|
-
widgetContext: d
|
|
3741
|
-
}), a]
|
|
3742
|
-
});
|
|
3743
|
-
}
|
|
3744
|
-
function ds(e, t, n, r) {
|
|
3745
|
-
if (!e?.screens) return;
|
|
3746
|
-
if (n) return e.screens[n];
|
|
3747
|
-
let i = r.replace(/\/+$/, "") || "/";
|
|
3748
|
-
return Object.values(e.screens).find((e) => e.entity !== t || !e.route ? !1 : fs(e.route).test(i));
|
|
3749
|
-
}
|
|
3750
|
-
function fs(e) {
|
|
3751
|
-
let t = (e.replace(/\/+$/, "") || "/").split("/").map((e) => e.startsWith(":") ? "[^/]+" : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
3752
|
-
return RegExp(`^${t.join("/")}$`);
|
|
3753
|
-
}
|
|
3754
|
-
function ps(e, t) {
|
|
3755
|
-
if (!t) return e;
|
|
3756
|
-
let n = t.include ? new Set(t.include) : null, r = t.exclude ? new Set(t.exclude) : null;
|
|
3757
|
-
return e.map((e) => ms(e, n, r)).filter((e) => e !== null);
|
|
3758
|
-
}
|
|
3759
|
-
function ms(e, t, n) {
|
|
3760
|
-
if (e.kind === "action") return t && !t.has(e.code) || n?.has(e.code) ? null : e;
|
|
3761
|
-
let r = e.items.map((e) => ms(e, t, n)).filter((e) => e !== null);
|
|
3762
|
-
return r.length > 0 ? {
|
|
3763
|
-
...e,
|
|
3764
|
-
items: r
|
|
3765
|
-
} : null;
|
|
3766
|
-
}
|
|
3767
|
-
//#endregion
|
|
3768
|
-
//#region src/components/list/InlineEditCell.tsx
|
|
3769
|
-
var hs = {
|
|
3770
|
-
padding: "4px 6px",
|
|
3771
|
-
margin: "-4px -6px",
|
|
3772
|
-
borderRadius: 4,
|
|
3773
|
-
cursor: "text",
|
|
3774
|
-
border: "1px dashed transparent",
|
|
3775
|
-
minHeight: 24,
|
|
3776
|
-
display: "flex",
|
|
3777
|
-
alignItems: "center",
|
|
3778
|
-
gap: 4
|
|
3779
|
-
};
|
|
3780
|
-
function gs({ value: e, onSave: t, type: n = "text", options: r, trigger: i = "always", label: a, placeholder: o }) {
|
|
3781
|
-
let s = F(), c = F("errors"), [l, u] = q(e), [d, f] = q(e), [p, m] = q(!1), [h, g] = q(e), _ = K(null);
|
|
3782
|
-
W(() => {
|
|
3783
|
-
u(e), f(e), g(e);
|
|
3784
|
-
}, [e]);
|
|
3785
|
-
let v = () => {
|
|
3786
|
-
g(d), m(!0);
|
|
3787
|
-
}, y = async (e) => {
|
|
3788
|
-
let n = l;
|
|
3789
|
-
f(e), u(e), m(!1);
|
|
3790
|
-
try {
|
|
3791
|
-
await t(e);
|
|
3792
|
-
} catch (e) {
|
|
3793
|
-
f(n), u(n);
|
|
3794
|
-
let t = S(c, e);
|
|
3795
|
-
w.error(c("list.cell_unsaved", "The value could not be saved."), a ? s("list.cell.field_reason", "{field}: {reason}", {
|
|
3796
|
-
field: a,
|
|
3797
|
-
reason: t
|
|
3798
|
-
}) : t);
|
|
3799
|
-
}
|
|
3800
|
-
}, b = () => {
|
|
3801
|
-
g(d), m(!1);
|
|
3802
|
-
}, x = () => {
|
|
3803
|
-
if (h === void 0) return b();
|
|
3804
|
-
y(h);
|
|
3805
|
-
};
|
|
3806
|
-
return p ? /* @__PURE__ */ X("div", {
|
|
3807
|
-
style: {
|
|
3808
|
-
display: "flex",
|
|
3809
|
-
alignItems: "center",
|
|
3810
|
-
gap: 4
|
|
3811
|
-
},
|
|
3812
|
-
onKeyDown: (e) => {
|
|
3813
|
-
e.key === "Enter" && x(), e.key === "Escape" && b();
|
|
3814
|
-
},
|
|
3815
|
-
children: [n === "select" ? /* @__PURE__ */ Y(It, {
|
|
3816
|
-
value: h,
|
|
3817
|
-
options: r || [],
|
|
3818
|
-
onChange: (e) => {
|
|
3819
|
-
g(e), y(e);
|
|
3820
|
-
}
|
|
3821
|
-
}) : n === "bool" ? /* @__PURE__ */ Y(ct, {
|
|
3822
|
-
value: h === "true",
|
|
3823
|
-
onChange: (e) => {
|
|
3824
|
-
let t = String(e);
|
|
3825
|
-
g(t), y(t);
|
|
3826
|
-
}
|
|
3827
|
-
}) : /* @__PURE__ */ Y(Ct, {
|
|
3828
|
-
value: h ?? "",
|
|
3829
|
-
onChange: g,
|
|
3830
|
-
autoFocus: !0,
|
|
3831
|
-
placeholder: o
|
|
3832
|
-
}), n !== "select" && n !== "bool" && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(L, {
|
|
3833
|
-
size: 24,
|
|
3834
|
-
icon: /* @__PURE__ */ Y(I.check, { size: 13 }),
|
|
3835
|
-
onClick: x,
|
|
3836
|
-
title: s("dialog.save", "Save")
|
|
3837
|
-
}), /* @__PURE__ */ Y(L, {
|
|
3838
|
-
size: 24,
|
|
3839
|
-
icon: /* @__PURE__ */ Y(I.x, { size: 13 }),
|
|
3840
|
-
onClick: b,
|
|
3841
|
-
title: s("dialog.cancel", "Cancel")
|
|
3842
|
-
})] })]
|
|
3843
|
-
}) : /* @__PURE__ */ Y("div", {
|
|
3844
|
-
ref: _,
|
|
3845
|
-
tabIndex: i === "enter" ? 0 : void 0,
|
|
3846
|
-
onClick: i === "always" ? v : void 0,
|
|
3847
|
-
onDoubleClick: i === "dblclick" ? v : void 0,
|
|
3848
|
-
onKeyDown: i === "enter" ? (e) => {
|
|
3849
|
-
e.key === "Enter" && v();
|
|
3850
|
-
} : void 0,
|
|
3851
|
-
onMouseEnter: (e) => {
|
|
3852
|
-
e.currentTarget.style.borderColor = "var(--border)";
|
|
3853
|
-
},
|
|
3854
|
-
onMouseLeave: (e) => {
|
|
3855
|
-
e.currentTarget.style.borderColor = "transparent";
|
|
3856
|
-
},
|
|
3857
|
-
style: hs,
|
|
3858
|
-
children: d ?? /* @__PURE__ */ Y("span", {
|
|
3859
|
-
style: { color: "var(--text-4)" },
|
|
3860
|
-
children: s("list.cell.click_to_edit", "Click to edit")
|
|
3861
|
-
})
|
|
3862
|
-
});
|
|
3863
|
-
}
|
|
3864
|
-
//#endregion
|
|
3865
|
-
//#region src/components/layout/ImpersonationStartModal.tsx
|
|
3866
|
-
var _s = H(() => import("./ImpersonationStartModal.impl-BFBN0YJe.js").then((e) => ({ default: e.ImpersonationStartModal })));
|
|
3867
|
-
function vs(e) {
|
|
3868
|
-
return /* @__PURE__ */ Y(V, {
|
|
3869
|
-
fallback: null,
|
|
3870
|
-
children: /* @__PURE__ */ Y(_s, { ...e })
|
|
3871
|
-
});
|
|
3872
|
-
}
|
|
3873
|
-
//#endregion
|
|
3874
|
-
//#region src/components/agents/AgentConversationDrawer.tsx
|
|
3875
|
-
function ys({ open: e, onClose: t, conversations: n, activeId: r, onSelect: i, onNew: a, onRefresh: o }) {
|
|
3876
|
-
let s = F(), c = s(Pe("agent_conversation")?.display?.name_plural) || "agent_conversation";
|
|
3877
|
-
return W(() => {
|
|
3878
|
-
e && o();
|
|
3879
|
-
}, [e, o]), e ? /* @__PURE__ */ X("aside", {
|
|
3880
|
-
className: "fixed left-0 top-0 z-40 flex h-full w-[320px] flex-col border-r border-border bg-card text-foreground shadow-2xl",
|
|
3881
|
-
children: [
|
|
3882
|
-
/* @__PURE__ */ X("header", {
|
|
3883
|
-
className: "flex items-center justify-between border-b border-border px-4 py-3",
|
|
3884
|
-
children: [/* @__PURE__ */ Y("span", {
|
|
3885
|
-
className: "font-semibold",
|
|
3886
|
-
children: c
|
|
3887
|
-
}), /* @__PURE__ */ X(Ge, {
|
|
3888
|
-
kind: "ghost",
|
|
3889
|
-
onClick: a,
|
|
3890
|
-
children: [
|
|
3891
|
-
/* @__PURE__ */ Y(I.plus, {}),
|
|
3892
|
-
" ",
|
|
3893
|
-
s("agent.drawer.new", "New")
|
|
3894
|
-
]
|
|
3895
|
-
})]
|
|
3896
|
-
}),
|
|
3897
|
-
/* @__PURE__ */ X("div", {
|
|
3898
|
-
className: "flex-1 overflow-y-auto",
|
|
3899
|
-
children: [n.length === 0 && /* @__PURE__ */ Y("div", {
|
|
3900
|
-
className: "p-4 text-sm text-muted-foreground",
|
|
3901
|
-
children: s("agent.drawer.empty", "No conversations yet.")
|
|
3902
|
-
}), n.map((e) => /* @__PURE__ */ X("button", {
|
|
3903
|
-
onClick: () => i(e.id),
|
|
3904
|
-
className: `block w-full px-4 py-3 text-left border-b border-divider hover:bg-surface ${e.id === r ? "bg-surface" : ""}`,
|
|
3905
|
-
children: [/* @__PURE__ */ Y("div", {
|
|
3906
|
-
className: "text-sm font-medium truncate",
|
|
3907
|
-
children: e.title || s("agent.drawer.untitled", "Untitled")
|
|
3908
|
-
}), /* @__PURE__ */ X("div", {
|
|
3909
|
-
className: "text-xs text-muted-foreground",
|
|
3910
|
-
children: [e.agent ? `${e.agent} · ` : "", e.status]
|
|
3911
|
-
})]
|
|
3912
|
-
}, e.id))]
|
|
3913
|
-
}),
|
|
3914
|
-
/* @__PURE__ */ Y("footer", {
|
|
3915
|
-
className: "border-t border-border p-2",
|
|
3916
|
-
children: /* @__PURE__ */ Y(Ge, {
|
|
3917
|
-
kind: "ghost",
|
|
3918
|
-
onClick: t,
|
|
3919
|
-
children: s("agent.drawer.close", "Close")
|
|
3920
|
-
})
|
|
3921
|
-
})
|
|
3922
|
-
]
|
|
3923
|
-
}) : null;
|
|
3924
|
-
}
|
|
3925
|
-
//#endregion
|
|
3926
|
-
export { Vn as ACTION_DATA_CURSOR_KEY, kn as ACTION_DATA_KEY, xe as ActionBatchError, In as ActionRunnerProvider, xa as AgentChatPanel, ys as AgentConversationDrawer, Wr as AgentElicitForm, Gr as AgentPicker, Zo as App, Zo as Declarion, dn as AuthShell, Ze as Avatar, Qo as Batch, ct as BoolToggle, bi as BrandGlyph, aa as Breadcrumbs, Ge as Btn, h as CURSOR_LANGUAGE_CHANGED, ce as CURSOR_SEMANTICS_MISMATCH, zr as ChangePasswordDialog, Zt as Check, At as Chip, mr as CircleImage, Qt as ClassifiedFieldLocked, it as ColumnPicker, ya as CommandPalette, $e as ConfirmDialog, Ie as CurrentScreenProvider, te as DEFAULT_RESPONSIVE_BREAKPOINTS, ut as DateInput, st as Dropdown, on as DynamicIcon, Tr as EmptyState, An as EntityClient, xt as FieldLabel, Mt as FileDraftScope, jr as FilterChips, Or as FilterDrawer, $a as Forgot, zt as HoverCard, I as Icon, L as IconBtn, ma as ImpersonationBanner, ha as ImpersonationFrame, vs as ImpersonationStartModal, Ut as InfoTooltip, gs as InlineEditCell, pt as JsonField, qe as Kbd, we as MANDATORY_LANGUAGE, Rt as MULTIPLE_VALUES, R as MenuItem, bt as MultiSelect, Cr as NO_VALUE_OPS, Er as OP_LABELS, us as ObjectActionBar, ne as OrderedMap, Kn as PAGE_STATE_TTL_PARAM, Rr as PageHeader, St as PasswordInput, Ke as Pill, mo as Preferences, lo as Profile, Ft as PropertyGridEditor, Qe as QEField, ft as QuickEditCell, Je as QuickPeek, Ti as Rail, Xt as RecordIdBadge, Mn as RefCache, Pt as RefCombobox, gt as RefField, Lr as RefreshControl, to as Reset, pe as ResponsiveModeProvider, Si as RowField, Fr as SCROLL_STATE_KEY, Yt as SectionCard, It as Select, Ki as Sidebar, Ja as SignIn, Za as SignUp, bo as SmartDetailPage, vo as SmartListPage, So as SmartRecordListPage, vt as Spinner, _r as SquareImage, kt as StructureField, la as TabStrip, ht as TagsInput, na as TenantChip, wt as TextArea, Ct as TextInput, Gt as Tooltip, ca as TopBar, ro as TwoFA, Bt as UploadError, Tt as ViewField, tt as ViewSwitcher, ir as WideBanner, Bn as actionDataQueryKey, Yr as answerQuestion, Qr as approveInvocation, fe as buildActionBody, e as buildDetailHrefFromId, _e as buildEntityDetailHref, Nt as buildMassEditTargets, Le as buildRowDetailHref, qi as buildSections, Kr as cancelConversation, Br as cancelInvocation, qn as canonicalUrl, me as classificationTier, Be as coerceDisplayString, pr as commonVariantActionCodes, Mr as countActiveFilters, Xr as createConversation, Dn as cursorActionDataQueryKey, On as cursorEntityDataQueryKey, Pn as cursorEntityStableKey, Fe as deleteObject, Lt as detectCommonValue, Ht as discardFile, lr as effectiveScreenForRecord, Ln as entityClient, M as entityDataQueryKey, ta as envTone, ur as evaluateFilterTree, ze as executeAction, de as extractPkValues, S as failureTitle, Te as fieldAccessInfo, Re as fieldClassification, Ae as fieldDisplayName, A as fieldRequiredPermission, rs as fileReferenceJSONQueryKey, Ot as formatBytes, at as formatCount, et as formatEstimatedCount, rt as formatExactCount, Ve as formatOffsetTimestamp, rr as getFileWidget, an as getIcon, or as getImageCropper, nn as getLayoutWidget, he as getPrimaryKeyFields, nr as hasFileWidget, en as hasLayoutWidget, kr as hasOrGroups, C as isCursorStaleError, j as isFieldReadable, N as isFieldSoDProtected, Ee as isFieldWritable, $r as listAvailableAgents, Vr as listConversations, qr as loadConversationInvocations, ti as loadConversationTurns, Hr as loadHistory, n as makeTextFn, tr as objectQueryKey, Dr as parseFilterURLState, wr as parseFiltersFromURL, Dt as parseTargetFilter, Se as pickLocalized, ge as pkValuePartsToId, ve as pkValuesFromId, je as pkValuesToDetailId, De as pkValuesToId, y as pluralText, hr as registerFileWidget, tn as registerLayoutWidget, ko as registerScreen, Ur as rejectInvocation, re as reresolveLanguage, ye as resolveDetailRoute, dr as resolveEntityVariantCode, sr as resolveScreenVariantCode, a as resolveViewportCategory, be as restoreObject, Zr as sendElicitResponse, Jr as sendMessage, xr as setFiltersInURL, rn as setIconRegistry, gr as setImageCropper, x as textWithNodes, dt as uploadFile, En as useActionData, Nn as useActionRunner, ei as useAgentConversation, ns as useAllEntityData, xn as useAuth, os as useColumns, Un as useCreateObject, Oe as useCurrentScreen, zn as useCursorActionData, Fn as useCursorEntityData, lt as useDebounce, Yn as useDeleteObject, br as useDeleteProperty, s as useDeploymentLanguage, jt as useDraftRegistration, hn as useEffectiveParam, Pe as useEntity, ue as useEntityCount, ke as useEntityData, Et as useFileDraftScope, is as useFileReferenceJSON, Xe as useFilters, Cn as useImpersonation, o as useLanguage, as as useLiveObject, fi as useLocation, pi as useNavigate, er as useObject, ls as useObjectActions, Ye as usePageState, Xn as usePageStateTtl, pn as useParam, gi as useParams, Ir as usePlainScrollRestoration, fn as usePublicParams, Gn as useRegisterRetainedQuery, mn as useResolvedParam, He as useResponsiveMode, Pr as useSavedScrollOffset, l as useSchema, nt as useScreen, _n as useScreenBack, cs as useScreenTab, _i as useSearchParams, vr as useSetProperty, yr as useSetStatus, yn as useTabNavigate, Sr as useTabSearchMirror, z as useTabStore, F as useText, Wn as useUpdateObject, ot as useViews, Nr as useVirtualScrollRestoration, Vt as validateClientSide, ar as variantActionCodesForRecord };
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { CURSOR_LANGUAGE_CHANGED as ee, CURSOR_SEMANTICS_MISMATCH as te, isCursorStaleError as ne } from "./types/api.js";
|
|
3
|
+
import { OrderedMap as e } from "./types/ordmap.js";
|
|
4
|
+
import { coerceDisplayString as t } from "./lib/display-value.js";
|
|
5
|
+
import { formatOffsetTimestamp as n } from "./lib/timestamp.js";
|
|
6
|
+
import { buildDetailHrefFromId as r, buildEntityDetailHref as i, buildRowDetailHref as a, extractPkValues as o, fieldDisplayName as s, getPrimaryKeyFields as c, pkValuePartsToId as l, pkValuesFromId as u, pkValuesToDetailId as d, pkValuesToId as f, resolveDetailRoute as p } from "./types/schema.js";
|
|
7
|
+
import { SmartDetailPage as m } from "./components/pages/SmartDetailPage.js";
|
|
8
|
+
import { SmartListPage as h } from "./components/pages/SmartListPage.js";
|
|
9
|
+
import { SmartRecordListPage as g } from "./components/pages/SmartRecordListPage.js";
|
|
10
|
+
import { useSchema as _ } from "./hooks/useSchema.js";
|
|
11
|
+
import { MANDATORY_LANGUAGE as v, makeTextFn as y, pickLocalized as b, pluralText as x, textWithNodes as S } from "./lib/language.js";
|
|
12
|
+
import { reresolveLanguage as C, useDeploymentLanguage as w, useLanguage as T } from "./hooks/useLanguage.js";
|
|
13
|
+
import { Icon as E } from "./components/primitives/Icons.js";
|
|
14
|
+
import { Btn as D } from "./components/primitives/Btn.js";
|
|
15
|
+
import { IconBtn as O } from "./components/primitives/IconBtn.js";
|
|
16
|
+
import { Pill as k } from "./components/primitives/Pill.js";
|
|
17
|
+
import { Kbd as A } from "./components/primitives/Kbd.js";
|
|
18
|
+
import { Avatar as j } from "./components/primitives/Avatar.js";
|
|
19
|
+
import { BrandGlyph as M } from "./components/primitives/BrandGlyph.js";
|
|
20
|
+
import { Dropdown as N } from "./components/primitives/Dropdown.js";
|
|
21
|
+
import { HoverCard as P } from "./components/primitives/HoverCard.js";
|
|
22
|
+
import { InfoTooltip as F, Tooltip as I } from "./components/primitives/Tooltip.js";
|
|
23
|
+
import { Chip as L } from "./components/primitives/Chip.js";
|
|
24
|
+
import { useText as R } from "./hooks/useText.js";
|
|
25
|
+
import { SectionCard as z } from "./components/primitives/SectionCard.js";
|
|
26
|
+
import { StatTile as B } from "./components/primitives/StatTile.js";
|
|
27
|
+
import { RecordIdBadge as V } from "./components/primitives/RecordIdBadge.js";
|
|
28
|
+
import { DEFAULT_RESPONSIVE_BREAKPOINTS as H, resolveViewportCategory as U } from "./lib/viewport-category.js";
|
|
29
|
+
import { ResponsiveModeProvider as W, useResponsiveMode as G } from "./hooks/useResponsiveMode.js";
|
|
30
|
+
import { RowField as K } from "./components/primitives/RowField.js";
|
|
31
|
+
import { BoolToggle as q } from "./components/primitives/BoolToggle.js";
|
|
32
|
+
import { MenuItem as J } from "./components/primitives/MenuItem.js";
|
|
33
|
+
import { Check as Y } from "./components/primitives/Check.js";
|
|
34
|
+
import { Spinner as X } from "./components/primitives/Spinner.js";
|
|
35
|
+
import { ClassifiedFieldLocked as Z } from "./components/primitives/ClassifiedFieldLocked.js";
|
|
36
|
+
import { DateInput as re, FieldLabel as ie, JsonField as ae, MultiSelect as oe, PasswordInput as se, QuickEditCell as ce, RefField as le, Select as ue, TagsInput as de, TextArea as fe, TextInput as pe, ViewField as me } from "./components/primitives/Fields.js";
|
|
37
|
+
import { getIcon as he, setIconRegistry as ge } from "./stores/icon-registry.js";
|
|
38
|
+
import { DynamicIcon as _e } from "./components/shared/DynamicIcon.js";
|
|
39
|
+
import { Rail as ve } from "./components/layout/Rail.js";
|
|
40
|
+
import { ActionBatchError as ye, buildActionBody as be, deleteObject as xe, executeAction as Se, restoreObject as Ce } from "./api/data.js";
|
|
41
|
+
import { failureTitle as we } from "./lib/failure.js";
|
|
42
|
+
import { useEffectiveParam as Te, useParam as Ee, usePublicParams as De, useResolvedParam as Oe } from "./hooks/useParams.js";
|
|
43
|
+
import { useTabStore as ke } from "./stores/tabs.js";
|
|
44
|
+
import { ConfirmDialog as Ae } from "./components/shared/ConfirmDialog.js";
|
|
45
|
+
import { useTabNavigate as je } from "./hooks/useTabNavigate.js";
|
|
46
|
+
import { entityDataQueryKey as Me, useEntityCount as Ne, useEntityData as Pe } from "./hooks/useEntityData.js";
|
|
47
|
+
import { useEntity as Fe } from "./hooks/useEntity.js";
|
|
48
|
+
import { useScreen as Ie } from "./hooks/useScreen.js";
|
|
49
|
+
import { useViews as Le } from "./hooks/useViews.js";
|
|
50
|
+
import { Sidebar as Re, buildSections as ze } from "./components/layout/Sidebar.js";
|
|
51
|
+
import { useAuth as Be } from "./hooks/useAuth.js";
|
|
52
|
+
import { useImpersonation as Ve } from "./hooks/useImpersonation.js";
|
|
53
|
+
import { TenantChip as He, envTone as Ue } from "./components/layout/TenantChip.js";
|
|
54
|
+
import { Breadcrumbs as We } from "./components/chrome/Breadcrumbs.js";
|
|
55
|
+
import { TopBar as Ge } from "./components/layout/TopBar.js";
|
|
56
|
+
import { TabStrip as Ke } from "./components/layout/TabStrip.js";
|
|
57
|
+
import { ImpersonationBanner as qe } from "./components/layout/ImpersonationBanner.js";
|
|
58
|
+
import { ImpersonationFrame as Je } from "./components/layout/ImpersonationFrame.js";
|
|
59
|
+
import { CommandPalette as Ye } from "./components/layout/CommandPalette.js";
|
|
60
|
+
import { AgentChatPanel as Xe } from "./components/agents/AgentChatPanel.js";
|
|
61
|
+
import { classificationTier as Ze, fieldAccessInfo as Qe, fieldClassification as $e, fieldRequiredPermission as et, isFieldReadable as tt, isFieldSoDProtected as nt, isFieldWritable as rt } from "./lib/field-classification.js";
|
|
62
|
+
import { ACTION_DATA_CURSOR_KEY as it, ACTION_DATA_KEY as at, actionDataQueryKey as ot, cursorActionDataQueryKey as st, useActionData as ct, useCursorActionData as lt } from "./hooks/useActionData.js";
|
|
63
|
+
import { EntityClient as ut, RefCache as dt, entityClient as ft } from "./api/entities.js";
|
|
64
|
+
import { cursorEntityDataQueryKey as pt, cursorEntityStableKey as mt, useCursorEntityData as ht } from "./hooks/useCursorEntityData.js";
|
|
65
|
+
import { ActionRunnerProvider as gt, useActionRunner as _t } from "./components/actions/ActionRunner.js";
|
|
66
|
+
import { canonicalUrl as vt } from "./lib/canonical-url.js";
|
|
67
|
+
import { PAGE_STATE_TTL_PARAM as yt, usePageStateTtl as bt } from "./hooks/usePageStateTtl.js";
|
|
68
|
+
import { useRegisterRetainedQuery as xt } from "./hooks/usePageStateRuntime.js";
|
|
69
|
+
import { AuthShell as St } from "./components/pages/auth/AuthShell.js";
|
|
70
|
+
import { SignIn as Ct } from "./components/pages/auth/SignIn.js";
|
|
71
|
+
import { SignUp as wt } from "./components/pages/auth/SignUp.js";
|
|
72
|
+
import { Forgot as Tt } from "./components/pages/auth/Forgot.js";
|
|
73
|
+
import { Reset as Q } from "./components/pages/auth/Reset.js";
|
|
74
|
+
import { TwoFA as Et } from "./components/pages/auth/TwoFA.js";
|
|
75
|
+
import { Profile as Dt } from "./components/pages/profile/Profile.js";
|
|
76
|
+
import { Preferences as Ot } from "./components/pages/profile/Preferences.js";
|
|
77
|
+
import { registerScreen as kt } from "./stores/screen-registry.js";
|
|
78
|
+
import { CurrentScreenProvider as At, useCurrentScreen as jt } from "./hooks/useCurrentScreen.js";
|
|
79
|
+
import { App as $ } from "./app.js";
|
|
80
|
+
import { Batch as Mt } from "./api/batch.js";
|
|
81
|
+
import { useAggregate as Nt } from "./hooks/useAggregate.js";
|
|
82
|
+
import { useAllEntityData as Pt } from "./hooks/useAllEntityData.js";
|
|
83
|
+
import { objectQueryKey as Ft, useObject as It } from "./hooks/useObject.js";
|
|
84
|
+
import { fileReferenceJSONQueryKey as Lt, useFileReferenceJSON as Rt } from "./hooks/useFileReferenceJSON.js";
|
|
85
|
+
import { useDebounce as zt } from "./hooks/useDebounce.js";
|
|
86
|
+
import { RefCombobox as Bt } from "./components/fields/RefCombobox.js";
|
|
87
|
+
import { getFileWidget as Vt, hasFileWidget as Ht, registerFileWidget as Ut } from "./components/file-widgets/registry.js";
|
|
88
|
+
import { UploadError as Wt, discardFile as Gt, formatBytes as Kt, uploadFile as qt, validateClientSide as Jt } from "./components/file-widgets/upload.js";
|
|
89
|
+
import { getImageCropper as Yt, setImageCropper as Xt } from "./components/file-widgets/cropper.js";
|
|
90
|
+
import { FileDraftScope as Zt, useDraftRegistration as Qt, useFileDraftScope as $t } from "./components/file-widgets/draft-scope.js";
|
|
91
|
+
import { SquareImage as en } from "./components/file-widgets/SquareImage.js";
|
|
92
|
+
import { CircleImage as tn } from "./components/file-widgets/CircleImage.js";
|
|
93
|
+
import { WideBanner as nn } from "./components/file-widgets/WideBanner.js";
|
|
94
|
+
import { StructureField as rn } from "./components/fields/StructureField.js";
|
|
95
|
+
import { useLiveObject as an } from "./hooks/useLiveObject.js";
|
|
96
|
+
import { useCreateObject as on, useDeleteObject as sn, useUpdateObject as cn } from "./hooks/useMutations.js";
|
|
97
|
+
import { useSetStatus as ln } from "./hooks/useObjectStatus.js";
|
|
98
|
+
import { useDeleteProperty as un, useSetProperty as dn } from "./hooks/useProperties.js";
|
|
99
|
+
import { NO_VALUE_OPS as fn, OP_LABELS as pn, countActiveFilters as mn, hasOrGroups as hn, parseFilterURLState as gn, parseFiltersFromURL as _n, setFiltersInURL as vn } from "./lib/filters.js";
|
|
100
|
+
import { useFilters as yn } from "./hooks/useFilters.js";
|
|
101
|
+
import { useColumns as bn } from "./hooks/useColumns.js";
|
|
102
|
+
import { getLayoutWidget as xn, hasLayoutWidget as Sn, registerLayoutWidget as Cn } from "./components/detail-layout/widgets/registry.js";
|
|
103
|
+
import { useScreenBack as wn } from "./hooks/useScreenBack.js";
|
|
104
|
+
import { usePageState as Tn } from "./hooks/usePageState.js";
|
|
105
|
+
import { useTabSearchMirror as En } from "./hooks/useTabSearchMirror.js";
|
|
106
|
+
import { useScreenTab as Dn } from "./hooks/useScreenTab.js";
|
|
107
|
+
import { SCROLL_STATE_KEY as On, usePlainScrollRestoration as kn, useSavedScrollOffset as An, useVirtualScrollRestoration as jn } from "./lib/scroll-restoration.js";
|
|
108
|
+
import { PageHeader as Mn } from "./components/chrome/PageHeader.js";
|
|
109
|
+
import { EmptyState as Nn } from "./components/shared/EmptyState.js";
|
|
110
|
+
import { FilterDrawer as Pn } from "./components/filters/FilterDrawer.js";
|
|
111
|
+
import { FilterChips as Fn } from "./components/filters/FilterChips.js";
|
|
112
|
+
import { ColumnPicker as In } from "./components/list/ColumnPicker.js";
|
|
113
|
+
import { ViewSwitcher as Ln } from "./components/list/ViewSwitcher.js";
|
|
114
|
+
import { evaluateFilterTree as Rn } from "./lib/filter-evaluator.js";
|
|
115
|
+
import { commonVariantActionCodes as zn, effectiveScreenForRecord as Bn, resolveEntityVariantCode as Vn, resolveScreenVariantCode as Hn, variantActionCodesForRecord as Un } from "./lib/variants.js";
|
|
116
|
+
import { ObjectActionBar as Wn, useObjectActions as Gn } from "./components/actions/ObjectActionBar.js";
|
|
117
|
+
import { RefreshControl as Kn } from "./components/shared/RefreshControl.js";
|
|
118
|
+
import { QEField as qn, QuickPeek as Jn } from "./components/list/QuickPeek.js";
|
|
119
|
+
import { InlineEditCell as Yn } from "./components/list/InlineEditCell.js";
|
|
120
|
+
import { ChangePasswordDialog as Xn } from "./components/shared/ChangePasswordDialog.js";
|
|
121
|
+
import { ImpersonationStartModal as Zn } from "./components/layout/ImpersonationStartModal.js";
|
|
122
|
+
import { AgentElicitForm as Qn } from "./components/agents/AgentElicitForm.js";
|
|
123
|
+
import { AgentPicker as $n } from "./components/agents/AgentPicker.js";
|
|
124
|
+
import { AgentConversationDrawer as er } from "./components/agents/AgentConversationDrawer.js";
|
|
125
|
+
import { answerQuestion as tr, approveInvocation as nr, cancelConversation as rr, cancelInvocation as ir, createConversation as ar, listAvailableAgents as or, listConversations as sr, loadConversationInvocations as cr, loadConversationTurns as lr, loadHistory as ur, rejectInvocation as dr, sendElicitResponse as fr, sendMessage as pr } from "./api/agents.js";
|
|
126
|
+
import { useAgentConversation as mr } from "./hooks/useAgentConversation.js";
|
|
127
|
+
import { formatCount as hr, formatEstimatedCount as gr, formatExactCount as _r } from "./lib/format-count.js";
|
|
128
|
+
import { buildMassEditTargets as vr, parseTargetFilter as yr } from "./lib/mass-edit.js";
|
|
129
|
+
import { MULTIPLE_VALUES as br, PropertyGridEditor as xr, detectCommonValue as Sr } from "./components/actions/PropertyGridEditor.js";
|
|
130
|
+
import { useLocation as Cr, useNavigate as wr, useParams as Tr, useSearchParams as Er } from "react-router";
|
|
131
|
+
export { it as ACTION_DATA_CURSOR_KEY, at as ACTION_DATA_KEY, ye as ActionBatchError, gt as ActionRunnerProvider, Xe as AgentChatPanel, er as AgentConversationDrawer, Qn as AgentElicitForm, $n as AgentPicker, $ as App, St as AuthShell, j as Avatar, Mt as Batch, q as BoolToggle, M as BrandGlyph, We as Breadcrumbs, D as Btn, ee as CURSOR_LANGUAGE_CHANGED, te as CURSOR_SEMANTICS_MISMATCH, Xn as ChangePasswordDialog, Y as Check, L as Chip, tn as CircleImage, Z as ClassifiedFieldLocked, In as ColumnPicker, Ye as CommandPalette, Ae as ConfirmDialog, At as CurrentScreenProvider, H as DEFAULT_RESPONSIVE_BREAKPOINTS, re as DateInput, $ as Declarion, N as Dropdown, _e as DynamicIcon, Nn as EmptyState, ut as EntityClient, ie as FieldLabel, Zt as FileDraftScope, Fn as FilterChips, Pn as FilterDrawer, Tt as Forgot, P as HoverCard, E as Icon, O as IconBtn, qe as ImpersonationBanner, Je as ImpersonationFrame, Zn as ImpersonationStartModal, F as InfoTooltip, Yn as InlineEditCell, ae as JsonField, A as Kbd, v as MANDATORY_LANGUAGE, br as MULTIPLE_VALUES, J as MenuItem, oe as MultiSelect, fn as NO_VALUE_OPS, pn as OP_LABELS, Wn as ObjectActionBar, e as OrderedMap, yt as PAGE_STATE_TTL_PARAM, Mn as PageHeader, se as PasswordInput, k as Pill, Ot as Preferences, Dt as Profile, xr as PropertyGridEditor, qn as QEField, ce as QuickEditCell, Jn as QuickPeek, ve as Rail, V as RecordIdBadge, dt as RefCache, Bt as RefCombobox, le as RefField, Kn as RefreshControl, Q as Reset, W as ResponsiveModeProvider, K as RowField, On as SCROLL_STATE_KEY, z as SectionCard, ue as Select, Re as Sidebar, Ct as SignIn, wt as SignUp, m as SmartDetailPage, h as SmartListPage, g as SmartRecordListPage, X as Spinner, en as SquareImage, B as StatTile, rn as StructureField, Ke as TabStrip, de as TagsInput, He as TenantChip, fe as TextArea, pe as TextInput, I as Tooltip, Ge as TopBar, Et as TwoFA, Wt as UploadError, me as ViewField, Ln as ViewSwitcher, nn as WideBanner, ot as actionDataQueryKey, tr as answerQuestion, nr as approveInvocation, be as buildActionBody, r as buildDetailHrefFromId, i as buildEntityDetailHref, vr as buildMassEditTargets, a as buildRowDetailHref, ze as buildSections, rr as cancelConversation, ir as cancelInvocation, vt as canonicalUrl, Ze as classificationTier, t as coerceDisplayString, zn as commonVariantActionCodes, mn as countActiveFilters, ar as createConversation, st as cursorActionDataQueryKey, pt as cursorEntityDataQueryKey, mt as cursorEntityStableKey, xe as deleteObject, Sr as detectCommonValue, Gt as discardFile, Bn as effectiveScreenForRecord, ft as entityClient, Me as entityDataQueryKey, Ue as envTone, Rn as evaluateFilterTree, Se as executeAction, o as extractPkValues, we as failureTitle, Qe as fieldAccessInfo, $e as fieldClassification, s as fieldDisplayName, et as fieldRequiredPermission, Lt as fileReferenceJSONQueryKey, Kt as formatBytes, hr as formatCount, gr as formatEstimatedCount, _r as formatExactCount, n as formatOffsetTimestamp, Vt as getFileWidget, he as getIcon, Yt as getImageCropper, xn as getLayoutWidget, c as getPrimaryKeyFields, Ht as hasFileWidget, Sn as hasLayoutWidget, hn as hasOrGroups, ne as isCursorStaleError, tt as isFieldReadable, nt as isFieldSoDProtected, rt as isFieldWritable, or as listAvailableAgents, sr as listConversations, cr as loadConversationInvocations, lr as loadConversationTurns, ur as loadHistory, y as makeTextFn, Ft as objectQueryKey, gn as parseFilterURLState, _n as parseFiltersFromURL, yr as parseTargetFilter, b as pickLocalized, l as pkValuePartsToId, u as pkValuesFromId, d as pkValuesToDetailId, f as pkValuesToId, x as pluralText, Ut as registerFileWidget, Cn as registerLayoutWidget, kt as registerScreen, dr as rejectInvocation, C as reresolveLanguage, p as resolveDetailRoute, Vn as resolveEntityVariantCode, Hn as resolveScreenVariantCode, U as resolveViewportCategory, Ce as restoreObject, fr as sendElicitResponse, pr as sendMessage, vn as setFiltersInURL, ge as setIconRegistry, Xt as setImageCropper, S as textWithNodes, qt as uploadFile, ct as useActionData, _t as useActionRunner, mr as useAgentConversation, Nt as useAggregate, Pt as useAllEntityData, Be as useAuth, bn as useColumns, on as useCreateObject, jt as useCurrentScreen, lt as useCursorActionData, ht as useCursorEntityData, zt as useDebounce, sn as useDeleteObject, un as useDeleteProperty, w as useDeploymentLanguage, Qt as useDraftRegistration, Te as useEffectiveParam, Fe as useEntity, Ne as useEntityCount, Pe as useEntityData, $t as useFileDraftScope, Rt as useFileReferenceJSON, yn as useFilters, Ve as useImpersonation, T as useLanguage, an as useLiveObject, Cr as useLocation, wr as useNavigate, It as useObject, Gn as useObjectActions, Tn as usePageState, bt as usePageStateTtl, Ee as useParam, Tr as useParams, kn as usePlainScrollRestoration, De as usePublicParams, xt as useRegisterRetainedQuery, Oe as useResolvedParam, G as useResponsiveMode, An as useSavedScrollOffset, _ as useSchema, Ie as useScreen, wn as useScreenBack, Dn as useScreenTab, Er as useSearchParams, dn as useSetProperty, ln as useSetStatus, je as useTabNavigate, En as useTabSearchMirror, ke as useTabStore, R as useText, cn as useUpdateObject, Le as useViews, jn as useVirtualScrollRestoration, Jt as validateClientSide, Un as variantActionCodesForRecord };
|