@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260415050509 → 0.8.1-dev.20260415060612
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 +2 -6
- package/dist/index.d.ts +2 -6
- package/dist/index.js +14 -45
- package/dist/index.mjs +35 -64
- package/package.json +1 -1
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
|
@@ -965,27 +965,10 @@ __export(index_exports, {
|
|
|
965
965
|
InputControlType: () => InputControlType_default,
|
|
966
966
|
PageBodyRenderer: () => PageBodyRenderer_default,
|
|
967
967
|
ViewControl: () => ViewControl_default,
|
|
968
|
-
ViewControlTypes: () => ViewControlTypes_default
|
|
969
|
-
getWidget: () => getWidget,
|
|
970
|
-
registerWidgets: () => registerWidgets
|
|
968
|
+
ViewControlTypes: () => ViewControlTypes_default
|
|
971
969
|
});
|
|
972
970
|
module.exports = __toCommonJS(index_exports);
|
|
973
971
|
|
|
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
972
|
// src/components/controls/view/ViewControl.tsx
|
|
990
973
|
var import_react9 = __toESM(require("react"));
|
|
991
974
|
|
|
@@ -4330,34 +4313,22 @@ var WidgetNode = (props) => {
|
|
|
4330
4313
|
if (!widgetCode) {
|
|
4331
4314
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: "Invalid widget" });
|
|
4332
4315
|
}
|
|
4333
|
-
const SelectedWidget = getWidget(widgetCode);
|
|
4334
|
-
if (!SelectedWidget) {
|
|
4335
|
-
if (process.env.NODE_ENV !== "production") {
|
|
4336
|
-
console.warn("Widget not found:", widgetCode);
|
|
4337
|
-
}
|
|
4338
|
-
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
4339
|
-
"Widget not found: ",
|
|
4340
|
-
widgetCode
|
|
4341
|
-
] });
|
|
4342
|
-
}
|
|
4343
4316
|
const widgetParams = getWidgetParameters();
|
|
4344
4317
|
const WidgetRenderer = props.widgetRenderer;
|
|
4345
4318
|
return (
|
|
4346
4319
|
// eslint-disable-next-line react-hooks/static-components
|
|
4347
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
)
|
|
4360
|
-
] })
|
|
4320
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react44.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4321
|
+
WidgetRenderer,
|
|
4322
|
+
{
|
|
4323
|
+
params: widgetParams,
|
|
4324
|
+
query: props.query,
|
|
4325
|
+
session: props.session,
|
|
4326
|
+
host: props.host,
|
|
4327
|
+
path: props.path,
|
|
4328
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
4329
|
+
widgetCode
|
|
4330
|
+
}
|
|
4331
|
+
) })
|
|
4361
4332
|
);
|
|
4362
4333
|
};
|
|
4363
4334
|
var WidgetNode_default = WidgetNode;
|
|
@@ -5659,7 +5630,5 @@ var PageBodyRenderer_default = PageBodyRenderer;
|
|
|
5659
5630
|
InputControlType,
|
|
5660
5631
|
PageBodyRenderer,
|
|
5661
5632
|
ViewControl,
|
|
5662
|
-
ViewControlTypes
|
|
5663
|
-
getWidget,
|
|
5664
|
-
registerWidgets
|
|
5633
|
+
ViewControlTypes
|
|
5665
5634
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -7,21 +7,6 @@ import {
|
|
|
7
7
|
buttonClasses
|
|
8
8
|
} from "./chunk-3IDT4246.mjs";
|
|
9
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
|
-
}
|
|
24
|
-
|
|
25
10
|
// src/components/controls/view/ViewControl.tsx
|
|
26
11
|
import React9 from "react";
|
|
27
12
|
|
|
@@ -3308,7 +3293,7 @@ var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
|
3308
3293
|
|
|
3309
3294
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3310
3295
|
import React38 from "react";
|
|
3311
|
-
import { Fragment as Fragment7, jsx as jsx51
|
|
3296
|
+
import { Fragment as Fragment7, jsx as jsx51 } from "react/jsx-runtime";
|
|
3312
3297
|
var WidgetNode = (props) => {
|
|
3313
3298
|
const getWidgetParameters = () => {
|
|
3314
3299
|
const widgetInputParameters = {
|
|
@@ -3367,34 +3352,22 @@ var WidgetNode = (props) => {
|
|
|
3367
3352
|
if (!widgetCode) {
|
|
3368
3353
|
return /* @__PURE__ */ jsx51(Fragment7, { children: "Invalid widget" });
|
|
3369
3354
|
}
|
|
3370
|
-
const SelectedWidget = getWidget(widgetCode);
|
|
3371
|
-
if (!SelectedWidget) {
|
|
3372
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3373
|
-
console.warn("Widget not found:", widgetCode);
|
|
3374
|
-
}
|
|
3375
|
-
return /* @__PURE__ */ jsxs29(Fragment7, { children: [
|
|
3376
|
-
"Widget not found: ",
|
|
3377
|
-
widgetCode
|
|
3378
|
-
] });
|
|
3379
|
-
}
|
|
3380
3355
|
const widgetParams = getWidgetParameters();
|
|
3381
3356
|
const WidgetRenderer = props.widgetRenderer;
|
|
3382
3357
|
return (
|
|
3383
3358
|
// eslint-disable-next-line react-hooks/static-components
|
|
3384
|
-
/* @__PURE__ */
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
)
|
|
3397
|
-
] })
|
|
3359
|
+
/* @__PURE__ */ jsx51(React38.Fragment, { children: /* @__PURE__ */ jsx51(
|
|
3360
|
+
WidgetRenderer,
|
|
3361
|
+
{
|
|
3362
|
+
params: widgetParams,
|
|
3363
|
+
query: props.query,
|
|
3364
|
+
session: props.session,
|
|
3365
|
+
host: props.host,
|
|
3366
|
+
path: props.path,
|
|
3367
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
3368
|
+
widgetCode
|
|
3369
|
+
}
|
|
3370
|
+
) })
|
|
3398
3371
|
);
|
|
3399
3372
|
};
|
|
3400
3373
|
var WidgetNode_default = WidgetNode;
|
|
@@ -3434,7 +3407,7 @@ var InputControlNode = (props) => {
|
|
|
3434
3407
|
var InputControlNode_default = InputControlNode;
|
|
3435
3408
|
|
|
3436
3409
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3437
|
-
import { jsx as jsx53, jsxs as
|
|
3410
|
+
import { jsx as jsx53, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3438
3411
|
var FormContainerNode = (props) => {
|
|
3439
3412
|
const NodeTypes2 = {
|
|
3440
3413
|
["input-control"]: InputControlNode_default
|
|
@@ -3464,7 +3437,7 @@ var FormContainerNode = (props) => {
|
|
|
3464
3437
|
};
|
|
3465
3438
|
fetchInitialData();
|
|
3466
3439
|
}, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
|
|
3467
|
-
return /* @__PURE__ */
|
|
3440
|
+
return /* @__PURE__ */ jsxs29("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
3468
3441
|
node.children && node.children.map((node2, index) => {
|
|
3469
3442
|
{
|
|
3470
3443
|
}
|
|
@@ -3507,7 +3480,7 @@ var EmbedNode_default = EmbedNode;
|
|
|
3507
3480
|
|
|
3508
3481
|
// src/components/Slider.tsx
|
|
3509
3482
|
import React40, { useState as useState6, useEffect as useEffect8, Children, cloneElement } from "react";
|
|
3510
|
-
import { Fragment as Fragment8, jsx as jsx55, jsxs as
|
|
3483
|
+
import { Fragment as Fragment8, jsx as jsx55, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3511
3484
|
var Slider = ({
|
|
3512
3485
|
children,
|
|
3513
3486
|
slidesToShow = 4,
|
|
@@ -3627,7 +3600,7 @@ var Slider = ({
|
|
|
3627
3600
|
return "bottom-4";
|
|
3628
3601
|
}
|
|
3629
3602
|
};
|
|
3630
|
-
return /* @__PURE__ */
|
|
3603
|
+
return /* @__PURE__ */ jsxs30(
|
|
3631
3604
|
"div",
|
|
3632
3605
|
{
|
|
3633
3606
|
className: `relative w-full overflow-hidden ${className}`,
|
|
@@ -3645,7 +3618,7 @@ var Slider = ({
|
|
|
3645
3618
|
children: slides
|
|
3646
3619
|
}
|
|
3647
3620
|
),
|
|
3648
|
-
show_arrows && /* @__PURE__ */
|
|
3621
|
+
show_arrows && /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
3649
3622
|
/* @__PURE__ */ jsx55(
|
|
3650
3623
|
ArrowButton,
|
|
3651
3624
|
{
|
|
@@ -3656,7 +3629,7 @@ var Slider = ({
|
|
|
3656
3629
|
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" }) })
|
|
3657
3630
|
}
|
|
3658
3631
|
),
|
|
3659
|
-
/* @__PURE__ */
|
|
3632
|
+
/* @__PURE__ */ jsxs30(
|
|
3660
3633
|
ArrowButton,
|
|
3661
3634
|
{
|
|
3662
3635
|
direction: "right",
|
|
@@ -3805,7 +3778,7 @@ var ProgressPill = ({
|
|
|
3805
3778
|
}
|
|
3806
3779
|
return null;
|
|
3807
3780
|
};
|
|
3808
|
-
return /* @__PURE__ */
|
|
3781
|
+
return /* @__PURE__ */ jsxs30(
|
|
3809
3782
|
"button",
|
|
3810
3783
|
{
|
|
3811
3784
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -3981,9 +3954,9 @@ var PathUtility = class {
|
|
|
3981
3954
|
var PathUtility_default = new PathUtility();
|
|
3982
3955
|
|
|
3983
3956
|
// src/components/NoDataFound.tsx
|
|
3984
|
-
import { jsx as jsx56, jsxs as
|
|
3957
|
+
import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3985
3958
|
var NoDataFound = () => {
|
|
3986
|
-
return /* @__PURE__ */
|
|
3959
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
3987
3960
|
/* @__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(
|
|
3988
3961
|
"svg",
|
|
3989
3962
|
{
|
|
@@ -4011,7 +3984,7 @@ var NoDataFound_default = NoDataFound;
|
|
|
4011
3984
|
|
|
4012
3985
|
// src/components/Pagination.tsx
|
|
4013
3986
|
import { useMemo } from "react";
|
|
4014
|
-
import { jsx as jsx57, jsxs as
|
|
3987
|
+
import { jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4015
3988
|
var Pagination = (props) => {
|
|
4016
3989
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4017
3990
|
const builder = useMemo(() => {
|
|
@@ -4082,11 +4055,11 @@ var Pagination = (props) => {
|
|
|
4082
4055
|
);
|
|
4083
4056
|
};
|
|
4084
4057
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4085
|
-
return /* @__PURE__ */
|
|
4086
|
-
/* @__PURE__ */
|
|
4087
|
-
/* @__PURE__ */
|
|
4058
|
+
return /* @__PURE__ */ jsxs32("div", { className: "py-6 border-t bg-default", children: [
|
|
4059
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4060
|
+
/* @__PURE__ */ jsxs32("div", { className: "text-sm", children: [
|
|
4088
4061
|
"Showing ",
|
|
4089
|
-
/* @__PURE__ */
|
|
4062
|
+
/* @__PURE__ */ jsxs32("span", { className: "font-semibold", children: [
|
|
4090
4063
|
startItem,
|
|
4091
4064
|
"-",
|
|
4092
4065
|
endItem
|
|
@@ -4096,8 +4069,8 @@ var Pagination = (props) => {
|
|
|
4096
4069
|
/* @__PURE__ */ jsx57("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4097
4070
|
" results"
|
|
4098
4071
|
] }),
|
|
4099
|
-
totalPages > 1 && /* @__PURE__ */
|
|
4100
|
-
/* @__PURE__ */
|
|
4072
|
+
totalPages > 1 && /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-1", children: [
|
|
4073
|
+
/* @__PURE__ */ jsxs32(
|
|
4101
4074
|
NavigationButton,
|
|
4102
4075
|
{
|
|
4103
4076
|
page: activePageNumber - 1,
|
|
@@ -4122,7 +4095,7 @@ var Pagination = (props) => {
|
|
|
4122
4095
|
const page = item;
|
|
4123
4096
|
return /* @__PURE__ */ jsx57(PageButton, { page, children: page }, page);
|
|
4124
4097
|
}),
|
|
4125
|
-
/* @__PURE__ */
|
|
4098
|
+
/* @__PURE__ */ jsxs32(
|
|
4126
4099
|
NavigationButton,
|
|
4127
4100
|
{
|
|
4128
4101
|
page: activePageNumber + 1,
|
|
@@ -4134,7 +4107,7 @@ var Pagination = (props) => {
|
|
|
4134
4107
|
}
|
|
4135
4108
|
)
|
|
4136
4109
|
] }),
|
|
4137
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */
|
|
4110
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-2", children: [
|
|
4138
4111
|
/* @__PURE__ */ jsx57("span", { className: "text-sm", children: "Go to:" }),
|
|
4139
4112
|
/* @__PURE__ */ jsx57("div", { className: "relative", children: /* @__PURE__ */ jsx57(
|
|
4140
4113
|
"input",
|
|
@@ -4157,7 +4130,7 @@ var Pagination = (props) => {
|
|
|
4157
4130
|
) })
|
|
4158
4131
|
] })
|
|
4159
4132
|
] }),
|
|
4160
|
-
showPageSizeSelector && /* @__PURE__ */ jsx57("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */
|
|
4133
|
+
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: [
|
|
4161
4134
|
/* @__PURE__ */ jsx57("span", { className: "text-sm", children: "Show:" }),
|
|
4162
4135
|
/* @__PURE__ */ jsx57("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx57(
|
|
4163
4136
|
Hyperlink,
|
|
@@ -4271,7 +4244,7 @@ var ImageGalleryNode_default = ImageGalleryNode;
|
|
|
4271
4244
|
|
|
4272
4245
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4273
4246
|
import Link2 from "next/link";
|
|
4274
|
-
import { jsx as jsx59, jsxs as
|
|
4247
|
+
import { jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4275
4248
|
function toCamelCase(str) {
|
|
4276
4249
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4277
4250
|
}
|
|
@@ -4595,7 +4568,7 @@ var DivContainer = async (props) => {
|
|
|
4595
4568
|
props.node.autoFormat && "auto-format",
|
|
4596
4569
|
props.node.bgClass
|
|
4597
4570
|
].filter(Boolean).join(" ");
|
|
4598
|
-
return /* @__PURE__ */
|
|
4571
|
+
return /* @__PURE__ */ jsxs33(React42.Fragment, { children: [
|
|
4599
4572
|
/* @__PURE__ */ jsx59("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4600
4573
|
/* @__PURE__ */ jsx59(React42.Fragment, { children: /* @__PURE__ */ jsx59(
|
|
4601
4574
|
Wrapper,
|
|
@@ -4690,7 +4663,5 @@ export {
|
|
|
4690
4663
|
InputControlType_default as InputControlType,
|
|
4691
4664
|
PageBodyRenderer_default as PageBodyRenderer,
|
|
4692
4665
|
ViewControl_default as ViewControl,
|
|
4693
|
-
ViewControlTypes_default as ViewControlTypes
|
|
4694
|
-
getWidget,
|
|
4695
|
-
registerWidgets
|
|
4666
|
+
ViewControlTypes_default as ViewControlTypes
|
|
4696
4667
|
};
|
package/package.json
CHANGED