@abi-software/map-side-bar 2.16.0 → 2.17.1-demo.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.
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <svg
3
+ viewBox="0 0 24 24"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ aria-hidden="true"
6
+ focusable="false"
7
+ >
8
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
9
+ <polygon
10
+ fill="currentColor"
11
+ fill-rule="nonzero"
12
+ transform="translate(15.500000, 8.878680) rotate(225.000000) translate(-15.500000, -8.878680)"
13
+ points="16.25 4.12867966 16.25 13.6286797 14.75 13.6286797 14.75 4.12867966"
14
+ />
15
+ <polygon
16
+ fill="currentColor"
17
+ fill-rule="nonzero"
18
+ transform="translate(17.500000, 6.918996) rotate(225.000000) translate(-17.500000, -6.918996)"
19
+ points="20.9294459 3.82036868 22.058311 4.80812559 17.5 10.0176239 12.941689 4.80812559 14.0705541 3.82036868 17.5 7.739"
20
+ />
21
+ <polygon
22
+ fill="currentColor"
23
+ fill-rule="nonzero"
24
+ points="11.6570511 7.25 11.6570511 8.75 5.75 8.75 5.75 16.25 15.25 16.25 15.25 11.2267933 16.75 11.2267933 16.75 17.75 4.25 17.75 4.25 7.25"
25
+ />
26
+ </g>
27
+ </svg>
28
+ </template>
@@ -1,4 +1,5 @@
1
1
  import SideBar from "./SideBar.vue"
2
+ import "../assets/fonts.scss";
2
3
 
3
4
  export {
4
5
  SideBar
@@ -1,14 +1,20 @@
1
1
  /* eslint-disable */
2
- /* prettier-ignore */
3
2
  // @ts-nocheck
3
+ // biome-ignore lint: disable
4
+ // oxlint-disable
5
+ // ------
4
6
  // Generated by unplugin-vue-components
5
7
  // Read more: https://github.com/vuejs/core/pull/3399
8
+
6
9
  export {}
7
10
 
11
+ /* prettier-ignore */
8
12
  declare module 'vue' {
9
13
  export interface GlobalComponents {
10
14
  AnnotationTool: typeof import('./components/AnnotationTool.vue')['default']
11
15
  BadgesGroup: typeof import('./components/BadgesGroup.vue')['default']
16
+ CellCard: typeof import('./components/CellCard.vue')['default']
17
+ CellCardExplorer: typeof import('./components/CellCardExplorer.vue')['default']
12
18
  ConnectivityCard: typeof import('./components/ConnectivityCard.vue')['default']
13
19
  ConnectivityExplorer: typeof import('./components/ConnectivityExplorer.vue')['default']
14
20
  ConnectivityInfo: typeof import('./components/ConnectivityInfo.vue')['default']
@@ -44,13 +50,14 @@ declare module 'vue' {
44
50
  ElRow: typeof import('element-plus/es')['ElRow']
45
51
  ElSelect: typeof import('element-plus/es')['ElSelect']
46
52
  ElTag: typeof import('element-plus/es')['ElTag']
53
+ IconOpenExternal: typeof import('./components/icons/IconOpenExternal.vue')['default']
47
54
  ImageGallery: typeof import('./components/ImageGallery.vue')['default']
48
55
  SearchFilters: typeof import('./components/SearchFilters.vue')['default']
49
56
  SearchHistory: typeof import('./components/SearchHistory.vue')['default']
50
57
  SideBar: typeof import('./components/SideBar.vue')['default']
51
58
  Tabs: typeof import('./components/Tabs.vue')['default']
52
59
  }
53
- export interface ComponentCustomProperties {
60
+ export interface GlobalDirectives {
54
61
  vLoading: typeof import('element-plus/es')['ElLoadingDirective']
55
62
  }
56
63
  }
package/src/main.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { createApp } from 'vue'
2
2
  import App from './App.vue'
3
+ import "./assets/fonts.scss"
3
4
  import MapSideBar from './components/SideBar.vue'
4
5
 
5
6
  const app = createApp(App);
@@ -0,0 +1,71 @@
1
+ export function generateUUID() {
2
+ const arr = new Uint8Array(16);
3
+ window.crypto.getRandomValues(arr);
4
+
5
+ arr[6] = (arr[6] & 0x0f) | 0x40;
6
+ arr[8] = (arr[8] & 0x3f) | 0x80;
7
+
8
+ const hex = Array.from(arr)
9
+ .map(byte => byte.toString(16).padStart(2, '0'))
10
+ .join('');
11
+
12
+ return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
13
+ }
14
+
15
+ export function capitalise(text) {
16
+ if (!text) return '';
17
+ const value = String(text);
18
+ return value.charAt(0).toUpperCase() + value.slice(1);
19
+ }
20
+
21
+ export function formatAlertText(text, { formatLines = false } = {}) {
22
+ if (!text) return '';
23
+
24
+ const escaped = String(text)
25
+ .replace(/&/g, '&amp;')
26
+ .replace(/</g, '&lt;')
27
+ .replace(/>/g, '&gt;');
28
+
29
+ const linkified = escaped.replace(
30
+ /(https?:\/\/[^\s"<>\[]+)/g,
31
+ (url) => {
32
+ const parts = url.match(/^(.*?)([\].,;:!?]*)$/);
33
+ const cleanUrl = parts ? parts[1] : url;
34
+ const suffix = parts ? parts[2] : '';
35
+ return `<a href="${cleanUrl}" target="_blank" rel="noopener noreferrer">${cleanUrl}</a>${suffix}`;
36
+ }
37
+ );
38
+
39
+ const normalised = linkified
40
+ .replace(/\\n/g, '\n')
41
+ .replace(/\r\n/g, '\n')
42
+ .replace(/\r/g, '\n');
43
+
44
+ if (!formatLines) {
45
+ return normalised;
46
+ }
47
+
48
+ return normalised
49
+ .split('\n')
50
+ .map((line) => {
51
+ const withBoldLabel = line.replace(
52
+ /^\s*([A-Za-z][^:<]{0,120}:)/,
53
+ '<strong>$1</strong>'
54
+ );
55
+ return `<div class="alert-line">${withBoldLabel}</div>`;
56
+ })
57
+ .join('\n');
58
+ }
59
+
60
+ export function scrollToRef(vm, refName) {
61
+ vm?.$nextTick(() => {
62
+ const element = vm?.$refs?.[refName];
63
+ if (element) {
64
+ element.scrollIntoView({
65
+ behavior: 'smooth',
66
+ block: 'start',
67
+ inline: 'nearest',
68
+ });
69
+ }
70
+ });
71
+ }
package/vite.config.js CHANGED
@@ -28,31 +28,42 @@ export default defineConfig({
28
28
  ],
29
29
  resolve: {
30
30
  alias: {
31
- '@': resolve(__dirname, './src'),
31
+ '@': resolve(import.meta.dirname, './src'),
32
32
  }
33
33
  },
34
34
  build: {
35
35
  lib: {
36
- entry: resolve(__dirname, "./src/components/index.js"),
36
+ entry: resolve(import.meta.dirname, "./src/components/index.js"),
37
37
  name: "MapSideBar",
38
38
  fileName: 'map-side-bar',
39
39
  },
40
40
  rollupOptions: {
41
- external: ["vue", "@abi-software/map-utilities", "@element-plus/icons-vue"],
41
+ external: [
42
+ "vue",
43
+ "@abi-software/map-utilities",
44
+ "@element-plus/icons-vue",
45
+ "@abi-software/map-utilities/dist/style.css"
46
+ ],
42
47
  output: {
43
48
  globals: {
44
49
  vue: "Vue",
45
50
  "@abi-software/map-utilities": "@abi-software/map-utilities",
46
51
  "@element-plus/icons-vue": "@element-plus/icons-vue"
47
52
  },
53
+ // keep css output name stable for the "./dist/style.css" export/import paths
54
+ assetFileNames: (assetInfo) =>
55
+ assetInfo.name?.endsWith(".css")
56
+ ? "style.css"
57
+ : "assets/[name][extname]",
48
58
  },
49
59
  },
50
60
  },
51
61
  css: {
52
62
  preprocessorOptions: {
53
63
  scss: {
54
- additionalData: `@use './src/assets/styles' as *;`
64
+ api: 'modern-compiler',
65
+ additionalData: `@use '@/assets/styles' as *;`
55
66
  }
56
67
  }
57
68
  }
58
- })
69
+ })
package/.eslintrc.js DELETED
@@ -1,12 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- env: {
4
- node: true,
5
- es2022: true,
6
- },
7
- extends: [
8
- "plugin:vue/essential",
9
- "eslint:recommended"
10
- ],
11
- rules: {}
12
- }
package/static.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "root": "dist",
3
- "clean_urls": true,
4
- "routes": {
5
- "/**": "index.html"
6
- }
7
- }