@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
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { useText as e } from "../../hooks/useText.js";
|
|
2
|
+
import { UploadError as t, discardFile as n, formatBytes as r, uploadCheckFailure as i, uploadFailure as a, uploadFile as o, validateClientSide as s } from "./upload.js";
|
|
3
|
+
import { UploadFailureText as c } from "./UploadFailureText.js";
|
|
4
|
+
import { downloadFileURL as l } from "./helpers.js";
|
|
5
|
+
import { useDraftRegistration as u } from "./draft-scope.js";
|
|
6
|
+
import { useEmbedFileOpener as d } from "./useEmbedFileSrc.js";
|
|
7
|
+
import { fileArrayFromValue as f } from "./value.js";
|
|
8
|
+
import { useCallback as p, useEffect as m, useRef as h, useState as g } from "react";
|
|
9
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
10
|
+
//#region src/components/file-widgets/FileList.tsx
|
|
11
|
+
function b(e) {
|
|
12
|
+
return e ? (e.split("/")[1] ?? e).toUpperCase().slice(0, 6) : "";
|
|
13
|
+
}
|
|
14
|
+
function x(x) {
|
|
15
|
+
let { field: S, fieldName: C, value: w, onChange: T, mode: E, disabled: D } = x, O = f(w), [k, A] = g([]), { register: j, unregister: M, isDraft: N } = u(), P = e(), F = e("errors"), I = h(O);
|
|
16
|
+
I.current = O;
|
|
17
|
+
let L = h(null), R = h(/* @__PURE__ */ new Set()), z = h([]);
|
|
18
|
+
z.current = k;
|
|
19
|
+
let { open: B } = d();
|
|
20
|
+
m(() => () => {
|
|
21
|
+
z.current.forEach((e) => e.abort());
|
|
22
|
+
}, []);
|
|
23
|
+
let V = (S.accepts ?? []).join(","), H = E === "display", U = p(async (e) => {
|
|
24
|
+
let r = s(e, S.accepts, S.max_size_bytes), c = `row-${Math.random().toString(36).slice(2)}-${Date.now()}`, l = new AbortController();
|
|
25
|
+
if (r) A((t) => [...t, {
|
|
26
|
+
localId: c,
|
|
27
|
+
filename: e.name,
|
|
28
|
+
progress: null,
|
|
29
|
+
error: i(P, F, r),
|
|
30
|
+
abort: () => {}
|
|
31
|
+
}]);
|
|
32
|
+
else {
|
|
33
|
+
A((t) => [...t, {
|
|
34
|
+
localId: c,
|
|
35
|
+
filename: e.name,
|
|
36
|
+
progress: {
|
|
37
|
+
loaded: 0,
|
|
38
|
+
total: e.size,
|
|
39
|
+
pct: 0
|
|
40
|
+
},
|
|
41
|
+
error: null,
|
|
42
|
+
abort: () => l.abort()
|
|
43
|
+
}]);
|
|
44
|
+
try {
|
|
45
|
+
let t = await o({
|
|
46
|
+
file: e,
|
|
47
|
+
entityCode: x.entityCode,
|
|
48
|
+
fieldCode: C,
|
|
49
|
+
signal: l.signal,
|
|
50
|
+
onProgress: (e) => A((t) => t.map((t) => t.localId === c ? {
|
|
51
|
+
...t,
|
|
52
|
+
progress: e
|
|
53
|
+
} : t))
|
|
54
|
+
});
|
|
55
|
+
if (R.current.delete(c)) {
|
|
56
|
+
n(t.id).catch(() => {}), M(t.id);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
j(t.id, () => n(t.id));
|
|
60
|
+
let r = {
|
|
61
|
+
id: t.id,
|
|
62
|
+
filename: t.filename,
|
|
63
|
+
content_type: t.content_type,
|
|
64
|
+
size_bytes: t.size_bytes,
|
|
65
|
+
sha256: t.sha256,
|
|
66
|
+
width: t.width,
|
|
67
|
+
height: t.height,
|
|
68
|
+
url: t.url,
|
|
69
|
+
metadata: t.metadata
|
|
70
|
+
}, i = [...I.current, r];
|
|
71
|
+
I.current = i, T?.(i), A((e) => e.filter((e) => e.localId !== c));
|
|
72
|
+
} catch (e) {
|
|
73
|
+
if (e instanceof t && e.code === "ABORTED") {
|
|
74
|
+
A((e) => e.filter((e) => e.localId !== c));
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
let n = a(P, F, e);
|
|
78
|
+
A((e) => e.map((e) => e.localId === c ? {
|
|
79
|
+
...e,
|
|
80
|
+
error: n,
|
|
81
|
+
progress: null,
|
|
82
|
+
abort: () => {}
|
|
83
|
+
} : e));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}, [
|
|
87
|
+
F,
|
|
88
|
+
P,
|
|
89
|
+
S.accepts,
|
|
90
|
+
S.max_size_bytes,
|
|
91
|
+
C,
|
|
92
|
+
T,
|
|
93
|
+
x.entityCode,
|
|
94
|
+
j,
|
|
95
|
+
M
|
|
96
|
+
]), W = p((e) => {
|
|
97
|
+
Array.from(e).forEach((e) => void U(e));
|
|
98
|
+
}, [U]), G = p(() => {
|
|
99
|
+
D || L.current?.click();
|
|
100
|
+
}, [D]), K = p((e) => {
|
|
101
|
+
let t = e.target.files;
|
|
102
|
+
e.target.value = "", t && t.length > 0 && W(t);
|
|
103
|
+
}, [W]), q = p((e) => {
|
|
104
|
+
N(e) && (n(e).catch(() => {}), M(e)), T?.(O.filter((t) => t.id !== e));
|
|
105
|
+
}, [
|
|
106
|
+
N,
|
|
107
|
+
O,
|
|
108
|
+
T,
|
|
109
|
+
M
|
|
110
|
+
]), J = p((e) => {
|
|
111
|
+
B(e.id, "download", l(e));
|
|
112
|
+
}, [B]);
|
|
113
|
+
return /* @__PURE__ */ y("div", {
|
|
114
|
+
"data-testid": `file-widget-${C}`,
|
|
115
|
+
className: "flex flex-col gap-2",
|
|
116
|
+
children: [/* @__PURE__ */ y("ul", {
|
|
117
|
+
className: "flex flex-col divide-y divide-divider rounded-md border border-border bg-surface",
|
|
118
|
+
children: [
|
|
119
|
+
O.length === 0 && k.length === 0 && /* @__PURE__ */ v("li", {
|
|
120
|
+
className: "px-3 py-4 text-center text-sm text-muted-foreground",
|
|
121
|
+
children: P(S.display?.placeholder) || P("file.list.empty", "No files")
|
|
122
|
+
}),
|
|
123
|
+
O.map((e) => /* @__PURE__ */ y("li", {
|
|
124
|
+
className: "flex items-center gap-3 px-3 py-2",
|
|
125
|
+
"data-testid": `row-${e.id}`,
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ v("span", {
|
|
128
|
+
className: "flex-none rounded-sm border border-border bg-surface-3 px-1.5 py-0.5 text-[10px] text-muted-foreground",
|
|
129
|
+
children: b(e.content_type)
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ v("button", {
|
|
132
|
+
type: "button",
|
|
133
|
+
onClick: () => J(e),
|
|
134
|
+
className: "min-w-0 flex-1 truncate text-left text-sm text-foreground hover:underline",
|
|
135
|
+
title: e.filename,
|
|
136
|
+
children: e.filename
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ v("span", {
|
|
139
|
+
className: "flex-none text-xs text-muted-foreground",
|
|
140
|
+
children: r(e.size_bytes)
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ v("button", {
|
|
143
|
+
type: "button",
|
|
144
|
+
className: "flex-none rounded-sm border border-border bg-card px-2 py-0.5 text-xs text-foreground hover:bg-surface-2",
|
|
145
|
+
onClick: () => J(e),
|
|
146
|
+
"data-testid": `download-${e.id}`,
|
|
147
|
+
children: P("file.download", "Download")
|
|
148
|
+
}),
|
|
149
|
+
!H && /* @__PURE__ */ v("button", {
|
|
150
|
+
type: "button",
|
|
151
|
+
className: "flex-none rounded-sm border border-border bg-card px-2 py-0.5 text-xs text-destructive hover:bg-surface-2",
|
|
152
|
+
onClick: () => q(e.id),
|
|
153
|
+
disabled: D,
|
|
154
|
+
"data-testid": `remove-${e.id}`,
|
|
155
|
+
children: P("file.remove", "Remove")
|
|
156
|
+
})
|
|
157
|
+
]
|
|
158
|
+
}, e.id)),
|
|
159
|
+
k.map((e) => /* @__PURE__ */ y("li", {
|
|
160
|
+
className: "flex items-center gap-3 px-3 py-2",
|
|
161
|
+
"data-testid": `pending-row-${e.localId}`,
|
|
162
|
+
"aria-busy": !e.error,
|
|
163
|
+
"aria-invalid": !!e.error || void 0,
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ v("span", {
|
|
166
|
+
className: "flex-none truncate text-sm text-foreground",
|
|
167
|
+
title: e.filename,
|
|
168
|
+
children: e.filename
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ v("span", { className: "flex-1" }),
|
|
171
|
+
e.error ? /* @__PURE__ */ v("span", {
|
|
172
|
+
role: "alert",
|
|
173
|
+
className: "text-xs text-destructive",
|
|
174
|
+
children: /* @__PURE__ */ v(c, { failure: e.error })
|
|
175
|
+
}) : /* @__PURE__ */ y("span", {
|
|
176
|
+
className: "text-xs text-muted-foreground",
|
|
177
|
+
role: "progressbar",
|
|
178
|
+
"aria-valuenow": e.progress?.pct ?? 0,
|
|
179
|
+
"aria-valuemin": 0,
|
|
180
|
+
"aria-valuemax": 100,
|
|
181
|
+
children: [e.progress?.pct ?? 0, "%"]
|
|
182
|
+
}),
|
|
183
|
+
/* @__PURE__ */ v("button", {
|
|
184
|
+
type: "button",
|
|
185
|
+
className: "flex-none rounded-sm border border-border bg-card px-2 py-0.5 text-xs",
|
|
186
|
+
onClick: () => {
|
|
187
|
+
e.abort(), R.current.add(e.localId), A((t) => t.filter((t) => t.localId !== e.localId));
|
|
188
|
+
},
|
|
189
|
+
children: e.error ? P("file.upload.dismiss", "Dismiss") : P("file.upload.cancel", "Cancel")
|
|
190
|
+
})
|
|
191
|
+
]
|
|
192
|
+
}, e.localId))
|
|
193
|
+
]
|
|
194
|
+
}), !H && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("button", {
|
|
195
|
+
type: "button",
|
|
196
|
+
className: "self-start rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
|
|
197
|
+
onClick: G,
|
|
198
|
+
disabled: D,
|
|
199
|
+
"data-testid": "add-files",
|
|
200
|
+
children: P("file.list.add", "Add files")
|
|
201
|
+
}), /* @__PURE__ */ v("input", {
|
|
202
|
+
ref: L,
|
|
203
|
+
type: "file",
|
|
204
|
+
accept: V || void 0,
|
|
205
|
+
multiple: !0,
|
|
206
|
+
onChange: K,
|
|
207
|
+
style: { display: "none" },
|
|
208
|
+
"data-testid": `file-input-${C}`
|
|
209
|
+
})] })]
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
//#endregion
|
|
213
|
+
export { x as FileList };
|
|
@@ -1,34 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { pluralText as e } from "../../lib/language.js";
|
|
2
|
+
import { useText as t } from "../../hooks/useText.js";
|
|
3
|
+
import { UploadError as n, discardFile as r, formatBytes as i, uploadCheckFailure as a, uploadFailure as o, uploadFile as s, validateClientSide as c } from "./upload.js";
|
|
4
|
+
import { UploadFailureText as l } from "./UploadFailureText.js";
|
|
5
|
+
import { preferredListThumbnailURL as u, preferredThumbnailVariant as d } from "./helpers.js";
|
|
6
|
+
import { useDraftRegistration as f } from "./draft-scope.js";
|
|
7
|
+
import { useEmbedFileSrc as p } from "./useEmbedFileSrc.js";
|
|
8
|
+
import { fileArrayFromValue as m } from "./value.js";
|
|
4
9
|
import { useCallback as h, useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
|
|
5
10
|
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
6
|
-
import { DndContext as C, PointerSensor as w, closestCenter as
|
|
7
|
-
import { SortableContext as
|
|
11
|
+
import { DndContext as C, PointerSensor as w, closestCenter as ee, useSensor as te, useSensors as ne } from "@dnd-kit/core";
|
|
12
|
+
import { SortableContext as T, arrayMove as E, rectSortingStrategy as D, useSortable as O } from "@dnd-kit/sortable";
|
|
8
13
|
import { CSS as k } from "@dnd-kit/utilities";
|
|
9
14
|
//#region src/components/file-widgets/Grid.tsx
|
|
10
15
|
function A(e, t) {
|
|
11
16
|
return u(e, t);
|
|
12
17
|
}
|
|
13
18
|
function j(i) {
|
|
14
|
-
let { field:
|
|
19
|
+
let { field: l, fieldName: u, value: d, onChange: p, mode: b, disabled: O } = i, k = m(d), [A, j] = y([]), [M, N] = y(/* @__PURE__ */ new Set()), [P, F] = y(null), { register: I, unregister: L, isDraft: R } = f(), z = t(), B = t("errors"), V = v(/* @__PURE__ */ new Set()), H = v([]);
|
|
15
20
|
H.current = A;
|
|
16
21
|
let U = v(k);
|
|
17
22
|
U.current = k, g(() => () => {
|
|
18
23
|
H.current.forEach((e) => e.abort());
|
|
19
24
|
}, []);
|
|
20
|
-
let W = te(
|
|
21
|
-
let t =
|
|
25
|
+
let W = ne(te(w, { activationConstraint: { distance: 5 } })), oe = (l.accepts ?? ["image/*"]).join(","), se = l.display?.reorderable !== !1, ce = l.display?.listable_thumbnail, G = h(async (e) => {
|
|
26
|
+
let t = c(e, l.accepts, l.max_size_bytes), d = `tile-${Math.random().toString(36).slice(2)}-${Date.now()}`, f = new AbortController();
|
|
22
27
|
if (t) j((n) => [...n, {
|
|
23
|
-
localId:
|
|
28
|
+
localId: d,
|
|
24
29
|
filename: e.name,
|
|
25
30
|
progress: null,
|
|
26
|
-
error:
|
|
31
|
+
error: a(z, B, t),
|
|
27
32
|
abort: () => {}
|
|
28
33
|
}]);
|
|
29
34
|
else {
|
|
30
35
|
j((t) => [...t, {
|
|
31
|
-
localId:
|
|
36
|
+
localId: d,
|
|
32
37
|
filename: e.name,
|
|
33
38
|
progress: {
|
|
34
39
|
loaded: 0,
|
|
@@ -39,22 +44,22 @@ function j(i) {
|
|
|
39
44
|
abort: () => f.abort()
|
|
40
45
|
}]);
|
|
41
46
|
try {
|
|
42
|
-
let t = await
|
|
47
|
+
let t = await s({
|
|
43
48
|
file: e,
|
|
44
49
|
entityCode: i.entityCode,
|
|
45
|
-
fieldCode:
|
|
50
|
+
fieldCode: u,
|
|
46
51
|
signal: f.signal,
|
|
47
|
-
onProgress: (e) => j((t) => t.map((t) => t.localId ===
|
|
52
|
+
onProgress: (e) => j((t) => t.map((t) => t.localId === d ? {
|
|
48
53
|
...t,
|
|
49
54
|
progress: e
|
|
50
55
|
} : t))
|
|
51
56
|
});
|
|
52
|
-
if (V.current.delete(
|
|
53
|
-
|
|
57
|
+
if (V.current.delete(d)) {
|
|
58
|
+
r(t.id).catch(() => {}), L(t.id);
|
|
54
59
|
return;
|
|
55
60
|
}
|
|
56
|
-
I(t.id, () =>
|
|
57
|
-
let
|
|
61
|
+
I(t.id, () => r(t.id));
|
|
62
|
+
let n = {
|
|
58
63
|
id: t.id,
|
|
59
64
|
filename: t.filename,
|
|
60
65
|
content_type: t.content_type,
|
|
@@ -64,15 +69,15 @@ function j(i) {
|
|
|
64
69
|
height: t.height,
|
|
65
70
|
url: t.url,
|
|
66
71
|
metadata: t.metadata
|
|
67
|
-
},
|
|
68
|
-
U.current =
|
|
72
|
+
}, a = [...U.current, n];
|
|
73
|
+
U.current = a, p?.(a), j((e) => e.filter((e) => e.localId !== d));
|
|
69
74
|
} catch (e) {
|
|
70
|
-
if (e instanceof
|
|
71
|
-
j((e) => e.filter((e) => e.localId !==
|
|
75
|
+
if (e instanceof n && e.code === "ABORTED") {
|
|
76
|
+
j((e) => e.filter((e) => e.localId !== d));
|
|
72
77
|
return;
|
|
73
78
|
}
|
|
74
|
-
let t =
|
|
75
|
-
j((e) => e.map((e) => e.localId ===
|
|
79
|
+
let t = o(z, B, e);
|
|
80
|
+
j((e) => e.map((e) => e.localId === d ? {
|
|
76
81
|
...e,
|
|
77
82
|
error: t,
|
|
78
83
|
progress: null,
|
|
@@ -83,9 +88,9 @@ function j(i) {
|
|
|
83
88
|
}, [
|
|
84
89
|
B,
|
|
85
90
|
z,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
l.accepts,
|
|
92
|
+
l.max_size_bytes,
|
|
93
|
+
u,
|
|
89
94
|
p,
|
|
90
95
|
i.entityCode,
|
|
91
96
|
I,
|
|
@@ -105,7 +110,7 @@ function j(i) {
|
|
|
105
110
|
let t = e.target.files;
|
|
106
111
|
e.target.value = "", t && t.length > 0 && K(t);
|
|
107
112
|
}, [K]), fe = h((e) => {
|
|
108
|
-
R(e) && (
|
|
113
|
+
R(e) && (r(e).catch(() => {}), L(e));
|
|
109
114
|
let t = k.filter((t) => t.id !== e);
|
|
110
115
|
p?.(t), N((t) => {
|
|
111
116
|
let n = new Set(t);
|
|
@@ -118,7 +123,7 @@ function j(i) {
|
|
|
118
123
|
L
|
|
119
124
|
]), pe = h(() => {
|
|
120
125
|
M.size !== 0 && (Array.from(M).forEach((e) => {
|
|
121
|
-
R(e) && (
|
|
126
|
+
R(e) && (r(e).catch(() => {}), L(e));
|
|
122
127
|
}), p?.(k.filter((e) => !M.has(e.id))), N(/* @__PURE__ */ new Set()));
|
|
123
128
|
}, [
|
|
124
129
|
R,
|
|
@@ -157,7 +162,7 @@ function j(i) {
|
|
|
157
162
|
O || (e.key === "Enter" || e.key === " ") && e.target === e.currentTarget && (e.preventDefault(), J());
|
|
158
163
|
}, [O, J]), $ = b === "display", _e = _(() => k.map((e) => e.id), [k]);
|
|
159
164
|
return /* @__PURE__ */ S("div", {
|
|
160
|
-
"data-testid": `file-widget-${
|
|
165
|
+
"data-testid": `file-widget-${u}`,
|
|
161
166
|
className: "flex flex-col gap-2",
|
|
162
167
|
children: [
|
|
163
168
|
!$ && M.size > 0 && /* @__PURE__ */ S("div", {
|
|
@@ -189,15 +194,15 @@ function j(i) {
|
|
|
189
194
|
}),
|
|
190
195
|
/* @__PURE__ */ x(C, {
|
|
191
196
|
sensors: W,
|
|
192
|
-
collisionDetection:
|
|
197
|
+
collisionDetection: ee,
|
|
193
198
|
onDragEnd: me,
|
|
194
|
-
children: /* @__PURE__ */ x(
|
|
199
|
+
children: /* @__PURE__ */ x(T, {
|
|
195
200
|
items: _e,
|
|
196
201
|
strategy: D,
|
|
197
202
|
children: /* @__PURE__ */ S("div", {
|
|
198
203
|
className: "grid grid-cols-[repeat(auto-fill,minmax(140px,1fr))] gap-3 rounded-md border border-dashed border-border bg-surface p-3 outline-none focus-visible:outline-2 focus-visible:outline-accent",
|
|
199
204
|
role: "grid",
|
|
200
|
-
"aria-label":
|
|
205
|
+
"aria-label": u,
|
|
201
206
|
tabIndex: $ || O ? -1 : 0,
|
|
202
207
|
onDragOver: le,
|
|
203
208
|
onDrop: ue,
|
|
@@ -225,7 +230,7 @@ function j(i) {
|
|
|
225
230
|
className: "col-span-full flex h-24 cursor-pointer items-center justify-center text-sm text-muted-foreground",
|
|
226
231
|
onClick: J,
|
|
227
232
|
"data-testid": "grid-empty",
|
|
228
|
-
children: z(
|
|
233
|
+
children: z(l.display?.placeholder) || z("file.grid.empty", "Drop files here or click to browse")
|
|
229
234
|
})
|
|
230
235
|
]
|
|
231
236
|
})
|
|
@@ -238,7 +243,7 @@ function j(i) {
|
|
|
238
243
|
multiple: !0,
|
|
239
244
|
onChange: de,
|
|
240
245
|
style: { display: "none" },
|
|
241
|
-
"data-testid": `file-input-${
|
|
246
|
+
"data-testid": `file-input-${u}`
|
|
242
247
|
}),
|
|
243
248
|
Y && /* @__PURE__ */ x(ae, {
|
|
244
249
|
file: Y,
|
|
@@ -252,16 +257,16 @@ function j(i) {
|
|
|
252
257
|
});
|
|
253
258
|
}
|
|
254
259
|
function re({ file: e, selected: n, disabled: r, reorderable: i, preferredThumbnail: a, onSelect: o, onRemove: s, onPreview: c }) {
|
|
255
|
-
let { attributes: l, listeners: u, setNodeRef:
|
|
260
|
+
let { attributes: l, listeners: u, setNodeRef: f, transform: m, transition: h, isDragging: g } = O({
|
|
256
261
|
id: e.id,
|
|
257
262
|
disabled: !i
|
|
258
263
|
}), _ = t(), v = {
|
|
259
264
|
transform: k.Transform.toString(m),
|
|
260
265
|
transition: h,
|
|
261
266
|
opacity: g ? .5 : 1
|
|
262
|
-
}, y =
|
|
267
|
+
}, y = p(e.id, d(e, a), A(e, a));
|
|
263
268
|
return /* @__PURE__ */ S("div", {
|
|
264
|
-
ref:
|
|
269
|
+
ref: f,
|
|
265
270
|
style: v,
|
|
266
271
|
className: `group relative aspect-square overflow-hidden rounded-md border ${n ? "border-accent" : "border-border"} bg-surface-2`,
|
|
267
272
|
"data-testid": `grid-tile-${e.id}`,
|
|
@@ -335,7 +340,7 @@ function ie({ tile: e, onCancel: n, onDismiss: r }) {
|
|
|
335
340
|
e.error && /* @__PURE__ */ x("div", {
|
|
336
341
|
role: "alert",
|
|
337
342
|
className: "mt-1 text-destructive",
|
|
338
|
-
children: /* @__PURE__ */ x(
|
|
343
|
+
children: /* @__PURE__ */ x(l, { failure: e.error })
|
|
339
344
|
}),
|
|
340
345
|
/* @__PURE__ */ x("button", {
|
|
341
346
|
type: "button",
|
|
@@ -347,7 +352,7 @@ function ie({ tile: e, onCancel: n, onDismiss: r }) {
|
|
|
347
352
|
});
|
|
348
353
|
}
|
|
349
354
|
function ae({ file: e, hasPrev: n, hasNext: r, onPrev: a, onNext: o, onClose: s }) {
|
|
350
|
-
let c = t(), l =
|
|
355
|
+
let c = t(), l = p(e.id, "preview", e.presigned_url ?? e.url ?? A(e));
|
|
351
356
|
return /* @__PURE__ */ S("div", {
|
|
352
357
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/80",
|
|
353
358
|
role: "dialog",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Suspense as e, lazy as t } from "react";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/file-widgets/GridLazy.tsx
|
|
4
|
+
var r = t(() => import("./Grid.js").then((e) => ({ default: e.Grid })));
|
|
5
|
+
function i() {
|
|
6
|
+
return /* @__PURE__ */ n("div", { className: "h-24 w-full rounded-md bg-muted animate-pulse" });
|
|
7
|
+
}
|
|
8
|
+
function a(t) {
|
|
9
|
+
return /* @__PURE__ */ n(e, {
|
|
10
|
+
fallback: /* @__PURE__ */ n(i, {}),
|
|
11
|
+
children: /* @__PURE__ */ n(r, { ...t })
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { a as GridLazy };
|