@abi-software/flatmapvuer 0.6.3-vue.3.9 → 1.0.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 (38) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +120 -120
  3. package/cypress.config.js +23 -23
  4. package/dist/flatmapvuer.js +15894 -16259
  5. package/dist/flatmapvuer.umd.cjs +132 -145
  6. package/dist/index.html +17 -17
  7. package/dist/style.css +1 -1
  8. package/package.json +95 -95
  9. package/public/index.html +17 -17
  10. package/reporter-config.json +9 -9
  11. package/src/App.vue +310 -310
  12. package/src/assets/_variables.scss +43 -43
  13. package/src/assets/styles.scss +5 -5
  14. package/src/components/AnnotationTool.vue +450 -446
  15. package/src/components/EventBus.js +3 -3
  16. package/src/components/ExternalResourceCard.vue +107 -107
  17. package/src/components/FlatmapVuer.vue +2600 -2531
  18. package/src/components/MultiFlatmapVuer.vue +731 -731
  19. package/src/components/ProvenancePopup.vue +503 -495
  20. package/src/components/SelectionsGroup.vue +255 -255
  21. package/src/components/Tooltip.vue +50 -50
  22. package/src/components/TreeControls.vue +231 -231
  23. package/src/components/index.js +7 -7
  24. package/src/components/legends/DynamicLegends.vue +106 -106
  25. package/src/components/legends/SvgLegends.vue +112 -112
  26. package/src/icons/flatmap-marker.js +1 -1
  27. package/src/icons/fonts/mapicon-species.svg +14 -14
  28. package/src/icons/fonts/mapicon-species.ttf +0 -0
  29. package/src/icons/fonts/mapicon-species.woff +0 -0
  30. package/src/icons/mapicon-species-style.css +42 -42
  31. package/src/icons/yellowstar.js +5 -5
  32. package/src/legends/legend.svg +25 -25
  33. package/src/main.js +19 -19
  34. package/src/services/flatmapQueries.js +453 -453
  35. package/src/store/index.js +23 -23
  36. package/vite.config.js +73 -73
  37. package/vite.static-build.js +12 -12
  38. package/vuese-generator.js +64 -64
@@ -1,24 +1,24 @@
1
- import { defineStore } from 'pinia'
2
-
3
- /**
4
- * Activate the store when run the application individually.
5
- * If the store exist in parent application,
6
- * instead of creating a new store it will access the parent main store.
7
- */
8
- export const useMainStore = defineStore('main', {
9
- state: () => ({
10
- userProfile: {
11
- token: ''
12
- },
13
- }),
14
- getters: {
15
- userToken(state) {
16
- return state.userProfile.token
17
- },
18
- },
19
- actions: {
20
- setUserToken(value) {
21
- this.userProfile.token = value
22
- },
23
- }
1
+ import { defineStore } from 'pinia'
2
+
3
+ /**
4
+ * Activate the store when run the application individually.
5
+ * If the store exist in parent application,
6
+ * instead of creating a new store it will access the parent main store.
7
+ */
8
+ export const useMainStore = defineStore('main', {
9
+ state: () => ({
10
+ userProfile: {
11
+ token: ''
12
+ },
13
+ }),
14
+ getters: {
15
+ userToken(state) {
16
+ return state.userProfile.token
17
+ },
18
+ },
19
+ actions: {
20
+ setUserToken(value) {
21
+ this.userProfile.token = value
22
+ },
23
+ }
24
24
  })
package/vite.config.js CHANGED
@@ -1,73 +1,73 @@
1
- import path from "path";
2
- import { defineConfig } from 'vite'
3
- import vue from '@vitejs/plugin-vue'
4
- import Components from 'unplugin-vue-components/vite'
5
- import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
6
-
7
- // https://vitejs.dev/config/
8
- export default defineConfig(({ command, mode }) => {
9
- const config = {
10
- css: {
11
- preprocessorOptions: {
12
- scss: {
13
- additionalData: `@use './src/assets/styles' as *;`
14
- },
15
- },
16
- },
17
- plugins: [
18
- vue({
19
- template: {
20
- compilerOptions: {
21
- isCustomElement: (tag) => ['bx:grid'].includes(tag),
22
- }
23
- }
24
- }),
25
- Components({
26
- // allow auto load markdown components under `./src/components/`
27
- extensions: ['vue', 'md'],
28
- // allow auto import and register components used in markdown
29
- include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
30
- resolvers: [
31
- ElementPlusResolver({
32
- importStyle: 'sass',
33
- }),
34
- ],
35
- dts: 'src/components.d.ts',
36
- }),
37
-
38
- // https://github.com/antfu/unocss
39
- // see unocss.config.ts for config
40
- ],
41
- resolve: {
42
- alias: {
43
- '@': path.resolve(__dirname, './src'),
44
- }
45
- },
46
- build: {
47
- lib: {
48
- entry: path.resolve(__dirname, "./src/components/index.js"),
49
- name: "FlatmapVuer",
50
- fileName: 'flatmapvuer',
51
- },
52
- rollupOptions: {
53
- external: ["vue", "@abi-software/svg-sprite"],
54
- output: {
55
- globals: {
56
- vue: "Vue",
57
- "@abi-software/svg-sprite": "@abi-software/svg-sprite"
58
- },
59
- },
60
- },
61
- },
62
- optimizeDeps: {
63
- entries: ['./cypress/*']
64
- }
65
- };
66
-
67
- if (command === 'serve') {
68
- config.server = {
69
- port: 8082,
70
- };
71
- }
72
- return config;
73
- })
1
+ import path from "path";
2
+ import { defineConfig } from 'vite'
3
+ import vue from '@vitejs/plugin-vue'
4
+ import Components from 'unplugin-vue-components/vite'
5
+ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
6
+
7
+ // https://vitejs.dev/config/
8
+ export default defineConfig(({ command, mode }) => {
9
+ const config = {
10
+ css: {
11
+ preprocessorOptions: {
12
+ scss: {
13
+ additionalData: `@use './src/assets/styles' as *;`
14
+ },
15
+ },
16
+ },
17
+ plugins: [
18
+ vue({
19
+ template: {
20
+ compilerOptions: {
21
+ isCustomElement: (tag) => ['bx:grid'].includes(tag),
22
+ }
23
+ }
24
+ }),
25
+ Components({
26
+ // allow auto load markdown components under `./src/components/`
27
+ extensions: ['vue', 'md'],
28
+ // allow auto import and register components used in markdown
29
+ include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
30
+ resolvers: [
31
+ ElementPlusResolver({
32
+ importStyle: 'sass',
33
+ }),
34
+ ],
35
+ dts: 'src/components.d.ts',
36
+ }),
37
+
38
+ // https://github.com/antfu/unocss
39
+ // see unocss.config.ts for config
40
+ ],
41
+ resolve: {
42
+ alias: {
43
+ '@': path.resolve(__dirname, './src'),
44
+ }
45
+ },
46
+ build: {
47
+ lib: {
48
+ entry: path.resolve(__dirname, "./src/components/index.js"),
49
+ name: "FlatmapVuer",
50
+ fileName: 'flatmapvuer',
51
+ },
52
+ rollupOptions: {
53
+ external: ["vue", "@abi-software/svg-sprite"],
54
+ output: {
55
+ globals: {
56
+ vue: "Vue",
57
+ "@abi-software/svg-sprite": "@abi-software/svg-sprite"
58
+ },
59
+ },
60
+ },
61
+ },
62
+ optimizeDeps: {
63
+ entries: ['./cypress/*']
64
+ }
65
+ };
66
+
67
+ if (command === 'serve') {
68
+ config.server = {
69
+ port: 8082,
70
+ };
71
+ }
72
+ return config;
73
+ })
@@ -1,12 +1,12 @@
1
- import { defineConfig } from 'vite'
2
- import rootConfig from './vite.config.js'
3
-
4
- // defineWorkspace provides a nice type hinting DX
5
- export default defineConfig((configEnv) => {
6
- const config = rootConfig(configEnv);
7
- config.build = {
8
- outDir: "test-html"
9
- };
10
-
11
- return config;
12
- })
1
+ import { defineConfig } from 'vite'
2
+ import rootConfig from './vite.config.js'
3
+
4
+ // defineWorkspace provides a nice type hinting DX
5
+ export default defineConfig((configEnv) => {
6
+ const config = rootConfig(configEnv);
7
+ config.build = {
8
+ outDir: "test-html"
9
+ };
10
+
11
+ return config;
12
+ })
@@ -1,65 +1,65 @@
1
- /**
2
- * Vuese Generator
3
- *
4
- * To generate markdown files from Vue components
5
- * To watch components changes for Vitepress on Dev Mode
6
- */
7
-
8
- import fs from 'fs'
9
- import path from 'path'
10
- import chokidar from 'chokidar'
11
- import { parser } from '@vuese/parser'
12
- import { Render } from '@vuese/markdown-render'
13
-
14
- const watchMode = process.argv.find((argv) => argv === 'watch')
15
-
16
- const componentsDir = 'src/components'
17
- const components = ['FlatmapVuer.vue', 'MultiFlatmapVuer.vue']
18
- const outputDir = 'docs/components'
19
-
20
- function generateMarkdown(file) {
21
- const fileWithPath = `${componentsDir}/${file}`
22
- const fileContent = fs.readFileSync(fileWithPath, 'utf-8')
23
-
24
- try {
25
- const parserResult = parser(fileContent)
26
- const r = new Render(parserResult)
27
- const renderResult = r.render()
28
- const markdownResult = r.renderMarkdown()
29
- const markdownContent = markdownResult.content
30
- const componentName = path.basename(fileWithPath, '.vue')
31
-
32
- if (!fs.existsSync(outputDir)) {
33
- fs.mkdirSync(outputDir)
34
- }
35
-
36
- fs.writeFile(`${outputDir}/${componentName}.md`, markdownContent, (err) => {
37
- if (err) {
38
- console.error(`Error writing markdown file for ${componentName}`, err)
39
- } else {
40
- console.log(`Markdown file for ${componentName} is generated!`)
41
- }
42
- })
43
- } catch(e) {
44
- console.error(e)
45
- }
46
- }
47
-
48
- // To generate markdown files - one time
49
- components.forEach((component) => {
50
- console.log(`Write markdown file for ${component} on first load.`)
51
- generateMarkdown(component)
52
- })
53
-
54
- // To watch component changes and generate markdown files
55
- if (watchMode) {
56
- const watcher = chokidar.watch(components, {
57
- cwd: componentsDir,
58
- ignoreInitial: true,
59
- })
60
-
61
- watcher.on('change', (file) => {
62
- console.log(`The component ${file} has changed!`)
63
- generateMarkdown(file)
64
- })
1
+ /**
2
+ * Vuese Generator
3
+ *
4
+ * To generate markdown files from Vue components
5
+ * To watch components changes for Vitepress on Dev Mode
6
+ */
7
+
8
+ import fs from 'fs'
9
+ import path from 'path'
10
+ import chokidar from 'chokidar'
11
+ import { parser } from '@vuese/parser'
12
+ import { Render } from '@vuese/markdown-render'
13
+
14
+ const watchMode = process.argv.find((argv) => argv === 'watch')
15
+
16
+ const componentsDir = 'src/components'
17
+ const components = ['FlatmapVuer.vue', 'MultiFlatmapVuer.vue']
18
+ const outputDir = 'docs/components'
19
+
20
+ function generateMarkdown(file) {
21
+ const fileWithPath = `${componentsDir}/${file}`
22
+ const fileContent = fs.readFileSync(fileWithPath, 'utf-8')
23
+
24
+ try {
25
+ const parserResult = parser(fileContent)
26
+ const r = new Render(parserResult)
27
+ const renderResult = r.render()
28
+ const markdownResult = r.renderMarkdown()
29
+ const markdownContent = markdownResult.content
30
+ const componentName = path.basename(fileWithPath, '.vue')
31
+
32
+ if (!fs.existsSync(outputDir)) {
33
+ fs.mkdirSync(outputDir)
34
+ }
35
+
36
+ fs.writeFile(`${outputDir}/${componentName}.md`, markdownContent, (err) => {
37
+ if (err) {
38
+ console.error(`Error writing markdown file for ${componentName}`, err)
39
+ } else {
40
+ console.log(`Markdown file for ${componentName} is generated!`)
41
+ }
42
+ })
43
+ } catch(e) {
44
+ console.error(e)
45
+ }
46
+ }
47
+
48
+ // To generate markdown files - one time
49
+ components.forEach((component) => {
50
+ console.log(`Write markdown file for ${component} on first load.`)
51
+ generateMarkdown(component)
52
+ })
53
+
54
+ // To watch component changes and generate markdown files
55
+ if (watchMode) {
56
+ const watcher = chokidar.watch(components, {
57
+ cwd: componentsDir,
58
+ ignoreInitial: true,
59
+ })
60
+
61
+ watcher.on('change', (file) => {
62
+ console.log(`The component ${file} has changed!`)
63
+ generateMarkdown(file)
64
+ })
65
65
  }