@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260415054401 → 0.8.1-dev.20260416042420
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.
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Button_default,
|
|
4
|
-
ServiceClient_default
|
|
5
|
-
|
|
4
|
+
ServiceClient_default,
|
|
5
|
+
ToastService_default
|
|
6
|
+
} from "./chunk-O5BPFXEO.mjs";
|
|
6
7
|
|
|
7
8
|
// src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx
|
|
8
9
|
import { useCallback, useState } from "react";
|
|
@@ -87,6 +88,7 @@ var LinkNodeButton = (props) => {
|
|
|
87
88
|
console.log("API Response:", response);
|
|
88
89
|
if (response && !response.isSuccessful) {
|
|
89
90
|
const errorMessage = response.message || "API request failed";
|
|
91
|
+
ToastService_default.showError(errorMessage);
|
|
90
92
|
setError(errorMessage);
|
|
91
93
|
setIsLoading(false);
|
|
92
94
|
return { isSuccessful: false, message: errorMessage };
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// src/components/Button.tsx
|
|
2
|
-
import React3, { useState as useState2 } from "react";
|
|
3
|
-
|
|
4
1
|
// src/components/ToastService.tsx
|
|
5
2
|
var ToastService = class _ToastService {
|
|
6
3
|
static initialize(showToast, closeToast) {
|
|
@@ -25,6 +22,9 @@ var ToastService = class _ToastService {
|
|
|
25
22
|
};
|
|
26
23
|
var ToastService_default = ToastService;
|
|
27
24
|
|
|
25
|
+
// src/components/Button.tsx
|
|
26
|
+
import React3, { useState as useState2 } from "react";
|
|
27
|
+
|
|
28
28
|
// src/components/StyleTypes.tsx
|
|
29
29
|
var buttonClasses = /* @__PURE__ */ new Map([
|
|
30
30
|
["Primary" /* Solid */, "btn-solid"],
|
|
@@ -394,6 +394,7 @@ var ServiceClient = class {
|
|
|
394
394
|
var ServiceClient_default = ServiceClient;
|
|
395
395
|
|
|
396
396
|
export {
|
|
397
|
+
ToastService_default,
|
|
397
398
|
buttonClasses,
|
|
398
399
|
Button_default,
|
|
399
400
|
ServiceClient_default
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
|
|
3
|
-
type WidgetRegistryType = Record<string, ComponentType<any>>;
|
|
4
|
-
declare function registerWidgets(widgets: WidgetRegistryType): void;
|
|
5
|
-
declare function getWidget(code: string): ComponentType<any> | undefined;
|
|
1
|
+
import React from 'react';
|
|
6
2
|
|
|
7
3
|
interface ViewControlProps {
|
|
8
4
|
value?: any;
|
|
@@ -219,4 +215,4 @@ interface PageBodyRendererProps {
|
|
|
219
215
|
}
|
|
220
216
|
declare const PageBodyRenderer: React.FC<PageBodyRendererProps>;
|
|
221
217
|
|
|
222
|
-
export { type ActionResponse, DataList, InputControl, type InputControlProps, InputControlType, PageBodyRenderer, ViewControl, type ViewControlProps, ViewControlTypes
|
|
218
|
+
export { type ActionResponse, DataList, InputControl, type InputControlProps, InputControlType, PageBodyRenderer, ViewControl, type ViewControlProps, ViewControlTypes };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
|
|
3
|
-
type WidgetRegistryType = Record<string, ComponentType<any>>;
|
|
4
|
-
declare function registerWidgets(widgets: WidgetRegistryType): void;
|
|
5
|
-
declare function getWidget(code: string): ComponentType<any> | undefined;
|
|
1
|
+
import React from 'react';
|
|
6
2
|
|
|
7
3
|
interface ViewControlProps {
|
|
8
4
|
value?: any;
|
|
@@ -219,4 +215,4 @@ interface PageBodyRendererProps {
|
|
|
219
215
|
}
|
|
220
216
|
declare const PageBodyRenderer: React.FC<PageBodyRendererProps>;
|
|
221
217
|
|
|
222
|
-
export { type ActionResponse, DataList, InputControl, type InputControlProps, InputControlType, PageBodyRenderer, ViewControl, type ViewControlProps, ViewControlTypes
|
|
218
|
+
export { type ActionResponse, DataList, InputControl, type InputControlProps, InputControlType, PageBodyRenderer, ViewControl, type ViewControlProps, ViewControlTypes };
|
package/dist/index.js
CHANGED
|
@@ -626,6 +626,7 @@ var init_LinkNodeButton = __esm({
|
|
|
626
626
|
import_react35 = require("react");
|
|
627
627
|
init_Button();
|
|
628
628
|
init_ServiceClient();
|
|
629
|
+
init_ToastService();
|
|
629
630
|
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
630
631
|
LinkNodeButton = (props) => {
|
|
631
632
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
@@ -707,6 +708,7 @@ var init_LinkNodeButton = __esm({
|
|
|
707
708
|
console.log("API Response:", response);
|
|
708
709
|
if (response && !response.isSuccessful) {
|
|
709
710
|
const errorMessage = response.message || "API request failed";
|
|
711
|
+
ToastService_default.showError(errorMessage);
|
|
710
712
|
setError(errorMessage);
|
|
711
713
|
setIsLoading(false);
|
|
712
714
|
return { isSuccessful: false, message: errorMessage };
|
|
@@ -965,27 +967,10 @@ __export(index_exports, {
|
|
|
965
967
|
InputControlType: () => InputControlType_default,
|
|
966
968
|
PageBodyRenderer: () => PageBodyRenderer_default,
|
|
967
969
|
ViewControl: () => ViewControl_default,
|
|
968
|
-
ViewControlTypes: () => ViewControlTypes_default
|
|
969
|
-
getWidget: () => getWidget,
|
|
970
|
-
registerWidgets: () => registerWidgets
|
|
970
|
+
ViewControlTypes: () => ViewControlTypes_default
|
|
971
971
|
});
|
|
972
972
|
module.exports = __toCommonJS(index_exports);
|
|
973
973
|
|
|
974
|
-
// src/components/pageRenderingEngine/nodes/WidgetRegistry.tsx
|
|
975
|
-
var registry = {};
|
|
976
|
-
function registerWidgets(widgets) {
|
|
977
|
-
Object.entries(widgets).forEach(([key, component]) => {
|
|
978
|
-
if (!registry[key]) {
|
|
979
|
-
registry[key] = component;
|
|
980
|
-
} else {
|
|
981
|
-
console.warn(`Widget "${key}" is already registered. Skipping duplicate.`);
|
|
982
|
-
}
|
|
983
|
-
});
|
|
984
|
-
}
|
|
985
|
-
function getWidget(code) {
|
|
986
|
-
return registry[code];
|
|
987
|
-
}
|
|
988
|
-
|
|
989
974
|
// src/components/controls/view/ViewControl.tsx
|
|
990
975
|
var import_react9 = __toESM(require("react"));
|
|
991
976
|
|
|
@@ -5647,7 +5632,5 @@ var PageBodyRenderer_default = PageBodyRenderer;
|
|
|
5647
5632
|
InputControlType,
|
|
5648
5633
|
PageBodyRenderer,
|
|
5649
5634
|
ViewControl,
|
|
5650
|
-
ViewControlTypes
|
|
5651
|
-
getWidget,
|
|
5652
|
-
registerWidgets
|
|
5635
|
+
ViewControlTypes
|
|
5653
5636
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -5,22 +5,7 @@ import {
|
|
|
5
5
|
Button_default,
|
|
6
6
|
ServiceClient_default,
|
|
7
7
|
buttonClasses
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
|
|
10
|
-
// src/components/pageRenderingEngine/nodes/WidgetRegistry.tsx
|
|
11
|
-
var registry = {};
|
|
12
|
-
function registerWidgets(widgets) {
|
|
13
|
-
Object.entries(widgets).forEach(([key, component]) => {
|
|
14
|
-
if (!registry[key]) {
|
|
15
|
-
registry[key] = component;
|
|
16
|
-
} else {
|
|
17
|
-
console.warn(`Widget "${key}" is already registered. Skipping duplicate.`);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
function getWidget(code) {
|
|
22
|
-
return registry[code];
|
|
23
|
-
}
|
|
8
|
+
} from "./chunk-O5BPFXEO.mjs";
|
|
24
9
|
|
|
25
10
|
// src/components/controls/view/ViewControl.tsx
|
|
26
11
|
import React9 from "react";
|
|
@@ -2832,7 +2817,7 @@ var ImageNode_default = ImageNode;
|
|
|
2832
2817
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2833
2818
|
import dynamic2 from "next/dynamic";
|
|
2834
2819
|
import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2835
|
-
var LinkNodeButton = dynamic2(() => import("./LinkNodeButton-
|
|
2820
|
+
var LinkNodeButton = dynamic2(() => import("./LinkNodeButton-ETDJGBBZ.mjs"), {
|
|
2836
2821
|
ssr: false
|
|
2837
2822
|
});
|
|
2838
2823
|
var LinkNode = (props) => {
|
|
@@ -4678,7 +4663,5 @@ export {
|
|
|
4678
4663
|
InputControlType_default as InputControlType,
|
|
4679
4664
|
PageBodyRenderer_default as PageBodyRenderer,
|
|
4680
4665
|
ViewControl_default as ViewControl,
|
|
4681
|
-
ViewControlTypes_default as ViewControlTypes
|
|
4682
|
-
getWidget,
|
|
4683
|
-
registerWidgets
|
|
4666
|
+
ViewControlTypes_default as ViewControlTypes
|
|
4684
4667
|
};
|
package/package.json
CHANGED