@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260610051103 → 0.8.1-dev.20260615064052

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/index.js CHANGED
@@ -2494,15 +2494,17 @@ var CheckboxInput = (props) => {
2494
2494
  value = true;
2495
2495
  }
2496
2496
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react21.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "mb-1", children: [
2497
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2498
- "label",
2499
- {
2500
- htmlFor: props.name,
2501
- className: "inline-block text-sm font-medium",
2502
- children: props?.attributes?.label
2503
- }
2504
- ),
2505
- props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "bg-error-weak", children: "*" }),
2497
+ props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
2498
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2499
+ "label",
2500
+ {
2501
+ htmlFor: props.name,
2502
+ className: "inline-block text-sm font-medium",
2503
+ children: props.attributes.label
2504
+ }
2505
+ ),
2506
+ props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "bg-error-weak", children: "*" })
2507
+ ] }),
2506
2508
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2507
2509
  "input",
2508
2510
  {
@@ -5647,8 +5649,14 @@ var DivContainer = async (props) => {
5647
5649
  }
5648
5650
  const shouldHideContainer = () => {
5649
5651
  if (!props.node.fieldVisibleOnTrue) return false;
5650
- const fieldValue = getNestedValue3(props.dataitem, props.node.fieldVisibleOnTrue);
5651
- return fieldValue !== void 0 && fieldValue === false;
5652
+ const condition = props.node.fieldVisibleOnTrue;
5653
+ const isNegated = condition.startsWith("!");
5654
+ const fieldName = isNegated ? condition.substring(1) : condition;
5655
+ const fieldValue = getNestedValue3(props.dataitem, fieldName);
5656
+ if (fieldValue === void 0) {
5657
+ return false;
5658
+ }
5659
+ return isNegated ? fieldValue === true : fieldValue === false;
5652
5660
  };
5653
5661
  const isHidden = shouldHideContainer();
5654
5662
  let odataString = void 0;
package/dist/index.mjs CHANGED
@@ -872,7 +872,7 @@ var NumberInput_default = NumberInput;
872
872
 
873
873
  // src/components/controls/edit/CheckboxInput.tsx
874
874
  import React19 from "react";
875
- import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
875
+ import { Fragment, jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
876
876
  var CheckboxInput = (props) => {
877
877
  const textChangeHandler = (event) => {
878
878
  let text = event.target.checked;
@@ -890,15 +890,17 @@ var CheckboxInput = (props) => {
890
890
  value = true;
891
891
  }
892
892
  return /* @__PURE__ */ jsx20(React19.Fragment, { children: /* @__PURE__ */ jsxs12("div", { className: "mb-1", children: [
893
- /* @__PURE__ */ jsx20(
894
- "label",
895
- {
896
- htmlFor: props.name,
897
- className: "inline-block text-sm font-medium",
898
- children: props?.attributes?.label
899
- }
900
- ),
901
- props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx20("span", { className: "bg-error-weak", children: "*" }),
893
+ props?.attributes?.label && /* @__PURE__ */ jsxs12(Fragment, { children: [
894
+ /* @__PURE__ */ jsx20(
895
+ "label",
896
+ {
897
+ htmlFor: props.name,
898
+ className: "inline-block text-sm font-medium",
899
+ children: props.attributes.label
900
+ }
901
+ ),
902
+ props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx20("span", { className: "bg-error-weak", children: "*" })
903
+ ] }),
902
904
  /* @__PURE__ */ jsx20(
903
905
  "input",
904
906
  {
@@ -1668,7 +1670,7 @@ import React28, { useEffect as useEffect7 } from "react";
1668
1670
 
1669
1671
  // src/components/dataForm/Hyperlink.tsx
1670
1672
  import Link from "next/link";
1671
- import { Fragment, jsx as jsx29 } from "react/jsx-runtime";
1673
+ import { Fragment as Fragment2, jsx as jsx29 } from "react/jsx-runtime";
1672
1674
  function Hyperlink(props) {
1673
1675
  let linkClass = props.linkType ? buttonClasses.get(props.linkType) : buttonClasses.get("Link" /* Link */);
1674
1676
  const target = props?.href?.startsWith("http") ? "_blank" : "_self";
@@ -1676,7 +1678,7 @@ function Hyperlink(props) {
1676
1678
  if (target == "_blank") {
1677
1679
  additionalProps.rel = "noopener noreferrer";
1678
1680
  }
1679
- return /* @__PURE__ */ jsx29(Fragment, { children: props.href ? /* @__PURE__ */ jsx29(
1681
+ return /* @__PURE__ */ jsx29(Fragment2, { children: props.href ? /* @__PURE__ */ jsx29(
1680
1682
  Link,
1681
1683
  {
1682
1684
  href: props.href,
@@ -2162,7 +2164,7 @@ var ImageNode_default = ImageNode;
2162
2164
 
2163
2165
  // src/components/pageRenderingEngine/nodes/LinkNode.tsx
2164
2166
  import dynamic4 from "next/dynamic";
2165
- import { Fragment as Fragment2, jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
2167
+ import { Fragment as Fragment3, jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
2166
2168
  var LinkNodeButton = dynamic4(() => import("./LinkNodeButton-WDDPNYWI.mjs"), {
2167
2169
  ssr: false
2168
2170
  });
@@ -2215,7 +2217,7 @@ var LinkNode = (props) => {
2215
2217
  const isButton = node.isButton === true;
2216
2218
  const renderChildren = () => {
2217
2219
  if (!node.children || node.children.length === 0) return null;
2218
- return /* @__PURE__ */ jsx40(Fragment2, { children: node.children.map((childNode, index) => {
2220
+ return /* @__PURE__ */ jsx40(Fragment3, { children: node.children.map((childNode, index) => {
2219
2221
  const SelectedNode = NodeTypes2[childNode.type];
2220
2222
  if (!SelectedNode) {
2221
2223
  console.warn("Unknown node type:", childNode.type);
@@ -2438,7 +2440,7 @@ var DatafieldNode = (props) => {
2438
2440
  var DatafieldNode_default = DatafieldNode;
2439
2441
 
2440
2442
  // src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
2441
- import { Fragment as Fragment3, jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
2443
+ import { Fragment as Fragment4, jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
2442
2444
  var ParagraphNode = (props) => {
2443
2445
  const NodeTypes2 = {
2444
2446
  ["text"]: TextNode_default,
@@ -2458,7 +2460,7 @@ var ParagraphNode = (props) => {
2458
2460
  const isInlineOnlyParent = props.parentTag === "summary";
2459
2461
  const hasChildren = props.node.children && props.node.children.length > 0;
2460
2462
  if (isInlineOnlyParent) {
2461
- return /* @__PURE__ */ jsx44(Fragment3, { children: hasChildren && props.node.children.map((node, index) => {
2463
+ return /* @__PURE__ */ jsx44(Fragment4, { children: hasChildren && props.node.children.map((node, index) => {
2462
2464
  const SelectedNode = NodeTypes2[node.type];
2463
2465
  return /* @__PURE__ */ jsx44(React31.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx44(
2464
2466
  SelectedNode,
@@ -2493,7 +2495,7 @@ var ParagraphNode_default = ParagraphNode;
2493
2495
 
2494
2496
  // src/components/pageRenderingEngine/nodes/HeadingNode.tsx
2495
2497
  import React32 from "react";
2496
- import { Fragment as Fragment4, jsx as jsx45 } from "react/jsx-runtime";
2498
+ import { Fragment as Fragment5, jsx as jsx45 } from "react/jsx-runtime";
2497
2499
  var HeadingNode = (props) => {
2498
2500
  const NodeTypes2 = {
2499
2501
  ["text"]: TextNode_default,
@@ -2509,7 +2511,7 @@ var HeadingNode = (props) => {
2509
2511
  {
2510
2512
  }
2511
2513
  const formatClasses = FormatClass[props.node.format] || "";
2512
- return /* @__PURE__ */ jsx45(Fragment4, { children: React32.createElement(
2514
+ return /* @__PURE__ */ jsx45(Fragment5, { children: React32.createElement(
2513
2515
  HeadingTag,
2514
2516
  { className: formatClasses },
2515
2517
  props.node.children && props.node.children.map((childNode, index) => {
@@ -2645,7 +2647,7 @@ var HorizontalRuleNode_default = HorizontalRuleNode;
2645
2647
 
2646
2648
  // src/components/pageRenderingEngine/nodes/WidgetNode.tsx
2647
2649
  import React37 from "react";
2648
- import { Fragment as Fragment5, jsx as jsx51 } from "react/jsx-runtime";
2650
+ import { Fragment as Fragment6, jsx as jsx51 } from "react/jsx-runtime";
2649
2651
  var WidgetNode = (props) => {
2650
2652
  const getWidgetParameters = () => {
2651
2653
  const widgetInputParameters = {
@@ -2709,7 +2711,7 @@ var WidgetNode = (props) => {
2709
2711
  };
2710
2712
  const widgetCode = props.node?.widgetCode;
2711
2713
  if (!widgetCode) {
2712
- return /* @__PURE__ */ jsx51(Fragment5, { children: "Invalid widget" });
2714
+ return /* @__PURE__ */ jsx51(Fragment6, { children: "Invalid widget" });
2713
2715
  }
2714
2716
  const widgetParams = getWidgetParameters();
2715
2717
  const WidgetRenderer = props.widgetRenderer;
@@ -2886,7 +2888,7 @@ var EmbedNode_default = EmbedNode;
2886
2888
 
2887
2889
  // src/components/Slider.tsx
2888
2890
  import React39, { useState as useState6, useEffect as useEffect9, Children, cloneElement } from "react";
2889
- import { Fragment as Fragment6, jsx as jsx55, jsxs as jsxs28 } from "react/jsx-runtime";
2891
+ import { Fragment as Fragment7, jsx as jsx55, jsxs as jsxs28 } from "react/jsx-runtime";
2890
2892
  var Slider = ({
2891
2893
  children,
2892
2894
  slidesToShow = 4,
@@ -3024,7 +3026,7 @@ var Slider = ({
3024
3026
  children: slides
3025
3027
  }
3026
3028
  ),
3027
- show_arrows && /* @__PURE__ */ jsxs28(Fragment6, { children: [
3029
+ show_arrows && /* @__PURE__ */ jsxs28(Fragment7, { children: [
3028
3030
  /* @__PURE__ */ jsx55(
3029
3031
  ArrowButton,
3030
3032
  {
@@ -3720,7 +3722,7 @@ var Pagination_default = Pagination;
3720
3722
 
3721
3723
  // src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
3722
3724
  import dynamic7 from "next/dynamic";
3723
- import { Fragment as Fragment7, jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
3725
+ import { Fragment as Fragment8, jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
3724
3726
  var HlsPlayer2 = dynamic7(() => import("./HlsPlayer-DZNDKG2P.mjs"), { ssr: false });
3725
3727
  var deviceToMediaQuery = (device) => {
3726
3728
  switch (device) {
@@ -3793,8 +3795,8 @@ var ImageGalleryNode = (props) => {
3793
3795
  right: "justify-end"
3794
3796
  };
3795
3797
  const formatClasses = FormatClass[props.node.format || ""] || "";
3796
- return /* @__PURE__ */ jsxs31(Fragment7, { children: [
3797
- hlsSources.length > 0 && /* @__PURE__ */ jsx58(Fragment7, { children: /* @__PURE__ */ jsx58(
3798
+ return /* @__PURE__ */ jsxs31(Fragment8, { children: [
3799
+ hlsSources.length > 0 && /* @__PURE__ */ jsx58(Fragment8, { children: /* @__PURE__ */ jsx58(
3798
3800
  HlsPlayer2,
3799
3801
  {
3800
3802
  sources: hlsSources,
@@ -3809,7 +3811,7 @@ var ImageGalleryNode = (props) => {
3809
3811
  styles: hlsStyles
3810
3812
  }
3811
3813
  ) }),
3812
- staticFallback && /* @__PURE__ */ jsx58(Fragment7, { children: /* @__PURE__ */ jsxs31("picture", { children: [
3814
+ staticFallback && /* @__PURE__ */ jsx58(Fragment8, { children: /* @__PURE__ */ jsxs31("picture", { children: [
3813
3815
  DEVICE_ORDER.map((deviceKey) => {
3814
3816
  const match = staticSources.find((img) => img.device === deviceKey);
3815
3817
  if (!match) return null;
@@ -4041,8 +4043,14 @@ var DivContainer = async (props) => {
4041
4043
  }
4042
4044
  const shouldHideContainer = () => {
4043
4045
  if (!props.node.fieldVisibleOnTrue) return false;
4044
- const fieldValue = getNestedValue3(props.dataitem, props.node.fieldVisibleOnTrue);
4045
- return fieldValue !== void 0 && fieldValue === false;
4046
+ const condition = props.node.fieldVisibleOnTrue;
4047
+ const isNegated = condition.startsWith("!");
4048
+ const fieldName = isNegated ? condition.substring(1) : condition;
4049
+ const fieldValue = getNestedValue3(props.dataitem, fieldName);
4050
+ if (fieldValue === void 0) {
4051
+ return false;
4052
+ }
4053
+ return isNegated ? fieldValue === true : fieldValue === false;
4046
4054
  };
4047
4055
  const isHidden = shouldHideContainer();
4048
4056
  let odataString = void 0;
@@ -4282,7 +4290,7 @@ var PageBodyRenderer_default = PageBodyRenderer;
4282
4290
 
4283
4291
  // src/components/Toast.tsx
4284
4292
  import { useState as useState8 } from "react";
4285
- import { Fragment as Fragment8, jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
4293
+ import { Fragment as Fragment9, jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
4286
4294
  var Toast = () => {
4287
4295
  const [showToast, setShowToast] = useState8(false);
4288
4296
  const [message, setMessage] = useState8("");
@@ -4325,7 +4333,7 @@ var Toast = () => {
4325
4333
  const closeToast = () => {
4326
4334
  setShowToast(false);
4327
4335
  };
4328
- return /* @__PURE__ */ jsx61(Fragment8, { children: showToast && /* @__PURE__ */ jsx61("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ jsxs33("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
4336
+ return /* @__PURE__ */ jsx61(Fragment9, { children: showToast && /* @__PURE__ */ jsx61("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ jsxs33("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
4329
4337
  /* @__PURE__ */ jsx61(
4330
4338
  "span",
4331
4339
  {
@@ -4445,7 +4453,7 @@ var ContentView = (props) => {
4445
4453
  var ContentView_default = ContentView;
4446
4454
 
4447
4455
  // src/components/dataForm/DataList.tsx
4448
- import { Fragment as Fragment9, jsx as jsx65, jsxs as jsxs35 } from "react/jsx-runtime";
4456
+ import { Fragment as Fragment10, jsx as jsx65, jsxs as jsxs35 } from "react/jsx-runtime";
4449
4457
  var DataList = (props) => {
4450
4458
  const router = useRouter();
4451
4459
  let builder = new OdataBuilder(props.path);
@@ -4552,7 +4560,7 @@ var DataList = (props) => {
4552
4560
  const showFirstPages = activePageNumber <= 5;
4553
4561
  const showLastPages = activePageNumber > pages - 5;
4554
4562
  if (showFirstPages) {
4555
- return /* @__PURE__ */ jsxs35(Fragment9, { children: [
4563
+ return /* @__PURE__ */ jsxs35(Fragment10, { children: [
4556
4564
  Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx65(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx65(
4557
4565
  Hyperlink,
4558
4566
  {
@@ -4600,7 +4608,7 @@ var DataList = (props) => {
4600
4608
  ) })
4601
4609
  ] });
4602
4610
  } else if (showLastPages) {
4603
- return /* @__PURE__ */ jsxs35(Fragment9, { children: [
4611
+ return /* @__PURE__ */ jsxs35(Fragment10, { children: [
4604
4612
  /* @__PURE__ */ jsx65(
4605
4613
  Hyperlink,
4606
4614
  {
@@ -4630,7 +4638,7 @@ var DataList = (props) => {
4630
4638
  )
4631
4639
  ] });
4632
4640
  } else {
4633
- return /* @__PURE__ */ jsxs35(Fragment9, { children: [
4641
+ return /* @__PURE__ */ jsxs35(Fragment10, { children: [
4634
4642
  /* @__PURE__ */ jsx65(
4635
4643
  Hyperlink,
4636
4644
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acoustte-digital-services/digitalstore-controls-dev",
3
- "version": "0.8.1-dev.20260610051103",
3
+ "version": "0.8.1-dev.20260615064052",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -22,7 +22,7 @@
22
22
  }
23
23
  },
24
24
  "devDependencies": {
25
- "@types/node": "^25.9.2",
25
+ "@types/node": "^25.9.3",
26
26
  "@types/react": "^19",
27
27
  "@types/react-dom": "^19",
28
28
  "tsup": "^8.5.1",