@declarion/react 0.142.0 → 0.146.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{Icons-Dzl-AkD_.d.ts → Icons-BdXCxyw3.d.ts} +0 -4
- package/dist-lib/api/access-expiry.js +1 -2
- package/dist-lib/api/agents.js +1 -2
- package/dist-lib/api/audience.js +1 -2
- package/dist-lib/api/auth-redirect.js +1 -2
- package/dist-lib/api/auth.js +1 -2
- package/dist-lib/api/batch.js +1 -2
- package/dist-lib/api/client.js +27 -28
- package/dist-lib/api/data.js +23 -24
- package/dist-lib/api/entities.js +36 -37
- package/dist-lib/api/events.js +6 -7
- package/dist-lib/api/fileReferences.js +1 -2
- package/dist-lib/api/params.js +1 -2
- package/dist-lib/api/properties.js +1 -2
- package/dist-lib/api/request-bounds.js +1 -2
- package/dist-lib/api/schema.js +5 -6
- package/dist-lib/api/session-renewal.js +6 -7
- package/dist-lib/api/status.js +1 -2
- package/dist-lib/app.js +154 -155
- package/dist-lib/components/actions/ActionButton.js +32 -33
- package/dist-lib/components/actions/ActionDialog.js +85 -86
- package/dist-lib/components/actions/ActionResultDialog.impl.js +48 -49
- package/dist-lib/components/actions/ActionResultDialog.js +1 -2
- package/dist-lib/components/actions/ActionRunner.js +96 -97
- package/dist-lib/components/actions/ObjectActionBar.js +49 -50
- package/dist-lib/components/actions/PropertyGridEditor.js +50 -51
- package/dist-lib/components/actions/ResponsiveActionBar.js +127 -128
- package/dist-lib/components/actions/RowActionsKebab.js +27 -28
- package/dist-lib/components/agents/AgentChatPanel.impl.js +317 -318
- package/dist-lib/components/agents/AgentChatPanel.js +1 -2
- package/dist-lib/components/agents/AgentConversationDrawer.js +6 -7
- package/dist-lib/components/agents/AgentElicitForm.js +13 -14
- package/dist-lib/components/agents/AgentOpenFollower.impl.js +1 -2
- package/dist-lib/components/agents/AgentOpenFollower.js +1 -2
- package/dist-lib/components/agents/AgentPicker.js +1 -2
- package/dist-lib/components/agents/ChatAttachments.js +22 -23
- package/dist-lib/components/agents/transcript-runs.js +1 -2
- package/dist-lib/components/chrome/AssociationTabs.js +44 -45
- package/dist-lib/components/chrome/AuditMetaStrip.js +1 -2
- package/dist-lib/components/chrome/Breadcrumbs.js +1 -2
- package/dist-lib/components/chrome/HighlightsStrip.js +1 -2
- package/dist-lib/components/chrome/PageHeader.js +12 -13
- package/dist-lib/components/chrome/PageShell.js +1 -2
- package/dist-lib/components/chrome/RecordHeader.js +1 -2
- package/dist-lib/components/chrome/headerActionZone.js +0 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.js +463 -464
- package/dist-lib/components/detail-layout/AssociatedToolbar.js +43 -44
- package/dist-lib/components/detail-layout/ChildrenBlock.js +24 -25
- package/dist-lib/components/detail-layout/ChildrenCards.js +29 -30
- package/dist-lib/components/detail-layout/ChildrenList.js +23 -24
- package/dist-lib/components/detail-layout/ChildrenTable.js +50 -51
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +164 -165
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +14 -15
- package/dist-lib/components/detail-layout/DetailHighlights.js +23 -24
- package/dist-lib/components/detail-layout/DraggableChildrenTable.js +76 -77
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +90 -91
- package/dist-lib/components/detail-layout/ErrorSummary.js +7 -8
- package/dist-lib/components/detail-layout/EvidenceBlock.js +15 -16
- package/dist-lib/components/detail-layout/FieldRow.js +11 -12
- package/dist-lib/components/detail-layout/FieldsBlock.js +31 -32
- package/dist-lib/components/detail-layout/LayoutColumn.js +1 -2
- package/dist-lib/components/detail-layout/LayoutRenderer.js +11 -12
- package/dist-lib/components/detail-layout/LayoutRow.js +1 -2
- package/dist-lib/components/detail-layout/LayoutTabs.js +23 -24
- package/dist-lib/components/detail-layout/PropertiesBlock.js +38 -39
- package/dist-lib/components/detail-layout/QuickAddForm.js +28 -29
- package/dist-lib/components/detail-layout/SectionBlock.js +9 -10
- package/dist-lib/components/detail-layout/StatusesBlock.js +1 -2
- package/dist-lib/components/detail-layout/TimelineComposer.js +19 -20
- package/dist-lib/components/detail-layout/blockMeta.js +1 -2
- package/dist-lib/components/detail-layout/useManualColumnResize.js +1 -2
- package/dist-lib/components/detail-layout/useQuickAdd.js +21 -22
- package/dist-lib/components/detail-layout/visibility.js +1 -2
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +25 -26
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +18 -19
- package/dist-lib/components/detail-layout/widgets/MonacoJson.js +1 -2
- package/dist-lib/components/detail-layout/widgets/WidgetHost.js +10 -11
- package/dist-lib/components/detail-layout/widgets/builtins.js +1 -2
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +1 -2
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +1 -2
- package/dist-lib/components/detail-layout/widgets/registry.js +1 -2
- package/dist-lib/components/fields/BoolField.js +1 -2
- package/dist-lib/components/fields/EmailField.js +5 -6
- package/dist-lib/components/fields/EnumField.js +7 -8
- package/dist-lib/components/fields/FileReferenceField.js +18 -19
- package/dist-lib/components/fields/IntArrayField.js +11 -12
- package/dist-lib/components/fields/JsonEditor.js +1 -2
- package/dist-lib/components/fields/JsonField.js +1 -2
- package/dist-lib/components/fields/MultilangArrayField.js +22 -23
- package/dist-lib/components/fields/MultilangField.js +13 -14
- package/dist-lib/components/fields/MultilangTextField.js +13 -14
- package/dist-lib/components/fields/NumberField.js +5 -6
- package/dist-lib/components/fields/PasswordField.js +1 -2
- package/dist-lib/components/fields/PhoneField.js +24 -25
- package/dist-lib/components/fields/RefCombobox.js +42 -43
- package/dist-lib/components/fields/RefField.js +14 -15
- package/dist-lib/components/fields/RichTextField.js +29 -30
- package/dist-lib/components/fields/SecretField.js +1 -2
- package/dist-lib/components/fields/StringArrayField.js +29 -30
- package/dist-lib/components/fields/StringField.js +12 -13
- package/dist-lib/components/fields/StructureField.js +60 -61
- package/dist-lib/components/fields/TextField.js +18 -19
- package/dist-lib/components/fields/TimestampField.js +17 -18
- package/dist-lib/components/fields/UrlField.js +5 -6
- package/dist-lib/components/fields/cells/factories/badge.js +5 -6
- package/dist-lib/components/fields/cells/factories/boolPill.js +1 -2
- package/dist-lib/components/fields/cells/factories/code.js +1 -2
- package/dist-lib/components/fields/cells/factories/date.js +1 -2
- package/dist-lib/components/fields/cells/factories/email.js +1 -2
- package/dist-lib/components/fields/cells/factories/emptyCell.js +0 -1
- package/dist-lib/components/fields/cells/factories/fileReference.js +1 -2
- package/dist-lib/components/fields/cells/factories/host-icons.js +1 -2
- package/dist-lib/components/fields/cells/factories/json.js +1 -2
- package/dist-lib/components/fields/cells/factories/link.js +10 -11
- package/dist-lib/components/fields/cells/factories/markdown.js +14 -15
- package/dist-lib/components/fields/cells/factories/markdownPreview.js +1 -2
- package/dist-lib/components/fields/cells/factories/money.js +1 -2
- package/dist-lib/components/fields/cells/factories/multilangInline.js +1 -2
- package/dist-lib/components/fields/cells/factories/nextRun.js +8 -9
- package/dist-lib/components/fields/cells/factories/number.js +1 -2
- package/dist-lib/components/fields/cells/factories/passwordMask.js +1 -2
- package/dist-lib/components/fields/cells/factories/phone.js +1 -2
- package/dist-lib/components/fields/cells/factories/refLink.js +13 -14
- package/dist-lib/components/fields/cells/factories/richTextPreview.js +16 -17
- package/dist-lib/components/fields/cells/factories/statusPill.js +5 -6
- package/dist-lib/components/fields/cells/factories/tagList.js +6 -7
- package/dist-lib/components/fields/cells/factories/text.js +1 -2
- package/dist-lib/components/fields/cells/factories/timestamp.js +1 -2
- package/dist-lib/components/fields/cells/factories/url-helpers.js +1 -2
- package/dist-lib/components/fields/cells/factories/url.js +13 -14
- package/dist-lib/components/fields/cells/registry.js +1 -2
- package/dist-lib/components/fields/index.js +19 -20
- package/dist-lib/components/fields/langMap.js +1 -2
- package/dist-lib/components/fields/secretValue.js +1 -2
- package/dist-lib/components/file-widgets/CircleImage.js +1 -2
- package/dist-lib/components/file-widgets/DocumentCard.js +101 -102
- package/dist-lib/components/file-widgets/FileList.js +35 -36
- package/dist-lib/components/file-widgets/Grid.js +119 -120
- package/dist-lib/components/file-widgets/GridLazy.js +1 -2
- package/dist-lib/components/file-widgets/ImageWidget.js +189 -190
- package/dist-lib/components/file-widgets/LabeledSlots.js +14 -15
- package/dist-lib/components/file-widgets/SquareImage.js +1 -2
- package/dist-lib/components/file-widgets/UnknownFileWidget.js +1 -2
- package/dist-lib/components/file-widgets/UploadFailureText.js +1 -2
- package/dist-lib/components/file-widgets/WideBanner.js +1 -2
- package/dist-lib/components/file-widgets/builtins.js +1 -2
- package/dist-lib/components/file-widgets/cropper.js +1 -2
- package/dist-lib/components/file-widgets/draft-scope.js +1 -2
- package/dist-lib/components/file-widgets/helpers.js +1 -2
- package/dist-lib/components/file-widgets/host.js +33 -34
- package/dist-lib/components/file-widgets/payload.js +1 -2
- package/dist-lib/components/file-widgets/registry.js +1 -2
- package/dist-lib/components/file-widgets/upload.js +41 -42
- package/dist-lib/components/file-widgets/useEmbedFileSrc.js +12 -13
- package/dist-lib/components/file-widgets/useFileSelection.js +1 -2
- package/dist-lib/components/file-widgets/value.js +1 -2
- package/dist-lib/components/filters/FilterChips.js +15 -16
- package/dist-lib/components/filters/FilterConditionValue.js +15 -16
- package/dist-lib/components/filters/FilterDrawer.js +141 -142
- package/dist-lib/components/filters/FilterOmittedNotice.js +1 -2
- package/dist-lib/components/filters/filter-op-label.js +1 -2
- package/dist-lib/components/layout/CommandPalette.impl.js +24 -25
- package/dist-lib/components/layout/CommandPalette.js +1 -2
- package/dist-lib/components/layout/DirtyTabsCloseDialog.impl.js +15 -16
- package/dist-lib/components/layout/DirtyTabsCloseDialog.js +1 -2
- package/dist-lib/components/layout/ImpersonationBanner.impl.js +6 -7
- package/dist-lib/components/layout/ImpersonationBanner.js +1 -2
- package/dist-lib/components/layout/ImpersonationFrame.js +4 -5
- package/dist-lib/components/layout/ImpersonationStartModal.impl.js +4 -5
- package/dist-lib/components/layout/ImpersonationStartModal.js +1 -2
- package/dist-lib/components/layout/Layout.js +132 -140
- package/dist-lib/components/layout/Rail.js +11 -12
- package/dist-lib/components/layout/Sidebar.js +60 -61
- package/dist-lib/components/layout/TabStrip.js +66 -67
- package/dist-lib/components/layout/TenantChip.js +21 -22
- package/dist-lib/components/layout/TopBar.js +89 -90
- package/dist-lib/components/layout/tab-close.js +1 -2
- package/dist-lib/components/list/ColumnPicker.js +35 -36
- package/dist-lib/components/list/InlineEditCell.js +22 -23
- package/dist-lib/components/list/PeekFieldCell.js +7 -8
- package/dist-lib/components/list/QuickPeek.js +29 -30
- package/dist-lib/components/list/ViewSwitcher.js +44 -45
- package/dist-lib/components/list/peekDraftStore.js +1 -2
- package/dist-lib/components/pages/AdminCatalogPage.impl.js +59 -60
- package/dist-lib/components/pages/AdminCatalogPage.js +1 -2
- package/dist-lib/components/pages/DocumentsMenu.js +53 -54
- package/dist-lib/components/pages/ExportMenu.js +37 -38
- package/dist-lib/components/pages/NoScreensPage.impl.js +5 -6
- package/dist-lib/components/pages/NoScreensPage.js +1 -2
- package/dist-lib/components/pages/NotFoundPage.impl.js +7 -8
- package/dist-lib/components/pages/NotFoundPage.js +1 -2
- package/dist-lib/components/pages/RecordDocumentsPanel.js +40 -41
- package/dist-lib/components/pages/RecordNotesPanel.js +43 -44
- package/dist-lib/components/pages/RecordPanels.js +1 -2
- package/dist-lib/components/pages/SSOCallbackPage.impl.js +6 -7
- package/dist-lib/components/pages/SSOCallbackPage.js +1 -2
- package/dist-lib/components/pages/SmartDetailPage.impl.js +501 -502
- package/dist-lib/components/pages/SmartDetailPage.js +1 -2
- package/dist-lib/components/pages/SmartListPage.impl.js +316 -317
- package/dist-lib/components/pages/SmartListPage.js +1 -2
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +316 -317
- package/dist-lib/components/pages/SmartRecordListPage.js +1 -2
- package/dist-lib/components/pages/auth/AuthShell.js +14 -15
- package/dist-lib/components/pages/auth/CodeInput.js +0 -1
- package/dist-lib/components/pages/auth/Forgot.impl.js +12 -13
- package/dist-lib/components/pages/auth/Forgot.js +1 -2
- package/dist-lib/components/pages/auth/Reset.impl.js +20 -21
- package/dist-lib/components/pages/auth/Reset.js +1 -2
- package/dist-lib/components/pages/auth/SignIn.js +44 -45
- package/dist-lib/components/pages/auth/SignUp.impl.js +35 -36
- package/dist-lib/components/pages/auth/SignUp.js +1 -2
- package/dist-lib/components/pages/auth/SignUpCode.js +17 -18
- package/dist-lib/components/pages/auth/TwoFA.impl.js +9 -10
- package/dist-lib/components/pages/auth/TwoFA.js +1 -2
- package/dist-lib/components/pages/auth/icons.js +1 -2
- package/dist-lib/components/pages/exportRequest.js +1 -2
- package/dist-lib/components/pages/list/DataCell.js +1 -2
- package/dist-lib/components/pages/list/DeleteViewDialog.js +5 -6
- package/dist-lib/components/pages/list/ListCardRow.js +53 -54
- package/dist-lib/components/pages/list/ListCardsBody.js +1 -2
- package/dist-lib/components/pages/list/ListFloatbar.js +25 -26
- package/dist-lib/components/pages/list/ListFooter.js +17 -18
- package/dist-lib/components/pages/list/ListHeader.js +31 -32
- package/dist-lib/components/pages/list/ListNoRows.js +32 -33
- package/dist-lib/components/pages/list/ListTable.js +29 -30
- package/dist-lib/components/pages/list/ListTableRow.js +1 -2
- package/dist-lib/components/pages/list/ListToolbar.js +58 -59
- package/dist-lib/components/pages/list/ListUrlBanner.js +1 -2
- package/dist-lib/components/pages/list/RowActionsCell.js +6 -7
- package/dist-lib/components/pages/list/RowContextMenu.js +1 -2
- package/dist-lib/components/pages/list/SaveViewDialog.js +5 -6
- package/dist-lib/components/pages/list/SortHeaderMenu.js +25 -26
- package/dist-lib/components/pages/list/cardProjection.js +16 -17
- package/dist-lib/components/pages/list/column-sizing.js +1 -2
- package/dist-lib/components/pages/list/columns.js +74 -75
- package/dist-lib/components/pages/list/filter-meta.js +1 -2
- package/dist-lib/components/pages/list/page-size.js +1 -2
- package/dist-lib/components/pages/list/sortable-header.js +1 -2
- package/dist-lib/components/pages/list/table-features.js +1 -2
- package/dist-lib/components/pages/list/use-filter-value-labels.js +15 -16
- package/dist-lib/components/pages/list/useActiveView.js +1 -2
- package/dist-lib/components/pages/list/useHeaderReorder.js +1 -2
- package/dist-lib/components/pages/list/useListColumnLayout.js +6 -7
- package/dist-lib/components/pages/list/useListFilterPresentation.js +1 -2
- package/dist-lib/components/pages/list/useListQuery.js +1 -2
- package/dist-lib/components/pages/list/useListRowInteraction.js +37 -38
- package/dist-lib/components/pages/list/useListSelection.js +16 -17
- package/dist-lib/components/pages/list/useListSort.js +1 -2
- package/dist-lib/components/pages/list/useListViews.js +31 -32
- package/dist-lib/components/pages/list/useRowMenu.js +20 -21
- package/dist-lib/components/pages/list/visible-filters.js +1 -2
- package/dist-lib/components/pages/profile/Preferences.impl.js +44 -45
- package/dist-lib/components/pages/profile/Preferences.js +1 -2
- package/dist-lib/components/pages/profile/Profile.impl.js +223 -224
- package/dist-lib/components/pages/profile/Profile.js +1 -2
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +133 -134
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +1 -2
- package/dist-lib/components/params/ParamsBlock.js +30 -31
- package/dist-lib/components/params/param-editors.js +58 -59
- package/dist-lib/components/primitives/Avatar.js +1 -2
- package/dist-lib/components/primitives/BoolToggle.js +1 -2
- package/dist-lib/components/primitives/BrandGlyph.js +1 -2
- package/dist-lib/components/primitives/BrandLogo.js +1 -2
- package/dist-lib/components/primitives/Btn.js +1 -2
- package/dist-lib/components/primitives/Check.js +1 -2
- package/dist-lib/components/primitives/Chip.js +1 -2
- package/dist-lib/components/primitives/ClassifiedFieldLocked.js +1 -2
- package/dist-lib/components/primitives/Dropdown.js +2 -3
- package/dist-lib/components/primitives/Fields.js +128 -129
- package/dist-lib/components/primitives/HoverCard.js +2 -3
- package/dist-lib/components/primitives/IconBtn.js +1 -2
- package/dist-lib/components/primitives/Icons.js +1 -2
- package/dist-lib/components/primitives/Kbd.js +1 -2
- package/dist-lib/components/primitives/MenuItem.js +1 -2
- package/dist-lib/components/primitives/Pill.js +1 -2
- package/dist-lib/components/primitives/RecordIdBadge.js +1 -2
- package/dist-lib/components/primitives/RetryButton.js +5 -6
- package/dist-lib/components/primitives/RowField.js +1 -2
- package/dist-lib/components/primitives/SectionCard.js +1 -2
- package/dist-lib/components/primitives/Spinner.js +1 -2
- package/dist-lib/components/primitives/StatTile.js +1 -2
- package/dist-lib/components/primitives/Tooltip.js +1 -2
- package/dist-lib/components/primitives/dataTableStyles.js +1 -2
- package/dist-lib/components/shared/BlankScreen.js +1 -2
- package/dist-lib/components/shared/ChangePasswordDialog.impl.js +20 -21
- package/dist-lib/components/shared/ChangePasswordDialog.js +1 -2
- package/dist-lib/components/shared/ConfirmDialog.js +7 -8
- package/dist-lib/components/shared/ConnectionNotice.js +1 -2
- package/dist-lib/components/shared/CopyButton.js +1 -2
- package/dist-lib/components/shared/DynamicIcon.js +1 -2
- package/dist-lib/components/shared/EmptyState.js +1 -2
- package/dist-lib/components/shared/ErrorBoundary.js +10 -11
- package/dist-lib/components/shared/LoadingSkeleton.js +1 -2
- package/dist-lib/components/shared/LucideIcon.js +1 -2
- package/dist-lib/components/shared/Markdown.js +1 -2
- package/dist-lib/components/shared/MarkdownRenderer.js +22 -23
- package/dist-lib/components/shared/ModalFrame.js +1 -2
- package/dist-lib/components/shared/RefreshControl.js +6 -7
- package/dist-lib/components/shared/StatusGroupsDisplay.js +16 -17
- package/dist-lib/components/shared/StatusStepper.js +1 -2
- package/dist-lib/components/shared/toast/DeclarionToast.js +1 -2
- package/dist-lib/components/shared/useOwnRefresh.js +1 -2
- package/dist-lib/embed/EmbedAuthBootstrap.js +30 -31
- package/dist-lib/embed/EmbedContext.js +1 -2
- package/dist-lib/embed/EmbedDirtyReporter.js +6 -7
- package/dist-lib/embed/EmbedHistoryTracker.js +1 -2
- package/dist-lib/embed/EmbedLocationReporter.js +11 -12
- package/dist-lib/embed/EmbedResizeReporter.js +9 -10
- package/dist-lib/embed/EmbedUnsavedGuard.js +5 -6
- package/dist-lib/embed/embed-dirty.js +1 -2
- package/dist-lib/embed/embed-history.js +1 -2
- package/dist-lib/embed/embed-nav-guard.js +1 -2
- package/dist-lib/embed/file-src.js +12 -13
- package/dist-lib/embed/handshake.js +1 -2
- package/dist-lib/embed/params.js +1 -2
- package/dist-lib/embed/protocol.js +1 -2
- package/dist-lib/embed/screen-location.js +1 -2
- package/dist-lib/embed/theme.js +1 -2
- package/dist-lib/embed/token.js +1 -2
- package/dist-lib/embed/useEmbedNavigate.js +25 -26
- package/dist-lib/embed/useGlobalLinkInterceptor.js +9 -10
- package/dist-lib/hooks/useActionData.js +1 -2
- package/dist-lib/hooks/useActiveTabFollowsRoute.js +7 -8
- package/dist-lib/hooks/useAgentConversation.js +122 -123
- package/dist-lib/hooks/useAggregate.js +1 -2
- package/dist-lib/hooks/useAllEntityData.js +9 -10
- package/dist-lib/hooks/useAssociatedData.js +1 -2
- package/dist-lib/hooks/useAuth.js +26 -27
- package/dist-lib/hooks/useBranding.js +1 -2
- package/dist-lib/hooks/useBrandingChrome.js +16 -17
- package/dist-lib/hooks/useChildrenData.js +4 -5
- package/dist-lib/hooks/useColumns.js +1 -2
- package/dist-lib/hooks/useConnectionNotice.js +16 -17
- package/dist-lib/hooks/useCurrentLocation.js +1 -2
- package/dist-lib/hooks/useCurrentScreen.js +1 -2
- package/dist-lib/hooks/useCursorEntityData.js +1 -2
- package/dist-lib/hooks/useDebounce.js +1 -2
- package/dist-lib/hooks/useDisplayTimeZone.js +4 -5
- package/dist-lib/hooks/useDocumentTitle.js +5 -6
- package/dist-lib/hooks/useEntity.js +1 -2
- package/dist-lib/hooks/useEntityData.js +1 -2
- package/dist-lib/hooks/useFileReferenceJSON.js +9 -10
- package/dist-lib/hooks/useFilters.js +5 -6
- package/dist-lib/hooks/useFollowAgentOpen.js +40 -41
- package/dist-lib/hooks/useImpersonation.js +15 -16
- package/dist-lib/hooks/useIntentPrefetch.js +6 -7
- package/dist-lib/hooks/useJsonSnapshot.js +1 -2
- package/dist-lib/hooks/useLanguage.js +11 -12
- package/dist-lib/hooks/useLiveObject.js +6 -7
- package/dist-lib/hooks/useLongPress.js +1 -2
- package/dist-lib/hooks/useMutations.js +31 -32
- package/dist-lib/hooks/useObject.js +1 -2
- package/dist-lib/hooks/useObjectStatus.js +4 -5
- package/dist-lib/hooks/usePageState.js +9 -10
- package/dist-lib/hooks/usePageStateRuntime.js +16 -17
- package/dist-lib/hooks/usePageStateTtl.js +1 -2
- package/dist-lib/hooks/useParams.js +58 -59
- package/dist-lib/hooks/useProperties.js +5 -6
- package/dist-lib/hooks/useRealtimeThresholds.js +4 -5
- package/dist-lib/hooks/useRefRecords.js +31 -32
- package/dist-lib/hooks/useRegisterScreenTab.js +12 -13
- package/dist-lib/hooks/useResponsiveMode.js +1 -2
- package/dist-lib/hooks/useRowTenant.js +1 -2
- package/dist-lib/hooks/useSSE.js +100 -101
- package/dist-lib/hooks/useSchema.js +16 -17
- package/dist-lib/hooks/useScreen.js +1 -2
- package/dist-lib/hooks/useScreenBack.js +17 -18
- package/dist-lib/hooks/useScreenTab.js +1 -2
- package/dist-lib/hooks/useTabNavigate.js +25 -26
- package/dist-lib/hooks/useTabSearchMirror.js +6 -7
- package/dist-lib/hooks/useTabTitle.js +10 -11
- package/dist-lib/hooks/useText.js +6 -7
- package/dist-lib/hooks/useTimelineData.js +5 -6
- package/dist-lib/hooks/useUiPreferences.js +31 -32
- package/dist-lib/hooks/useUnsavedInput.js +1 -2
- package/dist-lib/hooks/useVersionWatcher.js +16 -17
- package/dist-lib/hooks/useViews.js +16 -17
- package/dist-lib/hooks/useWindowConversation.js +1 -2
- package/dist-lib/{icon-registry-CUT4eF63.d.ts → icon-registry-BY2tt-GF.d.ts} +0 -2
- package/dist-lib/icons.d.ts +2 -4
- package/dist-lib/icons.js +5 -5
- package/dist-lib/index.d.ts +4 -272
- package/dist-lib/index.js +129 -129
- package/dist-lib/lib/action-dispatch.js +1 -2
- package/dist-lib/lib/actions.js +26 -27
- package/dist-lib/lib/anchor.js +1 -2
- package/dist-lib/lib/brand-tokens.js +1 -2
- package/dist-lib/lib/branding.js +1 -2
- package/dist-lib/lib/canonical-url.js +1 -2
- package/dist-lib/lib/capabilityPrefetch.js +1 -2
- package/dist-lib/lib/child-config.js +1 -2
- package/dist-lib/lib/children-validation.js +2 -3
- package/dist-lib/lib/date-text.js +1 -2
- package/dist-lib/lib/decimal-text.js +1 -2
- package/dist-lib/lib/display-value.js +1 -2
- package/dist-lib/lib/document-templates.js +1 -2
- package/dist-lib/lib/download.js +13 -14
- package/dist-lib/lib/evidence-verdict.js +1 -2
- package/dist-lib/lib/failure.js +4 -5
- package/dist-lib/lib/field-classification.js +1 -2
- package/dist-lib/lib/field-regions.js +1 -2
- package/dist-lib/lib/filter-evaluator.js +1 -2
- package/dist-lib/lib/filters.js +1 -2
- package/dist-lib/lib/format-count.js +1 -2
- package/dist-lib/lib/html-state.js +1 -2
- package/dist-lib/lib/language.js +1 -2
- package/dist-lib/lib/longPressGesture.js +0 -1
- package/dist-lib/lib/mass-edit.js +1 -2
- package/dist-lib/lib/money-text.js +1 -2
- package/dist-lib/lib/number-text.js +1 -2
- package/dist-lib/lib/page-inset.js +1 -2
- package/dist-lib/lib/phone.js +1 -2
- package/dist-lib/lib/profile.js +1 -2
- package/dist-lib/lib/query-retry.js +1 -2
- package/dist-lib/lib/quick-add.js +1 -2
- package/dist-lib/lib/read-display-state.js +1 -2
- package/dist-lib/lib/realtime-query-keys.js +2 -3
- package/dist-lib/lib/realtime-reconcile.js +32 -33
- package/dist-lib/lib/realtime-resync.js +40 -41
- package/dist-lib/lib/record-documents-key.js +1 -2
- package/dist-lib/lib/ref-choices.js +1 -2
- package/dist-lib/lib/refetch-when-idle.js +1 -2
- package/dist-lib/lib/rich-text.js +1 -2
- package/dist-lib/lib/role-label.js +1 -2
- package/dist-lib/lib/rowClickGesture.js +1 -2
- package/dist-lib/lib/safe-url.js +1 -2
- package/dist-lib/lib/schema-routing.js +1 -2
- package/dist-lib/lib/screen-back.js +1 -2
- package/dist-lib/lib/scroll-restoration.js +21 -22
- package/dist-lib/lib/shortcut.js +1 -2
- package/dist-lib/lib/size-value.js +1 -2
- package/dist-lib/lib/sort.js +1 -2
- package/dist-lib/lib/timestamp.js +1 -2
- package/dist-lib/lib/toast.js +1 -2
- package/dist-lib/lib/ui-actions.js +43 -44
- package/dist-lib/lib/utils.js +1 -2
- package/dist-lib/lib/variants.js +1 -2
- package/dist-lib/lib/versionTracker.js +26 -27
- package/dist-lib/lib/viewport-category.js +1 -2
- package/dist-lib/lib/window-election.js +1 -2
- package/dist-lib/stores/auth.js +32 -33
- package/dist-lib/stores/icon-registry.js +1 -2
- package/dist-lib/stores/list-layout.js +0 -1
- package/dist-lib/stores/page-state.js +1 -2
- package/dist-lib/stores/preferences.js +1 -2
- package/dist-lib/stores/realtime.js +1 -2
- package/dist-lib/stores/screen-registry.js +1 -2
- package/dist-lib/stores/tabs.js +1 -2
- package/dist-lib/test/seed-schema.js +4 -5
- package/dist-lib/testing.d.ts +2 -4
- package/dist-lib/testing.js +49 -50
- package/dist-lib/types/api.js +1 -2
- package/dist-lib/types/fieldType.js +1 -2
- package/dist-lib/types/ordmap.js +1 -2
- package/dist-lib/types/schema.js +1 -2
- package/dist-lib/{useResponsiveMode-C4MeAgoS.d.ts → useResponsiveMode-BElw02Gh.d.ts} +1 -19
- package/dist-lib/vite/index.d.ts +0 -2
- package/dist-lib/vite/index.js +1 -2
- package/package.json +11 -11
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Btn as e } from "../primitives/Btn.js";
|
|
2
2
|
import { Icon as t } from "../primitives/Icons.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { IconBtn as n } from "../primitives/IconBtn.js";
|
|
4
|
+
import { MultiSelect as r, Select as i, TextInput as a } from "../primitives/Fields.js";
|
|
5
|
+
import { RefCombobox as o } from "../fields/RefCombobox.js";
|
|
6
|
+
import { MULTI_VALUE_OPS as s, NO_VALUE_OPS as c, flatFieldConditions as l, hasOrGroups as u, removeFilterAtPath as d } from "../../lib/filters.js";
|
|
7
|
+
import { coerceDisplayString as f } from "../../lib/display-value.js";
|
|
8
|
+
import { useResponsiveMode as p } from "../../hooks/useResponsiveMode.js";
|
|
9
|
+
import { useJsonSnapshot as m } from "../../hooks/useJsonSnapshot.js";
|
|
10
|
+
import { useText as h } from "../../hooks/useText.js";
|
|
11
11
|
import { filterOpLabel as g } from "./filter-op-label.js";
|
|
12
12
|
import { FilterConditionValue as _ } from "./FilterConditionValue.js";
|
|
13
13
|
import { useEffect as v, useMemo as y, useState as b } from "react";
|
|
14
14
|
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
15
|
-
|
|
16
|
-
function w({ open:
|
|
17
|
-
let D =
|
|
18
|
-
|
|
15
|
+
// src/components/filters/FilterDrawer.tsx
|
|
16
|
+
function w({ open: r, onClose: i, filters: a, onApply: o, availableFields: s, allFields: c = s, fieldLabel: f = (e) => e, resolveValue: g, defaultFilters: w, refs: T }) {
|
|
17
|
+
let D = h(), O = p().category === "phone", [k, A] = b(a), [j, R] = b(!1), [z, B, V] = m([
|
|
18
|
+
a,
|
|
19
19
|
w ?? [],
|
|
20
|
-
|
|
20
|
+
s.map(({ code: e, operators: t }) => ({
|
|
21
21
|
code: e,
|
|
22
22
|
operators: t
|
|
23
23
|
}))
|
|
@@ -33,16 +33,16 @@ function w({ open: e, onClose: o, filters: s, onApply: c, availableFields: l, al
|
|
|
33
33
|
V
|
|
34
34
|
]);
|
|
35
35
|
if (v(() => {
|
|
36
|
-
|
|
37
|
-
}, [
|
|
38
|
-
let U =
|
|
39
|
-
let t = new Set(
|
|
36
|
+
r && A(H);
|
|
37
|
+
}, [r, H]), !r) return null;
|
|
38
|
+
let U = u(k), W = new Set(l(k).filter((e) => e.field).map((e) => e.field)), G = (e = k) => {
|
|
39
|
+
let t = new Set(l(e).map((e) => e.field).filter(Boolean)), n = s.find((e) => !t.has(e.code)) ?? s[0];
|
|
40
40
|
return n ? {
|
|
41
41
|
field: n.code,
|
|
42
42
|
op: n.operators[0] || "eq"
|
|
43
43
|
} : {};
|
|
44
44
|
}, K = (e) => {
|
|
45
|
-
let t =
|
|
45
|
+
let t = s.find((t) => t.code === e);
|
|
46
46
|
if (!t) return;
|
|
47
47
|
let n = t.operators[0] || "eq";
|
|
48
48
|
A((t) => [...t, {
|
|
@@ -60,7 +60,7 @@ function w({ open: e, onClose: o, filters: s, onApply: c, availableFields: l, al
|
|
|
60
60
|
}, Y = (e, t) => {
|
|
61
61
|
A((n) => I(n, e, t));
|
|
62
62
|
}, X = (e) => {
|
|
63
|
-
A((t) =>
|
|
63
|
+
A((t) => d(t, e));
|
|
64
64
|
}, Z = (e, t) => {
|
|
65
65
|
A((n) => F(n, e, (e) => e.or ? {
|
|
66
66
|
...e,
|
|
@@ -74,21 +74,21 @@ function w({ open: e, onClose: o, filters: s, onApply: c, availableFields: l, al
|
|
|
74
74
|
if (!r) return;
|
|
75
75
|
let i = G();
|
|
76
76
|
r.and ? Z(n, i) : r.field || r.op || r.or ? Y(n, { and: [r, i] }) : Y(n, i);
|
|
77
|
-
}, $ = (e,
|
|
77
|
+
}, $ = (e, r) => {
|
|
78
78
|
if (e.or || e.and) return /* @__PURE__ */ S(N, {
|
|
79
79
|
node: e,
|
|
80
80
|
renderNode: $,
|
|
81
81
|
onRemoveChild: X,
|
|
82
82
|
onAddCondition: (t) => {
|
|
83
|
-
e.or && t !== void 0 ? Q(
|
|
83
|
+
e.or && t !== void 0 ? Q(r, t) : Z(r, G(e.or ?? e.and));
|
|
84
84
|
},
|
|
85
|
-
onAddBranch: () => Z(
|
|
86
|
-
path:
|
|
87
|
-
},
|
|
88
|
-
if (!e.field || !e.op) return /* @__PURE__ */ S("div", { style: { minHeight: 4 } },
|
|
89
|
-
let i =
|
|
85
|
+
onAddBranch: () => Z(r, {}),
|
|
86
|
+
path: r
|
|
87
|
+
}, r.join("-"));
|
|
88
|
+
if (!e.field || !e.op) return /* @__PURE__ */ S("div", { style: { minHeight: 4 } }, r.join("-"));
|
|
89
|
+
let i = s.find((t) => t.code === e.field);
|
|
90
90
|
if (!i || !i.operators.includes(e.op)) {
|
|
91
|
-
let a =
|
|
91
|
+
let a = c.find((t) => t.code === e.field)?.label ?? f(e.field);
|
|
92
92
|
return /* @__PURE__ */ C("div", {
|
|
93
93
|
style: {
|
|
94
94
|
display: "flex",
|
|
@@ -110,10 +110,10 @@ function w({ open: e, onClose: o, filters: s, onApply: c, availableFields: l, al
|
|
|
110
110
|
overflowWrap: "anywhere"
|
|
111
111
|
},
|
|
112
112
|
children: a
|
|
113
|
-
}), /* @__PURE__ */ S(
|
|
113
|
+
}), /* @__PURE__ */ S(n, {
|
|
114
114
|
size: 22,
|
|
115
115
|
icon: /* @__PURE__ */ S(t.x, { size: 12 }),
|
|
116
|
-
onClick: () => X(
|
|
116
|
+
onClick: () => X(r),
|
|
117
117
|
title: D("filter.drawer.remove_condition", "Remove {field} condition", { field: a })
|
|
118
118
|
})]
|
|
119
119
|
}),
|
|
@@ -132,18 +132,18 @@ function w({ open: e, onClose: o, filters: s, onApply: c, availableFields: l, al
|
|
|
132
132
|
children: i ? D("filter.drawer.operator_readonly", "This condition can't be edited here.") : D("filter.drawer.field_readonly", "This field can't be edited on this screen.")
|
|
133
133
|
})
|
|
134
134
|
]
|
|
135
|
-
},
|
|
135
|
+
}, r.join("-"));
|
|
136
136
|
}
|
|
137
137
|
return /* @__PURE__ */ S(M, {
|
|
138
138
|
node: e,
|
|
139
139
|
meta: i,
|
|
140
140
|
refs: T,
|
|
141
|
-
onUpdate: (e) => J(
|
|
142
|
-
onRemove: () => X(
|
|
143
|
-
},
|
|
141
|
+
onUpdate: (e) => J(r, e),
|
|
142
|
+
onRemove: () => X(r)
|
|
143
|
+
}, r.join("-"));
|
|
144
144
|
};
|
|
145
145
|
return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("div", {
|
|
146
|
-
onClick:
|
|
146
|
+
onClick: i,
|
|
147
147
|
style: {
|
|
148
148
|
position: "fixed",
|
|
149
149
|
inset: 0,
|
|
@@ -196,9 +196,9 @@ function w({ open: e, onClose: o, filters: s, onApply: c, availableFields: l, al
|
|
|
196
196
|
},
|
|
197
197
|
children: D("filter.drawer.title", "Filters")
|
|
198
198
|
})]
|
|
199
|
-
}), /* @__PURE__ */ S(
|
|
199
|
+
}), /* @__PURE__ */ S(n, {
|
|
200
200
|
icon: /* @__PURE__ */ S(t.x, { size: 14 }),
|
|
201
|
-
onClick:
|
|
201
|
+
onClick: i,
|
|
202
202
|
title: D("filter.drawer.close", "Close")
|
|
203
203
|
})]
|
|
204
204
|
}),
|
|
@@ -221,16 +221,16 @@ function w({ open: e, onClose: o, filters: s, onApply: c, availableFields: l, al
|
|
|
221
221
|
paddingTop: 6
|
|
222
222
|
},
|
|
223
223
|
children: j ? /* @__PURE__ */ S(L, {
|
|
224
|
-
fields:
|
|
224
|
+
fields: s,
|
|
225
225
|
activeFields: W,
|
|
226
226
|
compact: O,
|
|
227
227
|
onSelect: K,
|
|
228
228
|
onCancel: () => R(!1)
|
|
229
|
-
}) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(
|
|
229
|
+
}) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(e, {
|
|
230
230
|
icon: /* @__PURE__ */ S(t.plus, { size: 12 }),
|
|
231
231
|
onClick: () => R(!0),
|
|
232
232
|
children: D("filter.drawer.add_filter", "Add filter")
|
|
233
|
-
}), !U &&
|
|
233
|
+
}), !U && l(k).length > 0 && /* @__PURE__ */ S(e, {
|
|
234
234
|
kind: "ghost",
|
|
235
235
|
icon: /* @__PURE__ */ S(t.plus, { size: 12 }),
|
|
236
236
|
onClick: q,
|
|
@@ -251,7 +251,7 @@ function w({ open: e, onClose: o, filters: s, onApply: c, availableFields: l, al
|
|
|
251
251
|
paddingBottom: "calc(10px + var(--safe-area-bottom))"
|
|
252
252
|
},
|
|
253
253
|
children: [
|
|
254
|
-
/* @__PURE__ */ S(
|
|
254
|
+
/* @__PURE__ */ S(e, {
|
|
255
255
|
kind: "ghost",
|
|
256
256
|
onClick: () => {
|
|
257
257
|
A([]);
|
|
@@ -259,17 +259,17 @@ function w({ open: e, onClose: o, filters: s, onApply: c, availableFields: l, al
|
|
|
259
259
|
children: D("filter.drawer.reset", "Reset")
|
|
260
260
|
}),
|
|
261
261
|
/* @__PURE__ */ S("div", { style: { flex: 1 } }),
|
|
262
|
-
/* @__PURE__ */ S(
|
|
263
|
-
onClick:
|
|
262
|
+
/* @__PURE__ */ S(e, {
|
|
263
|
+
onClick: i,
|
|
264
264
|
children: D("dialog.cancel", "Cancel")
|
|
265
265
|
}),
|
|
266
|
-
/* @__PURE__ */ S(
|
|
266
|
+
/* @__PURE__ */ S(e, {
|
|
267
267
|
kind: "primary",
|
|
268
268
|
onClick: () => {
|
|
269
|
-
|
|
270
|
-
let t =
|
|
269
|
+
o(E(k, (e) => {
|
|
270
|
+
let t = s.find((t) => t.code === e.field);
|
|
271
271
|
return !!t && !!e.op && t.operators.includes(e.op);
|
|
272
|
-
})),
|
|
272
|
+
})), i();
|
|
273
273
|
},
|
|
274
274
|
children: D("filter.drawer.apply", "Apply")
|
|
275
275
|
})
|
|
@@ -295,7 +295,7 @@ function E(e, t) {
|
|
|
295
295
|
...r,
|
|
296
296
|
and: e
|
|
297
297
|
});
|
|
298
|
-
} else r.field && r.op && (!t(r) ||
|
|
298
|
+
} else r.field && r.op && (!t(r) || c.has(r.op) || T(r.value)) && n.push(r);
|
|
299
299
|
return n;
|
|
300
300
|
}
|
|
301
301
|
function D(e, t) {
|
|
@@ -317,48 +317,48 @@ function D(e, t) {
|
|
|
317
317
|
];
|
|
318
318
|
}
|
|
319
319
|
var O = "__custom__";
|
|
320
|
-
function k({ meta:
|
|
321
|
-
let
|
|
322
|
-
return
|
|
323
|
-
"aria-label":
|
|
324
|
-
value:
|
|
325
|
-
onChange: (e) =>
|
|
326
|
-
placeholder:
|
|
320
|
+
function k({ meta: e, value: t, onUpdate: n }) {
|
|
321
|
+
let r = h(), o = e.specialValues ?? [], s = f(t), c = o.some((e) => e.code === s), [l, u] = b(!c && s !== "");
|
|
322
|
+
return l ? /* @__PURE__ */ S(a, {
|
|
323
|
+
"aria-label": r("filter.value.aria", "{field} filter value", { field: e.label }),
|
|
324
|
+
value: s,
|
|
325
|
+
onChange: (e) => n({ value: e }),
|
|
326
|
+
placeholder: r("filter.value.placeholder", "Value…"),
|
|
327
327
|
autoFocus: !0
|
|
328
|
-
}) : /* @__PURE__ */ S(
|
|
329
|
-
"aria-label":
|
|
330
|
-
value:
|
|
328
|
+
}) : /* @__PURE__ */ S(i, {
|
|
329
|
+
"aria-label": r("filter.value.aria", "{field} filter value", { field: e.label }),
|
|
330
|
+
value: s,
|
|
331
331
|
options: [
|
|
332
332
|
{
|
|
333
333
|
value: "",
|
|
334
|
-
label:
|
|
334
|
+
label: r("filter.value.select", "Select…")
|
|
335
335
|
},
|
|
336
|
-
...D(
|
|
336
|
+
...D(r, o),
|
|
337
337
|
{
|
|
338
338
|
value: O,
|
|
339
|
-
label:
|
|
339
|
+
label: r("filter.value.custom", "Custom value…")
|
|
340
340
|
}
|
|
341
341
|
],
|
|
342
342
|
onChange: (e) => {
|
|
343
|
-
e === O ? (
|
|
343
|
+
e === O ? (u(!0), n({ value: "" })) : n({ value: e });
|
|
344
344
|
}
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
|
-
function A(
|
|
348
|
-
return Array.isArray(
|
|
347
|
+
function A(e) {
|
|
348
|
+
return Array.isArray(e) ? e.map((e) => f(e)) : e == null || e === "" ? [] : [f(e)];
|
|
349
349
|
}
|
|
350
|
-
function j(
|
|
351
|
-
return Array.isArray(
|
|
350
|
+
function j(e) {
|
|
351
|
+
return Array.isArray(e) ? e.length > 0 ? f(e[0]) : "" : f(e);
|
|
352
352
|
}
|
|
353
|
-
function M({ node:
|
|
354
|
-
let
|
|
353
|
+
function M({ node: e, meta: l, refs: u, onUpdate: d, onRemove: p }) {
|
|
354
|
+
let m = h(), _ = c.has(e.op), v = s.has(e.op), y = l.operators.map((e) => ({
|
|
355
355
|
value: e,
|
|
356
|
-
label: g(
|
|
357
|
-
})), b =
|
|
358
|
-
let
|
|
359
|
-
|
|
360
|
-
op:
|
|
361
|
-
value: r ? A(
|
|
356
|
+
label: g(m, e)
|
|
357
|
+
})), b = m("filter.value.aria", "{field} filter value", { field: l.label }), x = (t) => {
|
|
358
|
+
let n = s.has(e.op), r = s.has(t);
|
|
359
|
+
d(r === n ? { op: t } : {
|
|
360
|
+
op: t,
|
|
361
|
+
value: r ? A(e.value) : j(e.value)
|
|
362
362
|
});
|
|
363
363
|
};
|
|
364
364
|
return /* @__PURE__ */ C("div", {
|
|
@@ -386,13 +386,13 @@ function M({ node: n, meta: a, refs: f, onUpdate: p, onRemove: m }) {
|
|
|
386
386
|
whiteSpace: "nowrap",
|
|
387
387
|
minWidth: 0
|
|
388
388
|
},
|
|
389
|
-
title:
|
|
390
|
-
children:
|
|
391
|
-
}), /* @__PURE__ */ S(
|
|
389
|
+
title: l.label,
|
|
390
|
+
children: l.label
|
|
391
|
+
}), /* @__PURE__ */ S(n, {
|
|
392
392
|
size: 22,
|
|
393
393
|
icon: /* @__PURE__ */ S(t.x, { size: 12 }),
|
|
394
|
-
onClick:
|
|
395
|
-
title:
|
|
394
|
+
onClick: p,
|
|
395
|
+
title: m("filter.drawer.remove", "Remove")
|
|
396
396
|
})]
|
|
397
397
|
}), /* @__PURE__ */ C("div", {
|
|
398
398
|
style: {
|
|
@@ -402,52 +402,52 @@ function M({ node: n, meta: a, refs: f, onUpdate: p, onRemove: m }) {
|
|
|
402
402
|
alignItems: "start",
|
|
403
403
|
minWidth: 0
|
|
404
404
|
},
|
|
405
|
-
children: [/* @__PURE__ */ S(
|
|
406
|
-
"aria-label":
|
|
407
|
-
value:
|
|
405
|
+
children: [/* @__PURE__ */ S(i, {
|
|
406
|
+
"aria-label": m("filter.operator.aria", "{field} filter operator", { field: l.label }),
|
|
407
|
+
value: e.op ?? y[0]?.value,
|
|
408
408
|
options: y,
|
|
409
409
|
onChange: (e) => x(e)
|
|
410
|
-
}), _ ? null : v &&
|
|
410
|
+
}), _ ? null : v && l.options ? /* @__PURE__ */ S(r, {
|
|
411
411
|
"aria-label": b,
|
|
412
|
-
value: A(
|
|
413
|
-
options: [...D(
|
|
412
|
+
value: A(e.value),
|
|
413
|
+
options: [...D(m, l.specialValues), ...l.options.map((e) => ({
|
|
414
414
|
value: e.value,
|
|
415
415
|
label: e.label
|
|
416
416
|
}))],
|
|
417
|
-
onChange: (e) =>
|
|
418
|
-
placeholder:
|
|
419
|
-
}) :
|
|
420
|
-
ref:
|
|
421
|
-
value:
|
|
422
|
-
onChange: (e) =>
|
|
423
|
-
refs:
|
|
417
|
+
onChange: (e) => d({ value: e }),
|
|
418
|
+
placeholder: m("filter.value.select", "Select…")
|
|
419
|
+
}) : l.type === "ref" && l.ref?.entity ? /* @__PURE__ */ S(o, {
|
|
420
|
+
ref: l.ref,
|
|
421
|
+
value: e.value,
|
|
422
|
+
onChange: (e) => d({ value: e ?? "" }),
|
|
423
|
+
refs: u,
|
|
424
424
|
ariaLabel: b,
|
|
425
|
-
placeholder:
|
|
426
|
-
specialValues:
|
|
427
|
-
}) :
|
|
425
|
+
placeholder: m("filter.value.select", "Select…"),
|
|
426
|
+
specialValues: l.specialValues
|
|
427
|
+
}) : l.options ? /* @__PURE__ */ S(i, {
|
|
428
428
|
"aria-label": b,
|
|
429
|
-
value: e
|
|
430
|
-
options: [...D(
|
|
429
|
+
value: f(e.value),
|
|
430
|
+
options: [...D(m, l.specialValues), ...l.options.map((e) => ({
|
|
431
431
|
value: e.value,
|
|
432
432
|
label: e.label
|
|
433
433
|
}))],
|
|
434
|
-
onChange: (e) =>
|
|
435
|
-
placeholder:
|
|
436
|
-
}) :
|
|
437
|
-
meta:
|
|
438
|
-
value:
|
|
439
|
-
onUpdate:
|
|
440
|
-
}) : /* @__PURE__ */ S(
|
|
434
|
+
onChange: (e) => d({ value: e }),
|
|
435
|
+
placeholder: m("filter.value.select", "Select…")
|
|
436
|
+
}) : l.specialValues && l.specialValues.length > 0 ? /* @__PURE__ */ S(k, {
|
|
437
|
+
meta: l,
|
|
438
|
+
value: e.value,
|
|
439
|
+
onUpdate: d
|
|
440
|
+
}) : /* @__PURE__ */ S(a, {
|
|
441
441
|
"aria-label": b,
|
|
442
|
-
value: e
|
|
443
|
-
onChange: (e) =>
|
|
444
|
-
placeholder:
|
|
442
|
+
value: f(e.value),
|
|
443
|
+
onChange: (e) => d({ value: e }),
|
|
444
|
+
placeholder: m("filter.value.placeholder", "Value…")
|
|
445
445
|
})]
|
|
446
446
|
})]
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
|
-
function N({ node:
|
|
450
|
-
let
|
|
449
|
+
function N({ node: r, renderNode: i, onRemoveChild: a, onAddCondition: o, onAddBranch: s, path: c }) {
|
|
450
|
+
let l = h(), u = r.or ?? r.and ?? [], d = r.or !== void 0;
|
|
451
451
|
return /* @__PURE__ */ C("div", {
|
|
452
452
|
style: {
|
|
453
453
|
display: "flex",
|
|
@@ -455,9 +455,9 @@ function N({ node: e, renderNode: a, onRemoveChild: o, onAddCondition: s, onAddB
|
|
|
455
455
|
gap: 8
|
|
456
456
|
},
|
|
457
457
|
children: [
|
|
458
|
-
|
|
459
|
-
let
|
|
460
|
-
return /* @__PURE__ */ C("div", { children: [
|
|
458
|
+
u.map((r, s) => {
|
|
459
|
+
let u = [...c, s], f = d && r.and ? r.and : [r];
|
|
460
|
+
return /* @__PURE__ */ C("div", { children: [d && s > 0 && /* @__PURE__ */ C("div", {
|
|
461
461
|
style: {
|
|
462
462
|
display: "flex",
|
|
463
463
|
alignItems: "center",
|
|
@@ -476,7 +476,7 @@ function N({ node: e, renderNode: a, onRemoveChild: o, onAddCondition: s, onAddB
|
|
|
476
476
|
color: "var(--text-3)",
|
|
477
477
|
padding: "0 6px"
|
|
478
478
|
},
|
|
479
|
-
children:
|
|
479
|
+
children: l("filter.join.or", "OR")
|
|
480
480
|
}),
|
|
481
481
|
/* @__PURE__ */ S("div", { style: {
|
|
482
482
|
flex: 1,
|
|
@@ -493,7 +493,7 @@ function N({ node: e, renderNode: a, onRemoveChild: o, onAddCondition: s, onAddB
|
|
|
493
493
|
gap: 8
|
|
494
494
|
},
|
|
495
495
|
children: [
|
|
496
|
-
|
|
496
|
+
d && /* @__PURE__ */ S("div", {
|
|
497
497
|
style: {
|
|
498
498
|
fontSize: 10.5,
|
|
499
499
|
fontWeight: 600,
|
|
@@ -501,38 +501,38 @@ function N({ node: e, renderNode: a, onRemoveChild: o, onAddCondition: s, onAddB
|
|
|
501
501
|
textTransform: "uppercase",
|
|
502
502
|
letterSpacing: "0.08em"
|
|
503
503
|
},
|
|
504
|
-
children:
|
|
504
|
+
children: l("filter.group.match_all", "Match ALL")
|
|
505
505
|
}),
|
|
506
|
-
|
|
507
|
-
|
|
506
|
+
f.map((e, t) => i(e, d && r.and ? [...u, t] : u)),
|
|
507
|
+
d && /* @__PURE__ */ S(e, {
|
|
508
508
|
kind: "ghost",
|
|
509
509
|
size: "xs",
|
|
510
510
|
icon: /* @__PURE__ */ S(t.plus, { size: 11 }),
|
|
511
|
-
onClick: () => s
|
|
512
|
-
children:
|
|
511
|
+
onClick: () => o(s),
|
|
512
|
+
children: l("filter.group.add_condition", "Add condition")
|
|
513
513
|
}),
|
|
514
|
-
|
|
514
|
+
d && /* @__PURE__ */ S(n, {
|
|
515
515
|
size: 22,
|
|
516
516
|
icon: /* @__PURE__ */ S(t.x, { size: 12 }),
|
|
517
|
-
onClick: () =>
|
|
518
|
-
title:
|
|
517
|
+
onClick: () => a(u),
|
|
518
|
+
title: l("filter.group.remove_alternative", "Remove OR alternative")
|
|
519
519
|
})
|
|
520
520
|
]
|
|
521
|
-
})] },
|
|
521
|
+
})] }, s);
|
|
522
522
|
}),
|
|
523
|
-
!
|
|
523
|
+
!d && /* @__PURE__ */ S(e, {
|
|
524
524
|
kind: "ghost",
|
|
525
525
|
size: "xs",
|
|
526
526
|
icon: /* @__PURE__ */ S(t.plus, { size: 11 }),
|
|
527
|
-
onClick: () =>
|
|
528
|
-
children:
|
|
527
|
+
onClick: () => o(),
|
|
528
|
+
children: l("filter.group.add_condition", "Add condition")
|
|
529
529
|
}),
|
|
530
|
-
|
|
530
|
+
d && /* @__PURE__ */ S(e, {
|
|
531
531
|
kind: "ghost",
|
|
532
532
|
size: "xs",
|
|
533
533
|
icon: /* @__PURE__ */ S(t.plus, { size: 11 }),
|
|
534
|
-
onClick:
|
|
535
|
-
children:
|
|
534
|
+
onClick: s,
|
|
535
|
+
children: l("filter.drawer.add_or_group", "Add OR group")
|
|
536
536
|
})
|
|
537
537
|
]
|
|
538
538
|
});
|
|
@@ -582,8 +582,8 @@ function I(e, t, n) {
|
|
|
582
582
|
};
|
|
583
583
|
});
|
|
584
584
|
}
|
|
585
|
-
function L({ fields:
|
|
586
|
-
let
|
|
585
|
+
function L({ fields: n, activeFields: r, compact: i, onSelect: o, onCancel: s }) {
|
|
586
|
+
let c = h(), [l, u] = b(""), d = n.filter((e) => !r.has(e.code) && (l === "" || e.label.toLowerCase().includes(l.toLowerCase()) || e.code.toLowerCase().includes(l.toLowerCase())));
|
|
587
587
|
return /* @__PURE__ */ C("div", {
|
|
588
588
|
style: {
|
|
589
589
|
width: "100%",
|
|
@@ -597,10 +597,10 @@ function L({ fields: e, activeFields: r, compact: a, onSelect: o, onCancel: s })
|
|
|
597
597
|
boxSizing: "border-box"
|
|
598
598
|
},
|
|
599
599
|
children: [
|
|
600
|
-
/* @__PURE__ */ S(
|
|
601
|
-
value:
|
|
602
|
-
onChange:
|
|
603
|
-
placeholder:
|
|
600
|
+
/* @__PURE__ */ S(a, {
|
|
601
|
+
value: l,
|
|
602
|
+
onChange: u,
|
|
603
|
+
placeholder: c("filter.fields.search", "Search fields…"),
|
|
604
604
|
prefix: /* @__PURE__ */ S(t.search, { size: 12 }),
|
|
605
605
|
autoFocus: !0
|
|
606
606
|
}),
|
|
@@ -611,7 +611,7 @@ function L({ fields: e, activeFields: r, compact: a, onSelect: o, onCancel: s })
|
|
|
611
611
|
display: "flex",
|
|
612
612
|
flexDirection: "column"
|
|
613
613
|
},
|
|
614
|
-
children: [
|
|
614
|
+
children: [d.map((e) => /* @__PURE__ */ C("button", {
|
|
615
615
|
"data-testid": `filter-field-${e.code}`,
|
|
616
616
|
onClick: () => o(e.code),
|
|
617
617
|
style: {
|
|
@@ -643,28 +643,27 @@ function L({ fields: e, activeFields: r, compact: a, onSelect: o, onCancel: s })
|
|
|
643
643
|
style: {
|
|
644
644
|
color: "var(--text-4)",
|
|
645
645
|
fontSize: 10.5,
|
|
646
|
-
display:
|
|
646
|
+
display: i ? "none" : void 0
|
|
647
647
|
},
|
|
648
648
|
children: e.code
|
|
649
649
|
})]
|
|
650
|
-
}, e.code)),
|
|
650
|
+
}, e.code)), d.length === 0 && /* @__PURE__ */ S("div", {
|
|
651
651
|
style: {
|
|
652
652
|
fontSize: 12,
|
|
653
653
|
color: "var(--text-3)",
|
|
654
654
|
padding: "6px 8px"
|
|
655
655
|
},
|
|
656
|
-
children:
|
|
656
|
+
children: c("filter.fields.none", "No fields available")
|
|
657
657
|
})]
|
|
658
658
|
}),
|
|
659
|
-
/* @__PURE__ */ S(
|
|
659
|
+
/* @__PURE__ */ S(e, {
|
|
660
660
|
kind: "ghost",
|
|
661
661
|
size: "xs",
|
|
662
662
|
onClick: s,
|
|
663
663
|
style: { justifyContent: "center" },
|
|
664
|
-
children:
|
|
664
|
+
children: c("dialog.cancel", "Cancel")
|
|
665
665
|
})
|
|
666
666
|
]
|
|
667
667
|
});
|
|
668
668
|
}
|
|
669
|
-
//#endregion
|
|
670
669
|
export { w as FilterDrawer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useText as e } from "../../hooks/useText.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/components/filters/FilterOmittedNotice.tsx
|
|
4
4
|
function n({ className: n }) {
|
|
5
5
|
let r = e()("filter.omitted_notice", "Some filter conditions could not be applied.");
|
|
6
6
|
return /* @__PURE__ */ t("div", {
|
|
@@ -10,5 +10,4 @@ function n({ className: n }) {
|
|
|
10
10
|
children: r
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { n as FilterOmittedNotice };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { OP_LABELS as e } from "../../lib/filters.js";
|
|
2
|
-
|
|
2
|
+
// src/components/filters/filter-op-label.ts
|
|
3
3
|
function t(t, n) {
|
|
4
4
|
let r = e[n];
|
|
5
5
|
return r ? t(`filter.op.${n}`, r) : n;
|
|
6
6
|
}
|
|
7
|
-
//#endregion
|
|
8
7
|
export { t as filterOpLabel };
|