├── .cargo
└── config.toml
├── .dockerignore
├── .editorconfig
├── .github
└── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .husky
└── pre-commit
├── .npmrc
├── .prettierignore
├── .prettierrc.json
├── .vscode
├── extensions.json
└── settings.json
├── CODEOWNERS
├── Cargo.lock
├── Cargo.toml
├── Dockerfile
├── README.md
├── build.sh
├── data_prep
├── process_covid.py
└── state_lookup.json
├── docker-compose.yml
├── editor
├── .gitignore
├── README.md
├── craco.config.js
├── package.json
├── public
│ ├── favicon.ico
│ ├── favicon
│ │ ├── android-chrome-192x192.png
│ │ ├── android-chrome-512x512.png
│ │ ├── apple-touch-icon.png
│ │ ├── browserconfig.xml
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── favicon.ico
│ │ ├── mstile-150x150.png
│ │ ├── safari-pinned-tab.svg
│ │ └── site.webmanifest
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ ├── robots.txt
│ └── squirrels.geojson
├── src
│ ├── App.css
│ ├── App.test.tsx
│ ├── App.tsx
│ ├── example_configs
│ │ ├── atlas_example.json
│ │ ├── census_example.json
│ │ ├── controls.json
│ │ ├── data_driven_cartography.json
│ │ ├── index.ts
│ │ ├── many_pages_two_maps.json
│ │ ├── maps_with_data.json
│ │ ├── maps_with_scatter.json
│ │ ├── range_interaction.json
│ │ ├── simple_csv.json
│ │ ├── simple_csv_with_interactive_filters.json
│ │ └── simple_geojson.json
│ ├── hooks
│ │ └── useSpec.ts
│ ├── index.css
│ ├── index.tsx
│ ├── logo.svg
│ ├── react-app-env.d.ts
│ ├── reportWebVitals.ts
│ └── setupTests.ts
└── tsconfig.json
├── matico_admin
├── .env
├── .eslintrc.json
├── .gitignore
├── ExternalTypes
│ └── deck.d.ts
├── README.md
├── components
│ ├── ColumnDetails.tsx
│ ├── DataTable.tsx
│ ├── DatasetCreation
│ │ ├── CSVFilePreviewer.tsx
│ │ ├── FilePreviewerInterface.tsx
│ │ ├── GeoJSONFilePreviewer.tsx
│ │ ├── NewDatasetModal.tsx
│ │ ├── NewUploadDatasetForm.tsx
│ │ ├── ShpFilePreviwer.tsx
│ │ ├── Uploader.tsx
│ │ └── utils
│ │ │ ├── getCSVPreview.ts
│ │ │ ├── getJsonPreview.ts
│ │ │ └── getShpPreview.ts
│ ├── FeatureEditor.tsx
│ ├── Layout.tsx
│ ├── LoginSignUpDialog.tsx
│ ├── MapView.tsx
│ ├── Nav.tsx
│ ├── NewApiDialog.tsx
│ ├── NewAppDialog.tsx
│ ├── NewUploadDatasetForm.tsx
│ ├── ProfileDialog.tsx
│ ├── QueryEditor.tsx
│ ├── SyncHistory.tsx
│ └── VariableEditor.tsx
├── datasetProviders
│ ├── MaticoApiProvider.tsx
│ └── MaticoServerDatasetProvider.tsx
├── hooks
│ ├── useApis.ts
│ ├── useApps.tsx
│ ├── useColumnStat.ts
│ ├── useDatasetColumns.ts
│ ├── useDatasetData.ts
│ ├── useDatasets.ts
│ ├── useExtent.ts
│ ├── useFeature.ts
│ ├── useMapSelectEditFeature.ts
│ ├── useProfile.tsx
│ ├── useSyncHistory.ts
│ ├── useTableData.ts
│ └── useUser.tsx
├── next-env.d.ts
├── next.config.js
├── package-lock.json
├── package.json
├── pages
│ ├── 404.tsx
│ ├── 500.tsx
│ ├── _app.tsx
│ ├── admin.tsx
│ ├── apis.tsx
│ ├── apis
│ │ └── [apiID].tsx
│ ├── apps.tsx
│ ├── apps
│ │ ├── [...params].tsx
│ │ └── edit
│ │ │ └── [...params].tsx
│ ├── datasets.tsx
│ ├── datasets
│ │ ├── [id].tsx
│ │ └── features
│ │ │ └── [featureId].tsx
│ ├── editor.tsx
│ └── index.tsx
├── public
│ ├── favicon.ico
│ ├── main_bg.png
│ └── vercel.svg
├── styles
│ ├── Home.module.css
│ └── globals.css
├── tsconfig.json
├── types
│ ├── DashboardSpecification.ts
│ ├── Dataset.ts
│ ├── LayerSpecification.ts
│ ├── Pagination.ts
│ ├── Quantizers.ts
│ ├── Query.ts
│ ├── Sources.ts
│ ├── Users.ts
│ └── index.ts
└── utils
│ └── api.ts
├── matico_app_server
├── .eslintrc.json
├── .gitignore
├── README.md
├── components
│ ├── AppCard
│ │ └── AppCard.tsx
│ ├── AppOptionsBar
│ │ └── AppOptionsBar.tsx
│ ├── CollaboratorsEditor
│ │ └── CollaboratorsEditor.tsx
│ ├── DatasetCreation
│ │ ├── FilePreviewer.tsx
│ │ ├── NewDatasetModal.tsx
│ │ ├── NewUploadDatasetForm.tsx
│ │ ├── S3Provider.tsx
│ │ ├── ShpFilePreviwer.tsx
│ │ ├── Uploader.tsx
│ │ ├── useLoadDataset.ts
│ │ └── utils
│ │ │ ├── convertCSV.ts
│ │ │ ├── convertJSON.ts
│ │ │ └── convertShp.ts
│ ├── DatasetSelector
│ │ └── DatasetSelector.tsx
│ ├── DeleteAppDialog
│ │ └── DeleteAppDialog.tsx
│ ├── Header
│ │ └── Header.tsx
│ ├── Icons
│ │ ├── Icon.tsx
│ │ └── svgs.tsx
│ ├── Login
│ │ └── Login.tsx
│ ├── NewAppModal
│ │ └── NewAppModal.tsx
│ ├── StandardLayout
│ │ └── StandardLayout.tsx
│ ├── TemplateSelector
│ │ └── TemplatesSelector.tsx
│ └── UserFinder
│ │ └── UserFinder.tsx
├── cypress.config.ts
├── cypress
│ ├── e2e
│ │ └── login.cy.ts
│ ├── fixtures
│ │ └── example.json
│ └── support
│ │ ├── commands.ts
│ │ └── e2e.ts
├── db.db
├── db.ts
├── hooks
│ ├── useApp.tsx
│ ├── useApps.tsx
│ ├── useCollaborators.ts
│ ├── useDatasets.tsx
│ ├── useDebounce.ts
│ ├── useNotifications.tsx
│ └── useUsers.ts
├── migrations
│ ├── 20220815223806_add_authentication
│ │ └── migration.sql
│ ├── 20220817123603_adding_view_and_fork_counts_to_apps
│ │ └── migration.sql
│ ├── 20220817123639_adding_unique_key_for_user_id_resource_id_to_colaborator
│ │ └── migration.sql
│ ├── 20220817130421_downcasing_app_in_user_and_adding_colaborators_to_app
│ │ └── migration.sql
│ ├── 20220820192758_rename_colaborators
│ │ └── migration.sql
│ ├── 20220821123435_adding_colaborators_to_datasets
│ │ └── migration.sql
│ ├── 20220907192344_fixing_some_issues_with_colaborators
│ │ └── migration.sql
│ ├── 20220908125618_polymorphic_permisions_for_apps_and_datasets
│ │ └── migration.sql
│ ├── 20220912145017_
│ │ └── migration.sql
│ ├── 20220912145326_
│ │ └── migration.sql
│ ├── 20220912171056_removing_unique_constrint_on_colaborator
│ │ └── migration.sql
│ └── migration_lock.toml
├── next.config.js
├── package.json
├── pages
│ ├── _app.tsx
│ ├── api
│ │ ├── apps
│ │ │ ├── [id].ts
│ │ │ ├── [id]
│ │ │ │ ├── collaborators
│ │ │ │ │ ├── [collaboratorId].ts
│ │ │ │ │ └── index.ts
│ │ │ │ └── permisions.ts
│ │ │ └── index.ts
│ │ ├── auth
│ │ │ └── [...nextauth].ts
│ │ ├── compute
│ │ │ ├── index.ts
│ │ │ └── list.ts
│ │ ├── datasets
│ │ │ ├── [id].ts
│ │ │ ├── index.ts
│ │ │ └── upload.ts
│ │ └── users
│ │ │ ├── [userId].tsx
│ │ │ └── index.ts
│ ├── apps
│ │ ├── [...params].tsx
│ │ ├── demo.tsx
│ │ └── edit
│ │ │ └── [...params].tsx
│ ├── datasets
│ │ └── index.tsx
│ ├── index.tsx
│ ├── privacy.tsx
│ ├── tos.tsx
│ └── users
│ │ ├── [userId]
│ │ └── [appName].tsx
│ │ └── index.tsx
├── public
│ ├── big_map.png
│ ├── blank.png
│ ├── compute
│ ├── favicon.ico
│ ├── fonts
│ │ └── fa.min.css
│ ├── logo.png
│ ├── map_sidebar.png
│ └── vercel.svg
├── schema.prisma
├── styles
│ ├── Home.module.css
│ └── globals.css
├── templates
│ ├── BigMap.ts
│ ├── Blank.ts
│ ├── MapWithSidebar.ts
│ └── index.ts
├── tsconfig.json
└── utils
│ ├── api.ts
│ ├── db.ts
│ ├── queryBuilder.ts
│ └── s3.ts
├── matico_charts
├── .babelrc
├── .storybook
│ └── main.js
├── README.md
├── package.json
├── rollup.config.js
├── scripts
│ ├── build.mjs
│ ├── dev.mjs
│ └── options.mjs
├── src
│ ├── Utils
│ │ ├── index.ts
│ │ └── utils.types.ts
│ ├── _stories
│ │ ├── MaticoCharts.stories.tsx
│ │ ├── OrdinalCharts.stories.tsx
│ │ ├── SampleData.js
│ │ ├── SampleStyling.js
│ │ ├── StoryUtils.js
│ │ └── sample_data
│ │ │ ├── Counties_In_California.json
│ │ │ ├── ILcounty_medinc.json
│ │ │ ├── NLSY.json
│ │ │ ├── germany-poly.json
│ │ │ ├── sampleline.json
│ │ │ ├── samplelinepolymix.json
│ │ │ ├── samplepoint.json
│ │ │ ├── samplerectangle-c.json
│ │ │ └── samplerectangle-cc.json
│ ├── components
│ │ ├── ChartSpace
│ │ │ ├── CategoricalChartSpace.tsx
│ │ │ ├── CategoricalChartSpace.types.ts
│ │ │ ├── ContinuousChartSpace.tsx
│ │ │ ├── ContinuousChartSpace.types.ts
│ │ │ ├── PlotLayers.tsx
│ │ │ └── index.tsx
│ │ ├── MaticoChart.tsx
│ │ ├── Plots
│ │ │ ├── BarComponent
│ │ │ │ └── index.tsx
│ │ │ ├── DistributionPlotComponent
│ │ │ │ ├── README.md
│ │ │ │ └── index.tsx
│ │ │ ├── HeatmapComponent
│ │ │ │ └── index.tsx
│ │ │ ├── LineComponent
│ │ │ │ └── index.tsx
│ │ │ ├── PieChartComponent
│ │ │ │ └── index.tsx
│ │ │ ├── ScatterplotComponent
│ │ │ │ └── index.tsx
│ │ │ ├── StaticMapComponent
│ │ │ │ ├── README.md
│ │ │ │ └── index.tsx
│ │ │ └── index.ts
│ │ └── types.ts
│ └── index.ts
├── tsconfig.json
└── types
│ ├── Utils
│ ├── index.d.ts
│ └── utils.types.d.ts
│ ├── components
│ ├── ChartSpace
│ │ ├── CategoricalChartSpace.d.ts
│ │ ├── CategoricalChartSpace.types.d.ts
│ │ ├── ContinuousChartSpace.d.ts
│ │ ├── ContinuousChartSpace.types.d.ts
│ │ ├── PlotLayers.d.ts
│ │ └── index.d.ts
│ ├── MaticoChart.d.ts
│ ├── Plots
│ │ ├── BarComponent
│ │ │ └── index.d.ts
│ │ ├── DistributionPlotComponent
│ │ │ └── index.d.ts
│ │ ├── HeatmapComponent
│ │ │ └── index.d.ts
│ │ ├── LineComponent
│ │ │ └── index.d.ts
│ │ ├── PieChartComponent
│ │ │ └── index.d.ts
│ │ ├── ScatterplotComponent
│ │ │ └── index.d.ts
│ │ ├── StaticMapComponent
│ │ │ └── index.d.ts
│ │ └── index.d.ts
│ └── types.d.ts
│ └── index.d.ts
├── matico_common
├── Cargo.toml
└── src
│ ├── autocomplete.rs
│ ├── compute
│ ├── errors.rs
│ ├── mod.rs
│ ├── options.rs
│ └── variables.rs
│ ├── filters.rs
│ ├── lib.rs
│ └── variables.rs
├── matico_components
├── .babelrc
├── .gitignore
├── .prettierrc
├── README.md
├── package.json
├── package_bu.json
├── postcss.config.js
├── scripts
│ ├── build.mjs
│ ├── dev.mjs
│ └── options.mjs
├── src
│ ├── Components
│ │ ├── Controls
│ │ │ └── index.ts
│ │ ├── DatasetMeta.tsx
│ │ ├── Layouts
│ │ │ ├── MaticoFreeLayout
│ │ │ │ └── MaticoFreeLayout.tsx
│ │ │ ├── MaticoLinearLayout
│ │ │ │ └── MaticoLinearLayout.tsx
│ │ │ └── MaticoTabLayout
│ │ │ │ └── MaticoTabLayout.tsx
│ │ ├── MarkdownContent
│ │ │ └── MarkdownContent.tsx
│ │ ├── MaticoApp
│ │ │ ├── MaticoApp.tsx
│ │ │ └── MaticoAppStyles.tsx
│ │ ├── MaticoAppPresenter
│ │ │ └── MaticoAppPresenter.tsx
│ │ ├── MaticoEditor
│ │ │ ├── EditorComponents
│ │ │ │ ├── AddLayerModal
│ │ │ │ │ └── AddLayerModal.tsx
│ │ │ │ ├── CollapsibleSection
│ │ │ │ │ ├── CollapsibleSection.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ ├── ColorVariableEditor
│ │ │ │ │ ├── ColorVariableEditor.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ ├── CompactHorizontalButton
│ │ │ │ │ ├── CompactHorizontalButton.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── DataTable
│ │ │ │ │ └── DataTable.tsx
│ │ │ │ ├── DatasetTransformEditor
│ │ │ │ │ ├── AddTransformStep.tsx
│ │ │ │ │ ├── AggregateStep.tsx
│ │ │ │ │ ├── ColumnTransfomStepEditor.tsx
│ │ │ │ │ ├── DatasetTransformDialog.tsx
│ │ │ │ │ ├── DatasetTransformEditor.tsx
│ │ │ │ │ ├── DatasetTransformEditorUtils.ts
│ │ │ │ │ ├── EditablePillButton.tsx
│ │ │ │ │ ├── FilterStep
│ │ │ │ │ │ ├── CategoryFilter.tsx
│ │ │ │ │ │ ├── DateRangeFilterEditor.tsx
│ │ │ │ │ │ ├── FilterStep.tsx
│ │ │ │ │ │ ├── FilterTypeDialog.tsx
│ │ │ │ │ │ ├── RangeFilterEditor.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── JoinStep.tsx
│ │ │ │ │ ├── TransformStep.tsx
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── types.ts
│ │ │ │ ├── DatasetTransformPane
│ │ │ │ │ └── DatasetTransformPane.tsx
│ │ │ │ ├── ErrorPanel
│ │ │ │ │ └── ErrorPanel.tsx
│ │ │ │ ├── GatedAction
│ │ │ │ │ ├── GatedAction.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ ├── GeoBoundsSelector
│ │ │ │ │ ├── GeoBoundsSelector.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ ├── LabelGroup
│ │ │ │ │ ├── LabelGroup.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ ├── LoadingSpinner
│ │ │ │ │ └── LoadingSpinner.tsx
│ │ │ │ ├── ManualVariableComboBox
│ │ │ │ │ ├── ManualVariableComboBox.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ ├── MetaPanel
│ │ │ │ │ ├── MetaPanel.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ ├── NavigatorBar
│ │ │ │ │ ├── NavigatorBar.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ ├── NewPaneDialog
│ │ │ │ │ └── NewPaneDialog.tsx
│ │ │ │ ├── NumericEditor
│ │ │ │ │ ├── NumericEditor.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ ├── OptionsPopper
│ │ │ │ │ ├── OptionsPopper.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ ├── PaneCollectionEditor
│ │ │ │ │ └── PaneCollectionEditor.tsx
│ │ │ │ ├── RangeSelector
│ │ │ │ │ ├── RangeSelector.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ ├── SliderUnitSelector
│ │ │ │ │ ├── SliderUnitSelector.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ ├── SliderVariableEditor
│ │ │ │ │ ├── SliderVariableEditor.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ └── SortableDraggableList
│ │ │ │ │ ├── MultiList.tsx
│ │ │ │ │ ├── MultipleContainers.tsx
│ │ │ │ │ ├── components
│ │ │ │ │ ├── Button
│ │ │ │ │ │ ├── Button.module.css
│ │ │ │ │ │ ├── Button.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── ConfirmModal
│ │ │ │ │ │ ├── ConfirmModal.module.css
│ │ │ │ │ │ ├── ConfirmModal.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── Container
│ │ │ │ │ │ ├── Container.module.css
│ │ │ │ │ │ ├── Container.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── Draggable
│ │ │ │ │ │ ├── Draggable.module.css
│ │ │ │ │ │ ├── Draggable.tsx
│ │ │ │ │ │ ├── DraggableOverlay.tsx
│ │ │ │ │ │ ├── draggable-svg.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── Droppable
│ │ │ │ │ │ ├── Droppable.module.css
│ │ │ │ │ │ ├── Droppable.tsx
│ │ │ │ │ │ ├── droppable-svg.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── FloatingControls
│ │ │ │ │ │ ├── FloatingControls.module.css
│ │ │ │ │ │ ├── FloatingControls.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── Grid
│ │ │ │ │ │ ├── Grid.module.css
│ │ │ │ │ │ ├── Grid.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── GridContainer
│ │ │ │ │ │ ├── GridContainer.module.css
│ │ │ │ │ │ ├── GridContainer.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── Item
│ │ │ │ │ │ ├── Item.module.css
│ │ │ │ │ │ ├── Item.tsx
│ │ │ │ │ │ ├── components
│ │ │ │ │ │ │ ├── Action
│ │ │ │ │ │ │ │ ├── Action.module.css
│ │ │ │ │ │ │ │ ├── Action.tsx
│ │ │ │ │ │ │ │ └── index.ts
│ │ │ │ │ │ │ ├── Handle
│ │ │ │ │ │ │ │ ├── Handle.tsx
│ │ │ │ │ │ │ │ └── index.ts
│ │ │ │ │ │ │ ├── Remove
│ │ │ │ │ │ │ │ ├── Remove.tsx
│ │ │ │ │ │ │ │ └── index.ts
│ │ │ │ │ │ │ └── index.ts
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── List
│ │ │ │ │ │ ├── List.module.css
│ │ │ │ │ │ ├── List.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── OverflowWrapper
│ │ │ │ │ │ ├── OverflowWrapper.module.css
│ │ │ │ │ │ ├── OverflowWrapper.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── Wrapper
│ │ │ │ │ │ ├── Wrapper.module.css
│ │ │ │ │ │ ├── Wrapper.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ └── index.ts
│ │ │ │ │ ├── multipleContainersKeyboardCoordinates.ts
│ │ │ │ │ └── utilities
│ │ │ │ │ ├── createRange.ts
│ │ │ │ │ └── index.ts
│ │ │ ├── Editors.ts
│ │ │ ├── MaticoEditor.tsx
│ │ │ ├── Panes
│ │ │ │ ├── AppEditor.tsx
│ │ │ │ ├── ContainerPaneEditor.tsx
│ │ │ │ ├── ControlsEditor.tsx
│ │ │ │ ├── DatasetModal.tsx
│ │ │ │ ├── DatasetsEditor.tsx
│ │ │ │ ├── DateTimeSliderEditor.tsx
│ │ │ │ ├── DetailsEditor.tsx
│ │ │ │ ├── HistogramPaneEditor.tsx
│ │ │ │ ├── LayerEditor.tsx
│ │ │ │ ├── LayoutEditor.tsx
│ │ │ │ ├── LineChartPaneEditor.tsx
│ │ │ │ ├── MapPaneEditor.tsx
│ │ │ │ ├── MaticoOutlineViewer
│ │ │ │ │ ├── CollisionDetection.ts
│ │ │ │ │ ├── ContainerDropTarget.tsx
│ │ │ │ │ ├── ContainerPaneRow.tsx
│ │ │ │ │ ├── DraggablePane.tsx
│ │ │ │ │ ├── DraggingContext.tsx
│ │ │ │ │ ├── MaticoOutlineViewer.tsx
│ │ │ │ │ ├── PageContext.tsx
│ │ │ │ │ ├── PageList.tsx
│ │ │ │ │ ├── PaneList.tsx
│ │ │ │ │ ├── PaneRow.tsx
│ │ │ │ │ ├── Styled.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── MaticoRawSpecEditor.tsx
│ │ │ │ ├── MaticoStateViewer.tsx
│ │ │ │ ├── PageEditor.tsx
│ │ │ │ ├── PaneEditor.tsx
│ │ │ │ ├── PieChartPaneEditor.tsx
│ │ │ │ ├── ScatterPlotPaneEditor.tsx
│ │ │ │ └── StaticMapEditor.tsx
│ │ │ └── Utils
│ │ │ │ ├── BaseMapSelector.tsx
│ │ │ │ ├── ColorPaletteSelector.tsx
│ │ │ │ ├── ColorPickerDialog.tsx
│ │ │ │ ├── ColorVariableEditor.tsx
│ │ │ │ ├── ControlActionBar.tsx
│ │ │ │ ├── ControlOverlay.tsx
│ │ │ │ ├── DataDrivenModel
│ │ │ │ ├── ContinuousDomainEditor.tsx
│ │ │ │ ├── DataDrivenModal.tsx
│ │ │ │ ├── DiscreteDomainEditor.tsx
│ │ │ │ └── index.ts
│ │ │ │ ├── DatasetColumnSelector.tsx
│ │ │ │ ├── DatasetSelector.tsx
│ │ │ │ ├── DefaultGrid.tsx
│ │ │ │ ├── FilterEditor.tsx
│ │ │ │ ├── LabelEditor.tsx
│ │ │ │ ├── MaticoControlButton.tsx
│ │ │ │ ├── MaticoDatasetsViewer.tsx
│ │ │ │ ├── NumericVariableEditor.tsx
│ │ │ │ ├── PaneDetails.tsx
│ │ │ │ ├── RemovePaneDialog.tsx
│ │ │ │ ├── RowEntryMultiButton.tsx
│ │ │ │ ├── TextCategoryInput.tsx
│ │ │ │ ├── TwoUpCollapsableGrid.tsx
│ │ │ │ ├── Utils.tsx
│ │ │ │ ├── ValueOrVariableInput.tsx
│ │ │ │ ├── ValueVariableEditor.tsx
│ │ │ │ └── VariableSelector.tsx
│ │ ├── MaticoNavBar
│ │ │ └── MaticoNavBar.tsx
│ │ ├── MaticoPage
│ │ │ └── MaticoPage.tsx
│ │ └── Panes
│ │ │ ├── MaticoCategorySelectorPane
│ │ │ ├── CategorySelectorEditior.tsx
│ │ │ ├── MaticoCategorySelectorPane.tsx
│ │ │ ├── defaults.ts
│ │ │ └── index.tsx
│ │ │ ├── MaticoContainerPane
│ │ │ └── MaticoContainerPane.tsx
│ │ │ ├── MaticoControlsPane
│ │ │ ├── MaticoControlsPane.tsx
│ │ │ ├── MaticoRangeControl.tsx
│ │ │ └── MaticoSelectControl.tsx
│ │ │ ├── MaticoDateTimeSlider
│ │ │ └── MaticoDateTimeSlider.tsx
│ │ │ ├── MaticoHistogramPane
│ │ │ └── MaticoHistogramPane.tsx
│ │ │ ├── MaticoLegendPane
│ │ │ └── MaticoLegendPane.tsx
│ │ │ ├── MaticoLineChartPane
│ │ │ └── MaticoLineChartPane.tsx
│ │ │ ├── MaticoMapPane
│ │ │ ├── LayerUtils.ts
│ │ │ ├── MaticoMapLayer.tsx
│ │ │ ├── MaticoMapPane.tsx
│ │ │ ├── MaticoMapTooltip.tsx
│ │ │ └── MaticoSelectionLayer.tsx
│ │ │ ├── MaticoPieChartPane
│ │ │ └── MaticoPieChartPane.tsx
│ │ │ ├── MaticoScatterplotPane
│ │ │ └── MaticoScatterplotPane.tsx
│ │ │ ├── MaticoStaticMapPane
│ │ │ └── MaticoStaticMapPane.tsx
│ │ │ ├── MaticoSwitchesPane
│ │ │ ├── MaitcoSwitchesPane.tsx
│ │ │ ├── SwitchesPaneEditor.tsx
│ │ │ ├── defaults.ts
│ │ │ └── index.tsx
│ │ │ ├── MaticoTextPane
│ │ │ ├── EditableMaticoTextPane.tsx
│ │ │ ├── MaticoTextPane.tsx
│ │ │ ├── MaticoTextPaneEditor.tsx
│ │ │ ├── defaults.ts
│ │ │ └── index.tsx
│ │ │ ├── MissingParamsPlaceholder
│ │ │ └── MissingParamsPlaceholder.tsx
│ │ │ ├── Pane.ts
│ │ │ └── PaneParts.ts
│ ├── Datasets
│ │ ├── ArrowBuilder.ts
│ │ ├── COGBuilder.ts
│ │ ├── COGDataset.ts
│ │ ├── CSVBuilder.ts
│ │ ├── Dataset.ts
│ │ ├── DatasetProvider.ts
│ │ ├── DatasetService.ts
│ │ ├── DatasetServiceWorker.worker.ts
│ │ ├── DatasetTransform.ts
│ │ ├── DatasetTransformRunner.ts
│ │ ├── FeatherBuilder.ts
│ │ ├── GeoJSONBuilder.ts
│ │ ├── LocalDataset.ts
│ │ ├── MaticoRemoteApi.ts
│ │ ├── MaticoRemoteApiBuilder.ts
│ │ ├── MaticoRemoteBuilder.ts
│ │ ├── MaticoRemoteDataset.ts
│ │ ├── WasmComputeBuilder.ts
│ │ └── utils.ts
│ ├── DatasetsProviders
│ │ ├── ArrowProvider.tsx
│ │ ├── COGProvider.tsx
│ │ ├── CSVProvider.tsx
│ │ ├── ComputeProvider.tsx
│ │ ├── DataLibrary
│ │ │ └── DataLibrary.tsx
│ │ ├── GeoJSONProvider.tsx
│ │ ├── SocrataProvider
│ │ │ ├── SocrataProvider.tsx
│ │ │ ├── usePortalDatasets.ts
│ │ │ └── usePortals.ts
│ │ └── URLProvider.tsx
│ ├── Hooks
│ │ ├── redux.ts
│ │ ├── useAnalysis.ts
│ │ ├── useApp.ts
│ │ ├── useAutoVariable.tsx
│ │ ├── useAvaliableCompute.ts
│ │ ├── useContainer.ts
│ │ ├── useDatasetActions.ts
│ │ ├── useDatasetTransform.ts
│ │ ├── useEditorActions.ts
│ │ ├── useErrors.ts
│ │ ├── useFormattedText.ts
│ │ ├── useGetFeatures.ts
│ │ ├── useIconList.ts
│ │ ├── useInteralSpec.tsx
│ │ ├── useIsEditable.ts
│ │ ├── useLayer.ts
│ │ ├── useMaticoContextMenu.tsx
│ │ ├── useMaticoMapView.ts
│ │ ├── useMaticoSpec.ts
│ │ ├── useNormalizeSpec.ts
│ │ ├── useNormalizedSpecSelector.tsx
│ │ ├── usePage.ts
│ │ ├── usePane.ts
│ │ ├── usePaneContainer.ts
│ │ ├── useParentContext.tsx
│ │ ├── useRegisterDatasets.ts
│ │ ├── useRegression.ts
│ │ ├── useRequestColumnStat.ts
│ │ ├── useRequestData.ts
│ │ ├── useResizable.tsx
│ │ ├── useResizeEvent.ts
│ │ ├── useSpecElement.ts
│ │ ├── useTransform.ts
│ │ └── useValidator.ts
│ ├── Stores
│ │ ├── MaticoDatasetSlice.tsx
│ │ ├── MaticoErrorSlice.ts
│ │ ├── MaticoSpecSlice.tsx
│ │ ├── MaticoStore.ts
│ │ ├── MaticoVariableSlice.ts
│ │ ├── MiddleWare
│ │ │ └── DatasetServiceMiddleWare.ts
│ │ ├── VariableTypes.tsx
│ │ └── editorSlice.tsx
│ ├── Styles
│ │ └── global_spectrum_overrides.css
│ ├── Utils
│ │ ├── colors.ts
│ │ ├── columnHelper.ts
│ │ ├── dragAndResize
│ │ │ ├── DragAndResizeButtons.tsx
│ │ │ ├── SelectorWrapper.tsx
│ │ │ ├── handleDrag.ts
│ │ │ └── updateDragOrResize.ts
│ │ ├── fixedGrid.tsx
│ │ ├── iconUtils.ts
│ │ ├── layoutEngine.ts
│ │ ├── nullComponent.tsx
│ │ ├── paneEngine.tsx
│ │ ├── paneGrid.tsx
│ │ ├── sanitizeColor.ts
│ │ └── specUtils
│ │ │ ├── index.ts
│ │ │ └── specUtils.ts
│ ├── index.d.ts
│ └── index.ts
└── tsconfig.json
├── matico_compute
├── matico_analysis
│ ├── Cargo.toml
│ ├── bindings
│ │ ├── ColType.ts
│ │ ├── ColumnOptions.ts
│ │ ├── NumericCategoryOptions.ts
│ │ ├── NumericFloatOptions.ts
│ │ ├── NumericIntOptions.ts
│ │ ├── OptionGroup.ts
│ │ ├── OptionGroupVal.ts
│ │ ├── OptionGroupVals.ts
│ │ ├── ParameterOptionDisplayDetails.ts
│ │ ├── ParameterOptions.ts
│ │ ├── ParameterValue.ts
│ │ ├── RepeatedOption.ts
│ │ ├── SpecParameter.ts
│ │ ├── SpecParameterValue.ts
│ │ ├── TableOptions.ts
│ │ ├── TextCategoryOptions.ts
│ │ └── TextOptions.ts
│ └── src
│ │ └── lib.rs
├── matico_area_analysis
│ ├── Cargo.toml
│ ├── Pipfile
│ ├── resources
│ │ └── test.arrow
│ └── src
│ │ └── lib.rs
├── matico_dot_density_analysis
│ ├── Cargo.toml
│ ├── build.sh
│ ├── resources
│ │ └── test.arrow
│ └── src
│ │ └── lib.rs
├── matico_hdbscam_analysis
│ ├── Cargo.toml
│ ├── build.sh
│ ├── resources
│ │ └── test.arrow
│ └── src
│ │ └── lib.rs
├── matico_lisa
│ ├── Cargo.toml
│ ├── build.sh
│ └── src
│ │ └── lib.rs
├── matico_regres
│ └── Cargo.toml
├── matico_synthetic_data_analysis
│ ├── Cargo.toml
│ ├── build.sh
│ ├── resources
│ │ └── test.arrow
│ └── src
│ │ ├── lib.rs
│ │ └── simulation.rs
└── matico_weights
│ ├── Cargo.toml
│ ├── build.sh
│ └── src
│ └── lib.rs
├── matico_server
├── .develop.env
├── .env-sample
├── .env.prod
├── .gitignore
├── Cargo.toml
├── README.md
├── Settings.toml
├── api.md
├── build.sh
├── diesel.toml
├── migrations
│ ├── .gitkeep
│ ├── 00000000000000_diesel_initial_setup
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 2021-01-07-154355_add_users
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 2021-01-20-213126_create_datasets
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 2021-02-02-183639_create_queries
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 2021-02-05-152451_add_geom_col_and_id_col_to_dataset
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 2021-02-09-145431_create_dashboard_table
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 2021-02-21-142809_add_permissions_table
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 2021-12-31-142819_change_dashboard_to_new_spec
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 2022-01-06-150716_add_table_name_to_dataset
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 2022-01-14-180521_create_import_sync_import
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 2022-01-19-211841_add_import_params_to_dataset
│ │ ├── down.sql
│ │ └── up.sql
│ └── 2022-01-24-235453_add_public_to_api
│ │ ├── down.sql
│ │ └── up.sql
├── resources
│ └── test
│ │ ├── Pipfile
│ │ ├── Pipfile.lock
│ │ ├── csv_data_with_lat_lng.csv
│ │ ├── csv_data_with_wkb.csv
│ │ ├── generate_test_data.py
│ │ ├── geojson_data.geojson
│ │ ├── ne_10m_admin_0_countries.zip
│ │ ├── shapefile.zip
│ │ ├── squirrel.geojson
│ │ └── squirrel.zip
├── rest
├── src
│ ├── app_config.rs
│ ├── app_state.rs
│ ├── auth.rs
│ ├── db
│ │ ├── datasource.rs
│ │ ├── formatters.rs
│ │ ├── mod.rs
│ │ ├── postgis_datasource.rs
│ │ ├── query_builder.rs
│ │ ├── query_result.rs
│ │ ├── setup.rs
│ │ └── tile_query.sql
│ ├── errors.rs
│ ├── lib.rs
│ ├── main.rs
│ ├── models
│ │ ├── apis.rs
│ │ ├── apps.rs
│ │ ├── columns.rs
│ │ ├── datasets.rs
│ │ ├── mod.rs
│ │ ├── permissions.rs
│ │ ├── stats.rs
│ │ ├── sync_import.rs
│ │ └── users.rs
│ ├── routes
│ │ ├── apis.rs
│ │ ├── apps.rs
│ │ ├── auth.rs
│ │ ├── columns.rs
│ │ ├── compute.rs
│ │ ├── data.rs
│ │ ├── datasets.rs
│ │ ├── mod.rs
│ │ ├── upload.rs
│ │ └── users.rs
│ ├── scheduler
│ │ ├── import_scheduler.rs
│ │ └── mod.rs
│ ├── schema.rs
│ ├── telemetry.rs
│ ├── tiler
│ │ ├── mod.rs
│ │ └── routes.rs
│ └── utils
│ │ ├── formats.rs
│ │ ├── geo_file_utils.rs
│ │ ├── mod.rs
│ │ ├── pagination.rs
│ │ └── sort.rs
├── static
│ ├── .gitkeep
│ ├── asset-manifest.json
│ ├── docs
│ │ ├── api.yaml
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── index.html
│ │ ├── oauth2-redirect.html
│ │ ├── swagger-ui-bundle.js
│ │ ├── swagger-ui-bundle.js.map
│ │ ├── swagger-ui-standalone-preset.js
│ │ ├── swagger-ui-standalone-preset.js.map
│ │ ├── swagger-ui.css
│ │ ├── swagger-ui.css.map
│ │ ├── swagger-ui.js
│ │ └── swagger-ui.js.map
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ ├── robots.txt
│ └── static
│ │ ├── css
│ │ ├── 2.456aabb6.chunk.css
│ │ ├── 2.456aabb6.chunk.css.map
│ │ ├── main.af4a186e.chunk.css
│ │ └── main.af4a186e.chunk.css.map
│ │ └── js
│ │ ├── 2.d9c11ba5.chunk.js
│ │ ├── 2.d9c11ba5.chunk.js.LICENSE.txt
│ │ ├── 2.d9c11ba5.chunk.js.map
│ │ ├── 3.711b3af2.chunk.js
│ │ ├── 3.711b3af2.chunk.js.map
│ │ ├── main.57de02e3.chunk.js
│ │ ├── main.57de02e3.chunk.js.map
│ │ ├── runtime-main.9d824b3b.js
│ │ └── runtime-main.9d824b3b.js.map
├── tests
│ ├── datasets.rs
│ ├── helpers
│ │ ├── imports.rs
│ │ ├── mod.rs
│ │ ├── stats.rs
│ │ └── users.rs
│ ├── imports.rs
│ ├── stats.rs
│ ├── tiles.rs
│ └── users.rs
└── workflows
│ └── main.yml
├── matico_spec
├── Cargo.toml
├── README.md
├── index.ts
├── notes.md
├── package.json
├── pkg
│ ├── .gitignore
│ ├── README.md
│ ├── matico_spec.d.ts
│ ├── matico_spec.js
│ ├── matico_spec_bg.js
│ ├── matico_spec_bg.wasm
│ ├── matico_spec_bg.wasm.d.ts
│ └── package.json
├── scripts
│ ├── build.js
│ ├── options.js
│ └── watch.js
└── src
│ ├── apps.rs
│ ├── autocomplete.rs
│ ├── charts.rs
│ ├── colors.rs
│ ├── compute_values.rs
│ ├── controls.rs
│ ├── dataset_transforms.rs
│ ├── datasets.rs
│ ├── layouts.rs
│ ├── lib.rs
│ ├── mapping.rs
│ ├── page.rs
│ ├── pane.rs
│ ├── theme.rs
│ └── validation.rs
├── matico_spec_derive
├── Cargo.lock
├── Cargo.toml
└── src
│ └── lib.rs
├── matico_types
├── README.md
├── api
│ ├── App.ts
│ ├── AppOrderBy.ts
│ ├── AppSearch.ts
│ ├── BasicStatsParams.ts
│ ├── BasicStatsResults.ts
│ ├── Column.ts
│ ├── CreateAppDTO.ts
│ ├── EqualIntervalParams.ts
│ ├── HistogramEntry.ts
│ ├── HistogramParams.ts
│ ├── HistogramResults.ts
│ ├── JenksEntry.ts
│ ├── JenksParams.ts
│ ├── JenksResults.ts
│ ├── LoginDTO.ts
│ ├── LoginResponseDTO.ts
│ ├── LogorithmicParams.ts
│ ├── LogorithmicResults.ts
│ ├── QuantileEntry.ts
│ ├── QuantileParams.ts
│ ├── QuantileResults.ts
│ ├── SignupDTO.ts
│ ├── SignupResponseDTO.ts
│ ├── StatParams.ts
│ ├── StatResults.ts
│ ├── UpdateAppDTO.ts
│ ├── User.ts
│ ├── ValueCountEntry.ts
│ ├── ValueCountsParams.ts
│ ├── ValueCountsResults.ts
│ └── index.ts
├── index.d.ts
├── package.json
└── spec
│ ├── AggregateStep.ts
│ ├── AggregationSummary.ts
│ ├── AggregationType.ts
│ ├── Alignment.ts
│ ├── App.ts
│ ├── ArrowDataset.ts
│ ├── BaseMap.ts
│ ├── BooleanOption.ts
│ ├── COGDataset.ts
│ ├── CSVDataset.ts
│ ├── CategoriesParams.ts
│ ├── CategoryFilter.ts
│ ├── CategorySelectorPane.ts
│ ├── ChangeType.ts
│ ├── ColType.ts
│ ├── ColorSpecification.ts
│ ├── ColumnOptions.ts
│ ├── ColumnTransform.ts
│ ├── ColumnTransformOp.ts
│ ├── ColumnTransformStep.ts
│ ├── ContainerPane.ts
│ ├── Control.ts
│ ├── ControlsPane.ts
│ ├── Dataset.ts
│ ├── DatasetMetric.ts
│ ├── DatasetRef.ts
│ ├── DatasetTransform.ts
│ ├── DatasetTransformStep.ts
│ ├── DatasetVal.ts
│ ├── DateFilter.ts
│ ├── DateOpts.ts
│ ├── DateTimeSliderPane.ts
│ ├── Domain.ts
│ ├── DomainVal.ts
│ ├── EqualIntervalParams.ts
│ ├── Filter.ts
│ ├── FilterStep.ts
│ ├── FloatOpts.ts
│ ├── FreeLayout.ts
│ ├── GapSize.ts
│ ├── GeoJSONDataset.ts
│ ├── GridLayout.ts
│ ├── HistogramPane.ts
│ ├── ImageBaseMap.ts
│ ├── ImputeMethod.ts
│ ├── ImputeStep.ts
│ ├── IntOpts.ts
│ ├── JenksParams.ts
│ ├── JoinStep.ts
│ ├── JoinType.ts
│ ├── Justification.ts
│ ├── Labels.ts
│ ├── Layer.ts
│ ├── LayerContentType.ts
│ ├── LayerStyle.ts
│ ├── Layout.ts
│ ├── LineChartPane.ts
│ ├── LinearLayout.ts
│ ├── LinearLayoutDirection.ts
│ ├── MapControls.ts
│ ├── MapPane.ts
│ ├── MapProjection.ts
│ ├── Mapping.ts
│ ├── MappingType.ts
│ ├── MappingVarOr.ts
│ ├── MaticoApiDataset.ts
│ ├── MaticoRemoteDataset.ts
│ ├── Metadata.ts
│ ├── NamedBaseMap.ts
│ ├── NumericCategoryOptions.ts
│ ├── NumericFloatOptions.ts
│ ├── NumericIntOptions.ts
│ ├── OptionGroup.ts
│ ├── OptionGroupVal.ts
│ ├── OptionGroupVals.ts
│ ├── Page.ts
│ ├── Pane.ts
│ ├── PaneDetails.ts
│ ├── PanePosition.ts
│ ├── PaneRef.ts
│ ├── ParameterOptionDisplayDetails.ts
│ ├── ParameterOptions.ts
│ ├── ParameterValue.ts
│ ├── PieChartPane.ts
│ ├── QuantileParams.ts
│ ├── Range.ts
│ ├── RangeControl.ts
│ ├── RangeFilter.ts
│ ├── RangeVals.ts
│ ├── RegExFilter.ts
│ ├── Rename.ts
│ ├── RepeatedOption.ts
│ ├── ScaleType.ts
│ ├── ScatterplotPane.ts
│ ├── ScreenUnits.ts
│ ├── SelectControl.ts
│ ├── SelectionMode.ts
│ ├── SelectionOptions.ts
│ ├── SignedS3ArrowDataset.ts
│ ├── SpecParameter.ts
│ ├── SpecParameterValue.ts
│ ├── StaticMapPane.ts
│ ├── StringOpts.ts
│ ├── StyleJSONBaseMap.ts
│ ├── SummaryItem.ts
│ ├── SummaryPane.ts
│ ├── SummaryStyle.ts
│ ├── SwitchesPane.ts
│ ├── TabBarPosition.ts
│ ├── TabLayout.ts
│ ├── TableOptions.ts
│ ├── TextCategoryOptions.ts
│ ├── TextOptions.ts
│ ├── TextPane.ts
│ ├── Theme.ts
│ ├── TiledLayer.ts
│ ├── TooltipColumnSpec.ts
│ ├── ValidationResult.ts
│ ├── VarOr.ts
│ ├── Variable.ts
│ ├── View.ts
│ ├── WASMCompute.ts
│ └── index.ts
├── package.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── python
├── generate_example_feather_data.py
└── test.py
├── register_raster_cog.sh
├── render.yaml
├── scripts
├── build_types.sh
├── nginx.conf
└── run_docker_prod.sh
├── start_raster_server.sh
├── tsconfig.json
└── vercel.json
/.cargo/config.toml:
--------------------------------------------------------------------------------
1 | [build]
2 | rustflags = ["--cfg", "tokio_unstable"]
3 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | tmp
2 | **/node_modules
3 | target
4 | **/target
5 | **/.next
6 | .git
7 | .yarn/cache
8 | python
9 | Dockerfile
10 |
11 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | end_of_line = lf
7 | charset = utf-8
8 | insert_final_newline = true
9 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Overview
2 |
3 | Brief description of what this PR does, and why it is needed.
4 |
5 | Closes #XXX
6 |
7 | ### Demo
8 |
9 | Optional. Screenshots, `curl` examples, etc.
10 |
11 | ### Notes
12 |
13 | Optional. Ancillary topics, caveats, alternative strategies that didn't work out, anything else.
14 |
15 | ## Testing Instructions
16 |
17 | * How to test this PR
18 | * Prefer bulleted description
19 | * Start after checking out this branch
20 | * Include any setup required, such as bundling scripts, restarting services, etc.
21 | * Include test case, and expected output
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | node_modules
3 | dist/
4 | .cache
5 | .DS_Store
6 |
7 | .yarn/*
8 | !.yarn/cache
9 | !.yarn/patches
10 | !.yarn/plugins
11 | !.yarn/releases
12 | !.yarn/sdks
13 | !.yarn/versions
14 |
15 | # Local Netlify folder
16 | .netlify
17 | matico_charts/package-lock.json
18 | .vscode/settings.json
19 | .idea/
20 | matico_spec/bindings
21 |
22 | bindings
23 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | . "$(dirname -- "$0")/_/husky.sh"
3 |
4 | yarn prettier-staged
5 | yarn rust-format
6 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | extend-node-path=true
2 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | # Ignore artifacts:
2 | build
3 | coverage
4 |
5 | # Ignore next build paths
6 | **/.next/*
7 |
8 | **/dist/*
9 | matico_spec/*
10 |
11 | # Ignore these file directories
12 | node_modules/*
13 | .yarn/
14 | editor/
15 |
16 | #Lockfile
17 | pnpm-lock.yaml
18 |
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "arcanis.vscode-zipfs"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "search.exclude": {
3 | "**/.yarn": true,
4 | "**/.pnp.*": true
5 | },
6 | "typescript.tsdk": ".yarn/sdks/typescript/lib",
7 | "typescript.enablePromptUseWorkspaceTsdk": true,
8 | "docwriter.progress.trackFunctions": true,
9 | "docwriter.progress.trackClasses": true,
10 | "docwriter.progress.trackMethods": false
11 | }
12 |
--------------------------------------------------------------------------------
/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # This can be modified to be more specific as time goes on, but for the
2 | # time being we can have it to where at least any PR submitted has
3 | # all of our accounts attached to it as default reviewers.
4 | * @nofurtherinformation @stuartlynn @michplunkett
5 |
--------------------------------------------------------------------------------
/Cargo.toml:
--------------------------------------------------------------------------------
1 | [workspace]
2 |
3 | members = [
4 | "matico_spec_derive",
5 | "matico_spec",
6 | "matico_server",
7 | "matico_compute/matico_weights/",
8 | # "matico_compute/matico_lisa/",
9 | "matico_compute/matico_synthetic_data_analysis",
10 | "matico_common",
11 | # "matico_dataservice"
12 | ] # "matico_compute/matico_convex_hull_analysis",
13 |
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | yarn set version berry
4 | yarn
5 | yarn install
6 | (cd matico_spec && wasm-pack build --release)
7 | yarn workspace matico_components build
8 | yarn workspace editor build
9 |
10 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: "3.9"
2 | services:
3 | matico:
4 | build: .
5 | environment:
6 | DB_HOST: db
7 | DB_USERNAME: matico
8 | DB_PASSWORD: password
9 | DB_NAME: matico
10 | DATADB_HOST: db
11 | DATADB_USERNAME: matico
12 | DATADB_PASSWORD: password
13 | DATADB_NAME: matico
14 | depends_on:
15 | - "db"
16 | db:
17 | image: postgres
18 | restart: always
19 | ports:
20 | - '5438:5432'
21 | volumes:
22 | - ./postgres-data:/var/lib/postgresql/data
23 | environment:
24 | POSTGRES_USER: matico
25 | POSTGRES_PASSWORD: password
26 | POSTGRES_DB: matico
27 |
--------------------------------------------------------------------------------
/editor/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/editor/craco.config.js:
--------------------------------------------------------------------------------
1 | const { addBeforeLoader, addPlugins, loaderByName } = require('@craco/craco');
2 | const NodePolyfilPlugin = require("node-polyfill-webpack-plugin")
3 | const webpack = require('webpack')
4 | const WorkerLoaderPlugin = require("craco-worker-loader");
5 |
6 |
7 | module.exports = async ()=>{
8 | return{
9 | webpack: {
10 | configure(webpackConfig){
11 | webpackConfig.experiments= {
12 | asyncWebAssembly: true,
13 | syncWebAssembly: true,
14 | topLevelAwait: true
15 | }
16 | addPlugins(webpackConfig, [new NodePolyfilPlugin()])
17 | return webpackConfig
18 | }
19 | }
20 | }
21 | };
22 |
23 |
24 |
--------------------------------------------------------------------------------
/editor/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/editor/public/favicon.ico
--------------------------------------------------------------------------------
/editor/public/favicon/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/editor/public/favicon/android-chrome-192x192.png
--------------------------------------------------------------------------------
/editor/public/favicon/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/editor/public/favicon/android-chrome-512x512.png
--------------------------------------------------------------------------------
/editor/public/favicon/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/editor/public/favicon/apple-touch-icon.png
--------------------------------------------------------------------------------
/editor/public/favicon/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #da532c
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/editor/public/favicon/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/editor/public/favicon/favicon-16x16.png
--------------------------------------------------------------------------------
/editor/public/favicon/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/editor/public/favicon/favicon-32x32.png
--------------------------------------------------------------------------------
/editor/public/favicon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/editor/public/favicon/favicon.ico
--------------------------------------------------------------------------------
/editor/public/favicon/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/editor/public/favicon/mstile-150x150.png
--------------------------------------------------------------------------------
/editor/public/favicon/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "",
3 | "short_name": "",
4 | "icons": [
5 | {
6 | "src": "/android-chrome-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "/android-chrome-512x512.png",
12 | "sizes": "512x512",
13 | "type": "image/png"
14 | }
15 | ],
16 | "theme_color": "#ffffff",
17 | "background_color": "#ffffff",
18 | "display": "standalone"
19 | }
20 |
--------------------------------------------------------------------------------
/editor/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/editor/public/logo192.png
--------------------------------------------------------------------------------
/editor/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/editor/public/logo512.png
--------------------------------------------------------------------------------
/editor/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/editor/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/editor/src/App.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render, screen } from '@testing-library/react';
3 | import App from './App';
4 |
5 | test('renders learn react link', () => {
6 | render();
7 | const linkElement = screen.getByText(/learn react/i);
8 | expect(linkElement).toBeInTheDocument();
9 | });
10 |
--------------------------------------------------------------------------------
/editor/src/example_configs/index.ts:
--------------------------------------------------------------------------------
1 | let atlas = require("./atlas_example.json")
2 | let census = require("./census_example.json")
3 | let controls= require("./controls.json")
4 | let multi_pages= require("./many_pages_two_maps.json")
5 | let range_interaction = require("./many_pages_two_maps.json")
6 | let data_driven_cartography= require("./data_driven_cartography.json")
7 |
8 |
9 | const examples = {
10 | atlas,
11 | census,
12 | controls,
13 | multi_pages,
14 | range_interaction,
15 | data_driven_cartography
16 | }
17 |
18 | export default examples
19 |
20 |
--------------------------------------------------------------------------------
/editor/src/hooks/useSpec.ts:
--------------------------------------------------------------------------------
1 | export const test ='test'
2 | // import {useEffect, useState } from 'react'
3 |
4 | // export const useSpec =()=>{
5 | // const [spec,setSpec] = useState(null)
6 | // const [ready,setReady] = useState(false)
7 |
8 | // useEffect(() => {
9 | // let f = async () => {
10 | // try {
11 | // const wasm = await import("matico_spec");
12 | // setSpec(wasm)
13 | // setReady(true)
14 | // } catch (err) {
15 | // console.log("unexpected error in load wasm ", err);
16 | // }
17 | // };
18 | // f();
19 | // }, []);
20 | // return [spec,ready]
21 | // }
22 |
--------------------------------------------------------------------------------
/editor/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
15 | body, html, #root{
16 | width:100vw;
17 | height:100vh;
18 | margin:0px;
19 | padding:0px;
20 | /* Once fixed other issues, turn on this bad boy */
21 | /* overflow:hidden; */
22 | }
23 |
--------------------------------------------------------------------------------
/editor/src/index.tsx:
--------------------------------------------------------------------------------
1 | import ReactDOM from 'react-dom';
2 | import './index.css';
3 | import App from './App';
4 | import reportWebVitals from './reportWebVitals';
5 | import {createRoot} from 'react-dom/client'
6 |
7 | const root = createRoot(
8 | document.getElementById('root')!
9 | );
10 |
11 | root.render()
12 |
13 | // If you want to start measuring performance in your app, pass a function
14 | // to log results (for example: reportWebVitals(console.log))
15 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
16 | reportWebVitals();
17 |
--------------------------------------------------------------------------------
/editor/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/editor/src/reportWebVitals.ts:
--------------------------------------------------------------------------------
1 | import { ReportHandler } from 'web-vitals';
2 |
3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4 | if (onPerfEntry && onPerfEntry instanceof Function) {
5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6 | getCLS(onPerfEntry);
7 | getFID(onPerfEntry);
8 | getFCP(onPerfEntry);
9 | getLCP(onPerfEntry);
10 | getTTFB(onPerfEntry);
11 | });
12 | }
13 | };
14 |
15 | export default reportWebVitals;
16 |
--------------------------------------------------------------------------------
/editor/src/setupTests.ts:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/editor/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2020",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "esModuleInterop": true,
12 | "allowSyntheticDefaultImports": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "module": "esnext",
17 | "moduleResolution": "node",
18 | "resolveJsonModule": true,
19 | "isolatedModules": true,
20 | "noEmit": true,
21 | "jsx": "react-jsx"
22 | },
23 | "include": [
24 | "src"
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/matico_admin/.env:
--------------------------------------------------------------------------------
1 | NEXT_PUBLIC_SERVER_URL=http://localhost:8000/api
--------------------------------------------------------------------------------
/matico_admin/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals",
3 | "rules":{
4 | "react/jsx-key":"warn"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/matico_admin/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 |
27 | # local env files
28 | .env.local
29 | .env.development.local
30 | .env.test.local
31 | .env.production.local
32 |
33 | # vercel
34 | .vercel
35 |
36 | # typescript
37 | *.tsbuildinfo
38 |
--------------------------------------------------------------------------------
/matico_admin/ExternalTypes/deck.d.ts:
--------------------------------------------------------------------------------
1 | import * as DeckTypings from "@danmarshall/deckgl-typings";
2 | declare module "deck.gl" {
3 | export namespace DeckTypings {}
4 | }
5 |
--------------------------------------------------------------------------------
/matico_admin/components/DatasetCreation/FilePreviewerInterface.tsx:
--------------------------------------------------------------------------------
1 | export interface FilePreviewerInterface {
2 | file: File;
3 | onSubmit?: () => void;
4 | }
5 |
--------------------------------------------------------------------------------
/matico_admin/components/DatasetCreation/utils/getCSVPreview.ts:
--------------------------------------------------------------------------------
1 | import pappa from "papaparse";
2 |
3 | export const getCSVPreview = (file: File) => {
4 | return new Promise((resolve, reject) => {
5 | pappa.parse(file, {
6 | worker: true,
7 | header: true,
8 | dynamicTyping: true,
9 | preview: 10,
10 | skipEmptyLines: true,
11 | complete: (data) => {
12 | resolve(data);
13 | },
14 | error: (error) => {
15 | reject(error);
16 | },
17 | });
18 | });
19 | };
20 |
--------------------------------------------------------------------------------
/matico_admin/components/DatasetCreation/utils/getJsonPreview.ts:
--------------------------------------------------------------------------------
1 | import { JSONLoader } from "@loaders.gl/json";
2 | import { loadInBatches } from "@loaders.gl/core";
3 |
4 | export const getJsonPreview = async (file: File) => {
5 | const data = await loadInBatches(file, JSONLoader, {
6 | json: { jsonpaths: [`$.features`] },
7 | });
8 |
9 | //Not sure why TS is mad at this Async Iterator deff has a next method
10 | //@ts-ignore
11 | let { value: result } = await data.next();
12 |
13 | // for await (const batch of data){
14 | // result = batch
15 | // break
16 | // }
17 | return result;
18 | };
19 |
--------------------------------------------------------------------------------
/matico_admin/hooks/useColumnStat.ts:
--------------------------------------------------------------------------------
1 | import { useSWRAPI, Source, urlForSource, SourceType } from "../utils/api";
2 |
3 | export const useColumnStat = (
4 | source: Source | null | undefined,
5 | colName: string,
6 | statDetails: any
7 | ) => {
8 | let url = source ? urlForSource(source, `/columns/${colName}/stats`) : null;
9 |
10 | let params = source
11 | ? {
12 | stat: JSON.stringify(statDetails),
13 | ...source.parameters,
14 | q: source.query,
15 | }
16 | : null;
17 | if (url && source?.type === SourceType.Query) {
18 | url = url.split("?")[0];
19 | }
20 |
21 | return useSWRAPI(source && statDetails && colName ? url : null, {
22 | params,
23 | refreshInterval: 0,
24 | });
25 | };
26 |
--------------------------------------------------------------------------------
/matico_admin/hooks/useDatasetData.ts:
--------------------------------------------------------------------------------
1 | import { useSWRAPI } from "../utils/api";
2 |
3 | export const useDatasetData = (
4 | id: string,
5 | page?: number,
6 | perPage: number = 50
7 | ) => {
8 | const offset = page ? page * perPage : 0;
9 | return useSWRAPI(
10 | `/data/dataset/${id}?limit=${perPage}&offset=${offset}&includeMetadata=true`,
11 | { refreshInterval: 10000 }
12 | );
13 | };
14 |
--------------------------------------------------------------------------------
/matico_admin/hooks/useExtent.ts:
--------------------------------------------------------------------------------
1 | import { useSWRAPI, Source, urlForSource } from "../utils/api";
2 |
3 | export const useExtent = (source: Source) => {
4 | const baseUrl = urlForSource(source);
5 |
6 | const { data, error, mutate } = useSWRAPI(
7 | source ? `${baseUrl}/extent` : null,
8 | { params: source.parameters, refreshInterval: 0 }
9 | );
10 | return { extent: data, extentError: error, mutateError: mutate };
11 | };
12 |
--------------------------------------------------------------------------------
/matico_admin/hooks/useSyncHistory.ts:
--------------------------------------------------------------------------------
1 | import { useSWRAPI } from "../utils/api";
2 |
3 | export const useSyncHistory = (id: string) => {
4 | return useSWRAPI(`/datasets/${id}/sync_history`, { refreshInterval: 4000 });
5 | };
6 |
--------------------------------------------------------------------------------
/matico_admin/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // NOTE: This file should not be edited
5 | // see https://nextjs.org/docs/basic-features/typescript for more information.
6 |
--------------------------------------------------------------------------------
/matico_admin/pages/404.tsx:
--------------------------------------------------------------------------------
1 | export default function Custom404() {
2 | return 404 - Page Not Found
;
3 | }
4 |
--------------------------------------------------------------------------------
/matico_admin/pages/500.tsx:
--------------------------------------------------------------------------------
1 | // pages/500.js
2 | export default function Custom500() {
3 | return 500 - Server-side error occurred
;
4 | }
5 |
--------------------------------------------------------------------------------
/matico_admin/pages/_app.tsx:
--------------------------------------------------------------------------------
1 | import "../styles/globals.css";
2 | import type { AppProps } from "next/app";
3 |
4 | function MyApp({ Component, pageProps }: AppProps) {
5 | return ;
6 | }
7 |
8 | export default MyApp;
9 |
--------------------------------------------------------------------------------
/matico_admin/pages/admin.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from "next";
2 | import { Layout } from "../components/Layout";
3 | import { View } from "@adobe/react-spectrum";
4 |
5 | const Admin: NextPage = () => {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 | );
13 | };
14 |
15 | export default Admin;
16 |
--------------------------------------------------------------------------------
/matico_admin/pages/datasets/features/[featureId].tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const FeaturePage: React.FC = () => {
4 | return FeaturePage
;
5 | };
6 |
7 | export default FeaturePage;
8 |
--------------------------------------------------------------------------------
/matico_admin/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_admin/public/favicon.ico
--------------------------------------------------------------------------------
/matico_admin/public/main_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_admin/public/main_bg.png
--------------------------------------------------------------------------------
/matico_admin/styles/Home.module.css:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/matico_admin/styles/globals.css:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/matico_admin/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "forceConsistentCasingInFileNames": true,
9 | "noEmit": true,
10 | "esModuleInterop": true,
11 | "module": "esnext",
12 | "moduleResolution": "node",
13 | "resolveJsonModule": true,
14 | "isolatedModules": true,
15 | "jsx": "preserve",
16 | "incremental": true,
17 | "downlevelIteration":true
18 | },
19 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
20 | "exclude": ["node_modules"]
21 | }
22 |
--------------------------------------------------------------------------------
/matico_admin/types/Dataset.ts:
--------------------------------------------------------------------------------
1 | export interface Dataset {
2 | name: string;
3 | description: string;
4 | id: string;
5 | created_at: Date;
6 | updated_at: Date;
7 | geom_col: string;
8 | id_col: string;
9 | }
10 |
11 | export interface Column {
12 | name: string;
13 | col_type: string;
14 | source_query: string;
15 | }
16 |
--------------------------------------------------------------------------------
/matico_admin/types/Pagination.ts:
--------------------------------------------------------------------------------
1 | export interface Page {
2 | limit: number;
3 | offset: number;
4 | }
5 |
--------------------------------------------------------------------------------
/matico_admin/types/Quantizers.ts:
--------------------------------------------------------------------------------
1 | export interface QuantileQuantizer {
2 | noBins: number;
3 | excludeMin: number;
4 | excludeMax: number;
5 | }
6 |
7 | export interface EqualIntervalQuantizer {
8 | noBins: number;
9 | excludeMin: number;
10 | excludeMax: number;
11 | }
12 |
13 | export interface CategoryQuantizer {
14 | custom?: string[];
15 | topN?: number;
16 | }
17 |
18 | export enum NumericalCategorizationMethod {
19 | Quantiles = "quantiles",
20 | EqualInterval = "equal_interval",
21 | Scaled = "scaled",
22 | Custom = "custom",
23 | }
24 |
--------------------------------------------------------------------------------
/matico_admin/types/Query.ts:
--------------------------------------------------------------------------------
1 | export interface QueryParameter {
2 | name: string;
3 | description: string;
4 | default_value: Record;
5 | }
6 |
7 | export interface Query {
8 | id: string;
9 | name: string;
10 | description: string;
11 | sql: string;
12 | parameters: Array;
13 | }
14 |
15 | export interface ValueCount {
16 | name: string;
17 | count: number;
18 | }
19 |
--------------------------------------------------------------------------------
/matico_admin/types/Sources.ts:
--------------------------------------------------------------------------------
1 | export interface QuerySource {
2 | Query: string;
3 | }
4 |
5 | export interface DatasetSource {
6 | Dataset: string;
7 | }
8 |
9 | export interface RawQuerySource {
10 | RawQuery: string;
11 | }
12 | export interface GeoJSONSource {
13 | url: string;
14 | }
15 |
--------------------------------------------------------------------------------
/matico_admin/types/Users.ts:
--------------------------------------------------------------------------------
1 | export interface User {
2 | id: string;
3 | username: string;
4 | email: string;
5 | created_at: Date;
6 | updated_at: Date;
7 | }
8 |
9 | export interface LoginResponse {
10 | user: User;
11 | token: string;
12 | }
13 |
14 | export interface SignupResponse {
15 | user: User;
16 | token: string;
17 | }
18 |
--------------------------------------------------------------------------------
/matico_admin/types/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./LayerSpecification";
2 | export * from "./Quantizers";
3 | export * from "./Sources";
4 | export * from "./Users";
5 | export * from "./DashboardSpecification";
6 | export * from "./Dataset";
7 | export * from "./Query";
8 | export * from "./Pagination";
9 |
--------------------------------------------------------------------------------
/matico_app_server/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals",
3 | "rules":{
4 | "react/jsx-key":"warn"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/matico_app_server/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 | .pnpm-debug.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | next-env.d.ts
37 |
--------------------------------------------------------------------------------
/matico_app_server/components/DatasetCreation/utils/convertJSON.ts:
--------------------------------------------------------------------------------
1 | import { JSONLoader } from "@loaders.gl/json";
2 | import { loadInBatches } from "@loaders.gl/core";
3 |
4 | export const getJsonPreview = async (file: File) => {
5 | const data = await loadInBatches(file, JSONLoader, {
6 | json: { jsonpaths: [`$.features`] },
7 | });
8 |
9 | //Not sure why TS is mad at this Async Iterator deff has a next method
10 | //@ts-ignore
11 | let { value: result } = await data.next();
12 |
13 | // for await (const batch of data){
14 | // result = batch
15 | // break
16 | // }
17 | return result;
18 | };
19 |
--------------------------------------------------------------------------------
/matico_app_server/cypress.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "cypress";
2 |
3 | export default defineConfig({
4 | e2e: {
5 | setupNodeEvents(on, config) {
6 | // implement node event listeners here
7 | },
8 | },
9 | });
10 |
--------------------------------------------------------------------------------
/matico_app_server/cypress/e2e/login.cy.ts:
--------------------------------------------------------------------------------
1 | describe('empty spec', () => {
2 | it('passes', () => {
3 | cy.visit('http://localhost:3000/')
4 | cy.wait(2)
5 | cy.contains('Login').click()
6 | cy.contains('Github').click()
7 | })
8 | })
9 |
--------------------------------------------------------------------------------
/matico_app_server/cypress/fixtures/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Using fixtures to represent data",
3 | "email": "hello@cypress.io",
4 | "body": "Fixtures are a great way to mock data for responses to routes"
5 | }
6 |
--------------------------------------------------------------------------------
/matico_app_server/cypress/support/e2e.ts:
--------------------------------------------------------------------------------
1 | // ***********************************************************
2 | // This example support/e2e.ts is processed and
3 | // loaded automatically before your test files.
4 | //
5 | // This is a great place to put global configuration and
6 | // behavior that modifies Cypress.
7 | //
8 | // You can change the location of this file or turn off
9 | // automatically serving support files with the
10 | // 'supportFile' configuration option.
11 | //
12 | // You can read more here:
13 | // https://on.cypress.io/configuration
14 | // ***********************************************************
15 |
16 | // Import commands.js using ES2015 syntax:
17 | import './commands'
18 |
19 | // Alternatively you can use CommonJS syntax:
20 | // require('./commands')
--------------------------------------------------------------------------------
/matico_app_server/db.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_app_server/db.db
--------------------------------------------------------------------------------
/matico_app_server/db.ts:
--------------------------------------------------------------------------------
1 | import { PrismaClient } from "@prisma/client";
2 |
3 | declare global {
4 | // allow global `var` declarations
5 | // eslint-disable-next-line no-var
6 | var prisma: PrismaClient | undefined;
7 | }
8 |
9 | export const prisma =
10 | global.prisma ||
11 | new PrismaClient({
12 | log: ["query"],
13 | });
14 |
15 | if (process.env.NODE_ENV !== "production") global.prisma = prisma;
16 |
--------------------------------------------------------------------------------
/matico_app_server/hooks/useDebounce.ts:
--------------------------------------------------------------------------------
1 | import { useState, useEffect } from "react";
2 |
3 | const useDebounce = (value: any, delay: number) => {
4 | const [debouncedValue, setDebouncedValue] = useState(value);
5 |
6 | useEffect(() => {
7 | const handler = setTimeout(() => {
8 | setDebouncedValue(value);
9 | }, delay);
10 |
11 | return () => {
12 | clearTimeout(handler);
13 | };
14 | }, [value, delay]);
15 |
16 | return debouncedValue;
17 | };
18 |
19 | export default useDebounce;
20 |
--------------------------------------------------------------------------------
/matico_app_server/hooks/useUsers.ts:
--------------------------------------------------------------------------------
1 | import { useApi } from "../utils/api";
2 | import useDebounce from "./useDebounce";
3 |
4 | export const useSearchUsers = (search: string) => {
5 | const debounceSearch = useDebounce(search, 500);
6 | const {
7 | data: users,
8 | error,
9 | mutate,
10 | } = useApi("/api/users", { params: { take: 10, search: debounceSearch } });
11 | return { users, error };
12 | };
13 |
--------------------------------------------------------------------------------
/matico_app_server/migrations/20220817123603_adding_view_and_fork_counts_to_apps/migration.sql:
--------------------------------------------------------------------------------
1 | -- AlterTable
2 | ALTER TABLE "apps" ADD COLUMN "noForks" INTEGER NOT NULL DEFAULT 0,
3 | ADD COLUMN "noViews" INTEGER NOT NULL DEFAULT 0;
4 |
--------------------------------------------------------------------------------
/matico_app_server/migrations/20220817123639_adding_unique_key_for_user_id_resource_id_to_colaborator/migration.sql:
--------------------------------------------------------------------------------
1 | /*
2 | Warnings:
3 |
4 | - A unique constraint covering the columns `[userId,resourceId]` on the table `colaborators` will be added. If there are existing duplicate values, this will fail.
5 |
6 | */
7 | -- CreateIndex
8 | CREATE UNIQUE INDEX "colaborators_userId_resourceId_key" ON "colaborators"("userId", "resourceId");
9 |
--------------------------------------------------------------------------------
/matico_app_server/migrations/20220817130421_downcasing_app_in_user_and_adding_colaborators_to_app/migration.sql:
--------------------------------------------------------------------------------
1 | -- AddForeignKey
2 | ALTER TABLE "colaborators" ADD CONSTRAINT "colaborators_resourceId_fkey" FOREIGN KEY ("resourceId") REFERENCES "apps"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
3 |
--------------------------------------------------------------------------------
/matico_app_server/migrations/20220821123435_adding_colaborators_to_datasets/migration.sql:
--------------------------------------------------------------------------------
1 | -- RenameForeignKey
2 | ALTER TABLE "collaborators" RENAME CONSTRAINT "collaborators_resourceId_fkey" TO "apps_collaborators_resourceId_fkey";
3 |
4 | -- AddForeignKey
5 | ALTER TABLE "collaborators" ADD CONSTRAINT "datasets_collaborators_resourceId_fkey" FOREIGN KEY ("resourceId") REFERENCES "datasets"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
6 |
--------------------------------------------------------------------------------
/matico_app_server/migrations/20220907192344_fixing_some_issues_with_colaborators/migration.sql:
--------------------------------------------------------------------------------
1 | -- DropForeignKey
2 | ALTER TABLE "collaborators" DROP CONSTRAINT "datasets_collaborators_resourceId_fkey";
3 |
4 | -- RenameForeignKey
5 | ALTER TABLE "collaborators" RENAME CONSTRAINT "apps_collaborators_resourceId_fkey" TO "collaborators_resourceId_fkey";
6 |
--------------------------------------------------------------------------------
/matico_app_server/migrations/20220912145017_/migration.sql:
--------------------------------------------------------------------------------
1 | -- AlterTable
2 | ALTER TABLE "collaborators" ALTER COLUMN "resourceType" DROP DEFAULT;
3 |
--------------------------------------------------------------------------------
/matico_app_server/migrations/20220912171056_removing_unique_constrint_on_colaborator/migration.sql:
--------------------------------------------------------------------------------
1 | -- DropIndex
2 | DROP INDEX "collaborators_userId_appId_datasetId_key";
3 |
--------------------------------------------------------------------------------
/matico_app_server/migrations/migration_lock.toml:
--------------------------------------------------------------------------------
1 | # Please do not edit this file manually
2 | # It should be added in your version-control system (i.e. Git)
3 | provider = "postgresql"
--------------------------------------------------------------------------------
/matico_app_server/pages/api/users/[userId].tsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_app_server/pages/api/users/[userId].tsx
--------------------------------------------------------------------------------
/matico_app_server/pages/api/users/index.ts:
--------------------------------------------------------------------------------
1 | import { NextApiRequest, NextApiResponse } from "next";
2 | import { prisma } from "../../../db";
3 |
4 | export default async function handler(
5 | req: NextApiRequest,
6 | res: NextApiResponse
7 | ) {
8 | if (req.method === "GET") {
9 | let query: any = {
10 | where: {},
11 | select: { name: true, id: true, createdAt: true, image: true },
12 | };
13 | if (req.query.hasOwnProperty("take")) {
14 | query.take = parseInt(req.query.take as string);
15 | }
16 | if (req.query.hasOwnProperty("search")) {
17 | query.where.name = { search: req.query.search };
18 | }
19 |
20 | let users = await prisma.user.findMany(query);
21 | res.status(200).json(users);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/matico_app_server/pages/users/[userId]/[appName].tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from "@adobe/react-spectrum";
2 | import { GetServerSideProps } from "next";
3 |
4 | export const getServerSideProps: GetServerSideProps = async (context) => {
5 | console.log("context ", context.params);
6 | return {
7 | props: {
8 | ...context.params,
9 | },
10 | };
11 | };
12 |
13 | const AppPage: React.FC<{ appName: string; userId: string }> = ({
14 | appName,
15 | userId,
16 | }) => {
17 | return (
18 |
19 | App Page
20 |
21 | );
22 | };
23 |
24 | export default AppPage;
25 |
--------------------------------------------------------------------------------
/matico_app_server/public/big_map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_app_server/public/big_map.png
--------------------------------------------------------------------------------
/matico_app_server/public/blank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_app_server/public/blank.png
--------------------------------------------------------------------------------
/matico_app_server/public/compute:
--------------------------------------------------------------------------------
1 | ../../matico_compute/
--------------------------------------------------------------------------------
/matico_app_server/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_app_server/public/favicon.ico
--------------------------------------------------------------------------------
/matico_app_server/public/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_app_server/public/logo.png
--------------------------------------------------------------------------------
/matico_app_server/public/map_sidebar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_app_server/public/map_sidebar.png
--------------------------------------------------------------------------------
/matico_app_server/styles/globals.css:
--------------------------------------------------------------------------------
1 | html,
2 | body {
3 | padding: 0;
4 | margin: 0;
5 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
6 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
7 | width: 100vw;
8 | height: 100vh;
9 | }
10 |
--------------------------------------------------------------------------------
/matico_app_server/templates/Blank.ts:
--------------------------------------------------------------------------------
1 | import { App } from "@maticoapp/types/spec";
2 |
3 | export const Blank: App = {
4 | pages: [],
5 | datasets: [],
6 | datasetTransforms: [],
7 | panes: [],
8 | metadata: {
9 | name: "A cool app!",
10 | description: "Make anything you want",
11 | id: "test_app",
12 | createdAt: new Date(),
13 | },
14 | };
15 |
--------------------------------------------------------------------------------
/matico_app_server/templates/index.ts:
--------------------------------------------------------------------------------
1 | import { Blank } from "./Blank";
2 | import { BigMap } from "./BigMap";
3 | import { MapWithSidebar } from "./MapWithSidebar";
4 |
5 | export const Templates = {
6 | Blank,
7 | BigMap,
8 | MapWithSidebar,
9 | };
10 |
--------------------------------------------------------------------------------
/matico_app_server/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2020",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "forceConsistentCasingInFileNames": true,
9 | "allowSyntheticDefaultImports": true,
10 | "noEmit": true,
11 | "esModuleInterop": true,
12 | "module": "esnext",
13 | "moduleResolution": "node",
14 | "resolveJsonModule": true,
15 | "removeComments": false,
16 | "isolatedModules": true,
17 | "jsx": "preserve",
18 | "incremental": true
19 | },
20 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
21 | "exclude": ["node_modules"]
22 | }
23 |
--------------------------------------------------------------------------------
/matico_app_server/utils/api.ts:
--------------------------------------------------------------------------------
1 | import useSwr from "swr";
2 |
3 | export interface ApiOptions {
4 | initialData?: any;
5 | params?: Record;
6 | }
7 |
8 | export const fetcher = async (url: string) => fetch(url).then((r) => r.json());
9 |
10 | export const useApi = (apiPath: string | null, options: ApiOptions) => {
11 | const { initialData, params } = options;
12 | let fullUrl = apiPath;
13 | if (params) {
14 | const paramString = Object.entries(params)
15 | .map(
16 | ([key, val]) => `${encodeURIComponent(key)}=${encodeURIComponent(val)}`
17 | )
18 | .join("&");
19 | fullUrl = `${fullUrl}?${paramString}`;
20 | }
21 | return useSwr(fullUrl, fetcher, { fallbackData: initialData });
22 | };
23 |
--------------------------------------------------------------------------------
/matico_charts/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | presets: [
3 | [
4 | '@babel/preset-env',
5 | {
6 | modules: false
7 | }
8 | ],
9 | '@babel/preset-react'
10 | ],
11 | plugins: [
12 | 'react-hot-loader/babel'
13 | ]
14 | }
--------------------------------------------------------------------------------
/matico_charts/.storybook/main.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
3 | addons: [],
4 | framework: "@storybook/react",
5 | };
6 |
--------------------------------------------------------------------------------
/matico_charts/README.md:
--------------------------------------------------------------------------------
1 | # MaticoCharts
2 |
3 | MaticoCharts is a library that wraps Visx for use in Matico.
4 |
--------------------------------------------------------------------------------
/matico_charts/scripts/dev.mjs:
--------------------------------------------------------------------------------
1 | import esbuild from "esbuild";
2 | import {outDir,pkg,options} from './options';
3 |
4 | esbuild
5 | .build({
6 | ...options,
7 | outfile: `${outDir}/index.js`,
8 | format:"esm",
9 | sourcemap:true,
10 | minify: false,
11 | external: [...Object.keys(pkg.dependencies), ...Object.keys(pkg.peerDependencies)],
12 | watch: true
13 | })
14 | .catch(() => process.exit(1));
15 |
--------------------------------------------------------------------------------
/matico_charts/src/Utils/utils.types.ts:
--------------------------------------------------------------------------------
1 | import { BooleanOrAxisSpec } from "../components/types";
2 |
3 | export interface MarginCalculation {
4 | xAxis: BooleanOrAxisSpec | undefined;
5 | yAxis: BooleanOrAxisSpec | undefined;
6 | xLabel: string | undefined;
7 | yLabel: string | undefined;
8 | attribution: string | undefined;
9 | title: string | undefined;
10 | subtitle: string | undefined;
11 | categorical: boolean | undefined;
12 | }
13 |
--------------------------------------------------------------------------------
/matico_charts/src/_stories/SampleStyling.js:
--------------------------------------------------------------------------------
1 | const PieChartColors = {
2 | "😀": "slateblue",
3 | "😂": "cyan",
4 | "🥰": "teal",
5 | "😎": "navy",
6 | };
7 |
8 | export { PieChartColors };
9 |
--------------------------------------------------------------------------------
/matico_charts/src/_stories/sample_data/sampleline.json:
--------------------------------------------------------------------------------
1 | {"type": "FeatureCollection",
2 | "features": [{
3 | "type": "Feature",
4 | "properties": {},
5 | "geometry": {
6 | "type": "LineString",
7 | "coordinates": [
8 | [102.0, 0.0],
9 | [103.0, 1.0],
10 | [104.0, 0.0],
11 | [105.0, 1.0]
12 | ]
13 | }
14 | }]
15 | }
--------------------------------------------------------------------------------
/matico_charts/src/_stories/sample_data/samplepoint.json:
--------------------------------------------------------------------------------
1 | {"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-38.67187499999999,71.18775391813158]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[57.30468749999999,60.326947742998414]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-5.2734375,27.839076094777816]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-36.2109375,50.958426723359935]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-42.71484375,62.103882522897855]}}]}
--------------------------------------------------------------------------------
/matico_charts/src/_stories/sample_data/samplerectangle-c.json:
--------------------------------------------------------------------------------
1 | {"type":"FeatureCollection", "features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[30.41015625,44.213709909702054],[30.41015625,58.81374171570782],[73.30078125,58.81374171570782],[73.30078125,44.213709909702054],[30.41015625,44.213709909702054]]]}}]}
--------------------------------------------------------------------------------
/matico_charts/src/_stories/sample_data/samplerectangle-cc.json:
--------------------------------------------------------------------------------
1 | {"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[30.41015625,44.213709909702054],[73.30078125,44.213709909702054],[73.30078125,58.81374171570782],[30.41015625,58.81374171570782],[30.41015625,44.213709909702054]]]}}]}
--------------------------------------------------------------------------------
/matico_charts/src/components/ChartSpace/CategoricalChartSpace.types.ts:
--------------------------------------------------------------------------------
1 | import { DataCollection, LayerSpec, MarginSpec } from "../types";
2 |
3 | export interface CategoricalChartSpaceSpec {
4 | data: DataCollection;
5 | layers: LayerSpec[];
6 | width: number;
7 | height: number;
8 | margin: MarginSpec;
9 | xMax: number;
10 | yMax: number;
11 | // inherited layout props, and the rest
12 | children: React.ReactNode;
13 | }
14 |
--------------------------------------------------------------------------------
/matico_charts/src/index.ts:
--------------------------------------------------------------------------------
1 | import MaticoChart from "./components/MaticoChart";
2 |
3 | export { MaticoChart };
4 |
--------------------------------------------------------------------------------
/matico_charts/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "strict": true,
5 | "skipLibCheck": true,
6 | "jsx": "react",
7 | "module": "ESNext",
8 | "declaration": true,
9 | "declarationDir": "types",
10 | "sourceMap": true,
11 | "outDir": "dist",
12 | "moduleResolution": "node",
13 | "emitDeclarationOnly": true,
14 | "allowSyntheticDefaultImports": true,
15 | "forceConsistentCasingInFileNames": true,
16 | },
17 | "exclude": [
18 | "dist",
19 | "node_modules",
20 | "src/**/*.test.tsx",
21 | "src/**/*.stories.tsx",
22 | ],
23 | }
--------------------------------------------------------------------------------
/matico_charts/types/Utils/utils.types.d.ts:
--------------------------------------------------------------------------------
1 | import { BooleanOrAxisSpec } from "../components/types";
2 | export interface MarginCalculation {
3 | xAxis: BooleanOrAxisSpec | undefined;
4 | yAxis: BooleanOrAxisSpec | undefined;
5 | xLabel: string | undefined;
6 | yLabel: string | undefined;
7 | attribution: string | undefined;
8 | title: string | undefined;
9 | subtitle: string | undefined;
10 | categorical: boolean | undefined;
11 | }
12 |
--------------------------------------------------------------------------------
/matico_charts/types/components/ChartSpace/CategoricalChartSpace.d.ts:
--------------------------------------------------------------------------------
1 | import { CategoricalChartSpaceSpec } from "./CategoricalChartSpace.types";
2 | export default function CategoricalChartSpace({
3 | data,
4 | layers,
5 | width,
6 | height,
7 | margin,
8 | children,
9 | xMax,
10 | yMax,
11 | ...rest
12 | }: CategoricalChartSpaceSpec): JSX.Element;
13 |
--------------------------------------------------------------------------------
/matico_charts/types/components/ChartSpace/CategoricalChartSpace.types.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | import { DataCollection, LayerSpec, MarginSpec } from "../types";
3 | export interface CategoricalChartSpaceSpec {
4 | data: DataCollection;
5 | layers: LayerSpec[];
6 | width: number;
7 | height: number;
8 | margin: MarginSpec;
9 | xMax: number;
10 | yMax: number;
11 | children: React.ReactNode;
12 | }
13 |
--------------------------------------------------------------------------------
/matico_charts/types/components/ChartSpace/ContinuousChartSpace.d.ts:
--------------------------------------------------------------------------------
1 | import { ContinuousChartSpaceProps } from "./ContinuousChartSpace.types";
2 | export default function ContinuousChartspace({
3 | data,
4 | layers,
5 | xCol,
6 | tickFormatFunc,
7 | xAxis,
8 | xAxisPos,
9 | xLabel,
10 | xMax,
11 | xExtent,
12 | yCol,
13 | yAxis,
14 | yAxisPos,
15 | yLabel,
16 | yMax,
17 | yExtent,
18 | grid,
19 | width,
20 | height,
21 | margin,
22 | useBrush,
23 | onBrush,
24 | children,
25 | ...rest
26 | }: ContinuousChartSpaceProps): JSX.Element | null;
27 |
--------------------------------------------------------------------------------
/matico_charts/types/components/ChartSpace/PlotLayers.d.ts:
--------------------------------------------------------------------------------
1 | import { DataCollection, LayerSpec } from "../types";
2 | interface PlotLayersSpec {
3 | data: DataCollection;
4 | layers: LayerSpec[];
5 | xMax: number;
6 | yMax: number;
7 | }
8 | export default function PlotLayers({
9 | data,
10 | layers,
11 | xMax,
12 | yMax,
13 | ...rest
14 | }: PlotLayersSpec): JSX.Element | null;
15 | export {};
16 |
--------------------------------------------------------------------------------
/matico_charts/types/components/ChartSpace/index.d.ts:
--------------------------------------------------------------------------------
1 | import { ChartSpaceSpec } from "../types";
2 | export default function ChartSpace({
3 | xAxis,
4 | yAxis,
5 | xLabel,
6 | yLabel,
7 | title,
8 | subtitle,
9 | attribution,
10 | dimensions,
11 | categorical,
12 | ...rest
13 | }: ChartSpaceSpec): JSX.Element;
14 |
--------------------------------------------------------------------------------
/matico_charts/types/components/MaticoChart.d.ts:
--------------------------------------------------------------------------------
1 | import { ChartSpaceSpec } from "./types";
2 | export default function MaticoChart(props: ChartSpaceSpec): JSX.Element;
3 |
--------------------------------------------------------------------------------
/matico_charts/types/components/Plots/BarComponent/index.d.ts:
--------------------------------------------------------------------------------
1 | import { BarSpec, PlotLayersProperties } from "../../types";
2 | export declare const BarComponent: (
3 | props: BarSpec & PlotLayersProperties
4 | ) => JSX.Element[];
5 |
--------------------------------------------------------------------------------
/matico_charts/types/components/Plots/DistributionPlotComponent/index.d.ts:
--------------------------------------------------------------------------------
1 | import { DistributionSpec, PlotLayersProperties } from "../../types";
2 | export declare type StatsPlotProps = {
3 | width: number;
4 | height: number;
5 | };
6 | export declare const DistributionPlotComponent: (
7 | props: DistributionSpec & PlotLayersProperties
8 | ) => JSX.Element;
9 |
--------------------------------------------------------------------------------
/matico_charts/types/components/Plots/HeatmapComponent/index.d.ts:
--------------------------------------------------------------------------------
1 | import { HeatmapSpec, PlotLayersProperties } from "../../types";
2 | export declare const HeatmapComponent: (
3 | props: HeatmapSpec & PlotLayersProperties
4 | ) => JSX.Element | null;
5 |
--------------------------------------------------------------------------------
/matico_charts/types/components/Plots/LineComponent/index.d.ts:
--------------------------------------------------------------------------------
1 | import { LineSpec, PlotLayersProperties } from "../../types";
2 | export declare const intervalPartitioner: (interval: number[]) => number[];
3 | export declare const LineComponent: (
4 | props: LineSpec & PlotLayersProperties
5 | ) => JSX.Element | null;
6 |
--------------------------------------------------------------------------------
/matico_charts/types/components/Plots/PieChartComponent/index.d.ts:
--------------------------------------------------------------------------------
1 | import { PieSpec, PlotLayersProperties } from "../../types";
2 | export declare const PieChartComponent: (
3 | props: PieSpec & PlotLayersProperties
4 | ) => JSX.Element;
5 |
--------------------------------------------------------------------------------
/matico_charts/types/components/Plots/ScatterplotComponent/index.d.ts:
--------------------------------------------------------------------------------
1 | import { PlotLayersProperties, ScatterSpec } from "../../types";
2 | export declare const ScatterplotComponent: ({
3 | data,
4 | xScale,
5 | yScale,
6 | xAccessor,
7 | yAccessor,
8 | color,
9 | scale,
10 | shape,
11 | xOffset,
12 | yOffset,
13 | }: ScatterSpec & PlotLayersProperties) => JSX.Element | null;
14 |
--------------------------------------------------------------------------------
/matico_charts/types/components/Plots/StaticMapComponent/index.d.ts:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import { StaticMapSpec, PlotLayersProperties } from "../../types";
3 | declare module "react" {
4 | interface StyleHTMLAttributes extends React.HTMLAttributes {
5 | jsx?: boolean;
6 | global?: boolean;
7 | }
8 | }
9 | export declare type ColorSpecification =
10 | | {
11 | rgba: Array;
12 | }
13 | | {
14 | rgb: Array;
15 | }
16 | | {
17 | named: string;
18 | }
19 | | {
20 | hex: string;
21 | };
22 | export declare const StaticMapComponent: React.FC<
23 | StaticMapSpec & PlotLayersProperties
24 | >;
25 |
--------------------------------------------------------------------------------
/matico_charts/types/index.d.ts:
--------------------------------------------------------------------------------
1 | import MaticoChart from "./components/MaticoChart";
2 | export { MaticoChart };
3 |
--------------------------------------------------------------------------------
/matico_common/src/autocomplete.rs:
--------------------------------------------------------------------------------
1 | pub trait AutoComplete {
2 | fn autocomplete_json() -> String;
3 | }
4 |
--------------------------------------------------------------------------------
/matico_common/src/compute/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod errors;
2 | pub mod options;
3 | pub mod variables;
4 |
5 | pub use errors::*;
6 | pub use options::*;
7 | pub use variables::*;
8 |
--------------------------------------------------------------------------------
/matico_common/src/lib.rs:
--------------------------------------------------------------------------------
1 | pub mod autocomplete;
2 | pub mod compute;
3 | pub mod filters;
4 | pub mod variables;
5 |
6 | pub use autocomplete::*;
7 | pub use compute::*;
8 | pub use filters::*;
9 | pub use variables::*;
10 |
--------------------------------------------------------------------------------
/matico_components/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | presets: [
3 | [
4 | '@babel/preset-env',
5 | {
6 | modules: false
7 | }
8 | ],
9 | '@babel/preset-react'
10 | ],
11 | plugins: [
12 | 'react-hot-loader/babel'
13 | ]
14 | }
--------------------------------------------------------------------------------
/matico_components/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | .cache/
3 | coverage/
4 | dist/*
5 | !dist/index.html
6 | node_modules/
7 | *.log
8 |
9 | # OS generated files
10 | .DS_Store
11 | .DS_Store?
12 | ._*
13 | .Spotlight-V100
14 | .Trashes
15 | ehthumbs.db
16 | Thumbs.db
17 |
--------------------------------------------------------------------------------
/matico_components/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma":"none",
3 | "tabWidth": 4,
4 | "semi": true,
5 | "singleQuote": false
6 | }
--------------------------------------------------------------------------------
/matico_components/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [require("autoprefixer")]
3 | };
4 |
--------------------------------------------------------------------------------
/matico_components/scripts/dev.mjs:
--------------------------------------------------------------------------------
1 | import esbuild from "esbuild";
2 | import { outDir, pkg, options } from './options';
3 |
4 | let context = await esbuild
5 | .context({
6 | ...options,
7 | outfile: `${outDir}/index.js`,
8 | format: "esm",
9 | sourcemap: true,
10 | minify: false,
11 | external: [...Object.keys(pkg.dependencies), ...Object.keys(pkg.peerDependencies)],
12 | })
13 | .catch(() => process.exit(1));
14 |
15 | await context.watch()
16 |
--------------------------------------------------------------------------------
/matico_components/src/Components/Controls/index.ts:
--------------------------------------------------------------------------------
1 | export interface MaticoControl {
2 | initalValue: any;
3 | type: string;
4 | }
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoApp/MaticoAppStyles.tsx:
--------------------------------------------------------------------------------
1 | import styled from "styled-components";
2 |
3 | const MaticoApp = styled.div`
4 | width: 100%;
5 | height: 100%;
6 | background-color: #eef8f7;
7 | `;
8 |
9 | export const Styles = {
10 | MaticoApp
11 | };
12 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/CollapsibleSection/index.tsx:
--------------------------------------------------------------------------------
1 | import { CollapsibleSectionProps } from "./types";
2 | import { CollapsibleSection } from "./CollapsibleSection";
3 |
4 | export { CollapsibleSection, CollapsibleSectionProps };
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/ColorVariableEditor/index.tsx:
--------------------------------------------------------------------------------
1 | import { ColorVariableEditorProps } from "./types";
2 | import { ColorVariableEditor } from "./ColorVariableEditor";
3 |
4 | export { ColorVariableEditor, ColorVariableEditorProps };
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/ColorVariableEditor/types.ts:
--------------------------------------------------------------------------------
1 | import { ColorSpecification, MappingVarOr } from "@maticoapp/matico_types/spec";
2 |
3 | export type ColorVariableEditorProps = {
4 | label: string;
5 | style: MappingVarOr;
6 | datasetName: string;
7 | columns: { name: string; type: string }[];
8 | onUpdateStyle: (style: string | { [key: string]: any }) => void;
9 | };
10 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/CompactHorizontalButton/CompactHorizontalButton.tsx:
--------------------------------------------------------------------------------
1 | import { Button } from "@adobe/react-spectrum";
2 | import styled from "styled-components";
3 | import { SpectrumButtonProps } from "@react-types/button";
4 |
5 | export const CompactHorizontalButton: typeof Button = styled(
6 | Button
7 | )`
8 | border-radius: 0 !important;
9 | background: var(--spectrum-global-color-gray-300) !important;
10 | color: var(--spectrum-global-color-gray-900) !important;
11 | span {
12 | text-align: left !important;
13 | }
14 | `;
15 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/CompactHorizontalButton/index.tsx:
--------------------------------------------------------------------------------
1 | import { CompactHorizontalButton } from "./CompactHorizontalButton";
2 |
3 | export { CompactHorizontalButton };
4 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/DatasetTransformEditor/FilterStep/index.ts:
--------------------------------------------------------------------------------
1 | import { CategoryFilter } from "./CategoryFilter";
2 | import { DateRangeFilterEditor } from "./DateRangeFilterEditor";
3 | import { FilterStepEditor } from "./FilterStep";
4 | import { FilterTypeDialog } from "./FilterTypeDialog";
5 | import { RangeFilterEditor } from "./RangeFilterEditor";
6 |
7 | export {
8 | CategoryFilter,
9 | DateRangeFilterEditor,
10 | FilterTypeDialog,
11 | RangeFilterEditor,
12 | FilterStepEditor
13 | };
14 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/DatasetTransformEditor/index.ts:
--------------------------------------------------------------------------------
1 | import { DatasetTransformEditor } from "./DatasetTransformEditor";
2 | import { DatasetTransformDialog } from "./DatasetTransformDialog";
3 |
4 | export { DatasetTransformEditor, DatasetTransformDialog };
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/GatedAction/index.tsx:
--------------------------------------------------------------------------------
1 | import { GatedActionProps } from "./types";
2 | import { GatedAction } from "./GatedAction";
3 |
4 | export { GatedAction, GatedActionProps };
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/GeoBoundsSelector/index.tsx:
--------------------------------------------------------------------------------
1 | import { GeoBoundsSelectorProps } from "./types";
2 | import { GeoBoundsSelector } from "./GeoBoundsSelector";
3 |
4 | export { GeoBoundsSelector, GeoBoundsSelectorProps };
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/GeoBoundsSelector/types.ts:
--------------------------------------------------------------------------------
1 | export type MapView = {
2 | lat: number;
3 | lng: number;
4 | zoom: number;
5 | bearing: number;
6 | pitch: number;
7 | };
8 |
9 | export type GeoBoundsSelectorProps = {
10 | updateView: (mapview: MapView) => void;
11 | mapView: MapView;
12 | };
13 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/LabelGroup/index.tsx:
--------------------------------------------------------------------------------
1 | import { LabelGroupSpec } from "./types";
2 | import { LabelGroup } from "./LabelGroup";
3 |
4 | export { LabelGroup, LabelGroupSpec };
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/LabelGroup/types.ts:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export interface LabelGroupSpec {
4 | target: string;
5 | children?: React.ReactNode;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/LoadingSpinner/LoadingSpinner.tsx:
--------------------------------------------------------------------------------
1 | import { Flex, ProgressCircle } from "@adobe/react-spectrum";
2 | import React from "react";
3 |
4 | export const LoadingSpinner: React.FC = () => {
5 | return (
6 |
12 |
17 |
18 | );
19 | };
20 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/ManualVariableComboBox/index.tsx:
--------------------------------------------------------------------------------
1 | import { ManualVariableComboBox } from "./ManualVariableComboBox";
2 | import { ManualVariableComboBoxProps } from "./types";
3 |
4 | export { ManualVariableComboBox, ManualVariableComboBoxProps };
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/ManualVariableComboBox/types.ts:
--------------------------------------------------------------------------------
1 | import { ReactNode } from "react";
2 |
3 | export type ManualVariableComboBoxProps = {
4 | label: string;
5 | columns: { name: string; type: string }[];
6 | onChange: (value: string) => void;
7 | style: { [variable: string]: string } | any;
8 | manualIcon?: ReactNode;
9 | isManual: boolean;
10 | isDataDriven: boolean;
11 | isNone: boolean;
12 | };
13 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/MetaPanel/MetaPanel.tsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_components/src/Components/MaticoEditor/EditorComponents/MetaPanel/MetaPanel.tsx
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/MetaPanel/index.tsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_components/src/Components/MaticoEditor/EditorComponents/MetaPanel/index.tsx
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/MetaPanel/types.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_components/src/Components/MaticoEditor/EditorComponents/MetaPanel/types.ts
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/NavigatorBar/index.tsx:
--------------------------------------------------------------------------------
1 | import { NavigatorBar } from "./NavigatorBar";
2 | import { NavigatorBarProps } from "./types";
3 |
4 | export { NavigatorBar, NavigatorBarProps };
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/NavigatorBar/types.ts:
--------------------------------------------------------------------------------
1 | import { DatasetProvider } from "index";
2 |
3 | export type NavigatorBarProps = {
4 | datasetProviders?: Array;
5 | };
6 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/NumericEditor/index.tsx:
--------------------------------------------------------------------------------
1 | import { NumericEditor } from "./NumericEditor";
2 | import { NumericEditorProps } from "./types";
3 |
4 | export { NumericEditor, NumericEditorProps };
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/NumericEditor/types.ts:
--------------------------------------------------------------------------------
1 | export type NumericEditorProps = {
2 | label: string;
3 | value: number;
4 | step?: number;
5 | units?: string;
6 | unitsOptions?: {
7 | label: string;
8 | value: string;
9 | }[];
10 | onValueChange: (value: number) => void;
11 | onUnitsChange?: (unit: string) => void;
12 | isDisabled?: boolean;
13 | };
14 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/OptionsPopper/index.tsx:
--------------------------------------------------------------------------------
1 | import { OptionsPopperProps } from "./types";
2 | import { OptionsPopper } from "./OptionsPopper";
3 |
4 | export { OptionsPopper, OptionsPopperProps };
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/OptionsPopper/types.ts:
--------------------------------------------------------------------------------
1 | export type OptionsPopperProps = {
2 | title: string;
3 | children: React.ReactNode;
4 | };
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/RangeSelector/RangeSelector.tsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_components/src/Components/MaticoEditor/EditorComponents/RangeSelector/RangeSelector.tsx
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/RangeSelector/index.tsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_components/src/Components/MaticoEditor/EditorComponents/RangeSelector/index.tsx
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/RangeSelector/types.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_components/src/Components/MaticoEditor/EditorComponents/RangeSelector/types.ts
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SliderUnitSelector/index.tsx:
--------------------------------------------------------------------------------
1 | import { SliderUnitSelectorProps } from "./types";
2 | import { SliderUnitSelector } from "./SliderUnitSelector";
3 |
4 | export { SliderUnitSelector, SliderUnitSelectorProps };
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SliderUnitSelector/types.ts:
--------------------------------------------------------------------------------
1 | export type SliderUnitSelectorProps = {
2 | label: string;
3 | value: number;
4 | sliderMin: number;
5 | sliderMax: number;
6 | sliderStep: number;
7 | onUpdateValue: (style: number | { [key: string]: any }) => void;
8 | sliderUnits?: string;
9 | sliderUnitsOptions?: {
10 | key: string;
11 | label: string;
12 | }[];
13 | onUpdateUnits?: (value: string) => void;
14 | };
15 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SliderVariableEditor/index.tsx:
--------------------------------------------------------------------------------
1 | import { SliderVariableEditorProps } from "./types";
2 | import { SliderVariableEditor } from "./SliderVariableEditor";
3 |
4 | export { SliderVariableEditor, SliderVariableEditorProps };
5 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SliderVariableEditor/types.ts:
--------------------------------------------------------------------------------
1 | export type SliderVariableEditorProps = {
2 | label: string;
3 | style: number | { [key: string]: any };
4 | datasetName: string;
5 | columns: { name: string; type: string }[];
6 | sliderMin?: number;
7 | sliderMax?: number;
8 | sliderStep?: number;
9 | onUpdateValue: (style: number | { [key: string]: any }) => void;
10 | sliderUnits?: string;
11 | sliderUnitsOptions?: {
12 | key: string;
13 | label: string;
14 | }[];
15 | onUpdateUnits?: (value: string) => void;
16 | };
17 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Button/Button.module.css:
--------------------------------------------------------------------------------
1 | .Button {
2 | padding: 14px 20px;
3 | border: none;
4 | background-color: #242836;
5 | border-radius: 8px;
6 | font-size: 14px;
7 | font-weight: 600;
8 | color: #f6f8ff;
9 | cursor: pointer;
10 | outline: none;
11 | transform: scale(1);
12 | transition: transform 0.2s, background 0.4s;
13 |
14 | &:hover,
15 | &:focus {
16 | background-color: #2f3545;
17 | transform: scale(1.02);
18 | }
19 |
20 | &:focus {
21 | box-shadow: 0 0 0 4px #4c9ffe;
22 | }
23 |
24 | &:active {
25 | transform: scale(0.95);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Button/Button.tsx:
--------------------------------------------------------------------------------
1 | import React, { HTMLAttributes } from "react";
2 | import classNames from "classnames";
3 |
4 | import styles from "./Button.module.css";
5 |
6 | export interface Props extends HTMLAttributes {
7 | children: React.ReactNode;
8 | }
9 |
10 | export function Button({ children, ...props }: Props) {
11 | return (
12 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Button/index.ts:
--------------------------------------------------------------------------------
1 | export { Button } from "./Button";
2 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/ConfirmModal/ConfirmModal.tsx:
--------------------------------------------------------------------------------
1 | import React, { PropsWithChildren } from "react";
2 | import styles from "./ConfirmModal.module.css";
3 |
4 | interface Props {
5 | onConfirm(): void;
6 | onDeny(): void;
7 | }
8 |
9 | export const ConfirmModal = ({
10 | onConfirm,
11 | onDeny,
12 | children
13 | }: PropsWithChildren) => (
14 |
15 |
{children}
16 |
17 |
18 |
19 |
20 |
21 | );
22 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/ConfirmModal/index.ts:
--------------------------------------------------------------------------------
1 | export { ConfirmModal } from "./ConfirmModal";
2 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Container/index.ts:
--------------------------------------------------------------------------------
1 | export { Container } from "./Container";
2 | export type { Props as ContainerProps } from "./Container";
3 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Draggable/index.ts:
--------------------------------------------------------------------------------
1 | export { Axis, Draggable } from "./Draggable";
2 | export { DraggableOverlay } from "./DraggableOverlay";
3 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Droppable/index.ts:
--------------------------------------------------------------------------------
1 | export { Droppable } from "./Droppable";
2 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/FloatingControls/FloatingControls.module.css:
--------------------------------------------------------------------------------
1 | .FloatingControls {
2 | position: fixed;
3 | top: 25px;
4 | right: 25px;
5 | }
6 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/FloatingControls/FloatingControls.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import classNames from "classnames";
3 |
4 | import styles from "./FloatingControls.module.css";
5 |
6 | export interface Props {
7 | children: React.ReactNode;
8 | }
9 |
10 | export function FloatingControls({ children }: Props) {
11 | return (
12 | {children}
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/FloatingControls/index.ts:
--------------------------------------------------------------------------------
1 | export { FloatingControls } from "./FloatingControls";
2 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Grid/Grid.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import styles from "./Grid.module.css";
4 |
5 | export interface Props {
6 | size: number;
7 | step?: number;
8 | onSizeChange(size: number): void;
9 | }
10 |
11 | export function Grid({ size }: Props) {
12 | return (
13 |
21 | );
22 | }
23 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Grid/index.ts:
--------------------------------------------------------------------------------
1 | export { Grid } from "./Grid";
2 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/GridContainer/GridContainer.module.css:
--------------------------------------------------------------------------------
1 | .GridContainer {
2 | max-width: 800px;
3 | display: grid;
4 | grid-template-columns: repeat(var(--col-count), 1fr);
5 | grid-gap: 10px;
6 | padding: 20px;
7 |
8 | @media (max-width: 850px) {
9 | grid-template-columns: repeat(calc(var(--col-count) - 1), 1fr);
10 | }
11 |
12 | @media (max-width: 650px) {
13 | grid-template-columns: repeat(calc(var(--col-count) - 2), 1fr);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/GridContainer/GridContainer.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import styles from "./GridContainer.module.css";
4 |
5 | export interface Props {
6 | children: React.ReactNode;
7 | columns: number;
8 | }
9 |
10 | export function GridContainer({ children, columns }: Props) {
11 | return (
12 |
22 | );
23 | }
24 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/GridContainer/index.ts:
--------------------------------------------------------------------------------
1 | export { GridContainer } from "./GridContainer";
2 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Item/Item.module.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Item/Item.module.css
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Item/components/Action/index.ts:
--------------------------------------------------------------------------------
1 | export { Action } from "./Action";
2 | export type { Props as ActionProps } from "./Action";
3 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Item/components/Handle/index.ts:
--------------------------------------------------------------------------------
1 | export { Handle } from "./Handle";
2 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Item/components/Remove/index.ts:
--------------------------------------------------------------------------------
1 | export { Remove } from "./Remove";
2 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Item/components/index.ts:
--------------------------------------------------------------------------------
1 | export { Action } from "./Action";
2 | export { Handle } from "./Handle";
3 | export { Remove } from "./Remove";
4 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Item/index.ts:
--------------------------------------------------------------------------------
1 | export { Item } from "./Item";
2 | export { Action, Handle, Remove } from "./components";
3 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/List/List.module.css:
--------------------------------------------------------------------------------
1 | .List {
2 | display: grid;
3 | grid-auto-rows: max-content;
4 | box-sizing: border-box;
5 | min-width: 350px;
6 | grid-gap: 10px;
7 | padding: 20px;
8 | padding-bottom: 0;
9 | margin: 10px;
10 | border-radius: 5px;
11 | min-height: 200px;
12 | transition: background-color 350ms ease;
13 | grid-template-columns: repeat(var(--columns, 1), 1fr);
14 |
15 | &:after {
16 | content: "";
17 | height: 10px;
18 | grid-column-start: span var(--columns, 1);
19 | }
20 |
21 | &.horizontal {
22 | width: 100%;
23 | grid-auto-flow: column;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/List/index.ts:
--------------------------------------------------------------------------------
1 | export { List } from "./List";
2 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/OverflowWrapper/OverflowWrapper.module.css:
--------------------------------------------------------------------------------
1 | .OverflowWrapper {
2 | position: absolute;
3 | top: 0;
4 | left: 0;
5 | bottom: 0;
6 | right: 0;
7 | overflow: hidden;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/OverflowWrapper/OverflowWrapper.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import styles from "./OverflowWrapper.module.css";
4 |
5 | interface Props {
6 | children: React.ReactNode;
7 | }
8 |
9 | export function OverflowWrapper({ children }: Props) {
10 | return {children}
;
11 | }
12 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/OverflowWrapper/index.ts:
--------------------------------------------------------------------------------
1 | export { OverflowWrapper } from "./OverflowWrapper";
2 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Wrapper/Wrapper.module.css:
--------------------------------------------------------------------------------
1 | .Wrapper {
2 | display: flex;
3 | width: 100%;
4 | box-sizing: border-box;
5 | padding: 20px;
6 | justify-content: flex-start;
7 |
8 | &.center {
9 | justify-content: center;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Wrapper/Wrapper.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import classNames from "classnames";
3 |
4 | import styles from "./Wrapper.module.css";
5 |
6 | interface Props {
7 | children: React.ReactNode;
8 | center?: boolean;
9 | style?: React.CSSProperties;
10 | }
11 |
12 | export function Wrapper({ children, center, style }: Props) {
13 | return (
14 |
18 | {children}
19 |
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/Wrapper/index.ts:
--------------------------------------------------------------------------------
1 | export { Wrapper } from "./Wrapper";
2 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/components/index.ts:
--------------------------------------------------------------------------------
1 | export { Button } from "./Button";
2 | export { ConfirmModal } from "./ConfirmModal";
3 | export { Container } from "./Container";
4 | export type { ContainerProps } from "./Container";
5 | export { Axis, Draggable, DraggableOverlay } from "./Draggable";
6 | export { Droppable } from "./Droppable";
7 | export { Item, Action, Handle, Remove } from "./Item";
8 | export { FloatingControls } from "./FloatingControls";
9 | export { Grid } from "./Grid";
10 | export { GridContainer } from "./GridContainer";
11 | export { List } from "./List";
12 | export { OverflowWrapper } from "./OverflowWrapper";
13 | export { Wrapper } from "./Wrapper";
14 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/utilities/createRange.ts:
--------------------------------------------------------------------------------
1 | const defaultInitializer = (index: number) => index;
2 |
3 | export function createRange(
4 | length: number,
5 | initializer: (index: number) => any = defaultInitializer
6 | ): T[] {
7 | return [...new Array(length)].map((_, index) => initializer(index));
8 | }
9 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/EditorComponents/SortableDraggableList/utilities/index.ts:
--------------------------------------------------------------------------------
1 | export { createRange } from "./createRange";
2 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/Panes/MaticoOutlineViewer/DraggingContext.tsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_components/src/Components/MaticoEditor/Panes/MaticoOutlineViewer/DraggingContext.tsx
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/Panes/MaticoOutlineViewer/PageContext.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const PageContext = React.createContext({
4 | navigateToPage: () => null
5 | });
6 |
7 | export const PageProvider: React.FC<{
8 | navigateToPage: any;
9 | children: React.ReactNode;
10 | }> = ({ navigateToPage, children }) => {
11 | return (
12 |
13 | {children}
14 |
15 | );
16 | };
17 |
18 | export const usePageContext = () => {
19 | const ctx = React.useContext(PageContext);
20 | if (ctx === undefined) throw Error("Not wrapped in .");
21 | return ctx;
22 | };
23 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/Panes/MaticoOutlineViewer/index.tsx:
--------------------------------------------------------------------------------
1 | import { MaticoOutlineViewer } from "./MaticoOutlineViewer";
2 |
3 | export { MaticoOutlineViewer };
4 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/Utils/DataDrivenModel/index.ts:
--------------------------------------------------------------------------------
1 | import { Filter, Mapping } from "@maticoapp/matico_types/spec";
2 | import { Column, DatasetSummary } from "Datasets/Dataset";
3 |
4 | export { DataDrivenModal } from "./DataDrivenModal";
5 | export interface DomainEditorProps {
6 | column: Column;
7 | dataset: DatasetSummary;
8 | rangeType: "color" | "value";
9 | filters: Array;
10 | mapping: Mapping;
11 | onUpdateMapping: (newMapping: any) => void;
12 | }
13 |
--------------------------------------------------------------------------------
/matico_components/src/Components/MaticoEditor/Utils/DefaultGrid.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Grid, repeat } from "@adobe/react-spectrum";
3 |
4 | export function DefaultGrid(props: any) {
5 | const { children } = props;
6 | return (
7 |
14 | {children}
15 |
16 | );
17 | }
18 |
--------------------------------------------------------------------------------
/matico_components/src/Components/Panes/MaticoCategorySelectorPane/defaults.ts:
--------------------------------------------------------------------------------
1 | import { CategorySelectiorPane } from "@maticoapp/matico_types/spec";
2 |
3 | export const defaults: Partial = {
4 | dataset: { name: "unknown", filters: [] },
5 | column: null,
6 | name: "Selection"
7 | };
8 |
--------------------------------------------------------------------------------
/matico_components/src/Components/Panes/MaticoCategorySelectorPane/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { PaneParts } from "../PaneParts";
3 | import { MaticoCategorySelector } from "./MaticoCategorySelectorPane";
4 | import { CategorySelectorEditor } from "./CategorySelectorEditior";
5 | import { defaults } from "./defaults";
6 | import Condition from "@spectrum-icons/workflow/Condition";
7 |
8 | export const MaticoCategorySelectorPaneComponents: PaneParts = {
9 | pane: MaticoCategorySelector,
10 | sidebarPane: CategorySelectorEditor,
11 | icon: Condition,
12 | defaults,
13 | docs: "https://www.matico.app/docs/panes/category_selector"
14 | };
15 |
--------------------------------------------------------------------------------
/matico_components/src/Components/Panes/MaticoSwitchesPane/defaults.ts:
--------------------------------------------------------------------------------
1 | import { SwitchesPane } from "@maticoapp/matico_types/spec";
2 |
3 | export const defaults: Partial = {
4 | name: "Switches",
5 | options: [],
6 | orientation: "row"
7 | };
8 |
--------------------------------------------------------------------------------
/matico_components/src/Components/Panes/MaticoSwitchesPane/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { PaneParts } from "../PaneParts";
3 | import { MaticoSwitchesPane } from "./MaitcoSwitchesPane";
4 | import { SwitchesPaneEditor } from "./SwitchesPaneEditor";
5 | import { defaults } from "./defaults";
6 | import Boolean from "@spectrum-icons/workflow/Boolean";
7 |
8 | export const MaticoSwitchesPaneComponents: PaneParts = {
9 | pane: MaticoSwitchesPane,
10 | sidebarPane: SwitchesPaneEditor,
11 | icon: Boolean,
12 | defaults,
13 | docs: "https://www.matico.app/docs/panes/switches"
14 | };
15 |
--------------------------------------------------------------------------------
/matico_components/src/Components/Panes/MaticoTextPane/defaults.ts:
--------------------------------------------------------------------------------
1 | import { TextPane } from "@maticoapp/matico_types/spec";
2 |
3 | export const defaults: Partial = {
4 | content:
5 | '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Your text here...","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}',
6 | name: "Text Pane",
7 | background: { hex: "#FFFFFF" }
8 | };
9 |
--------------------------------------------------------------------------------
/matico_components/src/Components/Panes/MaticoTextPane/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { PaneParts } from "../PaneParts";
3 | import { MaticoTextPane } from "./MaticoTextPane";
4 | import { EditableMaticoTextPane } from "./EditableMaticoTextPane";
5 | import { TextPaneEditor } from "./MaticoTextPaneEditor";
6 | import { defaults } from "./defaults";
7 | import TextIcon from "@spectrum-icons/workflow/Text";
8 |
9 | export const MaticoTextPaneComponents: PaneParts = {
10 | pane: MaticoTextPane,
11 | editablePane: EditableMaticoTextPane,
12 | sidebarPane: TextPaneEditor,
13 | icon: TextIcon,
14 | defaults,
15 | docs: "https://www.matico.app/docs/panes/text"
16 | };
17 |
--------------------------------------------------------------------------------
/matico_components/src/Components/Panes/PaneParts.ts:
--------------------------------------------------------------------------------
1 | export interface PaneParts {
2 | pane: React.FC;
3 | editablePane?: React.FC;
4 | sidebarPane: React.FC;
5 | icon: React.FC | JSX.Element;
6 | defaults: { [key: string]: any };
7 | docs: string;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_components/src/Datasets/COGBuilder.ts:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { COGDataset } from "./COGDataset";
3 | import { COGDataset as COGDatasetSpec } from "@maticoapp/matico_types/spec";
4 |
5 | export const COGBuilder = (details: COGDatasetSpec) => {
6 | const { name, url } = details;
7 |
8 | return new COGDataset(name, url, "");
9 | };
10 |
--------------------------------------------------------------------------------
/matico_components/src/Datasets/DatasetServiceWorker.worker.ts:
--------------------------------------------------------------------------------
1 | import { expose } from "comlink";
2 |
3 | import { DatasetService } from "Datasets/DatasetService";
4 |
5 | expose(DatasetService);
6 |
--------------------------------------------------------------------------------
/matico_components/src/Datasets/MaticoRemoteApiBuilder.ts:
--------------------------------------------------------------------------------
1 | import { MaticoRemoteApi } from "./MaticoRemoteApi";
2 | import { MaticoApiDataset } from "@maticoapp/matico_types/spec";
3 |
4 | export const MaticoRemoteApiBuilder = async (details: MaticoApiDataset) => {
5 | const { name, serverUrl, apiId, params } = details;
6 |
7 | return new MaticoRemoteApi(name, apiId, serverUrl, params);
8 | };
9 |
--------------------------------------------------------------------------------
/matico_components/src/Datasets/MaticoRemoteBuilder.ts:
--------------------------------------------------------------------------------
1 | import { MaticoRemoteDataset } from "./MaticoRemoteDataset";
2 | import { MaticoRemoteDataset as MaticoRemoteDatasetSpec } from "@maticoapp/matico_types/spec";
3 |
4 | export const MaticoRemoteBuilder = async (details: MaticoRemoteDatasetSpec) => {
5 | const { name, serverUrl, datasetId } = details;
6 |
7 | return new MaticoRemoteDataset(name, datasetId, serverUrl);
8 | };
9 |
--------------------------------------------------------------------------------
/matico_components/src/Hooks/redux.ts:
--------------------------------------------------------------------------------
1 | import { TypedUseSelectorHook, useDispatch, useSelector } from "react-redux";
2 | import type { MaticoState, MaticoDispatch } from "../Stores/MaticoStore";
3 |
4 | export const useMaticoDispatch = () => useDispatch();
5 | export const useMaticoSelector: TypedUseSelectorHook = useSelector;
6 |
--------------------------------------------------------------------------------
/matico_components/src/Hooks/useDatasetActions.ts:
--------------------------------------------------------------------------------
1 | import { useMaticoDispatch, useMaticoSelector } from "./redux";
2 | import { updateDatasetSpec, removeDataset } from "Stores/MaticoSpecSlice";
3 |
4 | export const useDatasetActions = (name: string) => {
5 | const datasets = useMaticoSelector((s) => s.datasets);
6 | const dispatch = useMaticoDispatch();
7 |
8 | const updateDataset = (name: string, spec: any) => {
9 | dispatch(updateDatasetSpec({ name, datasetSpec: spec }));
10 | };
11 | const _removeDataset = (name: string) => {
12 | dispatch(removeDataset({ name }));
13 | };
14 | return { updateDataset, removeDataset: _removeDataset };
15 | };
16 |
--------------------------------------------------------------------------------
/matico_components/src/Hooks/useEditorActions.ts:
--------------------------------------------------------------------------------
1 | import { useMaticoDispatch, useMaticoSelector } from "./redux";
2 | import { setHoveredRef } from "Stores/editorSlice";
3 |
4 | export const useEditorActions = (id?: string) => {
5 | const dispatch = useMaticoDispatch();
6 | const currentHoveredRef = useMaticoSelector(
7 | (state) => state.editor.hoveredRef
8 | );
9 | const setHovered = (refId?: string) => {
10 | const ref = refId !== undefined ? refId : id;
11 | ref !== currentHoveredRef && dispatch(setHoveredRef(ref));
12 | };
13 |
14 | return {
15 | setHovered
16 | };
17 | };
18 |
--------------------------------------------------------------------------------
/matico_components/src/Hooks/useIsEditable.ts:
--------------------------------------------------------------------------------
1 | import { useMaticoDispatch, useMaticoSelector } from "./redux";
2 |
3 | export const useIsEditable = () => {
4 | const canEdit = useMaticoSelector((state) => state.spec.editing);
5 | return canEdit;
6 | };
7 |
--------------------------------------------------------------------------------
/matico_components/src/Hooks/useMaticoSpec.ts:
--------------------------------------------------------------------------------
1 | import { findParentContainer } from "Components/MaticoEditor/Utils/Utils";
2 | import _ from "lodash";
3 | import { useState } from "react";
4 | import { useMaticoDispatch, useMaticoSelector } from "./redux";
5 |
6 | export const useMaticoSpec = (editPath: string) => {
7 | const spec = useMaticoSelector((state) => state.spec.spec);
8 | const pane = _.get(spec, editPath);
9 | const parentPane = _.get(spec, findParentContainer(editPath));
10 | const parentLayout = parentPane?.layout;
11 |
12 | return [pane, parentLayout];
13 | };
14 |
--------------------------------------------------------------------------------
/matico_components/src/Hooks/useNormalizedSpecSelector.tsx:
--------------------------------------------------------------------------------
1 | import { App } from "@maticoapp/matico_types/spec";
2 | import { useMaticoSelector } from "./redux";
3 |
4 | export const useNormalizedSpecSelector = (selectFunc: (spec: App) => any) => {
5 | const specFragment = useMaticoSelector((selector) => {
6 | return selector.spec.normalizedSpec
7 | ? selectFunc(selector.spec.normalizedSpec)
8 | : null;
9 | });
10 | return specFragment;
11 | };
12 |
--------------------------------------------------------------------------------
/matico_components/src/Hooks/useRegression.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from "react";
2 | import regression, { Result } from "regression";
3 |
4 | export const useRegression = (
5 | data: Array> | null,
6 | xColumn: string,
7 | yColumn: string
8 | ) => {
9 | const [result, setResult] = useState(null);
10 | useEffect(() => {
11 | if (data === null) {
12 | setResult(null);
13 | return;
14 | }
15 |
16 | let regData = data.map((d) => [d[xColumn], d[yColumn]]);
17 | //@ts-ignore
18 | let reg = regression.linear(regData);
19 | setResult(reg);
20 | }, [data, xColumn, yColumn]);
21 | return result;
22 | };
23 |
--------------------------------------------------------------------------------
/matico_components/src/Hooks/useResizeEvent.ts:
--------------------------------------------------------------------------------
1 | import React, { useEffect } from "react";
2 |
3 | export const useResizeEvent = (
4 | callback: () => void | Array<() => void>,
5 | ref: React.RefObject
6 | ) => {
7 | const eventFunction = Array.isArray(callback)
8 | ? () => callback.forEach((cb) => cb())
9 | : callback;
10 |
11 | useEffect(() => {
12 | const refObserver = new ResizeObserver(eventFunction);
13 | refObserver.observe(ref.current);
14 | return () => {
15 | refObserver.disconnect();
16 | };
17 | }, []);
18 | };
19 |
--------------------------------------------------------------------------------
/matico_components/src/Hooks/useSpecElement.ts:
--------------------------------------------------------------------------------
1 | import { Page, Pane } from "@maticoapp/matico_types/spec";
2 | import { useMaticoSelector } from "./redux";
3 |
4 | export const useSpecElement = (targetId: string) => {
5 | const { panes, pages } = useMaticoSelector((slice) => slice.spec.spec);
6 | let element;
7 | if ((element = panes.find((p: Pane) => p.id === targetId))) {
8 | return [element, "pane"];
9 | }
10 | if ((element = pages.find((p: Page) => p.id === targetId))) {
11 | return [element, "page"];
12 | }
13 | };
14 |
--------------------------------------------------------------------------------
/matico_components/src/Styles/global_spectrum_overrides.css:
--------------------------------------------------------------------------------
1 | *,
2 | body {
3 | background-color: red !important;
4 | }
5 |
--------------------------------------------------------------------------------
/matico_components/src/Utils/columnHelper.ts:
--------------------------------------------------------------------------------
1 | export const colBasis = (n: number) => `${n * 100}%`;
2 |
--------------------------------------------------------------------------------
/matico_components/src/Utils/fixedGrid.tsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_components/src/Utils/fixedGrid.tsx
--------------------------------------------------------------------------------
/matico_components/src/Utils/nullComponent.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export const NullComponent: React.FC = (props: any) => null;
4 |
--------------------------------------------------------------------------------
/matico_components/src/Utils/sanitizeColor.ts:
--------------------------------------------------------------------------------
1 | export const sanitizeColor = (
2 | color: string | number[] | { [key: string]: any } | undefined
3 | ) => {
4 | if (!color) return null;
5 | if (typeof color === "string") return color;
6 | if (Array.isArray(color)) {
7 | if (color.length === 3) {
8 | return `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
9 | } else {
10 | return `rgba(${color[0]}, ${color[1]}, ${color[2]}, ${
11 | color[3] > 1 ? color[3] / 255 : color[3]
12 | })`;
13 | }
14 | }
15 | return null;
16 | };
17 |
--------------------------------------------------------------------------------
/matico_components/src/Utils/specUtils/index.ts:
--------------------------------------------------------------------------------
1 | import { findPagesForPane, findPaneParents } from "./specUtils";
2 |
3 | export { findPagesForPane, findPaneParents };
4 |
--------------------------------------------------------------------------------
/matico_components/src/index.d.ts:
--------------------------------------------------------------------------------
1 | export * from "./Components/MaticoPage/MaticoPage";
2 | export * from "./Components/MaticoApp/MaticoApp";
3 | export * from "./Components/Layouts/MaticoFreeLayout/MaticoFreeLayout";
4 | export * from "./Components/Panes/MaticoMapPane/MaticoMapPane";
5 | export * from "./Components/Panes/MaticoTextPane/MaticoTextPane";
6 | export * from "./Contexts/MaticoDataContext/MaticoDataContext";
7 | export * from "./Stores/VariableTypes";
8 | export * from "./Stores/MaticoStore";
9 |
--------------------------------------------------------------------------------
/matico_components/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./Components/MaticoPage/MaticoPage";
2 | export * from "./Components/MaticoApp/MaticoApp";
3 | export * from "./Components/Layouts/MaticoFreeLayout/MaticoFreeLayout";
4 | export * from "./Components/Panes/MaticoMapPane/MaticoMapPane";
5 | export * from "./Components/Panes/MaticoTextPane/MaticoTextPane";
6 | export * from "./Stores/VariableTypes";
7 | export * from "./Stores/MaticoStore";
8 | export * from "./Datasets/DatasetProvider";
9 | export * from "./Datasets/WasmComputeBuilder";
10 |
--------------------------------------------------------------------------------
/matico_components/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "emitDecoratorMetadata": true,
4 | "experimentalDecorators": true,
5 | "forceConsistentCasingInFileNames": true,
6 | "jsx": "react",
7 | "module": "esnext",
8 | "moduleResolution": "node",
9 | "noImplicitAny": true,
10 | "outDir": "./dist",
11 | "preserveConstEnums": true,
12 | "removeComments": false,
13 | "baseUrl": "./src/",
14 | "allowSyntheticDefaultImports":true,
15 | "target": "es6",
16 | "declaration": true,
17 | "declarationDir": "./dist/",
18 | "skipLibCheck": true
19 | },
20 | "exclude": [
21 | "node_modules",
22 | "dist/**/*"
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/ColType.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type ColType = "text" | "numeric" | "geometry";
4 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/ColumnOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ColType } from "./ColType";
3 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
4 |
5 | export interface ColumnOptions {
6 | allowedColumnTypes: Array | null;
7 | fromDataset: string;
8 | displayDetails: ParameterOptionDisplayDetails;
9 | }
10 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/NumericCategoryOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 |
4 | export interface NumericCategoryOptions {
5 | allowMulti: boolean;
6 | options: Array;
7 | displayDetails: ParameterOptionDisplayDetails;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/NumericFloatOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 |
4 | export interface NumericFloatOptions {
5 | range: Array | null;
6 | default: number | null;
7 | displayDetails: ParameterOptionDisplayDetails;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/NumericIntOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 |
4 | export interface NumericIntOptions {
5 | range: Array | null;
6 | default: number | null;
7 | displayDetails: ParameterOptionDisplayDetails;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/OptionGroup.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 | import type { ParameterOptions } from "./ParameterOptions";
4 |
5 | export interface OptionGroup {
6 | options: Record;
7 | displayDetails: ParameterOptionDisplayDetails;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/OptionGroupVal.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterValue } from "./ParameterValue";
3 |
4 | export interface OptionGroupVal {
5 | name: string;
6 | parameter: ParameterValue;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/OptionGroupVals.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { OptionGroupVal } from "./OptionGroupVal";
3 |
4 | export type OptionGroupVals = Array;
5 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/ParameterOptionDisplayDetails.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface ParameterOptionDisplayDetails {
4 | description: string | null;
5 | displayName: string | null;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/ParameterValue.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { OptionGroupVals } from "./OptionGroupVals";
3 |
4 | export type ParameterValue =
5 | | { type: "optionGroup"; value: OptionGroupVals }
6 | | { type: "repeatedOption"; value: Array }
7 | | { type: "numericFloat"; value: number }
8 | | { type: "numericInt"; value: number }
9 | | { type: "numericCategory"; value: Array }
10 | | { type: "textCategory"; value: Array }
11 | | { type: "column"; value: string }
12 | | { type: "table"; value: string }
13 | | { type: "text"; value: string };
14 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/RepeatedOption.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 | import type { ParameterOptions } from "./ParameterOptions";
4 |
5 | export interface RepeatedOption {
6 | options: ParameterOptions;
7 | displayDetails: ParameterOptionDisplayDetails;
8 | minTimes: number;
9 | maxTimes: number | null;
10 | }
11 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/SpecParameter.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { SpecParameterValue } from "./SpecParameterValue";
3 |
4 | export interface SpecParameter {
5 | name: string;
6 | parameter: SpecParameterValue;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/TableOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 |
4 | export interface TableOptions {
5 | mustHaveGeom: boolean;
6 | displayDetails: ParameterOptionDisplayDetails;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/TextCategoryOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 |
4 | export interface TextCategoryOptions {
5 | allowMulti: boolean;
6 | options: Array;
7 | displayDetails: ParameterOptionDisplayDetails;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_compute/matico_analysis/bindings/TextOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 |
4 | export interface TextOptions {
5 | maxLength: number | null;
6 | displayDetails: ParameterOptionDisplayDetails;
7 | default: string | null;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_compute/matico_area_analysis/Pipfile:
--------------------------------------------------------------------------------
1 | [[source]]
2 | url = "https://pypi.org/simple"
3 | verify_ssl = true
4 | name = "pypi"
5 |
6 | [packages]
7 |
8 | [dev-packages]
9 |
10 | [requires]
11 | python_version = "3.10"
12 |
--------------------------------------------------------------------------------
/matico_compute/matico_area_analysis/resources/test.arrow:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_compute/matico_area_analysis/resources/test.arrow
--------------------------------------------------------------------------------
/matico_compute/matico_dot_density_analysis/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm -r pkg
3 | wasm-pack build --target web --scope maticoapp
4 | mv pkg ../../matico_server/static/compute/dot_density_analysis
5 |
--------------------------------------------------------------------------------
/matico_compute/matico_dot_density_analysis/resources/test.arrow:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_compute/matico_dot_density_analysis/resources/test.arrow
--------------------------------------------------------------------------------
/matico_compute/matico_hdbscam_analysis/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm -r pkg
3 | wasm-pack build --target web --scope maticoapp
4 | rm -r ../../matico_server/static/compute/hdbscan_analysis
5 | cp -r pkg ../../matico_server/static/compute/hdbscan_analysis
6 |
7 |
--------------------------------------------------------------------------------
/matico_compute/matico_hdbscam_analysis/resources/test.arrow:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_compute/matico_hdbscam_analysis/resources/test.arrow
--------------------------------------------------------------------------------
/matico_compute/matico_lisa/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm -r pkg
3 | wasm-pack build --target web --scope maticoapp
4 | rm -rf ../../matico_app_server/public/compute/weights
5 | cp -r pkg ../../matico_app_server/public/compute/weights
6 |
7 |
--------------------------------------------------------------------------------
/matico_compute/matico_regres/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "matico_regres"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7 |
8 | [dependencies]
9 | rusty-machine="0.5.4"
10 | arrow2 ={version="0.6.1", features = ["io_ipc"]}
11 | wasm-bindgen = {version = "0.2.77", features = ['serde-serialize']}
12 |
--------------------------------------------------------------------------------
/matico_compute/matico_synthetic_data_analysis/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm -r pkg
3 | wasm-pack build --target web --scope maticoapp
4 | rm -r ../../matico_server/static/compute/synthetic_data
5 | cp -r pkg ../../matico_app_server/public/compute/synthetic_data
6 |
7 |
--------------------------------------------------------------------------------
/matico_compute/matico_synthetic_data_analysis/resources/test.arrow:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_compute/matico_synthetic_data_analysis/resources/test.arrow
--------------------------------------------------------------------------------
/matico_compute/matico_weights/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm -r pkg
3 | wasm-pack build --target web --scope maticoapp
4 | rm -rf ../../matico_app_server/public/compute/weights
5 | cp -r pkg ../../matico_app_server/public/compute/weights
6 |
7 |
--------------------------------------------------------------------------------
/matico_server/.develop.env:
--------------------------------------------------------------------------------
1 | #SMS_DB_STRING=postgresql://sms:smspassword@:25060/sms
2 | DB.HOST=localhost
3 | DB.PORT=5432
4 | DB.USERNAME=stuart
5 | DB.NAME=stuart
6 |
7 | DATADB.HOST=localhost
8 | DATADB.PORT=5432
9 | DATADB.USERNAME=stuart
10 | DATADB.NAME=sms_data
11 |
12 | TESTDB.HOST=localhost
13 | TESTDB.PORT= 5432
14 | TESTDB.USERNAME=sms_test
15 | TESTDB.NAME=sms_test
16 |
17 | TESTDATADB.HOST=localhost
18 | TESTDATADB.PORT= 5432
19 | TESTDATADB.USERNAME=sms_test
20 | TESTDATADB.NAME=sms_test_data
21 |
22 |
23 | SERVER_ADDR=0.0.0.0:8000
24 |
--------------------------------------------------------------------------------
/matico_server/.env-sample:
--------------------------------------------------------------------------------
1 | #SMS_DB_STRING=postgresql://sms:smspassword@:25060/sms
2 | DB.HOST=localhost
3 | DB.PORT=25060
4 | DB.USERNAME=sms
5 | DB.NAME=sms
6 |
7 | DATADB.HOST=localhost
8 | DATADB.PORT=25060
9 | DATADB.USERNAME=sms
10 | DATADB.NAME=sms_data
11 |
12 | SERVER_ADDR=0.0.0.0:8000
13 |
--------------------------------------------------------------------------------
/matico_server/.env.prod:
--------------------------------------------------------------------------------
1 | DB.HOST=simple-map-db-do-user-1278505-0.b.db.ondigitalocean.com
2 | DB.PORT=25060
3 | DB.USERNAME=sms
4 | DB.NAME=sms
5 | DB.PASSWORD=smspassword
6 |
7 | DATADB.HOST=simple-map-db-do-user-1278505-0.b.db.ondigitalocean.com
8 | DATADB.PORT=25060
9 | DATADB.USERNAME=sms
10 | DATADB.NAME=sms_data
11 | DATADB.PASSWORD=smspassword
12 |
13 | SERVER_ADDR=0.0.0.0:8000
14 |
--------------------------------------------------------------------------------
/matico_server/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | node_modules
3 | tmp
4 | .env
5 |
6 |
7 | simple-map-viewer/.eslintcache
8 | test_datasets
9 | bindings
10 |
--------------------------------------------------------------------------------
/matico_server/Settings.toml:
--------------------------------------------------------------------------------
1 | server_addr="127.0.0.1:8080"
2 | db_string ="postgresql://stuart@localhost:5432/stuart"
--------------------------------------------------------------------------------
/matico_server/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | (cd simple-map-viewer && yarn && yarn build)
4 | cp -r simple-map-viewer/build/* ./static/
5 | cargo run --release
6 |
7 |
--------------------------------------------------------------------------------
/matico_server/diesel.toml:
--------------------------------------------------------------------------------
1 | # For documentation on how to configure this file,
2 | # see diesel.rs/guides/configuring-diesel-cli
3 |
4 | [print_schema]
5 | file = "src/schema.rs"
6 | import_types=["diesel::sql_types::*","crate::models::sync_import::*"]
7 |
--------------------------------------------------------------------------------
/matico_server/migrations/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_server/migrations/.gitkeep
--------------------------------------------------------------------------------
/matico_server/migrations/00000000000000_diesel_initial_setup/down.sql:
--------------------------------------------------------------------------------
1 | -- This file was automatically created by Diesel to setup helper functions
2 | -- and other internal bookkeeping. This file is safe to edit, any future
3 | -- changes will be added to existing projects as new migrations.
4 |
5 | DROP FUNCTION IF EXISTS diesel_manage_updated_at(_tbl regclass);
6 | DROP FUNCTION IF EXISTS diesel_set_updated_at();
7 |
--------------------------------------------------------------------------------
/matico_server/migrations/2021-01-07-154355_add_users/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE users;
--------------------------------------------------------------------------------
/matico_server/migrations/2021-01-07-154355_add_users/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE users(
2 | id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
3 | username TEXT NOT NULL UNIQUE,
4 | email TEXT NOT NULL UNIQUE,
5 | password TEXT NOT NULL,
6 | created_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
7 | updated_at TIMESTAMP NOT NULL
8 | )
--------------------------------------------------------------------------------
/matico_server/migrations/2021-01-20-213126_create_datasets/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE datasets;
2 |
--------------------------------------------------------------------------------
/matico_server/migrations/2021-02-02-183639_create_queries/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE queries;
--------------------------------------------------------------------------------
/matico_server/migrations/2021-02-02-183639_create_queries/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE queries(
2 | id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
3 | name TEXT NOT NULL,
4 | description TEXT NOT NULL,
5 | sql TEXT NOT NULL,
6 | parameters JSONB[] NOT NULL,
7 | created_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
8 | updated_at TIMESTAMP NOT NULL
9 | );
10 |
11 | CREATE INDEX parameters_index ON queries USING GIN(parameters);
--------------------------------------------------------------------------------
/matico_server/migrations/2021-02-05-152451_add_geom_col_and_id_col_to_dataset/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE datasets DROP COLUMN geom_col;
2 | ALTER TABLE datasets DROP COLUMN id_col;
--------------------------------------------------------------------------------
/matico_server/migrations/2021-02-05-152451_add_geom_col_and_id_col_to_dataset/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE datasets ADD geom_col TEXT NOT NULL DEFAULT 'wkb_geometry';
2 | ALTER TABLE datasets ADD id_col TEXT NOT NULL DEFAULT 'id';
--------------------------------------------------------------------------------
/matico_server/migrations/2021-02-09-145431_create_dashboard_table/down.sql:
--------------------------------------------------------------------------------
1 | DROP table dashboards;
--------------------------------------------------------------------------------
/matico_server/migrations/2021-02-09-145431_create_dashboard_table/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE dashboards (
2 | id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
3 | name TEXT NOT NULL,
4 | owner_id uuid NOT NULL,
5 | description TEXT NOT NULL,
6 | map_style jsonb NOT NULL,
7 | created_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
8 | updated_at TIMESTAMP NOT NULL,
9 | public BOOLEAN NOT NULL DEFAULT false,
10 | CONSTRAINT fk_user
11 | FOREIGN KEY(owner_id)
12 | REFERENCES users(id)
13 | );
14 |
15 | CREATE INDEX dashboard_owner_index ON dashboards USING btree(owner_id);
--------------------------------------------------------------------------------
/matico_server/migrations/2021-02-21-142809_add_permissions_table/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE PERMISSIONS;
--------------------------------------------------------------------------------
/matico_server/migrations/2021-02-21-142809_add_permissions_table/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE PERMISSIONS(
2 | id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
3 | user_id uuid NOT NULL,
4 | resource_id uuid NOT NULL,
5 | permission text NOT NULL,
6 | resource_type text NOT NULL,
7 | created_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
8 | updated_at TIMESTAMP NOT NULL,
9 | CONSTRAINT fk_user
10 | FOREIGN KEY(user_id)
11 | REFERENCES users(id)
12 | );
13 |
14 | CREATE INDEX permissions_user_id_resource_id_permision_index on PERMISsIONS (user_id, resource_id, permission);
--------------------------------------------------------------------------------
/matico_server/migrations/2021-12-31-142819_change_dashboard_to_new_spec/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE apps RENAME TO dashboards;
2 | ALTER TABLE dashboards RENAME column spec TO map_style
3 |
--------------------------------------------------------------------------------
/matico_server/migrations/2021-12-31-142819_change_dashboard_to_new_spec/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE dashboards RENAME COLUMN map_style TO spec;
2 | ALTER TABLE dashboards RENAME TO apps;
3 |
--------------------------------------------------------------------------------
/matico_server/migrations/2022-01-06-150716_add_table_name_to_dataset/down.sql:
--------------------------------------------------------------------------------
1 | -- This file should undo anything in `up.sql`
2 | ALTER TABLE datasets DELETE COLUMN table_name;
3 |
--------------------------------------------------------------------------------
/matico_server/migrations/2022-01-06-150716_add_table_name_to_dataset/up.sql:
--------------------------------------------------------------------------------
1 | -- Your SQL goes here
2 | ALTER TABLE datasets ADD COLUMN table_name TEXT NOT NULL DEFAULT '';
3 |
--------------------------------------------------------------------------------
/matico_server/migrations/2022-01-14-180521_create_import_sync_import/down.sql:
--------------------------------------------------------------------------------
1 | -- This file should undo anything in `up.sql`
2 | DROP TABLE sync_imports;
3 | DROP TYPE sync_import_status;
4 |
--------------------------------------------------------------------------------
/matico_server/migrations/2022-01-14-180521_create_import_sync_import/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TYPE sync_import_status AS ENUM('pending','complete','error','in_progress');
2 |
3 | CREATE TABLE sync_imports(
4 | id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
5 | scheduled_for TIMESTAMP NOT NULL,
6 | started_at TIMESTAMP,
7 | finished_at TIMESTAMP,
8 | status sync_import_status NOT NULL,
9 | error TEXT,
10 | dataset_id uuid NOT NULL,
11 | user_id uuid NOT NULL
12 | );
13 |
--------------------------------------------------------------------------------
/matico_server/migrations/2022-01-19-211841_add_import_params_to_dataset/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE datasets DROP COLUMN import_params;
2 |
--------------------------------------------------------------------------------
/matico_server/migrations/2022-01-19-211841_add_import_params_to_dataset/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE datasets ADD COLUMN import_params JSONB NOT NULL DEFAULT '{"GeoJson":{}}';
2 |
--------------------------------------------------------------------------------
/matico_server/migrations/2022-01-24-235453_add_public_to_api/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE queries drop column public;
2 |
--------------------------------------------------------------------------------
/matico_server/migrations/2022-01-24-235453_add_public_to_api/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE queries add column public boolean NOT NULL default false;
2 |
--------------------------------------------------------------------------------
/matico_server/resources/test/Pipfile:
--------------------------------------------------------------------------------
1 | [[source]]
2 | url = "https://pypi.org/simple"
3 | verify_ssl = true
4 | name = "pypi"
5 |
6 | [packages]
7 | geopandas = "*"
8 | pandas = "*"
9 | fiona = "*"
10 | numpy = "*"
11 |
12 | [dev-packages]
13 |
14 | [requires]
15 | python_version = "3.6"
16 |
--------------------------------------------------------------------------------
/matico_server/resources/test/ne_10m_admin_0_countries.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_server/resources/test/ne_10m_admin_0_countries.zip
--------------------------------------------------------------------------------
/matico_server/resources/test/shapefile.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_server/resources/test/shapefile.zip
--------------------------------------------------------------------------------
/matico_server/resources/test/squirrel.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_server/resources/test/squirrel.zip
--------------------------------------------------------------------------------
/matico_server/rest:
--------------------------------------------------------------------------------
1 | GET https://example.com/comments
2 | ?page=2
3 | &pageSize=10
4 |
--------------------------------------------------------------------------------
/matico_server/src/app_state.rs:
--------------------------------------------------------------------------------
1 | use crate::db::*;
2 |
3 | #[derive(Clone)]
4 | pub struct State {
5 | pub db: DbPool,
6 | pub data_db: DataDbPool,
7 | pub ogr_string: String,
8 | }
9 |
--------------------------------------------------------------------------------
/matico_server/src/db/datasource.rs:
--------------------------------------------------------------------------------
1 | use async_trait::async_trait;
2 |
3 | use crate::{errors::ServiceError, models::User};
4 |
5 | #[async_trait]
6 | pub trait DataSource {
7 | /// Sets up a new user with a domain within the datasource
8 | async fn setup_user(pool: &T, user: &User) -> Result<(), ServiceError>;
9 |
10 | /// Should perform any setup on the datasource
11 | async fn setup(pool: &T) -> Result<(), ServiceError>;
12 | }
13 |
--------------------------------------------------------------------------------
/matico_server/src/db/formatters.rs:
--------------------------------------------------------------------------------
1 | pub fn csv_format(query: &str) -> String {
2 | format!("select json_agg(s) as res from ({}) s ", query)
3 | }
4 |
5 | pub fn json_format(query: &str) -> String {
6 | format!("select json_agg(s)::TEXT as res from ({}) s ", query)
7 | }
8 |
9 | pub fn geo_json_format(query: &str) -> String {
10 | format!(
11 | "select json_build_object(
12 | 'type', 'FeatureCollection',
13 | 'features', json_agg(ST_AsGeoJSON(s)::json)::json
14 | )::TEXT as res from ({}) s
15 | ",
16 | query
17 | )
18 | }
19 |
--------------------------------------------------------------------------------
/matico_server/src/db/mod.rs:
--------------------------------------------------------------------------------
1 | // mod postgis_data_source;
2 | pub type DbPool = r2d2::Pool>;
3 | pub type DataDbPool = sqlx::PgPool;
4 |
5 | pub mod datasource;
6 | pub mod postgis_datasource;
7 | pub mod query_builder;
8 | pub mod query_result;
9 | pub mod setup;
10 |
11 | pub use datasource::*;
12 | pub use postgis_datasource::*;
13 | pub use query_builder::*;
14 | pub use query_result::*;
15 | pub use setup::*;
16 |
--------------------------------------------------------------------------------
/matico_server/src/db/setup.rs:
--------------------------------------------------------------------------------
1 | use crate::db::DbPool;
2 |
3 | embed_migrations!();
4 |
5 | pub fn run_migrations(pool: &DbPool) {
6 | let conn = pool.get().unwrap();
7 | //Figure out how to send this to log crate using run_with_output
8 | embedded_migrations::run(&conn).expect("FAILED TO RUN MIGRATIONS!");
9 | }
10 |
--------------------------------------------------------------------------------
/matico_server/src/db/tile_query.sql:
--------------------------------------------------------------------------------
1 | SELECT ST_AsMVT(q, 'layer', 4096, 'mvt_geom') as mvt
2 | FROM (
3 | SELECT
4 | {columns},
5 | -- ogc_fid::INTEGER as id,
6 | ST_AsMVTGeom(
7 | ST_TRANSFORM(geom, 3857),
8 | ST_TileEnvelope({z},{x},{y})
9 | ) mvt_geom
10 | FROM (
11 | select *, {geom_column} as geom from ({tile_table}) b
12 | where {geom_column} && ST_TRANSFORM(ST_TileEnvelope({z},{x},{y}), 4326)
13 | ) c
14 | ) q
15 | limit 1
16 | ;
17 |
--------------------------------------------------------------------------------
/matico_server/src/models/columns.rs:
--------------------------------------------------------------------------------
1 | use serde::{Deserialize, Serialize};
2 | use ts_rs::TS;
3 |
4 | #[derive(Serialize, Deserialize, Clone, Debug, TS)]
5 | #[serde(rename_all = "camelCase")]
6 | #[ts(export)]
7 | pub struct Column {
8 | pub name: String,
9 | pub col_type: String,
10 | }
11 |
--------------------------------------------------------------------------------
/matico_server/src/models/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod apis;
2 | pub mod apps;
3 | pub mod columns;
4 | pub mod datasets;
5 | pub mod permissions;
6 | pub mod stats;
7 | pub mod sync_import;
8 | pub mod users;
9 |
10 | pub use apis::*;
11 | pub use apps::*;
12 | pub use columns::*;
13 | pub use datasets::{CreateDatasetDTO, CreateSyncDatasetDTO, Dataset, DatasetSearch};
14 | pub use permissions::*;
15 | pub use stats::*;
16 | pub use sync_import::*;
17 | pub use users::{LoginDTO, LoginResponseDTO, SignupDTO, User, UserToken};
18 |
--------------------------------------------------------------------------------
/matico_server/src/routes/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod apis;
2 | pub mod apps;
3 | pub mod auth;
4 | // pub mod columns;
5 | pub mod compute;
6 | pub mod data;
7 | pub mod datasets;
8 | pub mod users;
9 |
--------------------------------------------------------------------------------
/matico_server/src/scheduler/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod import_scheduler;
2 | pub use import_scheduler::ImportScheduler;
3 |
--------------------------------------------------------------------------------
/matico_server/src/tiler/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod routes;
2 |
3 | pub use routes::*;
4 |
--------------------------------------------------------------------------------
/matico_server/src/utils/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod formats;
2 | pub mod geo_file_utils;
3 | pub mod pagination;
4 | pub mod sort;
5 |
6 | pub use formats::*;
7 | pub use geo_file_utils::*;
8 | pub use pagination::*;
9 | pub use sort::*;
10 |
--------------------------------------------------------------------------------
/matico_server/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_server/static/.gitkeep
--------------------------------------------------------------------------------
/matico_server/static/docs/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_server/static/docs/favicon-16x16.png
--------------------------------------------------------------------------------
/matico_server/static/docs/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_server/static/docs/favicon-32x32.png
--------------------------------------------------------------------------------
/matico_server/static/docs/swagger-ui.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":[],"names":[],"mappings":"","file":"swagger-ui.css","sourceRoot":""}
--------------------------------------------------------------------------------
/matico_server/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_server/static/favicon.ico
--------------------------------------------------------------------------------
/matico_server/static/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_server/static/logo192.png
--------------------------------------------------------------------------------
/matico_server/static/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_server/static/logo512.png
--------------------------------------------------------------------------------
/matico_server/static/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/matico_server/static/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/matico_server/static/static/css/main.af4a186e.chunk.css:
--------------------------------------------------------------------------------
1 | body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.App{text-align:center;background-color:#282c34;color:#fff;height:100vh;width:100vw}main{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:space-around;justify-content:space-around;-webkit-align-items:center;align-items:center;width:100%;height:100%}
2 | /*# sourceMappingURL=main.af4a186e.chunk.css.map */
--------------------------------------------------------------------------------
/matico_server/tests/tiles.rs:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/matico_spec/index.ts:
--------------------------------------------------------------------------------
1 | import * as wasm from "./pkg/matico_spec_bg.wasm";
2 | export * from "./pkg/matico_spec_bg.js";
3 |
--------------------------------------------------------------------------------
/matico_spec/notes.md:
--------------------------------------------------------------------------------
1 | ~~ # Add layers to mapping struct (done )
2 | not sure why but something seems to require copy to be present prob pub on wasm_bindgen might need to create a getter setter for layers instead ~~
3 |
4 | # Notes for getting toml serialziation working
5 |
6 | Getting enaums working with serde and toml https://github.com/serde-rs/serde/issues/725
7 |
8 |
9 | # Implement a type for autocomplete to return either a String or JsValue
10 |
11 |
12 | # Build
13 | `wasm-pack build --scope maticoapp`
--------------------------------------------------------------------------------
/matico_spec/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@maticoapp/matico_spec",
3 | "packageManager": "yarn@3.2.1",
4 | "version": "0.1.1",
5 | "main": "./dist/index.js",
6 | "files": [
7 | "./dist"
8 | ],
9 | "scripts": {
10 | "build": "node scripts/build.js",
11 | "watch": "node scripts/watch.js"
12 | },
13 | "devDependencies": {
14 | "esbuild": "^0.17.1",
15 | "esbuild-plugin-wasm": "^1.0.0",
16 | "esbuild-plugin-wasm-pack": "^1.1.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/matico_spec/pkg/.gitignore:
--------------------------------------------------------------------------------
1 | *
--------------------------------------------------------------------------------
/matico_spec/pkg/matico_spec.js:
--------------------------------------------------------------------------------
1 | import * as wasm from "./matico_spec_bg.wasm";
2 | export * from "./matico_spec_bg.js";
--------------------------------------------------------------------------------
/matico_spec/pkg/matico_spec_bg.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Matico-Platform/matico/7a2fb0a716bd4902f64c4160dd12ff06cdba30b4/matico_spec/pkg/matico_spec_bg.wasm
--------------------------------------------------------------------------------
/matico_spec/pkg/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "matico_spec",
3 | "collaborators": [
4 | "Stuart Lynn "
5 | ],
6 | "version": "0.1.0",
7 | "files": [
8 | "matico_spec_bg.wasm",
9 | "matico_spec.js",
10 | "matico_spec_bg.js",
11 | "matico_spec.d.ts"
12 | ],
13 | "module": "matico_spec.js",
14 | "types": "matico_spec.d.ts",
15 | "sideEffects": [
16 | "./matico_spec.js",
17 | "./snippets/*"
18 | ]
19 | }
--------------------------------------------------------------------------------
/matico_spec/scripts/build.js:
--------------------------------------------------------------------------------
1 | const esbuild = require("esbuild");
2 | const options = require("./options");
3 |
4 | esbuild.build(options);
5 |
--------------------------------------------------------------------------------
/matico_spec/scripts/options.js:
--------------------------------------------------------------------------------
1 | const { wasmPack } = require("esbuild-plugin-wasm-pack");
2 | const { wasmLoader } = require("esbuild-plugin-wasm");
3 |
4 | module.exports = {
5 | entryPoints: ["./index.js"],
6 | outdir: "dist",
7 | format: "esm",
8 | bundle: true,
9 | plugins: [
10 | wasmLoader({ mode: "deffered" }),
11 | wasmPack({
12 | path: "./",
13 | target: "bundler",
14 | profile: "release",
15 | }),
16 | ],
17 | };
18 |
--------------------------------------------------------------------------------
/matico_spec/scripts/watch.js:
--------------------------------------------------------------------------------
1 | const esbuild = require("esbuild");
2 | const options = require("./options");
3 |
4 | esbuild.build({
5 | ...options,
6 | watch: {
7 | onRebuild(error, result) {
8 | if (error) console.error("watch build failed:", error);
9 | else {
10 | console.log("watch build succeeded:", result);
11 | }
12 | },
13 | },
14 | });
15 |
--------------------------------------------------------------------------------
/matico_spec/src/colors.rs:
--------------------------------------------------------------------------------
1 | use serde::{Deserialize, Serialize};
2 | use ts_rs::TS;
3 | use wasm_bindgen::prelude::*;
4 |
5 | #[derive(Debug, Clone, Serialize, Deserialize, TS)]
6 | #[serde(rename_all = "camelCase")]
7 | #[ts(export)]
8 | pub enum ColorSpecification {
9 | Rgba([f32; 4]),
10 | Rgb([f32; 3]),
11 | Named(String),
12 | Hex(String),
13 | }
14 |
--------------------------------------------------------------------------------
/matico_spec_derive/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "matico_spec_derive"
3 | version = "0.1.0"
4 | authors = ["Stuart Lynn "]
5 | edition = "2018"
6 |
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8 |
9 | [lib]
10 | proc-macro = true
11 |
12 | [dependencies]
13 | quote = "1.0"
14 | proc-macro2 = { version = "1.0.32", default-features = false }
15 | syn = "1.0"
16 |
17 |
18 | [profile.release]
19 | lto = true
20 | opt-level = 'z'
21 |
--------------------------------------------------------------------------------
/matico_types/README.md:
--------------------------------------------------------------------------------
1 | # matico_types
2 |
--------------------------------------------------------------------------------
/matico_types/api/App.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface App {
4 | id: string;
5 | name: string;
6 | owner_id: string;
7 | description: string;
8 | spec: AppSpec;
9 | created_at: string;
10 | updated_at: string;
11 | public: boolean;
12 | }
13 |
--------------------------------------------------------------------------------
/matico_types/api/AppOrderBy.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface AppOrderBy {
4 | field: string | null;
5 | }
6 |
--------------------------------------------------------------------------------
/matico_types/api/AppSearch.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface AppSearch {
4 | name: string | null;
5 | description: string | null;
6 | user_id: string;
7 | owner_id: string;
8 | public: boolean | null;
9 | }
10 |
--------------------------------------------------------------------------------
/matico_types/api/BasicStatsParams.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface BasicStatsParams {
4 | treatNullAsZero: boolean | null;
5 | }
6 |
--------------------------------------------------------------------------------
/matico_types/api/BasicStatsResults.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface BasicStatsResults {
4 | min: number;
5 | max: number;
6 | mean: number;
7 | total: number;
8 | median: number;
9 | count: number;
10 | }
11 |
--------------------------------------------------------------------------------
/matico_types/api/Column.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface Column {
4 | name: string;
5 | colType: string;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/api/CreateAppDTO.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface CreateAppDTO {
4 | name: string;
5 | owner_id: string;
6 | description: string;
7 | spec: AppSpec;
8 | public: boolean;
9 | }
10 |
--------------------------------------------------------------------------------
/matico_types/api/EqualIntervalParams.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface EqualIntervalParams {
4 | noBins: number;
5 | treatNullAsZero: boolean | null;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/api/HistogramEntry.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface HistogramEntry {
4 | binStart: number;
5 | binEnd: number;
6 | binMid: number;
7 | freq: number;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/api/HistogramParams.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface HistogramParams {
4 | treatNullAsZero: boolean | null;
5 | inclusiveBins: boolean | null;
6 | noBins: number;
7 | binEdges: Array | null;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/api/HistogramResults.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { HistogramEntry } from "./HistogramEntry";
3 |
4 | export type HistogramResults = Array;
5 |
--------------------------------------------------------------------------------
/matico_types/api/JenksEntry.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface JenksEntry {
4 | binStart: number;
5 | binEnd: number;
6 | freq: bigint;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/api/JenksParams.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface JenksParams {
4 | noBins: number;
5 | treatNullAsZero: boolean | null;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/api/JenksResults.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { JenksEntry } from "./JenksEntry";
3 |
4 | export type JenksResults = Array;
5 |
--------------------------------------------------------------------------------
/matico_types/api/LoginDTO.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface LoginDTO {
4 | email: string;
5 | password: string;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/api/LoginResponseDTO.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { User } from "./User";
3 |
4 | export interface LoginResponseDTO {
5 | user: User;
6 | token: string;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/api/LogorithmicParams.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface LogorithmicParams {
4 | noBins: number;
5 | base: number | null;
6 | treatNullAsZero: boolean | null;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/api/LogorithmicResults.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface LogorithmicResults {
4 | bins: Array;
5 | values: Array;
6 | values_bellow_zero: boolean;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/api/QuantileEntry.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface QuantileEntry {
4 | quantile: number;
5 | binStart: number;
6 | binEnd: number;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/api/QuantileParams.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface QuantileParams {
4 | noBins: number;
5 | treatNullAsZero: boolean | null;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/api/QuantileResults.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { QuantileEntry } from "./QuantileEntry";
3 |
4 | export type QuantileResults = Array;
5 |
--------------------------------------------------------------------------------
/matico_types/api/SignupDTO.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface SignupDTO {
4 | username: string;
5 | password: string;
6 | email: string;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/api/SignupResponseDTO.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { User } from "./User";
3 |
4 | export interface SignupResponseDTO {
5 | user: User;
6 | token: string;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/api/UpdateAppDTO.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface UpdateAppDTO {
4 | name: string | null;
5 | description: string | null;
6 | spec: AppSpec;
7 | public: boolean | null;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/api/User.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface User {
4 | id: string;
5 | username: string;
6 | email: string;
7 | created_at: string;
8 | updated_at: string;
9 | }
10 |
--------------------------------------------------------------------------------
/matico_types/api/ValueCountEntry.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface ValueCountEntry {
4 | count: number;
5 | name: string;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/api/ValueCountsParams.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface ValueCountsParams {
4 | ignoreNull: boolean | null;
5 | }
6 |
--------------------------------------------------------------------------------
/matico_types/api/ValueCountsResults.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ValueCountEntry } from "./ValueCountEntry";
3 |
4 | export type ValueCountsResults = Array;
5 |
--------------------------------------------------------------------------------
/matico_types/index.d.ts:
--------------------------------------------------------------------------------
1 | export * as spec from "./spec";
2 | export * as dist from "./dist";
3 |
--------------------------------------------------------------------------------
/matico_types/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@maticoapp/matico_types",
3 | "collaborators": [
4 | "Stuart Lynn ",
5 | "Dylan Halpern "
6 | ],
7 | "version": "0.1.0",
8 | "files": [
9 | "index.d.ts",
10 | "api/index.ts",
11 | "spec/index.ts"
12 | ],
13 | "types": "dist/index.d.ts",
14 | "sideEffects": false
15 | }
16 |
--------------------------------------------------------------------------------
/matico_types/spec/AggregateStep.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { AggregationSummary } from "./AggregationSummary";
3 |
4 | export interface AggregateStep {
5 | groupByColumns: Array;
6 | aggregate: Array;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/AggregationSummary.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { AggregationType } from "./AggregationType";
3 |
4 | export interface AggregationSummary {
5 | column: string;
6 | aggType: AggregationType;
7 | rename: string | null;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/AggregationType.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type AggregationType =
4 | | "min"
5 | | "max"
6 | | "sum"
7 | | "cumulativeSum"
8 | | "mean"
9 | | "median"
10 | | "standardDeviation";
11 |
--------------------------------------------------------------------------------
/matico_types/spec/Alignment.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type Alignment = "start" | "end" | "center" | "stretch" | "baseline";
4 |
--------------------------------------------------------------------------------
/matico_types/spec/App.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { Dataset } from "./Dataset";
3 | import type { DatasetTransform } from "./DatasetTransform";
4 | import type { Metadata } from "./Metadata";
5 | import type { Page } from "./Page";
6 | import type { Pane } from "./Pane";
7 | import type { Theme } from "./Theme";
8 |
9 | export interface App {
10 | pages: Array;
11 | panes: Array;
12 | datasets: Array;
13 | datasetTransforms: Array;
14 | theme: Theme | null;
15 | metadata: Metadata;
16 | }
17 |
--------------------------------------------------------------------------------
/matico_types/spec/ArrowDataset.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface ArrowDataset {
4 | name: string;
5 | url: string;
6 | geometryCol: string | null;
7 | idCol: string | null;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/BaseMap.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ColorSpecification } from "./ColorSpecification";
3 | import type { ImageBaseMap } from "./ImageBaseMap";
4 | import type { NamedBaseMap } from "./NamedBaseMap";
5 | import type { StyleJSONBaseMap } from "./StyleJSONBaseMap";
6 | import type { TiledLayer } from "./TiledLayer";
7 |
8 | export type BaseMap =
9 | | ({ type: "color" } & ColorSpecification)
10 | | ({ type: "tiledLayer" } & TiledLayer)
11 | | ({ type: "image" } & ImageBaseMap)
12 | | ({ type: "named" } & NamedBaseMap)
13 | | ({ type: "styleJSON" } & StyleJSONBaseMap);
14 |
--------------------------------------------------------------------------------
/matico_types/spec/BooleanOption.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 |
4 | export interface BooleanOption {
5 | displayDetails: ParameterOptionDisplayDetails;
6 | default: boolean | null;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/COGDataset.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface COGDataset {
4 | name: string;
5 | url: string;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/CSVDataset.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface CSVDataset {
4 | name: string;
5 | url: string;
6 | latCol: string | null;
7 | lngCol: string | null;
8 | idColumn: string | null;
9 | }
10 |
--------------------------------------------------------------------------------
/matico_types/spec/CategoriesParams.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface CategoriesParams {
4 | noCategories: number;
5 | }
6 |
--------------------------------------------------------------------------------
/matico_types/spec/CategoryFilter.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface CategoryFilter {
4 | variable: string;
5 | isOneOf: Array | null;
6 | isNotOneOf: Array | null;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/CategorySelectorPane.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { DatasetRef } from "./DatasetRef";
3 | import type { InitalSelection } from "./InitalSelection";
4 |
5 | export interface CategorySelectorPane {
6 | column: string;
7 | dataset: DatasetRef;
8 | id: string;
9 | label: string | null;
10 | showSearch: boolean;
11 | showToggleButtons: boolean;
12 | initalSelection: InitalSelection;
13 | name: string;
14 | }
15 |
--------------------------------------------------------------------------------
/matico_types/spec/ChangeType.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { DateOpts } from "./DateOpts";
3 | import type { FloatOpts } from "./FloatOpts";
4 | import type { IntOpts } from "./IntOpts";
5 | import type { StringOpts } from "./StringOpts";
6 |
7 | export type ChangeType =
8 | | ({ type: "date" } & DateOpts)
9 | | ({ type: "string" } & StringOpts)
10 | | ({ type: "int" } & IntOpts)
11 | | ({ type: "float" } & FloatOpts);
12 |
--------------------------------------------------------------------------------
/matico_types/spec/ColType.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type ColType = "text" | "numeric" | "geometry";
4 |
--------------------------------------------------------------------------------
/matico_types/spec/ColorSpecification.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type ColorSpecification =
4 | | { rgba: Array }
5 | | { rgb: Array }
6 | | { named: string }
7 | | { hex: string };
8 |
--------------------------------------------------------------------------------
/matico_types/spec/ColumnOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ColType } from "./ColType";
3 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
4 |
5 | export interface ColumnOptions {
6 | allowedColumnTypes: Array | null;
7 | fromDataset: string;
8 | displayDetails: ParameterOptionDisplayDetails;
9 | }
10 |
--------------------------------------------------------------------------------
/matico_types/spec/ColumnTransform.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ChangeType } from "./ChangeType";
3 |
4 | export interface ColumnTransform {
5 | column: string;
6 | to: ChangeType;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/ColumnTransformOp.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ChangeType } from "./ChangeType";
3 |
4 | export type ColumnTransformOp =
5 | | ({ type: "changeType" } & ChangeType)
6 | | ({ type: "rename" } & string)
7 | | { type: "drop" };
8 |
--------------------------------------------------------------------------------
/matico_types/spec/ColumnTransformStep.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ColumnTransform } from "./ColumnTransform";
3 |
4 | export interface ColumnTransformStep {
5 | transforms: Array;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/ContainerPane.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { Layout } from "./Layout";
3 | import type { PaneRef } from "./PaneRef";
4 |
5 | export interface ContainerPane {
6 | name: string;
7 | id: string;
8 | layout: Layout;
9 | panes: Array;
10 | }
11 |
--------------------------------------------------------------------------------
/matico_types/spec/Control.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { RangeControl } from "./RangeControl";
3 | import type { SelectControl } from "./SelectControl";
4 |
5 | export type Control =
6 | | ({ type: "select" } & SelectControl)
7 | | ({ type: "range" } & RangeControl);
8 |
--------------------------------------------------------------------------------
/matico_types/spec/ControlsPane.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { Control } from "./Control";
3 |
4 | export interface ControlsPane {
5 | name: string;
6 | id: string;
7 | title: string;
8 | controls: Array;
9 | }
10 |
--------------------------------------------------------------------------------
/matico_types/spec/DatasetMetric.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { CategoriesParams } from "./CategoriesParams";
3 | import type { EqualIntervalParams } from "./EqualIntervalParams";
4 | import type { JenksParams } from "./JenksParams";
5 | import type { QuantileParams } from "./QuantileParams";
6 |
7 | export type DatasetMetric =
8 | | { type: "min" }
9 | | { type: "max" }
10 | | ({ type: "quantile" } & QuantileParams)
11 | | ({ type: "jenks" } & JenksParams)
12 | | ({ type: "equalInterval" } & EqualIntervalParams)
13 | | ({ type: "categories" } & CategoriesParams)
14 | | { type: "mean" }
15 | | { type: "median" }
16 | | { type: "summary" };
17 |
--------------------------------------------------------------------------------
/matico_types/spec/DatasetRef.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { Filter } from "./Filter";
3 |
4 | export interface DatasetRef {
5 | name: string;
6 | filters: Array | null;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/DatasetTransform.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { DatasetTransformStep } from "./DatasetTransformStep";
3 |
4 | export interface DatasetTransform {
5 | id: string;
6 | name: string;
7 | description: string;
8 | sourceId: string;
9 | steps: Array;
10 | }
11 |
--------------------------------------------------------------------------------
/matico_types/spec/DatasetTransformStep.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { AggregateStep } from "./AggregateStep";
3 | import type { ColumnTransformStep } from "./ColumnTransformStep";
4 | import type { FilterStep } from "./FilterStep";
5 | import type { JoinStep } from "./JoinStep";
6 | import type { WASMCompute } from "./WASMCompute";
7 |
8 | export type DatasetTransformStep =
9 | | ({ type: "filter" } & FilterStep)
10 | | ({ type: "aggregate" } & AggregateStep)
11 | | ({ type: "join" } & JoinStep)
12 | | ({ type: "compute" } & WASMCompute)
13 | | ({ type: "columnTransformStep" } & ColumnTransformStep);
14 |
--------------------------------------------------------------------------------
/matico_types/spec/DatasetVal.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { DatasetMetric } from "./DatasetMetric";
3 | import type { Filter } from "./Filter";
4 |
5 | export interface DatasetVal {
6 | dataset: string;
7 | column: string | null;
8 | metric: DatasetMetric | null;
9 | filters: Array | null;
10 | featureId: string | null;
11 | }
12 |
--------------------------------------------------------------------------------
/matico_types/spec/DateFilter.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { VarOr } from "./VarOr";
3 |
4 | export interface DateFilter {
5 | variable: string;
6 | min: VarOr | null;
7 | max: VarOr | null;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/DateOpts.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface DateOpts {
4 | type: "DateOpts";
5 | format: string | null;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/DateTimeSliderPane.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { DatasetRef } from "./DatasetRef";
3 | import type { VarOr } from "./VarOr";
4 |
5 | export interface DateTimeSliderPane {
6 | column: string;
7 | dataset: DatasetRef;
8 | id: string;
9 | label: string | null;
10 | max: VarOr;
11 | min: VarOr;
12 | name: string;
13 | }
14 |
--------------------------------------------------------------------------------
/matico_types/spec/Domain.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { MappingType } from "./MappingType";
3 | import type { VarOr } from "./VarOr";
4 |
5 | export interface Domain {
6 | type: MappingType;
7 | values: VarOr>;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/DomainVal.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type DomainVal = string | number;
4 |
--------------------------------------------------------------------------------
/matico_types/spec/EqualIntervalParams.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface EqualIntervalParams {
4 | bins: number;
5 | }
6 |
--------------------------------------------------------------------------------
/matico_types/spec/Filter.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { CategoryFilter } from "./CategoryFilter";
3 | import type { DateFilter } from "./DateFilter";
4 | import type { RangeFilter } from "./RangeFilter";
5 | import type { RegExFilter } from "./RegExFilter";
6 |
7 | export type Filter =
8 | | { type: "noFilter" }
9 | | ({ type: "range" } & RangeFilter)
10 | | ({ type: "category" } & CategoryFilter)
11 | | ({ type: "date" } & DateFilter)
12 | | ({ type: "regEx" } & RegExFilter);
13 |
--------------------------------------------------------------------------------
/matico_types/spec/FilterStep.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { Filter } from "./Filter";
3 |
4 | export interface FilterStep {
5 | filters: Array;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/FloatOpts.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface FloatOpts {
4 | type: "FloatOpts";
5 | nullVal: number | null;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/FreeLayout.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface FreeLayout {
4 | allowOverflow: boolean;
5 | }
6 |
--------------------------------------------------------------------------------
/matico_types/spec/GapSize.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type GapSize = "none" | "small" | "medium" | "large";
4 |
--------------------------------------------------------------------------------
/matico_types/spec/GeoJSONDataset.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface GeoJSONDataset {
4 | name: string;
5 | url: string;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/GridLayout.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface GridLayout {
4 | rows: number;
5 | cols: number;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/HistogramPane.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ColorSpecification } from "./ColorSpecification";
3 | import type { DatasetRef } from "./DatasetRef";
4 | import type { Labels } from "./Labels";
5 | import type { MappingVarOr } from "./MappingVarOr";
6 |
7 | export interface HistogramPane {
8 | name: string;
9 | id: string;
10 | dataset: DatasetRef;
11 | column: string;
12 | color: MappingVarOr | null;
13 | maxbins: number | null;
14 | labels: Labels | null;
15 | }
16 |
--------------------------------------------------------------------------------
/matico_types/spec/ImageBaseMap.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface ImageBaseMap {
4 | url: string;
5 | affiliation: string | null;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/ImputeMethod.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type ImputeMethod =
4 | | { type: "value"; value: number }
5 | | { type: "mean" }
6 | | { type: "median" };
7 |
--------------------------------------------------------------------------------
/matico_types/spec/ImputeStep.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ImputeMethod } from "./ImputeMethod";
3 |
4 | export interface ImputeStep {
5 | column: string;
6 | method: ImputeMethod;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/IntOpts.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface IntOpts {
4 | type: "IntOpts";
5 | nullVal: number | null;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/JenksParams.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface JenksParams {
4 | bins: number;
5 | }
6 |
--------------------------------------------------------------------------------
/matico_types/spec/JoinStep.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { JoinType } from "./JoinType";
3 |
4 | export interface JoinStep {
5 | otherSourceId: string;
6 | joinType: JoinType;
7 | joinColumnsLeft: Array;
8 | joinColumnsRight: Array;
9 | leftPrefix: string;
10 | rightPrefix: string;
11 | }
12 |
--------------------------------------------------------------------------------
/matico_types/spec/JoinType.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type JoinType = "inner" | "outer" | "left" | "right";
4 |
--------------------------------------------------------------------------------
/matico_types/spec/Justification.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type Justification =
4 | | "start"
5 | | "end"
6 | | "center"
7 | | "space-between"
8 | | "space-around"
9 | | "space-evenly";
10 |
--------------------------------------------------------------------------------
/matico_types/spec/Labels.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface Labels {
4 | title: string | null;
5 | subTitle: string | null;
6 | attribution: string | null;
7 | xLabel: string | null;
8 | yLabel: string | null;
9 | }
10 |
--------------------------------------------------------------------------------
/matico_types/spec/Layer.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { DatasetRef } from "./DatasetRef";
3 | import type { LayerStyle } from "./LayerStyle";
4 | import type { TooltipColumnSpec } from "./TooltipColumnSpec";
5 |
6 | export interface Layer {
7 | name: string;
8 | id: string;
9 | source: DatasetRef;
10 | style: LayerStyle;
11 | tooltipColumns: Array | null;
12 | }
13 |
--------------------------------------------------------------------------------
/matico_types/spec/LayerContentType.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type LayerContentType = "vector" | "raster";
4 |
--------------------------------------------------------------------------------
/matico_types/spec/Layout.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { FreeLayout } from "./FreeLayout";
3 | import type { GridLayout } from "./GridLayout";
4 | import type { LinearLayout } from "./LinearLayout";
5 | import type { TabLayout } from "./TabLayout";
6 |
7 | export type Layout =
8 | | ({ type: "free" } & FreeLayout)
9 | | ({ type: "linear" } & LinearLayout)
10 | | ({ type: "grid" } & GridLayout)
11 | | ({ type: "tabs" } & TabLayout);
12 |
--------------------------------------------------------------------------------
/matico_types/spec/LineChartPane.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ColorSpecification } from "./ColorSpecification";
3 | import type { DatasetRef } from "./DatasetRef";
4 | import type { Labels } from "./Labels";
5 | import type { MappingVarOr } from "./MappingVarOr";
6 |
7 | export interface LineChartPane {
8 | name: string;
9 | id: string;
10 | dataset: DatasetRef;
11 | xColumn: string;
12 | yColumn: string;
13 | lineColor: MappingVarOr | null;
14 | lineWidth: MappingVarOr | null;
15 | labels: Labels | null;
16 | }
17 |
--------------------------------------------------------------------------------
/matico_types/spec/LinearLayout.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { Alignment } from "./Alignment";
3 | import type { GapSize } from "./GapSize";
4 | import type { Justification } from "./Justification";
5 | import type { LinearLayoutDirection } from "./LinearLayoutDirection";
6 |
7 | export interface LinearLayout {
8 | direction: LinearLayoutDirection;
9 | allowOverflow: boolean;
10 | justify: Justification;
11 | gap: GapSize | null;
12 | align: Alignment;
13 | }
14 |
--------------------------------------------------------------------------------
/matico_types/spec/LinearLayoutDirection.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type LinearLayoutDirection = "row" | "column";
4 |
--------------------------------------------------------------------------------
/matico_types/spec/MapControls.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface MapControls {
4 | scale: boolean | null;
5 | geolocate: boolean | null;
6 | navigation: boolean | null;
7 | fullscreen: boolean | null;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/MapPane.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { BaseMap } from "./BaseMap";
3 | import type { Layer } from "./Layer";
4 | import type { MapControls } from "./MapControls";
5 | import type { SelectionOptions } from "./SelectionOptions";
6 | import type { VarOr } from "./VarOr";
7 | import type { View } from "./View";
8 |
9 | export interface MapPane {
10 | name: string;
11 | id: string;
12 | view: VarOr;
13 | layers: Array;
14 | baseMap: BaseMap | null;
15 | controls: MapControls | null;
16 | selectionOptions: SelectionOptions | null;
17 | }
18 |
--------------------------------------------------------------------------------
/matico_types/spec/MapProjection.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type MapProjection =
4 | | "geoConicConformal"
5 | | "geoTransverseMercator"
6 | | "geoNaturalEarth1"
7 | | "geoConicEquidistant"
8 | | "geoOrthographic"
9 | | "geoStereographic"
10 | | "geoMercator"
11 | | "geoEquirectangular";
12 |
--------------------------------------------------------------------------------
/matico_types/spec/Mapping.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { Domain } from "./Domain";
3 | import type { Range } from "./Range";
4 |
5 | export interface Mapping {
6 | variable: string;
7 | domain: Domain;
8 | range: Range;
9 | }
10 |
--------------------------------------------------------------------------------
/matico_types/spec/MappingType.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type MappingType = "continuious" | "discrete";
4 |
--------------------------------------------------------------------------------
/matico_types/spec/MappingVarOr.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { DomainVal } from "./DomainVal";
3 | import type { Mapping } from "./Mapping";
4 | import type { Variable } from "./Variable";
5 |
6 | export type MappingVarOr = Variable | Mapping | T;
7 |
--------------------------------------------------------------------------------
/matico_types/spec/MaticoApiDataset.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { SpecParameter } from "./SpecParameter";
3 |
4 | export interface MaticoApiDataset {
5 | name: string;
6 | description: string;
7 | serverUrl: string;
8 | apiId: string | null;
9 | params: Array;
10 | }
11 |
--------------------------------------------------------------------------------
/matico_types/spec/MaticoRemoteDataset.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface MaticoRemoteDataset {
4 | name: string;
5 | description: string;
6 | serverUrl: string;
7 | datasetId: string | null;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/Metadata.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface Metadata {
4 | name: string;
5 | createdAt: string;
6 | description: string;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/NamedBaseMap.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface NamedBaseMap {
4 | name: string;
5 | affiliation: string | null;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/NumericCategoryOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 |
4 | export interface NumericCategoryOptions {
5 | allowMulti: boolean;
6 | options: Array;
7 | displayDetails: ParameterOptionDisplayDetails;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/NumericFloatOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 |
4 | export interface NumericFloatOptions {
5 | range: Array | null;
6 | default: number | null;
7 | displayDetails: ParameterOptionDisplayDetails;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/NumericIntOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 |
4 | export interface NumericIntOptions {
5 | range: Array | null;
6 | default: number | null;
7 | displayDetails: ParameterOptionDisplayDetails;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/OptionGroup.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 | import type { ParameterOptions } from "./ParameterOptions";
4 |
5 | export interface OptionGroup {
6 | options: Record;
7 | displayDetails: ParameterOptionDisplayDetails;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/OptionGroupVal.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterValue } from "./ParameterValue";
3 |
4 | export interface OptionGroupVal {
5 | name: string;
6 | parameter: ParameterValue;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/OptionGroupVals.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { OptionGroupVal } from "./OptionGroupVal";
3 |
4 | export type OptionGroupVals = Array;
5 |
--------------------------------------------------------------------------------
/matico_types/spec/Page.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { Layout } from "./Layout";
3 | import type { PaneRef } from "./PaneRef";
4 |
5 | export interface Page {
6 | name: string;
7 | id: string;
8 | icon: string | null;
9 | panes: Array;
10 | path: string | null;
11 | layout: Layout;
12 | }
13 |
--------------------------------------------------------------------------------
/matico_types/spec/PaneDetails.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { PanePosition } from "./PanePosition";
3 |
4 | export interface PaneDetails {
5 | id: string;
6 | paneId: string;
7 | position: PanePosition;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/PaneRef.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { PaneDetails } from "./PaneDetails";
3 |
4 | export type PaneRef =
5 | | ({ type: "map" } & PaneDetails)
6 | | ({ type: "text" } & PaneDetails)
7 | | ({ type: "container" } & PaneDetails)
8 | | ({ type: "histogram" } & PaneDetails)
9 | | ({ type: "scatterplot" } & PaneDetails)
10 | | ({ type: "pieChart" } & PaneDetails)
11 | | ({ type: "controls" } & PaneDetails)
12 | | ({ type: "staticMap" } & PaneDetails)
13 | | ({ type: "switches" } & PaneDetails)
14 | | ({ type: "categorySelector" } & PaneDetails)
15 | | ({ type: "dateTimeSlider" } & PaneDetails);
16 |
--------------------------------------------------------------------------------
/matico_types/spec/ParameterOptionDisplayDetails.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface ParameterOptionDisplayDetails {
4 | description: string | null;
5 | displayName: string | null;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/ParameterValue.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { OptionGroupVals } from "./OptionGroupVals";
3 |
4 | export type ParameterValue =
5 | | { type: "optionGroup"; value: OptionGroupVals }
6 | | { type: "boolean"; value: boolean }
7 | | { type: "repeatedOption"; value: Array }
8 | | { type: "numericFloat"; value: number }
9 | | { type: "numericInt"; value: number }
10 | | { type: "numericCategory"; value: Array }
11 | | { type: "textCategory"; value: Array }
12 | | { type: "column"; value: string }
13 | | { type: "table"; value: string }
14 | | { type: "text"; value: string };
15 |
--------------------------------------------------------------------------------
/matico_types/spec/PieChartPane.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { DatasetRef } from "./DatasetRef";
3 | import type { Labels } from "./Labels";
4 |
5 | export interface PieChartPane {
6 | name: string;
7 | id: string;
8 | dataset: DatasetRef;
9 | column: string;
10 | theme: string | null;
11 | labels: Labels | null;
12 | }
13 |
--------------------------------------------------------------------------------
/matico_types/spec/QuantileParams.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface QuantileParams {
4 | bins: number;
5 | }
6 |
--------------------------------------------------------------------------------
/matico_types/spec/Range.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { MappingType } from "./MappingType";
3 | import type { RangeVals } from "./RangeVals";
4 | import type { VarOr } from "./VarOr";
5 |
6 | export interface Range {
7 | type: MappingType;
8 | values: VarOr>;
9 | }
10 |
--------------------------------------------------------------------------------
/matico_types/spec/RangeControl.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { VarOr } from "./VarOr";
3 |
4 | export interface RangeControl {
5 | name: string;
6 | max: VarOr;
7 | min: VarOr;
8 | step: VarOr;
9 | defaultValue: number;
10 | changeEvent: string | null;
11 | }
12 |
--------------------------------------------------------------------------------
/matico_types/spec/RangeFilter.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { VarOr } from "./VarOr";
3 |
4 | export interface RangeFilter {
5 | variable: string;
6 | min: VarOr | null;
7 | max: VarOr | null;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/RangeVals.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type RangeVals = Array | string;
4 |
--------------------------------------------------------------------------------
/matico_types/spec/RegExFilter.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface RegExFilter {
4 | variable: string;
5 | regex: string;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/Rename.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface Rename {
4 | to: string;
5 | }
6 |
--------------------------------------------------------------------------------
/matico_types/spec/RepeatedOption.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 | import type { ParameterOptions } from "./ParameterOptions";
4 |
5 | export interface RepeatedOption {
6 | options: ParameterOptions;
7 | displayDetails: ParameterOptionDisplayDetails;
8 | minTimes: number;
9 | maxTimes: number | null;
10 | }
11 |
--------------------------------------------------------------------------------
/matico_types/spec/ScaleType.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type ScaleType = "pixels" | "meters";
4 |
--------------------------------------------------------------------------------
/matico_types/spec/ScatterplotPane.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ColorSpecification } from "./ColorSpecification";
3 | import type { DatasetRef } from "./DatasetRef";
4 | import type { Labels } from "./Labels";
5 | import type { MappingVarOr } from "./MappingVarOr";
6 |
7 | export interface ScatterplotPane {
8 | name: string;
9 | id: string;
10 | dataset: DatasetRef;
11 | xColumn: string;
12 | yColumn: string;
13 | dotColor: MappingVarOr | null;
14 | dotSize: MappingVarOr | null;
15 | labels: Labels | null;
16 | }
17 |
--------------------------------------------------------------------------------
/matico_types/spec/ScreenUnits.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type ScreenUnits = "pixels" | "percent";
4 |
--------------------------------------------------------------------------------
/matico_types/spec/SelectControl.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { VarOr } from "./VarOr";
3 |
4 | export interface SelectControl {
5 | name: string;
6 | options: VarOr>;
7 | defaultValue: string | null;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/SelectionMode.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type SelectionMode = "rectangle" | "polygon" | "lasso";
4 |
--------------------------------------------------------------------------------
/matico_types/spec/SelectionOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { SelectionMode } from "./SelectionMode";
3 |
4 | export interface SelectionOptions {
5 | selectionEnabled: boolean;
6 | selectionMode: SelectionMode;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/SignedS3ArrowDataset.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface SignedS3ArrowDataset {
4 | name: string;
5 | url: string;
6 | geometryCol: string | null;
7 | idCol: string | null;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/SpecParameter.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { SpecParameterValue } from "./SpecParameterValue";
3 |
4 | export interface SpecParameter {
5 | name: string;
6 | parameter: SpecParameterValue;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/StaticMapPane.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { Labels } from "./Labels";
3 | import type { Layer } from "./Layer";
4 | import type { MapProjection } from "./MapProjection";
5 |
6 | export interface StaticMapPane {
7 | labels: Labels | null;
8 | name: string;
9 | id: string;
10 | layers: Array;
11 | projection: MapProjection | null;
12 | showGraticule: boolean | null;
13 | rotation: number | null;
14 | }
15 |
--------------------------------------------------------------------------------
/matico_types/spec/StringOpts.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface StringOpts {
4 | type: "StringOpts";
5 | template: string | null;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/StyleJSONBaseMap.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface StyleJSONBaseMap {
4 | url: string;
5 | affiliation: string | null;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/SummaryItem.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { AggregationType } from "./AggregationType";
3 | import type { SummaryStyle } from "./SummaryStyle";
4 |
5 | export interface SummaryItem {
6 | name: string;
7 | dataset: string;
8 | column: string;
9 | summaryTypes: Array;
10 | groupbyColumns: Array;
11 | style: SummaryStyle;
12 | }
13 |
--------------------------------------------------------------------------------
/matico_types/spec/SummaryPane.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { SummaryItem } from "./SummaryItem";
3 |
4 | export interface SummaryPane {
5 | name: string;
6 | id: string;
7 | summaryItems: Array;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/SummaryStyle.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type SummaryStyle = "compact" | "list";
4 |
--------------------------------------------------------------------------------
/matico_types/spec/SwitchesPane.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { InitalSelection } from "./InitalSelection";
3 | import type { Orientation } from "./Orientation";
4 |
5 | export interface SwitchesPane {
6 | id: string;
7 | label: string | null;
8 | options: Array;
9 | description: string | null;
10 | initalSelection: InitalSelection;
11 | orientation: Orientation;
12 | name: string;
13 | }
14 |
--------------------------------------------------------------------------------
/matico_types/spec/TabBarPosition.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export type TabBarPosition = "horizontal" | "vertical";
4 |
--------------------------------------------------------------------------------
/matico_types/spec/TabLayout.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { TabBarPosition } from "./TabBarPosition";
3 |
4 | export interface TabLayout {
5 | tabBarPosition: TabBarPosition;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/TableOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 |
4 | export interface TableOptions {
5 | mustHaveGeom: boolean;
6 | displayDetails: ParameterOptionDisplayDetails;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/TextCategoryOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 |
4 | export interface TextCategoryOptions {
5 | allowMulti: boolean;
6 | options: Array;
7 | default: Array | null;
8 | displayDetails: ParameterOptionDisplayDetails;
9 | }
10 |
--------------------------------------------------------------------------------
/matico_types/spec/TextOptions.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ParameterOptionDisplayDetails } from "./ParameterOptionDisplayDetails";
3 |
4 | export interface TextOptions {
5 | maxLength: number | null;
6 | displayDetails: ParameterOptionDisplayDetails;
7 | default: string | null;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/TextPane.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ColorSpecification } from "./ColorSpecification";
3 |
4 | export interface TextPane {
5 | name: string;
6 | id: string;
7 | content: string;
8 | font: string | null;
9 | background: ColorSpecification | null;
10 | }
11 |
--------------------------------------------------------------------------------
/matico_types/spec/Theme.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { ColorSpecification } from "./ColorSpecification";
3 |
4 | export interface Theme {
5 | primaryColor: ColorSpecification | null;
6 | secondaryColor: ColorSpecification | null;
7 | logoUrl: string | null;
8 | }
9 |
--------------------------------------------------------------------------------
/matico_types/spec/TiledLayer.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { LayerContentType } from "./LayerContentType";
3 |
4 | export interface TiledLayer {
5 | urlTemplate: string;
6 | layerContentType: LayerContentType;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/TooltipColumnSpec.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface TooltipColumnSpec {
4 | column: string;
5 | label: string;
6 | formatter: string | null;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/ValidationResult.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface ValidationResult {
4 | is_valid: boolean;
5 | errors: Record;
6 | }
7 |
--------------------------------------------------------------------------------
/matico_types/spec/VarOr.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { DatasetVal } from "./DatasetVal";
3 | import type { Variable } from "./Variable";
4 |
5 | export type VarOr = Variable | T | DatasetVal;
6 |
--------------------------------------------------------------------------------
/matico_types/spec/Variable.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface Variable {
4 | varId: string;
5 | property: string | null;
6 | bind: boolean | null;
7 | }
8 |
--------------------------------------------------------------------------------
/matico_types/spec/View.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 |
3 | export interface View {
4 | lat: number;
5 | lng: number;
6 | zoom: number;
7 | bearing: number;
8 | pitch: number;
9 | }
10 |
--------------------------------------------------------------------------------
/matico_types/spec/WASMCompute.ts:
--------------------------------------------------------------------------------
1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2 | import type { SpecParameter } from "./SpecParameter";
3 |
4 | export interface WASMCompute {
5 | name: string;
6 | url: string;
7 | params: Array;
8 | }
9 |
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - "./matico_spec"
3 | - "./matico_components"
4 | - "./matico_types"
5 | # - "./matico_admin"
6 | - "./matico_app_server"
7 | - "./matico_charts"
8 | - "./editor"
9 |
--------------------------------------------------------------------------------
/python/test.py:
--------------------------------------------------------------------------------
1 | from wasmtime import Engine, Store, Module, Instance, Func, FuncType
2 |
3 | engine = Engine()
4 | store = Store()
5 | module = Module.from_file(engine,'../target/wasm32-unknown-unknown/release/matico_spec.wasm')
6 | instance = Instance(store,module,[])
7 | print_hello = instance.get_export("hello")
8 | print_hello()
9 |
--------------------------------------------------------------------------------
/register_raster_cog.sh:
--------------------------------------------------------------------------------
1 | raster2pgsql \
2 | -s 3857\ # SRID of the data
3 | -t 256x256 \ # Tile raster
4 | -I \ # Index the table
5 | -R \ # Load as "out-db", metadata only
6 | /vsicurl/https://allofthedata.s3.us-west-2.amazonaws.com/lightpolution/cog.tif \
7 | lightpolution \ # Table name to use
8 | | psql -d sms_data
9 |
--------------------------------------------------------------------------------
/scripts/run_docker_prod.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 |
4 | echo DB.HOST=${DB_HOST} >> .env
5 | echo DB.PORT=${DB_PORT} >> .env
6 | echo DB.USERNAME=${DB_USERNAME} >> .env
7 | echo DB.NAME=${DB_NAME} >> .env
8 | echo DB.PASSWORD=${DB_PASSWORD} >> .env
9 |
10 | echo DATADB.HOST=${DB_HOST} >> .env
11 | echo DATADB.PORT=${DB_PORT} >> .env
12 | echo DATADB.USERNAME=${DB_USERNAME} >> .env
13 | echo DATADB.NAME=${DB_NAME} >> .env
14 | echo DATADB.PASSWORD=${DB_PASSWORD} >> .env
15 |
16 | echo SERVER_ADDR=0.0.0.0:8000 >> .env
17 |
18 | service nginx start
19 | # (cd matico_admin && pm2 start server.js --name admin)
20 | (cd matico_admin && PORT=3000 pm2 start yarn --name admin -- start )
21 | ./matico_server
22 |
--------------------------------------------------------------------------------
/start_raster_server.sh:
--------------------------------------------------------------------------------
1 | docker run --name titiler \
2 | -p 8001:8000 \
3 | --env PORT=8000 \
4 | --env WORKERS_PER_CORE=1 \
5 | --rm -it ghcr.io/developmentseed/titiler:latest
6 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./node_modules/gts/tsconfig-google.json",
3 | "compilerOptions": {
4 | "rootDir": ".",
5 | "outDir": "build"
6 | },
7 | "include": [
8 | "src/**/*.ts",
9 | "test/**/*.ts"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/vercel.json:
--------------------------------------------------------------------------------
1 | {
2 | "buildCommand": "pnpm build",
3 | "installCommand":"pnpm install"
4 | }
5 |
--------------------------------------------------------------------------------