UNPKG

@arcgis/core

Version:

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

3 lines (2 loc) 1.85 kB
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */ import{PanelContentSection as e}from"./PanelContent.js";import{loadCalciteComponents as s}from"../../support/componentsUtils.js";import{iconByKind as t}from"../../support/iconUtils.js";import{tsx as o,tsxFragment as i}from"../../support/widget.js";const n={notice:"esri-editor__notice",noticesPanelSection:"esri-editor__notices-panel-section"},r=()=>s({notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")});function c({activeFeatureCount:s,workflow:t,messages:r}){const c=[],l="content-start";if(t?.reliesOnOwnerAdminPrivileges){const e=r.ownerAdminNotice;c.push(o(a,{key:"owner-admin-notice",message:e,slot:l}))}if(t?.hasInvalidFormTemplate){const e=s>1?r.multiFeature.formFieldUpdateError:r.singleFeature.formFieldUpdateError;c.push(o(a,{key:"form-field-error",kind:"warning",message:e,slot:l}))}if("create-features"===t?.type){const e=r.helpMessages3d;switch(t.data.upload?.result?.type){case"georeferenced-reprojected":c.push(o(a,{key:"mesh-reprojected",kind:"warning",message:e.meshReprojected,slot:l}));break;case"georeferenced":c.push(o(a,{key:"mesh-georeferenced",kind:"info",message:e.meshGeoreferenced,slot:l}))}}if(t?.curveUpdatesDisabled){const e=r.curveGeometryUpdatesDisabled;c.push(o(a,{key:"curve-updates-disabled",kind:"warning",message:e,slot:l}))}else if(t?.curveResizeDisabled){const e=r.curveGeometryResizeDisabled;c.push(o(a,{key:"curve-resize-disabled",kind:"warning",message:e,slot:l}))}return 0===c.length?o(i,null,void 0):o(e,{class:n.noticesPanelSection},c)}function a(e){const s=e.kind??"brand";return o("calcite-notice",{class:n.notice,icon:t[s],key:e.key,kind:s,open:!0,scale:"s"},e.title?o("div",{slot:"title"},e.title):null,o("div",{slot:"message"},e.message))}export{a as Notice,c as Notices,n as css,r as loadNoticesComponents};