@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.55 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
*/
import{isSome as t}from"../../../core/arrayUtils.js";import{loadCalciteComponents as o}from"../../support/componentsUtils.js";import"../../support/widgetUtils.js";import{tsx as i}from"../../support/jsxFactory.js";const e={base:"esri-editor__actions"},n=()=>o({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),"split-button":()=>import("@esri/calcite-components/dist/components/calcite-split-button"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item")});function c({buttons:o,key:n}){return i("div",{class:e.base,key:n??"footer-actions",slot:"footer"},o.filter(t).map(((t,o)=>"split-button"===t.type?l(t,o):s(t,o))))}const s=({disabled:t,onClick:o,label:e,key:n,...c},s)=>i("calcite-button",{disabled:t??!1,key:n??`action-${s}`,onclick:o,width:"full",...c},e),l=({disabled:o,onClick:e,key:n,dropdownItems:c,...s},l)=>i("calcite-split-button",{disabled:o??!1,key:n??`split-action-${l}`,width:"full",onCalciteSplitButtonPrimaryClick:e,...s},i("calcite-dropdown-group",{selectionMode:"none"},c.filter(t).map(p))),p=({disabled:t,onClick:o,label:e,key:n,...c},s)=>i("calcite-dropdown-item",{disabled:t??!1,key:n??`dropdown-item-${s}`,onCalciteDropdownItemSelect:o,...c},e);export{c as FooterActions,e as css,n as loadFooterActionsComponents};