@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260616060453 → 0.8.1-dev.20260616091934
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 +85 -26
- package/dist/index.mjs +79 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1266,7 +1266,7 @@ var init_LinkNodeButton = __esm({
|
|
|
1266
1266
|
const fieldNames = extractFieldNames(template);
|
|
1267
1267
|
if (responseData) {
|
|
1268
1268
|
fieldNames.forEach((fieldName) => {
|
|
1269
|
-
const value =
|
|
1269
|
+
const value = getNestedValue5(responseData, fieldName);
|
|
1270
1270
|
if (value !== void 0) {
|
|
1271
1271
|
const regex1 = new RegExp(`\\{${fieldName}\\}`, "g");
|
|
1272
1272
|
const regex2 = new RegExp(`\\{\\{${fieldName}\\}\\}`, "g");
|
|
@@ -1289,7 +1289,7 @@ var init_LinkNodeButton = __esm({
|
|
|
1289
1289
|
}
|
|
1290
1290
|
return result;
|
|
1291
1291
|
}, [props.routeParameters, dataitem, extractFieldNames]);
|
|
1292
|
-
const
|
|
1292
|
+
const getNestedValue5 = (0, import_react35.useCallback)((obj, path) => {
|
|
1293
1293
|
if (!obj || !path) return void 0;
|
|
1294
1294
|
if (obj[path] !== void 0) {
|
|
1295
1295
|
return obj[path];
|
|
@@ -1339,15 +1339,15 @@ var init_LinkNodeButton = __esm({
|
|
|
1339
1339
|
console.log("Field names in redirect URL:", fieldNames);
|
|
1340
1340
|
const fieldValueMap = {};
|
|
1341
1341
|
fieldNames.forEach((fieldName) => {
|
|
1342
|
-
const value =
|
|
1342
|
+
const value = getNestedValue5(response, fieldName);
|
|
1343
1343
|
if (value !== void 0) {
|
|
1344
1344
|
fieldValueMap[fieldName] = String(value);
|
|
1345
1345
|
} else {
|
|
1346
|
-
const resultValue =
|
|
1346
|
+
const resultValue = getNestedValue5(response, `result.${fieldName}`);
|
|
1347
1347
|
if (resultValue !== void 0) {
|
|
1348
1348
|
fieldValueMap[fieldName] = String(resultValue);
|
|
1349
1349
|
} else {
|
|
1350
|
-
const dataValue =
|
|
1350
|
+
const dataValue = getNestedValue5(response, `data.${fieldName}`);
|
|
1351
1351
|
if (dataValue !== void 0) {
|
|
1352
1352
|
fieldValueMap[fieldName] = String(dataValue);
|
|
1353
1353
|
}
|
|
@@ -1385,7 +1385,7 @@ var init_LinkNodeButton = __esm({
|
|
|
1385
1385
|
setIsLoading(false);
|
|
1386
1386
|
return { isSuccessful: false, message: err.message };
|
|
1387
1387
|
}
|
|
1388
|
-
}, [node.postUrl, node.payload, node.redirectUrl, replaceTemplateVariables, extractFieldNames,
|
|
1388
|
+
}, [node.postUrl, node.payload, node.redirectUrl, replaceTemplateVariables, extractFieldNames, getNestedValue5, props.apiBaseUrl, props.session]);
|
|
1389
1389
|
const renderButtonContent = () => {
|
|
1390
1390
|
if (children) {
|
|
1391
1391
|
return children;
|
|
@@ -2852,7 +2852,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
2852
2852
|
const containerRef = (0, import_react29.useRef)(null);
|
|
2853
2853
|
const [isCreateOpen, setIsCreateOpen] = (0, import_react29.useState)(false);
|
|
2854
2854
|
const [formData, setFormData] = (0, import_react29.useState)({});
|
|
2855
|
-
const
|
|
2855
|
+
const getNestedValue5 = (obj, path) => {
|
|
2856
2856
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
2857
2857
|
};
|
|
2858
2858
|
(0, import_react29.useEffect)(() => {
|
|
@@ -2890,7 +2890,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
2890
2890
|
props.dataSourceDependsOn
|
|
2891
2891
|
]);
|
|
2892
2892
|
const filteredItems = list?.filter((item) => {
|
|
2893
|
-
const value =
|
|
2893
|
+
const value = getNestedValue5(item, props.dataTextFieldName);
|
|
2894
2894
|
return value?.toLowerCase().includes(searchTerm?.toLowerCase());
|
|
2895
2895
|
});
|
|
2896
2896
|
const playBeep = () => {
|
|
@@ -2921,7 +2921,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
2921
2921
|
}, [searchTerm]);
|
|
2922
2922
|
const handleSelect = (event, item) => {
|
|
2923
2923
|
event.preventDefault();
|
|
2924
|
-
setSearchTerm(
|
|
2924
|
+
setSearchTerm(getNestedValue5(item, props.dataTextFieldName));
|
|
2925
2925
|
if (props.callback) {
|
|
2926
2926
|
const val = {};
|
|
2927
2927
|
props.callback({
|
|
@@ -3076,7 +3076,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
3076
3076
|
role: "option",
|
|
3077
3077
|
tabIndex: -1,
|
|
3078
3078
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
3079
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children:
|
|
3079
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: getNestedValue5(item, props.dataTextFieldName) })
|
|
3080
3080
|
}
|
|
3081
3081
|
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
3082
3082
|
}
|
|
@@ -5365,10 +5365,69 @@ var parseMaybeNumber = (value) => {
|
|
|
5365
5365
|
const n = Number(value);
|
|
5366
5366
|
return Number.isFinite(n) ? n : void 0;
|
|
5367
5367
|
};
|
|
5368
|
+
function resolveAssetUrl(fieldValue, tag) {
|
|
5369
|
+
if (!fieldValue) {
|
|
5370
|
+
return void 0;
|
|
5371
|
+
}
|
|
5372
|
+
if (typeof fieldValue === "string") {
|
|
5373
|
+
const trimmed = fieldValue.trim();
|
|
5374
|
+
if (trimmed.startsWith("itemassets/") || trimmed.startsWith("/itemassets/") || trimmed.startsWith("http")) {
|
|
5375
|
+
return trimmed;
|
|
5376
|
+
}
|
|
5377
|
+
try {
|
|
5378
|
+
const parsed = JSON.parse(trimmed);
|
|
5379
|
+
return resolveAssetUrl(parsed, tag);
|
|
5380
|
+
} catch {
|
|
5381
|
+
return void 0;
|
|
5382
|
+
}
|
|
5383
|
+
}
|
|
5384
|
+
if (Array.isArray(fieldValue)) {
|
|
5385
|
+
const asset = tag ? fieldValue.find(
|
|
5386
|
+
(x) => x?.tag?.toLowerCase() === tag?.toLowerCase()
|
|
5387
|
+
) : fieldValue[0];
|
|
5388
|
+
return asset?.assetUrl;
|
|
5389
|
+
}
|
|
5390
|
+
if (typeof fieldValue === "object" && fieldValue !== null) {
|
|
5391
|
+
const assetObject = fieldValue;
|
|
5392
|
+
if (assetObject.assetUrl) {
|
|
5393
|
+
return assetObject.assetUrl;
|
|
5394
|
+
}
|
|
5395
|
+
}
|
|
5396
|
+
return void 0;
|
|
5397
|
+
}
|
|
5398
|
+
var getNestedValue3 = (obj, path) => {
|
|
5399
|
+
if (!obj || !path) {
|
|
5400
|
+
return void 0;
|
|
5401
|
+
}
|
|
5402
|
+
return path.split(".").reduce(
|
|
5403
|
+
(current, key) => {
|
|
5404
|
+
return current?.[key];
|
|
5405
|
+
},
|
|
5406
|
+
obj
|
|
5407
|
+
);
|
|
5408
|
+
};
|
|
5368
5409
|
var ImageGalleryNode = (props) => {
|
|
5369
|
-
const resolveImageUrl = (
|
|
5370
|
-
|
|
5371
|
-
if (
|
|
5410
|
+
const resolveImageUrl = (image) => {
|
|
5411
|
+
let imageUrl = image.imageUrl;
|
|
5412
|
+
if (image.datafield && props.dataitem) {
|
|
5413
|
+
const fieldValue = getNestedValue3(
|
|
5414
|
+
props.dataitem,
|
|
5415
|
+
image.datafield
|
|
5416
|
+
);
|
|
5417
|
+
const resolvedAsset = resolveAssetUrl(
|
|
5418
|
+
fieldValue,
|
|
5419
|
+
image.tag
|
|
5420
|
+
);
|
|
5421
|
+
if (resolvedAsset) {
|
|
5422
|
+
imageUrl = resolvedAsset;
|
|
5423
|
+
}
|
|
5424
|
+
}
|
|
5425
|
+
if (!imageUrl) {
|
|
5426
|
+
return "";
|
|
5427
|
+
}
|
|
5428
|
+
if (imageUrl.startsWith("http")) {
|
|
5429
|
+
return imageUrl;
|
|
5430
|
+
}
|
|
5372
5431
|
const base = props.assetBaseUrl.replace(/\/$/, "");
|
|
5373
5432
|
const path = imageUrl.replace(/^\//, "");
|
|
5374
5433
|
return `${base}/${path}`;
|
|
@@ -5379,23 +5438,23 @@ var ImageGalleryNode = (props) => {
|
|
|
5379
5438
|
};
|
|
5380
5439
|
const rawImages = Array.isArray(props.node.images) ? props.node.images : [];
|
|
5381
5440
|
const hlsImages = rawImages.filter(
|
|
5382
|
-
(img) => resolveImageUrl(img
|
|
5441
|
+
(img) => resolveImageUrl(img).endsWith(".m3u8")
|
|
5383
5442
|
);
|
|
5384
5443
|
const staticImages = rawImages.filter(
|
|
5385
|
-
(img) => !resolveImageUrl(img
|
|
5444
|
+
(img) => !resolveImageUrl(img).endsWith(".m3u8")
|
|
5386
5445
|
);
|
|
5387
5446
|
const hlsSources = [
|
|
5388
5447
|
...DEVICE_ORDER.flatMap((deviceKey) => {
|
|
5389
5448
|
const img = hlsImages.find((i) => i.device === deviceKey);
|
|
5390
5449
|
if (!img) return [];
|
|
5391
|
-
const src = resolveImageUrl(img
|
|
5450
|
+
const src = resolveImageUrl(img);
|
|
5392
5451
|
if (!src) return [];
|
|
5393
5452
|
const media = deviceToMediaQuery(img.device);
|
|
5394
5453
|
const posterUrl = resolvePosterUrl(img.posterUrl);
|
|
5395
5454
|
return [{ src, ...media ? { media } : {}, ...posterUrl ? { posterUrl } : {} }];
|
|
5396
5455
|
}),
|
|
5397
5456
|
...hlsImages.filter((img) => !img.device).map((img) => {
|
|
5398
|
-
const src = resolveImageUrl(img
|
|
5457
|
+
const src = resolveImageUrl(img);
|
|
5399
5458
|
const posterUrl = resolvePosterUrl(img.posterUrl);
|
|
5400
5459
|
return { src, ...posterUrl ? { posterUrl } : {} };
|
|
5401
5460
|
}).filter((s) => !!s.src)
|
|
@@ -5435,7 +5494,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5435
5494
|
DEVICE_ORDER.map((deviceKey) => {
|
|
5436
5495
|
const match = staticSources.find((img) => img.device === deviceKey);
|
|
5437
5496
|
if (!match) return null;
|
|
5438
|
-
const srcUrl = resolveImageUrl(match
|
|
5497
|
+
const srcUrl = resolveImageUrl(match);
|
|
5439
5498
|
if (!srcUrl) return null;
|
|
5440
5499
|
const mediaQuery = deviceToMediaQuery(match.device);
|
|
5441
5500
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
@@ -5451,7 +5510,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5451
5510
|
}),
|
|
5452
5511
|
(() => {
|
|
5453
5512
|
const img = staticFallback;
|
|
5454
|
-
const imageUrl = resolveImageUrl(img
|
|
5513
|
+
const imageUrl = resolveImageUrl(img);
|
|
5455
5514
|
if (!imageUrl) return null;
|
|
5456
5515
|
const intrinsicWidth = parseMaybeNumber(img.intrinsicWidth);
|
|
5457
5516
|
const intrinsicHeight = parseMaybeNumber(img.intrinsicHeight);
|
|
@@ -5497,7 +5556,7 @@ function convertKeysToCamelCase(obj) {
|
|
|
5497
5556
|
])
|
|
5498
5557
|
);
|
|
5499
5558
|
}
|
|
5500
|
-
var
|
|
5559
|
+
var getNestedValue4 = (obj, path) => {
|
|
5501
5560
|
if (!obj || !path) return void 0;
|
|
5502
5561
|
return path.split(".").reduce((current, key) => {
|
|
5503
5562
|
{
|
|
@@ -5505,7 +5564,7 @@ var getNestedValue3 = (obj, path) => {
|
|
|
5505
5564
|
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
5506
5565
|
}, obj);
|
|
5507
5566
|
};
|
|
5508
|
-
function
|
|
5567
|
+
function resolveAssetUrl2(fieldValue, tag) {
|
|
5509
5568
|
if (!fieldValue) {
|
|
5510
5569
|
return void 0;
|
|
5511
5570
|
}
|
|
@@ -5516,7 +5575,7 @@ function resolveAssetUrl(fieldValue, tag) {
|
|
|
5516
5575
|
}
|
|
5517
5576
|
try {
|
|
5518
5577
|
const parsed = JSON.parse(trimmed);
|
|
5519
|
-
return
|
|
5578
|
+
return resolveAssetUrl2(parsed, tag);
|
|
5520
5579
|
} catch {
|
|
5521
5580
|
return void 0;
|
|
5522
5581
|
}
|
|
@@ -5542,11 +5601,11 @@ function generateCompleteBackgroundString(layers, apiBaseUrl, dataItem) {
|
|
|
5542
5601
|
const imageValue = layer.value;
|
|
5543
5602
|
let assetUrl = imageValue.assetUrl || "";
|
|
5544
5603
|
if (layer.datafield && dataItem) {
|
|
5545
|
-
const fieldValue =
|
|
5604
|
+
const fieldValue = getNestedValue4(
|
|
5546
5605
|
dataItem,
|
|
5547
5606
|
layer.datafield
|
|
5548
5607
|
);
|
|
5549
|
-
const resolvedAssetUrl =
|
|
5608
|
+
const resolvedAssetUrl = resolveAssetUrl2(
|
|
5550
5609
|
fieldValue,
|
|
5551
5610
|
layer.tag
|
|
5552
5611
|
);
|
|
@@ -5703,7 +5762,7 @@ var DivContainer = async (props) => {
|
|
|
5703
5762
|
const condition = props.node.fieldVisibleOnTrue;
|
|
5704
5763
|
const isNegated = condition.startsWith("!");
|
|
5705
5764
|
const fieldName = isNegated ? condition.substring(1) : condition;
|
|
5706
|
-
const fieldValue =
|
|
5765
|
+
const fieldValue = getNestedValue4(props.dataitem, fieldName);
|
|
5707
5766
|
if (fieldValue === void 0) {
|
|
5708
5767
|
return false;
|
|
5709
5768
|
}
|
|
@@ -5736,7 +5795,7 @@ var DivContainer = async (props) => {
|
|
|
5736
5795
|
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(NoDataFound_default, {});
|
|
5737
5796
|
}
|
|
5738
5797
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
5739
|
-
childCollectionData =
|
|
5798
|
+
childCollectionData = getNestedValue4(props.dataitem, dataBindingProperties.childCollectionName);
|
|
5740
5799
|
}
|
|
5741
5800
|
}
|
|
5742
5801
|
const cssResult = generateCssString(
|
package/dist/index.mjs
CHANGED
|
@@ -1252,7 +1252,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1252
1252
|
const containerRef = useRef2(null);
|
|
1253
1253
|
const [isCreateOpen, setIsCreateOpen] = useState4(false);
|
|
1254
1254
|
const [formData, setFormData] = useState4({});
|
|
1255
|
-
const
|
|
1255
|
+
const getNestedValue5 = (obj, path) => {
|
|
1256
1256
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
1257
1257
|
};
|
|
1258
1258
|
useEffect5(() => {
|
|
@@ -1290,7 +1290,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1290
1290
|
props.dataSourceDependsOn
|
|
1291
1291
|
]);
|
|
1292
1292
|
const filteredItems = list?.filter((item) => {
|
|
1293
|
-
const value =
|
|
1293
|
+
const value = getNestedValue5(item, props.dataTextFieldName);
|
|
1294
1294
|
return value?.toLowerCase().includes(searchTerm?.toLowerCase());
|
|
1295
1295
|
});
|
|
1296
1296
|
const playBeep = () => {
|
|
@@ -1321,7 +1321,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1321
1321
|
}, [searchTerm]);
|
|
1322
1322
|
const handleSelect = (event, item) => {
|
|
1323
1323
|
event.preventDefault();
|
|
1324
|
-
setSearchTerm(
|
|
1324
|
+
setSearchTerm(getNestedValue5(item, props.dataTextFieldName));
|
|
1325
1325
|
if (props.callback) {
|
|
1326
1326
|
const val = {};
|
|
1327
1327
|
props.callback({
|
|
@@ -1476,7 +1476,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1476
1476
|
role: "option",
|
|
1477
1477
|
tabIndex: -1,
|
|
1478
1478
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1479
|
-
children: /* @__PURE__ */ jsx25("span", { children:
|
|
1479
|
+
children: /* @__PURE__ */ jsx25("span", { children: getNestedValue5(item, props.dataTextFieldName) })
|
|
1480
1480
|
}
|
|
1481
1481
|
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ jsx25("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1482
1482
|
}
|
|
@@ -3759,10 +3759,69 @@ var parseMaybeNumber = (value) => {
|
|
|
3759
3759
|
const n = Number(value);
|
|
3760
3760
|
return Number.isFinite(n) ? n : void 0;
|
|
3761
3761
|
};
|
|
3762
|
+
function resolveAssetUrl(fieldValue, tag) {
|
|
3763
|
+
if (!fieldValue) {
|
|
3764
|
+
return void 0;
|
|
3765
|
+
}
|
|
3766
|
+
if (typeof fieldValue === "string") {
|
|
3767
|
+
const trimmed = fieldValue.trim();
|
|
3768
|
+
if (trimmed.startsWith("itemassets/") || trimmed.startsWith("/itemassets/") || trimmed.startsWith("http")) {
|
|
3769
|
+
return trimmed;
|
|
3770
|
+
}
|
|
3771
|
+
try {
|
|
3772
|
+
const parsed = JSON.parse(trimmed);
|
|
3773
|
+
return resolveAssetUrl(parsed, tag);
|
|
3774
|
+
} catch {
|
|
3775
|
+
return void 0;
|
|
3776
|
+
}
|
|
3777
|
+
}
|
|
3778
|
+
if (Array.isArray(fieldValue)) {
|
|
3779
|
+
const asset = tag ? fieldValue.find(
|
|
3780
|
+
(x) => x?.tag?.toLowerCase() === tag?.toLowerCase()
|
|
3781
|
+
) : fieldValue[0];
|
|
3782
|
+
return asset?.assetUrl;
|
|
3783
|
+
}
|
|
3784
|
+
if (typeof fieldValue === "object" && fieldValue !== null) {
|
|
3785
|
+
const assetObject = fieldValue;
|
|
3786
|
+
if (assetObject.assetUrl) {
|
|
3787
|
+
return assetObject.assetUrl;
|
|
3788
|
+
}
|
|
3789
|
+
}
|
|
3790
|
+
return void 0;
|
|
3791
|
+
}
|
|
3792
|
+
var getNestedValue3 = (obj, path) => {
|
|
3793
|
+
if (!obj || !path) {
|
|
3794
|
+
return void 0;
|
|
3795
|
+
}
|
|
3796
|
+
return path.split(".").reduce(
|
|
3797
|
+
(current, key) => {
|
|
3798
|
+
return current?.[key];
|
|
3799
|
+
},
|
|
3800
|
+
obj
|
|
3801
|
+
);
|
|
3802
|
+
};
|
|
3762
3803
|
var ImageGalleryNode = (props) => {
|
|
3763
|
-
const resolveImageUrl = (
|
|
3764
|
-
|
|
3765
|
-
if (
|
|
3804
|
+
const resolveImageUrl = (image) => {
|
|
3805
|
+
let imageUrl = image.imageUrl;
|
|
3806
|
+
if (image.datafield && props.dataitem) {
|
|
3807
|
+
const fieldValue = getNestedValue3(
|
|
3808
|
+
props.dataitem,
|
|
3809
|
+
image.datafield
|
|
3810
|
+
);
|
|
3811
|
+
const resolvedAsset = resolveAssetUrl(
|
|
3812
|
+
fieldValue,
|
|
3813
|
+
image.tag
|
|
3814
|
+
);
|
|
3815
|
+
if (resolvedAsset) {
|
|
3816
|
+
imageUrl = resolvedAsset;
|
|
3817
|
+
}
|
|
3818
|
+
}
|
|
3819
|
+
if (!imageUrl) {
|
|
3820
|
+
return "";
|
|
3821
|
+
}
|
|
3822
|
+
if (imageUrl.startsWith("http")) {
|
|
3823
|
+
return imageUrl;
|
|
3824
|
+
}
|
|
3766
3825
|
const base = props.assetBaseUrl.replace(/\/$/, "");
|
|
3767
3826
|
const path = imageUrl.replace(/^\//, "");
|
|
3768
3827
|
return `${base}/${path}`;
|
|
@@ -3773,23 +3832,23 @@ var ImageGalleryNode = (props) => {
|
|
|
3773
3832
|
};
|
|
3774
3833
|
const rawImages = Array.isArray(props.node.images) ? props.node.images : [];
|
|
3775
3834
|
const hlsImages = rawImages.filter(
|
|
3776
|
-
(img) => resolveImageUrl(img
|
|
3835
|
+
(img) => resolveImageUrl(img).endsWith(".m3u8")
|
|
3777
3836
|
);
|
|
3778
3837
|
const staticImages = rawImages.filter(
|
|
3779
|
-
(img) => !resolveImageUrl(img
|
|
3838
|
+
(img) => !resolveImageUrl(img).endsWith(".m3u8")
|
|
3780
3839
|
);
|
|
3781
3840
|
const hlsSources = [
|
|
3782
3841
|
...DEVICE_ORDER.flatMap((deviceKey) => {
|
|
3783
3842
|
const img = hlsImages.find((i) => i.device === deviceKey);
|
|
3784
3843
|
if (!img) return [];
|
|
3785
|
-
const src = resolveImageUrl(img
|
|
3844
|
+
const src = resolveImageUrl(img);
|
|
3786
3845
|
if (!src) return [];
|
|
3787
3846
|
const media = deviceToMediaQuery(img.device);
|
|
3788
3847
|
const posterUrl = resolvePosterUrl(img.posterUrl);
|
|
3789
3848
|
return [{ src, ...media ? { media } : {}, ...posterUrl ? { posterUrl } : {} }];
|
|
3790
3849
|
}),
|
|
3791
3850
|
...hlsImages.filter((img) => !img.device).map((img) => {
|
|
3792
|
-
const src = resolveImageUrl(img
|
|
3851
|
+
const src = resolveImageUrl(img);
|
|
3793
3852
|
const posterUrl = resolvePosterUrl(img.posterUrl);
|
|
3794
3853
|
return { src, ...posterUrl ? { posterUrl } : {} };
|
|
3795
3854
|
}).filter((s) => !!s.src)
|
|
@@ -3829,7 +3888,7 @@ var ImageGalleryNode = (props) => {
|
|
|
3829
3888
|
DEVICE_ORDER.map((deviceKey) => {
|
|
3830
3889
|
const match = staticSources.find((img) => img.device === deviceKey);
|
|
3831
3890
|
if (!match) return null;
|
|
3832
|
-
const srcUrl = resolveImageUrl(match
|
|
3891
|
+
const srcUrl = resolveImageUrl(match);
|
|
3833
3892
|
if (!srcUrl) return null;
|
|
3834
3893
|
const mediaQuery = deviceToMediaQuery(match.device);
|
|
3835
3894
|
return /* @__PURE__ */ jsx58(
|
|
@@ -3845,7 +3904,7 @@ var ImageGalleryNode = (props) => {
|
|
|
3845
3904
|
}),
|
|
3846
3905
|
(() => {
|
|
3847
3906
|
const img = staticFallback;
|
|
3848
|
-
const imageUrl = resolveImageUrl(img
|
|
3907
|
+
const imageUrl = resolveImageUrl(img);
|
|
3849
3908
|
if (!imageUrl) return null;
|
|
3850
3909
|
const intrinsicWidth = parseMaybeNumber(img.intrinsicWidth);
|
|
3851
3910
|
const intrinsicHeight = parseMaybeNumber(img.intrinsicHeight);
|
|
@@ -3891,7 +3950,7 @@ function convertKeysToCamelCase(obj) {
|
|
|
3891
3950
|
])
|
|
3892
3951
|
);
|
|
3893
3952
|
}
|
|
3894
|
-
var
|
|
3953
|
+
var getNestedValue4 = (obj, path) => {
|
|
3895
3954
|
if (!obj || !path) return void 0;
|
|
3896
3955
|
return path.split(".").reduce((current, key) => {
|
|
3897
3956
|
{
|
|
@@ -3899,7 +3958,7 @@ var getNestedValue3 = (obj, path) => {
|
|
|
3899
3958
|
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
3900
3959
|
}, obj);
|
|
3901
3960
|
};
|
|
3902
|
-
function
|
|
3961
|
+
function resolveAssetUrl2(fieldValue, tag) {
|
|
3903
3962
|
if (!fieldValue) {
|
|
3904
3963
|
return void 0;
|
|
3905
3964
|
}
|
|
@@ -3910,7 +3969,7 @@ function resolveAssetUrl(fieldValue, tag) {
|
|
|
3910
3969
|
}
|
|
3911
3970
|
try {
|
|
3912
3971
|
const parsed = JSON.parse(trimmed);
|
|
3913
|
-
return
|
|
3972
|
+
return resolveAssetUrl2(parsed, tag);
|
|
3914
3973
|
} catch {
|
|
3915
3974
|
return void 0;
|
|
3916
3975
|
}
|
|
@@ -3936,11 +3995,11 @@ function generateCompleteBackgroundString(layers, apiBaseUrl, dataItem) {
|
|
|
3936
3995
|
const imageValue = layer.value;
|
|
3937
3996
|
let assetUrl = imageValue.assetUrl || "";
|
|
3938
3997
|
if (layer.datafield && dataItem) {
|
|
3939
|
-
const fieldValue =
|
|
3998
|
+
const fieldValue = getNestedValue4(
|
|
3940
3999
|
dataItem,
|
|
3941
4000
|
layer.datafield
|
|
3942
4001
|
);
|
|
3943
|
-
const resolvedAssetUrl =
|
|
4002
|
+
const resolvedAssetUrl = resolveAssetUrl2(
|
|
3944
4003
|
fieldValue,
|
|
3945
4004
|
layer.tag
|
|
3946
4005
|
);
|
|
@@ -4097,7 +4156,7 @@ var DivContainer = async (props) => {
|
|
|
4097
4156
|
const condition = props.node.fieldVisibleOnTrue;
|
|
4098
4157
|
const isNegated = condition.startsWith("!");
|
|
4099
4158
|
const fieldName = isNegated ? condition.substring(1) : condition;
|
|
4100
|
-
const fieldValue =
|
|
4159
|
+
const fieldValue = getNestedValue4(props.dataitem, fieldName);
|
|
4101
4160
|
if (fieldValue === void 0) {
|
|
4102
4161
|
return false;
|
|
4103
4162
|
}
|
|
@@ -4130,7 +4189,7 @@ var DivContainer = async (props) => {
|
|
|
4130
4189
|
return /* @__PURE__ */ jsx59(NoDataFound_default, {});
|
|
4131
4190
|
}
|
|
4132
4191
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
4133
|
-
childCollectionData =
|
|
4192
|
+
childCollectionData = getNestedValue4(props.dataitem, dataBindingProperties.childCollectionName);
|
|
4134
4193
|
}
|
|
4135
4194
|
}
|
|
4136
4195
|
const cssResult = generateCssString(
|
package/package.json
CHANGED