hds-web 1.16.7 → 1.16.8

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,6 +1,6 @@
1
1
  {
2
2
  "name": "hds-web",
3
- "version": "1.16.7",
3
+ "version": "1.16.8",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -1,3 +1,3 @@
1
1
  <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M9.08997 9.00007C9.32507 8.33174 9.78912 7.76818 10.3999 7.40921C11.0107 7.05023 11.7289 6.91901 12.4271 7.03879C13.1254 7.15856 13.7588 7.5216 14.215 8.0636C14.6713 8.60561 14.921 9.2916 14.92 10.0001C14.92 12.0001 11.92 13.0001 11.92 13.0001M12 17.0001H12.01M3 7.94153V16.0586C3 16.4013 3 16.5726 3.05048 16.7254C3.09515 16.8606 3.16816 16.9847 3.26463 17.0893C3.37369 17.2077 3.52345 17.2909 3.82297 17.4573L11.223 21.5684C11.5066 21.726 11.6484 21.8047 11.7985 21.8356C11.9315 21.863 12.0685 21.863 12.2015 21.8356C12.3516 21.8047 12.4934 21.726 12.777 21.5684L20.177 17.4573C20.4766 17.2909 20.6263 17.2077 20.7354 17.0893C20.8318 16.9847 20.9049 16.8606 20.9495 16.7254C21 16.5726 21 16.4013 21 16.0586V7.94153C21 7.59889 21 7.42756 20.9495 7.27477C20.9049 7.13959 20.8318 7.01551 20.7354 6.91082C20.6263 6.79248 20.4766 6.70928 20.177 6.54288L12.777 2.43177C12.4934 2.27421 12.3516 2.19543 12.2015 2.16454C12.0685 2.13721 11.9315 2.13721 11.7985 2.16454C11.6484 2.19543 11.5066 2.27421 11.223 2.43177L3.82297 6.54288C3.52345 6.70928 3.37369 6.79248 3.26463 6.91082C3.16816 7.01551 3.09515 7.13959 3.05048 7.27477C3 7.42756 3 7.59889 3 7.94153Z" stroke="#1F2A37" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2
+ <path d="M9.08997 8.99959C9.32507 8.33125 9.78912 7.76769 10.3999 7.40872C11.0107 7.04974 11.7289 6.91852 12.4271 7.0383C13.1254 7.15807 13.7588 7.52111 14.215 8.06311C14.6713 8.60512 14.921 9.29111 14.92 9.99959C14.92 11.9996 11.92 12.9996 11.92 12.9996M12 16.9996H12.01M3 7.94104V16.0582C3 16.4008 3 16.5721 3.05048 16.7249C3.09515 16.8601 3.16816 16.9842 3.26463 17.0889C3.37369 17.2072 3.52345 17.2904 3.82297 17.4568L11.223 21.5679C11.5066 21.7255 11.6484 21.8042 11.7985 21.8351C11.9315 21.8625 12.0685 21.8625 12.2015 21.8351C12.3516 21.8042 12.4934 21.7255 12.777 21.5679L20.177 17.4568C20.4766 17.2904 20.6263 17.2072 20.7354 17.0889C20.8318 16.9842 20.9049 16.8601 20.9495 16.7249C21 16.5721 21 16.4008 21 16.0582V7.94104C21 7.5984 21 7.42708 20.9495 7.27428C20.9049 7.1391 20.8318 7.01502 20.7354 6.91033C20.6263 6.79199 20.4766 6.70879 20.177 6.54239L12.777 2.43128C12.4934 2.27372 12.3516 2.19494 12.2015 2.16406C12.0685 2.13672 11.9315 2.13672 11.7985 2.16406C11.6484 2.19494 11.5066 2.27372 11.223 2.43128L3.82297 6.54239C3.52345 6.70879 3.37369 6.79199 3.26463 6.91033C3.16816 7.01502 3.09515 7.1391 3.05048 7.27428C3 7.42708 3 7.5984 3 7.94104Z" stroke-linecap="round" stroke-linejoin="round"/>
3
3
  </svg>
@@ -1,3 +1,3 @@
1
1
  <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M18 6L6 18M6 6L18 18" stroke-linecap="round" stroke-linejoin="round"/>
2
+ <path d="M18 6L6 18M6 6L18 18" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
3
  </svg>
@@ -8,7 +8,7 @@ export default function DropdownA(props) {
8
8
  return (
9
9
  <div>
10
10
 
11
- <div className='tb-l:flex mb-2 tb-l:mb-0 flex w-full tb-l:bg-neutral-150 flex-col tb-l:flex-row max-w-7xl tb-l:gap-2 rounded-2xl '>
11
+ <div className='tb-l:flex mb-2 tb-l:mb-0 flex w-full gap-2 tb:bg-neutral-150 flex-col tb-l:flex-row max-w-7xl rounded-2xl '>
12
12
 
13
13
  {props.primaryCard &&
14
14
  <div className="">
@@ -20,7 +20,7 @@ export default function DropdownA(props) {
20
20
 
21
21
  </div>
22
22
  }
23
- <div className="tb-l:flex-row tb-l:flex mt-2 flex flex-col gap-2 tb-l:mt-0">
23
+ <div className="tb-l:flex-row tb-l:flex mt-2 flex flex-col gap-2 tb:mt-0">
24
24
  {props.secondaryCardArr && props.secondaryCardArr.map((item, index) => (
25
25
 
26
26
  <div key={index} className={'rounded-2xl ' + (item.card_bg) ? 'bg-neutral-0 rounded-2xl' : (HDSColor(item.card_bg))}>
@@ -1,14 +1,41 @@
1
- import React from "react";
1
+ import React, { useState, useEffect} from "react";
2
2
  import PropTypes from 'prop-types';
3
3
  import { HDSColor } from '../../../foundation/ColorPalette';
4
+ import { Icon } from "../../common-components/Icon"
4
5
  import { Badges } from '../../BadgesCaption';
5
6
  import { ProfileAvatar } from '../../Avatars'
6
7
  import { Typography } from "../../../foundation/Typography";
7
8
  import ReactMarkdown from "react-markdown";
8
9
 
9
10
 
11
+ import { HDSPaperForm } from "../../../helpers/Paperform"
12
+
13
+
10
14
  export default function TalkDetailCard(props) {
15
+ const isBrowser = typeof window !== "undefined";
11
16
  const badgeLeftIconColor = HDSColor(props.badgeLeftIconColor);
17
+ const [isConsentForm, setIsConsentForm] = useState(false);
18
+ const onSubmitCB = () => {
19
+ if (isBrowser) {
20
+ window.localStorage.setItem("hasCon2023TalkVideoConsent", "true");
21
+ }
22
+ };
23
+ useEffect(() => {
24
+ if (isBrowser) {
25
+ if (
26
+ "localStorage" in window &&
27
+ window.localStorage &&
28
+ "getItem" in window.localStorage
29
+ ) {
30
+ const hasCon2023TalkVideoConsent1 = window.localStorage.getItem(
31
+ "hasCon2023TalkVideoConsent"
32
+ );
33
+ if (hasCon2023TalkVideoConsent1) {
34
+ setIsConsentForm(true);
35
+ }
36
+ }
37
+ }
38
+ }, []);
12
39
  return (
13
40
  <div className="grid grid-cols-1 tb:grid-cols-2 gap-6 db:gap-28 tb:gap-16">
14
41
  <div>
@@ -25,7 +52,7 @@ export default function TalkDetailCard(props) {
25
52
  children={value.label}
26
53
 
27
54
  />
28
-
55
+
29
56
  </div>
30
57
  ))
31
58
  }
@@ -54,7 +81,7 @@ export default function TalkDetailCard(props) {
54
81
  props.speaker_card && (
55
82
  <div className="border-t border-neutral-200 border-b pb-6 tb:border-0 tb:pb-0">
56
83
  <Typography textStyle='h6' as='h6' className='uppercase text-neutral-500 pb-6 pt-6 tb:pt-14'>speakers</Typography>
57
-
84
+
58
85
  {
59
86
  props.speaker_card.map((speaker, i) => (
60
87
  <div key={i} className='pb-4 last:pb-0'>
@@ -69,12 +96,46 @@ export default function TalkDetailCard(props) {
69
96
  </div>
70
97
  ))
71
98
  }
72
-
99
+
73
100
  </div>
74
101
  )
75
102
  }
76
103
  </div>
77
104
  <div>
105
+ {
106
+ props.videoUrl && (
107
+ <div className="pb-6">
108
+ {
109
+ isConsentForm ? (
110
+ <>
111
+ <div className="relative pb-[56.2%]">
112
+ <iframe
113
+ loading="lazy"
114
+ title={props.title}
115
+ src={props.videoUrl}
116
+ frameBorder="0"
117
+ allowFullScreen
118
+ className="absolute w-full h-full"
119
+ />
120
+ </div>
121
+ </>
122
+ ) : (
123
+ <>
124
+ <Typography textStyle="h6" as="h6" className="text-neutral-800 uppercase flex items-center">
125
+ <Icon height="w-6 h-6 mr-3 stroke-neutral-800 stroke-[1.5px]" variant="ticket01" strokeColor="#1F2A37" />
126
+ {props.formTitle}
127
+ </Typography>
128
+ <HDSPaperForm
129
+ onSubmitCB={onSubmitCB}
130
+ formId={props.paperformId}
131
+ styleClass="paper-form-wrapper"
132
+ />
133
+ </>
134
+ )
135
+ }
136
+ </div>
137
+ )
138
+ }
78
139
  <Typography textStyle="h4" as="h4" className="text-neutral-800 pb-4">About the Talk</Typography>
79
140
  {
80
141
  props.description && (
@@ -96,4 +157,4 @@ TalkDetailCard.defaultProps = {
96
157
  // title: 'Deploying Hasura apps the fast way with the new Vercel integration',
97
158
  // social_share: '',
98
159
  // speaker_card: '',
99
- };
160
+ };