@mistriwork/kit 1.0.0-rc.11 → 1.0.0-rc.12
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 +28 -0
- package/dist/client/components/FieldArranger.js +82 -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 +11 -0
- package/dist/client/connectionList.js +146 -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 +312 -0
- package/dist/client/core.js +1067 -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 +16 -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 +35 -0
- package/dist/client/palette.js +357 -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 +15 -0
- package/dist/client/savedPages.js +123 -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 +100 -0
- package/dist/client/write.js +882 -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 +130 -3
|
@@ -0,0 +1,667 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* A page's related list: the rows that point at the root, a page at a time,
|
|
4
|
+
* drawn as the section asks — a grid, cards, a gallery of photos, or
|
|
5
|
+
* attachments when the rows are files — with the create, upload and pager
|
|
6
|
+
* a list offers. Adding refreshes every list, timeline and count on the page.
|
|
7
|
+
*/
|
|
8
|
+
import { PresentationSwitch } from './PresentationSwitch.js';
|
|
9
|
+
import { useContext, useMemo, useRef, useState } from 'react';
|
|
10
|
+
import { keepPreviousData, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
11
|
+
import { ownedBy } from '../requestIdentity.js';
|
|
12
|
+
import { columnLabel, recordLabel, api as coreApi, findTable, openRecord, rowLabel, state, writeAllowed } from '../core.js';
|
|
13
|
+
import { relatedRows } from '../prefs.js';
|
|
14
|
+
import { formatBytes, formatNumber, formatRelativeDay } from '../locale.js';
|
|
15
|
+
import { columnKind } from '@mistriwork/engine/shared/schema.js';
|
|
16
|
+
import { recordViewKey, recordViewLabel, withoutParent, withoutParentName } from '@mistriwork/engine/shared/referenceModel.js';
|
|
17
|
+
import { groupsBody, listView } from '@mistriwork/engine/shared/recordReads.js';
|
|
18
|
+
import { GROUP_ROWS_DEFAULT, GROUPS_DEFAULT } from '@mistriwork/engine/shared/pageModel.js';
|
|
19
|
+
import { groupFactPaths, groupTable } from '@mistriwork/engine/shared/pagePaths.js';
|
|
20
|
+
import { andQuery, quoteValue } from '@mistriwork/engine/shared/query.js';
|
|
21
|
+
import { Grid } from './Grid.js';
|
|
22
|
+
import { RowActions } from './RowActions.js';
|
|
23
|
+
import { RowTrailHosts, rowKeyString } from './RowHost.js';
|
|
24
|
+
import { wholeColumn } from './placeOrder.js';
|
|
25
|
+
import { mayRunAny } from '../actionGrants.js';
|
|
26
|
+
import { offeredBy } from './appRooms.js';
|
|
27
|
+
import { Icon } from './Icon.js';
|
|
28
|
+
import { relatedCreatePlan } from '@mistriwork/engine/shared/relatedCreate.js';
|
|
29
|
+
import { inlineFileAddress } from './cardsModel.js';
|
|
30
|
+
import { filesOnLease, saveFileOnLease } from '../fileSource.js';
|
|
31
|
+
import { FILE_MAX_BYTES_DEFAULT } from '@mistriwork/engine/shared/fileBounds.js';
|
|
32
|
+
import { humanName } from '@mistriwork/engine/shared/model.js';
|
|
33
|
+
import { pluralOf, recordNoun } from '@mistriwork/engine/shared/appNoun.js';
|
|
34
|
+
import { canInsert, openRelatedRecord } from '../insert.js';
|
|
35
|
+
import { formShownFields } from '@mistriwork/engine/shared/form.js';
|
|
36
|
+
import { pinnedBy, sectionClass } from './pageModel.js';
|
|
37
|
+
import { CurrentCard } from './PageCurrent.js';
|
|
38
|
+
import { PageRenderContext, recordReadNames, spoken, usePageApi } from './pageContext.js';
|
|
39
|
+
import { Loading, SectionBox } from './PageSectionBox.js';
|
|
40
|
+
import { ListEmpty } from './ListEmpty.js';
|
|
41
|
+
import { Empty } from './Notes.js';
|
|
42
|
+
import { RecordSummaries } from './RecordSummaries.js';
|
|
43
|
+
import { canDelete } from '../delete.js';
|
|
44
|
+
import { updateAttempts } from '../updateAttempts.js';
|
|
45
|
+
import { shell } from '../shellMode.js';
|
|
46
|
+
import { recordKey as checkedKey } from '../resourceRequests.js';
|
|
47
|
+
import { countsChanged } from './navCounts.js';
|
|
48
|
+
import { onDemand, useArrived } from './onDemand.js';
|
|
49
|
+
import { say } from '../copy/record/components/PageRelated.js';
|
|
50
|
+
import { served } from '../addressMount.js';
|
|
51
|
+
/* A list of files draws as attachments, fetched the first time a page holds one. */
|
|
52
|
+
const AttachmentList = onDemand(() => import('./AttachmentList.js'), 'AttachmentList');
|
|
53
|
+
const CardsList = onDemand(() => import('./CardsList.js'), 'CardsList');
|
|
54
|
+
/* A grouped list is one the page's author asked for; the rest of the record page never draws it. */
|
|
55
|
+
const GroupedBody = onDemand(() => import('./PageGroups.js'), 'GroupedBody');
|
|
56
|
+
const Gallery = onDemand(() => import('./Gallery.js'), 'Gallery');
|
|
57
|
+
/** The App resource over this table, if there is one. */
|
|
58
|
+
function resourceOf(table) {
|
|
59
|
+
if (!table)
|
|
60
|
+
return undefined;
|
|
61
|
+
const resources = shell().app()?.resources ?? {};
|
|
62
|
+
return resources[table.id] ?? resources[table.name];
|
|
63
|
+
}
|
|
64
|
+
/** The `file` block of the App resource over this table, when its rows are files. */
|
|
65
|
+
function fileOf(table) {
|
|
66
|
+
return resourceOf(table)?.file;
|
|
67
|
+
}
|
|
68
|
+
/** Rows related to the root: the real list. */
|
|
69
|
+
export function ListSection(props) {
|
|
70
|
+
return _jsx(RelatedList, { ...props });
|
|
71
|
+
}
|
|
72
|
+
/** Its first page as the server asks it for the page's compose (shared/recordReads.ts): the names and keys a row needs added. */
|
|
73
|
+
export function listRead(section, plan) {
|
|
74
|
+
return listView(recordReadNames(), section, plan, section.limit ?? (section.group ? GROUP_ROWS_DEFAULT : relatedRows()));
|
|
75
|
+
}
|
|
76
|
+
/** What a list's rows are called in a sentence: the section's title, or the table's name as the reader says it. */
|
|
77
|
+
export function listThings(section) {
|
|
78
|
+
const table = findTable(section.from ?? '');
|
|
79
|
+
return (section.title ??
|
|
80
|
+
(shell().inApp()
|
|
81
|
+
? (resourceOf(table)?.noun?.many ?? pluralOf(recordNoun(undefined, table?.name ?? section.from ?? '')))
|
|
82
|
+
: (table?.name ?? section.from ?? ''))).toLocaleLowerCase();
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The doors a related list offers this reader: the Add of its own, as a list view offers New, and the record's verbs
|
|
86
|
+
* that add to it (`actions`). An empty list that offers one is never taken away, so this is asked by the list when it
|
|
87
|
+
* draws its head and by the page when it decides whether to leave the list out (PageEmptyRun.tsx).
|
|
88
|
+
*/
|
|
89
|
+
export function relatedDoor(section, base, recordKey, context) {
|
|
90
|
+
const table = findTable(section.from ?? '');
|
|
91
|
+
const app = shell().inApp();
|
|
92
|
+
/* A list of files uploads where the reader may add them, whether or not it names a create: the
|
|
93
|
+
file's own columns are the upload's to fill, so there is nothing for a create to say but its label. Any other
|
|
94
|
+
list of the record's children offers its Add as a list view offers New — where this reader may add a row,
|
|
95
|
+
through the child's own New form, bound to the record — unless it says `create: false`, or adds
|
|
96
|
+
through the record's own verbs (`actions`) instead. */
|
|
97
|
+
const noun = (app ? (resourceOf(table)?.noun?.one ?? recordNoun(undefined, table?.name ?? section.from ?? '')) : (table?.name ?? '')).toLocaleLowerCase();
|
|
98
|
+
const create = section.noCreate
|
|
99
|
+
? undefined
|
|
100
|
+
: (section.create ??
|
|
101
|
+
(app && fileOf(table)
|
|
102
|
+
? { label: say('attachFiles') }
|
|
103
|
+
: app && !section.listActions && !section.similar && noun
|
|
104
|
+
? { label: say('addThing', { thing: noun }) }
|
|
105
|
+
: undefined));
|
|
106
|
+
/* `actions`: the record's own verbs that add to this list, in its head and not the record's (Page.tsx), each
|
|
107
|
+
offered as the head would offer it — granted, and while its condition holds. */
|
|
108
|
+
const placed = section.listActions && app && !context.preview && context.actions
|
|
109
|
+
? context.actions.list.filter((action) => section.listActions.includes(action.id))
|
|
110
|
+
: [];
|
|
111
|
+
const creation = create && table && state.schema
|
|
112
|
+
? relatedCreatePlan(state.schema, base.id, table.id, section.path ?? '', create, {
|
|
113
|
+
filter: section.filter,
|
|
114
|
+
})
|
|
115
|
+
: undefined;
|
|
116
|
+
const defaults = creation?.bindings && Object.fromEntries(creation.bindings.map((b) => [b.column, recordKey[b.parent]]));
|
|
117
|
+
/* An Add the list offers on its own stands back where the child needs another record this one cannot name (a work
|
|
118
|
+
order's bike, from its mechanic's page): the author's `create` still offers it, asking for that record. */
|
|
119
|
+
const offeredAlone = section.create === undefined && !(app && fileOf(table));
|
|
120
|
+
const canCreate = Boolean(!context.preview &&
|
|
121
|
+
app &&
|
|
122
|
+
table &&
|
|
123
|
+
!(offeredAlone && creation?.otherParents?.length) &&
|
|
124
|
+
canInsert(table) &&
|
|
125
|
+
defaults &&
|
|
126
|
+
Object.values(defaults).every((v) => typeof v === 'string' || typeof v === 'number'));
|
|
127
|
+
return { noun, create, placed, creation, defaults, canCreate, door: canCreate || placed.length > 0 };
|
|
128
|
+
}
|
|
129
|
+
/** Rows related to the root, a page at a time — the real list, not a sample of one. */
|
|
130
|
+
function RelatedList({ section, plan, base, recordKey, onEdit, collapsed }) {
|
|
131
|
+
const api = usePageApi();
|
|
132
|
+
const { preview, isCurrent, openRelated, connection, recordName, onActionDone, actions: recordActions } = useContext(PageRenderContext);
|
|
133
|
+
const queries = useQueryClient();
|
|
134
|
+
const [added, setAdded] = useState(false);
|
|
135
|
+
const createButton = useRef(null);
|
|
136
|
+
const table = findTable(section.from ?? '');
|
|
137
|
+
const columnsOf = () => Array.isArray(section.columns) && section.columns.length ? section.columns : (table?.columns ?? []).map((c) => c.name);
|
|
138
|
+
/* A grouped list's `limit` is the rows to a group, and its pages are of groups (PageGroups.tsx). */
|
|
139
|
+
const grouped = Boolean(section.group && plan.groups);
|
|
140
|
+
const limit = section.limit ?? (grouped ? GROUP_ROWS_DEFAULT : relatedRows());
|
|
141
|
+
const app = shell().inApp();
|
|
142
|
+
const presentation = useMemo(() => listRead(section, plan), [plan.view, section.limit, limit, table, app]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
143
|
+
const { view, labelColumns, keyColumns, labelColumn } = presentation;
|
|
144
|
+
/* A list of the record's own children holds the column that points back
|
|
145
|
+
at it to one value, the record the page is on: like a tab's
|
|
146
|
+
`status = new` in a summary (docs/design.md), it says nothing, so it is
|
|
147
|
+
left out while anything else is shown. A similar list is not held. */
|
|
148
|
+
const hidden = useMemo(() => {
|
|
149
|
+
const back = app && !section.similar && section.path && !section.path.includes('.') ? section.path : undefined;
|
|
150
|
+
const held = presentation.hidden;
|
|
151
|
+
const shown = columnsOf().filter((name) => !held.includes(name));
|
|
152
|
+
return back && shown.includes(back) && shown.length > 1 ? [...held, back] : held;
|
|
153
|
+
}, [presentation, app, section.similar, section.path, section.columns, table]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
154
|
+
const [offset, setOffset] = useState(0);
|
|
155
|
+
const [layout, setLayout] = useState('records');
|
|
156
|
+
/* A list of files waits for its drawing as it waits for its rows, in the section's own skeleton. */
|
|
157
|
+
const attachmentsHere = useArrived(AttachmentList, Boolean(app && fileOf(table)));
|
|
158
|
+
/* Cards and a gallery likewise: each is a part of its own, asked for beside the rows. */
|
|
159
|
+
const asCards = typeof section.presentation === 'object' && section.presentation.kind === 'cards';
|
|
160
|
+
const cardsHere = useArrived(CardsList, asCards);
|
|
161
|
+
const galleryHere = useArrived(Gallery, section.presentation === 'gallery');
|
|
162
|
+
const data = useQuery({
|
|
163
|
+
queryKey: ['page-list', view, offset],
|
|
164
|
+
queryFn: () => {
|
|
165
|
+
if (!view)
|
|
166
|
+
throw new Error(say('thisListHasNoView'));
|
|
167
|
+
return api('/api/view/run', { view, offset });
|
|
168
|
+
},
|
|
169
|
+
enabled: !plan.empty && Boolean(view) && !grouped,
|
|
170
|
+
staleTime: 0,
|
|
171
|
+
});
|
|
172
|
+
/* A grouped list asks its groups first, a page of them at a time; each group's rows follow (PageGroups.tsx). */
|
|
173
|
+
const groupsAsked = useQuery({
|
|
174
|
+
queryKey: ['page-list', 'groups', plan.groups, offset],
|
|
175
|
+
queryFn: () => api('/api/breakdown', groupsBody(plan.groups, offset)),
|
|
176
|
+
enabled: !plan.empty && grouped,
|
|
177
|
+
staleTime: 0,
|
|
178
|
+
/* A page of groups turned keeps the one standing until the next is in, so the box holds its height. */
|
|
179
|
+
placeholderData: keepPreviousData,
|
|
180
|
+
});
|
|
181
|
+
/* The footer's sums: one row measured over every related row, planned on
|
|
182
|
+
the server beside the list, so it counts past the page on screen. */
|
|
183
|
+
const sums = useQuery({
|
|
184
|
+
queryKey: ['page-list', 'totals', plan.totals],
|
|
185
|
+
queryFn: () => api('/api/breakdown', { def: plan.totals }),
|
|
186
|
+
enabled: !plan.empty && Boolean(plan.totals),
|
|
187
|
+
staleTime: 0,
|
|
188
|
+
});
|
|
189
|
+
/* A similar list is empty when the record has no value to match on — no
|
|
190
|
+
body type — and reads then as one that matched nothing: it has no
|
|
191
|
+
reference to be missing. */
|
|
192
|
+
/* Left out, or said in one line with its neighbours, while it has no rows, is the page's to decide: it alone sees
|
|
193
|
+
the lists beside this one (PageEmptyRun.tsx). The line asks this list for its Add alone, below. */
|
|
194
|
+
if (collapsed && plan.empty)
|
|
195
|
+
return null;
|
|
196
|
+
/* What the rows are called in a sentence: the section's title, or the table's name as the reader says it. */
|
|
197
|
+
const things = listThings(section);
|
|
198
|
+
const nothingYet = things ? say('common.noYet', { things }) : say('nothingHereYet');
|
|
199
|
+
if (plan.empty && section.similar) {
|
|
200
|
+
return (_jsx(SectionBox, { section: section, foldable: false, body: section.empty ? _jsx(ListEmpty, { spec: section.empty }) : _jsx(Empty, { className: "page-group-empty", text: nothingYet }) }));
|
|
201
|
+
}
|
|
202
|
+
/* The record names no parent to list through. Said as the reader would
|
|
203
|
+
say it — which reference is unset, and so what cannot be shown — with no
|
|
204
|
+
header row over nothing: "This record has no account_id to list
|
|
205
|
+
through" named a column, and the empty grid under it looked broken. */
|
|
206
|
+
if (plan.empty) {
|
|
207
|
+
const reference = section.of
|
|
208
|
+
? app
|
|
209
|
+
? (columnLabel(base.id, section.of) ?? humanName(section.of)).replace(/[\s_]+id$/i, '').toLocaleLowerCase()
|
|
210
|
+
: section.of
|
|
211
|
+
: 'reference';
|
|
212
|
+
return (_jsx(SectionBox, { section: section, foldable: false, body: _jsx(Empty, { text: say('noIsSetSoThere', { reference, things: things || say('recordsNoun') }) }) }));
|
|
213
|
+
}
|
|
214
|
+
if (!view)
|
|
215
|
+
return _jsx(SectionBox, { section: section, body: null, foldable: false, broken: say('thisListHasNoView') });
|
|
216
|
+
if ((grouped ? groupsAsked.isPending : data.isPending) ||
|
|
217
|
+
(!attachmentsHere && app && fileOf(table)) ||
|
|
218
|
+
(asCards && !cardsHere) ||
|
|
219
|
+
(section.presentation === 'gallery' && !galleryHere))
|
|
220
|
+
return _jsx(Loading, { section: section });
|
|
221
|
+
const asking = grouped ? groupsAsked : data;
|
|
222
|
+
if (asking.isError)
|
|
223
|
+
return _jsx(SectionBox, { section: section, body: null, foldable: false, broken: asking.error.message });
|
|
224
|
+
const groupsGot = grouped && groupsAsked.data && !('errors' in groupsAsked.data) ? groupsAsked.data : undefined;
|
|
225
|
+
/* A grouped list draws its rows group by group (PageGroups.tsx): the flat read below stands as an empty page. */
|
|
226
|
+
const got = grouped ? (groupsGot ? { view: view, columns: [], rows: [] } : undefined) : data.data;
|
|
227
|
+
if (!got || !('view' in got))
|
|
228
|
+
return _jsx(SectionBox, { section: section, body: null, foldable: false, broken: got?.errors[0]?.message ?? say('thisListCouldNotBeRead') });
|
|
229
|
+
/* Its children's names say the word that tells them apart, not the page's title again. */
|
|
230
|
+
const rows = app && !section.similar ? withoutParentName(got.rows, Object.values(labelColumns), recordName) : got.rows;
|
|
231
|
+
const summed = sums.data && 'rows' in sums.data ? (sums.data.rows?.[0] ?? {}) : undefined;
|
|
232
|
+
const totals = section.totals?.length && plan.totals
|
|
233
|
+
? Object.fromEntries(section.totals.map((column, i) => [column, summed ? (summed[`total_${i}`] ?? 0) : undefined]))
|
|
234
|
+
: undefined;
|
|
235
|
+
const noRows = grouped ? (groupsGot?.rows.length ?? 0) === 0 : rows.length === 0;
|
|
236
|
+
const authoredEmpty = offset === 0 && noRows && section.empty ? _jsx(ListEmpty, { spec: section.empty }) : undefined;
|
|
237
|
+
/* In an App an empty list is the empty sentence, not a header row over nothing. */
|
|
238
|
+
const plainEmpty = app && offset === 0 && noRows ? _jsx(Empty, { text: section.title ? nothingYet : say('noRelatedRecordsYet') }) : undefined;
|
|
239
|
+
/* A footer that sums more rows than the page shows says so: "Total" under
|
|
240
|
+
two rows that add up to less read as arithmetic gone wrong. */
|
|
241
|
+
const totalsLabel = totals && (got.more || offset > 0 || (got.total !== undefined && got.total > rows.length))
|
|
242
|
+
? got.total === undefined
|
|
243
|
+
? say('totalAllThings', { things: things || say('recordsNoun') })
|
|
244
|
+
: say('totalAllCountThings', { count: formatNumber(got.total), things: things || say('recordsNoun') })
|
|
245
|
+
: undefined;
|
|
246
|
+
const pinned = pinnedBy(view);
|
|
247
|
+
const recordForRow = (row, outputs = got.columns) => {
|
|
248
|
+
const key = recordViewKey(keyColumns, outputs, row);
|
|
249
|
+
// Inferred names live in the authored row. Explicit names must use only
|
|
250
|
+
// the private projection, so a colliding output cannot impersonate them.
|
|
251
|
+
const naming = table && recordLabel(table) === undefined ? row : {};
|
|
252
|
+
return {
|
|
253
|
+
key,
|
|
254
|
+
label: table ? rowLabel(table, { ...naming, ...pinned, ...key, ...recordViewLabel(labelColumn, outputs, row) }) : '',
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
/* The card's name as said on this page: without the page record's name
|
|
258
|
+
before it, and none where it is that name — a review file named by its
|
|
259
|
+
application's reference repeated the heading ("AL-1006" twice). The
|
|
260
|
+
foot's "View …" still opens it. */
|
|
261
|
+
const cardTitle = (label, page) => page?.trim() && label.trim() === page.trim() ? null : String(withoutParent(label, page));
|
|
262
|
+
/* The one current row as a card, or the card saying there is none. */
|
|
263
|
+
if (section.presentation === 'card' && table) {
|
|
264
|
+
const noun = (app ? (resourceOf(table)?.noun?.one ?? recordNoun(undefined, table.name)) : table.name).toLocaleLowerCase();
|
|
265
|
+
const shown = (got.columns ?? []).filter((name) => !hidden.includes(name));
|
|
266
|
+
const record = rows[0] ? recordForRow(rows[0]) : undefined;
|
|
267
|
+
return (_jsx("section", { className: `${sectionClass(section)} page-card-section`, children: _jsx(CurrentCard, { table: table, caption: section.title, row: rows[0], columns: shown, show: Array.isArray(section.columns) ? section.columns : undefined, referenceLabels: labelColumns, labels: section.labels, record: record, title: record && app ? cardTitle(record.label, recordName) : undefined, noun: noun,
|
|
268
|
+
/* Said with the record's noun, never the title: a title is a heading, not a noun ("In the shop now" said
|
|
269
|
+
"No in the shop now right now."). */
|
|
270
|
+
empty: authoredEmpty ?? _jsx(Empty, { text: say('noRightNow', { thing: noun }) }) }) }));
|
|
271
|
+
}
|
|
272
|
+
const summaries = app && table && keyColumns.length > 0 && rows.length > 0;
|
|
273
|
+
/* `rowActions`: each row's own verbs from a ⋯ at its end — the same menu a list view's row has. A verb on a
|
|
274
|
+
child moves the record too (a payment voided marks the order), so the page is read again after it. */
|
|
275
|
+
const offered = section.rowActions && app && !preview && table ? offeredBy(resourceOf(table)).actions : undefined;
|
|
276
|
+
const rowVerbs = offered?.some((action) => action.header !== false) && mayRunAny(shell().app(), table.id, offered) ? offered : undefined;
|
|
277
|
+
/* The list reads its key under its own output names (recordViewKey); a row's menu, like a list view's, names
|
|
278
|
+
its record by the table's own columns, so they ride on each row, kept out of sight. */
|
|
279
|
+
const keyNames = rowVerbs ? keyColumns.map(({ column }) => column).filter((column) => !(got.columns ?? []).includes(column)) : [];
|
|
280
|
+
const gridRows = rowVerbs ? rows.map((row) => ({ ...row, ...(recordViewKey(keyColumns, got.columns, row) ?? {}) })) : rows;
|
|
281
|
+
const hiddenColumns = new Set(hidden);
|
|
282
|
+
/* Related rows as cards: each row carries its key under its own column
|
|
283
|
+
names, which is what a card opens its record with. */
|
|
284
|
+
const drawn = typeof section.presentation === 'object' ? section.presentation : undefined;
|
|
285
|
+
const cards = drawn?.kind === 'cards' ? drawn : undefined;
|
|
286
|
+
/* An embedded custom list: its component draws the rows, each with its key under its own column names. */
|
|
287
|
+
const custom = drawn?.kind === 'custom' ? drawn : undefined;
|
|
288
|
+
const cardRows = drawn ? rows.map((row) => ({ ...row, ...(recordViewKey(keyColumns, got.columns, row) ?? {}) })) : [];
|
|
289
|
+
/* An embedded board or calendar is drawn by the App's own component, as the view draws it, held to this record: a
|
|
290
|
+
board reads each lane by its own query, so the record's condition is said in the query language. A list reached
|
|
291
|
+
through `of` names its rows by another record's key, so it keeps the rows read here. */
|
|
292
|
+
const lanes = section.lanes;
|
|
293
|
+
const heldKey = Object.values(recordKey);
|
|
294
|
+
const presented = lanes && table && app && shell().present && keyColumns.length
|
|
295
|
+
? shell().present({
|
|
296
|
+
presentation: lanes,
|
|
297
|
+
table,
|
|
298
|
+
data: { ...got, rows, table: table.id, ms: 0 },
|
|
299
|
+
entry: {
|
|
300
|
+
kind: 'table',
|
|
301
|
+
table: table.id,
|
|
302
|
+
query: section.of || section.similar || heldKey.length !== 1
|
|
303
|
+
? ''
|
|
304
|
+
: andQuery(section.filter, `${section.path} = ${quoteValue(heldKey[0])}`),
|
|
305
|
+
},
|
|
306
|
+
actions: undefined,
|
|
307
|
+
listLabel: section.title ?? spoken(table.name),
|
|
308
|
+
referenceLabels: labelColumns,
|
|
309
|
+
interactive: !preview,
|
|
310
|
+
recordNavigation: true,
|
|
311
|
+
list: undefined,
|
|
312
|
+
current: undefined,
|
|
313
|
+
order: undefined,
|
|
314
|
+
at: { page: 0, size: limit },
|
|
315
|
+
})
|
|
316
|
+
: null;
|
|
317
|
+
const paged = !grouped && !presented && (got.more || offset > 0);
|
|
318
|
+
const { create, placed, creation, defaults, canCreate } = relatedDoor(section, base, recordKey, { preview, actions: recordActions });
|
|
319
|
+
/* The New form a row of this list is added through: the child resource's own
|
|
320
|
+
(its captions, help, groups and narrowed pickers), asking what the create
|
|
321
|
+
shows, starting from the create's defaults, the list's equalities and the
|
|
322
|
+
record's own values it fills — and bound to the record, which it never asks. */
|
|
323
|
+
const createForm = async () => {
|
|
324
|
+
const own = resourceOf(table)?.form;
|
|
325
|
+
const bound = new Set(creation.bindings.map((b) => b.column));
|
|
326
|
+
const shown = [...(create.show ?? formShownFields(own) ?? creation.show)].filter((name) => !bound.has(name));
|
|
327
|
+
const fill = Object.entries(creation.fill ?? {});
|
|
328
|
+
let filled = {};
|
|
329
|
+
if (fill.length) {
|
|
330
|
+
/* The record's values, read as this reader reads them: a column they cannot read fills nothing. */
|
|
331
|
+
try {
|
|
332
|
+
const data = await coreApi('/api/query', {
|
|
333
|
+
...ownedBy(connection ?? state.activeConnection),
|
|
334
|
+
table: base.id,
|
|
335
|
+
columns: [...new Set(fill.map(([, parent]) => parent))],
|
|
336
|
+
filter: {
|
|
337
|
+
groups: [Object.entries(recordKey).map(([column, value]) => ({ column, op: '=', value: value }))],
|
|
338
|
+
},
|
|
339
|
+
limit: 1,
|
|
340
|
+
offset: 0,
|
|
341
|
+
});
|
|
342
|
+
const row = data.rows?.[0] ?? {};
|
|
343
|
+
filled = Object.fromEntries(fill.flatMap(([child, parent]) => (row[parent] === null || row[parent] === undefined ? [] : [[child, row[parent]]])));
|
|
344
|
+
}
|
|
345
|
+
catch {
|
|
346
|
+
filled = {};
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
return {
|
|
350
|
+
// A row added beside its record stays beside it: the drawer, whatever the resource's own New form opens as.
|
|
351
|
+
...(own ?? {}),
|
|
352
|
+
show: shown,
|
|
353
|
+
open: 'drawer',
|
|
354
|
+
// Steps carve the resource's own form; a create asks its own fields, on one page.
|
|
355
|
+
steps: create.show
|
|
356
|
+
? undefined
|
|
357
|
+
: own?.steps
|
|
358
|
+
?.map((step) => ({ ...step, fields: step.fields.filter((name) => shown.includes(name)) }))
|
|
359
|
+
.filter((step) => step.fields.length),
|
|
360
|
+
defaults: { ...(creation.defaults ?? {}), ...filled, ...defaults },
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
const refreshLists = () => void queries.invalidateQueries({
|
|
364
|
+
predicate: (query) => ['page-list', 'page-timeline', 'page-metric', 'page-breakdown'].includes(String(query.queryKey[0])),
|
|
365
|
+
});
|
|
366
|
+
/* A resource whose rows are files draws as attachments: each a download,
|
|
367
|
+
and, where the list may add, an upload bound to this record the way a
|
|
368
|
+
related New form is. The file's own columns are the upload's to fill. */
|
|
369
|
+
const file = app ? fileOf(table) : undefined;
|
|
370
|
+
const owner = connection ?? state.activeConnection;
|
|
371
|
+
/* Rename and Remove are offered where the server would accept them — the
|
|
372
|
+
catalog's own answer for this reader, as the record's Delete asks it —
|
|
373
|
+
and never in a preview, which writes nothing. */
|
|
374
|
+
const nameColumn = file && table ? table.columns.find((column) => column.name === file.name) : undefined;
|
|
375
|
+
const connectionWritable = Boolean(state.connections?.some((c) => c.id === owner && c.writable));
|
|
376
|
+
const renamable = Boolean(!preview &&
|
|
377
|
+
file &&
|
|
378
|
+
table &&
|
|
379
|
+
nameColumn &&
|
|
380
|
+
!nameColumn.primaryKey &&
|
|
381
|
+
nameColumn.writable !== false &&
|
|
382
|
+
!table.isView &&
|
|
383
|
+
writeAllowed(table.id) &&
|
|
384
|
+
connectionWritable);
|
|
385
|
+
/* A grouped list's rows move between groups, and to their place in a ranked one (groupMoves.tsx), on the board's
|
|
386
|
+
two paths: an ordinary update of the grouped column where this reader may write it, else the one command of the
|
|
387
|
+
row's own that takes the group (`moveToSprint` with `{ sprint }`), asked nothing more. A ranked list is one read
|
|
388
|
+
in a single number column, ascending, that the reader may write, as a list view's hand order is. */
|
|
389
|
+
const groupMoves = (() => {
|
|
390
|
+
const by = section.group?.by;
|
|
391
|
+
if (!grouped || !app || preview || !table || !by || by.includes('.') || !keyColumns.length || table.isView)
|
|
392
|
+
return undefined;
|
|
393
|
+
const may = (name) => {
|
|
394
|
+
const column = table.columns.find((c) => c.name === name);
|
|
395
|
+
return Boolean(column &&
|
|
396
|
+
!column.primaryKey &&
|
|
397
|
+
column.writable !== false &&
|
|
398
|
+
column.changesBy !== 'actions' &&
|
|
399
|
+
writeAllowed(table.id) &&
|
|
400
|
+
connectionWritable);
|
|
401
|
+
};
|
|
402
|
+
const parent = state.schema
|
|
403
|
+
? groupTable(state.schema, { from: table.id, group: section.group })
|
|
404
|
+
: undefined;
|
|
405
|
+
const write = async (key, values, expected) => {
|
|
406
|
+
if (isCurrent && !isCurrent())
|
|
407
|
+
return { message: say('thisPageHasMoved'), refused: false };
|
|
408
|
+
const outcome = await updateAttempts.run({ connection: owner ?? null, table: table.id, key }, values, () => coreApi('/api/update', { ...ownedBy(owner), table: table.id, key: checkedKey(key), values, expected }));
|
|
409
|
+
return outcome.kind === 'applied'
|
|
410
|
+
? null
|
|
411
|
+
: { message: outcome.message ?? '', refused: outcome.kind === 'rejected' || outcome.kind === 'blocked' };
|
|
412
|
+
};
|
|
413
|
+
const verb = may(by)
|
|
414
|
+
? undefined
|
|
415
|
+
: (offeredBy(resourceOf(table))?.actions ?? [])
|
|
416
|
+
.flatMap((action) => {
|
|
417
|
+
if (action.command === undefined)
|
|
418
|
+
return [];
|
|
419
|
+
const takes = action.command.input.filter((field) => field.name === by || (field.type === 'reference' && parent !== undefined && field.from === parent.id));
|
|
420
|
+
const rest = action.command.input.filter((field) => !takes.includes(field) && 'required' in field && field.required);
|
|
421
|
+
const run = takes.length === 1 && !rest.length ? shell().slots.recordCommand?.(action.command, String(action.label)) : undefined;
|
|
422
|
+
return run ? [{ run, input: takes[0].name, required: Boolean(takes[0].required) }] : [];
|
|
423
|
+
})
|
|
424
|
+
.at(0);
|
|
425
|
+
if (!may(by) && !verb)
|
|
426
|
+
return undefined;
|
|
427
|
+
const order = (view?.orderBy ?? []);
|
|
428
|
+
const sort = order.length === 1 ? order[0] : undefined;
|
|
429
|
+
const rankColumn = sort && sort.direction !== 'desc' ? table.columns.find((c) => c.name === sort.path) : undefined;
|
|
430
|
+
const ranked = rankColumn && may(rankColumn.name) && /int|real|num|dec|double|float|serial/i.test(rankColumn.type ?? '') ? rankColumn : undefined;
|
|
431
|
+
return {
|
|
432
|
+
keyOf: (row, columns) => {
|
|
433
|
+
const key = recordViewKey(keyColumns, columns, row);
|
|
434
|
+
const id = key ? rowKeyString(table, key) : null;
|
|
435
|
+
return key && id ? { key, id } : null;
|
|
436
|
+
},
|
|
437
|
+
labelOf: (row, columns) => recordForRow(row, [...columns]).label,
|
|
438
|
+
enters: (key) => (key === null || key === undefined ? may(by) || (verb !== undefined && !verb.required) : true),
|
|
439
|
+
regroup: async (key, _label, from, to) => {
|
|
440
|
+
if (verb) {
|
|
441
|
+
const outcome = await verb.run(key, { [verb.input]: to ?? null });
|
|
442
|
+
// A refusal is said where it was refused (the command's own pipeline).
|
|
443
|
+
return outcome.status === 'applied' || outcome.status === 'done' ? null : '';
|
|
444
|
+
}
|
|
445
|
+
const failed = await write(key, { [by]: (to ?? null) }, { [by]: (from ?? null) });
|
|
446
|
+
return failed ? failed.message : null;
|
|
447
|
+
},
|
|
448
|
+
...(ranked
|
|
449
|
+
? {
|
|
450
|
+
rank: {
|
|
451
|
+
column: ranked.name,
|
|
452
|
+
whole: wholeColumn(ranked.type),
|
|
453
|
+
write: (key, _label, value, expected) => write(key, { [ranked.name]: value }, { [ranked.name]: (expected ?? null) }),
|
|
454
|
+
},
|
|
455
|
+
}
|
|
456
|
+
: {}),
|
|
457
|
+
done: async () => {
|
|
458
|
+
await queries.invalidateQueries({
|
|
459
|
+
predicate: (query) => ['page-list', 'page-timeline', 'page-metric', 'page-breakdown'].includes(String(query.queryKey[0])),
|
|
460
|
+
});
|
|
461
|
+
void shell().undo.refresh();
|
|
462
|
+
countsChanged();
|
|
463
|
+
},
|
|
464
|
+
};
|
|
465
|
+
})();
|
|
466
|
+
const removable = Boolean(!preview && file && table && canDelete(table));
|
|
467
|
+
const renameFile = async (rowKey, next, original) => {
|
|
468
|
+
if (!table || !file || (isCurrent && !isCurrent()))
|
|
469
|
+
return say('thisPageHasMoved');
|
|
470
|
+
const values = { [file.name]: next };
|
|
471
|
+
const outcome = await updateAttempts.run({ connection: owner ?? null, table: table.id, key: rowKey }, values, () => coreApi('/api/update', { ...ownedBy(owner), table: table.id, key: checkedKey(rowKey), values, expected: { [file.name]: original } }));
|
|
472
|
+
if (outcome.kind !== 'applied')
|
|
473
|
+
return outcome.message;
|
|
474
|
+
void shell().undo.refresh();
|
|
475
|
+
refreshLists();
|
|
476
|
+
return null;
|
|
477
|
+
};
|
|
478
|
+
const removeFile = async (rowKey) => {
|
|
479
|
+
if (!table || (isCurrent && !isCurrent()))
|
|
480
|
+
return say('thisPageHasMovedOn');
|
|
481
|
+
try {
|
|
482
|
+
const result = (await coreApi('/api/delete', { ...ownedBy(owner), table: table.id, key: checkedKey(rowKey), confirm: true }));
|
|
483
|
+
if (result?.deleted !== true || result.errors?.length)
|
|
484
|
+
return result?.errors?.[0]?.message ?? say('theFileWasNotRemoved');
|
|
485
|
+
refreshLists();
|
|
486
|
+
countsChanged();
|
|
487
|
+
return null;
|
|
488
|
+
}
|
|
489
|
+
catch (error) {
|
|
490
|
+
return error.message;
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
const lease = filesOnLease();
|
|
494
|
+
const attachments = file && table
|
|
495
|
+
? rows.flatMap((row) => {
|
|
496
|
+
const rowKey = recordViewKey(keyColumns, got.columns, row);
|
|
497
|
+
if (!rowKey)
|
|
498
|
+
return [];
|
|
499
|
+
const name = String(row[file.name] ?? '') || rowLabel(table, { ...pinned, ...rowKey, ...recordViewLabel(labelColumn, got.columns, row) });
|
|
500
|
+
const meta = (got.columns ?? [])
|
|
501
|
+
.filter((column) => ![file.name, file.content, file.type, file.thumbnail].includes(column) &&
|
|
502
|
+
!keyColumns.some((key) => key.column === column) &&
|
|
503
|
+
!hidden.includes(column) &&
|
|
504
|
+
row[column] != null &&
|
|
505
|
+
row[column] !== '')
|
|
506
|
+
.map((column) => column === file.size ? formatBytes(Number(row[column])) : (formatRelativeDay(String(row[column])) ?? String(row[column])));
|
|
507
|
+
const href = served(`/api/file?${new URLSearchParams({ ...ownedBy(owner), table: table.id, key: JSON.stringify(rowKey) })}`);
|
|
508
|
+
const type = file.type && typeof row[file.type] === 'string' ? row[file.type] : undefined;
|
|
509
|
+
return [
|
|
510
|
+
{
|
|
511
|
+
id: JSON.stringify(rowKey),
|
|
512
|
+
name,
|
|
513
|
+
href,
|
|
514
|
+
meta,
|
|
515
|
+
...(type ? { type } : {}),
|
|
516
|
+
inline: inlineFileAddress(table.id, rowKey, owner),
|
|
517
|
+
...(lease ? { save: () => saveFileOnLease(table.id, rowKey) } : {}),
|
|
518
|
+
onOpen: () => void openRecord(table.id, rowKey, name),
|
|
519
|
+
...(renamable
|
|
520
|
+
? { rename: (next) => renameFile(rowKey, next, row[file.name] == null ? null : String(row[file.name])) }
|
|
521
|
+
: {}),
|
|
522
|
+
...(removable ? { remove: () => removeFile(rowKey) } : {}),
|
|
523
|
+
},
|
|
524
|
+
];
|
|
525
|
+
})
|
|
526
|
+
: [];
|
|
527
|
+
/* A caption is words: a reference (the building the photo hangs from) or a number (its place in the order) says
|
|
528
|
+
nothing under a picture, and read as "· 1 · 1". */
|
|
529
|
+
const captions = (column) => {
|
|
530
|
+
const meta = table?.columns.find((candidate) => candidate.name === column);
|
|
531
|
+
return Boolean(meta && !meta.references && columnKind(meta.type) === 'text');
|
|
532
|
+
};
|
|
533
|
+
/* A gallery is the same rows as photos, drawn in place through the file
|
|
534
|
+
route's inline mode; the shown columns that are not the file's own are
|
|
535
|
+
each photo's caption. A resource whose rows are not files keeps its grid. */
|
|
536
|
+
const gallery =
|
|
537
|
+
/* On a tenant lease a photo has no address to draw in place (fileSource.ts): the files are listed instead. */
|
|
538
|
+
section.presentation === 'gallery' && file && table && !lease
|
|
539
|
+
? rows.flatMap((row) => {
|
|
540
|
+
const rowKey = recordViewKey(keyColumns, got.columns, row);
|
|
541
|
+
if (!rowKey)
|
|
542
|
+
return [];
|
|
543
|
+
const words = (got.columns ?? [])
|
|
544
|
+
.filter((column) => ![file.name, file.content, file.type, file.size, file.thumbnail].includes(column) &&
|
|
545
|
+
!keyColumns.some((key) => key.column === column) &&
|
|
546
|
+
!hidden.includes(column) &&
|
|
547
|
+
row[column] != null &&
|
|
548
|
+
row[column] !== '' &&
|
|
549
|
+
captions(column))
|
|
550
|
+
.map((column) => String(row[column]));
|
|
551
|
+
const alt = words[0] ?? String(row[file.name] ?? '');
|
|
552
|
+
return [
|
|
553
|
+
{
|
|
554
|
+
id: JSON.stringify(rowKey),
|
|
555
|
+
src: inlineFileAddress(table.id, rowKey, owner),
|
|
556
|
+
...(file.thumbnail ? { thumb: inlineFileAddress(table.id, rowKey, owner, 'thumb') } : {}),
|
|
557
|
+
alt,
|
|
558
|
+
...(words.length ? { caption: words.join(' · ') } : {}),
|
|
559
|
+
},
|
|
560
|
+
];
|
|
561
|
+
})
|
|
562
|
+
: undefined;
|
|
563
|
+
const send = async (picked) => {
|
|
564
|
+
if (!table || (isCurrent && !isCurrent()))
|
|
565
|
+
return say('thisPageHasMovedOnNothing');
|
|
566
|
+
try {
|
|
567
|
+
/* The encoder is the attachment list's, here since its Attach button was. */
|
|
568
|
+
const { fileToBase64 } = await import('./AttachmentList.js');
|
|
569
|
+
/* The file's row starts as a New from this list would: the create's
|
|
570
|
+
defaults and the list's equalities, then the binding to this record. */
|
|
571
|
+
const data = (await coreApi('/api/file/upload', {
|
|
572
|
+
table: table.id,
|
|
573
|
+
values: { ...creation.defaults, ...defaults },
|
|
574
|
+
...ownedBy(connection),
|
|
575
|
+
file: { name: picked.name, type: picked.type, data: await fileToBase64(picked) },
|
|
576
|
+
}));
|
|
577
|
+
if (data?.errors?.length)
|
|
578
|
+
return data.errors[0].message;
|
|
579
|
+
setOffset(0);
|
|
580
|
+
refreshLists();
|
|
581
|
+
return null;
|
|
582
|
+
}
|
|
583
|
+
catch (error) {
|
|
584
|
+
return error.message;
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
/* The list's verbs stand in its heading's row, after the heading, and go under it where the column is narrow,
|
|
588
|
+
from the same edge: an aside's related list kept them on a row of their own, pushed to the far side. */
|
|
589
|
+
/* A placed verb is the App's (Actions.tsx), and an embedded list's own component with the page's side of
|
|
590
|
+
@mistriwork/mistri/ui (sdk/CustomList.tsx): each drawn through the shell's slot. */
|
|
591
|
+
const { ActionBar, CustomList } = shell().slots;
|
|
592
|
+
const tools = (canCreate && !file) || placed.length > 0 ? (_jsxs("div", { className: "page-related-create", children: [added && _jsx("span", { role: "status", children: say('recordAdded') }), placed.length > 0 && ActionBar && (_jsx(ActionBar, { tableId: base.id, actions: placed, recordKey: recordKey, label: recordName ?? '', matches: recordActions.matches, queryScope: recordActions.queryScope, isCurrent: isCurrent, only: section.listActions, quiet: true, canUpdate: recordActions.canUpdate, grantedCommands: recordActions.grantedCommands, grantedActions: recordActions.grantedActions, onDone: () => {
|
|
593
|
+
refreshLists();
|
|
594
|
+
/* The record moved too (its counts, its stage): read again as the head's own verbs read it. */
|
|
595
|
+
if (onActionDone)
|
|
596
|
+
onActionDone();
|
|
597
|
+
else
|
|
598
|
+
onEdit({ inPlace: false });
|
|
599
|
+
} })), canCreate && !file && (_jsxs("button", { type: "button", className: "ghost", ref: createButton, onClick: () => {
|
|
600
|
+
if (isCurrent && !isCurrent())
|
|
601
|
+
return;
|
|
602
|
+
setAdded(false);
|
|
603
|
+
void createForm().then((form) => isCurrent && !isCurrent()
|
|
604
|
+
? undefined
|
|
605
|
+
: (openRelated ?? openRelatedRecord)(table, form, () => {
|
|
606
|
+
if (isCurrent && !isCurrent())
|
|
607
|
+
return;
|
|
608
|
+
setAdded(true);
|
|
609
|
+
setOffset(0);
|
|
610
|
+
void queries.invalidateQueries({
|
|
611
|
+
predicate: (query) => ['page-list', 'page-timeline', 'page-metric', 'page-breakdown'].includes(String(query.queryKey[0])),
|
|
612
|
+
});
|
|
613
|
+
createButton.current?.focus();
|
|
614
|
+
}));
|
|
615
|
+
}, children: ["+ ", create.label] }))] })) : undefined;
|
|
616
|
+
/* An empty list said in one line: only its Add stands there, an upload for a list of files. */
|
|
617
|
+
if (collapsed)
|
|
618
|
+
return file && canCreate ? (_jsx(AttachmentList, { items: [], empty: false, emptyText: "", upload: { label: create.label, maxBytes: file.maxBytes ?? FILE_MAX_BYTES_DEFAULT, send } })) : ((tools ?? null));
|
|
619
|
+
return (_jsx(SectionBox, { section: section, foldable: false, tools: tools, body: _jsxs("div", { className: "page-list-body", children: [(file ? undefined : authoredEmpty) ??
|
|
620
|
+
(grouped && groupsGot && view ? (_jsx(GroupedBody, { section: section, groups: groupsGot, offset: offset, perPage: section.group?.limit ?? GROUPS_DEFAULT, onOffset: setOffset, view: view, labelColumns: labelColumns, rowsPerGroup: limit, ...(groupMoves ? { moves: groupMoves } : {}), overall: summed && totals
|
|
621
|
+
? { label: say('totalAllThings', { things: things || say('recordsNoun') }), sums: totals }
|
|
622
|
+
: undefined, grid: (data, subtotals, subtotalsLabel) => {
|
|
623
|
+
/* Each group's table draws the same ⋯ an ungrouped list does: its own rows carry their keys, and
|
|
624
|
+
the host/menu pair belongs to this table alone, so one group's menu never reaches another's. */
|
|
625
|
+
const keyed = rowVerbs || groupMoves;
|
|
626
|
+
const groupKeys = keyed
|
|
627
|
+
? keyColumns.map(({ column }) => column).filter((column) => !(data.columns ?? []).includes(column))
|
|
628
|
+
: [];
|
|
629
|
+
const groupRows = keyed
|
|
630
|
+
? (data.rows ?? []).map((row) => ({
|
|
631
|
+
...row,
|
|
632
|
+
...(recordViewKey(keyColumns, data.columns ?? [], row) ?? {}),
|
|
633
|
+
}))
|
|
634
|
+
: data.rows;
|
|
635
|
+
const table_ = (_jsx(Grid, { table: table, sizing: section.sizing, data: keyed ? { ...data, rows: groupRows, columns: [...(data.columns ?? []), ...groupKeys] } : data, hide: [...hidden, ...groupFactPaths(section), ...groupKeys, '__rank'], referenceLabels: labelColumns, totals: subtotals, totalsLabel: subtotalsLabel, interactive: false, virtual: false, dropColumns: true, emptyText: say('noRelatedRecordsYet'), onRowClick: table && keyColumns.length
|
|
636
|
+
? (row) => {
|
|
637
|
+
const record = recordForRow(row, data.columns ?? []);
|
|
638
|
+
if (record.key)
|
|
639
|
+
void openRecord(table.id, record.key, record.label);
|
|
640
|
+
}
|
|
641
|
+
: undefined }));
|
|
642
|
+
return rowVerbs ? (_jsxs(RowTrailHosts, { children: [_jsx(RowActions, { table: table, rows: groupRows, actions: rowVerbs, onDone: () => {
|
|
643
|
+
refreshLists();
|
|
644
|
+
onActionDone?.();
|
|
645
|
+
} }), table_] })) : (table_);
|
|
646
|
+
} })) : presented ? (presented.element) : custom && table && CustomList ? (cardRows.length ? (_jsx(CustomList, { table: table, rows: cardRows, spec: custom, interactive: !preview, label: section.title ?? spoken(table.name), page: { index: Math.floor(offset / Math.max(1, limit)), size: limit } })) : (_jsx(Empty, { className: "page-group-empty", text: nothingYet }))) : cards && table ? (cardRows.length ? (_jsx(CardsList, { table: table, rows: cardRows, spec: cards, label: section.title ?? spoken(table.name) })) : (_jsx(Empty, { className: "page-group-empty", text: nothingYet }))) : gallery ? (_jsxs(_Fragment, { children: [canCreate && (_jsx(AttachmentList, { items: [], empty: false, emptyText: "", upload: { label: create.label, maxBytes: file.maxBytes ?? FILE_MAX_BYTES_DEFAULT, send } })), _jsx(Gallery, { items: gallery, label: section.title ?? say('photos'), emptyText: section.title ? say('common.noYet', { things: section.title.toLocaleLowerCase() }) : say('noPhotosYet') })] })) : file ? (_jsx(AttachmentList, { items: attachments, empty: authoredEmpty, emptyText: section.title ? say('common.noYet', { things: section.title.toLocaleLowerCase() }) : say('noFilesYet'), upload: canCreate ? { label: create.label, maxBytes: file.maxBytes ?? FILE_MAX_BYTES_DEFAULT, send } : undefined })) : ((plainEmpty ?? (_jsxs("div", { className: summaries ? `responsive-results page-related-results show-${layout}` : undefined, children: [summaries && (_jsxs(_Fragment, { children: [_jsx(PresentationSwitch, { layout: layout, onChange: setLayout, label: say('common.listPresentation'), records: say('common.records'), table: say('common.table') }), _jsx(RecordSummaries, { table: table, data: { ...got, rows }, columns: got.columns.filter((name) => !hiddenColumns.has(name)), referenceLabels: labelColumns, parent: !section.similar && section.path && !section.path.includes('.') ? section.path : undefined, recordForRow: section.similar
|
|
647
|
+
? recordForRow
|
|
648
|
+
: (row) => {
|
|
649
|
+
const record = recordForRow(row);
|
|
650
|
+
return { ...record, label: withoutParent(record.label, recordName) };
|
|
651
|
+
} })] })), _jsx("div", { className: "result-table", children: ((grid) => rowVerbs ? (_jsxs(RowTrailHosts, { children: [_jsx(RowActions, { table: table, rows: gridRows, actions: rowVerbs, onDone: () => {
|
|
652
|
+
refreshLists();
|
|
653
|
+
onActionDone?.();
|
|
654
|
+
} }), grid] })) : (grid))(_jsx(Grid, { table: table, sizing: section.sizing, data: { ...got, rows: gridRows, columns: [...(got.columns ?? columnsOf()), ...keyNames] }, hide: keyNames.length ? [...hidden, ...keyNames] : hidden, referenceLabels: labelColumns, totals: totals, totalsLabel: totalsLabel, interactive: false, virtual: false,
|
|
655
|
+
/* Beside an aside the main column is narrow: columns past the room are left out, the name and status kept, rather than cut at the edge. */
|
|
656
|
+
dropColumns: true, emptyText: app
|
|
657
|
+
? section.title
|
|
658
|
+
? say('common.noYet', { things: section.title.toLocaleLowerCase() })
|
|
659
|
+
: say('noRelatedRecordsYet')
|
|
660
|
+
: say('noForThisRecord', { name: table?.name ?? section.from ?? '' }), onRowClick: table && keyColumns.length
|
|
661
|
+
? (row) => {
|
|
662
|
+
const record = recordForRow(row);
|
|
663
|
+
if (record.key)
|
|
664
|
+
void openRecord(table.id, record.key, record.label);
|
|
665
|
+
}
|
|
666
|
+
: undefined })) })] }))))), paged && (_jsx("div", { className: "page-pager", children: _jsxs("span", { className: "step-control", children: [_jsx("button", { type: "button", className: "step-button", "aria-label": say('previousRows'), disabled: offset === 0, onClick: () => setOffset(Math.max(0, offset - limit)), children: _jsx(Icon, { name: "caret-left", size: 16 }) }), _jsx("span", { className: "page-range step-position", children: `${formatNumber(offset + 1)}–${formatNumber(offset + rows.length)}${got.total === undefined ? '' : say('common.ofTotal', { total: formatNumber(got.total) })}` }), _jsx("button", { type: "button", className: "step-button", "aria-label": say('moreRows'), disabled: !got.more, onClick: () => setOffset(offset + limit), children: _jsx(Icon, { name: "caret-right", size: 16 }) })] }) }))] }) }));
|
|
667
|
+
}
|