@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260328114717 → 0.8.1-dev.20260402061511
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 +58 -28
- package/dist/index.mjs +58 -28
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5119,15 +5119,18 @@ var HlsPlayer1 = (0, import_dynamic5.default)(() => Promise.resolve().then(() =>
|
|
|
5119
5119
|
ssr: false
|
|
5120
5120
|
});
|
|
5121
5121
|
var parseMaybeNumber = (value) => {
|
|
5122
|
-
if (typeof value === "number")
|
|
5122
|
+
if (typeof value === "number") {
|
|
5123
5123
|
return Number.isFinite(value) ? value : void 0;
|
|
5124
|
+
}
|
|
5124
5125
|
if (typeof value !== "string") return void 0;
|
|
5125
5126
|
const n = Number(value);
|
|
5126
5127
|
return Number.isFinite(n) ? n : void 0;
|
|
5127
5128
|
};
|
|
5128
5129
|
var shouldRenderForDevice = (imageDevice, currentDevice) => {
|
|
5129
5130
|
if (!imageDevice) return true;
|
|
5130
|
-
|
|
5131
|
+
const normalizedImageDevice = imageDevice.toString().toLowerCase();
|
|
5132
|
+
const normalizedCurrentDevice = currentDevice.toString().toLowerCase();
|
|
5133
|
+
return normalizedImageDevice === normalizedCurrentDevice;
|
|
5131
5134
|
};
|
|
5132
5135
|
var ImageGalleryNode = (props) => {
|
|
5133
5136
|
const resolveImageUrl = (imageUrl) => {
|
|
@@ -5163,9 +5166,8 @@ var ImageGalleryNode = (props) => {
|
|
|
5163
5166
|
const alt = img.title || "Gallery image";
|
|
5164
5167
|
const styles = {};
|
|
5165
5168
|
if (img.height) styles.height = img.height;
|
|
5166
|
-
if (img.borderRadius)
|
|
5167
|
-
styles.borderRadius = img.borderRadius;
|
|
5168
5169
|
if (img.width) styles.width = img.width;
|
|
5170
|
+
if (img.borderRadius) styles.borderRadius = img.borderRadius;
|
|
5169
5171
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "max-w-full", children: isHls ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5170
5172
|
HlsPlayer1,
|
|
5171
5173
|
{
|
|
@@ -5193,7 +5195,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5193
5195
|
alt
|
|
5194
5196
|
}
|
|
5195
5197
|
)
|
|
5196
|
-
) }, `${img.imageUrl}
|
|
5198
|
+
) }, `${idx}-${img.imageUrl}`);
|
|
5197
5199
|
}) });
|
|
5198
5200
|
};
|
|
5199
5201
|
var ImageGalleryNode_default = ImageGalleryNode;
|
|
@@ -5251,17 +5253,13 @@ function generateCompleteBackgroundString(layers, apiBaseUrl) {
|
|
|
5251
5253
|
return "";
|
|
5252
5254
|
}).filter((bg) => bg.trim() !== "").join(", ");
|
|
5253
5255
|
}
|
|
5254
|
-
var generateCssString = (guid, stylesObject, mobileStylesObject) => {
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
const gridColumns = stylesObject.gridTemplateColumns ? stylesObject.gridTemplateColumns.match(/\d+/g) : [];
|
|
5258
|
-
const hasGridProperties = gridColumns.length > 0;
|
|
5256
|
+
var generateCssString = (guid, stylesObject, tabletStylesObject, mobileStylesObject) => {
|
|
5257
|
+
const gridColumns = stylesObject?.gridTemplateColumns ? String(stylesObject.gridTemplateColumns).match(/\d+/g) ?? [] : [];
|
|
5258
|
+
const hasGridProperties = (gridColumns?.length ?? 0) > 0;
|
|
5259
5259
|
const largeCols = hasGridProperties ? parseInt(gridColumns[0]) : 4;
|
|
5260
5260
|
const tabletColumns = hasGridProperties ? Math.ceil(parseInt(gridColumns[0]) / 2) : 2;
|
|
5261
5261
|
const mobileColumns = 1;
|
|
5262
|
-
{
|
|
5263
|
-
}
|
|
5264
|
-
const cssRules = Object.entries(stylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
|
|
5262
|
+
const cssRules = Object.entries(stylesObject || {}).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
|
|
5265
5263
|
const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
5266
5264
|
return `${cssKey}: ${value};`;
|
|
5267
5265
|
});
|
|
@@ -5270,6 +5268,20 @@ ${cssRules.join(
|
|
|
5270
5268
|
"\n"
|
|
5271
5269
|
)}
|
|
5272
5270
|
transition: all 0.3s ease-in-out; }`;
|
|
5271
|
+
if (tabletStylesObject) {
|
|
5272
|
+
const tabletCssRules = Object.entries(tabletStylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
|
|
5273
|
+
const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
5274
|
+
return `${cssKey}: ${value};`;
|
|
5275
|
+
});
|
|
5276
|
+
if (tabletCssRules.length > 0) {
|
|
5277
|
+
css += `
|
|
5278
|
+
@media (max-width: 768px) {
|
|
5279
|
+
#${guid} {
|
|
5280
|
+
${tabletCssRules.join("\n")}
|
|
5281
|
+
}
|
|
5282
|
+
}`;
|
|
5283
|
+
}
|
|
5284
|
+
}
|
|
5273
5285
|
if (mobileStylesObject) {
|
|
5274
5286
|
const mobileCssRules = Object.entries(mobileStylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
|
|
5275
5287
|
const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
@@ -5277,28 +5289,39 @@ ${cssRules.join(
|
|
|
5277
5289
|
});
|
|
5278
5290
|
if (mobileCssRules.length > 0) {
|
|
5279
5291
|
css += `
|
|
5280
|
-
@media (max-width: 480px) {
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
}
|
|
5292
|
+
@media (max-width: 480px) {
|
|
5293
|
+
#${guid} {
|
|
5294
|
+
${mobileCssRules.join("\n")}
|
|
5295
|
+
}
|
|
5296
|
+
}`;
|
|
5285
5297
|
}
|
|
5286
5298
|
}
|
|
5287
5299
|
if (hasGridProperties) {
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5300
|
+
const tabletHasGrid = tabletStylesObject?.gridTemplateColumns !== void 0;
|
|
5301
|
+
const mobileHasGrid = mobileStylesObject?.gridTemplateColumns !== void 0;
|
|
5302
|
+
if (!tabletHasGrid) {
|
|
5303
|
+
css += `
|
|
5304
|
+
@media (max-width: 768px) {
|
|
5305
|
+
#${guid} {
|
|
5306
|
+
grid-template-columns: repeat(${tabletColumns}, minmax(0, 1fr));
|
|
5307
|
+
}
|
|
5308
|
+
}`;
|
|
5309
|
+
}
|
|
5310
|
+
if (!mobileHasGrid) {
|
|
5311
|
+
css += `
|
|
5312
|
+
@media (max-width: 480px) {
|
|
5313
|
+
#${guid} {
|
|
5314
|
+
grid-template-columns: repeat(${mobileColumns}, minmax(0, 1fr));
|
|
5315
|
+
}
|
|
5316
|
+
}`;
|
|
5317
|
+
}
|
|
5294
5318
|
}
|
|
5295
|
-
|
|
5319
|
+
return {
|
|
5296
5320
|
css,
|
|
5297
5321
|
gridColsLarge: largeCols,
|
|
5298
5322
|
gridColsMedium: tabletColumns,
|
|
5299
5323
|
gridColsSmall: mobileColumns
|
|
5300
5324
|
};
|
|
5301
|
-
return output;
|
|
5302
5325
|
};
|
|
5303
5326
|
var DivContainer = async (props) => {
|
|
5304
5327
|
const NodeTypes2 = {
|
|
@@ -5319,6 +5342,7 @@ var DivContainer = async (props) => {
|
|
|
5319
5342
|
};
|
|
5320
5343
|
const styles = props.node.cssProperties;
|
|
5321
5344
|
const mobileStyles = props.node.mobileCssProperties;
|
|
5345
|
+
const tabletStyles = props.node.tabletCssProperties;
|
|
5322
5346
|
const dataBindingProperties = props.node.dataBinding;
|
|
5323
5347
|
const updatedStyles = convertKeysToCamelCase(styles);
|
|
5324
5348
|
const background = generateCompleteBackgroundString(props.node.backgroundLayers, props.assetBaseUrl);
|
|
@@ -5389,7 +5413,12 @@ var DivContainer = async (props) => {
|
|
|
5389
5413
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
5390
5414
|
}
|
|
5391
5415
|
}
|
|
5392
|
-
const cssResult = generateCssString(
|
|
5416
|
+
const cssResult = generateCssString(
|
|
5417
|
+
guid,
|
|
5418
|
+
updatedStyle,
|
|
5419
|
+
tabletStyles,
|
|
5420
|
+
mobileStyles
|
|
5421
|
+
);
|
|
5393
5422
|
function renderNode(node, props2, dataitem, key, href) {
|
|
5394
5423
|
{
|
|
5395
5424
|
}
|
|
@@ -5409,7 +5438,8 @@ var DivContainer = async (props) => {
|
|
|
5409
5438
|
breadcrumb: props2.breadcrumb,
|
|
5410
5439
|
dataitem,
|
|
5411
5440
|
href,
|
|
5412
|
-
assetBaseUrl: props2.assetBaseUrl
|
|
5441
|
+
assetBaseUrl: props2.assetBaseUrl,
|
|
5442
|
+
device: props2.device
|
|
5413
5443
|
}
|
|
5414
5444
|
) }, key);
|
|
5415
5445
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -4151,15 +4151,18 @@ var HlsPlayer1 = dynamic5(() => import("./HlsPlayer-FFEIK6FG.mjs"), {
|
|
|
4151
4151
|
ssr: false
|
|
4152
4152
|
});
|
|
4153
4153
|
var parseMaybeNumber = (value) => {
|
|
4154
|
-
if (typeof value === "number")
|
|
4154
|
+
if (typeof value === "number") {
|
|
4155
4155
|
return Number.isFinite(value) ? value : void 0;
|
|
4156
|
+
}
|
|
4156
4157
|
if (typeof value !== "string") return void 0;
|
|
4157
4158
|
const n = Number(value);
|
|
4158
4159
|
return Number.isFinite(n) ? n : void 0;
|
|
4159
4160
|
};
|
|
4160
4161
|
var shouldRenderForDevice = (imageDevice, currentDevice) => {
|
|
4161
4162
|
if (!imageDevice) return true;
|
|
4162
|
-
|
|
4163
|
+
const normalizedImageDevice = imageDevice.toString().toLowerCase();
|
|
4164
|
+
const normalizedCurrentDevice = currentDevice.toString().toLowerCase();
|
|
4165
|
+
return normalizedImageDevice === normalizedCurrentDevice;
|
|
4163
4166
|
};
|
|
4164
4167
|
var ImageGalleryNode = (props) => {
|
|
4165
4168
|
const resolveImageUrl = (imageUrl) => {
|
|
@@ -4195,9 +4198,8 @@ var ImageGalleryNode = (props) => {
|
|
|
4195
4198
|
const alt = img.title || "Gallery image";
|
|
4196
4199
|
const styles = {};
|
|
4197
4200
|
if (img.height) styles.height = img.height;
|
|
4198
|
-
if (img.borderRadius)
|
|
4199
|
-
styles.borderRadius = img.borderRadius;
|
|
4200
4201
|
if (img.width) styles.width = img.width;
|
|
4202
|
+
if (img.borderRadius) styles.borderRadius = img.borderRadius;
|
|
4201
4203
|
return /* @__PURE__ */ jsx58("div", { className: "max-w-full", children: isHls ? /* @__PURE__ */ jsx58(
|
|
4202
4204
|
HlsPlayer1,
|
|
4203
4205
|
{
|
|
@@ -4225,7 +4227,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4225
4227
|
alt
|
|
4226
4228
|
}
|
|
4227
4229
|
)
|
|
4228
|
-
) }, `${img.imageUrl}
|
|
4230
|
+
) }, `${idx}-${img.imageUrl}`);
|
|
4229
4231
|
}) });
|
|
4230
4232
|
};
|
|
4231
4233
|
var ImageGalleryNode_default = ImageGalleryNode;
|
|
@@ -4283,17 +4285,13 @@ function generateCompleteBackgroundString(layers, apiBaseUrl) {
|
|
|
4283
4285
|
return "";
|
|
4284
4286
|
}).filter((bg) => bg.trim() !== "").join(", ");
|
|
4285
4287
|
}
|
|
4286
|
-
var generateCssString = (guid, stylesObject, mobileStylesObject) => {
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
const gridColumns = stylesObject.gridTemplateColumns ? stylesObject.gridTemplateColumns.match(/\d+/g) : [];
|
|
4290
|
-
const hasGridProperties = gridColumns.length > 0;
|
|
4288
|
+
var generateCssString = (guid, stylesObject, tabletStylesObject, mobileStylesObject) => {
|
|
4289
|
+
const gridColumns = stylesObject?.gridTemplateColumns ? String(stylesObject.gridTemplateColumns).match(/\d+/g) ?? [] : [];
|
|
4290
|
+
const hasGridProperties = (gridColumns?.length ?? 0) > 0;
|
|
4291
4291
|
const largeCols = hasGridProperties ? parseInt(gridColumns[0]) : 4;
|
|
4292
4292
|
const tabletColumns = hasGridProperties ? Math.ceil(parseInt(gridColumns[0]) / 2) : 2;
|
|
4293
4293
|
const mobileColumns = 1;
|
|
4294
|
-
{
|
|
4295
|
-
}
|
|
4296
|
-
const cssRules = Object.entries(stylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
|
|
4294
|
+
const cssRules = Object.entries(stylesObject || {}).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
|
|
4297
4295
|
const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
4298
4296
|
return `${cssKey}: ${value};`;
|
|
4299
4297
|
});
|
|
@@ -4302,6 +4300,20 @@ ${cssRules.join(
|
|
|
4302
4300
|
"\n"
|
|
4303
4301
|
)}
|
|
4304
4302
|
transition: all 0.3s ease-in-out; }`;
|
|
4303
|
+
if (tabletStylesObject) {
|
|
4304
|
+
const tabletCssRules = Object.entries(tabletStylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
|
|
4305
|
+
const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
4306
|
+
return `${cssKey}: ${value};`;
|
|
4307
|
+
});
|
|
4308
|
+
if (tabletCssRules.length > 0) {
|
|
4309
|
+
css += `
|
|
4310
|
+
@media (max-width: 768px) {
|
|
4311
|
+
#${guid} {
|
|
4312
|
+
${tabletCssRules.join("\n")}
|
|
4313
|
+
}
|
|
4314
|
+
}`;
|
|
4315
|
+
}
|
|
4316
|
+
}
|
|
4305
4317
|
if (mobileStylesObject) {
|
|
4306
4318
|
const mobileCssRules = Object.entries(mobileStylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
|
|
4307
4319
|
const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
@@ -4309,28 +4321,39 @@ ${cssRules.join(
|
|
|
4309
4321
|
});
|
|
4310
4322
|
if (mobileCssRules.length > 0) {
|
|
4311
4323
|
css += `
|
|
4312
|
-
@media (max-width: 480px) {
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
}
|
|
4324
|
+
@media (max-width: 480px) {
|
|
4325
|
+
#${guid} {
|
|
4326
|
+
${mobileCssRules.join("\n")}
|
|
4327
|
+
}
|
|
4328
|
+
}`;
|
|
4317
4329
|
}
|
|
4318
4330
|
}
|
|
4319
4331
|
if (hasGridProperties) {
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4332
|
+
const tabletHasGrid = tabletStylesObject?.gridTemplateColumns !== void 0;
|
|
4333
|
+
const mobileHasGrid = mobileStylesObject?.gridTemplateColumns !== void 0;
|
|
4334
|
+
if (!tabletHasGrid) {
|
|
4335
|
+
css += `
|
|
4336
|
+
@media (max-width: 768px) {
|
|
4337
|
+
#${guid} {
|
|
4338
|
+
grid-template-columns: repeat(${tabletColumns}, minmax(0, 1fr));
|
|
4339
|
+
}
|
|
4340
|
+
}`;
|
|
4341
|
+
}
|
|
4342
|
+
if (!mobileHasGrid) {
|
|
4343
|
+
css += `
|
|
4344
|
+
@media (max-width: 480px) {
|
|
4345
|
+
#${guid} {
|
|
4346
|
+
grid-template-columns: repeat(${mobileColumns}, minmax(0, 1fr));
|
|
4347
|
+
}
|
|
4348
|
+
}`;
|
|
4349
|
+
}
|
|
4326
4350
|
}
|
|
4327
|
-
|
|
4351
|
+
return {
|
|
4328
4352
|
css,
|
|
4329
4353
|
gridColsLarge: largeCols,
|
|
4330
4354
|
gridColsMedium: tabletColumns,
|
|
4331
4355
|
gridColsSmall: mobileColumns
|
|
4332
4356
|
};
|
|
4333
|
-
return output;
|
|
4334
4357
|
};
|
|
4335
4358
|
var DivContainer = async (props) => {
|
|
4336
4359
|
const NodeTypes2 = {
|
|
@@ -4351,6 +4374,7 @@ var DivContainer = async (props) => {
|
|
|
4351
4374
|
};
|
|
4352
4375
|
const styles = props.node.cssProperties;
|
|
4353
4376
|
const mobileStyles = props.node.mobileCssProperties;
|
|
4377
|
+
const tabletStyles = props.node.tabletCssProperties;
|
|
4354
4378
|
const dataBindingProperties = props.node.dataBinding;
|
|
4355
4379
|
const updatedStyles = convertKeysToCamelCase(styles);
|
|
4356
4380
|
const background = generateCompleteBackgroundString(props.node.backgroundLayers, props.assetBaseUrl);
|
|
@@ -4421,7 +4445,12 @@ var DivContainer = async (props) => {
|
|
|
4421
4445
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
4422
4446
|
}
|
|
4423
4447
|
}
|
|
4424
|
-
const cssResult = generateCssString(
|
|
4448
|
+
const cssResult = generateCssString(
|
|
4449
|
+
guid,
|
|
4450
|
+
updatedStyle,
|
|
4451
|
+
tabletStyles,
|
|
4452
|
+
mobileStyles
|
|
4453
|
+
);
|
|
4425
4454
|
function renderNode(node, props2, dataitem, key, href) {
|
|
4426
4455
|
{
|
|
4427
4456
|
}
|
|
@@ -4441,7 +4470,8 @@ var DivContainer = async (props) => {
|
|
|
4441
4470
|
breadcrumb: props2.breadcrumb,
|
|
4442
4471
|
dataitem,
|
|
4443
4472
|
href,
|
|
4444
|
-
assetBaseUrl: props2.assetBaseUrl
|
|
4473
|
+
assetBaseUrl: props2.assetBaseUrl,
|
|
4474
|
+
device: props2.device
|
|
4445
4475
|
}
|
|
4446
4476
|
) }, key);
|
|
4447
4477
|
}
|
package/package.json
CHANGED