@knovator/pagecreator-admin 0.7.5 → 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.
Files changed (3) hide show
  1. package/index.cjs +132 -126
  2. package/index.js +132 -126
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -1882,6 +1882,70 @@ var toString$6 = function (argument) {
1882
1882
  return $String(argument);
1883
1883
  };
1884
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
+
1885
1949
  var anObject$8 = anObject$e;
1886
1950
 
1887
1951
  // `RegExp.prototype.flags` getter implementation
@@ -1900,13 +1964,13 @@ var regexpFlags$1 = function () {
1900
1964
  return result;
1901
1965
  };
1902
1966
 
1903
- var fails$b = fails$n;
1967
+ var fails$a = fails$n;
1904
1968
  var global$c = global$n;
1905
1969
 
1906
1970
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1907
1971
  var $RegExp$2 = global$c.RegExp;
1908
1972
 
1909
- var UNSUPPORTED_Y$1 = fails$b(function () {
1973
+ var UNSUPPORTED_Y$1 = fails$a(function () {
1910
1974
  var re = $RegExp$2('a', 'y');
1911
1975
  re.lastIndex = 2;
1912
1976
  return re.exec('abcd') != null;
@@ -1914,11 +1978,11 @@ var UNSUPPORTED_Y$1 = fails$b(function () {
1914
1978
 
1915
1979
  // UC Browser bug
1916
1980
  // https://github.com/zloirock/core-js/issues/1008
1917
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$b(function () {
1981
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$a(function () {
1918
1982
  return !$RegExp$2('a', 'y').sticky;
1919
1983
  });
1920
1984
 
1921
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$b(function () {
1985
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$a(function () {
1922
1986
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1923
1987
  var re = $RegExp$2('^r', 'gy');
1924
1988
  re.lastIndex = 2;
@@ -1931,24 +1995,24 @@ var regexpStickyHelpers = {
1931
1995
  UNSUPPORTED_Y: UNSUPPORTED_Y$1
1932
1996
  };
1933
1997
 
1934
- var fails$a = fails$n;
1998
+ var fails$9 = fails$n;
1935
1999
  var global$b = global$n;
1936
2000
 
1937
2001
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1938
2002
  var $RegExp$1 = global$b.RegExp;
1939
2003
 
1940
- var regexpUnsupportedDotAll = fails$a(function () {
2004
+ var regexpUnsupportedDotAll = fails$9(function () {
1941
2005
  var re = $RegExp$1('.', 's');
1942
2006
  return !(re.dotAll && re.exec('\n') && re.flags === 's');
1943
2007
  });
1944
2008
 
1945
- var fails$9 = fails$n;
2009
+ var fails$8 = fails$n;
1946
2010
  var global$a = global$n;
1947
2011
 
1948
2012
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1949
2013
  var $RegExp = global$a.RegExp;
1950
2014
 
1951
- var regexpUnsupportedNcg = fails$9(function () {
2015
+ var regexpUnsupportedNcg = fails$8(function () {
1952
2016
  var re = $RegExp('(?<a>b)', 'g');
1953
2017
  return re.exec('b').groups.a !== 'b' ||
1954
2018
  'b'.replace(re, '$<a>c') !== 'bc';
@@ -1957,8 +2021,8 @@ var regexpUnsupportedNcg = fails$9(function () {
1957
2021
  /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1958
2022
  /* eslint-disable regexp/no-useless-quantifier -- testing */
1959
2023
  var call$b = functionCall;
1960
- var uncurryThis$b = functionUncurryThis;
1961
- var toString$5 = toString$6;
2024
+ var uncurryThis$a = functionUncurryThis;
2025
+ var toString$4 = toString$6;
1962
2026
  var regexpFlags = regexpFlags$1;
1963
2027
  var stickyHelpers = regexpStickyHelpers;
1964
2028
  var shared = shared$4.exports;
@@ -1970,10 +2034,10 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1970
2034
  var nativeReplace = shared('native-string-replace', String.prototype.replace);
1971
2035
  var nativeExec = RegExp.prototype.exec;
1972
2036
  var patchedExec = nativeExec;
1973
- var charAt$3 = uncurryThis$b(''.charAt);
1974
- var indexOf = uncurryThis$b(''.indexOf);
1975
- var replace$2 = uncurryThis$b(''.replace);
1976
- var stringSlice$3 = uncurryThis$b(''.slice);
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);
1977
2041
 
1978
2042
  var UPDATES_LAST_INDEX_WRONG = (function () {
1979
2043
  var re1 = /a/;
@@ -1994,7 +2058,7 @@ if (PATCH) {
1994
2058
  patchedExec = function exec(string) {
1995
2059
  var re = this;
1996
2060
  var state = getInternalState(re);
1997
- var str = toString$5(string);
2061
+ var str = toString$4(string);
1998
2062
  var raw = state.raw;
1999
2063
  var result, reCopy, lastIndex, match, i, object, group;
2000
2064
 
@@ -2013,7 +2077,7 @@ if (PATCH) {
2013
2077
  var strCopy = str;
2014
2078
 
2015
2079
  if (sticky) {
2016
- flags = replace$2(flags, 'y', '');
2080
+ flags = replace$1(flags, 'y', '');
2017
2081
  if (indexOf(flags, 'g') === -1) {
2018
2082
  flags += 'g';
2019
2083
  }
@@ -2071,12 +2135,12 @@ if (PATCH) {
2071
2135
 
2072
2136
  var regexpExec$2 = patchedExec;
2073
2137
 
2074
- var $$c = _export;
2138
+ var $$b = _export;
2075
2139
  var exec$2 = regexpExec$2;
2076
2140
 
2077
2141
  // `RegExp.prototype.exec` method
2078
2142
  // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2079
- $$c({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
2143
+ $$b({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
2080
2144
  exec: exec$2
2081
2145
  });
2082
2146
 
@@ -2092,21 +2156,21 @@ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$
2092
2156
  });
2093
2157
 
2094
2158
  var classofRaw = classofRaw$2;
2095
- var uncurryThis$a = functionUncurryThis;
2159
+ var uncurryThis$9 = functionUncurryThis;
2096
2160
 
2097
2161
  var functionUncurryThisClause = function (fn) {
2098
2162
  // Nashorn bug:
2099
2163
  // https://github.com/zloirock/core-js/issues/1128
2100
2164
  // https://github.com/zloirock/core-js/issues/1130
2101
- if (classofRaw(fn) === 'Function') return uncurryThis$a(fn);
2165
+ if (classofRaw(fn) === 'Function') return uncurryThis$9(fn);
2102
2166
  };
2103
2167
 
2104
2168
  // TODO: Remove from `core-js@4` since it's moved to entry points
2105
2169
 
2106
- var uncurryThis$9 = functionUncurryThisClause;
2170
+ var uncurryThis$8 = functionUncurryThisClause;
2107
2171
  var defineBuiltIn$3 = defineBuiltIn$7;
2108
2172
  var regexpExec$1 = regexpExec$2;
2109
- var fails$8 = fails$n;
2173
+ var fails$7 = fails$n;
2110
2174
  var wellKnownSymbol$9 = wellKnownSymbol$i;
2111
2175
  var createNonEnumerableProperty = createNonEnumerableProperty$5;
2112
2176
 
@@ -2116,14 +2180,14 @@ var RegExpPrototype$2 = RegExp.prototype;
2116
2180
  var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2117
2181
  var SYMBOL = wellKnownSymbol$9(KEY);
2118
2182
 
2119
- var DELEGATES_TO_SYMBOL = !fails$8(function () {
2183
+ var DELEGATES_TO_SYMBOL = !fails$7(function () {
2120
2184
  // String methods call symbol-named RegEp methods
2121
2185
  var O = {};
2122
2186
  O[SYMBOL] = function () { return 7; };
2123
2187
  return ''[KEY](O) != 7;
2124
2188
  });
2125
2189
 
2126
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$8(function () {
2190
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$7(function () {
2127
2191
  // Symbol-named RegExp methods call .exec
2128
2192
  var execCalled = false;
2129
2193
  var re = /a/;
@@ -2152,9 +2216,9 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2152
2216
  !DELEGATES_TO_EXEC ||
2153
2217
  FORCED
2154
2218
  ) {
2155
- var uncurriedNativeRegExpMethod = uncurryThis$9(/./[SYMBOL]);
2219
+ var uncurriedNativeRegExpMethod = uncurryThis$8(/./[SYMBOL]);
2156
2220
  var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
2157
- var uncurriedNativeMethod = uncurryThis$9(nativeMethod);
2221
+ var uncurriedNativeMethod = uncurryThis$8(nativeMethod);
2158
2222
  var $exec = regexp.exec;
2159
2223
  if ($exec === regexpExec$1 || $exec === RegExpPrototype$2.exec) {
2160
2224
  if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
@@ -2175,18 +2239,18 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2175
2239
  if (SHAM) createNonEnumerableProperty(RegExpPrototype$2[SYMBOL], 'sham', true);
2176
2240
  };
2177
2241
 
2178
- var uncurryThis$8 = functionUncurryThis;
2242
+ var uncurryThis$7 = functionUncurryThis;
2179
2243
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
2180
- var toString$4 = toString$6;
2181
- var requireObjectCoercible$3 = requireObjectCoercible$6;
2244
+ var toString$3 = toString$6;
2245
+ var requireObjectCoercible$2 = requireObjectCoercible$6;
2182
2246
 
2183
- var charAt$2 = uncurryThis$8(''.charAt);
2184
- var charCodeAt = uncurryThis$8(''.charCodeAt);
2185
- var stringSlice$2 = uncurryThis$8(''.slice);
2247
+ var charAt$2 = uncurryThis$7(''.charAt);
2248
+ var charCodeAt = uncurryThis$7(''.charCodeAt);
2249
+ var stringSlice$2 = uncurryThis$7(''.slice);
2186
2250
 
2187
- var createMethod$2 = function (CONVERT_TO_STRING) {
2251
+ var createMethod$1 = function (CONVERT_TO_STRING) {
2188
2252
  return function ($this, pos) {
2189
- var S = toString$4(requireObjectCoercible$3($this));
2253
+ var S = toString$3(requireObjectCoercible$2($this));
2190
2254
  var position = toIntegerOrInfinity$1(pos);
2191
2255
  var size = S.length;
2192
2256
  var first, second;
@@ -2206,10 +2270,10 @@ var createMethod$2 = function (CONVERT_TO_STRING) {
2206
2270
  var stringMultibyte = {
2207
2271
  // `String.prototype.codePointAt` method
2208
2272
  // https://tc39.es/ecma262/#sec-string.prototype.codepointat
2209
- codeAt: createMethod$2(false),
2273
+ codeAt: createMethod$1(false),
2210
2274
  // `String.prototype.at` method
2211
2275
  // https://github.com/mathiasbynens/String.prototype.at
2212
- charAt: createMethod$2(true)
2276
+ charAt: createMethod$1(true)
2213
2277
  };
2214
2278
 
2215
2279
  var charAt$1 = stringMultibyte.charAt;
@@ -2220,13 +2284,13 @@ var advanceStringIndex$1 = function (S, index, unicode) {
2220
2284
  return index + (unicode ? charAt$1(S, index).length : 1);
2221
2285
  };
2222
2286
 
2223
- var uncurryThis$7 = functionUncurryThis;
2287
+ var uncurryThis$6 = functionUncurryThis;
2224
2288
  var toObject$1 = toObject$5;
2225
2289
 
2226
2290
  var floor = Math.floor;
2227
- var charAt = uncurryThis$7(''.charAt);
2228
- var replace$1 = uncurryThis$7(''.replace);
2229
- var stringSlice$1 = uncurryThis$7(''.slice);
2291
+ var charAt = uncurryThis$6(''.charAt);
2292
+ var replace = uncurryThis$6(''.replace);
2293
+ var stringSlice$1 = uncurryThis$6(''.slice);
2230
2294
  var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
2231
2295
  var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
2232
2296
 
@@ -2240,7 +2304,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2240
2304
  namedCaptures = toObject$1(namedCaptures);
2241
2305
  symbols = SUBSTITUTION_SYMBOLS;
2242
2306
  }
2243
- return replace$1(replacement, symbols, function (match, ch) {
2307
+ return replace(replacement, symbols, function (match, ch) {
2244
2308
  var capture;
2245
2309
  switch (charAt(ch, 0)) {
2246
2310
  case '$': return '$';
@@ -2288,16 +2352,16 @@ var regexpExecAbstract = function (R, S) {
2288
2352
 
2289
2353
  var apply$1 = functionApply;
2290
2354
  var call$8 = functionCall;
2291
- var uncurryThis$6 = functionUncurryThis;
2355
+ var uncurryThis$5 = functionUncurryThis;
2292
2356
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2293
- var fails$7 = fails$n;
2357
+ var fails$6 = fails$n;
2294
2358
  var anObject$6 = anObject$e;
2295
2359
  var isCallable$5 = isCallable$m;
2296
2360
  var isNullOrUndefined$2 = isNullOrUndefined$5;
2297
2361
  var toIntegerOrInfinity = toIntegerOrInfinity$4;
2298
2362
  var toLength = toLength$2;
2299
- var toString$3 = toString$6;
2300
- var requireObjectCoercible$2 = requireObjectCoercible$6;
2363
+ var toString$2 = toString$6;
2364
+ var requireObjectCoercible$1 = requireObjectCoercible$6;
2301
2365
  var advanceStringIndex = advanceStringIndex$1;
2302
2366
  var getMethod$2 = getMethod$4;
2303
2367
  var getSubstitution = getSubstitution$1;
@@ -2307,10 +2371,10 @@ var wellKnownSymbol$8 = wellKnownSymbol$i;
2307
2371
  var REPLACE = wellKnownSymbol$8('replace');
2308
2372
  var max = Math.max;
2309
2373
  var min = Math.min;
2310
- var concat = uncurryThis$6([].concat);
2311
- var push = uncurryThis$6([].push);
2312
- var stringIndexOf$1 = uncurryThis$6(''.indexOf);
2313
- var stringSlice = uncurryThis$6(''.slice);
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);
2314
2378
 
2315
2379
  var maybeToString = function (it) {
2316
2380
  return it === undefined ? it : String(it);
@@ -2331,7 +2395,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2331
2395
  return false;
2332
2396
  })();
2333
2397
 
2334
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$7(function () {
2398
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$6(function () {
2335
2399
  var re = /./;
2336
2400
  re.exec = function () {
2337
2401
  var result = [];
@@ -2350,17 +2414,17 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2350
2414
  // `String.prototype.replace` method
2351
2415
  // https://tc39.es/ecma262/#sec-string.prototype.replace
2352
2416
  function replace(searchValue, replaceValue) {
2353
- var O = requireObjectCoercible$2(this);
2417
+ var O = requireObjectCoercible$1(this);
2354
2418
  var replacer = isNullOrUndefined$2(searchValue) ? undefined : getMethod$2(searchValue, REPLACE);
2355
2419
  return replacer
2356
2420
  ? call$8(replacer, searchValue, O, replaceValue)
2357
- : call$8(nativeReplace, toString$3(O), searchValue, replaceValue);
2421
+ : call$8(nativeReplace, toString$2(O), searchValue, replaceValue);
2358
2422
  },
2359
2423
  // `RegExp.prototype[@@replace]` method
2360
2424
  // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2361
2425
  function (string, replaceValue) {
2362
2426
  var rx = anObject$6(this);
2363
- var S = toString$3(string);
2427
+ var S = toString$2(string);
2364
2428
 
2365
2429
  if (
2366
2430
  typeof replaceValue == 'string' &&
@@ -2372,7 +2436,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2372
2436
  }
2373
2437
 
2374
2438
  var functionalReplace = isCallable$5(replaceValue);
2375
- if (!functionalReplace) replaceValue = toString$3(replaceValue);
2439
+ if (!functionalReplace) replaceValue = toString$2(replaceValue);
2376
2440
 
2377
2441
  var global = rx.global;
2378
2442
  if (global) {
@@ -2387,7 +2451,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2387
2451
  push(results, result);
2388
2452
  if (!global) break;
2389
2453
 
2390
- var matchStr = toString$3(result[0]);
2454
+ var matchStr = toString$2(result[0]);
2391
2455
  if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
2392
2456
  }
2393
2457
 
@@ -2396,7 +2460,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2396
2460
  for (var i = 0; i < results.length; i++) {
2397
2461
  result = results[i];
2398
2462
 
2399
- var matched = toString$3(result[0]);
2463
+ var matched = toString$2(result[0]);
2400
2464
  var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
2401
2465
  var captures = [];
2402
2466
  // NOTE: This is equivalent to
@@ -2409,7 +2473,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2409
2473
  if (functionalReplace) {
2410
2474
  var replacerArgs = concat([matched], captures, position, S);
2411
2475
  if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
2412
- var replacement = toString$3(apply$1(replaceValue, undefined, replacerArgs));
2476
+ var replacement = toString$2(apply$1(replaceValue, undefined, replacerArgs));
2413
2477
  } else {
2414
2478
  replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
2415
2479
  }
@@ -2423,19 +2487,19 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2423
2487
  ];
2424
2488
  }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
2425
2489
 
2426
- var $$b = _export;
2490
+ var $$a = _export;
2427
2491
  var $includes = arrayIncludes.includes;
2428
- var fails$6 = fails$n;
2492
+ var fails$5 = fails$n;
2429
2493
  var addToUnscopables = addToUnscopables$2;
2430
2494
 
2431
2495
  // FF99+ bug
2432
- var BROKEN_ON_SPARSE = fails$6(function () {
2496
+ var BROKEN_ON_SPARSE = fails$5(function () {
2433
2497
  return !Array(1).includes();
2434
2498
  });
2435
2499
 
2436
2500
  // `Array.prototype.includes` method
2437
2501
  // https://tc39.es/ecma262/#sec-array.prototype.includes
2438
- $$b({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2502
+ $$a({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2439
2503
  includes: function includes(el /* , fromIndex = 0 */) {
2440
2504
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2441
2505
  }
@@ -2444,70 +2508,6 @@ $$b({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2444
2508
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2445
2509
  addToUnscopables('includes');
2446
2510
 
2447
- // a string of all valid unicode whitespaces
2448
- var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
2449
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
2450
-
2451
- var uncurryThis$5 = functionUncurryThis;
2452
- var requireObjectCoercible$1 = requireObjectCoercible$6;
2453
- var toString$2 = toString$6;
2454
- var whitespaces$2 = whitespaces$3;
2455
-
2456
- var replace = uncurryThis$5(''.replace);
2457
- var whitespace = '[' + whitespaces$2 + ']';
2458
- var ltrim = RegExp('^' + whitespace + whitespace + '*');
2459
- var rtrim = RegExp(whitespace + whitespace + '*$');
2460
-
2461
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
2462
- var createMethod$1 = function (TYPE) {
2463
- return function ($this) {
2464
- var string = toString$2(requireObjectCoercible$1($this));
2465
- if (TYPE & 1) string = replace(string, ltrim, '');
2466
- if (TYPE & 2) string = replace(string, rtrim, '');
2467
- return string;
2468
- };
2469
- };
2470
-
2471
- var stringTrim = {
2472
- // `String.prototype.{ trimLeft, trimStart }` methods
2473
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
2474
- start: createMethod$1(1),
2475
- // `String.prototype.{ trimRight, trimEnd }` methods
2476
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
2477
- end: createMethod$1(2),
2478
- // `String.prototype.trim` method
2479
- // https://tc39.es/ecma262/#sec-string.prototype.trim
2480
- trim: createMethod$1(3)
2481
- };
2482
-
2483
- var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
2484
- var fails$5 = fails$n;
2485
- var whitespaces$1 = whitespaces$3;
2486
-
2487
- var non = '\u200B\u0085\u180E';
2488
-
2489
- // check that a method works with the correct list
2490
- // of whitespaces and has a correct name
2491
- var stringTrimForced = function (METHOD_NAME) {
2492
- return fails$5(function () {
2493
- return !!whitespaces$1[METHOD_NAME]()
2494
- || non[METHOD_NAME]() !== non
2495
- || (PROPER_FUNCTION_NAME$1 && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
2496
- });
2497
- };
2498
-
2499
- var $$a = _export;
2500
- var $trim = stringTrim.trim;
2501
- var forcedStringTrimMethod = stringTrimForced;
2502
-
2503
- // `String.prototype.trim` method
2504
- // https://tc39.es/ecma262/#sec-string.prototype.trim
2505
- $$a({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
2506
- trim: function trim() {
2507
- return $trim(this);
2508
- }
2509
- });
2510
-
2511
2511
  /* eslint-disable no-useless-escape */
2512
2512
  const paginationDataGatter = data => {
2513
2513
  return data.data.docs;
@@ -2517,7 +2517,7 @@ const dataGatter = data => {
2517
2517
  };
2518
2518
  const capitalizeFirstLetter = (string = '') => {
2519
2519
  var _a;
2520
- 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)}`;
2521
2521
  };
2522
2522
  const changeToCode = (string = '') => {
2523
2523
  var _a, _b;
@@ -2897,6 +2897,9 @@ const usePage = ({
2897
2897
  onError: handleError(code)
2898
2898
  });
2899
2899
  if ((response === null || response === void 0 ? void 0 : response.code) === 'SUCCESS') {
2900
+ if (formState === 'ADD') {
2901
+ setCurrentPage(1);
2902
+ }
2900
2903
  setLoading(false);
2901
2904
  onSuccess(code, response === null || response === void 0 ? void 0 : response.code, response === null || response === void 0 ? void 0 : response.message);
2902
2905
  getPages();
@@ -4732,6 +4735,9 @@ const useWidget = ({
4732
4735
  onError: handleError(code)
4733
4736
  });
4734
4737
  if ((response === null || response === void 0 ? void 0 : response.code) === 'SUCCESS') {
4738
+ if (formState === 'ADD') {
4739
+ setCurrentPage(1);
4740
+ }
4735
4741
  setLoading(false);
4736
4742
  onSuccess(code, response === null || response === void 0 ? void 0 : response.code, response === null || response === void 0 ? void 0 : response.message);
4737
4743
  getWidgets();
package/index.js CHANGED
@@ -1870,6 +1870,70 @@ var toString$6 = function (argument) {
1870
1870
  return $String(argument);
1871
1871
  };
1872
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
+
1873
1937
  var anObject$8 = anObject$e;
1874
1938
 
1875
1939
  // `RegExp.prototype.flags` getter implementation
@@ -1888,13 +1952,13 @@ var regexpFlags$1 = function () {
1888
1952
  return result;
1889
1953
  };
1890
1954
 
1891
- var fails$b = fails$n;
1955
+ var fails$a = fails$n;
1892
1956
  var global$c = global$n;
1893
1957
 
1894
1958
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1895
1959
  var $RegExp$2 = global$c.RegExp;
1896
1960
 
1897
- var UNSUPPORTED_Y$1 = fails$b(function () {
1961
+ var UNSUPPORTED_Y$1 = fails$a(function () {
1898
1962
  var re = $RegExp$2('a', 'y');
1899
1963
  re.lastIndex = 2;
1900
1964
  return re.exec('abcd') != null;
@@ -1902,11 +1966,11 @@ var UNSUPPORTED_Y$1 = fails$b(function () {
1902
1966
 
1903
1967
  // UC Browser bug
1904
1968
  // https://github.com/zloirock/core-js/issues/1008
1905
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$b(function () {
1969
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$a(function () {
1906
1970
  return !$RegExp$2('a', 'y').sticky;
1907
1971
  });
1908
1972
 
1909
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$b(function () {
1973
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$a(function () {
1910
1974
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1911
1975
  var re = $RegExp$2('^r', 'gy');
1912
1976
  re.lastIndex = 2;
@@ -1919,24 +1983,24 @@ var regexpStickyHelpers = {
1919
1983
  UNSUPPORTED_Y: UNSUPPORTED_Y$1
1920
1984
  };
1921
1985
 
1922
- var fails$a = fails$n;
1986
+ var fails$9 = fails$n;
1923
1987
  var global$b = global$n;
1924
1988
 
1925
1989
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1926
1990
  var $RegExp$1 = global$b.RegExp;
1927
1991
 
1928
- var regexpUnsupportedDotAll = fails$a(function () {
1992
+ var regexpUnsupportedDotAll = fails$9(function () {
1929
1993
  var re = $RegExp$1('.', 's');
1930
1994
  return !(re.dotAll && re.exec('\n') && re.flags === 's');
1931
1995
  });
1932
1996
 
1933
- var fails$9 = fails$n;
1997
+ var fails$8 = fails$n;
1934
1998
  var global$a = global$n;
1935
1999
 
1936
2000
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1937
2001
  var $RegExp = global$a.RegExp;
1938
2002
 
1939
- var regexpUnsupportedNcg = fails$9(function () {
2003
+ var regexpUnsupportedNcg = fails$8(function () {
1940
2004
  var re = $RegExp('(?<a>b)', 'g');
1941
2005
  return re.exec('b').groups.a !== 'b' ||
1942
2006
  'b'.replace(re, '$<a>c') !== 'bc';
@@ -1945,8 +2009,8 @@ var regexpUnsupportedNcg = fails$9(function () {
1945
2009
  /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1946
2010
  /* eslint-disable regexp/no-useless-quantifier -- testing */
1947
2011
  var call$b = functionCall;
1948
- var uncurryThis$b = functionUncurryThis;
1949
- var toString$5 = toString$6;
2012
+ var uncurryThis$a = functionUncurryThis;
2013
+ var toString$4 = toString$6;
1950
2014
  var regexpFlags = regexpFlags$1;
1951
2015
  var stickyHelpers = regexpStickyHelpers;
1952
2016
  var shared = shared$4.exports;
@@ -1958,10 +2022,10 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1958
2022
  var nativeReplace = shared('native-string-replace', String.prototype.replace);
1959
2023
  var nativeExec = RegExp.prototype.exec;
1960
2024
  var patchedExec = nativeExec;
1961
- var charAt$3 = uncurryThis$b(''.charAt);
1962
- var indexOf = uncurryThis$b(''.indexOf);
1963
- var replace$2 = uncurryThis$b(''.replace);
1964
- var stringSlice$3 = uncurryThis$b(''.slice);
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);
1965
2029
 
1966
2030
  var UPDATES_LAST_INDEX_WRONG = (function () {
1967
2031
  var re1 = /a/;
@@ -1982,7 +2046,7 @@ if (PATCH) {
1982
2046
  patchedExec = function exec(string) {
1983
2047
  var re = this;
1984
2048
  var state = getInternalState(re);
1985
- var str = toString$5(string);
2049
+ var str = toString$4(string);
1986
2050
  var raw = state.raw;
1987
2051
  var result, reCopy, lastIndex, match, i, object, group;
1988
2052
 
@@ -2001,7 +2065,7 @@ if (PATCH) {
2001
2065
  var strCopy = str;
2002
2066
 
2003
2067
  if (sticky) {
2004
- flags = replace$2(flags, 'y', '');
2068
+ flags = replace$1(flags, 'y', '');
2005
2069
  if (indexOf(flags, 'g') === -1) {
2006
2070
  flags += 'g';
2007
2071
  }
@@ -2059,12 +2123,12 @@ if (PATCH) {
2059
2123
 
2060
2124
  var regexpExec$2 = patchedExec;
2061
2125
 
2062
- var $$c = _export;
2126
+ var $$b = _export;
2063
2127
  var exec$2 = regexpExec$2;
2064
2128
 
2065
2129
  // `RegExp.prototype.exec` method
2066
2130
  // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2067
- $$c({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
2131
+ $$b({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
2068
2132
  exec: exec$2
2069
2133
  });
2070
2134
 
@@ -2080,21 +2144,21 @@ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$
2080
2144
  });
2081
2145
 
2082
2146
  var classofRaw = classofRaw$2;
2083
- var uncurryThis$a = functionUncurryThis;
2147
+ var uncurryThis$9 = functionUncurryThis;
2084
2148
 
2085
2149
  var functionUncurryThisClause = function (fn) {
2086
2150
  // Nashorn bug:
2087
2151
  // https://github.com/zloirock/core-js/issues/1128
2088
2152
  // https://github.com/zloirock/core-js/issues/1130
2089
- if (classofRaw(fn) === 'Function') return uncurryThis$a(fn);
2153
+ if (classofRaw(fn) === 'Function') return uncurryThis$9(fn);
2090
2154
  };
2091
2155
 
2092
2156
  // TODO: Remove from `core-js@4` since it's moved to entry points
2093
2157
 
2094
- var uncurryThis$9 = functionUncurryThisClause;
2158
+ var uncurryThis$8 = functionUncurryThisClause;
2095
2159
  var defineBuiltIn$3 = defineBuiltIn$7;
2096
2160
  var regexpExec$1 = regexpExec$2;
2097
- var fails$8 = fails$n;
2161
+ var fails$7 = fails$n;
2098
2162
  var wellKnownSymbol$9 = wellKnownSymbol$i;
2099
2163
  var createNonEnumerableProperty = createNonEnumerableProperty$5;
2100
2164
 
@@ -2104,14 +2168,14 @@ var RegExpPrototype$2 = RegExp.prototype;
2104
2168
  var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2105
2169
  var SYMBOL = wellKnownSymbol$9(KEY);
2106
2170
 
2107
- var DELEGATES_TO_SYMBOL = !fails$8(function () {
2171
+ var DELEGATES_TO_SYMBOL = !fails$7(function () {
2108
2172
  // String methods call symbol-named RegEp methods
2109
2173
  var O = {};
2110
2174
  O[SYMBOL] = function () { return 7; };
2111
2175
  return ''[KEY](O) != 7;
2112
2176
  });
2113
2177
 
2114
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$8(function () {
2178
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$7(function () {
2115
2179
  // Symbol-named RegExp methods call .exec
2116
2180
  var execCalled = false;
2117
2181
  var re = /a/;
@@ -2140,9 +2204,9 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2140
2204
  !DELEGATES_TO_EXEC ||
2141
2205
  FORCED
2142
2206
  ) {
2143
- var uncurriedNativeRegExpMethod = uncurryThis$9(/./[SYMBOL]);
2207
+ var uncurriedNativeRegExpMethod = uncurryThis$8(/./[SYMBOL]);
2144
2208
  var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
2145
- var uncurriedNativeMethod = uncurryThis$9(nativeMethod);
2209
+ var uncurriedNativeMethod = uncurryThis$8(nativeMethod);
2146
2210
  var $exec = regexp.exec;
2147
2211
  if ($exec === regexpExec$1 || $exec === RegExpPrototype$2.exec) {
2148
2212
  if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
@@ -2163,18 +2227,18 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2163
2227
  if (SHAM) createNonEnumerableProperty(RegExpPrototype$2[SYMBOL], 'sham', true);
2164
2228
  };
2165
2229
 
2166
- var uncurryThis$8 = functionUncurryThis;
2230
+ var uncurryThis$7 = functionUncurryThis;
2167
2231
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
2168
- var toString$4 = toString$6;
2169
- var requireObjectCoercible$3 = requireObjectCoercible$6;
2232
+ var toString$3 = toString$6;
2233
+ var requireObjectCoercible$2 = requireObjectCoercible$6;
2170
2234
 
2171
- var charAt$2 = uncurryThis$8(''.charAt);
2172
- var charCodeAt = uncurryThis$8(''.charCodeAt);
2173
- var stringSlice$2 = uncurryThis$8(''.slice);
2235
+ var charAt$2 = uncurryThis$7(''.charAt);
2236
+ var charCodeAt = uncurryThis$7(''.charCodeAt);
2237
+ var stringSlice$2 = uncurryThis$7(''.slice);
2174
2238
 
2175
- var createMethod$2 = function (CONVERT_TO_STRING) {
2239
+ var createMethod$1 = function (CONVERT_TO_STRING) {
2176
2240
  return function ($this, pos) {
2177
- var S = toString$4(requireObjectCoercible$3($this));
2241
+ var S = toString$3(requireObjectCoercible$2($this));
2178
2242
  var position = toIntegerOrInfinity$1(pos);
2179
2243
  var size = S.length;
2180
2244
  var first, second;
@@ -2194,10 +2258,10 @@ var createMethod$2 = function (CONVERT_TO_STRING) {
2194
2258
  var stringMultibyte = {
2195
2259
  // `String.prototype.codePointAt` method
2196
2260
  // https://tc39.es/ecma262/#sec-string.prototype.codepointat
2197
- codeAt: createMethod$2(false),
2261
+ codeAt: createMethod$1(false),
2198
2262
  // `String.prototype.at` method
2199
2263
  // https://github.com/mathiasbynens/String.prototype.at
2200
- charAt: createMethod$2(true)
2264
+ charAt: createMethod$1(true)
2201
2265
  };
2202
2266
 
2203
2267
  var charAt$1 = stringMultibyte.charAt;
@@ -2208,13 +2272,13 @@ var advanceStringIndex$1 = function (S, index, unicode) {
2208
2272
  return index + (unicode ? charAt$1(S, index).length : 1);
2209
2273
  };
2210
2274
 
2211
- var uncurryThis$7 = functionUncurryThis;
2275
+ var uncurryThis$6 = functionUncurryThis;
2212
2276
  var toObject$1 = toObject$5;
2213
2277
 
2214
2278
  var floor = Math.floor;
2215
- var charAt = uncurryThis$7(''.charAt);
2216
- var replace$1 = uncurryThis$7(''.replace);
2217
- var stringSlice$1 = uncurryThis$7(''.slice);
2279
+ var charAt = uncurryThis$6(''.charAt);
2280
+ var replace = uncurryThis$6(''.replace);
2281
+ var stringSlice$1 = uncurryThis$6(''.slice);
2218
2282
  var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
2219
2283
  var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
2220
2284
 
@@ -2228,7 +2292,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2228
2292
  namedCaptures = toObject$1(namedCaptures);
2229
2293
  symbols = SUBSTITUTION_SYMBOLS;
2230
2294
  }
2231
- return replace$1(replacement, symbols, function (match, ch) {
2295
+ return replace(replacement, symbols, function (match, ch) {
2232
2296
  var capture;
2233
2297
  switch (charAt(ch, 0)) {
2234
2298
  case '$': return '$';
@@ -2276,16 +2340,16 @@ var regexpExecAbstract = function (R, S) {
2276
2340
 
2277
2341
  var apply$1 = functionApply;
2278
2342
  var call$8 = functionCall;
2279
- var uncurryThis$6 = functionUncurryThis;
2343
+ var uncurryThis$5 = functionUncurryThis;
2280
2344
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2281
- var fails$7 = fails$n;
2345
+ var fails$6 = fails$n;
2282
2346
  var anObject$6 = anObject$e;
2283
2347
  var isCallable$5 = isCallable$m;
2284
2348
  var isNullOrUndefined$2 = isNullOrUndefined$5;
2285
2349
  var toIntegerOrInfinity = toIntegerOrInfinity$4;
2286
2350
  var toLength = toLength$2;
2287
- var toString$3 = toString$6;
2288
- var requireObjectCoercible$2 = requireObjectCoercible$6;
2351
+ var toString$2 = toString$6;
2352
+ var requireObjectCoercible$1 = requireObjectCoercible$6;
2289
2353
  var advanceStringIndex = advanceStringIndex$1;
2290
2354
  var getMethod$2 = getMethod$4;
2291
2355
  var getSubstitution = getSubstitution$1;
@@ -2295,10 +2359,10 @@ var wellKnownSymbol$8 = wellKnownSymbol$i;
2295
2359
  var REPLACE = wellKnownSymbol$8('replace');
2296
2360
  var max = Math.max;
2297
2361
  var min = Math.min;
2298
- var concat = uncurryThis$6([].concat);
2299
- var push = uncurryThis$6([].push);
2300
- var stringIndexOf$1 = uncurryThis$6(''.indexOf);
2301
- var stringSlice = uncurryThis$6(''.slice);
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);
2302
2366
 
2303
2367
  var maybeToString = function (it) {
2304
2368
  return it === undefined ? it : String(it);
@@ -2319,7 +2383,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2319
2383
  return false;
2320
2384
  })();
2321
2385
 
2322
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$7(function () {
2386
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$6(function () {
2323
2387
  var re = /./;
2324
2388
  re.exec = function () {
2325
2389
  var result = [];
@@ -2338,17 +2402,17 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2338
2402
  // `String.prototype.replace` method
2339
2403
  // https://tc39.es/ecma262/#sec-string.prototype.replace
2340
2404
  function replace(searchValue, replaceValue) {
2341
- var O = requireObjectCoercible$2(this);
2405
+ var O = requireObjectCoercible$1(this);
2342
2406
  var replacer = isNullOrUndefined$2(searchValue) ? undefined : getMethod$2(searchValue, REPLACE);
2343
2407
  return replacer
2344
2408
  ? call$8(replacer, searchValue, O, replaceValue)
2345
- : call$8(nativeReplace, toString$3(O), searchValue, replaceValue);
2409
+ : call$8(nativeReplace, toString$2(O), searchValue, replaceValue);
2346
2410
  },
2347
2411
  // `RegExp.prototype[@@replace]` method
2348
2412
  // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2349
2413
  function (string, replaceValue) {
2350
2414
  var rx = anObject$6(this);
2351
- var S = toString$3(string);
2415
+ var S = toString$2(string);
2352
2416
 
2353
2417
  if (
2354
2418
  typeof replaceValue == 'string' &&
@@ -2360,7 +2424,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2360
2424
  }
2361
2425
 
2362
2426
  var functionalReplace = isCallable$5(replaceValue);
2363
- if (!functionalReplace) replaceValue = toString$3(replaceValue);
2427
+ if (!functionalReplace) replaceValue = toString$2(replaceValue);
2364
2428
 
2365
2429
  var global = rx.global;
2366
2430
  if (global) {
@@ -2375,7 +2439,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2375
2439
  push(results, result);
2376
2440
  if (!global) break;
2377
2441
 
2378
- var matchStr = toString$3(result[0]);
2442
+ var matchStr = toString$2(result[0]);
2379
2443
  if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
2380
2444
  }
2381
2445
 
@@ -2384,7 +2448,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2384
2448
  for (var i = 0; i < results.length; i++) {
2385
2449
  result = results[i];
2386
2450
 
2387
- var matched = toString$3(result[0]);
2451
+ var matched = toString$2(result[0]);
2388
2452
  var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
2389
2453
  var captures = [];
2390
2454
  // NOTE: This is equivalent to
@@ -2397,7 +2461,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2397
2461
  if (functionalReplace) {
2398
2462
  var replacerArgs = concat([matched], captures, position, S);
2399
2463
  if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
2400
- var replacement = toString$3(apply$1(replaceValue, undefined, replacerArgs));
2464
+ var replacement = toString$2(apply$1(replaceValue, undefined, replacerArgs));
2401
2465
  } else {
2402
2466
  replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
2403
2467
  }
@@ -2411,19 +2475,19 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2411
2475
  ];
2412
2476
  }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
2413
2477
 
2414
- var $$b = _export;
2478
+ var $$a = _export;
2415
2479
  var $includes = arrayIncludes.includes;
2416
- var fails$6 = fails$n;
2480
+ var fails$5 = fails$n;
2417
2481
  var addToUnscopables = addToUnscopables$2;
2418
2482
 
2419
2483
  // FF99+ bug
2420
- var BROKEN_ON_SPARSE = fails$6(function () {
2484
+ var BROKEN_ON_SPARSE = fails$5(function () {
2421
2485
  return !Array(1).includes();
2422
2486
  });
2423
2487
 
2424
2488
  // `Array.prototype.includes` method
2425
2489
  // https://tc39.es/ecma262/#sec-array.prototype.includes
2426
- $$b({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2490
+ $$a({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2427
2491
  includes: function includes(el /* , fromIndex = 0 */) {
2428
2492
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2429
2493
  }
@@ -2432,70 +2496,6 @@ $$b({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2432
2496
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2433
2497
  addToUnscopables('includes');
2434
2498
 
2435
- // a string of all valid unicode whitespaces
2436
- var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
2437
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
2438
-
2439
- var uncurryThis$5 = functionUncurryThis;
2440
- var requireObjectCoercible$1 = requireObjectCoercible$6;
2441
- var toString$2 = toString$6;
2442
- var whitespaces$2 = whitespaces$3;
2443
-
2444
- var replace = uncurryThis$5(''.replace);
2445
- var whitespace = '[' + whitespaces$2 + ']';
2446
- var ltrim = RegExp('^' + whitespace + whitespace + '*');
2447
- var rtrim = RegExp(whitespace + whitespace + '*$');
2448
-
2449
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
2450
- var createMethod$1 = function (TYPE) {
2451
- return function ($this) {
2452
- var string = toString$2(requireObjectCoercible$1($this));
2453
- if (TYPE & 1) string = replace(string, ltrim, '');
2454
- if (TYPE & 2) string = replace(string, rtrim, '');
2455
- return string;
2456
- };
2457
- };
2458
-
2459
- var stringTrim = {
2460
- // `String.prototype.{ trimLeft, trimStart }` methods
2461
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
2462
- start: createMethod$1(1),
2463
- // `String.prototype.{ trimRight, trimEnd }` methods
2464
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
2465
- end: createMethod$1(2),
2466
- // `String.prototype.trim` method
2467
- // https://tc39.es/ecma262/#sec-string.prototype.trim
2468
- trim: createMethod$1(3)
2469
- };
2470
-
2471
- var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
2472
- var fails$5 = fails$n;
2473
- var whitespaces$1 = whitespaces$3;
2474
-
2475
- var non = '\u200B\u0085\u180E';
2476
-
2477
- // check that a method works with the correct list
2478
- // of whitespaces and has a correct name
2479
- var stringTrimForced = function (METHOD_NAME) {
2480
- return fails$5(function () {
2481
- return !!whitespaces$1[METHOD_NAME]()
2482
- || non[METHOD_NAME]() !== non
2483
- || (PROPER_FUNCTION_NAME$1 && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
2484
- });
2485
- };
2486
-
2487
- var $$a = _export;
2488
- var $trim = stringTrim.trim;
2489
- var forcedStringTrimMethod = stringTrimForced;
2490
-
2491
- // `String.prototype.trim` method
2492
- // https://tc39.es/ecma262/#sec-string.prototype.trim
2493
- $$a({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
2494
- trim: function trim() {
2495
- return $trim(this);
2496
- }
2497
- });
2498
-
2499
2499
  /* eslint-disable no-useless-escape */
2500
2500
  const paginationDataGatter = data => {
2501
2501
  return data.data.docs;
@@ -2505,7 +2505,7 @@ const dataGatter = data => {
2505
2505
  };
2506
2506
  const capitalizeFirstLetter = (string = '') => {
2507
2507
  var _a;
2508
- 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)}`;
2509
2509
  };
2510
2510
  const changeToCode = (string = '') => {
2511
2511
  var _a, _b;
@@ -2885,6 +2885,9 @@ const usePage = ({
2885
2885
  onError: handleError(code)
2886
2886
  });
2887
2887
  if ((response === null || response === void 0 ? void 0 : response.code) === 'SUCCESS') {
2888
+ if (formState === 'ADD') {
2889
+ setCurrentPage(1);
2890
+ }
2888
2891
  setLoading(false);
2889
2892
  onSuccess(code, response === null || response === void 0 ? void 0 : response.code, response === null || response === void 0 ? void 0 : response.message);
2890
2893
  getPages();
@@ -4720,6 +4723,9 @@ const useWidget = ({
4720
4723
  onError: handleError(code)
4721
4724
  });
4722
4725
  if ((response === null || response === void 0 ? void 0 : response.code) === 'SUCCESS') {
4726
+ if (formState === 'ADD') {
4727
+ setCurrentPage(1);
4728
+ }
4723
4729
  setLoading(false);
4724
4730
  onSuccess(code, response === null || response === void 0 ? void 0 : response.code, response === null || response === void 0 ? void 0 : response.message);
4725
4731
  getWidgets();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knovator/pagecreator-admin",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "dependencies": {
5
5
  "classnames": "^2.3.1",
6
6
  "react-beautiful-dnd": "^13.1.0",