@uncinc/uncinc-react-kitchen-sink 2.8.52 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ApiAutocomplete/index.js +41 -44
- package/dist/components/Button/index.d.ts +7 -1
- package/dist/components/Button/index.js +11 -3
- package/dist/components/Form/Checkbox/index.js +2 -1
- package/dist/components/Form/Select/Input/index.js +9 -4
- package/dist/components/Form/TextField/index.js +18 -3
- package/dist/components/GoogleConsentCookieBanner/index.js +7 -4
- package/dist/components/GoogleConsentCookieBanner/types.d.ts +1 -0
- package/dist/components/Icon/style.scss +47 -0
- package/dist/components/Image/AdaptivePicture/index.js +25 -3
- package/dist/components/Image/AdaptivePicture/style.scss +1 -0
- package/dist/components/Image/helpers/index.js +1 -1
- package/dist/components/Share/CopyToClipboard/index.js +48 -11
- package/dist/components/Tag/style.scss +18 -3
- package/dist/components/WysiwygField/index.d.ts +5 -1
- package/dist/components/WysiwygField/index.js +10 -4
- package/dist/helpers/apiAutoComplete.d.ts +1 -0
- package/dist/helpers/apiAutoComplete.js +55 -0
- package/dist/helpers/utm.d.ts +16 -0
- package/dist/helpers/utm.js +47 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/package.json +3 -2
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
var _excluded = ["endpoint", "placeholder", "renderItem", "defaultValue", "onSelectItem", "queryParameter", "getSuggestionValue", "requestOptions"];
|
|
2
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["endpoint", "placeholder", "renderItem", "defaultValue", "onSelectItem", "queryParameter", "getSuggestionValue", "requestOptions"];
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
9
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
10
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
3
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
12
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
13
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -8,26 +16,10 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
8
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
17
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
18
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
19
|
import React, { useState } from 'react';
|
|
17
20
|
import Autosuggest from 'react-autosuggest';
|
|
21
|
+
import { getApiAutoCompleteSuggestions } from '../../helpers/apiAutoComplete';
|
|
18
22
|
import './style.scss';
|
|
19
|
-
function abortableFetch(request, opts) {
|
|
20
|
-
var controller = new AbortController();
|
|
21
|
-
var signal = controller.signal;
|
|
22
|
-
return {
|
|
23
|
-
abort: function abort() {
|
|
24
|
-
return controller.abort();
|
|
25
|
-
},
|
|
26
|
-
ready: fetch(request, _objectSpread(_objectSpread({}, opts), {}, {
|
|
27
|
-
signal: signal
|
|
28
|
-
}))
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
23
|
var currentFetch = null;
|
|
32
24
|
var ApiAutocomplete = function ApiAutocomplete(_ref) {
|
|
33
25
|
var endpoint = _ref.endpoint,
|
|
@@ -48,30 +40,35 @@ var ApiAutocomplete = function ApiAutocomplete(_ref) {
|
|
|
48
40
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
49
41
|
results = _useState4[0],
|
|
50
42
|
setResults = _useState4[1];
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
43
|
+
var getSuggestionsSetResults = /*#__PURE__*/function () {
|
|
44
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
45
|
+
var results;
|
|
46
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
47
|
+
while (1) switch (_context.prev = _context.next) {
|
|
48
|
+
case 0:
|
|
49
|
+
_context.next = 2;
|
|
50
|
+
return getApiAutoCompleteSuggestions(endpoint, queryParameter, queryInput, requestOptions, currentFetch);
|
|
51
|
+
case 2:
|
|
52
|
+
results = _context.sent;
|
|
53
|
+
if (results) {
|
|
54
|
+
setResults(results);
|
|
55
|
+
}
|
|
56
|
+
case 4:
|
|
57
|
+
case "end":
|
|
58
|
+
return _context.stop();
|
|
59
|
+
}
|
|
60
|
+
}, _callee);
|
|
61
|
+
}));
|
|
62
|
+
return function getSuggestionsSetResults() {
|
|
63
|
+
return _ref2.apply(this, arguments);
|
|
64
|
+
};
|
|
65
|
+
}();
|
|
69
66
|
return /*#__PURE__*/React.createElement(Autosuggest, {
|
|
70
67
|
suggestions: results,
|
|
71
|
-
onSuggestionsFetchRequested: function onSuggestionsFetchRequested(
|
|
72
|
-
var value =
|
|
73
|
-
reason =
|
|
74
|
-
|
|
68
|
+
onSuggestionsFetchRequested: function onSuggestionsFetchRequested(_ref3) {
|
|
69
|
+
var value = _ref3.value,
|
|
70
|
+
reason = _ref3.reason;
|
|
71
|
+
getSuggestionsSetResults(value);
|
|
75
72
|
},
|
|
76
73
|
onSuggestionsClearRequested: function onSuggestionsClearRequested() {
|
|
77
74
|
setResults([]);
|
|
@@ -80,8 +77,8 @@ var ApiAutocomplete = function ApiAutocomplete(_ref) {
|
|
|
80
77
|
renderSuggestion: function renderSuggestion(item, attributes) {
|
|
81
78
|
return renderItem(item, attributes.isHighlighted);
|
|
82
79
|
},
|
|
83
|
-
onSuggestionSelected: function onSuggestionSelected(event,
|
|
84
|
-
var suggestion =
|
|
80
|
+
onSuggestionSelected: function onSuggestionSelected(event, _ref4) {
|
|
81
|
+
var suggestion = _ref4.suggestion;
|
|
85
82
|
onSelectItem(suggestion);
|
|
86
83
|
},
|
|
87
84
|
inputProps: _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -93,8 +90,8 @@ var ApiAutocomplete = function ApiAutocomplete(_ref) {
|
|
|
93
90
|
onSelectItem('');
|
|
94
91
|
}
|
|
95
92
|
},
|
|
96
|
-
onChange: function onChange(event,
|
|
97
|
-
var newValue =
|
|
93
|
+
onChange: function onChange(event, _ref5) {
|
|
94
|
+
var newValue = _ref5.newValue;
|
|
98
95
|
setQuery(newValue);
|
|
99
96
|
}
|
|
100
97
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function Button({ href, dispatch, className, children, primary, inverted, language, enableLoader, loading, htmlType, target, ...props }: {
|
|
1
|
+
export function Button({ href, dispatch, className, children, primary, inverted, language, enableLoader, loading, htmlType, target, forwardRef, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
href: any;
|
|
4
4
|
dispatch: any;
|
|
@@ -11,6 +11,7 @@ export function Button({ href, dispatch, className, children, primary, inverted,
|
|
|
11
11
|
loading: any;
|
|
12
12
|
htmlType: any;
|
|
13
13
|
target: any;
|
|
14
|
+
forwardRef: any;
|
|
14
15
|
}): React.JSX.Element;
|
|
15
16
|
export namespace Button {
|
|
16
17
|
namespace defaultProps {
|
|
@@ -21,6 +22,7 @@ export namespace Button {
|
|
|
21
22
|
let enableLoader: boolean;
|
|
22
23
|
let htmlType: string;
|
|
23
24
|
let target: string;
|
|
25
|
+
let forwardRef: null;
|
|
24
26
|
}
|
|
25
27
|
namespace propTypes {
|
|
26
28
|
let href_1: PropTypes.Requireable<string>;
|
|
@@ -37,6 +39,10 @@ export namespace Button {
|
|
|
37
39
|
export { htmlType_1 as htmlType };
|
|
38
40
|
let target_1: PropTypes.Requireable<string>;
|
|
39
41
|
export { target_1 as target };
|
|
42
|
+
let forwardRef_1: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.InferProps<{
|
|
43
|
+
current: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
44
|
+
}> | null | undefined>>;
|
|
45
|
+
export { forwardRef_1 as forwardRef };
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
48
|
declare const _default: (props: any) => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["href", "dispatch", "className", "children", "primary", "inverted", "language", "enableLoader", "loading", "htmlType", "target"];
|
|
1
|
+
var _excluded = ["href", "dispatch", "className", "children", "primary", "inverted", "language", "enableLoader", "loading", "htmlType", "target", "forwardRef"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -22,6 +22,7 @@ export var Button = function Button(_ref) {
|
|
|
22
22
|
loading = _ref.loading,
|
|
23
23
|
htmlType = _ref.htmlType,
|
|
24
24
|
target = _ref.target,
|
|
25
|
+
forwardRef = _ref.forwardRef,
|
|
25
26
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
27
|
var classes = classNames('Button', className, {
|
|
27
28
|
'Button--primary': primary,
|
|
@@ -48,6 +49,7 @@ export var Button = function Button(_ref) {
|
|
|
48
49
|
className: classes,
|
|
49
50
|
href: href
|
|
50
51
|
}, props, {
|
|
52
|
+
ref: forwardRef,
|
|
51
53
|
onClick: onClick
|
|
52
54
|
}), children)
|
|
53
55
|
);
|
|
@@ -58,12 +60,14 @@ export var Button = function Button(_ref) {
|
|
|
58
60
|
target: "_blank",
|
|
59
61
|
rel: "noreferrer noopener"
|
|
60
62
|
}, props, {
|
|
63
|
+
ref: forwardRef,
|
|
61
64
|
onClick: onClick
|
|
62
65
|
}), children) : /*#__PURE__*/React.createElement(Link, _extends({
|
|
63
66
|
to: href,
|
|
64
67
|
className: classes,
|
|
65
68
|
target: target
|
|
66
69
|
}, props, {
|
|
70
|
+
ref: forwardRef,
|
|
67
71
|
onClick: onClick
|
|
68
72
|
}), children);
|
|
69
73
|
};
|
|
@@ -74,7 +78,8 @@ Button.defaultProps = {
|
|
|
74
78
|
href: null,
|
|
75
79
|
enableLoader: false,
|
|
76
80
|
htmlType: 'button',
|
|
77
|
-
target: '_self'
|
|
81
|
+
target: '_self',
|
|
82
|
+
forwardRef: null
|
|
78
83
|
};
|
|
79
84
|
Button.propTypes = {
|
|
80
85
|
href: PropTypes.string,
|
|
@@ -83,6 +88,9 @@ Button.propTypes = {
|
|
|
83
88
|
inverted: PropTypes.bool,
|
|
84
89
|
enableLoader: PropTypes.bool,
|
|
85
90
|
htmlType: PropTypes.oneOf(['button', 'submit', 'reset']),
|
|
86
|
-
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])
|
|
91
|
+
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
|
|
92
|
+
forwardRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
93
|
+
current: PropTypes.element
|
|
94
|
+
})])
|
|
87
95
|
};
|
|
88
96
|
export default withMapping(Button);
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Field } from 'formik';
|
|
4
4
|
import c from 'classnames';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import ReactHtmlParser from 'react-html-parser';
|
|
6
7
|
import GenericFormElement from '../GenericFormElement';
|
|
7
8
|
import withMapping from '../../../Context/withMapping';
|
|
8
9
|
import { useExtendedFormikContext } from '../FormikWrapper';
|
|
@@ -73,7 +74,7 @@ export var Checkbox = function Checkbox(props) {
|
|
|
73
74
|
},
|
|
74
75
|
disabled: disabled,
|
|
75
76
|
className: className
|
|
76
|
-
})), title);
|
|
77
|
+
})), ReactHtmlParser(title));
|
|
77
78
|
}));
|
|
78
79
|
};
|
|
79
80
|
Checkbox.defaultProps = {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
var _excluded = ["fieldName", "id", "validation", "defaultValue", "onChange", "options", "placeholder", "disabled", "className", "wrapperClassName", "isClearable", "isSearchable", "multiple", "size", "required"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
1
5
|
import React from 'react';
|
|
2
6
|
import SelectStyled from 'react-select';
|
|
3
7
|
import c from 'classnames';
|
|
@@ -34,7 +38,8 @@ var SelectInput = function SelectInput(props) {
|
|
|
34
38
|
_props$multiple = props.multiple,
|
|
35
39
|
multiple = _props$multiple === void 0 ? false : _props$multiple,
|
|
36
40
|
size = props.size,
|
|
37
|
-
required = props.required
|
|
41
|
+
required = props.required,
|
|
42
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
38
43
|
var selectedOption = props.selectedOption;
|
|
39
44
|
var _useExtendedFormikCon = useExtendedFormikContext(),
|
|
40
45
|
values = _useExtendedFormikCon.values,
|
|
@@ -64,7 +69,7 @@ var SelectInput = function SelectInput(props) {
|
|
|
64
69
|
});
|
|
65
70
|
} else {
|
|
66
71
|
var _value2 = value !== undefined ? value : defaultValue || '';
|
|
67
|
-
selectedOption = optionsTransformed.
|
|
72
|
+
selectedOption = optionsTransformed.filter(function (option) {
|
|
68
73
|
return option.value === _value2;
|
|
69
74
|
});
|
|
70
75
|
}
|
|
@@ -83,7 +88,7 @@ var SelectInput = function SelectInput(props) {
|
|
|
83
88
|
value: value,
|
|
84
89
|
validate: handleValidation
|
|
85
90
|
}, function () {
|
|
86
|
-
return /*#__PURE__*/React.createElement(SelectStyled, {
|
|
91
|
+
return /*#__PURE__*/React.createElement(SelectStyled, _extends({}, restProps, {
|
|
87
92
|
id: id,
|
|
88
93
|
inputId: fieldName,
|
|
89
94
|
className: c('Select__select', className),
|
|
@@ -146,7 +151,7 @@ var SelectInput = function SelectInput(props) {
|
|
|
146
151
|
primary75: 'hsla(0,0%,0%, 0)'
|
|
147
152
|
}
|
|
148
153
|
}
|
|
149
|
-
});
|
|
154
|
+
}));
|
|
150
155
|
});
|
|
151
156
|
};
|
|
152
157
|
export default SelectInput;
|
|
@@ -48,9 +48,24 @@ export var TextField = function TextField(props) {
|
|
|
48
48
|
errors = _useExtendedFormikCon.errors,
|
|
49
49
|
touched = _useExtendedFormikCon.touched,
|
|
50
50
|
displayRequiredIndicator = _useExtendedFormikCon.displayRequiredIndicator;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
|
|
52
|
+
// https://www.drupal.org/project/webform_rest/issues/3093890
|
|
53
|
+
|
|
54
|
+
// Some Webform Fields (e.g. webform_address, webform_name) consist of composite fields, which are objects.
|
|
55
|
+
// drupal/webform_rest does not handle that yet. Keys and values are stringified, like so: 'address][address'
|
|
56
|
+
//
|
|
57
|
+
// So for errorhandling on composite webform fields, we need some extra logic.
|
|
58
|
+
|
|
59
|
+
var nestedFieldname = fieldName.split('][');
|
|
60
|
+
var isTouched;
|
|
61
|
+
if (Object.keys(touched).length && touched[nestedFieldname[0]]) {
|
|
62
|
+
isTouched = nestedFieldname[1] ? touched[nestedFieldname[0]][nestedFieldname[1]] : touched[fieldName];
|
|
63
|
+
}
|
|
64
|
+
var error;
|
|
65
|
+
if (Object.keys(errors).length && errors[nestedFieldname[0]]) {
|
|
66
|
+
error = nestedFieldname[1] ? errors[nestedFieldname[0]][nestedFieldname[1]] : errors[fieldName];
|
|
67
|
+
}
|
|
68
|
+
var value = nestedFieldname[1] ? values[nestedFieldname[0]][nestedFieldname[1]] : values[fieldName];
|
|
54
69
|
return /*#__PURE__*/React.createElement(GenericFormElement, {
|
|
55
70
|
className: c('TextField', wrapperClassName),
|
|
56
71
|
title: title,
|
|
@@ -95,13 +95,16 @@ var CookieCompliancePopup = function CookieCompliancePopup(props) {
|
|
|
95
95
|
_props$manualHeader = props.manualHeader,
|
|
96
96
|
manualHeader = _props$manualHeader === void 0 ? '' : _props$manualHeader,
|
|
97
97
|
_props$manualButtonCl = props.manualButtonClassname,
|
|
98
|
-
manualButtonClassname = _props$manualButtonCl === void 0 ? 'Button' : _props$manualButtonCl
|
|
98
|
+
manualButtonClassname = _props$manualButtonCl === void 0 ? 'Button' : _props$manualButtonCl,
|
|
99
|
+
_props$necessaryButto = props.necessaryButtonInverted,
|
|
100
|
+
necessaryButtonInverted = _props$necessaryButto === void 0 ? true : _props$necessaryButto;
|
|
99
101
|
if (!window.dataLayer) {
|
|
100
102
|
window.dataLayer = window.dataLayer || [];
|
|
101
103
|
}
|
|
102
104
|
if (!window.gtag) {
|
|
105
|
+
// eslint-disable-next-line prefer-rest-params
|
|
103
106
|
window.gtag = function () {
|
|
104
|
-
window.dataLayer.push(arguments
|
|
107
|
+
window.dataLayer.push(arguments);
|
|
105
108
|
};
|
|
106
109
|
}
|
|
107
110
|
|
|
@@ -309,7 +312,7 @@ var CookieCompliancePopup = function CookieCompliancePopup(props) {
|
|
|
309
312
|
}, acceptAllText), showAcceptOnlyNeeded && /*#__PURE__*/React.createElement(Button, {
|
|
310
313
|
id: "only-necessary-agree",
|
|
311
314
|
className: "Button--cta",
|
|
312
|
-
inverted:
|
|
315
|
+
inverted: necessaryButtonInverted,
|
|
313
316
|
onClick: onConsent(true)
|
|
314
317
|
}, onlyNecessaryText), /*#__PURE__*/React.createElement("button", {
|
|
315
318
|
type: "button",
|
|
@@ -331,7 +334,7 @@ var CookieCompliancePopup = function CookieCompliancePopup(props) {
|
|
|
331
334
|
onClick: onConsent(false)
|
|
332
335
|
}, acceptSelectionText), /*#__PURE__*/React.createElement(Button, {
|
|
333
336
|
className: "Button--cta",
|
|
334
|
-
inverted:
|
|
337
|
+
inverted: necessaryButtonInverted,
|
|
335
338
|
onClick: onConsentAll
|
|
336
339
|
}, acceptAllText))))));
|
|
337
340
|
};
|
|
@@ -59,6 +59,7 @@ export interface CookieCompliancePopupProps {
|
|
|
59
59
|
onAgree?: Function;
|
|
60
60
|
showAcceptOnlyNeeded?: boolean;
|
|
61
61
|
manualButtonClassname?: string;
|
|
62
|
+
necessaryButtonInverted?: boolean;
|
|
62
63
|
cookieLevels?: Array<CookieLevel>;
|
|
63
64
|
defaultValues?: CategoryDefaultValues;
|
|
64
65
|
cookieDomain?: string;
|
|
@@ -98,3 +98,50 @@ $material-icon-styles: (
|
|
|
98
98
|
width: 1em;
|
|
99
99
|
@include icon-color(#000000);
|
|
100
100
|
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/// gridIconToMaterialIcon
|
|
104
|
+
///
|
|
105
|
+
/// Mixin to overwrite old icon-implementations.
|
|
106
|
+
///
|
|
107
|
+
/// @param {String} $icon-name - name of the icon.
|
|
108
|
+
/// Needs to correspond with the file name of the icon.
|
|
109
|
+
///
|
|
110
|
+
/// @param {String} $style - Material Icon style
|
|
111
|
+
///
|
|
112
|
+
/// @param {Boolean} $custom - Are we overwwriting with a
|
|
113
|
+
/// custom icon?
|
|
114
|
+
///
|
|
115
|
+
/// @example scss
|
|
116
|
+
/// .icon-arrow {
|
|
117
|
+
/// @include gridIconToMaterialIcon('download');
|
|
118
|
+
/// }
|
|
119
|
+
///
|
|
120
|
+
/// @example scss
|
|
121
|
+
/// .icon-download {
|
|
122
|
+
/// @include gridIconToMaterialIcon($icon-name: 'custom_download', $custom: true);
|
|
123
|
+
/// }
|
|
124
|
+
///
|
|
125
|
+
@mixin gridIconToMaterialIcon(
|
|
126
|
+
$icon-name: null,
|
|
127
|
+
$style: 'outlined',
|
|
128
|
+
$custom: false,
|
|
129
|
+
) {
|
|
130
|
+
@if not $icon-name {
|
|
131
|
+
@error 'an icon name is required'
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@if not $custom {
|
|
135
|
+
background: url('~@material-design-icons/svg/#{$style}/#{$icon-name}.svg');
|
|
136
|
+
} @else {
|
|
137
|
+
background: url('#{$custom-icon-path}/#{$icon-name}.svg');
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
display: block;
|
|
141
|
+
width: 1em;
|
|
142
|
+
height: 1em;
|
|
143
|
+
background-color: transparent;
|
|
144
|
+
background-repeat: no-repeat;
|
|
145
|
+
background-position: 0 0;
|
|
146
|
+
background-size: 1em;
|
|
147
|
+
}
|
|
@@ -6,8 +6,9 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import c from 'classnames';
|
|
9
|
-
import '
|
|
9
|
+
import urlParse from 'url';
|
|
10
10
|
import { isValidImage, useImageLoader, calculateTargetSrc } from '../helpers';
|
|
11
|
+
import './style.scss';
|
|
11
12
|
|
|
12
13
|
// extend html img props
|
|
13
14
|
|
|
@@ -44,19 +45,30 @@ var AdaptivePicture = function AdaptivePicture(_ref) {
|
|
|
44
45
|
if (!container) return;
|
|
45
46
|
var resizeObserver = new ResizeObserver(function (entries) {
|
|
46
47
|
var widthAfterResize = entries[0].contentRect.width;
|
|
48
|
+
var newSrcRequired = false;
|
|
47
49
|
if (image.width < widthAfterResize) {
|
|
48
50
|
var newTargetSrc = calculateTargetSrc(image.width, validatedSources, fallbackImage);
|
|
49
51
|
if (targetSrc !== newTargetSrc) {
|
|
50
52
|
setTargetSrc(newTargetSrc);
|
|
53
|
+
newSrcRequired = true;
|
|
51
54
|
}
|
|
52
55
|
} else {
|
|
53
56
|
var _newTargetSrc = calculateTargetSrc(widthAfterResize, validatedSources, fallbackImage);
|
|
54
57
|
if (targetSrc !== _newTargetSrc) {
|
|
55
58
|
setTargetSrc(_newTargetSrc);
|
|
59
|
+
newSrcRequired = true;
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
if (status === 'PENDING') {
|
|
59
63
|
setStatus('INITIAL_BREAKPOINT_CALCULATED');
|
|
64
|
+
|
|
65
|
+
// We always load the smallest source. If that's also the source we need
|
|
66
|
+
// set INITIAL_LOADED directly.
|
|
67
|
+
// With caching turned on, the onLoad function on the img would only trigger once
|
|
68
|
+
// and thus never unblur the smallest
|
|
69
|
+
if (!newSrcRequired) {
|
|
70
|
+
setStatus('INITIAL_LOADED');
|
|
71
|
+
}
|
|
60
72
|
}
|
|
61
73
|
});
|
|
62
74
|
resizeObserver.observe(container);
|
|
@@ -68,7 +80,13 @@ var AdaptivePicture = function AdaptivePicture(_ref) {
|
|
|
68
80
|
}, [fallbackImage, status, targetSrc, validatedSources]);
|
|
69
81
|
var loadedUrl = useImageLoader(fallbackImage, targetSrc, imageRef);
|
|
70
82
|
function onErrorFallback(e) {
|
|
71
|
-
|
|
83
|
+
// Make sure that both URLs are absolute URLs, so we can compare them.
|
|
84
|
+
// Otherwise this error callback will constantly be thrown.
|
|
85
|
+
var link = document.createElement('a');
|
|
86
|
+
link.href = e.target.src;
|
|
87
|
+
var link2 = document.createElement('a');
|
|
88
|
+
link2.href = fallbackImage;
|
|
89
|
+
if (link.href !== link2.href) {
|
|
72
90
|
e.target.src = fallbackImage;
|
|
73
91
|
}
|
|
74
92
|
}
|
|
@@ -86,7 +104,11 @@ var AdaptivePicture = function AdaptivePicture(_ref) {
|
|
|
86
104
|
if (_onLoad) {
|
|
87
105
|
_onLoad(e);
|
|
88
106
|
}
|
|
89
|
-
|
|
107
|
+
|
|
108
|
+
// To handle relative URLs
|
|
109
|
+
var current = urlParse.parse(e.target.src);
|
|
110
|
+
var target = urlParse.parse(targetSrc);
|
|
111
|
+
if (status === 'INITIAL_BREAKPOINT_CALCULATED' && current.pathname === target.pathname) {
|
|
90
112
|
setStatus('INITIAL_LOADED');
|
|
91
113
|
}
|
|
92
114
|
},
|
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import path from 'path';
|
|
8
8
|
import { useEffect, useState } from 'react';
|
|
9
|
-
var breakpoints = [
|
|
9
|
+
var breakpoints = [256, 512, 1024, 2048];
|
|
10
10
|
var mimeTypes = {
|
|
11
11
|
'.gif': 'image/gif',
|
|
12
12
|
'.png': 'image/png',
|
|
@@ -1,15 +1,56 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
2
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
5
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
6
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
7
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
|
|
9
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
10
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
11
|
+
import React, { useEffect, useState } from 'react';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
13
|
+
function testCopyPermission() {
|
|
14
|
+
return _testCopyPermission.apply(this, arguments);
|
|
15
|
+
}
|
|
16
|
+
function _testCopyPermission() {
|
|
17
|
+
_testCopyPermission = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
18
|
+
var _navigator;
|
|
19
|
+
var result;
|
|
20
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
21
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
22
|
+
case 0:
|
|
23
|
+
if (!(typeof ((_navigator = navigator) === null || _navigator === void 0 ? void 0 : _navigator.permissions) !== 'undefined')) {
|
|
24
|
+
_context2.next = 13;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
_context2.prev = 1;
|
|
28
|
+
_context2.next = 4;
|
|
29
|
+
return navigator.permissions.query({
|
|
30
|
+
name: 'clipboard-write'
|
|
31
|
+
});
|
|
32
|
+
case 4:
|
|
33
|
+
result = _context2.sent;
|
|
34
|
+
return _context2.abrupt("return", (result === null || result === void 0 ? void 0 : result.state) && ['granted', 'prompt'].includes(result.state));
|
|
35
|
+
case 8:
|
|
36
|
+
_context2.prev = 8;
|
|
37
|
+
_context2.t0 = _context2["catch"](1);
|
|
38
|
+
console.warn('Copy to clipboard not supported: ', _context2.t0);
|
|
39
|
+
case 11:
|
|
40
|
+
_context2.next = 14;
|
|
41
|
+
break;
|
|
42
|
+
case 13:
|
|
43
|
+
console.warn('Navigator or Permissions API is undefined.');
|
|
44
|
+
case 14:
|
|
45
|
+
return _context2.abrupt("return", false);
|
|
46
|
+
case 15:
|
|
47
|
+
case "end":
|
|
48
|
+
return _context2.stop();
|
|
49
|
+
}
|
|
50
|
+
}, _callee2, null, [[1, 8]]);
|
|
51
|
+
}));
|
|
52
|
+
return _testCopyPermission.apply(this, arguments);
|
|
53
|
+
}
|
|
13
54
|
var CopyToClipboard = function CopyToClipboard(_ref) {
|
|
14
55
|
var text = _ref.text,
|
|
15
56
|
copyResetTimeout = _ref.copyResetTimeout,
|
|
@@ -26,14 +67,10 @@ var CopyToClipboard = function CopyToClipboard(_ref) {
|
|
|
26
67
|
setCopyPermission = _useState4[1];
|
|
27
68
|
|
|
28
69
|
// Only render the element if permission is granted
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
setCopyPermission(true);
|
|
34
|
-
}
|
|
35
|
-
}).catch(function (err) {
|
|
36
|
-
return console.log('Copy to clipboard not supported: ', err);
|
|
70
|
+
useEffect(function () {
|
|
71
|
+
testCopyPermission().then(function (result) {
|
|
72
|
+
setCopyPermission(result);
|
|
73
|
+
});
|
|
37
74
|
});
|
|
38
75
|
var copyContent = /*#__PURE__*/function () {
|
|
39
76
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
@@ -6,16 +6,31 @@
|
|
|
6
6
|
flex-wrap: nowrap;
|
|
7
7
|
align-items: center;
|
|
8
8
|
|
|
9
|
+
&__link,
|
|
10
|
+
&__link:hover,
|
|
11
|
+
&__link:active,
|
|
12
|
+
&__link:focus {
|
|
13
|
+
text-decoration: inherit;
|
|
14
|
+
color: inherit;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__button,
|
|
18
|
+
&__delete-button {
|
|
19
|
+
padding: 0;
|
|
20
|
+
border: 0;
|
|
21
|
+
background-color: transparent;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
}
|
|
24
|
+
|
|
9
25
|
&__delete-button {
|
|
10
26
|
// Expanding the clickable area by adding padding,
|
|
11
27
|
// and compensating this, using negative margin.
|
|
12
28
|
margin: -10px;
|
|
13
|
-
border: 0;
|
|
14
29
|
padding: 10px;
|
|
15
|
-
background-color: transparent;
|
|
16
|
-
cursor: pointer;
|
|
17
30
|
}
|
|
18
31
|
|
|
32
|
+
&--stretch-clickable-area .Tag__link,
|
|
33
|
+
&--stretch-clickable-area .Tag__button,
|
|
19
34
|
&--stretch-clickable-area .Tag__delete-button {
|
|
20
35
|
margin: 0;
|
|
21
36
|
padding: 0;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
export default WysiwygField;
|
|
2
|
-
declare function WysiwygField({ html, customElementHandler, ...props }: {
|
|
2
|
+
declare function WysiwygField({ html, customElementHandler, className, ...props }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
html: any;
|
|
5
5
|
customElementHandler?: (() => void) | undefined;
|
|
6
|
+
className?: string | undefined;
|
|
6
7
|
}): React.JSX.Element;
|
|
7
8
|
declare namespace WysiwygField {
|
|
8
9
|
namespace propTypes {
|
|
9
10
|
let html: PropTypes.Validator<string>;
|
|
10
11
|
let customElementHandler: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
|
+
let className: PropTypes.Requireable<string>;
|
|
11
13
|
}
|
|
12
14
|
namespace defaultProps {
|
|
13
15
|
export function customElementHandler_1(): void;
|
|
14
16
|
export { customElementHandler_1 as customElementHandler };
|
|
17
|
+
let className_1: string;
|
|
18
|
+
export { className_1 as className };
|
|
15
19
|
}
|
|
16
20
|
}
|
|
17
21
|
import React from 'react';
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
var _excluded = ["html", "customElementHandler"];
|
|
1
|
+
var _excluded = ["html", "customElementHandler", "className"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import ReactHtmlParser from 'react-html-parser';
|
|
8
|
+
import c from 'classnames';
|
|
8
9
|
import Button from '../Button';
|
|
9
10
|
var WysiwygField = function WysiwygField(_ref) {
|
|
10
11
|
var html = _ref.html,
|
|
11
12
|
_ref$customElementHan = _ref.customElementHandler,
|
|
12
13
|
customElementHandler = _ref$customElementHan === void 0 ? function () {} : _ref$customElementHan,
|
|
14
|
+
_ref$className = _ref.className,
|
|
15
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
13
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
var classes = c('WysiwygField', className);
|
|
14
18
|
var parsedHtml = ReactHtmlParser(html, {
|
|
15
19
|
transform: function transform(node) {
|
|
16
20
|
var customHandler = customElementHandler(node);
|
|
@@ -42,14 +46,16 @@ var WysiwygField = function WysiwygField(_ref) {
|
|
|
42
46
|
}
|
|
43
47
|
});
|
|
44
48
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
45
|
-
className:
|
|
49
|
+
className: classes
|
|
46
50
|
}, props), parsedHtml);
|
|
47
51
|
};
|
|
48
52
|
WysiwygField.propTypes = {
|
|
49
53
|
html: PropTypes.string.isRequired,
|
|
50
|
-
customElementHandler: PropTypes.func
|
|
54
|
+
customElementHandler: PropTypes.func,
|
|
55
|
+
className: PropTypes.string
|
|
51
56
|
};
|
|
52
57
|
WysiwygField.defaultProps = {
|
|
53
|
-
customElementHandler: function customElementHandler() {}
|
|
58
|
+
customElementHandler: function customElementHandler() {},
|
|
59
|
+
className: ''
|
|
54
60
|
};
|
|
55
61
|
export default WysiwygField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getApiAutoCompleteSuggestions(endpoint: any, queryParameter: any, query: any, requestOptions: any, currentFetch: any): Promise<any>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
+
function abortableFetch(request, opts) {
|
|
11
|
+
var controller = new AbortController();
|
|
12
|
+
var signal = controller.signal;
|
|
13
|
+
return {
|
|
14
|
+
abort: function abort() {
|
|
15
|
+
return controller.abort();
|
|
16
|
+
},
|
|
17
|
+
ready: fetch(request, _objectSpread(_objectSpread({}, opts), {}, {
|
|
18
|
+
signal: signal
|
|
19
|
+
}))
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export var getApiAutoCompleteSuggestions = /*#__PURE__*/function () {
|
|
23
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(endpoint, queryParameter, query, requestOptions, currentFetch) {
|
|
24
|
+
var url;
|
|
25
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
26
|
+
while (1) switch (_context.prev = _context.next) {
|
|
27
|
+
case 0:
|
|
28
|
+
url = "".concat(endpoint, "?").concat(queryParameter, "=").concat(query);
|
|
29
|
+
if (currentFetch) {
|
|
30
|
+
currentFetch.abort();
|
|
31
|
+
}
|
|
32
|
+
currentFetch = abortableFetch(url, requestOptions);
|
|
33
|
+
return _context.abrupt("return", currentFetch.ready.then(function (response) {
|
|
34
|
+
return response.json();
|
|
35
|
+
}).then(function (response) {
|
|
36
|
+
var ajaxResults = response.map(function (item, index) {
|
|
37
|
+
item.value = index;
|
|
38
|
+
return item;
|
|
39
|
+
});
|
|
40
|
+
return ajaxResults;
|
|
41
|
+
}).catch(function (e) {
|
|
42
|
+
console.warn(e);
|
|
43
|
+
return null;
|
|
44
|
+
// Catch the error so the browser does not output errors.
|
|
45
|
+
}));
|
|
46
|
+
case 4:
|
|
47
|
+
case "end":
|
|
48
|
+
return _context.stop();
|
|
49
|
+
}
|
|
50
|
+
}, _callee);
|
|
51
|
+
}));
|
|
52
|
+
return function getApiAutoCompleteSuggestions(_x, _x2, _x3, _x4, _x5) {
|
|
53
|
+
return _ref.apply(this, arguments);
|
|
54
|
+
};
|
|
55
|
+
}();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Add UTM parameters to cookie with 15 minutes expire
|
|
3
|
+
* @returns {void}
|
|
4
|
+
*/
|
|
5
|
+
export function setUtmCookies(): void;
|
|
6
|
+
/**
|
|
7
|
+
* Get the cookies that start with utm_ from the document
|
|
8
|
+
* @returns {Array} An array of utm cookies
|
|
9
|
+
*/
|
|
10
|
+
export function getUtmCookies(): any[];
|
|
11
|
+
/**
|
|
12
|
+
* Add the cookies from the document a url
|
|
13
|
+
* @param {string} href - The URL we would like to add utm cookies to
|
|
14
|
+
* @returns {string | null} the mutated URL or nothing
|
|
15
|
+
*/
|
|
16
|
+
export function addUtmQueryString(href: string): string | null;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import qs from 'query-string';
|
|
2
|
+
import Cookies from 'js-cookie';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Add UTM parameters to cookie with 15 minutes expire
|
|
6
|
+
* @returns {void}
|
|
7
|
+
*/
|
|
8
|
+
export function setUtmCookies() {
|
|
9
|
+
var inFifteenMinutes = new Date(new Date().getTime() + 15 * 60 * 1000);
|
|
10
|
+
var params = qs.parse(window.location.search);
|
|
11
|
+
var utmKeys = Object.keys(params).filter(function (value) {
|
|
12
|
+
return value.startsWith('utm_');
|
|
13
|
+
});
|
|
14
|
+
utmKeys.forEach(function (key) {
|
|
15
|
+
Cookies.set(key, params[key], {
|
|
16
|
+
expires: inFifteenMinutes
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Get the cookies that start with utm_ from the document
|
|
23
|
+
* @returns {Array} An array of utm cookies
|
|
24
|
+
*/
|
|
25
|
+
export function getUtmCookies() {
|
|
26
|
+
return document.cookie.split(';').map(function (cookie) {
|
|
27
|
+
return cookie.trim();
|
|
28
|
+
}).filter(function (value) {
|
|
29
|
+
return value.startsWith('utm_');
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Add the cookies from the document a url
|
|
35
|
+
* @param {string} href - The URL we would like to add utm cookies to
|
|
36
|
+
* @returns {string | null} the mutated URL or nothing
|
|
37
|
+
*/
|
|
38
|
+
export function addUtmQueryString(href) {
|
|
39
|
+
if (!href) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
var utmQueryString = getUtmCookies().join('&');
|
|
43
|
+
if (utmQueryString) {
|
|
44
|
+
href += (href.split('?')[1] ? '&' : '?') + utmQueryString;
|
|
45
|
+
}
|
|
46
|
+
return href;
|
|
47
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -77,6 +77,8 @@ export { default as useScrollPosition } from "./hooks/useScrollPosition";
|
|
|
77
77
|
export { default as useWindowDimensions } from "./hooks/useWindowDimensions";
|
|
78
78
|
export { default as gtm } from "./helpers/gtm";
|
|
79
79
|
export { default as useValueForCurrentViewPort } from "./helpers/useValueForCurrentViewPort";
|
|
80
|
+
export { getApiAutoCompleteSuggestions } from "./helpers/apiAutoComplete";
|
|
80
81
|
export { default as FormikWrapper, FormikExtendedContextProvider } from "./components/Form/FormikWrapper";
|
|
81
82
|
export { parseDateWithTimezoneOffset, isValidDate, doubleDigits } from "./helpers/date";
|
|
83
|
+
export { setUtmCookies, getUtmCookies, addUtmQueryString } from "./helpers/utm";
|
|
82
84
|
export { isExternalLink, normalizeLink } from "./helpers/link";
|
package/dist/index.js
CHANGED
|
@@ -93,4 +93,6 @@ export { default as useWindowDimensions } from './hooks/useWindowDimensions';
|
|
|
93
93
|
export { default as gtm } from './helpers/gtm';
|
|
94
94
|
export { default as useValueForCurrentViewPort } from './helpers/useValueForCurrentViewPort';
|
|
95
95
|
export { parseDateWithTimezoneOffset, isValidDate, doubleDigits } from './helpers/date';
|
|
96
|
-
export {
|
|
96
|
+
export { setUtmCookies, getUtmCookies, addUtmQueryString } from './helpers/utm';
|
|
97
|
+
export { isExternalLink, normalizeLink } from './helpers/link';
|
|
98
|
+
export { getApiAutoCompleteSuggestions } from './helpers/apiAutoComplete';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uncinc/uncinc-react-kitchen-sink",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "Default React components that are easily extended.",
|
|
5
5
|
"author": "uncinc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"prepare": "yarn run publish:npm && husky install",
|
|
38
38
|
"storybook": "storybook dev -p 6006",
|
|
39
39
|
"build-storybook": "storybook build",
|
|
40
|
-
"yalc-watch": "nodemon -e js,jsx,ts,tsx --ignore dist --exec \"yalc publish && yalc push\"",
|
|
40
|
+
"yalc-watch": "nodemon -e js,jsx,ts,tsx,scss --ignore dist --exec \"yalc publish && yalc push\"",
|
|
41
41
|
"publish:npm": "yarn build && yarn build:cleanup",
|
|
42
42
|
"extract": "sb extract",
|
|
43
43
|
"eslint": "NODE_ENV=development eslint './src/**/*.{js,jsx,ts,tsx}'",
|
|
@@ -148,6 +148,7 @@
|
|
|
148
148
|
"jest-junit": "^16.0.0",
|
|
149
149
|
"nodemon": "^3.0.3",
|
|
150
150
|
"prop-types": "^15.8.1",
|
|
151
|
+
"query-string": "^6.13.1",
|
|
151
152
|
"react-scripts": "^5.0.1",
|
|
152
153
|
"react-test-renderer": "^18.2.0",
|
|
153
154
|
"sinon": "^9.0.2",
|