@declarion/react 0.142.0 → 0.147.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{Icons-Dzl-AkD_.d.ts → Icons-BdXCxyw3.d.ts} +0 -4
- package/dist-lib/api/access-expiry.js +1 -2
- package/dist-lib/api/agents.js +1 -2
- package/dist-lib/api/audience.js +1 -2
- package/dist-lib/api/auth-redirect.js +1 -2
- package/dist-lib/api/auth.js +1 -2
- package/dist-lib/api/batch.js +1 -2
- package/dist-lib/api/client.js +27 -28
- package/dist-lib/api/data.js +23 -24
- package/dist-lib/api/entities.js +36 -37
- package/dist-lib/api/events.js +6 -7
- package/dist-lib/api/fileReferences.js +1 -2
- package/dist-lib/api/params.js +1 -2
- package/dist-lib/api/properties.js +1 -2
- package/dist-lib/api/request-bounds.js +1 -2
- package/dist-lib/api/schema.js +5 -6
- package/dist-lib/api/session-renewal.js +6 -7
- package/dist-lib/api/status.js +1 -2
- package/dist-lib/app.js +154 -155
- package/dist-lib/components/actions/ActionButton.js +32 -33
- package/dist-lib/components/actions/ActionDialog.js +85 -86
- package/dist-lib/components/actions/ActionResultDialog.impl.js +48 -49
- package/dist-lib/components/actions/ActionResultDialog.js +1 -2
- package/dist-lib/components/actions/ActionRunner.js +96 -97
- package/dist-lib/components/actions/ObjectActionBar.js +49 -50
- package/dist-lib/components/actions/PropertyGridEditor.js +50 -51
- package/dist-lib/components/actions/ResponsiveActionBar.js +127 -128
- package/dist-lib/components/actions/RowActionsKebab.js +27 -28
- package/dist-lib/components/agents/AgentChatPanel.impl.js +317 -318
- package/dist-lib/components/agents/AgentChatPanel.js +1 -2
- package/dist-lib/components/agents/AgentConversationDrawer.js +6 -7
- package/dist-lib/components/agents/AgentElicitForm.js +13 -14
- package/dist-lib/components/agents/AgentOpenFollower.impl.js +1 -2
- package/dist-lib/components/agents/AgentOpenFollower.js +1 -2
- package/dist-lib/components/agents/AgentPicker.js +1 -2
- package/dist-lib/components/agents/ChatAttachments.js +22 -23
- package/dist-lib/components/agents/transcript-runs.js +1 -2
- package/dist-lib/components/chrome/AssociationTabs.js +44 -45
- package/dist-lib/components/chrome/AuditMetaStrip.js +1 -2
- package/dist-lib/components/chrome/Breadcrumbs.js +1 -2
- package/dist-lib/components/chrome/HighlightsStrip.js +1 -2
- package/dist-lib/components/chrome/PageHeader.js +12 -13
- package/dist-lib/components/chrome/PageShell.js +1 -2
- package/dist-lib/components/chrome/RecordHeader.js +1 -2
- package/dist-lib/components/chrome/headerActionZone.js +0 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.js +463 -464
- package/dist-lib/components/detail-layout/AssociatedToolbar.js +43 -44
- package/dist-lib/components/detail-layout/ChildrenBlock.js +24 -25
- package/dist-lib/components/detail-layout/ChildrenCards.js +29 -30
- package/dist-lib/components/detail-layout/ChildrenList.js +23 -24
- package/dist-lib/components/detail-layout/ChildrenTable.js +50 -51
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +164 -165
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +14 -15
- package/dist-lib/components/detail-layout/DetailHighlights.js +23 -24
- package/dist-lib/components/detail-layout/DraggableChildrenTable.js +76 -77
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +90 -91
- package/dist-lib/components/detail-layout/ErrorSummary.js +7 -8
- package/dist-lib/components/detail-layout/EvidenceBlock.js +15 -16
- package/dist-lib/components/detail-layout/FieldRow.js +11 -12
- package/dist-lib/components/detail-layout/FieldsBlock.js +31 -32
- package/dist-lib/components/detail-layout/LayoutColumn.js +1 -2
- package/dist-lib/components/detail-layout/LayoutRenderer.js +11 -12
- package/dist-lib/components/detail-layout/LayoutRow.js +1 -2
- package/dist-lib/components/detail-layout/LayoutTabs.js +23 -24
- package/dist-lib/components/detail-layout/PropertiesBlock.js +38 -39
- package/dist-lib/components/detail-layout/QuickAddForm.js +28 -29
- package/dist-lib/components/detail-layout/SectionBlock.js +9 -10
- package/dist-lib/components/detail-layout/StatusesBlock.js +1 -2
- package/dist-lib/components/detail-layout/TimelineComposer.js +19 -20
- package/dist-lib/components/detail-layout/blockMeta.js +1 -2
- package/dist-lib/components/detail-layout/useManualColumnResize.js +1 -2
- package/dist-lib/components/detail-layout/useQuickAdd.js +21 -22
- package/dist-lib/components/detail-layout/visibility.js +1 -2
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +25 -26
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +18 -19
- package/dist-lib/components/detail-layout/widgets/MonacoJson.js +1 -2
- package/dist-lib/components/detail-layout/widgets/WidgetHost.js +10 -11
- package/dist-lib/components/detail-layout/widgets/builtins.js +1 -2
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +1 -2
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +1 -2
- package/dist-lib/components/detail-layout/widgets/registry.js +1 -2
- package/dist-lib/components/fields/BoolField.js +1 -2
- package/dist-lib/components/fields/EmailField.js +5 -6
- package/dist-lib/components/fields/EnumField.js +7 -8
- package/dist-lib/components/fields/FileReferenceField.js +18 -19
- package/dist-lib/components/fields/IntArrayField.js +11 -12
- package/dist-lib/components/fields/JsonEditor.js +1 -2
- package/dist-lib/components/fields/JsonField.js +1 -2
- package/dist-lib/components/fields/MultilangArrayField.js +22 -23
- package/dist-lib/components/fields/MultilangField.js +13 -14
- package/dist-lib/components/fields/MultilangTextField.js +13 -14
- package/dist-lib/components/fields/NumberField.js +5 -6
- package/dist-lib/components/fields/PasswordField.js +1 -2
- package/dist-lib/components/fields/PhoneField.js +24 -25
- package/dist-lib/components/fields/RefCombobox.js +42 -43
- package/dist-lib/components/fields/RefField.js +14 -15
- package/dist-lib/components/fields/RichTextField.js +29 -30
- package/dist-lib/components/fields/SecretField.js +1 -2
- package/dist-lib/components/fields/StringArrayField.js +29 -30
- package/dist-lib/components/fields/StringField.js +12 -13
- package/dist-lib/components/fields/StructureField.js +60 -61
- package/dist-lib/components/fields/TextField.js +18 -19
- package/dist-lib/components/fields/TimestampField.js +17 -18
- package/dist-lib/components/fields/UrlField.js +5 -6
- package/dist-lib/components/fields/cells/factories/badge.js +5 -6
- package/dist-lib/components/fields/cells/factories/boolPill.js +1 -2
- package/dist-lib/components/fields/cells/factories/code.js +1 -2
- package/dist-lib/components/fields/cells/factories/date.js +1 -2
- package/dist-lib/components/fields/cells/factories/email.js +1 -2
- package/dist-lib/components/fields/cells/factories/emptyCell.js +0 -1
- package/dist-lib/components/fields/cells/factories/fileReference.js +1 -2
- package/dist-lib/components/fields/cells/factories/host-icons.js +1 -2
- package/dist-lib/components/fields/cells/factories/json.js +1 -2
- package/dist-lib/components/fields/cells/factories/link.js +10 -11
- package/dist-lib/components/fields/cells/factories/markdown.js +14 -15
- package/dist-lib/components/fields/cells/factories/markdownPreview.js +1 -2
- package/dist-lib/components/fields/cells/factories/money.js +1 -2
- package/dist-lib/components/fields/cells/factories/multilangInline.js +1 -2
- package/dist-lib/components/fields/cells/factories/nextRun.js +8 -9
- package/dist-lib/components/fields/cells/factories/number.js +1 -2
- package/dist-lib/components/fields/cells/factories/passwordMask.js +1 -2
- package/dist-lib/components/fields/cells/factories/phone.js +1 -2
- package/dist-lib/components/fields/cells/factories/refLink.js +13 -14
- package/dist-lib/components/fields/cells/factories/richTextPreview.js +16 -17
- package/dist-lib/components/fields/cells/factories/statusPill.js +5 -6
- package/dist-lib/components/fields/cells/factories/tagList.js +6 -7
- package/dist-lib/components/fields/cells/factories/text.js +1 -2
- package/dist-lib/components/fields/cells/factories/timestamp.js +1 -2
- package/dist-lib/components/fields/cells/factories/url-helpers.js +1 -2
- package/dist-lib/components/fields/cells/factories/url.js +13 -14
- package/dist-lib/components/fields/cells/registry.js +1 -2
- package/dist-lib/components/fields/index.js +19 -20
- package/dist-lib/components/fields/langMap.js +1 -2
- package/dist-lib/components/fields/secretValue.js +1 -2
- package/dist-lib/components/file-widgets/CircleImage.js +1 -2
- package/dist-lib/components/file-widgets/DocumentCard.js +101 -102
- package/dist-lib/components/file-widgets/FileList.js +35 -36
- package/dist-lib/components/file-widgets/Grid.js +119 -120
- package/dist-lib/components/file-widgets/GridLazy.js +1 -2
- package/dist-lib/components/file-widgets/ImageWidget.js +189 -190
- package/dist-lib/components/file-widgets/LabeledSlots.js +14 -15
- package/dist-lib/components/file-widgets/SquareImage.js +1 -2
- package/dist-lib/components/file-widgets/UnknownFileWidget.js +1 -2
- package/dist-lib/components/file-widgets/UploadFailureText.js +1 -2
- package/dist-lib/components/file-widgets/WideBanner.js +1 -2
- package/dist-lib/components/file-widgets/builtins.js +1 -2
- package/dist-lib/components/file-widgets/cropper.js +1 -2
- package/dist-lib/components/file-widgets/draft-scope.js +1 -2
- package/dist-lib/components/file-widgets/helpers.js +1 -2
- package/dist-lib/components/file-widgets/host.js +33 -34
- package/dist-lib/components/file-widgets/payload.js +1 -2
- package/dist-lib/components/file-widgets/registry.js +1 -2
- package/dist-lib/components/file-widgets/upload.js +41 -42
- package/dist-lib/components/file-widgets/useEmbedFileSrc.js +12 -13
- package/dist-lib/components/file-widgets/useFileSelection.js +1 -2
- package/dist-lib/components/file-widgets/value.js +1 -2
- package/dist-lib/components/filters/FilterChips.js +15 -16
- package/dist-lib/components/filters/FilterConditionValue.js +15 -16
- package/dist-lib/components/filters/FilterDrawer.js +141 -142
- package/dist-lib/components/filters/FilterOmittedNotice.js +1 -2
- package/dist-lib/components/filters/filter-op-label.js +1 -2
- package/dist-lib/components/layout/CommandPalette.impl.js +24 -25
- package/dist-lib/components/layout/CommandPalette.js +1 -2
- package/dist-lib/components/layout/DirtyTabsCloseDialog.impl.js +15 -16
- package/dist-lib/components/layout/DirtyTabsCloseDialog.js +1 -2
- package/dist-lib/components/layout/ImpersonationBanner.impl.js +6 -7
- package/dist-lib/components/layout/ImpersonationBanner.js +1 -2
- package/dist-lib/components/layout/ImpersonationFrame.js +4 -5
- package/dist-lib/components/layout/ImpersonationStartModal.impl.js +4 -5
- package/dist-lib/components/layout/ImpersonationStartModal.js +1 -2
- package/dist-lib/components/layout/Layout.js +132 -140
- package/dist-lib/components/layout/Rail.js +11 -12
- package/dist-lib/components/layout/Sidebar.js +60 -61
- package/dist-lib/components/layout/TabStrip.js +66 -67
- package/dist-lib/components/layout/TenantChip.js +21 -22
- package/dist-lib/components/layout/TopBar.js +89 -90
- package/dist-lib/components/layout/tab-close.js +1 -2
- package/dist-lib/components/list/ColumnPicker.js +35 -36
- package/dist-lib/components/list/InlineEditCell.js +22 -23
- package/dist-lib/components/list/PeekFieldCell.js +7 -8
- package/dist-lib/components/list/QuickPeek.js +29 -30
- package/dist-lib/components/list/ViewSwitcher.js +44 -45
- package/dist-lib/components/list/peekDraftStore.js +1 -2
- package/dist-lib/components/pages/AdminCatalogPage.impl.js +59 -60
- package/dist-lib/components/pages/AdminCatalogPage.js +1 -2
- package/dist-lib/components/pages/DocumentsMenu.js +53 -54
- package/dist-lib/components/pages/ExportMenu.js +37 -38
- package/dist-lib/components/pages/NoScreensPage.impl.js +5 -6
- package/dist-lib/components/pages/NoScreensPage.js +1 -2
- package/dist-lib/components/pages/NotFoundPage.impl.js +7 -8
- package/dist-lib/components/pages/NotFoundPage.js +1 -2
- package/dist-lib/components/pages/RecordDocumentsPanel.js +40 -41
- package/dist-lib/components/pages/RecordNotesPanel.js +43 -44
- package/dist-lib/components/pages/RecordPanels.js +1 -2
- package/dist-lib/components/pages/SSOCallbackPage.impl.js +6 -7
- package/dist-lib/components/pages/SSOCallbackPage.js +1 -2
- package/dist-lib/components/pages/SmartDetailPage.impl.js +501 -502
- package/dist-lib/components/pages/SmartDetailPage.js +1 -2
- package/dist-lib/components/pages/SmartListPage.impl.js +316 -317
- package/dist-lib/components/pages/SmartListPage.js +1 -2
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +316 -317
- package/dist-lib/components/pages/SmartRecordListPage.js +1 -2
- package/dist-lib/components/pages/auth/AuthShell.js +14 -15
- package/dist-lib/components/pages/auth/CodeInput.js +0 -1
- package/dist-lib/components/pages/auth/Forgot.impl.js +12 -13
- package/dist-lib/components/pages/auth/Forgot.js +1 -2
- package/dist-lib/components/pages/auth/Reset.impl.js +20 -21
- package/dist-lib/components/pages/auth/Reset.js +1 -2
- package/dist-lib/components/pages/auth/SignIn.js +44 -45
- package/dist-lib/components/pages/auth/SignUp.impl.js +35 -36
- package/dist-lib/components/pages/auth/SignUp.js +1 -2
- package/dist-lib/components/pages/auth/SignUpCode.js +17 -18
- package/dist-lib/components/pages/auth/TwoFA.impl.js +9 -10
- package/dist-lib/components/pages/auth/TwoFA.js +1 -2
- package/dist-lib/components/pages/auth/icons.js +1 -2
- package/dist-lib/components/pages/exportRequest.js +1 -2
- package/dist-lib/components/pages/list/DataCell.js +1 -2
- package/dist-lib/components/pages/list/DeleteViewDialog.js +5 -6
- package/dist-lib/components/pages/list/ListCardRow.js +53 -54
- package/dist-lib/components/pages/list/ListCardsBody.js +1 -2
- package/dist-lib/components/pages/list/ListFloatbar.js +25 -26
- package/dist-lib/components/pages/list/ListFooter.js +17 -18
- package/dist-lib/components/pages/list/ListHeader.js +31 -32
- package/dist-lib/components/pages/list/ListNoRows.js +32 -33
- package/dist-lib/components/pages/list/ListTable.js +29 -30
- package/dist-lib/components/pages/list/ListTableRow.js +1 -2
- package/dist-lib/components/pages/list/ListToolbar.js +58 -59
- package/dist-lib/components/pages/list/ListUrlBanner.js +1 -2
- package/dist-lib/components/pages/list/RowActionsCell.js +6 -7
- package/dist-lib/components/pages/list/RowContextMenu.js +1 -2
- package/dist-lib/components/pages/list/SaveViewDialog.js +5 -6
- package/dist-lib/components/pages/list/SortHeaderMenu.js +25 -26
- package/dist-lib/components/pages/list/cardProjection.js +16 -17
- package/dist-lib/components/pages/list/column-sizing.js +1 -2
- package/dist-lib/components/pages/list/columns.js +74 -75
- package/dist-lib/components/pages/list/filter-meta.js +1 -2
- package/dist-lib/components/pages/list/page-size.js +1 -2
- package/dist-lib/components/pages/list/sortable-header.js +1 -2
- package/dist-lib/components/pages/list/table-features.js +1 -2
- package/dist-lib/components/pages/list/use-filter-value-labels.js +15 -16
- package/dist-lib/components/pages/list/useActiveView.js +1 -2
- package/dist-lib/components/pages/list/useHeaderReorder.js +1 -2
- package/dist-lib/components/pages/list/useListColumnLayout.js +6 -7
- package/dist-lib/components/pages/list/useListFilterPresentation.js +1 -2
- package/dist-lib/components/pages/list/useListQuery.js +1 -2
- package/dist-lib/components/pages/list/useListRowInteraction.js +37 -38
- package/dist-lib/components/pages/list/useListSelection.js +16 -17
- package/dist-lib/components/pages/list/useListSort.js +1 -2
- package/dist-lib/components/pages/list/useListViews.js +31 -32
- package/dist-lib/components/pages/list/useRowMenu.js +20 -21
- package/dist-lib/components/pages/list/visible-filters.js +1 -2
- package/dist-lib/components/pages/profile/Preferences.impl.js +44 -45
- package/dist-lib/components/pages/profile/Preferences.js +1 -2
- package/dist-lib/components/pages/profile/Profile.impl.js +223 -224
- package/dist-lib/components/pages/profile/Profile.js +1 -2
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +133 -134
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +1 -2
- package/dist-lib/components/params/ParamsBlock.js +30 -31
- package/dist-lib/components/params/param-editors.js +58 -59
- package/dist-lib/components/primitives/Avatar.js +1 -2
- package/dist-lib/components/primitives/BoolToggle.js +1 -2
- package/dist-lib/components/primitives/BrandGlyph.js +1 -2
- package/dist-lib/components/primitives/BrandLogo.js +1 -2
- package/dist-lib/components/primitives/Btn.js +1 -2
- package/dist-lib/components/primitives/Check.js +1 -2
- package/dist-lib/components/primitives/Chip.js +1 -2
- package/dist-lib/components/primitives/ClassifiedFieldLocked.js +1 -2
- package/dist-lib/components/primitives/Dropdown.js +2 -3
- package/dist-lib/components/primitives/Fields.js +128 -129
- package/dist-lib/components/primitives/HoverCard.js +2 -3
- package/dist-lib/components/primitives/IconBtn.js +1 -2
- package/dist-lib/components/primitives/Icons.js +1 -2
- package/dist-lib/components/primitives/Kbd.js +1 -2
- package/dist-lib/components/primitives/MenuItem.js +1 -2
- package/dist-lib/components/primitives/Pill.js +1 -2
- package/dist-lib/components/primitives/RecordIdBadge.js +1 -2
- package/dist-lib/components/primitives/RetryButton.js +5 -6
- package/dist-lib/components/primitives/RowField.js +1 -2
- package/dist-lib/components/primitives/SectionCard.js +1 -2
- package/dist-lib/components/primitives/Spinner.js +1 -2
- package/dist-lib/components/primitives/StatTile.js +1 -2
- package/dist-lib/components/primitives/Tooltip.js +1 -2
- package/dist-lib/components/primitives/dataTableStyles.js +1 -2
- package/dist-lib/components/shared/BlankScreen.js +1 -2
- package/dist-lib/components/shared/ChangePasswordDialog.impl.js +20 -21
- package/dist-lib/components/shared/ChangePasswordDialog.js +1 -2
- package/dist-lib/components/shared/ConfirmDialog.js +7 -8
- package/dist-lib/components/shared/ConnectionNotice.js +1 -2
- package/dist-lib/components/shared/CopyButton.js +1 -2
- package/dist-lib/components/shared/DynamicIcon.js +1 -2
- package/dist-lib/components/shared/EmptyState.js +1 -2
- package/dist-lib/components/shared/ErrorBoundary.js +10 -11
- package/dist-lib/components/shared/LoadingSkeleton.js +1 -2
- package/dist-lib/components/shared/LucideIcon.js +1 -2
- package/dist-lib/components/shared/Markdown.js +1 -2
- package/dist-lib/components/shared/MarkdownRenderer.js +22 -23
- package/dist-lib/components/shared/ModalFrame.js +1 -2
- package/dist-lib/components/shared/RefreshControl.js +6 -7
- package/dist-lib/components/shared/StatusGroupsDisplay.js +16 -17
- package/dist-lib/components/shared/StatusStepper.js +1 -2
- package/dist-lib/components/shared/toast/DeclarionToast.js +1 -2
- package/dist-lib/components/shared/useOwnRefresh.js +1 -2
- package/dist-lib/embed/EmbedAuthBootstrap.js +30 -31
- package/dist-lib/embed/EmbedContext.js +1 -2
- package/dist-lib/embed/EmbedDirtyReporter.js +6 -7
- package/dist-lib/embed/EmbedHistoryTracker.js +1 -2
- package/dist-lib/embed/EmbedLocationReporter.js +11 -12
- package/dist-lib/embed/EmbedResizeReporter.js +9 -10
- package/dist-lib/embed/EmbedUnsavedGuard.js +5 -6
- package/dist-lib/embed/embed-dirty.js +1 -2
- package/dist-lib/embed/embed-history.js +1 -2
- package/dist-lib/embed/embed-nav-guard.js +1 -2
- package/dist-lib/embed/file-src.js +12 -13
- package/dist-lib/embed/handshake.js +1 -2
- package/dist-lib/embed/params.js +1 -2
- package/dist-lib/embed/protocol.js +1 -2
- package/dist-lib/embed/screen-location.js +1 -2
- package/dist-lib/embed/theme.js +1 -2
- package/dist-lib/embed/token.js +1 -2
- package/dist-lib/embed/useEmbedNavigate.js +25 -26
- package/dist-lib/embed/useGlobalLinkInterceptor.js +9 -10
- package/dist-lib/hooks/useActionData.js +1 -2
- package/dist-lib/hooks/useActiveTabFollowsRoute.js +7 -8
- package/dist-lib/hooks/useAgentConversation.js +122 -123
- package/dist-lib/hooks/useAggregate.js +1 -2
- package/dist-lib/hooks/useAllEntityData.js +9 -10
- package/dist-lib/hooks/useAssociatedData.js +1 -2
- package/dist-lib/hooks/useAuth.js +26 -27
- package/dist-lib/hooks/useBranding.js +1 -2
- package/dist-lib/hooks/useBrandingChrome.js +16 -17
- package/dist-lib/hooks/useChildrenData.js +4 -5
- package/dist-lib/hooks/useColumns.js +1 -2
- package/dist-lib/hooks/useConnectionNotice.js +16 -17
- package/dist-lib/hooks/useCurrentLocation.js +1 -2
- package/dist-lib/hooks/useCurrentScreen.js +1 -2
- package/dist-lib/hooks/useCursorEntityData.js +1 -2
- package/dist-lib/hooks/useDebounce.js +1 -2
- package/dist-lib/hooks/useDisplayTimeZone.js +4 -5
- package/dist-lib/hooks/useDocumentTitle.js +5 -6
- package/dist-lib/hooks/useEntity.js +1 -2
- package/dist-lib/hooks/useEntityData.js +1 -2
- package/dist-lib/hooks/useFileReferenceJSON.js +9 -10
- package/dist-lib/hooks/useFilters.js +5 -6
- package/dist-lib/hooks/useFollowAgentOpen.js +40 -41
- package/dist-lib/hooks/useImpersonation.js +15 -16
- package/dist-lib/hooks/useIntentPrefetch.js +6 -7
- package/dist-lib/hooks/useJsonSnapshot.js +1 -2
- package/dist-lib/hooks/useLanguage.js +11 -12
- package/dist-lib/hooks/useLiveObject.js +6 -7
- package/dist-lib/hooks/useLongPress.js +1 -2
- package/dist-lib/hooks/useMutations.js +31 -32
- package/dist-lib/hooks/useObject.js +1 -2
- package/dist-lib/hooks/useObjectStatus.js +4 -5
- package/dist-lib/hooks/usePageState.js +9 -10
- package/dist-lib/hooks/usePageStateRuntime.js +16 -17
- package/dist-lib/hooks/usePageStateTtl.js +1 -2
- package/dist-lib/hooks/useParams.js +58 -59
- package/dist-lib/hooks/useProperties.js +5 -6
- package/dist-lib/hooks/useRealtimeThresholds.js +4 -5
- package/dist-lib/hooks/useRefRecords.js +31 -32
- package/dist-lib/hooks/useRegisterScreenTab.js +12 -13
- package/dist-lib/hooks/useResponsiveMode.js +1 -2
- package/dist-lib/hooks/useRowTenant.js +1 -2
- package/dist-lib/hooks/useSSE.js +100 -101
- package/dist-lib/hooks/useSchema.js +16 -17
- package/dist-lib/hooks/useScreen.js +1 -2
- package/dist-lib/hooks/useScreenBack.js +17 -18
- package/dist-lib/hooks/useScreenTab.js +1 -2
- package/dist-lib/hooks/useTabNavigate.js +25 -26
- package/dist-lib/hooks/useTabSearchMirror.js +6 -7
- package/dist-lib/hooks/useTabTitle.js +10 -11
- package/dist-lib/hooks/useText.js +6 -7
- package/dist-lib/hooks/useTimelineData.js +5 -6
- package/dist-lib/hooks/useUiPreferences.js +31 -32
- package/dist-lib/hooks/useUnsavedInput.js +1 -2
- package/dist-lib/hooks/useVersionWatcher.js +16 -17
- package/dist-lib/hooks/useViews.js +16 -17
- package/dist-lib/hooks/useWindowConversation.js +1 -2
- package/dist-lib/{icon-registry-CUT4eF63.d.ts → icon-registry-BY2tt-GF.d.ts} +0 -2
- package/dist-lib/icons.d.ts +2 -4
- package/dist-lib/icons.js +5 -5
- package/dist-lib/index.d.ts +4 -272
- package/dist-lib/index.js +129 -129
- package/dist-lib/lib/action-dispatch.js +1 -2
- package/dist-lib/lib/actions.js +26 -27
- package/dist-lib/lib/anchor.js +1 -2
- package/dist-lib/lib/brand-tokens.js +1 -2
- package/dist-lib/lib/branding.js +1 -2
- package/dist-lib/lib/canonical-url.js +1 -2
- package/dist-lib/lib/capabilityPrefetch.js +1 -2
- package/dist-lib/lib/child-config.js +1 -2
- package/dist-lib/lib/children-validation.js +2 -3
- package/dist-lib/lib/date-text.js +1 -2
- package/dist-lib/lib/decimal-text.js +1 -2
- package/dist-lib/lib/display-value.js +1 -2
- package/dist-lib/lib/document-templates.js +1 -2
- package/dist-lib/lib/download.js +13 -14
- package/dist-lib/lib/evidence-verdict.js +1 -2
- package/dist-lib/lib/failure.js +4 -5
- package/dist-lib/lib/field-classification.js +1 -2
- package/dist-lib/lib/field-regions.js +1 -2
- package/dist-lib/lib/filter-evaluator.js +1 -2
- package/dist-lib/lib/filters.js +1 -2
- package/dist-lib/lib/format-count.js +1 -2
- package/dist-lib/lib/html-state.js +1 -2
- package/dist-lib/lib/language.js +1 -2
- package/dist-lib/lib/longPressGesture.js +0 -1
- package/dist-lib/lib/mass-edit.js +1 -2
- package/dist-lib/lib/money-text.js +1 -2
- package/dist-lib/lib/number-text.js +1 -2
- package/dist-lib/lib/page-inset.js +1 -2
- package/dist-lib/lib/phone.js +1 -2
- package/dist-lib/lib/profile.js +1 -2
- package/dist-lib/lib/query-retry.js +1 -2
- package/dist-lib/lib/quick-add.js +1 -2
- package/dist-lib/lib/read-display-state.js +1 -2
- package/dist-lib/lib/realtime-query-keys.js +2 -3
- package/dist-lib/lib/realtime-reconcile.js +32 -33
- package/dist-lib/lib/realtime-resync.js +40 -41
- package/dist-lib/lib/record-documents-key.js +1 -2
- package/dist-lib/lib/ref-choices.js +1 -2
- package/dist-lib/lib/refetch-when-idle.js +1 -2
- package/dist-lib/lib/rich-text.js +1 -2
- package/dist-lib/lib/role-label.js +1 -2
- package/dist-lib/lib/rowClickGesture.js +1 -2
- package/dist-lib/lib/safe-url.js +1 -2
- package/dist-lib/lib/schema-routing.js +1 -2
- package/dist-lib/lib/screen-back.js +1 -2
- package/dist-lib/lib/scroll-restoration.js +21 -22
- package/dist-lib/lib/shortcut.js +1 -2
- package/dist-lib/lib/size-value.js +1 -2
- package/dist-lib/lib/sort.js +1 -2
- package/dist-lib/lib/timestamp.js +1 -2
- package/dist-lib/lib/toast.js +1 -2
- package/dist-lib/lib/ui-actions.js +43 -44
- package/dist-lib/lib/utils.js +1 -2
- package/dist-lib/lib/variants.js +1 -2
- package/dist-lib/lib/versionTracker.js +26 -27
- package/dist-lib/lib/viewport-category.js +1 -2
- package/dist-lib/lib/window-election.js +1 -2
- package/dist-lib/stores/auth.js +32 -33
- package/dist-lib/stores/icon-registry.js +1 -2
- package/dist-lib/stores/list-layout.js +0 -1
- package/dist-lib/stores/page-state.js +1 -2
- package/dist-lib/stores/preferences.js +1 -2
- package/dist-lib/stores/realtime.js +1 -2
- package/dist-lib/stores/screen-registry.js +1 -2
- package/dist-lib/stores/tabs.js +1 -2
- package/dist-lib/test/seed-schema.js +4 -5
- package/dist-lib/testing.d.ts +2 -4
- package/dist-lib/testing.js +49 -50
- package/dist-lib/types/api.js +1 -2
- package/dist-lib/types/fieldType.js +1 -2
- package/dist-lib/types/ordmap.js +1 -2
- package/dist-lib/types/schema.js +1 -2
- package/dist-lib/{useResponsiveMode-C4MeAgoS.d.ts → useResponsiveMode-BElw02Gh.d.ts} +1 -19
- package/dist-lib/vite/index.d.ts +0 -2
- package/dist-lib/vite/index.js +1 -2
- package/package.json +11 -11
|
@@ -1,253 +1,253 @@
|
|
|
1
|
-
import {
|
|
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 { Fragment as
|
|
40
|
-
import { Fragment as
|
|
41
|
-
|
|
42
|
-
var
|
|
43
|
-
function
|
|
44
|
-
let
|
|
1
|
+
import { PROFILE_ENTITY as e } from "../../../lib/profile.js";
|
|
2
|
+
import { useTabNavigate as t } from "../../../hooks/useTabNavigate.js";
|
|
3
|
+
import { Btn as n } from "../../primitives/Btn.js";
|
|
4
|
+
import { Chip as r } from "../../primitives/Chip.js";
|
|
5
|
+
import { Icon as i } from "../../primitives/Icons.js";
|
|
6
|
+
import { IconBtn as a } from "../../primitives/IconBtn.js";
|
|
7
|
+
import { Pill as o } from "../../primitives/Pill.js";
|
|
8
|
+
import { SectionCard as s } from "../../primitives/SectionCard.js";
|
|
9
|
+
import { FieldLabel as c, TextInput as l } from "../../primitives/Fields.js";
|
|
10
|
+
import { Spinner as u } from "../../primitives/Spinner.js";
|
|
11
|
+
import { PageShell as d } from "../../chrome/PageShell.js";
|
|
12
|
+
import { RecordHeader as f } from "../../chrome/RecordHeader.js";
|
|
13
|
+
import { FieldRow as p, FieldsGrid as m } from "../../detail-layout/FieldRow.js";
|
|
14
|
+
import { DetailAuditStrip as h } from "../../detail-layout/DetailAuditStrip.js";
|
|
15
|
+
import { EMPTY_CELL as g } from "../../fields/cells/factories/emptyCell.js";
|
|
16
|
+
import { ChangePasswordDialog as _ } from "../../shared/ChangePasswordDialog.js";
|
|
17
|
+
import { useAuthStore as v } from "../../../stores/auth.js";
|
|
18
|
+
import { changePassword as y } from "../../../api/auth.js";
|
|
19
|
+
import { updateEntity as b } from "../../../api/data.js";
|
|
20
|
+
import { FileDraftScope as x, useFileDraftScope as S } from "../../file-widgets/draft-scope.js";
|
|
21
|
+
import { buildFilesPayload as C } from "../../file-widgets/payload.js";
|
|
22
|
+
import { getFileFieldValue as w, renderSchemaField as T } from "../../file-widgets/host.js";
|
|
23
|
+
import { singleFileFromValue as E } from "../../file-widgets/value.js";
|
|
24
|
+
import { DynamicIcon as ee } from "../../shared/DynamicIcon.js";
|
|
25
|
+
import { toast as D } from "../../../lib/toast.js";
|
|
26
|
+
import { useSchema as O } from "../../../hooks/useSchema.js";
|
|
27
|
+
import { useBrandingChrome as k } from "../../../hooks/useBrandingChrome.js";
|
|
28
|
+
import { useCurrentScreen as A } from "../../../hooks/useCurrentScreen.js";
|
|
29
|
+
import { useObject as j } from "../../../hooks/useObject.js";
|
|
30
|
+
import { useResponsiveMode as M } from "../../../hooks/useResponsiveMode.js";
|
|
31
|
+
import { AssociatedBlock as N } from "../../detail-layout/AssociatedBlock.js";
|
|
32
|
+
import { ParamsBlock as P } from "../../params/ParamsBlock.js";
|
|
33
|
+
import { ErrorLine as F } from "../../params/param-editors.js";
|
|
34
|
+
import { useAllParams as I } from "../../../hooks/useParams.js";
|
|
35
|
+
import { useText as L } from "../../../hooks/useText.js";
|
|
36
|
+
import { failureTitle as R } from "../../../lib/failure.js";
|
|
37
|
+
import { LANGUAGE_PARAMETER as z, pluralText as te } from "../../../lib/language.js";
|
|
38
|
+
import { activeRoleLabel as ne } from "../../../lib/role-label.js";
|
|
39
|
+
import { Fragment as B, useId as V, useState as H } from "react";
|
|
40
|
+
import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
41
|
+
// src/components/pages/profile/Profile.impl.tsx
|
|
42
|
+
var K = "avatar";
|
|
43
|
+
function q() {
|
|
44
|
+
let a = t(), c = v((e) => e.user), l = v((e) => e.activeTenant), u = v((e) => e.refreshMe), { data: b } = O(), S = A(), C = k("custom"), w = L(), E = j(e, c?.id), M = E.data?.data, [N, P] = H(!1), [F, I] = H(!1), R = b?.entities[e], z = c?.display_name || c?.email || w("profile.user_fallback", "User"), B = (e) => w(c?.role_names?.[e]) || e, V = ne(c, w), K = l?.env ? `${l.name} · ${l.env}` : l?.name ?? "—", q = (e) => R && T({
|
|
45
45
|
entity: R,
|
|
46
46
|
entityCode: "profile",
|
|
47
47
|
fieldName: e,
|
|
48
48
|
record: {
|
|
49
|
-
email:
|
|
50
|
-
display_name:
|
|
49
|
+
email: c?.email,
|
|
50
|
+
display_name: c?.display_name
|
|
51
51
|
},
|
|
52
52
|
mode: "display",
|
|
53
|
-
t:
|
|
53
|
+
t: w
|
|
54
54
|
});
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
header: /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ G(U, { children: [
|
|
56
|
+
/* @__PURE__ */ G(d, {
|
|
57
|
+
header: /* @__PURE__ */ W("div", {
|
|
58
58
|
"data-testid": "profile-hero",
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
-
icon: R?.display.icon ? /* @__PURE__ */
|
|
59
|
+
children: /* @__PURE__ */ W(f, {
|
|
60
|
+
icon: R?.display.icon ? /* @__PURE__ */ W(ee, {
|
|
61
61
|
name: R.display.icon,
|
|
62
62
|
size: 16
|
|
63
63
|
}) : void 0,
|
|
64
64
|
title: z,
|
|
65
65
|
mode: "display",
|
|
66
|
-
showTitle:
|
|
67
|
-
highlights: /* @__PURE__ */
|
|
66
|
+
showTitle: C.isVisible("show_title"),
|
|
67
|
+
highlights: /* @__PURE__ */ G("div", {
|
|
68
68
|
className: "flex flex-wrap gap-1",
|
|
69
69
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ W(o, {
|
|
71
71
|
tone: "violet",
|
|
72
72
|
size: "xs",
|
|
73
73
|
dot: !0,
|
|
74
|
-
children:
|
|
74
|
+
children: V
|
|
75
75
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ W(o, {
|
|
77
77
|
tone: "slate",
|
|
78
78
|
size: "xs",
|
|
79
|
-
children:
|
|
79
|
+
children: K
|
|
80
80
|
}),
|
|
81
|
-
|
|
81
|
+
c?.is_active && /* @__PURE__ */ W(o, {
|
|
82
82
|
tone: "emerald",
|
|
83
83
|
size: "xs",
|
|
84
84
|
dot: !0,
|
|
85
|
-
children:
|
|
85
|
+
children: w("profile.status.active", "Active")
|
|
86
86
|
})
|
|
87
87
|
]
|
|
88
88
|
}),
|
|
89
|
-
right:
|
|
90
|
-
icon: /* @__PURE__ */
|
|
91
|
-
onClick: () =>
|
|
92
|
-
children:
|
|
93
|
-
}), /* @__PURE__ */
|
|
94
|
-
icon: /* @__PURE__ */
|
|
95
|
-
onClick: () =>
|
|
96
|
-
children:
|
|
89
|
+
right: C.isVisible("show_actions") && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(n, {
|
|
90
|
+
icon: /* @__PURE__ */ W(i.edit, { size: 13 }),
|
|
91
|
+
onClick: () => I(!0),
|
|
92
|
+
children: w("profile.edit", "Edit profile")
|
|
93
|
+
}), /* @__PURE__ */ W(n, {
|
|
94
|
+
icon: /* @__PURE__ */ W(i.settings, { size: 13 }),
|
|
95
|
+
onClick: () => a("/preferences", { topLevel: !0 }),
|
|
96
|
+
children: w("profile.preferences", "Preferences")
|
|
97
97
|
})] })
|
|
98
98
|
})
|
|
99
99
|
}),
|
|
100
100
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
title:
|
|
103
|
-
icon: /* @__PURE__ */
|
|
104
|
-
children: /* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ W(s, {
|
|
102
|
+
title: w("profile.personal.title", "Personal info"),
|
|
103
|
+
icon: /* @__PURE__ */ W(i.users, { size: 14 }),
|
|
104
|
+
children: /* @__PURE__ */ W("div", {
|
|
105
105
|
"data-testid": "profile-personal-info-grid",
|
|
106
|
-
children: /* @__PURE__ */
|
|
107
|
-
|
|
108
|
-
label:
|
|
109
|
-
children: /* @__PURE__ */
|
|
110
|
-
userId:
|
|
106
|
+
children: /* @__PURE__ */ G(m, { children: [
|
|
107
|
+
c && R && M && /* @__PURE__ */ W(p, {
|
|
108
|
+
label: w("profile.avatar", "Avatar"),
|
|
109
|
+
children: /* @__PURE__ */ W(x, { children: /* @__PURE__ */ W(Y, {
|
|
110
|
+
userId: c.id,
|
|
111
111
|
entity: R,
|
|
112
|
-
record:
|
|
112
|
+
record: M,
|
|
113
113
|
onCommitted: async () => {
|
|
114
|
-
await
|
|
114
|
+
await E.refetch();
|
|
115
115
|
}
|
|
116
|
-
},
|
|
116
|
+
}, J(M)) })
|
|
117
117
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
label:
|
|
120
|
-
children:
|
|
118
|
+
/* @__PURE__ */ W(p, {
|
|
119
|
+
label: w("profile.display_name", "Display name"),
|
|
120
|
+
children: q("display_name")
|
|
121
121
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
label:
|
|
122
|
+
/* @__PURE__ */ W(p, {
|
|
123
|
+
label: w("profile.personal.email", "Email"),
|
|
124
124
|
"data-testid": "profile-email",
|
|
125
|
-
children:
|
|
125
|
+
children: q("email")
|
|
126
126
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
label:
|
|
127
|
+
/* @__PURE__ */ W(p, {
|
|
128
|
+
label: w("profile.personal.timezone", "Timezone"),
|
|
129
129
|
children: re()
|
|
130
130
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ W($, {})
|
|
132
132
|
] })
|
|
133
133
|
})
|
|
134
134
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
title:
|
|
137
|
-
icon: /* @__PURE__ */
|
|
138
|
-
children: /* @__PURE__ */
|
|
139
|
-
label:
|
|
140
|
-
hint:
|
|
141
|
-
children: /* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ W(s, {
|
|
136
|
+
title: w("profile.security.title", "Security"),
|
|
137
|
+
icon: /* @__PURE__ */ W(i.shield, { size: 14 }),
|
|
138
|
+
children: /* @__PURE__ */ W(m, { children: /* @__PURE__ */ W(p, {
|
|
139
|
+
label: w("profile.security.password", "Password"),
|
|
140
|
+
hint: w("profile.security.password_hint", "Update at any time"),
|
|
141
|
+
children: /* @__PURE__ */ W(n, {
|
|
142
142
|
size: "xs",
|
|
143
|
-
onClick: () =>
|
|
144
|
-
children:
|
|
143
|
+
onClick: () => P(!0),
|
|
144
|
+
children: w("profile.security.password_change", "Change")
|
|
145
145
|
})
|
|
146
146
|
}) })
|
|
147
147
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
title:
|
|
150
|
-
icon: /* @__PURE__ */
|
|
151
|
-
children: /* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
label:
|
|
154
|
-
children: /* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ W(s, {
|
|
149
|
+
title: w("profile.access.title", "Access"),
|
|
150
|
+
icon: /* @__PURE__ */ W(i.key, { size: 14 }),
|
|
151
|
+
children: /* @__PURE__ */ G(m, { children: [
|
|
152
|
+
/* @__PURE__ */ W(p, {
|
|
153
|
+
label: w("profile.access.role", "Role"),
|
|
154
|
+
children: /* @__PURE__ */ W(o, {
|
|
155
155
|
tone: "violet",
|
|
156
156
|
size: "xs",
|
|
157
157
|
dot: !0,
|
|
158
|
-
children:
|
|
158
|
+
children: V
|
|
159
159
|
})
|
|
160
160
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
label:
|
|
163
|
-
children:
|
|
161
|
+
/* @__PURE__ */ W(p, {
|
|
162
|
+
label: w("profile.access.groups", "Groups"),
|
|
163
|
+
children: c?.roles && c.roles.length > 0 ? /* @__PURE__ */ W("div", {
|
|
164
164
|
className: "flex flex-wrap gap-1",
|
|
165
|
-
children:
|
|
166
|
-
}) :
|
|
165
|
+
children: c.roles.map((e) => /* @__PURE__ */ W(r, { children: B(e) }, e))
|
|
166
|
+
}) : g
|
|
167
167
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
label:
|
|
170
|
-
children:
|
|
168
|
+
/* @__PURE__ */ W(p, {
|
|
169
|
+
label: w("profile.access.permissions", "Permissions"),
|
|
170
|
+
children: te(w, "profile.access.permissions_explicit", c?.permissions?.length ?? 0, {
|
|
171
171
|
one: "{count} explicit",
|
|
172
172
|
other: "{count} explicit"
|
|
173
173
|
})
|
|
174
174
|
})
|
|
175
175
|
] })
|
|
176
176
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
screen:
|
|
177
|
+
/* @__PURE__ */ W(ie, { userId: c?.id }),
|
|
178
|
+
c?.id && /* @__PURE__ */ W(Z, { userId: c.id }),
|
|
179
|
+
S?.screen && b && R && M && /* @__PURE__ */ W(h, {
|
|
180
|
+
screen: S.screen,
|
|
181
181
|
entity: R,
|
|
182
182
|
entityCode: "profile",
|
|
183
|
-
record:
|
|
184
|
-
recordId:
|
|
185
|
-
schema:
|
|
183
|
+
record: M,
|
|
184
|
+
recordId: c?.id,
|
|
185
|
+
schema: b
|
|
186
186
|
})
|
|
187
187
|
]
|
|
188
188
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
open:
|
|
191
|
-
initialName:
|
|
192
|
-
userId:
|
|
193
|
-
onClose: () =>
|
|
189
|
+
/* @__PURE__ */ W(X, {
|
|
190
|
+
open: F,
|
|
191
|
+
initialName: c?.display_name ?? "",
|
|
192
|
+
userId: c?.id ?? "",
|
|
193
|
+
onClose: () => I(!1),
|
|
194
194
|
onSaved: async () => {
|
|
195
|
-
await u(),
|
|
195
|
+
await u(), I(!1);
|
|
196
196
|
}
|
|
197
197
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
open:
|
|
200
|
-
onClose: () =>
|
|
201
|
-
onSubmit: async ({ current:
|
|
202
|
-
await e
|
|
198
|
+
/* @__PURE__ */ W(_, {
|
|
199
|
+
open: N,
|
|
200
|
+
onClose: () => P(!1),
|
|
201
|
+
onSubmit: async ({ current: e, next: t }) => {
|
|
202
|
+
await y(e, t), D.success(w("profile.password.changed", "Password changed. Sign in again to continue."));
|
|
203
203
|
}
|
|
204
204
|
})
|
|
205
205
|
] });
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
return
|
|
207
|
+
function J(e) {
|
|
208
|
+
return E(w(e, K))?.id ?? "";
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
let
|
|
212
|
-
let
|
|
213
|
-
entity:
|
|
214
|
-
formData: { [
|
|
215
|
-
record:
|
|
210
|
+
function Y({ userId: t, entity: n, record: r, onCommitted: i }) {
|
|
211
|
+
let a = L(), o = L("errors"), s = S(), [c, l] = H(!1), [u, d] = H(0), f = async (c) => {
|
|
212
|
+
let u = C({
|
|
213
|
+
entity: n,
|
|
214
|
+
formData: { [K]: c },
|
|
215
|
+
record: r,
|
|
216
216
|
isNew: !1
|
|
217
217
|
});
|
|
218
|
-
if (Object.keys(
|
|
219
|
-
|
|
218
|
+
if (Object.keys(u).length !== 0) {
|
|
219
|
+
l(!0);
|
|
220
220
|
try {
|
|
221
|
-
await
|
|
222
|
-
let
|
|
223
|
-
|
|
221
|
+
await b(e, { id: t }, { $files: u });
|
|
222
|
+
let n = J({ [K]: c });
|
|
223
|
+
n && s.markCommitted(n), await i(), D.success(a("profile.avatar.updated", "Avatar updated."));
|
|
224
224
|
} catch (e) {
|
|
225
|
-
await
|
|
225
|
+
await s.flushAllDrafts(), d((e) => e + 1), D.error(R(o, e));
|
|
226
226
|
} finally {
|
|
227
|
-
|
|
227
|
+
l(!1);
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
return /* @__PURE__ */
|
|
232
|
-
entity:
|
|
233
|
-
entityCode:
|
|
234
|
-
fieldName:
|
|
235
|
-
record:
|
|
231
|
+
return /* @__PURE__ */ W(B, { children: T({
|
|
232
|
+
entity: n,
|
|
233
|
+
entityCode: e,
|
|
234
|
+
fieldName: K,
|
|
235
|
+
record: r,
|
|
236
236
|
mode: "edit",
|
|
237
|
-
onChange: (e) => void
|
|
238
|
-
disabled:
|
|
239
|
-
t:
|
|
237
|
+
onChange: (e) => void f(e),
|
|
238
|
+
disabled: c,
|
|
239
|
+
t: a,
|
|
240
240
|
fieldId: "profile-avatar"
|
|
241
|
-
}) },
|
|
241
|
+
}) }, u);
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
let
|
|
245
|
-
if (!
|
|
246
|
-
let
|
|
247
|
-
|
|
243
|
+
function X({ open: t, initialName: r, userId: o, onClose: s, onSaved: d }) {
|
|
244
|
+
let f = M().isPhone, p = L(), m = L("errors"), h = V(), [g, _] = H(r), [v, y] = H(!1), [x, S] = H(null);
|
|
245
|
+
if (!t) return null;
|
|
246
|
+
let C = () => {
|
|
247
|
+
_(r), S(null), s();
|
|
248
248
|
};
|
|
249
|
-
return /* @__PURE__ */
|
|
250
|
-
onClick:
|
|
249
|
+
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
|
|
250
|
+
onClick: C,
|
|
251
251
|
style: {
|
|
252
252
|
position: "fixed",
|
|
253
253
|
inset: 0,
|
|
@@ -255,7 +255,7 @@ function ne({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
|
255
255
|
zIndex: 60,
|
|
256
256
|
backdropFilter: "blur(2px)"
|
|
257
257
|
}
|
|
258
|
-
}), /* @__PURE__ */
|
|
258
|
+
}), /* @__PURE__ */ G("div", {
|
|
259
259
|
"data-testid": "edit-profile-dialog",
|
|
260
260
|
style: {
|
|
261
261
|
position: "fixed",
|
|
@@ -263,7 +263,7 @@ function ne({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
|
263
263
|
left: "50%",
|
|
264
264
|
transform: "translate(-50%, -50%)",
|
|
265
265
|
zIndex: 61,
|
|
266
|
-
width:
|
|
266
|
+
width: f ? "calc(100vw - 24px)" : 420,
|
|
267
267
|
maxWidth: "calc(100vw - 24px)",
|
|
268
268
|
background: "var(--surface)",
|
|
269
269
|
borderRadius: "var(--radius-lg)",
|
|
@@ -272,7 +272,7 @@ function ne({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
|
272
272
|
overflow: "hidden"
|
|
273
273
|
},
|
|
274
274
|
children: [
|
|
275
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ G("div", {
|
|
276
276
|
style: {
|
|
277
277
|
padding: "14px 18px 0",
|
|
278
278
|
display: "flex",
|
|
@@ -280,7 +280,7 @@ function ne({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
|
280
280
|
gap: 10
|
|
281
281
|
},
|
|
282
282
|
children: [
|
|
283
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ W("span", {
|
|
284
284
|
style: {
|
|
285
285
|
width: 28,
|
|
286
286
|
height: 28,
|
|
@@ -291,52 +291,52 @@ function ne({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
|
291
291
|
alignItems: "center",
|
|
292
292
|
justifyContent: "center"
|
|
293
293
|
},
|
|
294
|
-
children: /* @__PURE__ */
|
|
294
|
+
children: /* @__PURE__ */ W(i.edit, { size: 15 })
|
|
295
295
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ G("div", {
|
|
297
297
|
style: { flex: 1 },
|
|
298
|
-
children: [/* @__PURE__ */
|
|
298
|
+
children: [/* @__PURE__ */ W("div", {
|
|
299
299
|
style: {
|
|
300
300
|
fontSize: 14,
|
|
301
301
|
fontWeight: 600,
|
|
302
302
|
color: "var(--text)"
|
|
303
303
|
},
|
|
304
|
-
children:
|
|
305
|
-
}), /* @__PURE__ */
|
|
304
|
+
children: p("profile.edit", "Edit profile")
|
|
305
|
+
}), /* @__PURE__ */ W("div", {
|
|
306
306
|
style: {
|
|
307
307
|
fontSize: 11.5,
|
|
308
308
|
color: "var(--text-3)"
|
|
309
309
|
},
|
|
310
|
-
children:
|
|
310
|
+
children: p("profile.edit.subtitle", "Update your display name.")
|
|
311
311
|
})]
|
|
312
312
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
icon: /* @__PURE__ */
|
|
315
|
-
title:
|
|
316
|
-
onClick:
|
|
313
|
+
/* @__PURE__ */ W(a, {
|
|
314
|
+
icon: /* @__PURE__ */ W(i.x, { size: 14 }),
|
|
315
|
+
title: p("profile.edit.close", "Close"),
|
|
316
|
+
onClick: C
|
|
317
317
|
})
|
|
318
318
|
]
|
|
319
319
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ G("div", {
|
|
321
321
|
style: {
|
|
322
322
|
padding: "12px 18px 16px",
|
|
323
323
|
display: "flex",
|
|
324
324
|
flexDirection: "column",
|
|
325
325
|
gap: 12
|
|
326
326
|
},
|
|
327
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(c, {
|
|
328
328
|
required: !0,
|
|
329
|
-
htmlFor:
|
|
330
|
-
children:
|
|
331
|
-
}), /* @__PURE__ */
|
|
332
|
-
id:
|
|
333
|
-
value:
|
|
334
|
-
onChange:
|
|
335
|
-
placeholder:
|
|
329
|
+
htmlFor: h,
|
|
330
|
+
children: p("profile.display_name", "Display name")
|
|
331
|
+
}), /* @__PURE__ */ W(l, {
|
|
332
|
+
id: h,
|
|
333
|
+
value: g,
|
|
334
|
+
onChange: _,
|
|
335
|
+
placeholder: p("profile.edit.name_placeholder", "Your name"),
|
|
336
336
|
autoFocus: !0
|
|
337
|
-
})] }),
|
|
337
|
+
})] }), x && /* @__PURE__ */ W(F, { text: x })]
|
|
338
338
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ G("div", {
|
|
340
340
|
style: {
|
|
341
341
|
padding: "10px 16px",
|
|
342
342
|
borderTop: "1px solid var(--divider)",
|
|
@@ -344,32 +344,32 @@ function ne({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
|
344
344
|
alignItems: "center",
|
|
345
345
|
gap: 8,
|
|
346
346
|
background: "var(--surface-2)",
|
|
347
|
-
flexWrap:
|
|
347
|
+
flexWrap: f ? "wrap" : "nowrap"
|
|
348
348
|
},
|
|
349
349
|
children: [
|
|
350
|
-
/* @__PURE__ */
|
|
351
|
-
/* @__PURE__ */
|
|
352
|
-
onClick:
|
|
353
|
-
children:
|
|
350
|
+
/* @__PURE__ */ W("div", { style: { flex: 1 } }),
|
|
351
|
+
/* @__PURE__ */ W(n, {
|
|
352
|
+
onClick: C,
|
|
353
|
+
children: p("dialog.cancel", "Cancel")
|
|
354
354
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ W(n, {
|
|
356
356
|
kind: "primary",
|
|
357
|
-
icon:
|
|
357
|
+
icon: W(v ? u : i.check, { size: 13 }),
|
|
358
358
|
onClick: async () => {
|
|
359
|
-
if (!
|
|
359
|
+
if (!g.trim()) S(p("profile.edit.name_required", "Display name is required."));
|
|
360
360
|
else {
|
|
361
|
-
|
|
361
|
+
S(null), y(!0);
|
|
362
362
|
try {
|
|
363
|
-
await
|
|
363
|
+
await b(e, { id: o }, { display_name: g.trim() }), await d();
|
|
364
364
|
} catch (e) {
|
|
365
|
-
|
|
365
|
+
S(R(m, e));
|
|
366
366
|
} finally {
|
|
367
|
-
|
|
367
|
+
y(!1);
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
},
|
|
371
|
-
disabled: !
|
|
372
|
-
children:
|
|
371
|
+
disabled: !g.trim() || v,
|
|
372
|
+
children: v ? p("dialog.saving", "Saving…") : p("dialog.save", "Save")
|
|
373
373
|
})
|
|
374
374
|
]
|
|
375
375
|
})
|
|
@@ -383,45 +383,44 @@ function re() {
|
|
|
383
383
|
return "—";
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
-
function Z({ userId:
|
|
387
|
-
let { data:
|
|
388
|
-
return /* @__PURE__ */
|
|
389
|
-
carrierEntityCode:
|
|
386
|
+
function Z({ userId: t }) {
|
|
387
|
+
let { data: n } = O(), r = Q(n);
|
|
388
|
+
return /* @__PURE__ */ W(P, {
|
|
389
|
+
carrierEntityCode: e,
|
|
390
390
|
carrierScope: r,
|
|
391
|
-
rowId:
|
|
391
|
+
rowId: t
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
394
|
function Q(e) {
|
|
395
395
|
return e?.entities.profile?.params_scope ?? "profile";
|
|
396
396
|
}
|
|
397
397
|
function $() {
|
|
398
|
-
let e =
|
|
399
|
-
if (
|
|
400
|
-
let
|
|
401
|
-
return /* @__PURE__ */
|
|
402
|
-
label: e(
|
|
403
|
-
children:
|
|
398
|
+
let e = L(), { data: t } = O(), n = I().data?.find((e) => e.code === z);
|
|
399
|
+
if (n?.scopes?.includes(Q(t))) return null;
|
|
400
|
+
let r = typeof n?.value == "string" ? n.value : e.language, i = t?.languages?.find((e) => e.code === r);
|
|
401
|
+
return /* @__PURE__ */ W(p, {
|
|
402
|
+
label: e(n?.name),
|
|
403
|
+
children: n ? i?.name[i.code] || e(i?.name) || r : /* @__PURE__ */ W(u, { size: 12 })
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
|
-
function ie({ userId:
|
|
407
|
-
let { data:
|
|
408
|
-
if (!
|
|
409
|
-
let r =
|
|
410
|
-
return r ? /* @__PURE__ */
|
|
406
|
+
function ie({ userId: t }) {
|
|
407
|
+
let { data: n } = O();
|
|
408
|
+
if (!t || !n) return null;
|
|
409
|
+
let r = n.entities[e];
|
|
410
|
+
return r ? /* @__PURE__ */ W(N, {
|
|
411
411
|
node: {
|
|
412
412
|
associated: "api_key",
|
|
413
413
|
foreign_key: "user_id"
|
|
414
414
|
},
|
|
415
415
|
ctx: {
|
|
416
|
-
schema:
|
|
416
|
+
schema: n,
|
|
417
417
|
entity: r,
|
|
418
|
-
entityCode:
|
|
419
|
-
recordId:
|
|
420
|
-
record: { id:
|
|
418
|
+
entityCode: e,
|
|
419
|
+
recordId: t,
|
|
420
|
+
record: { id: t },
|
|
421
421
|
isNew: !1,
|
|
422
422
|
mode: "display"
|
|
423
423
|
}
|
|
424
424
|
}) : null;
|
|
425
425
|
}
|
|
426
|
-
|
|
427
|
-
export { Y as Profile, $ as ProfileLanguageRow, Z as ProfileParamsBlock };
|
|
426
|
+
export { q as Profile, $ as ProfileLanguageRow, Z as ProfileParamsBlock };
|