@mistriwork/kit 1.0.0-rc.11 → 1.0.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/actionGrants.d.ts +21 -0
- package/dist/client/actionGrants.js +24 -0
- package/dist/client/addressMount.d.ts +67 -0
- package/dist/client/addressMount.js +136 -0
- package/dist/client/app.d.ts +10 -0
- package/dist/client/app.js +976 -0
- package/dist/client/boot.d.ts +1 -0
- package/dist/client/boot.js +37 -0
- package/dist/client/brandLook.css +125 -0
- package/dist/client/breakdownBatch.d.ts +34 -0
- package/dist/client/breakdownBatch.js +115 -0
- package/dist/client/bulkActions.d.ts +66 -0
- package/dist/client/bulkActions.js +171 -0
- package/dist/client/chart.d.ts +20 -0
- package/dist/client/chart.js +80 -0
- package/dist/client/clauses.d.ts +121 -0
- package/dist/client/clauses.js +276 -0
- package/dist/client/columns.d.ts +77 -0
- package/dist/client/columns.js +102 -0
- package/dist/client/components/Accordion.d.ts +26 -0
- package/dist/client/components/Accordion.js +44 -0
- package/dist/client/components/ApiOperations.d.ts +3 -0
- package/dist/client/components/ApiOperations.js +162 -0
- package/dist/client/components/AppColumnMenu.d.ts +66 -0
- package/dist/client/components/AppColumnMenu.js +59 -0
- package/dist/client/components/AppColumnMenuPopups.d.ts +21 -0
- package/dist/client/components/AppColumnMenuPopups.js +92 -0
- package/dist/client/components/AppFooter.css +17 -0
- package/dist/client/components/AppFooter.d.ts +23 -0
- package/dist/client/components/AppFooter.js +12 -0
- package/dist/client/components/AppIssues.d.ts +4 -0
- package/dist/client/components/AppIssues.js +18 -0
- package/dist/client/components/AppList.d.ts +20 -0
- package/dist/client/components/AppList.js +696 -0
- package/dist/client/components/AttachmentList.d.ts +45 -0
- package/dist/client/components/AttachmentList.js +178 -0
- package/dist/client/components/BoardList.css +9 -0
- package/dist/client/components/Breakdown.d.ts +11 -0
- package/dist/client/components/Breakdown.js +157 -0
- package/dist/client/components/BreakdownRoom.d.ts +4 -0
- package/dist/client/components/BreakdownRoom.js +48 -0
- package/dist/client/components/CardsList.d.ts +23 -0
- package/dist/client/components/CardsList.js +209 -0
- package/dist/client/components/Chart.css +165 -0
- package/dist/client/components/Chart.d.ts +194 -0
- package/dist/client/components/Chart.js +801 -0
- package/dist/client/components/ChartFigure.d.ts +82 -0
- package/dist/client/components/ChartFigure.js +102 -0
- package/dist/client/components/ChartShapes.css +213 -0
- package/dist/client/components/ChartShapes.d.ts +63 -0
- package/dist/client/components/ChartShapes.js +393 -0
- package/dist/client/components/Checklist.css +16 -0
- package/dist/client/components/Composer.d.ts +1 -0
- package/dist/client/components/Composer.js +331 -0
- package/dist/client/components/Content.d.ts +8 -0
- package/dist/client/components/Content.js +170 -0
- package/dist/client/components/CountedLabel.d.ts +10 -0
- package/dist/client/components/CountedLabel.js +26 -0
- package/dist/client/components/Crumbs.d.ts +11 -0
- package/dist/client/components/Crumbs.js +142 -0
- package/dist/client/components/DashboardList.css +7 -0
- package/dist/client/components/DashboardList.d.ts +9 -0
- package/dist/client/components/DashboardList.js +46 -0
- package/dist/client/components/DashboardNote.d.ts +21 -0
- package/dist/client/components/DashboardNote.js +22 -0
- package/dist/client/components/DateField.css +6 -0
- package/dist/client/components/DateField.d.ts +7 -0
- package/dist/client/components/DateField.js +27 -0
- package/dist/client/components/DefinedFields.d.ts +50 -0
- package/dist/client/components/DefinedFields.js +186 -0
- package/dist/client/components/DeleteButton.d.ts +30 -0
- package/dist/client/components/DeleteButton.js +198 -0
- package/dist/client/components/Diagram.d.ts +7 -0
- package/dist/client/components/Diagram.js +320 -0
- package/dist/client/components/Dressed.d.ts +31 -0
- package/dist/client/components/Dressed.js +138 -0
- package/dist/client/components/Dropdown.d.ts +14 -0
- package/dist/client/components/Dropdown.js +20 -0
- package/dist/client/components/EditLayoutButton.d.ts +13 -0
- package/dist/client/components/EditLayoutButton.js +7 -0
- package/dist/client/components/Editable.d.ts +47 -0
- package/dist/client/components/Editable.js +422 -0
- package/dist/client/components/ErrorBoundary.d.ts +40 -0
- package/dist/client/components/ErrorBoundary.js +41 -0
- package/dist/client/components/Export.d.ts +15 -0
- package/dist/client/components/Export.js +151 -0
- package/dist/client/components/ExportHold.d.ts +18 -0
- package/dist/client/components/ExportHold.js +30 -0
- package/dist/client/components/FavoriteStar.d.ts +5 -0
- package/dist/client/components/FavoriteStar.js +14 -0
- package/dist/client/components/FieldArranger.d.ts +29 -0
- package/dist/client/components/FieldArranger.js +83 -0
- package/dist/client/components/FilePreview.css +20 -0
- package/dist/client/components/FilePreview.d.ts +26 -0
- package/dist/client/components/FilePreview.js +170 -0
- package/dist/client/components/FilterBoxes.d.ts +76 -0
- package/dist/client/components/FilterBoxes.js +294 -0
- package/dist/client/components/FilterRail.css +100 -0
- package/dist/client/components/FilterRail.d.ts +61 -0
- package/dist/client/components/FilterRail.js +559 -0
- package/dist/client/components/Gallery.d.ts +11 -0
- package/dist/client/components/Gallery.js +53 -0
- package/dist/client/components/Grid.d.ts +122 -0
- package/dist/client/components/Grid.js +1115 -0
- package/dist/client/components/GridCellEditor.d.ts +35 -0
- package/dist/client/components/GridCellEditor.js +291 -0
- package/dist/client/components/GridSelection.d.ts +16 -0
- package/dist/client/components/GridSelection.js +28 -0
- package/dist/client/components/HelpPanel.d.ts +5 -0
- package/dist/client/components/HelpPanel.js +92 -0
- package/dist/client/components/History.d.ts +10 -0
- package/dist/client/components/History.js +22 -0
- package/dist/client/components/Icon.d.ts +31 -0
- package/dist/client/components/Icon.js +20 -0
- package/dist/client/components/JsonPreview.d.ts +5 -0
- package/dist/client/components/JsonPreview.js +25 -0
- package/dist/client/components/JsonValue.d.ts +4 -0
- package/dist/client/components/JsonValue.js +3 -0
- package/dist/client/components/JsonView.css +109 -0
- package/dist/client/components/JsonView.d.ts +3 -0
- package/dist/client/components/JsonView.js +118 -0
- package/dist/client/components/Landing.d.ts +19 -0
- package/dist/client/components/Landing.js +55 -0
- package/dist/client/components/LandingSurface.css +177 -0
- package/dist/client/components/LandingSurface.d.ts +42 -0
- package/dist/client/components/LandingSurface.js +108 -0
- package/dist/client/components/LayoutBuilder.d.ts +36 -0
- package/dist/client/components/LayoutBuilder.js +104 -0
- package/dist/client/components/Lightbox.d.ts +29 -0
- package/dist/client/components/Lightbox.js +62 -0
- package/dist/client/components/ListEmpty.css +13 -0
- package/dist/client/components/ListEmpty.d.ts +10 -0
- package/dist/client/components/ListEmpty.js +8 -0
- package/dist/client/components/ListFilterBar.css +76 -0
- package/dist/client/components/ListFilterBar.d.ts +52 -0
- package/dist/client/components/ListFilterBar.js +304 -0
- package/dist/client/components/LiveNotices.css +105 -0
- package/dist/client/components/LiveNotices.d.ts +26 -0
- package/dist/client/components/LiveNotices.js +211 -0
- package/dist/client/components/MinorMoneyInput.d.ts +26 -0
- package/dist/client/components/MinorMoneyInput.js +50 -0
- package/dist/client/components/Modal.css +3 -0
- package/dist/client/components/MultiStepForm.css +122 -0
- package/dist/client/components/MultiStepForm.d.ts +59 -0
- package/dist/client/components/MultiStepForm.js +216 -0
- package/dist/client/components/NavGlyph.d.ts +14 -0
- package/dist/client/components/NavGlyph.js +27 -0
- package/dist/client/components/Nested.d.ts +21 -0
- package/dist/client/components/Nested.js +86 -0
- package/dist/client/components/NewRecord.d.ts +89 -0
- package/dist/client/components/NewRecord.js +897 -0
- package/dist/client/components/NewRecordButton.d.ts +13 -0
- package/dist/client/components/NewRecordButton.js +28 -0
- package/dist/client/components/Notes.css +39 -0
- package/dist/client/components/Notes.d.ts +59 -0
- package/dist/client/components/Notes.js +96 -0
- package/dist/client/components/OverflowMenu.d.ts +3 -0
- package/dist/client/components/OverflowMenu.js +60 -0
- package/dist/client/components/Page.d.ts +52 -0
- package/dist/client/components/Page.js +237 -0
- package/dist/client/components/PageCurrent.d.ts +38 -0
- package/dist/client/components/PageCurrent.js +27 -0
- package/dist/client/components/PageEmptyRun.d.ts +18 -0
- package/dist/client/components/PageEmptyRun.js +118 -0
- package/dist/client/components/PageFields.d.ts +3 -0
- package/dist/client/components/PageFields.js +294 -0
- package/dist/client/components/PageFlowDiagram.css +193 -0
- package/dist/client/components/PageFlowDiagram.d.ts +95 -0
- package/dist/client/components/PageFlowDiagram.js +276 -0
- package/dist/client/components/PageFlows.css +27 -0
- package/dist/client/components/PageFlows.d.ts +54 -0
- package/dist/client/components/PageFlows.js +92 -0
- package/dist/client/components/PageGroups.d.ts +43 -0
- package/dist/client/components/PageGroups.js +123 -0
- package/dist/client/components/PageHead.d.ts +28 -0
- package/dist/client/components/PageHead.js +279 -0
- package/dist/client/components/PageHeadline.d.ts +23 -0
- package/dist/client/components/PageHeadline.js +101 -0
- package/dist/client/components/PageHistory.d.ts +62 -0
- package/dist/client/components/PageHistory.js +160 -0
- package/dist/client/components/PageLayout.d.ts +22 -0
- package/dist/client/components/PageLayout.js +13 -0
- package/dist/client/components/PageMetrics.d.ts +11 -0
- package/dist/client/components/PageMetrics.js +252 -0
- package/dist/client/components/PageRelated.d.ts +70 -0
- package/dist/client/components/PageRelated.js +667 -0
- package/dist/client/components/PageRoom.d.ts +37 -0
- package/dist/client/components/PageRoom.js +277 -0
- package/dist/client/components/PageSectionBox.d.ts +28 -0
- package/dist/client/components/PageSectionBox.js +65 -0
- package/dist/client/components/PageSections.d.ts +38 -0
- package/dist/client/components/PageSections.js +352 -0
- package/dist/client/components/PageSkeleton.css +17 -0
- package/dist/client/components/PageSkeleton.d.ts +11 -0
- package/dist/client/components/PageSkeleton.js +25 -0
- package/dist/client/components/PageTimeline.d.ts +2 -0
- package/dist/client/components/PageTimeline.js +273 -0
- package/dist/client/components/Palette.d.ts +4 -0
- package/dist/client/components/Palette.js +176 -0
- package/dist/client/components/Peek.d.ts +1 -0
- package/dist/client/components/Peek.js +158 -0
- package/dist/client/components/PeekPanel.d.ts +16 -0
- package/dist/client/components/PeekPanel.js +120 -0
- package/dist/client/components/Picker.d.ts +13 -0
- package/dist/client/components/Picker.js +33 -0
- package/dist/client/components/Prefs.d.ts +3 -0
- package/dist/client/components/Prefs.js +121 -0
- package/dist/client/components/PresentationSwitch.d.ts +13 -0
- package/dist/client/components/PresentationSwitch.js +10 -0
- package/dist/client/components/Prompt.d.ts +35 -0
- package/dist/client/components/Prompt.js +114 -0
- package/dist/client/components/QrCode.css +11 -0
- package/dist/client/components/QrCode.d.ts +4 -0
- package/dist/client/components/QrCode.js +57 -0
- package/dist/client/components/QueueList.css +122 -0
- package/dist/client/components/QuickAdd.css +18 -0
- package/dist/client/components/QuickAdd.d.ts +11 -0
- package/dist/client/components/QuickAdd.js +53 -0
- package/dist/client/components/QuickAddOnDemand.d.ts +4 -0
- package/dist/client/components/QuickAddOnDemand.js +10 -0
- package/dist/client/components/Record.d.ts +36 -0
- package/dist/client/components/Record.js +385 -0
- package/dist/client/components/RecordGone.d.ts +7 -0
- package/dist/client/components/RecordGone.js +22 -0
- package/dist/client/components/RecordPicker.d.ts +59 -0
- package/dist/client/components/RecordPicker.js +299 -0
- package/dist/client/components/RecordSummaries.d.ts +55 -0
- package/dist/client/components/RecordSummaries.js +151 -0
- package/dist/client/components/RecordTags.d.ts +6 -0
- package/dist/client/components/RecordTags.js +119 -0
- package/dist/client/components/RecordTrailNav.d.ts +25 -0
- package/dist/client/components/RecordTrailNav.js +110 -0
- package/dist/client/components/RichText.d.ts +7 -0
- package/dist/client/components/RichText.js +82 -0
- package/dist/client/components/RichTextEditor.css +202 -0
- package/dist/client/components/RichTextEditor.d.ts +33 -0
- package/dist/client/components/RichTextEditor.js +348 -0
- package/dist/client/components/RichTextField.d.ts +26 -0
- package/dist/client/components/RichTextField.js +71 -0
- package/dist/client/components/Rooms.d.ts +35 -0
- package/dist/client/components/Rooms.js +276 -0
- package/dist/client/components/RowActions.d.ts +8 -0
- package/dist/client/components/RowActions.js +49 -0
- package/dist/client/components/RowHost.d.ts +110 -0
- package/dist/client/components/RowHost.js +212 -0
- package/dist/client/components/SavedViews.d.ts +25 -0
- package/dist/client/components/SavedViews.js +35 -0
- package/dist/client/components/SchemaExport.d.ts +15 -0
- package/dist/client/components/SchemaExport.js +42 -0
- package/dist/client/components/SectionPeriod.css +14 -0
- package/dist/client/components/SectionPeriod.d.ts +7 -0
- package/dist/client/components/SectionPeriod.js +14 -0
- package/dist/client/components/SetFieldDialog.d.ts +12 -0
- package/dist/client/components/SetFieldDialog.js +51 -0
- package/dist/client/components/Sidebar.d.ts +34 -0
- package/dist/client/components/Sidebar.js +398 -0
- package/dist/client/components/Skeleton.d.ts +35 -0
- package/dist/client/components/Skeleton.js +49 -0
- package/dist/client/components/SortMenu.d.ts +20 -0
- package/dist/client/components/SortMenu.js +45 -0
- package/dist/client/components/SplitListDetail.css +119 -0
- package/dist/client/components/SuggestBox.d.ts +29 -0
- package/dist/client/components/SuggestBox.js +60 -0
- package/dist/client/components/Summary.d.ts +14 -0
- package/dist/client/components/Summary.js +93 -0
- package/dist/client/components/TableRoom.d.ts +88 -0
- package/dist/client/components/TableRoom.js +246 -0
- package/dist/client/components/TableView.d.ts +111 -0
- package/dist/client/components/TableView.js +324 -0
- package/dist/client/components/ThMenu.d.ts +40 -0
- package/dist/client/components/ThMenu.js +163 -0
- package/dist/client/components/ThemeLab.d.ts +4 -0
- package/dist/client/components/ThemeLab.js +67 -0
- package/dist/client/components/TimelineSides.css +23 -0
- package/dist/client/components/TimelineSides.d.ts +7 -0
- package/dist/client/components/TimelineSides.js +9 -0
- package/dist/client/components/Tour.d.ts +12 -0
- package/dist/client/components/Tour.js +131 -0
- package/dist/client/components/Value.d.ts +38 -0
- package/dist/client/components/Value.js +172 -0
- package/dist/client/components/WorkPanel.d.ts +9 -0
- package/dist/client/components/WorkPanel.js +43 -0
- package/dist/client/components/WorkflowStatus.d.ts +6 -0
- package/dist/client/components/WorkflowStatus.js +44 -0
- package/dist/client/components/WriteConfirm.d.ts +4 -0
- package/dist/client/components/WriteConfirm.js +27 -0
- package/dist/client/components/appColumnMenuModel.d.ts +46 -0
- package/dist/client/components/appColumnMenuModel.js +51 -0
- package/dist/client/components/appListModel.d.ts +179 -0
- package/dist/client/components/appListModel.js +421 -0
- package/dist/client/components/appRooms.d.ts +106 -0
- package/dist/client/components/appRooms.js +133 -0
- package/dist/client/components/autoChart.d.ts +33 -0
- package/dist/client/components/autoChart.js +107 -0
- package/dist/client/components/avatarPhotos.d.ts +45 -0
- package/dist/client/components/avatarPhotos.js +93 -0
- package/dist/client/components/besideDetail.d.ts +1 -0
- package/dist/client/components/besideDetail.js +10 -0
- package/dist/client/components/boardNew.d.ts +2 -0
- package/dist/client/components/boardNew.js +8 -0
- package/dist/client/components/cardsModel.d.ts +11 -0
- package/dist/client/components/cardsModel.js +24 -0
- package/dist/client/components/chromeIcons.d.ts +16 -0
- package/dist/client/components/chromeIcons.js +16 -0
- package/dist/client/components/columnPresentation.d.ts +8 -0
- package/dist/client/components/columnPresentation.js +47 -0
- package/dist/client/components/componentSlot.d.ts +31 -0
- package/dist/client/components/componentSlot.js +76 -0
- package/dist/client/components/composerDraft.d.ts +16 -0
- package/dist/client/components/composerDraft.js +16 -0
- package/dist/client/components/conditionText.d.ts +14 -0
- package/dist/client/components/conditionText.js +45 -0
- package/dist/client/components/conditionWords.d.ts +37 -0
- package/dist/client/components/conditionWords.js +382 -0
- package/dist/client/components/crumbSlot.d.ts +14 -0
- package/dist/client/components/crumbSlot.js +49 -0
- package/dist/client/components/dashboardModel.d.ts +283 -0
- package/dist/client/components/dashboardModel.js +415 -0
- package/dist/client/components/dashboardParts.d.ts +9 -0
- package/dist/client/components/dashboardParts.js +18 -0
- package/dist/client/components/diagramModel.d.ts +83 -0
- package/dist/client/components/diagramModel.js +211 -0
- package/dist/client/components/dueOpen.d.ts +1 -0
- package/dist/client/components/dueOpen.js +23 -0
- package/dist/client/components/editInteraction.d.ts +20 -0
- package/dist/client/components/editInteraction.js +178 -0
- package/dist/client/components/favoriteNav.d.ts +6 -0
- package/dist/client/components/favoriteNav.js +31 -0
- package/dist/client/components/favorites.d.ts +23 -0
- package/dist/client/components/favorites.js +86 -0
- package/dist/client/components/filePreviewModel.d.ts +18 -0
- package/dist/client/components/filePreviewModel.js +21 -0
- package/dist/client/components/filterRailModel.d.ts +93 -0
- package/dist/client/components/filterRailModel.js +302 -0
- package/dist/client/components/formControlsStyle.d.ts +1 -0
- package/dist/client/components/formControlsStyle.js +3 -0
- package/dist/client/components/formDefaults.d.ts +17 -0
- package/dist/client/components/formDefaults.js +128 -0
- package/dist/client/components/gridArrange.d.ts +33 -0
- package/dist/client/components/gridArrange.js +62 -0
- package/dist/client/components/gridCellModel.d.ts +32 -0
- package/dist/client/components/gridCellModel.js +42 -0
- package/dist/client/components/gridSizing.d.ts +89 -0
- package/dist/client/components/gridSizing.js +295 -0
- package/dist/client/components/groupMoves.d.ts +44 -0
- package/dist/client/components/groupMoves.js +295 -0
- package/dist/client/components/groupOrder.d.ts +43 -0
- package/dist/client/components/groupOrder.js +63 -0
- package/dist/client/components/inputRenderers.d.ts +48 -0
- package/dist/client/components/inputRenderers.js +37 -0
- package/dist/client/components/intakeStyle.d.ts +2 -0
- package/dist/client/components/intakeStyle.js +6 -0
- package/dist/client/components/jsonModel.d.ts +98 -0
- package/dist/client/components/jsonModel.js +264 -0
- package/dist/client/components/listColumn.d.ts +20 -0
- package/dist/client/components/listColumn.js +31 -0
- package/dist/client/components/listNavigation.d.ts +16 -0
- package/dist/client/components/listNavigation.js +14 -0
- package/dist/client/components/mentionRows.d.ts +5 -0
- package/dist/client/components/mentionRows.js +62 -0
- package/dist/client/components/mount.d.ts +55 -0
- package/dist/client/components/mount.js +155 -0
- package/dist/client/components/myViews.d.ts +54 -0
- package/dist/client/components/myViews.js +82 -0
- package/dist/client/components/navCounts.d.ts +84 -0
- package/dist/client/components/navCounts.js +194 -0
- package/dist/client/components/navigationTree.d.ts +52 -0
- package/dist/client/components/navigationTree.js +49 -0
- package/dist/client/components/newMenuModel.d.ts +27 -0
- package/dist/client/components/newMenuModel.js +58 -0
- package/dist/client/components/newRecordModel.d.ts +58 -0
- package/dist/client/components/newRecordModel.js +232 -0
- package/dist/client/components/onDemand.d.ts +30 -0
- package/dist/client/components/onDemand.js +121 -0
- package/dist/client/components/optimisticMoves.d.ts +21 -0
- package/dist/client/components/optimisticMoves.js +145 -0
- package/dist/client/components/pageContext.d.ts +154 -0
- package/dist/client/components/pageContext.js +47 -0
- package/dist/client/components/pageFieldsRead.d.ts +67 -0
- package/dist/client/components/pageFieldsRead.js +55 -0
- package/dist/client/components/pageModel.d.ts +203 -0
- package/dist/client/components/pageModel.js +67 -0
- package/dist/client/components/pageStep.d.ts +31 -0
- package/dist/client/components/pageStep.js +15 -0
- package/dist/client/components/paletteModel.d.ts +9 -0
- package/dist/client/components/paletteModel.js +46 -0
- package/dist/client/components/pickerStaleness.d.ts +32 -0
- package/dist/client/components/pickerStaleness.js +27 -0
- package/dist/client/components/placeOrder.d.ts +47 -0
- package/dist/client/components/placeOrder.js +71 -0
- package/dist/client/components/pointerDrag.d.ts +54 -0
- package/dist/client/components/pointerDrag.js +95 -0
- package/dist/client/components/presentationFit.d.ts +19 -0
- package/dist/client/components/presentationFit.js +32 -0
- package/dist/client/components/recordKeys.d.ts +2 -0
- package/dist/client/components/recordKeys.js +8 -0
- package/dist/client/components/recordSearch.d.ts +31 -0
- package/dist/client/components/recordSearch.js +80 -0
- package/dist/client/components/recordSurface.d.ts +86 -0
- package/dist/client/components/recordSurface.js +267 -0
- package/dist/client/components/rowOpens.d.ts +19 -0
- package/dist/client/components/rowOpens.js +25 -0
- package/dist/client/components/sidebarModel.d.ts +152 -0
- package/dist/client/components/sidebarModel.js +372 -0
- package/dist/client/components/suggestModel.d.ts +22 -0
- package/dist/client/components/suggestModel.js +49 -0
- package/dist/client/components/suggestPart.d.ts +4 -0
- package/dist/client/components/suggestPart.js +4 -0
- package/dist/client/components/textMeasure.d.ts +2 -0
- package/dist/client/components/textMeasure.js +35 -0
- package/dist/client/components/unknownIcon.d.ts +8 -0
- package/dist/client/components/unknownIcon.js +32 -0
- package/dist/client/components/useBulkSelection.d.ts +30 -0
- package/dist/client/components/useBulkSelection.js +360 -0
- package/dist/client/components/useConditionWords.d.ts +17 -0
- package/dist/client/components/useConditionWords.js +104 -0
- package/dist/client/components/useGridKeyboard.d.ts +32 -0
- package/dist/client/components/useGridKeyboard.js +223 -0
- package/dist/client/components/useListOrder.d.ts +94 -0
- package/dist/client/components/useListOrder.js +294 -0
- package/dist/client/components/useMediaQuery.d.ts +10 -0
- package/dist/client/components/useMediaQuery.js +45 -0
- package/dist/client/components/useMessageLanguage.d.ts +1 -0
- package/dist/client/components/useMessageLanguage.js +6 -0
- package/dist/client/components/usePins.d.ts +20 -0
- package/dist/client/components/usePins.js +66 -0
- package/dist/client/components/usePointerDrag.d.ts +72 -0
- package/dist/client/components/usePointerDrag.js +553 -0
- package/dist/client/components/useRecordInsert.d.ts +42 -0
- package/dist/client/components/useRecordInsert.js +145 -0
- package/dist/client/components/useRowWindow.d.ts +35 -0
- package/dist/client/components/useRowWindow.js +149 -0
- package/dist/client/components/useStickyHead.d.ts +17 -0
- package/dist/client/components/useStickyHead.js +65 -0
- package/dist/client/components/useTabFold.d.ts +32 -0
- package/dist/client/components/useTabFold.js +145 -0
- package/dist/client/components/valueModel.d.ts +300 -0
- package/dist/client/components/valueModel.js +560 -0
- package/dist/client/components/valueRenderers.d.ts +36 -0
- package/dist/client/components/valueRenderers.js +13 -0
- package/dist/client/components/viewLink.d.ts +27 -0
- package/dist/client/components/viewLink.js +79 -0
- package/dist/client/components/walk.d.ts +14 -0
- package/dist/client/components/walk.js +16 -0
- package/dist/client/compose.d.ts +8 -0
- package/dist/client/compose.js +163 -0
- package/dist/client/composedHook.d.ts +20 -0
- package/dist/client/composedHook.js +12 -0
- package/dist/client/composedReads.d.ts +26 -0
- package/dist/client/composedReads.js +183 -0
- package/dist/client/composer.css +499 -0
- package/dist/client/composer.d.ts +121 -0
- package/dist/client/composer.js +1079 -0
- package/dist/client/composerEntry.d.ts +1 -0
- package/dist/client/composerEntry.js +58 -0
- package/dist/client/composerTab.d.ts +6 -0
- package/dist/client/composerTab.js +20 -0
- package/dist/client/conditions.d.ts +46 -0
- package/dist/client/conditions.js +150 -0
- package/dist/client/connectionList.d.ts +14 -0
- package/dist/client/connectionList.js +149 -0
- package/dist/client/connectionScope.d.ts +6 -0
- package/dist/client/connectionScope.js +14 -0
- package/dist/client/connectionTransition.d.ts +12 -0
- package/dist/client/connectionTransition.js +41 -0
- package/dist/client/copy/columnMenu/components/AppColumnMenu.d.ts +4 -0
- package/dist/client/copy/columnMenu/components/AppColumnMenu.js +6 -0
- package/dist/client/copy/columnMenu/components/AppColumnMenuPopups.d.ts +4 -0
- package/dist/client/copy/columnMenu/components/AppColumnMenuPopups.js +6 -0
- package/dist/client/copy/columnMenu/components/ThMenu.d.ts +35 -0
- package/dist/client/copy/columnMenu/components/ThMenu.js +37 -0
- package/dist/client/copy/columnMenu/components/appColumnMenuModel.d.ts +10 -0
- package/dist/client/copy/columnMenu/components/appColumnMenuModel.js +12 -0
- package/dist/client/copy/dashboards/breakdownBatch.d.ts +3 -0
- package/dist/client/copy/dashboards/breakdownBatch.js +5 -0
- package/dist/client/copy/dashboards/components/Breakdown.d.ts +32 -0
- package/dist/client/copy/dashboards/components/Breakdown.js +25 -0
- package/dist/client/copy/dashboards/components/BreakdownRoom.d.ts +3 -0
- package/dist/client/copy/dashboards/components/BreakdownRoom.js +5 -0
- package/dist/client/copy/dashboards/components/Chart.d.ts +26 -0
- package/dist/client/copy/dashboards/components/Chart.js +19 -0
- package/dist/client/copy/dashboards/components/ChartShapes.d.ts +16 -0
- package/dist/client/copy/dashboards/components/ChartShapes.js +12 -0
- package/dist/client/copy/dashboards/components/PageMetrics.d.ts +21 -0
- package/dist/client/copy/dashboards/components/PageMetrics.js +20 -0
- package/dist/client/copy/dashboards/components/SectionPeriod.d.ts +4 -0
- package/dist/client/copy/dashboards/components/SectionPeriod.js +6 -0
- package/dist/client/copy/dashboards/components/dashboardModel.d.ts +3 -0
- package/dist/client/copy/dashboards/components/dashboardModel.js +5 -0
- package/dist/client/copy/es.d.ts +11 -0
- package/dist/client/copy/es.js +60 -0
- package/dist/client/copy/filters/components/FilterBoxes.d.ts +10 -0
- package/dist/client/copy/filters/components/FilterBoxes.js +12 -0
- package/dist/client/copy/filters/components/FilterRail.d.ts +16 -0
- package/dist/client/copy/filters/components/FilterRail.js +18 -0
- package/dist/client/copy/filters/components/ListFilterBar.d.ts +9 -0
- package/dist/client/copy/filters/components/ListFilterBar.js +11 -0
- package/dist/client/copy/filters/components/conditionWords.d.ts +46 -0
- package/dist/client/copy/filters/components/conditionWords.js +95 -0
- package/dist/client/copy/filters/components/filterRailModel.d.ts +12 -0
- package/dist/client/copy/filters/components/filterRailModel.js +14 -0
- package/dist/client/copy/forms/components/DateField.d.ts +13 -0
- package/dist/client/copy/forms/components/DateField.js +15 -0
- package/dist/client/copy/forms/components/MinorMoneyInput.d.ts +4 -0
- package/dist/client/copy/forms/components/MinorMoneyInput.js +6 -0
- package/dist/client/copy/forms/components/MultiStepForm.d.ts +10 -0
- package/dist/client/copy/forms/components/MultiStepForm.js +12 -0
- package/dist/client/copy/forms/components/NewRecord.d.ts +29 -0
- package/dist/client/copy/forms/components/NewRecord.js +31 -0
- package/dist/client/copy/forms/components/NewRecordButton.d.ts +6 -0
- package/dist/client/copy/forms/components/NewRecordButton.js +8 -0
- package/dist/client/copy/forms/components/Picker.d.ts +4 -0
- package/dist/client/copy/forms/components/Picker.js +6 -0
- package/dist/client/copy/forms/components/QuickAdd.d.ts +3 -0
- package/dist/client/copy/forms/components/QuickAdd.js +5 -0
- package/dist/client/copy/forms/components/RecordPicker.d.ts +6 -0
- package/dist/client/copy/forms/components/RecordPicker.js +8 -0
- package/dist/client/copy/forms/components/RichTextEditor.d.ts +36 -0
- package/dist/client/copy/forms/components/RichTextEditor.js +40 -0
- package/dist/client/copy/forms/components/RichTextField.d.ts +3 -0
- package/dist/client/copy/forms/components/RichTextField.js +5 -0
- package/dist/client/copy/forms/components/SetFieldDialog.d.ts +10 -0
- package/dist/client/copy/forms/components/SetFieldDialog.js +9 -0
- package/dist/client/copy/forms/components/useRecordInsert.d.ts +7 -0
- package/dist/client/copy/forms/components/useRecordInsert.js +9 -0
- package/dist/client/copy/help/helpContent.d.ts +71 -0
- package/dist/client/copy/help/helpContent.js +73 -0
- package/dist/client/copy/lists/bulkActions.d.ts +12 -0
- package/dist/client/copy/lists/bulkActions.js +14 -0
- package/dist/client/copy/lists/components/AppList.d.ts +28 -0
- package/dist/client/copy/lists/components/AppList.js +30 -0
- package/dist/client/copy/lists/components/CardsList.d.ts +3 -0
- package/dist/client/copy/lists/components/CardsList.js +5 -0
- package/dist/client/copy/lists/components/Gallery.d.ts +7 -0
- package/dist/client/copy/lists/components/Gallery.js +9 -0
- package/dist/client/copy/lists/components/Grid.d.ts +30 -0
- package/dist/client/copy/lists/components/Grid.js +29 -0
- package/dist/client/copy/lists/components/GridCellEditor.d.ts +5 -0
- package/dist/client/copy/lists/components/GridCellEditor.js +7 -0
- package/dist/client/copy/lists/components/GridSelection.d.ts +4 -0
- package/dist/client/copy/lists/components/GridSelection.js +6 -0
- package/dist/client/copy/lists/components/Nested.d.ts +7 -0
- package/dist/client/copy/lists/components/Nested.js +9 -0
- package/dist/client/copy/lists/components/RowActions.d.ts +1 -0
- package/dist/client/copy/lists/components/RowActions.js +3 -0
- package/dist/client/copy/lists/components/SavedViews.d.ts +5 -0
- package/dist/client/copy/lists/components/SavedViews.js +7 -0
- package/dist/client/copy/lists/components/SortMenu.d.ts +5 -0
- package/dist/client/copy/lists/components/SortMenu.js +7 -0
- package/dist/client/copy/lists/components/TableRoom.d.ts +12 -0
- package/dist/client/copy/lists/components/TableRoom.js +14 -0
- package/dist/client/copy/lists/components/TableView.d.ts +37 -0
- package/dist/client/copy/lists/components/TableView.js +39 -0
- package/dist/client/copy/lists/components/appListModel.d.ts +6 -0
- package/dist/client/copy/lists/components/appListModel.js +5 -0
- package/dist/client/copy/lists/components/myViews.d.ts +4 -0
- package/dist/client/copy/lists/components/myViews.js +6 -0
- package/dist/client/copy/lists/components/placeOrder.d.ts +4 -0
- package/dist/client/copy/lists/components/placeOrder.js +6 -0
- package/dist/client/copy/lists/components/useBulkSelection.d.ts +20 -0
- package/dist/client/copy/lists/components/useBulkSelection.js +16 -0
- package/dist/client/copy/lists/components/useListOrder.d.ts +7 -0
- package/dist/client/copy/lists/components/useListOrder.js +9 -0
- package/dist/client/copy/public/components/appRooms.d.ts +3 -0
- package/dist/client/copy/public/components/appRooms.js +5 -0
- package/dist/client/copy/record/components/Actions.d.ts +13 -0
- package/dist/client/copy/record/components/Actions.js +15 -0
- package/dist/client/copy/record/components/AttachmentList.d.ts +23 -0
- package/dist/client/copy/record/components/AttachmentList.js +22 -0
- package/dist/client/copy/record/components/DeleteButton.d.ts +22 -0
- package/dist/client/copy/record/components/DeleteButton.js +24 -0
- package/dist/client/copy/record/components/Dressed.d.ts +5 -0
- package/dist/client/copy/record/components/Dressed.js +7 -0
- package/dist/client/copy/record/components/EditLayoutButton.d.ts +5 -0
- package/dist/client/copy/record/components/EditLayoutButton.js +7 -0
- package/dist/client/copy/record/components/Editable.d.ts +25 -0
- package/dist/client/copy/record/components/Editable.js +24 -0
- package/dist/client/copy/record/components/FieldArranger.d.ts +15 -0
- package/dist/client/copy/record/components/FieldArranger.js +17 -0
- package/dist/client/copy/record/components/FilePreview.d.ts +13 -0
- package/dist/client/copy/record/components/FilePreview.js +15 -0
- package/dist/client/copy/record/components/JsonPreview.d.ts +3 -0
- package/dist/client/copy/record/components/JsonPreview.js +5 -0
- package/dist/client/copy/record/components/JsonView.d.ts +12 -0
- package/dist/client/copy/record/components/JsonView.js +14 -0
- package/dist/client/copy/record/components/LayoutBuilder.d.ts +23 -0
- package/dist/client/copy/record/components/LayoutBuilder.js +25 -0
- package/dist/client/copy/record/components/Lightbox.d.ts +5 -0
- package/dist/client/copy/record/components/Lightbox.js +7 -0
- package/dist/client/copy/record/components/LiveNotices.d.ts +33 -0
- package/dist/client/copy/record/components/LiveNotices.js +29 -0
- package/dist/client/copy/record/components/PageCurrent.d.ts +1 -0
- package/dist/client/copy/record/components/PageCurrent.js +3 -0
- package/dist/client/copy/record/components/PageEmptyRun.d.ts +3 -0
- package/dist/client/copy/record/components/PageEmptyRun.js +5 -0
- package/dist/client/copy/record/components/PageFields.d.ts +5 -0
- package/dist/client/copy/record/components/PageFields.js +7 -0
- package/dist/client/copy/record/components/PageFlowDiagram.d.ts +33 -0
- package/dist/client/copy/record/components/PageFlowDiagram.js +37 -0
- package/dist/client/copy/record/components/PageFlows.d.ts +20 -0
- package/dist/client/copy/record/components/PageFlows.js +22 -0
- package/dist/client/copy/record/components/PageGroups.d.ts +12 -0
- package/dist/client/copy/record/components/PageGroups.js +14 -0
- package/dist/client/copy/record/components/PageHead.d.ts +8 -0
- package/dist/client/copy/record/components/PageHead.js +10 -0
- package/dist/client/copy/record/components/PageHistory.d.ts +18 -0
- package/dist/client/copy/record/components/PageHistory.js +20 -0
- package/dist/client/copy/record/components/PageLayout.d.ts +5 -0
- package/dist/client/copy/record/components/PageLayout.js +7 -0
- package/dist/client/copy/record/components/PageRelated.d.ts +24 -0
- package/dist/client/copy/record/components/PageRelated.js +26 -0
- package/dist/client/copy/record/components/PageRoom.d.ts +4 -0
- package/dist/client/copy/record/components/PageRoom.js +6 -0
- package/dist/client/copy/record/components/PageSectionBox.d.ts +6 -0
- package/dist/client/copy/record/components/PageSectionBox.js +10 -0
- package/dist/client/copy/record/components/PageTimeline.d.ts +9 -0
- package/dist/client/copy/record/components/PageTimeline.js +8 -0
- package/dist/client/copy/record/components/Peek.d.ts +3 -0
- package/dist/client/copy/record/components/Peek.js +5 -0
- package/dist/client/copy/record/components/PeekPanel.d.ts +5 -0
- package/dist/client/copy/record/components/PeekPanel.js +7 -0
- package/dist/client/copy/record/components/QrCode.d.ts +3 -0
- package/dist/client/copy/record/components/QrCode.js +5 -0
- package/dist/client/copy/record/components/Record.d.ts +19 -0
- package/dist/client/copy/record/components/Record.js +21 -0
- package/dist/client/copy/record/components/RecordGone.d.ts +4 -0
- package/dist/client/copy/record/components/RecordGone.js +6 -0
- package/dist/client/copy/record/components/RecordSummaries.d.ts +1 -0
- package/dist/client/copy/record/components/RecordSummaries.js +3 -0
- package/dist/client/copy/record/components/RecordTags.d.ts +9 -0
- package/dist/client/copy/record/components/RecordTags.js +11 -0
- package/dist/client/copy/record/components/RecordTrailNav.d.ts +8 -0
- package/dist/client/copy/record/components/RecordTrailNav.js +10 -0
- package/dist/client/copy/record/components/RichText.d.ts +4 -0
- package/dist/client/copy/record/components/RichText.js +6 -0
- package/dist/client/copy/record/components/Value.d.ts +4 -0
- package/dist/client/copy/record/components/Value.js +6 -0
- package/dist/client/copy/record/components/WorkflowStatus.d.ts +7 -0
- package/dist/client/copy/record/components/WorkflowStatus.js +9 -0
- package/dist/client/copy/record/components/WriteConfirm.d.ts +11 -0
- package/dist/client/copy/record/components/WriteConfirm.js +13 -0
- package/dist/client/copy/record/components/groupMoves.d.ts +7 -0
- package/dist/client/copy/record/components/groupMoves.js +9 -0
- package/dist/client/copy/record/components/jsonModel.d.ts +3 -0
- package/dist/client/copy/record/components/jsonModel.js +5 -0
- package/dist/client/copy/record/components/pageModel.d.ts +5 -0
- package/dist/client/copy/record/components/pageModel.js +7 -0
- package/dist/client/copy/record/components/recordSurface.d.ts +6 -0
- package/dist/client/copy/record/components/recordSurface.js +8 -0
- package/dist/client/copy/record/components/valueModel.d.ts +5 -0
- package/dist/client/copy/record/components/valueModel.js +7 -0
- package/dist/client/copy/record/fileSource.d.ts +3 -0
- package/dist/client/copy/record/fileSource.js +5 -0
- package/dist/client/copy/record/insert.d.ts +6 -0
- package/dist/client/copy/record/insert.js +8 -0
- package/dist/client/copy/record/page.d.ts +4 -0
- package/dist/client/copy/record/page.js +6 -0
- package/dist/client/copy/record/recordEditValidation.d.ts +4 -0
- package/dist/client/copy/record/recordEditValidation.js +6 -0
- package/dist/client/copy/record/savedPages.d.ts +4 -0
- package/dist/client/copy/record/savedPages.js +6 -0
- package/dist/client/copy/record/template.d.ts +9 -0
- package/dist/client/copy/record/template.js +11 -0
- package/dist/client/copy/record/write.d.ts +30 -0
- package/dist/client/copy/record/write.js +26 -0
- package/dist/client/copy/shell/app.d.ts +27 -0
- package/dist/client/copy/shell/app.js +43 -0
- package/dist/client/copy/shell/components/AppIssues.d.ts +10 -0
- package/dist/client/copy/shell/components/AppIssues.js +9 -0
- package/dist/client/copy/shell/components/Crumbs.d.ts +7 -0
- package/dist/client/copy/shell/components/Crumbs.js +17 -0
- package/dist/client/copy/shell/components/Dropdown.d.ts +3 -0
- package/dist/client/copy/shell/components/Dropdown.js +5 -0
- package/dist/client/copy/shell/components/ErrorBoundary.d.ts +4 -0
- package/dist/client/copy/shell/components/ErrorBoundary.js +6 -0
- package/dist/client/copy/shell/components/FavoriteStar.d.ts +4 -0
- package/dist/client/copy/shell/components/FavoriteStar.js +6 -0
- package/dist/client/copy/shell/components/MobileNavDrawer.d.ts +4 -0
- package/dist/client/copy/shell/components/MobileNavDrawer.js +12 -0
- package/dist/client/copy/shell/components/OverflowMenu.d.ts +3 -0
- package/dist/client/copy/shell/components/OverflowMenu.js +10 -0
- package/dist/client/copy/shell/components/Palette.d.ts +15 -0
- package/dist/client/copy/shell/components/Palette.js +18 -0
- package/dist/client/copy/shell/components/Prefs.d.ts +4 -0
- package/dist/client/copy/shell/components/Prefs.js +11 -0
- package/dist/client/copy/shell/components/Prompt.d.ts +1 -0
- package/dist/client/copy/shell/components/Prompt.js +3 -0
- package/dist/client/copy/shell/components/Rooms.d.ts +6 -0
- package/dist/client/copy/shell/components/Rooms.js +8 -0
- package/dist/client/copy/shell/components/Sidebar.d.ts +7 -0
- package/dist/client/copy/shell/components/Sidebar.js +9 -0
- package/dist/client/copy/shell/components/Skeleton.d.ts +5 -0
- package/dist/client/copy/shell/components/Skeleton.js +7 -0
- package/dist/client/copy/shell/components/TopNav.d.ts +4 -0
- package/dist/client/copy/shell/components/TopNav.js +12 -0
- package/dist/client/copy/shell/components/Tour.d.ts +4 -0
- package/dist/client/copy/shell/components/Tour.js +6 -0
- package/dist/client/copy/shell/components/newMenuModel.d.ts +3 -0
- package/dist/client/copy/shell/components/newMenuModel.js +5 -0
- package/dist/client/copy/shell/components/onDemand.d.ts +3 -0
- package/dist/client/copy/shell/components/onDemand.js +5 -0
- package/dist/client/copy/shell/components/sidebarModel.d.ts +3 -0
- package/dist/client/copy/shell/components/sidebarModel.js +5 -0
- package/dist/client/copy/shell/connectionList.d.ts +6 -0
- package/dist/client/copy/shell/connectionList.js +8 -0
- package/dist/client/copy/shell/core.d.ts +16 -0
- package/dist/client/copy/shell/core.js +18 -0
- package/dist/client/copy/shell/palette.d.ts +6 -0
- package/dist/client/copy/shell/palette.js +8 -0
- package/dist/client/copy/shell/prompt.d.ts +1 -0
- package/dist/client/copy/shell/prompt.js +3 -0
- package/dist/client/copy/shell/requestIdentity.d.ts +9 -0
- package/dist/client/copy/shell/requestIdentity.js +11 -0
- package/dist/client/copy/shell/resourceRequests.d.ts +4 -0
- package/dist/client/copy/shell/resourceRequests.js +6 -0
- package/dist/client/copy/shell/sessionIdentity.d.ts +11 -0
- package/dist/client/copy/shell/sessionIdentity.js +13 -0
- package/dist/client/copy/shell/sessionLifecycle.d.ts +5 -0
- package/dist/client/copy/shell/sessionLifecycle.js +7 -0
- package/dist/client/copy/shell/startup.d.ts +5 -0
- package/dist/client/copy/shell/startup.js +7 -0
- package/dist/client/copy/shell/theme.d.ts +5 -0
- package/dist/client/copy/shell/theme.js +14 -0
- package/dist/client/copy/shell/toast.d.ts +3 -0
- package/dist/client/copy/shell/toast.js +5 -0
- package/dist/client/copy/shell/updateAttempts.d.ts +6 -0
- package/dist/client/copy/shell/updateAttempts.js +8 -0
- package/dist/client/copy/shell/visualTheme.d.ts +4 -0
- package/dist/client/copy/shell/visualTheme.js +6 -0
- package/dist/client/copy/workbench/clauses.d.ts +3 -0
- package/dist/client/copy/workbench/clauses.js +5 -0
- package/dist/client/copy/workbench/components/ApiOperations.d.ts +21 -0
- package/dist/client/copy/workbench/components/ApiOperations.js +23 -0
- package/dist/client/copy/workbench/components/Composer.d.ts +105 -0
- package/dist/client/copy/workbench/components/Composer.js +92 -0
- package/dist/client/copy/workbench/components/Diagram.d.ts +56 -0
- package/dist/client/copy/workbench/components/Diagram.js +46 -0
- package/dist/client/copy/workbench/components/Export.d.ts +26 -0
- package/dist/client/copy/workbench/components/Export.js +25 -0
- package/dist/client/copy/workbench/components/HelpPanel.d.ts +10 -0
- package/dist/client/copy/workbench/components/HelpPanel.js +12 -0
- package/dist/client/copy/workbench/components/History.d.ts +11 -0
- package/dist/client/copy/workbench/components/History.js +10 -0
- package/dist/client/copy/workbench/components/Landing.d.ts +5 -0
- package/dist/client/copy/workbench/components/Landing.js +7 -0
- package/dist/client/copy/workbench/components/SchemaExport.d.ts +24 -0
- package/dist/client/copy/workbench/components/SchemaExport.js +20 -0
- package/dist/client/copy/workbench/components/Summary.d.ts +28 -0
- package/dist/client/copy/workbench/components/Summary.js +24 -0
- package/dist/client/copy/workbench/components/ThemeLab.d.ts +25 -0
- package/dist/client/copy/workbench/components/ThemeLab.js +27 -0
- package/dist/client/copy/workbench/components/WorkPanel.d.ts +12 -0
- package/dist/client/copy/workbench/components/WorkPanel.js +14 -0
- package/dist/client/copy/workbench/composer.d.ts +36 -0
- package/dist/client/copy/workbench/composer.js +32 -0
- package/dist/client/copy/workbench/composerEntry.d.ts +4 -0
- package/dist/client/copy/workbench/composerEntry.js +6 -0
- package/dist/client/copy/workbench/export.d.ts +8 -0
- package/dist/client/copy/workbench/export.js +7 -0
- package/dist/client/copy/workbench/filterbar.d.ts +6 -0
- package/dist/client/copy/workbench/filterbar.js +8 -0
- package/dist/client/copy/workbench/handoff.d.ts +20 -0
- package/dist/client/copy/workbench/handoff.js +19 -0
- package/dist/client/copy/workbench/help.d.ts +6 -0
- package/dist/client/copy/workbench/help.js +8 -0
- package/dist/client/copy/workbench/history.d.ts +3 -0
- package/dist/client/copy/workbench/history.js +5 -0
- package/dist/client/copy/workbench/schemaexport.d.ts +5 -0
- package/dist/client/copy/workbench/schemaexport.js +7 -0
- package/dist/client/copy/workbench/tour.d.ts +22 -0
- package/dist/client/copy/workbench/tour.js +24 -0
- package/dist/client/copy/workbench/views.d.ts +6 -0
- package/dist/client/copy/workbench/views.js +8 -0
- package/dist/client/core.d.ts +327 -0
- package/dist/client/core.js +1082 -0
- package/dist/client/customThemes.css +43 -0
- package/dist/client/dashboard.d.ts +16 -0
- package/dist/client/dashboard.js +35 -0
- package/dist/client/deeplink.d.ts +64 -0
- package/dist/client/deeplink.js +384 -0
- package/dist/client/delete.d.ts +8 -0
- package/dist/client/delete.js +35 -0
- package/dist/client/density.d.ts +8 -0
- package/dist/client/density.js +102 -0
- package/dist/client/devtoolsEventClient.d.ts +27 -0
- package/dist/client/devtoolsEventClient.js +32 -0
- package/dist/client/documents.d.ts +9 -0
- package/dist/client/documents.js +23 -0
- package/dist/client/dom.d.ts +36 -0
- package/dist/client/dom.js +232 -0
- package/dist/client/draftRecovery.d.ts +19 -0
- package/dist/client/draftRecovery.js +56 -0
- package/dist/client/export.d.ts +59 -0
- package/dist/client/export.js +217 -0
- package/dist/client/features.css +2187 -0
- package/dist/client/fieldErrors.d.ts +27 -0
- package/dist/client/fieldErrors.js +20 -0
- package/dist/client/fileSource.d.ts +10 -0
- package/dist/client/fileSource.js +115 -0
- package/dist/client/filterbar.d.ts +87 -0
- package/dist/client/filterbar.js +168 -0
- package/dist/client/firstPaint.d.ts +26 -0
- package/dist/client/firstPaint.js +102 -0
- package/dist/client/fonts/Barlow-OFL.txt +125 -0
- package/dist/client/fonts/IBMPlexMono-OFL.txt +104 -0
- package/dist/client/fonts/Inter-OFL.txt +92 -0
- package/dist/client/fonts/barlow-400.woff2 +0 -0
- package/dist/client/fonts/barlow-600.woff2 +0 -0
- package/dist/client/fonts/barlow-semi-condensed-700.woff2 +0 -0
- package/dist/client/fonts/ibm-plex-mono-400.woff2 +0 -0
- package/dist/client/fonts/ibm-plex-mono-500.woff2 +0 -0
- package/dist/client/fonts/inter-latin.woff2 +0 -0
- package/dist/client/formControls.css +5 -0
- package/dist/client/handoff.d.ts +47 -0
- package/dist/client/handoff.js +138 -0
- package/dist/client/help.css +151 -0
- package/dist/client/help.d.ts +20 -0
- package/dist/client/help.js +103 -0
- package/dist/client/helpContent.d.ts +95 -0
- package/dist/client/helpContent.js +661 -0
- package/dist/client/history.d.ts +10 -0
- package/dist/client/history.js +181 -0
- package/dist/client/historyToken.d.ts +18 -0
- package/dist/client/historyToken.js +27 -0
- package/dist/client/iconWeight.d.ts +16 -0
- package/dist/client/iconWeight.js +44 -0
- package/dist/client/index.html +244 -0
- package/dist/client/insert.d.ts +50 -0
- package/dist/client/insert.js +269 -0
- package/dist/client/kit.d.ts +7 -0
- package/dist/client/kit.js +1 -0
- package/dist/client/layoutDraftRecovery.d.ts +8 -0
- package/dist/client/layoutDraftRecovery.js +33 -0
- package/dist/client/ledgerLook.css +32 -0
- package/dist/client/liveReads.d.ts +23 -0
- package/dist/client/liveReads.js +38 -0
- package/dist/client/liveState.d.ts +94 -0
- package/dist/client/liveState.js +212 -0
- package/dist/client/locale.d.ts +141 -0
- package/dist/client/locale.js +0 -0
- package/dist/client/lumenLook.css +1867 -0
- package/dist/client/menu.d.ts +49 -0
- package/dist/client/menu.js +131 -0
- package/dist/client/menuScope.d.ts +6 -0
- package/dist/client/menuScope.js +4 -0
- package/dist/client/messages.d.ts +240 -0
- package/dist/client/messages.js +370 -0
- package/dist/client/motionStill.d.ts +1 -0
- package/dist/client/motionStill.js +17 -0
- package/dist/client/navigationHold.d.ts +37 -0
- package/dist/client/navigationHold.js +503 -0
- package/dist/client/nested.d.ts +8 -0
- package/dist/client/nested.js +26 -0
- package/dist/client/ownWrites.d.ts +33 -0
- package/dist/client/ownWrites.js +76 -0
- package/dist/client/page.css +4052 -0
- package/dist/client/page.d.ts +21 -0
- package/dist/client/page.js +187 -0
- package/dist/client/pagemarks.d.ts +32 -0
- package/dist/client/pagemarks.js +98 -0
- package/dist/client/palette.d.ts +38 -0
- package/dist/client/palette.js +360 -0
- package/dist/client/partsLook.css +1047 -0
- package/dist/client/peek.d.ts +11 -0
- package/dist/client/peek.js +51 -0
- package/dist/client/peekpanel.d.ts +26 -0
- package/dist/client/peekpanel.js +121 -0
- package/dist/client/pendingWork.d.ts +19 -0
- package/dist/client/pendingWork.js +36 -0
- package/dist/client/pins.d.ts +24 -0
- package/dist/client/pins.js +97 -0
- package/dist/client/prefs.d.ts +3 -0
- package/dist/client/prefs.js +32 -0
- package/dist/client/prompt.d.ts +27 -0
- package/dist/client/prompt.js +61 -0
- package/dist/client/readGathering.d.ts +4 -0
- package/dist/client/readGathering.js +23 -0
- package/dist/client/recordCompose.d.ts +11 -0
- package/dist/client/recordCompose.js +69 -0
- package/dist/client/recordDrafts.d.ts +40 -0
- package/dist/client/recordDrafts.js +57 -0
- package/dist/client/recordEditValidation.d.ts +12 -0
- package/dist/client/recordEditValidation.js +52 -0
- package/dist/client/recordIntent.d.ts +6 -0
- package/dist/client/recordIntent.js +15 -0
- package/dist/client/recordPress.d.ts +12 -0
- package/dist/client/recordPress.js +84 -0
- package/dist/client/recordSource.d.ts +6 -0
- package/dist/client/recordSource.js +15 -0
- package/dist/client/recordTrail.d.ts +77 -0
- package/dist/client/recordTrail.js +101 -0
- package/dist/client/recordWriteRefresh.d.ts +74 -0
- package/dist/client/recordWriteRefresh.js +284 -0
- package/dist/client/relatedRows.d.ts +4 -0
- package/dist/client/relatedRows.js +24 -0
- package/dist/client/requestIdentity.d.ts +36 -0
- package/dist/client/requestIdentity.js +97 -0
- package/dist/client/resourceRequests.d.ts +7 -0
- package/dist/client/resourceRequests.js +32 -0
- package/dist/client/roleLabels.d.ts +7 -0
- package/dist/client/roleLabels.js +24 -0
- package/dist/client/rowEditing.d.ts +15 -0
- package/dist/client/rowEditing.js +36 -0
- package/dist/client/sageLook.css +242 -0
- package/dist/client/savedPages.d.ts +27 -0
- package/dist/client/savedPages.js +135 -0
- package/dist/client/schemaexport.d.ts +14 -0
- package/dist/client/schemaexport.js +182 -0
- package/dist/client/sessionIdentity.d.ts +39 -0
- package/dist/client/sessionIdentity.js +255 -0
- package/dist/client/sessionLifecycle.d.ts +33 -0
- package/dist/client/sessionLifecycle.js +276 -0
- package/dist/client/shellHost.d.ts +70 -0
- package/dist/client/shellHost.js +92 -0
- package/dist/client/shellMain.d.ts +8 -0
- package/dist/client/shellMode.d.ts +433 -0
- package/dist/client/shellMode.js +68 -0
- package/dist/client/shellStart.d.ts +5 -0
- package/dist/client/shellStart.js +54 -0
- package/dist/client/shells.d.ts +123 -0
- package/dist/client/shells.js +1 -0
- package/dist/client/sql.css +139 -0
- package/dist/client/startup.d.ts +8 -0
- package/dist/client/startup.js +85 -0
- package/dist/client/startupHold.d.ts +10 -0
- package/dist/client/startupHold.js +73 -0
- package/dist/client/structure.css +1296 -0
- package/dist/client/style.css +3526 -0
- package/dist/client/styleImports.d.ts +3 -0
- package/dist/client/surfaces.d.ts +18 -0
- package/dist/client/surfaces.js +27 -0
- package/dist/client/surfacesLook.css +88 -0
- package/dist/client/template.d.ts +75 -0
- package/dist/client/template.js +403 -0
- package/dist/client/theme.d.ts +14 -0
- package/dist/client/theme.js +112 -0
- package/dist/client/themeFamilies.css +788 -0
- package/dist/client/thmenu.d.ts +12 -0
- package/dist/client/thmenu.js +94 -0
- package/dist/client/toast.d.ts +7 -0
- package/dist/client/toast.js +117 -0
- package/dist/client/tour.d.ts +8 -0
- package/dist/client/tour.js +176 -0
- package/dist/client/transport.d.ts +2 -0
- package/dist/client/transport.js +13 -0
- package/dist/client/typography.d.ts +4 -0
- package/dist/client/typography.js +51 -0
- package/dist/client/uiBridge.d.ts +57 -0
- package/dist/client/uiBridge.js +30 -0
- package/dist/client/updateAttempts.d.ts +46 -0
- package/dist/client/updateAttempts.js +131 -0
- package/dist/client/url.d.ts +74 -0
- package/dist/client/url.js +388 -0
- package/dist/client/views.d.ts +19 -0
- package/dist/client/views.js +133 -0
- package/dist/client/visualTheme.d.ts +62 -0
- package/dist/client/visualTheme.js +502 -0
- package/dist/client/visualThemes.css +421 -0
- package/dist/client/workshopLook.css +126 -0
- package/dist/client/write.d.ts +103 -0
- package/dist/client/write.js +885 -0
- package/dist/client/writePaths.d.ts +16 -0
- package/dist/client/writePaths.js +35 -0
- package/dist/client/yesNoRule.d.ts +12 -0
- package/dist/client/yesNoRule.js +39 -0
- package/dist/clientFiles.d.ts +11 -4
- package/dist/clientFiles.js +16 -12
- package/dist/vite.d.ts +136 -0
- package/dist/vite.js +571 -0
- package/package.json +136 -3
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type ColumnMeta, type TableMeta } from '@mistriwork/engine/shared/schema.js';
|
|
2
|
+
import type { AppForm } from '@mistriwork/engine/shared/servedApp.js';
|
|
3
|
+
import { type FormScalar } from '@mistriwork/engine/shared/formValues.js';
|
|
4
|
+
/** The client-side presentation subset of an authored App form. */
|
|
5
|
+
export type FormCuration = Omit<AppForm<string>, 'defaults'> & {
|
|
6
|
+
defaults?: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
interface FormGroup {
|
|
9
|
+
label: string;
|
|
10
|
+
columns: ColumnMeta[];
|
|
11
|
+
}
|
|
12
|
+
/** Unknown draft dependencies stay visible so an incomplete form never hides
|
|
13
|
+
* the control needed to resolve its own condition. */
|
|
14
|
+
export declare function isFormFieldVisible(form: FormCuration | undefined, column: ColumnMeta, values: Readonly<Record<string, FormScalar | string>>, table: TableMeta): boolean;
|
|
15
|
+
export declare function formColumns(table: TableMeta, form: FormCuration | undefined, app: boolean): ColumnMeta[];
|
|
16
|
+
/** Grouped fields retain authored order; ungrouped fields follow in form order. */
|
|
17
|
+
export declare function formGroups(table: TableMeta, form: FormCuration | undefined, app: boolean): FormGroup[];
|
|
18
|
+
export declare function presetValue(column: ColumnMeta, defaults: Record<string, unknown>): string;
|
|
19
|
+
/** Returning to a displayed preset is clean, except when clearing means omission. */
|
|
20
|
+
export declare function hasFormChanges(columns: ColumnMeta[], values: Record<string, string>, defaults: Record<string, unknown>, edited: ReadonlySet<string>): boolean;
|
|
21
|
+
/** Untouched DSL defaults retain their types; a cleared, edited control means omission. */
|
|
22
|
+
export declare function insertValues(values: Record<string, string>, defaults: Record<string, unknown>, edited: ReadonlySet<string>, columns: readonly ColumnMeta[]): Record<string, unknown>;
|
|
23
|
+
/**
|
|
24
|
+
* The required columns a create leaves without a value. `derived` is the form's values taken from a referenced
|
|
25
|
+
* record (`{ from: 'part_id.unit_price' }`), for columns the form does not show: the server fills one from the
|
|
26
|
+
* record its reference names (server app/appValidation.ts fillDerived), so it is not missing while that
|
|
27
|
+
* reference has a value. A shown one the person emptied is theirs to fill, and is not passed here.
|
|
28
|
+
*/
|
|
29
|
+
export declare function missingFields(columns: ColumnMeta[], values: Record<string, unknown>, assigned: string | null, derived?: Readonly<Record<string, string | undefined>>): ColumnMeta[];
|
|
30
|
+
/** Where the New form is drawn: what it says, else a drawer for a short form and a page for a long or stepped one. */
|
|
31
|
+
export declare function formFrame(form: FormCuration | undefined, fieldCount: number): 'drawer' | 'page';
|
|
32
|
+
export type FieldInput = 'text' | 'textarea' | 'richText' | 'number' | 'money' | 'radios' | 'listbox' | 'switch' | 'flag' | 'date' | 'datetime' | 'reference';
|
|
33
|
+
/**
|
|
34
|
+
* The input an App's New form draws a column as, from the column and how the
|
|
35
|
+
* App dresses it. `hasStart` is whether the field starts with a value (a form
|
|
36
|
+
* default, or the database's): a vocabulary or a flag that must be answered
|
|
37
|
+
* and has none to start from stays a listbox, whose empty entry says so.
|
|
38
|
+
*/
|
|
39
|
+
export declare function fieldInput(column: ColumnMeta, options: {
|
|
40
|
+
money?: boolean;
|
|
41
|
+
multiline?: boolean;
|
|
42
|
+
richText?: boolean;
|
|
43
|
+
required: boolean;
|
|
44
|
+
hasStart: boolean;
|
|
45
|
+
reference: boolean;
|
|
46
|
+
}): FieldInput;
|
|
47
|
+
/** What a form default's word starts as, now: `today` a date, `now` a wall-clock time (or a date on a date column), said as the date field says one: `YYYY-MM-DD HH:MM`. */
|
|
48
|
+
export declare function clockDefault(word: 'today' | 'now', column: ColumnMeta, now: Date, timeZone?: string): string;
|
|
49
|
+
/** The choices a narrowed reference offers, in the query language: `project_id = 4`; undefined while a field it reads is empty. */
|
|
50
|
+
export declare function narrowingCondition(where: Readonly<Record<string, string>> | undefined, values: Readonly<Record<string, unknown>>): string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Where a flag's switch starts: the form's default, else the database's when
|
|
53
|
+
* it is a plain true or false, else off for a flag that must be answered. A
|
|
54
|
+
* nullable flag with nothing to start from has none, and keeps the listbox
|
|
55
|
+
* whose empty entry means "leave it".
|
|
56
|
+
*/
|
|
57
|
+
export declare function flagStart(column: ColumnMeta, defaults: Record<string, unknown>): boolean | undefined;
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { coerceForColumn, columnKind, isFlagColumn } from '@mistriwork/engine/shared/schema.js';
|
|
2
|
+
import { autoKey, formShownFields, isRequired } from '@mistriwork/engine/shared/form.js';
|
|
3
|
+
import { evaluateFormCondition, typedValue } from '@mistriwork/engine/shared/formValues.js';
|
|
4
|
+
import { computedColumnMeta } from '@mistriwork/engine/shared/computed.js';
|
|
5
|
+
import { evaluateComputed } from '@mistriwork/engine/shared/computedValue.js';
|
|
6
|
+
/** Unknown draft dependencies stay visible so an incomplete form never hides
|
|
7
|
+
* the control needed to resolve its own condition. */
|
|
8
|
+
export function isFormFieldVisible(form, column, values, table) {
|
|
9
|
+
const condition = form?.when?.[column.name];
|
|
10
|
+
if (!condition)
|
|
11
|
+
return true;
|
|
12
|
+
try {
|
|
13
|
+
/* A computed column the condition reads is worked out from the draft, as the record will compute it once
|
|
14
|
+
stored: `when: { po_number: 'total > 1000' }`. One over a rollup reads no lines here, so it stays unknown. */
|
|
15
|
+
const computed = Object.entries(table.computed ?? {});
|
|
16
|
+
if (!computed.length)
|
|
17
|
+
return evaluateFormCondition(condition, values, table.columns) !== false;
|
|
18
|
+
const clock = { today: new Date().toISOString().slice(0, 10), now: new Date(), me: null };
|
|
19
|
+
const worked = Object.fromEntries(computed.map(([name, value]) => {
|
|
20
|
+
const result = evaluateComputed(value.expr, clock, (path) => typedValue(table, path, values[path]));
|
|
21
|
+
return [
|
|
22
|
+
name,
|
|
23
|
+
result !== null && typeof result === 'object' ? ('day' in result ? result.day : result.instant.toISOString()) : result,
|
|
24
|
+
];
|
|
25
|
+
}));
|
|
26
|
+
const columns = [...table.columns, ...computed.map(([name, value]) => computedColumnMeta(name, value))];
|
|
27
|
+
return evaluateFormCondition(condition, { ...values, ...worked }, columns) !== false;
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
// A server-validated form should never reach this branch, but rendering
|
|
31
|
+
// must fail open if a stale app response crosses a client reload.
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function editableColumns(table, app) {
|
|
36
|
+
const assigned = app ? autoKey(table) : null;
|
|
37
|
+
// A machine's column starts in its first state and then moves only by its verbs.
|
|
38
|
+
return table.columns.filter((c) => c.writable !== false && c.changesBy !== 'actions' && c.identity !== 'always' && !(app && c.identity) && c.name !== assigned);
|
|
39
|
+
}
|
|
40
|
+
export function formColumns(table, form, app) {
|
|
41
|
+
const shown = formShownFields(form);
|
|
42
|
+
const columns = shown ? [...new Set(shown)].flatMap((name) => table.columns.find((c) => c.name === name) ?? []) : table.columns;
|
|
43
|
+
const editable = new Set(editableColumns(table, app));
|
|
44
|
+
return columns.filter((c) => editable.has(c));
|
|
45
|
+
}
|
|
46
|
+
/** Grouped fields retain authored order; ungrouped fields follow in form order. */
|
|
47
|
+
export function formGroups(table, form, app) {
|
|
48
|
+
const columns = formColumns(table, form, app);
|
|
49
|
+
if (!form?.groups?.length)
|
|
50
|
+
return [{ label: '', columns }];
|
|
51
|
+
const byName = new Map(columns.map((column) => [column.name, column]));
|
|
52
|
+
const claimed = new Set();
|
|
53
|
+
const groups = form.groups.flatMap((group) => {
|
|
54
|
+
const groupColumns = group.fields.flatMap((name) => {
|
|
55
|
+
const column = byName.get(name);
|
|
56
|
+
if (!column || claimed.has(name))
|
|
57
|
+
return [];
|
|
58
|
+
claimed.add(name);
|
|
59
|
+
return [column];
|
|
60
|
+
});
|
|
61
|
+
return groupColumns.length ? [{ label: group.label, columns: groupColumns }] : [];
|
|
62
|
+
});
|
|
63
|
+
const remainder = columns.filter((column) => !claimed.has(column.name));
|
|
64
|
+
if (remainder.length)
|
|
65
|
+
groups.push({ label: '', columns: remainder });
|
|
66
|
+
return groups.length ? groups : [{ label: '', columns }];
|
|
67
|
+
}
|
|
68
|
+
export function presetValue(column, defaults) {
|
|
69
|
+
const value = Object.hasOwn(defaults, column.name) ? defaults[column.name] : undefined;
|
|
70
|
+
if (value === null || value === undefined)
|
|
71
|
+
return '';
|
|
72
|
+
if (!column.allowed?.length && isFlagColumn(column)) {
|
|
73
|
+
const flag = typeof value === 'string' ? coerceForColumn(column.type, value) : value;
|
|
74
|
+
if (typeof flag === 'boolean')
|
|
75
|
+
return flag ? '1' : '0';
|
|
76
|
+
}
|
|
77
|
+
return String(value);
|
|
78
|
+
}
|
|
79
|
+
/** Returning to a displayed preset is clean, except when clearing means omission. */
|
|
80
|
+
export function hasFormChanges(columns, values, defaults, edited) {
|
|
81
|
+
return columns.some((column) => {
|
|
82
|
+
if (!edited.has(column.name))
|
|
83
|
+
return false;
|
|
84
|
+
const value = values[column.name] ?? '';
|
|
85
|
+
return (value !== presetValue(column, defaults) ||
|
|
86
|
+
(value === '' && Object.hasOwn(defaults, column.name) && defaults[column.name] !== undefined));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/** Untouched DSL defaults retain their types; a cleared, edited control means omission. */
|
|
90
|
+
export function insertValues(values, defaults, edited, columns) {
|
|
91
|
+
const entries = new Map(Object.entries(defaults).filter(([, value]) => value !== undefined));
|
|
92
|
+
for (const [name, value] of Object.entries(values)) {
|
|
93
|
+
if (!edited.has(name) && entries.has(name))
|
|
94
|
+
continue;
|
|
95
|
+
entries.delete(name);
|
|
96
|
+
if (value !== '')
|
|
97
|
+
entries.set(name, value);
|
|
98
|
+
}
|
|
99
|
+
// Curation may hide allowed defaults, but cannot restore fields omitted or
|
|
100
|
+
// made read-only by the server. Also removes stale values from an open form.
|
|
101
|
+
const writable = new Set(columns.filter((column) => column.writable !== false).map((column) => column.name));
|
|
102
|
+
return Object.fromEntries([...entries].filter(([name]) => writable.has(name)));
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The required columns a create leaves without a value. `derived` is the form's values taken from a referenced
|
|
106
|
+
* record (`{ from: 'part_id.unit_price' }`), for columns the form does not show: the server fills one from the
|
|
107
|
+
* record its reference names (server app/appValidation.ts fillDerived), so it is not missing while that
|
|
108
|
+
* reference has a value. A shown one the person emptied is theirs to fill, and is not passed here.
|
|
109
|
+
*/
|
|
110
|
+
export function missingFields(columns, values, assigned, derived) {
|
|
111
|
+
return columns.filter((column) => {
|
|
112
|
+
if (column.writable === false)
|
|
113
|
+
return false;
|
|
114
|
+
const present = Object.hasOwn(values, column.name) && values[column.name] !== undefined;
|
|
115
|
+
if (present)
|
|
116
|
+
return !column.nullable && values[column.name] === null;
|
|
117
|
+
const via = derived?.[column.name]?.split('.')[0];
|
|
118
|
+
if (via && values[via] !== undefined && values[via] !== null && values[via] !== '')
|
|
119
|
+
return false;
|
|
120
|
+
return isRequired(column, assigned);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/* ---------- an App's New form: its frame, its inputs, its starting words ---------- */
|
|
124
|
+
/** A drawer holds a short form beside the list; past this many fields, or with steps, the form is a page of its own. */
|
|
125
|
+
const DRAWER_FIELDS = 8;
|
|
126
|
+
/** Where the New form is drawn: what it says, else a drawer for a short form and a page for a long or stepped one. */
|
|
127
|
+
export function formFrame(form, fieldCount) {
|
|
128
|
+
if (form?.open)
|
|
129
|
+
return form.open;
|
|
130
|
+
return form?.steps?.length || fieldCount > DRAWER_FIELDS ? 'page' : 'drawer';
|
|
131
|
+
}
|
|
132
|
+
/* A text column holding prose rather than a name or a code: said by its name,
|
|
133
|
+
since a TEXT or `text` type says nothing of its length. */
|
|
134
|
+
const PROSE = /^(?:description|notes?|body|bio|biography|comments?|summary|details|message|instructions|remarks|content|about)$|_(?:notes?|description|details|comments?|summary)$/i;
|
|
135
|
+
/** Radios show every word at once; past this many the listbox is shorter. The command form's rule. */
|
|
136
|
+
const RADIO_WORDS = 4;
|
|
137
|
+
/** The declared length of a text column, when its type says one: `varchar(500)` → 500. */
|
|
138
|
+
function declaredLength(column) {
|
|
139
|
+
const match = /\(\s*(\d+)\s*\)/.exec(column.type);
|
|
140
|
+
return match ? Number(match[1]) : undefined;
|
|
141
|
+
}
|
|
142
|
+
/** Whether a text column is drawn as a box of several lines. */
|
|
143
|
+
function isMultiline(column, multiline) {
|
|
144
|
+
if (multiline !== undefined)
|
|
145
|
+
return multiline;
|
|
146
|
+
if (column.allowed?.length || columnKind(column.type) !== 'text')
|
|
147
|
+
return false;
|
|
148
|
+
const length = declaredLength(column);
|
|
149
|
+
if (length !== undefined)
|
|
150
|
+
return length > 255;
|
|
151
|
+
return /^(?:mediumtext|longtext|clob|ntext)$/i.test(column.type.trim()) || PROSE.test(column.name);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* The input an App's New form draws a column as, from the column and how the
|
|
155
|
+
* App dresses it. `hasStart` is whether the field starts with a value (a form
|
|
156
|
+
* default, or the database's): a vocabulary or a flag that must be answered
|
|
157
|
+
* and has none to start from stays a listbox, whose empty entry says so.
|
|
158
|
+
*/
|
|
159
|
+
export function fieldInput(column, options) {
|
|
160
|
+
if (column.allowed?.length)
|
|
161
|
+
return column.allowed.length <= RADIO_WORDS && (options.required || options.hasStart) ? 'radios' : 'listbox';
|
|
162
|
+
const kind = columnKind(column.type);
|
|
163
|
+
/* A declared boolean, or an integer a CHECK pins to 0 and 1: both are yes or no. */
|
|
164
|
+
if (isFlagColumn(column))
|
|
165
|
+
return options.hasStart ? 'switch' : 'flag';
|
|
166
|
+
if (options.reference)
|
|
167
|
+
return 'reference';
|
|
168
|
+
if (kind === 'date')
|
|
169
|
+
return /time/i.test(column.type) ? 'datetime' : 'date';
|
|
170
|
+
if (kind === 'number')
|
|
171
|
+
return options.money ? 'money' : 'number';
|
|
172
|
+
if (options.richText)
|
|
173
|
+
return 'richText';
|
|
174
|
+
return isMultiline(column, options.multiline) ? 'textarea' : 'text';
|
|
175
|
+
}
|
|
176
|
+
/** What a form default's word starts as, now: `today` a date, `now` a wall-clock time (or a date on a date column), said as the date field says one: `YYYY-MM-DD HH:MM`. */
|
|
177
|
+
export function clockDefault(word, column, now, timeZone) {
|
|
178
|
+
const parts = Object.fromEntries(new Intl.DateTimeFormat('en-CA', {
|
|
179
|
+
timeZone,
|
|
180
|
+
year: 'numeric',
|
|
181
|
+
month: '2-digit',
|
|
182
|
+
day: '2-digit',
|
|
183
|
+
hour: '2-digit',
|
|
184
|
+
minute: '2-digit',
|
|
185
|
+
hourCycle: 'h23',
|
|
186
|
+
})
|
|
187
|
+
.formatToParts(now)
|
|
188
|
+
.map((part) => [part.type, part.value]));
|
|
189
|
+
const date = `${parts.year}-${parts.month}-${parts.day}`;
|
|
190
|
+
return word === 'now' && /time/i.test(column.type) ? `${date} ${parts.hour}:${parts.minute}` : date;
|
|
191
|
+
}
|
|
192
|
+
/** The choices a narrowed reference offers, in the query language: `project_id = 4`; undefined while a field it reads is empty. */
|
|
193
|
+
export function narrowingCondition(where, values) {
|
|
194
|
+
if (!where)
|
|
195
|
+
return '';
|
|
196
|
+
const clauses = [];
|
|
197
|
+
for (const [remote, local] of Object.entries(where)) {
|
|
198
|
+
const value = values[local];
|
|
199
|
+
if (value === undefined || value === null || value === '')
|
|
200
|
+
return undefined;
|
|
201
|
+
// A key typed as text ("4") is still a number to the column; a word is quoted, so `me` or `today` is never read as one.
|
|
202
|
+
const text = String(value);
|
|
203
|
+
clauses.push(`${remote} = ${typeof value !== 'string' || /^-?\d+(?:\.\d+)?$/.test(text) ? text : JSON.stringify(text)}`);
|
|
204
|
+
}
|
|
205
|
+
return clauses.join(' and ');
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Where a flag's switch starts: the form's default, else the database's when
|
|
209
|
+
* it is a plain true or false, else off for a flag that must be answered. A
|
|
210
|
+
* nullable flag with nothing to start from has none, and keeps the listbox
|
|
211
|
+
* whose empty entry means "leave it".
|
|
212
|
+
*/
|
|
213
|
+
export function flagStart(column, defaults) {
|
|
214
|
+
if (Object.hasOwn(defaults, column.name)) {
|
|
215
|
+
const value = defaults[column.name];
|
|
216
|
+
const flag = typeof value === 'string' ? coerceForColumn(column.type, value) : value;
|
|
217
|
+
if (typeof flag === 'boolean')
|
|
218
|
+
return flag;
|
|
219
|
+
/* An integer flag's default, said either way: 1, '1', true, 'true'. */
|
|
220
|
+
const said = String(value).trim().toLowerCase();
|
|
221
|
+
return /^(?:1|true|t)$/.test(said) ? true : /^(?:0|false|f)$/.test(said) ? false : undefined;
|
|
222
|
+
}
|
|
223
|
+
const stored = String(column.default ?? '')
|
|
224
|
+
.replace(/^'(.*)'$/, '$1')
|
|
225
|
+
.trim()
|
|
226
|
+
.toLowerCase();
|
|
227
|
+
if (/^(?:1|true|t)$/.test(stored))
|
|
228
|
+
return true;
|
|
229
|
+
if (/^(?:0|false|f)$/.test(stored))
|
|
230
|
+
return false;
|
|
231
|
+
return column.default === undefined && column.hasDefault !== true && !column.nullable ? false : undefined;
|
|
232
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** The same offer as a toast, for a part with no place of its own — or a module loaded by hand. */
|
|
2
|
+
export declare function sayUnavailable(): void;
|
|
3
|
+
/** The part's own component, plus the way to have it here before it is drawn, and whether it is. */
|
|
4
|
+
type OnDemand<C> = C & {
|
|
5
|
+
ready(): Promise<void>;
|
|
6
|
+
here(): boolean;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The named export of a module the bundler may put in a chunk of its own,
|
|
10
|
+
* as a component that loads it on its first draw. The type is the export's
|
|
11
|
+
* own, so the call sites and their props read as they did with a static
|
|
12
|
+
* import. `quiet` is for dialogs and controls: nothing while waiting, and a
|
|
13
|
+
* toast if the load fails.
|
|
14
|
+
*/
|
|
15
|
+
export declare function onDemand<M, K extends keyof M>(load: () => Promise<M>, name: K, { quiet }?: {
|
|
16
|
+
quiet?: boolean;
|
|
17
|
+
}): OnDemand<M[K]>;
|
|
18
|
+
/**
|
|
19
|
+
* Whether a part is here to draw, fetching it if not. For a host that waits
|
|
20
|
+
* in words of its own rather than the part's: a page section keeps its own
|
|
21
|
+
* skeleton until both its read and its drawing have arrived, so the one
|
|
22
|
+
* placeholder stands throughout, and a grid draws its cells as plain values
|
|
23
|
+
* until their editor has come. A part that could not load is "here" as the
|
|
24
|
+
* part's Reload offer, which the host draws in its place.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useArrived(part: {
|
|
27
|
+
ready(): Promise<void>;
|
|
28
|
+
here(): boolean;
|
|
29
|
+
}, wanted?: boolean): boolean;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The parts of the client that load the first time they are used.
|
|
4
|
+
*
|
|
5
|
+
* The published client is split (vite.config.ts): the Workbench's tools,
|
|
6
|
+
* the builders, boards, charts and the tenancy dialogs are chunks of their
|
|
7
|
+
* own, fetched when someone first opens one, so an App's first page does
|
|
8
|
+
* not wait for them. An import site names its part with `onDemand` and
|
|
9
|
+
* draws it like any component; this module is what shows while the chunk
|
|
10
|
+
* is on its way, and what shows when it cannot come.
|
|
11
|
+
*
|
|
12
|
+
* Waiting is quiet. Nothing for the first moments — a cached chunk arrives
|
|
13
|
+
* within a frame, and a placeholder that flashes reads as a glitch — then
|
|
14
|
+
* one still line of text: no spinner, no pulse (docs/design.md, motion
|
|
15
|
+
* rules 1 and 8). A part that is a dialog or a control waits with nothing at
|
|
16
|
+
* all, since there is no place of its own to say anything in. A host that
|
|
17
|
+
* draws a frame of its own — a modal panel, whose focus trap is the part's —
|
|
18
|
+
* awaits `ready()` first, so the frame never stands empty and open to Tab.
|
|
19
|
+
*
|
|
20
|
+
* A chunk that cannot load is almost always a deploy: the page was opened
|
|
21
|
+
* before it, and the file it names is gone. The only cure is the new page,
|
|
22
|
+
* so that is what is offered — a sentence and a Reload button where the
|
|
23
|
+
* part would have been, or the same offer as a toast for a part with no
|
|
24
|
+
* place of its own. Never a blank room. Only the load is caught: an error
|
|
25
|
+
* inside a part that did load goes wherever it went before it was split.
|
|
26
|
+
*
|
|
27
|
+
* Not React.lazy: a lazy component suspends on its first draw even when its
|
|
28
|
+
* module is already here, and a part that has arrived must draw at once.
|
|
29
|
+
*
|
|
30
|
+
* No stylesheet may be imported here or by anything this imports: Node's
|
|
31
|
+
* suites load client modules that use it.
|
|
32
|
+
*/
|
|
33
|
+
import { createElement, useEffect, useState } from 'react';
|
|
34
|
+
import { toast } from '../core.js';
|
|
35
|
+
import { Delayed } from './Skeleton.js';
|
|
36
|
+
import { beginWork } from '../pendingWork.js';
|
|
37
|
+
import { say } from '../copy/shell/components/onDemand.js';
|
|
38
|
+
const reload = () => {
|
|
39
|
+
window.location.reload();
|
|
40
|
+
};
|
|
41
|
+
function tracked(load) {
|
|
42
|
+
const settled = beginWork();
|
|
43
|
+
return load().finally(settled);
|
|
44
|
+
}
|
|
45
|
+
function Unavailable() {
|
|
46
|
+
return (_jsxs("p", { className: "note", role: "alert", children: [say('couldNotLoad'), ' ', _jsx("button", { type: "button", className: "ghost", onClick: reload, children: say('common.reload') })] }));
|
|
47
|
+
}
|
|
48
|
+
/** The same offer as a toast, for a part with no place of its own — or a module loaded by hand. */
|
|
49
|
+
export function sayUnavailable() {
|
|
50
|
+
toast(say('couldNotLoad'), 'error', { label: say('common.reload'), run: reload });
|
|
51
|
+
}
|
|
52
|
+
function UnavailableQuietly() {
|
|
53
|
+
useEffect(sayUnavailable, []);
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
const waiting = (_jsx(Delayed, { children: _jsx("p", { className: "loading", role: "status", children: say('common.loading') }) }));
|
|
57
|
+
/**
|
|
58
|
+
* The named export of a module the bundler may put in a chunk of its own,
|
|
59
|
+
* as a component that loads it on its first draw. The type is the export's
|
|
60
|
+
* own, so the call sites and their props read as they did with a static
|
|
61
|
+
* import. `quiet` is for dialogs and controls: nothing while waiting, and a
|
|
62
|
+
* toast if the load fails.
|
|
63
|
+
*/
|
|
64
|
+
export function onDemand(load, name, { quiet = false } = {}) {
|
|
65
|
+
let part;
|
|
66
|
+
let arriving;
|
|
67
|
+
/* Counted while it travels, so a navigation holds for the part as it does for a request (pendingWork.ts). */
|
|
68
|
+
const ready = () => (arriving ??= tracked(load).then((module) => {
|
|
69
|
+
part = module[name];
|
|
70
|
+
}, (error) => {
|
|
71
|
+
console.error(`The ${String(name)} chunk did not load.`, error);
|
|
72
|
+
part = quiet ? UnavailableQuietly : Unavailable;
|
|
73
|
+
}));
|
|
74
|
+
function OnDemandPart(props) {
|
|
75
|
+
const [, arrived] = useState(0);
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
if (part)
|
|
78
|
+
return;
|
|
79
|
+
let drawn = true;
|
|
80
|
+
void ready().then(() => {
|
|
81
|
+
if (drawn)
|
|
82
|
+
arrived((n) => n + 1);
|
|
83
|
+
});
|
|
84
|
+
return () => {
|
|
85
|
+
drawn = false;
|
|
86
|
+
};
|
|
87
|
+
}, []);
|
|
88
|
+
if (part)
|
|
89
|
+
return createElement(part, props);
|
|
90
|
+
return quiet ? null : waiting;
|
|
91
|
+
}
|
|
92
|
+
OnDemandPart.displayName = `OnDemand(${String(name)})`;
|
|
93
|
+
OnDemandPart.ready = ready;
|
|
94
|
+
OnDemandPart.here = () => part !== undefined;
|
|
95
|
+
return OnDemandPart;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Whether a part is here to draw, fetching it if not. For a host that waits
|
|
99
|
+
* in words of its own rather than the part's: a page section keeps its own
|
|
100
|
+
* skeleton until both its read and its drawing have arrived, so the one
|
|
101
|
+
* placeholder stands throughout, and a grid draws its cells as plain values
|
|
102
|
+
* until their editor has come. A part that could not load is "here" as the
|
|
103
|
+
* part's Reload offer, which the host draws in its place.
|
|
104
|
+
*/
|
|
105
|
+
export function useArrived(part, wanted = true) {
|
|
106
|
+
const [, arrived] = useState(0);
|
|
107
|
+
const here = part.here();
|
|
108
|
+
useEffect(() => {
|
|
109
|
+
if (here || !wanted)
|
|
110
|
+
return;
|
|
111
|
+
let drawn = true;
|
|
112
|
+
void part.ready().then(() => {
|
|
113
|
+
if (drawn)
|
|
114
|
+
arrived((n) => n + 1);
|
|
115
|
+
});
|
|
116
|
+
return () => {
|
|
117
|
+
drawn = false;
|
|
118
|
+
};
|
|
119
|
+
}, [part, here, wanted]);
|
|
120
|
+
return here;
|
|
121
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type Values = Record<string, unknown>;
|
|
2
|
+
export declare function useOptimisticMoves<Row extends Record<string, unknown>>(rows: readonly Row[], idOf: (row: Row) => string | null, idle?: () => Promise<unknown> | void): {
|
|
3
|
+
rows: Row[];
|
|
4
|
+
/** Whether a record's move is still out: waiting on a form it opened, or being saved. */
|
|
5
|
+
pending: (id: string) => 'asking' | 'saving' | undefined;
|
|
6
|
+
/** Draw a move now: each record with the values it will write. Returns the move, for what happens to it next. */
|
|
7
|
+
begin(writes: ReadonlyArray<readonly [string, Values]>, phase?: 'asking' | 'saving'): number;
|
|
8
|
+
/** The form a move opened was answered: the move is being saved. */
|
|
9
|
+
saving: (move: number) => void;
|
|
10
|
+
/** A record the move wrote more of than it drew (a renumbered neighbor): drawn with those values too. */
|
|
11
|
+
add: (move: number, writes: ReadonlyArray<readonly [string, Values]>) => void;
|
|
12
|
+
/** The move's writes applied: it stays drawn until the rows read agree. */
|
|
13
|
+
saved: (move: number) => void;
|
|
14
|
+
/** The move did not apply, or was cancelled: its records go back. */
|
|
15
|
+
undo: (move: number) => void;
|
|
16
|
+
/** Run a move after those already waiting; when the last is done, `idle` reads the rows again, once. */
|
|
17
|
+
enqueue(task: () => Promise<void>): void;
|
|
18
|
+
/** Moves waiting their turn or being saved. */
|
|
19
|
+
busy: () => boolean;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A move drawn before the server has it, for every host a reader arranges by
|
|
3
|
+
* hand — a board's card to a lane or a place (BoardList), a calendar's record
|
|
4
|
+
* to a day (CalendarList), a list's row to its place (useListOrder).
|
|
5
|
+
*
|
|
6
|
+
* A move is drawn the moment it is made: each record it touches is drawn
|
|
7
|
+
* with the values the move will write (`begin`, synchronously, so a drag's
|
|
8
|
+
* copy settles into the card's new place rather than its old one), and stays
|
|
9
|
+
* so while its writes run. A write that is refused takes its move back
|
|
10
|
+
* (`undo`), and the host says the server's sentence. A write that applies
|
|
11
|
+
* leaves the record drawn as it is (`saved`) until the rows the host reads
|
|
12
|
+
* say the same — the host writes them into its cache, or reads them again —
|
|
13
|
+
* so the card never goes back to its old place in between, and never jumps
|
|
14
|
+
* twice.
|
|
15
|
+
*
|
|
16
|
+
* Moves run one after another (`enqueue`): one made while another is saving
|
|
17
|
+
* waits its turn rather than being dropped, and reads the board as the moves
|
|
18
|
+
* before it left it. When the last is done, `idle` is told once, for the one
|
|
19
|
+
* read again that settles every move.
|
|
20
|
+
*/
|
|
21
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
22
|
+
import { flushSync } from 'react-dom';
|
|
23
|
+
/* A stored value and the one a move wrote agree as the page would say them: 1024 and "1024", null and nothing. */
|
|
24
|
+
const same = (a, b) => String(a ?? '') === String(b ?? '');
|
|
25
|
+
let moves = 0;
|
|
26
|
+
export function useOptimisticMoves(rows, idOf, idle) {
|
|
27
|
+
const [layers, setLayers] = useState(() => new Map());
|
|
28
|
+
const chain = useRef(Promise.resolve());
|
|
29
|
+
const waiting = useRef(0);
|
|
30
|
+
const latestIdle = useRef(idle);
|
|
31
|
+
latestIdle.current = idle;
|
|
32
|
+
const mounted = useRef(true);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
mounted.current = true;
|
|
35
|
+
return () => {
|
|
36
|
+
mounted.current = false;
|
|
37
|
+
};
|
|
38
|
+
}, []);
|
|
39
|
+
const change = (edit, now = false) => {
|
|
40
|
+
if (!mounted.current)
|
|
41
|
+
return;
|
|
42
|
+
const update = () => setLayers((current) => {
|
|
43
|
+
const next = new Map(current);
|
|
44
|
+
edit(next);
|
|
45
|
+
return next;
|
|
46
|
+
});
|
|
47
|
+
if (now)
|
|
48
|
+
flushSync(update);
|
|
49
|
+
else
|
|
50
|
+
update();
|
|
51
|
+
};
|
|
52
|
+
const each = (move, edit) => change((next) => {
|
|
53
|
+
for (const [id, list] of next) {
|
|
54
|
+
const kept = list.flatMap((layer) => (layer.move === move ? (edit(layer) ?? []) : [layer]));
|
|
55
|
+
if (kept.length)
|
|
56
|
+
next.set(id, kept);
|
|
57
|
+
else
|
|
58
|
+
next.delete(id);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
/* A saved record leaves the drawing once the rows read say what the move wrote. Nothing is named until a move is
|
|
62
|
+
made: a list nobody moves pays nothing. */
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (!layers.size)
|
|
65
|
+
return;
|
|
66
|
+
const base = new Map(rows.flatMap((row) => (idOf(row) === null ? [] : [[idOf(row), row]])));
|
|
67
|
+
const agreed = [...layers].filter(([id, list]) => list.every((layer) => layer.phase === 'saved') &&
|
|
68
|
+
base.has(id) &&
|
|
69
|
+
list.every((layer) => Object.entries(layer.values).every(([column, value]) => same(base.get(id)[column], value))));
|
|
70
|
+
if (agreed.length)
|
|
71
|
+
change((next) => agreed.forEach(([id]) => next.delete(id)));
|
|
72
|
+
});
|
|
73
|
+
/** The rows as the moves draw them: each record a move touches carries the values it will write. The same rows and
|
|
74
|
+
moves draw the same objects, so a host that renders on its rows' identity renders once. */
|
|
75
|
+
const latestId = useRef(idOf);
|
|
76
|
+
latestId.current = idOf;
|
|
77
|
+
const drawn = useMemo(() => layers.size
|
|
78
|
+
? rows.map((row) => {
|
|
79
|
+
const id = latestId.current(row);
|
|
80
|
+
const list = id === null ? undefined : layers.get(id);
|
|
81
|
+
return list ? Object.assign({}, row, ...list.map((layer) => layer.values)) : row;
|
|
82
|
+
})
|
|
83
|
+
: rows, [rows, layers]);
|
|
84
|
+
return {
|
|
85
|
+
rows: drawn,
|
|
86
|
+
/** Whether a record's move is still out: waiting on a form it opened, or being saved. */
|
|
87
|
+
pending: (id) => {
|
|
88
|
+
const list = layers.get(id);
|
|
89
|
+
if (!list)
|
|
90
|
+
return undefined;
|
|
91
|
+
return list.some((layer) => layer.phase === 'asking')
|
|
92
|
+
? 'asking'
|
|
93
|
+
: list.some((layer) => layer.phase === 'saving')
|
|
94
|
+
? 'saving'
|
|
95
|
+
: undefined;
|
|
96
|
+
},
|
|
97
|
+
/** Draw a move now: each record with the values it will write. Returns the move, for what happens to it next. */
|
|
98
|
+
begin(writes, phase = 'saving') {
|
|
99
|
+
const move = ++moves;
|
|
100
|
+
change((next) => {
|
|
101
|
+
for (const [id, values] of writes)
|
|
102
|
+
next.set(id, [...(next.get(id) ?? []), { move, values, phase }]);
|
|
103
|
+
}, true);
|
|
104
|
+
return move;
|
|
105
|
+
},
|
|
106
|
+
/** The form a move opened was answered: the move is being saved. */
|
|
107
|
+
saving: (move) => each(move, (layer) => ({ ...layer, phase: 'saving' })),
|
|
108
|
+
/** A record the move wrote more of than it drew (a renumbered neighbor): drawn with those values too. */
|
|
109
|
+
add: (move, writes) => change((next) => {
|
|
110
|
+
for (const [id, values] of writes)
|
|
111
|
+
next.set(id, [...(next.get(id) ?? []), { move, values, phase: 'saving' }]);
|
|
112
|
+
}),
|
|
113
|
+
/** The move's writes applied: it stays drawn until the rows read agree. */
|
|
114
|
+
saved: (move) => each(move, (layer) => ({ ...layer, phase: 'saved' })),
|
|
115
|
+
/** The move did not apply, or was cancelled: its records go back. */
|
|
116
|
+
undo: (move) => each(move, () => null),
|
|
117
|
+
/** Run a move after those already waiting; when the last is done, `idle` reads the rows again, once. */
|
|
118
|
+
enqueue(task) {
|
|
119
|
+
waiting.current += 1;
|
|
120
|
+
chain.current = chain.current
|
|
121
|
+
.then(task)
|
|
122
|
+
.catch(() => undefined)
|
|
123
|
+
.then(async () => {
|
|
124
|
+
waiting.current -= 1;
|
|
125
|
+
if (waiting.current > 0 || !mounted.current)
|
|
126
|
+
return;
|
|
127
|
+
await latestIdle.current?.();
|
|
128
|
+
/* What the read said is the truth now: a saved move whose rows still disagree (a verb that put the record
|
|
129
|
+
somewhere else) is let go, a frame after the read is drawn, so the drawing never goes back in between. */
|
|
130
|
+
if (waiting.current === 0)
|
|
131
|
+
setTimeout(() => change((next) => {
|
|
132
|
+
for (const [id, list] of next) {
|
|
133
|
+
const kept = list.filter((layer) => layer.phase !== 'saved');
|
|
134
|
+
if (kept.length)
|
|
135
|
+
next.set(id, kept);
|
|
136
|
+
else
|
|
137
|
+
next.delete(id);
|
|
138
|
+
}
|
|
139
|
+
}), 32);
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
/** Moves waiting their turn or being saved. */
|
|
143
|
+
busy: () => waiting.current > 0,
|
|
144
|
+
};
|
|
145
|
+
}
|