@uncinc/uncinc-react-kitchen-sink 2.8.51 → 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.
Files changed (37) hide show
  1. package/dist/components/ApiAutocomplete/index.js +41 -44
  2. package/dist/components/Button/index.d.ts +7 -1
  3. package/dist/components/Button/index.js +11 -3
  4. package/dist/components/Cookie/Checkbox/style.scss +0 -1
  5. package/dist/components/Form/Checkbox/index.js +2 -1
  6. package/dist/components/Form/Select/Input/index.js +9 -4
  7. package/dist/components/Form/TextField/index.js +18 -3
  8. package/dist/components/GoogleConsentCookieBanner/Checkbox/index.d.ts +14 -0
  9. package/dist/components/GoogleConsentCookieBanner/Checkbox/index.js +29 -0
  10. package/dist/components/GoogleConsentCookieBanner/Checkbox/style.scss +40 -0
  11. package/dist/components/GoogleConsentCookieBanner/CookieCategoryContents/index.d.ts +14 -0
  12. package/dist/components/GoogleConsentCookieBanner/CookieCategoryContents/index.js +19 -0
  13. package/dist/components/GoogleConsentCookieBanner/CookieCategoryContentsPartners/index.d.ts +14 -0
  14. package/dist/components/GoogleConsentCookieBanner/CookieCategoryContentsPartners/index.js +23 -0
  15. package/dist/components/GoogleConsentCookieBanner/index.d.ts +15 -0
  16. package/dist/components/GoogleConsentCookieBanner/index.js +341 -0
  17. package/dist/components/GoogleConsentCookieBanner/style.scss +105 -0
  18. package/dist/components/GoogleConsentCookieBanner/types.d.ts +68 -0
  19. package/dist/components/GoogleConsentCookieBanner/types.js +22 -0
  20. package/dist/components/Icon/style.scss +47 -0
  21. package/dist/components/Image/AdaptivePicture/index.js +25 -3
  22. package/dist/components/Image/AdaptivePicture/style.scss +1 -0
  23. package/dist/components/Image/helpers/index.js +1 -1
  24. package/dist/components/Pagination/index.d.ts +1 -1
  25. package/dist/components/SearchKit/SearchPage/index.js +1 -1
  26. package/dist/components/Share/CopyToClipboard/index.js +48 -11
  27. package/dist/components/Tag/style.scss +18 -3
  28. package/dist/components/WysiwygField/index.d.ts +5 -1
  29. package/dist/components/WysiwygField/index.js +10 -4
  30. package/dist/config/i18next/locales/nl.json +33 -0
  31. package/dist/helpers/apiAutoComplete.d.ts +1 -0
  32. package/dist/helpers/apiAutoComplete.js +55 -0
  33. package/dist/helpers/utm.d.ts +16 -0
  34. package/dist/helpers/utm.js +47 -0
  35. package/dist/index.d.ts +5 -0
  36. package/dist/index.js +6 -1
  37. package/package.json +14 -12
@@ -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 getSuggestions = function getSuggestions(query) {
52
- var url = "".concat(endpoint, "?").concat(queryParameter, "=").concat(query);
53
- if (currentFetch) {
54
- currentFetch.abort();
55
- }
56
- currentFetch = abortableFetch(url, requestOptions);
57
- currentFetch.ready.then(function (response) {
58
- return response.json();
59
- }).then(function (response) {
60
- var ajaxResults = response.map(function (item, index) {
61
- item.value = index;
62
- return item;
63
- });
64
- setResults(ajaxResults);
65
- }).catch(function (e) {
66
- // Catch the error so the browser does not output errors.
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(_ref2) {
72
- var value = _ref2.value,
73
- reason = _ref2.reason;
74
- getSuggestions(value);
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, _ref3) {
84
- var suggestion = _ref3.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, _ref4) {
97
- var newValue = _ref4.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);
@@ -30,7 +30,6 @@
30
30
  // Checked
31
31
  &:checked ~ label:not(.no-styling) {
32
32
  &:before {
33
-
34
33
  background-position-y: -1em;
35
34
  }
36
35
  }
@@ -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.find(function (option) {
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
- var isTouched = touched[fieldName];
52
- var value = values[fieldName];
53
- var error = errors[fieldName];
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,
@@ -0,0 +1,14 @@
1
+ import React, { ChangeEventHandler } from 'react';
2
+ import './style.scss';
3
+ interface Props {
4
+ name: string;
5
+ id: string;
6
+ value: string;
7
+ label: string;
8
+ subLabel?: string;
9
+ checked: boolean;
10
+ onChange: ChangeEventHandler<HTMLInputElement>;
11
+ disabled: boolean;
12
+ }
13
+ declare const Checkbox: React.FC<Props>;
14
+ export default Checkbox;
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import './style.scss';
3
+ var Checkbox = function Checkbox(_ref) {
4
+ var name = _ref.name,
5
+ id = _ref.id,
6
+ value = _ref.value,
7
+ label = _ref.label,
8
+ subLabel = _ref.subLabel,
9
+ _ref$checked = _ref.checked,
10
+ checked = _ref$checked === void 0 ? false : _ref$checked,
11
+ onChange = _ref.onChange,
12
+ disabled = _ref.disabled;
13
+ return /*#__PURE__*/React.createElement("div", {
14
+ className: "Checkbox GoogleConsentCookieBanner__checkbox"
15
+ }, /*#__PURE__*/React.createElement("input", {
16
+ type: "checkbox",
17
+ className: "Checkbox__input",
18
+ name: name,
19
+ id: id,
20
+ value: value,
21
+ checked: checked,
22
+ onChange: onChange,
23
+ disabled: disabled
24
+ }), /*#__PURE__*/React.createElement("label", {
25
+ htmlFor: id,
26
+ className: "icon-before icon-checkmark"
27
+ }, label, " ", /*#__PURE__*/React.createElement("span", null, subLabel)));
28
+ };
29
+ export default Checkbox;
@@ -0,0 +1,40 @@
1
+ @import '../../../styles/assets/mixins';
2
+ @import '../../../styles/assets/variables';
3
+
4
+ // Radio's and checkboxes
5
+ .GoogleConsentCookieBanner {
6
+
7
+ &__checkbox {
8
+ label span {
9
+ font-size: 1.4rem;
10
+ }
11
+
12
+ input[type='checkbox'] {
13
+ position: absolute;
14
+ opacity: 0;
15
+
16
+ // Unchecked
17
+ ~ label:not(.no-styling) {
18
+ position: relative;
19
+ display: inline-block;
20
+ user-select: none;
21
+ cursor: pointer;
22
+
23
+ display: flex;
24
+ align-items: center;
25
+
26
+ &:before {
27
+ background-position-y: -1em;
28
+ font-size: 1.8rem;
29
+ }
30
+ }
31
+
32
+ // Checked
33
+ &:checked ~ label:not(.no-styling) {
34
+ &:before {
35
+ background-position-y: 0em;
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export interface CookieInformation {
3
+ title: string;
4
+ duration: string;
5
+ description: string;
6
+ }
7
+ export interface CookieCategoryContentsProps {
8
+ cookies: Array<CookieInformation>;
9
+ cookieNameLabel?: string;
10
+ durationLabel?: string;
11
+ descriptionLabel?: string;
12
+ }
13
+ declare const CookieCategoryContents: React.FC<CookieCategoryContentsProps>;
14
+ export default CookieCategoryContents;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ var CookieCategoryContents = function CookieCategoryContents(_ref) {
3
+ var _ref$cookies = _ref.cookies,
4
+ cookies = _ref$cookies === void 0 ? [] : _ref$cookies,
5
+ _ref$cookieNameLabel = _ref.cookieNameLabel,
6
+ cookieNameLabel = _ref$cookieNameLabel === void 0 ? 'Cookie' : _ref$cookieNameLabel,
7
+ _ref$durationLabel = _ref.durationLabel,
8
+ durationLabel = _ref$durationLabel === void 0 ? 'Looptijd' : _ref$durationLabel,
9
+ _ref$descriptionLabel = _ref.descriptionLabel,
10
+ descriptionLabel = _ref$descriptionLabel === void 0 ? 'Beschrijving' : _ref$descriptionLabel;
11
+ return /*#__PURE__*/React.createElement("ul", {
12
+ className: "CookieCategoryContents"
13
+ }, cookies.map(function (cookie) {
14
+ return /*#__PURE__*/React.createElement("li", {
15
+ key: "cookie-description-".concat(cookie.title)
16
+ }, /*#__PURE__*/React.createElement("h3", null, cookieNameLabel), /*#__PURE__*/React.createElement("p", null, cookie.title), /*#__PURE__*/React.createElement("h3", null, durationLabel), /*#__PURE__*/React.createElement("p", null, cookie.duration), /*#__PURE__*/React.createElement("h3", null, descriptionLabel), /*#__PURE__*/React.createElement("p", null, cookie.description));
17
+ }));
18
+ };
19
+ export default CookieCategoryContents;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export interface PartnerInformation {
3
+ name: string;
4
+ description: string;
5
+ privacyPolicy: string;
6
+ }
7
+ export interface CookieCategoryContentsProps {
8
+ partners: Array<PartnerInformation>;
9
+ partnerNameLabel?: string;
10
+ descriptionLabel?: string;
11
+ privacyPolicyLabel?: string;
12
+ }
13
+ declare const CookieCategoryContentsPartners: React.FC<CookieCategoryContentsProps>;
14
+ export default CookieCategoryContentsPartners;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ var CookieCategoryContentsPartners = function CookieCategoryContentsPartners(_ref) {
3
+ var _ref$partners = _ref.partners,
4
+ partners = _ref$partners === void 0 ? [] : _ref$partners,
5
+ _ref$partnerNameLabel = _ref.partnerNameLabel,
6
+ partnerNameLabel = _ref$partnerNameLabel === void 0 ? 'Partner' : _ref$partnerNameLabel,
7
+ _ref$descriptionLabel = _ref.descriptionLabel,
8
+ descriptionLabel = _ref$descriptionLabel === void 0 ? 'Beschrijving' : _ref$descriptionLabel,
9
+ _ref$privacyPolicyLab = _ref.privacyPolicyLabel,
10
+ privacyPolicyLabel = _ref$privacyPolicyLab === void 0 ? 'Privacy Policy' : _ref$privacyPolicyLab;
11
+ return /*#__PURE__*/React.createElement("ul", {
12
+ className: "CookieCategoryContents"
13
+ }, partners.map(function (partner) {
14
+ return /*#__PURE__*/React.createElement("li", {
15
+ key: "partner-description-".concat(partner.name)
16
+ }, /*#__PURE__*/React.createElement("h3", null, partnerNameLabel), /*#__PURE__*/React.createElement("p", null, partner.name), /*#__PURE__*/React.createElement("h3", null, descriptionLabel), /*#__PURE__*/React.createElement("p", null, partner.description), /*#__PURE__*/React.createElement("a", {
17
+ href: partner.privacyPolicy,
18
+ rel: "noreferrer",
19
+ target: "_blank"
20
+ }, privacyPolicyLabel));
21
+ }));
22
+ };
23
+ export default CookieCategoryContentsPartners;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import './style.scss';
3
+ import { CookieCompliancePopupProps } from './types';
4
+ export declare const COOKIE_CONSENT_CATEGORIES = "cookie_consent_categories";
5
+ export declare const COOKIE_CONSENT_STATE = "cookie_consent_state";
6
+ export declare const DEFAULT_COOKIE_EXPIRATION_DAYS = 365;
7
+ export declare const CONSENT_UPDATE_EVENT = "consentUpdate";
8
+ declare global {
9
+ interface Window {
10
+ dataLayer: any;
11
+ gtag: any;
12
+ }
13
+ }
14
+ declare const CookieCompliancePopup: React.FC<CookieCompliancePopupProps>;
15
+ export default CookieCompliancePopup;