@mistriwork/kit 1.0.0-rc.11 → 1.0.0-rc.13
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/client/actionGrants.d.ts +21 -0
- package/dist/client/actionGrants.js +24 -0
- package/dist/client/addressMount.d.ts +67 -0
- package/dist/client/addressMount.js +136 -0
- package/dist/client/app.d.ts +10 -0
- package/dist/client/app.js +976 -0
- package/dist/client/boot.d.ts +1 -0
- package/dist/client/boot.js +37 -0
- package/dist/client/brandLook.css +125 -0
- package/dist/client/breakdownBatch.d.ts +34 -0
- package/dist/client/breakdownBatch.js +115 -0
- package/dist/client/bulkActions.d.ts +66 -0
- package/dist/client/bulkActions.js +171 -0
- package/dist/client/chart.d.ts +20 -0
- package/dist/client/chart.js +80 -0
- package/dist/client/clauses.d.ts +121 -0
- package/dist/client/clauses.js +276 -0
- package/dist/client/columns.d.ts +77 -0
- package/dist/client/columns.js +102 -0
- package/dist/client/components/Accordion.d.ts +26 -0
- package/dist/client/components/Accordion.js +44 -0
- package/dist/client/components/ApiOperations.d.ts +3 -0
- package/dist/client/components/ApiOperations.js +162 -0
- package/dist/client/components/AppColumnMenu.d.ts +66 -0
- package/dist/client/components/AppColumnMenu.js +59 -0
- package/dist/client/components/AppColumnMenuPopups.d.ts +21 -0
- package/dist/client/components/AppColumnMenuPopups.js +92 -0
- package/dist/client/components/AppFooter.css +17 -0
- package/dist/client/components/AppFooter.d.ts +23 -0
- package/dist/client/components/AppFooter.js +12 -0
- package/dist/client/components/AppIssues.d.ts +4 -0
- package/dist/client/components/AppIssues.js +18 -0
- package/dist/client/components/AppList.d.ts +20 -0
- package/dist/client/components/AppList.js +696 -0
- package/dist/client/components/AttachmentList.d.ts +45 -0
- package/dist/client/components/AttachmentList.js +178 -0
- package/dist/client/components/BoardList.css +9 -0
- package/dist/client/components/Breakdown.d.ts +11 -0
- package/dist/client/components/Breakdown.js +157 -0
- package/dist/client/components/BreakdownRoom.d.ts +4 -0
- package/dist/client/components/BreakdownRoom.js +48 -0
- package/dist/client/components/CardsList.d.ts +23 -0
- package/dist/client/components/CardsList.js +209 -0
- package/dist/client/components/Chart.css +165 -0
- package/dist/client/components/Chart.d.ts +194 -0
- package/dist/client/components/Chart.js +801 -0
- package/dist/client/components/ChartFigure.d.ts +82 -0
- package/dist/client/components/ChartFigure.js +102 -0
- package/dist/client/components/ChartShapes.css +213 -0
- package/dist/client/components/ChartShapes.d.ts +63 -0
- package/dist/client/components/ChartShapes.js +393 -0
- package/dist/client/components/Checklist.css +16 -0
- package/dist/client/components/Composer.d.ts +1 -0
- package/dist/client/components/Composer.js +331 -0
- package/dist/client/components/Content.d.ts +8 -0
- package/dist/client/components/Content.js +170 -0
- package/dist/client/components/CountedLabel.d.ts +10 -0
- package/dist/client/components/CountedLabel.js +26 -0
- package/dist/client/components/Crumbs.d.ts +11 -0
- package/dist/client/components/Crumbs.js +142 -0
- package/dist/client/components/DashboardList.css +7 -0
- package/dist/client/components/DashboardList.d.ts +9 -0
- package/dist/client/components/DashboardList.js +46 -0
- package/dist/client/components/DashboardNote.d.ts +21 -0
- package/dist/client/components/DashboardNote.js +22 -0
- package/dist/client/components/DateField.css +6 -0
- package/dist/client/components/DateField.d.ts +7 -0
- package/dist/client/components/DateField.js +27 -0
- package/dist/client/components/DefinedFields.d.ts +50 -0
- package/dist/client/components/DefinedFields.js +186 -0
- package/dist/client/components/DeleteButton.d.ts +30 -0
- package/dist/client/components/DeleteButton.js +198 -0
- package/dist/client/components/Diagram.d.ts +7 -0
- package/dist/client/components/Diagram.js +320 -0
- package/dist/client/components/Dressed.d.ts +31 -0
- package/dist/client/components/Dressed.js +138 -0
- package/dist/client/components/Dropdown.d.ts +14 -0
- package/dist/client/components/Dropdown.js +20 -0
- package/dist/client/components/EditLayoutButton.d.ts +13 -0
- package/dist/client/components/EditLayoutButton.js +7 -0
- package/dist/client/components/Editable.d.ts +47 -0
- package/dist/client/components/Editable.js +422 -0
- package/dist/client/components/ErrorBoundary.d.ts +40 -0
- package/dist/client/components/ErrorBoundary.js +41 -0
- package/dist/client/components/Export.d.ts +15 -0
- package/dist/client/components/Export.js +151 -0
- package/dist/client/components/ExportHold.d.ts +18 -0
- package/dist/client/components/ExportHold.js +30 -0
- package/dist/client/components/FavoriteStar.d.ts +5 -0
- package/dist/client/components/FavoriteStar.js +14 -0
- package/dist/client/components/FieldArranger.d.ts +29 -0
- package/dist/client/components/FieldArranger.js +83 -0
- package/dist/client/components/FilePreview.css +20 -0
- package/dist/client/components/FilePreview.d.ts +26 -0
- package/dist/client/components/FilePreview.js +170 -0
- package/dist/client/components/FilterBoxes.d.ts +76 -0
- package/dist/client/components/FilterBoxes.js +294 -0
- package/dist/client/components/FilterRail.css +100 -0
- package/dist/client/components/FilterRail.d.ts +61 -0
- package/dist/client/components/FilterRail.js +559 -0
- package/dist/client/components/Gallery.d.ts +11 -0
- package/dist/client/components/Gallery.js +53 -0
- package/dist/client/components/Grid.d.ts +122 -0
- package/dist/client/components/Grid.js +1115 -0
- package/dist/client/components/GridCellEditor.d.ts +35 -0
- package/dist/client/components/GridCellEditor.js +291 -0
- package/dist/client/components/GridSelection.d.ts +16 -0
- package/dist/client/components/GridSelection.js +28 -0
- package/dist/client/components/HelpPanel.d.ts +5 -0
- package/dist/client/components/HelpPanel.js +92 -0
- package/dist/client/components/History.d.ts +10 -0
- package/dist/client/components/History.js +22 -0
- package/dist/client/components/Icon.d.ts +31 -0
- package/dist/client/components/Icon.js +20 -0
- package/dist/client/components/JsonPreview.d.ts +5 -0
- package/dist/client/components/JsonPreview.js +25 -0
- package/dist/client/components/JsonValue.d.ts +4 -0
- package/dist/client/components/JsonValue.js +3 -0
- package/dist/client/components/JsonView.css +109 -0
- package/dist/client/components/JsonView.d.ts +3 -0
- package/dist/client/components/JsonView.js +118 -0
- package/dist/client/components/Landing.d.ts +19 -0
- package/dist/client/components/Landing.js +55 -0
- package/dist/client/components/LandingSurface.css +177 -0
- package/dist/client/components/LandingSurface.d.ts +42 -0
- package/dist/client/components/LandingSurface.js +108 -0
- package/dist/client/components/LayoutBuilder.d.ts +36 -0
- package/dist/client/components/LayoutBuilder.js +104 -0
- package/dist/client/components/Lightbox.d.ts +29 -0
- package/dist/client/components/Lightbox.js +62 -0
- package/dist/client/components/ListEmpty.css +13 -0
- package/dist/client/components/ListEmpty.d.ts +10 -0
- package/dist/client/components/ListEmpty.js +8 -0
- package/dist/client/components/ListFilterBar.css +76 -0
- package/dist/client/components/ListFilterBar.d.ts +52 -0
- package/dist/client/components/ListFilterBar.js +304 -0
- package/dist/client/components/LiveNotices.css +105 -0
- package/dist/client/components/LiveNotices.d.ts +26 -0
- package/dist/client/components/LiveNotices.js +211 -0
- package/dist/client/components/MinorMoneyInput.d.ts +26 -0
- package/dist/client/components/MinorMoneyInput.js +50 -0
- package/dist/client/components/Modal.css +3 -0
- package/dist/client/components/MultiStepForm.css +122 -0
- package/dist/client/components/MultiStepForm.d.ts +59 -0
- package/dist/client/components/MultiStepForm.js +216 -0
- package/dist/client/components/NavGlyph.d.ts +14 -0
- package/dist/client/components/NavGlyph.js +27 -0
- package/dist/client/components/Nested.d.ts +21 -0
- package/dist/client/components/Nested.js +86 -0
- package/dist/client/components/NewRecord.d.ts +89 -0
- package/dist/client/components/NewRecord.js +897 -0
- package/dist/client/components/NewRecordButton.d.ts +13 -0
- package/dist/client/components/NewRecordButton.js +28 -0
- package/dist/client/components/Notes.css +39 -0
- package/dist/client/components/Notes.d.ts +59 -0
- package/dist/client/components/Notes.js +96 -0
- package/dist/client/components/OverflowMenu.d.ts +3 -0
- package/dist/client/components/OverflowMenu.js +60 -0
- package/dist/client/components/Page.d.ts +52 -0
- package/dist/client/components/Page.js +237 -0
- package/dist/client/components/PageCurrent.d.ts +38 -0
- package/dist/client/components/PageCurrent.js +27 -0
- package/dist/client/components/PageEmptyRun.d.ts +18 -0
- package/dist/client/components/PageEmptyRun.js +118 -0
- package/dist/client/components/PageFields.d.ts +3 -0
- package/dist/client/components/PageFields.js +294 -0
- package/dist/client/components/PageFlowDiagram.css +193 -0
- package/dist/client/components/PageFlowDiagram.d.ts +95 -0
- package/dist/client/components/PageFlowDiagram.js +276 -0
- package/dist/client/components/PageFlows.css +27 -0
- package/dist/client/components/PageFlows.d.ts +54 -0
- package/dist/client/components/PageFlows.js +92 -0
- package/dist/client/components/PageGroups.d.ts +43 -0
- package/dist/client/components/PageGroups.js +123 -0
- package/dist/client/components/PageHead.d.ts +28 -0
- package/dist/client/components/PageHead.js +279 -0
- package/dist/client/components/PageHeadline.d.ts +23 -0
- package/dist/client/components/PageHeadline.js +101 -0
- package/dist/client/components/PageHistory.d.ts +62 -0
- package/dist/client/components/PageHistory.js +160 -0
- package/dist/client/components/PageLayout.d.ts +22 -0
- package/dist/client/components/PageLayout.js +13 -0
- package/dist/client/components/PageMetrics.d.ts +11 -0
- package/dist/client/components/PageMetrics.js +252 -0
- package/dist/client/components/PageRelated.d.ts +70 -0
- package/dist/client/components/PageRelated.js +667 -0
- package/dist/client/components/PageRoom.d.ts +37 -0
- package/dist/client/components/PageRoom.js +277 -0
- package/dist/client/components/PageSectionBox.d.ts +28 -0
- package/dist/client/components/PageSectionBox.js +65 -0
- package/dist/client/components/PageSections.d.ts +38 -0
- package/dist/client/components/PageSections.js +352 -0
- package/dist/client/components/PageSkeleton.css +17 -0
- package/dist/client/components/PageSkeleton.d.ts +11 -0
- package/dist/client/components/PageSkeleton.js +25 -0
- package/dist/client/components/PageTimeline.d.ts +2 -0
- package/dist/client/components/PageTimeline.js +273 -0
- package/dist/client/components/Palette.d.ts +4 -0
- package/dist/client/components/Palette.js +176 -0
- package/dist/client/components/Peek.d.ts +1 -0
- package/dist/client/components/Peek.js +158 -0
- package/dist/client/components/PeekPanel.d.ts +16 -0
- package/dist/client/components/PeekPanel.js +120 -0
- package/dist/client/components/Picker.d.ts +13 -0
- package/dist/client/components/Picker.js +33 -0
- package/dist/client/components/Prefs.d.ts +3 -0
- package/dist/client/components/Prefs.js +121 -0
- package/dist/client/components/PresentationSwitch.d.ts +13 -0
- package/dist/client/components/PresentationSwitch.js +10 -0
- package/dist/client/components/Prompt.d.ts +35 -0
- package/dist/client/components/Prompt.js +114 -0
- package/dist/client/components/QrCode.css +11 -0
- package/dist/client/components/QrCode.d.ts +4 -0
- package/dist/client/components/QrCode.js +57 -0
- package/dist/client/components/QueueList.css +122 -0
- package/dist/client/components/QuickAdd.css +18 -0
- package/dist/client/components/QuickAdd.d.ts +11 -0
- package/dist/client/components/QuickAdd.js +53 -0
- package/dist/client/components/QuickAddOnDemand.d.ts +4 -0
- package/dist/client/components/QuickAddOnDemand.js +10 -0
- package/dist/client/components/Record.d.ts +36 -0
- package/dist/client/components/Record.js +385 -0
- package/dist/client/components/RecordGone.d.ts +7 -0
- package/dist/client/components/RecordGone.js +22 -0
- package/dist/client/components/RecordPicker.d.ts +59 -0
- package/dist/client/components/RecordPicker.js +299 -0
- package/dist/client/components/RecordSummaries.d.ts +55 -0
- package/dist/client/components/RecordSummaries.js +151 -0
- package/dist/client/components/RecordTags.d.ts +6 -0
- package/dist/client/components/RecordTags.js +119 -0
- package/dist/client/components/RecordTrailNav.d.ts +25 -0
- package/dist/client/components/RecordTrailNav.js +110 -0
- package/dist/client/components/RichText.d.ts +7 -0
- package/dist/client/components/RichText.js +82 -0
- package/dist/client/components/RichTextEditor.css +202 -0
- package/dist/client/components/RichTextEditor.d.ts +33 -0
- package/dist/client/components/RichTextEditor.js +348 -0
- package/dist/client/components/RichTextField.d.ts +26 -0
- package/dist/client/components/RichTextField.js +71 -0
- package/dist/client/components/Rooms.d.ts +35 -0
- package/dist/client/components/Rooms.js +276 -0
- package/dist/client/components/RowActions.d.ts +8 -0
- package/dist/client/components/RowActions.js +49 -0
- package/dist/client/components/RowHost.d.ts +110 -0
- package/dist/client/components/RowHost.js +212 -0
- package/dist/client/components/SavedViews.d.ts +25 -0
- package/dist/client/components/SavedViews.js +35 -0
- package/dist/client/components/SchemaExport.d.ts +15 -0
- package/dist/client/components/SchemaExport.js +42 -0
- package/dist/client/components/SectionPeriod.css +14 -0
- package/dist/client/components/SectionPeriod.d.ts +7 -0
- package/dist/client/components/SectionPeriod.js +14 -0
- package/dist/client/components/SetFieldDialog.d.ts +12 -0
- package/dist/client/components/SetFieldDialog.js +51 -0
- package/dist/client/components/Sidebar.d.ts +34 -0
- package/dist/client/components/Sidebar.js +398 -0
- package/dist/client/components/Skeleton.d.ts +35 -0
- package/dist/client/components/Skeleton.js +49 -0
- package/dist/client/components/SortMenu.d.ts +20 -0
- package/dist/client/components/SortMenu.js +45 -0
- package/dist/client/components/SplitListDetail.css +119 -0
- package/dist/client/components/SuggestBox.d.ts +29 -0
- package/dist/client/components/SuggestBox.js +60 -0
- package/dist/client/components/Summary.d.ts +14 -0
- package/dist/client/components/Summary.js +93 -0
- package/dist/client/components/TableRoom.d.ts +88 -0
- package/dist/client/components/TableRoom.js +246 -0
- package/dist/client/components/TableView.d.ts +111 -0
- package/dist/client/components/TableView.js +324 -0
- package/dist/client/components/ThMenu.d.ts +40 -0
- package/dist/client/components/ThMenu.js +163 -0
- package/dist/client/components/ThemeLab.d.ts +4 -0
- package/dist/client/components/ThemeLab.js +67 -0
- package/dist/client/components/TimelineSides.css +23 -0
- package/dist/client/components/TimelineSides.d.ts +7 -0
- package/dist/client/components/TimelineSides.js +9 -0
- package/dist/client/components/Tour.d.ts +12 -0
- package/dist/client/components/Tour.js +131 -0
- package/dist/client/components/Value.d.ts +38 -0
- package/dist/client/components/Value.js +172 -0
- package/dist/client/components/WorkPanel.d.ts +9 -0
- package/dist/client/components/WorkPanel.js +43 -0
- package/dist/client/components/WorkflowStatus.d.ts +6 -0
- package/dist/client/components/WorkflowStatus.js +44 -0
- package/dist/client/components/WriteConfirm.d.ts +4 -0
- package/dist/client/components/WriteConfirm.js +27 -0
- package/dist/client/components/appColumnMenuModel.d.ts +46 -0
- package/dist/client/components/appColumnMenuModel.js +51 -0
- package/dist/client/components/appListModel.d.ts +179 -0
- package/dist/client/components/appListModel.js +421 -0
- package/dist/client/components/appRooms.d.ts +106 -0
- package/dist/client/components/appRooms.js +133 -0
- package/dist/client/components/autoChart.d.ts +33 -0
- package/dist/client/components/autoChart.js +107 -0
- package/dist/client/components/avatarPhotos.d.ts +45 -0
- package/dist/client/components/avatarPhotos.js +93 -0
- package/dist/client/components/besideDetail.d.ts +1 -0
- package/dist/client/components/besideDetail.js +10 -0
- package/dist/client/components/boardNew.d.ts +2 -0
- package/dist/client/components/boardNew.js +8 -0
- package/dist/client/components/cardsModel.d.ts +11 -0
- package/dist/client/components/cardsModel.js +24 -0
- package/dist/client/components/chromeIcons.d.ts +16 -0
- package/dist/client/components/chromeIcons.js +16 -0
- package/dist/client/components/columnPresentation.d.ts +8 -0
- package/dist/client/components/columnPresentation.js +47 -0
- package/dist/client/components/componentSlot.d.ts +31 -0
- package/dist/client/components/componentSlot.js +76 -0
- package/dist/client/components/composerDraft.d.ts +16 -0
- package/dist/client/components/composerDraft.js +16 -0
- package/dist/client/components/conditionText.d.ts +14 -0
- package/dist/client/components/conditionText.js +45 -0
- package/dist/client/components/conditionWords.d.ts +37 -0
- package/dist/client/components/conditionWords.js +382 -0
- package/dist/client/components/crumbSlot.d.ts +14 -0
- package/dist/client/components/crumbSlot.js +49 -0
- package/dist/client/components/dashboardModel.d.ts +283 -0
- package/dist/client/components/dashboardModel.js +415 -0
- package/dist/client/components/dashboardParts.d.ts +9 -0
- package/dist/client/components/dashboardParts.js +18 -0
- package/dist/client/components/diagramModel.d.ts +83 -0
- package/dist/client/components/diagramModel.js +211 -0
- package/dist/client/components/dueOpen.d.ts +1 -0
- package/dist/client/components/dueOpen.js +23 -0
- package/dist/client/components/editInteraction.d.ts +20 -0
- package/dist/client/components/editInteraction.js +178 -0
- package/dist/client/components/favoriteNav.d.ts +6 -0
- package/dist/client/components/favoriteNav.js +31 -0
- package/dist/client/components/favorites.d.ts +23 -0
- package/dist/client/components/favorites.js +86 -0
- package/dist/client/components/filePreviewModel.d.ts +18 -0
- package/dist/client/components/filePreviewModel.js +21 -0
- package/dist/client/components/filterRailModel.d.ts +93 -0
- package/dist/client/components/filterRailModel.js +302 -0
- package/dist/client/components/formControlsStyle.d.ts +1 -0
- package/dist/client/components/formControlsStyle.js +3 -0
- package/dist/client/components/formDefaults.d.ts +17 -0
- package/dist/client/components/formDefaults.js +128 -0
- package/dist/client/components/gridArrange.d.ts +33 -0
- package/dist/client/components/gridArrange.js +62 -0
- package/dist/client/components/gridCellModel.d.ts +32 -0
- package/dist/client/components/gridCellModel.js +42 -0
- package/dist/client/components/gridSizing.d.ts +89 -0
- package/dist/client/components/gridSizing.js +295 -0
- package/dist/client/components/groupMoves.d.ts +44 -0
- package/dist/client/components/groupMoves.js +295 -0
- package/dist/client/components/groupOrder.d.ts +43 -0
- package/dist/client/components/groupOrder.js +63 -0
- package/dist/client/components/inputRenderers.d.ts +48 -0
- package/dist/client/components/inputRenderers.js +37 -0
- package/dist/client/components/intakeStyle.d.ts +2 -0
- package/dist/client/components/intakeStyle.js +6 -0
- package/dist/client/components/jsonModel.d.ts +98 -0
- package/dist/client/components/jsonModel.js +264 -0
- package/dist/client/components/listColumn.d.ts +20 -0
- package/dist/client/components/listColumn.js +31 -0
- package/dist/client/components/listNavigation.d.ts +16 -0
- package/dist/client/components/listNavigation.js +14 -0
- package/dist/client/components/mentionRows.d.ts +5 -0
- package/dist/client/components/mentionRows.js +62 -0
- package/dist/client/components/mount.d.ts +55 -0
- package/dist/client/components/mount.js +155 -0
- package/dist/client/components/myViews.d.ts +54 -0
- package/dist/client/components/myViews.js +82 -0
- package/dist/client/components/navCounts.d.ts +84 -0
- package/dist/client/components/navCounts.js +194 -0
- package/dist/client/components/navigationTree.d.ts +52 -0
- package/dist/client/components/navigationTree.js +49 -0
- package/dist/client/components/newMenuModel.d.ts +27 -0
- package/dist/client/components/newMenuModel.js +58 -0
- package/dist/client/components/newRecordModel.d.ts +58 -0
- package/dist/client/components/newRecordModel.js +232 -0
- package/dist/client/components/onDemand.d.ts +30 -0
- package/dist/client/components/onDemand.js +121 -0
- package/dist/client/components/optimisticMoves.d.ts +21 -0
- package/dist/client/components/optimisticMoves.js +145 -0
- package/dist/client/components/pageContext.d.ts +154 -0
- package/dist/client/components/pageContext.js +47 -0
- package/dist/client/components/pageFieldsRead.d.ts +67 -0
- package/dist/client/components/pageFieldsRead.js +55 -0
- package/dist/client/components/pageModel.d.ts +203 -0
- package/dist/client/components/pageModel.js +67 -0
- package/dist/client/components/pageStep.d.ts +31 -0
- package/dist/client/components/pageStep.js +15 -0
- package/dist/client/components/paletteModel.d.ts +9 -0
- package/dist/client/components/paletteModel.js +46 -0
- package/dist/client/components/pickerStaleness.d.ts +32 -0
- package/dist/client/components/pickerStaleness.js +27 -0
- package/dist/client/components/placeOrder.d.ts +47 -0
- package/dist/client/components/placeOrder.js +71 -0
- package/dist/client/components/pointerDrag.d.ts +54 -0
- package/dist/client/components/pointerDrag.js +95 -0
- package/dist/client/components/presentationFit.d.ts +19 -0
- package/dist/client/components/presentationFit.js +32 -0
- package/dist/client/components/recordKeys.d.ts +2 -0
- package/dist/client/components/recordKeys.js +8 -0
- package/dist/client/components/recordSearch.d.ts +31 -0
- package/dist/client/components/recordSearch.js +80 -0
- package/dist/client/components/recordSurface.d.ts +86 -0
- package/dist/client/components/recordSurface.js +267 -0
- package/dist/client/components/rowOpens.d.ts +19 -0
- package/dist/client/components/rowOpens.js +25 -0
- package/dist/client/components/sidebarModel.d.ts +152 -0
- package/dist/client/components/sidebarModel.js +372 -0
- package/dist/client/components/suggestModel.d.ts +22 -0
- package/dist/client/components/suggestModel.js +49 -0
- package/dist/client/components/suggestPart.d.ts +4 -0
- package/dist/client/components/suggestPart.js +4 -0
- package/dist/client/components/textMeasure.d.ts +2 -0
- package/dist/client/components/textMeasure.js +35 -0
- package/dist/client/components/unknownIcon.d.ts +8 -0
- package/dist/client/components/unknownIcon.js +32 -0
- package/dist/client/components/useBulkSelection.d.ts +30 -0
- package/dist/client/components/useBulkSelection.js +360 -0
- package/dist/client/components/useConditionWords.d.ts +17 -0
- package/dist/client/components/useConditionWords.js +104 -0
- package/dist/client/components/useGridKeyboard.d.ts +32 -0
- package/dist/client/components/useGridKeyboard.js +223 -0
- package/dist/client/components/useListOrder.d.ts +94 -0
- package/dist/client/components/useListOrder.js +294 -0
- package/dist/client/components/useMediaQuery.d.ts +10 -0
- package/dist/client/components/useMediaQuery.js +45 -0
- package/dist/client/components/useMessageLanguage.d.ts +1 -0
- package/dist/client/components/useMessageLanguage.js +6 -0
- package/dist/client/components/usePins.d.ts +20 -0
- package/dist/client/components/usePins.js +66 -0
- package/dist/client/components/usePointerDrag.d.ts +72 -0
- package/dist/client/components/usePointerDrag.js +553 -0
- package/dist/client/components/useRecordInsert.d.ts +42 -0
- package/dist/client/components/useRecordInsert.js +145 -0
- package/dist/client/components/useRowWindow.d.ts +35 -0
- package/dist/client/components/useRowWindow.js +149 -0
- package/dist/client/components/useStickyHead.d.ts +17 -0
- package/dist/client/components/useStickyHead.js +65 -0
- package/dist/client/components/useTabFold.d.ts +32 -0
- package/dist/client/components/useTabFold.js +145 -0
- package/dist/client/components/valueModel.d.ts +300 -0
- package/dist/client/components/valueModel.js +560 -0
- package/dist/client/components/valueRenderers.d.ts +36 -0
- package/dist/client/components/valueRenderers.js +13 -0
- package/dist/client/components/viewLink.d.ts +27 -0
- package/dist/client/components/viewLink.js +79 -0
- package/dist/client/components/walk.d.ts +14 -0
- package/dist/client/components/walk.js +16 -0
- package/dist/client/compose.d.ts +8 -0
- package/dist/client/compose.js +163 -0
- package/dist/client/composedHook.d.ts +20 -0
- package/dist/client/composedHook.js +12 -0
- package/dist/client/composedReads.d.ts +26 -0
- package/dist/client/composedReads.js +183 -0
- package/dist/client/composer.css +499 -0
- package/dist/client/composer.d.ts +121 -0
- package/dist/client/composer.js +1079 -0
- package/dist/client/composerEntry.d.ts +1 -0
- package/dist/client/composerEntry.js +58 -0
- package/dist/client/composerTab.d.ts +6 -0
- package/dist/client/composerTab.js +20 -0
- package/dist/client/conditions.d.ts +46 -0
- package/dist/client/conditions.js +150 -0
- package/dist/client/connectionList.d.ts +14 -0
- package/dist/client/connectionList.js +149 -0
- package/dist/client/connectionScope.d.ts +6 -0
- package/dist/client/connectionScope.js +14 -0
- package/dist/client/connectionTransition.d.ts +12 -0
- package/dist/client/connectionTransition.js +41 -0
- package/dist/client/copy/columnMenu/components/AppColumnMenu.d.ts +4 -0
- package/dist/client/copy/columnMenu/components/AppColumnMenu.js +6 -0
- package/dist/client/copy/columnMenu/components/AppColumnMenuPopups.d.ts +4 -0
- package/dist/client/copy/columnMenu/components/AppColumnMenuPopups.js +6 -0
- package/dist/client/copy/columnMenu/components/ThMenu.d.ts +35 -0
- package/dist/client/copy/columnMenu/components/ThMenu.js +37 -0
- package/dist/client/copy/columnMenu/components/appColumnMenuModel.d.ts +10 -0
- package/dist/client/copy/columnMenu/components/appColumnMenuModel.js +12 -0
- package/dist/client/copy/dashboards/breakdownBatch.d.ts +3 -0
- package/dist/client/copy/dashboards/breakdownBatch.js +5 -0
- package/dist/client/copy/dashboards/components/Breakdown.d.ts +32 -0
- package/dist/client/copy/dashboards/components/Breakdown.js +25 -0
- package/dist/client/copy/dashboards/components/BreakdownRoom.d.ts +3 -0
- package/dist/client/copy/dashboards/components/BreakdownRoom.js +5 -0
- package/dist/client/copy/dashboards/components/Chart.d.ts +26 -0
- package/dist/client/copy/dashboards/components/Chart.js +19 -0
- package/dist/client/copy/dashboards/components/ChartShapes.d.ts +16 -0
- package/dist/client/copy/dashboards/components/ChartShapes.js +12 -0
- package/dist/client/copy/dashboards/components/PageMetrics.d.ts +21 -0
- package/dist/client/copy/dashboards/components/PageMetrics.js +20 -0
- package/dist/client/copy/dashboards/components/SectionPeriod.d.ts +4 -0
- package/dist/client/copy/dashboards/components/SectionPeriod.js +6 -0
- package/dist/client/copy/dashboards/components/dashboardModel.d.ts +3 -0
- package/dist/client/copy/dashboards/components/dashboardModel.js +5 -0
- package/dist/client/copy/es.d.ts +11 -0
- package/dist/client/copy/es.js +60 -0
- package/dist/client/copy/filters/components/FilterBoxes.d.ts +10 -0
- package/dist/client/copy/filters/components/FilterBoxes.js +12 -0
- package/dist/client/copy/filters/components/FilterRail.d.ts +16 -0
- package/dist/client/copy/filters/components/FilterRail.js +18 -0
- package/dist/client/copy/filters/components/ListFilterBar.d.ts +9 -0
- package/dist/client/copy/filters/components/ListFilterBar.js +11 -0
- package/dist/client/copy/filters/components/conditionWords.d.ts +46 -0
- package/dist/client/copy/filters/components/conditionWords.js +95 -0
- package/dist/client/copy/filters/components/filterRailModel.d.ts +12 -0
- package/dist/client/copy/filters/components/filterRailModel.js +14 -0
- package/dist/client/copy/forms/components/DateField.d.ts +13 -0
- package/dist/client/copy/forms/components/DateField.js +15 -0
- package/dist/client/copy/forms/components/MinorMoneyInput.d.ts +4 -0
- package/dist/client/copy/forms/components/MinorMoneyInput.js +6 -0
- package/dist/client/copy/forms/components/MultiStepForm.d.ts +10 -0
- package/dist/client/copy/forms/components/MultiStepForm.js +12 -0
- package/dist/client/copy/forms/components/NewRecord.d.ts +29 -0
- package/dist/client/copy/forms/components/NewRecord.js +31 -0
- package/dist/client/copy/forms/components/NewRecordButton.d.ts +6 -0
- package/dist/client/copy/forms/components/NewRecordButton.js +8 -0
- package/dist/client/copy/forms/components/Picker.d.ts +4 -0
- package/dist/client/copy/forms/components/Picker.js +6 -0
- package/dist/client/copy/forms/components/QuickAdd.d.ts +3 -0
- package/dist/client/copy/forms/components/QuickAdd.js +5 -0
- package/dist/client/copy/forms/components/RecordPicker.d.ts +6 -0
- package/dist/client/copy/forms/components/RecordPicker.js +8 -0
- package/dist/client/copy/forms/components/RichTextEditor.d.ts +36 -0
- package/dist/client/copy/forms/components/RichTextEditor.js +40 -0
- package/dist/client/copy/forms/components/RichTextField.d.ts +3 -0
- package/dist/client/copy/forms/components/RichTextField.js +5 -0
- package/dist/client/copy/forms/components/SetFieldDialog.d.ts +10 -0
- package/dist/client/copy/forms/components/SetFieldDialog.js +9 -0
- package/dist/client/copy/forms/components/useRecordInsert.d.ts +7 -0
- package/dist/client/copy/forms/components/useRecordInsert.js +9 -0
- package/dist/client/copy/help/helpContent.d.ts +71 -0
- package/dist/client/copy/help/helpContent.js +73 -0
- package/dist/client/copy/lists/bulkActions.d.ts +12 -0
- package/dist/client/copy/lists/bulkActions.js +14 -0
- package/dist/client/copy/lists/components/AppList.d.ts +28 -0
- package/dist/client/copy/lists/components/AppList.js +30 -0
- package/dist/client/copy/lists/components/CardsList.d.ts +3 -0
- package/dist/client/copy/lists/components/CardsList.js +5 -0
- package/dist/client/copy/lists/components/Gallery.d.ts +7 -0
- package/dist/client/copy/lists/components/Gallery.js +9 -0
- package/dist/client/copy/lists/components/Grid.d.ts +30 -0
- package/dist/client/copy/lists/components/Grid.js +29 -0
- package/dist/client/copy/lists/components/GridCellEditor.d.ts +5 -0
- package/dist/client/copy/lists/components/GridCellEditor.js +7 -0
- package/dist/client/copy/lists/components/GridSelection.d.ts +4 -0
- package/dist/client/copy/lists/components/GridSelection.js +6 -0
- package/dist/client/copy/lists/components/Nested.d.ts +7 -0
- package/dist/client/copy/lists/components/Nested.js +9 -0
- package/dist/client/copy/lists/components/RowActions.d.ts +1 -0
- package/dist/client/copy/lists/components/RowActions.js +3 -0
- package/dist/client/copy/lists/components/SavedViews.d.ts +5 -0
- package/dist/client/copy/lists/components/SavedViews.js +7 -0
- package/dist/client/copy/lists/components/SortMenu.d.ts +5 -0
- package/dist/client/copy/lists/components/SortMenu.js +7 -0
- package/dist/client/copy/lists/components/TableRoom.d.ts +12 -0
- package/dist/client/copy/lists/components/TableRoom.js +14 -0
- package/dist/client/copy/lists/components/TableView.d.ts +37 -0
- package/dist/client/copy/lists/components/TableView.js +39 -0
- package/dist/client/copy/lists/components/appListModel.d.ts +6 -0
- package/dist/client/copy/lists/components/appListModel.js +5 -0
- package/dist/client/copy/lists/components/myViews.d.ts +4 -0
- package/dist/client/copy/lists/components/myViews.js +6 -0
- package/dist/client/copy/lists/components/placeOrder.d.ts +4 -0
- package/dist/client/copy/lists/components/placeOrder.js +6 -0
- package/dist/client/copy/lists/components/useBulkSelection.d.ts +20 -0
- package/dist/client/copy/lists/components/useBulkSelection.js +16 -0
- package/dist/client/copy/lists/components/useListOrder.d.ts +7 -0
- package/dist/client/copy/lists/components/useListOrder.js +9 -0
- package/dist/client/copy/public/components/appRooms.d.ts +3 -0
- package/dist/client/copy/public/components/appRooms.js +5 -0
- package/dist/client/copy/record/components/Actions.d.ts +13 -0
- package/dist/client/copy/record/components/Actions.js +15 -0
- package/dist/client/copy/record/components/AttachmentList.d.ts +23 -0
- package/dist/client/copy/record/components/AttachmentList.js +22 -0
- package/dist/client/copy/record/components/DeleteButton.d.ts +22 -0
- package/dist/client/copy/record/components/DeleteButton.js +24 -0
- package/dist/client/copy/record/components/Dressed.d.ts +5 -0
- package/dist/client/copy/record/components/Dressed.js +7 -0
- package/dist/client/copy/record/components/EditLayoutButton.d.ts +5 -0
- package/dist/client/copy/record/components/EditLayoutButton.js +7 -0
- package/dist/client/copy/record/components/Editable.d.ts +25 -0
- package/dist/client/copy/record/components/Editable.js +24 -0
- package/dist/client/copy/record/components/FieldArranger.d.ts +15 -0
- package/dist/client/copy/record/components/FieldArranger.js +17 -0
- package/dist/client/copy/record/components/FilePreview.d.ts +13 -0
- package/dist/client/copy/record/components/FilePreview.js +15 -0
- package/dist/client/copy/record/components/JsonPreview.d.ts +3 -0
- package/dist/client/copy/record/components/JsonPreview.js +5 -0
- package/dist/client/copy/record/components/JsonView.d.ts +12 -0
- package/dist/client/copy/record/components/JsonView.js +14 -0
- package/dist/client/copy/record/components/LayoutBuilder.d.ts +23 -0
- package/dist/client/copy/record/components/LayoutBuilder.js +25 -0
- package/dist/client/copy/record/components/Lightbox.d.ts +5 -0
- package/dist/client/copy/record/components/Lightbox.js +7 -0
- package/dist/client/copy/record/components/LiveNotices.d.ts +33 -0
- package/dist/client/copy/record/components/LiveNotices.js +29 -0
- package/dist/client/copy/record/components/PageCurrent.d.ts +1 -0
- package/dist/client/copy/record/components/PageCurrent.js +3 -0
- package/dist/client/copy/record/components/PageEmptyRun.d.ts +3 -0
- package/dist/client/copy/record/components/PageEmptyRun.js +5 -0
- package/dist/client/copy/record/components/PageFields.d.ts +5 -0
- package/dist/client/copy/record/components/PageFields.js +7 -0
- package/dist/client/copy/record/components/PageFlowDiagram.d.ts +33 -0
- package/dist/client/copy/record/components/PageFlowDiagram.js +37 -0
- package/dist/client/copy/record/components/PageFlows.d.ts +20 -0
- package/dist/client/copy/record/components/PageFlows.js +22 -0
- package/dist/client/copy/record/components/PageGroups.d.ts +12 -0
- package/dist/client/copy/record/components/PageGroups.js +14 -0
- package/dist/client/copy/record/components/PageHead.d.ts +8 -0
- package/dist/client/copy/record/components/PageHead.js +10 -0
- package/dist/client/copy/record/components/PageHistory.d.ts +18 -0
- package/dist/client/copy/record/components/PageHistory.js +20 -0
- package/dist/client/copy/record/components/PageLayout.d.ts +5 -0
- package/dist/client/copy/record/components/PageLayout.js +7 -0
- package/dist/client/copy/record/components/PageRelated.d.ts +24 -0
- package/dist/client/copy/record/components/PageRelated.js +26 -0
- package/dist/client/copy/record/components/PageRoom.d.ts +4 -0
- package/dist/client/copy/record/components/PageRoom.js +6 -0
- package/dist/client/copy/record/components/PageSectionBox.d.ts +6 -0
- package/dist/client/copy/record/components/PageSectionBox.js +10 -0
- package/dist/client/copy/record/components/PageTimeline.d.ts +9 -0
- package/dist/client/copy/record/components/PageTimeline.js +8 -0
- package/dist/client/copy/record/components/Peek.d.ts +3 -0
- package/dist/client/copy/record/components/Peek.js +5 -0
- package/dist/client/copy/record/components/PeekPanel.d.ts +5 -0
- package/dist/client/copy/record/components/PeekPanel.js +7 -0
- package/dist/client/copy/record/components/QrCode.d.ts +3 -0
- package/dist/client/copy/record/components/QrCode.js +5 -0
- package/dist/client/copy/record/components/Record.d.ts +19 -0
- package/dist/client/copy/record/components/Record.js +21 -0
- package/dist/client/copy/record/components/RecordGone.d.ts +4 -0
- package/dist/client/copy/record/components/RecordGone.js +6 -0
- package/dist/client/copy/record/components/RecordSummaries.d.ts +1 -0
- package/dist/client/copy/record/components/RecordSummaries.js +3 -0
- package/dist/client/copy/record/components/RecordTags.d.ts +9 -0
- package/dist/client/copy/record/components/RecordTags.js +11 -0
- package/dist/client/copy/record/components/RecordTrailNav.d.ts +8 -0
- package/dist/client/copy/record/components/RecordTrailNav.js +10 -0
- package/dist/client/copy/record/components/RichText.d.ts +4 -0
- package/dist/client/copy/record/components/RichText.js +6 -0
- package/dist/client/copy/record/components/Value.d.ts +4 -0
- package/dist/client/copy/record/components/Value.js +6 -0
- package/dist/client/copy/record/components/WorkflowStatus.d.ts +7 -0
- package/dist/client/copy/record/components/WorkflowStatus.js +9 -0
- package/dist/client/copy/record/components/WriteConfirm.d.ts +11 -0
- package/dist/client/copy/record/components/WriteConfirm.js +13 -0
- package/dist/client/copy/record/components/groupMoves.d.ts +7 -0
- package/dist/client/copy/record/components/groupMoves.js +9 -0
- package/dist/client/copy/record/components/jsonModel.d.ts +3 -0
- package/dist/client/copy/record/components/jsonModel.js +5 -0
- package/dist/client/copy/record/components/pageModel.d.ts +5 -0
- package/dist/client/copy/record/components/pageModel.js +7 -0
- package/dist/client/copy/record/components/recordSurface.d.ts +6 -0
- package/dist/client/copy/record/components/recordSurface.js +8 -0
- package/dist/client/copy/record/components/valueModel.d.ts +5 -0
- package/dist/client/copy/record/components/valueModel.js +7 -0
- package/dist/client/copy/record/fileSource.d.ts +3 -0
- package/dist/client/copy/record/fileSource.js +5 -0
- package/dist/client/copy/record/insert.d.ts +6 -0
- package/dist/client/copy/record/insert.js +8 -0
- package/dist/client/copy/record/page.d.ts +4 -0
- package/dist/client/copy/record/page.js +6 -0
- package/dist/client/copy/record/recordEditValidation.d.ts +4 -0
- package/dist/client/copy/record/recordEditValidation.js +6 -0
- package/dist/client/copy/record/savedPages.d.ts +4 -0
- package/dist/client/copy/record/savedPages.js +6 -0
- package/dist/client/copy/record/template.d.ts +9 -0
- package/dist/client/copy/record/template.js +11 -0
- package/dist/client/copy/record/write.d.ts +30 -0
- package/dist/client/copy/record/write.js +26 -0
- package/dist/client/copy/shell/app.d.ts +27 -0
- package/dist/client/copy/shell/app.js +43 -0
- package/dist/client/copy/shell/components/AppIssues.d.ts +10 -0
- package/dist/client/copy/shell/components/AppIssues.js +9 -0
- package/dist/client/copy/shell/components/Crumbs.d.ts +7 -0
- package/dist/client/copy/shell/components/Crumbs.js +17 -0
- package/dist/client/copy/shell/components/Dropdown.d.ts +3 -0
- package/dist/client/copy/shell/components/Dropdown.js +5 -0
- package/dist/client/copy/shell/components/ErrorBoundary.d.ts +4 -0
- package/dist/client/copy/shell/components/ErrorBoundary.js +6 -0
- package/dist/client/copy/shell/components/FavoriteStar.d.ts +4 -0
- package/dist/client/copy/shell/components/FavoriteStar.js +6 -0
- package/dist/client/copy/shell/components/MobileNavDrawer.d.ts +4 -0
- package/dist/client/copy/shell/components/MobileNavDrawer.js +12 -0
- package/dist/client/copy/shell/components/OverflowMenu.d.ts +3 -0
- package/dist/client/copy/shell/components/OverflowMenu.js +10 -0
- package/dist/client/copy/shell/components/Palette.d.ts +15 -0
- package/dist/client/copy/shell/components/Palette.js +18 -0
- package/dist/client/copy/shell/components/Prefs.d.ts +4 -0
- package/dist/client/copy/shell/components/Prefs.js +11 -0
- package/dist/client/copy/shell/components/Prompt.d.ts +1 -0
- package/dist/client/copy/shell/components/Prompt.js +3 -0
- package/dist/client/copy/shell/components/Rooms.d.ts +6 -0
- package/dist/client/copy/shell/components/Rooms.js +8 -0
- package/dist/client/copy/shell/components/Sidebar.d.ts +7 -0
- package/dist/client/copy/shell/components/Sidebar.js +9 -0
- package/dist/client/copy/shell/components/Skeleton.d.ts +5 -0
- package/dist/client/copy/shell/components/Skeleton.js +7 -0
- package/dist/client/copy/shell/components/TopNav.d.ts +4 -0
- package/dist/client/copy/shell/components/TopNav.js +12 -0
- package/dist/client/copy/shell/components/Tour.d.ts +4 -0
- package/dist/client/copy/shell/components/Tour.js +6 -0
- package/dist/client/copy/shell/components/newMenuModel.d.ts +3 -0
- package/dist/client/copy/shell/components/newMenuModel.js +5 -0
- package/dist/client/copy/shell/components/onDemand.d.ts +3 -0
- package/dist/client/copy/shell/components/onDemand.js +5 -0
- package/dist/client/copy/shell/components/sidebarModel.d.ts +3 -0
- package/dist/client/copy/shell/components/sidebarModel.js +5 -0
- package/dist/client/copy/shell/connectionList.d.ts +6 -0
- package/dist/client/copy/shell/connectionList.js +8 -0
- package/dist/client/copy/shell/core.d.ts +16 -0
- package/dist/client/copy/shell/core.js +18 -0
- package/dist/client/copy/shell/palette.d.ts +6 -0
- package/dist/client/copy/shell/palette.js +8 -0
- package/dist/client/copy/shell/prompt.d.ts +1 -0
- package/dist/client/copy/shell/prompt.js +3 -0
- package/dist/client/copy/shell/requestIdentity.d.ts +9 -0
- package/dist/client/copy/shell/requestIdentity.js +11 -0
- package/dist/client/copy/shell/resourceRequests.d.ts +4 -0
- package/dist/client/copy/shell/resourceRequests.js +6 -0
- package/dist/client/copy/shell/sessionIdentity.d.ts +11 -0
- package/dist/client/copy/shell/sessionIdentity.js +13 -0
- package/dist/client/copy/shell/sessionLifecycle.d.ts +5 -0
- package/dist/client/copy/shell/sessionLifecycle.js +7 -0
- package/dist/client/copy/shell/startup.d.ts +5 -0
- package/dist/client/copy/shell/startup.js +7 -0
- package/dist/client/copy/shell/theme.d.ts +5 -0
- package/dist/client/copy/shell/theme.js +14 -0
- package/dist/client/copy/shell/toast.d.ts +3 -0
- package/dist/client/copy/shell/toast.js +5 -0
- package/dist/client/copy/shell/updateAttempts.d.ts +6 -0
- package/dist/client/copy/shell/updateAttempts.js +8 -0
- package/dist/client/copy/shell/visualTheme.d.ts +4 -0
- package/dist/client/copy/shell/visualTheme.js +6 -0
- package/dist/client/copy/workbench/clauses.d.ts +3 -0
- package/dist/client/copy/workbench/clauses.js +5 -0
- package/dist/client/copy/workbench/components/ApiOperations.d.ts +21 -0
- package/dist/client/copy/workbench/components/ApiOperations.js +23 -0
- package/dist/client/copy/workbench/components/Composer.d.ts +105 -0
- package/dist/client/copy/workbench/components/Composer.js +92 -0
- package/dist/client/copy/workbench/components/Diagram.d.ts +56 -0
- package/dist/client/copy/workbench/components/Diagram.js +46 -0
- package/dist/client/copy/workbench/components/Export.d.ts +26 -0
- package/dist/client/copy/workbench/components/Export.js +25 -0
- package/dist/client/copy/workbench/components/HelpPanel.d.ts +10 -0
- package/dist/client/copy/workbench/components/HelpPanel.js +12 -0
- package/dist/client/copy/workbench/components/History.d.ts +11 -0
- package/dist/client/copy/workbench/components/History.js +10 -0
- package/dist/client/copy/workbench/components/Landing.d.ts +5 -0
- package/dist/client/copy/workbench/components/Landing.js +7 -0
- package/dist/client/copy/workbench/components/SchemaExport.d.ts +24 -0
- package/dist/client/copy/workbench/components/SchemaExport.js +20 -0
- package/dist/client/copy/workbench/components/Summary.d.ts +28 -0
- package/dist/client/copy/workbench/components/Summary.js +24 -0
- package/dist/client/copy/workbench/components/ThemeLab.d.ts +25 -0
- package/dist/client/copy/workbench/components/ThemeLab.js +27 -0
- package/dist/client/copy/workbench/components/WorkPanel.d.ts +12 -0
- package/dist/client/copy/workbench/components/WorkPanel.js +14 -0
- package/dist/client/copy/workbench/composer.d.ts +36 -0
- package/dist/client/copy/workbench/composer.js +32 -0
- package/dist/client/copy/workbench/composerEntry.d.ts +4 -0
- package/dist/client/copy/workbench/composerEntry.js +6 -0
- package/dist/client/copy/workbench/export.d.ts +8 -0
- package/dist/client/copy/workbench/export.js +7 -0
- package/dist/client/copy/workbench/filterbar.d.ts +6 -0
- package/dist/client/copy/workbench/filterbar.js +8 -0
- package/dist/client/copy/workbench/handoff.d.ts +20 -0
- package/dist/client/copy/workbench/handoff.js +19 -0
- package/dist/client/copy/workbench/help.d.ts +6 -0
- package/dist/client/copy/workbench/help.js +8 -0
- package/dist/client/copy/workbench/history.d.ts +3 -0
- package/dist/client/copy/workbench/history.js +5 -0
- package/dist/client/copy/workbench/schemaexport.d.ts +5 -0
- package/dist/client/copy/workbench/schemaexport.js +7 -0
- package/dist/client/copy/workbench/tour.d.ts +22 -0
- package/dist/client/copy/workbench/tour.js +24 -0
- package/dist/client/copy/workbench/views.d.ts +6 -0
- package/dist/client/copy/workbench/views.js +8 -0
- package/dist/client/core.d.ts +327 -0
- package/dist/client/core.js +1082 -0
- package/dist/client/customThemes.css +43 -0
- package/dist/client/dashboard.d.ts +16 -0
- package/dist/client/dashboard.js +35 -0
- package/dist/client/deeplink.d.ts +64 -0
- package/dist/client/deeplink.js +384 -0
- package/dist/client/delete.d.ts +8 -0
- package/dist/client/delete.js +35 -0
- package/dist/client/density.d.ts +8 -0
- package/dist/client/density.js +102 -0
- package/dist/client/devtoolsEventClient.d.ts +27 -0
- package/dist/client/devtoolsEventClient.js +32 -0
- package/dist/client/documents.d.ts +9 -0
- package/dist/client/documents.js +23 -0
- package/dist/client/dom.d.ts +36 -0
- package/dist/client/dom.js +232 -0
- package/dist/client/draftRecovery.d.ts +19 -0
- package/dist/client/draftRecovery.js +56 -0
- package/dist/client/export.d.ts +59 -0
- package/dist/client/export.js +217 -0
- package/dist/client/features.css +2187 -0
- package/dist/client/fieldErrors.d.ts +27 -0
- package/dist/client/fieldErrors.js +20 -0
- package/dist/client/fileSource.d.ts +10 -0
- package/dist/client/fileSource.js +115 -0
- package/dist/client/filterbar.d.ts +87 -0
- package/dist/client/filterbar.js +168 -0
- package/dist/client/firstPaint.d.ts +26 -0
- package/dist/client/firstPaint.js +102 -0
- package/dist/client/fonts/Barlow-OFL.txt +125 -0
- package/dist/client/fonts/IBMPlexMono-OFL.txt +104 -0
- package/dist/client/fonts/Inter-OFL.txt +92 -0
- package/dist/client/fonts/barlow-400.woff2 +0 -0
- package/dist/client/fonts/barlow-600.woff2 +0 -0
- package/dist/client/fonts/barlow-semi-condensed-700.woff2 +0 -0
- package/dist/client/fonts/ibm-plex-mono-400.woff2 +0 -0
- package/dist/client/fonts/ibm-plex-mono-500.woff2 +0 -0
- package/dist/client/fonts/inter-latin.woff2 +0 -0
- package/dist/client/formControls.css +5 -0
- package/dist/client/handoff.d.ts +47 -0
- package/dist/client/handoff.js +138 -0
- package/dist/client/help.css +151 -0
- package/dist/client/help.d.ts +20 -0
- package/dist/client/help.js +103 -0
- package/dist/client/helpContent.d.ts +95 -0
- package/dist/client/helpContent.js +661 -0
- package/dist/client/history.d.ts +10 -0
- package/dist/client/history.js +181 -0
- package/dist/client/historyToken.d.ts +18 -0
- package/dist/client/historyToken.js +27 -0
- package/dist/client/iconWeight.d.ts +16 -0
- package/dist/client/iconWeight.js +44 -0
- package/dist/client/index.html +244 -0
- package/dist/client/insert.d.ts +50 -0
- package/dist/client/insert.js +269 -0
- package/dist/client/kit.d.ts +7 -0
- package/dist/client/kit.js +1 -0
- package/dist/client/layoutDraftRecovery.d.ts +8 -0
- package/dist/client/layoutDraftRecovery.js +33 -0
- package/dist/client/ledgerLook.css +32 -0
- package/dist/client/liveReads.d.ts +23 -0
- package/dist/client/liveReads.js +38 -0
- package/dist/client/liveState.d.ts +94 -0
- package/dist/client/liveState.js +212 -0
- package/dist/client/locale.d.ts +141 -0
- package/dist/client/locale.js +0 -0
- package/dist/client/lumenLook.css +1867 -0
- package/dist/client/menu.d.ts +49 -0
- package/dist/client/menu.js +131 -0
- package/dist/client/menuScope.d.ts +6 -0
- package/dist/client/menuScope.js +4 -0
- package/dist/client/messages.d.ts +240 -0
- package/dist/client/messages.js +370 -0
- package/dist/client/motionStill.d.ts +1 -0
- package/dist/client/motionStill.js +17 -0
- package/dist/client/navigationHold.d.ts +37 -0
- package/dist/client/navigationHold.js +503 -0
- package/dist/client/nested.d.ts +8 -0
- package/dist/client/nested.js +26 -0
- package/dist/client/ownWrites.d.ts +33 -0
- package/dist/client/ownWrites.js +76 -0
- package/dist/client/page.css +4052 -0
- package/dist/client/page.d.ts +21 -0
- package/dist/client/page.js +187 -0
- package/dist/client/pagemarks.d.ts +32 -0
- package/dist/client/pagemarks.js +98 -0
- package/dist/client/palette.d.ts +38 -0
- package/dist/client/palette.js +360 -0
- package/dist/client/partsLook.css +1047 -0
- package/dist/client/peek.d.ts +11 -0
- package/dist/client/peek.js +51 -0
- package/dist/client/peekpanel.d.ts +26 -0
- package/dist/client/peekpanel.js +121 -0
- package/dist/client/pendingWork.d.ts +19 -0
- package/dist/client/pendingWork.js +36 -0
- package/dist/client/pins.d.ts +24 -0
- package/dist/client/pins.js +97 -0
- package/dist/client/prefs.d.ts +3 -0
- package/dist/client/prefs.js +32 -0
- package/dist/client/prompt.d.ts +27 -0
- package/dist/client/prompt.js +61 -0
- package/dist/client/readGathering.d.ts +4 -0
- package/dist/client/readGathering.js +23 -0
- package/dist/client/recordCompose.d.ts +11 -0
- package/dist/client/recordCompose.js +69 -0
- package/dist/client/recordDrafts.d.ts +40 -0
- package/dist/client/recordDrafts.js +57 -0
- package/dist/client/recordEditValidation.d.ts +12 -0
- package/dist/client/recordEditValidation.js +52 -0
- package/dist/client/recordIntent.d.ts +6 -0
- package/dist/client/recordIntent.js +15 -0
- package/dist/client/recordPress.d.ts +12 -0
- package/dist/client/recordPress.js +84 -0
- package/dist/client/recordSource.d.ts +6 -0
- package/dist/client/recordSource.js +15 -0
- package/dist/client/recordTrail.d.ts +77 -0
- package/dist/client/recordTrail.js +101 -0
- package/dist/client/recordWriteRefresh.d.ts +74 -0
- package/dist/client/recordWriteRefresh.js +284 -0
- package/dist/client/relatedRows.d.ts +4 -0
- package/dist/client/relatedRows.js +24 -0
- package/dist/client/requestIdentity.d.ts +36 -0
- package/dist/client/requestIdentity.js +97 -0
- package/dist/client/resourceRequests.d.ts +7 -0
- package/dist/client/resourceRequests.js +32 -0
- package/dist/client/roleLabels.d.ts +7 -0
- package/dist/client/roleLabels.js +24 -0
- package/dist/client/rowEditing.d.ts +15 -0
- package/dist/client/rowEditing.js +36 -0
- package/dist/client/sageLook.css +242 -0
- package/dist/client/savedPages.d.ts +27 -0
- package/dist/client/savedPages.js +135 -0
- package/dist/client/schemaexport.d.ts +14 -0
- package/dist/client/schemaexport.js +182 -0
- package/dist/client/sessionIdentity.d.ts +39 -0
- package/dist/client/sessionIdentity.js +255 -0
- package/dist/client/sessionLifecycle.d.ts +33 -0
- package/dist/client/sessionLifecycle.js +276 -0
- package/dist/client/shellHost.d.ts +70 -0
- package/dist/client/shellHost.js +92 -0
- package/dist/client/shellMain.d.ts +8 -0
- package/dist/client/shellMode.d.ts +433 -0
- package/dist/client/shellMode.js +68 -0
- package/dist/client/shellStart.d.ts +5 -0
- package/dist/client/shellStart.js +54 -0
- package/dist/client/shells.d.ts +123 -0
- package/dist/client/shells.js +1 -0
- package/dist/client/sql.css +139 -0
- package/dist/client/startup.d.ts +8 -0
- package/dist/client/startup.js +85 -0
- package/dist/client/startupHold.d.ts +10 -0
- package/dist/client/startupHold.js +73 -0
- package/dist/client/structure.css +1296 -0
- package/dist/client/style.css +3526 -0
- package/dist/client/styleImports.d.ts +3 -0
- package/dist/client/surfaces.d.ts +18 -0
- package/dist/client/surfaces.js +27 -0
- package/dist/client/surfacesLook.css +88 -0
- package/dist/client/template.d.ts +75 -0
- package/dist/client/template.js +403 -0
- package/dist/client/theme.d.ts +14 -0
- package/dist/client/theme.js +112 -0
- package/dist/client/themeFamilies.css +788 -0
- package/dist/client/thmenu.d.ts +12 -0
- package/dist/client/thmenu.js +94 -0
- package/dist/client/toast.d.ts +7 -0
- package/dist/client/toast.js +117 -0
- package/dist/client/tour.d.ts +8 -0
- package/dist/client/tour.js +176 -0
- package/dist/client/transport.d.ts +2 -0
- package/dist/client/transport.js +13 -0
- package/dist/client/typography.d.ts +4 -0
- package/dist/client/typography.js +51 -0
- package/dist/client/uiBridge.d.ts +57 -0
- package/dist/client/uiBridge.js +30 -0
- package/dist/client/updateAttempts.d.ts +46 -0
- package/dist/client/updateAttempts.js +131 -0
- package/dist/client/url.d.ts +74 -0
- package/dist/client/url.js +388 -0
- package/dist/client/views.d.ts +19 -0
- package/dist/client/views.js +133 -0
- package/dist/client/visualTheme.d.ts +62 -0
- package/dist/client/visualTheme.js +502 -0
- package/dist/client/visualThemes.css +421 -0
- package/dist/client/workshopLook.css +126 -0
- package/dist/client/write.d.ts +103 -0
- package/dist/client/write.js +885 -0
- package/dist/client/writePaths.d.ts +16 -0
- package/dist/client/writePaths.js +35 -0
- package/dist/client/yesNoRule.d.ts +12 -0
- package/dist/client/yesNoRule.js +39 -0
- package/dist/clientFiles.d.ts +11 -4
- package/dist/clientFiles.js +16 -12
- package/dist/vite.d.ts +136 -0
- package/dist/vite.js +571 -0
- package/package.json +136 -3
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* A page's timeline section: the record's activity as one stream, its
|
|
4
|
+
* streams read together and merged newest-first, and, where the App lets
|
|
5
|
+
* this record add to its first stream, the composer that does it through
|
|
6
|
+
* the same related-create plan and form a related list uses.
|
|
7
|
+
*/
|
|
8
|
+
import { useContext, useId, useLayoutEffect, useRef, useState } from 'react';
|
|
9
|
+
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
|
10
|
+
import { findTable, labelPath, state } from '../core.js';
|
|
11
|
+
import { shell } from '../shellMode.js';
|
|
12
|
+
import { resourceOf } from './appRooms.js';
|
|
13
|
+
import { headingOf, recordNoun } from '@mistriwork/engine/shared/appNoun.js';
|
|
14
|
+
import { dayOf, formatDateTime, formatDayHeading, formatTimeOfDay } from '../locale.js';
|
|
15
|
+
import { hueOf, initialsOf } from './valueModel.js';
|
|
16
|
+
import { relatedCreatePlan } from '@mistriwork/engine/shared/relatedCreate.js';
|
|
17
|
+
import { timelineReads } from '@mistriwork/engine/shared/recordReads.js';
|
|
18
|
+
import { canInsert, openRelatedRecord } from '../insert.js';
|
|
19
|
+
import { PageRenderContext, usePageApi } from './pageContext.js';
|
|
20
|
+
import { Loading, SectionBox } from './PageSectionBox.js';
|
|
21
|
+
import { onDemand, useArrived } from './onDemand.js';
|
|
22
|
+
import { Empty } from './Notes.js';
|
|
23
|
+
import { Value } from './Value.js';
|
|
24
|
+
import { listColumn } from './listColumn.js';
|
|
25
|
+
import { say } from '../copy/record/components/PageTimeline.js';
|
|
26
|
+
/**
|
|
27
|
+
* What a merged row says it is: its resource's noun ("Call", "Note"), the word
|
|
28
|
+
* a New button and a page already use, and the table's name as a person says
|
|
29
|
+
* it where the resource names none — never a source's qualified name
|
|
30
|
+
* (`sales.deal_estimate`). The Workbench shows the table as it is.
|
|
31
|
+
*/
|
|
32
|
+
function streamSource(tableId, table) {
|
|
33
|
+
if (!shell().inApp())
|
|
34
|
+
return table?.name ?? tableId;
|
|
35
|
+
const name = table?.name ?? tableId;
|
|
36
|
+
return headingOf(recordNoun(resourceOf(shell().app(), table?.id ?? tableId)?.noun, name.slice(name.lastIndexOf('.') + 1)));
|
|
37
|
+
}
|
|
38
|
+
/** A row no person wrote, as the section's `compact` rule says: a row without an author is not one (a customer's
|
|
39
|
+
message may have none where the author is the agent). */
|
|
40
|
+
const isEvent = (r) => Boolean(r.compact);
|
|
41
|
+
/** The rows by calendar day, each day's runs of two or more events folded into one item. */
|
|
42
|
+
function byDay(rows) {
|
|
43
|
+
const days = [];
|
|
44
|
+
for (const r of rows) {
|
|
45
|
+
const day = dayOf(r.when) ?? '';
|
|
46
|
+
let last = days.at(-1);
|
|
47
|
+
if (!last || last.day !== day)
|
|
48
|
+
days.push((last = { day, items: [] }));
|
|
49
|
+
const prev = last.items.at(-1);
|
|
50
|
+
if (isEvent(r) && prev && (Array.isArray(prev) || isEvent(prev)))
|
|
51
|
+
last.items[last.items.length - 1] = [prev, r].flat();
|
|
52
|
+
else
|
|
53
|
+
last.items.push(r);
|
|
54
|
+
}
|
|
55
|
+
return days;
|
|
56
|
+
}
|
|
57
|
+
/** The time of day a row was written; the day is its group's heading, the whole moment its title. */
|
|
58
|
+
function When({ at }) {
|
|
59
|
+
const time = formatTimeOfDay(at);
|
|
60
|
+
return time ? (_jsx("time", { className: "timeline-when", dateTime: at, title: formatDateTime(at), children: time })) : null;
|
|
61
|
+
}
|
|
62
|
+
/** Whether a message goes on its author's run: the same person, on the same side, in the same dress, right after. */
|
|
63
|
+
const runsOn = (r, prev) => Boolean(prev && !Array.isArray(prev) && !isEvent(prev) && r.by && prev.by === r.by && prev.other === r.other && prev.tone === r.tone);
|
|
64
|
+
/** One row: an event is one quiet line; a message is who, what kind and when over its words, its author said once a run
|
|
65
|
+
where the section has sides. */
|
|
66
|
+
function Row({ r, multi, conversation, continued = false, }) {
|
|
67
|
+
const words = r.text == null || r.text === '' ? ('') : (_jsx(Value, { tableId: r.table, col: r.textColumn, value: r.text, compact: true, links: true, wholeText: conversation }));
|
|
68
|
+
const tone = r.tone ? { 'data-tone': r.tone } : {};
|
|
69
|
+
if (isEvent(r))
|
|
70
|
+
return (_jsxs("li", { className: "timeline-row is-compact", "data-timeline-row": true, ...tone, children: [_jsx("span", { className: "timeline-text", children: words }), _jsx(When, { at: r.when })] }));
|
|
71
|
+
return (_jsxs("li", { className: `timeline-row${r.tone ? ' is-tinted' : ''}${r.other ? ' is-other' : ''}${continued ? ' is-continued' : ''}`, "data-timeline-row": true, ...tone, children: [r.by && !continued ? (_jsx("span", { className: `timeline-avatar avatar avatar-c${hueOf(r.by)}`, "aria-hidden": "true", children: initialsOf(r.by) })) : (_jsx("span", { className: "timeline-avatar", "aria-hidden": "true" })), _jsxs("span", { className: "timeline-head", children: [r.by && (continued ? _jsx("span", { className: "visually-hidden", children: r.by }) : _jsx("span", { className: "timeline-by", children: r.by })), r.detail != null && (_jsx("span", { className: "timeline-kind", children: _jsx(Value, { tableId: r.table, col: r.detailColumn, value: r.detail, compact: true }) })), multi && _jsx("span", { className: "timeline-source", children: r.source }), _jsx(When, { at: r.when })] }), _jsx("div", { className: "timeline-text prose", children: words })] }));
|
|
72
|
+
}
|
|
73
|
+
/** Two or more events in a row, said as their count and opened in place. */
|
|
74
|
+
function Fold({ rows, multi, conversation }) {
|
|
75
|
+
const [open, setOpen] = useState(false);
|
|
76
|
+
const id = useId();
|
|
77
|
+
return (_jsxs("li", { className: "timeline-fold", children: [_jsxs("button", { type: "button", className: "timeline-fold-toggle", "aria-expanded": open, "aria-controls": id, onClick: () => setOpen(!open), children: [_jsx("svg", { viewBox: "0 0 16 16", width: "12", height: "12", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: "M6 4l4 4-4 4", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" }) }), say('updates', { count: rows.length })] }), _jsx("ol", { className: "timeline-rows", id: id, hidden: !open, children: rows.map((r, i) => (_jsx(Row, { r: r, multi: multi, conversation: conversation }, i))) })] }));
|
|
78
|
+
}
|
|
79
|
+
/** The record's activity as one stream, merged newest-first (or, as a conversation, oldest-first) across its streams. */
|
|
80
|
+
/* The other side's stylesheet, a part of its own: only a section with a `side` (its own or a stream's) asks for it. */
|
|
81
|
+
const Sides = onDemand(() => import('./TimelineSides.js'), 'TimelineSides', { quiet: true });
|
|
82
|
+
export function TimelineSection({ section, plan, base, recordKey }) {
|
|
83
|
+
/* Rows with sides wait for their dress, under the section's one skeleton, so nothing moves when it comes. */
|
|
84
|
+
const sided = Boolean(section.side || section.streams?.some((stream) => stream.side));
|
|
85
|
+
const sidesHere = useArrived(Sides, sided);
|
|
86
|
+
const api = usePageApi();
|
|
87
|
+
const { preview, isCurrent, openRelated } = useContext(PageRenderContext);
|
|
88
|
+
const queries = useQueryClient();
|
|
89
|
+
const [added, setAdded] = useState(false);
|
|
90
|
+
const createButton = useRef(null);
|
|
91
|
+
const streams = plan.streams ?? [];
|
|
92
|
+
const conversation = section.newest === 'last';
|
|
93
|
+
/* The conversation's box, as a state: a sided conversation draws its placeholder until its sides arrive, and the box
|
|
94
|
+
drawn then is a new one the first scroll never saw. */
|
|
95
|
+
const [scroller, setScroller] = useState(null);
|
|
96
|
+
/* Whether the reader is at the foot: the box keeps them there while it settles, and leaves them where they scrolled. */
|
|
97
|
+
const atFoot = useRef(true);
|
|
98
|
+
/* A row's line and detail are values of their stream's table, dressed by its display rules and drawn by its
|
|
99
|
+
value components as a grid cell is; `table` is whose rules they are. */
|
|
100
|
+
const data = useQuery({
|
|
101
|
+
queryKey: ['page-timeline', plan.streams, section.limit, section.tone, section.compact, section.streams],
|
|
102
|
+
queryFn: async () => {
|
|
103
|
+
const answers = await Promise.all(streams.map(async (stream, s) => {
|
|
104
|
+
/* The stream as authored: its own tone and compact stand over the section's rules. */
|
|
105
|
+
const own = section.streams?.[s];
|
|
106
|
+
if (stream.error)
|
|
107
|
+
throw new Error(stream.error);
|
|
108
|
+
if (stream.empty)
|
|
109
|
+
return [];
|
|
110
|
+
if (!stream.view)
|
|
111
|
+
throw new Error(say('thisActivityStreamHasNoView'));
|
|
112
|
+
const table = findTable(stream.from);
|
|
113
|
+
/* An author that is a reference (`author: 'owner_id'`) says the person's name, as a list column of the same
|
|
114
|
+
reference does: read through the reference to the record's label, where this reader reads that table.
|
|
115
|
+
The other party's rows are the same read narrowed by the section's `side`, asked beside it: their keys.
|
|
116
|
+
Both as the page's planned reads ask them (shared recordReads.ts `timelineReads`), so a composed page's
|
|
117
|
+
answers are these very reads. */
|
|
118
|
+
if (stream.side?.error)
|
|
119
|
+
throw new Error(stream.side.error);
|
|
120
|
+
const asked = timelineReads({ table: (id) => findTable(id), namePath: (target) => labelPath(target) }, stream);
|
|
121
|
+
const view = asked.view;
|
|
122
|
+
const named = asked.view !== stream.view ? asked.view.columns?.at(-1)?.path : undefined;
|
|
123
|
+
const byPath = named ?? stream.by;
|
|
124
|
+
const others = asked.side ? api('/api/view/run', { view: asked.side, offset: 0 }) : undefined;
|
|
125
|
+
const [got, otherRows] = await Promise.all([api('/api/view/run', { view, offset: 0 }), others]);
|
|
126
|
+
if (!('view' in got))
|
|
127
|
+
throw new Error(got.errors[0]?.message ?? say('thisActivityStreamCould'));
|
|
128
|
+
if (otherRows && !('view' in otherRows))
|
|
129
|
+
throw new Error(otherRows.errors[0]?.message ?? say('thisActivityStreamCould'));
|
|
130
|
+
const keyOf = (row, names, cols) => JSON.stringify(stream.key.map((column) => row[cols[names.indexOf(column)] ?? column] ?? null));
|
|
131
|
+
const otherKeys = otherRows &&
|
|
132
|
+
new Set(otherRows.rows.map((row) => keyOf(row, stream.key, otherRows.columns ?? stream.key)));
|
|
133
|
+
const names = (view.columns ?? []).map((c) => c.path);
|
|
134
|
+
const cols = got.columns ?? names;
|
|
135
|
+
const atCol = cols[names.indexOf(stream.at)] ?? stream.at;
|
|
136
|
+
const showCol = cols[names.indexOf(stream.show)] ?? stream.show;
|
|
137
|
+
const detailCol = stream.detail ? (cols[names.indexOf(stream.detail)] ?? stream.detail) : null;
|
|
138
|
+
const byCol = byPath ? (cols[names.indexOf(byPath)] ?? byPath) : null;
|
|
139
|
+
const markCol = (name) => cols[names.indexOf(name)] ?? name;
|
|
140
|
+
const shown = table && listColumn(table, stream.show);
|
|
141
|
+
const detailed = table && stream.detail ? listColumn(table, stream.detail) : undefined;
|
|
142
|
+
return got.rows.map((row) => ({
|
|
143
|
+
when: row[atCol] == null ? '' : String(row[atCol]),
|
|
144
|
+
text: row[showCol] ?? null,
|
|
145
|
+
...(shown ? { textColumn: { ...shown, name: stream.show } } : {}),
|
|
146
|
+
detail: detailCol && row[detailCol] != null && row[detailCol] !== '' ? row[detailCol] : null,
|
|
147
|
+
...(detailed ? { detailColumn: { ...detailed, name: stream.detail } } : {}),
|
|
148
|
+
table: table?.id ?? stream.from,
|
|
149
|
+
by: byCol && row[byCol] != null ? String(row[byCol]) : null,
|
|
150
|
+
source: streamSource(stream.from, table),
|
|
151
|
+
/* A column's value picks the tone, and a one-line row: the section's rules read each row's own columns,
|
|
152
|
+
where the stream says neither for all its rows. */
|
|
153
|
+
...(() => {
|
|
154
|
+
const said = (column) => (row[markCol(column)] == null ? undefined : String(row[markCol(column)]));
|
|
155
|
+
const tone = own?.tone ??
|
|
156
|
+
Object.entries(section.tone ?? {})
|
|
157
|
+
.map(([column, tones]) => tones[said(column) ?? ''])
|
|
158
|
+
.find(Boolean);
|
|
159
|
+
const small = own?.compact === true ||
|
|
160
|
+
(own?.compact === undefined &&
|
|
161
|
+
Object.entries(section.compact ?? {}).some(([column, values]) => values.includes(said(column) ?? '')));
|
|
162
|
+
const other = !small && otherKeys?.has(keyOf(row, names, cols));
|
|
163
|
+
return { ...(tone ? { tone } : {}), ...(small ? { compact: true } : {}), ...(other ? { other: true } : {}) };
|
|
164
|
+
})(),
|
|
165
|
+
}));
|
|
166
|
+
}));
|
|
167
|
+
return answers
|
|
168
|
+
.flat()
|
|
169
|
+
.filter((r) => r.when)
|
|
170
|
+
.sort((a, b) => (a.when < b.when ? 1 : a.when > b.when ? -1 : 0))
|
|
171
|
+
.slice(0, section.limit ?? 20);
|
|
172
|
+
},
|
|
173
|
+
staleTime: 0,
|
|
174
|
+
});
|
|
175
|
+
/* A conversation reads to its newest line, at the foot: scrolled there when it arrives and when a message is added,
|
|
176
|
+
and kept there while what is above it settles — a face's metrics, an avatar, a message's prose drawn a moment
|
|
177
|
+
later. Scrolled there once, it was left a few pixels short at a desk and most of a message short on a phone as
|
|
178
|
+
the rows grew under it, the top line cut, neither at the first message nor at the newest (G184). Once the reader
|
|
179
|
+
scrolls away from the foot, the box stays where they put it. */
|
|
180
|
+
useLayoutEffect(() => {
|
|
181
|
+
if (!conversation || !scroller)
|
|
182
|
+
return;
|
|
183
|
+
const box = scroller;
|
|
184
|
+
/* At the foot the box's top edge falls wherever the height runs out, mostly inside a message: so the box stands a
|
|
185
|
+
little shorter than its most, by less than one message, for that edge to fall where a message (or a day) starts.
|
|
186
|
+
Only while the reader is at the foot; their own scroll is theirs. */
|
|
187
|
+
const foot = () => {
|
|
188
|
+
if (!atFoot.current)
|
|
189
|
+
return;
|
|
190
|
+
box.style.maxHeight = '';
|
|
191
|
+
const room = box.clientHeight, whole = box.scrollHeight;
|
|
192
|
+
if (whole > room + 1) {
|
|
193
|
+
const origin = box.getBoundingClientRect().top - box.scrollTop;
|
|
194
|
+
const over = whole - room;
|
|
195
|
+
/* The box's height and its scroll are whole pixels and a face's lines are not (Barlow's start at fractions):
|
|
196
|
+
floored, the edge fell up to a pixel inside the line it was meant to start. Rounded, it falls within half a
|
|
197
|
+
pixel of that line's start, on either side, so a line is taken only where rounding lands no lower. */
|
|
198
|
+
const edge = [...box.querySelectorAll('.timeline-day-label, [data-timeline-row], .timeline-fold')]
|
|
199
|
+
.filter((line) => line.offsetHeight > 0)
|
|
200
|
+
.map((line) => line.getBoundingClientRect().top - origin)
|
|
201
|
+
.filter((top) => top >= over - 0.5)
|
|
202
|
+
.sort((a, b) => a - b)[0];
|
|
203
|
+
const height = edge === undefined ? room : Math.round(whole - edge);
|
|
204
|
+
if (height < room)
|
|
205
|
+
box.style.maxHeight = `${height}px`;
|
|
206
|
+
}
|
|
207
|
+
box.scrollTop = box.scrollHeight;
|
|
208
|
+
};
|
|
209
|
+
atFoot.current = true;
|
|
210
|
+
foot();
|
|
211
|
+
const read = () => {
|
|
212
|
+
atFoot.current = box.scrollTop + box.clientHeight >= box.scrollHeight - 2;
|
|
213
|
+
};
|
|
214
|
+
box.addEventListener('scroll', read, { passive: true });
|
|
215
|
+
const settle = new ResizeObserver(foot);
|
|
216
|
+
settle.observe(box);
|
|
217
|
+
for (const child of box.children)
|
|
218
|
+
settle.observe(child);
|
|
219
|
+
return () => {
|
|
220
|
+
box.removeEventListener('scroll', read);
|
|
221
|
+
settle.disconnect();
|
|
222
|
+
};
|
|
223
|
+
}, [conversation, scroller]);
|
|
224
|
+
// A message added (the reader's own, or one that arrived) takes the reader to the foot, where it is.
|
|
225
|
+
useLayoutEffect(() => {
|
|
226
|
+
if (!conversation || !scroller)
|
|
227
|
+
return;
|
|
228
|
+
atFoot.current = true;
|
|
229
|
+
scroller.scrollTop = scroller.scrollHeight;
|
|
230
|
+
}, [conversation, scroller, data.data]);
|
|
231
|
+
if (data.isPending || (sided && !sidesHere))
|
|
232
|
+
return _jsx(Loading, { section: section });
|
|
233
|
+
if (data.isError)
|
|
234
|
+
return _jsx(SectionBox, { section: section, body: null, foldable: false, broken: data.error.message });
|
|
235
|
+
const rows = conversation ? [...(data.data ?? [])].reverse() : (data.data ?? []);
|
|
236
|
+
/* A message names its stream only where the messages come from more than one: a conversation whose second stream
|
|
237
|
+
is all quiet lines (time logged) said "Activity" over every message, a word that told the reader nothing. */
|
|
238
|
+
const multi = new Set(rows.filter((r) => !isEvent(r)).map((r) => r.source)).size > 1;
|
|
239
|
+
/* The composer adds a row of the first stream, bound to this record the way
|
|
240
|
+
a related list's create is: the same plan, the same form, no new write
|
|
241
|
+
path. A stream narrowed by a query could hide the row it just added. */
|
|
242
|
+
const first = section.streams?.[0];
|
|
243
|
+
const table = first ? findTable(first.from) : undefined;
|
|
244
|
+
const creation = section.create && first && !first.filter && table && state.schema
|
|
245
|
+
? relatedCreatePlan(state.schema, base.id, table.id, first.path, section.create)
|
|
246
|
+
: undefined;
|
|
247
|
+
const defaults = creation?.bindings && Object.fromEntries(creation.bindings.map((b) => [b.column, recordKey[b.parent]]));
|
|
248
|
+
const canCreate = !preview &&
|
|
249
|
+
shell().inApp() &&
|
|
250
|
+
table &&
|
|
251
|
+
canInsert(table) &&
|
|
252
|
+
defaults &&
|
|
253
|
+
Object.values(defaults).every((v) => typeof v === 'string' || typeof v === 'number');
|
|
254
|
+
const composeButton = !section.composer && canCreate && (_jsxs("div", { className: "page-related-create timeline-compose", children: [added && _jsx("span", { role: "status", children: say('common.added') }), _jsxs("button", { type: "button", className: "ghost", ref: createButton, onClick: () => {
|
|
255
|
+
if (isCurrent && !isCurrent())
|
|
256
|
+
return;
|
|
257
|
+
setAdded(false);
|
|
258
|
+
(openRelated ?? openRelatedRecord)(table, { show: creation.show, defaults: { ...(creation.defaults ?? {}), ...defaults } }, () => {
|
|
259
|
+
if (isCurrent && !isCurrent())
|
|
260
|
+
return;
|
|
261
|
+
setAdded(true);
|
|
262
|
+
void queries.invalidateQueries({
|
|
263
|
+
predicate: (query) => ['page-list', 'page-timeline', 'page-metric', 'page-breakdown'].includes(String(query.queryKey[0])),
|
|
264
|
+
});
|
|
265
|
+
createButton.current?.focus();
|
|
266
|
+
});
|
|
267
|
+
}, children: ["+ ", section.create.label] })] }));
|
|
268
|
+
/* The composer sends through the App's commands (TimelineComposer.tsx), drawn through the shell's slot. */
|
|
269
|
+
const { TimelineComposer } = shell().slots;
|
|
270
|
+
return (_jsx(SectionBox, { section: section, foldable: false, body: _jsxs(_Fragment, { children: [composeButton, rows.length ? (_jsx("div", { className: conversation ? 'timeline-scroll' : undefined, ...(conversation ? { 'data-scrolls': '' } : {}), ref: setScroller, children: _jsx("ol", { className: "timeline", children: byDay(rows).map(({ day, items }, d) => (_jsxs("li", { className: "timeline-day", children: [day && (_jsx("time", { className: "timeline-day-label", dateTime: day, children: formatDayHeading(day) })), _jsx("ol", { className: "timeline-rows", children: items.map((item, i) => Array.isArray(item) ? (_jsx(Fold, { rows: item, multi: multi, conversation: conversation }, `${item[0].when} ${item[0].table}`)) : (_jsx(Row, { r: item, multi: multi, conversation: conversation, continued: sided && runsOn(item, items[i - 1]) }, `${item.when} ${item.table}`))) })] }, day || d))) }) })) : (_jsx(Empty, { text: say('nothingDatedYetForThisRecord') })), section.composer && !preview && shell().inApp() && TimelineComposer && (_jsx(TimelineComposer, { composer: section.composer, recordKey: recordKey, table: base?.id, onSent: () => void queries.invalidateQueries({
|
|
271
|
+
predicate: (query) => ['page-list', 'page-timeline', 'page-metric', 'page-breakdown'].includes(String(query.queryKey[0])),
|
|
272
|
+
}) }))] }) }));
|
|
273
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Cmd+K: go anywhere by typing its name — one ranked list of tables,
|
|
4
|
+
* views, saved filters, recent queries, saved SQL, the menu's commands and
|
|
5
|
+
* the other databases, because having to know which *kind* of thing you
|
|
6
|
+
* are looking for before you can search for it defeats the purpose. The
|
|
7
|
+
* ranking (`score`) and the list of everything nameable (`entries`) stay in
|
|
8
|
+
* `palette.js`; this is the surface.
|
|
9
|
+
*/
|
|
10
|
+
import { useEffect, useRef, useState } from 'react';
|
|
11
|
+
import { humanName } from '@mistriwork/engine/shared/model.js';
|
|
12
|
+
import { shell } from '../shellMode.js';
|
|
13
|
+
import { findRecords, findableTables } from './recordSearch.js';
|
|
14
|
+
import { whenMenuChanges } from '../menu.js';
|
|
15
|
+
import { entries } from '../palette.js';
|
|
16
|
+
import { score } from './paletteModel.js';
|
|
17
|
+
import { offeredChoices } from './pickerStaleness.js';
|
|
18
|
+
import { say } from '../copy/shell/components/Palette.js';
|
|
19
|
+
import { addHostListener, removeHostListener } from '../shellHost.js';
|
|
20
|
+
/** In app mode the App's lists name the tables worth searching and their label columns name the words people search by. */
|
|
21
|
+
/** What a row opens, in words: the kinds are the registry's identifiers, not copy. */
|
|
22
|
+
function kindWord(kind) {
|
|
23
|
+
switch (kind) {
|
|
24
|
+
case 'page':
|
|
25
|
+
return say('kindPage');
|
|
26
|
+
case 'view':
|
|
27
|
+
return say('kindView');
|
|
28
|
+
case 'table':
|
|
29
|
+
return say('kindTable');
|
|
30
|
+
case 'filter':
|
|
31
|
+
return say('kindFilter');
|
|
32
|
+
case 'recent':
|
|
33
|
+
return say('kindRecent');
|
|
34
|
+
case 'action':
|
|
35
|
+
return say('kindAction');
|
|
36
|
+
case 'record':
|
|
37
|
+
return say('kindRecord');
|
|
38
|
+
case 'sql':
|
|
39
|
+
return say('kindSql');
|
|
40
|
+
case 'database':
|
|
41
|
+
return say('kindDatabase');
|
|
42
|
+
default:
|
|
43
|
+
return kind;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function recordTables() {
|
|
47
|
+
const app = shell().inApp() ? shell().app() : null;
|
|
48
|
+
return app ? findableTables(app) : [];
|
|
49
|
+
}
|
|
50
|
+
export function Palette({ prefill = '', onClose }) {
|
|
51
|
+
const input = useRef(null);
|
|
52
|
+
const list = useRef(null);
|
|
53
|
+
const [listed, setAll] = useState(() => entries());
|
|
54
|
+
/* The header's New menu, searchable, from the reading its button uses — fetched with that reading, and only
|
|
55
|
+
where the App declares the menu, so the shell's first page carries none of it. */
|
|
56
|
+
const [made, setMade] = useState([]);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
const app = shell().inApp() ? shell().app() : null;
|
|
59
|
+
if (!app?.ui.shell?.new?.length)
|
|
60
|
+
return;
|
|
61
|
+
let live = true;
|
|
62
|
+
void import('./newMenuModel.js').then((model) => {
|
|
63
|
+
if (live)
|
|
64
|
+
setMade(model.newPaletteItems(app));
|
|
65
|
+
});
|
|
66
|
+
return () => {
|
|
67
|
+
live = false;
|
|
68
|
+
};
|
|
69
|
+
}, []);
|
|
70
|
+
const all = made.length ? [...listed, ...made] : listed;
|
|
71
|
+
const [query, setQuery] = useState(prefill);
|
|
72
|
+
// The hits and the term they answer, which lags what is typed by a pause and a request.
|
|
73
|
+
const [records, setRecords] = useState({ term: '', items: [] });
|
|
74
|
+
const [active, setActive] = useState(0);
|
|
75
|
+
const recordToken = useRef(0);
|
|
76
|
+
/* Commands can arrive while the palette is open — the pages group is
|
|
77
|
+
registered asynchronously on load. */
|
|
78
|
+
useEffect(() => whenMenuChanges(() => setAll(entries())), []);
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
input.current?.focus();
|
|
81
|
+
}, []);
|
|
82
|
+
/* Record hits, fetched as you type: the palette answers from memory
|
|
83
|
+
instantly and from the database a beat later. */
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
const term = query.trim();
|
|
86
|
+
const mine = ++recordToken.current;
|
|
87
|
+
const tables = recordTables();
|
|
88
|
+
if (term.length < 2 || !tables.length) {
|
|
89
|
+
setRecords({ term, items: [] });
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const timer = setTimeout(() => {
|
|
93
|
+
void Promise.all(tables.map(async (findable) => (await findRecords(findable, term, 3)).map((found) => ({
|
|
94
|
+
kind: 'record',
|
|
95
|
+
label: found.label,
|
|
96
|
+
search: '',
|
|
97
|
+
detail: `${humanName(findable.table.name)} · ${Object.values(found.key).join('/')}`,
|
|
98
|
+
run: found.open,
|
|
99
|
+
})))).then((hits) => {
|
|
100
|
+
if (mine !== recordToken.current)
|
|
101
|
+
return;
|
|
102
|
+
setRecords({ term, items: hits.flat().slice(0, 9) });
|
|
103
|
+
});
|
|
104
|
+
}, prefill && query === prefill ? 0 : 180);
|
|
105
|
+
return () => clearTimeout(timer);
|
|
106
|
+
}, [query]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
107
|
+
const term = query.trim();
|
|
108
|
+
const named = all
|
|
109
|
+
.map((item) => ({ item, points: score(item.search, term) }))
|
|
110
|
+
.filter(({ points }) => points > 0)
|
|
111
|
+
.sort((a, b) => b.points - a.points)
|
|
112
|
+
// Bounded because a palette is a shortlist.
|
|
113
|
+
.slice(0, 20)
|
|
114
|
+
.map(({ item }) => item);
|
|
115
|
+
/* Hits for earlier text keep only the rows this text also names: with
|
|
116
|
+
nothing named above them, the first is lit and Enter would open a record
|
|
117
|
+
the box never named. Until the hits answer this text, "nothing matches"
|
|
118
|
+
is not yet true either. */
|
|
119
|
+
const hits = offeredChoices({ typed: term, asked: records.term, rows: records.items, label: (item) => item.label });
|
|
120
|
+
const settled = hits.answered || term.length < 2 || !recordTables().length;
|
|
121
|
+
/* Record hits ride below the named things: a table you typed exactly still wins the top. */
|
|
122
|
+
const shown = [...named, ...hits.choices].slice(0, 20);
|
|
123
|
+
const current = shown.length ? ((active % shown.length) + shown.length) % shown.length : 0;
|
|
124
|
+
const choose = (index) => {
|
|
125
|
+
const item = shown[index];
|
|
126
|
+
if (!item)
|
|
127
|
+
return;
|
|
128
|
+
onClose();
|
|
129
|
+
item.run();
|
|
130
|
+
};
|
|
131
|
+
useEffect(() => {
|
|
132
|
+
const onKey = (e) => {
|
|
133
|
+
switch (e.key) {
|
|
134
|
+
case 'Escape':
|
|
135
|
+
/* Stopped as well as prevented: a modal takes the key it handles. */
|
|
136
|
+
e.preventDefault();
|
|
137
|
+
e.stopPropagation();
|
|
138
|
+
onClose();
|
|
139
|
+
return;
|
|
140
|
+
case 'ArrowDown':
|
|
141
|
+
e.preventDefault();
|
|
142
|
+
setActive(current + 1);
|
|
143
|
+
return;
|
|
144
|
+
case 'ArrowUp':
|
|
145
|
+
e.preventDefault();
|
|
146
|
+
setActive(current - 1);
|
|
147
|
+
return;
|
|
148
|
+
case 'Enter':
|
|
149
|
+
e.preventDefault();
|
|
150
|
+
choose(current);
|
|
151
|
+
return;
|
|
152
|
+
/* The results are reached with the arrows, so the box is the only
|
|
153
|
+
stop: Tab used to leave it for the page under the scrim, a focus
|
|
154
|
+
nobody could see. */
|
|
155
|
+
case 'Tab':
|
|
156
|
+
e.preventDefault();
|
|
157
|
+
return;
|
|
158
|
+
default:
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
addHostListener(document, 'keydown', onKey, true);
|
|
162
|
+
return () => removeHostListener(document, 'keydown', onKey, true);
|
|
163
|
+
});
|
|
164
|
+
useEffect(() => {
|
|
165
|
+
list.current?.children[current]?.scrollIntoView?.({ block: 'nearest' });
|
|
166
|
+
}, [current, shown.length]);
|
|
167
|
+
return (_jsx("div", { className: "palette-backdrop", onPointerDown: (e) => {
|
|
168
|
+
if (e.target === e.currentTarget)
|
|
169
|
+
onClose();
|
|
170
|
+
}, children: _jsxs("div", { className: "palette", role: "dialog", "aria-modal": "true", "aria-label": say('navigation.search'), children: [_jsx("input", { ref: input, type: "text", className: "palette-input", placeholder: shell().inApp() ? say('searchRecordsPagesAndCommands') : say('goToATable'), "aria-label": say('navigation.search'), autoComplete: "off", spellCheck: false, role: "combobox", "aria-autocomplete": "list", "aria-expanded": "true", "aria-controls": "palette-list", "aria-activedescendant": shown.length ? `palette-o${current}` : undefined, value: query, onChange: (e) => {
|
|
171
|
+
setQuery(e.currentTarget.value);
|
|
172
|
+
setActive(0);
|
|
173
|
+
} }), _jsx("div", { ref: list, className: "palette-list", id: "palette-list", role: "listbox", children: !shown.length
|
|
174
|
+
? settled && _jsx("p", { className: "palette-empty", children: term ? say('nothingMatches', { term }) : say('nothingToGo') })
|
|
175
|
+
: shown.map((item, i) => (_jsxs("div", { className: `palette-item${i === current ? ' active' : ''}`, id: `palette-o${i}`, role: "option", "aria-selected": i === current, onClick: () => choose(i), onMouseMove: () => setActive(i), children: [_jsx("span", { className: `palette-kind kind-${item.kind}`, children: kindWord(item.kind) }), _jsx("span", { className: "palette-label", children: item.label }), item.detail ? _jsx("span", { className: "palette-detail", children: item.detail }) : null] }, `${item.kind}:${item.label}:${i}`))) })] }) }));
|
|
176
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function PeekLayer(): import("react").JSX.Element;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* What is on the other end of a reference, without going there.
|
|
4
|
+
*
|
|
5
|
+
* `sold_by 4` is a promise that an answer exists in another table. So a
|
|
6
|
+
* reference answers itself on hover: a card with the referenced row's
|
|
7
|
+
* identifying fields, near the chip, gone when the pointer leaves. Three
|
|
8
|
+
* things make it bearable: it waits until the pointer has settled, it
|
|
9
|
+
* remembers (the cache is Query's), and it gives up quietly.
|
|
10
|
+
*
|
|
11
|
+
* One layer for the whole page, listening on the document: a table redraws
|
|
12
|
+
* its rows on every page and a virtualised one replaces them as you scroll,
|
|
13
|
+
* so a listener per chip would be thousands of registrations with no one
|
|
14
|
+
* place to take them off again.
|
|
15
|
+
*/
|
|
16
|
+
import { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
17
|
+
import { useQuery } from '@tanstack/react-query';
|
|
18
|
+
import { api, columnLabel, emptyWord, findTable, labelPath, state, viewportBox, viewportSize } from '../core.js';
|
|
19
|
+
import { presentationColumns } from './columnPresentation.js';
|
|
20
|
+
import { Value } from './Value.js';
|
|
21
|
+
import { say } from '../copy/record/components/Peek.js';
|
|
22
|
+
import { addHostListener, removeHostListener } from '../shellHost.js';
|
|
23
|
+
/** How long the pointer must rest on a chip before anything is fetched. */
|
|
24
|
+
const SETTLE_MS = 320;
|
|
25
|
+
/** Fields shown before the card stops listing. */
|
|
26
|
+
const FIELDS = 6;
|
|
27
|
+
/** The key first, then the label column, then whatever else fits. */
|
|
28
|
+
function fieldsFor(table) {
|
|
29
|
+
const key = table.columns.filter((c) => c.primaryKey).map((c) => c.name);
|
|
30
|
+
const label = labelPath(table);
|
|
31
|
+
return [
|
|
32
|
+
...key,
|
|
33
|
+
...(label && !key.includes(label) ? [label] : []),
|
|
34
|
+
...table.columns.map((c) => c.name).filter((n) => !key.includes(n) && n !== label),
|
|
35
|
+
].slice(0, FIELDS);
|
|
36
|
+
}
|
|
37
|
+
export function PeekLayer() {
|
|
38
|
+
const [target, setTarget] = useState(null);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
let timer = 0;
|
|
41
|
+
const onEnter = (e) => {
|
|
42
|
+
const chip = e.target.closest?.('[data-ref-table]');
|
|
43
|
+
if (!chip)
|
|
44
|
+
return;
|
|
45
|
+
const table = findTable(chip.dataset.refTable ?? '');
|
|
46
|
+
const column = chip.dataset.refColumn;
|
|
47
|
+
const value = chip.dataset.refValue;
|
|
48
|
+
if (!table || !column || !value)
|
|
49
|
+
return;
|
|
50
|
+
clearTimeout(timer);
|
|
51
|
+
timer = window.setTimeout(() => setTarget({ chip, table, column, value }), SETTLE_MS);
|
|
52
|
+
};
|
|
53
|
+
const onLeave = (e) => {
|
|
54
|
+
if (e.target.closest?.('[data-ref-table]')) {
|
|
55
|
+
clearTimeout(timer);
|
|
56
|
+
setTarget(null);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const hide = () => {
|
|
60
|
+
clearTimeout(timer);
|
|
61
|
+
setTarget(null);
|
|
62
|
+
};
|
|
63
|
+
addHostListener(document, 'mouseover', onEnter);
|
|
64
|
+
addHostListener(document, 'mouseout', onLeave);
|
|
65
|
+
/* Focus opens it too, so the card is reachable without a pointer. */
|
|
66
|
+
addHostListener(document, 'focusin', onEnter);
|
|
67
|
+
addHostListener(document, 'focusout', onLeave);
|
|
68
|
+
const onKey = (e) => {
|
|
69
|
+
if (e.key === 'Escape')
|
|
70
|
+
hide();
|
|
71
|
+
};
|
|
72
|
+
addHostListener(document, 'keydown', onKey);
|
|
73
|
+
// Anything that moves the page out from under the card invalidates it.
|
|
74
|
+
addHostListener(window, 'scroll', hide, true);
|
|
75
|
+
addHostListener(window, 'resize', hide);
|
|
76
|
+
return () => {
|
|
77
|
+
clearTimeout(timer);
|
|
78
|
+
removeHostListener(document, 'mouseover', onEnter);
|
|
79
|
+
removeHostListener(document, 'mouseout', onLeave);
|
|
80
|
+
removeHostListener(document, 'focusin', onEnter);
|
|
81
|
+
removeHostListener(document, 'focusout', onLeave);
|
|
82
|
+
removeHostListener(document, 'keydown', onKey);
|
|
83
|
+
removeHostListener(window, 'scroll', hide, true);
|
|
84
|
+
removeHostListener(window, 'resize', hide);
|
|
85
|
+
};
|
|
86
|
+
}, []);
|
|
87
|
+
return target ? _jsx(PeekCard, { target: target }) : null;
|
|
88
|
+
}
|
|
89
|
+
function PeekCard({ target }) {
|
|
90
|
+
const { chip, table, column, value } = target;
|
|
91
|
+
const fields = fieldsFor(table);
|
|
92
|
+
const columns = presentationColumns(state.schema, table, fields);
|
|
93
|
+
/* The connection is part of the key: staging's employee must not show for
|
|
94
|
+
production's reference. */
|
|
95
|
+
const row = useQuery({
|
|
96
|
+
queryKey: ['peek', state.activeConnection ?? '', table.id, column, value, fields],
|
|
97
|
+
queryFn: async () => {
|
|
98
|
+
const data = await api('/api/view/run', {
|
|
99
|
+
view: {
|
|
100
|
+
id: `peek:${table.id}`,
|
|
101
|
+
name: table.name,
|
|
102
|
+
base: table.id,
|
|
103
|
+
columns: fields.map((path) => ({ path })),
|
|
104
|
+
filter: { groups: [[{ path: column, op: '=', value }]] },
|
|
105
|
+
limit: 1,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
return data.rows?.[0] ?? null;
|
|
109
|
+
},
|
|
110
|
+
staleTime: Infinity,
|
|
111
|
+
retry: false,
|
|
112
|
+
});
|
|
113
|
+
const card = useRef(null);
|
|
114
|
+
/* The native tooltip has to go while the card is up: taken off the anchor
|
|
115
|
+
and anything inside it, and only what was there is put back. */
|
|
116
|
+
useEffect(() => {
|
|
117
|
+
if (!row.data)
|
|
118
|
+
return;
|
|
119
|
+
const suppressed = [];
|
|
120
|
+
for (const node of [chip, ...chip.querySelectorAll('[title]')]) {
|
|
121
|
+
const title = node.getAttribute('title');
|
|
122
|
+
if (title === null)
|
|
123
|
+
continue;
|
|
124
|
+
suppressed.push([node, title]);
|
|
125
|
+
node.removeAttribute('title');
|
|
126
|
+
}
|
|
127
|
+
return () => {
|
|
128
|
+
for (const [node, title] of suppressed)
|
|
129
|
+
node.setAttribute('title', title);
|
|
130
|
+
};
|
|
131
|
+
}, [row.data, chip]);
|
|
132
|
+
/* Against the *value*, not the cell: the cell's text alignment says which
|
|
133
|
+
edge the reader is looking at. Below by default; up only when there is
|
|
134
|
+
no room; nudged sideways rather than allowed off the edge. */
|
|
135
|
+
useLayoutEffect(() => {
|
|
136
|
+
const node = card.current;
|
|
137
|
+
if (!node || !chip.isConnected)
|
|
138
|
+
return;
|
|
139
|
+
const at = viewportBox(chip);
|
|
140
|
+
const box = viewportBox(node);
|
|
141
|
+
const view = viewportSize();
|
|
142
|
+
const margin = 8;
|
|
143
|
+
let top = at.bottom + 4;
|
|
144
|
+
if (top + box.height > view.height - margin) {
|
|
145
|
+
const above = at.top - box.height - 4;
|
|
146
|
+
top = above > margin ? above : Math.max(margin, view.height - box.height - margin);
|
|
147
|
+
}
|
|
148
|
+
const align = getComputedStyle(chip).textAlign;
|
|
149
|
+
const wanted = align === 'right' || align === 'end' ? at.right - box.width : align === 'center' ? at.left + at.width / 2 - box.width / 2 : at.left;
|
|
150
|
+
const left = Math.min(Math.max(margin, wanted), Math.max(margin, view.width - box.width - margin));
|
|
151
|
+
node.style.top = `${Math.round(top)}px`;
|
|
152
|
+
node.style.left = `${Math.round(left)}px`;
|
|
153
|
+
});
|
|
154
|
+
if (!row.data || !chip.isConnected)
|
|
155
|
+
return null;
|
|
156
|
+
const data = row.data;
|
|
157
|
+
return (_jsxs("div", { className: "peek", role: "tooltip", ref: card, children: [_jsxs("div", { className: "peek-head", children: [_jsx("span", { className: "peek-table", children: table.name }), _jsx("span", { className: "peek-key", children: value })] }), _jsx("div", { className: "peek-body", children: fields.map((name) => (_jsxs("div", { className: "peek-line", children: [_jsx("span", { className: "peek-name", title: name, children: columnLabel(table.id, name) ?? name }), data[name] === null || data[name] === undefined ? (_jsx("span", { className: "peek-value null", title: "null", children: emptyWord() })) : (_jsx("div", { className: "peek-value", children: _jsx(Value, { col: columns.get(name), value: data[name], tableId: table.id, compact: true }) }))] }, name))) }), _jsx("div", { className: "peek-foot", children: say('clickToOpen') })] }));
|
|
158
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type TrailList } from '../recordTrail.js';
|
|
2
|
+
interface PeekPanelProps {
|
|
3
|
+
tableId: string;
|
|
4
|
+
recordKey: Record<string, unknown>;
|
|
5
|
+
label?: string | null;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
/** The list the glance was opened from: J and K, and the arrows, step through it. */
|
|
8
|
+
records?: Array<{
|
|
9
|
+
key: Record<string, unknown>;
|
|
10
|
+
label?: string | null;
|
|
11
|
+
}>;
|
|
12
|
+
/** That list's question and page, so a step past the page reads the next one (recordTrail.ts). */
|
|
13
|
+
list?: TrailList;
|
|
14
|
+
}
|
|
15
|
+
export declare function PeekPanel({ tableId, recordKey, label, onClose, records, list }: PeekPanelProps): import("react").JSX.Element;
|
|
16
|
+
export {};
|