@ahoo-wang/wow-view-engine 10.0.0-beta.1 → 10.0.0-beta.2
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/{actions-ClYpI7gy.js → actions-CThpS7Yj.js} +2790 -2761
- package/dist/actions-CThpS7Yj.js.map +1 -0
- package/dist/analysis/buckets.d.ts.map +1 -1
- package/dist/analysis/columns.d.ts +192 -0
- package/dist/analysis/columns.d.ts.map +1 -0
- package/dist/analysis/index.d.ts +1 -0
- package/dist/analysis/index.d.ts.map +1 -1
- package/dist/analysis/project.d.ts +2 -152
- package/dist/analysis/project.d.ts.map +1 -1
- package/dist/capabilities/analysis.d.ts.map +1 -1
- package/dist/capabilities/cache.d.ts +13 -0
- package/dist/capabilities/cache.d.ts.map +1 -1
- package/dist/capabilities/fields.d.ts +3 -17
- package/dist/capabilities/fields.d.ts.map +1 -1
- package/dist/capabilities/semantic.d.ts +24 -0
- package/dist/capabilities/semantic.d.ts.map +1 -0
- package/dist/dashboard/index.d.ts +1 -0
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/layout.d.ts +8 -40
- package/dist/dashboard/layout.d.ts.map +1 -1
- package/dist/dashboard/reorder.d.ts +43 -0
- package/dist/dashboard/reorder.d.ts.map +1 -0
- package/dist/dashboard/shape.d.ts +8 -0
- package/dist/dashboard/shape.d.ts.map +1 -0
- package/dist/dashboard/tabs.d.ts.map +1 -1
- package/dist/dashboard/validate.d.ts.map +1 -1
- package/dist/dashboard/validateContent.d.ts +3 -0
- package/dist/dashboard/validateContent.d.ts.map +1 -0
- package/dist/dashboard/validateFilters.d.ts.map +1 -1
- package/dist/{export-D1udIJPm.js → export-D6bnNjrA.js} +2 -2
- package/dist/{export-D1udIJPm.js.map → export-D6bnNjrA.js.map} +1 -1
- package/dist/filter/kinds/dateTime.d.ts.map +1 -1
- package/dist/filter/time.d.ts.map +1 -1
- package/dist/index.d.ts +10 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +212 -177
- package/dist/index.js.map +1 -1
- package/dist/model/cartesian.d.ts +132 -0
- package/dist/model/cartesian.d.ts.map +1 -0
- package/dist/model/chart.d.ts +1 -130
- package/dist/model/chart.d.ts.map +1 -1
- package/dist/model/currency.d.ts +1 -1
- package/dist/model/currency.d.ts.map +1 -1
- package/dist/model/definition.d.ts +9 -0
- package/dist/model/definition.d.ts.map +1 -1
- package/dist/model/field.d.ts +3 -142
- package/dist/model/field.d.ts.map +1 -1
- package/dist/model/fieldNumeric.d.ts +78 -0
- package/dist/model/fieldNumeric.d.ts.map +1 -0
- package/dist/model/fieldTemporal.d.ts +68 -0
- package/dist/model/fieldTemporal.d.ts.map +1 -0
- package/dist/model/index.d.ts +3 -0
- package/dist/model/index.d.ts.map +1 -1
- package/dist/react/actionRunner.d.ts +9 -0
- package/dist/react/actionRunner.d.ts.map +1 -1
- package/dist/react/filterTree.d.ts +109 -0
- package/dist/react/filterTree.d.ts.map +1 -0
- package/dist/react/followUp.d.ts +105 -0
- package/dist/react/followUp.d.ts.map +1 -0
- package/dist/react/index.d.ts +6 -3
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/rulesClock.d.ts +20 -0
- package/dist/react/rulesClock.d.ts.map +1 -0
- package/dist/react/useAnalysisResult.d.ts +1 -80
- package/dist/react/useAnalysisResult.d.ts.map +1 -1
- package/dist/react/useFilterEditor.d.ts +24 -108
- package/dist/react/useFilterEditor.d.ts.map +1 -1
- package/dist/react/useRecordActions.d.ts +24 -1
- package/dist/react/useRecordActions.d.ts.map +1 -1
- package/dist/react/useRecordDetail.d.ts.map +1 -1
- package/dist/react/useRecordExport.d.ts.map +1 -1
- package/dist/react/useRecordTable.d.ts +6 -0
- package/dist/react/useRecordTable.d.ts.map +1 -1
- package/dist/react/useSaveCommands.d.ts +5 -0
- package/dist/react/useSaveCommands.d.ts.map +1 -1
- package/dist/react/useSearchBox.d.ts.map +1 -1
- package/dist/react/useStale.d.ts +24 -0
- package/dist/react/useStale.d.ts.map +1 -0
- package/dist/react/useWorkbench.d.ts +3 -61
- package/dist/react/useWorkbench.d.ts.map +1 -1
- package/dist/react/workbench/handOver.d.ts +1 -1
- package/dist/react/workbench/handOver.d.ts.map +1 -1
- package/dist/react/workbench/heldView.d.ts +112 -0
- package/dist/react/workbench/heldView.d.ts.map +1 -0
- package/dist/react/workbench/instanceSync.d.ts +5 -1
- package/dist/react/workbench/instanceSync.d.ts.map +1 -1
- package/dist/react/workbench/switching.d.ts +29 -0
- package/dist/react/workbench/switching.d.ts.map +1 -0
- package/dist/react-0RrtrG7t.js +4316 -0
- package/dist/react-0RrtrG7t.js.map +1 -0
- package/dist/react.js +1 -1
- package/dist/record/compile.d.ts +3 -1
- package/dist/record/compile.d.ts.map +1 -1
- package/dist/record/index.d.ts +1 -0
- package/dist/record/index.d.ts.map +1 -1
- package/dist/record/kanban.d.ts.map +1 -1
- package/dist/record/path.d.ts +10 -0
- package/dist/record/path.d.ts.map +1 -1
- package/dist/record/project.d.ts +9 -66
- package/dist/record/project.d.ts.map +1 -1
- package/dist/record/summaries.d.ts +68 -0
- package/dist/record/summaries.d.ts.map +1 -0
- package/dist/runtime/actions.d.ts +16 -0
- package/dist/runtime/actions.d.ts.map +1 -1
- package/dist/runtime/autoApply.d.ts +17 -2
- package/dist/runtime/autoApply.d.ts.map +1 -1
- package/dist/runtime/capabilities.d.ts +15 -1
- package/dist/runtime/capabilities.d.ts.map +1 -1
- package/dist/runtime/commandChecks.d.ts +8 -4
- package/dist/runtime/commandChecks.d.ts.map +1 -1
- package/dist/runtime/dashboard/commands.d.ts +3 -1
- package/dist/runtime/dashboard/commands.d.ts.map +1 -1
- package/dist/runtime/dashboard/editing.d.ts +10 -1
- package/dist/runtime/dashboard/editing.d.ts.map +1 -1
- package/dist/runtime/dashboard/history.d.ts +8 -0
- package/dist/runtime/dashboard/history.d.ts.map +1 -1
- package/dist/runtime/dashboard/panelSync.d.ts +57 -0
- package/dist/runtime/dashboard/panelSync.d.ts.map +1 -0
- package/dist/runtime/dashboardRuntime.d.ts +3 -20
- package/dist/runtime/dashboardRuntime.d.ts.map +1 -1
- package/dist/runtime/datasetResources.d.ts +29 -1
- package/dist/runtime/datasetResources.d.ts.map +1 -1
- package/dist/runtime/define/spec.d.ts +2 -1
- package/dist/runtime/define/spec.d.ts.map +1 -1
- package/dist/runtime/generations.d.ts +89 -0
- package/dist/runtime/generations.d.ts.map +1 -0
- package/dist/runtime/instanceWrites.d.ts.map +1 -1
- package/dist/runtime/panelViews.d.ts.map +1 -1
- package/dist/runtime/preferences.d.ts +37 -11
- package/dist/runtime/preferences.d.ts.map +1 -1
- package/dist/runtime/recordRuntime.d.ts +13 -0
- package/dist/runtime/recordRuntime.d.ts.map +1 -1
- package/dist/runtime/restyle.d.ts +17 -12
- package/dist/runtime/restyle.d.ts.map +1 -1
- package/dist/runtime/summaries.d.ts +16 -2
- package/dist/runtime/summaries.d.ts.map +1 -1
- package/dist/runtime/tabMemory.d.ts +11 -4
- package/dist/runtime/tabMemory.d.ts.map +1 -1
- package/dist/runtime/validateDefinition.d.ts.map +1 -1
- package/dist/runtime/validateSystemViews.d.ts +10 -0
- package/dist/runtime/validateSystemViews.d.ts.map +1 -0
- package/dist/runtime/viewEngine.d.ts +4 -5
- package/dist/runtime/viewEngine.d.ts.map +1 -1
- package/dist/runtime/viewOpening.d.ts +30 -0
- package/dist/runtime/viewOpening.d.ts.map +1 -0
- package/dist/runtime/viewRuntime.d.ts +3 -1
- package/dist/runtime/viewRuntime.d.ts.map +1 -1
- package/dist/runtime/viewRuntimeTypes.d.ts +29 -3
- package/dist/runtime/viewRuntimeTypes.d.ts.map +1 -1
- package/dist/runtime/write.d.ts +11 -0
- package/dist/runtime/write.d.ts.map +1 -1
- package/dist/runtime/writeEffects.d.ts +16 -0
- package/dist/runtime/writeEffects.d.ts.map +1 -0
- package/dist/runtime/writeLedger.d.ts +13 -12
- package/dist/runtime/writeLedger.d.ts.map +1 -1
- package/dist/store/MemoryViewStore.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/testing/filter.d.ts +13 -5
- package/dist/testing/filter.d.ts.map +1 -1
- package/dist/testing/source.d.ts +8 -0
- package/dist/testing/source.d.ts.map +1 -1
- package/dist/testing.js +60 -61
- package/dist/testing.js.map +1 -1
- package/dist/theme-check.mjs +206 -222
- package/dist/theme-source.css +265 -109
- package/dist/theme-tokens.json +293 -441
- package/dist/themes/contrast.css +12 -12
- package/dist/themes.css +12 -276
- package/dist/ui/DashboardWorkbench.d.ts +2 -2
- package/dist/ui/DataWorkbench.d.ts +2 -2
- package/dist/ui/ViewHost.d.ts +11 -1
- package/dist/ui/ViewHost.d.ts.map +1 -1
- package/dist/ui/actions/ActionButtons.d.ts +7 -1
- package/dist/ui/actions/ActionButtons.d.ts.map +1 -1
- package/dist/ui/actions/ActionDialog.d.ts.map +1 -1
- package/dist/ui/actions/ActionSurface.d.ts.map +1 -1
- package/dist/ui/actions/BulkStatus.d.ts.map +1 -1
- package/dist/ui/analysis/DimensionCard.d.ts.map +1 -1
- package/dist/ui/analysis/DisplayTab.d.ts.map +1 -1
- package/dist/ui/analysis/ElementsSlot.d.ts.map +1 -1
- package/dist/ui/analysis/HavingRows.d.ts.map +1 -1
- package/dist/ui/analysis/MetricSlot.d.ts.map +1 -1
- package/dist/ui/analysis/RangeSlot.d.ts.map +1 -1
- package/dist/ui/analysis/TopRow.d.ts.map +1 -1
- package/dist/ui/analysis/cartesianSpec.d.ts +1 -1
- package/dist/ui/analysis/exportOffer.d.ts.map +1 -1
- package/dist/ui/charts/EChart.d.ts +5 -7
- package/dist/ui/charts/EChart.d.ts.map +1 -1
- package/dist/ui/charts/MetricCard.d.ts.map +1 -1
- package/dist/ui/charts/PieSlices.d.ts.map +1 -1
- package/dist/ui/charts/candlestickOption.d.ts +1 -1
- package/dist/ui/charts/cartesianPlan.d.ts +0 -30
- package/dist/ui/charts/cartesianPlan.d.ts.map +1 -1
- package/dist/ui/charts/cartesianStacks.d.ts +36 -0
- package/dist/ui/charts/cartesianStacks.d.ts.map +1 -0
- package/dist/ui/charts/cartesianTooltip.d.ts.map +1 -1
- package/dist/ui/charts/pieOption.d.ts +10 -0
- package/dist/ui/charts/pieOption.d.ts.map +1 -1
- package/dist/ui/charts/theme.d.ts +35 -12
- package/dist/ui/charts/theme.d.ts.map +1 -1
- package/dist/ui/charts/waterfallOption.d.ts +4 -3
- package/dist/ui/charts/waterfallOption.d.ts.map +1 -1
- package/dist/ui/columns/ColumnRegion.d.ts +27 -0
- package/dist/ui/columns/ColumnRegion.d.ts.map +1 -0
- package/dist/ui/columns/ColumnSettings.d.ts.map +1 -1
- package/dist/ui/dashboard/DashboardPanelCard.d.ts.map +1 -1
- package/dist/ui/dashboard/FilterSheet.d.ts.map +1 -1
- package/dist/ui/dashboard/FilterWiring.d.ts.map +1 -1
- package/dist/ui/dashboard/PanelHeader.d.ts +18 -0
- package/dist/ui/dashboard/PanelHeader.d.ts.map +1 -0
- package/dist/ui/dashboard/gridWidth.d.ts +6 -0
- package/dist/ui/dashboard/gridWidth.d.ts.map +1 -1
- package/dist/ui/embed/EmbeddedAnalysis.d.ts.map +1 -1
- package/dist/ui/embed/EmbeddedRecord.d.ts.map +1 -1
- package/dist/ui/filter/AppliedBar.d.ts.map +1 -1
- package/dist/ui/filter/ConditionPill.d.ts.map +1 -1
- package/dist/ui/filter/NestedPredicate.d.ts +23 -0
- package/dist/ui/filter/NestedPredicate.d.ts.map +1 -0
- package/dist/ui/filter/inputs/number.d.ts +1 -1
- package/dist/ui/filter/inputs/number.d.ts.map +1 -1
- package/dist/ui/filter/inputs/shared.d.ts +1 -1
- package/dist/ui/filter/inputs/shared.d.ts.map +1 -1
- package/dist/ui/index.d.ts +3 -2
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/kit/DragHandle.d.ts +7 -1
- package/dist/ui/kit/DragHandle.d.ts.map +1 -1
- package/dist/ui/kit/IconButton.d.ts +10 -1
- package/dist/ui/kit/IconButton.d.ts.map +1 -1
- package/dist/ui/kit/PendingDot.d.ts +2 -1
- package/dist/ui/kit/PendingDot.d.ts.map +1 -1
- package/dist/ui/kit/alerts.d.ts.map +1 -1
- package/dist/ui/kit/characterKeys.d.ts +10 -0
- package/dist/ui/kit/characterKeys.d.ts.map +1 -0
- package/dist/ui/kit/display.d.ts +0 -31
- package/dist/ui/kit/display.d.ts.map +1 -1
- package/dist/ui/kit/displayTime.d.ts +58 -0
- package/dist/ui/kit/displayTime.d.ts.map +1 -0
- package/dist/ui/kit/frames.d.ts +233 -0
- package/dist/ui/kit/frames.d.ts.map +1 -0
- package/dist/ui/kit/keptFocus.d.ts +35 -0
- package/dist/ui/kit/keptFocus.d.ts.map +1 -0
- package/dist/ui/kit/pills.d.ts +70 -0
- package/dist/ui/kit/pills.d.ts.map +1 -0
- package/dist/ui/kit/popupLayer.d.ts +160 -0
- package/dist/ui/kit/popupLayer.d.ts.map +1 -0
- package/dist/ui/kit/popups.d.ts +20 -3
- package/dist/ui/kit/popups.d.ts.map +1 -1
- package/dist/ui/kit/presets.d.ts +1 -5
- package/dist/ui/kit/presets.d.ts.map +1 -1
- package/dist/ui/kit/stale.d.ts +30 -0
- package/dist/ui/kit/stale.d.ts.map +1 -0
- package/dist/ui/kit/variants.d.ts +11 -313
- package/dist/ui/kit/variants.d.ts.map +1 -1
- package/dist/ui/manage/ViewManager.d.ts.map +1 -1
- package/dist/ui/manage/ViewManagerRow.d.ts.map +1 -1
- package/dist/ui/messages/actions.d.ts +1 -0
- package/dist/ui/messages/actions.d.ts.map +1 -1
- package/dist/ui/messages/analysis.d.ts +1 -438
- package/dist/ui/messages/analysis.d.ts.map +1 -1
- package/dist/ui/messages/chart.d.ts +257 -0
- package/dist/ui/messages/chart.d.ts.map +1 -0
- package/dist/ui/messages/chartIssues.d.ts +95 -0
- package/dist/ui/messages/chartIssues.d.ts.map +1 -0
- package/dist/ui/messages/chartReading.d.ts +112 -0
- package/dist/ui/messages/chartReading.d.ts.map +1 -0
- package/dist/ui/messages/definition.d.ts +2 -0
- package/dist/ui/messages/definition.d.ts.map +1 -1
- package/dist/ui/messages/en.d.ts +413 -409
- package/dist/ui/messages/en.d.ts.map +1 -1
- package/dist/ui/messages/save.d.ts +1 -0
- package/dist/ui/messages/save.d.ts.map +1 -1
- package/dist/ui/messages/view.d.ts +1 -1
- package/dist/ui/messages/view.d.ts.map +1 -1
- package/dist/ui/messages/zh-CN/actions.d.ts +33 -0
- package/dist/ui/messages/zh-CN/actions.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/analysis.d.ts +286 -0
- package/dist/ui/messages/zh-CN/analysis.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/building.d.ts +64 -0
- package/dist/ui/messages/zh-CN/building.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/bulk.d.ts +28 -0
- package/dist/ui/messages/zh-CN/bulk.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/capabilities.d.ts +42 -0
- package/dist/ui/messages/zh-CN/capabilities.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/chart.d.ts +256 -0
- package/dist/ui/messages/zh-CN/chart.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/chartIssues.d.ts +96 -0
- package/dist/ui/messages/zh-CN/chartIssues.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/chartReading.d.ts +112 -0
- package/dist/ui/messages/zh-CN/chartReading.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/clicks.d.ts +85 -0
- package/dist/ui/messages/zh-CN/clicks.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/config.d.ts +17 -0
- package/dist/ui/messages/zh-CN/config.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/dashboard.d.ts +316 -0
- package/dist/ui/messages/zh-CN/dashboard.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/datasets.d.ts +15 -0
- package/dist/ui/messages/zh-CN/datasets.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/definition.d.ts +78 -0
- package/dist/ui/messages/zh-CN/definition.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/embed.d.ts +13 -0
- package/dist/ui/messages/zh-CN/embed.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/export.d.ts +46 -0
- package/dist/ui/messages/zh-CN/export.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/filter.d.ts +269 -0
- package/dist/ui/messages/zh-CN/filter.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/filters.d.ts +80 -0
- package/dist/ui/messages/zh-CN/filters.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/header.d.ts +25 -0
- package/dist/ui/messages/zh-CN/header.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/manage.d.ts +46 -0
- package/dist/ui/messages/zh-CN/manage.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/record.d.ts +205 -0
- package/dist/ui/messages/zh-CN/record.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/refresh.d.ts +17 -0
- package/dist/ui/messages/zh-CN/refresh.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/render.d.ts +12 -0
- package/dist/ui/messages/zh-CN/render.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/reorder.d.ts +14 -0
- package/dist/ui/messages/zh-CN/reorder.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/save.d.ts +62 -0
- package/dist/ui/messages/zh-CN/save.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/scope.d.ts +27 -0
- package/dist/ui/messages/zh-CN/scope.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/status.d.ts +36 -0
- package/dist/ui/messages/zh-CN/status.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/view.d.ts +175 -0
- package/dist/ui/messages/zh-CN/view.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/workbench.d.ts +18 -0
- package/dist/ui/messages/zh-CN/workbench.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN.d.ts +4 -0
- package/dist/ui/messages/zh-CN.d.ts.map +1 -1
- package/dist/ui/record/DetailStructure.d.ts.map +1 -1
- package/dist/ui/record/RecordCards.d.ts +3 -1
- package/dist/ui/record/RecordCards.d.ts.map +1 -1
- package/dist/ui/record/RecordDetail.d.ts.map +1 -1
- package/dist/ui/record/RecordKanban.d.ts +3 -1
- package/dist/ui/record/RecordKanban.d.ts.map +1 -1
- package/dist/ui/record/RecordTable.d.ts +6 -1
- package/dist/ui/record/RecordTable.d.ts.map +1 -1
- package/dist/ui/record/RowCheckbox.d.ts.map +1 -1
- package/dist/ui/record/SortableHeader.d.ts.map +1 -1
- package/dist/ui/record/cells.d.ts.map +1 -1
- package/dist/ui/record/exportOffer.d.ts.map +1 -1
- package/dist/ui/sort/SortSettings.d.ts.map +1 -1
- package/dist/ui/sort/SortSummary.d.ts +73 -0
- package/dist/ui/sort/SortSummary.d.ts.map +1 -0
- package/dist/ui/theme/entry.d.ts +223 -0
- package/dist/ui/theme/entry.d.ts.map +1 -0
- package/dist/ui/theme/pairs.d.ts +1 -12
- package/dist/ui/theme/pairs.d.ts.map +1 -1
- package/dist/ui/theme/tokens.d.ts +152 -215
- package/dist/ui/theme/tokens.d.ts.map +1 -1
- package/dist/ui/workbench/AnalysisParts.d.ts.map +1 -1
- package/dist/ui/workbench/OpenViewColumn.d.ts +28 -0
- package/dist/ui/workbench/OpenViewColumn.d.ts.map +1 -0
- package/dist/ui/workbench/OpeningSkeleton.d.ts.map +1 -1
- package/dist/ui/workbench/RecordParts.d.ts.map +1 -1
- package/dist/ui/workbench/SaveActions.d.ts.map +1 -1
- package/dist/ui/workbench/SearchBox.d.ts.map +1 -1
- package/dist/ui/workbench/Sidebar.d.ts.map +1 -1
- package/dist/ui/workbench/TitleBar.d.ts.map +1 -1
- package/dist/ui/workbench/ViewEngineProvider.d.ts +3 -1
- package/dist/ui/workbench/ViewEngineProvider.d.ts.map +1 -1
- package/dist/ui/workbench/ViewList.d.ts.map +1 -1
- package/dist/ui/workbench/WorkbenchShell.d.ts +6 -9
- package/dist/ui/workbench/WorkbenchShell.d.ts.map +1 -1
- package/dist/ui/workbench/useSidebarFold.d.ts +16 -27
- package/dist/ui/workbench/useSidebarFold.d.ts.map +1 -1
- package/dist/ui/workbench/useWorkbenchFolds.d.ts +1 -1
- package/dist/ui/workbench/useWorkbenchFolds.d.ts.map +1 -1
- package/dist/ui.js +13546 -13332
- package/dist/ui.js.map +1 -1
- package/dist/{viewRuntimeTypes-D08oR6Ke.js → viewEngine-DL-S0OAZ.js} +1962 -1662
- package/dist/viewEngine-DL-S0OAZ.js.map +1 -0
- package/package.json +18 -18
- package/dist/actions-ClYpI7gy.js.map +0 -1
- package/dist/react-Cqk337ck.js +0 -4202
- package/dist/react-Cqk337ck.js.map +0 -1
- package/dist/themes/azure.css +0 -126
- package/dist/themes/porcelain.css +0 -136
- package/dist/viewRuntimeTypes-D08oR6Ke.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as e, $
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { TimeUnit as
|
|
1
|
+
import { $ as e, $r as t, A as n, Ao as r, Ar as i, Ba as a, Ci as o, D as s, Do as c, Fa as l, Ia as u, Io as d, Ja as f, Ka as p, Lr as m, No as h, O as g, Q as _, Ra as v, T as y, To as ee, Ua as te, Wa as ne, Xa as re, Xr as b, Yr as x, Za as ie, Zi as ae, _i as oe, ao as S, bo as se, c as ce, eo as C, et as le, fo as w, gt as ue, ia as de, in as fe, io as pe, k as me, kn as he, ko as T, mo as ge, n as _e, nt as ve, oo as ye, qa as E, qr as D, ro as O, sn as k, so as A, to as j, tt as M, ui as N } from "./actions-CThpS7Yj.js";
|
|
2
|
+
import { K as P, Q as be, U as xe, V as Se, X as Ce, Z as we, d as Te, g as Ee, h as De, i as Oe, m as ke, o as Ae, ot as je, r as Me, st as Ne, t as Pe } from "./viewEngine-DL-S0OAZ.js";
|
|
3
|
+
import { t as Fe } from "./export-D6bnNjrA.js";
|
|
4
|
+
import { TimeUnit as Ie } from "@ahoo-wang/wow-client/dsl";
|
|
5
5
|
// src/runtime/define/analysis.ts
|
|
6
|
-
function
|
|
6
|
+
function Le(e, t) {
|
|
7
7
|
if (e === !1) return;
|
|
8
8
|
let n = (e) => e.spec.analysis === !1 ? null : e.spec.analysis ?? {}, r = {
|
|
9
9
|
spec: e ?? {},
|
|
@@ -25,38 +25,38 @@ function Me(e, t) {
|
|
|
25
25
|
}
|
|
26
26
|
return r;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
if (
|
|
28
|
+
function Re(t, n, r, i) {
|
|
29
|
+
if (t) return e(t, n.map((e) => e.field), r, (e, t) => i.push(e === null ? v("definition.analysis.wider", ["analysis"], { what: t }, "warning") : v("definition.field.analysis-wider", ["analysis"], {
|
|
30
30
|
field: e,
|
|
31
31
|
what: t
|
|
32
32
|
}, "warning")));
|
|
33
33
|
}
|
|
34
34
|
// src/runtime/define/fields.ts
|
|
35
|
-
var
|
|
36
|
-
function
|
|
35
|
+
var F = (e, t, n = "error") => v(e, ["fields"], t, n);
|
|
36
|
+
function I(e, t, n) {
|
|
37
37
|
return Object.entries(e).flatMap(([e, r]) => {
|
|
38
|
-
let i =
|
|
38
|
+
let i = ze(e, typeof r == "string" ? { label: r } : r, t, n);
|
|
39
39
|
return i ? [i] : [];
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function ze(e, t, n, r) {
|
|
43
43
|
let { descriptor: i, findings: a } = r, o = n === void 0 ? e : `${n}.${e}`;
|
|
44
|
-
if (t.search) return
|
|
45
|
-
let s =
|
|
46
|
-
if (!s) return a.push(
|
|
47
|
-
let c =
|
|
48
|
-
if (l === null) return a.push(
|
|
44
|
+
if (t.search) return Be(e, t, n, r);
|
|
45
|
+
let s = M(i, o, n);
|
|
46
|
+
if (!s) return a.push(F("definition.field.undescribed", { field: o })), null;
|
|
47
|
+
let c = Ve(i, s.canonical ?? o, n), l = t.kind ?? We(c, s, t);
|
|
48
|
+
if (l === null) return a.push(F("definition.field.kind-unknown", { field: o })), null;
|
|
49
49
|
let u = {
|
|
50
50
|
name: e,
|
|
51
|
-
label:
|
|
51
|
+
label: Ge(t, c, o, a),
|
|
52
52
|
kind: l
|
|
53
|
-
}, d = s.comparable !== !1, f = d && (r.paging === "cursor" ? s.sort.cursor : s.sort.paged), p =
|
|
53
|
+
}, d = s.comparable !== !1, f = d && (r.paging === "cursor" ? s.sort.cursor : s.sort.paged), p = de({
|
|
54
54
|
kind: l,
|
|
55
55
|
remote: t.more?.remote
|
|
56
56
|
}), m = f && n === void 0 && !p;
|
|
57
|
-
if (t.sortable === !0 && !f && a.push(
|
|
58
|
-
let e =
|
|
59
|
-
for (let n of t.operators) e.has(n) || a.push(
|
|
57
|
+
if (t.sortable === !0 && !f && a.push(F("definition.field.sort-wider", { field: o }, "warning")), f && (t.sortable ?? m) && (u.sortable = !0), t.operators) {
|
|
58
|
+
let e = Ke(i, s, o);
|
|
59
|
+
for (let n of t.operators) e.has(n) || a.push(F("definition.field.operator-wider", {
|
|
60
60
|
field: o,
|
|
61
61
|
operator: n
|
|
62
62
|
}, "warning"));
|
|
@@ -64,21 +64,21 @@ function Pe(e, t, n, r) {
|
|
|
64
64
|
} else d || (u.operators = []);
|
|
65
65
|
if (t.summary) {
|
|
66
66
|
let e = s.aggregate?.functions ?? [];
|
|
67
|
-
for (let n of t.summary) n !==
|
|
67
|
+
for (let n of t.summary) n !== se.COUNT && !e.includes(n) && a.push(F("definition.field.summary-wider", {
|
|
68
68
|
field: o,
|
|
69
69
|
fn: n
|
|
70
70
|
}, "warning"));
|
|
71
71
|
u.summary = t.summary;
|
|
72
72
|
}
|
|
73
|
-
let h =
|
|
73
|
+
let h = qe(t, s, o, a);
|
|
74
74
|
h && (u.options = h);
|
|
75
|
-
let g =
|
|
76
|
-
g &&
|
|
75
|
+
let g = Ue(s);
|
|
76
|
+
g && ae.includes(l) && (u.temporal = g), s.deprecated && (t.deprecated || a.push(F("definition.field.deprecated", {
|
|
77
77
|
field: o,
|
|
78
78
|
message: s.deprecated.message ?? ""
|
|
79
79
|
}, "warning")), u.deprecated = t.deprecated ?? s.deprecated);
|
|
80
80
|
let _;
|
|
81
|
-
return t.elements && (i.elements.some((e) => e.path === o) || a.push(
|
|
81
|
+
return t.elements && (i.elements.some((e) => e.path === o) || a.push(F("definition.field.not-elements", { field: o })), _ = I(t.elements, o, r), u.elements = _.map((e) => e.field)), t.elementTitle !== void 0 && (u.elementTitle = t.elementTitle), t.cell !== void 0 && (u.cell = t.cell), t.timePrecision !== void 0 && (u.timePrecision = t.timePrecision), Object.assign(u, t.more), {
|
|
82
82
|
field: u,
|
|
83
83
|
described: s,
|
|
84
84
|
spec: t,
|
|
@@ -86,11 +86,11 @@ function Pe(e, t, n, r) {
|
|
|
86
86
|
..._ ? { children: _ } : {}
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function Be(e, t, n, r) {
|
|
90
90
|
let i = t.search ?? { fields: [] };
|
|
91
91
|
for (let e of i.fields) {
|
|
92
92
|
let t = n === void 0 ? e : `${n}.${e}`;
|
|
93
|
-
|
|
93
|
+
M(r.descriptor, t, n) || r.findings.push(F("definition.field.undescribed", { field: t }));
|
|
94
94
|
}
|
|
95
95
|
let a = {
|
|
96
96
|
name: e,
|
|
@@ -105,59 +105,59 @@ function Fe(e, t, n, r) {
|
|
|
105
105
|
sensitive: !1
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Ve(e, t, n) {
|
|
109
109
|
let r = e.fields.find((e) => e.path === t && e.scope === n);
|
|
110
110
|
if (r) return r;
|
|
111
|
-
if (n === void 0) return
|
|
111
|
+
if (n === void 0) return He(e, t);
|
|
112
112
|
let i = t.slice(n.length + 1), a = e.variants;
|
|
113
113
|
if (a?.element === n) return a.values.flatMap((e) => e.fields).find((e) => e.path === i || (e.aliases ?? []).includes(i));
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
let n =
|
|
115
|
+
function He(e, t) {
|
|
116
|
+
let n = ve(e, t), r = n[0];
|
|
117
117
|
if (r) return {
|
|
118
118
|
types: [...new Set(n.flatMap((e) => e.types))],
|
|
119
119
|
kind: r.kind
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function Ue(e) {
|
|
123
123
|
let t = e.semantic;
|
|
124
|
-
if (t?.type ===
|
|
125
|
-
if (t?.type ===
|
|
124
|
+
if (t?.type === T.TEMPORAL_DATE) return { type: "date" };
|
|
125
|
+
if (t?.type === T.TEMPORAL_EPOCH && t.timeUnit === Ie.SECONDS) return {
|
|
126
126
|
type: "epoch",
|
|
127
127
|
timeUnit: h.SECONDS
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function We(e, t, n) {
|
|
131
131
|
if (n.elements) return "elementMatch";
|
|
132
|
-
if (!t.enum && e?.types?.length === 1 && e.types[0] ===
|
|
132
|
+
if (!t.enum && e?.types?.length === 1 && e.types[0] === r.BOOLEAN) return "boolean";
|
|
133
133
|
if (t.enum || n.options) return "enum";
|
|
134
|
-
let
|
|
135
|
-
if (
|
|
136
|
-
if (
|
|
137
|
-
let
|
|
138
|
-
if (
|
|
139
|
-
switch (
|
|
140
|
-
case
|
|
141
|
-
case
|
|
142
|
-
case
|
|
143
|
-
case
|
|
134
|
+
let i = t.semantic?.type;
|
|
135
|
+
if (i === T.TEMPORAL_DATE) return "date";
|
|
136
|
+
if (i === T.TEMPORAL_EPOCH || i === T.TEMPORAL_FORMATTED) return "datetime";
|
|
137
|
+
let a = e?.types ?? [];
|
|
138
|
+
if (a.length !== 1) return null;
|
|
139
|
+
switch (a[0]) {
|
|
140
|
+
case r.BOOLEAN: return "boolean";
|
|
141
|
+
case r.INTEGER:
|
|
142
|
+
case r.DECIMAL: return "number";
|
|
143
|
+
case r.STRING: return "string";
|
|
144
144
|
default: return null;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
return e.label === void 0 ? (r.push(
|
|
147
|
+
function Ge(e, t, n, r) {
|
|
148
|
+
return e.label === void 0 ? (r.push(F("definition.field.unlabelled", { field: n }, "note")), t?.description ?? n) : e.label;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function Ke(e, t, n) {
|
|
151
151
|
let r = new Set(t.operators);
|
|
152
|
-
return e.elements.some((e) => e.path === n && e.filter) && r.add(
|
|
152
|
+
return e.elements.some((e) => e.path === n && e.filter) && r.add(ee.ELEMENT_MATCH), r;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
let i =
|
|
156
|
-
if (!a) return e.options ? i.flatMap(([e, t]) => t === !1 ? [] : [
|
|
154
|
+
function qe(e, t, n, r) {
|
|
155
|
+
let i = Je(e.options), a = t.enum;
|
|
156
|
+
if (!a) return e.options ? i.flatMap(([e, t]) => t === !1 ? [] : [L(e, t)]) : void 0;
|
|
157
157
|
let o = new Map(a.map((e) => [String(e.value), e])), s = /* @__PURE__ */ new Set(), c = [];
|
|
158
158
|
for (let [e, t] of i) {
|
|
159
159
|
let i = String(e), a = o.get(i);
|
|
160
|
-
a ? (s.add(i), t !== !1 && c.push(
|
|
160
|
+
a ? (s.add(i), t !== !1 && c.push(L(a.value, t))) : r.push(F("definition.option.undescribed", {
|
|
161
161
|
field: n,
|
|
162
162
|
value: i
|
|
163
163
|
}));
|
|
@@ -168,10 +168,10 @@ function He(e, t, n, r) {
|
|
|
168
168
|
});
|
|
169
169
|
return c;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Je(e) {
|
|
172
172
|
return e ? Array.isArray(e) ? e : Object.keys(e).map((t) => [t, e[t]]) : [];
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function L(e, t) {
|
|
175
175
|
return typeof t == "string" ? {
|
|
176
176
|
value: e,
|
|
177
177
|
label: t
|
|
@@ -181,39 +181,39 @@ function B(e, t) {
|
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
183
|
// src/runtime/define/defineView.ts
|
|
184
|
-
function
|
|
185
|
-
let
|
|
186
|
-
descriptor:
|
|
187
|
-
paging:
|
|
188
|
-
findings:
|
|
189
|
-
}),
|
|
190
|
-
id:
|
|
191
|
-
title:
|
|
184
|
+
function R(e, t, n = {}) {
|
|
185
|
+
let r = [], i = Ye(t, e, r), a = I(t.fields, void 0, {
|
|
186
|
+
descriptor: e,
|
|
187
|
+
paging: i?.paging ?? "paged",
|
|
188
|
+
findings: r
|
|
189
|
+
}), o = {
|
|
190
|
+
id: t.id,
|
|
191
|
+
title: t.title,
|
|
192
192
|
kind: "data",
|
|
193
|
-
source:
|
|
194
|
-
fields:
|
|
193
|
+
source: t.source,
|
|
194
|
+
fields: a.map((e) => e.field)
|
|
195
195
|
};
|
|
196
|
-
|
|
197
|
-
let
|
|
198
|
-
|
|
199
|
-
let
|
|
200
|
-
return
|
|
201
|
-
version:
|
|
202
|
-
findings:
|
|
196
|
+
t.recordNoun !== void 0 && (o.recordNoun = t.recordNoun), t.fieldGroups && (o.fieldGroups = t.fieldGroups), i && (o.record = i);
|
|
197
|
+
let s = Le(t.analysis, a), c = Re(s, a, e, r);
|
|
198
|
+
c && le(c) && (o.analysis = c), t.timeField !== void 0 && (o.timeField = t.timeField), t.views && (o.views = t.views);
|
|
199
|
+
let l = a.flatMap(({ field: e, spec: t, described: n }) => n && t.sortable !== !1 ? [e.name] : []), u = z(a);
|
|
200
|
+
return o.fields = B(o.fields, _(o, e, n.kinds ?? b).definition.fields, new Set(u)), o.described = {
|
|
201
|
+
version: e.version,
|
|
202
|
+
findings: r,
|
|
203
203
|
open: {
|
|
204
|
-
sort:
|
|
205
|
-
operators:
|
|
206
|
-
...
|
|
204
|
+
sort: l,
|
|
205
|
+
operators: u,
|
|
206
|
+
...s ? { analysis: s } : {}
|
|
207
207
|
}
|
|
208
|
-
},
|
|
208
|
+
}, o;
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function z(e, t) {
|
|
211
211
|
return e.flatMap(({ field: e, spec: n, children: r }) => {
|
|
212
212
|
let i = t === void 0 ? e.name : `${t}.${e.name}`;
|
|
213
|
-
return [...n.operators === void 0 && e.operators === void 0 && e.kind !== "search" ? [i] : [], ...
|
|
213
|
+
return [...n.operators === void 0 && e.operators === void 0 && e.kind !== "search" ? [i] : [], ...z(r ?? [], i)];
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function B(e, t, n, r) {
|
|
217
217
|
return e.map((e, i) => {
|
|
218
218
|
let a = r === void 0 ? e.name : `${r}.${e.name}`, o = t[i], s = e;
|
|
219
219
|
return n.has(a) && o?.operators !== void 0 && (s = {
|
|
@@ -221,18 +221,18 @@ function U(e, t, n, r) {
|
|
|
221
221
|
operators: o.operators
|
|
222
222
|
}), e.elements && (s = {
|
|
223
223
|
...s,
|
|
224
|
-
elements:
|
|
224
|
+
elements: B(e.elements, o?.elements ?? [], n, a)
|
|
225
225
|
}), s;
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
|
-
var
|
|
229
|
-
[
|
|
230
|
-
[
|
|
228
|
+
var V = {
|
|
229
|
+
[c.PAGED]: "paged",
|
|
230
|
+
[c.CURSOR]: "cursor"
|
|
231
231
|
};
|
|
232
|
-
function
|
|
232
|
+
function Ye(e, t, n) {
|
|
233
233
|
if (e.record === !1) return;
|
|
234
|
-
let r = e.record ?? {}, i = t.record.paging.flatMap((e) =>
|
|
235
|
-
return i.includes(a) || n.push(
|
|
234
|
+
let r = e.record ?? {}, i = t.record.paging.flatMap((e) => V[e] ? [V[e]] : []), a = r.paging ?? (i.includes("paged") ? "paged" : "cursor");
|
|
235
|
+
return i.includes(a) || n.push(v("definition.record.paging-wider", ["record", "paging"], { paging: a }, "warning")), {
|
|
236
236
|
...r,
|
|
237
237
|
rowKey: r.rowKey ?? t.record.identity,
|
|
238
238
|
paging: a,
|
|
@@ -240,7 +240,7 @@ function We(e, t, n) {
|
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
242
|
// src/runtime/define/defineDataset.ts
|
|
243
|
-
function
|
|
243
|
+
function H(e, t, n = {}) {
|
|
244
244
|
let r = /* @__PURE__ */ new Map();
|
|
245
245
|
for (let t of e.fields) t.scope === void 0 && r.set(t.path, t.description ?? t.path);
|
|
246
246
|
let i = {};
|
|
@@ -252,7 +252,7 @@ function G(e, t, n = {}) {
|
|
|
252
252
|
}));
|
|
253
253
|
}
|
|
254
254
|
for (let [e, t] of r) i[e] = t;
|
|
255
|
-
return
|
|
255
|
+
return R(e, {
|
|
256
256
|
id: t.id,
|
|
257
257
|
source: t.source,
|
|
258
258
|
title: t.title,
|
|
@@ -261,9 +261,12 @@ function G(e, t, n = {}) {
|
|
|
261
261
|
}, n);
|
|
262
262
|
}
|
|
263
263
|
// src/runtime/datasetResources.ts
|
|
264
|
-
var
|
|
264
|
+
var Xe = class {
|
|
265
265
|
constructor(e, t) {
|
|
266
|
-
this.engine = e, this.held = /* @__PURE__ */ new Map(), this.worded = /* @__PURE__ */ new Map(), this.
|
|
266
|
+
this.engine = e, this.held = /* @__PURE__ */ new Map(), this.worded = /* @__PURE__ */ new Map(), this.generations = new Te(), this.inForceRun = Promise.resolve({
|
|
267
|
+
datasets: [],
|
|
268
|
+
duplicates: []
|
|
269
|
+
}), this.stored = /* @__PURE__ */ new Map(), this.derived = /* @__PURE__ */ new Map(), this.options = t;
|
|
267
270
|
let { catalogs: n } = t;
|
|
268
271
|
if (this.catalogs = Array.isArray(n) ? n : [n], this.catalogs.length === 0) throw Error("DatasetResources reads at least one catalog.");
|
|
269
272
|
}
|
|
@@ -271,48 +274,70 @@ var Ge = class {
|
|
|
271
274
|
return [...this.held.values()];
|
|
272
275
|
}
|
|
273
276
|
async refresh(e = {}) {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
277
|
+
try {
|
|
278
|
+
return await this.generations.run(Ze, (t) => {
|
|
279
|
+
let n = this.refreshAs(e, t);
|
|
280
|
+
return this.inForceRun = n, n;
|
|
281
|
+
});
|
|
282
|
+
} catch (e) {
|
|
283
|
+
if (e instanceof G) return this.inForceRun;
|
|
284
|
+
throw e;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
async refreshAs(e, t) {
|
|
288
|
+
await this.readWordings(e, t);
|
|
289
|
+
let n = await Promise.allSettled(this.catalogs.map((t) => t.list(e)));
|
|
290
|
+
if (this.requireInForce(e, t), n.every((e) => e.status === "rejected")) throw n[0].reason;
|
|
291
|
+
let r = /* @__PURE__ */ new Map(), i = [], a = /* @__PURE__ */ new Set();
|
|
292
|
+
n.forEach((e, t) => {
|
|
293
|
+
if (e.status === "rejected") a.add(t), this.options.onCatalogError?.(t, e.reason);
|
|
294
|
+
else for (let n of e.value) {
|
|
295
|
+
let e = `${n.context}.${n.dataset}`, a = r.get(e);
|
|
296
|
+
a ? i.push({
|
|
283
297
|
id: e,
|
|
284
|
-
entry:
|
|
298
|
+
entry: n,
|
|
285
299
|
dropped: t,
|
|
286
300
|
kept: a.catalog
|
|
287
|
-
}) :
|
|
288
|
-
entry:
|
|
301
|
+
}) : r.set(e, {
|
|
302
|
+
entry: n,
|
|
289
303
|
catalog: t
|
|
290
304
|
});
|
|
291
305
|
}
|
|
292
306
|
});
|
|
293
|
-
for (let [e, t] of this.held)
|
|
307
|
+
for (let [e, t] of this.held) a.has(t.catalog) && !r.has(e) && r.set(e, {
|
|
294
308
|
entry: t.entry,
|
|
295
309
|
catalog: t.catalog
|
|
296
310
|
});
|
|
297
|
-
for (let e of
|
|
298
|
-
for (let e of [...this.held.keys()])
|
|
299
|
-
await Promise.all([...
|
|
300
|
-
let
|
|
311
|
+
for (let e of i) this.options.onDuplicate?.(e);
|
|
312
|
+
for (let e of [...this.held.keys()]) r.has(e) || (this.engine.unregister(e), this.held.delete(e), this.worded.delete(e), this.derived.delete(e));
|
|
313
|
+
await Promise.all([...r].map(([n, r]) => this.serve(n, r, e, t))), this.requireInForce(e, t);
|
|
314
|
+
let o = [...r.keys()];
|
|
301
315
|
return {
|
|
302
|
-
datasets: [...this.held.values()].sort((e, t) =>
|
|
303
|
-
duplicates:
|
|
316
|
+
datasets: [...this.held.values()].sort((e, t) => o.indexOf(e.id) - o.indexOf(t.id)),
|
|
317
|
+
duplicates: i
|
|
304
318
|
};
|
|
305
319
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
320
|
+
inForce(e, t) {
|
|
321
|
+
return e.signal?.aborted !== !0 && this.generations.latest(t);
|
|
322
|
+
}
|
|
323
|
+
requireInForce(e, t) {
|
|
324
|
+
if (e.signal?.throwIfAborted(), !this.generations.latest(t)) throw new G();
|
|
325
|
+
}
|
|
326
|
+
async readWordings(e, t) {
|
|
327
|
+
let n = new Map(this.stored);
|
|
328
|
+
await Promise.all(this.catalogs.map(async (r, i) => {
|
|
329
|
+
let a = r.wordings;
|
|
330
|
+
if (a) try {
|
|
331
|
+
let r = await a.list(e), o = this.stored.get(i) ?? /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
332
|
+
for (let e of /* @__PURE__ */ new Set([...r.keys(), ...o.keys()])) {
|
|
333
|
+
let n = this.generations.admit(t, U(i, e)) ? r.get(e) : o.get(e);
|
|
334
|
+
n && s.set(e, n);
|
|
335
|
+
}
|
|
336
|
+
n.set(i, s);
|
|
312
337
|
} catch (e) {
|
|
313
338
|
this.options.onWordingError?.(e);
|
|
314
339
|
}
|
|
315
|
-
})), this.stored =
|
|
340
|
+
})), this.inForce(e, t) && (this.stored = n);
|
|
316
341
|
}
|
|
317
342
|
wordingOf(e, t) {
|
|
318
343
|
return this.stored.get(t.catalog)?.get(e) ?? {
|
|
@@ -320,19 +345,20 @@ var Ge = class {
|
|
|
320
345
|
revision: "0"
|
|
321
346
|
};
|
|
322
347
|
}
|
|
323
|
-
async serve(e, t, n) {
|
|
324
|
-
let { entry:
|
|
325
|
-
if ((
|
|
326
|
-
let t = this.catalogs[
|
|
327
|
-
if (!
|
|
348
|
+
async serve(e, t, n, r) {
|
|
349
|
+
let { entry: i, catalog: a } = t, o = this.held.get(e);
|
|
350
|
+
if ((o?.catalog !== a || o.entry.version !== i.version || this.worded.get(e) !== W(this.wordingOf(e, t))) && (o || !this.engine.definitions.has(e))) try {
|
|
351
|
+
let t = this.catalogs[a].source(i), o = await t.describe?.(void 0, n);
|
|
352
|
+
if (!this.inForce(n, r)) return;
|
|
353
|
+
if (!o || o.notModified) throw Error(`Dataset [${e}] does not describe itself.`);
|
|
328
354
|
this.derived.set(e, {
|
|
329
|
-
entry:
|
|
330
|
-
catalog:
|
|
355
|
+
entry: i,
|
|
356
|
+
catalog: a,
|
|
331
357
|
source: t,
|
|
332
|
-
descriptor:
|
|
358
|
+
descriptor: o.descriptor
|
|
333
359
|
}), this.registerWorded(e);
|
|
334
360
|
} catch (e) {
|
|
335
|
-
this.options.onError?.(
|
|
361
|
+
this.options.onError?.(i, e);
|
|
336
362
|
}
|
|
337
363
|
}
|
|
338
364
|
registerWorded(e) {
|
|
@@ -341,7 +367,7 @@ var Ge = class {
|
|
|
341
367
|
let { entry: n, catalog: r, source: i, descriptor: a } = t, o = this.wordingOf(e, {
|
|
342
368
|
entry: n,
|
|
343
369
|
catalog: r
|
|
344
|
-
}), s = n.title ?? n.dataset, c =
|
|
370
|
+
}), s = n.title ?? n.dataset, c = H(a, {
|
|
345
371
|
id: e,
|
|
346
372
|
source: e,
|
|
347
373
|
title: s,
|
|
@@ -355,13 +381,13 @@ var Ge = class {
|
|
|
355
381
|
id: e,
|
|
356
382
|
entry: n,
|
|
357
383
|
catalog: r
|
|
358
|
-
}), this.worded.set(e,
|
|
384
|
+
}), this.worded.set(e, W(o));
|
|
359
385
|
}
|
|
360
386
|
editorOf(e, t, n, r, i) {
|
|
361
387
|
return {
|
|
362
388
|
dataset: e,
|
|
363
389
|
derivedTitle: n,
|
|
364
|
-
fields:
|
|
390
|
+
fields: H(r, {
|
|
365
391
|
id: e,
|
|
366
392
|
source: e,
|
|
367
393
|
title: n
|
|
@@ -374,7 +400,9 @@ var Ge = class {
|
|
|
374
400
|
save: async (n, r) => {
|
|
375
401
|
let a = this.catalogs[t].wordings;
|
|
376
402
|
if (!a) return;
|
|
377
|
-
let o = await a.set(e, n, i.revision, r)
|
|
403
|
+
let o = await a.set(e, n, i.revision, r);
|
|
404
|
+
this.generations.confirm(U(t, e));
|
|
405
|
+
let s = new Map(this.stored);
|
|
378
406
|
s.set(t, new Map(this.stored.get(t)).set(e, {
|
|
379
407
|
wording: n,
|
|
380
408
|
revision: o
|
|
@@ -382,14 +410,21 @@ var Ge = class {
|
|
|
382
410
|
}
|
|
383
411
|
};
|
|
384
412
|
}
|
|
385
|
-
};
|
|
413
|
+
}, Ze = "refresh";
|
|
414
|
+
function U(e, t) {
|
|
415
|
+
return `wording\u0000${e}\u0000${t}`;
|
|
416
|
+
}
|
|
417
|
+
function W({ wording: e, revision: t }) {
|
|
418
|
+
return JSON.stringify([e, t]);
|
|
419
|
+
}
|
|
420
|
+
var G = class extends Error {};
|
|
386
421
|
// src/store/localStorageSnapshot.ts
|
|
387
|
-
function
|
|
388
|
-
let n = t.storage ??
|
|
422
|
+
function Qe(e, t = {}) {
|
|
423
|
+
let n = t.storage ?? $e, r = t.events === void 0 ? et() : t.events;
|
|
389
424
|
return {
|
|
390
425
|
load() {
|
|
391
426
|
try {
|
|
392
|
-
return
|
|
427
|
+
return K(n().getItem(e));
|
|
393
428
|
} catch {
|
|
394
429
|
return;
|
|
395
430
|
}
|
|
@@ -400,37 +435,37 @@ function Ke(e, t = {}) {
|
|
|
400
435
|
subscribe(t) {
|
|
401
436
|
if (!r) return () => {};
|
|
402
437
|
let i = (r) => {
|
|
403
|
-
r.key !== null && r.key !== e || r.storageArea && r.storageArea !==
|
|
438
|
+
r.key !== null && r.key !== e || r.storageArea && r.storageArea !== tt(n) || t();
|
|
404
439
|
};
|
|
405
440
|
return r.addEventListener("storage", i), () => r.removeEventListener("storage", i);
|
|
406
441
|
}
|
|
407
442
|
};
|
|
408
443
|
}
|
|
409
|
-
function
|
|
444
|
+
function $e() {
|
|
410
445
|
let e = globalThis.localStorage;
|
|
411
446
|
if (!e) throw Error("localStorage is not available");
|
|
412
447
|
return e;
|
|
413
448
|
}
|
|
414
|
-
function
|
|
449
|
+
function et() {
|
|
415
450
|
let e = globalThis;
|
|
416
451
|
return typeof e.addEventListener == "function" ? e : null;
|
|
417
452
|
}
|
|
418
|
-
function
|
|
453
|
+
function tt(e) {
|
|
419
454
|
try {
|
|
420
455
|
return e();
|
|
421
456
|
} catch {
|
|
422
457
|
return;
|
|
423
458
|
}
|
|
424
459
|
}
|
|
425
|
-
function
|
|
460
|
+
function K(e) {
|
|
426
461
|
if (!e) return;
|
|
427
462
|
let t = JSON.parse(e);
|
|
428
463
|
if (t && typeof t == "object" && Array.isArray(t.instances) && typeof t.preferences == "object" && t.preferences !== null && !Array.isArray(t.preferences)) return {
|
|
429
|
-
instances: t.instances.filter(
|
|
464
|
+
instances: t.instances.filter(nt),
|
|
430
465
|
preferences: t.preferences
|
|
431
466
|
};
|
|
432
467
|
}
|
|
433
|
-
function
|
|
468
|
+
function nt(e) {
|
|
434
469
|
return typeof e == "object" && !!e && typeof e.id == "string";
|
|
435
470
|
}
|
|
436
471
|
// src/store/ViewStore.ts
|
|
@@ -442,9 +477,9 @@ function q() {
|
|
|
442
477
|
};
|
|
443
478
|
}
|
|
444
479
|
// src/store/MemoryViewStore.ts
|
|
445
|
-
var
|
|
480
|
+
var rt = 100, it = class {
|
|
446
481
|
constructor(e = {}) {
|
|
447
|
-
this.instances = /* @__PURE__ */ new Map(), this.preferences = /* @__PURE__ */ new Map(), this.outcomes = /* @__PURE__ */ new Map(), this.preferenceOutcomes = /* @__PURE__ */ new Map(), this.sequence = 0, e.permissions && (this.permissions = e.permissions), e.local && (this.local = !0), this.pageSize = e.pageSize ??
|
|
482
|
+
this.instances = /* @__PURE__ */ new Map(), this.preferences = /* @__PURE__ */ new Map(), this.outcomes = /* @__PURE__ */ new Map(), this.preferenceOutcomes = /* @__PURE__ */ new Map(), this.sequence = 0, e.permissions && (this.permissions = e.permissions), e.local && (this.local = !0), this.pageSize = e.pageSize ?? rt, this.snapshot = e.snapshot;
|
|
448
483
|
let t = e.snapshot?.load();
|
|
449
484
|
this.restore({
|
|
450
485
|
instances: t?.instances ?? e.instances ?? [],
|
|
@@ -452,7 +487,7 @@ var Ze = 100, Qe = class {
|
|
|
452
487
|
}), e.snapshot?.subscribe?.(() => this.reload());
|
|
453
488
|
}
|
|
454
489
|
list(e, t = {}) {
|
|
455
|
-
let n = [...this.instances.values()].filter((t) => t.definitionId === e).map(
|
|
490
|
+
let n = [...this.instances.values()].filter((t) => t.definitionId === e).map(A).sort((e, t) => Y[e.scope] - Y[t.scope]), r = t.cursor ? Number(t.cursor) : 0, i = r + this.pageSize;
|
|
456
491
|
return Promise.resolve({
|
|
457
492
|
items: n.slice(r, i),
|
|
458
493
|
nextCursor: i < n.length ? String(i) : null
|
|
@@ -460,7 +495,7 @@ var Ze = 100, Qe = class {
|
|
|
460
495
|
}
|
|
461
496
|
get(e) {
|
|
462
497
|
let t = this.instances.get(e);
|
|
463
|
-
return t ? Promise.resolve($(t)) : Promise.reject(new
|
|
498
|
+
return t ? Promise.resolve($(t)) : Promise.reject(new f("NOT_FOUND", `No such view: ${e}`));
|
|
464
499
|
}
|
|
465
500
|
create(e, t) {
|
|
466
501
|
let n = this.outcomes.get(t.requestId);
|
|
@@ -472,7 +507,7 @@ var Ze = 100, Qe = class {
|
|
|
472
507
|
do
|
|
473
508
|
this.sequence += 1, i = `${e.definitionId}-${this.sequence}`;
|
|
474
509
|
while (this.instances.has(i));
|
|
475
|
-
if (
|
|
510
|
+
if (w(i)) return Promise.reject(new f("INVALID", `Reserved id namespace: ${i}`));
|
|
476
511
|
let a = $(e);
|
|
477
512
|
delete a.stored;
|
|
478
513
|
let o = {
|
|
@@ -480,7 +515,7 @@ var Ze = 100, Qe = class {
|
|
|
480
515
|
title: e.title.trim(),
|
|
481
516
|
id: i,
|
|
482
517
|
revision: "1",
|
|
483
|
-
...
|
|
518
|
+
...S(e.scope) ? { stored: !0 } : {}
|
|
484
519
|
};
|
|
485
520
|
return this.instances.set(i, o), this.commit(t, o, () => this.instances.delete(i));
|
|
486
521
|
}
|
|
@@ -498,11 +533,11 @@ var Ze = 100, Qe = class {
|
|
|
498
533
|
}
|
|
499
534
|
changeAudience(e, t, n, r) {
|
|
500
535
|
return this.update(e, n, r, (n) => {
|
|
501
|
-
if (
|
|
502
|
-
if (
|
|
536
|
+
if (S(n.scope)) return new f("FORBIDDEN", "System views stay system");
|
|
537
|
+
if (O(n.scope) === t) return null;
|
|
503
538
|
if (t === "personal") {
|
|
504
539
|
let t = this.sharedBoardsShowing(e);
|
|
505
|
-
if (t.length > 0) return new
|
|
540
|
+
if (t.length > 0) return new f("INVALID", `Shared dashboards show view ${e}: ${t.join(", ")}`, { boards: t });
|
|
506
541
|
}
|
|
507
542
|
return {
|
|
508
543
|
...n,
|
|
@@ -514,8 +549,8 @@ var Ze = 100, Qe = class {
|
|
|
514
549
|
if (this.outcomes.has(n.requestId)) return Promise.resolve();
|
|
515
550
|
this.reload();
|
|
516
551
|
let r = this.instances.get(e);
|
|
517
|
-
if (!r) return Promise.reject(new
|
|
518
|
-
if (J(r)) return Promise.reject(new
|
|
552
|
+
if (!r) return Promise.reject(new f("NOT_FOUND", `No such view: ${e}`));
|
|
553
|
+
if (J(r)) return Promise.reject(new f("FORBIDDEN", "System views are read-only"));
|
|
519
554
|
let i = this.expect(r, t);
|
|
520
555
|
if (i) return Promise.reject(i);
|
|
521
556
|
this.instances.delete(e);
|
|
@@ -523,21 +558,21 @@ var Ze = 100, Qe = class {
|
|
|
523
558
|
return a ? Promise.reject(a) : (this.outcomes.set(n.requestId, null), Promise.resolve());
|
|
524
559
|
}
|
|
525
560
|
getPreferences(e) {
|
|
526
|
-
return Promise.resolve(this.preferences.get(e) ?? q());
|
|
561
|
+
return Promise.resolve($(this.preferences.get(e) ?? q()));
|
|
527
562
|
}
|
|
528
563
|
setPreferences(e, t, n) {
|
|
529
564
|
let r = this.preferenceOutcomes.get(n.requestId);
|
|
530
|
-
if (r) return Promise.resolve(r);
|
|
565
|
+
if (r) return Promise.resolve($(r));
|
|
531
566
|
this.reload();
|
|
532
567
|
let i = this.preferences.get(e), a = i ?? q();
|
|
533
|
-
if (a.revision !== t.revision) return Promise.reject(new
|
|
534
|
-
let o = {
|
|
568
|
+
if (a.revision !== t.revision) return Promise.reject(new f("CONFLICT", `Preferences for ${e} changed`, { preferences: $(a) }));
|
|
569
|
+
let o = $({
|
|
535
570
|
...t,
|
|
536
571
|
revision: X(a.revision)
|
|
537
|
-
};
|
|
572
|
+
});
|
|
538
573
|
this.preferences.set(e, o);
|
|
539
574
|
let s = this.persist(() => i ? this.preferences.set(e, i) : this.preferences.delete(e));
|
|
540
|
-
return s ? Promise.reject(s) : (this.preferenceOutcomes.set(n.requestId, o), Promise.resolve(o));
|
|
575
|
+
return s ? Promise.reject(s) : (this.preferenceOutcomes.set(n.requestId, o), Promise.resolve($(o)));
|
|
541
576
|
}
|
|
542
577
|
update(e, t, n, r, i) {
|
|
543
578
|
let a = this.outcomes.get(n.requestId);
|
|
@@ -545,12 +580,12 @@ var Ze = 100, Qe = class {
|
|
|
545
580
|
if (i) return Promise.reject(i);
|
|
546
581
|
this.reload();
|
|
547
582
|
let o = this.instances.get(e);
|
|
548
|
-
if (!o) return Promise.reject(new
|
|
549
|
-
if (J(o)) return Promise.reject(new
|
|
583
|
+
if (!o) return Promise.reject(new f("NOT_FOUND", `No such view: ${e}`));
|
|
584
|
+
if (J(o)) return Promise.reject(new f("FORBIDDEN", "System views are read-only"));
|
|
550
585
|
let s = this.expect(o, t);
|
|
551
586
|
if (s) return Promise.reject(s);
|
|
552
587
|
let c = r(o);
|
|
553
|
-
if (c instanceof
|
|
588
|
+
if (c instanceof f) return Promise.reject(c);
|
|
554
589
|
if (c === null) return this.outcomes.set(n.requestId, o), Promise.resolve($(o));
|
|
555
590
|
let l = {
|
|
556
591
|
...c,
|
|
@@ -562,14 +597,14 @@ var Ze = 100, Qe = class {
|
|
|
562
597
|
let t = [];
|
|
563
598
|
for (let n of this.instances.values()) {
|
|
564
599
|
let { config: r } = n;
|
|
565
|
-
if (r.kind !== "dashboard" ||
|
|
600
|
+
if (r.kind !== "dashboard" || O(n.scope) !== "shared") continue;
|
|
566
601
|
let i = r.panels;
|
|
567
|
-
Array.isArray(i) && i.some((t) =>
|
|
602
|
+
Array.isArray(i) && i.some((t) => at(t, e)) && t.push(n.title);
|
|
568
603
|
}
|
|
569
604
|
return t;
|
|
570
605
|
}
|
|
571
606
|
expect(e, t) {
|
|
572
|
-
return e.revision === t ? void 0 : new
|
|
607
|
+
return e.revision === t ? void 0 : new f("CONFLICT", `View ${e.id} moved to revision ${e.revision}`, { instance: e });
|
|
573
608
|
}
|
|
574
609
|
commit(e, t, n) {
|
|
575
610
|
let r = this.persist(n);
|
|
@@ -579,11 +614,11 @@ var Ze = 100, Qe = class {
|
|
|
579
614
|
if (this.snapshot) try {
|
|
580
615
|
this.snapshot.save({
|
|
581
616
|
instances: [...this.instances.values()].map((e) => $(e)),
|
|
582
|
-
preferences: Object.fromEntries(this.preferences)
|
|
617
|
+
preferences: $(Object.fromEntries(this.preferences))
|
|
583
618
|
});
|
|
584
619
|
return;
|
|
585
620
|
} catch (t) {
|
|
586
|
-
return e(), new
|
|
621
|
+
return e(), new f("UNAVAILABLE", `The view store could not keep this write: ${ot(t)}`, { storage: !0 });
|
|
587
622
|
}
|
|
588
623
|
}
|
|
589
624
|
reload() {
|
|
@@ -593,16 +628,16 @@ var Ze = 100, Qe = class {
|
|
|
593
628
|
restore(e) {
|
|
594
629
|
this.instances.clear(), this.preferences.clear();
|
|
595
630
|
for (let t of e.instances) this.instances.set(t.id, $(t));
|
|
596
|
-
for (let [t, n] of Object.entries(e.preferences)) this.preferences.set(t, n);
|
|
631
|
+
for (let [t, n] of Object.entries(e.preferences)) this.preferences.set(t, $(n));
|
|
597
632
|
}
|
|
598
633
|
};
|
|
599
|
-
function
|
|
634
|
+
function at(e, t) {
|
|
600
635
|
if (typeof e != "object" || !e) return !1;
|
|
601
636
|
let { instanceId: n, owned: r, opens: i, click: a } = e;
|
|
602
637
|
return r === void 0 && n === t || i === t || typeof a == "object" && !!a && a.instanceId === t;
|
|
603
638
|
}
|
|
604
639
|
function J(e) {
|
|
605
|
-
return
|
|
640
|
+
return S(e.scope) && e.stored !== !0;
|
|
606
641
|
}
|
|
607
642
|
var Y = {
|
|
608
643
|
system: 0,
|
|
@@ -613,17 +648,17 @@ function X(e) {
|
|
|
613
648
|
return /^(0|[1-9]\d{0,14})$/.test(e) ? String(Number(e) + 1) : "1";
|
|
614
649
|
}
|
|
615
650
|
function Z(e) {
|
|
616
|
-
switch (
|
|
617
|
-
case "empty": return new
|
|
618
|
-
case "too-long": return new
|
|
651
|
+
switch (ye(e)) {
|
|
652
|
+
case "empty": return new f("INVALID", "A view's title must not be blank.");
|
|
653
|
+
case "too-long": return new f("INVALID", "A view's title is longer than 120 characters.");
|
|
619
654
|
default: return;
|
|
620
655
|
}
|
|
621
656
|
}
|
|
622
657
|
function Q(e) {
|
|
623
|
-
let
|
|
624
|
-
return
|
|
658
|
+
let t = pe(e);
|
|
659
|
+
return t > 245760 ? new f("INVALID", `A view's config is ${t} bytes; the limit is ${C}.`) : void 0;
|
|
625
660
|
}
|
|
626
|
-
function
|
|
661
|
+
function ot(e) {
|
|
627
662
|
if (typeof e == "object" && e) {
|
|
628
663
|
let { name: t, message: n } = e;
|
|
629
664
|
if (typeof n == "string") return typeof t == "string" ? `${t}: ${n}` : n;
|
|
@@ -633,6 +668,6 @@ function et(e) {
|
|
|
633
668
|
function $(e) {
|
|
634
669
|
return structuredClone(e);
|
|
635
670
|
}
|
|
636
|
-
export {
|
|
671
|
+
export { _e as ActionInputError, x as BUILTIN_FIELD_KINDS, d as CHART_TYPES, we as DEFAULT_MISSING_KEY, ie as DEFAULT_RUNTIME_LIMITS, Xe as DatasetResources, l as EDITOR_INPUTS, Oe as ExportCancelledError, C as MAX_VIEW_CONFIG_BYTES, j as MAX_VIEW_TITLE_LENGTH, it as MemoryViewStore, Se as ReferenceLabelTimeoutError, E as VIEW_STORE_ERROR_CODES, s as ViewCommandError, Pe as ViewEngine, f as ViewStoreError, g as ViewWriteError, ce as actions, b as builtinFieldKinds, he as compileAnalysis, o as compileFilter, D as compileRecord, u as createFieldKindRegistry, be as defaultAnalysisConfig, Ne as defaultRecordConfig, xe as defaultRuntimeEnvironment, H as defineDataset, R as defineView, Ce as emptyDashboardConfig, q as emptyPreferences, je as fitChartSlots, ke as hasAsked, De as hasResult, P as inRows, Ee as isAnalysisRuntime, oe as isDateTimeFilterValue, Ae as isExportCancelledError, Me as isRecordRuntime, w as isSystemInstanceId, me as isViewCommandError, re as isViewStoreError, n as isViewWriteError, v as issue, Qe as localStorageSnapshot, k as projectAnalysis, m as projectRecord, N as resolveDateTimeRange, Fe as serializeCsv, ge as systemInstanceId, te as text, ne as textKeyOf, fe as validateAnalysis, ue as validateDashboard, y as validateDefinition, t as validateFilter, i as validateRecord, a as withFieldKinds, p as withText };
|
|
637
672
|
|
|
638
673
|
//# sourceMappingURL=index.js.map
|