@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260416044239 → 0.8.1-dev.20260416045203

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.
@@ -3,7 +3,7 @@ import {
3
3
  Button_default,
4
4
  ServiceClient_default,
5
5
  ToastService_default
6
- } from "./chunk-O5BPFXEO.mjs";
6
+ } from "./chunk-TYBRP6MP.mjs";
7
7
 
8
8
  // src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx
9
9
  import { useCallback, useState } from "react";
@@ -14,6 +14,16 @@ var ToastService = class _ToastService {
14
14
  _ToastService.showToast(message, "info");
15
15
  }
16
16
  }
17
+ static showWarning(message) {
18
+ if (_ToastService.showToast) {
19
+ _ToastService.showToast(message, "warning");
20
+ }
21
+ }
22
+ static showSuccess(message) {
23
+ if (_ToastService.showToast) {
24
+ _ToastService.showToast(message, "success");
25
+ }
26
+ }
17
27
  static close() {
18
28
  if (_ToastService.closeToast) {
19
29
  _ToastService.closeToast();
package/dist/index.d.mts CHANGED
@@ -224,6 +224,8 @@ declare class ToastService {
224
224
  static initialize(showToast: (message: string, messageType: string) => void, closeToast: () => void): void;
225
225
  static showError(message: string): void;
226
226
  static showInfo(message: string): void;
227
+ static showWarning(message: string): void;
228
+ static showSuccess(message: string): void;
227
229
  static close(): void;
228
230
  }
229
231
 
package/dist/index.d.ts CHANGED
@@ -224,6 +224,8 @@ declare class ToastService {
224
224
  static initialize(showToast: (message: string, messageType: string) => void, closeToast: () => void): void;
225
225
  static showError(message: string): void;
226
226
  static showInfo(message: string): void;
227
+ static showWarning(message: string): void;
228
+ static showSuccess(message: string): void;
227
229
  static close(): void;
228
230
  }
229
231
 
package/dist/index.js CHANGED
@@ -50,6 +50,16 @@ var init_ToastService = __esm({
50
50
  _ToastService.showToast(message, "info");
51
51
  }
52
52
  }
53
+ static showWarning(message) {
54
+ if (_ToastService.showToast) {
55
+ _ToastService.showToast(message, "warning");
56
+ }
57
+ }
58
+ static showSuccess(message) {
59
+ if (_ToastService.showToast) {
60
+ _ToastService.showToast(message, "success");
61
+ }
62
+ }
53
63
  static close() {
54
64
  if (_ToastService.closeToast) {
55
65
  _ToastService.closeToast();
@@ -5640,6 +5650,25 @@ var Toast = () => {
5640
5650
  setShowToast(true);
5641
5651
  setMessage(message2);
5642
5652
  setMessageType("error");
5653
+ setTimeout(() => {
5654
+ setShowToast(false);
5655
+ }, 2e3);
5656
+ };
5657
+ ToastService_default.showSuccess = function(message2) {
5658
+ setShowToast(true);
5659
+ setMessage(message2);
5660
+ setMessageType("success");
5661
+ setTimeout(() => {
5662
+ setShowToast(false);
5663
+ }, 2e3);
5664
+ };
5665
+ ToastService_default.showWarning = function(message2) {
5666
+ setShowToast(true);
5667
+ setMessage(message2);
5668
+ setMessageType("warning");
5669
+ setTimeout(() => {
5670
+ setShowToast(false);
5671
+ }, 2e3);
5643
5672
  };
5644
5673
  ToastService_default.showInfo = function(message2) {
5645
5674
  setShowToast(true);
@@ -5647,7 +5676,7 @@ var Toast = () => {
5647
5676
  setMessageType("info");
5648
5677
  setTimeout(() => {
5649
5678
  setShowToast(false);
5650
- }, 4e3);
5679
+ }, 2e3);
5651
5680
  };
5652
5681
  ToastService_default.close = function() {
5653
5682
  setShowToast(false);
@@ -5655,55 +5684,27 @@ var Toast = () => {
5655
5684
  const closeToast = () => {
5656
5685
  setShowToast(false);
5657
5686
  };
5658
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_jsx_runtime70.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5659
- "div",
5660
- {
5661
- className: "fixed top-2 flex justify-center w-1/2 left-1/2 -translate-x-1/2",
5662
- style: { zIndex: 1e3 },
5663
- children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
5664
- "div",
5665
- {
5666
- className: `w-full items-center flex justify-between p-3 rounded-md relative ${messageType == "error" ? "bg-error" : "bg-success-soft"}`,
5667
- children: [
5668
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5669
- "span",
5670
- {
5671
- className: "font-medium text-inherit text-sm",
5672
- style: { whiteSpace: "pre-line" },
5673
- children: message
5674
- }
5675
- ),
5676
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5677
- "button",
5678
- {
5679
- className: "absolute right-2 top-2 ml-2 focus:outline-none",
5680
- onClick: closeToast,
5681
- children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5682
- "svg",
5683
- {
5684
- xmlns: "http://www.w3.org/2000/svg",
5685
- className: "h-4 w-4",
5686
- fill: "none",
5687
- viewBox: "0 0 24 24",
5688
- stroke: "currentColor",
5689
- children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5690
- "path",
5691
- {
5692
- strokeLinecap: "round",
5693
- strokeLinejoin: "round",
5694
- strokeWidth: "2",
5695
- d: "M6 18L18 6M6 6l12 12"
5696
- }
5697
- )
5698
- }
5699
- )
5700
- }
5701
- )
5702
- ]
5703
- }
5704
- )
5705
- }
5706
- ) });
5687
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_jsx_runtime70.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("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__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
5688
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5689
+ "span",
5690
+ {
5691
+ className: "font-medium text-inherit text-sm",
5692
+ style: { whiteSpace: "pre-line" },
5693
+ children: message
5694
+ }
5695
+ ),
5696
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5697
+ "svg",
5698
+ {
5699
+ xmlns: "http://www.w3.org/2000/svg",
5700
+ className: "h-4 w-4",
5701
+ fill: "none",
5702
+ viewBox: "0 0 24 24",
5703
+ stroke: "currentColor",
5704
+ children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
5705
+ }
5706
+ ) })
5707
+ ] }) }) });
5707
5708
  };
5708
5709
  var Toast_default = Toast;
5709
5710
 
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  ServiceClient_default,
7
7
  ToastService_default,
8
8
  buttonClasses
9
- } from "./chunk-O5BPFXEO.mjs";
9
+ } from "./chunk-TYBRP6MP.mjs";
10
10
 
11
11
  // src/components/controls/view/ViewControl.tsx
12
12
  import React9 from "react";
@@ -2818,7 +2818,7 @@ var ImageNode_default = ImageNode;
2818
2818
  // src/components/pageRenderingEngine/nodes/LinkNode.tsx
2819
2819
  import dynamic2 from "next/dynamic";
2820
2820
  import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
2821
- var LinkNodeButton = dynamic2(() => import("./LinkNodeButton-ETDJGBBZ.mjs"), {
2821
+ var LinkNodeButton = dynamic2(() => import("./LinkNodeButton-DFS25WUO.mjs"), {
2822
2822
  ssr: false
2823
2823
  });
2824
2824
  var LinkNode = (props) => {
@@ -4670,6 +4670,25 @@ var Toast = () => {
4670
4670
  setShowToast(true);
4671
4671
  setMessage(message2);
4672
4672
  setMessageType("error");
4673
+ setTimeout(() => {
4674
+ setShowToast(false);
4675
+ }, 2e3);
4676
+ };
4677
+ ToastService_default.showSuccess = function(message2) {
4678
+ setShowToast(true);
4679
+ setMessage(message2);
4680
+ setMessageType("success");
4681
+ setTimeout(() => {
4682
+ setShowToast(false);
4683
+ }, 2e3);
4684
+ };
4685
+ ToastService_default.showWarning = function(message2) {
4686
+ setShowToast(true);
4687
+ setMessage(message2);
4688
+ setMessageType("warning");
4689
+ setTimeout(() => {
4690
+ setShowToast(false);
4691
+ }, 2e3);
4673
4692
  };
4674
4693
  ToastService_default.showInfo = function(message2) {
4675
4694
  setShowToast(true);
@@ -4677,7 +4696,7 @@ var Toast = () => {
4677
4696
  setMessageType("info");
4678
4697
  setTimeout(() => {
4679
4698
  setShowToast(false);
4680
- }, 4e3);
4699
+ }, 2e3);
4681
4700
  };
4682
4701
  ToastService_default.close = function() {
4683
4702
  setShowToast(false);
@@ -4685,55 +4704,27 @@ var Toast = () => {
4685
4704
  const closeToast = () => {
4686
4705
  setShowToast(false);
4687
4706
  };
4688
- return /* @__PURE__ */ jsx61(Fragment9, { children: showToast && /* @__PURE__ */ jsx61(
4689
- "div",
4690
- {
4691
- className: "fixed top-2 flex justify-center w-1/2 left-1/2 -translate-x-1/2",
4692
- style: { zIndex: 1e3 },
4693
- children: /* @__PURE__ */ jsxs34(
4694
- "div",
4695
- {
4696
- className: `w-full items-center flex justify-between p-3 rounded-md relative ${messageType == "error" ? "bg-error" : "bg-success-soft"}`,
4697
- children: [
4698
- /* @__PURE__ */ jsx61(
4699
- "span",
4700
- {
4701
- className: "font-medium text-inherit text-sm",
4702
- style: { whiteSpace: "pre-line" },
4703
- children: message
4704
- }
4705
- ),
4706
- /* @__PURE__ */ jsx61(
4707
- "button",
4708
- {
4709
- className: "absolute right-2 top-2 ml-2 focus:outline-none",
4710
- onClick: closeToast,
4711
- children: /* @__PURE__ */ jsx61(
4712
- "svg",
4713
- {
4714
- xmlns: "http://www.w3.org/2000/svg",
4715
- className: "h-4 w-4",
4716
- fill: "none",
4717
- viewBox: "0 0 24 24",
4718
- stroke: "currentColor",
4719
- children: /* @__PURE__ */ jsx61(
4720
- "path",
4721
- {
4722
- strokeLinecap: "round",
4723
- strokeLinejoin: "round",
4724
- strokeWidth: "2",
4725
- d: "M6 18L18 6M6 6l12 12"
4726
- }
4727
- )
4728
- }
4729
- )
4730
- }
4731
- )
4732
- ]
4733
- }
4734
- )
4735
- }
4736
- ) });
4707
+ 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__ */ jsxs34("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
4708
+ /* @__PURE__ */ jsx61(
4709
+ "span",
4710
+ {
4711
+ className: "font-medium text-inherit text-sm",
4712
+ style: { whiteSpace: "pre-line" },
4713
+ children: message
4714
+ }
4715
+ ),
4716
+ /* @__PURE__ */ jsx61("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ jsx61(
4717
+ "svg",
4718
+ {
4719
+ xmlns: "http://www.w3.org/2000/svg",
4720
+ className: "h-4 w-4",
4721
+ fill: "none",
4722
+ viewBox: "0 0 24 24",
4723
+ stroke: "currentColor",
4724
+ children: /* @__PURE__ */ jsx61("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
4725
+ }
4726
+ ) })
4727
+ ] }) }) });
4737
4728
  };
4738
4729
  var Toast_default = Toast;
4739
4730
  export {
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.20260416044239",
3
+ "version": "0.8.1-dev.20260416045203",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",