UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 1.8 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import has from"./has.js";const e=new WeakMap;function n(n,t,r=!1){const o=`🛑 DEPRECATED - ${t}`;if(!r)return void n.warn(o);let i=e.get(n);i||(i=new Set,e.set(n,i)),i.has(t)||(i.add(t),n.warn(o))}const t="https://www.esriurl.com/";function r(e,n,r,o={}){has("esri-deprecation-warnings")&&p(e,`This widget is deprecated. Use the ${n} component instead.`,{see:[`${n} component reference: ${t}${r}/`,`Esri's move to web components: ${t}components-transition-plan/`],replacement:`<${r}></${r}>`,warnOnce:!0,...o})}function o(e,n,t={}){has("esri-deprecation-warnings")&&p(e,`Module: ${n}`,t)}function i(e,n,t={}){if(has("esri-deprecation-warnings")){const{moduleName:r}=t;p(e,`Function: ${(r?r+"::":"")+n+"()"}`,t)}}function s(e,n,t={}){if(has("esri-deprecation-warnings")){const{moduleName:r}=t;p(e,`Property: ${(r?r+"::":"")+n}`,t)}}function a(e,n,t,r={}){if(has("esri-deprecation-warnings")){const{moduleName:o}=r;p(e,`'${(o?o+"::":"")+n}' value: ${t}`,r)}}function c(e,n,t={}){has("esri-deprecation-warnings")&&p(e,`Multiple argument constructor: ${n}`,{warnOnce:!0,replacement:`new ${n}({ <your properties here> })`,...t})}function p(e,t,r={}){if(has("esri-deprecation-warnings")){const{replacement:o,version:i,see:s,warnOnce:a}=r;let c=t;if(o&&(c+=`\n\t🛠️ Replacement: ${o}`),i&&(c+=`\n\t⚙️ Version: ${i}`),s)if(Array.isArray(s)){c+="\n\t🔗 See for more details:";for(const e of s)c+=`\n\t\t${e}`}else c+=`\n\t🔗 See ${s} for more details.`;n(e,c,a)}}export{r as deprecateWidget,p as deprecated,c as deprecatedConstructorSignature,i as deprecatedFunction,o as deprecatedModule,s as deprecatedProperty,a as deprecatedPropertyValue};