@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,559 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* A list's filters as a rail of facets beside the rows — `filterBar: 'rail'`.
|
|
4
|
+
*
|
|
5
|
+
* The bar asks one value per column; a rail is for the list a reader works
|
|
6
|
+
* through by narrowing, where the question is "open or done, mine, due this
|
|
7
|
+
* week" and the answer is how many of each. So a vocabulary or a reference
|
|
8
|
+
* is a checklist of its values with live counts, a flag a toggle, a date its
|
|
9
|
+
* presets and a range. Any other column shows as what its values are: a
|
|
10
|
+
* number with many values a Min/Max range, one with a few (a priority, a
|
|
11
|
+
* model year) a checklist, text with a few dozen values a checklist and more
|
|
12
|
+
* a contains box — judged once, over the rows the view stands on
|
|
13
|
+
* (filterRailModel `autoShape`). The name column is the rail's search box; in a column's
|
|
14
|
+
* own picker (the filter popover) it is judged like the rest, so a name with a few values
|
|
15
|
+
* lists them with their counts.
|
|
16
|
+
* Every facet writes a condition tail into the same question the bar's boxes
|
|
17
|
+
* do (filterRailModel says how), so a selection is a URL, a chip and a
|
|
18
|
+
* refinement of the tab like any other.
|
|
19
|
+
*
|
|
20
|
+
* Controlled: the rail reads `refinement` and hands a new one to `onChange`.
|
|
21
|
+
* Beside the list that navigates at once; in the phone sheet it edits a
|
|
22
|
+
* draft, applied by the sheet's own button, because each navigation redraws
|
|
23
|
+
* the list the sheet is covering.
|
|
24
|
+
*/
|
|
25
|
+
import { Fragment, useEffect, useId, useRef, useState } from 'react';
|
|
26
|
+
import { keepPreviousData, useQueries, useQuery } from '@tanstack/react-query';
|
|
27
|
+
import { api, columnDisplay, findTable, labelColumn, state } from '../core.js';
|
|
28
|
+
import { batchedBreakdown } from '../breakdownBatch.js';
|
|
29
|
+
import { defaultCurrency, formatLocale, formatNumber, formatTimezone } from '../locale.js';
|
|
30
|
+
import { DateField } from './DateField.js';
|
|
31
|
+
import { Button } from '@mistriwork/ui/Button.js';
|
|
32
|
+
import { Field } from '@mistriwork/ui/Field.js';
|
|
33
|
+
import { isPickerDate } from '@mistriwork/ui/internal/datePickerModel.js';
|
|
34
|
+
import { columnKind } from '@mistriwork/engine/shared/schema.js';
|
|
35
|
+
import { andQuery } from '@mistriwork/engine/shared/query.js';
|
|
36
|
+
import { vocabularyWord } from '@mistriwork/engine/shared/model.js';
|
|
37
|
+
import { dressFor, wordFor } from './valueModel.js';
|
|
38
|
+
import { minorToMajor } from '@mistriwork/engine/shared/money.js';
|
|
39
|
+
import { majorToMinor } from '@mistriwork/engine/shared/moneyEntry.js';
|
|
40
|
+
import { WHOLE, conditionTail, holdsCondition, squeeze, unquote, withCondition } from '../filterbar.js';
|
|
41
|
+
import { boxTail } from './FilterBoxes.js';
|
|
42
|
+
import { useArrived } from './onDemand.js';
|
|
43
|
+
import { SuggestBox } from './suggestPart.js';
|
|
44
|
+
import { CHECKLIST_MOST, MORE_LABELS, datePresets, autoShape, clearFacets, facetActive, facetCountText, facetKind, facetShapeText, hasCountText, hasValuesText, moreConditions, moreOf, moreTail, numberRangeOf, numberRangeTail, rangeOf, rangeTail, selectedTags, selectedValues, tagsTail, takesText, valuesTail, } from './filterRailModel.js';
|
|
45
|
+
import { Modal } from '@mistriwork/ui/Modal.js';
|
|
46
|
+
import { useConditionWords } from './useConditionWords.js';
|
|
47
|
+
import { say } from '../copy/filters/components/FilterRail.js';
|
|
48
|
+
/** A checklist shows this many values before "Show all": five keeps the
|
|
49
|
+
next facet in sight (at eight, Make and Model pushed Price off the first
|
|
50
|
+
screen). A list only one or two longer is shown whole: a "Show all 6"
|
|
51
|
+
that reveals one value is a click that buys nothing. */
|
|
52
|
+
const SHORT = 5;
|
|
53
|
+
const SLACK = 2;
|
|
54
|
+
/** And never asks for more than this many; a column with more is a search, not a list. */
|
|
55
|
+
const MOST = CHECKLIST_MOST;
|
|
56
|
+
/* Through locale.ts's kept formatter: a rail says a count per value, and
|
|
57
|
+
built afresh each was a formatter per count on every draw. */
|
|
58
|
+
const counted = (n) => formatNumber(n);
|
|
59
|
+
export function FilterRail({ table, boxes, refinement, tabQuery = '', standing = '', unitOf, clearAll = true, onChange, status, }) {
|
|
60
|
+
const columns = boxes.map((box) => box.column);
|
|
61
|
+
const any = columns.some((column) => facetActive(refinement, column, tabQuery));
|
|
62
|
+
const set = (column, tail) => onChange(withCondition(refinement, column, tail));
|
|
63
|
+
return (_jsxs("div", { className: "filter-rail-body", children: [_jsxs("div", { className: "filter-rail-head", children: [_jsx("h2", { className: "filter-rail-title", children: say('common.filtersButton') }), clearAll && any && (_jsx("button", { type: "button", className: "filter-rail-clear", onClick: () => onChange(clearFacets(refinement, columns, tabQuery)), children: say('list.clearAll') }))] }), boxes.map((box) => (_jsx(FacetFor, { box: box, table: table, refinement: refinement, standing: standing, unit: unitOf?.(box.column), set: (next) => set(box.column, next) }, box.column))), _jsx("p", { className: "visually-hidden", role: "status", children: status ?? '' })] }));
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* One column's facet over a question: what the rail draws for each of its
|
|
67
|
+
* columns, and what an App list's filter bar opens alone in a popover
|
|
68
|
+
* (ListFilterBar.tsx). `set` hears the column's new tail; `onEnter`, where
|
|
69
|
+
* given, hears Enter in a box once its value is set, so a popover applies
|
|
70
|
+
* on the key a reader expects to apply rather than on a second one.
|
|
71
|
+
*/
|
|
72
|
+
export function FacetFor({ box, table, refinement, standing = '', unit, set, onEnter, picking = false, }) {
|
|
73
|
+
const tail = squeeze(conditionTail(refinement, box.column));
|
|
74
|
+
/* The rows that point at the record are asked by what they hold, and counted as the list's records. */
|
|
75
|
+
if (box.has) {
|
|
76
|
+
const props = { box, tail, table, refinement, standing, set, onEnter };
|
|
77
|
+
return box.has.segment ? _jsx(HasSegmentFacet, { ...props }) : _jsx(HasValuesFacet, { ...props });
|
|
78
|
+
}
|
|
79
|
+
const kind = facetKind(box.kind);
|
|
80
|
+
/* The rarer conditions sit behind one quiet disclosure in every facet, so
|
|
81
|
+
the rail and a column menu's Filter… say them alike. */
|
|
82
|
+
const more = kind === 'tags' ? null : _jsx(MoreConditions, { box: box, tail: tail, set: set, onEnter: onEnter, facet: kind });
|
|
83
|
+
const props = { box, tail, table, refinement, standing, set, onEnter, more };
|
|
84
|
+
if (kind === 'values')
|
|
85
|
+
return _jsx(ValuesFacet, { ...props });
|
|
86
|
+
if (kind === 'tags')
|
|
87
|
+
return _jsx(TagsFacet, { ...props });
|
|
88
|
+
if (kind === 'flag')
|
|
89
|
+
return _jsx(FlagFacet, { ...props });
|
|
90
|
+
if (kind === 'date')
|
|
91
|
+
return _jsx(DateFacet, { ...props });
|
|
92
|
+
/* The name is what a reader searches by; a source that takes whole
|
|
93
|
+
values only (an API) cannot be counted or ranged. Anything else
|
|
94
|
+
shows as what its values are. Keyed by its tail, so a condition
|
|
95
|
+
changed elsewhere redraws the box with it. */
|
|
96
|
+
/* In the rail the name is the search box. In a column's own picker it is judged like any column: a
|
|
97
|
+
name with a few dozen values (a make, a department) is offered as those values with their counts, a
|
|
98
|
+
longer one as the contains box, and a contains already asked stays the box that asked it. */
|
|
99
|
+
const asked = /^contains\s/i.test(tail);
|
|
100
|
+
if (box.exact || (box.column === labelColumn(table) && (!picking || asked)))
|
|
101
|
+
return _jsx(TextFacet, { ...props }, tail);
|
|
102
|
+
return _jsx(AutoFacet, { ...props, unit: unit, bare: box.column === labelColumn(table) });
|
|
103
|
+
}
|
|
104
|
+
/* A facet's name and its own way out. A group of inputs is a fieldset, so
|
|
105
|
+
each checkbox or radio is announced with the facet it belongs to. */
|
|
106
|
+
function Facet({ box, tail, set, more, group = true, busy = false, children, }) {
|
|
107
|
+
const clear = tail ? (_jsx("button", { type: "button", className: "facet-clear", "aria-label": say('common.clear2', { label: box.label }), onClick: () => set(''), children: say('common.clear') })) : null;
|
|
108
|
+
if (!group)
|
|
109
|
+
return (_jsxs("div", { className: "facet", "data-column": box.column, children: [children, clear, more] }));
|
|
110
|
+
return (_jsxs("fieldset", { className: "facet", "data-column": box.column, "aria-busy": busy || undefined, children: [_jsx("legend", { className: "facet-label", children: box.label }), clear, children, more] }));
|
|
111
|
+
}
|
|
112
|
+
/* A condition this facet has no control for — `!= open`, `= false`, typed
|
|
113
|
+
in Advanced — is said rather than drawn as nothing, and kept until the
|
|
114
|
+
reader picks. */
|
|
115
|
+
function Unshown({ box, table, tail }) {
|
|
116
|
+
// In the App's words, "Status is not Open"; the Workbench has no rail.
|
|
117
|
+
const { speaker, sayTails } = useConditionWords(table, [`${box.column} ${tail}`]);
|
|
118
|
+
return moreOf(tail) ? null : _jsx("p", { className: "facet-note", children: sayTails(speaker, box.column, [tail]) });
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* The conditions a facet has no everyday control for — starts with, a
|
|
122
|
+
* pattern, empty, not empty — behind one quiet disclosure, open while one of
|
|
123
|
+
* them is what the column asks. A choice that needs no text applies as it is
|
|
124
|
+
* picked; one that takes text applies on Enter or leaving the box, as a
|
|
125
|
+
* range does.
|
|
126
|
+
*/
|
|
127
|
+
function MoreConditions({ box, tail, set, onEnter, facet, }) {
|
|
128
|
+
const id = useId();
|
|
129
|
+
const said = moreOf(tail);
|
|
130
|
+
const [open, setOpen] = useState(Boolean(said));
|
|
131
|
+
const [picked, setPicked] = useState(said?.condition ?? null);
|
|
132
|
+
const [text, setText] = useState(said?.text ?? '');
|
|
133
|
+
const box$ = useRef(null);
|
|
134
|
+
const focusText = useRef(false);
|
|
135
|
+
useEffect(() => {
|
|
136
|
+
setPicked(said?.condition ?? null);
|
|
137
|
+
setText(said?.text ?? '');
|
|
138
|
+
if (said)
|
|
139
|
+
setOpen(true);
|
|
140
|
+
}, [tail]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
if (!focusText.current)
|
|
143
|
+
return;
|
|
144
|
+
focusText.current = false;
|
|
145
|
+
box$.current?.focus();
|
|
146
|
+
});
|
|
147
|
+
const offered = moreConditions(facet, box.meta, box.exact);
|
|
148
|
+
/* A condition typed elsewhere is shown here even where it would not be offered. */
|
|
149
|
+
if (said && !offered.includes(said.condition))
|
|
150
|
+
offered.push(said.condition);
|
|
151
|
+
if (!offered.length)
|
|
152
|
+
return null;
|
|
153
|
+
const choose = (condition) => {
|
|
154
|
+
setPicked(condition);
|
|
155
|
+
if (!takesText(condition))
|
|
156
|
+
set(moreTail(condition));
|
|
157
|
+
else if (text.trim())
|
|
158
|
+
set(moreTail(condition, text));
|
|
159
|
+
else
|
|
160
|
+
focusText.current = true;
|
|
161
|
+
};
|
|
162
|
+
const commit = () => {
|
|
163
|
+
if (!picked || !takesText(picked))
|
|
164
|
+
return;
|
|
165
|
+
const next = moreTail(picked, text);
|
|
166
|
+
if (next && next !== tail)
|
|
167
|
+
set(next);
|
|
168
|
+
};
|
|
169
|
+
return (_jsxs("div", { className: "facet-more-conditions", children: [_jsx("button", { type: "button", className: "facet-more", "aria-expanded": open, "aria-controls": id, onClick: () => setOpen(!open), children: say('moreConditions') }), open && (_jsx("div", { id: id, role: "group", "aria-label": say('moreConditionsOn', { label: box.label }), className: "facet-values", children: offered.map((condition) => (_jsxs(Fragment, { children: [_jsxs("label", { className: "facet-option", children: [_jsx("input", { type: "radio", name: id, "data-value": condition, checked: picked === condition, onChange: () => choose(condition) }), _jsx("span", { className: "facet-option-label", children: MORE_LABELS[condition] })] }), takesText(condition) && picked === condition && (_jsx("div", { className: "form-field form-field-compact", children: _jsx("input", { ref: box$, type: "text", className: "field-control facet-input", "aria-label": MORE_LABELS[condition], "data-value": `${condition}-text`, value: text, placeholder: condition === 'like' ? say('common.patternEGWh') : say('text'), title: condition === 'like' ? say('standsForAnyRun') : undefined, onChange: (e) => setText(e.target.value), onBlur: commit, onKeyDown: (e) => {
|
|
170
|
+
if (e.key === 'Enter') {
|
|
171
|
+
e.preventDefault();
|
|
172
|
+
commit();
|
|
173
|
+
onEnter?.();
|
|
174
|
+
}
|
|
175
|
+
} }) }))] }, condition))) }))] }));
|
|
176
|
+
}
|
|
177
|
+
/** A facet's values and how many rows each would add, under everything else the list asks. */
|
|
178
|
+
function useCounts(table, refinement, column, labelPath, standing) {
|
|
179
|
+
const text = facetCountText(table.id, refinement, column, labelPath, standing);
|
|
180
|
+
return useQuery({
|
|
181
|
+
/* In the list's own query family, so a write that refreshes the rows refreshes the counts. */
|
|
182
|
+
queryKey: ['run', state.activeConnection ?? '', 'facet', text],
|
|
183
|
+
queryFn: async () => {
|
|
184
|
+
/* With the rail's other facets, in one request (breakdownBatch.ts):
|
|
185
|
+
a rail of eleven facets was eleven requests queued on one connection. */
|
|
186
|
+
const data = (await batchedBreakdown({ text, limit: MOST }));
|
|
187
|
+
if (data.errors?.length || !data.columns?.length)
|
|
188
|
+
throw new Error(say('couldNotCountTheValues'));
|
|
189
|
+
const keys = data.columns;
|
|
190
|
+
return (data.rows ?? []).flatMap((row) => {
|
|
191
|
+
const value = row[keys[0]];
|
|
192
|
+
const n = Number(row[keys[keys.length - 1]]);
|
|
193
|
+
if (value == null || !Number.isFinite(n))
|
|
194
|
+
return [];
|
|
195
|
+
const label = labelPath ? row[keys[1]] : undefined;
|
|
196
|
+
return [{ value: String(value), count: n, ...(label == null ? {} : { label: String(label) }) }];
|
|
197
|
+
});
|
|
198
|
+
},
|
|
199
|
+
staleTime: 60_000,
|
|
200
|
+
placeholderData: keepPreviousData,
|
|
201
|
+
retry: false,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/** The label path a reference's values are said by: its target's label column. */
|
|
205
|
+
function labelPathOf(box) {
|
|
206
|
+
const target = box.meta?.references ? findTable(box.meta.references.table) : undefined;
|
|
207
|
+
const label = target ? labelColumn(target) : undefined;
|
|
208
|
+
return label ? `${box.column}.${label}` : undefined;
|
|
209
|
+
}
|
|
210
|
+
const numericColumn = (box) => (box.meta ? columnKind(box.meta.type) === 'number' : false);
|
|
211
|
+
function ValuesFacet({ box, tail, table, refinement, standing, set, more }) {
|
|
212
|
+
const [all, setAll] = useState(false);
|
|
213
|
+
const labelPath = box.kind === 'ref' ? labelPathOf(box) : undefined;
|
|
214
|
+
const counts = useCounts(table, refinement, box.column, labelPath, standing);
|
|
215
|
+
const byValue = new Map((counts.data ?? []).map((c) => [c.value, c]));
|
|
216
|
+
const selected = selectedValues(tail);
|
|
217
|
+
const ticked = selected ?? [];
|
|
218
|
+
/* A vocabulary is listed whole, in its own order — a value with no rows
|
|
219
|
+
is still a value, and says 0. A reference lists the targets that have
|
|
220
|
+
rows, the most first; so does text, and a number lists its values in
|
|
221
|
+
their own order (1, 2, 3; 2016 to 2024). A ticked value is always
|
|
222
|
+
listed, rows or none. */
|
|
223
|
+
const allowed = box.meta?.allowed;
|
|
224
|
+
const rule = columnDisplay(table.id, box.column);
|
|
225
|
+
const listed = allowed?.length ? allowed.map((value) => byValue.get(value) ?? { value, count: 0 }) : [...(counts.data ?? [])];
|
|
226
|
+
for (const value of ticked)
|
|
227
|
+
if (!listed.some((c) => c.value === value))
|
|
228
|
+
listed.push({ value, count: 0 });
|
|
229
|
+
if (!allowed?.length && box.kind !== 'ref' && numericColumn(box))
|
|
230
|
+
listed.sort((a, b) => Number(a.value) - Number(b.value));
|
|
231
|
+
const shown = all || listed.length <= SHORT + SLACK ? listed : listed.filter((c, i) => i < SHORT || ticked.includes(c.value));
|
|
232
|
+
/* Money is said as the cards say it ($1,795.00), whatever unit it is kept in; the tick still asks for the stored value. */
|
|
233
|
+
const money = rule?.format === 'money' ? rule : null;
|
|
234
|
+
const figure = (value) => {
|
|
235
|
+
const dress = money ? dressFor(money, value) : null;
|
|
236
|
+
return dress?.kind === 'money' ? dress.text : undefined;
|
|
237
|
+
};
|
|
238
|
+
const known = counts.isSuccess;
|
|
239
|
+
const toggle = (value, on) => {
|
|
240
|
+
const next = on ? [...ticked, value] : ticked.filter((v) => v !== value);
|
|
241
|
+
const order = listed.map((c) => c.value);
|
|
242
|
+
set(valuesTail(next.sort((a, b) => order.indexOf(a) - order.indexOf(b))));
|
|
243
|
+
};
|
|
244
|
+
return (_jsxs(Facet, { box: box, tail: tail, set: set, more: more, children: [selected === null && _jsx(Unshown, { box: box, table: table, tail: tail }), counts.isError && _jsx("p", { className: "facet-note", children: say('countsUnavailable') }), _jsx("ul", { className: "facet-values", children: shown.map((c) => {
|
|
245
|
+
/* A vocabulary's value is a word to its reader (`in_progress` says "In progress"),
|
|
246
|
+
as its chip says it, and in the display rule's own word where it gives one
|
|
247
|
+
(`values`, `humanize`); any other value is said exactly. */
|
|
248
|
+
const said = c.label ?? wordFor(rule, c.value) ?? figure(c.value) ?? (allowed?.length ? vocabularyWord(c.value) : c.value);
|
|
249
|
+
return (_jsx("li", { children: _jsxs("label", { className: "facet-option", title: c.label ? `${box.column} = ${c.value}` : undefined, children: [_jsx("input", { type: "checkbox", "data-value": c.value, checked: ticked.includes(c.value), onChange: (e) => toggle(c.value, e.target.checked) }), _jsx("span", { className: "facet-option-label", children: said }), " ", _jsx("span", { className: "facet-count", children: known ? counted(c.count) : '' })] }) }, c.value));
|
|
250
|
+
}) }), !all && listed.length > shown.length && (_jsx("button", { type: "button", className: "facet-more", onClick: () => setAll(true), children: say('showAll', { listedCount: listed.length }) }))] }));
|
|
251
|
+
}
|
|
252
|
+
/* One count of the list's records, asked of a breakdown in the rail's batch; null until known. */
|
|
253
|
+
const recordCount = (text) => ({
|
|
254
|
+
queryKey: ['run', state.activeConnection ?? '', 'facet', text],
|
|
255
|
+
queryFn: async () => {
|
|
256
|
+
const data = (await batchedBreakdown({ text, limit: 1 }));
|
|
257
|
+
if (data.errors?.length || !data.columns?.length)
|
|
258
|
+
throw new Error(say('couldNotCountTheValues'));
|
|
259
|
+
const n = Number(data.rows?.[0]?.[data.columns[data.columns.length - 1]] ?? 0);
|
|
260
|
+
return Number.isFinite(n) ? n : 0;
|
|
261
|
+
},
|
|
262
|
+
staleTime: 60_000,
|
|
263
|
+
placeholderData: keepPreviousData,
|
|
264
|
+
retry: false,
|
|
265
|
+
});
|
|
266
|
+
/*
|
|
267
|
+
* A value of the rows that point at the record (shared/listFilters.ts) —
|
|
268
|
+
* `any opportunity where stage in (won, lost)`: a checklist of what those
|
|
269
|
+
* rows hold, a vocabulary whole and in its order, anything else the values
|
|
270
|
+
* held the most first, a reference by its record's name. Each value says how
|
|
271
|
+
* many of the list's records one of their rows holding it would show — the
|
|
272
|
+
* records, once each, under everything else the list asks.
|
|
273
|
+
*/
|
|
274
|
+
function HasValuesFacet({ box, tail, table, refinement, standing, set }) {
|
|
275
|
+
const [all, setAll] = useState(false);
|
|
276
|
+
const has = box.has;
|
|
277
|
+
const allowed = box.meta?.allowed;
|
|
278
|
+
const target = box.meta?.references ? findTable(box.meta.references.table) : undefined;
|
|
279
|
+
const naming = target ? labelColumn(target) : undefined;
|
|
280
|
+
const labelPath = box.kind === 'ref' && naming ? `${has.asks}.${naming}` : undefined;
|
|
281
|
+
const text = hasValuesText(has.child, has.asks, labelPath);
|
|
282
|
+
const held = useQuery({
|
|
283
|
+
queryKey: ['run', state.activeConnection ?? '', 'facet', text],
|
|
284
|
+
enabled: !allowed?.length,
|
|
285
|
+
queryFn: async () => {
|
|
286
|
+
const data = (await batchedBreakdown({ text, limit: MOST }));
|
|
287
|
+
if (data.errors?.length || !data.columns?.length)
|
|
288
|
+
throw new Error(say('couldNotCountTheValues'));
|
|
289
|
+
const keys = data.columns;
|
|
290
|
+
return (data.rows ?? []).flatMap((row) => {
|
|
291
|
+
const value = row[keys[0]];
|
|
292
|
+
if (value == null || value === '')
|
|
293
|
+
return [];
|
|
294
|
+
const label = labelPath ? row[keys[1]] : undefined;
|
|
295
|
+
return [{ value: String(value), count: 0, ...(label == null ? {} : { label: String(label) }) }];
|
|
296
|
+
});
|
|
297
|
+
},
|
|
298
|
+
staleTime: 60_000,
|
|
299
|
+
retry: false,
|
|
300
|
+
});
|
|
301
|
+
const selected = selectedValues(tail);
|
|
302
|
+
const ticked = selected ?? [];
|
|
303
|
+
const listed = allowed?.length ? allowed.map((value) => ({ value, count: 0 })) : [...(held.data ?? [])];
|
|
304
|
+
for (const value of ticked)
|
|
305
|
+
if (!listed.some((c) => c.value === value))
|
|
306
|
+
listed.push({ value, count: 0 });
|
|
307
|
+
const shown = all || listed.length <= SHORT + SLACK ? listed : listed.filter((c, i) => i < SHORT || ticked.includes(c.value));
|
|
308
|
+
const counts = useQueries({ queries: shown.map((c) => recordCount(hasCountText(table.id, refinement, box.column, standing, c.value))) });
|
|
309
|
+
const rule = columnDisplay(has.child, has.asks);
|
|
310
|
+
const toggle = (value, on) => {
|
|
311
|
+
const next = on ? [...ticked, value] : ticked.filter((v) => v !== value);
|
|
312
|
+
const order = listed.map((c) => c.value);
|
|
313
|
+
set(valuesTail(next.sort((a, b) => order.indexOf(a) - order.indexOf(b))));
|
|
314
|
+
};
|
|
315
|
+
return (_jsxs(Facet, { box: box, tail: tail, set: set, children: [selected === null && _jsx(Unshown, { box: box, table: table, tail: tail }), (held.isError || counts.some((count) => count.isError)) && _jsx("p", { className: "facet-note", children: say('countsUnavailable') }), _jsx("ul", { className: "facet-values", children: shown.map((c, i) => {
|
|
316
|
+
const said = c.label ?? wordFor(rule, c.value) ?? (allowed?.length ? vocabularyWord(c.value) : c.value);
|
|
317
|
+
const n = counts[i]?.data;
|
|
318
|
+
return (_jsx("li", { children: _jsxs("label", { className: "facet-option", title: c.label ? `${has.asks} = ${c.value}` : undefined, children: [_jsx("input", { type: "checkbox", "data-value": c.value, checked: ticked.includes(c.value), onChange: (e) => toggle(c.value, e.target.checked) }), _jsx("span", { className: "facet-option-label", children: said }), " ", _jsx("span", { className: "facet-count", children: typeof n === 'number' ? counted(n) : '' })] }) }, c.value));
|
|
319
|
+
}) }), !all && listed.length > shown.length && (_jsx("button", { type: "button", className: "facet-more", onClick: () => setAll(true), children: say('showAll', { listedCount: listed.length }) }))] }));
|
|
320
|
+
}
|
|
321
|
+
/* One of their segments (`any opportunity where open`): a yes, as a flag's facet is, with how many records it shows. */
|
|
322
|
+
function HasSegmentFacet({ box, table, refinement, standing, set }) {
|
|
323
|
+
const count = useQuery(recordCount(hasCountText(table.id, refinement, box.column, standing)));
|
|
324
|
+
const on = holdsCondition(refinement, box.column);
|
|
325
|
+
return (_jsx("div", { className: "facet", "data-column": box.column, children: _jsxs("label", { className: "facet-option facet-flag", children: [_jsx("input", { type: "checkbox", "data-value": "true", checked: on, onChange: (e) => set(e.target.checked ? WHOLE : '') }), _jsx("span", { className: "facet-option-label", children: box.label }), ' ', _jsx("span", { className: "facet-count", children: typeof count.data === 'number' ? counted(count.data) : '' })] }) }));
|
|
326
|
+
}
|
|
327
|
+
/*
|
|
328
|
+
* A record's tags (tagLists.ts): every tag, by name, ticked for any of them —
|
|
329
|
+
* `tags has (bug, docs)`. The names are the tag table's, read as the rail
|
|
330
|
+
* reads any values, through this reader's grants; a tag is listed whether
|
|
331
|
+
* or not a record in view has it, as a vocabulary's value is.
|
|
332
|
+
*/
|
|
333
|
+
function TagsFacet({ box, tail, table, set }) {
|
|
334
|
+
const tags = table.tags;
|
|
335
|
+
// A list its definition spells out (a row-defined `choices` field, DefinedFields.tsx) offers those options, uncounted.
|
|
336
|
+
const options = box.meta?.allowed;
|
|
337
|
+
const text = tags ? `${tags.to} count by ${tags.label} sort ${tags.label}` : '';
|
|
338
|
+
const listing = useQuery({
|
|
339
|
+
queryKey: ['run', state.activeConnection ?? '', 'facet', text],
|
|
340
|
+
enabled: Boolean(tags) && !options,
|
|
341
|
+
queryFn: async () => {
|
|
342
|
+
const data = (await batchedBreakdown({ text, limit: MOST }));
|
|
343
|
+
if (data.errors?.length || !data.columns?.length)
|
|
344
|
+
throw new Error(say('couldNotCountTheValues'));
|
|
345
|
+
const key = data.columns[0];
|
|
346
|
+
return (data.rows ?? []).flatMap((row) => (row[key] == null || row[key] === '' ? [] : [String(row[key])]));
|
|
347
|
+
},
|
|
348
|
+
staleTime: 60_000,
|
|
349
|
+
retry: false,
|
|
350
|
+
});
|
|
351
|
+
const selected = selectedTags(tail);
|
|
352
|
+
const ticked = selected ?? [];
|
|
353
|
+
const listed = [...(options ?? listing.data ?? [])];
|
|
354
|
+
for (const value of ticked)
|
|
355
|
+
if (!listed.includes(value))
|
|
356
|
+
listed.push(value);
|
|
357
|
+
const toggle = (value, on) => {
|
|
358
|
+
const next = on ? [...ticked, value] : ticked.filter((v) => v !== value);
|
|
359
|
+
set(tagsTail(next.sort((a, b) => listed.indexOf(a) - listed.indexOf(b))));
|
|
360
|
+
};
|
|
361
|
+
return (_jsxs(Facet, { box: box, tail: tail, set: set, children: [selected === null && _jsx(Unshown, { box: box, table: table, tail: tail }), listing.isError && _jsx("p", { className: "facet-note", children: say('countsUnavailable') }), _jsx("ul", { className: "facet-values", children: listed.map((value) => (_jsx("li", { children: _jsxs("label", { className: "facet-option", children: [_jsx("input", { type: "checkbox", "data-value": value, checked: ticked.includes(value), onChange: (e) => toggle(value, e.target.checked) }), _jsx("span", { className: "facet-option-label", children: value })] }) }, value))) })] }));
|
|
362
|
+
}
|
|
363
|
+
const truthy = (value) => value === '1' || value.toLowerCase() === 'true';
|
|
364
|
+
function FlagFacet({ box, tail, table, refinement, standing, set, more }) {
|
|
365
|
+
const counts = useCounts(table, refinement, box.column, undefined, standing);
|
|
366
|
+
const yes = counts.isSuccess ? (counts.data ?? []).filter((c) => truthy(c.value)).reduce((n, c) => n + c.count, 0) : null;
|
|
367
|
+
const on = tail === '= true';
|
|
368
|
+
return (_jsxs(Facet, { box: box, tail: on ? '' : tail, set: set, group: false, more: more, children: [tail && !on && _jsx(Unshown, { box: box, table: table, tail: tail }), _jsxs("label", { className: "facet-option facet-flag", children: [_jsx("input", { type: "checkbox", "data-value": "true", checked: on, onChange: (e) => set(e.target.checked ? '= true' : '') }), _jsx("span", { className: "facet-option-label", children: box.label }), " ", _jsx("span", { className: "facet-count", children: yes === null ? '' : counted(yes) })] })] }));
|
|
369
|
+
}
|
|
370
|
+
function DateFacet({ box, tail, table, set, onEnter, more }) {
|
|
371
|
+
const name = useId();
|
|
372
|
+
const range = rangeOf(tail);
|
|
373
|
+
/* What the column is decides what it is asked: a stamp its past windows, a deadline what is overdue (filterRailModel.ts). */
|
|
374
|
+
const presets = datePresets(box.meta);
|
|
375
|
+
const preset = presets.find(([, t]) => t === tail);
|
|
376
|
+
/* The ends are typed into a draft and applied on Enter or leaving the
|
|
377
|
+
box: a date input reports every keystroke of a year as a whole date. */
|
|
378
|
+
const [from, setFrom] = useState(range.from);
|
|
379
|
+
const [to, setTo] = useState(range.to);
|
|
380
|
+
useEffect(() => {
|
|
381
|
+
setFrom(range.from);
|
|
382
|
+
setTo(range.to);
|
|
383
|
+
}, [range.from, range.to]);
|
|
384
|
+
const commit = () => {
|
|
385
|
+
if ((from && !isPickerDate(from)) || (to && !isPickerDate(to)))
|
|
386
|
+
return false;
|
|
387
|
+
if (from !== range.from || to !== range.to)
|
|
388
|
+
set(rangeTail(from, to));
|
|
389
|
+
return true;
|
|
390
|
+
};
|
|
391
|
+
const onKey = (e) => {
|
|
392
|
+
if (e.key === 'Enter') {
|
|
393
|
+
e.preventDefault();
|
|
394
|
+
if (commit())
|
|
395
|
+
onEnter?.();
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
return (_jsxs(Facet, { box: box, tail: tail, set: set, more: more, children: [tail && !preset && !range.from && !range.to && _jsx(Unshown, { box: box, table: table, tail: tail }), _jsx("div", { className: "facet-values", children: presets.map(([label, value]) => (_jsxs("label", { className: "facet-option", children: [_jsx("input", { type: "radio", name: name, "data-value": value, checked: preset?.[1] === value, onChange: () => set(value) }), _jsx("span", { className: "facet-option-label", children: label })] }, value))) }), _jsxs("div", { className: "facet-range facet-date-range", children: [_jsxs("div", { className: "facet-range-end", children: [_jsx("label", { htmlFor: `${name}-from`, children: say('from') }), _jsx(DateField, { id: `${name}-from`, "aria-label": say('from'), className: "facet-input", value: from, max: isPickerDate(to) ? to : undefined, locale: formatLocale(), timezone: formatTimezone(), onChange: setFrom, onBlur: commit, onKeyDown: onKey })] }), _jsxs("div", { className: "facet-range-end", children: [_jsx("label", { htmlFor: `${name}-to`, children: say('to') }), _jsx(DateField, { id: `${name}-to`, "aria-label": say('to'), className: "facet-input", value: to, min: isPickerDate(from) ? from : undefined, locale: formatLocale(), timezone: formatTimezone(), onChange: setTo, onBlur: commit, onKeyDown: onKey })] })] })] }));
|
|
399
|
+
}
|
|
400
|
+
/** The shape a plain column's facet takes, judged once from its values over the view's standing rows. */
|
|
401
|
+
function useFacetShape(table, column, standing, numeric, bare = false) {
|
|
402
|
+
const text = facetShapeText(table.id, column, standing);
|
|
403
|
+
return useQuery({
|
|
404
|
+
queryKey: ['run', state.activeConnection ?? '', 'facet-shape', text, bare],
|
|
405
|
+
queryFn: async () => {
|
|
406
|
+
const data = (await batchedBreakdown({ text, limit: MOST + 1 }));
|
|
407
|
+
if (data.errors?.length)
|
|
408
|
+
throw new Error(say('couldNotCountTheValues'));
|
|
409
|
+
const distinct = data.rows?.length ?? 0;
|
|
410
|
+
/* A name with nothing to list has no checklist to offer: it stays the box that searches it. */
|
|
411
|
+
if (bare && distinct === 0)
|
|
412
|
+
return 'text';
|
|
413
|
+
return autoShape(numeric, distinct, distinct <= MOST);
|
|
414
|
+
},
|
|
415
|
+
staleTime: 5 * 60_000,
|
|
416
|
+
retry: false,
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
function AutoFacet(props) {
|
|
420
|
+
const { box, tail, table, standing, set, more, bare } = props;
|
|
421
|
+
const numeric = numericColumn(box);
|
|
422
|
+
const shape = useFacetShape(table, box.column, standing, numeric, bare);
|
|
423
|
+
const settled = shape.isError ? (numeric ? 'range' : 'text') : shape.data;
|
|
424
|
+
/* Until the shape is known the facet is its name alone — never a box that
|
|
425
|
+
turns into a list under the reader's pointer. */
|
|
426
|
+
if (!settled)
|
|
427
|
+
return (_jsx(Facet, { box: box, tail: tail, set: set, more: more, busy: true, children: tail ? _jsx(Unshown, { box: box, table: table, tail: tail }) : null }));
|
|
428
|
+
if (settled === 'values')
|
|
429
|
+
return _jsx(ValuesFacet, { ...props });
|
|
430
|
+
if (settled === 'range')
|
|
431
|
+
return _jsx(RangeFacet, { ...props });
|
|
432
|
+
return _jsx(TextFacet, { ...props }, tail);
|
|
433
|
+
}
|
|
434
|
+
/* What a reader types as a figure, without its dressing: "$15,000" is 15000. */
|
|
435
|
+
const plain = (text) => text.replace(/[\s,$€£]/g, '');
|
|
436
|
+
function currencySymbol(currency) {
|
|
437
|
+
try {
|
|
438
|
+
return new Intl.NumberFormat(formatLocale(), { style: 'currency', currency }).formatToParts(0).find((part) => part.type === 'currency')
|
|
439
|
+
?.value;
|
|
440
|
+
}
|
|
441
|
+
catch {
|
|
442
|
+
return undefined;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* A range over money kept in minor units is typed and read in the major unit, as the cards say it: the question
|
|
447
|
+
* keeps the stored figure (179500), the boxes hold what a person means by it (1795). Any other column is as it is.
|
|
448
|
+
*/
|
|
449
|
+
function minorRange(rule, currency) {
|
|
450
|
+
if (!rule?.minor || rule.format !== 'money')
|
|
451
|
+
return null;
|
|
452
|
+
const code = rule.currency || currency || defaultCurrency();
|
|
453
|
+
return {
|
|
454
|
+
/* "1795.00" is typed as 1795: the cents are said only where there are some. */
|
|
455
|
+
toMajor: (stored) => minorToMajor(stored, code)?.replace(/\.0+$/, '') ?? stored,
|
|
456
|
+
/* A figure that is no amount in this currency (too many decimals) is left as typed, and ignored by the range. */
|
|
457
|
+
toMinor: (typed) => {
|
|
458
|
+
const minor = typed === '' ? undefined : majorToMinor(typed, code);
|
|
459
|
+
return minor === undefined ? typed : String(minor);
|
|
460
|
+
},
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
function RangeFacet({ box, tail, table, set, unit, onEnter, more }) {
|
|
464
|
+
const kept = numberRangeOf(tail);
|
|
465
|
+
const minor = minorRange(columnDisplay(table.id, box.column), unit?.currency);
|
|
466
|
+
const range = minor ? { min: minor.toMajor(kept.min), max: minor.toMajor(kept.max) } : kept;
|
|
467
|
+
/* Applied on Enter or leaving the box, as a date's range is: a figure
|
|
468
|
+
typed a digit at a time is not a new question at every digit. */
|
|
469
|
+
const [min, setMin] = useState(range.min);
|
|
470
|
+
const [max, setMax] = useState(range.max);
|
|
471
|
+
useEffect(() => {
|
|
472
|
+
setMin(range.min);
|
|
473
|
+
setMax(range.max);
|
|
474
|
+
}, [range.min, range.max]);
|
|
475
|
+
const commit = () => {
|
|
476
|
+
const ends = minor ? [minor.toMinor(plain(min)), minor.toMinor(plain(max))] : [plain(min), plain(max)];
|
|
477
|
+
const next = numberRangeTail(ends[0], ends[1]);
|
|
478
|
+
if (next !== numberRangeTail(kept.min, kept.max))
|
|
479
|
+
set(next);
|
|
480
|
+
};
|
|
481
|
+
const onKey = (e) => {
|
|
482
|
+
if (e.key === 'Enter') {
|
|
483
|
+
e.preventDefault();
|
|
484
|
+
commit();
|
|
485
|
+
onEnter?.();
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
const symbol = unit?.currency ? currencySymbol(unit.currency) : undefined;
|
|
489
|
+
/* Each end is a compact Field, so the rail's boxes are the filter bar's
|
|
490
|
+
fields in every look. The input is named by the word alone: the symbol
|
|
491
|
+
and the unit beside it stay out of the label, and "Min$" is not a name. */
|
|
492
|
+
const end = (which, value, change) => (_jsx(Field, { size: "compact", className: "facet-range-end", label: which === 'min' ? say('min') : say('max'), children: (control) => (_jsxs("span", { className: "facet-affix", children: [symbol && (_jsx("span", { className: "facet-affix-text", "aria-hidden": "true", children: symbol })), _jsx("input", { ...control, type: "text", inputMode: "decimal", className: "field-control facet-input", "data-value": which, value: value, placeholder: say('common.any'), onChange: (e) => change(e.target.value), onBlur: commit, onKeyDown: onKey }), unit?.unit && (_jsx("span", { className: "facet-affix-text", "aria-hidden": "true", children: unit.unit }))] })) }));
|
|
493
|
+
return (_jsxs(Facet, { box: box, tail: tail, set: set, more: more, children: [tail && !range.min && !range.max && _jsx(Unshown, { box: box, table: table, tail: tail }), _jsxs("div", { className: "facet-range", children: [end('min', min, setMin), end('max', max, setMax)] })] }));
|
|
494
|
+
}
|
|
495
|
+
/* Keyed by its tail, so a condition changed elsewhere redraws the box with it. */
|
|
496
|
+
function TextFacet({ box, tail, table, standing, set, onEnter, more }) {
|
|
497
|
+
const id = useId();
|
|
498
|
+
const fuzzy = box.meta ? columnKind(box.meta.type) === 'text' : false;
|
|
499
|
+
const initial = tail.startsWith('contains ')
|
|
500
|
+
? unquote(tail.slice('contains '.length))
|
|
501
|
+
: tail.startsWith('= ')
|
|
502
|
+
? `${fuzzy ? '=' : ''}${unquote(tail.slice(2))}`
|
|
503
|
+
: '';
|
|
504
|
+
const [text, setText] = useState(initial);
|
|
505
|
+
const suggesting = useArrived(SuggestBox, Boolean(box.suggest?.length));
|
|
506
|
+
const commit = (raw = text) => {
|
|
507
|
+
if (raw !== initial)
|
|
508
|
+
set(boxTail(box, { raw }, tail));
|
|
509
|
+
};
|
|
510
|
+
const inputProps = {
|
|
511
|
+
id,
|
|
512
|
+
type: 'search',
|
|
513
|
+
className: 'field-control facet-input',
|
|
514
|
+
'data-value': 'text',
|
|
515
|
+
placeholder: fuzzy ? say('contains') : say('equals'),
|
|
516
|
+
title: fuzzy ? say('common.matchesAnywhereInTheValue') : undefined,
|
|
517
|
+
onBlur: () => commit(),
|
|
518
|
+
onKeyDown: (e) => {
|
|
519
|
+
if (e.key === 'Enter') {
|
|
520
|
+
e.preventDefault();
|
|
521
|
+
commit();
|
|
522
|
+
onEnter?.();
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
};
|
|
526
|
+
return (_jsxs(Facet, { box: box, tail: tail, set: set, group: false, more: more, children: [_jsx("label", { className: "facet-label", htmlFor: id, children: box.label }), tail && !initial && _jsx(Unshown, { box: box, table: table, tail: tail }), _jsx("div", { className: "form-field form-field-compact", children: suggesting && box.suggest ? (_jsx(SuggestBox, { table: table.id, columns: box.suggest, standing: standing, text: text, onText: setText, onPick: (value) => {
|
|
527
|
+
commit(value);
|
|
528
|
+
onEnter?.();
|
|
529
|
+
}, inputProps: inputProps })) : (_jsx("input", { ...inputProps, value: text, onChange: (e) => setText(e.target.value) })) })] }));
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* How many rows a draft question shows — what the sheet's button and a list
|
|
533
|
+
* bar's picker say before they apply it. Under the view's standing condition,
|
|
534
|
+
* as the list itself is: without it "Show 55" counted the sold cars the list
|
|
535
|
+
* never shows.
|
|
536
|
+
*/
|
|
537
|
+
export function useDraftCount(table, standing, draft) {
|
|
538
|
+
const q = squeeze(`${table.id} ${andQuery(standing, draft)}`);
|
|
539
|
+
return useQuery({
|
|
540
|
+
queryKey: ['count', state.activeConnection ?? '', q],
|
|
541
|
+
queryFn: async () => {
|
|
542
|
+
const data = await api('/api/run', { q, limit: 1 });
|
|
543
|
+
return 'total' in data && !data.errors?.length && typeof data.total === 'number' ? data.total : null;
|
|
544
|
+
},
|
|
545
|
+
staleTime: 60_000,
|
|
546
|
+
placeholderData: keepPreviousData,
|
|
547
|
+
retry: false,
|
|
548
|
+
}).data;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* The rail on a phone: the same facets in a sheet over the list, edited as
|
|
552
|
+
* a draft — the counts follow the draft — and applied by one button that
|
|
553
|
+
* says what it will show.
|
|
554
|
+
*/
|
|
555
|
+
export function FilterSheet({ refinement, onApply, onClose, ...rail }) {
|
|
556
|
+
const [draft, setDraft] = useState(refinement);
|
|
557
|
+
const n = useDraftCount(rail.table, rail.standing ?? '', draft);
|
|
558
|
+
return (_jsxs(Modal, { className: "filter-sheet", fullscreen: "mobile", ariaLabel: say('common.filtersButton'), onClose: onClose, children: [_jsx(FilterRail, { ...rail, refinement: draft, onChange: setDraft, status: typeof n === 'number' ? `${counted(n)} match` : undefined }), _jsxs("div", { className: "filter-sheet-foot", children: [_jsx(Button, { onClick: onClose, children: say('common.cancel') }), _jsx(Button, { intent: "primary", onClick: () => onApply(draft), children: typeof n === 'number' ? say('showCount', { count: counted(n) }) : say('common.showResults') })] })] }));
|
|
559
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LightboxImage } from './Lightbox.js';
|
|
2
|
+
/** `thumb` is the strip's smaller copy of `src`, when the file resource keeps one. */
|
|
3
|
+
export interface GalleryItem extends LightboxImage {
|
|
4
|
+
id: string;
|
|
5
|
+
thumb?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function Gallery({ items, label, emptyText }: {
|
|
8
|
+
items: GalleryItem[];
|
|
9
|
+
label: string;
|
|
10
|
+
emptyText: string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* A related list of image files drawn as a gallery: one large lead photo
|
|
4
|
+
* and a strip of thumbnails under it. A thumbnail chooses the lead; the lead
|
|
5
|
+
* opens the lightbox at that photo, and closing it leaves the lead on the
|
|
6
|
+
* photo the reader was last looking at. The strip is one tab stop, moved
|
|
7
|
+
* with the arrow keys, Home and End — the house tab strip's gesture.
|
|
8
|
+
*
|
|
9
|
+
* With more than one photo the lead carries a previous and a next button, so
|
|
10
|
+
* a pointer steps through the photos where they are, without opening the
|
|
11
|
+
* lightbox. They are siblings of what opens it, not inside it: a button inside
|
|
12
|
+
* a button is invalid, and each keeps its own name for a screen reader. The
|
|
13
|
+
* photo is a frame, and what opens it a button over the frame that stops at the
|
|
14
|
+
* steps' columns, so the three targets meet and never overlap: drawn as one
|
|
15
|
+
* button under the steps, a phone's tap beside a step's edge opened the photo.
|
|
16
|
+
*/
|
|
17
|
+
import { useRef, useState } from 'react';
|
|
18
|
+
import { onDemand } from './onDemand.js';
|
|
19
|
+
import { Empty } from './Notes.js';
|
|
20
|
+
import { say } from '../copy/lists/components/Gallery.js';
|
|
21
|
+
import { imageSources, imageFallbackSet, MEDIA_IMAGE_SIZES } from '@mistriwork/engine/shared/imageWidths.js';
|
|
22
|
+
/* The lightbox draws its own dialog, fetched the first time a photo is opened. */
|
|
23
|
+
const Lightbox = onDemand(() => import('./Lightbox.js'), 'Lightbox', { quiet: true });
|
|
24
|
+
const STEPS = { ArrowRight: 1, ArrowLeft: -1 };
|
|
25
|
+
function Chevron({ back }) {
|
|
26
|
+
return (_jsx("svg", { viewBox: "0 0 16 16", width: "18", height: "18", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: back ? 'M10 3.5L5.5 8l4.5 4.5' : 'M6 3.5l4.5 4.5L6 12.5', fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
27
|
+
}
|
|
28
|
+
export function Gallery({ items, label, emptyText }) {
|
|
29
|
+
const [current, setCurrent] = useState(0);
|
|
30
|
+
const [viewing, setViewing] = useState(null);
|
|
31
|
+
const lead = useRef(null);
|
|
32
|
+
const thumbs = useRef([]);
|
|
33
|
+
if (!items.length)
|
|
34
|
+
return _jsx(Empty, { className: "gallery-empty", text: emptyText });
|
|
35
|
+
const at = Math.min(current, items.length - 1);
|
|
36
|
+
const shown = items[at];
|
|
37
|
+
const step = (by) => setCurrent((at + by + items.length) % items.length);
|
|
38
|
+
const onThumbKey = (event, index) => {
|
|
39
|
+
const move = STEPS[event.key];
|
|
40
|
+
const to = move ? (index + move + items.length) % items.length : event.key === 'Home' ? 0 : event.key === 'End' ? items.length - 1 : -1;
|
|
41
|
+
if (to < 0)
|
|
42
|
+
return;
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
setCurrent(to);
|
|
45
|
+
thumbs.current[to]?.focus();
|
|
46
|
+
};
|
|
47
|
+
return (_jsxs("div", { className: "gallery", role: "group", "aria-label": label, children: [_jsxs("div", { className: "gallery-stage", children: [_jsxs("div", { className: `gallery-lead${items.length > 1 ? ' has-steps' : ''}`, children: [_jsxs("picture", { children: [imageSources(shown.src).map((source) => (_jsx("source", { type: source.type, srcSet: source.srcSet, sizes: MEDIA_IMAGE_SIZES }, source.type))), _jsx("img", { className: "gallery-lead-image", src: shown.src, srcSet: imageFallbackSet(shown.src), sizes: MEDIA_IMAGE_SIZES, alt: "", decoding: "async" })] }), items.length > 1 && (_jsxs("span", { className: "gallery-count", "aria-hidden": "true", children: [at + 1, " / ", items.length] })), _jsx("button", { type: "button", ref: lead, className: "gallery-open", onClick: () => setViewing(at), "aria-label": `${say('viewPhotoLarger', { number: at + 1, total: items.length })}${shown.alt ? `: ${shown.alt}` : ''}` })] }), items.length > 1 && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", className: "gallery-step is-prev", "aria-label": say('showThePreviousPhoto'), onClick: () => step(-1), children: _jsx(Chevron, { back: true }) }), _jsx("button", { type: "button", className: "gallery-step is-next", "aria-label": say('showTheNextPhoto'), onClick: () => step(1), children: _jsx(Chevron, {}) })] }))] }), shown.caption && _jsx("p", { className: "gallery-caption", children: shown.caption }), items.length > 1 && (_jsx("div", { className: "gallery-strip", role: "group", "aria-label": say('chooseAPhoto'), children: items.map((item, index) => (_jsx("button", { type: "button", className: "gallery-thumb", ref: (button) => {
|
|
48
|
+
thumbs.current[index] = button;
|
|
49
|
+
}, "aria-label": `${say('photo', { number: index + 1, total: items.length })}${item.alt ? `: ${item.alt}` : ''}`, "aria-current": index === at ? 'true' : undefined, tabIndex: index === at ? 0 : -1, onClick: () => setCurrent(index), onKeyDown: (event) => onThumbKey(event, index), children: _jsx("img", { src: item.thumb ?? item.src, alt: "", loading: "lazy", decoding: "async" }) }, item.id))) })), viewing !== null && (_jsx(Lightbox, { images: items, start: viewing, label: label, finalFocus: lead, onClose: (index) => {
|
|
50
|
+
setCurrent(index);
|
|
51
|
+
setViewing(null);
|
|
52
|
+
} }))] }));
|
|
53
|
+
}
|