@knovator/pagecreator-admin 0.7.4 → 0.7.6
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.cjs
CHANGED
|
@@ -1757,7 +1757,8 @@ const TRANSLATION_PAIRS_WIDGET = {
|
|
|
1757
1757
|
'widget.tabDeleteTitle': 'Are you sure you want to delete this tab?',
|
|
1758
1758
|
'widget.widgetTitleInfo': 'HTML is supported',
|
|
1759
1759
|
'widget.minPerRow': 'Value must be greater than zero',
|
|
1760
|
-
'widget.actionsLabel': 'Actions'
|
|
1760
|
+
'widget.actionsLabel': 'Actions',
|
|
1761
|
+
'widget.tabNameRequired': 'Tab Name is required'
|
|
1761
1762
|
};
|
|
1762
1763
|
const TRANSLATION_PAIRS_ITEM = {
|
|
1763
1764
|
'item.title': 'Title',
|
|
@@ -1881,6 +1882,70 @@ var toString$6 = function (argument) {
|
|
|
1881
1882
|
return $String(argument);
|
|
1882
1883
|
};
|
|
1883
1884
|
|
|
1885
|
+
// a string of all valid unicode whitespaces
|
|
1886
|
+
var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
1887
|
+
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
1888
|
+
|
|
1889
|
+
var uncurryThis$b = functionUncurryThis;
|
|
1890
|
+
var requireObjectCoercible$3 = requireObjectCoercible$6;
|
|
1891
|
+
var toString$5 = toString$6;
|
|
1892
|
+
var whitespaces$2 = whitespaces$3;
|
|
1893
|
+
|
|
1894
|
+
var replace$2 = uncurryThis$b(''.replace);
|
|
1895
|
+
var whitespace = '[' + whitespaces$2 + ']';
|
|
1896
|
+
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
|
1897
|
+
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
1898
|
+
|
|
1899
|
+
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
1900
|
+
var createMethod$2 = function (TYPE) {
|
|
1901
|
+
return function ($this) {
|
|
1902
|
+
var string = toString$5(requireObjectCoercible$3($this));
|
|
1903
|
+
if (TYPE & 1) string = replace$2(string, ltrim, '');
|
|
1904
|
+
if (TYPE & 2) string = replace$2(string, rtrim, '');
|
|
1905
|
+
return string;
|
|
1906
|
+
};
|
|
1907
|
+
};
|
|
1908
|
+
|
|
1909
|
+
var stringTrim = {
|
|
1910
|
+
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
1911
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
1912
|
+
start: createMethod$2(1),
|
|
1913
|
+
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
1914
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
1915
|
+
end: createMethod$2(2),
|
|
1916
|
+
// `String.prototype.trim` method
|
|
1917
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
1918
|
+
trim: createMethod$2(3)
|
|
1919
|
+
};
|
|
1920
|
+
|
|
1921
|
+
var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
|
|
1922
|
+
var fails$b = fails$n;
|
|
1923
|
+
var whitespaces$1 = whitespaces$3;
|
|
1924
|
+
|
|
1925
|
+
var non = '\u200B\u0085\u180E';
|
|
1926
|
+
|
|
1927
|
+
// check that a method works with the correct list
|
|
1928
|
+
// of whitespaces and has a correct name
|
|
1929
|
+
var stringTrimForced = function (METHOD_NAME) {
|
|
1930
|
+
return fails$b(function () {
|
|
1931
|
+
return !!whitespaces$1[METHOD_NAME]()
|
|
1932
|
+
|| non[METHOD_NAME]() !== non
|
|
1933
|
+
|| (PROPER_FUNCTION_NAME$1 && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
|
|
1934
|
+
});
|
|
1935
|
+
};
|
|
1936
|
+
|
|
1937
|
+
var $$c = _export;
|
|
1938
|
+
var $trim = stringTrim.trim;
|
|
1939
|
+
var forcedStringTrimMethod = stringTrimForced;
|
|
1940
|
+
|
|
1941
|
+
// `String.prototype.trim` method
|
|
1942
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
1943
|
+
$$c({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
|
|
1944
|
+
trim: function trim() {
|
|
1945
|
+
return $trim(this);
|
|
1946
|
+
}
|
|
1947
|
+
});
|
|
1948
|
+
|
|
1884
1949
|
var anObject$8 = anObject$e;
|
|
1885
1950
|
|
|
1886
1951
|
// `RegExp.prototype.flags` getter implementation
|
|
@@ -1899,13 +1964,13 @@ var regexpFlags$1 = function () {
|
|
|
1899
1964
|
return result;
|
|
1900
1965
|
};
|
|
1901
1966
|
|
|
1902
|
-
var fails$
|
|
1967
|
+
var fails$a = fails$n;
|
|
1903
1968
|
var global$c = global$n;
|
|
1904
1969
|
|
|
1905
1970
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
1906
1971
|
var $RegExp$2 = global$c.RegExp;
|
|
1907
1972
|
|
|
1908
|
-
var UNSUPPORTED_Y$1 = fails$
|
|
1973
|
+
var UNSUPPORTED_Y$1 = fails$a(function () {
|
|
1909
1974
|
var re = $RegExp$2('a', 'y');
|
|
1910
1975
|
re.lastIndex = 2;
|
|
1911
1976
|
return re.exec('abcd') != null;
|
|
@@ -1913,11 +1978,11 @@ var UNSUPPORTED_Y$1 = fails$b(function () {
|
|
|
1913
1978
|
|
|
1914
1979
|
// UC Browser bug
|
|
1915
1980
|
// https://github.com/zloirock/core-js/issues/1008
|
|
1916
|
-
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$
|
|
1981
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$a(function () {
|
|
1917
1982
|
return !$RegExp$2('a', 'y').sticky;
|
|
1918
1983
|
});
|
|
1919
1984
|
|
|
1920
|
-
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$
|
|
1985
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$a(function () {
|
|
1921
1986
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1922
1987
|
var re = $RegExp$2('^r', 'gy');
|
|
1923
1988
|
re.lastIndex = 2;
|
|
@@ -1930,24 +1995,24 @@ var regexpStickyHelpers = {
|
|
|
1930
1995
|
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
1931
1996
|
};
|
|
1932
1997
|
|
|
1933
|
-
var fails$
|
|
1998
|
+
var fails$9 = fails$n;
|
|
1934
1999
|
var global$b = global$n;
|
|
1935
2000
|
|
|
1936
2001
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
1937
2002
|
var $RegExp$1 = global$b.RegExp;
|
|
1938
2003
|
|
|
1939
|
-
var regexpUnsupportedDotAll = fails$
|
|
2004
|
+
var regexpUnsupportedDotAll = fails$9(function () {
|
|
1940
2005
|
var re = $RegExp$1('.', 's');
|
|
1941
2006
|
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
|
1942
2007
|
});
|
|
1943
2008
|
|
|
1944
|
-
var fails$
|
|
2009
|
+
var fails$8 = fails$n;
|
|
1945
2010
|
var global$a = global$n;
|
|
1946
2011
|
|
|
1947
2012
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
1948
2013
|
var $RegExp = global$a.RegExp;
|
|
1949
2014
|
|
|
1950
|
-
var regexpUnsupportedNcg = fails$
|
|
2015
|
+
var regexpUnsupportedNcg = fails$8(function () {
|
|
1951
2016
|
var re = $RegExp('(?<a>b)', 'g');
|
|
1952
2017
|
return re.exec('b').groups.a !== 'b' ||
|
|
1953
2018
|
'b'.replace(re, '$<a>c') !== 'bc';
|
|
@@ -1956,8 +2021,8 @@ var regexpUnsupportedNcg = fails$9(function () {
|
|
|
1956
2021
|
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
1957
2022
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
1958
2023
|
var call$b = functionCall;
|
|
1959
|
-
var uncurryThis$
|
|
1960
|
-
var toString$
|
|
2024
|
+
var uncurryThis$a = functionUncurryThis;
|
|
2025
|
+
var toString$4 = toString$6;
|
|
1961
2026
|
var regexpFlags = regexpFlags$1;
|
|
1962
2027
|
var stickyHelpers = regexpStickyHelpers;
|
|
1963
2028
|
var shared = shared$4.exports;
|
|
@@ -1969,10 +2034,10 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
|
1969
2034
|
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
1970
2035
|
var nativeExec = RegExp.prototype.exec;
|
|
1971
2036
|
var patchedExec = nativeExec;
|
|
1972
|
-
var charAt$3 = uncurryThis$
|
|
1973
|
-
var indexOf = uncurryThis$
|
|
1974
|
-
var replace$
|
|
1975
|
-
var stringSlice$3 = uncurryThis$
|
|
2037
|
+
var charAt$3 = uncurryThis$a(''.charAt);
|
|
2038
|
+
var indexOf = uncurryThis$a(''.indexOf);
|
|
2039
|
+
var replace$1 = uncurryThis$a(''.replace);
|
|
2040
|
+
var stringSlice$3 = uncurryThis$a(''.slice);
|
|
1976
2041
|
|
|
1977
2042
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
1978
2043
|
var re1 = /a/;
|
|
@@ -1993,7 +2058,7 @@ if (PATCH) {
|
|
|
1993
2058
|
patchedExec = function exec(string) {
|
|
1994
2059
|
var re = this;
|
|
1995
2060
|
var state = getInternalState(re);
|
|
1996
|
-
var str = toString$
|
|
2061
|
+
var str = toString$4(string);
|
|
1997
2062
|
var raw = state.raw;
|
|
1998
2063
|
var result, reCopy, lastIndex, match, i, object, group;
|
|
1999
2064
|
|
|
@@ -2012,7 +2077,7 @@ if (PATCH) {
|
|
|
2012
2077
|
var strCopy = str;
|
|
2013
2078
|
|
|
2014
2079
|
if (sticky) {
|
|
2015
|
-
flags = replace$
|
|
2080
|
+
flags = replace$1(flags, 'y', '');
|
|
2016
2081
|
if (indexOf(flags, 'g') === -1) {
|
|
2017
2082
|
flags += 'g';
|
|
2018
2083
|
}
|
|
@@ -2070,12 +2135,12 @@ if (PATCH) {
|
|
|
2070
2135
|
|
|
2071
2136
|
var regexpExec$2 = patchedExec;
|
|
2072
2137
|
|
|
2073
|
-
var $$
|
|
2138
|
+
var $$b = _export;
|
|
2074
2139
|
var exec$2 = regexpExec$2;
|
|
2075
2140
|
|
|
2076
2141
|
// `RegExp.prototype.exec` method
|
|
2077
2142
|
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
2078
|
-
$$
|
|
2143
|
+
$$b({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
|
|
2079
2144
|
exec: exec$2
|
|
2080
2145
|
});
|
|
2081
2146
|
|
|
@@ -2091,21 +2156,21 @@ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$
|
|
|
2091
2156
|
});
|
|
2092
2157
|
|
|
2093
2158
|
var classofRaw = classofRaw$2;
|
|
2094
|
-
var uncurryThis$
|
|
2159
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
2095
2160
|
|
|
2096
2161
|
var functionUncurryThisClause = function (fn) {
|
|
2097
2162
|
// Nashorn bug:
|
|
2098
2163
|
// https://github.com/zloirock/core-js/issues/1128
|
|
2099
2164
|
// https://github.com/zloirock/core-js/issues/1130
|
|
2100
|
-
if (classofRaw(fn) === 'Function') return uncurryThis$
|
|
2165
|
+
if (classofRaw(fn) === 'Function') return uncurryThis$9(fn);
|
|
2101
2166
|
};
|
|
2102
2167
|
|
|
2103
2168
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
2104
2169
|
|
|
2105
|
-
var uncurryThis$
|
|
2170
|
+
var uncurryThis$8 = functionUncurryThisClause;
|
|
2106
2171
|
var defineBuiltIn$3 = defineBuiltIn$7;
|
|
2107
2172
|
var regexpExec$1 = regexpExec$2;
|
|
2108
|
-
var fails$
|
|
2173
|
+
var fails$7 = fails$n;
|
|
2109
2174
|
var wellKnownSymbol$9 = wellKnownSymbol$i;
|
|
2110
2175
|
var createNonEnumerableProperty = createNonEnumerableProperty$5;
|
|
2111
2176
|
|
|
@@ -2115,14 +2180,14 @@ var RegExpPrototype$2 = RegExp.prototype;
|
|
|
2115
2180
|
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
2116
2181
|
var SYMBOL = wellKnownSymbol$9(KEY);
|
|
2117
2182
|
|
|
2118
|
-
var DELEGATES_TO_SYMBOL = !fails$
|
|
2183
|
+
var DELEGATES_TO_SYMBOL = !fails$7(function () {
|
|
2119
2184
|
// String methods call symbol-named RegEp methods
|
|
2120
2185
|
var O = {};
|
|
2121
2186
|
O[SYMBOL] = function () { return 7; };
|
|
2122
2187
|
return ''[KEY](O) != 7;
|
|
2123
2188
|
});
|
|
2124
2189
|
|
|
2125
|
-
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$
|
|
2190
|
+
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$7(function () {
|
|
2126
2191
|
// Symbol-named RegExp methods call .exec
|
|
2127
2192
|
var execCalled = false;
|
|
2128
2193
|
var re = /a/;
|
|
@@ -2151,9 +2216,9 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
2151
2216
|
!DELEGATES_TO_EXEC ||
|
|
2152
2217
|
FORCED
|
|
2153
2218
|
) {
|
|
2154
|
-
var uncurriedNativeRegExpMethod = uncurryThis$
|
|
2219
|
+
var uncurriedNativeRegExpMethod = uncurryThis$8(/./[SYMBOL]);
|
|
2155
2220
|
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
2156
|
-
var uncurriedNativeMethod = uncurryThis$
|
|
2221
|
+
var uncurriedNativeMethod = uncurryThis$8(nativeMethod);
|
|
2157
2222
|
var $exec = regexp.exec;
|
|
2158
2223
|
if ($exec === regexpExec$1 || $exec === RegExpPrototype$2.exec) {
|
|
2159
2224
|
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
@@ -2174,18 +2239,18 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
2174
2239
|
if (SHAM) createNonEnumerableProperty(RegExpPrototype$2[SYMBOL], 'sham', true);
|
|
2175
2240
|
};
|
|
2176
2241
|
|
|
2177
|
-
var uncurryThis$
|
|
2242
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
2178
2243
|
var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
|
|
2179
|
-
var toString$
|
|
2180
|
-
var requireObjectCoercible$
|
|
2244
|
+
var toString$3 = toString$6;
|
|
2245
|
+
var requireObjectCoercible$2 = requireObjectCoercible$6;
|
|
2181
2246
|
|
|
2182
|
-
var charAt$2 = uncurryThis$
|
|
2183
|
-
var charCodeAt = uncurryThis$
|
|
2184
|
-
var stringSlice$2 = uncurryThis$
|
|
2247
|
+
var charAt$2 = uncurryThis$7(''.charAt);
|
|
2248
|
+
var charCodeAt = uncurryThis$7(''.charCodeAt);
|
|
2249
|
+
var stringSlice$2 = uncurryThis$7(''.slice);
|
|
2185
2250
|
|
|
2186
|
-
var createMethod$
|
|
2251
|
+
var createMethod$1 = function (CONVERT_TO_STRING) {
|
|
2187
2252
|
return function ($this, pos) {
|
|
2188
|
-
var S = toString$
|
|
2253
|
+
var S = toString$3(requireObjectCoercible$2($this));
|
|
2189
2254
|
var position = toIntegerOrInfinity$1(pos);
|
|
2190
2255
|
var size = S.length;
|
|
2191
2256
|
var first, second;
|
|
@@ -2205,10 +2270,10 @@ var createMethod$2 = function (CONVERT_TO_STRING) {
|
|
|
2205
2270
|
var stringMultibyte = {
|
|
2206
2271
|
// `String.prototype.codePointAt` method
|
|
2207
2272
|
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
2208
|
-
codeAt: createMethod$
|
|
2273
|
+
codeAt: createMethod$1(false),
|
|
2209
2274
|
// `String.prototype.at` method
|
|
2210
2275
|
// https://github.com/mathiasbynens/String.prototype.at
|
|
2211
|
-
charAt: createMethod$
|
|
2276
|
+
charAt: createMethod$1(true)
|
|
2212
2277
|
};
|
|
2213
2278
|
|
|
2214
2279
|
var charAt$1 = stringMultibyte.charAt;
|
|
@@ -2219,13 +2284,13 @@ var advanceStringIndex$1 = function (S, index, unicode) {
|
|
|
2219
2284
|
return index + (unicode ? charAt$1(S, index).length : 1);
|
|
2220
2285
|
};
|
|
2221
2286
|
|
|
2222
|
-
var uncurryThis$
|
|
2287
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
2223
2288
|
var toObject$1 = toObject$5;
|
|
2224
2289
|
|
|
2225
2290
|
var floor = Math.floor;
|
|
2226
|
-
var charAt = uncurryThis$
|
|
2227
|
-
var replace
|
|
2228
|
-
var stringSlice$1 = uncurryThis$
|
|
2291
|
+
var charAt = uncurryThis$6(''.charAt);
|
|
2292
|
+
var replace = uncurryThis$6(''.replace);
|
|
2293
|
+
var stringSlice$1 = uncurryThis$6(''.slice);
|
|
2229
2294
|
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
|
2230
2295
|
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
|
2231
2296
|
|
|
@@ -2239,7 +2304,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
|
|
|
2239
2304
|
namedCaptures = toObject$1(namedCaptures);
|
|
2240
2305
|
symbols = SUBSTITUTION_SYMBOLS;
|
|
2241
2306
|
}
|
|
2242
|
-
return replace
|
|
2307
|
+
return replace(replacement, symbols, function (match, ch) {
|
|
2243
2308
|
var capture;
|
|
2244
2309
|
switch (charAt(ch, 0)) {
|
|
2245
2310
|
case '$': return '$';
|
|
@@ -2287,16 +2352,16 @@ var regexpExecAbstract = function (R, S) {
|
|
|
2287
2352
|
|
|
2288
2353
|
var apply$1 = functionApply;
|
|
2289
2354
|
var call$8 = functionCall;
|
|
2290
|
-
var uncurryThis$
|
|
2355
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
2291
2356
|
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
2292
|
-
var fails$
|
|
2357
|
+
var fails$6 = fails$n;
|
|
2293
2358
|
var anObject$6 = anObject$e;
|
|
2294
2359
|
var isCallable$5 = isCallable$m;
|
|
2295
2360
|
var isNullOrUndefined$2 = isNullOrUndefined$5;
|
|
2296
2361
|
var toIntegerOrInfinity = toIntegerOrInfinity$4;
|
|
2297
2362
|
var toLength = toLength$2;
|
|
2298
|
-
var toString$
|
|
2299
|
-
var requireObjectCoercible$
|
|
2363
|
+
var toString$2 = toString$6;
|
|
2364
|
+
var requireObjectCoercible$1 = requireObjectCoercible$6;
|
|
2300
2365
|
var advanceStringIndex = advanceStringIndex$1;
|
|
2301
2366
|
var getMethod$2 = getMethod$4;
|
|
2302
2367
|
var getSubstitution = getSubstitution$1;
|
|
@@ -2306,10 +2371,10 @@ var wellKnownSymbol$8 = wellKnownSymbol$i;
|
|
|
2306
2371
|
var REPLACE = wellKnownSymbol$8('replace');
|
|
2307
2372
|
var max = Math.max;
|
|
2308
2373
|
var min = Math.min;
|
|
2309
|
-
var concat = uncurryThis$
|
|
2310
|
-
var push = uncurryThis$
|
|
2311
|
-
var stringIndexOf$1 = uncurryThis$
|
|
2312
|
-
var stringSlice = uncurryThis$
|
|
2374
|
+
var concat = uncurryThis$5([].concat);
|
|
2375
|
+
var push = uncurryThis$5([].push);
|
|
2376
|
+
var stringIndexOf$1 = uncurryThis$5(''.indexOf);
|
|
2377
|
+
var stringSlice = uncurryThis$5(''.slice);
|
|
2313
2378
|
|
|
2314
2379
|
var maybeToString = function (it) {
|
|
2315
2380
|
return it === undefined ? it : String(it);
|
|
@@ -2330,7 +2395,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
|
2330
2395
|
return false;
|
|
2331
2396
|
})();
|
|
2332
2397
|
|
|
2333
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$
|
|
2398
|
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$6(function () {
|
|
2334
2399
|
var re = /./;
|
|
2335
2400
|
re.exec = function () {
|
|
2336
2401
|
var result = [];
|
|
@@ -2349,17 +2414,17 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2349
2414
|
// `String.prototype.replace` method
|
|
2350
2415
|
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
2351
2416
|
function replace(searchValue, replaceValue) {
|
|
2352
|
-
var O = requireObjectCoercible$
|
|
2417
|
+
var O = requireObjectCoercible$1(this);
|
|
2353
2418
|
var replacer = isNullOrUndefined$2(searchValue) ? undefined : getMethod$2(searchValue, REPLACE);
|
|
2354
2419
|
return replacer
|
|
2355
2420
|
? call$8(replacer, searchValue, O, replaceValue)
|
|
2356
|
-
: call$8(nativeReplace, toString$
|
|
2421
|
+
: call$8(nativeReplace, toString$2(O), searchValue, replaceValue);
|
|
2357
2422
|
},
|
|
2358
2423
|
// `RegExp.prototype[@@replace]` method
|
|
2359
2424
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
2360
2425
|
function (string, replaceValue) {
|
|
2361
2426
|
var rx = anObject$6(this);
|
|
2362
|
-
var S = toString$
|
|
2427
|
+
var S = toString$2(string);
|
|
2363
2428
|
|
|
2364
2429
|
if (
|
|
2365
2430
|
typeof replaceValue == 'string' &&
|
|
@@ -2371,7 +2436,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2371
2436
|
}
|
|
2372
2437
|
|
|
2373
2438
|
var functionalReplace = isCallable$5(replaceValue);
|
|
2374
|
-
if (!functionalReplace) replaceValue = toString$
|
|
2439
|
+
if (!functionalReplace) replaceValue = toString$2(replaceValue);
|
|
2375
2440
|
|
|
2376
2441
|
var global = rx.global;
|
|
2377
2442
|
if (global) {
|
|
@@ -2386,7 +2451,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2386
2451
|
push(results, result);
|
|
2387
2452
|
if (!global) break;
|
|
2388
2453
|
|
|
2389
|
-
var matchStr = toString$
|
|
2454
|
+
var matchStr = toString$2(result[0]);
|
|
2390
2455
|
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
2391
2456
|
}
|
|
2392
2457
|
|
|
@@ -2395,7 +2460,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2395
2460
|
for (var i = 0; i < results.length; i++) {
|
|
2396
2461
|
result = results[i];
|
|
2397
2462
|
|
|
2398
|
-
var matched = toString$
|
|
2463
|
+
var matched = toString$2(result[0]);
|
|
2399
2464
|
var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
|
|
2400
2465
|
var captures = [];
|
|
2401
2466
|
// NOTE: This is equivalent to
|
|
@@ -2408,7 +2473,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2408
2473
|
if (functionalReplace) {
|
|
2409
2474
|
var replacerArgs = concat([matched], captures, position, S);
|
|
2410
2475
|
if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
|
|
2411
|
-
var replacement = toString$
|
|
2476
|
+
var replacement = toString$2(apply$1(replaceValue, undefined, replacerArgs));
|
|
2412
2477
|
} else {
|
|
2413
2478
|
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
2414
2479
|
}
|
|
@@ -2422,19 +2487,19 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2422
2487
|
];
|
|
2423
2488
|
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
2424
2489
|
|
|
2425
|
-
var $$
|
|
2490
|
+
var $$a = _export;
|
|
2426
2491
|
var $includes = arrayIncludes.includes;
|
|
2427
|
-
var fails$
|
|
2492
|
+
var fails$5 = fails$n;
|
|
2428
2493
|
var addToUnscopables = addToUnscopables$2;
|
|
2429
2494
|
|
|
2430
2495
|
// FF99+ bug
|
|
2431
|
-
var BROKEN_ON_SPARSE = fails$
|
|
2496
|
+
var BROKEN_ON_SPARSE = fails$5(function () {
|
|
2432
2497
|
return !Array(1).includes();
|
|
2433
2498
|
});
|
|
2434
2499
|
|
|
2435
2500
|
// `Array.prototype.includes` method
|
|
2436
2501
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
2437
|
-
$$
|
|
2502
|
+
$$a({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
2438
2503
|
includes: function includes(el /* , fromIndex = 0 */) {
|
|
2439
2504
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
2440
2505
|
}
|
|
@@ -2443,70 +2508,6 @@ $$b({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
|
2443
2508
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
2444
2509
|
addToUnscopables('includes');
|
|
2445
2510
|
|
|
2446
|
-
// a string of all valid unicode whitespaces
|
|
2447
|
-
var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
2448
|
-
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
2449
|
-
|
|
2450
|
-
var uncurryThis$5 = functionUncurryThis;
|
|
2451
|
-
var requireObjectCoercible$1 = requireObjectCoercible$6;
|
|
2452
|
-
var toString$2 = toString$6;
|
|
2453
|
-
var whitespaces$2 = whitespaces$3;
|
|
2454
|
-
|
|
2455
|
-
var replace = uncurryThis$5(''.replace);
|
|
2456
|
-
var whitespace = '[' + whitespaces$2 + ']';
|
|
2457
|
-
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
|
2458
|
-
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
2459
|
-
|
|
2460
|
-
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
2461
|
-
var createMethod$1 = function (TYPE) {
|
|
2462
|
-
return function ($this) {
|
|
2463
|
-
var string = toString$2(requireObjectCoercible$1($this));
|
|
2464
|
-
if (TYPE & 1) string = replace(string, ltrim, '');
|
|
2465
|
-
if (TYPE & 2) string = replace(string, rtrim, '');
|
|
2466
|
-
return string;
|
|
2467
|
-
};
|
|
2468
|
-
};
|
|
2469
|
-
|
|
2470
|
-
var stringTrim = {
|
|
2471
|
-
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
2472
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
2473
|
-
start: createMethod$1(1),
|
|
2474
|
-
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
2475
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
2476
|
-
end: createMethod$1(2),
|
|
2477
|
-
// `String.prototype.trim` method
|
|
2478
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
2479
|
-
trim: createMethod$1(3)
|
|
2480
|
-
};
|
|
2481
|
-
|
|
2482
|
-
var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
|
|
2483
|
-
var fails$5 = fails$n;
|
|
2484
|
-
var whitespaces$1 = whitespaces$3;
|
|
2485
|
-
|
|
2486
|
-
var non = '\u200B\u0085\u180E';
|
|
2487
|
-
|
|
2488
|
-
// check that a method works with the correct list
|
|
2489
|
-
// of whitespaces and has a correct name
|
|
2490
|
-
var stringTrimForced = function (METHOD_NAME) {
|
|
2491
|
-
return fails$5(function () {
|
|
2492
|
-
return !!whitespaces$1[METHOD_NAME]()
|
|
2493
|
-
|| non[METHOD_NAME]() !== non
|
|
2494
|
-
|| (PROPER_FUNCTION_NAME$1 && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
|
|
2495
|
-
});
|
|
2496
|
-
};
|
|
2497
|
-
|
|
2498
|
-
var $$a = _export;
|
|
2499
|
-
var $trim = stringTrim.trim;
|
|
2500
|
-
var forcedStringTrimMethod = stringTrimForced;
|
|
2501
|
-
|
|
2502
|
-
// `String.prototype.trim` method
|
|
2503
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
2504
|
-
$$a({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
|
|
2505
|
-
trim: function trim() {
|
|
2506
|
-
return $trim(this);
|
|
2507
|
-
}
|
|
2508
|
-
});
|
|
2509
|
-
|
|
2510
2511
|
/* eslint-disable no-useless-escape */
|
|
2511
2512
|
const paginationDataGatter = data => {
|
|
2512
2513
|
return data.data.docs;
|
|
@@ -2516,7 +2517,7 @@ const dataGatter = data => {
|
|
|
2516
2517
|
};
|
|
2517
2518
|
const capitalizeFirstLetter = (string = '') => {
|
|
2518
2519
|
var _a;
|
|
2519
|
-
return `${(_a = string === null || string === void 0 ? void 0 : string.charAt(0)) === null || _a === void 0 ? void 0 : _a.toUpperCase()}${string === null || string === void 0 ? void 0 : string.slice(1)}`;
|
|
2520
|
+
return `${(_a = string === null || string === void 0 ? void 0 : string.trim().charAt(0)) === null || _a === void 0 ? void 0 : _a.toUpperCase()}${string === null || string === void 0 ? void 0 : string.slice(1)}`;
|
|
2520
2521
|
};
|
|
2521
2522
|
const changeToCode = (string = '') => {
|
|
2522
2523
|
var _a, _b;
|
|
@@ -2896,6 +2897,9 @@ const usePage = ({
|
|
|
2896
2897
|
onError: handleError(code)
|
|
2897
2898
|
});
|
|
2898
2899
|
if ((response === null || response === void 0 ? void 0 : response.code) === 'SUCCESS') {
|
|
2900
|
+
if (formState === 'ADD') {
|
|
2901
|
+
setCurrentPage(1);
|
|
2902
|
+
}
|
|
2899
2903
|
setLoading(false);
|
|
2900
2904
|
onSuccess(code, response === null || response === void 0 ? void 0 : response.code, response === null || response === void 0 ? void 0 : response.message);
|
|
2901
2905
|
getPages();
|
|
@@ -4230,6 +4234,7 @@ const DeleteModal = ({
|
|
|
4230
4234
|
confirm,
|
|
4231
4235
|
typeHerePlaceholder
|
|
4232
4236
|
}) => {
|
|
4237
|
+
var _a;
|
|
4233
4238
|
const [userInput, setUserInput] = React.useState('');
|
|
4234
4239
|
React.useEffect(() => {
|
|
4235
4240
|
setUserInput('');
|
|
@@ -4250,13 +4255,14 @@ const DeleteModal = ({
|
|
|
4250
4255
|
className: "khb_delete-actions"
|
|
4251
4256
|
}, /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
4252
4257
|
placeholder: typeHerePlaceholder || TRANSLATION_PAIRS_COMMON.typeHerePlaceholder,
|
|
4258
|
+
wrapperClassName: "w-full",
|
|
4253
4259
|
className: "khb_delete-input",
|
|
4254
4260
|
value: userInput,
|
|
4255
4261
|
onChange: e => setUserInput(e.target.value)
|
|
4256
4262
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4257
4263
|
className: "khb_delete-buttons"
|
|
4258
4264
|
}, /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
4259
|
-
disabled: userInput !== (itemData === null || itemData === void 0 ? void 0 : itemData['name']),
|
|
4265
|
+
disabled: userInput.toString().trim() !== ((_a = itemData === null || itemData === void 0 ? void 0 : itemData['name']) === null || _a === void 0 ? void 0 : _a.trim()),
|
|
4260
4266
|
onClick: onConfirmDelete
|
|
4261
4267
|
}, confirm || TRANSLATION_PAIRS_COMMON.confirm)))) : null;
|
|
4262
4268
|
};
|
|
@@ -4729,6 +4735,9 @@ const useWidget = ({
|
|
|
4729
4735
|
onError: handleError(code)
|
|
4730
4736
|
});
|
|
4731
4737
|
if ((response === null || response === void 0 ? void 0 : response.code) === 'SUCCESS') {
|
|
4738
|
+
if (formState === 'ADD') {
|
|
4739
|
+
setCurrentPage(1);
|
|
4740
|
+
}
|
|
4732
4741
|
setLoading(false);
|
|
4733
4742
|
onSuccess(code, response === null || response === void 0 ? void 0 : response.code, response === null || response === void 0 ? void 0 : response.message);
|
|
4734
4743
|
getWidgets();
|
|
@@ -6580,6 +6589,7 @@ const TabItem = ({
|
|
|
6580
6589
|
deleteTitle,
|
|
6581
6590
|
onRemoveTab,
|
|
6582
6591
|
register,
|
|
6592
|
+
error,
|
|
6583
6593
|
noButtonText,
|
|
6584
6594
|
yesButtonText
|
|
6585
6595
|
}) => {
|
|
@@ -6587,8 +6597,13 @@ const TabItem = ({
|
|
|
6587
6597
|
type: "text",
|
|
6588
6598
|
className: "khb_tabs-input",
|
|
6589
6599
|
autoFocus: true,
|
|
6600
|
+
style: {
|
|
6601
|
+
display: 'block'
|
|
6602
|
+
},
|
|
6590
6603
|
disabled: isDisabled
|
|
6591
|
-
}, register || {})),
|
|
6604
|
+
}, register || {})), error && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
6605
|
+
className: "khb_input-error "
|
|
6606
|
+
}, error), showDelete ? /*#__PURE__*/React__default["default"].createElement(ConfirmPopOver, {
|
|
6592
6607
|
onConfirm: onRemoveTab,
|
|
6593
6608
|
title: deleteTitle,
|
|
6594
6609
|
confirmText: yesButtonText,
|
|
@@ -6599,6 +6614,7 @@ const TabItem = ({
|
|
|
6599
6614
|
};
|
|
6600
6615
|
|
|
6601
6616
|
const Tabs = ({
|
|
6617
|
+
errors,
|
|
6602
6618
|
activeTab,
|
|
6603
6619
|
setActiveTab,
|
|
6604
6620
|
options,
|
|
@@ -6615,6 +6631,7 @@ const Tabs = ({
|
|
|
6615
6631
|
itemsPlaceholder,
|
|
6616
6632
|
formatOptionLabel,
|
|
6617
6633
|
tabCollectionItems,
|
|
6634
|
+
tabNameRequiredText,
|
|
6618
6635
|
onCollectionItemsIndexChange
|
|
6619
6636
|
}) => {
|
|
6620
6637
|
const {
|
|
@@ -6641,6 +6658,7 @@ const Tabs = ({
|
|
|
6641
6658
|
}, /*#__PURE__*/React__default["default"].createElement(reactTabs.TabList, {
|
|
6642
6659
|
className: "khb_tabs-list"
|
|
6643
6660
|
}, tabFields === null || tabFields === void 0 ? void 0 : tabFields.map((field, index) => {
|
|
6661
|
+
var _a, _b, _c;
|
|
6644
6662
|
return /*#__PURE__*/React__default["default"].createElement(reactTabs.Tab, {
|
|
6645
6663
|
key: field.id,
|
|
6646
6664
|
className: classNames__default["default"]('khb_tabs-item', {
|
|
@@ -6649,11 +6667,14 @@ const Tabs = ({
|
|
|
6649
6667
|
}, /*#__PURE__*/React__default["default"].createElement(TabItem, {
|
|
6650
6668
|
key: field.id,
|
|
6651
6669
|
deleteTitle: deleteTitle,
|
|
6652
|
-
register: register(`tabs.${index}.name
|
|
6670
|
+
register: register(`tabs.${index}.name`, {
|
|
6671
|
+
required: tabNameRequiredText
|
|
6672
|
+
}),
|
|
6653
6673
|
onRemoveTab: () => {
|
|
6654
6674
|
removeField(index);
|
|
6655
6675
|
setActiveTab(index === 0 ? 0 : index - 1);
|
|
6656
6676
|
},
|
|
6677
|
+
error: (_c = (_b = (_a = errors === null || errors === void 0 ? void 0 : errors['tabs']) === null || _a === void 0 ? void 0 : _a[index]) === null || _b === void 0 ? void 0 : _b.name) === null || _c === void 0 ? void 0 : _c.message,
|
|
6657
6678
|
noButtonText: noButtonText,
|
|
6658
6679
|
yesButtonText: yesButtonText,
|
|
6659
6680
|
showDelete: (tabFields === null || tabFields === void 0 ? void 0 : tabFields.length) > 1
|
|
@@ -7099,6 +7120,8 @@ const WidgetForm = ({
|
|
|
7099
7120
|
deleteTitle: t('widget.tabDeleteTitle'),
|
|
7100
7121
|
yesButtonText: t('yesButtonText'),
|
|
7101
7122
|
noButtonText: t('cancelButtonText'),
|
|
7123
|
+
errors: errors,
|
|
7124
|
+
tabNameRequiredText: t('widget.tabNameRequired'),
|
|
7102
7125
|
itemsPlaceholder: `Select ${selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.label}...`,
|
|
7103
7126
|
loadOptions: onChangeSearch,
|
|
7104
7127
|
isItemsLoading: collectionDataLoading,
|
package/index.js
CHANGED
|
@@ -1745,7 +1745,8 @@ const TRANSLATION_PAIRS_WIDGET = {
|
|
|
1745
1745
|
'widget.tabDeleteTitle': 'Are you sure you want to delete this tab?',
|
|
1746
1746
|
'widget.widgetTitleInfo': 'HTML is supported',
|
|
1747
1747
|
'widget.minPerRow': 'Value must be greater than zero',
|
|
1748
|
-
'widget.actionsLabel': 'Actions'
|
|
1748
|
+
'widget.actionsLabel': 'Actions',
|
|
1749
|
+
'widget.tabNameRequired': 'Tab Name is required'
|
|
1749
1750
|
};
|
|
1750
1751
|
const TRANSLATION_PAIRS_ITEM = {
|
|
1751
1752
|
'item.title': 'Title',
|
|
@@ -1869,6 +1870,70 @@ var toString$6 = function (argument) {
|
|
|
1869
1870
|
return $String(argument);
|
|
1870
1871
|
};
|
|
1871
1872
|
|
|
1873
|
+
// a string of all valid unicode whitespaces
|
|
1874
|
+
var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
1875
|
+
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
1876
|
+
|
|
1877
|
+
var uncurryThis$b = functionUncurryThis;
|
|
1878
|
+
var requireObjectCoercible$3 = requireObjectCoercible$6;
|
|
1879
|
+
var toString$5 = toString$6;
|
|
1880
|
+
var whitespaces$2 = whitespaces$3;
|
|
1881
|
+
|
|
1882
|
+
var replace$2 = uncurryThis$b(''.replace);
|
|
1883
|
+
var whitespace = '[' + whitespaces$2 + ']';
|
|
1884
|
+
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
|
1885
|
+
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
1886
|
+
|
|
1887
|
+
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
1888
|
+
var createMethod$2 = function (TYPE) {
|
|
1889
|
+
return function ($this) {
|
|
1890
|
+
var string = toString$5(requireObjectCoercible$3($this));
|
|
1891
|
+
if (TYPE & 1) string = replace$2(string, ltrim, '');
|
|
1892
|
+
if (TYPE & 2) string = replace$2(string, rtrim, '');
|
|
1893
|
+
return string;
|
|
1894
|
+
};
|
|
1895
|
+
};
|
|
1896
|
+
|
|
1897
|
+
var stringTrim = {
|
|
1898
|
+
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
1899
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
1900
|
+
start: createMethod$2(1),
|
|
1901
|
+
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
1902
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
1903
|
+
end: createMethod$2(2),
|
|
1904
|
+
// `String.prototype.trim` method
|
|
1905
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
1906
|
+
trim: createMethod$2(3)
|
|
1907
|
+
};
|
|
1908
|
+
|
|
1909
|
+
var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
|
|
1910
|
+
var fails$b = fails$n;
|
|
1911
|
+
var whitespaces$1 = whitespaces$3;
|
|
1912
|
+
|
|
1913
|
+
var non = '\u200B\u0085\u180E';
|
|
1914
|
+
|
|
1915
|
+
// check that a method works with the correct list
|
|
1916
|
+
// of whitespaces and has a correct name
|
|
1917
|
+
var stringTrimForced = function (METHOD_NAME) {
|
|
1918
|
+
return fails$b(function () {
|
|
1919
|
+
return !!whitespaces$1[METHOD_NAME]()
|
|
1920
|
+
|| non[METHOD_NAME]() !== non
|
|
1921
|
+
|| (PROPER_FUNCTION_NAME$1 && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
|
|
1922
|
+
});
|
|
1923
|
+
};
|
|
1924
|
+
|
|
1925
|
+
var $$c = _export;
|
|
1926
|
+
var $trim = stringTrim.trim;
|
|
1927
|
+
var forcedStringTrimMethod = stringTrimForced;
|
|
1928
|
+
|
|
1929
|
+
// `String.prototype.trim` method
|
|
1930
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
1931
|
+
$$c({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
|
|
1932
|
+
trim: function trim() {
|
|
1933
|
+
return $trim(this);
|
|
1934
|
+
}
|
|
1935
|
+
});
|
|
1936
|
+
|
|
1872
1937
|
var anObject$8 = anObject$e;
|
|
1873
1938
|
|
|
1874
1939
|
// `RegExp.prototype.flags` getter implementation
|
|
@@ -1887,13 +1952,13 @@ var regexpFlags$1 = function () {
|
|
|
1887
1952
|
return result;
|
|
1888
1953
|
};
|
|
1889
1954
|
|
|
1890
|
-
var fails$
|
|
1955
|
+
var fails$a = fails$n;
|
|
1891
1956
|
var global$c = global$n;
|
|
1892
1957
|
|
|
1893
1958
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
1894
1959
|
var $RegExp$2 = global$c.RegExp;
|
|
1895
1960
|
|
|
1896
|
-
var UNSUPPORTED_Y$1 = fails$
|
|
1961
|
+
var UNSUPPORTED_Y$1 = fails$a(function () {
|
|
1897
1962
|
var re = $RegExp$2('a', 'y');
|
|
1898
1963
|
re.lastIndex = 2;
|
|
1899
1964
|
return re.exec('abcd') != null;
|
|
@@ -1901,11 +1966,11 @@ var UNSUPPORTED_Y$1 = fails$b(function () {
|
|
|
1901
1966
|
|
|
1902
1967
|
// UC Browser bug
|
|
1903
1968
|
// https://github.com/zloirock/core-js/issues/1008
|
|
1904
|
-
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$
|
|
1969
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$a(function () {
|
|
1905
1970
|
return !$RegExp$2('a', 'y').sticky;
|
|
1906
1971
|
});
|
|
1907
1972
|
|
|
1908
|
-
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$
|
|
1973
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$a(function () {
|
|
1909
1974
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1910
1975
|
var re = $RegExp$2('^r', 'gy');
|
|
1911
1976
|
re.lastIndex = 2;
|
|
@@ -1918,24 +1983,24 @@ var regexpStickyHelpers = {
|
|
|
1918
1983
|
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
1919
1984
|
};
|
|
1920
1985
|
|
|
1921
|
-
var fails$
|
|
1986
|
+
var fails$9 = fails$n;
|
|
1922
1987
|
var global$b = global$n;
|
|
1923
1988
|
|
|
1924
1989
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
1925
1990
|
var $RegExp$1 = global$b.RegExp;
|
|
1926
1991
|
|
|
1927
|
-
var regexpUnsupportedDotAll = fails$
|
|
1992
|
+
var regexpUnsupportedDotAll = fails$9(function () {
|
|
1928
1993
|
var re = $RegExp$1('.', 's');
|
|
1929
1994
|
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
|
1930
1995
|
});
|
|
1931
1996
|
|
|
1932
|
-
var fails$
|
|
1997
|
+
var fails$8 = fails$n;
|
|
1933
1998
|
var global$a = global$n;
|
|
1934
1999
|
|
|
1935
2000
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
1936
2001
|
var $RegExp = global$a.RegExp;
|
|
1937
2002
|
|
|
1938
|
-
var regexpUnsupportedNcg = fails$
|
|
2003
|
+
var regexpUnsupportedNcg = fails$8(function () {
|
|
1939
2004
|
var re = $RegExp('(?<a>b)', 'g');
|
|
1940
2005
|
return re.exec('b').groups.a !== 'b' ||
|
|
1941
2006
|
'b'.replace(re, '$<a>c') !== 'bc';
|
|
@@ -1944,8 +2009,8 @@ var regexpUnsupportedNcg = fails$9(function () {
|
|
|
1944
2009
|
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
1945
2010
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
1946
2011
|
var call$b = functionCall;
|
|
1947
|
-
var uncurryThis$
|
|
1948
|
-
var toString$
|
|
2012
|
+
var uncurryThis$a = functionUncurryThis;
|
|
2013
|
+
var toString$4 = toString$6;
|
|
1949
2014
|
var regexpFlags = regexpFlags$1;
|
|
1950
2015
|
var stickyHelpers = regexpStickyHelpers;
|
|
1951
2016
|
var shared = shared$4.exports;
|
|
@@ -1957,10 +2022,10 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
|
1957
2022
|
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
1958
2023
|
var nativeExec = RegExp.prototype.exec;
|
|
1959
2024
|
var patchedExec = nativeExec;
|
|
1960
|
-
var charAt$3 = uncurryThis$
|
|
1961
|
-
var indexOf = uncurryThis$
|
|
1962
|
-
var replace$
|
|
1963
|
-
var stringSlice$3 = uncurryThis$
|
|
2025
|
+
var charAt$3 = uncurryThis$a(''.charAt);
|
|
2026
|
+
var indexOf = uncurryThis$a(''.indexOf);
|
|
2027
|
+
var replace$1 = uncurryThis$a(''.replace);
|
|
2028
|
+
var stringSlice$3 = uncurryThis$a(''.slice);
|
|
1964
2029
|
|
|
1965
2030
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
1966
2031
|
var re1 = /a/;
|
|
@@ -1981,7 +2046,7 @@ if (PATCH) {
|
|
|
1981
2046
|
patchedExec = function exec(string) {
|
|
1982
2047
|
var re = this;
|
|
1983
2048
|
var state = getInternalState(re);
|
|
1984
|
-
var str = toString$
|
|
2049
|
+
var str = toString$4(string);
|
|
1985
2050
|
var raw = state.raw;
|
|
1986
2051
|
var result, reCopy, lastIndex, match, i, object, group;
|
|
1987
2052
|
|
|
@@ -2000,7 +2065,7 @@ if (PATCH) {
|
|
|
2000
2065
|
var strCopy = str;
|
|
2001
2066
|
|
|
2002
2067
|
if (sticky) {
|
|
2003
|
-
flags = replace$
|
|
2068
|
+
flags = replace$1(flags, 'y', '');
|
|
2004
2069
|
if (indexOf(flags, 'g') === -1) {
|
|
2005
2070
|
flags += 'g';
|
|
2006
2071
|
}
|
|
@@ -2058,12 +2123,12 @@ if (PATCH) {
|
|
|
2058
2123
|
|
|
2059
2124
|
var regexpExec$2 = patchedExec;
|
|
2060
2125
|
|
|
2061
|
-
var $$
|
|
2126
|
+
var $$b = _export;
|
|
2062
2127
|
var exec$2 = regexpExec$2;
|
|
2063
2128
|
|
|
2064
2129
|
// `RegExp.prototype.exec` method
|
|
2065
2130
|
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
2066
|
-
$$
|
|
2131
|
+
$$b({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
|
|
2067
2132
|
exec: exec$2
|
|
2068
2133
|
});
|
|
2069
2134
|
|
|
@@ -2079,21 +2144,21 @@ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$
|
|
|
2079
2144
|
});
|
|
2080
2145
|
|
|
2081
2146
|
var classofRaw = classofRaw$2;
|
|
2082
|
-
var uncurryThis$
|
|
2147
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
2083
2148
|
|
|
2084
2149
|
var functionUncurryThisClause = function (fn) {
|
|
2085
2150
|
// Nashorn bug:
|
|
2086
2151
|
// https://github.com/zloirock/core-js/issues/1128
|
|
2087
2152
|
// https://github.com/zloirock/core-js/issues/1130
|
|
2088
|
-
if (classofRaw(fn) === 'Function') return uncurryThis$
|
|
2153
|
+
if (classofRaw(fn) === 'Function') return uncurryThis$9(fn);
|
|
2089
2154
|
};
|
|
2090
2155
|
|
|
2091
2156
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
2092
2157
|
|
|
2093
|
-
var uncurryThis$
|
|
2158
|
+
var uncurryThis$8 = functionUncurryThisClause;
|
|
2094
2159
|
var defineBuiltIn$3 = defineBuiltIn$7;
|
|
2095
2160
|
var regexpExec$1 = regexpExec$2;
|
|
2096
|
-
var fails$
|
|
2161
|
+
var fails$7 = fails$n;
|
|
2097
2162
|
var wellKnownSymbol$9 = wellKnownSymbol$i;
|
|
2098
2163
|
var createNonEnumerableProperty = createNonEnumerableProperty$5;
|
|
2099
2164
|
|
|
@@ -2103,14 +2168,14 @@ var RegExpPrototype$2 = RegExp.prototype;
|
|
|
2103
2168
|
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
2104
2169
|
var SYMBOL = wellKnownSymbol$9(KEY);
|
|
2105
2170
|
|
|
2106
|
-
var DELEGATES_TO_SYMBOL = !fails$
|
|
2171
|
+
var DELEGATES_TO_SYMBOL = !fails$7(function () {
|
|
2107
2172
|
// String methods call symbol-named RegEp methods
|
|
2108
2173
|
var O = {};
|
|
2109
2174
|
O[SYMBOL] = function () { return 7; };
|
|
2110
2175
|
return ''[KEY](O) != 7;
|
|
2111
2176
|
});
|
|
2112
2177
|
|
|
2113
|
-
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$
|
|
2178
|
+
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$7(function () {
|
|
2114
2179
|
// Symbol-named RegExp methods call .exec
|
|
2115
2180
|
var execCalled = false;
|
|
2116
2181
|
var re = /a/;
|
|
@@ -2139,9 +2204,9 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
2139
2204
|
!DELEGATES_TO_EXEC ||
|
|
2140
2205
|
FORCED
|
|
2141
2206
|
) {
|
|
2142
|
-
var uncurriedNativeRegExpMethod = uncurryThis$
|
|
2207
|
+
var uncurriedNativeRegExpMethod = uncurryThis$8(/./[SYMBOL]);
|
|
2143
2208
|
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
2144
|
-
var uncurriedNativeMethod = uncurryThis$
|
|
2209
|
+
var uncurriedNativeMethod = uncurryThis$8(nativeMethod);
|
|
2145
2210
|
var $exec = regexp.exec;
|
|
2146
2211
|
if ($exec === regexpExec$1 || $exec === RegExpPrototype$2.exec) {
|
|
2147
2212
|
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
@@ -2162,18 +2227,18 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
2162
2227
|
if (SHAM) createNonEnumerableProperty(RegExpPrototype$2[SYMBOL], 'sham', true);
|
|
2163
2228
|
};
|
|
2164
2229
|
|
|
2165
|
-
var uncurryThis$
|
|
2230
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
2166
2231
|
var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
|
|
2167
|
-
var toString$
|
|
2168
|
-
var requireObjectCoercible$
|
|
2232
|
+
var toString$3 = toString$6;
|
|
2233
|
+
var requireObjectCoercible$2 = requireObjectCoercible$6;
|
|
2169
2234
|
|
|
2170
|
-
var charAt$2 = uncurryThis$
|
|
2171
|
-
var charCodeAt = uncurryThis$
|
|
2172
|
-
var stringSlice$2 = uncurryThis$
|
|
2235
|
+
var charAt$2 = uncurryThis$7(''.charAt);
|
|
2236
|
+
var charCodeAt = uncurryThis$7(''.charCodeAt);
|
|
2237
|
+
var stringSlice$2 = uncurryThis$7(''.slice);
|
|
2173
2238
|
|
|
2174
|
-
var createMethod$
|
|
2239
|
+
var createMethod$1 = function (CONVERT_TO_STRING) {
|
|
2175
2240
|
return function ($this, pos) {
|
|
2176
|
-
var S = toString$
|
|
2241
|
+
var S = toString$3(requireObjectCoercible$2($this));
|
|
2177
2242
|
var position = toIntegerOrInfinity$1(pos);
|
|
2178
2243
|
var size = S.length;
|
|
2179
2244
|
var first, second;
|
|
@@ -2193,10 +2258,10 @@ var createMethod$2 = function (CONVERT_TO_STRING) {
|
|
|
2193
2258
|
var stringMultibyte = {
|
|
2194
2259
|
// `String.prototype.codePointAt` method
|
|
2195
2260
|
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
2196
|
-
codeAt: createMethod$
|
|
2261
|
+
codeAt: createMethod$1(false),
|
|
2197
2262
|
// `String.prototype.at` method
|
|
2198
2263
|
// https://github.com/mathiasbynens/String.prototype.at
|
|
2199
|
-
charAt: createMethod$
|
|
2264
|
+
charAt: createMethod$1(true)
|
|
2200
2265
|
};
|
|
2201
2266
|
|
|
2202
2267
|
var charAt$1 = stringMultibyte.charAt;
|
|
@@ -2207,13 +2272,13 @@ var advanceStringIndex$1 = function (S, index, unicode) {
|
|
|
2207
2272
|
return index + (unicode ? charAt$1(S, index).length : 1);
|
|
2208
2273
|
};
|
|
2209
2274
|
|
|
2210
|
-
var uncurryThis$
|
|
2275
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
2211
2276
|
var toObject$1 = toObject$5;
|
|
2212
2277
|
|
|
2213
2278
|
var floor = Math.floor;
|
|
2214
|
-
var charAt = uncurryThis$
|
|
2215
|
-
var replace
|
|
2216
|
-
var stringSlice$1 = uncurryThis$
|
|
2279
|
+
var charAt = uncurryThis$6(''.charAt);
|
|
2280
|
+
var replace = uncurryThis$6(''.replace);
|
|
2281
|
+
var stringSlice$1 = uncurryThis$6(''.slice);
|
|
2217
2282
|
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
|
2218
2283
|
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
|
2219
2284
|
|
|
@@ -2227,7 +2292,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
|
|
|
2227
2292
|
namedCaptures = toObject$1(namedCaptures);
|
|
2228
2293
|
symbols = SUBSTITUTION_SYMBOLS;
|
|
2229
2294
|
}
|
|
2230
|
-
return replace
|
|
2295
|
+
return replace(replacement, symbols, function (match, ch) {
|
|
2231
2296
|
var capture;
|
|
2232
2297
|
switch (charAt(ch, 0)) {
|
|
2233
2298
|
case '$': return '$';
|
|
@@ -2275,16 +2340,16 @@ var regexpExecAbstract = function (R, S) {
|
|
|
2275
2340
|
|
|
2276
2341
|
var apply$1 = functionApply;
|
|
2277
2342
|
var call$8 = functionCall;
|
|
2278
|
-
var uncurryThis$
|
|
2343
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
2279
2344
|
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
2280
|
-
var fails$
|
|
2345
|
+
var fails$6 = fails$n;
|
|
2281
2346
|
var anObject$6 = anObject$e;
|
|
2282
2347
|
var isCallable$5 = isCallable$m;
|
|
2283
2348
|
var isNullOrUndefined$2 = isNullOrUndefined$5;
|
|
2284
2349
|
var toIntegerOrInfinity = toIntegerOrInfinity$4;
|
|
2285
2350
|
var toLength = toLength$2;
|
|
2286
|
-
var toString$
|
|
2287
|
-
var requireObjectCoercible$
|
|
2351
|
+
var toString$2 = toString$6;
|
|
2352
|
+
var requireObjectCoercible$1 = requireObjectCoercible$6;
|
|
2288
2353
|
var advanceStringIndex = advanceStringIndex$1;
|
|
2289
2354
|
var getMethod$2 = getMethod$4;
|
|
2290
2355
|
var getSubstitution = getSubstitution$1;
|
|
@@ -2294,10 +2359,10 @@ var wellKnownSymbol$8 = wellKnownSymbol$i;
|
|
|
2294
2359
|
var REPLACE = wellKnownSymbol$8('replace');
|
|
2295
2360
|
var max = Math.max;
|
|
2296
2361
|
var min = Math.min;
|
|
2297
|
-
var concat = uncurryThis$
|
|
2298
|
-
var push = uncurryThis$
|
|
2299
|
-
var stringIndexOf$1 = uncurryThis$
|
|
2300
|
-
var stringSlice = uncurryThis$
|
|
2362
|
+
var concat = uncurryThis$5([].concat);
|
|
2363
|
+
var push = uncurryThis$5([].push);
|
|
2364
|
+
var stringIndexOf$1 = uncurryThis$5(''.indexOf);
|
|
2365
|
+
var stringSlice = uncurryThis$5(''.slice);
|
|
2301
2366
|
|
|
2302
2367
|
var maybeToString = function (it) {
|
|
2303
2368
|
return it === undefined ? it : String(it);
|
|
@@ -2318,7 +2383,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
|
2318
2383
|
return false;
|
|
2319
2384
|
})();
|
|
2320
2385
|
|
|
2321
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$
|
|
2386
|
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$6(function () {
|
|
2322
2387
|
var re = /./;
|
|
2323
2388
|
re.exec = function () {
|
|
2324
2389
|
var result = [];
|
|
@@ -2337,17 +2402,17 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2337
2402
|
// `String.prototype.replace` method
|
|
2338
2403
|
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
2339
2404
|
function replace(searchValue, replaceValue) {
|
|
2340
|
-
var O = requireObjectCoercible$
|
|
2405
|
+
var O = requireObjectCoercible$1(this);
|
|
2341
2406
|
var replacer = isNullOrUndefined$2(searchValue) ? undefined : getMethod$2(searchValue, REPLACE);
|
|
2342
2407
|
return replacer
|
|
2343
2408
|
? call$8(replacer, searchValue, O, replaceValue)
|
|
2344
|
-
: call$8(nativeReplace, toString$
|
|
2409
|
+
: call$8(nativeReplace, toString$2(O), searchValue, replaceValue);
|
|
2345
2410
|
},
|
|
2346
2411
|
// `RegExp.prototype[@@replace]` method
|
|
2347
2412
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
2348
2413
|
function (string, replaceValue) {
|
|
2349
2414
|
var rx = anObject$6(this);
|
|
2350
|
-
var S = toString$
|
|
2415
|
+
var S = toString$2(string);
|
|
2351
2416
|
|
|
2352
2417
|
if (
|
|
2353
2418
|
typeof replaceValue == 'string' &&
|
|
@@ -2359,7 +2424,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2359
2424
|
}
|
|
2360
2425
|
|
|
2361
2426
|
var functionalReplace = isCallable$5(replaceValue);
|
|
2362
|
-
if (!functionalReplace) replaceValue = toString$
|
|
2427
|
+
if (!functionalReplace) replaceValue = toString$2(replaceValue);
|
|
2363
2428
|
|
|
2364
2429
|
var global = rx.global;
|
|
2365
2430
|
if (global) {
|
|
@@ -2374,7 +2439,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2374
2439
|
push(results, result);
|
|
2375
2440
|
if (!global) break;
|
|
2376
2441
|
|
|
2377
|
-
var matchStr = toString$
|
|
2442
|
+
var matchStr = toString$2(result[0]);
|
|
2378
2443
|
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
2379
2444
|
}
|
|
2380
2445
|
|
|
@@ -2383,7 +2448,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2383
2448
|
for (var i = 0; i < results.length; i++) {
|
|
2384
2449
|
result = results[i];
|
|
2385
2450
|
|
|
2386
|
-
var matched = toString$
|
|
2451
|
+
var matched = toString$2(result[0]);
|
|
2387
2452
|
var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
|
|
2388
2453
|
var captures = [];
|
|
2389
2454
|
// NOTE: This is equivalent to
|
|
@@ -2396,7 +2461,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2396
2461
|
if (functionalReplace) {
|
|
2397
2462
|
var replacerArgs = concat([matched], captures, position, S);
|
|
2398
2463
|
if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
|
|
2399
|
-
var replacement = toString$
|
|
2464
|
+
var replacement = toString$2(apply$1(replaceValue, undefined, replacerArgs));
|
|
2400
2465
|
} else {
|
|
2401
2466
|
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
2402
2467
|
}
|
|
@@ -2410,19 +2475,19 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2410
2475
|
];
|
|
2411
2476
|
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
2412
2477
|
|
|
2413
|
-
var $$
|
|
2478
|
+
var $$a = _export;
|
|
2414
2479
|
var $includes = arrayIncludes.includes;
|
|
2415
|
-
var fails$
|
|
2480
|
+
var fails$5 = fails$n;
|
|
2416
2481
|
var addToUnscopables = addToUnscopables$2;
|
|
2417
2482
|
|
|
2418
2483
|
// FF99+ bug
|
|
2419
|
-
var BROKEN_ON_SPARSE = fails$
|
|
2484
|
+
var BROKEN_ON_SPARSE = fails$5(function () {
|
|
2420
2485
|
return !Array(1).includes();
|
|
2421
2486
|
});
|
|
2422
2487
|
|
|
2423
2488
|
// `Array.prototype.includes` method
|
|
2424
2489
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
2425
|
-
$$
|
|
2490
|
+
$$a({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
2426
2491
|
includes: function includes(el /* , fromIndex = 0 */) {
|
|
2427
2492
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
2428
2493
|
}
|
|
@@ -2431,70 +2496,6 @@ $$b({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
|
2431
2496
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
2432
2497
|
addToUnscopables('includes');
|
|
2433
2498
|
|
|
2434
|
-
// a string of all valid unicode whitespaces
|
|
2435
|
-
var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
2436
|
-
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
2437
|
-
|
|
2438
|
-
var uncurryThis$5 = functionUncurryThis;
|
|
2439
|
-
var requireObjectCoercible$1 = requireObjectCoercible$6;
|
|
2440
|
-
var toString$2 = toString$6;
|
|
2441
|
-
var whitespaces$2 = whitespaces$3;
|
|
2442
|
-
|
|
2443
|
-
var replace = uncurryThis$5(''.replace);
|
|
2444
|
-
var whitespace = '[' + whitespaces$2 + ']';
|
|
2445
|
-
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
|
2446
|
-
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
2447
|
-
|
|
2448
|
-
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
2449
|
-
var createMethod$1 = function (TYPE) {
|
|
2450
|
-
return function ($this) {
|
|
2451
|
-
var string = toString$2(requireObjectCoercible$1($this));
|
|
2452
|
-
if (TYPE & 1) string = replace(string, ltrim, '');
|
|
2453
|
-
if (TYPE & 2) string = replace(string, rtrim, '');
|
|
2454
|
-
return string;
|
|
2455
|
-
};
|
|
2456
|
-
};
|
|
2457
|
-
|
|
2458
|
-
var stringTrim = {
|
|
2459
|
-
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
2460
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
2461
|
-
start: createMethod$1(1),
|
|
2462
|
-
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
2463
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
2464
|
-
end: createMethod$1(2),
|
|
2465
|
-
// `String.prototype.trim` method
|
|
2466
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
2467
|
-
trim: createMethod$1(3)
|
|
2468
|
-
};
|
|
2469
|
-
|
|
2470
|
-
var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
|
|
2471
|
-
var fails$5 = fails$n;
|
|
2472
|
-
var whitespaces$1 = whitespaces$3;
|
|
2473
|
-
|
|
2474
|
-
var non = '\u200B\u0085\u180E';
|
|
2475
|
-
|
|
2476
|
-
// check that a method works with the correct list
|
|
2477
|
-
// of whitespaces and has a correct name
|
|
2478
|
-
var stringTrimForced = function (METHOD_NAME) {
|
|
2479
|
-
return fails$5(function () {
|
|
2480
|
-
return !!whitespaces$1[METHOD_NAME]()
|
|
2481
|
-
|| non[METHOD_NAME]() !== non
|
|
2482
|
-
|| (PROPER_FUNCTION_NAME$1 && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
|
|
2483
|
-
});
|
|
2484
|
-
};
|
|
2485
|
-
|
|
2486
|
-
var $$a = _export;
|
|
2487
|
-
var $trim = stringTrim.trim;
|
|
2488
|
-
var forcedStringTrimMethod = stringTrimForced;
|
|
2489
|
-
|
|
2490
|
-
// `String.prototype.trim` method
|
|
2491
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
2492
|
-
$$a({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
|
|
2493
|
-
trim: function trim() {
|
|
2494
|
-
return $trim(this);
|
|
2495
|
-
}
|
|
2496
|
-
});
|
|
2497
|
-
|
|
2498
2499
|
/* eslint-disable no-useless-escape */
|
|
2499
2500
|
const paginationDataGatter = data => {
|
|
2500
2501
|
return data.data.docs;
|
|
@@ -2504,7 +2505,7 @@ const dataGatter = data => {
|
|
|
2504
2505
|
};
|
|
2505
2506
|
const capitalizeFirstLetter = (string = '') => {
|
|
2506
2507
|
var _a;
|
|
2507
|
-
return `${(_a = string === null || string === void 0 ? void 0 : string.charAt(0)) === null || _a === void 0 ? void 0 : _a.toUpperCase()}${string === null || string === void 0 ? void 0 : string.slice(1)}`;
|
|
2508
|
+
return `${(_a = string === null || string === void 0 ? void 0 : string.trim().charAt(0)) === null || _a === void 0 ? void 0 : _a.toUpperCase()}${string === null || string === void 0 ? void 0 : string.slice(1)}`;
|
|
2508
2509
|
};
|
|
2509
2510
|
const changeToCode = (string = '') => {
|
|
2510
2511
|
var _a, _b;
|
|
@@ -2884,6 +2885,9 @@ const usePage = ({
|
|
|
2884
2885
|
onError: handleError(code)
|
|
2885
2886
|
});
|
|
2886
2887
|
if ((response === null || response === void 0 ? void 0 : response.code) === 'SUCCESS') {
|
|
2888
|
+
if (formState === 'ADD') {
|
|
2889
|
+
setCurrentPage(1);
|
|
2890
|
+
}
|
|
2887
2891
|
setLoading(false);
|
|
2888
2892
|
onSuccess(code, response === null || response === void 0 ? void 0 : response.code, response === null || response === void 0 ? void 0 : response.message);
|
|
2889
2893
|
getPages();
|
|
@@ -4218,6 +4222,7 @@ const DeleteModal = ({
|
|
|
4218
4222
|
confirm,
|
|
4219
4223
|
typeHerePlaceholder
|
|
4220
4224
|
}) => {
|
|
4225
|
+
var _a;
|
|
4221
4226
|
const [userInput, setUserInput] = useState('');
|
|
4222
4227
|
useEffect(() => {
|
|
4223
4228
|
setUserInput('');
|
|
@@ -4238,13 +4243,14 @@ const DeleteModal = ({
|
|
|
4238
4243
|
className: "khb_delete-actions"
|
|
4239
4244
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
4240
4245
|
placeholder: typeHerePlaceholder || TRANSLATION_PAIRS_COMMON.typeHerePlaceholder,
|
|
4246
|
+
wrapperClassName: "w-full",
|
|
4241
4247
|
className: "khb_delete-input",
|
|
4242
4248
|
value: userInput,
|
|
4243
4249
|
onChange: e => setUserInput(e.target.value)
|
|
4244
4250
|
}), /*#__PURE__*/React.createElement("div", {
|
|
4245
4251
|
className: "khb_delete-buttons"
|
|
4246
4252
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
4247
|
-
disabled: userInput !== (itemData === null || itemData === void 0 ? void 0 : itemData['name']),
|
|
4253
|
+
disabled: userInput.toString().trim() !== ((_a = itemData === null || itemData === void 0 ? void 0 : itemData['name']) === null || _a === void 0 ? void 0 : _a.trim()),
|
|
4248
4254
|
onClick: onConfirmDelete
|
|
4249
4255
|
}, confirm || TRANSLATION_PAIRS_COMMON.confirm)))) : null;
|
|
4250
4256
|
};
|
|
@@ -4717,6 +4723,9 @@ const useWidget = ({
|
|
|
4717
4723
|
onError: handleError(code)
|
|
4718
4724
|
});
|
|
4719
4725
|
if ((response === null || response === void 0 ? void 0 : response.code) === 'SUCCESS') {
|
|
4726
|
+
if (formState === 'ADD') {
|
|
4727
|
+
setCurrentPage(1);
|
|
4728
|
+
}
|
|
4720
4729
|
setLoading(false);
|
|
4721
4730
|
onSuccess(code, response === null || response === void 0 ? void 0 : response.code, response === null || response === void 0 ? void 0 : response.message);
|
|
4722
4731
|
getWidgets();
|
|
@@ -6568,6 +6577,7 @@ const TabItem = ({
|
|
|
6568
6577
|
deleteTitle,
|
|
6569
6578
|
onRemoveTab,
|
|
6570
6579
|
register,
|
|
6580
|
+
error,
|
|
6571
6581
|
noButtonText,
|
|
6572
6582
|
yesButtonText
|
|
6573
6583
|
}) => {
|
|
@@ -6575,8 +6585,13 @@ const TabItem = ({
|
|
|
6575
6585
|
type: "text",
|
|
6576
6586
|
className: "khb_tabs-input",
|
|
6577
6587
|
autoFocus: true,
|
|
6588
|
+
style: {
|
|
6589
|
+
display: 'block'
|
|
6590
|
+
},
|
|
6578
6591
|
disabled: isDisabled
|
|
6579
|
-
}, register || {})),
|
|
6592
|
+
}, register || {})), error && /*#__PURE__*/React.createElement("p", {
|
|
6593
|
+
className: "khb_input-error "
|
|
6594
|
+
}, error), showDelete ? /*#__PURE__*/React.createElement(ConfirmPopOver, {
|
|
6580
6595
|
onConfirm: onRemoveTab,
|
|
6581
6596
|
title: deleteTitle,
|
|
6582
6597
|
confirmText: yesButtonText,
|
|
@@ -6587,6 +6602,7 @@ const TabItem = ({
|
|
|
6587
6602
|
};
|
|
6588
6603
|
|
|
6589
6604
|
const Tabs = ({
|
|
6605
|
+
errors,
|
|
6590
6606
|
activeTab,
|
|
6591
6607
|
setActiveTab,
|
|
6592
6608
|
options,
|
|
@@ -6603,6 +6619,7 @@ const Tabs = ({
|
|
|
6603
6619
|
itemsPlaceholder,
|
|
6604
6620
|
formatOptionLabel,
|
|
6605
6621
|
tabCollectionItems,
|
|
6622
|
+
tabNameRequiredText,
|
|
6606
6623
|
onCollectionItemsIndexChange
|
|
6607
6624
|
}) => {
|
|
6608
6625
|
const {
|
|
@@ -6629,6 +6646,7 @@ const Tabs = ({
|
|
|
6629
6646
|
}, /*#__PURE__*/React.createElement(TabList, {
|
|
6630
6647
|
className: "khb_tabs-list"
|
|
6631
6648
|
}, tabFields === null || tabFields === void 0 ? void 0 : tabFields.map((field, index) => {
|
|
6649
|
+
var _a, _b, _c;
|
|
6632
6650
|
return /*#__PURE__*/React.createElement(Tab, {
|
|
6633
6651
|
key: field.id,
|
|
6634
6652
|
className: classNames('khb_tabs-item', {
|
|
@@ -6637,11 +6655,14 @@ const Tabs = ({
|
|
|
6637
6655
|
}, /*#__PURE__*/React.createElement(TabItem, {
|
|
6638
6656
|
key: field.id,
|
|
6639
6657
|
deleteTitle: deleteTitle,
|
|
6640
|
-
register: register(`tabs.${index}.name
|
|
6658
|
+
register: register(`tabs.${index}.name`, {
|
|
6659
|
+
required: tabNameRequiredText
|
|
6660
|
+
}),
|
|
6641
6661
|
onRemoveTab: () => {
|
|
6642
6662
|
removeField(index);
|
|
6643
6663
|
setActiveTab(index === 0 ? 0 : index - 1);
|
|
6644
6664
|
},
|
|
6665
|
+
error: (_c = (_b = (_a = errors === null || errors === void 0 ? void 0 : errors['tabs']) === null || _a === void 0 ? void 0 : _a[index]) === null || _b === void 0 ? void 0 : _b.name) === null || _c === void 0 ? void 0 : _c.message,
|
|
6645
6666
|
noButtonText: noButtonText,
|
|
6646
6667
|
yesButtonText: yesButtonText,
|
|
6647
6668
|
showDelete: (tabFields === null || tabFields === void 0 ? void 0 : tabFields.length) > 1
|
|
@@ -7087,6 +7108,8 @@ const WidgetForm = ({
|
|
|
7087
7108
|
deleteTitle: t('widget.tabDeleteTitle'),
|
|
7088
7109
|
yesButtonText: t('yesButtonText'),
|
|
7089
7110
|
noButtonText: t('cancelButtonText'),
|
|
7111
|
+
errors: errors,
|
|
7112
|
+
tabNameRequiredText: t('widget.tabNameRequired'),
|
|
7090
7113
|
itemsPlaceholder: `Select ${selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.label}...`,
|
|
7091
7114
|
loadOptions: onChangeSearch,
|
|
7092
7115
|
isItemsLoading: collectionDataLoading,
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TabItemProps } from '../../../../types';
|
|
3
|
-
declare const TabItem: ({ showDelete, isDisabled, deleteTitle, onRemoveTab, register, noButtonText, yesButtonText, }: TabItemProps) => JSX.Element;
|
|
3
|
+
declare const TabItem: ({ showDelete, isDisabled, deleteTitle, onRemoveTab, register, error, noButtonText, yesButtonText, }: TabItemProps) => JSX.Element;
|
|
4
4
|
export default TabItem;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TabsProps } from '../../../../types';
|
|
3
|
-
declare const Tabs: ({ activeTab, setActiveTab, options, control, register, listCode, formatItem, deleteTitle, loadOptions, customStyles, noButtonText, yesButtonText, isItemsLoading, itemsPlaceholder, formatOptionLabel, tabCollectionItems, onCollectionItemsIndexChange, }: TabsProps) => JSX.Element;
|
|
3
|
+
declare const Tabs: ({ errors, activeTab, setActiveTab, options, control, register, listCode, formatItem, deleteTitle, loadOptions, customStyles, noButtonText, yesButtonText, isItemsLoading, itemsPlaceholder, formatOptionLabel, tabCollectionItems, tabNameRequiredText, onCollectionItemsIndexChange, }: TabsProps) => JSX.Element;
|
|
4
4
|
export default Tabs;
|
|
@@ -242,6 +242,7 @@ export interface TabItemProps {
|
|
|
242
242
|
register?: any;
|
|
243
243
|
noButtonText: string;
|
|
244
244
|
yesButtonText: string;
|
|
245
|
+
error?: string;
|
|
245
246
|
}
|
|
246
247
|
export interface TabsProps {
|
|
247
248
|
activeTab: number;
|
|
@@ -255,6 +256,7 @@ export interface TabsProps {
|
|
|
255
256
|
}[];
|
|
256
257
|
deleteTitle: string;
|
|
257
258
|
listCode: string;
|
|
259
|
+
tabNameRequiredText: string;
|
|
258
260
|
noButtonText: string;
|
|
259
261
|
yesButtonText: string;
|
|
260
262
|
itemsPlaceholder?: string;
|
|
@@ -263,6 +265,9 @@ export interface TabsProps {
|
|
|
263
265
|
formatItem?: (code: string, data: any) => JSX.Element;
|
|
264
266
|
onCollectionItemsIndexChange: (index: number, data: DropResult) => void;
|
|
265
267
|
tabCollectionItems: any[];
|
|
268
|
+
errors?: {
|
|
269
|
+
[key: string]: any;
|
|
270
|
+
};
|
|
266
271
|
customStyles?: any;
|
|
267
272
|
loadOptions?: (value?: string, callback?: (options: OptionType[]) => void) => Promise<OptionType[]>;
|
|
268
273
|
}
|