@carto/ps-react-ui 3.0.0-alpha.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -9
- package/dist/index.js +20 -28
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -6,7 +6,7 @@
|
|
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 Oe;function pr(){if(Oe)return Y;Oe=1;var n=k,o=Symbol.for("react.element"),c=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,m=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function S(R,p,x){var b,w={},y=null,T=null;x!==void 0&&(y=""+x),p.key!==void 0&&(y=""+p.key),p.ref!==void 0&&(T=p.ref);for(b in p)s.call(p,b)&&!j.hasOwnProperty(b)&&(w[b]=p[b]);if(R&&R.defaultProps)for(b in p=R.defaultProps,p)w[b]===void 0&&(w[b]=p[b]);return{$$typeof:o,type:R,key:y,ref:T,props:w,_owner:m.current}}return Y.Fragment=c,Y.jsx=S,Y.jsxs=S,Y}var
|
9
|
+
*/var Oe;function pr(){if(Oe)return Y;Oe=1;var n=k,o=Symbol.for("react.element"),c=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,m=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function S(R,p,x){var b,w={},y=null,T=null;x!==void 0&&(y=""+x),p.key!==void 0&&(y=""+p.key),p.ref!==void 0&&(T=p.ref);for(b in p)s.call(p,b)&&!j.hasOwnProperty(b)&&(w[b]=p[b]);if(R&&R.defaultProps)for(b in p=R.defaultProps,p)w[b]===void 0&&(w[b]=p[b]);return{$$typeof:o,type:R,key:y,ref:T,props:w,_owner:m.current}}return Y.Fragment=c,Y.jsx=S,Y.jsxs=S,Y}var U={};/**
|
10
10
|
* @license React
|
11
11
|
* react-jsx-runtime.development.js
|
12
12
|
*
|
@@ -14,19 +14,17 @@
|
|
14
14
|
*
|
15
15
|
* This source code is licensed under the MIT license found in the
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
17
|
-
*/var Pe;function hr(){return Pe||(Pe=1,process.env.NODE_ENV!=="production"&&function(){var n=k,o=Symbol.for("react.element"),c=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),R=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),A=Symbol.iterator,O="@@iterator";function K(e){if(e===null||typeof e!="object")return null;var r=A&&e[A]||e[O];return typeof r=="function"?r:null}var M=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];Ie("error",e,t)}}function Ie(e,r,t){{var a=M.ReactDebugCurrentFrame,u=a.getStackAddendum();u!==""&&(r+="%s",t=t.concat([u]));var f=t.map(function(l){return String(l)});f.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,f)}}var De=!1,Fe=!1,Me=!1,$e=!1,We=!1,oe;oe=Symbol.for("react.module.reference");function Ve(e){return!!(typeof e=="string"||typeof e=="function"||e===s||e===j||We||e===m||e===x||e===b||$e||e===T||De||Fe||Me||typeof e=="object"&&e!==null&&(e.$$typeof===y||e.$$typeof===w||e.$$typeof===S||e.$$typeof===R||e.$$typeof===p||e.$$typeof===oe||e.getModuleId!==void 0))}function Be(e,r,t){var a=e.displayName;if(a)return a;var u=r.displayName||r.name||"";return u!==""?t+"("+u+")":t}function ie(e){return e.displayName||"Context"}function I(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case s:return"Fragment";case c:return"Portal";case j:return"Profiler";case m:return"StrictMode";case x:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case R:var r=e;return ie(r)+".Consumer";case S:var t=e;return ie(t._context)+".Provider";case p:return Be(e,e.render,"ForwardRef");case w:var a=e.displayName||null;return a!==null?a:I(e.type)||"Memo";case y:{var u=e,f=u._payload,l=u._init;try{return I(l(f))}catch{return null}}}return null}var D=Object.assign,V=0,se,le,ue,ce,fe,de,ve;function pe(){}pe.__reactDisabledLog=!0;function Le(){{if(V===0){se=console.log,le=console.info,ue=console.warn,ce=console.error,fe=console.group,de=console.groupCollapsed,ve=console.groupEnd;var e={configurable:!0,enumerable:!0,value:pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}V++}}function Ye(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:se}),info:D({},e,{value:le}),warn:D({},e,{value:ue}),error:D({},e,{value:ce}),group:D({},e,{value:fe}),groupCollapsed:D({},e,{value:de}),groupEnd:D({},e,{value:ve})})}V<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=M.ReactCurrentDispatcher,X;function
|
18
|
-
`+X+e}}var H=!1,q;{var
|
17
|
+
*/var Pe;function hr(){return Pe||(Pe=1,process.env.NODE_ENV!=="production"&&function(){var n=k,o=Symbol.for("react.element"),c=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),R=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),A=Symbol.iterator,O="@@iterator";function K(e){if(e===null||typeof e!="object")return null;var r=A&&e[A]||e[O];return typeof r=="function"?r:null}var M=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];Ie("error",e,t)}}function Ie(e,r,t){{var a=M.ReactDebugCurrentFrame,u=a.getStackAddendum();u!==""&&(r+="%s",t=t.concat([u]));var f=t.map(function(l){return String(l)});f.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,f)}}var De=!1,Fe=!1,Me=!1,$e=!1,We=!1,oe;oe=Symbol.for("react.module.reference");function Ve(e){return!!(typeof e=="string"||typeof e=="function"||e===s||e===j||We||e===m||e===x||e===b||$e||e===T||De||Fe||Me||typeof e=="object"&&e!==null&&(e.$$typeof===y||e.$$typeof===w||e.$$typeof===S||e.$$typeof===R||e.$$typeof===p||e.$$typeof===oe||e.getModuleId!==void 0))}function Be(e,r,t){var a=e.displayName;if(a)return a;var u=r.displayName||r.name||"";return u!==""?t+"("+u+")":t}function ie(e){return e.displayName||"Context"}function I(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case s:return"Fragment";case c:return"Portal";case j:return"Profiler";case m:return"StrictMode";case x:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case R:var r=e;return ie(r)+".Consumer";case S:var t=e;return ie(t._context)+".Provider";case p:return Be(e,e.render,"ForwardRef");case w:var a=e.displayName||null;return a!==null?a:I(e.type)||"Memo";case y:{var u=e,f=u._payload,l=u._init;try{return I(l(f))}catch{return null}}}return null}var D=Object.assign,V=0,se,le,ue,ce,fe,de,ve;function pe(){}pe.__reactDisabledLog=!0;function Le(){{if(V===0){se=console.log,le=console.info,ue=console.warn,ce=console.error,fe=console.group,de=console.groupCollapsed,ve=console.groupEnd;var e={configurable:!0,enumerable:!0,value:pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}V++}}function Ye(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:se}),info:D({},e,{value:le}),warn:D({},e,{value:ue}),error:D({},e,{value:ce}),group:D({},e,{value:fe}),groupCollapsed:D({},e,{value:de}),groupEnd:D({},e,{value:ve})})}V<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=M.ReactCurrentDispatcher,X;function N(e,r,t){{if(X===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);X=a&&a[1]||""}return`
|
18
|
+
`+X+e}}var H=!1,q;{var Ue=typeof WeakMap=="function"?WeakMap:Map;q=new Ue}function he(e,r){if(!e||H)return"";{var t=q.get(e);if(t!==void 0)return t}var a;H=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var f;f=G.current,G.current=null,Le();try{if(r){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(C){a=C}Reflect.construct(e,[],l)}else{try{l.call()}catch(C){a=C}e.call(l.prototype)}}else{try{throw Error()}catch(C){a=C}e()}}catch(C){if(C&&a&&typeof C.stack=="string"){for(var i=C.stack.split(`
|
19
19
|
`),_=a.stack.split(`
|
20
20
|
`),h=i.length-1,g=_.length-1;h>=1&&g>=0&&i[h]!==_[g];)g--;for(;h>=1&&g>=0;h--,g--)if(i[h]!==_[g]){if(h!==1||g!==1)do if(h--,g--,g<0||i[h]!==_[g]){var P=`
|
21
|
-
`+i[h].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&q.set(e,P),P}while(h>=1&&g>=0);break}}}finally{H=!1,G.current=f,Ye(),Error.prepareStackTrace=u}var W=e?e.displayName||e.name:"",F=W?
|
21
|
+
`+i[h].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&q.set(e,P),P}while(h>=1&&g>=0);break}}}finally{H=!1,G.current=f,Ye(),Error.prepareStackTrace=u}var W=e?e.displayName||e.name:"",F=W?N(W):"";return typeof e=="function"&&q.set(e,F),F}function Ne(e,r,t){return he(e,!1)}function qe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function z(e,r,t){if(e==null)return"";if(typeof e=="function")return he(e,qe(e));if(typeof e=="string")return N(e);switch(e){case x:return N("Suspense");case b:return N("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return Ne(e.render);case w:return z(e.type,r,t);case y:{var a=e,u=a._payload,f=a._init;try{return z(f(u),r,t)}catch{}}}return""}var B=Object.prototype.hasOwnProperty,ge={},ye=M.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=z(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}function ze(e,r,t,a,u){{var f=Function.call.bind(B);for(var l in e)if(f(e,l)){var i=void 0;try{if(typeof e[l]!="function"){var _=Error((a||"React class")+": "+t+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}i=e[l](r,l,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(h){i=h}i&&!(i instanceof Error)&&(J(u),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,l,typeof i),J(null)),i instanceof Error&&!(i.message in ge)&&(ge[i.message]=!0,J(u),E("Failed %s type: %s",t,i.message),J(null))}}}var Je=Array.isArray;function Z(e){return Je(e)}function Ke(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ge(e){try{return be(e),!1}catch{return!0}}function be(e){return""+e}function me(e){if(Ge(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ke(e)),be(e)}var L=M.ReactCurrentOwner,Xe={key:!0,ref:!0,__self:!0,__source:!0},xe,Re,Q;Q={};function He(e){if(B.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ze(e){if(B.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Qe(e,r){if(typeof e.ref=="string"&&L.current&&r&&L.current.stateNode!==r){var t=I(L.current.type);Q[t]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I(L.current.type),e.ref),Q[t]=!0)}}function er(e,r){{var t=function(){xe||(xe=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function rr(e,r){{var t=function(){Re||(Re=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var tr=function(e,r,t,a,u,f,l){var i={$$typeof:o,type:e,key:r,ref:t,props:l,_owner:f};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function nr(e,r,t,a,u){{var f,l={},i=null,_=null;t!==void 0&&(me(t),i=""+t),Ze(r)&&(me(r.key),i=""+r.key),He(r)&&(_=r.ref,Qe(r,u));for(f in r)B.call(r,f)&&!Xe.hasOwnProperty(f)&&(l[f]=r[f]);if(e&&e.defaultProps){var h=e.defaultProps;for(f in h)l[f]===void 0&&(l[f]=h[f])}if(i||_){var g=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&er(l,g),_&&rr(l,g)}return tr(e,i,_,u,a,L.current,l)}}var ee=M.ReactCurrentOwner,Ee=M.ReactDebugCurrentFrame;function $(e){if(e){var r=e._owner,t=z(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function _e(){{if(ee.current){var e=I(ee.current.type);if(e)return`
|
22
22
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function ar(e){{
|
23
|
+
Check the render method of \``+e+"`."}return""}}function ar(e){return""}var Te={};function or(e){{var r=_e();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
24
24
|
|
25
|
-
Check
|
26
|
-
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=or(r);if(Te[t])return;Te[t]=!0;var a="";e&&e._owner&&e._owner!==ee.current&&(a=" It was passed a child from "+I(e._owner.type)+"."),$(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),$(null)}}function je(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t<e.length;t++){var a=e[t];te(a)&&Ce(a,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var u=K(e);if(typeof u=="function"&&u!==e.entries)for(var f=u.call(e),l;!(l=f.next()).done;)te(l.value)&&Ce(l.value,r)}}}function ir(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===p||r.$$typeof===w))t=r.propTypes;else return;if(t){var a=I(r);ze(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var u=I(r);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){$(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),$(null);break}}e.ref!==null&&($(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),$(null))}}var Se={};function we(e,r,t,a,u,f){{var l=Ve(e);if(!l){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var _=ar(u);_?i+=_:i+=_e();var h;e===null?h="null":Z(e)?h="array":e!==void 0&&e.$$typeof===o?(h="<"+(I(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):h=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",h,i)}var g=nr(e,r,t,u,f);if(g==null)return g;if(l){var P=r.children;if(P!==void 0)if(a)if(Z(P)){for(var W=0;W<P.length;W++)je(P[W],e);Object.freeze&&Object.freeze(P)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else je(P,e)}if(B.call(r,"key")){var F=I(e),C=Object.keys(r).filter(function(vr){return vr!=="key"}),ne=C.length>0?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}";if(!Se[F+ne]){var dr=C.length>0?"{"+C.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
|
25
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=or(r);if(Te[t])return;Te[t]=!0;var a="";e&&e._owner&&e._owner!==ee.current&&(a=" It was passed a child from "+I(e._owner.type)+"."),$(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),$(null)}}function je(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t<e.length;t++){var a=e[t];te(a)&&Ce(a,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var u=K(e);if(typeof u=="function"&&u!==e.entries)for(var f=u.call(e),l;!(l=f.next()).done;)te(l.value)&&Ce(l.value,r)}}}function ir(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===p||r.$$typeof===w))t=r.propTypes;else return;if(t){var a=I(r);ze(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var u=I(r);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){$(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),$(null);break}}e.ref!==null&&($(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),$(null))}}var Se={};function we(e,r,t,a,u,f){{var l=Ve(e);if(!l){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var _=ar();_?i+=_:i+=_e();var h;e===null?h="null":Z(e)?h="array":e!==void 0&&e.$$typeof===o?(h="<"+(I(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):h=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",h,i)}var g=nr(e,r,t,u,f);if(g==null)return g;if(l){var P=r.children;if(P!==void 0)if(a)if(Z(P)){for(var W=0;W<P.length;W++)je(P[W],e);Object.freeze&&Object.freeze(P)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else je(P,e)}if(B.call(r,"key")){var F=I(e),C=Object.keys(r).filter(function(vr){return vr!=="key"}),ne=C.length>0?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}";if(!Se[F+ne]){var dr=C.length>0?"{"+C.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
|
28
26
|
let props = %s;
|
29
27
|
<%s {...props} />
|
30
28
|
React keys must be passed directly to JSX without using spread:
|
31
29
|
let props = %s;
|
32
|
-
<%s key={someKey} {...props} />`,ne,F,dr,F),Se[F+ne]=!0}}return e===s?sr(g):ir(g),g}}function lr(e,r,t){return we(e,r,t,!0)}function ur(e,r,t){return we(e,r,t,!1)}var cr=ur,fr=lr;
|
30
|
+
<%s key={someKey} {...props} />`,ne,F,dr,F),Se[F+ne]=!0}}return e===s?sr(g):ir(g),g}}function lr(e,r,t){return we(e,r,t,!0)}function ur(e,r,t){return we(e,r,t,!1)}var cr=ur,fr=lr;U.Fragment=s,U.jsx=cr,U.jsxs=fr}()),U}process.env.NODE_ENV==="production"?ae.exports=pr():ae.exports=hr();var d=ae.exports;const gr={box:{marginLeft:({spacing:n})=>n(1)}};function yr({items:n,itemsToShow:o=10,label:c,ListProps:s,texts:{showMore:m="View all",showLess:j="Collapse list"}={},unit:S,formatter:R,onRowClick:p}){const[x,b]=k.useState(!0),w=()=>{b(!x)},y=O=>R?R(O):O,T=k.useMemo(()=>{const O=x?o:n.length;return n.slice(0,O)},[n,o,x]),A=n.length>o;return d.jsxs(v.Box,{width:"100%",height:"auto",children:[c&&d.jsx(v.Typography,{variant:"caption",color:"textSecondary",gutterBottom:!0,children:c}),d.jsx(v.List,{...s,component:"ul",children:T.map(O=>d.jsxs(v.ListItemButton,{divider:!0,onClick:K=>p?.(K,O),children:[d.jsx(v.ListItemText,{primary:O.name}),d.jsx(br,{value:y(O.value),unit:S})]},O.id))}),A&&d.jsx(v.Button,{variant:"text",color:"primary",size:"small",onClick:w,children:x?m:j})]})}function br({value:n,unit:o}){return d.jsx(v.Box,{sx:gr.box,children:d.jsxs(v.Typography,{variant:"body2",align:"right",noWrap:!0,children:[o," ",n]})})}const mr={contentBox:{paddingBottom:2,paddingX:2}},xr=v.styled(v.Box,{shouldForwardProp:n=>n!=="scrollMarginTop"})(({scrollMarginTop:n})=>({height:"auto",scrollMarginTop:n,width:"100%"})),Rr=v.styled(v.Box,{shouldForwardProp:n=>n!=="scrollMarginTop"})(({scrollMarginTop:n,theme:{spacing:o,palette:c}})=>({alignItems:"center",backgroundColor:c.grey[100],display:"flex",height:o(3),justifyContent:"center",position:"sticky",top:n,width:"100%",zIndex:1}));function Er({title:n,id:o,anchor:c=!1,scrollMarginTop:s=0,children:m,BoxProps:j}){return d.jsxs(xr,{scrollMarginTop:s,id:o,"data-anchor":c,...j,children:[d.jsx(Rr,{scrollMarginTop:s,children:d.jsx(v.Typography,{variant:"caption",children:n})}),d.jsx(v.Box,{sx:mr.contentBox,children:d.jsx(d.Fragment,{children:m})})]})}const _r={tabsWrapper:{backgroundColor:({palette:n})=>n.background.paper,left:0,position:"sticky",top:0,width:"100%",zIndex:2,"& .MuiTab-root:last-of-type":{marginRight:0},"& .MuiTab-textColorPrimary":{color:({palette:n})=>n.text.primary,"&.Mui-selected":{color:({palette:n})=>n.primary.main}},"& .MuiTabs-indicator.colorPrimary":{backgroundColor:({palette:n})=>n.primary.main}}};function Tr({children:n,anchor:o,TabsProps:c,variant:s="standard",onChange:m}){const j=(S,R)=>{S.preventDefault(),m?.(R)};return d.jsx(v.Box,{sx:_r.tabsWrapper,children:d.jsx(v.Tabs,{indicatorColor:"primary",textColor:"primary","aria-label":"Explore sections",...c,value:o,variant:s,onChange:j,children:n})})}function Ae(n){var o,c,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var m=n.length;for(o=0;o<m;o++)n[o]&&(c=Ae(n[o]))&&(s&&(s+=" "),s+=c)}else for(c in n)n[c]&&(s&&(s+=" "),s+=c);return s}function Cr(){for(var n,o,c=0,s="",m=arguments.length;c<m;c++)(n=arguments[c])&&(o=Ae(n))&&(s&&(s+=" "),s+=o);return s}const jr={box:{borderRadius:({spacing:n})=>`0 0 ${n(.5)} ${n(.5)}`,flex:1,height:"100%",margin:"0 auto",maxWidth:({breakpoints:n})=>n.values.lg,overflow:"auto",position:"relative",width:"100%"}};function Sr({children:n,currentAnchor:o,BoxProps:c,className:s,timeout:m=50,onChange:j}){const S=k.useRef(null),R=k.useRef([]),p=k.useRef(0),x=k.useRef(o);k.useEffect(()=>{const y=Array.from(S.current?.querySelectorAll('[data-anchor="true"]')||[]);if(R.current=[...y].reverse(),!R.current.length)throw new Error('initialization of ScrollToAnchor: Missing sections with data-anchor="true" attribute.')},[]),k.useEffect(()=>{const y=T=>{const A=S.current?.querySelector(`#${T}`);if(!A){console.warn(`Warning: navigation of ScrollToAnchor: the section you want to navigate to does not exist. To create it add the #${T} id property to an element.`);return}if(A){A.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"});const O=setInterval(()=>{A.offsetTop===p.current&&(x.current=T,clearInterval(O))},m)}};o!==x.current&&y(o)},[o,m]);const b=k.useCallback(()=>{const T=R.current.find(A=>p.current>=A.offsetTop)?.id||"";x.current!==T&&(x.current=T,j(T))},[j]),w=k.useCallback(y=>{y.stopPropagation(),p.current=y.currentTarget.scrollTop,o===x.current&&requestAnimationFrame(()=>b())},[o,b]);return d.jsx(v.Box,{ref:S,sx:jr.box,...c,className:Cr(s),"data-scroller":!0,onScroll:y=>w(y),children:n})}const ke={container:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:({spacing:n})=>n(1)},buttonContainer:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:({spacing:n})=>n(4),width:({spacing:n})=>n(4),backgroundColor:({palette:n})=>n.background.paper,button:{borderRadius:0,".MuiTouchRipple-ripple .MuiTouchRipple-child":{borderRadius:0}}}};function wr({enable:n,onToggleButton:o,text:c,tooltip:s="Click on the map to trace the line you want to measure"}){return d.jsxs(v.Box,{sx:ke.container,children:[d.jsx(v.Paper,{sx:ke.buttonContainer,children:d.jsx(v.Tooltip,{title:s,placement:"right",children:d.jsx(v.IconButton,{size:"small",edge:!1,onClick:o,"aria-label":s,children:d.jsx(Or,{fill:n?"#036fe2":"currentColor"})})})}),n&&d.jsx(v.Chip,{color:"secondary",size:"small",onDelete:o,label:c})]})}function Or(n){return d.jsx("svg",{className:"doNotFillIcon",xmlns:"http://www.w3.org/2000/svg",width:18,height:18,...n,children:d.jsx("path",{d:"M3 13.5c-.413 0-.766-.147-1.06-.44A1.445 1.445 0 0 1 1.5 12V6c0-.412.147-.766.44-1.06.294-.293.647-.44 1.06-.44h12c.412 0 .766.147 1.06.44.293.294.44.647.44 1.06v6c0 .412-.147.766-.44 1.06-.294.293-.647.44-1.06.44H3ZM3 12h12V6h-2.25v3h-1.5V6h-1.5v3h-1.5V6h-1.5v3h-1.5V6H3v6Z"})})}function Pr(n){return n.map(o=>{const c=o,s=String(o);return{value:c,label:s}})}exports.ListData=yr;exports.MapMeasureToolUI=wr;exports.ScrollToAnchor=Sr;exports.SectionContainer=Er;exports.TabsToAnchor=Tr;exports.createSelectOptionsFromArray=Pr;
|
package/dist/index.js
CHANGED
@@ -66,10 +66,10 @@ function kr() {
|
|
66
66
|
f.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, f);
|
67
67
|
}
|
68
68
|
}
|
69
|
-
var Ve = !1, Le = !1, Ye = !1, Be = !1,
|
69
|
+
var Ve = !1, Le = !1, Ye = !1, Be = !1, Ue = !1, ie;
|
70
70
|
ie = Symbol.for("react.module.reference");
|
71
|
-
function
|
72
|
-
return !!(typeof e == "string" || typeof e == "function" || e === s || e === C ||
|
71
|
+
function Ne(e) {
|
72
|
+
return !!(typeof e == "string" || typeof e == "function" || e === s || e === C || Ue || e === b || e === m || e === y || Be || e === _ || Ve || Le || Ye || typeof e == "object" && e !== null && (e.$$typeof === g || e.$$typeof === w || e.$$typeof === j || e.$$typeof === R || e.$$typeof === v || // This needs to include all possible module reference object
|
73
73
|
// types supported by any Flight configuration anywhere since
|
74
74
|
// we don't know which Flight build this will end up being used
|
75
75
|
// with.
|
@@ -193,7 +193,7 @@ function kr() {
|
|
193
193
|
}
|
194
194
|
}
|
195
195
|
var G = A.ReactCurrentDispatcher, X;
|
196
|
-
function
|
196
|
+
function U(e, r, t) {
|
197
197
|
{
|
198
198
|
if (X === void 0)
|
199
199
|
try {
|
@@ -206,16 +206,16 @@ function kr() {
|
|
206
206
|
` + X + e;
|
207
207
|
}
|
208
208
|
}
|
209
|
-
var H = !1,
|
209
|
+
var H = !1, N;
|
210
210
|
{
|
211
211
|
var Ke = typeof WeakMap == "function" ? WeakMap : Map;
|
212
|
-
|
212
|
+
N = new Ke();
|
213
213
|
}
|
214
214
|
function ge(e, r) {
|
215
215
|
if (!e || H)
|
216
216
|
return "";
|
217
217
|
{
|
218
|
-
var t =
|
218
|
+
var t = N.get(e);
|
219
219
|
if (t !== void 0)
|
220
220
|
return t;
|
221
221
|
}
|
@@ -270,7 +270,7 @@ function kr() {
|
|
270
270
|
if (p--, h--, h < 0 || i[p] !== E[h]) {
|
271
271
|
var O = `
|
272
272
|
` + i[p].replace(" at new ", " at ");
|
273
|
-
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
273
|
+
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && N.set(e, O), O;
|
274
274
|
}
|
275
275
|
while (p >= 1 && h >= 0);
|
276
276
|
break;
|
@@ -279,8 +279,8 @@ function kr() {
|
|
279
279
|
} finally {
|
280
280
|
H = !1, G.current = f, Je(), Error.prepareStackTrace = u;
|
281
281
|
}
|
282
|
-
var M = e ? e.displayName || e.name : "", F = M ?
|
283
|
-
return typeof e == "function" &&
|
282
|
+
var M = e ? e.displayName || e.name : "", F = M ? U(M) : "";
|
283
|
+
return typeof e == "function" && N.set(e, F), F;
|
284
284
|
}
|
285
285
|
function Ge(e, r, t) {
|
286
286
|
return ge(e, !1);
|
@@ -295,12 +295,12 @@ function kr() {
|
|
295
295
|
if (typeof e == "function")
|
296
296
|
return ge(e, Xe(e));
|
297
297
|
if (typeof e == "string")
|
298
|
-
return
|
298
|
+
return U(e);
|
299
299
|
switch (e) {
|
300
300
|
case m:
|
301
|
-
return
|
301
|
+
return U("Suspense");
|
302
302
|
case y:
|
303
|
-
return
|
303
|
+
return U("SuspenseList");
|
304
304
|
}
|
305
305
|
if (typeof e == "object")
|
306
306
|
switch (e.$$typeof) {
|
@@ -493,15 +493,7 @@ Check the render method of \`` + e + "`.";
|
|
493
493
|
}
|
494
494
|
}
|
495
495
|
function ur(e) {
|
496
|
-
|
497
|
-
if (e !== void 0) {
|
498
|
-
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
|
499
|
-
return `
|
500
|
-
|
501
|
-
Check your code at ` + r + ":" + t + ".";
|
502
|
-
}
|
503
|
-
return "";
|
504
|
-
}
|
496
|
+
return "";
|
505
497
|
}
|
506
498
|
var Ce = {};
|
507
499
|
function cr(e) {
|
@@ -588,11 +580,11 @@ Check the top-level render call using <` + t + ">.");
|
|
588
580
|
var Se = {};
|
589
581
|
function Oe(e, r, t, a, u, f) {
|
590
582
|
{
|
591
|
-
var l =
|
583
|
+
var l = Ne(e);
|
592
584
|
if (!l) {
|
593
585
|
var i = "";
|
594
586
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
595
|
-
var E = ur(
|
587
|
+
var E = ur();
|
596
588
|
E ? i += E : i += Te();
|
597
589
|
var p;
|
598
590
|
e === null ? p = "null" : Z(e) ? p = "array" : e !== void 0 && e.$$typeof === o ? (p = "<" + (k(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : p = typeof e, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", p, i);
|
@@ -647,7 +639,7 @@ const Ir = {
|
|
647
639
|
marginLeft: ({ spacing: n }) => n(1)
|
648
640
|
}
|
649
641
|
};
|
650
|
-
function
|
642
|
+
function Ur({
|
651
643
|
items: n,
|
652
644
|
itemsToShow: o = 10,
|
653
645
|
label: c,
|
@@ -723,7 +715,7 @@ const Fr = {
|
|
723
715
|
width: "100%",
|
724
716
|
zIndex: 1
|
725
717
|
}));
|
726
|
-
function
|
718
|
+
function Nr({
|
727
719
|
title: n,
|
728
720
|
id: o,
|
729
721
|
anchor: c = !1,
|
@@ -955,10 +947,10 @@ function Kr(n) {
|
|
955
947
|
});
|
956
948
|
}
|
957
949
|
export {
|
958
|
-
|
950
|
+
Ur as ListData,
|
959
951
|
Jr as MapMeasureToolUI,
|
960
952
|
zr as ScrollToAnchor,
|
961
|
-
|
953
|
+
Nr as SectionContainer,
|
962
954
|
qr as TabsToAnchor,
|
963
955
|
Kr as createSelectOptionsFromArray
|
964
956
|
};
|