@mistriwork/kit 1.0.0-rc.10 → 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,398 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The sidebar's list: the app's menu or every table, drawn into the `ul`
|
|
4
|
+
* the shell owns.
|
|
5
|
+
*
|
|
6
|
+
* Rows that name a table carry `data-table` (and, in an app, `data-navq`)
|
|
7
|
+
* the way they always have, so the stylesheet, the tests and the keyboard
|
|
8
|
+
* cannot tell the two lists apart. Two states light a row: `aria-current`
|
|
9
|
+
* for the room on screen, `.active` for the keyboard's cursor — one row
|
|
10
|
+
* usually, two while a skim has run ahead of its debounced preview, when
|
|
11
|
+
* the list wears `skimming` so the stale one steps back.
|
|
12
|
+
*
|
|
13
|
+
* An app's rows carry a live count (navCounts.ts), asked for only while
|
|
14
|
+
* the row is on screen; the workbench's carry the catalog's snapshot.
|
|
15
|
+
*
|
|
16
|
+
* The keyboard's moves are exported beside the component rather than
|
|
17
|
+
* bound in it: the shell owns the filter box and the sidebar's key
|
|
18
|
+
* handler, and the roving cursor is a store both read. A move flushes the
|
|
19
|
+
* render synchronously so the row it lands on can be focused and scrolled
|
|
20
|
+
* in the same keystroke.
|
|
21
|
+
*/
|
|
22
|
+
import { useMessageLanguage } from './useMessageLanguage.js';
|
|
23
|
+
import { shell } from '../shellMode.js';
|
|
24
|
+
import { openFavorite } from './favoriteNav.js';
|
|
25
|
+
import { favoriteId, favoritesVersion, subscribeFavorites } from './favorites.js';
|
|
26
|
+
import { useCallback, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
27
|
+
import { createPortal, flushSync } from 'react-dom';
|
|
28
|
+
import { go, pageView, tableView, toast, state } from '../core.js';
|
|
29
|
+
import { appListQuery } from './appListModel.js';
|
|
30
|
+
import { useWalk } from './walk.js';
|
|
31
|
+
import { useCountsOnFocus, useInView, useNavCount } from './navCounts.js';
|
|
32
|
+
import { currentDashView, currentFormView, currentSidebarIndex, effectiveCursor, railed, rowCount, setSidebarCursor, sidebarView, sidebarFilter, sidebarItems, sidebarVersion, stickyTab, subscribeSidebar, tableRows, setSidebarGroupCollapsed, } from './sidebarModel.js';
|
|
33
|
+
import { NavGlyph } from './NavGlyph.js';
|
|
34
|
+
import { say } from '../copy/shell/components/Sidebar.js';
|
|
35
|
+
/* Whether the sidebar is folded: palette.js toggles `sidebar-hidden` on the
|
|
36
|
+
body and announces each fold. In the icon rail the words are hidden, so a
|
|
37
|
+
folded entry says its name on hover (its title) — and only then, since an
|
|
38
|
+
open menu already shows every name. */
|
|
39
|
+
const subscribeFold = (notify) => {
|
|
40
|
+
addHostListener(document, 'mistri:sidebar-fold', notify);
|
|
41
|
+
return () => removeHostListener(document, 'mistri:sidebar-fold', notify);
|
|
42
|
+
};
|
|
43
|
+
const foldedNow = () => shellBody().classList.contains('sidebar-hidden');
|
|
44
|
+
import { dashPageId, formPageId } from './appRooms.js';
|
|
45
|
+
import { formatNumber } from '../locale.js';
|
|
46
|
+
import { addHostListener, removeHostListener, shellBody, shellQueryAll } from '../shellHost.js';
|
|
47
|
+
/**
|
|
48
|
+
* The Workbench's table list, drawn as it scrolls once it is long.
|
|
49
|
+
*
|
|
50
|
+
* A catalog of three hundred tables was three hundred rows in the DOM, each a
|
|
51
|
+
* button with a count, before the reader had looked at one: 2,300 nodes on
|
|
52
|
+
* the landing. Past WINDOWED rows the list draws the rows in view and a few
|
|
53
|
+
* either side, with a spacer for the rest, the way the grid windows a long
|
|
54
|
+
* result. An App's menu is never this long and is always drawn whole.
|
|
55
|
+
*/
|
|
56
|
+
const WINDOWED = 100;
|
|
57
|
+
const OVERSCAN_ROWS = 16;
|
|
58
|
+
/* The windowed list's way to put a row on screen before a key moves to it:
|
|
59
|
+
moveSidebar asks for the row it lands on, which may not be drawn yet. */
|
|
60
|
+
let revealRow = null;
|
|
61
|
+
function useRowWindow(host, count, on) {
|
|
62
|
+
/* Rows are one height (a table's name and its count, one line), read from
|
|
63
|
+
two drawn rows: offsetTop and scrollTop are both layout pixels, the ruler
|
|
64
|
+
a spacer's height is set in. */
|
|
65
|
+
const [pitch, setPitch] = useState(26);
|
|
66
|
+
const read = useCallback(() => {
|
|
67
|
+
const top = host.scrollTop, view = host.clientHeight || 800;
|
|
68
|
+
return [Math.max(0, Math.floor(top / pitch) - OVERSCAN_ROWS), Math.min(count, Math.ceil((top + view) / pitch) + OVERSCAN_ROWS)];
|
|
69
|
+
}, [host, count, pitch]);
|
|
70
|
+
const [range, setRange] = useState(() => [0, Math.min(count, 60)]);
|
|
71
|
+
useLayoutEffect(() => {
|
|
72
|
+
if (!on)
|
|
73
|
+
return undefined;
|
|
74
|
+
const update = () => setRange((was) => {
|
|
75
|
+
const next = read();
|
|
76
|
+
return was[0] === next[0] && was[1] === next[1] ? was : next;
|
|
77
|
+
});
|
|
78
|
+
update();
|
|
79
|
+
host.addEventListener('scroll', update, { passive: true });
|
|
80
|
+
const observer = typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(update);
|
|
81
|
+
observer?.observe(host);
|
|
82
|
+
const reveal = (index) => {
|
|
83
|
+
const top = index * pitch;
|
|
84
|
+
if (top < host.scrollTop)
|
|
85
|
+
host.scrollTop = top;
|
|
86
|
+
else if (top + pitch > host.scrollTop + host.clientHeight)
|
|
87
|
+
host.scrollTop = top + pitch - host.clientHeight;
|
|
88
|
+
flushSync(update);
|
|
89
|
+
};
|
|
90
|
+
revealRow = reveal;
|
|
91
|
+
return () => {
|
|
92
|
+
host.removeEventListener('scroll', update);
|
|
93
|
+
observer?.disconnect();
|
|
94
|
+
if (revealRow === reveal)
|
|
95
|
+
revealRow = null;
|
|
96
|
+
};
|
|
97
|
+
}, [on, host, read, pitch]);
|
|
98
|
+
useLayoutEffect(() => {
|
|
99
|
+
if (!on)
|
|
100
|
+
return;
|
|
101
|
+
const rows = host.querySelectorAll(':scope > li:not(.sidebar-spacer)');
|
|
102
|
+
if (rows.length < 2)
|
|
103
|
+
return;
|
|
104
|
+
const measured = rows[1].offsetTop - rows[0].offsetTop;
|
|
105
|
+
if (measured > 0 && Math.abs(measured - pitch) >= 0.5)
|
|
106
|
+
setPitch(measured);
|
|
107
|
+
});
|
|
108
|
+
return on ? { start: Math.min(range[0], count), end: Math.min(range[1], count), pitch } : { start: 0, end: count, pitch };
|
|
109
|
+
}
|
|
110
|
+
/** A workspace's mark says its name's words, not its first two letters: "Payday demo workspace" is PD, not "Pa". */
|
|
111
|
+
export function identityInitials(title) {
|
|
112
|
+
return title
|
|
113
|
+
.trim()
|
|
114
|
+
.split(/\s+/)
|
|
115
|
+
.slice(0, 2)
|
|
116
|
+
.map((word) => Array.from(word)[0] ?? '')
|
|
117
|
+
.join('')
|
|
118
|
+
.toLocaleUpperCase();
|
|
119
|
+
}
|
|
120
|
+
/* Where the shell follows no targets of the nav. */
|
|
121
|
+
const followNothing = () => { };
|
|
122
|
+
export function Sidebar({ host, footerHost: suppliedFooterHost, onSelect, tabNavigation = false }) {
|
|
123
|
+
useMessageLanguage();
|
|
124
|
+
useWalk();
|
|
125
|
+
useSyncExternalStore(subscribeSidebar, sidebarVersion, sidebarVersion);
|
|
126
|
+
useSyncExternalStore(subscribeFavorites, favoritesVersion, favoritesVersion);
|
|
127
|
+
useCountsOnFocus();
|
|
128
|
+
const app = shell().inApp() ? shell().app() : null;
|
|
129
|
+
const schema = state.schema;
|
|
130
|
+
/* The nav's targets into the suite's other Apps are the shell's to follow (shellMode.ts `navTargets`). */
|
|
131
|
+
const targets = shell().slots.navTargets;
|
|
132
|
+
const useFollowTargets = targets?.useFollow ?? followNothing;
|
|
133
|
+
useFollowTargets(app, schema);
|
|
134
|
+
useLayoutEffect(() => {
|
|
135
|
+
const refresh = () => {
|
|
136
|
+
if (app)
|
|
137
|
+
targets?.refresh(app, schema);
|
|
138
|
+
};
|
|
139
|
+
// A drawer can mount while the desktop sidebar already holds this projection.
|
|
140
|
+
if (tabNavigation)
|
|
141
|
+
refresh();
|
|
142
|
+
addHostListener(document, 'mistri:sidebar-fold', refresh);
|
|
143
|
+
return () => removeHostListener(document, 'mistri:sidebar-fold', refresh);
|
|
144
|
+
}, [app, schema, tabNavigation]);
|
|
145
|
+
const items = sidebarItems(sidebarFilter());
|
|
146
|
+
const current = currentSidebarIndex(items);
|
|
147
|
+
const cursor = effectiveCursor(current);
|
|
148
|
+
const dashView = currentDashView();
|
|
149
|
+
const formView = currentFormView();
|
|
150
|
+
/* Whether the cursor has run ahead of the table on screen. The preview
|
|
151
|
+
behind the arrow keys is debounced, so for a beat the row being read
|
|
152
|
+
and the row being pointed at are different rows. */
|
|
153
|
+
const skimming = cursor >= 0 && cursor !== current;
|
|
154
|
+
useLayoutEffect(() => {
|
|
155
|
+
host.classList.toggle('skimming', skimming);
|
|
156
|
+
}, [host, skimming]);
|
|
157
|
+
const rail = !tabNavigation && railed();
|
|
158
|
+
const folded = useSyncExternalStore(subscribeFold, foldedNow, () => false);
|
|
159
|
+
const hover = (label) => (rail && folded ? label : undefined);
|
|
160
|
+
const sidebar = shell().inApp() ? shell().app()?.ui?.shell?.sidebar : undefined;
|
|
161
|
+
const footerHost = suppliedFooterHost ?? host.parentElement?.querySelector('#sidebar-app-footer');
|
|
162
|
+
const pinned = Boolean(sidebar && footerHost);
|
|
163
|
+
useLayoutEffect(() => {
|
|
164
|
+
const parent = host.closest('.sidebar');
|
|
165
|
+
if (!parent)
|
|
166
|
+
return;
|
|
167
|
+
if (sidebar)
|
|
168
|
+
parent.dataset.density = sidebar.density ?? 'compact';
|
|
169
|
+
else
|
|
170
|
+
delete parent.dataset.density;
|
|
171
|
+
return () => {
|
|
172
|
+
delete parent.dataset.density;
|
|
173
|
+
};
|
|
174
|
+
}, [host, sidebar]);
|
|
175
|
+
/* The menu's rows are not Tab stops: its filter is, and the arrows move
|
|
176
|
+
from there. An App that hides the filter (`ui.shell.search`, a short
|
|
177
|
+
menu) left the menu with no stop at all, unreachable from the keyboard
|
|
178
|
+
and a scrolling list axe could not enter. Then the current row, or the
|
|
179
|
+
first, is the one stop, and the arrows move from it as before. */
|
|
180
|
+
useLayoutEffect(() => {
|
|
181
|
+
if (tabNavigation)
|
|
182
|
+
return;
|
|
183
|
+
// The rows the cursor moves over, and the one this effect made a stop last time.
|
|
184
|
+
const rows = [...host.querySelectorAll(':scope > li > :is(button, a[href]):is([tabindex="-1"], [data-roving])')];
|
|
185
|
+
for (const row of rows) {
|
|
186
|
+
row.tabIndex = -1;
|
|
187
|
+
delete row.dataset.roving;
|
|
188
|
+
}
|
|
189
|
+
const filter = host.ownerDocument.getElementById('table-filter');
|
|
190
|
+
if (filter && filter.offsetParent !== null)
|
|
191
|
+
return;
|
|
192
|
+
const stop = rows.find((row) => row === document.activeElement) ?? rows.find((row) => row.getAttribute('aria-current') === 'true') ?? rows[0];
|
|
193
|
+
if (stop) {
|
|
194
|
+
stop.tabIndex = 0;
|
|
195
|
+
stop.dataset.roving = '';
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
/* Each table row's place among the table rows, which is what the keyboard's
|
|
199
|
+
cursor counts in; worked out over the whole list so a windowed slice of
|
|
200
|
+
it numbers its rows as the whole list would. */
|
|
201
|
+
const tableIndexes = [];
|
|
202
|
+
let tables = -1;
|
|
203
|
+
for (const item of items)
|
|
204
|
+
tableIndexes.push(item.kind === 'table' ? (tables += 1) : -1);
|
|
205
|
+
const windowed = !shell().inApp() && !tabNavigation && items.length > WINDOWED;
|
|
206
|
+
const { start, end, pitch } = useRowWindow(host, items.length, windowed);
|
|
207
|
+
const spacer = (key, rows) => rows > 0 ? _jsx("li", { className: "sidebar-spacer", "aria-hidden": "true", style: { height: `${rows * pitch}px`, margin: 0 } }, key) : null;
|
|
208
|
+
return (_jsxs(_Fragment, { children: [windowed && spacer('above', start), items.slice(start, end).map((item, at) => {
|
|
209
|
+
const i = start + at;
|
|
210
|
+
/* The depth is the button's own inset (features.css reads it), not the
|
|
211
|
+
row's: as padding on the <li> it moved the current fill in with the
|
|
212
|
+
words, so a nested room's fill began 13px right of a top-level one's. */
|
|
213
|
+
const order = item.footOrder ? { order: item.footOrder } : undefined;
|
|
214
|
+
const indent = item.depth && !(rail && folded) ? { '--nav-indent': `${Math.min(item.depth, 4) * 12}px`, ...order } : order;
|
|
215
|
+
switch (item.kind) {
|
|
216
|
+
case 'target':
|
|
217
|
+
return (_jsx("li", { style: indent, children: _jsxs("a", { className: "app-nav-target", href: item.href, tabIndex: tabNavigation ? 0 : -1, title: hover(item.label), onClick: (event) => {
|
|
218
|
+
if (!event.ctrlKey && !event.metaKey && !event.shiftKey && !event.altKey && event.button === 0)
|
|
219
|
+
onSelect?.();
|
|
220
|
+
}, children: [_jsx(NavGlyph, { label: item.label, railed: rail, color: item.color }), _jsx("span", { className: "nav-label", children: item.label })] }) }, `target:${i}:${item.href}`));
|
|
221
|
+
case 'gap':
|
|
222
|
+
return _jsx("li", { className: "nav-foot-gap", "aria-hidden": "true" }, "foot-gap");
|
|
223
|
+
case 'group':
|
|
224
|
+
return (_jsx("li", { className: "nav-group",
|
|
225
|
+
/* The nested heading's inset over the look's own (style.css, a look's nav recipe): an inline padding
|
|
226
|
+
set the plain look's 8px, so in Lumen (12px) a nested heading stood out of line with its parent's. */
|
|
227
|
+
style: item.depth && !(rail && folded)
|
|
228
|
+
? { '--nav-group-inset': `${Math.max(0, Math.min(item.depth, 4) - 1) * 12}px`, ...order }
|
|
229
|
+
: order, children: _jsx("span", { role: "heading", "aria-level": Math.min((item.depth ?? 0) + 2, 6), children: item.groupId && !(rail && folded) ? (_jsxs("button", { type: "button", className: "nav-group-fold", "aria-expanded": item.expanded, "aria-disabled": item.reveal || undefined, title: item.reveal ? say('keptOpenForTheCurrent') : undefined, onClick: () => {
|
|
230
|
+
if (!item.reveal)
|
|
231
|
+
setSidebarGroupCollapsed(item.groupId, Boolean(item.expanded), Boolean(item.folded));
|
|
232
|
+
}, children: [_jsx("span", { children: item.label }), _jsx("svg", { "aria-hidden": "true", className: "nav-group-chevron", width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: _jsx("path", { d: item.expanded ? (item.anchored ? 'M4 10l4-4 4 4' : 'M4 6l4 4 4-4') : 'M6 4l4 4-4 4' }) })] })) : (item.label) }) }, item.groupId ?? `g${i}`));
|
|
233
|
+
case 'favorite':
|
|
234
|
+
return (_jsx("li", { className: "nav-favorite", children: _jsxs("button", { type: "button", tabIndex: tabNavigation ? 0 : -1, title: hover(item.label), onClick: () => {
|
|
235
|
+
const app = shell().app();
|
|
236
|
+
if (app) {
|
|
237
|
+
openFavorite(app, item.favorite);
|
|
238
|
+
onSelect?.();
|
|
239
|
+
}
|
|
240
|
+
}, children: [_jsx(NavGlyph, { label: item.label, railed: rail, rail: "star" }), _jsx("span", { className: "nav-label", children: item.label })] }) }, `s${favoriteId(item.favorite)}`));
|
|
241
|
+
case 'note':
|
|
242
|
+
return (_jsx("li", { children: _jsx("p", { className: "note", children: item.text }) }, `n${i}`));
|
|
243
|
+
case 'missing':
|
|
244
|
+
return (_jsx("li", { style: indent, children: _jsxs("button", { type: "button", className: "nav-missing", title: hover(item.label), onClick: () => toast(item.error, 'error'), children: [_jsx(NavGlyph, { icon: item.icon, label: item.label, railed: rail, color: item.navColor }), _jsx("span", { className: "nav-label", children: item.label }), _jsx("span", { className: "view-tag", children: say('missing') })] }) }, `m${i}`));
|
|
245
|
+
case 'dash':
|
|
246
|
+
return (_jsx("li", { style: indent, children: _jsxs("button", { type: "button", className: item.error ? 'nav-missing' : undefined, "data-dash": dashPageId(item.view), "aria-current": Boolean(dashView) && item.view === dashView ? 'true' : 'false', tabIndex: tabNavigation ? 0 : -1, title: hover(item.label), onClick: item.error
|
|
247
|
+
? () => toast(item.error ?? '', 'error')
|
|
248
|
+
: () => {
|
|
249
|
+
go(pageView(dashPageId(item.view), undefined, undefined, item.label), 'reset');
|
|
250
|
+
onSelect?.();
|
|
251
|
+
}, children: [_jsx(NavGlyph, { icon: item.icon, label: item.label, railed: rail, color: item.navColor }), _jsx("span", { className: "nav-label", children: item.label }), item.error ? _jsx("span", { className: "view-tag", children: say('missing') }) : null] }) }, `d${item.view}`));
|
|
252
|
+
case 'form':
|
|
253
|
+
return (_jsx("li", { style: indent, children: _jsxs("button", { type: "button", className: item.error ? 'nav-missing' : undefined, "data-form": item.page ?? formPageId(item.view), "aria-current": (item.page ?? item.view) === formView ? 'true' : 'false', tabIndex: tabNavigation ? 0 : -1, title: hover(item.label), onClick: item.error
|
|
254
|
+
? () => toast(item.error ?? '', 'error')
|
|
255
|
+
: () => {
|
|
256
|
+
go(pageView(item.page ?? formPageId(item.view), undefined, undefined, item.label), 'reset');
|
|
257
|
+
onSelect?.();
|
|
258
|
+
}, children: [_jsx(NavGlyph, { icon: item.icon, label: item.label, railed: rail, color: item.navColor }), _jsx("span", { className: "nav-label", children: item.label }), item.error ? _jsx("span", { className: "view-tag", children: say('missing') }) : null] }) }, `f${item.view}`));
|
|
259
|
+
case 'table': {
|
|
260
|
+
const index = tableIndexes[i];
|
|
261
|
+
return (_jsx("li", { style: indent, children: _jsx(TableRow, { item: item, index: index, current: index === current, active: cursor >= 0 && index === cursor, rail: rail, quiet: rail && folded, title: hover(item.label), onSelect: onSelect, tabNavigation: tabNavigation }) }, `r${item.table}|${item.navq ?? '-'}|${i}`));
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}), windowed && spacer('below', items.length - end), pinned && footerHost
|
|
265
|
+
? createPortal(_jsx(_Fragment, { children: sidebar?.footer ? (_jsxs("div", { className: "sidebar-identity", title: sidebar.footer.title, children: [_jsx("span", { className: "sidebar-identity-mark", "aria-hidden": "true", children: identityInitials(sidebar.footer.title) }), _jsxs("span", { className: "sidebar-identity-copy", children: [_jsx("strong", { children: sidebar.footer.title }), sidebar.footer.description ? _jsx("span", { children: sidebar.footer.description }) : null] })] })) : null }), footerHost)
|
|
266
|
+
: null] }));
|
|
267
|
+
}
|
|
268
|
+
/* `quiet`: folded into the rail, where a row shows its icon and no number, so it asks for no count. */
|
|
269
|
+
function TableRow({ item, index, current, active, rail, quiet, title, onSelect, tabNavigation = false, }) {
|
|
270
|
+
const row = useRef(null);
|
|
271
|
+
const snapshot = rowCount(item, undefined);
|
|
272
|
+
/* Named by its label alone and the count said as its description: named
|
|
273
|
+
with the number, a row was "Website 1", which a screen reader reads as
|
|
274
|
+
its name and a test or a voice command has to guess at. */
|
|
275
|
+
const labelId = useId(), countId = useId();
|
|
276
|
+
return (_jsxs("button", { ref: row, type: "button", "data-table": item.table, "data-navq": item.navq, "data-table-index": index, tabIndex: tabNavigation ? 0 : -1, "aria-current": current ? 'true' : 'false', "aria-labelledby": labelId, "aria-describedby": countId, className: active ? 'active' : undefined, title: title, onClick: item.entry
|
|
277
|
+
? /* A list opens on its first tab — the app decided what matters
|
|
278
|
+
most — not on the bare unfiltered table. */
|
|
279
|
+
() => {
|
|
280
|
+
go({ ...tableView(item.table, appListQuery(item.entry)), view: item.entry.id }, 'reset');
|
|
281
|
+
onSelect?.();
|
|
282
|
+
}
|
|
283
|
+
: /* Stays on the tab you were reading: comparing two tables'
|
|
284
|
+
diagrams should not mean landing back on Rows. */
|
|
285
|
+
() => {
|
|
286
|
+
go(tableView(item.table, undefined, stickyTab()), 'reset');
|
|
287
|
+
onSelect?.();
|
|
288
|
+
}, children: [_jsx(NavGlyph, { icon: item.icon, label: item.label, railed: rail, color: item.navColor }), _jsx("span", { className: "nav-label", id: labelId, children: item.label }), item.tag === 'view' ? (_jsx("span", { className: "view-tag", id: countId, children: say('view') })) : item.counted ? (_jsx(LiveCount, { item: item, spec: item.counted, row: row, quiet: quiet, id: countId })) : snapshot != null ? (_jsx("span", { className: "rows", id: countId, children: snapshot })) : null] }));
|
|
289
|
+
}
|
|
290
|
+
/** Its own component, so only a counted row holds a query. */
|
|
291
|
+
function LiveCount({ item, spec, row, quiet, id, }) {
|
|
292
|
+
const visible = useInView(row);
|
|
293
|
+
// A folded menu asks nothing, rail or not: a rail row is on screen but shows no number.
|
|
294
|
+
const live = useNavCount(spec, visible && !quiet);
|
|
295
|
+
const text = rowCount(item, live);
|
|
296
|
+
if (text == null)
|
|
297
|
+
return null;
|
|
298
|
+
return (_jsx("span", { className: item.late && live && live.count > 0 ? 'rows is-overdue' : 'rows', id: id, title: live?.capped
|
|
299
|
+
? say('moreThanTheMenu', { count: formatNumber(live.count) })
|
|
300
|
+
: live?.exact === false
|
|
301
|
+
? say('roughlyFromTheDatabases')
|
|
302
|
+
: undefined, children: text }));
|
|
303
|
+
}
|
|
304
|
+
/** Pending preview, so holding an arrow key does not fire a query per row. */
|
|
305
|
+
let previewTimer = null;
|
|
306
|
+
/**
|
|
307
|
+
* Move the highlight, and show what it lands on.
|
|
308
|
+
*
|
|
309
|
+
* Highlight moves immediately; the query follows a beat later, so holding
|
|
310
|
+
* the key down skims the list without firing sixty-six queries on the way
|
|
311
|
+
* past. Navigation is a replace, not a push: skimming should not fill the
|
|
312
|
+
* browser's history with every table you scrolled past.
|
|
313
|
+
*
|
|
314
|
+
* Focus moves with the highlight — except out of the filter field: if you
|
|
315
|
+
* are typing there, the highlight is a cursor into the list rather than a
|
|
316
|
+
* place your hands are.
|
|
317
|
+
*/
|
|
318
|
+
export function moveSidebar(delta, host, filterInput) {
|
|
319
|
+
// An App with external targets skims controls by focus, never by loading a foreign room.
|
|
320
|
+
if (host.querySelector('a.app-nav-target')) {
|
|
321
|
+
if (previewTimer) {
|
|
322
|
+
clearTimeout(previewTimer);
|
|
323
|
+
previewTimer = null;
|
|
324
|
+
}
|
|
325
|
+
const controls = [...host.querySelectorAll(':scope > li > :is(button, a[href])')];
|
|
326
|
+
if (!controls.length)
|
|
327
|
+
return;
|
|
328
|
+
const from = controls.indexOf(document.activeElement);
|
|
329
|
+
const next = controls[(from + delta + controls.length) % controls.length];
|
|
330
|
+
for (const control of controls) {
|
|
331
|
+
control.tabIndex = control === next ? 0 : -1;
|
|
332
|
+
delete control.dataset.roving;
|
|
333
|
+
}
|
|
334
|
+
next.dataset.roving = '';
|
|
335
|
+
next.focus({ preventScroll: true });
|
|
336
|
+
next.scrollIntoView?.({ block: 'nearest' });
|
|
337
|
+
const index = next.dataset.tableIndex;
|
|
338
|
+
if (index !== undefined) {
|
|
339
|
+
const items = sidebarItems(sidebarFilter());
|
|
340
|
+
const row = tableRows(items)[Number(index)];
|
|
341
|
+
if (row) {
|
|
342
|
+
flushSync(() => setSidebarCursor(Number(index)));
|
|
343
|
+
previewTimer = setTimeout(() => {
|
|
344
|
+
go(sidebarView(row, stickyTab()), 'replace');
|
|
345
|
+
}, 110);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
const items = sidebarItems(sidebarFilter());
|
|
351
|
+
const rows = tableRows(items);
|
|
352
|
+
if (!rows.length)
|
|
353
|
+
return;
|
|
354
|
+
const from = effectiveCursor(currentSidebarIndex(items));
|
|
355
|
+
// Wraps, so holding one arrow key cycles rather than sticking at the end.
|
|
356
|
+
const next = (from + delta + rows.length) % rows.length;
|
|
357
|
+
flushSync(() => setSidebarCursor(next));
|
|
358
|
+
const find = () => host.querySelector(`button[data-table-index="${next}"]`);
|
|
359
|
+
/* A windowed list may not have drawn the row yet: scroll it into the window first. */
|
|
360
|
+
if (!find())
|
|
361
|
+
revealRow?.(items.findIndex((item) => item === rows[next]));
|
|
362
|
+
const button = find();
|
|
363
|
+
if (!button)
|
|
364
|
+
return;
|
|
365
|
+
if (document.activeElement !== filterInput)
|
|
366
|
+
button.focus({ preventScroll: true });
|
|
367
|
+
button.scrollIntoView?.({ block: 'nearest' });
|
|
368
|
+
if (previewTimer)
|
|
369
|
+
clearTimeout(previewTimer);
|
|
370
|
+
previewTimer = setTimeout(() => {
|
|
371
|
+
const row = rows[next];
|
|
372
|
+
go(sidebarView(row, stickyTab()), 'replace');
|
|
373
|
+
}, 110);
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Enter in the filter box commits the obvious row — the highlighted one,
|
|
377
|
+
* else the first — as a push, so the table you chose is a place you can
|
|
378
|
+
* come back to, unlike the ones you skimmed past. Dressed the way the click
|
|
379
|
+
* dresses it, in app mode. False when there is nothing to open.
|
|
380
|
+
*/
|
|
381
|
+
export function openSidebarChoice() {
|
|
382
|
+
const items = sidebarItems(sidebarFilter());
|
|
383
|
+
const rows = tableRows(items);
|
|
384
|
+
const from = effectiveCursor(currentSidebarIndex(items));
|
|
385
|
+
const first = items.find((item) => item.kind !== 'group' && item.kind !== 'note');
|
|
386
|
+
if (from < 0 && first?.kind === 'target') {
|
|
387
|
+
const anchor = [...shellQueryAll('#table-list a.app-nav-target')].find((link) => link.getAttribute('href') === first.href && link.querySelector('.nav-label')?.textContent === first.label);
|
|
388
|
+
if (!anchor)
|
|
389
|
+
return false;
|
|
390
|
+
anchor.click();
|
|
391
|
+
return true;
|
|
392
|
+
}
|
|
393
|
+
const row = rows[from >= 0 ? from : 0];
|
|
394
|
+
if (!row)
|
|
395
|
+
return false;
|
|
396
|
+
go(sidebarView(row, stickyTab()), 'reset');
|
|
397
|
+
return true;
|
|
398
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Placeholders shaped like the thing that is coming.
|
|
3
|
+
*
|
|
4
|
+
* Nothing appears immediately: most queries here finish in single-digit
|
|
5
|
+
* milliseconds, and a skeleton that flashes for 40ms reads as a glitch.
|
|
6
|
+
* `Delayed` mounts its children only once the wait has lasted long enough
|
|
7
|
+
* to be real. The shape is derived, not invented: the grid placeholder uses
|
|
8
|
+
* the table's own column count and the page size; the record placeholder
|
|
9
|
+
* uses the record's own layout.
|
|
10
|
+
*/
|
|
11
|
+
import { type ReactNode } from 'react';
|
|
12
|
+
export declare function Delayed({ ms, children }: {
|
|
13
|
+
ms?: number;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
/** One shimmering block. Width is a percentage so rows look uneven, as text is.
|
|
17
|
+
An element, not a component: a dashboard waiting on ten tiles drew some
|
|
18
|
+
3,500 of them, each redrawn as every tile answered. */
|
|
19
|
+
export declare function bar(width: number, height?: number, key?: number): import("react").JSX.Element;
|
|
20
|
+
export declare const widthAt: (i: number) => number;
|
|
21
|
+
export declare const GridSkeleton: import("react").MemoExoticComponent<({ columns, rows }: {
|
|
22
|
+
columns: number;
|
|
23
|
+
rows: number;
|
|
24
|
+
}) => import("react").JSX.Element>;
|
|
25
|
+
/** A record, before its fields arrive: the section shapes of the layout about to be drawn. */
|
|
26
|
+
export declare function RecordSkeleton({ sections }: {
|
|
27
|
+
sections: Array<{
|
|
28
|
+
title?: string;
|
|
29
|
+
count: number;
|
|
30
|
+
}>;
|
|
31
|
+
}): import("react").JSX.Element;
|
|
32
|
+
/** The Related list, before its counts arrive. */
|
|
33
|
+
export declare const RelatedSkeleton: import("react").MemoExoticComponent<({ count }: {
|
|
34
|
+
count: number;
|
|
35
|
+
}) => import("react").JSX.Element>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Placeholders shaped like the thing that is coming.
|
|
4
|
+
*
|
|
5
|
+
* Nothing appears immediately: most queries here finish in single-digit
|
|
6
|
+
* milliseconds, and a skeleton that flashes for 40ms reads as a glitch.
|
|
7
|
+
* `Delayed` mounts its children only once the wait has lasted long enough
|
|
8
|
+
* to be real. The shape is derived, not invented: the grid placeholder uses
|
|
9
|
+
* the table's own column count and the page size; the record placeholder
|
|
10
|
+
* uses the record's own layout.
|
|
11
|
+
*/
|
|
12
|
+
import { memo, useEffect, useState } from 'react';
|
|
13
|
+
import { say } from '../copy/shell/components/Skeleton.js';
|
|
14
|
+
/** How long a wait has to last before it is worth showing anything. */
|
|
15
|
+
const SKELETON_DELAY = 140;
|
|
16
|
+
export function Delayed({ ms = SKELETON_DELAY, children }) {
|
|
17
|
+
const [shown, setShown] = useState(false);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
const timer = setTimeout(() => setShown(true), ms);
|
|
20
|
+
return () => clearTimeout(timer);
|
|
21
|
+
}, [ms]);
|
|
22
|
+
return shown ? _jsx(_Fragment, { children: children }) : null;
|
|
23
|
+
}
|
|
24
|
+
/** One shimmering block. Width is a percentage so rows look uneven, as text is.
|
|
25
|
+
An element, not a component: a dashboard waiting on ten tiles drew some
|
|
26
|
+
3,500 of them, each redrawn as every tile answered. */
|
|
27
|
+
export function bar(width, height = 12, key) {
|
|
28
|
+
return _jsx("span", { className: "sk-bar", style: { width: `${width}%`, height: `${height}px` }, "aria-hidden": "true" }, key);
|
|
29
|
+
}
|
|
30
|
+
/* Deterministic widths: the same skeleton twice looks the same, and a
|
|
31
|
+
sequence that varies reads as text rather than as a pattern. */
|
|
32
|
+
const WIDTHS = [82, 54, 71, 45, 63, 88, 38, 76, 59, 67];
|
|
33
|
+
export const widthAt = (i) => WIDTHS[i % WIDTHS.length];
|
|
34
|
+
/* Memoized: its two numbers are all it draws from, and a room redrawing
|
|
35
|
+
around a wait (a dashboard, as each tile answers) need not redraw it. */
|
|
36
|
+
export const GridSkeleton = memo(function GridSkeleton({ columns, rows }) {
|
|
37
|
+
// Bounded: a forty-column table does not need forty bars to say "a table is coming".
|
|
38
|
+
const across = Math.min(Math.max(columns, 3), 8);
|
|
39
|
+
const down = Math.min(Math.max(rows, 3), 12);
|
|
40
|
+
return (_jsxs("div", { className: "sk-grid", style: { '--sk-cols': across }, role: "status", "aria-label": say('loadingRows'), children: [_jsx("div", { className: "sk-row sk-head", children: Array.from({ length: across }, (_, i) => bar(40 + ((i * 17) % 30), 8, i)) }), Array.from({ length: down }, (_, r) => (_jsx("div", { className: "sk-row", children: Array.from({ length: across }, (_, c) => bar(widthAt(r * across + c), undefined, c)) }, r)))] }));
|
|
41
|
+
});
|
|
42
|
+
/** A record, before its fields arrive: the section shapes of the layout about to be drawn. */
|
|
43
|
+
export function RecordSkeleton({ sections }) {
|
|
44
|
+
return (_jsx("div", { className: "sk-record", role: "status", "aria-label": say('loadingRecord'), children: sections.map((section, s) => (_jsxs("section", { className: "sk-section", children: [section.title && bar(14, 9), _jsx("div", { className: "sk-fields", children: Array.from({ length: section.count }, (_, i) => (_jsxs("div", { className: "sk-field", children: [bar(38, 10), bar(widthAt(i), 12)] }, i))) })] }, s))) }));
|
|
45
|
+
}
|
|
46
|
+
/** The Related list, before its counts arrive. */
|
|
47
|
+
export const RelatedSkeleton = memo(function RelatedSkeleton({ count }) {
|
|
48
|
+
return (_jsx("div", { className: "sk-related", role: "status", "aria-label": say('counting'), children: Array.from({ length: Math.min(Math.max(count, 1), 8) }, (_, i) => (_jsxs("div", { className: "sk-related-item", children: [bar(100, 14), _jsxs("span", { className: "sk-related-names", children: [bar(widthAt(i), 11), bar(widthAt(i + 3) * 0.7, 8)] })] }, i))) }));
|
|
49
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface SortChoice {
|
|
2
|
+
label: string;
|
|
3
|
+
sort: string;
|
|
4
|
+
}
|
|
5
|
+
/** Which choice the query is sorted by, or -1. */
|
|
6
|
+
export declare function sortChoice(sorts: readonly SortChoice[], query: string): number;
|
|
7
|
+
/** The query sorted by `sort`, or with no sort clause when there is none. */
|
|
8
|
+
export declare function withSort(query: string, sort: string | undefined): string;
|
|
9
|
+
/**
|
|
10
|
+
* `sort` is the view's own order. Where one of the choices is it, that choice
|
|
11
|
+
* is the default and is named: "Default order" beside "Newest listings" said
|
|
12
|
+
* the same order twice, once in words a buyer does not use.
|
|
13
|
+
*/
|
|
14
|
+
export declare function SortMenu({ sorts, query, onPick, sort, }: {
|
|
15
|
+
sorts: readonly SortChoice[];
|
|
16
|
+
query: string;
|
|
17
|
+
onPick: (query: string) => void;
|
|
18
|
+
sort?: string;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* A list's Sort menu: the orders the view offers (`sorts`), by name —
|
|
4
|
+
* "Lowest price", "Newest" — beside the filters. The order is the query's
|
|
5
|
+
* own `sort` clause, so the address carries it, a reload keeps it and a
|
|
6
|
+
* saved view remembers it; choosing one replaces the clause, and "Default
|
|
7
|
+
* order" takes it off. A sort the reader typed that matches no choice
|
|
8
|
+
* leaves the menu on none of them rather than pretending it is one.
|
|
9
|
+
*/
|
|
10
|
+
import { joinQuery, splitQuery } from '../clauses.js';
|
|
11
|
+
import { squeeze } from '../filterbar.js';
|
|
12
|
+
import { Dropdown } from './Dropdown.js';
|
|
13
|
+
import { say } from '../copy/lists/components/SortMenu.js';
|
|
14
|
+
/** Which choice the query is sorted by, or -1. */
|
|
15
|
+
export function sortChoice(sorts, query) {
|
|
16
|
+
const current = squeeze(String(splitQuery(query).sort ?? '')).toLowerCase();
|
|
17
|
+
if (!current)
|
|
18
|
+
return -1;
|
|
19
|
+
const said = (sort) => squeeze(`sort ${sort}`)
|
|
20
|
+
.replace(/\s+asc\b/gi, '')
|
|
21
|
+
.replace(/\s*,\s*/g, ', ')
|
|
22
|
+
.toLowerCase();
|
|
23
|
+
return sorts.findIndex((choice) => said(choice.sort) === said(current.replace(/^sort\s+/i, '')));
|
|
24
|
+
}
|
|
25
|
+
/** The query sorted by `sort`, or with no sort clause when there is none. */
|
|
26
|
+
export function withSort(query, sort) {
|
|
27
|
+
const parts = splitQuery(query);
|
|
28
|
+
if (sort)
|
|
29
|
+
parts.sort = `sort ${sort}`;
|
|
30
|
+
else
|
|
31
|
+
delete parts.sort;
|
|
32
|
+
return joinQuery(parts);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* `sort` is the view's own order. Where one of the choices is it, that choice
|
|
36
|
+
* is the default and is named: "Default order" beside "Newest listings" said
|
|
37
|
+
* the same order twice, once in words a buyer does not use.
|
|
38
|
+
*/
|
|
39
|
+
export function SortMenu({ sorts, query, onPick, sort, }) {
|
|
40
|
+
const at = sortChoice(sorts, query);
|
|
41
|
+
const standing = sort ? sortChoice(sorts, say('xSort', { sort })) : -1;
|
|
42
|
+
const unsorted = !splitQuery(query).sort;
|
|
43
|
+
const items = sorts.map((choice, index) => ({ value: String(index), label: choice.label }));
|
|
44
|
+
return (_jsxs("div", { className: "applist-sort", children: [_jsx("span", { className: "applist-sort-label", "aria-hidden": "true", children: say('sort') }), _jsx(Dropdown, { ariaLabel: say('sort'), value: at >= 0 ? String(at) : standing >= 0 && unsorted ? String(standing) : '', items: standing >= 0 ? items : [{ value: '', label: say('defaultOrder') }, ...items], onChange: (value) => onPick(withSort(query, value === '' || Number(value) === standing ? undefined : sorts[Number(value)]?.sort)) })] }));
|
|
45
|
+
}
|