@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260713051007 → 0.8.1-dev.20260713054732
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/EnterAnimationClient-4OKXLKSA.mjs +45 -0
- package/dist/{InputControlClient-HSPSCMLF.mjs → InputControlClient-QAZKQLFO.mjs} +5 -96
- package/dist/InputControlClient-QQCQD4EG.mjs +675 -0
- package/dist/LinkNodeButton-XA7Z5IDR.mjs +171 -0
- package/dist/Pagination-NCJCOYHF.mjs +181 -0
- package/dist/{chunk-6NCGSAPP.mjs → chunk-7ZFZLN56.mjs} +0 -82
- package/dist/chunk-DBHUCH4B.mjs +109 -0
- package/dist/chunk-UFKPTMM7.mjs +199 -0
- package/dist/chunk-YG6FKKQJ.mjs +900 -0
- package/dist/chunk-YL6E76X2.mjs +212 -0
- package/dist/index.js +624 -812
- package/dist/index.mjs +3 -5
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx
|
|
4
|
+
import React, { useEffect, useRef } from "react";
|
|
5
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
6
|
+
function EnterAnimationClient({ hasEnterAnimation, children }) {
|
|
7
|
+
const ref = useRef(null);
|
|
8
|
+
console.log("render");
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
console.log("effect");
|
|
11
|
+
console.log("ref", ref.current);
|
|
12
|
+
if (!hasEnterAnimation) {
|
|
13
|
+
console.log("no animation");
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (!ref.current) {
|
|
17
|
+
console.log("no ref");
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
console.log("observer started");
|
|
21
|
+
}, []);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (!hasEnterAnimation || !ref.current) return;
|
|
24
|
+
const observer = new IntersectionObserver(
|
|
25
|
+
(entries) => {
|
|
26
|
+
entries.forEach((entry) => {
|
|
27
|
+
if (entry.isIntersecting) {
|
|
28
|
+
entry.target.classList.add("visible");
|
|
29
|
+
observer.unobserve(entry.target);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
{ threshold: 0.1 }
|
|
34
|
+
);
|
|
35
|
+
observer.observe(ref.current);
|
|
36
|
+
return () => observer.disconnect();
|
|
37
|
+
}, [hasEnterAnimation]);
|
|
38
|
+
if (!children) return null;
|
|
39
|
+
return /* @__PURE__ */ jsx(Fragment, { children: children && // enforce passing the ref to Wrapper
|
|
40
|
+
//@ts-ignore
|
|
41
|
+
React.cloneElement(children, { ref }) });
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
EnterAnimationClient as default
|
|
45
|
+
};
|
|
@@ -16,9 +16,8 @@ import {
|
|
|
16
16
|
PercentageInput_default,
|
|
17
17
|
PhoneInput_default,
|
|
18
18
|
SelectWithSearchInput_default,
|
|
19
|
-
TimeInput_default
|
|
20
|
-
|
|
21
|
-
} from "./chunk-6NCGSAPP.mjs";
|
|
19
|
+
TimeInput_default
|
|
20
|
+
} from "./chunk-7ZFZLN56.mjs";
|
|
22
21
|
import {
|
|
23
22
|
Hyperlink,
|
|
24
23
|
Icon_default,
|
|
@@ -643,97 +642,8 @@ var SwitchInput = (props) => {
|
|
|
643
642
|
};
|
|
644
643
|
var SwitchInput_default = SwitchInput;
|
|
645
644
|
|
|
646
|
-
// src/components/controls/edit/VideoInput.tsx
|
|
647
|
-
import { Fragment, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
648
|
-
var normalizeVideoValue = (value) => {
|
|
649
|
-
if (typeof value === "string") {
|
|
650
|
-
const trimmed = value.trim();
|
|
651
|
-
if (!trimmed) return void 0;
|
|
652
|
-
try {
|
|
653
|
-
const parsed = JSON.parse(trimmed);
|
|
654
|
-
if (typeof parsed === "string") {
|
|
655
|
-
return parsed;
|
|
656
|
-
}
|
|
657
|
-
if (parsed && typeof parsed === "object") {
|
|
658
|
-
const candidate = parsed;
|
|
659
|
-
if (typeof candidate.assetUrl === "string") return candidate.assetUrl;
|
|
660
|
-
if (typeof candidate.url === "string") return candidate.url;
|
|
661
|
-
if (typeof candidate.src === "string") return candidate.src;
|
|
662
|
-
}
|
|
663
|
-
} catch {
|
|
664
|
-
return trimmed;
|
|
665
|
-
}
|
|
666
|
-
return trimmed;
|
|
667
|
-
}
|
|
668
|
-
if (value && typeof value === "object") {
|
|
669
|
-
const candidate = value;
|
|
670
|
-
if (typeof candidate.assetUrl === "string") return candidate.assetUrl;
|
|
671
|
-
if (typeof candidate.url === "string") return candidate.url;
|
|
672
|
-
if (typeof candidate.src === "string") return candidate.src;
|
|
673
|
-
}
|
|
674
|
-
return void 0;
|
|
675
|
-
};
|
|
676
|
-
var VideoInput = (props) => {
|
|
677
|
-
const isReadOnly = Boolean(
|
|
678
|
-
props.attributes?.readOnly || props.disable || props.attributes?.disable
|
|
679
|
-
);
|
|
680
|
-
const videoUrl = normalizeVideoValue(props.value ?? props.defaultValue);
|
|
681
|
-
const handleChange = (event) => {
|
|
682
|
-
const text = event.target.value;
|
|
683
|
-
props.callback?.({
|
|
684
|
-
name: props.name,
|
|
685
|
-
value: text,
|
|
686
|
-
index: props.index,
|
|
687
|
-
groupKey: props.groupKey
|
|
688
|
-
});
|
|
689
|
-
};
|
|
690
|
-
return /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-2", children: [
|
|
691
|
-
"ayush testing",
|
|
692
|
-
props.attributes?.label ? /* @__PURE__ */ jsxs5("label", { className: "text-sm font-medium", children: [
|
|
693
|
-
props.attributes.label,
|
|
694
|
-
props.attributes?.required ? /* @__PURE__ */ jsx5("span", { className: "ml-1 text-red-500", children: "*" }) : null
|
|
695
|
-
] }) : null,
|
|
696
|
-
isReadOnly ? /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
697
|
-
"called video view",
|
|
698
|
-
console.log(props.value, "vkjbvbvbvsdjkvdfn"),
|
|
699
|
-
/* @__PURE__ */ jsx5(
|
|
700
|
-
VideoView_default,
|
|
701
|
-
{
|
|
702
|
-
...props,
|
|
703
|
-
value: props.value ?? props.defaultValue,
|
|
704
|
-
assetBaseUrl: props.serviceClient?.baseUrl
|
|
705
|
-
}
|
|
706
|
-
)
|
|
707
|
-
] }) : /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
708
|
-
/* @__PURE__ */ jsx5(
|
|
709
|
-
"input",
|
|
710
|
-
{
|
|
711
|
-
type: "text",
|
|
712
|
-
name: props.name,
|
|
713
|
-
id: props.name,
|
|
714
|
-
value: videoUrl ?? "",
|
|
715
|
-
onChange: handleChange,
|
|
716
|
-
onBlur: props.onBlur,
|
|
717
|
-
placeholder: props.attributes?.placeholder || "Paste a video URL or blob URL",
|
|
718
|
-
disabled: isReadOnly,
|
|
719
|
-
className: "peer input mt-1 block w-full rounded shadow-sm"
|
|
720
|
-
}
|
|
721
|
-
),
|
|
722
|
-
videoUrl ? /* @__PURE__ */ jsx5(
|
|
723
|
-
VideoView_default,
|
|
724
|
-
{
|
|
725
|
-
...props,
|
|
726
|
-
value: props.value ?? props.defaultValue,
|
|
727
|
-
assetBaseUrl: props.serviceClient?.baseUrl
|
|
728
|
-
}
|
|
729
|
-
) : null
|
|
730
|
-
] })
|
|
731
|
-
] });
|
|
732
|
-
};
|
|
733
|
-
var VideoInput_default = VideoInput;
|
|
734
|
-
|
|
735
645
|
// src/components/controls/edit/InputControlClient.tsx
|
|
736
|
-
import { jsx as
|
|
646
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
737
647
|
var InputControl = React5.forwardRef(
|
|
738
648
|
(props, ref) => {
|
|
739
649
|
const ControlComponents = {
|
|
@@ -754,11 +664,10 @@ var InputControl = React5.forwardRef(
|
|
|
754
664
|
[InputControlType_default.booleanSelect]: BooleanSelect_default,
|
|
755
665
|
[InputControlType_default.timeInput]: TimeInput_default,
|
|
756
666
|
[InputControlType_default.asset]: AssetUpload_default,
|
|
757
|
-
[InputControlType_default.switchInput]: SwitchInput_default
|
|
758
|
-
[InputControlType_default.videoInput]: VideoInput_default
|
|
667
|
+
[InputControlType_default.switchInput]: SwitchInput_default
|
|
759
668
|
};
|
|
760
669
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
761
|
-
return /* @__PURE__ */
|
|
670
|
+
return /* @__PURE__ */ jsx5(React5.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx5(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
762
671
|
}
|
|
763
672
|
);
|
|
764
673
|
InputControl.displayName = "InputControl";
|