@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260324075516 → 0.8.1-dev.20260324082757
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.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +18 -11
- package/dist/index.mjs +18 -11
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React, { ComponentType } from 'react';
|
|
2
2
|
|
|
3
|
+
type WidgetRegistryType = Record<string, ComponentType<any> | ((props: any) => any)>;
|
|
4
|
+
declare const registerWidgets: (widgets: WidgetRegistryType) => void;
|
|
5
|
+
declare const getWidget: (code: string) => ComponentType<any> | undefined;
|
|
6
|
+
|
|
3
7
|
interface ViewControlProps {
|
|
4
8
|
value?: unknown;
|
|
5
9
|
controlType?: string;
|
|
@@ -208,8 +212,4 @@ interface PageBodyRendererProps {
|
|
|
208
212
|
}
|
|
209
213
|
declare const PageBodyRenderer: React.FC<PageBodyRendererProps>;
|
|
210
214
|
|
|
211
|
-
type WidgetRegistryType = Record<string, ComponentType<any> | ((props: any) => any)>;
|
|
212
|
-
declare const registerWidgets: (widgets: WidgetRegistryType) => void;
|
|
213
|
-
declare const getWidget: (code: string) => ComponentType<any> | undefined;
|
|
214
|
-
|
|
215
215
|
export { type ActionResponse, DataList, InputControl, type InputControlProps, InputControlType, PageBodyRenderer, ViewControl, type ViewControlProps, ViewControlTypes, getWidget, registerWidgets };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React, { ComponentType } from 'react';
|
|
2
2
|
|
|
3
|
+
type WidgetRegistryType = Record<string, ComponentType<any> | ((props: any) => any)>;
|
|
4
|
+
declare const registerWidgets: (widgets: WidgetRegistryType) => void;
|
|
5
|
+
declare const getWidget: (code: string) => ComponentType<any> | undefined;
|
|
6
|
+
|
|
3
7
|
interface ViewControlProps {
|
|
4
8
|
value?: unknown;
|
|
5
9
|
controlType?: string;
|
|
@@ -208,8 +212,4 @@ interface PageBodyRendererProps {
|
|
|
208
212
|
}
|
|
209
213
|
declare const PageBodyRenderer: React.FC<PageBodyRendererProps>;
|
|
210
214
|
|
|
211
|
-
type WidgetRegistryType = Record<string, ComponentType<any> | ((props: any) => any)>;
|
|
212
|
-
declare const registerWidgets: (widgets: WidgetRegistryType) => void;
|
|
213
|
-
declare const getWidget: (code: string) => ComponentType<any> | undefined;
|
|
214
|
-
|
|
215
215
|
export { type ActionResponse, DataList, InputControl, type InputControlProps, InputControlType, PageBodyRenderer, ViewControl, type ViewControlProps, ViewControlTypes, getWidget, registerWidgets };
|
package/dist/index.js
CHANGED
|
@@ -43,6 +43,24 @@ __export(index_exports, {
|
|
|
43
43
|
});
|
|
44
44
|
module.exports = __toCommonJS(index_exports);
|
|
45
45
|
|
|
46
|
+
// src/components/pageRenderingEngine/nodes/WidgetRegistry.tsx
|
|
47
|
+
var GLOBAL_KEY = "__DIGITALSTORE_WIDGET_REGISTRY__";
|
|
48
|
+
var getRegistry = () => {
|
|
49
|
+
const globalAny = globalThis;
|
|
50
|
+
if (!globalAny[GLOBAL_KEY]) {
|
|
51
|
+
globalAny[GLOBAL_KEY] = {};
|
|
52
|
+
}
|
|
53
|
+
return globalAny[GLOBAL_KEY];
|
|
54
|
+
};
|
|
55
|
+
var registerWidgets = (widgets) => {
|
|
56
|
+
const registry = getRegistry();
|
|
57
|
+
Object.assign(registry, widgets);
|
|
58
|
+
};
|
|
59
|
+
var getWidget = (code) => {
|
|
60
|
+
const registry = getRegistry();
|
|
61
|
+
return registry[code];
|
|
62
|
+
};
|
|
63
|
+
|
|
46
64
|
// src/components/controls/view/ViewControl.tsx
|
|
47
65
|
var import_react11 = __toESM(require("react"));
|
|
48
66
|
|
|
@@ -3092,17 +3110,6 @@ var ImageNode_default = ImageNode;
|
|
|
3092
3110
|
|
|
3093
3111
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3094
3112
|
var import_react43 = __toESM(require("react"));
|
|
3095
|
-
|
|
3096
|
-
// src/components/pageRenderingEngine/nodes/WidgetRegistry.tsx
|
|
3097
|
-
var registry = {};
|
|
3098
|
-
var registerWidgets = (widgets) => {
|
|
3099
|
-
registry = widgets;
|
|
3100
|
-
};
|
|
3101
|
-
var getWidget = (code) => {
|
|
3102
|
-
return registry[code];
|
|
3103
|
-
};
|
|
3104
|
-
|
|
3105
|
-
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3106
3113
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3107
3114
|
function resolveWidget(code) {
|
|
3108
3115
|
return getWidget(code);
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
// src/components/pageRenderingEngine/nodes/WidgetRegistry.tsx
|
|
5
|
+
var GLOBAL_KEY = "__DIGITALSTORE_WIDGET_REGISTRY__";
|
|
6
|
+
var getRegistry = () => {
|
|
7
|
+
const globalAny = globalThis;
|
|
8
|
+
if (!globalAny[GLOBAL_KEY]) {
|
|
9
|
+
globalAny[GLOBAL_KEY] = {};
|
|
10
|
+
}
|
|
11
|
+
return globalAny[GLOBAL_KEY];
|
|
12
|
+
};
|
|
13
|
+
var registerWidgets = (widgets) => {
|
|
14
|
+
const registry = getRegistry();
|
|
15
|
+
Object.assign(registry, widgets);
|
|
16
|
+
};
|
|
17
|
+
var getWidget = (code) => {
|
|
18
|
+
const registry = getRegistry();
|
|
19
|
+
return registry[code];
|
|
20
|
+
};
|
|
21
|
+
|
|
4
22
|
// src/components/controls/view/ViewControl.tsx
|
|
5
23
|
import React11 from "react";
|
|
6
24
|
|
|
@@ -3058,17 +3076,6 @@ var ImageNode_default = ImageNode;
|
|
|
3058
3076
|
|
|
3059
3077
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3060
3078
|
import React42, { Suspense } from "react";
|
|
3061
|
-
|
|
3062
|
-
// src/components/pageRenderingEngine/nodes/WidgetRegistry.tsx
|
|
3063
|
-
var registry = {};
|
|
3064
|
-
var registerWidgets = (widgets) => {
|
|
3065
|
-
registry = widgets;
|
|
3066
|
-
};
|
|
3067
|
-
var getWidget = (code) => {
|
|
3068
|
-
return registry[code];
|
|
3069
|
-
};
|
|
3070
|
-
|
|
3071
|
-
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3072
3079
|
import { Fragment as Fragment7, jsx as jsx56, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3073
3080
|
function resolveWidget(code) {
|
|
3074
3081
|
return getWidget(code);
|
package/package.json
CHANGED