@abi-software/mapintegratedvuer 1.21.1 → 1.22.0

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.
Files changed (68) hide show
  1. package/README.md +23 -5
  2. package/assets/location-icon.html +33 -1
  3. package/assets/styleguide.css +18 -18
  4. package/cypress.config.js +7 -9
  5. package/dist/{ConnectivityGraph-CZMROk9r.js → ConnectivityGraph-BBZ3Dgat.js} +3 -3
  6. package/dist/{ContentMixin-Vn34n5t2.js → ContentMixin-B-O_IwPg.js} +16 -18
  7. package/dist/{DynamicMarkerMixin-BS6t7w_i.js → DynamicMarkerMixin-B9iqtP_f.js} +1 -1
  8. package/dist/{Flatmap-BejxA0uz.js → Flatmap-BoEFI50b.js} +4 -4
  9. package/dist/{Iframe-BWbhTjCR.js → Iframe-Slj-LQTF.js} +4 -4
  10. package/dist/{MultiFlatmap-nlmsH-Ib.js → MultiFlatmap-l6aBn6x3.js} +17 -5
  11. package/dist/{Plot-ChbPsDZX.js → Plot-CIhEip5b.js} +2 -2
  12. package/dist/{Scaffold-C6f7c7Ha.js → Scaffold-D5ZGCDvt.js} +4 -4
  13. package/dist/{Simulation-DcJScRYo.js → Simulation-C5o5DXRb.js} +2 -2
  14. package/dist/{connectivities-UXTqf7_0.js → connectivities-Br3MpoAv.js} +154 -95
  15. package/dist/index.html +9 -6
  16. package/dist/mapintegratedvuer.js +5506 -5582
  17. package/dist/mapintegratedvuer.umd.cjs +196 -196
  18. package/dist/style.css +1 -1
  19. package/eslint.config.js +39 -15
  20. package/package.json +12 -6
  21. package/public/index.html +9 -6
  22. package/src/App.vue +224 -255
  23. package/src/assets/_variables.scss +12 -10
  24. package/src/assets/header-icon.scss +8 -9
  25. package/src/assets/mapicon-species-style.css +10 -8
  26. package/src/assets/styles.scss +1 -1
  27. package/src/components/ContentBar.vue +99 -106
  28. package/src/components/ContentVuer.vue +36 -39
  29. package/src/components/ContextCard.vue +238 -199
  30. package/src/components/ContextHelp.vue +22 -26
  31. package/src/components/CustomSplitter.vue +32 -43
  32. package/src/components/DatasetHeader.vue +37 -41
  33. package/src/components/DialogToolbarContent.vue +292 -256
  34. package/src/components/FlatmapContextCard.vue +52 -57
  35. package/src/components/MapContent.vue +111 -87
  36. package/src/components/ResizeSensor.vue +8 -13
  37. package/src/components/SearchControls.vue +26 -35
  38. package/src/components/SimulatedData.js +196 -219
  39. package/src/components/SplitDialog.vue +139 -129
  40. package/src/components/SplitFlow.vue +433 -239
  41. package/src/components/index.js +1 -3
  42. package/src/components/scripts/simulation_data.js +393 -397
  43. package/src/components/scripts/utilities.js +108 -78
  44. package/src/components/viewers/CellDLViewer.vue +9 -9
  45. package/src/components/viewers/ConnectivityGraph.vue +9 -12
  46. package/src/components/viewers/Flatmap.vue +23 -25
  47. package/src/components/viewers/Iframe.vue +8 -10
  48. package/src/components/viewers/MultiFlatmap.vue +73 -69
  49. package/src/components/viewers/Plot.vue +6 -7
  50. package/src/components/viewers/Scaffold.vue +73 -63
  51. package/src/components/viewers/Simulation.vue +10 -15
  52. package/src/main.js +16 -21
  53. package/src/mixins/ContentMixin.js +208 -178
  54. package/src/mixins/DynamicMarkerMixin.js +14 -18
  55. package/src/mixins/RetrieveContextCardMixin.js +35 -30
  56. package/src/mixins/S3Bucket.vue +10 -13
  57. package/src/services/knowledgeMapping.js +53 -53
  58. package/src/services/tagging.js +4 -4
  59. package/src/stores/connectivities.js +46 -8
  60. package/src/stores/entries.js +7 -9
  61. package/src/stores/index.js +7 -7
  62. package/src/stores/settings.js +23 -31
  63. package/src/stores/splitFlow.js +395 -298
  64. package/vite.bundle-build.js +24 -26
  65. package/vite.config.js +22 -21
  66. package/vite.static-build.js +4 -4
  67. package/vitest.workspace.js +1 -3
  68. package/vuese-generator.js +47 -55
@@ -1,46 +1,44 @@
1
- import path from "path";
2
- import { defineConfig } from 'vite'
3
- import rootConfig from './vite.config.js'
1
+ import path from 'path';
2
+ import { defineConfig } from 'vite';
3
+ import rootConfig from './vite.config.js';
4
4
 
5
5
  // defineWorkspace provides a nice type hinting DX
6
6
  export default defineConfig((configEnv) => {
7
7
  const config = rootConfig(configEnv);
8
8
  config.build = {
9
9
  lib: {
10
- entry: path.resolve(import.meta.dirname, "./src/components/index.js"),
11
- name: "MapintegratedVuer",
12
- fileName: "mapintegratedvuer",
10
+ entry: path.resolve(import.meta.dirname, './src/components/index.js'),
11
+ name: 'MapintegratedVuer',
12
+ fileName: 'mapintegratedvuer',
13
13
  },
14
14
  rollupOptions: {
15
15
  external: [
16
- "vue",
17
- "pinia",
18
- "@abi-software/flatmapvuer",
19
- "@abi-software/plotvuer",
20
- "@abi-software/scaffoldvuer",
21
- "@abi-software/simulationvuer",
22
- "@abi-software/flatmapvuer/dist/style.css",
23
- "@abi-software/plotvuer/dist/style.css",
24
- "@abi-software/scaffoldvuer/dist/style.css",
25
- "@abi-software/simulationvuer/dist/style.css",
16
+ 'vue',
17
+ 'pinia',
18
+ '@abi-software/flatmapvuer',
19
+ '@abi-software/plotvuer',
20
+ '@abi-software/scaffoldvuer',
21
+ '@abi-software/simulationvuer',
22
+ '@abi-software/flatmapvuer/dist/style.css',
23
+ '@abi-software/plotvuer/dist/style.css',
24
+ '@abi-software/scaffoldvuer/dist/style.css',
25
+ '@abi-software/simulationvuer/dist/style.css',
26
26
  ],
27
27
  output: {
28
28
  globals: {
29
- vue: "Vue",
30
- pinia: "pinia",
31
- "@abi-software/flatmapvuer": "flatmapvuer",
32
- "@abi-software/plotvuer": "plotvuer",
33
- "@abi-software/scaffoldvuer": "scaffoldvuer",
34
- "@abi-software/simulationvuer": "simulationvuer",
29
+ vue: 'Vue',
30
+ pinia: 'pinia',
31
+ '@abi-software/flatmapvuer': 'flatmapvuer',
32
+ '@abi-software/plotvuer': 'plotvuer',
33
+ '@abi-software/scaffoldvuer': 'scaffoldvuer',
34
+ '@abi-software/simulationvuer': 'simulationvuer',
35
35
  },
36
36
  // keep css output name stable for the "./dist/style.css" export/import paths
37
37
  assetFileNames: (assetInfo) =>
38
- assetInfo.name?.endsWith(".css")
39
- ? "style.css"
40
- : "assets/[name][extname]",
38
+ assetInfo.name?.endsWith('.css') ? 'style.css' : 'assets/[name][extname]',
41
39
  },
42
40
  },
43
41
  };
44
42
 
45
43
  return config;
46
- })
44
+ });
package/vite.config.js CHANGED
@@ -1,15 +1,16 @@
1
- import path from "node:path";
2
- import { fileURLToPath } from "node:url";
3
- import { defineConfig } from "vite";
4
- import vue from "@vitejs/plugin-vue";
5
- import Components from "unplugin-vue-components/vite";
6
- import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
1
+ import path from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
+ import { defineConfig } from 'vite';
4
+ import vue from '@vitejs/plugin-vue';
5
+ import AutoImport from 'unplugin-auto-import/vite';
6
+ import Components from 'unplugin-vue-components/vite';
7
+ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
7
8
 
8
9
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
9
- const pathSrc = path.resolve(__dirname, "./src");
10
+ const pathSrc = path.resolve(__dirname, './src');
10
11
 
11
12
  // https://vitejs.dev/config/
12
- export default defineConfig(({ command, mode }) => {
13
+ export default defineConfig(({ command }) => {
13
14
  const config = {
14
15
  css: {
15
16
  preprocessorOptions: {
@@ -21,45 +22,45 @@ export default defineConfig(({ command, mode }) => {
21
22
  },
22
23
  plugins: [
23
24
  vue(),
25
+ AutoImport({
26
+ resolvers: [ElementPlusResolver()],
27
+ }),
24
28
  Components({
25
29
  // allow auto load markdown components under `./src/components/`
26
- extensions: ["vue", "md"],
30
+ extensions: ['vue', 'md'],
27
31
  // allow auto import and register components used in markdown
28
32
  include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
29
33
  resolvers: [
30
34
  ElementPlusResolver({
31
- importStyle: "sass",
35
+ importStyle: 'sass',
32
36
  }),
33
37
  ],
34
- dts: "src/components.d.ts",
38
+ dts: 'src/components.d.ts',
35
39
  }),
36
-
37
- // https://github.com/antfu/unocss
38
- // see unocss.config.ts for config
39
40
  ],
40
41
  // for cypress component test
41
42
  // to prevent reloading after optimized dependencies changed
42
43
  optimizeDeps: {
43
- exclude: ["vue-router"],
44
+ exclude: ['vue-router'],
44
45
  },
45
46
  resolve: {
46
47
  alias: {
47
- "@": pathSrc,
48
+ '@': pathSrc,
48
49
  },
49
50
  },
50
51
  };
51
52
 
52
- if (command === "serve") {
53
+ if (command === 'serve') {
53
54
  config.server = {
54
55
  port: 8081,
55
56
  headers: {
56
- "Cross-Origin-Opener-Policy": "same-origin",
57
- "Cross-Origin-Embedder-Policy": "credentialless",
57
+ 'Cross-Origin-Opener-Policy': 'same-origin',
58
+ 'Cross-Origin-Embedder-Policy': 'credentialless',
58
59
  },
59
60
  };
60
61
  config.define = {
61
- "process.env.HTTP_PROXY": 8081,
62
- global: "globalThis",
62
+ 'process.env.HTTP_PROXY': 8081,
63
+ global: 'globalThis',
63
64
  // If you want to exposes all env variables, which is not recommended
64
65
  // 'process.env': env
65
66
  };
@@ -1,12 +1,12 @@
1
- import { defineConfig } from 'vite'
2
- import rootConfig from './vite.config.js'
1
+ import { defineConfig } from 'vite';
2
+ import rootConfig from './vite.config.js';
3
3
 
4
4
  // defineWorkspace provides a nice type hinting DX
5
5
  export default defineConfig((configEnv) => {
6
6
  const config = rootConfig(configEnv);
7
7
  config.build = {
8
- outDir: "test-html"
8
+ outDir: 'test-html',
9
9
  };
10
10
 
11
11
  return config;
12
- })
12
+ });
@@ -1,3 +1 @@
1
- export default [
2
- 'test/vitest.config.js'
3
- ]
1
+ export default ['test/vitest.config.js'];
@@ -5,120 +5,112 @@
5
5
  * To watch components changes for Vitepress on Dev Mode
6
6
  */
7
7
 
8
- import fs from 'fs'
9
- import path from 'path'
10
- import chokidar from 'chokidar'
8
+ import fs from 'fs';
9
+ import path from 'path';
10
+ import chokidar from 'chokidar';
11
11
  // import { parser } from '@vuese/parser'
12
- import { parseSource } from 'vue-docgen-api'
13
- import { Render } from '@vuese/markdown-render'
12
+ import { parseSource } from 'vue-docgen-api';
13
+ import { Render } from '@vuese/markdown-render';
14
14
 
15
- const watchMode = process.argv.find((argv) => argv === 'watch')
15
+ const watchMode = process.argv.find((argv) => argv === 'watch');
16
16
 
17
- const componentsDir = 'src/components'
18
- const components = ['MapContent.vue']
19
- const outputDir = 'docs/components'
17
+ const componentsDir = 'src/components';
18
+ const components = ['MapContent.vue'];
19
+ const outputDir = 'docs/components';
20
20
 
21
21
  function generateMarkdown(file) {
22
- const fileWithPath = `${componentsDir}/${file}`
23
- const fileContent = fs.readFileSync(fileWithPath, 'utf-8')
22
+ const fileWithPath = `${componentsDir}/${file}`;
23
+ const fileContent = fs.readFileSync(fileWithPath, 'utf-8');
24
24
 
25
25
  try {
26
26
  // const parserResult = parser(fileContent)
27
- const parserResult = parseSource(fileContent, fileWithPath)
27
+ const parserResult = parseSource(fileContent, fileWithPath);
28
28
  parserResult.then((result) => {
29
- const {
30
- displayName: name,
31
- description: desc,
32
- props,
33
- events,
34
- methods,
35
- } = result
29
+ const { displayName: name, description: desc, props, events, methods } = result;
36
30
 
37
31
  // transform props to vuese styles
38
32
  const parseResult = {
39
33
  name: name,
40
34
  componentDesc: {
41
- default: [desc]
35
+ default: [desc],
42
36
  },
43
37
  props: transformData(props),
44
38
  events: transformData(events),
45
39
  methods: transformData(methods),
46
- }
47
- const r = new Render(parseResult)
48
- const renderResult = r.render()
49
- const markdownResult = r.renderMarkdown()
50
- const markdownContent = markdownResult.content
51
- const componentName = path.basename(fileWithPath, '.vue')
40
+ };
41
+ const r = new Render(parseResult);
42
+ // const renderResult = r.render();
43
+ const markdownResult = r.renderMarkdown();
44
+ const markdownContent = markdownResult.content;
45
+ const componentName = path.basename(fileWithPath, '.vue');
52
46
 
53
47
  if (!fs.existsSync(outputDir)) {
54
- fs.mkdirSync(outputDir)
48
+ fs.mkdirSync(outputDir);
55
49
  }
56
50
 
57
51
  fs.writeFile(`${outputDir}/${componentName}.md`, markdownContent, (err) => {
58
52
  if (err) {
59
- console.error(`Error writing markdown file for ${componentName}`, err)
53
+ console.error(`Error writing markdown file for ${componentName}`, err);
60
54
  } else {
61
- console.log(`Markdown file for ${componentName} is generated!`)
55
+ console.log(`Markdown file for ${componentName} is generated!`);
62
56
  }
63
- })
64
- })
65
- } catch(e) {
66
- console.error(e)
57
+ });
58
+ });
59
+ } catch (e) {
60
+ console.error(e);
67
61
  }
68
62
  }
69
63
 
70
64
  function transformData(data = []) {
71
65
  data.forEach((prop) => {
72
- prop.name = prop.name
73
-
74
66
  if (prop.description) {
75
- prop.describe = [prop.description.replaceAll('\n', ' ')]
67
+ prop.describe = [prop.description.replaceAll('\n', ' ')];
76
68
  }
77
69
 
78
70
  if (prop.type) {
79
- prop.type = prop.type.name
71
+ prop.type = prop.type.name;
80
72
  }
81
73
 
82
74
  if (prop.defaultValue) {
83
- prop.default = prop.defaultValue.value.replaceAll('\n', ' ')
75
+ prop.default = prop.defaultValue.value.replaceAll('\n', ' ');
84
76
  }
85
77
 
86
78
  // events
87
79
  if (prop.properties) {
88
- prop.argumentsDesc = []
80
+ prop.argumentsDesc = [];
89
81
  prop.properties.forEach((param) => {
90
- const argName = param.name || param.description
91
- prop.argumentsDesc.push(argName)
92
- })
82
+ const argName = param.name || param.description;
83
+ prop.argumentsDesc.push(argName);
84
+ });
93
85
  }
94
86
 
95
87
  // methods
96
88
  if (prop.params) {
97
- prop.argumentsDesc = []
89
+ prop.argumentsDesc = [];
98
90
  prop.params.forEach((param) => {
99
- const argName = param.description || param.name
100
- prop.argumentsDesc.push(argName)
101
- })
91
+ const argName = param.description || param.name;
92
+ prop.argumentsDesc.push(argName);
93
+ });
102
94
  }
103
- })
104
- return data
95
+ });
96
+ return data;
105
97
  }
106
98
 
107
99
  // To generate markdown files - one time
108
100
  components.forEach((component) => {
109
- console.log(`Write markdown file for ${component} on first load.`)
110
- generateMarkdown(component)
111
- })
101
+ console.log(`Write markdown file for ${component} on first load.`);
102
+ generateMarkdown(component);
103
+ });
112
104
 
113
105
  // To watch component changes and generate markdown files
114
106
  if (watchMode) {
115
107
  const watcher = chokidar.watch(components, {
116
108
  cwd: componentsDir,
117
109
  ignoreInitial: true,
118
- })
110
+ });
119
111
 
120
112
  watcher.on('change', (file) => {
121
- console.log(`The component ${file} has changed!`)
122
- generateMarkdown(file)
123
- })
113
+ console.log(`The component ${file} has changed!`);
114
+ generateMarkdown(file);
115
+ });
124
116
  }