@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260410111456 → 0.8.1-dev.20260414103409

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
@@ -3434,10 +3434,7 @@ var import_react50 = __toESM(require("react"));
3434
3434
  var import_react37 = __toESM(require("react"));
3435
3435
 
3436
3436
  // src/components/pageRenderingEngine/nodes/TextNode.tsx
3437
- var import_jsx_runtime40 = (
3438
- // @ts-expect-error custom code
3439
- require("react/jsx-runtime")
3440
- );
3437
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3441
3438
  var TextNode = (props) => {
3442
3439
  function cssStringToJson(cssString) {
3443
3440
  const styleObject = {};
@@ -3494,8 +3491,18 @@ var TextNode = (props) => {
3494
3491
  return key in dataItem ? dataItem[key] : `{${key}}`;
3495
3492
  });
3496
3493
  }
3494
+ function renderWithLineBreaks(text) {
3495
+ return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { children: [
3496
+ line,
3497
+ index < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("br", {})
3498
+ ] }, index));
3499
+ }
3497
3500
  const displayText = props.linkText ? props.linkText : props.node.text;
3498
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text });
3501
+ const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
3502
+ return (
3503
+ // @ts-expect-error custom code
3504
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText })
3505
+ );
3499
3506
  };
3500
3507
  var TextNode_default = TextNode;
3501
3508
 
package/dist/index.mjs CHANGED
@@ -2473,7 +2473,7 @@ import React42 from "react";
2473
2473
  import React32 from "react";
2474
2474
 
2475
2475
  // src/components/pageRenderingEngine/nodes/TextNode.tsx
2476
- import { jsx as jsx36 } from "react/jsx-runtime";
2476
+ import { jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
2477
2477
  var TextNode = (props) => {
2478
2478
  function cssStringToJson(cssString) {
2479
2479
  const styleObject = {};
@@ -2530,10 +2530,17 @@ var TextNode = (props) => {
2530
2530
  return key in dataItem ? dataItem[key] : `{${key}}`;
2531
2531
  });
2532
2532
  }
2533
+ function renderWithLineBreaks(text) {
2534
+ return text.split("\n").map((line, index, arr) => /* @__PURE__ */ jsxs24("span", { children: [
2535
+ line,
2536
+ index < arr.length - 1 && /* @__PURE__ */ jsx36("br", {})
2537
+ ] }, index));
2538
+ }
2533
2539
  const displayText = props.linkText ? props.linkText : props.node.text;
2540
+ const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
2534
2541
  return (
2535
2542
  // @ts-expect-error custom code
2536
- /* @__PURE__ */ jsx36("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text })
2543
+ /* @__PURE__ */ jsx36("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText })
2537
2544
  );
2538
2545
  };
2539
2546
  var TextNode_default = TextNode;
@@ -2824,7 +2831,7 @@ var ImageNode_default = ImageNode;
2824
2831
 
2825
2832
  // src/components/pageRenderingEngine/nodes/LinkNode.tsx
2826
2833
  import dynamic2 from "next/dynamic";
2827
- import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
2834
+ import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
2828
2835
  var LinkNodeButton = dynamic2(() => import("./LinkNodeButton-KBSXOEHS.mjs"), {
2829
2836
  ssr: false
2830
2837
  });
@@ -2898,7 +2905,7 @@ var LinkNode = (props) => {
2898
2905
  return null;
2899
2906
  };
2900
2907
  if (isButton) {
2901
- return /* @__PURE__ */ jsxs24(
2908
+ return /* @__PURE__ */ jsxs25(
2902
2909
  LinkNodeButton,
2903
2910
  {
2904
2911
  node,
@@ -2916,7 +2923,7 @@ var LinkNode = (props) => {
2916
2923
  }
2917
2924
  );
2918
2925
  }
2919
- return /* @__PURE__ */ jsxs24(
2926
+ return /* @__PURE__ */ jsxs25(
2920
2927
  Hyperlink,
2921
2928
  {
2922
2929
  href: linkUrl || "#",
@@ -3093,7 +3100,7 @@ var DatafieldNode = (props) => {
3093
3100
  var DatafieldNode_default = DatafieldNode;
3094
3101
 
3095
3102
  // src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
3096
- import { Fragment as Fragment5, jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
3103
+ import { Fragment as Fragment5, jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
3097
3104
  var ParagraphNode = (props) => {
3098
3105
  const NodeTypes2 = {
3099
3106
  ["text"]: TextNode_default,
@@ -3127,7 +3134,7 @@ var ParagraphNode = (props) => {
3127
3134
  ) }, index);
3128
3135
  }) });
3129
3136
  }
3130
- return /* @__PURE__ */ jsxs25("div", { className: " " + formatClasses, children: [
3137
+ return /* @__PURE__ */ jsxs26("div", { className: " " + formatClasses, children: [
3131
3138
  hasChildren && props.node.children.map((node, index) => {
3132
3139
  const SelectedNode = NodeTypes2[node.type];
3133
3140
  return /* @__PURE__ */ jsx44(React32.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx44(
@@ -3215,12 +3222,12 @@ var ListItemNode = (props) => {
3215
3222
  var ListItemNode_default = ListItemNode;
3216
3223
 
3217
3224
  // src/components/pageRenderingEngine/nodes/ListNode.tsx
3218
- import { jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
3225
+ import { jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
3219
3226
  var ListNode = (props) => {
3220
3227
  const NodeTypes2 = {
3221
3228
  listitem: ListItemNode_default
3222
3229
  };
3223
- return /* @__PURE__ */ jsxs26(React35.Fragment, { children: [
3230
+ return /* @__PURE__ */ jsxs27(React35.Fragment, { children: [
3224
3231
  props.node.listType == "bullet" && /* @__PURE__ */ jsx47("ul", { children: props.node.children && props.node.children.map((node, index) => {
3225
3232
  const SelectedNode = NodeTypes2[node.type];
3226
3233
  return /* @__PURE__ */ jsx47(React35.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
@@ -3252,7 +3259,7 @@ var QuoteNode_default = QuoteNode;
3252
3259
  // src/components/pageRenderingEngine/nodes/CodeNode.tsx
3253
3260
  import React37 from "react";
3254
3261
  import dynamic3 from "next/dynamic";
3255
- import { jsx as jsx49, jsxs as jsxs27 } from "react/jsx-runtime";
3262
+ import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
3256
3263
  var CopyButton = dynamic3(() => import("./CopyButton-XONTQQW7.mjs"), {
3257
3264
  ssr: false,
3258
3265
  // optional: fallback UI while loading
@@ -3270,8 +3277,8 @@ var CodeNode = (props) => {
3270
3277
  if (node.type === "link") return node.text || node.url || "";
3271
3278
  return "";
3272
3279
  }).join("") ?? "";
3273
- return /* @__PURE__ */ jsxs27("div", { children: [
3274
- /* @__PURE__ */ jsxs27("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
3280
+ return /* @__PURE__ */ jsxs28("div", { children: [
3281
+ /* @__PURE__ */ jsxs28("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
3275
3282
  /* @__PURE__ */ jsx49("span", { children: "Code Snippet" }),
3276
3283
  /* @__PURE__ */ jsx49(CopyButton, { text: textContent })
3277
3284
  ] }),
@@ -3299,7 +3306,7 @@ var HorizontalRuleNode = () => {
3299
3306
  var HorizontalRuleNode_default = HorizontalRuleNode;
3300
3307
 
3301
3308
  // src/components/pageRenderingEngine/nodes/WidgetNode.tsx
3302
- import { Fragment as Fragment7, jsx as jsx51, jsxs as jsxs28 } from "react/jsx-runtime";
3309
+ import { Fragment as Fragment7, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
3303
3310
  var WidgetNode = (props) => {
3304
3311
  const getWidgetParameters = () => {
3305
3312
  const widgetInputParameters = {
@@ -3363,7 +3370,7 @@ var WidgetNode = (props) => {
3363
3370
  if (process.env.NODE_ENV !== "production") {
3364
3371
  console.warn("Widget not found:", widgetCode);
3365
3372
  }
3366
- return /* @__PURE__ */ jsxs28(Fragment7, { children: [
3373
+ return /* @__PURE__ */ jsxs29(Fragment7, { children: [
3367
3374
  "Widget not found: ",
3368
3375
  widgetCode
3369
3376
  ] });
@@ -3421,7 +3428,7 @@ var InputControlNode = (props) => {
3421
3428
  var InputControlNode_default = InputControlNode;
3422
3429
 
3423
3430
  // src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
3424
- import { jsx as jsx53, jsxs as jsxs29 } from "react/jsx-runtime";
3431
+ import { jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
3425
3432
  var FormContainerNode = (props) => {
3426
3433
  const NodeTypes2 = {
3427
3434
  ["input-control"]: InputControlNode_default
@@ -3451,7 +3458,7 @@ var FormContainerNode = (props) => {
3451
3458
  };
3452
3459
  fetchInitialData();
3453
3460
  }, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
3454
- return /* @__PURE__ */ jsxs29("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
3461
+ return /* @__PURE__ */ jsxs30("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
3455
3462
  node.children && node.children.map((node2, index) => {
3456
3463
  {
3457
3464
  }
@@ -3494,7 +3501,7 @@ var EmbedNode_default = EmbedNode;
3494
3501
 
3495
3502
  // src/components/Slider.tsx
3496
3503
  import React39, { useState as useState6, useEffect as useEffect8, Children, cloneElement } from "react";
3497
- import { Fragment as Fragment8, jsx as jsx55, jsxs as jsxs30 } from "react/jsx-runtime";
3504
+ import { Fragment as Fragment8, jsx as jsx55, jsxs as jsxs31 } from "react/jsx-runtime";
3498
3505
  var Slider = ({
3499
3506
  children,
3500
3507
  slidesToShow = 4,
@@ -3614,7 +3621,7 @@ var Slider = ({
3614
3621
  return "bottom-4";
3615
3622
  }
3616
3623
  };
3617
- return /* @__PURE__ */ jsxs30(
3624
+ return /* @__PURE__ */ jsxs31(
3618
3625
  "div",
3619
3626
  {
3620
3627
  className: `relative w-full overflow-hidden ${className}`,
@@ -3632,7 +3639,7 @@ var Slider = ({
3632
3639
  children: slides
3633
3640
  }
3634
3641
  ),
3635
- show_arrows && /* @__PURE__ */ jsxs30(Fragment8, { children: [
3642
+ show_arrows && /* @__PURE__ */ jsxs31(Fragment8, { children: [
3636
3643
  /* @__PURE__ */ jsx55(
3637
3644
  ArrowButton,
3638
3645
  {
@@ -3643,7 +3650,7 @@ var Slider = ({
3643
3650
  children: /* @__PURE__ */ jsx55("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx55("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
3644
3651
  }
3645
3652
  ),
3646
- /* @__PURE__ */ jsxs30(
3653
+ /* @__PURE__ */ jsxs31(
3647
3654
  ArrowButton,
3648
3655
  {
3649
3656
  direction: "right",
@@ -3792,7 +3799,7 @@ var ProgressPill = ({
3792
3799
  }
3793
3800
  return null;
3794
3801
  };
3795
- return /* @__PURE__ */ jsxs30(
3802
+ return /* @__PURE__ */ jsxs31(
3796
3803
  "button",
3797
3804
  {
3798
3805
  className: `${baseClasses} ${getStyleClasses()}`,
@@ -3968,9 +3975,9 @@ var PathUtility = class {
3968
3975
  var PathUtility_default = new PathUtility();
3969
3976
 
3970
3977
  // src/components/NoDataFound.tsx
3971
- import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
3978
+ import { jsx as jsx56, jsxs as jsxs32 } from "react/jsx-runtime";
3972
3979
  var NoDataFound = () => {
3973
- return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
3980
+ return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
3974
3981
  /* @__PURE__ */ jsx56("div", { className: "mb-5", children: /* @__PURE__ */ jsx56("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx56(
3975
3982
  "svg",
3976
3983
  {
@@ -3998,7 +4005,7 @@ var NoDataFound_default = NoDataFound;
3998
4005
 
3999
4006
  // src/components/Pagination.tsx
4000
4007
  import { useMemo } from "react";
4001
- import { jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
4008
+ import { jsx as jsx57, jsxs as jsxs33 } from "react/jsx-runtime";
4002
4009
  var Pagination = (props) => {
4003
4010
  const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
4004
4011
  const builder = useMemo(() => {
@@ -4069,11 +4076,11 @@ var Pagination = (props) => {
4069
4076
  );
4070
4077
  };
4071
4078
  if (totalPages <= 1 && totalItems === 0) return null;
4072
- return /* @__PURE__ */ jsxs32("div", { className: "py-6 border-t bg-default", children: [
4073
- /* @__PURE__ */ jsxs32("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
4074
- /* @__PURE__ */ jsxs32("div", { className: "text-sm", children: [
4079
+ return /* @__PURE__ */ jsxs33("div", { className: "py-6 border-t bg-default", children: [
4080
+ /* @__PURE__ */ jsxs33("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
4081
+ /* @__PURE__ */ jsxs33("div", { className: "text-sm", children: [
4075
4082
  "Showing ",
4076
- /* @__PURE__ */ jsxs32("span", { className: "font-semibold", children: [
4083
+ /* @__PURE__ */ jsxs33("span", { className: "font-semibold", children: [
4077
4084
  startItem,
4078
4085
  "-",
4079
4086
  endItem
@@ -4083,8 +4090,8 @@ var Pagination = (props) => {
4083
4090
  /* @__PURE__ */ jsx57("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
4084
4091
  " results"
4085
4092
  ] }),
4086
- totalPages > 1 && /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-1", children: [
4087
- /* @__PURE__ */ jsxs32(
4093
+ totalPages > 1 && /* @__PURE__ */ jsxs33("div", { className: "flex items-center space-x-1", children: [
4094
+ /* @__PURE__ */ jsxs33(
4088
4095
  NavigationButton,
4089
4096
  {
4090
4097
  page: activePageNumber - 1,
@@ -4109,7 +4116,7 @@ var Pagination = (props) => {
4109
4116
  const page = item;
4110
4117
  return /* @__PURE__ */ jsx57(PageButton, { page, children: page }, page);
4111
4118
  }),
4112
- /* @__PURE__ */ jsxs32(
4119
+ /* @__PURE__ */ jsxs33(
4113
4120
  NavigationButton,
4114
4121
  {
4115
4122
  page: activePageNumber + 1,
@@ -4121,7 +4128,7 @@ var Pagination = (props) => {
4121
4128
  }
4122
4129
  )
4123
4130
  ] }),
4124
- showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-2", children: [
4131
+ showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs33("div", { className: "flex items-center space-x-2", children: [
4125
4132
  /* @__PURE__ */ jsx57("span", { className: "text-sm", children: "Go to:" }),
4126
4133
  /* @__PURE__ */ jsx57("div", { className: "relative", children: /* @__PURE__ */ jsx57(
4127
4134
  "input",
@@ -4144,7 +4151,7 @@ var Pagination = (props) => {
4144
4151
  ) })
4145
4152
  ] })
4146
4153
  ] }),
4147
- showPageSizeSelector && /* @__PURE__ */ jsx57("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-center space-x-2", children: [
4154
+ showPageSizeSelector && /* @__PURE__ */ jsx57("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-center space-x-2", children: [
4148
4155
  /* @__PURE__ */ jsx57("span", { className: "text-sm", children: "Show:" }),
4149
4156
  /* @__PURE__ */ jsx57("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx57(
4150
4157
  Hyperlink,
@@ -4258,7 +4265,7 @@ var ImageGalleryNode_default = ImageGalleryNode;
4258
4265
 
4259
4266
  // src/components/pageRenderingEngine/nodes/DivContainer.tsx
4260
4267
  import Link2 from "next/link";
4261
- import { jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
4268
+ import { jsx as jsx59, jsxs as jsxs34 } from "react/jsx-runtime";
4262
4269
  function toCamelCase(str) {
4263
4270
  return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
4264
4271
  }
@@ -4581,7 +4588,7 @@ var DivContainer = async (props) => {
4581
4588
  props.node.autoFormat && "auto-format",
4582
4589
  props.node.bgClass
4583
4590
  ].filter(Boolean).join(" ");
4584
- return /* @__PURE__ */ jsxs33(React41.Fragment, { children: [
4591
+ return /* @__PURE__ */ jsxs34(React41.Fragment, { children: [
4585
4592
  /* @__PURE__ */ jsx59("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
4586
4593
  /* @__PURE__ */ jsx59(React41.Fragment, { children: /* @__PURE__ */ jsx59(
4587
4594
  Wrapper,
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.20260410111456",
3
+ "version": "0.8.1-dev.20260414103409",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",