@dotcms/react 0.0.1-alpha.0 → 0.0.1-alpha.2
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/index.esm.d.ts +1 -0
- package/{index.js → index.esm.js} +208 -231
- package/package.json +4 -5
- package/src/index.d.ts +5 -5
- package/src/lib/components/Column/Column.d.ts +6 -7
- package/src/lib/components/Container/Container.d.ts +5 -6
- package/src/lib/components/DotcmsLayout/DotcmsLayout.d.ts +32 -32
- package/src/lib/components/PageProvider/PageProvider.d.ts +81 -81
- package/src/lib/components/Row/Row.d.ts +25 -25
- package/src/lib/contexts/PageContext.d.ts +3 -3
- package/src/lib/hooks/useDotcmsPageContext.d.ts +9 -9
- package/src/lib/hooks/usePageEditor.d.ts +48 -48
- package/src/lib/mocks/index.d.ts +1 -1
- package/src/lib/mocks/mockPageContext.d.ts +2 -2
- package/src/lib/utils/utils.d.ts +50 -50
|
@@ -142,37 +142,21 @@ var toIndexedObject$4 = function (it) {
|
|
|
142
142
|
return IndexedObject$2(requireObjectCoercible$4(it));
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
-
var documentAll$2 = typeof document == 'object' && document.all;
|
|
146
|
-
|
|
147
145
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
148
|
-
|
|
149
|
-
var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
|
|
150
|
-
|
|
151
|
-
var documentAll_1 = {
|
|
152
|
-
all: documentAll$2,
|
|
153
|
-
IS_HTMLDDA: IS_HTMLDDA
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
var $documentAll$1 = documentAll_1;
|
|
157
|
-
|
|
158
|
-
var documentAll$1 = $documentAll$1.all;
|
|
146
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
159
147
|
|
|
160
148
|
// `IsCallable` abstract operation
|
|
161
149
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
162
|
-
|
|
163
|
-
|
|
150
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
151
|
+
var isCallable$d = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
152
|
+
return typeof argument == 'function' || argument === documentAll;
|
|
164
153
|
} : function (argument) {
|
|
165
154
|
return typeof argument == 'function';
|
|
166
155
|
};
|
|
167
156
|
|
|
168
157
|
var isCallable$c = isCallable$d;
|
|
169
|
-
var $documentAll = documentAll_1;
|
|
170
|
-
|
|
171
|
-
var documentAll = $documentAll.all;
|
|
172
158
|
|
|
173
|
-
var isObject$6 =
|
|
174
|
-
return typeof it == 'object' ? it !== null : isCallable$c(it) || it === documentAll;
|
|
175
|
-
} : function (it) {
|
|
159
|
+
var isObject$6 = function (it) {
|
|
176
160
|
return typeof it == 'object' ? it !== null : isCallable$c(it);
|
|
177
161
|
};
|
|
178
162
|
|
|
@@ -336,10 +320,10 @@ var store$2 = sharedStore;
|
|
|
336
320
|
(shared$4.exports = function (key, value) {
|
|
337
321
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
338
322
|
})('versions', []).push({
|
|
339
|
-
version: '3.
|
|
323
|
+
version: '3.35.0',
|
|
340
324
|
mode: 'global',
|
|
341
325
|
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
342
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
326
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE',
|
|
343
327
|
source: 'https://github.com/zloirock/core-js'
|
|
344
328
|
});
|
|
345
329
|
|
|
@@ -1282,73 +1266,6 @@ $$3({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }
|
|
|
1282
1266
|
}
|
|
1283
1267
|
});
|
|
1284
1268
|
|
|
1285
|
-
var DESCRIPTORS = descriptors;
|
|
1286
|
-
var uncurryThis$6 = functionUncurryThis;
|
|
1287
|
-
var call$4 = functionCall;
|
|
1288
|
-
var fails$6 = fails$g;
|
|
1289
|
-
var objectKeys = objectKeys$2;
|
|
1290
|
-
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1291
|
-
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1292
|
-
var toObject$2 = toObject$4;
|
|
1293
|
-
var IndexedObject$1 = indexedObject;
|
|
1294
|
-
|
|
1295
|
-
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1296
|
-
var $assign = Object.assign;
|
|
1297
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1298
|
-
var defineProperty = Object.defineProperty;
|
|
1299
|
-
var concat$1 = uncurryThis$6([].concat);
|
|
1300
|
-
|
|
1301
|
-
// `Object.assign` method
|
|
1302
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
1303
|
-
var objectAssign = !$assign || fails$6(function () {
|
|
1304
|
-
// should have correct order of operations (Edge bug)
|
|
1305
|
-
if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
1306
|
-
enumerable: true,
|
|
1307
|
-
get: function () {
|
|
1308
|
-
defineProperty(this, 'b', {
|
|
1309
|
-
value: 3,
|
|
1310
|
-
enumerable: false
|
|
1311
|
-
});
|
|
1312
|
-
}
|
|
1313
|
-
}), { b: 2 })).b !== 1) return true;
|
|
1314
|
-
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1315
|
-
var A = {};
|
|
1316
|
-
var B = {};
|
|
1317
|
-
// eslint-disable-next-line es/no-symbol -- safe
|
|
1318
|
-
var symbol = Symbol('assign detection');
|
|
1319
|
-
var alphabet = 'abcdefghijklmnopqrst';
|
|
1320
|
-
A[symbol] = 7;
|
|
1321
|
-
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1322
|
-
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
1323
|
-
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1324
|
-
var T = toObject$2(target);
|
|
1325
|
-
var argumentsLength = arguments.length;
|
|
1326
|
-
var index = 1;
|
|
1327
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1328
|
-
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1329
|
-
while (argumentsLength > index) {
|
|
1330
|
-
var S = IndexedObject$1(arguments[index++]);
|
|
1331
|
-
var keys = getOwnPropertySymbols ? concat$1(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
1332
|
-
var length = keys.length;
|
|
1333
|
-
var j = 0;
|
|
1334
|
-
var key;
|
|
1335
|
-
while (length > j) {
|
|
1336
|
-
key = keys[j++];
|
|
1337
|
-
if (!DESCRIPTORS || call$4(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1338
|
-
}
|
|
1339
|
-
} return T;
|
|
1340
|
-
} : $assign;
|
|
1341
|
-
|
|
1342
|
-
var $$2 = _export;
|
|
1343
|
-
var assign = objectAssign;
|
|
1344
|
-
|
|
1345
|
-
// `Object.assign` method
|
|
1346
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
1347
|
-
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1348
|
-
$$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1349
|
-
assign: assign
|
|
1350
|
-
});
|
|
1351
|
-
|
|
1352
1269
|
var anObject$2 = anObject$7;
|
|
1353
1270
|
|
|
1354
1271
|
// `RegExp.prototype.flags` getter implementation
|
|
@@ -1367,13 +1284,13 @@ var regexpFlags$1 = function () {
|
|
|
1367
1284
|
return result;
|
|
1368
1285
|
};
|
|
1369
1286
|
|
|
1370
|
-
var fails$
|
|
1287
|
+
var fails$6 = fails$g;
|
|
1371
1288
|
var global$4 = global$f;
|
|
1372
1289
|
|
|
1373
1290
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
1374
1291
|
var $RegExp$2 = global$4.RegExp;
|
|
1375
1292
|
|
|
1376
|
-
var UNSUPPORTED_Y$1 = fails$
|
|
1293
|
+
var UNSUPPORTED_Y$1 = fails$6(function () {
|
|
1377
1294
|
var re = $RegExp$2('a', 'y');
|
|
1378
1295
|
re.lastIndex = 2;
|
|
1379
1296
|
return re.exec('abcd') !== null;
|
|
@@ -1381,11 +1298,11 @@ var UNSUPPORTED_Y$1 = fails$5(function () {
|
|
|
1381
1298
|
|
|
1382
1299
|
// UC Browser bug
|
|
1383
1300
|
// https://github.com/zloirock/core-js/issues/1008
|
|
1384
|
-
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$
|
|
1301
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$6(function () {
|
|
1385
1302
|
return !$RegExp$2('a', 'y').sticky;
|
|
1386
1303
|
});
|
|
1387
1304
|
|
|
1388
|
-
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$
|
|
1305
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$6(function () {
|
|
1389
1306
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1390
1307
|
var re = $RegExp$2('^r', 'gy');
|
|
1391
1308
|
re.lastIndex = 2;
|
|
@@ -1398,24 +1315,24 @@ var regexpStickyHelpers = {
|
|
|
1398
1315
|
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
1399
1316
|
};
|
|
1400
1317
|
|
|
1401
|
-
var fails$
|
|
1318
|
+
var fails$5 = fails$g;
|
|
1402
1319
|
var global$3 = global$f;
|
|
1403
1320
|
|
|
1404
1321
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
1405
1322
|
var $RegExp$1 = global$3.RegExp;
|
|
1406
1323
|
|
|
1407
|
-
var regexpUnsupportedDotAll = fails$
|
|
1324
|
+
var regexpUnsupportedDotAll = fails$5(function () {
|
|
1408
1325
|
var re = $RegExp$1('.', 's');
|
|
1409
1326
|
return !(re.dotAll && re.test('\n') && re.flags === 's');
|
|
1410
1327
|
});
|
|
1411
1328
|
|
|
1412
|
-
var fails$
|
|
1329
|
+
var fails$4 = fails$g;
|
|
1413
1330
|
var global$2 = global$f;
|
|
1414
1331
|
|
|
1415
1332
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
1416
1333
|
var $RegExp = global$2.RegExp;
|
|
1417
1334
|
|
|
1418
|
-
var regexpUnsupportedNcg = fails$
|
|
1335
|
+
var regexpUnsupportedNcg = fails$4(function () {
|
|
1419
1336
|
var re = $RegExp('(?<a>b)', 'g');
|
|
1420
1337
|
return re.exec('b').groups.a !== 'b' ||
|
|
1421
1338
|
'b'.replace(re, '$<a>c') !== 'bc';
|
|
@@ -1423,8 +1340,8 @@ var regexpUnsupportedNcg = fails$3(function () {
|
|
|
1423
1340
|
|
|
1424
1341
|
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
1425
1342
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
1426
|
-
var call$
|
|
1427
|
-
var uncurryThis$
|
|
1343
|
+
var call$4 = functionCall;
|
|
1344
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
1428
1345
|
var toString$2 = toString$4;
|
|
1429
1346
|
var regexpFlags = regexpFlags$1;
|
|
1430
1347
|
var stickyHelpers = regexpStickyHelpers;
|
|
@@ -1437,16 +1354,16 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
|
1437
1354
|
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
1438
1355
|
var nativeExec = RegExp.prototype.exec;
|
|
1439
1356
|
var patchedExec = nativeExec;
|
|
1440
|
-
var charAt$3 = uncurryThis$
|
|
1441
|
-
var indexOf = uncurryThis$
|
|
1442
|
-
var replace$1 = uncurryThis$
|
|
1443
|
-
var stringSlice$3 = uncurryThis$
|
|
1357
|
+
var charAt$3 = uncurryThis$6(''.charAt);
|
|
1358
|
+
var indexOf = uncurryThis$6(''.indexOf);
|
|
1359
|
+
var replace$1 = uncurryThis$6(''.replace);
|
|
1360
|
+
var stringSlice$3 = uncurryThis$6(''.slice);
|
|
1444
1361
|
|
|
1445
1362
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
1446
1363
|
var re1 = /a/;
|
|
1447
1364
|
var re2 = /b*/g;
|
|
1448
|
-
call$
|
|
1449
|
-
call$
|
|
1365
|
+
call$4(nativeExec, re1, 'a');
|
|
1366
|
+
call$4(nativeExec, re2, 'a');
|
|
1450
1367
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
1451
1368
|
})();
|
|
1452
1369
|
|
|
@@ -1467,14 +1384,14 @@ if (PATCH) {
|
|
|
1467
1384
|
|
|
1468
1385
|
if (raw) {
|
|
1469
1386
|
raw.lastIndex = re.lastIndex;
|
|
1470
|
-
result = call$
|
|
1387
|
+
result = call$4(patchedExec, raw, str);
|
|
1471
1388
|
re.lastIndex = raw.lastIndex;
|
|
1472
1389
|
return result;
|
|
1473
1390
|
}
|
|
1474
1391
|
|
|
1475
1392
|
var groups = state.groups;
|
|
1476
1393
|
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
1477
|
-
var flags = call$
|
|
1394
|
+
var flags = call$4(regexpFlags, re);
|
|
1478
1395
|
var source = re.source;
|
|
1479
1396
|
var charsAdded = 0;
|
|
1480
1397
|
var strCopy = str;
|
|
@@ -1502,7 +1419,7 @@ if (PATCH) {
|
|
|
1502
1419
|
}
|
|
1503
1420
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
1504
1421
|
|
|
1505
|
-
match = call$
|
|
1422
|
+
match = call$4(nativeExec, sticky ? reCopy : re, strCopy);
|
|
1506
1423
|
|
|
1507
1424
|
if (sticky) {
|
|
1508
1425
|
if (match) {
|
|
@@ -1517,7 +1434,7 @@ if (PATCH) {
|
|
|
1517
1434
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
1518
1435
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
1519
1436
|
// for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
|
|
1520
|
-
call$
|
|
1437
|
+
call$4(nativeReplace, match[0], reCopy, function () {
|
|
1521
1438
|
for (i = 1; i < arguments.length - 2; i++) {
|
|
1522
1439
|
if (arguments[i] === undefined) match[i] = undefined;
|
|
1523
1440
|
}
|
|
@@ -1538,12 +1455,12 @@ if (PATCH) {
|
|
|
1538
1455
|
|
|
1539
1456
|
var regexpExec$2 = patchedExec;
|
|
1540
1457
|
|
|
1541
|
-
var $$
|
|
1458
|
+
var $$2 = _export;
|
|
1542
1459
|
var exec = regexpExec$2;
|
|
1543
1460
|
|
|
1544
1461
|
// `RegExp.prototype.exec` method
|
|
1545
1462
|
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
1546
|
-
$$
|
|
1463
|
+
$$2({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
|
|
1547
1464
|
exec: exec
|
|
1548
1465
|
});
|
|
1549
1466
|
|
|
@@ -1551,29 +1468,29 @@ var NATIVE_BIND = functionBindNative;
|
|
|
1551
1468
|
|
|
1552
1469
|
var FunctionPrototype = Function.prototype;
|
|
1553
1470
|
var apply$1 = FunctionPrototype.apply;
|
|
1554
|
-
var call$
|
|
1471
|
+
var call$3 = FunctionPrototype.call;
|
|
1555
1472
|
|
|
1556
1473
|
// eslint-disable-next-line es/no-reflect -- safe
|
|
1557
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$
|
|
1558
|
-
return call$
|
|
1474
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$3.bind(apply$1) : function () {
|
|
1475
|
+
return call$3.apply(apply$1, arguments);
|
|
1559
1476
|
});
|
|
1560
1477
|
|
|
1561
1478
|
var classofRaw = classofRaw$2;
|
|
1562
|
-
var uncurryThis$
|
|
1479
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
1563
1480
|
|
|
1564
1481
|
var functionUncurryThisClause = function (fn) {
|
|
1565
1482
|
// Nashorn bug:
|
|
1566
1483
|
// https://github.com/zloirock/core-js/issues/1128
|
|
1567
1484
|
// https://github.com/zloirock/core-js/issues/1130
|
|
1568
|
-
if (classofRaw(fn) === 'Function') return uncurryThis$
|
|
1485
|
+
if (classofRaw(fn) === 'Function') return uncurryThis$5(fn);
|
|
1569
1486
|
};
|
|
1570
1487
|
|
|
1571
1488
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
1572
1489
|
|
|
1573
|
-
var uncurryThis$
|
|
1490
|
+
var uncurryThis$4 = functionUncurryThisClause;
|
|
1574
1491
|
var defineBuiltIn = defineBuiltIn$2;
|
|
1575
1492
|
var regexpExec$1 = regexpExec$2;
|
|
1576
|
-
var fails$
|
|
1493
|
+
var fails$3 = fails$g;
|
|
1577
1494
|
var wellKnownSymbol$1 = wellKnownSymbol$8;
|
|
1578
1495
|
var createNonEnumerableProperty = createNonEnumerableProperty$3;
|
|
1579
1496
|
|
|
@@ -1583,14 +1500,14 @@ var RegExpPrototype = RegExp.prototype;
|
|
|
1583
1500
|
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
1584
1501
|
var SYMBOL = wellKnownSymbol$1(KEY);
|
|
1585
1502
|
|
|
1586
|
-
var DELEGATES_TO_SYMBOL = !fails$
|
|
1503
|
+
var DELEGATES_TO_SYMBOL = !fails$3(function () {
|
|
1587
1504
|
// String methods call symbol-named RegEp methods
|
|
1588
1505
|
var O = {};
|
|
1589
1506
|
O[SYMBOL] = function () { return 7; };
|
|
1590
1507
|
return ''[KEY](O) !== 7;
|
|
1591
1508
|
});
|
|
1592
1509
|
|
|
1593
|
-
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$
|
|
1510
|
+
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$3(function () {
|
|
1594
1511
|
// Symbol-named RegExp methods call .exec
|
|
1595
1512
|
var execCalled = false;
|
|
1596
1513
|
var re = /a/;
|
|
@@ -1622,9 +1539,9 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
1622
1539
|
!DELEGATES_TO_EXEC ||
|
|
1623
1540
|
FORCED
|
|
1624
1541
|
) {
|
|
1625
|
-
var uncurriedNativeRegExpMethod = uncurryThis$
|
|
1542
|
+
var uncurriedNativeRegExpMethod = uncurryThis$4(/./[SYMBOL]);
|
|
1626
1543
|
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
1627
|
-
var uncurriedNativeMethod = uncurryThis$
|
|
1544
|
+
var uncurriedNativeMethod = uncurryThis$4(nativeMethod);
|
|
1628
1545
|
var $exec = regexp.exec;
|
|
1629
1546
|
if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
|
|
1630
1547
|
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
@@ -1645,14 +1562,14 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
1645
1562
|
if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
|
|
1646
1563
|
};
|
|
1647
1564
|
|
|
1648
|
-
var uncurryThis$
|
|
1565
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
1649
1566
|
var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
|
|
1650
1567
|
var toString$1 = toString$4;
|
|
1651
1568
|
var requireObjectCoercible$1 = requireObjectCoercible$5;
|
|
1652
1569
|
|
|
1653
|
-
var charAt$2 = uncurryThis$
|
|
1654
|
-
var charCodeAt = uncurryThis$
|
|
1655
|
-
var stringSlice$2 = uncurryThis$
|
|
1570
|
+
var charAt$2 = uncurryThis$3(''.charAt);
|
|
1571
|
+
var charCodeAt = uncurryThis$3(''.charCodeAt);
|
|
1572
|
+
var stringSlice$2 = uncurryThis$3(''.slice);
|
|
1656
1573
|
|
|
1657
1574
|
var createMethod$1 = function (CONVERT_TO_STRING) {
|
|
1658
1575
|
return function ($this, pos) {
|
|
@@ -1690,13 +1607,13 @@ var advanceStringIndex$1 = function (S, index, unicode) {
|
|
|
1690
1607
|
return index + (unicode ? charAt$1(S, index).length : 1);
|
|
1691
1608
|
};
|
|
1692
1609
|
|
|
1693
|
-
var uncurryThis$
|
|
1694
|
-
var toObject$
|
|
1610
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
1611
|
+
var toObject$2 = toObject$4;
|
|
1695
1612
|
|
|
1696
1613
|
var floor = Math.floor;
|
|
1697
|
-
var charAt = uncurryThis$
|
|
1698
|
-
var replace = uncurryThis$
|
|
1699
|
-
var stringSlice$1 = uncurryThis$
|
|
1614
|
+
var charAt = uncurryThis$2(''.charAt);
|
|
1615
|
+
var replace = uncurryThis$2(''.replace);
|
|
1616
|
+
var stringSlice$1 = uncurryThis$2(''.slice);
|
|
1700
1617
|
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
1701
1618
|
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
|
1702
1619
|
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
|
@@ -1708,7 +1625,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
|
|
|
1708
1625
|
var m = captures.length;
|
|
1709
1626
|
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
1710
1627
|
if (namedCaptures !== undefined) {
|
|
1711
|
-
namedCaptures = toObject$
|
|
1628
|
+
namedCaptures = toObject$2(namedCaptures);
|
|
1712
1629
|
symbols = SUBSTITUTION_SYMBOLS;
|
|
1713
1630
|
}
|
|
1714
1631
|
return replace(replacement, symbols, function (match, ch) {
|
|
@@ -1736,7 +1653,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
|
|
|
1736
1653
|
});
|
|
1737
1654
|
};
|
|
1738
1655
|
|
|
1739
|
-
var call$
|
|
1656
|
+
var call$2 = functionCall;
|
|
1740
1657
|
var anObject$1 = anObject$7;
|
|
1741
1658
|
var isCallable$1 = isCallable$d;
|
|
1742
1659
|
var classof$1 = classofRaw$2;
|
|
@@ -1749,19 +1666,19 @@ var $TypeError$1 = TypeError;
|
|
|
1749
1666
|
var regexpExecAbstract = function (R, S) {
|
|
1750
1667
|
var exec = R.exec;
|
|
1751
1668
|
if (isCallable$1(exec)) {
|
|
1752
|
-
var result = call$
|
|
1669
|
+
var result = call$2(exec, R, S);
|
|
1753
1670
|
if (result !== null) anObject$1(result);
|
|
1754
1671
|
return result;
|
|
1755
1672
|
}
|
|
1756
|
-
if (classof$1(R) === 'RegExp') return call$
|
|
1673
|
+
if (classof$1(R) === 'RegExp') return call$2(regexpExec, R, S);
|
|
1757
1674
|
throw new $TypeError$1('RegExp#exec called on incompatible receiver');
|
|
1758
1675
|
};
|
|
1759
1676
|
|
|
1760
1677
|
var apply = functionApply;
|
|
1761
|
-
var call = functionCall;
|
|
1762
|
-
var uncurryThis = functionUncurryThis;
|
|
1678
|
+
var call$1 = functionCall;
|
|
1679
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
1763
1680
|
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
1764
|
-
var fails$
|
|
1681
|
+
var fails$2 = fails$g;
|
|
1765
1682
|
var anObject = anObject$7;
|
|
1766
1683
|
var isCallable = isCallable$d;
|
|
1767
1684
|
var isNullOrUndefined = isNullOrUndefined$3;
|
|
@@ -1778,10 +1695,10 @@ var wellKnownSymbol = wellKnownSymbol$8;
|
|
|
1778
1695
|
var REPLACE = wellKnownSymbol('replace');
|
|
1779
1696
|
var max = Math.max;
|
|
1780
1697
|
var min = Math.min;
|
|
1781
|
-
var concat = uncurryThis([].concat);
|
|
1782
|
-
var push = uncurryThis([].push);
|
|
1783
|
-
var stringIndexOf = uncurryThis(''.indexOf);
|
|
1784
|
-
var stringSlice = uncurryThis(''.slice);
|
|
1698
|
+
var concat$1 = uncurryThis$1([].concat);
|
|
1699
|
+
var push = uncurryThis$1([].push);
|
|
1700
|
+
var stringIndexOf = uncurryThis$1(''.indexOf);
|
|
1701
|
+
var stringSlice = uncurryThis$1(''.slice);
|
|
1785
1702
|
|
|
1786
1703
|
var maybeToString = function (it) {
|
|
1787
1704
|
return it === undefined ? it : String(it);
|
|
@@ -1802,7 +1719,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
|
1802
1719
|
return false;
|
|
1803
1720
|
})();
|
|
1804
1721
|
|
|
1805
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$
|
|
1722
|
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$2(function () {
|
|
1806
1723
|
var re = /./;
|
|
1807
1724
|
re.exec = function () {
|
|
1808
1725
|
var result = [];
|
|
@@ -1824,8 +1741,8 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
1824
1741
|
var O = requireObjectCoercible(this);
|
|
1825
1742
|
var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
|
|
1826
1743
|
return replacer
|
|
1827
|
-
? call(replacer, searchValue, O, replaceValue)
|
|
1828
|
-
: call(nativeReplace, toString(O), searchValue, replaceValue);
|
|
1744
|
+
? call$1(replacer, searchValue, O, replaceValue)
|
|
1745
|
+
: call$1(nativeReplace, toString(O), searchValue, replaceValue);
|
|
1829
1746
|
},
|
|
1830
1747
|
// `RegExp.prototype[@@replace]` method
|
|
1831
1748
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
@@ -1882,7 +1799,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
1882
1799
|
for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
|
|
1883
1800
|
var namedCaptures = result.groups;
|
|
1884
1801
|
if (functionalReplace) {
|
|
1885
|
-
var replacerArgs = concat([matched], captures, position, S);
|
|
1802
|
+
var replacerArgs = concat$1([matched], captures, position, S);
|
|
1886
1803
|
if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
|
|
1887
1804
|
replacement = toString(apply(replaceValue, undefined, replacerArgs));
|
|
1888
1805
|
} else {
|
|
@@ -1900,8 +1817,8 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
1900
1817
|
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
1901
1818
|
|
|
1902
1819
|
var aCallable = aCallable$2;
|
|
1903
|
-
var toObject = toObject$4;
|
|
1904
|
-
var IndexedObject = indexedObject;
|
|
1820
|
+
var toObject$1 = toObject$4;
|
|
1821
|
+
var IndexedObject$1 = indexedObject;
|
|
1905
1822
|
var lengthOfArrayLike = lengthOfArrayLike$2;
|
|
1906
1823
|
|
|
1907
1824
|
var $TypeError = TypeError;
|
|
@@ -1909,8 +1826,8 @@ var $TypeError = TypeError;
|
|
|
1909
1826
|
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
1910
1827
|
var createMethod = function (IS_RIGHT) {
|
|
1911
1828
|
return function (that, callbackfn, argumentsLength, memo) {
|
|
1912
|
-
var O = toObject(that);
|
|
1913
|
-
var self = IndexedObject(O);
|
|
1829
|
+
var O = toObject$1(that);
|
|
1830
|
+
var self = IndexedObject$1(O);
|
|
1914
1831
|
var length = lengthOfArrayLike(O);
|
|
1915
1832
|
aCallable(callbackfn);
|
|
1916
1833
|
var index = IS_RIGHT ? length - 1 : 0;
|
|
@@ -1942,11 +1859,11 @@ var arrayReduce = {
|
|
|
1942
1859
|
right: createMethod(true)
|
|
1943
1860
|
};
|
|
1944
1861
|
|
|
1945
|
-
var fails = fails$g;
|
|
1862
|
+
var fails$1 = fails$g;
|
|
1946
1863
|
|
|
1947
1864
|
var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
|
|
1948
1865
|
var method = [][METHOD_NAME];
|
|
1949
|
-
return !!method && fails(function () {
|
|
1866
|
+
return !!method && fails$1(function () {
|
|
1950
1867
|
// eslint-disable-next-line no-useless-call -- required for testing
|
|
1951
1868
|
method.call(null, argument || function () { return 1; }, 1);
|
|
1952
1869
|
});
|
|
@@ -1957,7 +1874,7 @@ var classof = classofRaw$2;
|
|
|
1957
1874
|
|
|
1958
1875
|
var engineIsNode = classof(global$1.process) === 'process';
|
|
1959
1876
|
|
|
1960
|
-
var
|
|
1877
|
+
var $$1 = _export;
|
|
1961
1878
|
var $reduce = arrayReduce.left;
|
|
1962
1879
|
var arrayMethodIsStrict = arrayMethodIsStrict$1;
|
|
1963
1880
|
var CHROME_VERSION = engineV8Version;
|
|
@@ -1970,13 +1887,80 @@ var FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');
|
|
|
1970
1887
|
|
|
1971
1888
|
// `Array.prototype.reduce` method
|
|
1972
1889
|
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
|
1973
|
-
|
|
1890
|
+
$$1({ target: 'Array', proto: true, forced: FORCED }, {
|
|
1974
1891
|
reduce: function reduce(callbackfn /* , initialValue */) {
|
|
1975
1892
|
var length = arguments.length;
|
|
1976
1893
|
return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
|
|
1977
1894
|
}
|
|
1978
1895
|
});
|
|
1979
1896
|
|
|
1897
|
+
var DESCRIPTORS = descriptors;
|
|
1898
|
+
var uncurryThis = functionUncurryThis;
|
|
1899
|
+
var call = functionCall;
|
|
1900
|
+
var fails = fails$g;
|
|
1901
|
+
var objectKeys = objectKeys$2;
|
|
1902
|
+
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1903
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1904
|
+
var toObject = toObject$4;
|
|
1905
|
+
var IndexedObject = indexedObject;
|
|
1906
|
+
|
|
1907
|
+
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1908
|
+
var $assign = Object.assign;
|
|
1909
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1910
|
+
var defineProperty = Object.defineProperty;
|
|
1911
|
+
var concat = uncurryThis([].concat);
|
|
1912
|
+
|
|
1913
|
+
// `Object.assign` method
|
|
1914
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1915
|
+
var objectAssign = !$assign || fails(function () {
|
|
1916
|
+
// should have correct order of operations (Edge bug)
|
|
1917
|
+
if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
1918
|
+
enumerable: true,
|
|
1919
|
+
get: function () {
|
|
1920
|
+
defineProperty(this, 'b', {
|
|
1921
|
+
value: 3,
|
|
1922
|
+
enumerable: false
|
|
1923
|
+
});
|
|
1924
|
+
}
|
|
1925
|
+
}), { b: 2 })).b !== 1) return true;
|
|
1926
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1927
|
+
var A = {};
|
|
1928
|
+
var B = {};
|
|
1929
|
+
// eslint-disable-next-line es/no-symbol -- safe
|
|
1930
|
+
var symbol = Symbol('assign detection');
|
|
1931
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
|
1932
|
+
A[symbol] = 7;
|
|
1933
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1934
|
+
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
1935
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1936
|
+
var T = toObject(target);
|
|
1937
|
+
var argumentsLength = arguments.length;
|
|
1938
|
+
var index = 1;
|
|
1939
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1940
|
+
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1941
|
+
while (argumentsLength > index) {
|
|
1942
|
+
var S = IndexedObject(arguments[index++]);
|
|
1943
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
1944
|
+
var length = keys.length;
|
|
1945
|
+
var j = 0;
|
|
1946
|
+
var key;
|
|
1947
|
+
while (length > j) {
|
|
1948
|
+
key = keys[j++];
|
|
1949
|
+
if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1950
|
+
}
|
|
1951
|
+
} return T;
|
|
1952
|
+
} : $assign;
|
|
1953
|
+
|
|
1954
|
+
var $ = _export;
|
|
1955
|
+
var assign = objectAssign;
|
|
1956
|
+
|
|
1957
|
+
// `Object.assign` method
|
|
1958
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1959
|
+
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1960
|
+
$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1961
|
+
assign: assign
|
|
1962
|
+
});
|
|
1963
|
+
|
|
1980
1964
|
function getPageElementBound(rowsNodes) {
|
|
1981
1965
|
if (!rowsNodes) {
|
|
1982
1966
|
return [];
|
|
@@ -2030,9 +2014,9 @@ const getPageContainers = containers => {
|
|
|
2030
2014
|
const contentlets = containers[container].contentlets;
|
|
2031
2015
|
const contentletsKeys = Object.keys(contentlets);
|
|
2032
2016
|
contentletsKeys.forEach(key => {
|
|
2033
|
-
var
|
|
2017
|
+
var _containers$container;
|
|
2034
2018
|
acc.push({
|
|
2035
|
-
identifier: (
|
|
2019
|
+
identifier: (_containers$container = containers[container].container.path) != null ? _containers$container : containers[container].container.identifier,
|
|
2036
2020
|
uuid: key.replace('uuid-', ''),
|
|
2037
2021
|
contentletsId: contentlets[key].map(contentlet => contentlet.identifier)
|
|
2038
2022
|
});
|
|
@@ -2053,24 +2037,24 @@ const getContainersData = (containers, containerRef) => {
|
|
|
2053
2037
|
// Get the contentlets for "this" container
|
|
2054
2038
|
const contentlets = containers[identifier].contentlets[`uuid-${uuid}`];
|
|
2055
2039
|
const pageContainers = getPageContainers(containers);
|
|
2056
|
-
return Object.assign(
|
|
2040
|
+
return Object.assign({}, containers[identifier].container, {
|
|
2057
2041
|
acceptTypes,
|
|
2058
2042
|
contentlets,
|
|
2059
2043
|
pageContainers
|
|
2060
2044
|
});
|
|
2061
2045
|
};
|
|
2062
2046
|
|
|
2063
|
-
/**
|
|
2064
|
-
* `usePageEditor` is a custom React hook that sets up the page editor for a DotCMS page.
|
|
2065
|
-
* It takes a `PageEditorOptions` object as a parameter and returns a reference to the rows of the page.
|
|
2066
|
-
*
|
|
2067
|
-
* This hook is the main brigde between your webapp and the dotcms page editor.
|
|
2068
|
-
*
|
|
2069
|
-
*
|
|
2070
|
-
* @category Hooks
|
|
2071
|
-
* @param {PageEditorOptions} props - The options for the page editor. Includes a `reloadFunction` and a `pathname`.
|
|
2072
|
-
* @returns {React.RefObject<HTMLDivElement>[]} - A reference to the rows of the page.
|
|
2073
|
-
* @throws {Error} - Throws an error if the `pathname` is not provided.
|
|
2047
|
+
/**
|
|
2048
|
+
* `usePageEditor` is a custom React hook that sets up the page editor for a DotCMS page.
|
|
2049
|
+
* It takes a `PageEditorOptions` object as a parameter and returns a reference to the rows of the page.
|
|
2050
|
+
*
|
|
2051
|
+
* This hook is the main brigde between your webapp and the dotcms page editor.
|
|
2052
|
+
*
|
|
2053
|
+
*
|
|
2054
|
+
* @category Hooks
|
|
2055
|
+
* @param {PageEditorOptions} props - The options for the page editor. Includes a `reloadFunction` and a `pathname`.
|
|
2056
|
+
* @returns {React.RefObject<HTMLDivElement>[]} - A reference to the rows of the page.
|
|
2057
|
+
* @throws {Error} - Throws an error if the `pathname` is not provided.
|
|
2074
2058
|
*/
|
|
2075
2059
|
const usePageEditor = props => {
|
|
2076
2060
|
const {
|
|
@@ -2136,7 +2120,7 @@ function usePostUrlToEditor(pathname) {
|
|
|
2136
2120
|
postMessageToEditor({
|
|
2137
2121
|
action: CUSTOMER_ACTIONS.SET_URL,
|
|
2138
2122
|
payload: {
|
|
2139
|
-
url: pathname === '/' ? 'index' : pathname
|
|
2123
|
+
url: pathname === '/' ? 'index' : pathname == null ? void 0 : pathname.replace('/', '')
|
|
2140
2124
|
}
|
|
2141
2125
|
});
|
|
2142
2126
|
}, [pathname]);
|
|
@@ -2144,24 +2128,23 @@ function usePostUrlToEditor(pathname) {
|
|
|
2144
2128
|
|
|
2145
2129
|
const PageContext = /*#__PURE__*/createContext(null);
|
|
2146
2130
|
|
|
2147
|
-
/**
|
|
2148
|
-
* `PageProvider` is a functional component that provides a context for a DotCMS page.
|
|
2149
|
-
* It takes a `PageProviderProps` object as a parameter and returns a JSX element.
|
|
2150
|
-
*
|
|
2151
|
-
* @category Components
|
|
2152
|
-
* @param {PageProviderProps} props - The properties for the PageProvider. Includes an `entity` and `children`.
|
|
2153
|
-
* @returns {JSX.Element} - A JSX element that provides a context for a DotCMS page.
|
|
2131
|
+
/**
|
|
2132
|
+
* `PageProvider` is a functional component that provides a context for a DotCMS page.
|
|
2133
|
+
* It takes a `PageProviderProps` object as a parameter and returns a JSX element.
|
|
2134
|
+
*
|
|
2135
|
+
* @category Components
|
|
2136
|
+
* @param {PageProviderProps} props - The properties for the PageProvider. Includes an `entity` and `children`.
|
|
2137
|
+
* @returns {JSX.Element} - A JSX element that provides a context for a DotCMS page.
|
|
2154
2138
|
*/
|
|
2155
2139
|
function PageProvider(props) {
|
|
2156
2140
|
const {
|
|
2157
2141
|
entity,
|
|
2158
2142
|
children
|
|
2159
2143
|
} = props;
|
|
2160
|
-
return jsx(PageContext.Provider,
|
|
2161
|
-
value: entity
|
|
2162
|
-
}, {
|
|
2144
|
+
return jsx(PageContext.Provider, {
|
|
2145
|
+
value: entity,
|
|
2163
2146
|
children: children
|
|
2164
|
-
})
|
|
2147
|
+
});
|
|
2165
2148
|
}
|
|
2166
2149
|
|
|
2167
2150
|
function styleInject(css, ref) {
|
|
@@ -2202,16 +2185,15 @@ styleInject(css_248z);
|
|
|
2202
2185
|
function NoContent({
|
|
2203
2186
|
contentType
|
|
2204
2187
|
}) {
|
|
2205
|
-
return jsxs("div",
|
|
2206
|
-
"data-testid": "no-component"
|
|
2207
|
-
}, {
|
|
2188
|
+
return jsxs("div", {
|
|
2189
|
+
"data-testid": "no-component",
|
|
2208
2190
|
children: ["No Component for ", contentType]
|
|
2209
|
-
})
|
|
2191
|
+
});
|
|
2210
2192
|
}
|
|
2211
2193
|
function Container({
|
|
2212
2194
|
containerRef
|
|
2213
2195
|
}) {
|
|
2214
|
-
var
|
|
2196
|
+
var _viewAs$persona;
|
|
2215
2197
|
const {
|
|
2216
2198
|
identifier,
|
|
2217
2199
|
uuid
|
|
@@ -2234,7 +2216,7 @@ function Container({
|
|
|
2234
2216
|
const container = {
|
|
2235
2217
|
acceptTypes,
|
|
2236
2218
|
contentletsId,
|
|
2237
|
-
identifier: path
|
|
2219
|
+
identifier: path != null ? path : identifier,
|
|
2238
2220
|
maxContentlets,
|
|
2239
2221
|
uuid
|
|
2240
2222
|
};
|
|
@@ -2243,10 +2225,10 @@ function Container({
|
|
|
2243
2225
|
language_id: viewAs.language.id,
|
|
2244
2226
|
pageContainers,
|
|
2245
2227
|
pageId: page.identifier,
|
|
2246
|
-
personaTag: (
|
|
2228
|
+
personaTag: (_viewAs$persona = viewAs.persona) == null ? void 0 : _viewAs$persona.keyTag
|
|
2247
2229
|
};
|
|
2248
2230
|
function onPointerEnterHandler(e) {
|
|
2249
|
-
var
|
|
2231
|
+
var _target$dataset$conte;
|
|
2250
2232
|
let target = e.target;
|
|
2251
2233
|
if (target.dataset.dot !== 'contentlet') {
|
|
2252
2234
|
target = target.closest('[data-dot="contentlet"]');
|
|
@@ -2260,7 +2242,7 @@ function Container({
|
|
|
2260
2242
|
width,
|
|
2261
2243
|
height
|
|
2262
2244
|
} = target.getBoundingClientRect();
|
|
2263
|
-
const contentletPayload = JSON.parse((
|
|
2245
|
+
const contentletPayload = JSON.parse((_target$dataset$conte = target.dataset.content) != null ? _target$dataset$conte : '{}');
|
|
2264
2246
|
postMessageToEditor({
|
|
2265
2247
|
action: CUSTOMER_ACTIONS.SET_CONTENTLET,
|
|
2266
2248
|
payload: {
|
|
@@ -2272,12 +2254,11 @@ function Container({
|
|
|
2272
2254
|
}
|
|
2273
2255
|
});
|
|
2274
2256
|
}
|
|
2275
|
-
return jsx("div",
|
|
2257
|
+
return jsx("div", {
|
|
2276
2258
|
"data-dot": "container",
|
|
2277
|
-
"data-content": JSON.stringify(containerPayload)
|
|
2278
|
-
}, {
|
|
2259
|
+
"data-content": JSON.stringify(containerPayload),
|
|
2279
2260
|
children: contentlets.map(contentlet => {
|
|
2280
|
-
var
|
|
2261
|
+
var _viewAs$persona2;
|
|
2281
2262
|
const Component = components[contentlet.contentType] || NoContent;
|
|
2282
2263
|
const contentletPayload = {
|
|
2283
2264
|
container,
|
|
@@ -2289,17 +2270,16 @@ function Container({
|
|
|
2289
2270
|
language_id: viewAs.language.id,
|
|
2290
2271
|
pageContainers,
|
|
2291
2272
|
pageId: page.identifier,
|
|
2292
|
-
personaTag: (
|
|
2273
|
+
personaTag: (_viewAs$persona2 = viewAs.persona) == null ? void 0 : _viewAs$persona2.keyTag
|
|
2293
2274
|
};
|
|
2294
|
-
return jsx("div",
|
|
2275
|
+
return jsx("div", {
|
|
2295
2276
|
onPointerEnter: onPointerEnterHandler,
|
|
2296
2277
|
"data-dot": "contentlet",
|
|
2297
|
-
"data-content": JSON.stringify(contentletPayload)
|
|
2298
|
-
}, {
|
|
2278
|
+
"data-content": JSON.stringify(contentletPayload),
|
|
2299
2279
|
children: jsx(Component, Object.assign({}, contentlet))
|
|
2300
|
-
}
|
|
2280
|
+
}, contentlet.identifier);
|
|
2301
2281
|
})
|
|
2302
|
-
})
|
|
2282
|
+
});
|
|
2303
2283
|
}
|
|
2304
2284
|
|
|
2305
2285
|
function Column({
|
|
@@ -2336,48 +2316,46 @@ function Column({
|
|
|
2336
2316
|
const widthClass = widthClassMap[column.width];
|
|
2337
2317
|
const startClass = statrClassMap[column.leftOffset];
|
|
2338
2318
|
const combinedClasses = [styles[widthClass], styles[startClass], column.styleClass].filter(Boolean).join(' ');
|
|
2339
|
-
return jsx("div",
|
|
2319
|
+
return jsx("div", {
|
|
2340
2320
|
"data-dot": "column",
|
|
2341
2321
|
"data-testid": "column",
|
|
2342
|
-
className: combinedClasses
|
|
2343
|
-
}, {
|
|
2322
|
+
className: combinedClasses,
|
|
2344
2323
|
children: column.containers.map(container => jsx(Container, {
|
|
2345
2324
|
containerRef: container
|
|
2346
2325
|
}, `${container.identifier}-${container.uuid}`))
|
|
2347
|
-
})
|
|
2326
|
+
});
|
|
2348
2327
|
}
|
|
2349
2328
|
|
|
2350
|
-
/**
|
|
2351
|
-
* Renders a row
|
|
2352
|
-
*
|
|
2353
|
-
* @category Components
|
|
2354
|
-
* @param {React.ForwardedRef<HTMLDivElement, RowProps>} ref
|
|
2355
|
-
* @return {*}
|
|
2329
|
+
/**
|
|
2330
|
+
* Renders a row
|
|
2331
|
+
*
|
|
2332
|
+
* @category Components
|
|
2333
|
+
* @param {React.ForwardedRef<HTMLDivElement, RowProps>} ref
|
|
2334
|
+
* @return {*}
|
|
2356
2335
|
*/
|
|
2357
2336
|
const Row = /*#__PURE__*/forwardRef((props, ref) => {
|
|
2358
2337
|
const {
|
|
2359
2338
|
row
|
|
2360
2339
|
} = props;
|
|
2361
2340
|
const combinedClasses = [styles$1.row, row.styleClass].filter(Boolean).join(' ');
|
|
2362
|
-
return jsx("div",
|
|
2341
|
+
return jsx("div", {
|
|
2363
2342
|
"data-testid": "row",
|
|
2364
2343
|
"data-dot": "row",
|
|
2365
2344
|
ref: ref,
|
|
2366
|
-
className: combinedClasses
|
|
2367
|
-
}, {
|
|
2345
|
+
className: combinedClasses,
|
|
2368
2346
|
children: row.columns.map((column, index) => jsx(Column, {
|
|
2369
2347
|
column: column
|
|
2370
2348
|
}, index))
|
|
2371
|
-
})
|
|
2349
|
+
});
|
|
2372
2350
|
});
|
|
2373
2351
|
|
|
2374
|
-
/**
|
|
2375
|
-
* `DotcmsLayout` is a functional component that renders a layout for a DotCMS page.
|
|
2376
|
-
* It takes a `DotcmsPageProps` object as a parameter and returns a JSX element.
|
|
2377
|
-
*
|
|
2378
|
-
* @category Components
|
|
2379
|
-
* @param {DotcmsPageProps} props - The properties for the DotCMS page.
|
|
2380
|
-
* @returns {JSX.Element} - A JSX element that represents the layout for a DotCMS page.
|
|
2352
|
+
/**
|
|
2353
|
+
* `DotcmsLayout` is a functional component that renders a layout for a DotCMS page.
|
|
2354
|
+
* It takes a `DotcmsPageProps` object as a parameter and returns a JSX element.
|
|
2355
|
+
*
|
|
2356
|
+
* @category Components
|
|
2357
|
+
* @param {DotcmsPageProps} props - The properties for the DotCMS page.
|
|
2358
|
+
* @returns {JSX.Element} - A JSX element that represents the layout for a DotCMS page.
|
|
2381
2359
|
*/
|
|
2382
2360
|
function DotcmsLayout(props) {
|
|
2383
2361
|
const {
|
|
@@ -2389,22 +2367,21 @@ function DotcmsLayout(props) {
|
|
|
2389
2367
|
rowsRef.current.push(el);
|
|
2390
2368
|
}
|
|
2391
2369
|
};
|
|
2392
|
-
return jsx(PageProvider,
|
|
2393
|
-
entity: entity
|
|
2394
|
-
}, {
|
|
2370
|
+
return jsx(PageProvider, {
|
|
2371
|
+
entity: entity,
|
|
2395
2372
|
children: entity.layout.body.rows.map((row, index) => jsx(Row, {
|
|
2396
2373
|
ref: addRowRef,
|
|
2397
2374
|
row: row
|
|
2398
2375
|
}, index))
|
|
2399
|
-
})
|
|
2376
|
+
});
|
|
2400
2377
|
}
|
|
2401
2378
|
|
|
2402
|
-
/**
|
|
2403
|
-
* `useDotcmsPageContext` is a custom React hook that provides access to the `PageProviderContext`.
|
|
2404
|
-
* It takes no parameters and returns the context value or `null` if it's not available.
|
|
2405
|
-
*
|
|
2406
|
-
* @category Hooks
|
|
2407
|
-
* @returns {PageProviderContext | null} - The context value or `null` if it's not available.
|
|
2379
|
+
/**
|
|
2380
|
+
* `useDotcmsPageContext` is a custom React hook that provides access to the `PageProviderContext`.
|
|
2381
|
+
* It takes no parameters and returns the context value or `null` if it's not available.
|
|
2382
|
+
*
|
|
2383
|
+
* @category Hooks
|
|
2384
|
+
* @returns {PageProviderContext | null} - The context value or `null` if it's not available.
|
|
2408
2385
|
*/
|
|
2409
2386
|
function useDotcmsPageContext() {
|
|
2410
2387
|
return useContext(PageContext);
|