@mattisvensson/strapi-plugin-webatlas 0.2.5 → 0.3.0
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/README.md +2 -3
- package/dist/_chunks/{_baseConvert-DVIhGQH6.js.map → _baseConvert-B84_vf8X.js.map} +1 -1
- package/dist/_chunks/{_baseConvert-CDjccxdO.mjs.map → _baseConvert-C2SW1VHq.mjs.map} +1 -1
- package/dist/_chunks/de-4tL_cJTC.js +104 -0
- package/dist/_chunks/de-4tL_cJTC.js.map +1 -0
- package/dist/_chunks/de-C8PE3n3B.mjs +104 -0
- package/dist/_chunks/de-C8PE3n3B.mjs.map +1 -0
- package/dist/_chunks/en-Bg4z3fR7.js +104 -0
- package/dist/_chunks/en-Bg4z3fR7.js.map +1 -0
- package/dist/_chunks/en-CR1YZvJo.mjs +104 -0
- package/dist/_chunks/en-CR1YZvJo.mjs.map +1 -0
- package/dist/_chunks/{index-B-ABW-o6.js → index-B0XE_zRP.js} +298 -91
- package/dist/_chunks/index-B2Tiv3EK.mjs +92 -0
- package/dist/_chunks/{index-HHBjOGX5.mjs → index-B48CGofU.mjs} +70 -30
- package/dist/_chunks/{index-HHBjOGX5.mjs.map → index-B48CGofU.mjs.map} +1 -1
- package/dist/_chunks/{index-CAjBRbaH.js → index-B85fJxGa.js} +170 -77
- package/dist/_chunks/{index-Cs_oxZfX.js → index-BbM9Sn1t.js} +169 -108
- package/dist/_chunks/{index-BxuR805w.mjs → index-BocSkZOu.mjs} +57 -17
- package/dist/_chunks/{index-D_OdzeaU.mjs → index-C7B8QHDT.mjs} +296 -89
- package/dist/_chunks/{index-BjbgWZrg.mjs → index-CCiDvLAC.mjs} +171 -78
- package/dist/_chunks/index-CXzNr2cH.mjs +93 -0
- package/dist/_chunks/index-CXzNr2cH.mjs.map +1 -0
- package/dist/_chunks/{index-kz3NL7uv.js → index-Cd6y6nuf.js} +57 -8
- package/dist/_chunks/index-Cd6y6nuf.js.map +1 -0
- package/dist/_chunks/{index-CPE1Ne_e.js → index-Cf9ZIBLd.js} +171 -78
- package/dist/_chunks/index-Cf9ZIBLd.js.map +1 -0
- package/dist/_chunks/{index-yLrZAFVv.mjs → index-D981K4TK.mjs} +172 -79
- package/dist/_chunks/index-D981K4TK.mjs.map +1 -0
- package/dist/_chunks/{index-Djk_-mU6.js → index-DGb8ESH-.js} +56 -9
- package/dist/_chunks/{index-CuMn96qA.js → index-DYiJBXKE.js} +300 -93
- package/dist/_chunks/index-DYiJBXKE.js.map +1 -0
- package/dist/_chunks/{index-B7vKSyAn.js → index-DjZ3ZaVB.js} +60 -20
- package/dist/_chunks/{index-B7vKSyAn.js.map → index-DjZ3ZaVB.js.map} +1 -1
- package/dist/_chunks/{index-ChOgKZGK.mjs → index-DkhJl5mF.mjs} +298 -91
- package/dist/_chunks/index-DkhJl5mF.mjs.map +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/CMEditViewAside/Alias.d.ts +1 -1
- package/dist/admin/src/components/URLInfo.d.ts +2 -1
- package/dist/admin/src/components/modals/NavModal.d.ts +2 -1
- package/dist/admin/src/utils/getRouteType.d.ts +2 -0
- package/dist/admin/src/utils/index.d.ts +2 -1
- package/dist/server/index.js +23 -12
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +23 -12
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/content-types/index.d.ts +5 -5
- package/dist/server/src/content-types/navigation/index.d.ts +1 -1
- package/dist/server/src/content-types/navigation/schema.d.ts +1 -1
- package/dist/server/src/content-types/navitem/index.d.ts +3 -3
- package/dist/server/src/content-types/navitem/schema.d.ts +3 -3
- package/dist/server/src/content-types/route/index.d.ts +1 -1
- package/dist/server/src/content-types/route/schema.d.ts +1 -1
- package/dist/server/src/index.d.ts +5 -5
- package/package.json +1 -1
- package/dist/_chunks/_baseConvert-CDjccxdO.mjs +0 -859
- package/dist/_chunks/_baseConvert-DVIhGQH6.js +0 -858
- package/dist/_chunks/en-B4KWt_jN.js +0 -4
- package/dist/_chunks/en-B4KWt_jN.js.map +0 -1
- package/dist/_chunks/en-Byx4XI2L.mjs +0 -4
- package/dist/_chunks/en-Byx4XI2L.mjs.map +0 -1
- package/dist/_chunks/index-1VNPebOd.mjs +0 -45
- package/dist/_chunks/index-1VNPebOd.mjs.map +0 -1
- package/dist/_chunks/index-B5ilx6DT.mjs +0 -44
- package/dist/_chunks/index-CPE1Ne_e.js.map +0 -1
- package/dist/_chunks/index-ChOgKZGK.mjs.map +0 -1
- package/dist/_chunks/index-CuMn96qA.js.map +0 -1
- package/dist/_chunks/index-Djk_-mU6.js.map +0 -1
- package/dist/_chunks/index-yLrZAFVv.mjs.map +0 -1
|
@@ -11,7 +11,7 @@ const reactIntl = require("react-intl");
|
|
|
11
11
|
require("@strapi/icons/symbols");
|
|
12
12
|
const ReactDOM = require("react-dom");
|
|
13
13
|
const styledComponents = require("styled-components");
|
|
14
|
-
const index = require("./index-
|
|
14
|
+
const index = require("./index-B85fJxGa.js");
|
|
15
15
|
const _interopDefault = (e2) => e2 && e2.__esModule ? e2 : { default: e2 };
|
|
16
16
|
function _interopNamespace(e2) {
|
|
17
17
|
if (e2 && e2.__esModule) return e2;
|
|
@@ -1414,7 +1414,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
1414
1414
|
var ys = arrObjKeys(obj, inspect2);
|
|
1415
1415
|
var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
1416
1416
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
1417
|
-
var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr
|
|
1417
|
+
var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
1418
1418
|
var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
1419
1419
|
var tag = constructorTag + (stringTag2 || protoTag ? "[" + $join.call($concat$1.call([], stringTag2 || [], protoTag || []), ": ") + "] " : "");
|
|
1420
1420
|
if (ys.length === 0) {
|
|
@@ -1436,25 +1436,25 @@ function quote(s2) {
|
|
|
1436
1436
|
return $replace$1.call(String(s2), /"/g, """);
|
|
1437
1437
|
}
|
|
1438
1438
|
function isArray$8(obj) {
|
|
1439
|
-
return toStr
|
|
1439
|
+
return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1440
1440
|
}
|
|
1441
1441
|
function isDate$2(obj) {
|
|
1442
|
-
return toStr
|
|
1442
|
+
return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1443
1443
|
}
|
|
1444
1444
|
function isRegExp$1(obj) {
|
|
1445
|
-
return toStr
|
|
1445
|
+
return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1446
1446
|
}
|
|
1447
1447
|
function isError$2(obj) {
|
|
1448
|
-
return toStr
|
|
1448
|
+
return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1449
1449
|
}
|
|
1450
1450
|
function isString(obj) {
|
|
1451
|
-
return toStr
|
|
1451
|
+
return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1452
1452
|
}
|
|
1453
1453
|
function isNumber(obj) {
|
|
1454
|
-
return toStr
|
|
1454
|
+
return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1455
1455
|
}
|
|
1456
1456
|
function isBoolean(obj) {
|
|
1457
|
-
return toStr
|
|
1457
|
+
return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1458
1458
|
}
|
|
1459
1459
|
function isSymbol$2(obj) {
|
|
1460
1460
|
if (hasShammedSymbols) {
|
|
@@ -1490,7 +1490,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
|
|
|
1490
1490
|
function has$5(obj, key) {
|
|
1491
1491
|
return hasOwn$1.call(obj, key);
|
|
1492
1492
|
}
|
|
1493
|
-
function toStr
|
|
1493
|
+
function toStr(obj) {
|
|
1494
1494
|
return objectToString.call(obj);
|
|
1495
1495
|
}
|
|
1496
1496
|
function nameOf(f2) {
|
|
@@ -1799,7 +1799,7 @@ var syntax = SyntaxError;
|
|
|
1799
1799
|
var uri = URIError;
|
|
1800
1800
|
var abs$1 = Math.abs;
|
|
1801
1801
|
var floor$1 = Math.floor;
|
|
1802
|
-
var max$
|
|
1802
|
+
var max$1 = Math.max;
|
|
1803
1803
|
var min$1 = Math.min;
|
|
1804
1804
|
var pow$1 = Math.pow;
|
|
1805
1805
|
var round$1 = Math.round;
|
|
@@ -1928,78 +1928,99 @@ function requireObject_getPrototypeOf() {
|
|
|
1928
1928
|
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
1929
1929
|
return Object_getPrototypeOf;
|
|
1930
1930
|
}
|
|
1931
|
-
var
|
|
1932
|
-
var
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
var
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
arr
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
};
|
|
1945
|
-
var slicy = function slicy2(arrLike, offset) {
|
|
1946
|
-
var arr = [];
|
|
1947
|
-
for (var i2 = offset, j2 = 0; i2 < arrLike.length; i2 += 1, j2 += 1) {
|
|
1948
|
-
arr[j2] = arrLike[i2];
|
|
1949
|
-
}
|
|
1950
|
-
return arr;
|
|
1951
|
-
};
|
|
1952
|
-
var joiny = function(arr, joiner) {
|
|
1953
|
-
var str = "";
|
|
1954
|
-
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
1955
|
-
str += arr[i2];
|
|
1956
|
-
if (i2 + 1 < arr.length) {
|
|
1957
|
-
str += joiner;
|
|
1931
|
+
var implementation;
|
|
1932
|
+
var hasRequiredImplementation;
|
|
1933
|
+
function requireImplementation() {
|
|
1934
|
+
if (hasRequiredImplementation) return implementation;
|
|
1935
|
+
hasRequiredImplementation = 1;
|
|
1936
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
1937
|
+
var toStr2 = Object.prototype.toString;
|
|
1938
|
+
var max2 = Math.max;
|
|
1939
|
+
var funcType = "[object Function]";
|
|
1940
|
+
var concatty = function concatty2(a2, b2) {
|
|
1941
|
+
var arr = [];
|
|
1942
|
+
for (var i2 = 0; i2 < a2.length; i2 += 1) {
|
|
1943
|
+
arr[i2] = a2[i2];
|
|
1958
1944
|
}
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
}
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
if (
|
|
1976
|
-
|
|
1945
|
+
for (var j2 = 0; j2 < b2.length; j2 += 1) {
|
|
1946
|
+
arr[j2 + a2.length] = b2[j2];
|
|
1947
|
+
}
|
|
1948
|
+
return arr;
|
|
1949
|
+
};
|
|
1950
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
1951
|
+
var arr = [];
|
|
1952
|
+
for (var i2 = offset, j2 = 0; i2 < arrLike.length; i2 += 1, j2 += 1) {
|
|
1953
|
+
arr[j2] = arrLike[i2];
|
|
1954
|
+
}
|
|
1955
|
+
return arr;
|
|
1956
|
+
};
|
|
1957
|
+
var joiny = function(arr, joiner) {
|
|
1958
|
+
var str = "";
|
|
1959
|
+
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
1960
|
+
str += arr[i2];
|
|
1961
|
+
if (i2 + 1 < arr.length) {
|
|
1962
|
+
str += joiner;
|
|
1977
1963
|
}
|
|
1978
|
-
return this;
|
|
1979
1964
|
}
|
|
1980
|
-
return
|
|
1981
|
-
that,
|
|
1982
|
-
concatty(args, arguments)
|
|
1983
|
-
);
|
|
1965
|
+
return str;
|
|
1984
1966
|
};
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
var
|
|
1967
|
+
implementation = function bind2(that) {
|
|
1968
|
+
var target = this;
|
|
1969
|
+
if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
|
|
1970
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
1971
|
+
}
|
|
1972
|
+
var args = slicy(arguments, 1);
|
|
1973
|
+
var bound;
|
|
1974
|
+
var binder = function() {
|
|
1975
|
+
if (this instanceof bound) {
|
|
1976
|
+
var result = target.apply(
|
|
1977
|
+
this,
|
|
1978
|
+
concatty(args, arguments)
|
|
1979
|
+
);
|
|
1980
|
+
if (Object(result) === result) {
|
|
1981
|
+
return result;
|
|
1982
|
+
}
|
|
1983
|
+
return this;
|
|
1984
|
+
}
|
|
1985
|
+
return target.apply(
|
|
1986
|
+
that,
|
|
1987
|
+
concatty(args, arguments)
|
|
1988
|
+
);
|
|
1993
1989
|
};
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
};
|
|
2000
|
-
|
|
2001
|
-
var
|
|
2002
|
-
|
|
1990
|
+
var boundLength = max2(0, target.length - args.length);
|
|
1991
|
+
var boundArgs = [];
|
|
1992
|
+
for (var i2 = 0; i2 < boundLength; i2++) {
|
|
1993
|
+
boundArgs[i2] = "$" + i2;
|
|
1994
|
+
}
|
|
1995
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
1996
|
+
if (target.prototype) {
|
|
1997
|
+
var Empty = function Empty2() {
|
|
1998
|
+
};
|
|
1999
|
+
Empty.prototype = target.prototype;
|
|
2000
|
+
bound.prototype = new Empty();
|
|
2001
|
+
Empty.prototype = null;
|
|
2002
|
+
}
|
|
2003
|
+
return bound;
|
|
2004
|
+
};
|
|
2005
|
+
return implementation;
|
|
2006
|
+
}
|
|
2007
|
+
var functionBind;
|
|
2008
|
+
var hasRequiredFunctionBind;
|
|
2009
|
+
function requireFunctionBind() {
|
|
2010
|
+
if (hasRequiredFunctionBind) return functionBind;
|
|
2011
|
+
hasRequiredFunctionBind = 1;
|
|
2012
|
+
var implementation2 = requireImplementation();
|
|
2013
|
+
functionBind = Function.prototype.bind || implementation2;
|
|
2014
|
+
return functionBind;
|
|
2015
|
+
}
|
|
2016
|
+
var functionCall;
|
|
2017
|
+
var hasRequiredFunctionCall;
|
|
2018
|
+
function requireFunctionCall() {
|
|
2019
|
+
if (hasRequiredFunctionCall) return functionCall;
|
|
2020
|
+
hasRequiredFunctionCall = 1;
|
|
2021
|
+
functionCall = Function.prototype.call;
|
|
2022
|
+
return functionCall;
|
|
2023
|
+
}
|
|
2003
2024
|
var functionApply;
|
|
2004
2025
|
var hasRequiredFunctionApply;
|
|
2005
2026
|
function requireFunctionApply() {
|
|
@@ -2009,14 +2030,14 @@ function requireFunctionApply() {
|
|
|
2009
2030
|
return functionApply;
|
|
2010
2031
|
}
|
|
2011
2032
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
2012
|
-
var bind$2 =
|
|
2033
|
+
var bind$2 = requireFunctionBind();
|
|
2013
2034
|
var $apply$1 = requireFunctionApply();
|
|
2014
|
-
var $call$2 =
|
|
2035
|
+
var $call$2 = requireFunctionCall();
|
|
2015
2036
|
var $reflectApply = reflectApply;
|
|
2016
2037
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
2017
|
-
var bind$1 =
|
|
2038
|
+
var bind$1 = requireFunctionBind();
|
|
2018
2039
|
var $TypeError$4 = type;
|
|
2019
|
-
var $call$1 =
|
|
2040
|
+
var $call$1 = requireFunctionCall();
|
|
2020
2041
|
var $actualApply = actualApply;
|
|
2021
2042
|
var callBindApplyHelpers = function callBindBasic(args) {
|
|
2022
2043
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -2082,8 +2103,8 @@ function requireHasown() {
|
|
|
2082
2103
|
hasRequiredHasown = 1;
|
|
2083
2104
|
var call = Function.prototype.call;
|
|
2084
2105
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
2085
|
-
var
|
|
2086
|
-
hasown =
|
|
2106
|
+
var bind2 = requireFunctionBind();
|
|
2107
|
+
hasown = bind2.call(call, $hasOwn);
|
|
2087
2108
|
return hasown;
|
|
2088
2109
|
}
|
|
2089
2110
|
var undefined$1;
|
|
@@ -2097,7 +2118,7 @@ var $TypeError$3 = type;
|
|
|
2097
2118
|
var $URIError = uri;
|
|
2098
2119
|
var abs = abs$1;
|
|
2099
2120
|
var floor = floor$1;
|
|
2100
|
-
var max = max$
|
|
2121
|
+
var max = max$1;
|
|
2101
2122
|
var min = min$1;
|
|
2102
2123
|
var pow = pow$1;
|
|
2103
2124
|
var round = round$1;
|
|
@@ -2131,7 +2152,7 @@ var getProto = requireGetProto();
|
|
|
2131
2152
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
2132
2153
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
2133
2154
|
var $apply = requireFunctionApply();
|
|
2134
|
-
var $call =
|
|
2155
|
+
var $call = requireFunctionCall();
|
|
2135
2156
|
var needsEval = {};
|
|
2136
2157
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
2137
2158
|
var INTRINSICS = {
|
|
@@ -2301,13 +2322,13 @@ var LEGACY_ALIASES = {
|
|
|
2301
2322
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2302
2323
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2303
2324
|
};
|
|
2304
|
-
var
|
|
2325
|
+
var bind = requireFunctionBind();
|
|
2305
2326
|
var hasOwn = requireHasown();
|
|
2306
|
-
var $concat =
|
|
2307
|
-
var $spliceApply =
|
|
2308
|
-
var $replace =
|
|
2309
|
-
var $strSlice =
|
|
2310
|
-
var $exec =
|
|
2327
|
+
var $concat = bind.call($call, Array.prototype.concat);
|
|
2328
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
2329
|
+
var $replace = bind.call($call, String.prototype.replace);
|
|
2330
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
2331
|
+
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
2311
2332
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
2312
2333
|
var reEscapeChar = /\\(\\)?/g;
|
|
2313
2334
|
var stringToPath$1 = function stringToPath(string2) {
|
|
@@ -16957,6 +16978,7 @@ const Settings = () => {
|
|
|
16957
16978
|
const { contentTypes: allContentTypesData } = index.useAllContentTypes();
|
|
16958
16979
|
const allContentTypes = allContentTypesData?.filter((ct) => ct.pluginOptions?.webatlas?.active === true);
|
|
16959
16980
|
const [initialState2, setInitialState] = React.useState(config || { selectedContentTypes: [] });
|
|
16981
|
+
const { formatMessage } = reactIntl.useIntl();
|
|
16960
16982
|
function reducer2(settingsState2, action) {
|
|
16961
16983
|
let updatedContentTypes;
|
|
16962
16984
|
switch (action.type) {
|
|
@@ -16999,8 +17021,11 @@ const Settings = () => {
|
|
|
16999
17021
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17000
17022
|
Layouts.Header,
|
|
17001
17023
|
{
|
|
17002
|
-
title:
|
|
17003
|
-
subtitle:
|
|
17024
|
+
title: index.PLUGIN_NAME,
|
|
17025
|
+
subtitle: formatMessage({
|
|
17026
|
+
id: index.getTranslation("settings.page.subtitle"),
|
|
17027
|
+
defaultMessage: "Settings"
|
|
17028
|
+
}),
|
|
17004
17029
|
primaryAction: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17005
17030
|
designSystem.Button,
|
|
17006
17031
|
{
|
|
@@ -17008,7 +17033,10 @@ const Settings = () => {
|
|
|
17008
17033
|
startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Check, {}),
|
|
17009
17034
|
onClick: save,
|
|
17010
17035
|
disabled: JSON.stringify(settingsState) === JSON.stringify(initialState2) || settingsState.selectedContentTypes.find((cta) => !cta.default) !== void 0,
|
|
17011
|
-
children:
|
|
17036
|
+
children: formatMessage({
|
|
17037
|
+
id: index.getTranslation("save"),
|
|
17038
|
+
defaultMessage: "Save"
|
|
17039
|
+
})
|
|
17012
17040
|
}
|
|
17013
17041
|
)
|
|
17014
17042
|
}
|
|
@@ -17030,13 +17058,22 @@ const Settings = () => {
|
|
|
17030
17058
|
designSystem.Field.Root,
|
|
17031
17059
|
{
|
|
17032
17060
|
name: "selectedContentTypes",
|
|
17033
|
-
hint:
|
|
17061
|
+
hint: formatMessage({
|
|
17062
|
+
id: index.getTranslation("settings.page.enabledContentTypes.hint"),
|
|
17063
|
+
defaultMessage: "Select the content types for which you want to enable URL aliases"
|
|
17064
|
+
}),
|
|
17034
17065
|
children: [
|
|
17035
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children:
|
|
17066
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
|
|
17067
|
+
id: index.getTranslation("settings.page.enabledContentTypes"),
|
|
17068
|
+
defaultMessage: "Enabled Content Types"
|
|
17069
|
+
}) }),
|
|
17036
17070
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17037
17071
|
designSystem.MultiSelect,
|
|
17038
17072
|
{
|
|
17039
|
-
placeholder:
|
|
17073
|
+
placeholder: formatMessage({
|
|
17074
|
+
id: index.getTranslation("settings.page.enabledContentTypes.placeholder"),
|
|
17075
|
+
defaultMessage: "Select content types..."
|
|
17076
|
+
}),
|
|
17040
17077
|
onClear: () => dispatch({ type: "SET_SELECTED_CONTENT_TYPES", payload: [] }),
|
|
17041
17078
|
value: [...settingsState.selectedContentTypes.map((ct) => ct.uid)],
|
|
17042
17079
|
onChange: (value) => dispatch({
|
|
@@ -17056,8 +17093,11 @@ const Settings = () => {
|
|
|
17056
17093
|
}
|
|
17057
17094
|
),
|
|
17058
17095
|
settingsState.selectedContentTypes && settingsState.selectedContentTypes.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "selectedContentTypesAccordion", children: [
|
|
17059
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children:
|
|
17060
|
-
|
|
17096
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
|
|
17097
|
+
id: index.getTranslation("settings.page.contentTypeSettings"),
|
|
17098
|
+
defaultMessage: "Content Type settings"
|
|
17099
|
+
}) }),
|
|
17100
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Root, { children: settingsState.selectedContentTypes?.map((contentType) => {
|
|
17061
17101
|
const ct = allContentTypes?.find((item) => item.uid === contentType.uid);
|
|
17062
17102
|
if (!ct) return null;
|
|
17063
17103
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17071,11 +17111,20 @@ const Settings = () => {
|
|
|
17071
17111
|
designSystem.Field.Root,
|
|
17072
17112
|
{
|
|
17073
17113
|
name: "selectedContentTypes",
|
|
17074
|
-
hint:
|
|
17075
|
-
|
|
17114
|
+
hint: formatMessage({
|
|
17115
|
+
id: index.getTranslation("settings.page.defaultField.hint"),
|
|
17116
|
+
defaultMessage: 'The selected field from the content type will be used to generate the URL alias. Use a field that is unique and descriptive, such as a "title" or "name".'
|
|
17117
|
+
}),
|
|
17118
|
+
error: !contentType.default && formatMessage({
|
|
17119
|
+
id: index.getTranslation("settings.page.defaultField.error"),
|
|
17120
|
+
defaultMessage: "Please select a default field"
|
|
17121
|
+
}),
|
|
17076
17122
|
required: true,
|
|
17077
17123
|
children: [
|
|
17078
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children:
|
|
17124
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
|
|
17125
|
+
id: index.getTranslation("settings.page.defaultField"),
|
|
17126
|
+
defaultMessage: "Default URL Alias field"
|
|
17127
|
+
}) }),
|
|
17079
17128
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17080
17129
|
designSystem.SingleSelect,
|
|
17081
17130
|
{
|
|
@@ -17084,7 +17133,7 @@ const Settings = () => {
|
|
|
17084
17133
|
value: contentType?.default || "",
|
|
17085
17134
|
onChange: (value) => dispatch({ type: "SET_DEFAULT_FIELD", payload: { ctUid: ct.uid, field: value } }),
|
|
17086
17135
|
children: Object.entries(ct.attributes).map(([key], index2) => {
|
|
17087
|
-
if (key === "id" || key === "createdAt" || key === "updatedAt" || key === "createdBy" || key === "updatedBy") return null;
|
|
17136
|
+
if (key === "id" || key === "documentId" || key === "createdAt" || key === "updatedAt" || key === "createdBy" || key === "updatedBy" || key === "webatlas_path" || key === "webatlas_override") return null;
|
|
17088
17137
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: key, children: key }, index2);
|
|
17089
17138
|
})
|
|
17090
17139
|
}
|
|
@@ -17097,11 +17146,20 @@ const Settings = () => {
|
|
|
17097
17146
|
designSystem.Field.Root,
|
|
17098
17147
|
{
|
|
17099
17148
|
name: "urlAliasPattern",
|
|
17100
|
-
hint:
|
|
17149
|
+
hint: formatMessage({
|
|
17150
|
+
id: index.getTranslation("settings.page.urlAliasPattern.hint"),
|
|
17151
|
+
defaultMessage: 'The pattern to prepend to the generated URL alias. For example, if you enter "blog" and the value of default field is "My First Post", the generated URL alias will be "blog/my-first-post". Leave empty for no prefix.'
|
|
17152
|
+
}),
|
|
17101
17153
|
children: [
|
|
17102
17154
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Label, { children: [
|
|
17103
|
-
|
|
17104
|
-
|
|
17155
|
+
formatMessage({
|
|
17156
|
+
id: index.getTranslation("settings.page.urlAliasPattern"),
|
|
17157
|
+
defaultMessage: "URL Alias Pattern"
|
|
17158
|
+
}),
|
|
17159
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Tooltip, { description: formatMessage({
|
|
17160
|
+
id: index.getTranslation("settings.page.urlAliasPattern.tooltip"),
|
|
17161
|
+
defaultMessage: "Leading and trailing slashes will be removed. Spaces will be replaced with hyphens. Special characters will be encoded."
|
|
17162
|
+
}) })
|
|
17105
17163
|
] }),
|
|
17106
17164
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17107
17165
|
designSystem.Field.Input,
|
|
@@ -17110,7 +17168,10 @@ const Settings = () => {
|
|
|
17110
17168
|
onChange: (e2) => dispatch({ type: "SET_PATTERN", payload: { ctUid: ct.uid, pattern: e2.target.value } }),
|
|
17111
17169
|
disabled: !contentType.default,
|
|
17112
17170
|
type: "text",
|
|
17113
|
-
placeholder:
|
|
17171
|
+
placeholder: formatMessage({
|
|
17172
|
+
id: index.getTranslation("settings.page.urlAliasPattern.placeholder"),
|
|
17173
|
+
defaultMessage: "e.g. blog"
|
|
17174
|
+
})
|
|
17114
17175
|
}
|
|
17115
17176
|
),
|
|
17116
17177
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
|
|
@@ -10,7 +10,7 @@ import { useIntl } from "react-intl";
|
|
|
10
10
|
import "@strapi/icons/symbols";
|
|
11
11
|
import ReactDOM__default, { unstable_batchedUpdates as unstable_batchedUpdates$1 } from "react-dom";
|
|
12
12
|
import { createGlobalStyle, styled } from "styled-components";
|
|
13
|
-
import { _ as _extends$4, b as usePluginConfig, c as useAllContentTypes, t as transformToUrl, T as Tooltip } from "./index-
|
|
13
|
+
import { _ as _extends$4, b as usePluginConfig, c as useAllContentTypes, t as transformToUrl, P as PLUGIN_NAME, g as getTranslation, T as Tooltip } from "./index-CCiDvLAC.mjs";
|
|
14
14
|
var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
15
15
|
var _freeGlobal = freeGlobal$1;
|
|
16
16
|
var freeGlobal = _freeGlobal;
|
|
@@ -16957,6 +16957,7 @@ const Settings = () => {
|
|
|
16957
16957
|
const { contentTypes: allContentTypesData } = useAllContentTypes();
|
|
16958
16958
|
const allContentTypes = allContentTypesData?.filter((ct) => ct.pluginOptions?.webatlas?.active === true);
|
|
16959
16959
|
const [initialState2, setInitialState] = useState(config || { selectedContentTypes: [] });
|
|
16960
|
+
const { formatMessage } = useIntl();
|
|
16960
16961
|
function reducer2(settingsState2, action) {
|
|
16961
16962
|
let updatedContentTypes;
|
|
16962
16963
|
switch (action.type) {
|
|
@@ -16999,8 +17000,11 @@ const Settings = () => {
|
|
|
16999
17000
|
/* @__PURE__ */ jsx(
|
|
17000
17001
|
Layouts.Header,
|
|
17001
17002
|
{
|
|
17002
|
-
title:
|
|
17003
|
-
subtitle:
|
|
17003
|
+
title: PLUGIN_NAME,
|
|
17004
|
+
subtitle: formatMessage({
|
|
17005
|
+
id: getTranslation("settings.page.subtitle"),
|
|
17006
|
+
defaultMessage: "Settings"
|
|
17007
|
+
}),
|
|
17004
17008
|
primaryAction: /* @__PURE__ */ jsx(
|
|
17005
17009
|
Button,
|
|
17006
17010
|
{
|
|
@@ -17008,7 +17012,10 @@ const Settings = () => {
|
|
|
17008
17012
|
startIcon: /* @__PURE__ */ jsx(Check, {}),
|
|
17009
17013
|
onClick: save,
|
|
17010
17014
|
disabled: JSON.stringify(settingsState) === JSON.stringify(initialState2) || settingsState.selectedContentTypes.find((cta) => !cta.default) !== void 0,
|
|
17011
|
-
children:
|
|
17015
|
+
children: formatMessage({
|
|
17016
|
+
id: getTranslation("save"),
|
|
17017
|
+
defaultMessage: "Save"
|
|
17018
|
+
})
|
|
17012
17019
|
}
|
|
17013
17020
|
)
|
|
17014
17021
|
}
|
|
@@ -17030,13 +17037,22 @@ const Settings = () => {
|
|
|
17030
17037
|
Field.Root,
|
|
17031
17038
|
{
|
|
17032
17039
|
name: "selectedContentTypes",
|
|
17033
|
-
hint:
|
|
17040
|
+
hint: formatMessage({
|
|
17041
|
+
id: getTranslation("settings.page.enabledContentTypes.hint"),
|
|
17042
|
+
defaultMessage: "Select the content types for which you want to enable URL aliases"
|
|
17043
|
+
}),
|
|
17034
17044
|
children: [
|
|
17035
|
-
/* @__PURE__ */ jsx(Field.Label, { children:
|
|
17045
|
+
/* @__PURE__ */ jsx(Field.Label, { children: formatMessage({
|
|
17046
|
+
id: getTranslation("settings.page.enabledContentTypes"),
|
|
17047
|
+
defaultMessage: "Enabled Content Types"
|
|
17048
|
+
}) }),
|
|
17036
17049
|
/* @__PURE__ */ jsx(
|
|
17037
17050
|
MultiSelect,
|
|
17038
17051
|
{
|
|
17039
|
-
placeholder:
|
|
17052
|
+
placeholder: formatMessage({
|
|
17053
|
+
id: getTranslation("settings.page.enabledContentTypes.placeholder"),
|
|
17054
|
+
defaultMessage: "Select content types..."
|
|
17055
|
+
}),
|
|
17040
17056
|
onClear: () => dispatch({ type: "SET_SELECTED_CONTENT_TYPES", payload: [] }),
|
|
17041
17057
|
value: [...settingsState.selectedContentTypes.map((ct) => ct.uid)],
|
|
17042
17058
|
onChange: (value) => dispatch({
|
|
@@ -17056,8 +17072,11 @@ const Settings = () => {
|
|
|
17056
17072
|
}
|
|
17057
17073
|
),
|
|
17058
17074
|
settingsState.selectedContentTypes && settingsState.selectedContentTypes.length > 0 && /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsxs(Field.Root, { name: "selectedContentTypesAccordion", children: [
|
|
17059
|
-
/* @__PURE__ */ jsx(Field.Label, { children:
|
|
17060
|
-
|
|
17075
|
+
/* @__PURE__ */ jsx(Field.Label, { children: formatMessage({
|
|
17076
|
+
id: getTranslation("settings.page.contentTypeSettings"),
|
|
17077
|
+
defaultMessage: "Content Type settings"
|
|
17078
|
+
}) }),
|
|
17079
|
+
/* @__PURE__ */ jsx(Accordion.Root, { children: settingsState.selectedContentTypes?.map((contentType) => {
|
|
17061
17080
|
const ct = allContentTypes?.find((item) => item.uid === contentType.uid);
|
|
17062
17081
|
if (!ct) return null;
|
|
17063
17082
|
return /* @__PURE__ */ jsx(
|
|
@@ -17071,11 +17090,20 @@ const Settings = () => {
|
|
|
17071
17090
|
Field.Root,
|
|
17072
17091
|
{
|
|
17073
17092
|
name: "selectedContentTypes",
|
|
17074
|
-
hint:
|
|
17075
|
-
|
|
17093
|
+
hint: formatMessage({
|
|
17094
|
+
id: getTranslation("settings.page.defaultField.hint"),
|
|
17095
|
+
defaultMessage: 'The selected field from the content type will be used to generate the URL alias. Use a field that is unique and descriptive, such as a "title" or "name".'
|
|
17096
|
+
}),
|
|
17097
|
+
error: !contentType.default && formatMessage({
|
|
17098
|
+
id: getTranslation("settings.page.defaultField.error"),
|
|
17099
|
+
defaultMessage: "Please select a default field"
|
|
17100
|
+
}),
|
|
17076
17101
|
required: true,
|
|
17077
17102
|
children: [
|
|
17078
|
-
/* @__PURE__ */ jsx(Field.Label, { children:
|
|
17103
|
+
/* @__PURE__ */ jsx(Field.Label, { children: formatMessage({
|
|
17104
|
+
id: getTranslation("settings.page.defaultField"),
|
|
17105
|
+
defaultMessage: "Default URL Alias field"
|
|
17106
|
+
}) }),
|
|
17079
17107
|
/* @__PURE__ */ jsx(
|
|
17080
17108
|
SingleSelect,
|
|
17081
17109
|
{
|
|
@@ -17084,7 +17112,7 @@ const Settings = () => {
|
|
|
17084
17112
|
value: contentType?.default || "",
|
|
17085
17113
|
onChange: (value) => dispatch({ type: "SET_DEFAULT_FIELD", payload: { ctUid: ct.uid, field: value } }),
|
|
17086
17114
|
children: Object.entries(ct.attributes).map(([key], index) => {
|
|
17087
|
-
if (key === "id" || key === "createdAt" || key === "updatedAt" || key === "createdBy" || key === "updatedBy") return null;
|
|
17115
|
+
if (key === "id" || key === "documentId" || key === "createdAt" || key === "updatedAt" || key === "createdBy" || key === "updatedBy" || key === "webatlas_path" || key === "webatlas_override") return null;
|
|
17088
17116
|
return /* @__PURE__ */ jsx(SingleSelectOption, { value: key, children: key }, index);
|
|
17089
17117
|
})
|
|
17090
17118
|
}
|
|
@@ -17097,11 +17125,20 @@ const Settings = () => {
|
|
|
17097
17125
|
Field.Root,
|
|
17098
17126
|
{
|
|
17099
17127
|
name: "urlAliasPattern",
|
|
17100
|
-
hint:
|
|
17128
|
+
hint: formatMessage({
|
|
17129
|
+
id: getTranslation("settings.page.urlAliasPattern.hint"),
|
|
17130
|
+
defaultMessage: 'The pattern to prepend to the generated URL alias. For example, if you enter "blog" and the value of default field is "My First Post", the generated URL alias will be "blog/my-first-post". Leave empty for no prefix.'
|
|
17131
|
+
}),
|
|
17101
17132
|
children: [
|
|
17102
17133
|
/* @__PURE__ */ jsxs(Field.Label, { children: [
|
|
17103
|
-
|
|
17104
|
-
|
|
17134
|
+
formatMessage({
|
|
17135
|
+
id: getTranslation("settings.page.urlAliasPattern"),
|
|
17136
|
+
defaultMessage: "URL Alias Pattern"
|
|
17137
|
+
}),
|
|
17138
|
+
/* @__PURE__ */ jsx(Tooltip, { description: formatMessage({
|
|
17139
|
+
id: getTranslation("settings.page.urlAliasPattern.tooltip"),
|
|
17140
|
+
defaultMessage: "Leading and trailing slashes will be removed. Spaces will be replaced with hyphens. Special characters will be encoded."
|
|
17141
|
+
}) })
|
|
17105
17142
|
] }),
|
|
17106
17143
|
/* @__PURE__ */ jsx(
|
|
17107
17144
|
Field.Input,
|
|
@@ -17110,7 +17147,10 @@ const Settings = () => {
|
|
|
17110
17147
|
onChange: (e2) => dispatch({ type: "SET_PATTERN", payload: { ctUid: ct.uid, pattern: e2.target.value } }),
|
|
17111
17148
|
disabled: !contentType.default,
|
|
17112
17149
|
type: "text",
|
|
17113
|
-
placeholder:
|
|
17150
|
+
placeholder: formatMessage({
|
|
17151
|
+
id: getTranslation("settings.page.urlAliasPattern.placeholder"),
|
|
17152
|
+
defaultMessage: "e.g. blog"
|
|
17153
|
+
})
|
|
17114
17154
|
}
|
|
17115
17155
|
),
|
|
17116
17156
|
/* @__PURE__ */ jsx(Field.Hint, {})
|