UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 1.28 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{ElementTemplateBase as s}from"./ElementTemplateBase.js";let i=class extends s{constructor(e){super(e),this.initialState="expanded",this.type="group"}initialize(){for(const e of this.elements)e.group=this}foldIn(e){const{elements:o}=this,r=e.elements;if(o.length!==r.length)throw new t("unable-to-fold-in","Unable to fold in the given GroupElementTemplate because it has a different number of child elements");for(const t of e.layers){this.addLayer(t,e.getExpressionExecutorsForLayer(t));for(let e=0;e<o.length;e++)o.at(e).foldIn(r.at(e))}}};e([o()],i.prototype,"initialState",void 0),e([o({constructOnly:!0})],i.prototype,"elements",void 0),e([o()],i.prototype,"type",void 0),i=e([r("esri.widgets.BatchAttributeForm.templates.GroupElementTemplate")],i);export{i as GroupElementTemplate};