@rxdrag/website-lib-react 0.0.6 → 0.0.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/dist/ReactModalTrigger-9207e763.js.map +1 -1
- package/dist/components/ContactForm/ContactForm.d.ts +2 -1
- package/dist/components/Icon/index.d.ts +2 -1
- package/dist/forms.mjs +5 -3
- package/dist/forms.mjs.map +1 -1
- package/dist/ui.mjs.map +1 -1
- package/package.json +22 -23
- package/forms.ts +0 -1
- package/index.ts +0 -1
- package/media.ts +0 -1
- package/richtext.ts +0 -1
- package/src/components/Analytics/eventHandlers.ts +0 -173
- package/src/components/Analytics/index.tsx +0 -21
- package/src/components/Analytics/singleton.ts +0 -214
- package/src/components/Analytics/tracking.ts +0 -221
- package/src/components/Analytics/types.ts +0 -60
- package/src/components/Analytics/utils.ts +0 -95
- package/src/components/AttachmentIcon/index.tsx +0 -53
- package/src/components/BackgroundHlsVideoPlayer.tsx +0 -97
- package/src/components/BackgroundVideoPlayer.tsx +0 -32
- package/src/components/Bulletin.tsx +0 -30
- package/src/components/ContactForm/ContactForm.tsx +0 -290
- package/src/components/ContactForm/FileUpload2.tsx +0 -423
- package/src/components/ContactForm/Input.tsx +0 -48
- package/src/components/ContactForm/Input2.tsx +0 -59
- package/src/components/ContactForm/Submit.tsx +0 -48
- package/src/components/ContactForm/TelInput.tsx +0 -215
- package/src/components/ContactForm/TelInput2.tsx +0 -213
- package/src/components/ContactForm/Textarea.tsx +0 -48
- package/src/components/ContactForm/Textarea2.tsx +0 -89
- package/src/components/ContactForm/countryDialCodes.ts +0 -243
- package/src/components/ContactForm/factory.tsx +0 -60
- package/src/components/ContactForm/funcs.ts +0 -64
- package/src/components/ContactForm/hooks/useInlineLabelPadding.ts +0 -43
- package/src/components/ContactForm/hooks/useTelControl.ts +0 -81
- package/src/components/ContactForm/index.ts +0 -7
- package/src/components/ContactForm/types.ts +0 -68
- package/src/components/Icon/index.tsx +0 -20
- package/src/components/Medias/MainMedia.tsx +0 -257
- package/src/components/Medias/Thumbnail.tsx +0 -62
- package/src/components/Medias/VideoPlayer.tsx +0 -114
- package/src/components/Medias/index.tsx +0 -271
- package/src/components/ProductCard/ProductCard.tsx +0 -24
- package/src/components/ProductCard/ProductCta/index.tsx +0 -28
- package/src/components/ProductCard/ProductCta/style.css +0 -4
- package/src/components/ProductCard/ProductDescription/index.tsx +0 -13
- package/src/components/ProductCard/ProductDescription/style.css +0 -6
- package/src/components/ProductCard/ProductMedia/index.tsx +0 -35
- package/src/components/ProductCard/ProductMedia/style.css +0 -6
- package/src/components/ProductCard/ProductTitle/index.tsx +0 -7
- package/src/components/ProductCard/ProductTitle/style.css +0 -4
- package/src/components/ProductCard/ProductView.tsx +0 -36
- package/src/components/ProductCard/index.ts +0 -5
- package/src/components/ProductCard/useQueryProduct.ts +0 -32
- package/src/components/ReactModalTrigger.tsx +0 -28
- package/src/components/ReactVideoPlayer.tsx +0 -332
- package/src/components/RichTextOutline/index.tsx +0 -74
- package/src/components/RichTextOutline/parseOutline.ts +0 -63
- package/src/components/RichTextOutline/useAcitviedHeading.ts +0 -142
- package/src/components/RichTextOutline/useAnchorScroll.ts +0 -24
- package/src/components/Scroller.tsx +0 -39
- package/src/components/SearchInput.tsx +0 -21
- package/src/components/Share/index.tsx +0 -86
- package/src/components/Share/socials.tsx +0 -80
- package/src/components/Share//350/265/204/346/226/231.md +0 -7
- package/src/components/ToTop.tsx +0 -72
- package/src/components/VideoPlayIcon.tsx +0 -43
- package/src/components/all.ts +0 -25
- package/src/components/index.ts +0 -12
- package/src/forms.ts +0 -1
- package/src/index.ts +0 -1
- package/src/media.ts +0 -1
- package/src/richtext.ts +0 -1
- package/src/types/view-model.ts +0 -37
- package/src/ui.ts +0 -10
- package/src/video.ts +0 -2
- package/ui.ts +0 -1
- package/video.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactModalTrigger-9207e763.js","sources":["../src/components/ReactModalTrigger.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"ReactModalTrigger-9207e763.js","sources":["../src/components/ReactModalTrigger.tsx"],"sourcesContent":["import React, { type ReactNode } from \"react\";\n\nexport function ReactModalTrigger(props: {\n className?: string;\n openableKey?: string;\n callToAction?: string;\n children?: ReactNode;\n}) {\n const {\n className,\n callToAction,\n openableKey = \"enquiry-modal\",\n children,\n } = props;\n const roleProps = {\n \"data-modal-open\": openableKey,\n \"data-call-to-action\": callToAction,\n };\n return (\n <button\n {...roleProps}\n className={className}\n type=\"button\"\n >\n {children || \"Get a quote\"}\n </button>\n );\n}\n"],"names":["jsx"],"mappings":";AAEO,SAAS,kBAAkB,OAK/B;AACK,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,EACE,IAAA;AACJ,QAAM,YAAY;AAAA,IAChB,mBAAmB;AAAA,IACnB,uBAAuB;AAAA,EAAA;AAGvB,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,MAAK;AAAA,MAEJ,UAAY,YAAA;AAAA,IAAA;AAAA,EAAA;AAGnB;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { ContactFormProps } from './types';
|
|
2
3
|
|
|
3
|
-
export declare const ContactForm:
|
|
4
|
+
export declare const ContactForm: React.ForwardRefExoticComponent<ContactFormProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IconProps as IconifyIconProps, IconifyIcon as IconifyIconData } from '@iconify/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
|
|
3
4
|
export type IconProps = Omit<IconifyIconProps, "icon"> & {
|
|
4
5
|
icon?: string | IconifyIconData;
|
|
5
6
|
};
|
|
6
|
-
export declare const Icon:
|
|
7
|
+
export declare const Icon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
package/dist/forms.mjs
CHANGED
|
@@ -1422,7 +1422,7 @@ const ContactForm = forwardRef(
|
|
|
1422
1422
|
const [submitting, setSubmitting] = useState(false);
|
|
1423
1423
|
const [isUploading, setIsUploading] = useState(false);
|
|
1424
1424
|
const [submitStatus, setSubmitStatus] = useState({});
|
|
1425
|
-
const lastCta = window.lastCta;
|
|
1425
|
+
const lastCta = typeof window === "undefined" ? void 0 : window.lastCta;
|
|
1426
1426
|
const handleChange = (e, isExtends) => {
|
|
1427
1427
|
const { name, value } = e.target;
|
|
1428
1428
|
if (isExtends) {
|
|
@@ -1492,7 +1492,7 @@ const ContactForm = forwardRef(
|
|
|
1492
1492
|
encryptedField: encrypt(formData.phone, formSalt)
|
|
1493
1493
|
}),
|
|
1494
1494
|
headers: {
|
|
1495
|
-
"X-Request-URL": window.location.href,
|
|
1495
|
+
"X-Request-URL": typeof window === "undefined" ? "" : window.location.href,
|
|
1496
1496
|
"Content-Type": "application/json"
|
|
1497
1497
|
}
|
|
1498
1498
|
});
|
|
@@ -1513,7 +1513,9 @@ const ContactForm = forwardRef(
|
|
|
1513
1513
|
phone: "",
|
|
1514
1514
|
attachments: []
|
|
1515
1515
|
});
|
|
1516
|
-
window
|
|
1516
|
+
if (typeof window !== "undefined") {
|
|
1517
|
+
window.location.href = "/thanks";
|
|
1518
|
+
}
|
|
1517
1519
|
}
|
|
1518
1520
|
} catch (error) {
|
|
1519
1521
|
console.error("Form submission error:", error);
|