@declarion/react 0.61.1 → 0.63.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/ActionDialog-uiuse5W8.js +374 -0
- package/dist-lib/ActionResultDialog.impl-BUBm9Ck3.js +273 -0
- package/dist-lib/ActionRunner-DAxgnKB3.js +1440 -0
- package/dist-lib/AdminCatalogPage.impl-BJGn7EvA.js +441 -0
- package/dist-lib/{AgentChatPanel.impl-rgkewyMl.js → AgentChatPanel.impl-8bw8J-xV.js} +358 -319
- package/dist-lib/AgentOpenFollower.impl-Cga1q7_e.js +81 -0
- package/dist-lib/AssociatedBlock-D6qDYmRO.js +1515 -0
- package/dist-lib/AuthShell-DdiughRT.js +361 -0
- package/dist-lib/ChangePasswordDialog-DFe7lVQg.js +12 -0
- package/dist-lib/ChangePasswordDialog.impl-DtSIaP-A.js +194 -0
- package/dist-lib/CommandPalette.impl-Db3AFA5w.js +383 -0
- package/dist-lib/CopyButton-C0iEvaT1.js +119 -0
- package/dist-lib/DirtyTabsCloseDialog.impl-DWaFaWKn.js +191 -0
- package/dist-lib/{DraggableChildrenTable-DruYOxKm.js → DraggableChildrenTable-Cy8uevS_.js} +45 -44
- package/dist-lib/DynamicIcon-DuBSz6TZ.js +133 -0
- package/dist-lib/FieldRow-BXBBFOZh.js +157 -0
- package/dist-lib/FilterChips-8fMDBXHp.js +1031 -0
- package/dist-lib/Forgot.impl-CmT5A__V.js +105 -0
- package/dist-lib/{Grid-Dsf3I0xG.js → Grid-Cg29k0jv.js} +98 -99
- package/dist-lib/Icons-Dzl-AkD_.d.ts +159 -0
- package/dist-lib/Icons-lt-7lhYR.js +151 -0
- package/dist-lib/ImpersonationBanner.impl-CBJJx6an.js +76 -0
- package/dist-lib/ImpersonationStartModal.impl-RaZcsJpG.js +158 -0
- package/dist-lib/Kbd-CNttVu0z.js +23 -0
- package/dist-lib/{LayoutRenderer-QN7Wp2W6.js → LayoutRenderer-DEHtYtzV.js} +965 -942
- package/dist-lib/{ListCardsBody-CNaZ0xwz.js → ListCardsBody-BAwFR3yO.js} +46 -52
- package/dist-lib/{MarkdownRenderer-BuO5hYJh.js → MarkdownRenderer-kNEMr6K_.js} +15 -16
- package/dist-lib/MenuItem-CfkVXPvC.js +140 -0
- package/dist-lib/NotFoundPage.impl-ZSBn4WWb.js +68 -0
- package/dist-lib/PageHeader-tw4pX3lI.js +71 -0
- package/dist-lib/PageShell-tI-mm0C5.js +47 -0
- package/dist-lib/Pill-D-wsfRhx.js +42 -0
- package/dist-lib/Preferences.impl-BG9XBZDf.js +162 -0
- package/dist-lib/Profile.impl-CbzSzxyG.js +527 -0
- package/dist-lib/PropertyGridEditor-BTjscqfz.js +4378 -0
- package/dist-lib/RecordHeader-Bv9nJXnG.js +217 -0
- package/dist-lib/RecordIdBadge-C3MgoZvt.js +25 -0
- package/dist-lib/RefreshControl-Ce-T_wSQ.js +195 -0
- package/dist-lib/Reset.impl-Cesyqt5p.js +168 -0
- package/dist-lib/SSOCallbackPage.impl-BC_W9nQA.js +31 -0
- package/dist-lib/SectionCard-VonaiLrx.js +150 -0
- package/dist-lib/SignUp.impl-C1KCQbfZ.js +212 -0
- package/dist-lib/SmartDetailPage.impl-8iOAMYQh.js +1609 -0
- package/dist-lib/SmartListPage.impl-Cc4Zwz5f.js +2818 -0
- package/dist-lib/SmartRecordListPage.impl-xTSohkqG.js +795 -0
- package/dist-lib/{SortHeaderMenu-BV-aQbPy.js → SortHeaderMenu-BKTrq0Wb.js} +23 -23
- package/dist-lib/TenantParamsPage.impl-DMuSs3eP.js +306 -0
- package/dist-lib/TwoFA.impl-BClZ3ndk.js +125 -0
- package/dist-lib/{cardProjection-BnmWukxk.js → cardProjection-Cr7fG6wJ.js} +134 -133
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/format-count-CSEFw2ht.js +943 -0
- package/dist-lib/headerActionZone-bef-tZZ7.js +14 -0
- package/dist-lib/{stores/icon-registry.d.ts → icon-registry-CUT4eF63.d.ts} +14 -11
- package/dist-lib/icons.d.ts +20 -4
- package/dist-lib/icons.js +3 -2
- package/dist-lib/index.d.ts +2516 -150
- package/dist-lib/index.js +1588 -5117
- package/dist-lib/page-inset-D_kkVwwN.js +9 -0
- package/dist-lib/page-state-eA6J_KIR.js +124 -0
- package/dist-lib/param-editors-9yJr7xmN.js +201 -0
- package/dist-lib/payload-B2wODLAX.js +86 -0
- package/dist-lib/{peekDraftStore-Dk1Ha5u3.js → peekDraftStore-D4GRsRKW.js} +44 -43
- package/dist-lib/registry-BpzE8-h8.js +119 -0
- package/dist-lib/screen-back-Cs4kzeqD.js +44 -0
- package/dist-lib/testing.d.ts +53 -56
- package/dist-lib/testing.js +54 -55
- package/dist-lib/use-filter-value-labels-DuqvAIVG.js +413 -0
- package/dist-lib/{useAgentConversation-nT5UypJX.js → useAgentConversation-D210VDCQ.js} +158 -169
- package/dist-lib/useAuth-CR2YKKXb.js +49 -0
- package/dist-lib/useBranding-Ckp_AuJb.js +41 -0
- package/dist-lib/useBrandingChrome-bKTXXDLy.js +170 -0
- package/dist-lib/useCurrentLocation-BdngVeQv.js +22 -0
- package/dist-lib/useCurrentScreen--UovgvRj.js +2511 -0
- package/dist-lib/useImpersonation-DNV23Ks1.js +35 -0
- package/dist-lib/useObject-1OCeV34A.js +26 -0
- package/dist-lib/useOwnRefresh-DkOuM4yo.js +435 -0
- package/dist-lib/useParams-ei6w4I7w.js +133 -0
- package/dist-lib/useProperties-CbdhlhZd.js +81 -0
- package/dist-lib/useResponsiveMode-DIR1bZfo.d.ts +1786 -0
- package/dist-lib/useScreenBack-J861tbwn.js +71 -0
- package/dist-lib/useTabNavigate-BZiW4q3M.js +78 -0
- package/dist-lib/useTabTitle-CZZnWIQi.js +22 -0
- package/dist-lib/utils-D_QDpB8_.js +11 -0
- package/dist-lib/{value-Dwfyghtj.js → value-CDCeHgOv.js} +8 -22
- package/dist-lib/{action-dispatch-gWmOYjOP.js → variants-CbAwl3Mn.js} +734 -740
- package/dist-lib/vite/index.d.ts +42 -16
- package/dist-lib/window-election-CHIvIZwx.js +45 -0
- package/package.json +16 -23
- package/dist-lib/DetailAuditStrip-CSXZoy7v.js +0 -288
- package/dist-lib/DynamicIcon-DW5krHuX.js +0 -280
- package/dist-lib/RefreshControl-DO9rYcdq.js +0 -399
- package/dist-lib/SmartDetailPage.impl-DFIIx80b.js +0 -1565
- package/dist-lib/SmartListPage.impl-D694R32H.js +0 -3051
- package/dist-lib/SmartRecordListPage.impl-CB5cuQJV.js +0 -780
- package/dist-lib/api/agents.d.ts +0 -140
- package/dist-lib/api/auth-redirect.d.ts +0 -3
- package/dist-lib/api/auth.d.ts +0 -26
- package/dist-lib/api/batch.d.ts +0 -25
- package/dist-lib/api/client.d.ts +0 -51
- package/dist-lib/api/data.d.ts +0 -153
- package/dist-lib/api/entities.d.ts +0 -149
- package/dist-lib/api/events.d.ts +0 -91
- package/dist-lib/api/params.d.ts +0 -28
- package/dist-lib/api/properties.d.ts +0 -3
- package/dist-lib/api/schema.d.ts +0 -2
- package/dist-lib/api/status.d.ts +0 -2
- package/dist-lib/app.d.ts +0 -1
- package/dist-lib/components/actions/ActionButton.d.ts +0 -18
- package/dist-lib/components/actions/ActionDialog.d.ts +0 -20
- package/dist-lib/components/actions/ActionResultDialog.d.ts +0 -22
- package/dist-lib/components/actions/ActionRunner.d.ts +0 -62
- package/dist-lib/components/actions/ObjectActionBar.d.ts +0 -29
- package/dist-lib/components/actions/PropertyGridEditor.d.ts +0 -20
- package/dist-lib/components/actions/ResponsiveActionBar.d.ts +0 -259
- package/dist-lib/components/actions/RowActionsKebab.d.ts +0 -20
- package/dist-lib/components/agents/AgentChatPanel.d.ts +0 -3
- package/dist-lib/components/agents/AgentChatPanel.impl.d.ts +0 -14
- package/dist-lib/components/agents/AgentConversationDrawer.d.ts +0 -11
- package/dist-lib/components/agents/AgentElicitForm.d.ts +0 -27
- package/dist-lib/components/agents/AgentPicker.d.ts +0 -8
- package/dist-lib/components/agents/transcript-runs.d.ts +0 -29
- package/dist-lib/components/chrome/AssociationTabs.d.ts +0 -9
- package/dist-lib/components/chrome/AuditMetaStrip.d.ts +0 -11
- package/dist-lib/components/chrome/Breadcrumbs.d.ts +0 -14
- package/dist-lib/components/chrome/HighlightsStrip.d.ts +0 -10
- package/dist-lib/components/chrome/PageHeader.d.ts +0 -16
- package/dist-lib/components/chrome/PageShell.d.ts +0 -7
- package/dist-lib/components/chrome/RecordHeader.d.ts +0 -17
- package/dist-lib/components/chrome/headerActionZone.d.ts +0 -27
- package/dist-lib/components/detail-layout/AssociatedBlock.d.ts +0 -20
- package/dist-lib/components/detail-layout/AssociatedToolbar.d.ts +0 -13
- package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +0 -16
- package/dist-lib/components/detail-layout/ChildrenCards.d.ts +0 -2
- package/dist-lib/components/detail-layout/ChildrenList.d.ts +0 -2
- package/dist-lib/components/detail-layout/ChildrenTable.d.ts +0 -2
- package/dist-lib/components/detail-layout/ChildrenTimeline.d.ts +0 -2
- package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +0 -12
- package/dist-lib/components/detail-layout/DetailHighlights.d.ts +0 -14
- package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +0 -16
- package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +0 -16
- package/dist-lib/components/detail-layout/ErrorSummary.d.ts +0 -11
- package/dist-lib/components/detail-layout/EvidenceBlock.d.ts +0 -6
- package/dist-lib/components/detail-layout/FieldRow.d.ts +0 -23
- package/dist-lib/components/detail-layout/FieldsBlock.d.ts +0 -8
- package/dist-lib/components/detail-layout/LayoutColumn.d.ts +0 -9
- package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +0 -46
- package/dist-lib/components/detail-layout/LayoutRow.d.ts +0 -8
- package/dist-lib/components/detail-layout/LayoutTabs.d.ts +0 -8
- package/dist-lib/components/detail-layout/PropertiesBlock.d.ts +0 -8
- package/dist-lib/components/detail-layout/QuickAddForm.d.ts +0 -10
- package/dist-lib/components/detail-layout/SectionBlock.d.ts +0 -8
- package/dist-lib/components/detail-layout/StatusesBlock.d.ts +0 -8
- package/dist-lib/components/detail-layout/TimelineComposer.d.ts +0 -10
- package/dist-lib/components/detail-layout/blockMeta.d.ts +0 -5
- package/dist-lib/components/detail-layout/index.d.ts +0 -21
- package/dist-lib/components/detail-layout/useManualColumnResize.d.ts +0 -25
- package/dist-lib/components/detail-layout/useQuickAdd.d.ts +0 -16
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.d.ts +0 -2
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.d.ts +0 -2
- package/dist-lib/components/detail-layout/widgets/MonacoJson.d.ts +0 -9
- package/dist-lib/components/detail-layout/widgets/WidgetHost.d.ts +0 -9
- package/dist-lib/components/detail-layout/widgets/builtins.d.ts +0 -1
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.d.ts +0 -1
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.d.ts +0 -1
- package/dist-lib/components/detail-layout/widgets/registry.d.ts +0 -14
- package/dist-lib/components/fields/BoolField.d.ts +0 -2
- package/dist-lib/components/fields/EmailField.d.ts +0 -2
- package/dist-lib/components/fields/EnumField.d.ts +0 -2
- package/dist-lib/components/fields/IntArrayField.d.ts +0 -2
- package/dist-lib/components/fields/JsonEditor.d.ts +0 -10
- package/dist-lib/components/fields/JsonField.d.ts +0 -3
- package/dist-lib/components/fields/MultilangArrayField.d.ts +0 -2
- package/dist-lib/components/fields/MultilangField.d.ts +0 -2
- package/dist-lib/components/fields/MultilangTextField.d.ts +0 -2
- package/dist-lib/components/fields/NumberField.d.ts +0 -2
- package/dist-lib/components/fields/PasswordField.d.ts +0 -2
- package/dist-lib/components/fields/PhoneField.d.ts +0 -2
- package/dist-lib/components/fields/RefCombobox.d.ts +0 -45
- package/dist-lib/components/fields/RefField.d.ts +0 -2
- package/dist-lib/components/fields/RichTextField.d.ts +0 -2
- package/dist-lib/components/fields/SecretField.d.ts +0 -2
- package/dist-lib/components/fields/StringArrayField.d.ts +0 -2
- package/dist-lib/components/fields/StringField.d.ts +0 -2
- package/dist-lib/components/fields/StructureField.d.ts +0 -2
- package/dist-lib/components/fields/TextField.d.ts +0 -2
- package/dist-lib/components/fields/TimestampField.d.ts +0 -2
- package/dist-lib/components/fields/UrlField.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/badge.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/boolPill.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/code.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/date.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/email.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/emptyCell.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/host-icons.d.ts +0 -17
- package/dist-lib/components/fields/cells/factories/json.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/link.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/markdown.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/markdownPreview.d.ts +0 -9
- package/dist-lib/components/fields/cells/factories/money.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/multilangInline.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/nextRun.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/number.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/passwordMask.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/phone.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/refLink.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/richTextPreview.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/statusPill.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/tagList.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/text.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/timestamp.d.ts +0 -3
- package/dist-lib/components/fields/cells/factories/url-helpers.d.ts +0 -12
- package/dist-lib/components/fields/cells/factories/url.d.ts +0 -2
- package/dist-lib/components/fields/cells/registry.d.ts +0 -21
- package/dist-lib/components/fields/index.d.ts +0 -28
- package/dist-lib/components/fields/langMap.d.ts +0 -2
- package/dist-lib/components/fields/secretValue.d.ts +0 -2
- package/dist-lib/components/file-widgets/CircleImage.d.ts +0 -2
- package/dist-lib/components/file-widgets/DocumentCard.d.ts +0 -2
- package/dist-lib/components/file-widgets/FileList.d.ts +0 -2
- package/dist-lib/components/file-widgets/Grid.d.ts +0 -2
- package/dist-lib/components/file-widgets/GridLazy.d.ts +0 -2
- package/dist-lib/components/file-widgets/ImageWidget.d.ts +0 -12
- package/dist-lib/components/file-widgets/LabeledSlots.d.ts +0 -2
- package/dist-lib/components/file-widgets/SquareImage.d.ts +0 -2
- package/dist-lib/components/file-widgets/UnknownFileWidget.d.ts +0 -3
- package/dist-lib/components/file-widgets/UploadFailureText.d.ts +0 -4
- package/dist-lib/components/file-widgets/WideBanner.d.ts +0 -2
- package/dist-lib/components/file-widgets/builtins.d.ts +0 -1
- package/dist-lib/components/file-widgets/cropper.d.ts +0 -14
- package/dist-lib/components/file-widgets/draft-scope.d.ts +0 -22
- package/dist-lib/components/file-widgets/helpers.d.ts +0 -15
- package/dist-lib/components/file-widgets/host.d.ts +0 -28
- package/dist-lib/components/file-widgets/index.d.ts +0 -16
- package/dist-lib/components/file-widgets/payload.d.ts +0 -21
- package/dist-lib/components/file-widgets/registry.d.ts +0 -5
- package/dist-lib/components/file-widgets/types.d.ts +0 -17
- package/dist-lib/components/file-widgets/upload.d.ts +0 -45
- package/dist-lib/components/file-widgets/useEmbedFileSrc.d.ts +0 -42
- package/dist-lib/components/file-widgets/value.d.ts +0 -4
- package/dist-lib/components/filters/FilterChips.d.ts +0 -14
- package/dist-lib/components/filters/FilterDrawer.d.ts +0 -32
- package/dist-lib/components/filters/filter-op-label.d.ts +0 -3
- package/dist-lib/components/layout/CommandPalette.d.ts +0 -21
- package/dist-lib/components/layout/DirtyTabsCloseDialog.d.ts +0 -9
- package/dist-lib/components/layout/ImpersonationBanner.d.ts +0 -11
- package/dist-lib/components/layout/ImpersonationFrame.d.ts +0 -11
- package/dist-lib/components/layout/ImpersonationStartModal.d.ts +0 -22
- package/dist-lib/components/layout/Layout.d.ts +0 -6
- package/dist-lib/components/layout/Rail.d.ts +0 -22
- package/dist-lib/components/layout/Sidebar.d.ts +0 -12
- package/dist-lib/components/layout/TabStrip.d.ts +0 -6
- package/dist-lib/components/layout/TenantChip.d.ts +0 -26
- package/dist-lib/components/layout/TopBar.d.ts +0 -22
- package/dist-lib/components/layout/tab-close.d.ts +0 -13
- package/dist-lib/components/list/ColumnPicker.d.ts +0 -20
- package/dist-lib/components/list/InlineEditCell.d.ts +0 -15
- package/dist-lib/components/list/PeekFieldCell.d.ts +0 -16
- package/dist-lib/components/list/QuickPeek.d.ts +0 -59
- package/dist-lib/components/list/ViewSwitcher.d.ts +0 -24
- package/dist-lib/components/list/peekDraftStore.d.ts +0 -6
- package/dist-lib/components/pages/AdminCatalogPage.d.ts +0 -1
- package/dist-lib/components/pages/DocumentsMenu.d.ts +0 -21
- package/dist-lib/components/pages/ExportMenu.d.ts +0 -30
- package/dist-lib/components/pages/NotFoundPage.d.ts +0 -1
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +0 -41
- package/dist-lib/components/pages/SSOCallbackPage.d.ts +0 -1
- package/dist-lib/components/pages/SmartDetailPage.d.ts +0 -2
- package/dist-lib/components/pages/SmartDetailPage.impl.d.ts +0 -4
- package/dist-lib/components/pages/SmartListPage.d.ts +0 -2
- package/dist-lib/components/pages/SmartListPage.impl.d.ts +0 -4
- package/dist-lib/components/pages/SmartRecordListPage.d.ts +0 -2
- package/dist-lib/components/pages/SmartRecordListPage.impl.d.ts +0 -4
- package/dist-lib/components/pages/auth/AuthShell.d.ts +0 -18
- package/dist-lib/components/pages/auth/Forgot.d.ts +0 -1
- package/dist-lib/components/pages/auth/Reset.d.ts +0 -1
- package/dist-lib/components/pages/auth/SignIn.d.ts +0 -1
- package/dist-lib/components/pages/auth/SignUp.d.ts +0 -1
- package/dist-lib/components/pages/auth/TwoFA.d.ts +0 -1
- package/dist-lib/components/pages/auth/icons.d.ts +0 -6
- package/dist-lib/components/pages/exportRequest.d.ts +0 -69
- package/dist-lib/components/pages/list/DataCell.d.ts +0 -4
- package/dist-lib/components/pages/list/DeleteViewDialog.d.ts +0 -8
- package/dist-lib/components/pages/list/ListCardRow.d.ts +0 -39
- package/dist-lib/components/pages/list/ListCardsBody.d.ts +0 -33
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +0 -29
- package/dist-lib/components/pages/list/ListFooter.d.ts +0 -26
- package/dist-lib/components/pages/list/ListHeader.d.ts +0 -26
- package/dist-lib/components/pages/list/ListNoRows.d.ts +0 -31
- package/dist-lib/components/pages/list/ListTable.d.ts +0 -33
- package/dist-lib/components/pages/list/ListTableRow.d.ts +0 -17
- package/dist-lib/components/pages/list/ListToolbar.d.ts +0 -46
- package/dist-lib/components/pages/list/ListUrlBanner.d.ts +0 -10
- package/dist-lib/components/pages/list/RowActionsCell.d.ts +0 -34
- package/dist-lib/components/pages/list/RowContextMenu.d.ts +0 -28
- package/dist-lib/components/pages/list/SaveViewDialog.d.ts +0 -10
- package/dist-lib/components/pages/list/SortHeaderMenu.d.ts +0 -14
- package/dist-lib/components/pages/list/cardProjection.d.ts +0 -67
- package/dist-lib/components/pages/list/column-sizing.d.ts +0 -14
- package/dist-lib/components/pages/list/columns.d.ts +0 -46
- package/dist-lib/components/pages/list/filter-meta.d.ts +0 -25
- package/dist-lib/components/pages/list/page-size.d.ts +0 -3
- package/dist-lib/components/pages/list/sortable-header.d.ts +0 -2
- package/dist-lib/components/pages/list/table-features.d.ts +0 -14
- package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +0 -24
- package/dist-lib/components/pages/list/useActiveView.d.ts +0 -45
- package/dist-lib/components/pages/list/useHeaderReorder.d.ts +0 -26
- package/dist-lib/components/pages/list/useListColumnLayout.d.ts +0 -38
- package/dist-lib/components/pages/list/useListQuery.d.ts +0 -67
- package/dist-lib/components/pages/list/useListRowInteraction.d.ts +0 -61
- package/dist-lib/components/pages/list/useListSelection.d.ts +0 -31
- package/dist-lib/components/pages/list/useListSort.d.ts +0 -46
- package/dist-lib/components/pages/list/useListViews.d.ts +0 -57
- package/dist-lib/components/pages/list/useRowMenu.d.ts +0 -46
- package/dist-lib/components/pages/profile/Preferences.d.ts +0 -1
- package/dist-lib/components/pages/profile/Profile.d.ts +0 -7
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.d.ts +0 -2
- package/dist-lib/components/params/ParamsBlock.d.ts +0 -13
- package/dist-lib/components/params/param-editors.d.ts +0 -20
- package/dist-lib/components/primitives/Avatar.d.ts +0 -6
- package/dist-lib/components/primitives/BoolToggle.d.ts +0 -7
- package/dist-lib/components/primitives/BrandGlyph.d.ts +0 -8
- package/dist-lib/components/primitives/BrandLogo.d.ts +0 -12
- package/dist-lib/components/primitives/Btn.d.ts +0 -19
- package/dist-lib/components/primitives/Check.d.ts +0 -7
- package/dist-lib/components/primitives/Chip.d.ts +0 -9
- package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +0 -9
- package/dist-lib/components/primitives/Dropdown.d.ts +0 -20
- package/dist-lib/components/primitives/Fields.d.ts +0 -111
- package/dist-lib/components/primitives/HoverCard.d.ts +0 -15
- package/dist-lib/components/primitives/IconBtn.d.ts +0 -11
- package/dist-lib/components/primitives/Icons.d.ts +0 -136
- package/dist-lib/components/primitives/Kbd.d.ts +0 -4
- package/dist-lib/components/primitives/MenuItem.d.ts +0 -14
- package/dist-lib/components/primitives/Pill.d.ts +0 -11
- package/dist-lib/components/primitives/RecordIdBadge.d.ts +0 -8
- package/dist-lib/components/primitives/RowField.d.ts +0 -10
- package/dist-lib/components/primitives/SectionCard.d.ts +0 -24
- package/dist-lib/components/primitives/Spinner.d.ts +0 -3
- package/dist-lib/components/primitives/Tooltip.d.ts +0 -34
- package/dist-lib/components/primitives/dataTableStyles.d.ts +0 -4
- package/dist-lib/components/primitives/index.d.ts +0 -37
- package/dist-lib/components/shared/ChangePasswordDialog.d.ts +0 -9
- package/dist-lib/components/shared/ConfirmDialog.d.ts +0 -11
- package/dist-lib/components/shared/CopyButton.d.ts +0 -8
- package/dist-lib/components/shared/DynamicIcon.d.ts +0 -20
- package/dist-lib/components/shared/EmptyState.d.ts +0 -9
- package/dist-lib/components/shared/ErrorBoundary.d.ts +0 -17
- package/dist-lib/components/shared/LoadingSkeleton.d.ts +0 -6
- package/dist-lib/components/shared/LucideIcon.d.ts +0 -16
- package/dist-lib/components/shared/Markdown.d.ts +0 -3
- package/dist-lib/components/shared/MarkdownRenderer.d.ts +0 -11
- package/dist-lib/components/shared/RefreshControl.d.ts +0 -25
- package/dist-lib/components/shared/StatusGroupsDisplay.d.ts +0 -11
- package/dist-lib/components/shared/StatusStepper.d.ts +0 -13
- package/dist-lib/components/shared/toast/DeclarionToast.d.ts +0 -31
- package/dist-lib/components/shared/useOwnRefresh.d.ts +0 -9
- package/dist-lib/embed/EmbedAuthBootstrap.d.ts +0 -8
- package/dist-lib/embed/EmbedContext.d.ts +0 -50
- package/dist-lib/embed/EmbedDirtyReporter.d.ts +0 -10
- package/dist-lib/embed/EmbedHistoryTracker.d.ts +0 -1
- package/dist-lib/embed/EmbedLocationReporter.d.ts +0 -8
- package/dist-lib/embed/EmbedResizeReporter.d.ts +0 -6
- package/dist-lib/embed/EmbedUnsavedGuard.d.ts +0 -7
- package/dist-lib/embed/embed-dirty.d.ts +0 -24
- package/dist-lib/embed/embed-history.d.ts +0 -19
- package/dist-lib/embed/embed-nav-guard.d.ts +0 -20
- package/dist-lib/embed/file-src.d.ts +0 -63
- package/dist-lib/embed/handshake.d.ts +0 -57
- package/dist-lib/embed/index.d.ts +0 -19
- package/dist-lib/embed/params.d.ts +0 -75
- package/dist-lib/embed/protocol.d.ts +0 -165
- package/dist-lib/embed/screen-location.d.ts +0 -50
- package/dist-lib/embed/theme.d.ts +0 -34
- package/dist-lib/embed/token.d.ts +0 -57
- package/dist-lib/embed/useEmbedNavigate.d.ts +0 -48
- package/dist-lib/embed/useGlobalLinkInterceptor.d.ts +0 -66
- package/dist-lib/failure-BUxXuP4c.js +0 -158
- package/dist-lib/format-count-bXVfHzbI.js +0 -1771
- package/dist-lib/hooks/useActionData.d.ts +0 -61
- package/dist-lib/hooks/useAgentConversation.d.ts +0 -24
- package/dist-lib/hooks/useAllEntityData.d.ts +0 -16
- package/dist-lib/hooks/useAssociatedData.d.ts +0 -10
- package/dist-lib/hooks/useAuth.d.ts +0 -22
- package/dist-lib/hooks/useBranding.d.ts +0 -8
- package/dist-lib/hooks/useBrandingChrome.d.ts +0 -59
- package/dist-lib/hooks/useChildrenData.d.ts +0 -3
- package/dist-lib/hooks/useColumns.d.ts +0 -13
- package/dist-lib/hooks/useCurrentScreen.d.ts +0 -34
- package/dist-lib/hooks/useCursorEntityData.d.ts +0 -79
- package/dist-lib/hooks/useDebounce.d.ts +0 -1
- package/dist-lib/hooks/useEntity.d.ts +0 -2
- package/dist-lib/hooks/useEntityData.d.ts +0 -41
- package/dist-lib/hooks/useFilters.d.ts +0 -14
- package/dist-lib/hooks/useImpersonation.d.ts +0 -23
- package/dist-lib/hooks/useLanguage.d.ts +0 -4
- package/dist-lib/hooks/useLiveObject.d.ts +0 -9
- package/dist-lib/hooks/useLongPress.d.ts +0 -29
- package/dist-lib/hooks/useMutations.d.ts +0 -13
- package/dist-lib/hooks/useObject.d.ts +0 -11
- package/dist-lib/hooks/useObjectStatus.d.ts +0 -5
- package/dist-lib/hooks/usePageState.d.ts +0 -32
- package/dist-lib/hooks/usePageStateRuntime.d.ts +0 -27
- package/dist-lib/hooks/usePageStateTtl.d.ts +0 -11
- package/dist-lib/hooks/useParams.d.ts +0 -49
- package/dist-lib/hooks/useProperties.d.ts +0 -5
- package/dist-lib/hooks/useRealtimeThresholds.d.ts +0 -1
- package/dist-lib/hooks/useRegisterScreenTab.d.ts +0 -11
- package/dist-lib/hooks/useResponsiveMode.d.ts +0 -27
- package/dist-lib/hooks/useSSE.d.ts +0 -31
- package/dist-lib/hooks/useSchema.d.ts +0 -1
- package/dist-lib/hooks/useScreen.d.ts +0 -2
- package/dist-lib/hooks/useScreenBack.d.ts +0 -21
- package/dist-lib/hooks/useScreenTab.d.ts +0 -10
- package/dist-lib/hooks/useTabNavigate.d.ts +0 -34
- package/dist-lib/hooks/useTabSearchMirror.d.ts +0 -1
- package/dist-lib/hooks/useTabTitle.d.ts +0 -2
- package/dist-lib/hooks/useText.d.ts +0 -3
- package/dist-lib/hooks/useTimelineData.d.ts +0 -10
- package/dist-lib/hooks/useVersionWatcher.d.ts +0 -30
- package/dist-lib/hooks/useViews.d.ts +0 -26
- package/dist-lib/lib/action-dispatch.d.ts +0 -8
- package/dist-lib/lib/actions.d.ts +0 -254
- package/dist-lib/lib/anchor.d.ts +0 -36
- package/dist-lib/lib/brand-tokens.d.ts +0 -43
- package/dist-lib/lib/branding.d.ts +0 -20
- package/dist-lib/lib/canonical-url.d.ts +0 -27
- package/dist-lib/lib/capabilityPrefetch.d.ts +0 -6
- package/dist-lib/lib/child-config.d.ts +0 -24
- package/dist-lib/lib/children-validation.d.ts +0 -5
- package/dist-lib/lib/decimal-text.d.ts +0 -1
- package/dist-lib/lib/display-value.d.ts +0 -1
- package/dist-lib/lib/document-templates.d.ts +0 -11
- package/dist-lib/lib/download.d.ts +0 -21
- package/dist-lib/lib/evidence-verdict.d.ts +0 -11
- package/dist-lib/lib/failure.d.ts +0 -2
- package/dist-lib/lib/field-classification.d.ts +0 -61
- package/dist-lib/lib/field-regions.d.ts +0 -8
- package/dist-lib/lib/filter-evaluator.d.ts +0 -16
- package/dist-lib/lib/filters.d.ts +0 -93
- package/dist-lib/lib/format-count.d.ts +0 -41
- package/dist-lib/lib/html-state.d.ts +0 -11
- package/dist-lib/lib/language.d.ts +0 -19
- package/dist-lib/lib/longPressGesture.d.ts +0 -55
- package/dist-lib/lib/mass-edit.d.ts +0 -32
- package/dist-lib/lib/page-inset.d.ts +0 -3
- package/dist-lib/lib/quick-add.d.ts +0 -2
- package/dist-lib/lib/realtime-query-keys.d.ts +0 -22
- package/dist-lib/lib/realtime-reconcile.d.ts +0 -33
- package/dist-lib/lib/realtime-resync.d.ts +0 -23
- package/dist-lib/lib/record-documents-key.d.ts +0 -1
- package/dist-lib/lib/rich-text.d.ts +0 -14
- package/dist-lib/lib/rowClickGesture.d.ts +0 -26
- package/dist-lib/lib/safe-url.d.ts +0 -15
- package/dist-lib/lib/schema-routing.d.ts +0 -3
- package/dist-lib/lib/screen-back.d.ts +0 -70
- package/dist-lib/lib/scroll-restoration.d.ts +0 -90
- package/dist-lib/lib/size-value.d.ts +0 -16
- package/dist-lib/lib/sort.d.ts +0 -72
- package/dist-lib/lib/timestamp.d.ts +0 -53
- package/dist-lib/lib/toast.d.ts +0 -49
- package/dist-lib/lib/ui-actions.d.ts +0 -12
- package/dist-lib/lib/utils.d.ts +0 -9
- package/dist-lib/lib/variants.d.ts +0 -7
- package/dist-lib/lib/versionTracker.d.ts +0 -72
- package/dist-lib/lib/viewport-category.d.ts +0 -44
- package/dist-lib/main.d.ts +0 -1
- package/dist-lib/registry-nSeHd5si.js +0 -1956
- package/dist-lib/safe-url-oSJw5pzO.js +0 -34
- package/dist-lib/stores/auth.d.ts +0 -16
- package/dist-lib/stores/list-layout.d.ts +0 -85
- package/dist-lib/stores/page-state.d.ts +0 -61
- package/dist-lib/stores/preferences.d.ts +0 -37
- package/dist-lib/stores/realtime.d.ts +0 -96
- package/dist-lib/stores/screen-registry.d.ts +0 -17
- package/dist-lib/stores/tabs.d.ts +0 -73
- package/dist-lib/types/api.d.ts +0 -579
- package/dist-lib/types/fieldType.d.ts +0 -2
- package/dist-lib/types/files.d.ts +0 -79
- package/dist-lib/types/ordmap.d.ts +0 -39
- package/dist-lib/types/schema.d.ts +0 -1089
- package/dist-lib/useCurrentScreen-0WBj7wT6.js +0 -7860
- package/dist-lib/useListQuery-C7dq_sEo.js +0 -103
- package/dist-lib/useOwnRefresh-q80kCMMh.js +0 -1167
- package/dist-lib/useProperties-CeGKtq7Q.js +0 -83
- package/dist-lib/useTabSearchMirror-CzNAj82Q.js +0 -175
- package/dist-lib/useText-BsedsJ-J.js +0 -952
- package/dist-lib/vite/fingerprint-plugin.d.ts +0 -44
|
@@ -1,952 +0,0 @@
|
|
|
1
|
-
import { Fragment as e, createContext as t, createElement as n, useContext as r, useEffect as i, useMemo as a } from "react";
|
|
2
|
-
import { useQuery as o } from "@tanstack/react-query";
|
|
3
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
4
|
-
import { create as c } from "zustand";
|
|
5
|
-
//#region src/types/api.ts
|
|
6
|
-
var l = class extends Error {
|
|
7
|
-
status;
|
|
8
|
-
code;
|
|
9
|
-
type;
|
|
10
|
-
retryable;
|
|
11
|
-
detail;
|
|
12
|
-
index;
|
|
13
|
-
raw;
|
|
14
|
-
constructor(e, t, n) {
|
|
15
|
-
super(t.title ?? ""), this.name = "ApiError", this.status = t.status ?? e, this.type = t.type ?? "", this.code = u(t.type), this.retryable = t.retryable ?? !1, this.detail = t.detail;
|
|
16
|
-
let r = t.index;
|
|
17
|
-
typeof r == "number" && (this.index = r), this.raw = n;
|
|
18
|
-
}
|
|
19
|
-
ext(e) {
|
|
20
|
-
return this.raw?.[e];
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
function u(e) {
|
|
24
|
-
if (!e || e === "about:blank") return "";
|
|
25
|
-
let t = e.lastIndexOf("/");
|
|
26
|
-
return t >= 0 ? e.slice(t + 1) : e;
|
|
27
|
-
}
|
|
28
|
-
function d(e) {
|
|
29
|
-
return typeof e == "object" && !!e && typeof e.type == "string";
|
|
30
|
-
}
|
|
31
|
-
var f = "cursor.semantics_mismatch", ee = "cursor.language_changed";
|
|
32
|
-
function te(e) {
|
|
33
|
-
return e instanceof l && (e.code === "cursor.semantics_mismatch" || e.code === "cursor.language_changed" || e.code === "cursor.archive_invalid");
|
|
34
|
-
}
|
|
35
|
-
async function p(e) {
|
|
36
|
-
let t;
|
|
37
|
-
try {
|
|
38
|
-
t = await e.json();
|
|
39
|
-
} catch {}
|
|
40
|
-
return {
|
|
41
|
-
raw: t,
|
|
42
|
-
body: d(t) ? t : {}
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region src/api/auth-redirect.ts
|
|
47
|
-
var m = "/", h = "/login", ne = "/signup", re = "https://declarion.local";
|
|
48
|
-
function ie(e) {
|
|
49
|
-
let t = e.split(/[?#]/, 1)[0];
|
|
50
|
-
return t === h || t.startsWith(`${h}/`) || t === ne || t.startsWith(`${ne}/`);
|
|
51
|
-
}
|
|
52
|
-
function ae(e) {
|
|
53
|
-
if (!e) return m;
|
|
54
|
-
let t = e.toLowerCase();
|
|
55
|
-
if (!e.startsWith("/") || e.startsWith("//") || e.includes("\\") || t.includes("%5c")) return m;
|
|
56
|
-
try {
|
|
57
|
-
let t = new URL(e, re);
|
|
58
|
-
if (t.origin !== re) return m;
|
|
59
|
-
let n = `${t.pathname}${t.search}${t.hash}`;
|
|
60
|
-
return !n.startsWith("/") || n.startsWith("//") || n.includes("\\") ? m : n || m;
|
|
61
|
-
} catch {
|
|
62
|
-
return m;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function oe(e) {
|
|
66
|
-
let t = ae(e);
|
|
67
|
-
return t === m || ie(t) ? h : `${h}?next=${encodeURIComponent(t)}`;
|
|
68
|
-
}
|
|
69
|
-
function se() {
|
|
70
|
-
if (typeof window > "u") return h;
|
|
71
|
-
let { pathname: e, search: t, hash: n } = window.location;
|
|
72
|
-
return oe(`${e}${t}${n}`);
|
|
73
|
-
}
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region src/embed/protocol.ts
|
|
76
|
-
var ce = "declarion-embed", g = {
|
|
77
|
-
ready: "ready",
|
|
78
|
-
setToken: "set-token",
|
|
79
|
-
tokenExpired: "token-expired",
|
|
80
|
-
reloadRequired: "reload-required",
|
|
81
|
-
resized: "resized",
|
|
82
|
-
navigated: "navigated",
|
|
83
|
-
navigationRequested: "navigation-requested",
|
|
84
|
-
dirtyChanged: "dirty-changed",
|
|
85
|
-
navigationFailed: "navigation-failed",
|
|
86
|
-
navigate: "navigate",
|
|
87
|
-
setTheme: "set-theme"
|
|
88
|
-
};
|
|
89
|
-
function _(e, t, n) {
|
|
90
|
-
if (!e || typeof window > "u" || window.parent === window) return !1;
|
|
91
|
-
let r = {
|
|
92
|
-
source: ce,
|
|
93
|
-
protocol: 1,
|
|
94
|
-
type: t,
|
|
95
|
-
payload: n
|
|
96
|
-
};
|
|
97
|
-
return window.parent.postMessage(r, e), !0;
|
|
98
|
-
}
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region src/embed/token.ts
|
|
101
|
-
var v = 15e3, le = 5e3, y = {
|
|
102
|
-
active: !1,
|
|
103
|
-
parentOrigin: null,
|
|
104
|
-
current: null,
|
|
105
|
-
pending: null
|
|
106
|
-
};
|
|
107
|
-
function ue(e) {
|
|
108
|
-
y.active = !0, y.parentOrigin = e;
|
|
109
|
-
}
|
|
110
|
-
function b() {
|
|
111
|
-
return y.active;
|
|
112
|
-
}
|
|
113
|
-
function de() {
|
|
114
|
-
return y.current?.token ?? null;
|
|
115
|
-
}
|
|
116
|
-
function fe() {
|
|
117
|
-
return y.parentOrigin;
|
|
118
|
-
}
|
|
119
|
-
function pe() {
|
|
120
|
-
return !y.current || Date.now() >= y.current.expiresAt - le;
|
|
121
|
-
}
|
|
122
|
-
function me(e) {
|
|
123
|
-
if (!e.token || typeof e.token != "string") return;
|
|
124
|
-
let t = Date.parse(e.expires_at);
|
|
125
|
-
if (!Number.isNaN(t) && (y.current = {
|
|
126
|
-
token: e.token,
|
|
127
|
-
expiresAt: t
|
|
128
|
-
}, y.pending)) {
|
|
129
|
-
let t = y.pending;
|
|
130
|
-
y.pending = null, clearTimeout(t.timer), t.resolve(e.token);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
function he() {
|
|
134
|
-
y.current = null;
|
|
135
|
-
}
|
|
136
|
-
function x() {
|
|
137
|
-
if (!pe() && y.current) return Promise.resolve(y.current.token);
|
|
138
|
-
if (y.pending) return y.pending.promise;
|
|
139
|
-
let e, t, n = new Promise((n, r) => {
|
|
140
|
-
e = n, t = r;
|
|
141
|
-
}), r = setTimeout(() => {
|
|
142
|
-
y.pending && y.pending.promise === n && (y.pending = null), t(/* @__PURE__ */ Error(`embed token wait timed out after ${v}ms`));
|
|
143
|
-
}, v);
|
|
144
|
-
return y.pending = {
|
|
145
|
-
promise: n,
|
|
146
|
-
resolve: e,
|
|
147
|
-
reject: t,
|
|
148
|
-
timer: r
|
|
149
|
-
}, _(y.parentOrigin, g.tokenExpired, {}), n;
|
|
150
|
-
}
|
|
151
|
-
//#endregion
|
|
152
|
-
//#region src/lib/versionTracker.ts
|
|
153
|
-
var ge = "X-Declarion-Version", _e = "declarion-version";
|
|
154
|
-
function ve() {
|
|
155
|
-
if (typeof BroadcastChannel > "u") return null;
|
|
156
|
-
try {
|
|
157
|
-
return new BroadcastChannel(_e);
|
|
158
|
-
} catch {
|
|
159
|
-
return null;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
var S = {
|
|
163
|
-
firstSeen: null,
|
|
164
|
-
firstComponents: null,
|
|
165
|
-
hasReportedDrift: !1,
|
|
166
|
-
pendingReload: null,
|
|
167
|
-
listeners: /* @__PURE__ */ new Set(),
|
|
168
|
-
channel: null
|
|
169
|
-
};
|
|
170
|
-
function C() {
|
|
171
|
-
S.channel || typeof BroadcastChannel > "u" || (S.channel = ve(), S.channel && S.channel.addEventListener("message", (e) => {
|
|
172
|
-
let t = e.data;
|
|
173
|
-
if (t && t.type === "drift" && t.delta && !S.hasReportedDrift) {
|
|
174
|
-
S.hasReportedDrift = !0;
|
|
175
|
-
for (let e of S.listeners) e(t.delta);
|
|
176
|
-
}
|
|
177
|
-
}));
|
|
178
|
-
}
|
|
179
|
-
function ye(e) {
|
|
180
|
-
if (C(), !e) return;
|
|
181
|
-
let t = e.get(ge);
|
|
182
|
-
if (t) {
|
|
183
|
-
if (!S.firstSeen) {
|
|
184
|
-
S.firstSeen = t;
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
t !== S.firstSeen && (S.hasReportedDrift || be().catch(() => {
|
|
188
|
-
Se({
|
|
189
|
-
kind: "unknown",
|
|
190
|
-
observed: t
|
|
191
|
-
});
|
|
192
|
-
}));
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
async function be() {
|
|
196
|
-
C();
|
|
197
|
-
let e;
|
|
198
|
-
try {
|
|
199
|
-
let t = {};
|
|
200
|
-
S.firstSeen && (t["If-None-Match"] = `"${S.firstSeen}"`), e = await fetch("/api/version", {
|
|
201
|
-
method: "GET",
|
|
202
|
-
credentials: b() ? "omit" : "include",
|
|
203
|
-
headers: t
|
|
204
|
-
});
|
|
205
|
-
} catch {
|
|
206
|
-
throw Error("version probe network error");
|
|
207
|
-
}
|
|
208
|
-
if (e.status === 304) return;
|
|
209
|
-
if (!e.ok) throw await p(e), Error(`version probe ${e.status}`);
|
|
210
|
-
let t;
|
|
211
|
-
try {
|
|
212
|
-
t = await e.json();
|
|
213
|
-
} catch {
|
|
214
|
-
throw Error("version probe malformed body");
|
|
215
|
-
}
|
|
216
|
-
let n = t.fingerprint;
|
|
217
|
-
if (typeof n != "string" || n === "") throw Error("version probe missing fingerprint");
|
|
218
|
-
let r = typeof t.schema_fingerprint == "string" && typeof t.asset_fingerprint == "string" && typeof t.binary_fingerprint == "string" ? {
|
|
219
|
-
schema: t.schema_fingerprint,
|
|
220
|
-
asset: t.asset_fingerprint,
|
|
221
|
-
binary: t.binary_fingerprint
|
|
222
|
-
} : void 0;
|
|
223
|
-
S.firstSeen ||= n, !S.firstComponents && r && n === S.firstSeen && (S.firstComponents = r), n !== S.firstSeen && Se({
|
|
224
|
-
kind: xe(S.firstComponents, r),
|
|
225
|
-
observed: n,
|
|
226
|
-
components: r
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
function xe(e, t) {
|
|
230
|
-
if (!e || !t) return "unknown";
|
|
231
|
-
let n = e.schema !== t.schema, r = e.asset !== t.asset, i = e.binary !== t.binary;
|
|
232
|
-
return n && !r && !i ? "schema-only" : r || i ? "asset-or-binary" : "unknown";
|
|
233
|
-
}
|
|
234
|
-
function Se(e) {
|
|
235
|
-
if (!S.hasReportedDrift) {
|
|
236
|
-
S.hasReportedDrift = !0, e.kind !== "schema-only" && (S.pendingReload = e);
|
|
237
|
-
for (let t of S.listeners) t(e);
|
|
238
|
-
if (S.channel) try {
|
|
239
|
-
S.channel.postMessage({
|
|
240
|
-
type: "drift",
|
|
241
|
-
delta: e
|
|
242
|
-
});
|
|
243
|
-
} catch {}
|
|
244
|
-
b() && e.kind !== "schema-only" && _(fe(), g.reloadRequired, { reason: `version drift: ${e.kind}` });
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
function Ce() {
|
|
248
|
-
return S.pendingReload;
|
|
249
|
-
}
|
|
250
|
-
function we(e) {
|
|
251
|
-
return S.listeners.add(e), () => {
|
|
252
|
-
S.listeners.delete(e);
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
//#endregion
|
|
256
|
-
//#region src/api/client.ts
|
|
257
|
-
var Te = (e) => JSON.stringify(e ?? {}), w = null, T = "declarion.auth.refresh.lock", E = "declarion.auth.refresh.result", Ee = "declarion.auth.refresh", De = 3e4, Oe = 100, D = typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
258
|
-
function O() {
|
|
259
|
-
if (typeof window > "u") return !1;
|
|
260
|
-
try {
|
|
261
|
-
let e = window.localStorage, t = `${T}.probe`;
|
|
262
|
-
return e.setItem(t, "1"), e.removeItem(t), !0;
|
|
263
|
-
} catch {
|
|
264
|
-
return !1;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
function ke() {
|
|
268
|
-
return typeof navigator > "u" ? null : navigator.locks ?? null;
|
|
269
|
-
}
|
|
270
|
-
function k(e) {
|
|
271
|
-
if (!e) return null;
|
|
272
|
-
try {
|
|
273
|
-
let t = JSON.parse(e);
|
|
274
|
-
return typeof t.owner != "string" || typeof t.expires_at != "number" ? null : {
|
|
275
|
-
owner: t.owner,
|
|
276
|
-
expires_at: t.expires_at
|
|
277
|
-
};
|
|
278
|
-
} catch {
|
|
279
|
-
return null;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
function Ae(e) {
|
|
283
|
-
if (!e) return null;
|
|
284
|
-
try {
|
|
285
|
-
let t = JSON.parse(e);
|
|
286
|
-
return typeof t.owner != "string" || typeof t.ok != "boolean" || typeof t.updated_at != "number" ? null : {
|
|
287
|
-
owner: t.owner,
|
|
288
|
-
ok: t.ok,
|
|
289
|
-
status: typeof t.status == "number" ? t.status : void 0,
|
|
290
|
-
updated_at: t.updated_at
|
|
291
|
-
};
|
|
292
|
-
} catch {
|
|
293
|
-
return null;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
function je(e) {
|
|
297
|
-
if (!O()) return null;
|
|
298
|
-
let t = Ae(window.localStorage.getItem(E));
|
|
299
|
-
return !t || t.updated_at < e ? null : t;
|
|
300
|
-
}
|
|
301
|
-
function Me(e) {
|
|
302
|
-
if (!e.ok) throw new j(e.status ?? 401);
|
|
303
|
-
}
|
|
304
|
-
function Ne(e = Date.now()) {
|
|
305
|
-
let t = k(window.localStorage.getItem(T));
|
|
306
|
-
if (t && t.expires_at > e && t.owner !== D) return !1;
|
|
307
|
-
let n = {
|
|
308
|
-
owner: D,
|
|
309
|
-
expires_at: e + De
|
|
310
|
-
};
|
|
311
|
-
return window.localStorage.setItem(T, JSON.stringify(n)), k(window.localStorage.getItem(T))?.owner === D;
|
|
312
|
-
}
|
|
313
|
-
function Pe() {
|
|
314
|
-
k(window.localStorage.getItem(T))?.owner === D && window.localStorage.removeItem(T);
|
|
315
|
-
}
|
|
316
|
-
function A(e) {
|
|
317
|
-
let t = {
|
|
318
|
-
owner: D,
|
|
319
|
-
updated_at: Date.now(),
|
|
320
|
-
...e
|
|
321
|
-
};
|
|
322
|
-
window.localStorage.setItem(E, JSON.stringify(t));
|
|
323
|
-
}
|
|
324
|
-
async function Fe(e) {
|
|
325
|
-
return new Promise((t, n) => {
|
|
326
|
-
let r = !1, i = null, a = (e) => {
|
|
327
|
-
r || (r = !0, i && clearTimeout(i), window.removeEventListener("storage", c), t(e));
|
|
328
|
-
}, o = (e) => {
|
|
329
|
-
r || (r = !0, i && clearTimeout(i), window.removeEventListener("storage", c), n(new j(e)));
|
|
330
|
-
}, s = () => {
|
|
331
|
-
let t = Ae(window.localStorage.getItem(E));
|
|
332
|
-
if (t && t.updated_at >= e) {
|
|
333
|
-
t.ok ? a("complete") : o(t.status ?? 401);
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
let n = k(window.localStorage.getItem(T));
|
|
337
|
-
if (!n) {
|
|
338
|
-
a("complete");
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
341
|
-
if (n.expires_at <= Date.now()) {
|
|
342
|
-
a("expired");
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
i = setTimeout(s, Oe);
|
|
346
|
-
}, c = (e) => {
|
|
347
|
-
(e.key === T || e.key === E) && (i && clearTimeout(i), s());
|
|
348
|
-
};
|
|
349
|
-
window.addEventListener("storage", c), s();
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
async function Ie(e) {
|
|
353
|
-
let t = ke();
|
|
354
|
-
return t ? (await t.request(Ee, { mode: "exclusive" }, async () => {
|
|
355
|
-
let t = je(e);
|
|
356
|
-
if (t) {
|
|
357
|
-
Me(t);
|
|
358
|
-
return;
|
|
359
|
-
}
|
|
360
|
-
try {
|
|
361
|
-
await L(), O() && A({ ok: !0 });
|
|
362
|
-
} catch (e) {
|
|
363
|
-
throw e instanceof j && O() && A({
|
|
364
|
-
ok: !1,
|
|
365
|
-
status: e.status
|
|
366
|
-
}), e;
|
|
367
|
-
}
|
|
368
|
-
}), !0) : !1;
|
|
369
|
-
}
|
|
370
|
-
async function Le() {
|
|
371
|
-
let e = Date.now();
|
|
372
|
-
if (!await Ie(e)) {
|
|
373
|
-
if (!O()) {
|
|
374
|
-
await L();
|
|
375
|
-
return;
|
|
376
|
-
}
|
|
377
|
-
if (Ne(e)) try {
|
|
378
|
-
await L(), A({ ok: !0 });
|
|
379
|
-
return;
|
|
380
|
-
} catch (e) {
|
|
381
|
-
throw e instanceof j && A({
|
|
382
|
-
ok: !1,
|
|
383
|
-
status: e.status
|
|
384
|
-
}), e;
|
|
385
|
-
} finally {
|
|
386
|
-
Pe();
|
|
387
|
-
}
|
|
388
|
-
await Fe(e) === "expired" && await Le();
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
var j = class extends Error {
|
|
392
|
-
status;
|
|
393
|
-
constructor(e) {
|
|
394
|
-
super(`refresh failed terminally (${e})`), this.status = e, this.name = "RefreshDeadError";
|
|
395
|
-
}
|
|
396
|
-
}, M = null, N = null, P = 3e4, Re = 5e3;
|
|
397
|
-
function F() {
|
|
398
|
-
z().catch((e) => {
|
|
399
|
-
e instanceof j && B();
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
function I(e) {
|
|
403
|
-
if (R = null, M &&= (clearTimeout(M), null), N = null, !e || typeof window > "u") return;
|
|
404
|
-
let t = Date.parse(e);
|
|
405
|
-
if (Number.isNaN(t)) return;
|
|
406
|
-
N = t;
|
|
407
|
-
let n = Math.max(t - Date.now() - P, Re);
|
|
408
|
-
M = setTimeout(() => {
|
|
409
|
-
M = null, F();
|
|
410
|
-
}, n);
|
|
411
|
-
}
|
|
412
|
-
function ze() {
|
|
413
|
-
M &&= (clearTimeout(M), null), N = null;
|
|
414
|
-
}
|
|
415
|
-
typeof document < "u" && document.addEventListener("visibilitychange", () => {
|
|
416
|
-
document.visibilityState === "visible" && N !== null && Date.now() >= N - P && F();
|
|
417
|
-
});
|
|
418
|
-
async function Be(e) {
|
|
419
|
-
try {
|
|
420
|
-
let t = await e.json();
|
|
421
|
-
I(t?.result?.expires_at ?? t?.expires_at);
|
|
422
|
-
} catch {}
|
|
423
|
-
}
|
|
424
|
-
async function L() {
|
|
425
|
-
let e = {
|
|
426
|
-
method: "POST",
|
|
427
|
-
credentials: "include",
|
|
428
|
-
headers: { "Content-Type": "application/json" },
|
|
429
|
-
body: Te({})
|
|
430
|
-
}, t = await fetch("/api/actions/auth.refresh", e);
|
|
431
|
-
if (t.status === 429) {
|
|
432
|
-
let n = parseInt(t.headers.get("Retry-After") || "1", 10);
|
|
433
|
-
await new Promise((e) => setTimeout(e, n * 1e3));
|
|
434
|
-
let r = await fetch("/api/actions/auth.refresh", e);
|
|
435
|
-
if (!r.ok) throw await p(r), new j(r.status);
|
|
436
|
-
await Be(r);
|
|
437
|
-
return;
|
|
438
|
-
}
|
|
439
|
-
if (!t.ok) throw await p(t), new j(t.status);
|
|
440
|
-
await Be(t);
|
|
441
|
-
}
|
|
442
|
-
var R = null;
|
|
443
|
-
async function z() {
|
|
444
|
-
if (R !== null) throw new j(R);
|
|
445
|
-
return w || (w = Le().catch((e) => {
|
|
446
|
-
throw e instanceof j && (R = e.status), e;
|
|
447
|
-
}).finally(() => {
|
|
448
|
-
w = null;
|
|
449
|
-
}), w);
|
|
450
|
-
}
|
|
451
|
-
var B = () => {
|
|
452
|
-
if (typeof window > "u") return;
|
|
453
|
-
let { pathname: e } = window.location;
|
|
454
|
-
e.startsWith("/login") || e.startsWith("/signup") || e === "/reset" || e === "/forgot" || e === "/2fa" || (window.location.href = se());
|
|
455
|
-
};
|
|
456
|
-
function Ve(e) {
|
|
457
|
-
let t = B;
|
|
458
|
-
return B = e, t;
|
|
459
|
-
}
|
|
460
|
-
function He() {
|
|
461
|
-
return B;
|
|
462
|
-
}
|
|
463
|
-
var Ue = ({ status: e, code: t, message: n }) => {
|
|
464
|
-
console.error(`[API ${e}] ${t}: ${n}`);
|
|
465
|
-
};
|
|
466
|
-
function We(e, t, n, r) {
|
|
467
|
-
let i = new Headers(e);
|
|
468
|
-
return !i.has("Content-Type") && t && i.set("Content-Type", "application/json"), n.setAccept && !i.has("Accept") && i.set("Accept", "*/*"), r && i.set("Authorization", `Bearer ${r}`), i;
|
|
469
|
-
}
|
|
470
|
-
var V = null, H = 0;
|
|
471
|
-
function Ge(e) {
|
|
472
|
-
e || H++, V = e || null;
|
|
473
|
-
}
|
|
474
|
-
function Ke() {
|
|
475
|
-
return H;
|
|
476
|
-
}
|
|
477
|
-
function qe(e, t) {
|
|
478
|
-
e === H && (V = t || null);
|
|
479
|
-
}
|
|
480
|
-
function Je() {
|
|
481
|
-
return V;
|
|
482
|
-
}
|
|
483
|
-
function Ye(e) {
|
|
484
|
-
return !V || !e.startsWith("/api/") || /[?&]language=/.test(e) ? e : `${e}${e.includes("?") ? "&" : "?"}language=${encodeURIComponent(V)}`;
|
|
485
|
-
}
|
|
486
|
-
async function Xe(e, t, n, r) {
|
|
487
|
-
let i = Ye(e), a = b(), o = a ? "omit" : "include", s = We(t.headers, !!t.body, n, a ? de() : null), c = await fetch(i, {
|
|
488
|
-
...t,
|
|
489
|
-
headers: s,
|
|
490
|
-
credentials: o
|
|
491
|
-
});
|
|
492
|
-
if (ye(c.headers), !c.ok) {
|
|
493
|
-
let { raw: e, body: s } = await p(c), d = u(s.type), f = s.title ?? "";
|
|
494
|
-
if (c.status === 401 && (d === "auth.token_refresh_needed" || d === "auth.unauthorized")) try {
|
|
495
|
-
let e = null;
|
|
496
|
-
a ? (he(), e = await x()) : await z();
|
|
497
|
-
let s = We(t.headers, !!t.body, n, e), c = await fetch(i, {
|
|
498
|
-
...t,
|
|
499
|
-
headers: s,
|
|
500
|
-
credentials: o
|
|
501
|
-
});
|
|
502
|
-
if (!c.ok) {
|
|
503
|
-
B();
|
|
504
|
-
let e = await p(c);
|
|
505
|
-
throw new l(c.status, e.body, e.raw);
|
|
506
|
-
}
|
|
507
|
-
return r(c);
|
|
508
|
-
} catch (t) {
|
|
509
|
-
throw t instanceof l ? t : (B(), new l(401, s, e));
|
|
510
|
-
}
|
|
511
|
-
throw c.status === 401 && B(), Ue({
|
|
512
|
-
status: c.status,
|
|
513
|
-
code: d,
|
|
514
|
-
message: f
|
|
515
|
-
}), new l(c.status, s, e);
|
|
516
|
-
}
|
|
517
|
-
return r(c);
|
|
518
|
-
}
|
|
519
|
-
function Ze(e) {
|
|
520
|
-
return e.status === 204 ? Promise.resolve(void 0) : e.json();
|
|
521
|
-
}
|
|
522
|
-
async function U(e, t = {}) {
|
|
523
|
-
return Xe(e, t, { setAccept: !1 }, Ze);
|
|
524
|
-
}
|
|
525
|
-
async function Qe(e) {
|
|
526
|
-
return {
|
|
527
|
-
blob: await e.blob(),
|
|
528
|
-
filename: et(e.headers),
|
|
529
|
-
headers: e.headers
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
async function $e(e, t = {}) {
|
|
533
|
-
return Xe(e, t, { setAccept: !0 }, Qe);
|
|
534
|
-
}
|
|
535
|
-
function et(e) {
|
|
536
|
-
let t = e.get("Content-Disposition");
|
|
537
|
-
if (!t) return "";
|
|
538
|
-
let n = t.match(/filename\*\s*=\s*([^']*)'([^']*)'([^;]+)/i);
|
|
539
|
-
if (n) try {
|
|
540
|
-
return decodeURIComponent(n[3].trim());
|
|
541
|
-
} catch {}
|
|
542
|
-
let r = t.match(/filename\s*=\s*("([^"]+)"|([^;]+))/i);
|
|
543
|
-
return r ? (r[2] ?? r[3] ?? "").trim() : "";
|
|
544
|
-
}
|
|
545
|
-
async function W(e, t = {}) {
|
|
546
|
-
return (await U(`/api/actions/${encodeURIComponent(e)}`, {
|
|
547
|
-
method: "POST",
|
|
548
|
-
body: Te(t)
|
|
549
|
-
})).result;
|
|
550
|
-
}
|
|
551
|
-
//#endregion
|
|
552
|
-
//#region src/types/ordmap.ts
|
|
553
|
-
var G = class e {
|
|
554
|
-
#e;
|
|
555
|
-
#t;
|
|
556
|
-
constructor(e) {
|
|
557
|
-
this.#e = e;
|
|
558
|
-
let t = /* @__PURE__ */ new Map();
|
|
559
|
-
for (let n = 0; n < e.length; n++) {
|
|
560
|
-
let r = e[n].name;
|
|
561
|
-
r !== void 0 && t.set(r, n);
|
|
562
|
-
}
|
|
563
|
-
this.#t = t;
|
|
564
|
-
}
|
|
565
|
-
static fromObject(t) {
|
|
566
|
-
return e.#n(t);
|
|
567
|
-
}
|
|
568
|
-
static fromWire(t) {
|
|
569
|
-
return e.#n(t);
|
|
570
|
-
}
|
|
571
|
-
static #n(t) {
|
|
572
|
-
if (!t) return new e([]);
|
|
573
|
-
let n = [];
|
|
574
|
-
for (let [e, r] of Object.entries(t)) n.push({
|
|
575
|
-
...r,
|
|
576
|
-
name: e
|
|
577
|
-
});
|
|
578
|
-
return new e(n);
|
|
579
|
-
}
|
|
580
|
-
get length() {
|
|
581
|
-
return this.#e.length;
|
|
582
|
-
}
|
|
583
|
-
has(e) {
|
|
584
|
-
return this.#t.has(e);
|
|
585
|
-
}
|
|
586
|
-
get(e) {
|
|
587
|
-
let t = this.#t.get(e);
|
|
588
|
-
return t === void 0 ? void 0 : this.#e[t];
|
|
589
|
-
}
|
|
590
|
-
items() {
|
|
591
|
-
return this.#e;
|
|
592
|
-
}
|
|
593
|
-
names() {
|
|
594
|
-
return this.#e.map((e) => e.name ?? "");
|
|
595
|
-
}
|
|
596
|
-
*[Symbol.iterator]() {
|
|
597
|
-
for (let e of this.#e) yield [e.name ?? "", e];
|
|
598
|
-
}
|
|
599
|
-
};
|
|
600
|
-
//#endregion
|
|
601
|
-
//#region src/api/schema.ts
|
|
602
|
-
function tt(e) {
|
|
603
|
-
return {
|
|
604
|
-
...e,
|
|
605
|
-
params: e.params ? G.fromWire(e.params) : void 0
|
|
606
|
-
};
|
|
607
|
-
}
|
|
608
|
-
function nt(e) {
|
|
609
|
-
return {
|
|
610
|
-
...e,
|
|
611
|
-
resolved_params: e.resolved_params ? G.fromWire(e.resolved_params) : void 0
|
|
612
|
-
};
|
|
613
|
-
}
|
|
614
|
-
function rt(e) {
|
|
615
|
-
let t = {};
|
|
616
|
-
if (e.handlers) for (let [n, r] of Object.entries(e.handlers)) t[n] = tt(r);
|
|
617
|
-
let n = {};
|
|
618
|
-
if (e.actions) for (let [t, r] of Object.entries(e.actions)) n[t] = nt(r);
|
|
619
|
-
return {
|
|
620
|
-
...e,
|
|
621
|
-
fields: G.fromWire(e.fields),
|
|
622
|
-
files: e.files ? G.fromWire(e.files) : void 0,
|
|
623
|
-
variants: e.variants ? G.fromWire(e.variants) : void 0,
|
|
624
|
-
handlers: e.handlers ? t : void 0,
|
|
625
|
-
actions: e.actions ? n : void 0
|
|
626
|
-
};
|
|
627
|
-
}
|
|
628
|
-
function it(e) {
|
|
629
|
-
let t = {};
|
|
630
|
-
if (e.entities) for (let [n, r] of Object.entries(e.entities)) t[n] = rt(r);
|
|
631
|
-
let n = {};
|
|
632
|
-
if (e.structures) for (let [t, r] of Object.entries(e.structures)) n[t] = {
|
|
633
|
-
...r,
|
|
634
|
-
fields: G.fromWire(r.fields)
|
|
635
|
-
};
|
|
636
|
-
let r = {};
|
|
637
|
-
if (e.handlers) for (let [t, n] of Object.entries(e.handlers)) r[t] = tt(n);
|
|
638
|
-
let i = {};
|
|
639
|
-
if (e.actions) for (let [t, n] of Object.entries(e.actions)) i[t] = nt(n);
|
|
640
|
-
let a = { ...e.screens };
|
|
641
|
-
for (let [e, t] of Object.entries(a)) {
|
|
642
|
-
let n = t;
|
|
643
|
-
a[e] = {
|
|
644
|
-
...t,
|
|
645
|
-
variants: n.variants ? G.fromWire(n.variants) : void 0
|
|
646
|
-
};
|
|
647
|
-
}
|
|
648
|
-
return {
|
|
649
|
-
...e,
|
|
650
|
-
entities: t,
|
|
651
|
-
structures: n,
|
|
652
|
-
handlers: r,
|
|
653
|
-
actions: i,
|
|
654
|
-
screens: a
|
|
655
|
-
};
|
|
656
|
-
}
|
|
657
|
-
async function at() {
|
|
658
|
-
let e = Ke(), t = it(await U("/api/schema", { cache: "no-cache" }));
|
|
659
|
-
return qe(e, t.language), t;
|
|
660
|
-
}
|
|
661
|
-
//#endregion
|
|
662
|
-
//#region src/lib/html-state.ts
|
|
663
|
-
function ot(e) {
|
|
664
|
-
typeof document < "u" && (document.documentElement.dataset.viewport = e);
|
|
665
|
-
}
|
|
666
|
-
function st(e) {
|
|
667
|
-
typeof document < "u" && (document.documentElement.dataset.embed = e ? "true" : "false");
|
|
668
|
-
}
|
|
669
|
-
//#endregion
|
|
670
|
-
//#region src/embed/params.ts
|
|
671
|
-
var ct = "self", K = "embed", q = "parent_origin", J = "theme", lt = [
|
|
672
|
-
K,
|
|
673
|
-
q,
|
|
674
|
-
J,
|
|
675
|
-
"nav"
|
|
676
|
-
];
|
|
677
|
-
function ut(e) {
|
|
678
|
-
if (!e) return null;
|
|
679
|
-
let t;
|
|
680
|
-
try {
|
|
681
|
-
t = new URL(e);
|
|
682
|
-
} catch {
|
|
683
|
-
return null;
|
|
684
|
-
}
|
|
685
|
-
return t.origin === "null" ? null : e === t.origin ? t.origin : null;
|
|
686
|
-
}
|
|
687
|
-
function dt(e) {
|
|
688
|
-
return e === "light" || e === "dark" ? e : null;
|
|
689
|
-
}
|
|
690
|
-
function ft(e) {
|
|
691
|
-
return e === "delegated" ? "delegated" : ct;
|
|
692
|
-
}
|
|
693
|
-
function pt(e) {
|
|
694
|
-
let t = typeof e == "string" ? new URLSearchParams(e) : e;
|
|
695
|
-
return {
|
|
696
|
-
enabled: t.get(K) === "1",
|
|
697
|
-
parentOrigin: ut(t.get(q)),
|
|
698
|
-
theme: dt(t.get(J)),
|
|
699
|
-
navigationMode: ft(t.get("nav"))
|
|
700
|
-
};
|
|
701
|
-
}
|
|
702
|
-
function mt(e, t) {
|
|
703
|
-
if (!t.enabled) return e;
|
|
704
|
-
let n = /^[a-z][a-z0-9+.-]*:/i.test(e), r;
|
|
705
|
-
try {
|
|
706
|
-
r = new URL(e, "http://embed.invalid");
|
|
707
|
-
} catch {
|
|
708
|
-
return e;
|
|
709
|
-
}
|
|
710
|
-
let i = r.searchParams;
|
|
711
|
-
return t.enabled && i.set(K, "1"), t.parentOrigin && i.set(q, t.parentOrigin), t.theme && i.set(J, t.theme), i.set("nav", t.navigationMode), n ? r.toString() : `${r.pathname}${r.search}${r.hash}`;
|
|
712
|
-
}
|
|
713
|
-
//#endregion
|
|
714
|
-
//#region src/embed/EmbedContext.tsx
|
|
715
|
-
var Y = t({
|
|
716
|
-
enabled: !1,
|
|
717
|
-
parentOrigin: null,
|
|
718
|
-
theme: null,
|
|
719
|
-
navigationMode: "self",
|
|
720
|
-
appendEmbedParams: (e) => e
|
|
721
|
-
});
|
|
722
|
-
function ht(e) {
|
|
723
|
-
return {
|
|
724
|
-
enabled: e.enabled,
|
|
725
|
-
parentOrigin: e.parentOrigin,
|
|
726
|
-
theme: e.theme,
|
|
727
|
-
navigationMode: e.navigationMode,
|
|
728
|
-
appendEmbedParams: (t) => mt(t, e)
|
|
729
|
-
};
|
|
730
|
-
}
|
|
731
|
-
function gt({ children: e, query: t }) {
|
|
732
|
-
let n = a(() => ht(pt(t ?? (typeof window < "u" ? window.location.search : ""))), [t]);
|
|
733
|
-
return i(() => {
|
|
734
|
-
st(n.enabled);
|
|
735
|
-
}, [n.enabled]), /* @__PURE__ */ s(Y.Provider, {
|
|
736
|
-
value: n,
|
|
737
|
-
children: e
|
|
738
|
-
});
|
|
739
|
-
}
|
|
740
|
-
function _t() {
|
|
741
|
-
return r(Y);
|
|
742
|
-
}
|
|
743
|
-
//#endregion
|
|
744
|
-
//#region src/api/auth.ts
|
|
745
|
-
async function vt() {
|
|
746
|
-
return W("auth.check_setup");
|
|
747
|
-
}
|
|
748
|
-
async function yt(e, t, n = !0) {
|
|
749
|
-
let r = await W("auth.login", {
|
|
750
|
-
email: e,
|
|
751
|
-
password: t,
|
|
752
|
-
remember: n
|
|
753
|
-
});
|
|
754
|
-
return I(r.expires_at), r;
|
|
755
|
-
}
|
|
756
|
-
async function bt(e, t, n) {
|
|
757
|
-
let r = await W("auth.signup", {
|
|
758
|
-
email: e,
|
|
759
|
-
password: t,
|
|
760
|
-
display_name: n
|
|
761
|
-
});
|
|
762
|
-
return I(r.expires_at), r;
|
|
763
|
-
}
|
|
764
|
-
async function X() {
|
|
765
|
-
return W("auth.me");
|
|
766
|
-
}
|
|
767
|
-
async function xt() {
|
|
768
|
-
return (await W("auth.list_tenants")).tenants;
|
|
769
|
-
}
|
|
770
|
-
async function St(e) {
|
|
771
|
-
let t = await W("auth.switch_tenant", { tenant_id: e });
|
|
772
|
-
return I(t.expires_at), t;
|
|
773
|
-
}
|
|
774
|
-
async function Ct() {
|
|
775
|
-
await W("auth.logout");
|
|
776
|
-
}
|
|
777
|
-
async function wt(e) {
|
|
778
|
-
return (await W("sso_provider.list", e ? { tenant_code: e } : {})).providers;
|
|
779
|
-
}
|
|
780
|
-
function Tt(e, t, n) {
|
|
781
|
-
let r = new URLSearchParams();
|
|
782
|
-
t && r.set("tenant", t), n && r.set("redirect", n);
|
|
783
|
-
let i = r.toString();
|
|
784
|
-
return `/api/auth/sso/authorize/${encodeURIComponent(e)}${i ? `?${i}` : ""}`;
|
|
785
|
-
}
|
|
786
|
-
async function Et(e, t, n) {
|
|
787
|
-
let r = {
|
|
788
|
-
target_user_id: e,
|
|
789
|
-
reason: t
|
|
790
|
-
};
|
|
791
|
-
return n != null && (r.duration_minutes = n), W("impersonation.start", r);
|
|
792
|
-
}
|
|
793
|
-
async function Dt() {
|
|
794
|
-
return W("impersonation.stop");
|
|
795
|
-
}
|
|
796
|
-
async function Ot(e) {
|
|
797
|
-
await W("impersonation.revoke", { session_id: e });
|
|
798
|
-
}
|
|
799
|
-
async function kt(e, t) {
|
|
800
|
-
await W("auth.change_password", {
|
|
801
|
-
current_password: e,
|
|
802
|
-
new_password: t
|
|
803
|
-
});
|
|
804
|
-
}
|
|
805
|
-
//#endregion
|
|
806
|
-
//#region src/stores/auth.ts
|
|
807
|
-
var Z = c((e) => ({
|
|
808
|
-
user: null,
|
|
809
|
-
isAuthenticated: !1,
|
|
810
|
-
isLoading: !0,
|
|
811
|
-
activeTenant: null,
|
|
812
|
-
tenants: [],
|
|
813
|
-
initialize: async () => {
|
|
814
|
-
try {
|
|
815
|
-
let t = await X(), n = t.tenant ?? null, r = [];
|
|
816
|
-
try {
|
|
817
|
-
r = await xt();
|
|
818
|
-
} catch {}
|
|
819
|
-
e({
|
|
820
|
-
user: t,
|
|
821
|
-
isAuthenticated: !0,
|
|
822
|
-
isLoading: !1,
|
|
823
|
-
activeTenant: n,
|
|
824
|
-
tenants: r
|
|
825
|
-
});
|
|
826
|
-
} catch {
|
|
827
|
-
e({
|
|
828
|
-
user: null,
|
|
829
|
-
isAuthenticated: !1,
|
|
830
|
-
isLoading: !1
|
|
831
|
-
});
|
|
832
|
-
}
|
|
833
|
-
},
|
|
834
|
-
refreshMe: async () => {
|
|
835
|
-
try {
|
|
836
|
-
let t = await X();
|
|
837
|
-
e({
|
|
838
|
-
user: t,
|
|
839
|
-
activeTenant: t.tenant ?? null
|
|
840
|
-
});
|
|
841
|
-
} catch {}
|
|
842
|
-
},
|
|
843
|
-
setUser: (t, n) => {
|
|
844
|
-
e({
|
|
845
|
-
user: t,
|
|
846
|
-
isAuthenticated: !0,
|
|
847
|
-
isLoading: !1,
|
|
848
|
-
activeTenant: n ?? null
|
|
849
|
-
});
|
|
850
|
-
},
|
|
851
|
-
setTenants: (t) => {
|
|
852
|
-
e({ tenants: t });
|
|
853
|
-
},
|
|
854
|
-
setActiveTenant: (t) => {
|
|
855
|
-
e({ activeTenant: t });
|
|
856
|
-
},
|
|
857
|
-
logout: async () => {
|
|
858
|
-
ze();
|
|
859
|
-
try {
|
|
860
|
-
await Ct();
|
|
861
|
-
} catch {}
|
|
862
|
-
e({
|
|
863
|
-
user: null,
|
|
864
|
-
isAuthenticated: !1,
|
|
865
|
-
activeTenant: null,
|
|
866
|
-
tenants: []
|
|
867
|
-
});
|
|
868
|
-
}
|
|
869
|
-
}));
|
|
870
|
-
Z.subscribe((e, t) => {
|
|
871
|
-
e.isAuthenticated !== t.isAuthenticated && Ge(null);
|
|
872
|
-
});
|
|
873
|
-
//#endregion
|
|
874
|
-
//#region src/hooks/useSchema.ts
|
|
875
|
-
function Q() {
|
|
876
|
-
let e = Z((e) => e.isAuthenticated), t = _t().enabled;
|
|
877
|
-
return o({
|
|
878
|
-
queryKey: ["schema", e],
|
|
879
|
-
queryFn: at,
|
|
880
|
-
staleTime: Infinity,
|
|
881
|
-
enabled: e || !t
|
|
882
|
-
});
|
|
883
|
-
}
|
|
884
|
-
//#endregion
|
|
885
|
-
//#region src/lib/language.ts
|
|
886
|
-
var At = "en", jt = "ui_language";
|
|
887
|
-
function Mt(e, t, n) {
|
|
888
|
-
if (e) for (let r of [
|
|
889
|
-
t,
|
|
890
|
-
n,
|
|
891
|
-
"en"
|
|
892
|
-
]) {
|
|
893
|
-
let t = e[r];
|
|
894
|
-
if (t) return [r, t];
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
function $(e, t, n) {
|
|
898
|
-
return Mt(e, t, n)?.[1];
|
|
899
|
-
}
|
|
900
|
-
function Nt(e, t, n) {
|
|
901
|
-
function r(r, i, a) {
|
|
902
|
-
if (typeof r != "string") return $(r, t, n) ?? "";
|
|
903
|
-
let o = $(e?.[r], t, n) ?? i ?? "";
|
|
904
|
-
return a ? o.replace(/\{(\w+)\}/g, (e, t) => Object.hasOwn(a, t) ? String(a[t]) : e) : o;
|
|
905
|
-
}
|
|
906
|
-
return Object.assign(r, {
|
|
907
|
-
language: t,
|
|
908
|
-
deploymentLanguage: n
|
|
909
|
-
});
|
|
910
|
-
}
|
|
911
|
-
function Pt(e, t, n, r, i) {
|
|
912
|
-
let a = new Intl.PluralRules(e.language).select(n), o = {
|
|
913
|
-
...i,
|
|
914
|
-
count: n
|
|
915
|
-
};
|
|
916
|
-
return e(`${t}.${a}`, "", o) || e(`${t}.other`, a === "one" ? r.one : r.other, o);
|
|
917
|
-
}
|
|
918
|
-
function Ft(t, r) {
|
|
919
|
-
return t.split(/(\{[A-Za-z_][A-Za-z0-9_]*\})/).filter((e) => e !== "").map((t, i) => {
|
|
920
|
-
let a = /^\{(\w+)\}$/.exec(t)?.[1];
|
|
921
|
-
return n(e, { key: i }, a !== void 0 && Object.hasOwn(r, a) ? r[a] : t);
|
|
922
|
-
});
|
|
923
|
-
}
|
|
924
|
-
//#endregion
|
|
925
|
-
//#region src/hooks/useLanguage.ts
|
|
926
|
-
function It() {
|
|
927
|
-
let { data: e } = Q();
|
|
928
|
-
return e?.language || "en";
|
|
929
|
-
}
|
|
930
|
-
function Lt() {
|
|
931
|
-
let { data: e } = Q();
|
|
932
|
-
return e?.deployment_language || "en";
|
|
933
|
-
}
|
|
934
|
-
async function Rt(e) {
|
|
935
|
-
let t = Je();
|
|
936
|
-
Ge(null), await e.refetchQueries({
|
|
937
|
-
queryKey: ["schema"],
|
|
938
|
-
type: "active"
|
|
939
|
-
}), Je() !== t && await e.invalidateQueries({ predicate: (e) => e.queryKey[0] !== "schema" });
|
|
940
|
-
}
|
|
941
|
-
//#endregion
|
|
942
|
-
//#region src/hooks/useText.ts
|
|
943
|
-
function zt(e = "messages") {
|
|
944
|
-
let { data: t } = Q(), n = It(), r = Lt(), i = e === "errors" ? t?.errors : t?.messages;
|
|
945
|
-
return a(() => Nt(i, n, r), [
|
|
946
|
-
i,
|
|
947
|
-
n,
|
|
948
|
-
r
|
|
949
|
-
]);
|
|
950
|
-
}
|
|
951
|
-
//#endregion
|
|
952
|
-
export { l as $, G as A, Ce as B, bt as C, _t as D, gt as E, z as F, ue as G, x as H, He as I, ce as J, b as K, Ve as L, U as M, $e as N, lt as O, W as P, ae as Q, Ye as R, yt as S, St as T, he as U, we as V, de as W, _ as X, g as Y, oe as Z, Ot as _, jt as a, p as at, wt as b, $ as c, Ft as d, ee as et, Q as f, X as g, vt as h, It as i, te as it, j, ot as k, Mt as l, kt as m, Rt as n, u as nt, At as o, Z as p, me as q, Lt as r, d as rt, Nt as s, zt as t, f as tt, Pt as u, Et as v, Tt as w, xt as x, Dt as y, be as z };
|