@mapcomponents/deck-gl 1.5.5 → 1.5.7-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +1 -0
- package/dist/README.md +3 -0
- package/dist/components/MlHexagonMap/MlHexagonMap.d.ts +14 -0
- package/dist/components/MlHexagonMap/MlHexagonMap.d.ts.map +1 -0
- package/dist/contexts/DeckGlContext.d.ts +15 -0
- package/dist/contexts/DeckGlContext.d.ts.map +1 -0
- package/dist/decorators/MapContextDecorator.d.ts +3 -0
- package/dist/decorators/MapContextDecorator.d.ts.map +1 -0
- package/dist/hooks/useDeckGl.d.ts +8 -0
- package/dist/hooks/useDeckGl.d.ts.map +1 -0
- package/dist/html2canvas.esm-Dmi1NfiH.mjs +4871 -0
- package/dist/index-BitQicV5.mjs +88045 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es-DM25_KJ-.mjs +6674 -0
- package/dist/index.mjs +7 -0
- package/{public → dist}/manifest.json +1 -1
- package/dist/package.json +23 -0
- package/dist/purify.es-DHbHSKL1.mjs +528 -0
- package/dist/util/BubbleForInstructions.d.ts +3 -0
- package/dist/util/BubbleForInstructions.d.ts.map +1 -0
- package/dist/util/Instructions.d.ts +15 -0
- package/dist/util/Instructions.d.ts.map +1 -0
- package/dist/util/index.d.ts +4 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/layerRemovalTest.d.ts +3 -0
- package/dist/util/layerRemovalTest.d.ts.map +1 -0
- package/dist/util/sourceRemovalTest.d.ts +3 -0
- package/dist/util/sourceRemovalTest.d.ts.map +1 -0
- package/index.html +1 -1
- package/package.json +8 -7
- package/project.json +9 -3
- package/src/components/MlHexagonMap/MlHexagonMap.cy.tsx +2 -2
- package/src/components/MlHexagonMap/MlHexagonMap.tsx +0 -3
- package/src/index.ts +1 -0
- package/tsconfig.lib.json +1 -1
- package/vite.config.ts +2 -2
- package/.babelrc +0 -22
- package/.eslintignore +0 -12
- package/.prettierignore +0 -11
- package/.storybook/main.ts +0 -31
- package/.storybook/manager.js +0 -6
- package/.storybook/mapcomponents_logo.png +0 -0
- package/.storybook/preview.ts +0 -27
- package/.storybook/style.css +0 -20
- package/.storybook/wheregroupTheme.js +0 -9
- package/cypress/support/commands.ts +0 -39
- package/cypress/support/component-index.html +0 -12
- package/cypress/support/component.ts +0 -31
- package/cypress/tsconfig.json +0 -25
- package/cypress.config.ts +0 -9
- package/public/index.html +0 -39
- package/scripts/build-catalogue-markdown-docs.js +0 -30
- package/scripts/build-catalogue-meta.js +0 -44
- package/scripts/create-map-component.sh +0 -36
- package/tsconfig.json +0 -12
- /package/{public → dist}/assets/3D/godzilla_simple.glb +0 -0
- /package/{public → dist}/assets/3D/hexa.json +0 -0
- /package/{public → dist}/assets/3D/laerm_points.json +0 -0
- /package/{public → dist}/assets/dop.png +0 -0
- /package/{public → dist}/assets/historic.png +0 -0
- /package/{public → dist}/assets/marker.png +0 -0
- /package/{public → dist}/assets/osm.png +0 -0
- /package/{public → dist}/assets/sample.gpx +0 -0
- /package/{public → dist}/assets/sample1.gpx +0 -0
- /package/{public → dist}/assets/sample2.gpx +0 -0
- /package/{public → dist}/assets/sample3.gpx +0 -0
- /package/{public → dist}/assets/wg-marker.png +0 -0
- /package/{public → dist}/catalogue/.gitkeep +0 -0
- /package/{public → dist}/catalogue/mc_meta.json +0 -0
- /package/{public → dist}/favicon.ico +0 -0
- /package/{public → dist}/logo.png +0 -0
- /package/{public → dist}/robots.txt +0 -0
- /package/{public → dist}/thumbnails/MapLibreMap.png +0 -0
- /package/{public → dist}/thumbnails/MlCameraFollowPath.png +0 -0
- /package/{public → dist}/thumbnails/MlCreatePdfButton.png +0 -0
- /package/{public → dist}/thumbnails/MlCreatePdfForm.png +0 -0
- /package/{public → dist}/thumbnails/MlDeckGlLayer.png +0 -0
- /package/{public → dist}/thumbnails/MlDeckGlTerrainLayer.png +0 -0
- /package/{public → dist}/thumbnails/MlDemoDashboard.png +0 -0
- /package/{public → dist}/thumbnails/MlFeatureEditor.png +0 -0
- /package/{public → dist}/thumbnails/MlFillExtrusionLayer.png +0 -0
- /package/{public → dist}/thumbnails/MlFollowGps.png +0 -0
- /package/{public → dist}/thumbnails/MlGeoJsonLayer.png +0 -0
- /package/{public → dist}/thumbnails/MlGpxViewer.png +0 -0
- /package/{public → dist}/thumbnails/MlHillshadeLayer.png +0 -0
- /package/{public → dist}/thumbnails/MlIconLayer.png +0 -0
- /package/{public → dist}/thumbnails/MlLaermkarte.png +0 -0
- /package/{public → dist}/thumbnails/MlLayerMagnify.png +0 -0
- /package/{public → dist}/thumbnails/MlLayerSwipe.png +0 -0
- /package/{public → dist}/thumbnails/MlMapDrawTools.png +0 -0
- /package/{public → dist}/thumbnails/MlMeasureTool.png +0 -0
- /package/{public → dist}/thumbnails/MlMobilerImker.png +0 -0
- /package/{public → dist}/thumbnails/MlNavigationCompass.png +0 -0
- /package/{public → dist}/thumbnails/MlNavigationTools.png +0 -0
- /package/{public → dist}/thumbnails/MlOsmLayer.png +0 -0
- /package/{public → dist}/thumbnails/MlScaleReference.png +0 -0
- /package/{public → dist}/thumbnails/MlSketchTool.png +0 -0
- /package/{public → dist}/thumbnails/MlSpatialElevationProfile.png +0 -0
- /package/{public → dist}/thumbnails/MlThreeJsLayer.png +0 -0
- /package/{public → dist}/thumbnails/MlTransitionGeoJsonLayer.png +0 -0
- /package/{public → dist}/thumbnails/MlVectorTileLayer.png +0 -0
- /package/{public → dist}/thumbnails/MlWanderApp.png +0 -0
- /package/{public → dist}/thumbnails/MlWmsLayer.png +0 -0
- /package/{public → dist}/thumbnails/MlWmsLoader.png +0 -0
- /package/{public → dist}/thumbnails/useCameraFollowPath.png +0 -0
package/package.json
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapcomponents/deck-gl",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7-2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
6
7
|
"dependencies": {
|
|
7
8
|
"@deck.gl/aggregation-layers": "^9.1.14",
|
|
8
9
|
"@deck.gl/core": "^9.1.14",
|
|
9
10
|
"@deck.gl/mapbox": "^9.1.14",
|
|
10
|
-
"@
|
|
11
|
-
"@mui/
|
|
12
|
-
"@
|
|
13
|
-
"maplibre-gl": "^5.
|
|
11
|
+
"@mui/icons-material": "^7.3.2",
|
|
12
|
+
"@mui/material": "^7.3.2",
|
|
13
|
+
"@storybook/react": "^9.1.4",
|
|
14
|
+
"maplibre-gl": "^5.7.0",
|
|
15
|
+
"@mapcomponents/react-maplibre": "^1.5.7-2"
|
|
14
16
|
},
|
|
15
17
|
"devDependencies": {
|
|
16
18
|
"@types/geojson": "^7946.0.16"
|
|
17
19
|
},
|
|
18
20
|
"scripts": {
|
|
19
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
20
|
-
"build": "tsc --p ./tsconfig.lib.json && vite build"
|
|
21
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
21
22
|
}
|
|
22
23
|
}
|
package/project.json
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deck-gl",
|
|
3
3
|
"projectType": "library",
|
|
4
|
-
"root": "
|
|
5
|
-
"sourceRoot": "
|
|
6
|
-
"targets": {
|
|
4
|
+
"root": "packages/deck-gl",
|
|
5
|
+
"sourceRoot": "packages/deck-gl/src",
|
|
6
|
+
"targets": {
|
|
7
|
+
"storybook": {
|
|
8
|
+
"options": {
|
|
9
|
+
"port": 4401
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
7
13
|
}
|
|
@@ -9,12 +9,12 @@ describe('MlHexagonMap Test', () => {
|
|
|
9
9
|
cy.mount(<NoiseMap />);
|
|
10
10
|
cy.window()
|
|
11
11
|
.should((win) => expect((win as any)._map).to.exist)
|
|
12
|
-
.then(win => {
|
|
12
|
+
.then((win) => {
|
|
13
13
|
const map = (win as any)._map;
|
|
14
14
|
cy.wrap(map._controls)
|
|
15
15
|
.should('have.length.at.least', 2)
|
|
16
16
|
.then((controls) => {
|
|
17
|
-
expect(controls[1]._props.id).to.equal(
|
|
17
|
+
expect(controls[1]._props.id).to.equal('deckgl-layer');
|
|
18
18
|
});
|
|
19
19
|
});
|
|
20
20
|
});
|
package/src/index.ts
CHANGED
package/tsconfig.lib.json
CHANGED
package/vite.config.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
|
8
8
|
|
|
9
9
|
export default defineConfig(() => ({
|
|
10
10
|
root: __dirname,
|
|
11
|
-
cacheDir: '../../node_modules/.vite/
|
|
11
|
+
cacheDir: '../../node_modules/.vite/packages/deck-gl',
|
|
12
12
|
plugins: [
|
|
13
13
|
react(),
|
|
14
14
|
nxViteTsPaths(),
|
|
@@ -22,7 +22,7 @@ export default defineConfig(() => ({
|
|
|
22
22
|
// Configuration for building your library.
|
|
23
23
|
// See: https://vitejs.dev/guide/build.html#library-mode
|
|
24
24
|
build: {
|
|
25
|
-
outDir: '
|
|
25
|
+
outDir: 'dist',
|
|
26
26
|
emptyOutDir: true,
|
|
27
27
|
reportCompressedSize: true,
|
|
28
28
|
commonjsOptions: {
|
package/.babelrc
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"plugins": [
|
|
3
|
-
"@babel/plugin-transform-typescript",
|
|
4
|
-
"babel-plugin-styled-components",
|
|
5
|
-
[
|
|
6
|
-
"inline-react-svg",
|
|
7
|
-
{
|
|
8
|
-
"svgo": {
|
|
9
|
-
"plugins": [
|
|
10
|
-
{
|
|
11
|
-
"name": "preset-default",
|
|
12
|
-
"params": {
|
|
13
|
-
"overrides": { "mergePaths": false }
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
],
|
|
21
|
-
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"]
|
|
22
|
-
}
|
package/.eslintignore
DELETED
package/.prettierignore
DELETED
package/.storybook/main.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { StorybookConfig } from '@storybook/react-vite';
|
|
2
|
-
|
|
3
|
-
const config: StorybookConfig = {
|
|
4
|
-
stories: ['../src/**/*.@(mdx|stories.@(js|jsx|ts|tsx))'],
|
|
5
|
-
addons: ['@storybook/addon-docs'],
|
|
6
|
-
framework: {
|
|
7
|
-
name: '@storybook/react-vite',
|
|
8
|
-
options: {
|
|
9
|
-
builder: {
|
|
10
|
-
viteConfigPath: 'vite.config.ts',
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
staticDirs: ['../public'],
|
|
15
|
-
|
|
16
|
-
typescript: {
|
|
17
|
-
check: false,
|
|
18
|
-
reactDocgen: 'react-docgen-typescript',
|
|
19
|
-
reactDocgenTypescriptOptions: {
|
|
20
|
-
shouldExtractLiteralValuesFromEnum: true,
|
|
21
|
-
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export default config;
|
|
28
|
-
|
|
29
|
-
// To customize your Vite configuration you can use the viteFinal field.
|
|
30
|
-
// Check https://storybook.js.org/docs/react/builders/vite#configuration
|
|
31
|
-
// and https://nx.dev/recipes/storybook/custom-builder-configs
|
package/.storybook/manager.js
DELETED
|
Binary file
|
package/.storybook/preview.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import './style.css';
|
|
2
|
-
|
|
3
|
-
export const parameters = {
|
|
4
|
-
docs: {
|
|
5
|
-
inlineStories: false,
|
|
6
|
-
},
|
|
7
|
-
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const globalTypes = {
|
|
12
|
-
theme: {
|
|
13
|
-
name: 'Theme',
|
|
14
|
-
title: 'Theme',
|
|
15
|
-
description: 'Theme for your components',
|
|
16
|
-
defaultValue: 'light',
|
|
17
|
-
toolbar: {
|
|
18
|
-
icon: 'paintbrush',
|
|
19
|
-
dynamicTitle: true,
|
|
20
|
-
items: [
|
|
21
|
-
{ value: 'light', left: '☀️', title: 'Light mode' },
|
|
22
|
-
{ value: 'dark', left: '🌙', title: 'Dark mode' },
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
export const tags = ['autodocs'];
|
package/.storybook/style.css
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
.docs-story > div:first-child{
|
|
2
|
-
z-index:0;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.docs-story > div > div:first-child, .innerZoomElementWrapper, .innerZoomElementWrapper > div:first-child, .innerZoomElementWrapper > div:first-child > div:first-child{
|
|
6
|
-
|
|
7
|
-
position: absolute;
|
|
8
|
-
top: 0;
|
|
9
|
-
bottom: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.docs-story > div > div:first-child{
|
|
15
|
-
height: initial;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.innerZoomElementWrapper > div > div > div:first-child{
|
|
19
|
-
height: 100% !important;
|
|
20
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
|
|
4
|
-
// ***********************************************
|
|
5
|
-
// This example commands.ts shows you how to
|
|
6
|
-
// create various custom commands and overwrite
|
|
7
|
-
// existing commands.
|
|
8
|
-
//
|
|
9
|
-
// For more comprehensive examples of custom
|
|
10
|
-
// commands please read more here:
|
|
11
|
-
// https://on.cypress.io/custom-commands
|
|
12
|
-
// ***********************************************
|
|
13
|
-
|
|
14
|
-
declare global {
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
16
|
-
namespace Cypress {
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18
|
-
interface Chainable<Subject> {
|
|
19
|
-
login(email: string, password: string): void;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// -- This is a parent command --
|
|
25
|
-
Cypress.Commands.add('login', (email, password) => {
|
|
26
|
-
console.log('Custom command example: Login', email, password);
|
|
27
|
-
});
|
|
28
|
-
//
|
|
29
|
-
// -- This is a child command --
|
|
30
|
-
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
// -- This is a dual command --
|
|
34
|
-
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
// -- This will overwrite an existing command --
|
|
38
|
-
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
|
39
|
-
*/
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
-
<title>deck-gl Components App</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div data-cy-root></div>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { mount } from 'cypress/react';
|
|
2
|
-
// ***********************************************************
|
|
3
|
-
// This example support/component.ts is processed and
|
|
4
|
-
// loaded automatically before your test files.
|
|
5
|
-
//
|
|
6
|
-
// This is a great place to put global configuration and
|
|
7
|
-
// behavior that modifies Cypress.
|
|
8
|
-
//
|
|
9
|
-
// You can change the location of this file or turn off
|
|
10
|
-
// automatically serving support files with the
|
|
11
|
-
// 'supportFile' configuration option.
|
|
12
|
-
//
|
|
13
|
-
// You can read more here:
|
|
14
|
-
// https://on.cypress.io/configuration
|
|
15
|
-
// ***********************************************************
|
|
16
|
-
|
|
17
|
-
// Import commands.ts using ES2015 syntax:
|
|
18
|
-
import './commands';
|
|
19
|
-
|
|
20
|
-
// add component testing only related command here, such as mount
|
|
21
|
-
declare global {
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
23
|
-
namespace Cypress {
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
25
|
-
interface Chainable<Subject> {
|
|
26
|
-
mount: typeof mount;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
Cypress.Commands.add('mount', mount);
|
package/cypress/tsconfig.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"allowJs": true,
|
|
5
|
-
"outDir": "../../dist/out-tsc",
|
|
6
|
-
"module": "commonjs",
|
|
7
|
-
"types": ["cypress", "node"],
|
|
8
|
-
"sourceMap": false,
|
|
9
|
-
"rootDir": "../",
|
|
10
|
-
},
|
|
11
|
-
"include": [
|
|
12
|
-
"**/*.ts",
|
|
13
|
-
"**/*.js",
|
|
14
|
-
"../src/**/**/*.stories.tsx",
|
|
15
|
-
"../src/**/**/*.stories.jsx",
|
|
16
|
-
"../cypress.config.ts",
|
|
17
|
-
"../**/*.cy.ts",
|
|
18
|
-
"../**/*.cy.tsx",
|
|
19
|
-
"../**/*.cy.js",
|
|
20
|
-
"../**/*.cy.jsx",
|
|
21
|
-
"../**/*.d.ts",
|
|
22
|
-
"../src/**/**.tsx",
|
|
23
|
-
"../src/**/**.jsx"
|
|
24
|
-
]
|
|
25
|
-
}
|
package/cypress.config.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { nxComponentTestingPreset } from '@nx/react/plugins/component-testing';
|
|
2
|
-
import { defineConfig } from 'cypress';
|
|
3
|
-
|
|
4
|
-
export default defineConfig({
|
|
5
|
-
component: nxComponentTestingPreset(__filename, {
|
|
6
|
-
bundler: 'vite',
|
|
7
|
-
buildTarget: 'deck-gl:build',
|
|
8
|
-
}),
|
|
9
|
-
});
|
package/public/index.html
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
-
<meta name="theme-color" content="#000000" />
|
|
8
|
-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
9
|
-
<!--
|
|
10
|
-
manifest.json provides metadata used when your web app is installed on a
|
|
11
|
-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
12
|
-
-->
|
|
13
|
-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
14
|
-
<!--
|
|
15
|
-
Notice the use of %PUBLIC_URL% in the tags above.
|
|
16
|
-
It will be replaced with the URL of the `public` folder during the build.
|
|
17
|
-
Only files inside the `public` folder can be referenced from the HTML.
|
|
18
|
-
|
|
19
|
-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
20
|
-
work correctly both with client-side routing and a non-root public URL.
|
|
21
|
-
Learn how to configure a non-root public URL by running `npm run build`.
|
|
22
|
-
-->
|
|
23
|
-
<title>React App</title>
|
|
24
|
-
</head>
|
|
25
|
-
<body>
|
|
26
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
27
|
-
<div id="root"></div>
|
|
28
|
-
<!--
|
|
29
|
-
This HTML file is a template.
|
|
30
|
-
If you open it directly in the browser, you will see an empty page.
|
|
31
|
-
|
|
32
|
-
You can add webfonts, meta tags, or analytics to this file.
|
|
33
|
-
The build step will place the bundled scripts into the <body> tag.
|
|
34
|
-
|
|
35
|
-
To begin the development, run `npm start` or `yarn start`.
|
|
36
|
-
To create a production bundle, use `npm run build` or `yarn build`.
|
|
37
|
-
-->
|
|
38
|
-
</body>
|
|
39
|
-
</html>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
const glob = require('glob');
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const showdown = require('showdown');
|
|
4
|
-
|
|
5
|
-
const options = {};
|
|
6
|
-
|
|
7
|
-
function getComponentNameFromPath(path) {
|
|
8
|
-
let tmp = path.split('/');
|
|
9
|
-
tmp = tmp[tmp.length - 1];
|
|
10
|
-
tmp = tmp.split('.doc');
|
|
11
|
-
return tmp[0];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const converter = new showdown.Converter();
|
|
15
|
-
|
|
16
|
-
glob('src/components/**/*.doc.*.md', options, function (er, files) {
|
|
17
|
-
console.log(files);
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line prefer-const
|
|
20
|
-
let i = 0, len = files.length;
|
|
21
|
-
for (; i < len; i++) {
|
|
22
|
-
const language = files[i].slice(-5, -3);
|
|
23
|
-
const rawdata = fs.readFileSync(files[i]);
|
|
24
|
-
const html = converter.makeHtml(rawdata + '');
|
|
25
|
-
fs.writeFileSync(
|
|
26
|
-
'public/catalogue/' + getComponentNameFromPath(files[i]) + '.' + language + '.html',
|
|
27
|
-
html
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
const glob = require('glob');
|
|
2
|
-
const fetch = (...args) => import('node-fetch').then(({ default: fetch }) => fetch(...args));
|
|
3
|
-
const Ajv = require('ajv');
|
|
4
|
-
const ajv = new Ajv();
|
|
5
|
-
const fs = require('fs');
|
|
6
|
-
|
|
7
|
-
const options = {};
|
|
8
|
-
const mc_meta = {};
|
|
9
|
-
|
|
10
|
-
glob('src/**/**/*.meta.json', options, function (er, files) {
|
|
11
|
-
console.log(files);
|
|
12
|
-
|
|
13
|
-
// eslint-disable-next-line prefer-const
|
|
14
|
-
let i = 0, len = files.length;
|
|
15
|
-
for (; i < len; i++) {
|
|
16
|
-
const rawdata = fs.readFileSync(files[i]);
|
|
17
|
-
const metaObj = JSON.parse(rawdata);
|
|
18
|
-
mc_meta[metaObj.name] = metaObj;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
fetch('https://catalogue.mapcomponents.org/schema/metadata.schema.json', {
|
|
22
|
-
method: 'GET',
|
|
23
|
-
headers: {
|
|
24
|
-
Accept: 'application/json',
|
|
25
|
-
'Content-Type': 'application/json',
|
|
26
|
-
},
|
|
27
|
-
})
|
|
28
|
-
.then((res) => {
|
|
29
|
-
if (!res.ok) {
|
|
30
|
-
return false;
|
|
31
|
-
} else {
|
|
32
|
-
return res.json();
|
|
33
|
-
}
|
|
34
|
-
})
|
|
35
|
-
.then((schema) => {
|
|
36
|
-
const validate = ajv.compile(schema);
|
|
37
|
-
const valid = validate(mc_meta);
|
|
38
|
-
if (!valid) throw new Error(JSON.stringify(validate.errors));
|
|
39
|
-
//if (!valid) console.log(validate.errors);
|
|
40
|
-
|
|
41
|
-
const data = JSON.stringify(mc_meta);
|
|
42
|
-
fs.writeFileSync('public/catalogue/mc_meta.json', data);
|
|
43
|
-
});
|
|
44
|
-
});
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
set -x
|
|
4
|
-
|
|
5
|
-
if [ $# -eq 0 ]; then
|
|
6
|
-
echo "Please provide a component name as first argument."
|
|
7
|
-
exit 1
|
|
8
|
-
fi
|
|
9
|
-
|
|
10
|
-
component_name="$1"
|
|
11
|
-
target_path="src/components/"
|
|
12
|
-
template_name="MlComponentTemplate"
|
|
13
|
-
template_path="src/components/"
|
|
14
|
-
|
|
15
|
-
if [ ! -d "$target_path$component_name" ]; then
|
|
16
|
-
|
|
17
|
-
cp -r $template_path$template_name $target_path$component_name
|
|
18
|
-
|
|
19
|
-
mv $target_path$component_name/$template_name.doc.de.md $target_path$component_name/$component_name.doc.de.md
|
|
20
|
-
|
|
21
|
-
mv $target_path$component_name/$template_name.tsx $target_path$component_name/$component_name.tsx
|
|
22
|
-
|
|
23
|
-
mv $target_path$component_name/$template_name.meta_.json $target_path$component_name/$component_name.meta_.json
|
|
24
|
-
|
|
25
|
-
mv $target_path$component_name/$template_name.stories.js $target_path$component_name/$component_name.stories.js
|
|
26
|
-
|
|
27
|
-
sed -i "s/$template_name/$component_name/g" $target_path$component_name/$component_name.doc.de.md
|
|
28
|
-
sed -i "s/$template_name/$component_name/g" $target_path$component_name/$component_name.tsx
|
|
29
|
-
sed -i "s/$template_name/$component_name/g" $target_path$component_name/$component_name.meta_.json
|
|
30
|
-
sed -i "s/$template_name/$component_name/g" $target_path$component_name/$component_name.stories.js
|
|
31
|
-
|
|
32
|
-
else
|
|
33
|
-
|
|
34
|
-
echo "The directory $target_path$component_name already exists. Please use a different name."
|
|
35
|
-
|
|
36
|
-
fi
|
package/tsconfig.json
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|