@mistriwork/kit 1.0.0-rc.10 → 1.0.0-rc.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/actionGrants.d.ts +21 -0
- package/dist/client/actionGrants.js +24 -0
- package/dist/client/addressMount.d.ts +67 -0
- package/dist/client/addressMount.js +136 -0
- package/dist/client/app.d.ts +10 -0
- package/dist/client/app.js +976 -0
- package/dist/client/boot.d.ts +1 -0
- package/dist/client/boot.js +37 -0
- package/dist/client/brandLook.css +125 -0
- package/dist/client/breakdownBatch.d.ts +34 -0
- package/dist/client/breakdownBatch.js +115 -0
- package/dist/client/bulkActions.d.ts +66 -0
- package/dist/client/bulkActions.js +171 -0
- package/dist/client/chart.d.ts +20 -0
- package/dist/client/chart.js +80 -0
- package/dist/client/clauses.d.ts +121 -0
- package/dist/client/clauses.js +276 -0
- package/dist/client/columns.d.ts +77 -0
- package/dist/client/columns.js +102 -0
- package/dist/client/components/Accordion.d.ts +26 -0
- package/dist/client/components/Accordion.js +44 -0
- package/dist/client/components/ApiOperations.d.ts +3 -0
- package/dist/client/components/ApiOperations.js +162 -0
- package/dist/client/components/AppColumnMenu.d.ts +66 -0
- package/dist/client/components/AppColumnMenu.js +59 -0
- package/dist/client/components/AppColumnMenuPopups.d.ts +21 -0
- package/dist/client/components/AppColumnMenuPopups.js +92 -0
- package/dist/client/components/AppFooter.css +17 -0
- package/dist/client/components/AppFooter.d.ts +23 -0
- package/dist/client/components/AppFooter.js +12 -0
- package/dist/client/components/AppIssues.d.ts +4 -0
- package/dist/client/components/AppIssues.js +18 -0
- package/dist/client/components/AppList.d.ts +20 -0
- package/dist/client/components/AppList.js +696 -0
- package/dist/client/components/AttachmentList.d.ts +45 -0
- package/dist/client/components/AttachmentList.js +178 -0
- package/dist/client/components/BoardList.css +9 -0
- package/dist/client/components/Breakdown.d.ts +11 -0
- package/dist/client/components/Breakdown.js +157 -0
- package/dist/client/components/BreakdownRoom.d.ts +4 -0
- package/dist/client/components/BreakdownRoom.js +48 -0
- package/dist/client/components/CardsList.d.ts +23 -0
- package/dist/client/components/CardsList.js +209 -0
- package/dist/client/components/Chart.css +165 -0
- package/dist/client/components/Chart.d.ts +194 -0
- package/dist/client/components/Chart.js +801 -0
- package/dist/client/components/ChartFigure.d.ts +82 -0
- package/dist/client/components/ChartFigure.js +102 -0
- package/dist/client/components/ChartShapes.css +213 -0
- package/dist/client/components/ChartShapes.d.ts +63 -0
- package/dist/client/components/ChartShapes.js +393 -0
- package/dist/client/components/Checklist.css +16 -0
- package/dist/client/components/Composer.d.ts +1 -0
- package/dist/client/components/Composer.js +331 -0
- package/dist/client/components/Content.d.ts +8 -0
- package/dist/client/components/Content.js +170 -0
- package/dist/client/components/CountedLabel.d.ts +10 -0
- package/dist/client/components/CountedLabel.js +26 -0
- package/dist/client/components/Crumbs.d.ts +11 -0
- package/dist/client/components/Crumbs.js +142 -0
- package/dist/client/components/DashboardList.css +7 -0
- package/dist/client/components/DashboardList.d.ts +9 -0
- package/dist/client/components/DashboardList.js +46 -0
- package/dist/client/components/DashboardNote.d.ts +21 -0
- package/dist/client/components/DashboardNote.js +22 -0
- package/dist/client/components/DateField.css +6 -0
- package/dist/client/components/DateField.d.ts +7 -0
- package/dist/client/components/DateField.js +27 -0
- package/dist/client/components/DefinedFields.d.ts +50 -0
- package/dist/client/components/DefinedFields.js +186 -0
- package/dist/client/components/DeleteButton.d.ts +30 -0
- package/dist/client/components/DeleteButton.js +198 -0
- package/dist/client/components/Diagram.d.ts +7 -0
- package/dist/client/components/Diagram.js +320 -0
- package/dist/client/components/Dressed.d.ts +31 -0
- package/dist/client/components/Dressed.js +138 -0
- package/dist/client/components/Dropdown.d.ts +14 -0
- package/dist/client/components/Dropdown.js +20 -0
- package/dist/client/components/EditLayoutButton.d.ts +13 -0
- package/dist/client/components/EditLayoutButton.js +7 -0
- package/dist/client/components/Editable.d.ts +47 -0
- package/dist/client/components/Editable.js +422 -0
- package/dist/client/components/ErrorBoundary.d.ts +40 -0
- package/dist/client/components/ErrorBoundary.js +41 -0
- package/dist/client/components/Export.d.ts +15 -0
- package/dist/client/components/Export.js +151 -0
- package/dist/client/components/ExportHold.d.ts +18 -0
- package/dist/client/components/ExportHold.js +30 -0
- package/dist/client/components/FavoriteStar.d.ts +5 -0
- package/dist/client/components/FavoriteStar.js +14 -0
- package/dist/client/components/FieldArranger.d.ts +28 -0
- package/dist/client/components/FieldArranger.js +82 -0
- package/dist/client/components/FilePreview.css +20 -0
- package/dist/client/components/FilePreview.d.ts +26 -0
- package/dist/client/components/FilePreview.js +170 -0
- package/dist/client/components/FilterBoxes.d.ts +76 -0
- package/dist/client/components/FilterBoxes.js +294 -0
- package/dist/client/components/FilterRail.css +100 -0
- package/dist/client/components/FilterRail.d.ts +61 -0
- package/dist/client/components/FilterRail.js +559 -0
- package/dist/client/components/Gallery.d.ts +11 -0
- package/dist/client/components/Gallery.js +53 -0
- package/dist/client/components/Grid.d.ts +122 -0
- package/dist/client/components/Grid.js +1115 -0
- package/dist/client/components/GridCellEditor.d.ts +35 -0
- package/dist/client/components/GridCellEditor.js +291 -0
- package/dist/client/components/GridSelection.d.ts +16 -0
- package/dist/client/components/GridSelection.js +28 -0
- package/dist/client/components/HelpPanel.d.ts +5 -0
- package/dist/client/components/HelpPanel.js +92 -0
- package/dist/client/components/History.d.ts +10 -0
- package/dist/client/components/History.js +22 -0
- package/dist/client/components/Icon.d.ts +31 -0
- package/dist/client/components/Icon.js +20 -0
- package/dist/client/components/JsonPreview.d.ts +5 -0
- package/dist/client/components/JsonPreview.js +25 -0
- package/dist/client/components/JsonValue.d.ts +4 -0
- package/dist/client/components/JsonValue.js +3 -0
- package/dist/client/components/JsonView.css +109 -0
- package/dist/client/components/JsonView.d.ts +3 -0
- package/dist/client/components/JsonView.js +118 -0
- package/dist/client/components/Landing.d.ts +19 -0
- package/dist/client/components/Landing.js +55 -0
- package/dist/client/components/LandingSurface.css +177 -0
- package/dist/client/components/LandingSurface.d.ts +42 -0
- package/dist/client/components/LandingSurface.js +108 -0
- package/dist/client/components/LayoutBuilder.d.ts +36 -0
- package/dist/client/components/LayoutBuilder.js +104 -0
- package/dist/client/components/Lightbox.d.ts +29 -0
- package/dist/client/components/Lightbox.js +62 -0
- package/dist/client/components/ListEmpty.css +13 -0
- package/dist/client/components/ListEmpty.d.ts +10 -0
- package/dist/client/components/ListEmpty.js +8 -0
- package/dist/client/components/ListFilterBar.css +76 -0
- package/dist/client/components/ListFilterBar.d.ts +52 -0
- package/dist/client/components/ListFilterBar.js +304 -0
- package/dist/client/components/LiveNotices.css +105 -0
- package/dist/client/components/LiveNotices.d.ts +26 -0
- package/dist/client/components/LiveNotices.js +211 -0
- package/dist/client/components/MinorMoneyInput.d.ts +26 -0
- package/dist/client/components/MinorMoneyInput.js +50 -0
- package/dist/client/components/Modal.css +3 -0
- package/dist/client/components/MultiStepForm.css +122 -0
- package/dist/client/components/MultiStepForm.d.ts +59 -0
- package/dist/client/components/MultiStepForm.js +216 -0
- package/dist/client/components/NavGlyph.d.ts +14 -0
- package/dist/client/components/NavGlyph.js +27 -0
- package/dist/client/components/Nested.d.ts +21 -0
- package/dist/client/components/Nested.js +86 -0
- package/dist/client/components/NewRecord.d.ts +89 -0
- package/dist/client/components/NewRecord.js +897 -0
- package/dist/client/components/NewRecordButton.d.ts +13 -0
- package/dist/client/components/NewRecordButton.js +28 -0
- package/dist/client/components/Notes.css +39 -0
- package/dist/client/components/Notes.d.ts +59 -0
- package/dist/client/components/Notes.js +96 -0
- package/dist/client/components/OverflowMenu.d.ts +3 -0
- package/dist/client/components/OverflowMenu.js +60 -0
- package/dist/client/components/Page.d.ts +52 -0
- package/dist/client/components/Page.js +237 -0
- package/dist/client/components/PageCurrent.d.ts +38 -0
- package/dist/client/components/PageCurrent.js +27 -0
- package/dist/client/components/PageEmptyRun.d.ts +18 -0
- package/dist/client/components/PageEmptyRun.js +118 -0
- package/dist/client/components/PageFields.d.ts +3 -0
- package/dist/client/components/PageFields.js +294 -0
- package/dist/client/components/PageFlowDiagram.css +193 -0
- package/dist/client/components/PageFlowDiagram.d.ts +95 -0
- package/dist/client/components/PageFlowDiagram.js +276 -0
- package/dist/client/components/PageFlows.css +27 -0
- package/dist/client/components/PageFlows.d.ts +54 -0
- package/dist/client/components/PageFlows.js +92 -0
- package/dist/client/components/PageGroups.d.ts +43 -0
- package/dist/client/components/PageGroups.js +123 -0
- package/dist/client/components/PageHead.d.ts +28 -0
- package/dist/client/components/PageHead.js +279 -0
- package/dist/client/components/PageHeadline.d.ts +23 -0
- package/dist/client/components/PageHeadline.js +101 -0
- package/dist/client/components/PageHistory.d.ts +62 -0
- package/dist/client/components/PageHistory.js +160 -0
- package/dist/client/components/PageLayout.d.ts +22 -0
- package/dist/client/components/PageLayout.js +13 -0
- package/dist/client/components/PageMetrics.d.ts +11 -0
- package/dist/client/components/PageMetrics.js +252 -0
- package/dist/client/components/PageRelated.d.ts +70 -0
- package/dist/client/components/PageRelated.js +667 -0
- package/dist/client/components/PageRoom.d.ts +37 -0
- package/dist/client/components/PageRoom.js +277 -0
- package/dist/client/components/PageSectionBox.d.ts +28 -0
- package/dist/client/components/PageSectionBox.js +65 -0
- package/dist/client/components/PageSections.d.ts +38 -0
- package/dist/client/components/PageSections.js +352 -0
- package/dist/client/components/PageSkeleton.css +17 -0
- package/dist/client/components/PageSkeleton.d.ts +11 -0
- package/dist/client/components/PageSkeleton.js +25 -0
- package/dist/client/components/PageTimeline.d.ts +2 -0
- package/dist/client/components/PageTimeline.js +273 -0
- package/dist/client/components/Palette.d.ts +4 -0
- package/dist/client/components/Palette.js +176 -0
- package/dist/client/components/Peek.d.ts +1 -0
- package/dist/client/components/Peek.js +158 -0
- package/dist/client/components/PeekPanel.d.ts +16 -0
- package/dist/client/components/PeekPanel.js +120 -0
- package/dist/client/components/Picker.d.ts +13 -0
- package/dist/client/components/Picker.js +33 -0
- package/dist/client/components/Prefs.d.ts +3 -0
- package/dist/client/components/Prefs.js +121 -0
- package/dist/client/components/PresentationSwitch.d.ts +13 -0
- package/dist/client/components/PresentationSwitch.js +10 -0
- package/dist/client/components/Prompt.d.ts +35 -0
- package/dist/client/components/Prompt.js +114 -0
- package/dist/client/components/QrCode.css +11 -0
- package/dist/client/components/QrCode.d.ts +4 -0
- package/dist/client/components/QrCode.js +57 -0
- package/dist/client/components/QueueList.css +122 -0
- package/dist/client/components/QuickAdd.css +18 -0
- package/dist/client/components/QuickAdd.d.ts +11 -0
- package/dist/client/components/QuickAdd.js +53 -0
- package/dist/client/components/QuickAddOnDemand.d.ts +4 -0
- package/dist/client/components/QuickAddOnDemand.js +10 -0
- package/dist/client/components/Record.d.ts +36 -0
- package/dist/client/components/Record.js +385 -0
- package/dist/client/components/RecordGone.d.ts +7 -0
- package/dist/client/components/RecordGone.js +22 -0
- package/dist/client/components/RecordPicker.d.ts +59 -0
- package/dist/client/components/RecordPicker.js +299 -0
- package/dist/client/components/RecordSummaries.d.ts +55 -0
- package/dist/client/components/RecordSummaries.js +151 -0
- package/dist/client/components/RecordTags.d.ts +6 -0
- package/dist/client/components/RecordTags.js +119 -0
- package/dist/client/components/RecordTrailNav.d.ts +25 -0
- package/dist/client/components/RecordTrailNav.js +110 -0
- package/dist/client/components/RichText.d.ts +7 -0
- package/dist/client/components/RichText.js +82 -0
- package/dist/client/components/RichTextEditor.css +202 -0
- package/dist/client/components/RichTextEditor.d.ts +33 -0
- package/dist/client/components/RichTextEditor.js +348 -0
- package/dist/client/components/RichTextField.d.ts +26 -0
- package/dist/client/components/RichTextField.js +71 -0
- package/dist/client/components/Rooms.d.ts +35 -0
- package/dist/client/components/Rooms.js +276 -0
- package/dist/client/components/RowActions.d.ts +8 -0
- package/dist/client/components/RowActions.js +49 -0
- package/dist/client/components/RowHost.d.ts +110 -0
- package/dist/client/components/RowHost.js +212 -0
- package/dist/client/components/SavedViews.d.ts +25 -0
- package/dist/client/components/SavedViews.js +35 -0
- package/dist/client/components/SchemaExport.d.ts +15 -0
- package/dist/client/components/SchemaExport.js +42 -0
- package/dist/client/components/SectionPeriod.css +14 -0
- package/dist/client/components/SectionPeriod.d.ts +7 -0
- package/dist/client/components/SectionPeriod.js +14 -0
- package/dist/client/components/SetFieldDialog.d.ts +12 -0
- package/dist/client/components/SetFieldDialog.js +51 -0
- package/dist/client/components/Sidebar.d.ts +34 -0
- package/dist/client/components/Sidebar.js +398 -0
- package/dist/client/components/Skeleton.d.ts +35 -0
- package/dist/client/components/Skeleton.js +49 -0
- package/dist/client/components/SortMenu.d.ts +20 -0
- package/dist/client/components/SortMenu.js +45 -0
- package/dist/client/components/SplitListDetail.css +119 -0
- package/dist/client/components/SuggestBox.d.ts +29 -0
- package/dist/client/components/SuggestBox.js +60 -0
- package/dist/client/components/Summary.d.ts +14 -0
- package/dist/client/components/Summary.js +93 -0
- package/dist/client/components/TableRoom.d.ts +88 -0
- package/dist/client/components/TableRoom.js +246 -0
- package/dist/client/components/TableView.d.ts +111 -0
- package/dist/client/components/TableView.js +324 -0
- package/dist/client/components/ThMenu.d.ts +40 -0
- package/dist/client/components/ThMenu.js +163 -0
- package/dist/client/components/ThemeLab.d.ts +4 -0
- package/dist/client/components/ThemeLab.js +67 -0
- package/dist/client/components/TimelineSides.css +23 -0
- package/dist/client/components/TimelineSides.d.ts +7 -0
- package/dist/client/components/TimelineSides.js +9 -0
- package/dist/client/components/Tour.d.ts +12 -0
- package/dist/client/components/Tour.js +131 -0
- package/dist/client/components/Value.d.ts +38 -0
- package/dist/client/components/Value.js +172 -0
- package/dist/client/components/WorkPanel.d.ts +9 -0
- package/dist/client/components/WorkPanel.js +43 -0
- package/dist/client/components/WorkflowStatus.d.ts +6 -0
- package/dist/client/components/WorkflowStatus.js +44 -0
- package/dist/client/components/WriteConfirm.d.ts +4 -0
- package/dist/client/components/WriteConfirm.js +27 -0
- package/dist/client/components/appColumnMenuModel.d.ts +46 -0
- package/dist/client/components/appColumnMenuModel.js +51 -0
- package/dist/client/components/appListModel.d.ts +179 -0
- package/dist/client/components/appListModel.js +421 -0
- package/dist/client/components/appRooms.d.ts +106 -0
- package/dist/client/components/appRooms.js +133 -0
- package/dist/client/components/autoChart.d.ts +33 -0
- package/dist/client/components/autoChart.js +107 -0
- package/dist/client/components/avatarPhotos.d.ts +45 -0
- package/dist/client/components/avatarPhotos.js +93 -0
- package/dist/client/components/besideDetail.d.ts +1 -0
- package/dist/client/components/besideDetail.js +10 -0
- package/dist/client/components/boardNew.d.ts +2 -0
- package/dist/client/components/boardNew.js +8 -0
- package/dist/client/components/cardsModel.d.ts +11 -0
- package/dist/client/components/cardsModel.js +24 -0
- package/dist/client/components/chromeIcons.d.ts +16 -0
- package/dist/client/components/chromeIcons.js +16 -0
- package/dist/client/components/columnPresentation.d.ts +8 -0
- package/dist/client/components/columnPresentation.js +47 -0
- package/dist/client/components/componentSlot.d.ts +31 -0
- package/dist/client/components/componentSlot.js +76 -0
- package/dist/client/components/composerDraft.d.ts +16 -0
- package/dist/client/components/composerDraft.js +16 -0
- package/dist/client/components/conditionText.d.ts +14 -0
- package/dist/client/components/conditionText.js +45 -0
- package/dist/client/components/conditionWords.d.ts +37 -0
- package/dist/client/components/conditionWords.js +382 -0
- package/dist/client/components/crumbSlot.d.ts +14 -0
- package/dist/client/components/crumbSlot.js +49 -0
- package/dist/client/components/dashboardModel.d.ts +283 -0
- package/dist/client/components/dashboardModel.js +415 -0
- package/dist/client/components/dashboardParts.d.ts +9 -0
- package/dist/client/components/dashboardParts.js +18 -0
- package/dist/client/components/diagramModel.d.ts +83 -0
- package/dist/client/components/diagramModel.js +211 -0
- package/dist/client/components/dueOpen.d.ts +1 -0
- package/dist/client/components/dueOpen.js +23 -0
- package/dist/client/components/editInteraction.d.ts +20 -0
- package/dist/client/components/editInteraction.js +178 -0
- package/dist/client/components/favoriteNav.d.ts +6 -0
- package/dist/client/components/favoriteNav.js +31 -0
- package/dist/client/components/favorites.d.ts +23 -0
- package/dist/client/components/favorites.js +86 -0
- package/dist/client/components/filePreviewModel.d.ts +18 -0
- package/dist/client/components/filePreviewModel.js +21 -0
- package/dist/client/components/filterRailModel.d.ts +93 -0
- package/dist/client/components/filterRailModel.js +302 -0
- package/dist/client/components/formControlsStyle.d.ts +1 -0
- package/dist/client/components/formControlsStyle.js +3 -0
- package/dist/client/components/formDefaults.d.ts +17 -0
- package/dist/client/components/formDefaults.js +128 -0
- package/dist/client/components/gridArrange.d.ts +33 -0
- package/dist/client/components/gridArrange.js +62 -0
- package/dist/client/components/gridCellModel.d.ts +32 -0
- package/dist/client/components/gridCellModel.js +42 -0
- package/dist/client/components/gridSizing.d.ts +89 -0
- package/dist/client/components/gridSizing.js +295 -0
- package/dist/client/components/groupMoves.d.ts +44 -0
- package/dist/client/components/groupMoves.js +295 -0
- package/dist/client/components/groupOrder.d.ts +43 -0
- package/dist/client/components/groupOrder.js +63 -0
- package/dist/client/components/inputRenderers.d.ts +48 -0
- package/dist/client/components/inputRenderers.js +37 -0
- package/dist/client/components/intakeStyle.d.ts +2 -0
- package/dist/client/components/intakeStyle.js +6 -0
- package/dist/client/components/jsonModel.d.ts +98 -0
- package/dist/client/components/jsonModel.js +264 -0
- package/dist/client/components/listColumn.d.ts +20 -0
- package/dist/client/components/listColumn.js +31 -0
- package/dist/client/components/listNavigation.d.ts +16 -0
- package/dist/client/components/listNavigation.js +14 -0
- package/dist/client/components/mentionRows.d.ts +5 -0
- package/dist/client/components/mentionRows.js +62 -0
- package/dist/client/components/mount.d.ts +55 -0
- package/dist/client/components/mount.js +155 -0
- package/dist/client/components/myViews.d.ts +54 -0
- package/dist/client/components/myViews.js +82 -0
- package/dist/client/components/navCounts.d.ts +84 -0
- package/dist/client/components/navCounts.js +194 -0
- package/dist/client/components/navigationTree.d.ts +52 -0
- package/dist/client/components/navigationTree.js +49 -0
- package/dist/client/components/newMenuModel.d.ts +27 -0
- package/dist/client/components/newMenuModel.js +58 -0
- package/dist/client/components/newRecordModel.d.ts +58 -0
- package/dist/client/components/newRecordModel.js +232 -0
- package/dist/client/components/onDemand.d.ts +30 -0
- package/dist/client/components/onDemand.js +121 -0
- package/dist/client/components/optimisticMoves.d.ts +21 -0
- package/dist/client/components/optimisticMoves.js +145 -0
- package/dist/client/components/pageContext.d.ts +154 -0
- package/dist/client/components/pageContext.js +47 -0
- package/dist/client/components/pageFieldsRead.d.ts +67 -0
- package/dist/client/components/pageFieldsRead.js +55 -0
- package/dist/client/components/pageModel.d.ts +203 -0
- package/dist/client/components/pageModel.js +67 -0
- package/dist/client/components/pageStep.d.ts +31 -0
- package/dist/client/components/pageStep.js +15 -0
- package/dist/client/components/paletteModel.d.ts +9 -0
- package/dist/client/components/paletteModel.js +46 -0
- package/dist/client/components/pickerStaleness.d.ts +32 -0
- package/dist/client/components/pickerStaleness.js +27 -0
- package/dist/client/components/placeOrder.d.ts +47 -0
- package/dist/client/components/placeOrder.js +71 -0
- package/dist/client/components/pointerDrag.d.ts +54 -0
- package/dist/client/components/pointerDrag.js +95 -0
- package/dist/client/components/presentationFit.d.ts +19 -0
- package/dist/client/components/presentationFit.js +32 -0
- package/dist/client/components/recordKeys.d.ts +2 -0
- package/dist/client/components/recordKeys.js +8 -0
- package/dist/client/components/recordSearch.d.ts +31 -0
- package/dist/client/components/recordSearch.js +80 -0
- package/dist/client/components/recordSurface.d.ts +86 -0
- package/dist/client/components/recordSurface.js +267 -0
- package/dist/client/components/rowOpens.d.ts +19 -0
- package/dist/client/components/rowOpens.js +25 -0
- package/dist/client/components/sidebarModel.d.ts +152 -0
- package/dist/client/components/sidebarModel.js +372 -0
- package/dist/client/components/suggestModel.d.ts +22 -0
- package/dist/client/components/suggestModel.js +49 -0
- package/dist/client/components/suggestPart.d.ts +4 -0
- package/dist/client/components/suggestPart.js +4 -0
- package/dist/client/components/textMeasure.d.ts +2 -0
- package/dist/client/components/textMeasure.js +35 -0
- package/dist/client/components/unknownIcon.d.ts +8 -0
- package/dist/client/components/unknownIcon.js +32 -0
- package/dist/client/components/useBulkSelection.d.ts +30 -0
- package/dist/client/components/useBulkSelection.js +360 -0
- package/dist/client/components/useConditionWords.d.ts +17 -0
- package/dist/client/components/useConditionWords.js +104 -0
- package/dist/client/components/useGridKeyboard.d.ts +32 -0
- package/dist/client/components/useGridKeyboard.js +223 -0
- package/dist/client/components/useListOrder.d.ts +94 -0
- package/dist/client/components/useListOrder.js +294 -0
- package/dist/client/components/useMediaQuery.d.ts +10 -0
- package/dist/client/components/useMediaQuery.js +45 -0
- package/dist/client/components/useMessageLanguage.d.ts +1 -0
- package/dist/client/components/useMessageLanguage.js +6 -0
- package/dist/client/components/usePins.d.ts +20 -0
- package/dist/client/components/usePins.js +66 -0
- package/dist/client/components/usePointerDrag.d.ts +72 -0
- package/dist/client/components/usePointerDrag.js +553 -0
- package/dist/client/components/useRecordInsert.d.ts +42 -0
- package/dist/client/components/useRecordInsert.js +145 -0
- package/dist/client/components/useRowWindow.d.ts +35 -0
- package/dist/client/components/useRowWindow.js +149 -0
- package/dist/client/components/useStickyHead.d.ts +17 -0
- package/dist/client/components/useStickyHead.js +65 -0
- package/dist/client/components/useTabFold.d.ts +32 -0
- package/dist/client/components/useTabFold.js +145 -0
- package/dist/client/components/valueModel.d.ts +300 -0
- package/dist/client/components/valueModel.js +560 -0
- package/dist/client/components/valueRenderers.d.ts +36 -0
- package/dist/client/components/valueRenderers.js +13 -0
- package/dist/client/components/viewLink.d.ts +27 -0
- package/dist/client/components/viewLink.js +79 -0
- package/dist/client/components/walk.d.ts +14 -0
- package/dist/client/components/walk.js +16 -0
- package/dist/client/compose.d.ts +8 -0
- package/dist/client/compose.js +163 -0
- package/dist/client/composedHook.d.ts +20 -0
- package/dist/client/composedHook.js +12 -0
- package/dist/client/composedReads.d.ts +26 -0
- package/dist/client/composedReads.js +183 -0
- package/dist/client/composer.css +499 -0
- package/dist/client/composer.d.ts +121 -0
- package/dist/client/composer.js +1079 -0
- package/dist/client/composerEntry.d.ts +1 -0
- package/dist/client/composerEntry.js +58 -0
- package/dist/client/composerTab.d.ts +6 -0
- package/dist/client/composerTab.js +20 -0
- package/dist/client/conditions.d.ts +46 -0
- package/dist/client/conditions.js +150 -0
- package/dist/client/connectionList.d.ts +11 -0
- package/dist/client/connectionList.js +146 -0
- package/dist/client/connectionScope.d.ts +6 -0
- package/dist/client/connectionScope.js +14 -0
- package/dist/client/connectionTransition.d.ts +12 -0
- package/dist/client/connectionTransition.js +41 -0
- package/dist/client/copy/columnMenu/components/AppColumnMenu.d.ts +4 -0
- package/dist/client/copy/columnMenu/components/AppColumnMenu.js +6 -0
- package/dist/client/copy/columnMenu/components/AppColumnMenuPopups.d.ts +4 -0
- package/dist/client/copy/columnMenu/components/AppColumnMenuPopups.js +6 -0
- package/dist/client/copy/columnMenu/components/ThMenu.d.ts +35 -0
- package/dist/client/copy/columnMenu/components/ThMenu.js +37 -0
- package/dist/client/copy/columnMenu/components/appColumnMenuModel.d.ts +10 -0
- package/dist/client/copy/columnMenu/components/appColumnMenuModel.js +12 -0
- package/dist/client/copy/dashboards/breakdownBatch.d.ts +3 -0
- package/dist/client/copy/dashboards/breakdownBatch.js +5 -0
- package/dist/client/copy/dashboards/components/Breakdown.d.ts +32 -0
- package/dist/client/copy/dashboards/components/Breakdown.js +25 -0
- package/dist/client/copy/dashboards/components/BreakdownRoom.d.ts +3 -0
- package/dist/client/copy/dashboards/components/BreakdownRoom.js +5 -0
- package/dist/client/copy/dashboards/components/Chart.d.ts +26 -0
- package/dist/client/copy/dashboards/components/Chart.js +19 -0
- package/dist/client/copy/dashboards/components/ChartShapes.d.ts +16 -0
- package/dist/client/copy/dashboards/components/ChartShapes.js +12 -0
- package/dist/client/copy/dashboards/components/PageMetrics.d.ts +21 -0
- package/dist/client/copy/dashboards/components/PageMetrics.js +20 -0
- package/dist/client/copy/dashboards/components/SectionPeriod.d.ts +4 -0
- package/dist/client/copy/dashboards/components/SectionPeriod.js +6 -0
- package/dist/client/copy/dashboards/components/dashboardModel.d.ts +3 -0
- package/dist/client/copy/dashboards/components/dashboardModel.js +5 -0
- package/dist/client/copy/es.d.ts +11 -0
- package/dist/client/copy/es.js +60 -0
- package/dist/client/copy/filters/components/FilterBoxes.d.ts +10 -0
- package/dist/client/copy/filters/components/FilterBoxes.js +12 -0
- package/dist/client/copy/filters/components/FilterRail.d.ts +16 -0
- package/dist/client/copy/filters/components/FilterRail.js +18 -0
- package/dist/client/copy/filters/components/ListFilterBar.d.ts +9 -0
- package/dist/client/copy/filters/components/ListFilterBar.js +11 -0
- package/dist/client/copy/filters/components/conditionWords.d.ts +46 -0
- package/dist/client/copy/filters/components/conditionWords.js +95 -0
- package/dist/client/copy/filters/components/filterRailModel.d.ts +12 -0
- package/dist/client/copy/filters/components/filterRailModel.js +14 -0
- package/dist/client/copy/forms/components/DateField.d.ts +13 -0
- package/dist/client/copy/forms/components/DateField.js +15 -0
- package/dist/client/copy/forms/components/MinorMoneyInput.d.ts +4 -0
- package/dist/client/copy/forms/components/MinorMoneyInput.js +6 -0
- package/dist/client/copy/forms/components/MultiStepForm.d.ts +10 -0
- package/dist/client/copy/forms/components/MultiStepForm.js +12 -0
- package/dist/client/copy/forms/components/NewRecord.d.ts +29 -0
- package/dist/client/copy/forms/components/NewRecord.js +31 -0
- package/dist/client/copy/forms/components/NewRecordButton.d.ts +6 -0
- package/dist/client/copy/forms/components/NewRecordButton.js +8 -0
- package/dist/client/copy/forms/components/Picker.d.ts +4 -0
- package/dist/client/copy/forms/components/Picker.js +6 -0
- package/dist/client/copy/forms/components/QuickAdd.d.ts +3 -0
- package/dist/client/copy/forms/components/QuickAdd.js +5 -0
- package/dist/client/copy/forms/components/RecordPicker.d.ts +6 -0
- package/dist/client/copy/forms/components/RecordPicker.js +8 -0
- package/dist/client/copy/forms/components/RichTextEditor.d.ts +36 -0
- package/dist/client/copy/forms/components/RichTextEditor.js +40 -0
- package/dist/client/copy/forms/components/RichTextField.d.ts +3 -0
- package/dist/client/copy/forms/components/RichTextField.js +5 -0
- package/dist/client/copy/forms/components/SetFieldDialog.d.ts +10 -0
- package/dist/client/copy/forms/components/SetFieldDialog.js +9 -0
- package/dist/client/copy/forms/components/useRecordInsert.d.ts +7 -0
- package/dist/client/copy/forms/components/useRecordInsert.js +9 -0
- package/dist/client/copy/help/helpContent.d.ts +71 -0
- package/dist/client/copy/help/helpContent.js +73 -0
- package/dist/client/copy/lists/bulkActions.d.ts +12 -0
- package/dist/client/copy/lists/bulkActions.js +14 -0
- package/dist/client/copy/lists/components/AppList.d.ts +28 -0
- package/dist/client/copy/lists/components/AppList.js +30 -0
- package/dist/client/copy/lists/components/CardsList.d.ts +3 -0
- package/dist/client/copy/lists/components/CardsList.js +5 -0
- package/dist/client/copy/lists/components/Gallery.d.ts +7 -0
- package/dist/client/copy/lists/components/Gallery.js +9 -0
- package/dist/client/copy/lists/components/Grid.d.ts +30 -0
- package/dist/client/copy/lists/components/Grid.js +29 -0
- package/dist/client/copy/lists/components/GridCellEditor.d.ts +5 -0
- package/dist/client/copy/lists/components/GridCellEditor.js +7 -0
- package/dist/client/copy/lists/components/GridSelection.d.ts +4 -0
- package/dist/client/copy/lists/components/GridSelection.js +6 -0
- package/dist/client/copy/lists/components/Nested.d.ts +7 -0
- package/dist/client/copy/lists/components/Nested.js +9 -0
- package/dist/client/copy/lists/components/RowActions.d.ts +1 -0
- package/dist/client/copy/lists/components/RowActions.js +3 -0
- package/dist/client/copy/lists/components/SavedViews.d.ts +5 -0
- package/dist/client/copy/lists/components/SavedViews.js +7 -0
- package/dist/client/copy/lists/components/SortMenu.d.ts +5 -0
- package/dist/client/copy/lists/components/SortMenu.js +7 -0
- package/dist/client/copy/lists/components/TableRoom.d.ts +12 -0
- package/dist/client/copy/lists/components/TableRoom.js +14 -0
- package/dist/client/copy/lists/components/TableView.d.ts +37 -0
- package/dist/client/copy/lists/components/TableView.js +39 -0
- package/dist/client/copy/lists/components/appListModel.d.ts +6 -0
- package/dist/client/copy/lists/components/appListModel.js +5 -0
- package/dist/client/copy/lists/components/myViews.d.ts +4 -0
- package/dist/client/copy/lists/components/myViews.js +6 -0
- package/dist/client/copy/lists/components/placeOrder.d.ts +4 -0
- package/dist/client/copy/lists/components/placeOrder.js +6 -0
- package/dist/client/copy/lists/components/useBulkSelection.d.ts +20 -0
- package/dist/client/copy/lists/components/useBulkSelection.js +16 -0
- package/dist/client/copy/lists/components/useListOrder.d.ts +7 -0
- package/dist/client/copy/lists/components/useListOrder.js +9 -0
- package/dist/client/copy/public/components/appRooms.d.ts +3 -0
- package/dist/client/copy/public/components/appRooms.js +5 -0
- package/dist/client/copy/record/components/Actions.d.ts +13 -0
- package/dist/client/copy/record/components/Actions.js +15 -0
- package/dist/client/copy/record/components/AttachmentList.d.ts +23 -0
- package/dist/client/copy/record/components/AttachmentList.js +22 -0
- package/dist/client/copy/record/components/DeleteButton.d.ts +22 -0
- package/dist/client/copy/record/components/DeleteButton.js +24 -0
- package/dist/client/copy/record/components/Dressed.d.ts +5 -0
- package/dist/client/copy/record/components/Dressed.js +7 -0
- package/dist/client/copy/record/components/EditLayoutButton.d.ts +5 -0
- package/dist/client/copy/record/components/EditLayoutButton.js +7 -0
- package/dist/client/copy/record/components/Editable.d.ts +25 -0
- package/dist/client/copy/record/components/Editable.js +24 -0
- package/dist/client/copy/record/components/FieldArranger.d.ts +15 -0
- package/dist/client/copy/record/components/FieldArranger.js +17 -0
- package/dist/client/copy/record/components/FilePreview.d.ts +13 -0
- package/dist/client/copy/record/components/FilePreview.js +15 -0
- package/dist/client/copy/record/components/JsonPreview.d.ts +3 -0
- package/dist/client/copy/record/components/JsonPreview.js +5 -0
- package/dist/client/copy/record/components/JsonView.d.ts +12 -0
- package/dist/client/copy/record/components/JsonView.js +14 -0
- package/dist/client/copy/record/components/LayoutBuilder.d.ts +23 -0
- package/dist/client/copy/record/components/LayoutBuilder.js +25 -0
- package/dist/client/copy/record/components/Lightbox.d.ts +5 -0
- package/dist/client/copy/record/components/Lightbox.js +7 -0
- package/dist/client/copy/record/components/LiveNotices.d.ts +33 -0
- package/dist/client/copy/record/components/LiveNotices.js +29 -0
- package/dist/client/copy/record/components/PageCurrent.d.ts +1 -0
- package/dist/client/copy/record/components/PageCurrent.js +3 -0
- package/dist/client/copy/record/components/PageEmptyRun.d.ts +3 -0
- package/dist/client/copy/record/components/PageEmptyRun.js +5 -0
- package/dist/client/copy/record/components/PageFields.d.ts +5 -0
- package/dist/client/copy/record/components/PageFields.js +7 -0
- package/dist/client/copy/record/components/PageFlowDiagram.d.ts +33 -0
- package/dist/client/copy/record/components/PageFlowDiagram.js +37 -0
- package/dist/client/copy/record/components/PageFlows.d.ts +20 -0
- package/dist/client/copy/record/components/PageFlows.js +22 -0
- package/dist/client/copy/record/components/PageGroups.d.ts +12 -0
- package/dist/client/copy/record/components/PageGroups.js +14 -0
- package/dist/client/copy/record/components/PageHead.d.ts +8 -0
- package/dist/client/copy/record/components/PageHead.js +10 -0
- package/dist/client/copy/record/components/PageHistory.d.ts +18 -0
- package/dist/client/copy/record/components/PageHistory.js +20 -0
- package/dist/client/copy/record/components/PageLayout.d.ts +5 -0
- package/dist/client/copy/record/components/PageLayout.js +7 -0
- package/dist/client/copy/record/components/PageRelated.d.ts +24 -0
- package/dist/client/copy/record/components/PageRelated.js +26 -0
- package/dist/client/copy/record/components/PageRoom.d.ts +4 -0
- package/dist/client/copy/record/components/PageRoom.js +6 -0
- package/dist/client/copy/record/components/PageSectionBox.d.ts +6 -0
- package/dist/client/copy/record/components/PageSectionBox.js +10 -0
- package/dist/client/copy/record/components/PageTimeline.d.ts +9 -0
- package/dist/client/copy/record/components/PageTimeline.js +8 -0
- package/dist/client/copy/record/components/Peek.d.ts +3 -0
- package/dist/client/copy/record/components/Peek.js +5 -0
- package/dist/client/copy/record/components/PeekPanel.d.ts +5 -0
- package/dist/client/copy/record/components/PeekPanel.js +7 -0
- package/dist/client/copy/record/components/QrCode.d.ts +3 -0
- package/dist/client/copy/record/components/QrCode.js +5 -0
- package/dist/client/copy/record/components/Record.d.ts +19 -0
- package/dist/client/copy/record/components/Record.js +21 -0
- package/dist/client/copy/record/components/RecordGone.d.ts +4 -0
- package/dist/client/copy/record/components/RecordGone.js +6 -0
- package/dist/client/copy/record/components/RecordSummaries.d.ts +1 -0
- package/dist/client/copy/record/components/RecordSummaries.js +3 -0
- package/dist/client/copy/record/components/RecordTags.d.ts +9 -0
- package/dist/client/copy/record/components/RecordTags.js +11 -0
- package/dist/client/copy/record/components/RecordTrailNav.d.ts +8 -0
- package/dist/client/copy/record/components/RecordTrailNav.js +10 -0
- package/dist/client/copy/record/components/RichText.d.ts +4 -0
- package/dist/client/copy/record/components/RichText.js +6 -0
- package/dist/client/copy/record/components/Value.d.ts +4 -0
- package/dist/client/copy/record/components/Value.js +6 -0
- package/dist/client/copy/record/components/WorkflowStatus.d.ts +7 -0
- package/dist/client/copy/record/components/WorkflowStatus.js +9 -0
- package/dist/client/copy/record/components/WriteConfirm.d.ts +11 -0
- package/dist/client/copy/record/components/WriteConfirm.js +13 -0
- package/dist/client/copy/record/components/groupMoves.d.ts +7 -0
- package/dist/client/copy/record/components/groupMoves.js +9 -0
- package/dist/client/copy/record/components/jsonModel.d.ts +3 -0
- package/dist/client/copy/record/components/jsonModel.js +5 -0
- package/dist/client/copy/record/components/pageModel.d.ts +5 -0
- package/dist/client/copy/record/components/pageModel.js +7 -0
- package/dist/client/copy/record/components/recordSurface.d.ts +6 -0
- package/dist/client/copy/record/components/recordSurface.js +8 -0
- package/dist/client/copy/record/components/valueModel.d.ts +5 -0
- package/dist/client/copy/record/components/valueModel.js +7 -0
- package/dist/client/copy/record/fileSource.d.ts +3 -0
- package/dist/client/copy/record/fileSource.js +5 -0
- package/dist/client/copy/record/insert.d.ts +6 -0
- package/dist/client/copy/record/insert.js +8 -0
- package/dist/client/copy/record/page.d.ts +4 -0
- package/dist/client/copy/record/page.js +6 -0
- package/dist/client/copy/record/recordEditValidation.d.ts +4 -0
- package/dist/client/copy/record/recordEditValidation.js +6 -0
- package/dist/client/copy/record/savedPages.d.ts +4 -0
- package/dist/client/copy/record/savedPages.js +6 -0
- package/dist/client/copy/record/template.d.ts +9 -0
- package/dist/client/copy/record/template.js +11 -0
- package/dist/client/copy/record/write.d.ts +30 -0
- package/dist/client/copy/record/write.js +26 -0
- package/dist/client/copy/shell/app.d.ts +27 -0
- package/dist/client/copy/shell/app.js +43 -0
- package/dist/client/copy/shell/components/AppIssues.d.ts +10 -0
- package/dist/client/copy/shell/components/AppIssues.js +9 -0
- package/dist/client/copy/shell/components/Crumbs.d.ts +7 -0
- package/dist/client/copy/shell/components/Crumbs.js +17 -0
- package/dist/client/copy/shell/components/Dropdown.d.ts +3 -0
- package/dist/client/copy/shell/components/Dropdown.js +5 -0
- package/dist/client/copy/shell/components/ErrorBoundary.d.ts +4 -0
- package/dist/client/copy/shell/components/ErrorBoundary.js +6 -0
- package/dist/client/copy/shell/components/FavoriteStar.d.ts +4 -0
- package/dist/client/copy/shell/components/FavoriteStar.js +6 -0
- package/dist/client/copy/shell/components/MobileNavDrawer.d.ts +4 -0
- package/dist/client/copy/shell/components/MobileNavDrawer.js +12 -0
- package/dist/client/copy/shell/components/OverflowMenu.d.ts +3 -0
- package/dist/client/copy/shell/components/OverflowMenu.js +10 -0
- package/dist/client/copy/shell/components/Palette.d.ts +15 -0
- package/dist/client/copy/shell/components/Palette.js +18 -0
- package/dist/client/copy/shell/components/Prefs.d.ts +4 -0
- package/dist/client/copy/shell/components/Prefs.js +11 -0
- package/dist/client/copy/shell/components/Prompt.d.ts +1 -0
- package/dist/client/copy/shell/components/Prompt.js +3 -0
- package/dist/client/copy/shell/components/Rooms.d.ts +6 -0
- package/dist/client/copy/shell/components/Rooms.js +8 -0
- package/dist/client/copy/shell/components/Sidebar.d.ts +7 -0
- package/dist/client/copy/shell/components/Sidebar.js +9 -0
- package/dist/client/copy/shell/components/Skeleton.d.ts +5 -0
- package/dist/client/copy/shell/components/Skeleton.js +7 -0
- package/dist/client/copy/shell/components/TopNav.d.ts +4 -0
- package/dist/client/copy/shell/components/TopNav.js +12 -0
- package/dist/client/copy/shell/components/Tour.d.ts +4 -0
- package/dist/client/copy/shell/components/Tour.js +6 -0
- package/dist/client/copy/shell/components/newMenuModel.d.ts +3 -0
- package/dist/client/copy/shell/components/newMenuModel.js +5 -0
- package/dist/client/copy/shell/components/onDemand.d.ts +3 -0
- package/dist/client/copy/shell/components/onDemand.js +5 -0
- package/dist/client/copy/shell/components/sidebarModel.d.ts +3 -0
- package/dist/client/copy/shell/components/sidebarModel.js +5 -0
- package/dist/client/copy/shell/connectionList.d.ts +6 -0
- package/dist/client/copy/shell/connectionList.js +8 -0
- package/dist/client/copy/shell/core.d.ts +16 -0
- package/dist/client/copy/shell/core.js +18 -0
- package/dist/client/copy/shell/palette.d.ts +6 -0
- package/dist/client/copy/shell/palette.js +8 -0
- package/dist/client/copy/shell/prompt.d.ts +1 -0
- package/dist/client/copy/shell/prompt.js +3 -0
- package/dist/client/copy/shell/requestIdentity.d.ts +9 -0
- package/dist/client/copy/shell/requestIdentity.js +11 -0
- package/dist/client/copy/shell/resourceRequests.d.ts +4 -0
- package/dist/client/copy/shell/resourceRequests.js +6 -0
- package/dist/client/copy/shell/sessionIdentity.d.ts +11 -0
- package/dist/client/copy/shell/sessionIdentity.js +13 -0
- package/dist/client/copy/shell/sessionLifecycle.d.ts +5 -0
- package/dist/client/copy/shell/sessionLifecycle.js +7 -0
- package/dist/client/copy/shell/startup.d.ts +5 -0
- package/dist/client/copy/shell/startup.js +7 -0
- package/dist/client/copy/shell/theme.d.ts +5 -0
- package/dist/client/copy/shell/theme.js +14 -0
- package/dist/client/copy/shell/toast.d.ts +3 -0
- package/dist/client/copy/shell/toast.js +5 -0
- package/dist/client/copy/shell/updateAttempts.d.ts +6 -0
- package/dist/client/copy/shell/updateAttempts.js +8 -0
- package/dist/client/copy/shell/visualTheme.d.ts +4 -0
- package/dist/client/copy/shell/visualTheme.js +6 -0
- package/dist/client/copy/workbench/clauses.d.ts +3 -0
- package/dist/client/copy/workbench/clauses.js +5 -0
- package/dist/client/copy/workbench/components/ApiOperations.d.ts +21 -0
- package/dist/client/copy/workbench/components/ApiOperations.js +23 -0
- package/dist/client/copy/workbench/components/Composer.d.ts +105 -0
- package/dist/client/copy/workbench/components/Composer.js +92 -0
- package/dist/client/copy/workbench/components/Diagram.d.ts +56 -0
- package/dist/client/copy/workbench/components/Diagram.js +46 -0
- package/dist/client/copy/workbench/components/Export.d.ts +26 -0
- package/dist/client/copy/workbench/components/Export.js +25 -0
- package/dist/client/copy/workbench/components/HelpPanel.d.ts +10 -0
- package/dist/client/copy/workbench/components/HelpPanel.js +12 -0
- package/dist/client/copy/workbench/components/History.d.ts +11 -0
- package/dist/client/copy/workbench/components/History.js +10 -0
- package/dist/client/copy/workbench/components/Landing.d.ts +5 -0
- package/dist/client/copy/workbench/components/Landing.js +7 -0
- package/dist/client/copy/workbench/components/SchemaExport.d.ts +24 -0
- package/dist/client/copy/workbench/components/SchemaExport.js +20 -0
- package/dist/client/copy/workbench/components/Summary.d.ts +28 -0
- package/dist/client/copy/workbench/components/Summary.js +24 -0
- package/dist/client/copy/workbench/components/ThemeLab.d.ts +25 -0
- package/dist/client/copy/workbench/components/ThemeLab.js +27 -0
- package/dist/client/copy/workbench/components/WorkPanel.d.ts +12 -0
- package/dist/client/copy/workbench/components/WorkPanel.js +14 -0
- package/dist/client/copy/workbench/composer.d.ts +36 -0
- package/dist/client/copy/workbench/composer.js +32 -0
- package/dist/client/copy/workbench/composerEntry.d.ts +4 -0
- package/dist/client/copy/workbench/composerEntry.js +6 -0
- package/dist/client/copy/workbench/export.d.ts +8 -0
- package/dist/client/copy/workbench/export.js +7 -0
- package/dist/client/copy/workbench/filterbar.d.ts +6 -0
- package/dist/client/copy/workbench/filterbar.js +8 -0
- package/dist/client/copy/workbench/handoff.d.ts +20 -0
- package/dist/client/copy/workbench/handoff.js +19 -0
- package/dist/client/copy/workbench/help.d.ts +6 -0
- package/dist/client/copy/workbench/help.js +8 -0
- package/dist/client/copy/workbench/history.d.ts +3 -0
- package/dist/client/copy/workbench/history.js +5 -0
- package/dist/client/copy/workbench/schemaexport.d.ts +5 -0
- package/dist/client/copy/workbench/schemaexport.js +7 -0
- package/dist/client/copy/workbench/tour.d.ts +22 -0
- package/dist/client/copy/workbench/tour.js +24 -0
- package/dist/client/copy/workbench/views.d.ts +6 -0
- package/dist/client/copy/workbench/views.js +8 -0
- package/dist/client/core.d.ts +312 -0
- package/dist/client/core.js +1067 -0
- package/dist/client/customThemes.css +43 -0
- package/dist/client/dashboard.d.ts +16 -0
- package/dist/client/dashboard.js +35 -0
- package/dist/client/deeplink.d.ts +64 -0
- package/dist/client/deeplink.js +384 -0
- package/dist/client/delete.d.ts +8 -0
- package/dist/client/delete.js +35 -0
- package/dist/client/density.d.ts +8 -0
- package/dist/client/density.js +102 -0
- package/dist/client/devtoolsEventClient.d.ts +27 -0
- package/dist/client/devtoolsEventClient.js +32 -0
- package/dist/client/documents.d.ts +9 -0
- package/dist/client/documents.js +23 -0
- package/dist/client/dom.d.ts +36 -0
- package/dist/client/dom.js +232 -0
- package/dist/client/draftRecovery.d.ts +16 -0
- package/dist/client/draftRecovery.js +56 -0
- package/dist/client/export.d.ts +59 -0
- package/dist/client/export.js +217 -0
- package/dist/client/features.css +2187 -0
- package/dist/client/fieldErrors.d.ts +27 -0
- package/dist/client/fieldErrors.js +20 -0
- package/dist/client/fileSource.d.ts +10 -0
- package/dist/client/fileSource.js +115 -0
- package/dist/client/filterbar.d.ts +87 -0
- package/dist/client/filterbar.js +168 -0
- package/dist/client/firstPaint.d.ts +26 -0
- package/dist/client/firstPaint.js +102 -0
- package/dist/client/fonts/Barlow-OFL.txt +125 -0
- package/dist/client/fonts/IBMPlexMono-OFL.txt +104 -0
- package/dist/client/fonts/Inter-OFL.txt +92 -0
- package/dist/client/fonts/barlow-400.woff2 +0 -0
- package/dist/client/fonts/barlow-600.woff2 +0 -0
- package/dist/client/fonts/barlow-semi-condensed-700.woff2 +0 -0
- package/dist/client/fonts/ibm-plex-mono-400.woff2 +0 -0
- package/dist/client/fonts/ibm-plex-mono-500.woff2 +0 -0
- package/dist/client/fonts/inter-latin.woff2 +0 -0
- package/dist/client/formControls.css +5 -0
- package/dist/client/handoff.d.ts +47 -0
- package/dist/client/handoff.js +138 -0
- package/dist/client/help.css +151 -0
- package/dist/client/help.d.ts +20 -0
- package/dist/client/help.js +103 -0
- package/dist/client/helpContent.d.ts +95 -0
- package/dist/client/helpContent.js +661 -0
- package/dist/client/history.d.ts +10 -0
- package/dist/client/history.js +181 -0
- package/dist/client/historyToken.d.ts +18 -0
- package/dist/client/historyToken.js +27 -0
- package/dist/client/iconWeight.d.ts +16 -0
- package/dist/client/iconWeight.js +44 -0
- package/dist/client/index.html +244 -0
- package/dist/client/insert.d.ts +50 -0
- package/dist/client/insert.js +269 -0
- package/dist/client/kit.d.ts +7 -0
- package/dist/client/kit.js +1 -0
- package/dist/client/layoutDraftRecovery.d.ts +8 -0
- package/dist/client/layoutDraftRecovery.js +33 -0
- package/dist/client/ledgerLook.css +32 -0
- package/dist/client/liveReads.d.ts +23 -0
- package/dist/client/liveReads.js +38 -0
- package/dist/client/liveState.d.ts +94 -0
- package/dist/client/liveState.js +212 -0
- package/dist/client/locale.d.ts +141 -0
- package/dist/client/locale.js +0 -0
- package/dist/client/lumenLook.css +1867 -0
- package/dist/client/menu.d.ts +49 -0
- package/dist/client/menu.js +131 -0
- package/dist/client/menuScope.d.ts +6 -0
- package/dist/client/menuScope.js +4 -0
- package/dist/client/messages.d.ts +240 -0
- package/dist/client/messages.js +370 -0
- package/dist/client/motionStill.d.ts +1 -0
- package/dist/client/motionStill.js +17 -0
- package/dist/client/navigationHold.d.ts +37 -0
- package/dist/client/navigationHold.js +503 -0
- package/dist/client/nested.d.ts +8 -0
- package/dist/client/nested.js +26 -0
- package/dist/client/ownWrites.d.ts +33 -0
- package/dist/client/ownWrites.js +76 -0
- package/dist/client/page.css +4052 -0
- package/dist/client/page.d.ts +21 -0
- package/dist/client/page.js +187 -0
- package/dist/client/pagemarks.d.ts +32 -0
- package/dist/client/pagemarks.js +98 -0
- package/dist/client/palette.d.ts +35 -0
- package/dist/client/palette.js +357 -0
- package/dist/client/partsLook.css +1047 -0
- package/dist/client/peek.d.ts +11 -0
- package/dist/client/peek.js +51 -0
- package/dist/client/peekpanel.d.ts +26 -0
- package/dist/client/peekpanel.js +121 -0
- package/dist/client/pendingWork.d.ts +19 -0
- package/dist/client/pendingWork.js +36 -0
- package/dist/client/pins.d.ts +24 -0
- package/dist/client/pins.js +97 -0
- package/dist/client/prefs.d.ts +3 -0
- package/dist/client/prefs.js +32 -0
- package/dist/client/prompt.d.ts +27 -0
- package/dist/client/prompt.js +61 -0
- package/dist/client/readGathering.d.ts +4 -0
- package/dist/client/readGathering.js +23 -0
- package/dist/client/recordCompose.d.ts +11 -0
- package/dist/client/recordCompose.js +69 -0
- package/dist/client/recordDrafts.d.ts +40 -0
- package/dist/client/recordDrafts.js +57 -0
- package/dist/client/recordEditValidation.d.ts +12 -0
- package/dist/client/recordEditValidation.js +52 -0
- package/dist/client/recordIntent.d.ts +6 -0
- package/dist/client/recordIntent.js +15 -0
- package/dist/client/recordPress.d.ts +12 -0
- package/dist/client/recordPress.js +84 -0
- package/dist/client/recordSource.d.ts +6 -0
- package/dist/client/recordSource.js +15 -0
- package/dist/client/recordTrail.d.ts +77 -0
- package/dist/client/recordTrail.js +101 -0
- package/dist/client/recordWriteRefresh.d.ts +74 -0
- package/dist/client/recordWriteRefresh.js +284 -0
- package/dist/client/relatedRows.d.ts +4 -0
- package/dist/client/relatedRows.js +24 -0
- package/dist/client/requestIdentity.d.ts +36 -0
- package/dist/client/requestIdentity.js +97 -0
- package/dist/client/resourceRequests.d.ts +7 -0
- package/dist/client/resourceRequests.js +32 -0
- package/dist/client/roleLabels.d.ts +7 -0
- package/dist/client/roleLabels.js +24 -0
- package/dist/client/rowEditing.d.ts +15 -0
- package/dist/client/rowEditing.js +36 -0
- package/dist/client/sageLook.css +242 -0
- package/dist/client/savedPages.d.ts +15 -0
- package/dist/client/savedPages.js +123 -0
- package/dist/client/schemaexport.d.ts +14 -0
- package/dist/client/schemaexport.js +182 -0
- package/dist/client/sessionIdentity.d.ts +39 -0
- package/dist/client/sessionIdentity.js +255 -0
- package/dist/client/sessionLifecycle.d.ts +33 -0
- package/dist/client/sessionLifecycle.js +276 -0
- package/dist/client/shellHost.d.ts +70 -0
- package/dist/client/shellHost.js +92 -0
- package/dist/client/shellMain.d.ts +8 -0
- package/dist/client/shellMode.d.ts +433 -0
- package/dist/client/shellMode.js +68 -0
- package/dist/client/shellStart.d.ts +5 -0
- package/dist/client/shellStart.js +54 -0
- package/dist/client/shells.d.ts +123 -0
- package/dist/client/shells.js +1 -0
- package/dist/client/sql.css +139 -0
- package/dist/client/startup.d.ts +8 -0
- package/dist/client/startup.js +85 -0
- package/dist/client/startupHold.d.ts +10 -0
- package/dist/client/startupHold.js +73 -0
- package/dist/client/structure.css +1296 -0
- package/dist/client/style.css +3526 -0
- package/dist/client/styleImports.d.ts +3 -0
- package/dist/client/surfaces.d.ts +18 -0
- package/dist/client/surfaces.js +27 -0
- package/dist/client/surfacesLook.css +88 -0
- package/dist/client/template.d.ts +75 -0
- package/dist/client/template.js +403 -0
- package/dist/client/theme.d.ts +14 -0
- package/dist/client/theme.js +112 -0
- package/dist/client/themeFamilies.css +788 -0
- package/dist/client/thmenu.d.ts +12 -0
- package/dist/client/thmenu.js +94 -0
- package/dist/client/toast.d.ts +7 -0
- package/dist/client/toast.js +117 -0
- package/dist/client/tour.d.ts +8 -0
- package/dist/client/tour.js +176 -0
- package/dist/client/transport.d.ts +2 -0
- package/dist/client/transport.js +13 -0
- package/dist/client/typography.d.ts +4 -0
- package/dist/client/typography.js +51 -0
- package/dist/client/uiBridge.d.ts +57 -0
- package/dist/client/uiBridge.js +30 -0
- package/dist/client/updateAttempts.d.ts +46 -0
- package/dist/client/updateAttempts.js +131 -0
- package/dist/client/url.d.ts +74 -0
- package/dist/client/url.js +388 -0
- package/dist/client/views.d.ts +19 -0
- package/dist/client/views.js +133 -0
- package/dist/client/visualTheme.d.ts +62 -0
- package/dist/client/visualTheme.js +502 -0
- package/dist/client/visualThemes.css +421 -0
- package/dist/client/workshopLook.css +126 -0
- package/dist/client/write.d.ts +100 -0
- package/dist/client/write.js +882 -0
- package/dist/client/writePaths.d.ts +16 -0
- package/dist/client/writePaths.js +35 -0
- package/dist/client/yesNoRule.d.ts +12 -0
- package/dist/client/yesNoRule.js +39 -0
- package/dist/clientFiles.d.ts +11 -4
- package/dist/clientFiles.js +16 -12
- package/dist/vite.d.ts +136 -0
- package/dist/vite.js +571 -0
- package/package.json +130 -3
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a value is said, before it is drawn.
|
|
3
|
+
*
|
|
4
|
+
* The record view and the page view each grew their own idea of what a
|
|
5
|
+
* value looks like, and the page's was the worse one. This is the one rule
|
|
6
|
+
* book: the grid's planner classifies, a display rule from the app dresses,
|
|
7
|
+
* and everything below is a pure decision the components render.
|
|
8
|
+
*/
|
|
9
|
+
import { richTextExcerpt, richTextImageAddress } from '@mistriwork/engine/shared/richText.js';
|
|
10
|
+
import { MASK, displayWord, vocabularyWord } from '@mistriwork/engine/shared/model.js';
|
|
11
|
+
import { defaultCurrency, formatAbsolute, formatDate, formatDateTime, formatLocale, formatMoney, formatWholeMoney, formatNumber, formatPercent, formatRelativeDay, daysFromToday, NEAR_DAYS, sayNearDay, withPercentSign, } from '../locale.js';
|
|
12
|
+
import { minorFigure } from '@mistriwork/engine/shared/money.js';
|
|
13
|
+
export { yesNoRule } from '../yesNoRule.js';
|
|
14
|
+
import { unitWord } from '@mistriwork/engine/shared/unitWord.js';
|
|
15
|
+
import { planColumn } from '../columns.js';
|
|
16
|
+
import { leadTonePath, subtitlePath } from '@mistriwork/engine/shared/subtitlePath.js';
|
|
17
|
+
import { say } from '../copy/record/components/valueModel.js';
|
|
18
|
+
import { shellBody } from '../shellHost.js';
|
|
19
|
+
/**
|
|
20
|
+
* How a set of dates drawn together is said: one way down a column. A relative date is said from today only where
|
|
21
|
+
* every value is near (a sentence of days), else every one is its date and the phrase stays its tooltip. Anything
|
|
22
|
+
* else keeps its rule. Money needs no such reading: every figure says the currency's minor digits (moneyText).
|
|
23
|
+
*/
|
|
24
|
+
export function datesAmong(rule, values) {
|
|
25
|
+
if (rule?.format !== 'relative')
|
|
26
|
+
return rule;
|
|
27
|
+
const far = values.some((value) => {
|
|
28
|
+
if (value === null || value === undefined || value === '')
|
|
29
|
+
return false;
|
|
30
|
+
const days = daysFromToday(String(value));
|
|
31
|
+
return days !== null && Math.abs(days) > NEAR_DAYS;
|
|
32
|
+
});
|
|
33
|
+
if (!far)
|
|
34
|
+
return rule;
|
|
35
|
+
/* The same object for the same rule: a grid keeps its columns while they are equal by identity. */
|
|
36
|
+
return (apart.get(rule) ?? (apart.set(rule, { ...rule, absolute: true }), apart.get(rule)));
|
|
37
|
+
}
|
|
38
|
+
const apart = new WeakMap();
|
|
39
|
+
/** A stored figure Intl can say exactly: a finite number, or a decimal's digits however long (formatMoney). */
|
|
40
|
+
const exactFigure = (value) => (typeof value === 'number' && Number.isFinite(value)) || (typeof value === 'string' && /^\s*[+-]?\d+(\.\d+)?\s*$/.test(value));
|
|
41
|
+
/**
|
|
42
|
+
* A money figure, already in its major unit, to the currency's own minor digits wherever it stands: $5,917.00 in a
|
|
43
|
+
* grid, on a card, on a record and on paper, $0.00 and −$12.00 alike, a figure past 2^53 digit for digit. An amount
|
|
44
|
+
* is read to settle something, and "$5,917" beside "$5,917.40" reads as two kinds of figure.
|
|
45
|
+
*/
|
|
46
|
+
function moneyText(rule, value) {
|
|
47
|
+
return rule.whole ? formatWholeMoney(value, rule.currency) : formatMoney(value, rule.currency);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The word a rule says a stored value as: the author's own (`values`), the
|
|
51
|
+
* value made words where the rule says `humanize` (`IN_REVIEW` → "In
|
|
52
|
+
* review"), or undefined where the rule says neither. Own keys only, as
|
|
53
|
+
* everywhere a stored value names a key.
|
|
54
|
+
*/
|
|
55
|
+
export function wordFor(rule, text) {
|
|
56
|
+
return displayWord(rule, text);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A vocabulary value as a picker, a filter or a chip names it in an App: the
|
|
60
|
+
* rule's own word first, else the value made words as a tone chip makes it,
|
|
61
|
+
* so a form's select, a filter rail and the grid say one thing for one value.
|
|
62
|
+
*/
|
|
63
|
+
export function choiceWord(rule, value) {
|
|
64
|
+
return wordFor(rule, value) ?? vocabularyWord(value);
|
|
65
|
+
}
|
|
66
|
+
/* The spellings a true/false column's value reaches a rule as: the engine's
|
|
67
|
+
own (`true` on Postgres, `1` on SQLite) and the others an author may key. */
|
|
68
|
+
const TRUTH = { yes: ['true', '1', 't'], no: ['false', '0', 'f'] };
|
|
69
|
+
/**
|
|
70
|
+
* The words a true/false column's editor offers, as its display says them: the
|
|
71
|
+
* rule's word for the value the editor writes, else for another spelling of
|
|
72
|
+
* the same truth (`values: { true: 'On', false: 'Off' }` over a SQLite 1/0).
|
|
73
|
+
* A side the rule does not name is undefined, and the editor says Yes or No there.
|
|
74
|
+
*/
|
|
75
|
+
export function booleanWords(rule, choices) {
|
|
76
|
+
const side = (stored, spellings) => [stored, ...spellings].map((text) => (rule?.values && Object.hasOwn(rule.values, text) ? rule.values[text] : undefined)).find(Boolean);
|
|
77
|
+
return { yes: side(choices.yes, TRUTH.yes), no: side(choices.no, TRUTH.no) };
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* What the rest of a rule says of a value, for a value renderer that draws it
|
|
81
|
+
* in the rule's place: the tone its pill would wear and the word it would say.
|
|
82
|
+
* A renderer is handed these, so an author's component keeps the rule's
|
|
83
|
+
* colour and words instead of starting over from the stored value.
|
|
84
|
+
*/
|
|
85
|
+
export function ruleSays(rule, value) {
|
|
86
|
+
if (!rule || value === null || value === undefined)
|
|
87
|
+
return {};
|
|
88
|
+
const text = String(value);
|
|
89
|
+
const tone = toneFor(rule, value, text);
|
|
90
|
+
const word = wordFor(rule, text);
|
|
91
|
+
return { ...(tone ? { tone } : {}), ...(word !== undefined ? { word } : {}) };
|
|
92
|
+
}
|
|
93
|
+
/** Vocabulary captions only: identifiers and arbitrary grouped text stay exact.
|
|
94
|
+
* A toned value is a word everywhere; a value of the column's own vocabulary
|
|
95
|
+
* (`allowed`) is a word in an App, where the Workbench shows the data.
|
|
96
|
+
* Callers keep the raw key for navigation and aggregation. */
|
|
97
|
+
export function groupLabel(rule, value, allowed) {
|
|
98
|
+
if (value == null)
|
|
99
|
+
return '—';
|
|
100
|
+
const text = String(value);
|
|
101
|
+
const vocabulary = allowed?.includes(text) && typeof document !== 'undefined' && shellBody()?.classList.contains('app-mode');
|
|
102
|
+
return wordFor(rule, text) ?? (rule?.tone || vocabulary ? vocabularyWord(text) : text);
|
|
103
|
+
}
|
|
104
|
+
/* The path a shown column's second line reads: shared, since a list's
|
|
105
|
+
question fetches it (shared/subtitlePath.ts). */
|
|
106
|
+
export { subtitlePath, leadTonePath };
|
|
107
|
+
/** A figure and its unit: "85,780 mi", "$242/mo" when the unit opens with a slash, and "100%" (a reader in Paris
|
|
108
|
+
reads "100 %") when it is a percent sign, placed as the locale places it. */
|
|
109
|
+
export function withUnit(figure, unit) {
|
|
110
|
+
if (!unit)
|
|
111
|
+
return figure;
|
|
112
|
+
if (unit === '%')
|
|
113
|
+
return withPercentSign(figure);
|
|
114
|
+
if (unit.startsWith('/'))
|
|
115
|
+
return `${figure}${unit}`;
|
|
116
|
+
return `${figure} ${unitWord(figure, unit)}`;
|
|
117
|
+
}
|
|
118
|
+
/** The tone a rule gives a value: an exact key first, then — for a numeric
|
|
119
|
+
value — the first satisfied threshold key (">= 90"), in the order the
|
|
120
|
+
author wrote them; "*" for every value no other key names, which wears
|
|
121
|
+
`neutral` where the map says nothing. */
|
|
122
|
+
function toneFor(rule, value, text) {
|
|
123
|
+
if (!rule.tone)
|
|
124
|
+
return null;
|
|
125
|
+
/* Own keys only: a cell that reads `constructor` found the prototype's
|
|
126
|
+
function through a plain property read. */
|
|
127
|
+
const exact = Object.hasOwn(rule.tone, text) ? rule.tone[text] : undefined;
|
|
128
|
+
if (exact)
|
|
129
|
+
return exact;
|
|
130
|
+
const rest = Object.hasOwn(rule.tone, '*') ? rule.tone['*'] : text.trim() ? 'neutral' : null;
|
|
131
|
+
const n = Number(value);
|
|
132
|
+
if (!Number.isFinite(n))
|
|
133
|
+
return rest;
|
|
134
|
+
for (const [key, tone] of Object.entries(rule.tone)) {
|
|
135
|
+
const m = /^(>=|<=|>|<)\s*(-?\d+(?:\.\d+)?)$/.exec(key);
|
|
136
|
+
if (!m)
|
|
137
|
+
continue;
|
|
138
|
+
const bound = Number(m[2]);
|
|
139
|
+
const hit = m[1] === '>=' ? n >= bound : m[1] === '<=' ? n <= bound : m[1] === '>' ? n > bound : n < bound;
|
|
140
|
+
if (hit)
|
|
141
|
+
return tone;
|
|
142
|
+
}
|
|
143
|
+
return rest;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The placeholder a rule draws instead of this value — `masked: true`, or a
|
|
147
|
+
* value starting with the rule's `masked.prefix`, said as that prefix and the
|
|
148
|
+
* mask — or undefined when the rule leaves the value be. Presentation only:
|
|
149
|
+
* the value is in the browser; `hidden` is what keeps a column out of it.
|
|
150
|
+
*/
|
|
151
|
+
export function maskedText(rule, value) {
|
|
152
|
+
if (!rule || value === null || value === undefined || value === '')
|
|
153
|
+
return undefined;
|
|
154
|
+
if (rule.masked === true)
|
|
155
|
+
return MASK;
|
|
156
|
+
const prefix = rule.masked?.prefix;
|
|
157
|
+
return prefix && String(value).startsWith(prefix) ? `${prefix}${MASK}` : undefined;
|
|
158
|
+
}
|
|
159
|
+
/** Up to two initials, from the first two words that have a letter or digit. */
|
|
160
|
+
export function initialsOf(text) {
|
|
161
|
+
const words = text
|
|
162
|
+
.trim()
|
|
163
|
+
.split(/[\s._-]+/)
|
|
164
|
+
.filter((word) => /[\p{L}\p{N}]/u.test(word));
|
|
165
|
+
return (words
|
|
166
|
+
.slice(0, 2)
|
|
167
|
+
.map((word) => [...word.replace(/[^\p{L}\p{N}]/gu, '')][0] ?? '')
|
|
168
|
+
.join('')
|
|
169
|
+
.toUpperCase() || '?');
|
|
170
|
+
}
|
|
171
|
+
const DURATION_UNITS = [
|
|
172
|
+
['days', 86_400, 'd'],
|
|
173
|
+
['hours', 3_600, 'h'],
|
|
174
|
+
['minutes', 60, 'm'],
|
|
175
|
+
['seconds', 1, 's'],
|
|
176
|
+
];
|
|
177
|
+
/**
|
|
178
|
+
* A number of seconds said as its two largest units — "2h 15m", "3d 4h",
|
|
179
|
+
* "45s" — in the reader's locale where the runtime can say a duration, and
|
|
180
|
+
* in the narrow units everywhere else. Two units, because a time left or a
|
|
181
|
+
* time taken is read at a glance; the stored seconds stay in the title.
|
|
182
|
+
*/
|
|
183
|
+
export function sayDuration(seconds, locale) {
|
|
184
|
+
const sign = seconds < 0 ? '−' : '';
|
|
185
|
+
let rest = Math.round(Math.abs(seconds));
|
|
186
|
+
const parts = [];
|
|
187
|
+
for (const [unit, size, mark] of DURATION_UNITS) {
|
|
188
|
+
const count = Math.floor(rest / size);
|
|
189
|
+
rest -= count * size;
|
|
190
|
+
if (count && parts.length < 2)
|
|
191
|
+
parts.push({ unit, count, mark });
|
|
192
|
+
else if (parts.length)
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
if (!parts.length)
|
|
196
|
+
parts.push({ unit: 'seconds', count: 0, mark: 's' });
|
|
197
|
+
const Format = Intl
|
|
198
|
+
.DurationFormat;
|
|
199
|
+
if (Format) {
|
|
200
|
+
try {
|
|
201
|
+
return sign + new Format(locale, { style: 'narrow' }).format(Object.fromEntries(parts.map(({ unit, count }) => [unit, count])));
|
|
202
|
+
}
|
|
203
|
+
catch {
|
|
204
|
+
/* the narrow units below */
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return sign + parts.map(({ count, mark }) => `${count}${mark}`).join(' ');
|
|
208
|
+
}
|
|
209
|
+
/** One of eight palette slots, fixed by the text, so a name keeps its colour everywhere. */
|
|
210
|
+
export function hueOf(text) {
|
|
211
|
+
let h = 0;
|
|
212
|
+
for (const ch of text)
|
|
213
|
+
h = (h * 31 + (ch.codePointAt(0) ?? 0)) >>> 0;
|
|
214
|
+
return h % 8;
|
|
215
|
+
}
|
|
216
|
+
/* Three faces and a count: a fourth disc would crowd a card's footer without naming anyone the count does not. */
|
|
217
|
+
const AVATAR_STACK = 3;
|
|
218
|
+
/** The names in a people value: an array (Postgres hands one back), a JSON array as text, or one name per line or comma. */
|
|
219
|
+
function namesOf(value) {
|
|
220
|
+
let list = value;
|
|
221
|
+
if (typeof value === 'string' && value.trim().startsWith('[')) {
|
|
222
|
+
try {
|
|
223
|
+
list = JSON.parse(value);
|
|
224
|
+
}
|
|
225
|
+
catch {
|
|
226
|
+
list = value;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
const items = Array.isArray(list) ? list.map((item) => (item == null ? '' : String(item))) : String(list).split(/\r?\n|,/);
|
|
230
|
+
return items.map((item) => item.trim()).filter(Boolean);
|
|
231
|
+
}
|
|
232
|
+
/** The author's word for a figure: the `values` key that reads as the same number. */
|
|
233
|
+
function figureWord(rule, n) {
|
|
234
|
+
const key = Object.keys(rule.values ?? {}).find((k) => k.trim() !== '' && Number(k) === n);
|
|
235
|
+
return key === undefined ? undefined : rule.values?.[key];
|
|
236
|
+
}
|
|
237
|
+
/** The icon a rule gives a value: its exact key only — a mark names a word of the vocabulary, never a range. */
|
|
238
|
+
function iconFor(rule, text) {
|
|
239
|
+
return rule.icons && Object.hasOwn(rule.icons, text) ? rule.icons[text] : undefined;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* A display rule as an author writes it (`<Value display>`, a fixture's rules) in the shape the dressers read: the
|
|
243
|
+
* DSL's `bar: 5` is a bar filled against 5, which the resource parser keeps as `bar: true` and `max: 5`.
|
|
244
|
+
*/
|
|
245
|
+
export function authoredDisplay(rule) {
|
|
246
|
+
if (!rule)
|
|
247
|
+
return null;
|
|
248
|
+
const { bar, ...rest } = rule;
|
|
249
|
+
return typeof bar === 'number' ? { ...rest, bar: true, max: bar } : { ...rest, ...(bar === undefined ? {} : { bar }) };
|
|
250
|
+
}
|
|
251
|
+
export function dressFor(rule, value) {
|
|
252
|
+
if (!rule || value === null || value === undefined)
|
|
253
|
+
return null;
|
|
254
|
+
const mask = maskedText(rule, value);
|
|
255
|
+
if (mask !== undefined)
|
|
256
|
+
return { kind: 'masked', text: mask };
|
|
257
|
+
if (rule.format === 'avatars') {
|
|
258
|
+
const names = namesOf(value);
|
|
259
|
+
if (!names.length)
|
|
260
|
+
return null;
|
|
261
|
+
return { kind: 'avatars', names: names.slice(0, AVATAR_STACK), more: Math.max(0, names.length - AVATAR_STACK), text: names.join(', ') };
|
|
262
|
+
}
|
|
263
|
+
/* Minor units are said as the major figure, exact text: 1999 cents is "19.99" and keeps its cents. */
|
|
264
|
+
if (rule.minor && rule.format === 'money')
|
|
265
|
+
value = minorFigure(value, rule.currency || defaultCurrency()) ?? value;
|
|
266
|
+
const text = String(value);
|
|
267
|
+
if (rule.signature && typeof rule.signature === 'object' && text.trim())
|
|
268
|
+
return { kind: 'signature', src: richTextImageAddress(rule.signature.table, { [rule.signature.key]: text }), text: say('signed') };
|
|
269
|
+
const own = ownDrawing(rule, value, text);
|
|
270
|
+
if (own !== undefined)
|
|
271
|
+
return own;
|
|
272
|
+
const tone = toneFor(rule, value, text);
|
|
273
|
+
const n = Number(value);
|
|
274
|
+
/* A meter says the number beside a bar against its max; a tone colours
|
|
275
|
+
the bar instead of becoming a pill. */
|
|
276
|
+
if (rule.bar && rule.max !== undefined && rule.format !== 'percent' && Number.isFinite(n) && Number.isSafeInteger(Math.trunc(n))) {
|
|
277
|
+
const said = rule.format === 'money' ? moneyText(rule, n) : formatNumber(n);
|
|
278
|
+
return {
|
|
279
|
+
kind: 'meter',
|
|
280
|
+
text: said,
|
|
281
|
+
fill: Math.max(0, Math.min(100, (n / rule.max) * 100)),
|
|
282
|
+
tone,
|
|
283
|
+
title: say('textOfMax', { text, max: rule.max }),
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
/* A numeric string past 2^53 falls through on purpose: Number() would
|
|
287
|
+
round it, and a formatted wrong number beats an unformatted right one
|
|
288
|
+
nowhere. Money is the exception that says it exactly: formatMoney reads
|
|
289
|
+
the digits, not the double. */
|
|
290
|
+
const safe = (Number.isFinite(n) && Number.isSafeInteger(Math.trunc(n))) || (rule.format === 'money' && exactFigure(value));
|
|
291
|
+
/* A toned figure is still a figure: the pill says "104 h" and "$1,200",
|
|
292
|
+
as the same value says untoned, not the bare stored digits. A word is
|
|
293
|
+
said as the vocabulary says it. */
|
|
294
|
+
/* A figure is a figure: its tone is the ink it is set in, nothing before it, so a column of amounts keeps one left
|
|
295
|
+
edge. A neutral one is no tone at all ("$0" with a grey dot said nothing, and moved the figure off its label's edge). */
|
|
296
|
+
const figured = tone
|
|
297
|
+
? !safe || text.trim() === ''
|
|
298
|
+
? false
|
|
299
|
+
: rule.format === 'money' || rule.format === 'percent' || rule.format === 'number' || Boolean(rule.unit)
|
|
300
|
+
: false;
|
|
301
|
+
if (tone && !(figured && tone === 'neutral')) {
|
|
302
|
+
const figure = !safe || text.trim() === ''
|
|
303
|
+
? null
|
|
304
|
+
: rule.format === 'money'
|
|
305
|
+
? withUnit(moneyText(rule, typeof value === 'string' ? text : n), rule.unit)
|
|
306
|
+
: rule.format === 'percent'
|
|
307
|
+
? formatPercent(n)
|
|
308
|
+
: rule.format === 'number' || rule.unit
|
|
309
|
+
? withUnit(formatNumber(n), rule.unit)
|
|
310
|
+
: null;
|
|
311
|
+
const icon = iconFor(rule, text);
|
|
312
|
+
return {
|
|
313
|
+
kind: 'tone',
|
|
314
|
+
tone,
|
|
315
|
+
text,
|
|
316
|
+
label: figure ?? wordFor(rule, text) ?? vocabularyWord(text),
|
|
317
|
+
...(icon ? { icon } : {}),
|
|
318
|
+
...(figure !== null ? { figure: true } : {}),
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
/* A mark with no tone: the icon in the caption's ink before the word, which stays the value. */
|
|
322
|
+
const mark = iconFor(rule, text);
|
|
323
|
+
if (mark)
|
|
324
|
+
return { kind: 'mark', icon: mark, text, label: wordFor(rule, text) ?? vocabularyWord(text) };
|
|
325
|
+
/* A word and nothing else: the author's word for the stored value, the value in the title. */
|
|
326
|
+
const word = rule.format === undefined && !rule.bar && !rule.avatar ? wordFor(rule, text) : undefined;
|
|
327
|
+
if (word !== undefined)
|
|
328
|
+
return { kind: 'word', text, label: word };
|
|
329
|
+
/* A figure the author names (`values: { 0: 'No charge' }`): a figure keys by its number, so a stored "0.00" finds 0. */
|
|
330
|
+
const named = (rule.format === 'money' || rule.format === 'number' || rule.format === 'percent') && safe && text.trim()
|
|
331
|
+
? figureWord(rule, n)
|
|
332
|
+
: undefined;
|
|
333
|
+
if (named !== undefined)
|
|
334
|
+
return { kind: 'word', text, label: named };
|
|
335
|
+
/* To the currency's minor digits, always: "5294" is $5,294.00, "1999" cents $19.99. */
|
|
336
|
+
if (rule.format === 'money' && safe)
|
|
337
|
+
return { kind: 'money', text: withUnit(moneyText(rule, typeof value === 'string' ? text : n), rule.unit), title: text };
|
|
338
|
+
if (rule.format === 'percent' && safe) {
|
|
339
|
+
const said = formatPercent(n);
|
|
340
|
+
const fill = Math.max(0, Math.min(100, n));
|
|
341
|
+
return rule.bar
|
|
342
|
+
? { kind: 'percent', text: said, bar: fill }
|
|
343
|
+
: rule.ring
|
|
344
|
+
? { kind: 'percent', text: said, ring: fill }
|
|
345
|
+
: { kind: 'percent', text: said };
|
|
346
|
+
}
|
|
347
|
+
/* A unit with no format is a number's: a numeric value says "85,780 mi", and a text one stays itself. */
|
|
348
|
+
if ((rule.format === 'number' || (rule.format === undefined && rule.unit)) && safe && text.trim() !== '')
|
|
349
|
+
return { kind: 'number', text: withUnit(formatNumber(n), rule.unit), title: text };
|
|
350
|
+
/* A duration is a figure too: tabular, and the stored seconds in the title.
|
|
351
|
+
An interval the database hands back as text is not a number, and stays itself. */
|
|
352
|
+
if (rule.format === 'duration' && safe)
|
|
353
|
+
return { kind: 'number', text: sayDuration(n, formatLocale()), title: `${text} s` };
|
|
354
|
+
if (rule.format === 'richText')
|
|
355
|
+
return { kind: 'richText', html: text, text: richTextExcerpt(text) };
|
|
356
|
+
/* One item per line, said as a list; a text with no line in it is not one. */
|
|
357
|
+
if (rule.format === 'items') {
|
|
358
|
+
const items = text
|
|
359
|
+
.split(/\r?\n/)
|
|
360
|
+
.map((item) => item.trim())
|
|
361
|
+
.filter(Boolean);
|
|
362
|
+
if (items.length)
|
|
363
|
+
return { kind: 'items', items, text: items.join(', ') };
|
|
364
|
+
}
|
|
365
|
+
if (rule.format === 'relative') {
|
|
366
|
+
const said = formatRelativeDay(text);
|
|
367
|
+
/* Said from today only while it is near: "2 weeks ago" on a ledger hides the date an accountant needs, and
|
|
368
|
+
"6 months ago" is never what a due date is for. Past about two weeks the date is the text and the relative
|
|
369
|
+
phrase its tooltip. */
|
|
370
|
+
const days = daysFromToday(text);
|
|
371
|
+
/* Passed while its row is still open: drawn in the warning tone, however it is said. */
|
|
372
|
+
const overdue = rule.open === true && days !== null && days < 0 ? { overdue: true } : {};
|
|
373
|
+
if (said && days !== null && (rule.absolute || Math.abs(days) > NEAR_DAYS))
|
|
374
|
+
return { kind: 'relative', text: formatDate(text), title: said, ...overdue };
|
|
375
|
+
if (said)
|
|
376
|
+
return { kind: 'relative', text: said, title: text, ...overdue };
|
|
377
|
+
}
|
|
378
|
+
if (rule.avatar && text.trim())
|
|
379
|
+
return { kind: 'avatar', text, initials: initialsOf(text), hue: hueOf(text) };
|
|
380
|
+
return null;
|
|
381
|
+
}
|
|
382
|
+
const HEX = /^#[0-9a-f]{6}$|^#[0-9a-f]{3}$/i;
|
|
383
|
+
const CLOCK = /^(\d{1,2}):(\d{2})(?::\d{2}(?:\.\d+)?)?$/;
|
|
384
|
+
const MONTH = /^(\d{4})-(\d{2})(?:-\d{2})?/;
|
|
385
|
+
/**
|
|
386
|
+
* The formats that draw a value their own way: stars, a swatch, a day, a moment, a time of day, a month, a year, a
|
|
387
|
+
* JSON tree, a QR code. Undefined for any other format; null where the value is not one the format can draw, which is then said as
|
|
388
|
+
* itself, never guessed at.
|
|
389
|
+
*/
|
|
390
|
+
function ownDrawing(rule, value, text) {
|
|
391
|
+
switch (rule.format) {
|
|
392
|
+
case 'rating': {
|
|
393
|
+
const outOf = rule.outOf ?? 5;
|
|
394
|
+
const n = Number(value);
|
|
395
|
+
if (text.trim() === '' || !Number.isFinite(n))
|
|
396
|
+
return null;
|
|
397
|
+
const stars = Math.max(0, Math.min(outOf, Math.round(n)));
|
|
398
|
+
return { kind: 'rating', value: stars, outOf, tone: toneFor(rule, value, text), text: say('starsOf', { stars, outOf }) };
|
|
399
|
+
}
|
|
400
|
+
case 'color':
|
|
401
|
+
return HEX.test(text.trim()) ? { kind: 'color', hex: text.trim().toLowerCase(), text: text.trim() } : null;
|
|
402
|
+
case 'time': {
|
|
403
|
+
const m = CLOCK.exec(text.trim());
|
|
404
|
+
if (!m || Number(m[1]) > 23 || Number(m[2]) > 59)
|
|
405
|
+
return null;
|
|
406
|
+
const said = new Intl.DateTimeFormat(formatLocale(), { hour: 'numeric', minute: '2-digit', timeZone: 'UTC' }).format(Date.UTC(2000, 0, 1, Number(m[1]), Number(m[2])));
|
|
407
|
+
return { kind: 'number', text: said, title: text };
|
|
408
|
+
}
|
|
409
|
+
case 'month': {
|
|
410
|
+
const m = MONTH.exec(text.trim());
|
|
411
|
+
if (!m || Number(m[2]) < 1 || Number(m[2]) > 12)
|
|
412
|
+
return null;
|
|
413
|
+
const said = new Intl.DateTimeFormat(formatLocale(), { month: 'short', year: 'numeric', timeZone: 'UTC' }).format(Date.UTC(Number(m[1]), Number(m[2]) - 1, 1));
|
|
414
|
+
return { kind: 'number', text: said, title: text };
|
|
415
|
+
}
|
|
416
|
+
/* A day or a moment as itself, never from today: what a statement, a ledger or a log says (formatAbsolute). */
|
|
417
|
+
case 'date':
|
|
418
|
+
case 'datetime': {
|
|
419
|
+
if (typeof value !== 'string' || !text.trim())
|
|
420
|
+
return null;
|
|
421
|
+
const said = formatAbsolute(text, { time: rule.format === 'datetime', zone: rule.timezone });
|
|
422
|
+
return said === text ? null : { kind: 'date', text: said, title: text };
|
|
423
|
+
}
|
|
424
|
+
/* A year is a name, not a quantity: 2026, never "2,026". */
|
|
425
|
+
case 'year':
|
|
426
|
+
return /^\d{1,4}$/.test(text.trim()) ? { kind: 'number', text: text.trim(), title: text } : null;
|
|
427
|
+
case 'json': {
|
|
428
|
+
const source = typeof value === 'string' ? text : JSON.stringify(value);
|
|
429
|
+
let read;
|
|
430
|
+
try {
|
|
431
|
+
read = JSON.parse(source);
|
|
432
|
+
}
|
|
433
|
+
catch {
|
|
434
|
+
return null;
|
|
435
|
+
}
|
|
436
|
+
/* A tree is of an object or a list; a bare number or word is said as itself. */
|
|
437
|
+
if (!read || typeof read !== 'object')
|
|
438
|
+
return null;
|
|
439
|
+
return { kind: 'json', text: source, excerpt: source.replace(/\s+/g, ' ').slice(0, 120) };
|
|
440
|
+
}
|
|
441
|
+
case 'qr':
|
|
442
|
+
return text.trim() ? { kind: 'qr', text } : null;
|
|
443
|
+
}
|
|
444
|
+
return undefined;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* A date as paper says it: absolutely, the same words on any day and for any reader (formatAbsolute). A plain date
|
|
448
|
+
* column's value and a `relative` one's — which the screen says from today, true the day it is read and false every
|
|
449
|
+
* day after it is printed — are their day, a moment its day, time and zone; a midnight is the day it is, as sayValue
|
|
450
|
+
* reads it. Null for a value that is no date, or a column whose rule draws it another way (`date` and `datetime`
|
|
451
|
+
* already say it absolutely).
|
|
452
|
+
*/
|
|
453
|
+
export function sayAbsolute(col, value, rule) {
|
|
454
|
+
if (typeof value !== 'string' || !value.trim())
|
|
455
|
+
return null;
|
|
456
|
+
if (rule?.format && rule.format !== 'relative')
|
|
457
|
+
return null;
|
|
458
|
+
const type = (col?.type ?? '').toLowerCase();
|
|
459
|
+
const dated = rule?.format === 'relative' ||
|
|
460
|
+
/date|time/.test(type) ||
|
|
461
|
+
planColumn(col, col?.name ?? '', [{ [col?.name ?? '']: value }]).kind === 'date';
|
|
462
|
+
if (!dated)
|
|
463
|
+
return null;
|
|
464
|
+
const said = formatAbsolute(value, { time: !/[ T]00:00(:00(\.0+)?)?$/.test(value.trim()) });
|
|
465
|
+
return said === value ? null : said;
|
|
466
|
+
}
|
|
467
|
+
const OPAQUE = /^[A-Za-z0-9+/=_:.-]+$/;
|
|
468
|
+
/* A column whose name says it holds a year: `year`, `model_year`, `year_built`. */
|
|
469
|
+
const YEAR_NAME = /(^|_)(year|yr)(_|$)/i;
|
|
470
|
+
export function sayValue(col, value) {
|
|
471
|
+
const type = (col?.type ?? '').toLowerCase();
|
|
472
|
+
const text = String(value);
|
|
473
|
+
const plan = planColumn(col, col?.name ?? '', [{ [col?.name ?? '']: value }]);
|
|
474
|
+
if (plan.kind === 'boolean') {
|
|
475
|
+
const on = value === true || value === 1 || value === '1' || value === 't';
|
|
476
|
+
return { kind: 'boolean', on, title: text };
|
|
477
|
+
}
|
|
478
|
+
if (plan.kind === 'number' && Number.isFinite(Number(value))) {
|
|
479
|
+
const n = Number(value);
|
|
480
|
+
const overflow = typeof value === 'string' && /^-?\d+$/.test(value) && !Number.isSafeInteger(n);
|
|
481
|
+
/* The grid groups a column when any of its values reaches 10,000, a
|
|
482
|
+
reading one value cannot make: alone, 9495 the price and 2025 the year
|
|
483
|
+
look alike. So every figure is grouped but a year's, which a column's
|
|
484
|
+
name says, and 2025 reads 2025 on a page as it does in a row. Through
|
|
485
|
+
a path (`vehicle_id.year`) the name is its last hop's: the whole path
|
|
486
|
+
read "2,026". */
|
|
487
|
+
const shown = overflow
|
|
488
|
+
? formatNumber(text)
|
|
489
|
+
: plan.identifier
|
|
490
|
+
? text
|
|
491
|
+
: formatNumber(n, { maximumFractionDigits: 6, useGrouping: !YEAR_NAME.test((col?.name ?? '').split('.').pop() ?? '') });
|
|
492
|
+
return { kind: 'number', text: shown, title: shown === text ? undefined : text };
|
|
493
|
+
}
|
|
494
|
+
if (plan.kind === 'date' || /date|time/.test(type)) {
|
|
495
|
+
/* Postgres hands back an ISO wire format, precise and unreadable: shown
|
|
496
|
+
in the reader's words, a midnight as the day it is, the original kept
|
|
497
|
+
in the title. A midnight with a zone is an instant, not a day, as the grid reads it (columns.js). */
|
|
498
|
+
const midnight = /[ T]00:00(:00(\.0+)?)?$/.test(text);
|
|
499
|
+
/* An App says a near day from today, the rest as the date, and the whole of it on hover, as its grid does. */
|
|
500
|
+
const near = shellBody().classList.contains('app-mode') ? sayNearDay(text, !midnight) : null;
|
|
501
|
+
if (near)
|
|
502
|
+
return { kind: 'date', text: near.text, title: near.title };
|
|
503
|
+
const shown = midnight ? formatDate(text) : formatDateTime(text);
|
|
504
|
+
return { kind: 'date', text: shown, title: shown === text ? undefined : text };
|
|
505
|
+
}
|
|
506
|
+
/* Long text gets its own block; a value with a space is prose, one
|
|
507
|
+
without is a token. */
|
|
508
|
+
/* An unbroken run of key or ciphertext characters — base64, hex, a token
|
|
509
|
+
after its `ENC:` — is nothing to read and cannot wrap: it walled the
|
|
510
|
+
page. It is said by its start, the rest a click away. A key has digits
|
|
511
|
+
in it, and an address is a link to follow, not a key. */
|
|
512
|
+
if (text.length > 90 && OPAQUE.test(text) && /\d/.test(text) && !text.includes('://'))
|
|
513
|
+
return { kind: 'opaque', text, head: text.slice(0, 24) };
|
|
514
|
+
/* A text written on several lines is read as typed, one line per line — a checklist, an address — whatever its
|
|
515
|
+
length; drawn inline, its lines ran together. */
|
|
516
|
+
if (text.length > 90 || /\n/.test(text.trim()))
|
|
517
|
+
return { kind: 'long', text };
|
|
518
|
+
return { kind: 'text', text, prose: /\s/.test(text.trim()) };
|
|
519
|
+
}
|
|
520
|
+
const EMAIL = /^[^\s@<>()"',;:]+@[^\s@<>()"',;:]+\.[^\s@<>()"',;:]+$/;
|
|
521
|
+
const PHONE = /^\+?[\d\s().-]+$/;
|
|
522
|
+
const WEB = /^(https?:\/\/)?[\p{L}\p{N}-]+(\.[\p{L}\p{N}-]+)+(:\d+)?([/?#]\S*)?$/iu;
|
|
523
|
+
/* A column named like one of them, when no rule says: `email`, `work_email`,
|
|
524
|
+
`phone`, `mobile_number`, `website`, `homepage_url`. */
|
|
525
|
+
const NAMED = [
|
|
526
|
+
[/(^|_)e_?mail(_address)?$/i, 'email'],
|
|
527
|
+
[/(^|_)(phone|mobile|cell|telephone|tel)(_number|_no)?$/i, 'phone'],
|
|
528
|
+
[/(^|_)(url|website|web_site|homepage|home_page)$/i, 'url'],
|
|
529
|
+
];
|
|
530
|
+
/**
|
|
531
|
+
* A value as a link, when it is one: a rule's `format: 'email' | 'phone' |
|
|
532
|
+
* 'url'`, or — where `infer` (an App) — a column named like one. Only a
|
|
533
|
+
* value of the right shape is linked, so a note typed into an email column
|
|
534
|
+
* stays text, and only https and http open: a column cannot hand the page a
|
|
535
|
+
* `javascript:` address. The Workbench shows the data exactly and infers
|
|
536
|
+
* nothing.
|
|
537
|
+
*/
|
|
538
|
+
export function linkFor(column, value, rule, infer = false) {
|
|
539
|
+
if (value === null || value === undefined || typeof value === 'object')
|
|
540
|
+
return null;
|
|
541
|
+
const text = String(value).trim();
|
|
542
|
+
if (!text)
|
|
543
|
+
return null;
|
|
544
|
+
const format = rule?.format;
|
|
545
|
+
const name = column?.split('.').pop() ?? '';
|
|
546
|
+
const kind = format === 'email' || format === 'phone' || format === 'url'
|
|
547
|
+
? format
|
|
548
|
+
: infer && !format
|
|
549
|
+
? NAMED.find(([pattern]) => pattern.test(name))?.[1]
|
|
550
|
+
: undefined;
|
|
551
|
+
if (kind === 'email' && EMAIL.test(text))
|
|
552
|
+
return { kind, href: `mailto:${text}`, text };
|
|
553
|
+
if (kind === 'phone' && PHONE.test(text) && text.replace(/\D/g, '').length >= 5)
|
|
554
|
+
return { kind, href: `tel:${text.replace(/[^\d+]/g, '')}`, text };
|
|
555
|
+
if (kind === 'url' && WEB.test(text)) {
|
|
556
|
+
const href = /^https?:\/\//i.test(text) ? text : `https://${text}`;
|
|
557
|
+
return { kind, href, text: text.replace(/^https?:\/\//i, '').replace(/\/$/, '') };
|
|
558
|
+
}
|
|
559
|
+
return null;
|
|
560
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A value renderer where a display rule stands: the author's component draws
|
|
3
|
+
* one value in a grid cell, a record field or a card, and only draws it —
|
|
4
|
+
* sort, filter, totals, export and search keep the raw value, and the
|
|
5
|
+
* Workbench never runs one.
|
|
6
|
+
*
|
|
7
|
+
* A cell never waits for one. The value is drawn the platform's way (the
|
|
8
|
+
* `fallback`) until the module has arrived, the first draw that names it
|
|
9
|
+
* having asked for it; then every slot showing it redraws once. A renderer
|
|
10
|
+
* that throws draws that value the platform's way from then on, said once in
|
|
11
|
+
* the console. Small and in the first chunk, since Value and Grid use it; the
|
|
12
|
+
* loading itself is the shell's (shellMode.ts `components`: in an App,
|
|
13
|
+
* sdk/componentLoader.ts, with the page's side of the SDK, a chunk of its
|
|
14
|
+
* own), and the slot is the kit's one (componentSlot.tsx).
|
|
15
|
+
*/
|
|
16
|
+
import type { ReactNode } from 'react';
|
|
17
|
+
/** What a value renderer receives: `ValueProps` in packages/mistri/schema/ui.d.ts. */
|
|
18
|
+
interface ValueRendererProps {
|
|
19
|
+
value: unknown;
|
|
20
|
+
row?: Record<string, unknown>;
|
|
21
|
+
column: {
|
|
22
|
+
name: string;
|
|
23
|
+
resource: string;
|
|
24
|
+
};
|
|
25
|
+
context: 'grid' | 'record' | 'card';
|
|
26
|
+
compact: boolean;
|
|
27
|
+
/** The tone the column's display rule gives this value, and the word it says it as (valueModel's ruleSays). */
|
|
28
|
+
tone?: string;
|
|
29
|
+
word?: string;
|
|
30
|
+
}
|
|
31
|
+
/** One value, drawn by the renderer `id` once it is here, and by `fallback` until then (or for good, if it cannot be). */
|
|
32
|
+
export declare function ValueSlot({ id, fallback, ...props }: ValueRendererProps & {
|
|
33
|
+
id: string;
|
|
34
|
+
fallback: ReactNode;
|
|
35
|
+
}): import("react").JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { shell } from '../shellMode.js';
|
|
3
|
+
import { componentSlot } from './componentSlot.js';
|
|
4
|
+
const Slot = componentSlot({
|
|
5
|
+
className: 'custom-value',
|
|
6
|
+
load: (id) => shell().components.load(id),
|
|
7
|
+
couldNotLoad: (id, error) => console.error(`the value renderer "${id}" could not be loaded; its values are drawn plain.`, error),
|
|
8
|
+
threw: (id, error) => console.error(`the value renderer "${id}" threw; its values are drawn plain.`, error),
|
|
9
|
+
});
|
|
10
|
+
/** One value, drawn by the renderer `id` once it is here, and by `fallback` until then (or for good, if it cannot be). */
|
|
11
|
+
export function ValueSlot({ id, fallback, ...props }) {
|
|
12
|
+
return _jsx(Slot, { id: id, fallback: fallback, props: props });
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a call to action that names one of the App's views goes, as a link
|
|
3
|
+
* a reader can also open in a new tab. A list or a dashboard the App serves
|
|
4
|
+
* this reader is followed in place, through the walk, and so is a signed-in
|
|
5
|
+
* form, which is a room of its own (`form-<key>`). A public form is not
|
|
6
|
+
* among those — it is served at its own address, outside the App — so its
|
|
7
|
+
* link is that address. A list's link is its key, `/thread/board`, and a
|
|
8
|
+
* dashboard's its own, `/compass/sales-dashboard`: the address bar's once
|
|
9
|
+
* followed (publicAddress.ts).
|
|
10
|
+
*/
|
|
11
|
+
import type { MouseEvent } from 'react';
|
|
12
|
+
import { go } from '../core.js';
|
|
13
|
+
export interface ViewLink {
|
|
14
|
+
href: string;
|
|
15
|
+
onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
16
|
+
}
|
|
17
|
+
/** A list, dashboard or signed-in form this reader is served, by key. `adding` opens a list with its New form over it (`…!new`). */
|
|
18
|
+
export declare function viewLink(key: string, mode?: 'push' | 'reset', adding?: boolean): ViewLink | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* One of the App's lists on a refinement of its rows, as a dashboard group opens it: the list's own parameter where
|
|
21
|
+
* it offers the column as a filter (`?status=approved`), `q=` for what those cannot say. Undefined for a key this
|
|
22
|
+
* reader is served no list under, so a caller never falls back to the table's raw rows.
|
|
23
|
+
*/
|
|
24
|
+
export declare function listEntry(key: string, query: string): Parameters<typeof go>[0] | undefined;
|
|
25
|
+
export declare function listLink(key: string, query: string): ViewLink | undefined;
|
|
26
|
+
/** A public form's own page: `/{app}/form/{key}`. */
|
|
27
|
+
export declare function formLink(key: string): ViewLink;
|