@inizioevoke/veeva-astroclm 1.1.8 → 1.1.10

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@inizioevoke/veeva-astroclm",
3
3
  "type": "module",
4
- "version": "1.1.8",
4
+ "version": "1.1.10",
5
5
  "bin": "./bin/create.js",
6
6
  "scripts": {
7
7
  "start": "astro dev",
@@ -83,7 +83,7 @@
83
83
 
84
84
  #veeva-reactions {
85
85
  left: 16px;
86
- top: 54px;
86
+ top: 68px;
87
87
  width: 12px;
88
88
  height: 88px;
89
89
 
@@ -1,14 +1,17 @@
1
1
  ---
2
+ import { BUILD_TARGET } from 'astro:env/client';
2
3
  import type { HTMLAttributes } from "astro/types";
3
4
  import { dataEvotrkToString } from "@inizioevoke/veeva-astroclm-core/lib";
4
5
 
5
6
  interface Props extends HTMLAttributes<'a'> {
7
+ href?: string;
6
8
  slide: string;
7
9
  presentation?: string;
8
10
  'data-evotrk'?: DataEvotrk;
9
11
  }
10
12
 
11
13
  const {
14
+ href,
12
15
  slide,
13
16
  presentation,
14
17
  'data-evotrk': dataEvotrk,
@@ -23,8 +26,12 @@ type VeevaLinkAttrs = HTMLAttributes<'a'> & {
23
26
  const attrs: VeevaLinkAttrs = {
24
27
  ...rest
25
28
  };
26
- attrs.href = '#';
27
29
 
30
+ if (BUILD_TARGET === 'web' && href) {
31
+ attrs.href = href;
32
+ } else {
33
+ attrs.href = '#';
34
+ }
28
35
 
29
36
  attrs['data-gotoslide'] = `${slide}${presentation ? `,${presentation}` : ''}`;
30
37
 
@@ -97,6 +97,9 @@ a {
97
97
  outline: none;
98
98
  }
99
99
  }
100
+ button {
101
+ cursor: pointer;
102
+ }
100
103
 
101
104
  @for $i from 1 to 6 {
102
105
  h#{$i}, .h#{$i} {
@@ -56,3 +56,10 @@ export function pagePath(): string | undefined {
56
56
  export function veevaZip(): string | undefined {
57
57
  return document.querySelector('meta[property="veeva:zip"]')?.getAttribute('content') ?? undefined;
58
58
  }
59
+
60
+ export function pagePathToZip(path: string): string {
61
+ return `${path.replace(/\//g,'')}.zip`;
62
+ }
63
+ export function zipToPagePath(zip: string): string {
64
+ return `/${zip.replace(/\.zip$/, '')}/`;
65
+ }