@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260625120809 → 0.8.1-dev.20260627090429
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 +30 -32
- package/dist/index.mjs +37 -39
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5382,7 +5382,8 @@ var deviceToMediaQuery = (device) => {
|
|
|
5382
5382
|
};
|
|
5383
5383
|
var DEVICE_ORDER = ["sm", "md", "lg", "tv"];
|
|
5384
5384
|
var parseMaybeNumber = (value) => {
|
|
5385
|
-
if (typeof value === "number")
|
|
5385
|
+
if (typeof value === "number")
|
|
5386
|
+
return Number.isFinite(value) ? value : void 0;
|
|
5386
5387
|
if (typeof value !== "string") return void 0;
|
|
5387
5388
|
const n = Number(value);
|
|
5388
5389
|
return Number.isFinite(n) ? n : void 0;
|
|
@@ -5421,25 +5422,16 @@ var getNestedValue3 = (obj, path) => {
|
|
|
5421
5422
|
if (!obj || !path) {
|
|
5422
5423
|
return void 0;
|
|
5423
5424
|
}
|
|
5424
|
-
return path.split(".").reduce(
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
},
|
|
5428
|
-
obj
|
|
5429
|
-
);
|
|
5425
|
+
return path.split(".").reduce((current, key) => {
|
|
5426
|
+
return current?.[key];
|
|
5427
|
+
}, obj);
|
|
5430
5428
|
};
|
|
5431
5429
|
var ImageGalleryNode = (props) => {
|
|
5432
5430
|
const resolveImageUrl = (image) => {
|
|
5433
5431
|
let imageUrl = image.imageUrl;
|
|
5434
5432
|
if (image.datafield && props.dataitem) {
|
|
5435
|
-
const fieldValue = getNestedValue3(
|
|
5436
|
-
|
|
5437
|
-
image.datafield
|
|
5438
|
-
);
|
|
5439
|
-
const resolvedAsset = resolveAssetUrl(
|
|
5440
|
-
fieldValue,
|
|
5441
|
-
image.tag
|
|
5442
|
-
);
|
|
5433
|
+
const fieldValue = getNestedValue3(props.dataitem, image.datafield);
|
|
5434
|
+
const resolvedAsset = resolveAssetUrl(fieldValue, image.tag);
|
|
5443
5435
|
if (resolvedAsset) {
|
|
5444
5436
|
imageUrl = resolvedAsset;
|
|
5445
5437
|
}
|
|
@@ -5473,7 +5465,13 @@ var ImageGalleryNode = (props) => {
|
|
|
5473
5465
|
if (!src) return [];
|
|
5474
5466
|
const media = deviceToMediaQuery(img.device);
|
|
5475
5467
|
const posterUrl = resolvePosterUrl(img.posterUrl);
|
|
5476
|
-
return [
|
|
5468
|
+
return [
|
|
5469
|
+
{
|
|
5470
|
+
src,
|
|
5471
|
+
...media ? { media } : {},
|
|
5472
|
+
...posterUrl ? { posterUrl } : {}
|
|
5473
|
+
}
|
|
5474
|
+
];
|
|
5477
5475
|
}),
|
|
5478
5476
|
...hlsImages.filter((img) => !img.device).map((img) => {
|
|
5479
5477
|
const src = resolveImageUrl(img);
|
|
@@ -5487,7 +5485,8 @@ var ImageGalleryNode = (props) => {
|
|
|
5487
5485
|
const hlsStyles = {};
|
|
5488
5486
|
if (primaryHls?.height) hlsStyles.height = primaryHls.height;
|
|
5489
5487
|
if (primaryHls?.width) hlsStyles.width = primaryHls.width;
|
|
5490
|
-
if (primaryHls?.borderRadius)
|
|
5488
|
+
if (primaryHls?.borderRadius)
|
|
5489
|
+
hlsStyles.borderRadius = primaryHls.borderRadius;
|
|
5491
5490
|
const staticSources = staticImages.filter((img) => !!img.device);
|
|
5492
5491
|
const staticFallback = staticImages.find((img) => !img.device) ?? null;
|
|
5493
5492
|
const FormatClass = {
|
|
@@ -5541,13 +5540,10 @@ var ImageGalleryNode = (props) => {
|
|
|
5541
5540
|
if (!imageUrl) {
|
|
5542
5541
|
return null;
|
|
5543
5542
|
}
|
|
5544
|
-
const styles = {
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
}
|
|
5548
|
-
if (img.width) {
|
|
5549
|
-
styles.width = img.width;
|
|
5550
|
-
}
|
|
5543
|
+
const styles = {
|
|
5544
|
+
width: img.width || "auto",
|
|
5545
|
+
height: img.height || "auto"
|
|
5546
|
+
};
|
|
5551
5547
|
if (img.borderRadius) {
|
|
5552
5548
|
styles.borderRadius = img.borderRadius;
|
|
5553
5549
|
}
|
|
@@ -5571,13 +5567,10 @@ var ImageGalleryNode = (props) => {
|
|
|
5571
5567
|
if (!imageUrl) {
|
|
5572
5568
|
return null;
|
|
5573
5569
|
}
|
|
5574
|
-
const styles = {
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
}
|
|
5578
|
-
if (img.width) {
|
|
5579
|
-
styles.width = img.width;
|
|
5580
|
-
}
|
|
5570
|
+
const styles = {
|
|
5571
|
+
width: img.width || "auto",
|
|
5572
|
+
height: img.height || "auto"
|
|
5573
|
+
};
|
|
5581
5574
|
if (img.borderRadius) {
|
|
5582
5575
|
styles.borderRadius = img.borderRadius;
|
|
5583
5576
|
}
|
|
@@ -6040,7 +6033,12 @@ var DocumentNode = (props) => {
|
|
|
6040
6033
|
documents = [docData];
|
|
6041
6034
|
}
|
|
6042
6035
|
}
|
|
6043
|
-
if (documents.length === 0)
|
|
6036
|
+
if (documents.length === 0) {
|
|
6037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_jsx_runtime70.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "py-4 px-2 bg-neutral-soft gap-4 border rounded", children: [
|
|
6038
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "text-sm font-medium", children: "\u{1F4C4} No documents found" }),
|
|
6039
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "text-xs", children: "Kindly Check Later" })
|
|
6040
|
+
] }) });
|
|
6041
|
+
}
|
|
6044
6042
|
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "", children: documents.map((doc, index) => {
|
|
6045
6043
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
6046
6044
|
props.assetBaseUrl,
|
package/dist/index.mjs
CHANGED
|
@@ -3776,7 +3776,8 @@ var deviceToMediaQuery = (device) => {
|
|
|
3776
3776
|
};
|
|
3777
3777
|
var DEVICE_ORDER = ["sm", "md", "lg", "tv"];
|
|
3778
3778
|
var parseMaybeNumber = (value) => {
|
|
3779
|
-
if (typeof value === "number")
|
|
3779
|
+
if (typeof value === "number")
|
|
3780
|
+
return Number.isFinite(value) ? value : void 0;
|
|
3780
3781
|
if (typeof value !== "string") return void 0;
|
|
3781
3782
|
const n = Number(value);
|
|
3782
3783
|
return Number.isFinite(n) ? n : void 0;
|
|
@@ -3815,25 +3816,16 @@ var getNestedValue3 = (obj, path) => {
|
|
|
3815
3816
|
if (!obj || !path) {
|
|
3816
3817
|
return void 0;
|
|
3817
3818
|
}
|
|
3818
|
-
return path.split(".").reduce(
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
},
|
|
3822
|
-
obj
|
|
3823
|
-
);
|
|
3819
|
+
return path.split(".").reduce((current, key) => {
|
|
3820
|
+
return current?.[key];
|
|
3821
|
+
}, obj);
|
|
3824
3822
|
};
|
|
3825
3823
|
var ImageGalleryNode = (props) => {
|
|
3826
3824
|
const resolveImageUrl = (image) => {
|
|
3827
3825
|
let imageUrl = image.imageUrl;
|
|
3828
3826
|
if (image.datafield && props.dataitem) {
|
|
3829
|
-
const fieldValue = getNestedValue3(
|
|
3830
|
-
|
|
3831
|
-
image.datafield
|
|
3832
|
-
);
|
|
3833
|
-
const resolvedAsset = resolveAssetUrl(
|
|
3834
|
-
fieldValue,
|
|
3835
|
-
image.tag
|
|
3836
|
-
);
|
|
3827
|
+
const fieldValue = getNestedValue3(props.dataitem, image.datafield);
|
|
3828
|
+
const resolvedAsset = resolveAssetUrl(fieldValue, image.tag);
|
|
3837
3829
|
if (resolvedAsset) {
|
|
3838
3830
|
imageUrl = resolvedAsset;
|
|
3839
3831
|
}
|
|
@@ -3867,7 +3859,13 @@ var ImageGalleryNode = (props) => {
|
|
|
3867
3859
|
if (!src) return [];
|
|
3868
3860
|
const media = deviceToMediaQuery(img.device);
|
|
3869
3861
|
const posterUrl = resolvePosterUrl(img.posterUrl);
|
|
3870
|
-
return [
|
|
3862
|
+
return [
|
|
3863
|
+
{
|
|
3864
|
+
src,
|
|
3865
|
+
...media ? { media } : {},
|
|
3866
|
+
...posterUrl ? { posterUrl } : {}
|
|
3867
|
+
}
|
|
3868
|
+
];
|
|
3871
3869
|
}),
|
|
3872
3870
|
...hlsImages.filter((img) => !img.device).map((img) => {
|
|
3873
3871
|
const src = resolveImageUrl(img);
|
|
@@ -3881,7 +3879,8 @@ var ImageGalleryNode = (props) => {
|
|
|
3881
3879
|
const hlsStyles = {};
|
|
3882
3880
|
if (primaryHls?.height) hlsStyles.height = primaryHls.height;
|
|
3883
3881
|
if (primaryHls?.width) hlsStyles.width = primaryHls.width;
|
|
3884
|
-
if (primaryHls?.borderRadius)
|
|
3882
|
+
if (primaryHls?.borderRadius)
|
|
3883
|
+
hlsStyles.borderRadius = primaryHls.borderRadius;
|
|
3885
3884
|
const staticSources = staticImages.filter((img) => !!img.device);
|
|
3886
3885
|
const staticFallback = staticImages.find((img) => !img.device) ?? null;
|
|
3887
3886
|
const FormatClass = {
|
|
@@ -3935,13 +3934,10 @@ var ImageGalleryNode = (props) => {
|
|
|
3935
3934
|
if (!imageUrl) {
|
|
3936
3935
|
return null;
|
|
3937
3936
|
}
|
|
3938
|
-
const styles = {
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
}
|
|
3942
|
-
if (img.width) {
|
|
3943
|
-
styles.width = img.width;
|
|
3944
|
-
}
|
|
3937
|
+
const styles = {
|
|
3938
|
+
width: img.width || "auto",
|
|
3939
|
+
height: img.height || "auto"
|
|
3940
|
+
};
|
|
3945
3941
|
if (img.borderRadius) {
|
|
3946
3942
|
styles.borderRadius = img.borderRadius;
|
|
3947
3943
|
}
|
|
@@ -3965,13 +3961,10 @@ var ImageGalleryNode = (props) => {
|
|
|
3965
3961
|
if (!imageUrl) {
|
|
3966
3962
|
return null;
|
|
3967
3963
|
}
|
|
3968
|
-
const styles = {
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
}
|
|
3972
|
-
if (img.width) {
|
|
3973
|
-
styles.width = img.width;
|
|
3974
|
-
}
|
|
3964
|
+
const styles = {
|
|
3965
|
+
width: img.width || "auto",
|
|
3966
|
+
height: img.height || "auto"
|
|
3967
|
+
};
|
|
3975
3968
|
if (img.borderRadius) {
|
|
3976
3969
|
styles.borderRadius = img.borderRadius;
|
|
3977
3970
|
}
|
|
@@ -4083,7 +4076,7 @@ var validateRoleVisibility = (roleCode, oAuthToken) => {
|
|
|
4083
4076
|
};
|
|
4084
4077
|
|
|
4085
4078
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
4086
|
-
import { jsx as jsx59, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4079
|
+
import { Fragment as Fragment9, jsx as jsx59, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4087
4080
|
var getNestedValue4 = (obj, path) => {
|
|
4088
4081
|
if (!obj || !path) return void 0;
|
|
4089
4082
|
return path.split(".").reduce((current, key) => {
|
|
@@ -4434,7 +4427,12 @@ var DocumentNode = (props) => {
|
|
|
4434
4427
|
documents = [docData];
|
|
4435
4428
|
}
|
|
4436
4429
|
}
|
|
4437
|
-
if (documents.length === 0)
|
|
4430
|
+
if (documents.length === 0) {
|
|
4431
|
+
return /* @__PURE__ */ jsx59(Fragment9, { children: /* @__PURE__ */ jsxs32("div", { className: "py-4 px-2 bg-neutral-soft gap-4 border rounded", children: [
|
|
4432
|
+
/* @__PURE__ */ jsx59("p", { className: "text-sm font-medium", children: "\u{1F4C4} No documents found" }),
|
|
4433
|
+
/* @__PURE__ */ jsx59("p", { className: "text-xs", children: "Kindly Check Later" })
|
|
4434
|
+
] }) });
|
|
4435
|
+
}
|
|
4438
4436
|
return /* @__PURE__ */ jsx59("div", { className: "", children: documents.map((doc, index) => {
|
|
4439
4437
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
4440
4438
|
props.assetBaseUrl,
|
|
@@ -5012,7 +5010,7 @@ var PageBodyRenderer_default = PageBodyRenderer;
|
|
|
5012
5010
|
|
|
5013
5011
|
// src/components/Toast.tsx
|
|
5014
5012
|
import { useState as useState8 } from "react";
|
|
5015
|
-
import { Fragment as
|
|
5013
|
+
import { Fragment as Fragment10, jsx as jsx62, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5016
5014
|
var Toast = () => {
|
|
5017
5015
|
const [showToast, setShowToast] = useState8(false);
|
|
5018
5016
|
const [message, setMessage] = useState8("");
|
|
@@ -5055,7 +5053,7 @@ var Toast = () => {
|
|
|
5055
5053
|
const closeToast = () => {
|
|
5056
5054
|
setShowToast(false);
|
|
5057
5055
|
};
|
|
5058
|
-
return /* @__PURE__ */ jsx62(
|
|
5056
|
+
return /* @__PURE__ */ jsx62(Fragment10, { children: showToast && /* @__PURE__ */ jsx62("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: [
|
|
5059
5057
|
/* @__PURE__ */ jsx62(
|
|
5060
5058
|
"span",
|
|
5061
5059
|
{
|
|
@@ -5175,7 +5173,7 @@ var ContentView = (props) => {
|
|
|
5175
5173
|
var ContentView_default = ContentView;
|
|
5176
5174
|
|
|
5177
5175
|
// src/components/dataForm/DataList.tsx
|
|
5178
|
-
import { Fragment as
|
|
5176
|
+
import { Fragment as Fragment11, jsx as jsx66, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
5179
5177
|
var DataList = (props) => {
|
|
5180
5178
|
const router = useRouter();
|
|
5181
5179
|
let builder = new OdataBuilder(props.path);
|
|
@@ -5305,7 +5303,7 @@ var DataList = (props) => {
|
|
|
5305
5303
|
const showFirstPages = activePageNumber <= 5;
|
|
5306
5304
|
const showLastPages = activePageNumber > pages - 5;
|
|
5307
5305
|
if (showFirstPages) {
|
|
5308
|
-
return /* @__PURE__ */ jsxs36(
|
|
5306
|
+
return /* @__PURE__ */ jsxs36(Fragment11, { children: [
|
|
5309
5307
|
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx66(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx66(
|
|
5310
5308
|
Hyperlink,
|
|
5311
5309
|
{
|
|
@@ -5353,7 +5351,7 @@ var DataList = (props) => {
|
|
|
5353
5351
|
) })
|
|
5354
5352
|
] });
|
|
5355
5353
|
} else if (showLastPages) {
|
|
5356
|
-
return /* @__PURE__ */ jsxs36(
|
|
5354
|
+
return /* @__PURE__ */ jsxs36(Fragment11, { children: [
|
|
5357
5355
|
/* @__PURE__ */ jsx66(
|
|
5358
5356
|
Hyperlink,
|
|
5359
5357
|
{
|
|
@@ -5383,7 +5381,7 @@ var DataList = (props) => {
|
|
|
5383
5381
|
)
|
|
5384
5382
|
] });
|
|
5385
5383
|
} else {
|
|
5386
|
-
return /* @__PURE__ */ jsxs36(
|
|
5384
|
+
return /* @__PURE__ */ jsxs36(Fragment11, { children: [
|
|
5387
5385
|
/* @__PURE__ */ jsx66(
|
|
5388
5386
|
Hyperlink,
|
|
5389
5387
|
{
|
package/package.json
CHANGED