payload 1.1.18 → 1.1.19
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/components/index.js +1 -1
- package/dist/admin/components/elements/Popup/index.js +33 -22
- package/dist/admin/components/elements/SearchFilter/index.js +1 -1
- package/dist/admin/components/forms/field-types/Array/index.js +13 -12
- package/dist/admin/components/forms/field-types/Blocks/index.js +12 -11
- package/dist/admin/components/forms/useField/index.js +1 -11
- package/dist/config/types.d.ts +21 -1
- package/dist/utilities/logger.js +9 -10
- package/docs/configuration/collections.mdx +14 -14
- package/package.json +1 -1
package/components/index.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case f:case i:case c:case a:case d:return e;default:switch(e=e&&e.$$typeof){case l:case p:case m:case v:case s:return e;default:return t}}case o:return t}}}function E(e){return x(e)===f}t.AsyncMode=u,t.ConcurrentMode=f,t.ContextConsumer=l,t.ContextProvider=s,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=m,t.Memo=v,t.Portal=o,t.Profiler=c,t.StrictMode=a,t.Suspense=d,t.isAsyncMode=function(e){return E(e)||x(e)===u},t.isConcurrentMode=E,t.isContextConsumer=function(e){return x(e)===l},t.isContextProvider=function(e){return x(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===m},t.isMemo=function(e){return x(e)===v},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===c},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===c||e===a||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===s||e.$$typeof===l||e.$$typeof===p||e.$$typeof===g||e.$$typeof===w||e.$$typeof===b||e.$$typeof===y)},t.typeOf=x},864:(e,t,n)=>{"use strict";e.exports=n(921)},658:(e,t,n)=>{var r=n(826);e.exports=d,e.exports.parse=i,e.exports.compile=function(e,t){return c(i(e,t),t)},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,a=0,c="",u=t&&t.delimiter||"/";null!=(n=o.exec(e));){var f=n[0],p=n[1],d=n.index;if(c+=e.slice(a,d),a=d+f.length,p)c+=p[1];else{var h=e[a],v=n[2],m=n[3],y=n[4],g=n[5],w=n[6],b=n[7];c&&(r.push(c),c="");var x=null!=v&&null!=h&&h!==v,E="+"===w||"*"===w,_="?"===w||"*"===w,O=n[2]||u,P=y||g;r.push({name:m||i++,prefix:v||"",delimiter:O,optional:_,repeat:E,partial:x,asterisk:!!b,pattern:P?l(P):b?".*":"[^"+s(O)+"]+?"})}}return a<e.length&&(c+=e.substr(a)),c&&r.push(c),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function c(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",f(t)));return function(t,o){for(var i="",c=t||{},s=(o||{}).pretty?a:encodeURIComponent,l=0;l<e.length;l++){var u=e[l];if("string"!=typeof u){var f,p=c[u.name];if(null==p){if(u.optional){u.partial&&(i+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var d=0;d<p.length;d++){if(f=s(p[d]),!n[l].test(f))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===d?u.prefix:u.delimiter)+f}}else{if(f=u.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(p),!n[l].test(f))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+f+'"');i+=u.prefix+f}}else i+=u}return i}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function f(e){return e&&e.sensitive?"":"i"}function p(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",c=0;c<e.length;c++){var l=e[c];if("string"==typeof l)a+=s(l);else{var p=s(l.prefix),d="(?:"+l.pattern+")";t.push(l),l.repeat&&(d+="(?:"+p+d+")*"),a+=d=l.optional?l.partial?p+"("+d+")?":"(?:"+p+"("+d+"))?":p+"("+d+")"}}var h=s(n.delimiter||"/"),v=a.slice(-h.length)===h;return o||(a=(v?a.slice(0,-h.length):a)+"(?:"+h+"(?=$))?"),a+=i?"$":o&&v?"":"(?="+h+"|$)",u(new RegExp("^"+a,f(n)),t)}function d(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(d(e[o],t,n).source);return u(new RegExp("(?:"+r.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return p(i(e,n),t,n)}(e,t,n)}},497:e=>{"use strict";e.exports=require("react")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{Banner:()=>Ee,Button:()=>he,Check:()=>Pe,Chevron:()=>le,Menu:()=>ke,MinimalTemplate:()=>Oe,Pill:()=>je,Popup:()=>be,Search:()=>$e,X:()=>se});var e=n(497),t=n.n(e);function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}var a=n(697),c=n.n(a);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e){return"/"===e.charAt(0)}function u(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}const f=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],o=t&&t.split("/")||[],i=e&&l(e),a=t&&l(t),c=i||a;if(e&&l(e)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var s=o[o.length-1];n="."===s||".."===s||""===s}else n=!1;for(var f=0,p=o.length;p>=0;p--){var d=o[p];"."===d?u(o,p):".."===d?(u(o,p),f++):f&&(u(o,p),f--)}if(!c)for(;f--;f)o.unshift("..");!c||""===o[0]||o[0]&&l(o[0])||o.unshift("");var h=o.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};var p="Invariant failed";function d(e,t){if(!e)throw new Error(p)}function h(e){return"/"===e.charAt(0)?e:"/"+e}function v(e){return"/"===e.charAt(0)?e.substr(1):e}function m(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function y(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function g(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function w(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=s({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=f(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function b(){var e=null;var t=[];return{setPrompt:function(t){return t,function(){e===t&&null}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){!1,t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var x=!("undefined"==typeof window||!window.document||!window.document.createElement);function E(e,t){t(window.confirm(e))}var _="popstate",O="hashchange";function P(){try{return window.history.state||{}}catch(e){return{}}}function $(e){void 0===e&&{},x||d(!1);var t,n=window.history,r=(-1===window.navigator.userAgent.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,a=i.forceRefresh,c=void 0!==a&&a,l=i.getUserConfirmation,u=void 0===l?E:l,f=i.keyLength,p=void 0===f?6:f,v=e.basename?y(h(e.basename)):"";function $(e){var t=e||{},n=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return v&&m(i,v),w(i,r,n)}function k(){return Math.random().toString(36).substr(2,p)}var C=b();function j(e){s(U,e),U.length=n.length,C.notifyListeners(U.location,U.action)}function N(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||M($(e.state))}function S(){M($(P()))}var T=!1;function M(e){if(T)!1,j();else{C.confirmTransitionTo(e,"POP",u,(function(t){t?j({action:"POP",location:e}):function(e){var t=U.location,n=R.indexOf(t.key);-1===n&&0;var r=R.indexOf(e.key);-1===r&&0;var o=n-r;o&&(!0,B(o))}(e)}))}}var A=$(P()),R=[A.key];function L(e){return v+g(e)}function B(e){n.go(e)}var I=0;function F(e){1===(I+=e)&&1===e?(window.addEventListener(_,N),o&&window.addEventListener(O,S)):0===I&&(window.removeEventListener(_,N),o&&window.removeEventListener(O,S))}var D=!1;var U={length:n.length,action:"POP",location:A,createHref:L,push:function(e,t){var o="PUSH",i=w(e,t,k(),U.location);C.confirmTransitionTo(i,o,u,(function(e){if(e){var t=L(i),a=i.key,s=i.state;if(r)if(n.pushState({key:a,state:s},null,t),c)window.location.href=t;else{var l=R.indexOf(U.location.key),u=R.slice(0,l+1);u.push(i.key),u,j({action:o,location:i})}else window.location.href=t}}))},replace:function(e,t){var o="REPLACE",i=w(e,t,k(),U.location);C.confirmTransitionTo(i,o,u,(function(e){if(e){var t=L(i),a=i.key,s=i.state;if(r)if(n.replaceState({key:a,state:s},null,t),c)window.location.replace(t);else{var l=R.indexOf(U.location.key);-1!==l&&(R[l]=i.key),j({action:o,location:i})}else window.location.replace(t)}}))},go:B,goBack:function(){B(-1)},goForward:function(){B(1)},block:function(e){void 0===e&&!1;var t=C.setPrompt(e);return D||(F(1),!0),function(){return D&&(!1,F(-1)),t()}},listen:function(e){var t=C.appendListener(e);return F(1),function(){F(-1),t()}}};return U}var k="hashchange",C={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+v(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:v,decodePath:h},slash:{encodePath:h,decodePath:h}};function j(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function N(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function S(e){window.location.replace(j(window.location.href)+"#"+e)}function T(e){void 0===e&&{},x||d(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),r=n.getUserConfirmation,o=void 0===r?E:r,i=n.hashType,a=void 0===i?"slash":i,c=e.basename?y(h(e.basename)):"",l=C[a],u=l.encodePath,f=l.decodePath;function p(){var e=f(N());return c&&m(e,c),w(e)}var v=b();function _(e){s(D,e),D.length=t.length,v.notifyListeners(D.location,D.action)}var O=!1,P=null;function $(){var e,t,n=N(),r=u(n);if(n!==r)S(r);else{var i=p(),a=D.location;if(!O&&(i,a.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(P===g(i))return;null,function(e){if(O)!1,_();else{var t="POP";v.confirmTransitionTo(e,t,o,(function(n){n?_({action:t,location:e}):function(e){var t=D.location,n=R.lastIndexOf(g(t));-1===n&&0;var r=R.lastIndexOf(g(e));-1===r&&0;var o=n-r;o&&(!0,L(o))}(e)}))}}(i)}}var T=N(),M=u(T);T!==M&&S(M);var A=p(),R=[g(A)];function L(e){t.go(e)}var B=0;function I(e){1===(B+=e)&&1===e?window.addEventListener(k,$):0===B&&window.removeEventListener(k,$)}var F=!1;var D={length:t.length,action:"POP",location:A,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&j(window.location.href),n+"#"+u(c+g(e))},push:function(e,t){var n="PUSH",r=w(e,void 0,void 0,D.location);v.confirmTransitionTo(r,n,o,(function(e){if(e){var t=g(r),o=u(c+t);if(N()!==o){t,function(e){window.location.hash=e}(o);var i=R.lastIndexOf(g(D.location)),a=R.slice(0,i+1);a.push(t),a,_({action:n,location:r})}else _()}}))},replace:function(e,t){var n="REPLACE",r=w(e,void 0,void 0,D.location);v.confirmTransitionTo(r,n,o,(function(e){if(e){var t=g(r),o=u(c+t);N()!==o&&(t,S(o));var i=R.indexOf(g(D.location));-1!==i&&(R[i]=t),_({action:n,location:r})}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(e){void 0===e&&!1;var t=v.setPrompt(e);return F||(I(1),!0),function(){return F&&(!1,I(-1)),t()}},listen:function(e){var t=v.appendListener(e);return I(1),function(){I(-1),t()}}};return D}function M(e,t,n){return Math.min(Math.max(e,t),n)}function A(e){void 0===e&&{};var t=e,n=t.getUserConfirmation,r=t.initialEntries,o=void 0===r?["/"]:r,i=t.initialIndex,a=void 0===i?0:i,c=t.keyLength,l=void 0===c?6:c,u=b();function f(e){s(y,e),y.length=y.entries.length,u.notifyListeners(y.location,y.action)}function p(){return Math.random().toString(36).substr(2,l)}var d=M(a,0,o.length-1),h=o.map((function(e){return w(e,void 0,"string"==typeof e?p():e.key||p())})),v=g;function m(e){var t=M(y.index+e,0,y.entries.length-1),r=y.entries[t];u.confirmTransitionTo(r,"POP",n,(function(e){e?f({action:"POP",location:r,index:t}):f()}))}var y={length:h.length,action:"POP",location:h[d],index:d,entries:h,createHref:v,push:function(e,t){var r="PUSH",o=w(e,t,p(),y.location);u.confirmTransitionTo(o,r,n,(function(e){if(e){var t=y.index+1,n=y.entries.slice(0);n.length>t?n.splice(t,n.length-t,o):n.push(o),f({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=w(e,t,p(),y.location);u.confirmTransitionTo(o,r,n,(function(e){e&&(y.entries[y.index]=o,f({action:r,location:o}))}))},go:m,goBack:function(){m(-1)},goForward:function(){m(1)},canGo:function(e){var t=y.index+e;return t>=0&&t<y.entries.length},block:function(e){return void 0===e&&!1,u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return y}var R=n(658),L=n.n(R);n(864);function B(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n(679);var I=1073741823,F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};function D(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var U=t().createContext||function(e,n){var r,o,a="__create-react-context-"+function(){var e="__global_unique_id__";return F[e]=(F[e]||0)+1}()+"__",s=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).emitter=D(t.props.value),t}i(t,e);var r=t.prototype;return r.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var t,r=this.props.value,o=e.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?t=0:(t="function"==typeof n?n(r,o):I,0!==(t|=0)&&this.emitter.set(e.value,t))}var i,a},r.render=function(){return this.props.children},t}(t().Component);s.childContextTypes=((r={})[a]=c().object.isRequired,r);var l=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,e.state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}i(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?I:t},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?I:e},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(t().Component);return l.contextTypes=((o={})[a]=c().object,o),{Provider:s,Consumer:l}},W=function(e){var t=U();return t.displayName=e,t},H=W("Router-History"),z=W("Router"),q=function(e){function n(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._pendingLocation=e}))),n}i(n,e),n.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var r=n.prototype;return r.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(t){e._isMounted&&e.setState({location:t})}))),this._pendingLocation&&this.setState({location:this._pendingLocation})},r.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},r.render=function(){return t().createElement(z.Provider,{value:{history:this.props.history,location:this.state.location,match:n.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},t().createElement(H.Provider,{children:this.props.children||null,value:this.props.history}))},n}(t().Component);t().Component;t().Component;var V={},K=0;function J(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,c=void 0!==a&&a,s=n.sensitive,l=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=V[n]||(V[n]={});if(r[e])return r[e];var o=[],i={regexp:L()(e,o,t),keys:o};return K<1e4&&(r[e]=i,K++),i}(n,{end:i,strict:c,sensitive:l}),o=r.regexp,a=r.keys,s=o.exec(e);if(!s)return null;var u=s[0],f=s.slice(1),p=e===u;return i&&!p?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:p,params:a.reduce((function(e,t,n){return e[t.name]=f[n],e}),{})}}),null)}t().Component;function G(e){return"/"===e.charAt(0)?e:"/"+e}function X(e,t){if(!e)return t;var n=G(e);return 0!==t.pathname.indexOf(n)?t:s({},t,{pathname:t.pathname.substr(n.length)})}function Y(e){return"string"==typeof e?e:g(e)}function Q(e){return function(){d(!1)}}function Z(){}t().Component;t().Component;t().useContext;t().Component;t().Component;var ee=function(e,t){return"function"==typeof e?e(t):e},te=function(e,t){return"string"==typeof e?w(e,null,null,t):e},ne=function(e){return e},re=t().forwardRef;void 0===re&&(re=ne);var oe=re((function(e,n){var r=e.innerRef,o=e.navigate,i=e.onClick,a=B(e,["innerRef","navigate","onClick"]),c=a.target,l=s({},a,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||c&&"_self"!==c||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),o())}});return l.ref=ne!==re&&n||r,t().createElement("a",l)}));var ie=re((function(e,n){var r=e.component,o=void 0===r?oe:r,i=e.replace,a=e.to,c=e.innerRef,l=B(e,["component","replace","to","innerRef"]);return t().createElement(z.Consumer,null,(function(e){e||d(!1);var r=e.history,u=te(ee(a,e.location),e.location),f=u?r.createHref(u):"",p=s({},l,{href:f,navigate:function(){var t=ee(a,e.location),n=g(e.location)===g(te(t));(i||n?r.replace:r.push)(t)}});return ne!==re?p.ref=n||c:p.innerRef=c,t().createElement(o,p)}))})),ae=function(e){return e},ce=t().forwardRef;void 0===ce&&(ce=ae);ce((function(e,n){var r=e["aria-current"],o=void 0===r?"page":r,i=e.activeClassName,a=void 0===i?"active":i,c=e.activeStyle,l=e.className,u=e.exact,f=e.isActive,p=e.location,h=e.sensitive,v=e.strict,m=e.style,y=e.to,g=e.innerRef,w=B(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return t().createElement(z.Consumer,null,(function(e){e||d(!1);var r=p||e.location,i=te(ee(y,r),r),b=i.pathname,x=b&&b.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),E=x?J(r.pathname,{path:x,exact:u,sensitive:h,strict:v}):null,_=!!(f?f(E,r):E),O="function"==typeof l?l(_):l,P="function"==typeof m?m(_):m;_&&(O=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(O,a),P=s({},P,c));var $=s({"aria-current":_&&o||null,className:O,style:P,to:i},w);return ae!==ce?$.ref=n||g:$.innerRef=g,t().createElement(ie,$)}))}));const se=e=>{let{className:n}=e;return t().createElement("svg",{width:"25",height:"25",className:[n,"icon icon--x"].filter(Boolean).join(" "),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("line",{className:"stroke",x1:"8.74612",y1:"16.347",x2:"16.3973",y2:"8.69584"}),t().createElement("line",{className:"stroke",x1:"8.6027",y1:"8.69585",x2:"16.2539",y2:"16.3471"}))},le=e=>{let{className:n}=e;return t().createElement("svg",{className:["icon icon--chevron",n].filter(Boolean).join(" "),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("path",{className:"stroke",d:"M9 10.5L12.5 14.5L16 10.5"}))},ue=e=>{const{className:n,children:r}=e,o=["tooltip",n].filter(Boolean).join(" ");return t().createElement("aside",{className:o},r,t().createElement("span",null))},fe={plus:()=>t().createElement("svg",{className:"icon icon--plus",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("line",{x1:"12.4589",y1:"16.9175",x2:"12.4589",y2:"8.50115",className:"stroke"}),t().createElement("line",{x1:"8.05164",y1:"12.594",x2:"16.468",y2:"12.594",className:"stroke"})),x:se,chevron:le,edit:()=>t().createElement("svg",{className:"icon icon--edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("polygon",{className:"fill",points:"16.92 16.86 8.25 16.86 8.25 8.21 12.54 8.21 12.54 6.63 6.68 6.63 6.68 18.43 18.5 18.43 18.5 12.53 16.92 12.53 16.92 16.86"}),t().createElement("polygon",{className:"fill",points:"16.31 7.33 17.42 8.44 12.66 13.2 11.51 13.24 11.55 12.09 16.31 7.33"}),t().createElement("rect",{className:"fill",x:"16.94",y:"6.44",width:"1.58",height:"1.15",transform:"translate(10.16 -10.48) rotate(45)"})),swap:()=>t().createElement("svg",{className:"icon icon--swap",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("path",{d:"M9.84631 4.78679L6.00004 8.63306L9.84631 12.4793",className:"stroke"}),t().createElement("path",{d:"M15.1537 20.1059L19 16.2596L15.1537 12.4133",className:"stroke"}),t().createElement("line",{x1:"7",y1:"8.7013",x2:"15",y2:"8.7013",stroke:"#333333",className:"stroke"}),t().createElement("line",{x1:"18",y1:"16.1195",x2:"10",y2:"16.1195",className:"stroke"}))},pe="btn",de=n=>{let{children:r,icon:o,tooltip:i}=n;const a=fe[o];return t().createElement("span",{className:`${pe}__content`},i&&t().createElement(ue,{className:`${pe}__tooltip`},i),r&&t().createElement("span",{className:`${pe}__label`},r),o&&t().createElement("span",{className:`${pe}__icon`},(0,e.isValidElement)(o)&&o,a&&t().createElement(a,null)))},he=e=>{const{className:n,id:r,type:o="button",el:i,to:a,url:c,children:s,onClick:l,disabled:u,icon:f,iconStyle:p="without-border",buttonStyle:d="primary",round:h,size:v="medium",iconPosition:m="right",newTab:y,tooltip:g}=e,w=[pe,n&&n,d&&`${pe}--style-${d}`,f&&`${pe}--icon`,p&&`${pe}--icon-style-${p}`,f&&!s&&`${pe}--icon-only`,u&&`${pe}--disabled`,h&&`${pe}--round`,v&&`${pe}--size-${v}`,m&&`${pe}--icon-position-${m}`,g&&`${pe}--has-tooltip`].filter(Boolean).join(" ");const b={id:r,type:o,className:w,disabled:u,onClick:u?void 0:function(e){"submit"!==o&&l&&e.preventDefault(),l&&l(e)},rel:y?"noopener noreferrer":void 0,target:y?"_blank":void 0};switch(i){case"link":return t().createElement(ie,{...b,to:a||c},t().createElement(de,{icon:f,tooltip:g},s));case"anchor":return t().createElement("a",{...b,href:c},t().createElement(de,{icon:f,tooltip:g},s));default:return t().createElement("button",{type:"submit",...b},t().createElement(de,{icon:f,tooltip:g},s))}};var ve=n(727);const me="popup-button",ye=e=>{const{className:n,buttonType:r,button:o,setActive:i,active:a}=e,c=[me,n,`${me}--${r}`].filter(Boolean).join(" "),s=()=>{i(!a)};return"none"===r?null:"custom"===r?t().createElement("div",{role:"button",tabIndex:0,onKeyDown:e=>{"Enter"===e.key&&s()},onClick:s,className:c},o):t().createElement("button",{type:"button",onClick:()=>i(!a),className:c},o)},ge=function(){let{root:t=null,rootMargin:n="0px",threshold:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[o,i]=(0,e.useState)(),[a,c]=(0,e.useState)(null),s=(0,e.useRef)(new window.IntersectionObserver((e=>{let[t]=e;return i(t)}),{root:t,rootMargin:n,threshold:r}));return(0,e.useEffect)((()=>{const{current:e}=s;return e.disconnect(),a&&e.observe(a),()=>e.disconnect()}),[a]),[c,o]},we="popup",be=n=>{const{className:r,buttonClassName:o,render:i,size:a="small",color:c="light",button:s,buttonType:l="default",children:u,showOnHover:f=!1,horizontalAlign:p="left",verticalAlign:d="top",initActive:h=!1,onToggleOpen:v,padding:m,forceOpen:y,boundingRef:g}=n,{width:w,height:b}=(0,ve.useWindowInfo)(),[x,E]=ge({threshold:1,rootMargin:"-100px 0px 0px 0px",root:(null==g?void 0:g.current)||null}),_=(0,e.useRef)(null),O=(0,e.useRef)(null),[P,$]=(0,e.useState)(h),[k,C]=(0,e.useState)(d),[j,N]=(0,e.useState)(p),S=(0,e.useCallback)((e=>{O.current.contains(e.target)||$(!1)}),[O]);(0,e.useEffect)((()=>{if(O.current){const{left:e,right:t,top:n,bottom:r}=O.current.getBoundingClientRect();let o=100,i=w,a=b,c=0;(null==g?void 0:g.current)&&({top:o,right:i,bottom:a,left:c}=g.current.getBoundingClientRect()),t>i&&e>c?N("right"):e<c&&t<i&&N("left"),n<o&&r<a?C("bottom"):r>a&&n>o&&C("top")}}),[g,E,b,w]),(0,e.useEffect)((()=>("function"==typeof v&&v(P),P?document.addEventListener("mousedown",S):document.removeEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)})),[P,S,v]),(0,e.useEffect)((()=>{$(y)}),[y]);const T=[we,r,`${we}--size-${a}`,`${we}--color-${c}`,`${we}--v-align-${k}`,`${we}--h-align-${j}`,P&&`${we}--active`].filter(Boolean).join(" ");return t().createElement("div",{className:T},t().createElement("div",{ref:_,className:`${we}__wrapper`},f?t().createElement("div",{className:`${we}__on-hover-watch`,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1)},t().createElement(ye,{className:o,buttonType:l,button:s,setActive:$,active:P})):t().createElement(ye,{className:o,buttonType:l,button:s,setActive:$,active:P})),t().createElement("div",{className:`${we}__content`,ref:O},t().createElement("div",{className:`${we}__wrap`,ref:x},t().createElement("div",{className:`${we}__scroll`,style:{padding:m}},i&&i({close:()=>$(!1)}),u&&u))))},xe="banner",Ee=e=>{let{children:n,className:r,to:o,icon:i,alignIcon:a="right",onClick:c,type:s="default"}=e;const l=[xe,`${xe}--type-${s}`,r&&r,o&&`${xe}--has-link`,(o||c)&&`${xe}--has-action`,i&&`${xe}--has-icon`,i&&`${xe}--align-icon-${a}`].filter(Boolean).join(" ");let u="div";return c&&!o&&(u="button"),o&&(u=ie),t().createElement(u,{className:l,onClick:c,to:o||void 0},i&&"left"===a&&t().createElement(t().Fragment,null,i),t().createElement("span",{className:`${xe}__content`},n),i&&"right"===a&&t().createElement(t().Fragment,null,i))},_e="template-minimal",Oe=e=>{const{className:n,style:r={},children:o,width:i="normal"}=e,a=[n,_e,`${_e}--width-${i}`].filter(Boolean).join(" ");return t().createElement("section",{className:a,style:r},t().createElement("div",{className:`${_e}__wrap`},o))},Pe=()=>t().createElement("svg",{className:"icon icon--check",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("path",{d:"M10.6092 16.0192L17.6477 8.98076",className:"stroke",strokeLinecap:"square",strokeLinejoin:"bevel"}),t().createElement("path",{d:"M7.35229 12.7623L10.6092 16.0192",className:"stroke",strokeLinecap:"square",strokeLinejoin:"bevel"})),$e=()=>t().createElement("svg",{viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"icon icon--search"},t().createElement("circle",{cx:"11.2069",cy:"10.7069",r:"5",className:"stroke"}),t().createElement("line",{x1:"14.914",y1:"13.9998",x2:"20.5002",y2:"19.586",className:"stroke"})),ke=()=>t().createElement("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",className:"icon icon--menu",xmlns:"http://www.w3.org/2000/svg"},t().createElement("rect",{x:"3.5",y:"4.5",width:"18",height:"2",className:"fill"}),t().createElement("rect",{x:"3.5",y:"11.5",width:"18",height:"2",className:"fill"}),t().createElement("rect",{x:"3.5",y:"18.5",width:"18",height:"2",className:"fill"})),Ce="pill",je=e=>{let{children:n,className:r,to:o,icon:i,alignIcon:a="right",onClick:c,pillStyle:s="light"}=e;const l=[Ce,`${Ce}--style-${s}`,r&&r,o&&`${Ce}--has-link`,(o||c)&&`${Ce}--has-action`,i&&`${Ce}--has-icon`,i&&`${Ce}--align-icon-${a}`].filter(Boolean).join(" ");let u="div";return c&&!o&&(u="button"),o&&(u=ie),t().createElement(u,{className:l,onClick:c,type:"button"===u?"button":void 0,to:o||void 0},i&&"left"===a&&t().createElement(t().Fragment,null,i),n,i&&"right"===a&&t().createElement(t().Fragment,null,i))}})(),module.exports=r})();
|
|
9
|
+
*/var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case f:case i:case c:case a:case d:return e;default:switch(e=e&&e.$$typeof){case l:case p:case m:case v:case s:return e;default:return t}}case o:return t}}}function E(e){return x(e)===f}t.AsyncMode=u,t.ConcurrentMode=f,t.ContextConsumer=l,t.ContextProvider=s,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=m,t.Memo=v,t.Portal=o,t.Profiler=c,t.StrictMode=a,t.Suspense=d,t.isAsyncMode=function(e){return E(e)||x(e)===u},t.isConcurrentMode=E,t.isContextConsumer=function(e){return x(e)===l},t.isContextProvider=function(e){return x(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===m},t.isMemo=function(e){return x(e)===v},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===c},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===c||e===a||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===s||e.$$typeof===l||e.$$typeof===p||e.$$typeof===g||e.$$typeof===w||e.$$typeof===b||e.$$typeof===y)},t.typeOf=x},864:(e,t,n)=>{"use strict";e.exports=n(921)},658:(e,t,n)=>{var r=n(826);e.exports=d,e.exports.parse=i,e.exports.compile=function(e,t){return c(i(e,t),t)},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,a=0,c="",u=t&&t.delimiter||"/";null!=(n=o.exec(e));){var f=n[0],p=n[1],d=n.index;if(c+=e.slice(a,d),a=d+f.length,p)c+=p[1];else{var h=e[a],v=n[2],m=n[3],y=n[4],g=n[5],w=n[6],b=n[7];c&&(r.push(c),c="");var x=null!=v&&null!=h&&h!==v,E="+"===w||"*"===w,_="?"===w||"*"===w,O=n[2]||u,P=y||g;r.push({name:m||i++,prefix:v||"",delimiter:O,optional:_,repeat:E,partial:x,asterisk:!!b,pattern:P?l(P):b?".*":"[^"+s(O)+"]+?"})}}return a<e.length&&(c+=e.substr(a)),c&&r.push(c),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function c(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",f(t)));return function(t,o){for(var i="",c=t||{},s=(o||{}).pretty?a:encodeURIComponent,l=0;l<e.length;l++){var u=e[l];if("string"!=typeof u){var f,p=c[u.name];if(null==p){if(u.optional){u.partial&&(i+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var d=0;d<p.length;d++){if(f=s(p[d]),!n[l].test(f))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===d?u.prefix:u.delimiter)+f}}else{if(f=u.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(p),!n[l].test(f))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+f+'"');i+=u.prefix+f}}else i+=u}return i}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function f(e){return e&&e.sensitive?"":"i"}function p(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",c=0;c<e.length;c++){var l=e[c];if("string"==typeof l)a+=s(l);else{var p=s(l.prefix),d="(?:"+l.pattern+")";t.push(l),l.repeat&&(d+="(?:"+p+d+")*"),a+=d=l.optional?l.partial?p+"("+d+")?":"(?:"+p+"("+d+"))?":p+"("+d+")"}}var h=s(n.delimiter||"/"),v=a.slice(-h.length)===h;return o||(a=(v?a.slice(0,-h.length):a)+"(?:"+h+"(?=$))?"),a+=i?"$":o&&v?"":"(?="+h+"|$)",u(new RegExp("^"+a,f(n)),t)}function d(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(d(e[o],t,n).source);return u(new RegExp("(?:"+r.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return p(i(e,n),t,n)}(e,t,n)}},497:e=>{"use strict";e.exports=require("react")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{Banner:()=>Ee,Button:()=>he,Check:()=>Pe,Chevron:()=>le,Menu:()=>ke,MinimalTemplate:()=>Oe,Pill:()=>je,Popup:()=>be,Search:()=>$e,X:()=>se});var e=n(497),t=n.n(e);function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}var a=n(697),c=n.n(a);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e){return"/"===e.charAt(0)}function u(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}const f=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],o=t&&t.split("/")||[],i=e&&l(e),a=t&&l(t),c=i||a;if(e&&l(e)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var s=o[o.length-1];n="."===s||".."===s||""===s}else n=!1;for(var f=0,p=o.length;p>=0;p--){var d=o[p];"."===d?u(o,p):".."===d?(u(o,p),f++):f&&(u(o,p),f--)}if(!c)for(;f--;f)o.unshift("..");!c||""===o[0]||o[0]&&l(o[0])||o.unshift("");var h=o.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};var p="Invariant failed";function d(e,t){if(!e)throw new Error(p)}function h(e){return"/"===e.charAt(0)?e:"/"+e}function v(e){return"/"===e.charAt(0)?e.substr(1):e}function m(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function y(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function g(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function w(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=s({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=f(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function b(){var e=null;var t=[];return{setPrompt:function(t){return t,function(){e===t&&null}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){!1,t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var x=!("undefined"==typeof window||!window.document||!window.document.createElement);function E(e,t){t(window.confirm(e))}var _="popstate",O="hashchange";function P(){try{return window.history.state||{}}catch(e){return{}}}function $(e){void 0===e&&{},x||d(!1);var t,n=window.history,r=(-1===window.navigator.userAgent.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,a=i.forceRefresh,c=void 0!==a&&a,l=i.getUserConfirmation,u=void 0===l?E:l,f=i.keyLength,p=void 0===f?6:f,v=e.basename?y(h(e.basename)):"";function $(e){var t=e||{},n=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return v&&m(i,v),w(i,r,n)}function k(){return Math.random().toString(36).substr(2,p)}var C=b();function j(e){s(U,e),U.length=n.length,C.notifyListeners(U.location,U.action)}function N(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||M($(e.state))}function S(){M($(P()))}var T=!1;function M(e){if(T)!1,j();else{C.confirmTransitionTo(e,"POP",u,(function(t){t?j({action:"POP",location:e}):function(e){var t=U.location,n=R.indexOf(t.key);-1===n&&0;var r=R.indexOf(e.key);-1===r&&0;var o=n-r;o&&(!0,B(o))}(e)}))}}var A=$(P()),R=[A.key];function L(e){return v+g(e)}function B(e){n.go(e)}var I=0;function F(e){1===(I+=e)&&1===e?(window.addEventListener(_,N),o&&window.addEventListener(O,S)):0===I&&(window.removeEventListener(_,N),o&&window.removeEventListener(O,S))}var D=!1;var U={length:n.length,action:"POP",location:A,createHref:L,push:function(e,t){var o="PUSH",i=w(e,t,k(),U.location);C.confirmTransitionTo(i,o,u,(function(e){if(e){var t=L(i),a=i.key,s=i.state;if(r)if(n.pushState({key:a,state:s},null,t),c)window.location.href=t;else{var l=R.indexOf(U.location.key),u=R.slice(0,l+1);u.push(i.key),u,j({action:o,location:i})}else window.location.href=t}}))},replace:function(e,t){var o="REPLACE",i=w(e,t,k(),U.location);C.confirmTransitionTo(i,o,u,(function(e){if(e){var t=L(i),a=i.key,s=i.state;if(r)if(n.replaceState({key:a,state:s},null,t),c)window.location.replace(t);else{var l=R.indexOf(U.location.key);-1!==l&&(R[l]=i.key),j({action:o,location:i})}else window.location.replace(t)}}))},go:B,goBack:function(){B(-1)},goForward:function(){B(1)},block:function(e){void 0===e&&!1;var t=C.setPrompt(e);return D||(F(1),!0),function(){return D&&(!1,F(-1)),t()}},listen:function(e){var t=C.appendListener(e);return F(1),function(){F(-1),t()}}};return U}var k="hashchange",C={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+v(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:v,decodePath:h},slash:{encodePath:h,decodePath:h}};function j(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function N(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function S(e){window.location.replace(j(window.location.href)+"#"+e)}function T(e){void 0===e&&{},x||d(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),r=n.getUserConfirmation,o=void 0===r?E:r,i=n.hashType,a=void 0===i?"slash":i,c=e.basename?y(h(e.basename)):"",l=C[a],u=l.encodePath,f=l.decodePath;function p(){var e=f(N());return c&&m(e,c),w(e)}var v=b();function _(e){s(D,e),D.length=t.length,v.notifyListeners(D.location,D.action)}var O=!1,P=null;function $(){var e,t,n=N(),r=u(n);if(n!==r)S(r);else{var i=p(),a=D.location;if(!O&&(i,a.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(P===g(i))return;null,function(e){if(O)!1,_();else{var t="POP";v.confirmTransitionTo(e,t,o,(function(n){n?_({action:t,location:e}):function(e){var t=D.location,n=R.lastIndexOf(g(t));-1===n&&0;var r=R.lastIndexOf(g(e));-1===r&&0;var o=n-r;o&&(!0,L(o))}(e)}))}}(i)}}var T=N(),M=u(T);T!==M&&S(M);var A=p(),R=[g(A)];function L(e){t.go(e)}var B=0;function I(e){1===(B+=e)&&1===e?window.addEventListener(k,$):0===B&&window.removeEventListener(k,$)}var F=!1;var D={length:t.length,action:"POP",location:A,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&j(window.location.href),n+"#"+u(c+g(e))},push:function(e,t){var n="PUSH",r=w(e,void 0,void 0,D.location);v.confirmTransitionTo(r,n,o,(function(e){if(e){var t=g(r),o=u(c+t);if(N()!==o){t,function(e){window.location.hash=e}(o);var i=R.lastIndexOf(g(D.location)),a=R.slice(0,i+1);a.push(t),a,_({action:n,location:r})}else _()}}))},replace:function(e,t){var n="REPLACE",r=w(e,void 0,void 0,D.location);v.confirmTransitionTo(r,n,o,(function(e){if(e){var t=g(r),o=u(c+t);N()!==o&&(t,S(o));var i=R.indexOf(g(D.location));-1!==i&&(R[i]=t),_({action:n,location:r})}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(e){void 0===e&&!1;var t=v.setPrompt(e);return F||(I(1),!0),function(){return F&&(!1,I(-1)),t()}},listen:function(e){var t=v.appendListener(e);return I(1),function(){I(-1),t()}}};return D}function M(e,t,n){return Math.min(Math.max(e,t),n)}function A(e){void 0===e&&{};var t=e,n=t.getUserConfirmation,r=t.initialEntries,o=void 0===r?["/"]:r,i=t.initialIndex,a=void 0===i?0:i,c=t.keyLength,l=void 0===c?6:c,u=b();function f(e){s(y,e),y.length=y.entries.length,u.notifyListeners(y.location,y.action)}function p(){return Math.random().toString(36).substr(2,l)}var d=M(a,0,o.length-1),h=o.map((function(e){return w(e,void 0,"string"==typeof e?p():e.key||p())})),v=g;function m(e){var t=M(y.index+e,0,y.entries.length-1),r=y.entries[t];u.confirmTransitionTo(r,"POP",n,(function(e){e?f({action:"POP",location:r,index:t}):f()}))}var y={length:h.length,action:"POP",location:h[d],index:d,entries:h,createHref:v,push:function(e,t){var r="PUSH",o=w(e,t,p(),y.location);u.confirmTransitionTo(o,r,n,(function(e){if(e){var t=y.index+1,n=y.entries.slice(0);n.length>t?n.splice(t,n.length-t,o):n.push(o),f({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=w(e,t,p(),y.location);u.confirmTransitionTo(o,r,n,(function(e){e&&(y.entries[y.index]=o,f({action:r,location:o}))}))},go:m,goBack:function(){m(-1)},goForward:function(){m(1)},canGo:function(e){var t=y.index+e;return t>=0&&t<y.entries.length},block:function(e){return void 0===e&&!1,u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return y}var R=n(658),L=n.n(R);n(864);function B(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n(679);var I=1073741823,F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};function D(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var U=t().createContext||function(e,n){var r,o,a="__create-react-context-"+function(){var e="__global_unique_id__";return F[e]=(F[e]||0)+1}()+"__",s=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).emitter=D(t.props.value),t}i(t,e);var r=t.prototype;return r.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var t,r=this.props.value,o=e.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?t=0:(t="function"==typeof n?n(r,o):I,0!==(t|=0)&&this.emitter.set(e.value,t))}var i,a},r.render=function(){return this.props.children},t}(t().Component);s.childContextTypes=((r={})[a]=c().object.isRequired,r);var l=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,e.state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}i(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?I:t},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?I:e},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(t().Component);return l.contextTypes=((o={})[a]=c().object,o),{Provider:s,Consumer:l}},W=function(e){var t=U();return t.displayName=e,t},H=W("Router-History"),z=W("Router"),q=function(e){function n(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._pendingLocation=e}))),n}i(n,e),n.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var r=n.prototype;return r.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(t){e._isMounted&&e.setState({location:t})}))),this._pendingLocation&&this.setState({location:this._pendingLocation})},r.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},r.render=function(){return t().createElement(z.Provider,{value:{history:this.props.history,location:this.state.location,match:n.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},t().createElement(H.Provider,{children:this.props.children||null,value:this.props.history}))},n}(t().Component);t().Component;t().Component;var V={},K=0;function J(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,c=void 0!==a&&a,s=n.sensitive,l=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=V[n]||(V[n]={});if(r[e])return r[e];var o=[],i={regexp:L()(e,o,t),keys:o};return K<1e4&&(r[e]=i,K++),i}(n,{end:i,strict:c,sensitive:l}),o=r.regexp,a=r.keys,s=o.exec(e);if(!s)return null;var u=s[0],f=s.slice(1),p=e===u;return i&&!p?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:p,params:a.reduce((function(e,t,n){return e[t.name]=f[n],e}),{})}}),null)}t().Component;function G(e){return"/"===e.charAt(0)?e:"/"+e}function X(e,t){if(!e)return t;var n=G(e);return 0!==t.pathname.indexOf(n)?t:s({},t,{pathname:t.pathname.substr(n.length)})}function Y(e){return"string"==typeof e?e:g(e)}function Q(e){return function(){d(!1)}}function Z(){}t().Component;t().Component;t().useContext;t().Component;t().Component;var ee=function(e,t){return"function"==typeof e?e(t):e},te=function(e,t){return"string"==typeof e?w(e,null,null,t):e},ne=function(e){return e},re=t().forwardRef;void 0===re&&(re=ne);var oe=re((function(e,n){var r=e.innerRef,o=e.navigate,i=e.onClick,a=B(e,["innerRef","navigate","onClick"]),c=a.target,l=s({},a,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||c&&"_self"!==c||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),o())}});return l.ref=ne!==re&&n||r,t().createElement("a",l)}));var ie=re((function(e,n){var r=e.component,o=void 0===r?oe:r,i=e.replace,a=e.to,c=e.innerRef,l=B(e,["component","replace","to","innerRef"]);return t().createElement(z.Consumer,null,(function(e){e||d(!1);var r=e.history,u=te(ee(a,e.location),e.location),f=u?r.createHref(u):"",p=s({},l,{href:f,navigate:function(){var t=ee(a,e.location),n=g(e.location)===g(te(t));(i||n?r.replace:r.push)(t)}});return ne!==re?p.ref=n||c:p.innerRef=c,t().createElement(o,p)}))})),ae=function(e){return e},ce=t().forwardRef;void 0===ce&&(ce=ae);ce((function(e,n){var r=e["aria-current"],o=void 0===r?"page":r,i=e.activeClassName,a=void 0===i?"active":i,c=e.activeStyle,l=e.className,u=e.exact,f=e.isActive,p=e.location,h=e.sensitive,v=e.strict,m=e.style,y=e.to,g=e.innerRef,w=B(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return t().createElement(z.Consumer,null,(function(e){e||d(!1);var r=p||e.location,i=te(ee(y,r),r),b=i.pathname,x=b&&b.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),E=x?J(r.pathname,{path:x,exact:u,sensitive:h,strict:v}):null,_=!!(f?f(E,r):E),O="function"==typeof l?l(_):l,P="function"==typeof m?m(_):m;_&&(O=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(O,a),P=s({},P,c));var $=s({"aria-current":_&&o||null,className:O,style:P,to:i},w);return ae!==ce?$.ref=n||g:$.innerRef=g,t().createElement(ie,$)}))}));const se=e=>{let{className:n}=e;return t().createElement("svg",{width:"25",height:"25",className:[n,"icon icon--x"].filter(Boolean).join(" "),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("line",{className:"stroke",x1:"8.74612",y1:"16.347",x2:"16.3973",y2:"8.69584"}),t().createElement("line",{className:"stroke",x1:"8.6027",y1:"8.69585",x2:"16.2539",y2:"16.3471"}))},le=e=>{let{className:n}=e;return t().createElement("svg",{className:["icon icon--chevron",n].filter(Boolean).join(" "),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("path",{className:"stroke",d:"M9 10.5L12.5 14.5L16 10.5"}))},ue=e=>{const{className:n,children:r}=e,o=["tooltip",n].filter(Boolean).join(" ");return t().createElement("aside",{className:o},r,t().createElement("span",null))},fe={plus:()=>t().createElement("svg",{className:"icon icon--plus",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("line",{x1:"12.4589",y1:"16.9175",x2:"12.4589",y2:"8.50115",className:"stroke"}),t().createElement("line",{x1:"8.05164",y1:"12.594",x2:"16.468",y2:"12.594",className:"stroke"})),x:se,chevron:le,edit:()=>t().createElement("svg",{className:"icon icon--edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("polygon",{className:"fill",points:"16.92 16.86 8.25 16.86 8.25 8.21 12.54 8.21 12.54 6.63 6.68 6.63 6.68 18.43 18.5 18.43 18.5 12.53 16.92 12.53 16.92 16.86"}),t().createElement("polygon",{className:"fill",points:"16.31 7.33 17.42 8.44 12.66 13.2 11.51 13.24 11.55 12.09 16.31 7.33"}),t().createElement("rect",{className:"fill",x:"16.94",y:"6.44",width:"1.58",height:"1.15",transform:"translate(10.16 -10.48) rotate(45)"})),swap:()=>t().createElement("svg",{className:"icon icon--swap",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("path",{d:"M9.84631 4.78679L6.00004 8.63306L9.84631 12.4793",className:"stroke"}),t().createElement("path",{d:"M15.1537 20.1059L19 16.2596L15.1537 12.4133",className:"stroke"}),t().createElement("line",{x1:"7",y1:"8.7013",x2:"15",y2:"8.7013",stroke:"#333333",className:"stroke"}),t().createElement("line",{x1:"18",y1:"16.1195",x2:"10",y2:"16.1195",className:"stroke"}))},pe="btn",de=n=>{let{children:r,icon:o,tooltip:i}=n;const a=fe[o];return t().createElement("span",{className:`${pe}__content`},i&&t().createElement(ue,{className:`${pe}__tooltip`},i),r&&t().createElement("span",{className:`${pe}__label`},r),o&&t().createElement("span",{className:`${pe}__icon`},(0,e.isValidElement)(o)&&o,a&&t().createElement(a,null)))},he=e=>{const{className:n,id:r,type:o="button",el:i,to:a,url:c,children:s,onClick:l,disabled:u,icon:f,iconStyle:p="without-border",buttonStyle:d="primary",round:h,size:v="medium",iconPosition:m="right",newTab:y,tooltip:g}=e,w=[pe,n&&n,d&&`${pe}--style-${d}`,f&&`${pe}--icon`,p&&`${pe}--icon-style-${p}`,f&&!s&&`${pe}--icon-only`,u&&`${pe}--disabled`,h&&`${pe}--round`,v&&`${pe}--size-${v}`,m&&`${pe}--icon-position-${m}`,g&&`${pe}--has-tooltip`].filter(Boolean).join(" ");const b={id:r,type:o,className:w,disabled:u,onClick:u?void 0:function(e){"submit"!==o&&l&&e.preventDefault(),l&&l(e)},rel:y?"noopener noreferrer":void 0,target:y?"_blank":void 0};switch(i){case"link":return t().createElement(ie,{...b,to:a||c},t().createElement(de,{icon:f,tooltip:g},s));case"anchor":return t().createElement("a",{...b,href:c},t().createElement(de,{icon:f,tooltip:g},s));default:return t().createElement("button",{type:"submit",...b},t().createElement(de,{icon:f,tooltip:g},s))}};var ve=n(727);const me="popup-button",ye=e=>{const{className:n,buttonType:r,button:o,setActive:i,active:a}=e,c=[me,n,`${me}--${r}`].filter(Boolean).join(" "),s=()=>{i(!a)};return"none"===r?null:"custom"===r?t().createElement("div",{role:"button",tabIndex:0,onKeyDown:e=>{"Enter"===e.key&&s()},onClick:s,className:c},o):t().createElement("button",{type:"button",onClick:()=>i(!a),className:c},o)},ge=function(){let{root:t=null,rootMargin:n="0px",threshold:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[o,i]=(0,e.useState)(),[a,c]=(0,e.useState)(null),s=(0,e.useRef)(new window.IntersectionObserver((e=>{let[t]=e;return i(t)}),{root:t,rootMargin:n,threshold:r}));return(0,e.useEffect)((()=>{const{current:e}=s;return e.disconnect(),a&&e.observe(a),()=>e.disconnect()}),[a]),[c,o]},we="popup",be=n=>{const{className:r,buttonClassName:o,render:i,size:a="small",color:c="light",button:s,buttonType:l="default",children:u,showOnHover:f=!1,horizontalAlign:p="left",verticalAlign:d="top",initActive:h=!1,onToggleOpen:v,padding:m,forceOpen:y,boundingRef:g}=n,{width:w,height:b}=(0,ve.useWindowInfo)(),[x,E]=ge({threshold:1,rootMargin:"-100px 0px 0px 0px",root:(null==g?void 0:g.current)||null}),_=(0,e.useRef)(null),O=(0,e.useRef)(null),[P,$]=(0,e.useState)(h),[k,C]=(0,e.useState)(d),[j,N]=(0,e.useState)(p),S=(0,e.useCallback)((e=>{let{horizontal:t=!1,vertical:n=!1}=e;if(O.current){const e=O.current.getBoundingClientRect(),{left:r,right:o,top:i,bottom:a}=e;let c=100,s=window.innerWidth,l=window.innerHeight,u=0;(null==g?void 0:g.current)&&({top:c,right:s,bottom:l,left:u}=g.current.getBoundingClientRect()),t&&(o>s&&r>u?N("right"):r<u&&o<s&&N("left")),n&&(i<c&&a<l?C("bottom"):a>l&&i>c&&C("top"))}}),[g]),T=(0,e.useCallback)((e=>{O.current.contains(e.target)||$(!1)}),[O]);(0,e.useEffect)((()=>{S({horizontal:!0})}),[E,S,w]),(0,e.useEffect)((()=>{S({vertical:!0})}),[E,S,b]),(0,e.useEffect)((()=>("function"==typeof v&&v(P),P?document.addEventListener("mousedown",T):document.removeEventListener("mousedown",T),()=>{document.removeEventListener("mousedown",T)})),[P,T,v]),(0,e.useEffect)((()=>{$(y)}),[y]);const M=[we,r,`${we}--size-${a}`,`${we}--color-${c}`,`${we}--v-align-${k}`,`${we}--h-align-${j}`,P&&`${we}--active`].filter(Boolean).join(" ");return t().createElement("div",{className:M},t().createElement("div",{ref:_,className:`${we}__wrapper`},f?t().createElement("div",{className:`${we}__on-hover-watch`,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1)},t().createElement(ye,{className:o,buttonType:l,button:s,setActive:$,active:P})):t().createElement(ye,{className:o,buttonType:l,button:s,setActive:$,active:P})),t().createElement("div",{className:`${we}__content`,ref:O},t().createElement("div",{className:`${we}__wrap`,ref:x},t().createElement("div",{className:`${we}__scroll`,style:{padding:m}},i&&i({close:()=>$(!1)}),u&&u))))},xe="banner",Ee=e=>{let{children:n,className:r,to:o,icon:i,alignIcon:a="right",onClick:c,type:s="default"}=e;const l=[xe,`${xe}--type-${s}`,r&&r,o&&`${xe}--has-link`,(o||c)&&`${xe}--has-action`,i&&`${xe}--has-icon`,i&&`${xe}--align-icon-${a}`].filter(Boolean).join(" ");let u="div";return c&&!o&&(u="button"),o&&(u=ie),t().createElement(u,{className:l,onClick:c,to:o||void 0},i&&"left"===a&&t().createElement(t().Fragment,null,i),t().createElement("span",{className:`${xe}__content`},n),i&&"right"===a&&t().createElement(t().Fragment,null,i))},_e="template-minimal",Oe=e=>{const{className:n,style:r={},children:o,width:i="normal"}=e,a=[n,_e,`${_e}--width-${i}`].filter(Boolean).join(" ");return t().createElement("section",{className:a,style:r},t().createElement("div",{className:`${_e}__wrap`},o))},Pe=()=>t().createElement("svg",{className:"icon icon--check",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("path",{d:"M10.6092 16.0192L17.6477 8.98076",className:"stroke",strokeLinecap:"square",strokeLinejoin:"bevel"}),t().createElement("path",{d:"M7.35229 12.7623L10.6092 16.0192",className:"stroke",strokeLinecap:"square",strokeLinejoin:"bevel"})),$e=()=>t().createElement("svg",{viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"icon icon--search"},t().createElement("circle",{cx:"11.2069",cy:"10.7069",r:"5",className:"stroke"}),t().createElement("line",{x1:"14.914",y1:"13.9998",x2:"20.5002",y2:"19.586",className:"stroke"})),ke=()=>t().createElement("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",className:"icon icon--menu",xmlns:"http://www.w3.org/2000/svg"},t().createElement("rect",{x:"3.5",y:"4.5",width:"18",height:"2",className:"fill"}),t().createElement("rect",{x:"3.5",y:"11.5",width:"18",height:"2",className:"fill"}),t().createElement("rect",{x:"3.5",y:"18.5",width:"18",height:"2",className:"fill"})),Ce="pill",je=e=>{let{children:n,className:r,to:o,icon:i,alignIcon:a="right",onClick:c,pillStyle:s="light"}=e;const l=[Ce,`${Ce}--style-${s}`,r&&r,o&&`${Ce}--has-link`,(o||c)&&`${Ce}--has-action`,i&&`${Ce}--has-icon`,i&&`${Ce}--align-icon-${a}`].filter(Boolean).join(" ");let u="div";return c&&!o&&(u="button"),o&&(u=ie),t().createElement(u,{className:l,onClick:c,type:"button"===u?"button":void 0,to:o||void 0},i&&"left"===a&&t().createElement(t().Fragment,null,i),n,i&&"right"===a&&t().createElement(t().Fragment,null,i))}})(),module.exports=r})();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { useWindowInfo } from '@faceless-ui/window-info';
|
|
3
3
|
import PopupButton from './PopupButton';
|
|
4
|
-
import './index.scss';
|
|
5
4
|
import useIntersect from '../../../hooks/useIntersect';
|
|
5
|
+
import './index.scss';
|
|
6
6
|
const baseClass = 'popup';
|
|
7
7
|
const Popup = (props) => {
|
|
8
8
|
const { className, buttonClassName, render, size = 'small', color = 'light', button, buttonType = 'default', children, showOnHover = false, horizontalAlign: horizontalAlignFromProps = 'left', verticalAlign: verticalAlignFromProps = 'top', initActive = false, onToggleOpen, padding, forceOpen, boundingRef, } = props;
|
|
@@ -17,18 +17,13 @@ const Popup = (props) => {
|
|
|
17
17
|
const [active, setActive] = useState(initActive);
|
|
18
18
|
const [verticalAlign, setVerticalAlign] = useState(verticalAlignFromProps);
|
|
19
19
|
const [horizontalAlign, setHorizontalAlign] = useState(horizontalAlignFromProps);
|
|
20
|
-
const
|
|
21
|
-
if (contentRef.current.contains(e.target)) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
setActive(false);
|
|
25
|
-
}, [contentRef]);
|
|
26
|
-
useEffect(() => {
|
|
20
|
+
const setPosition = useCallback(({ horizontal = false, vertical = false }) => {
|
|
27
21
|
if (contentRef.current) {
|
|
28
|
-
const
|
|
22
|
+
const bounds = contentRef.current.getBoundingClientRect();
|
|
23
|
+
const { left: contentLeftPos, right: contentRightPos, top: contentTopPos, bottom: contentBottomPos, } = bounds;
|
|
29
24
|
let boundingTopPos = 100;
|
|
30
|
-
let boundingRightPos =
|
|
31
|
-
let boundingBottomPos =
|
|
25
|
+
let boundingRightPos = window.innerWidth;
|
|
26
|
+
let boundingBottomPos = window.innerHeight;
|
|
32
27
|
let boundingLeftPos = 0;
|
|
33
28
|
if (boundingRef === null || boundingRef === void 0 ? void 0 : boundingRef.current) {
|
|
34
29
|
({
|
|
@@ -38,20 +33,36 @@ const Popup = (props) => {
|
|
|
38
33
|
left: boundingLeftPos,
|
|
39
34
|
} = boundingRef.current.getBoundingClientRect());
|
|
40
35
|
}
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
if (horizontal) {
|
|
37
|
+
if (contentRightPos > boundingRightPos && contentLeftPos > boundingLeftPos) {
|
|
38
|
+
setHorizontalAlign('right');
|
|
39
|
+
}
|
|
40
|
+
else if (contentLeftPos < boundingLeftPos && contentRightPos < boundingRightPos) {
|
|
41
|
+
setHorizontalAlign('left');
|
|
42
|
+
}
|
|
46
43
|
}
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
if (vertical) {
|
|
45
|
+
if (contentTopPos < boundingTopPos && contentBottomPos < boundingBottomPos) {
|
|
46
|
+
setVerticalAlign('bottom');
|
|
47
|
+
}
|
|
48
|
+
else if (contentBottomPos > boundingBottomPos && contentTopPos > boundingTopPos) {
|
|
49
|
+
setVerticalAlign('top');
|
|
50
|
+
}
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
|
-
}, [boundingRef
|
|
53
|
+
}, [boundingRef]);
|
|
54
|
+
const handleClickOutside = useCallback((e) => {
|
|
55
|
+
if (contentRef.current.contains(e.target)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
setActive(false);
|
|
59
|
+
}, [contentRef]);
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
setPosition({ horizontal: true });
|
|
62
|
+
}, [intersectionEntry, setPosition, windowWidth]);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
setPosition({ vertical: true });
|
|
65
|
+
}, [intersectionEntry, setPosition, windowHeight]);
|
|
55
66
|
useEffect(() => {
|
|
56
67
|
if (typeof onToggleOpen === 'function')
|
|
57
68
|
onToggleOpen(active);
|
|
@@ -52,8 +52,8 @@ const SearchFilter = (props) => {
|
|
|
52
52
|
where: newWhere,
|
|
53
53
|
}),
|
|
54
54
|
});
|
|
55
|
-
setPreviousSearch(debouncedSearch);
|
|
56
55
|
}
|
|
56
|
+
setPreviousSearch(debouncedSearch);
|
|
57
57
|
}
|
|
58
58
|
}, [debouncedSearch, previousSearch, history, fieldName, params, handleChange, modifySearchQuery, listSearchableFields]);
|
|
59
59
|
useEffect(() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useReducer
|
|
1
|
+
import React, { useCallback, useEffect, useReducer } from 'react';
|
|
2
2
|
import { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd';
|
|
3
3
|
import { useAuth } from '../../../utilities/Auth';
|
|
4
4
|
import withCondition from '../../withCondition';
|
|
@@ -47,15 +47,13 @@ const ArrayFieldType = (props) => {
|
|
|
47
47
|
const { id } = useDocumentInfo();
|
|
48
48
|
const locale = useLocale();
|
|
49
49
|
const operation = useOperation();
|
|
50
|
-
const { dispatchFields } = formContext;
|
|
50
|
+
const { dispatchFields, setModified } = formContext;
|
|
51
51
|
const memoizedValidate = useCallback((value, options) => {
|
|
52
52
|
return validate(value, { ...options, minRows, maxRows, required });
|
|
53
53
|
}, [maxRows, minRows, required, validate]);
|
|
54
|
-
const [disableFormData, setDisableFormData] = useState(true);
|
|
55
54
|
const { showError, errorMessage, value, setValue, } = useField({
|
|
56
55
|
path,
|
|
57
56
|
validate: memoizedValidate,
|
|
58
|
-
disableFormData,
|
|
59
57
|
condition,
|
|
60
58
|
});
|
|
61
59
|
const addRow = useCallback(async (rowIndex) => {
|
|
@@ -83,7 +81,8 @@ const ArrayFieldType = (props) => {
|
|
|
83
81
|
const moveRow = useCallback((moveFromIndex, moveToIndex) => {
|
|
84
82
|
dispatchRows({ type: 'MOVE', moveFromIndex, moveToIndex });
|
|
85
83
|
dispatchFields({ type: 'MOVE_ROW', moveFromIndex, moveToIndex, path });
|
|
86
|
-
|
|
84
|
+
setModified(true);
|
|
85
|
+
}, [dispatchRows, dispatchFields, path, setModified]);
|
|
87
86
|
const onDragEnd = useCallback((result) => {
|
|
88
87
|
if (!result.destination)
|
|
89
88
|
return;
|
|
@@ -148,14 +147,16 @@ const ArrayFieldType = (props) => {
|
|
|
148
147
|
initializeRowState();
|
|
149
148
|
}, [formContext, path, getPreference, preferencesKey, initCollapsed]);
|
|
150
149
|
useEffect(() => {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
150
|
+
if (typeof rows !== 'undefined') {
|
|
151
|
+
const disableFormData = rows.length > 0;
|
|
152
|
+
dispatchFields({
|
|
153
|
+
type: 'UPDATE',
|
|
154
|
+
path,
|
|
155
|
+
disableFormData,
|
|
156
|
+
value: rows.length,
|
|
157
|
+
});
|
|
157
158
|
}
|
|
158
|
-
}, [rows,
|
|
159
|
+
}, [rows, dispatchFields, path]);
|
|
159
160
|
const hasMaxRows = maxRows && (rows === null || rows === void 0 ? void 0 : rows.length) >= maxRows;
|
|
160
161
|
const classes = [
|
|
161
162
|
'field-type',
|
|
@@ -43,16 +43,14 @@ const BlocksField = (props) => {
|
|
|
43
43
|
const { id } = useDocumentInfo();
|
|
44
44
|
const locale = useLocale();
|
|
45
45
|
const operation = useOperation();
|
|
46
|
-
const { dispatchFields } = formContext;
|
|
46
|
+
const { dispatchFields, setModified } = formContext;
|
|
47
47
|
const memoizedValidate = useCallback((value, options) => {
|
|
48
48
|
return validate(value, { ...options, minRows, maxRows, required });
|
|
49
49
|
}, [maxRows, minRows, required, validate]);
|
|
50
|
-
const [disableFormData, setDisableFormData] = useState(true);
|
|
51
50
|
const [selectorIndexOpen, setSelectorIndexOpen] = useState();
|
|
52
51
|
const { showError, errorMessage, value, setValue, } = useField({
|
|
53
52
|
path,
|
|
54
53
|
validate: memoizedValidate,
|
|
55
|
-
disableFormData,
|
|
56
54
|
condition,
|
|
57
55
|
});
|
|
58
56
|
const onAddPopupToggle = useCallback((open) => {
|
|
@@ -86,7 +84,8 @@ const BlocksField = (props) => {
|
|
|
86
84
|
const moveRow = useCallback((moveFromIndex, moveToIndex) => {
|
|
87
85
|
dispatchRows({ type: 'MOVE', moveFromIndex, moveToIndex });
|
|
88
86
|
dispatchFields({ type: 'MOVE_ROW', moveFromIndex, moveToIndex, path });
|
|
89
|
-
|
|
87
|
+
setModified(true);
|
|
88
|
+
}, [dispatchRows, dispatchFields, path, setModified]);
|
|
90
89
|
const onDragEnd = useCallback((result) => {
|
|
91
90
|
if (!result.destination)
|
|
92
91
|
return;
|
|
@@ -152,14 +151,16 @@ const BlocksField = (props) => {
|
|
|
152
151
|
initializeRowState();
|
|
153
152
|
}, [formContext, path, getPreference, preferencesKey, initCollapsed]);
|
|
154
153
|
useEffect(() => {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
if (typeof rows !== 'undefined') {
|
|
155
|
+
const disableFormData = rows.length > 0;
|
|
156
|
+
dispatchFields({
|
|
157
|
+
type: 'UPDATE',
|
|
158
|
+
path,
|
|
159
|
+
disableFormData,
|
|
160
|
+
value: rows.length,
|
|
161
|
+
});
|
|
161
162
|
}
|
|
162
|
-
}, [rows,
|
|
163
|
+
}, [rows, dispatchFields, path]);
|
|
163
164
|
const hasMaxRows = maxRows && (rows === null || rows === void 0 ? void 0 : rows.length) >= maxRows;
|
|
164
165
|
const classes = [
|
|
165
166
|
'field-type',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCallback,
|
|
1
|
+
import { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useAuth } from '../../utilities/Auth';
|
|
3
3
|
import { useFormProcessing, useFormSubmitted, useFormModified, useForm, useFormFields } from '../Form/context';
|
|
4
4
|
import { useDocumentInfo } from '../../utilities/DocumentInfo';
|
|
@@ -17,7 +17,6 @@ const useField = (options) => {
|
|
|
17
17
|
const { getData, getSiblingData, setModified } = useForm();
|
|
18
18
|
const value = field === null || field === void 0 ? void 0 : field.value;
|
|
19
19
|
const initialValue = field === null || field === void 0 ? void 0 : field.initialValue;
|
|
20
|
-
const fieldDisableFormData = field === null || field === void 0 ? void 0 : field.disableFormData;
|
|
21
20
|
const valid = typeof (field === null || field === void 0 ? void 0 : field.valid) === 'boolean' ? field.valid : true;
|
|
22
21
|
const showError = valid === false && submitted;
|
|
23
22
|
// Method to return from `useField`, used to
|
|
@@ -101,15 +100,6 @@ const useField = (options) => {
|
|
|
101
100
|
validate,
|
|
102
101
|
valid,
|
|
103
102
|
]);
|
|
104
|
-
useEffect(() => {
|
|
105
|
-
if (fieldDisableFormData !== disableFormData) {
|
|
106
|
-
dispatchField({
|
|
107
|
-
type: 'UPDATE',
|
|
108
|
-
path,
|
|
109
|
-
disableFormData,
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}, [disableFormData, fieldDisableFormData, path, dispatchField]);
|
|
113
103
|
return result;
|
|
114
104
|
};
|
|
115
105
|
export default useField;
|
package/dist/config/types.d.ts
CHANGED
|
@@ -45,14 +45,34 @@ export declare function hasTransport(emailConfig: EmailOptions): emailConfig is
|
|
|
45
45
|
*/
|
|
46
46
|
export declare function hasTransportOptions(emailConfig: EmailOptions): emailConfig is EmailTransportOptions;
|
|
47
47
|
export declare type InitOptions = {
|
|
48
|
+
/** Express app for Payload to use */
|
|
48
49
|
express?: Express;
|
|
49
50
|
mongoURL: string | false;
|
|
50
51
|
mongoOptions?: ConnectOptions;
|
|
52
|
+
/** Secure string that Payload will use for any encryption workflows */
|
|
51
53
|
secret: string;
|
|
54
|
+
/**
|
|
55
|
+
* Configuration for Payload's email functionality
|
|
56
|
+
*
|
|
57
|
+
* https://payloadcms.com/docs/email/overview
|
|
58
|
+
*/
|
|
52
59
|
email?: EmailOptions;
|
|
60
|
+
/**
|
|
61
|
+
* Make Payload start in local-only mode.
|
|
62
|
+
*
|
|
63
|
+
* This will bypass setting up REST and GraphQL API routes.
|
|
64
|
+
* Express will not be required if set to `true`.
|
|
65
|
+
*/
|
|
53
66
|
local?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* A function that is called immediately following startup that receives the Payload instance as it's only argument.
|
|
69
|
+
*/
|
|
54
70
|
onInit?: (payload: Payload) => Promise<void> | void;
|
|
55
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Specify options for the built-in Pino logger that Payload uses for internal logging.
|
|
73
|
+
*
|
|
74
|
+
* See Pino Docs for options: https://getpino.io/#/docs/api?id=options
|
|
75
|
+
*/
|
|
56
76
|
loggerOptions?: LoggerOptions;
|
|
57
77
|
};
|
|
58
78
|
export declare type AccessResult = boolean | Where;
|
package/dist/utilities/logger.js
CHANGED
|
@@ -5,16 +5,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const pino_1 = __importDefault(require("pino"));
|
|
7
7
|
const micro_memoize_1 = __importDefault(require("micro-memoize"));
|
|
8
|
+
const defaultLoggerOptions = {
|
|
9
|
+
prettyPrint: {
|
|
10
|
+
ignore: 'pid,hostname',
|
|
11
|
+
translateTime: 'HH:MM:ss',
|
|
12
|
+
},
|
|
13
|
+
};
|
|
8
14
|
exports.default = (0, micro_memoize_1.default)((name = 'payload', options) => (0, pino_1.default)({
|
|
9
|
-
name,
|
|
15
|
+
name: (options === null || options === void 0 ? void 0 : options.name) || name,
|
|
10
16
|
enabled: process.env.DISABLE_LOGGING !== 'true',
|
|
11
|
-
...(options
|
|
12
|
-
? { options }
|
|
13
|
-
: {
|
|
14
|
-
prettyPrint: {
|
|
15
|
-
ignore: 'pid,hostname',
|
|
16
|
-
translateTime: 'HH:MM:ss',
|
|
17
|
-
},
|
|
18
|
-
}),
|
|
17
|
+
...(options || defaultLoggerOptions),
|
|
19
18
|
}));
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3V0aWxpdGllcy9sb2dnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxnREFBd0I7QUFDeEIsa0VBQW9DO0FBSXBDLE1BQU0sb0JBQW9CLEdBQUc7SUFDM0IsV0FBVyxFQUFFO1FBQ1gsTUFBTSxFQUFFLGNBQWM7UUFDdEIsYUFBYSxFQUFFLFVBQVU7S0FDMUI7Q0FDRixDQUFDO0FBRUYsa0JBQWUsSUFBQSx1QkFBTyxFQUNwQixDQUFDLElBQUksR0FBRyxTQUFTLEVBQUUsT0FBNEIsRUFBRSxFQUFFLENBQUMsSUFBQSxjQUFJLEVBQUM7SUFDdkQsSUFBSSxFQUFFLENBQUEsT0FBTyxhQUFQLE9BQU8sdUJBQVAsT0FBTyxDQUFFLElBQUksS0FBSSxJQUFJO0lBQzNCLE9BQU8sRUFBRSxPQUFPLENBQUMsR0FBRyxDQUFDLGVBQWUsS0FBSyxNQUFNO0lBQy9DLEdBQUcsQ0FBQyxPQUFPLElBQUksb0JBQW9CLENBQUM7Q0FDckMsQ0FBa0IsQ0FDcEIsQ0FBQyJ9
|
|
@@ -59,18 +59,18 @@ You can find an assortment of [example collection configs](https://github.com/pa
|
|
|
59
59
|
|
|
60
60
|
You can customize the way that the Admin panel behaves on a collection-by-collection basis by defining the `admin` property on a collection's config.
|
|
61
61
|
|
|
62
|
-
| Option
|
|
63
|
-
|
|
|
64
|
-
| `group`
|
|
65
|
-
| `hooks`
|
|
66
|
-
| `useAsTitle`
|
|
67
|
-
| `description`
|
|
68
|
-
| `defaultColumns`
|
|
69
|
-
| `disableDuplicate `
|
|
62
|
+
| Option | Description |
|
|
63
|
+
| --------------------------- | -------------|
|
|
64
|
+
| `group` | Text used as a label for grouping collection links together in the navigation. |
|
|
65
|
+
| `hooks` | Admin-specific hooks for this collection. [More](#admin-hooks) |
|
|
66
|
+
| `useAsTitle` | Specify a top-level field to use for a document title throughout the Admin panel. If no field is defined, the ID of the document is used as the title. |
|
|
67
|
+
| `description` | Text or React component to display below the Collection label in the List view to give editors more information. |
|
|
68
|
+
| `defaultColumns` | Array of field names that correspond to which columns to show by default in this collection's List view. |
|
|
69
|
+
| `disableDuplicate ` | Disables the "Duplicate" button while editing documents within this collection. |
|
|
70
70
|
| `enableRichTextRelationship` | The [Rich Text](/docs/fields/rich-text) field features a `Relationship` element which allows for users to automatically reference related documents within their rich text. Set to `true` by default. |
|
|
71
|
-
| `preview`
|
|
72
|
-
| `components`
|
|
73
|
-
| `listSearchableFields
|
|
71
|
+
| `preview` | Function to generate preview URLS within the Admin panel that can point to your app. [More](#preview). |
|
|
72
|
+
| `components` | Swap in your own React components to be used within this collection. [More](/docs/admin/components#collections) |
|
|
73
|
+
| `listSearchableFields` | Specify which fields should be searched in the List search view. [More](#list-searchable-fields) |
|
|
74
74
|
|
|
75
75
|
### Preview
|
|
76
76
|
|
|
@@ -121,7 +121,7 @@ Hooks are a powerful way to extend collection functionality and execute your own
|
|
|
121
121
|
|
|
122
122
|
Collections support all field types that Payload has to offer—including simple fields like text and checkboxes all the way to more complicated layout-building field groups like Blocks. [Click here](/docs/fields/overview) to learn more about field types.
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
### List Searchable Fields
|
|
125
125
|
|
|
126
126
|
In the List view, there is a "search" box that allows you to quickly find a document with a search. By default, it searches on the ID field. If you have `admin.useAsTitle` defined, the list search will use that field. However, you can define more than one field to search to make it easier on your admin editors to find the data they need.
|
|
127
127
|
|
|
@@ -129,7 +129,7 @@ For example, let's say you have a Posts collection with `title`, `metaDescriptio
|
|
|
129
129
|
|
|
130
130
|
<Banner type="warning">
|
|
131
131
|
<strong>Note:</strong><br/>
|
|
132
|
-
If you are adding <strong>listSearchableFields</strong>, make sure you index each of these fields so your admin queries can remain performant.
|
|
132
|
+
If you are adding <strong>listSearchableFields</strong>, make sure you index each of these fields so your admin queries can remain performant.
|
|
133
133
|
</Banner>
|
|
134
134
|
|
|
135
135
|
### Admin Hooks
|
|
@@ -138,7 +138,7 @@ In addition to collection hooks themselves, Payload provides for admin UI-specif
|
|
|
138
138
|
|
|
139
139
|
**`beforeDuplicate`**
|
|
140
140
|
|
|
141
|
-
The `beforeDuplicate` hook is an async function that accepts an object containing the data to duplicate, as well as the locale of the doc to duplicate. Within this hook, you can modify the data to be duplicated, which is useful in cases where you have unique fields that need to be incremented or similar, as well as if you want to automatically modify a document's `title`.
|
|
141
|
+
The `beforeDuplicate` hook is an async function that accepts an object containing the data to duplicate, as well as the locale of the doc to duplicate. Within this hook, you can modify the data to be duplicated, which is useful in cases where you have unique fields that need to be incremented or similar, as well as if you want to automatically modify a document's `title`.
|
|
142
142
|
|
|
143
143
|
Example:
|
|
144
144
|
|