@arcgis/core 4.29.2 → 4.29.3

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.
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.29/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import o from"../core/Logger.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import{getActionIcon as l,getActionStyles as a}from"../support/actions/actionUtils.js";import r from"./Widget.js";import{minDragEnabledItems as c,minFilterItems as d,getLayerType as m,sortableRoot as p}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as u}from"./support/componentsUtils.js";import{globalCss as h}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as g}from"./support/decorators/messageBundle.js";import{vmEvent as b}from"./support/decorators/vmEvent.js";import{tsx as f}from"./support/jsxFactory.js";import{css as _}from"./TableList/css.js";import I from"./TableList/ListItem.js";import v from"./TableList/TableListViewModel.js";import y from"./TableList/TableListVisibleElements.js";import{getItem as w,sortTablesToIds as E}from"./TableList/support/tableListUtils.js";const C=t.ofType(I),F="table";let L=class extends r{constructor(e,t){super(e,t),this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.icon=null,this.iconClass=_.widgetIcon,this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.messages=null,this.messagesCommon=null,this.minDragEnabledItems=c,this.minFilterItems=d,this.selectedItems=new C,this.selectionMode="none",this.viewModel=new v,this.visibleElements=new y,this._canMove=({dragEl:e,fromEl:t,toEl:i},o)=>{const s="pull"===o?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,n=w(e);if(!n?.sortable)return!1;const l=w(t),a=m(t),r=w(i),c=m(i),d=!!a&&!!c&&a===c,p={selected:n,from:l,to:r};return t.group&&i.group&&"function"==typeof s?s.call(null,p):d},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:o,dragEl:s,newIndex:n}=e;if(!o||!i||t?.newIndex===n&&t?.dragEl===s&&t?.toEl===i&&t?.fromEl===o)return;this._lastDragDetail=e;const l=Array.from(o.children).filter((e=>e?.matches("calcite-list-item"))).map((e=>e.value));E(this.map?.tables,l)}}loadDependencies(){return u({action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group.js"),"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu.js"),button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow.js"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js")})}get _dragEnabled(){return this.viewModel.totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this.viewModel.totalItems>=this.minFilterItems&&this.visibleElements.filter}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get listItemCreatedFunction(){return this.viewModel.listItemCreatedFunction}set listItemCreatedFunction(e){this.viewModel.listItemCreatedFunction=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get multipleSelectionEnabled(){return i(o.getLogger(this),"multipleSelectionEnabled",{replacement:"selectionMode",version:"4.29",warnOnce:!0}),"multiple"===this.selectionMode}set multipleSelectionEnabled(e){i(o.getLogger(this),"multipleSelectionEnabled",{replacement:"selectionMode",version:"4.29",warnOnce:!0}),this.selectionMode=e?"multiple":this.selectionEnabled?"single":"none"}get selectionEnabled(){return i(o.getLogger(this),"selectionEnabled",{replacement:"selectionMode, dragEnabled",version:"4.29",warnOnce:!0}),"none"!==this.selectionMode&&this.dragEnabled}set selectionEnabled(e){i(o.getLogger(this),"selectionEnabled",{replacement:"selectionMode, dragEnabled",version:"4.29",warnOnce:!0}),this.dragEnabled=e,this.selectionMode=e?this.multipleSelectionEnabled?"multiple":"single":"none"}get tableItems(){return this.viewModel.tableItems}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const e=this.viewModel?.state,t={[h.hidden]:"loading"===e,[h.disabled]:"disabled"===e},i=this.tableItems?.filter((e=>!e.hidden&&(this.visibleElements.errors||!e.error)));return f("div",{class:this.classes(_.base,h.widget,h.panel,t)},i?.length?this._renderItems(i):this._renderNoItems())}_renderNoItemsMessage(){return f("div",{slot:"message"},this.messages.noItemsToDisplay)}_renderNoItems(){return f("div",{class:_.itemMessage,key:"esri-layer-list__no-items"},f("calcite-notice",{icon:"information",kind:"info",open:!0,scale:"m",width:"full"},this._renderNoItemsMessage()))}_renderPanelFlowItems(e){return e?.toArray().filter((({panel:e})=>e?.open&&!e.disabled&&e.flowEnabled)).map((({title:e,panel:t})=>{const i=()=>this._handlePanelFlowItemBack(t);return f("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:e,heading:t.title,headingLevel:this.headingLevel,key:`flow-panel-${t.uid}`,onCalciteFlowItemBack:e=>{e.preventDefault(),i()}},t.render(),f("calcite-button",{appearance:"transparent",onclick:i,slot:"footer-actions",width:"full"},this.messagesCommon.back))}))}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,requestAnimationFrame((()=>e?.setFocus())))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,requestAnimationFrame((()=>e?.setFocus())))}_renderItems(e){const{visible:t,collapsed:i,visibleElements:{closeButton:o,collapseButton:s,heading:n,flow:l},_dragEnabled:a,_filterEnabled:r,selectionMode:c,messages:d,filterPlaceholder:m,filterText:u}=this,h=[f("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:o,closed:!t,collapsed:i,collapsible:s,heading:n?d.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",onCalciteFlowItemClose:()=>this.visible=!1},f("calcite-list",{canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),"data-layer-type":F,dragEnabled:a,filterEnabled:r,filterPlaceholder:m,filterText:u,group:p,key:"root-list",label:d.widgetLabel,selectionAppearance:"border",selectionMode:c,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.target?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},e?.toArray().map((e=>this._renderItem(e))),e?.length&&r?f("div",{class:_.filterNoResults,slot:"filter-no-results"},f("calcite-notice",{kind:"info",open:!0,scale:"m",width:"full"},this._renderNoItemsMessage())):null)),this._renderPanelFlowItems(e)];return t?l?f("calcite-flow",{key:"root-flow"},h):h:null}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:o}=e;t.insertBefore(i,t.children[o])}_renderItemMessage(e){return e.error?f("div",{class:_.itemMessage,key:"esri-layer-list__error",slot:"content-bottom"},f("calcite-notice",{icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",width:"full"},f("div",{slot:"message"},this.messages.tableError))):null}_renderItem(e){const{_selectedDragItemLayerUid:t,selectionMode:i,selectedItems:o,messages:s}=this,n=e.title||s.untitledTable,l=this._filterActions(e.actionsSections),a=this._countActions(l);return f("calcite-list-item",{afterCreate:t=>this._focusSelectedDragEl(t,e),afterUpdate:t=>this._focusSelectedDragEl(t,e),class:_.item,"data-item":e,dragDisabled:!e.sortable,dragSelected:e.layer.uid===t,id:e.layer?.uid,key:`list-item-${e.layer.uid}`,label:n,metadata:{title:n},selected:"none"!==i&&o.includes(e),title:n,value:e.layer?.uid,onCalciteListItemDragHandleChange:t=>this._handleCalciteListItemDragHandleChange(t,e)},f("div",{class:_.itemContent,slot:"content"},n),this._renderItemStatus(e),this._renderItemTemporaryIcon(e),this._renderItemMessage(e),this._renderPanel(e.panel),this._renderPanelAction(e.panel),a>1?this._renderActionsSections(e,l):1===a?this._renderAction({item:e,action:this._getSingleActionButton(l),textEnabled:!1}):null)}_renderItemTemporaryIcon(e){return this.visibleElements.temporaryTableIndicators&&!e.layer.persistenceEnabled?f("calcite-icon",{class:_.itemTemporaryIcon,icon:"temporary",key:"temporary-icon",scale:"s",slot:"actions-start",title:this.messages.temporary}):null}_renderItemStatus(e){const{visibleElements:t}=this;if(!t.statusIndicators)return null;const{publishing:i}=e;return f("calcite-icon",{class:this.classes({[_.statusIndicator]:!0,[_.publishing]:i}),icon:"stop-square",key:"layer-item-status",scale:"s",slot:"actions-end"})}_renderPanel(e){return!e?.open||e.disabled||e.flowEnabled?null:f("div",{class:_.itemContentBottom,key:`content-panel-${e.uid}`,slot:"content-bottom"},e.render())}_renderPanelAction(e){if(!e?.visible)return null;const{open:t,title:i,disabled:o}=e;return f("calcite-action",{active:t,appearance:"transparent",disabled:o,icon:l(e),key:`action-${e.uid}`,onclick:()=>this._togglePanel(e),scale:"s",slot:"actions-end",text:i??"",title:i??void 0},this._renderFallbackIcon(e))}_renderActionsSections(e,t){return f("calcite-action-menu",{appearance:"transparent",key:"item-action-menu",label:this.messagesCommon.menu,open:e.actionsOpen,overlayPositioning:"fixed",placement:"bottom-end",scale:"s",slot:"actions-end",onCalciteActionMenuOpen:t=>e.actionsOpen=t.target.open},f("calcite-action",{appearance:"transparent",icon:"ellipsis",scale:"s",slot:"trigger",text:this.messagesCommon.options,title:this.messagesCommon.options}),t.toArray().map(((t,i)=>this._renderActionSection(e,t,i))))}_renderActionSection(e,t,i){return f("calcite-action-group",{key:`action-section-${i}`},t.toArray().map((t=>this._renderAction({item:e,action:t,textEnabled:!0}))))}_renderFallbackIcon(e){const{className:t,icon:i}=e;if(i)return null;const o="image"in e?e.image:void 0,s={[_.itemActionIcon]:!!t,[_.itemActionImage]:!!o};return t&&(s[t]=!0),o||t?f("span",{"aria-hidden":"true",class:this.classes(_.itemActionIcon,s),key:"icon",styles:a(o)}):null}_renderAction(e){const{item:t,action:i,textEnabled:o}=e,{active:s,disabled:n,title:a,type:r,indicator:c}=i;return f("calcite-action",{active:"toggle"===r&&i.value,appearance:"transparent",disabled:n,icon:l(i),indicator:c,key:`action-${i.uid}`,loading:s,onclick:()=>this._triggerAction(t,i),scale:"s",slot:o?void 0:"actions-end",text:a??"",textEnabled:o,title:a??void 0},this._renderFallbackIcon(i))}_filterActions(e){return e.map((e=>e.filter((e=>e.visible))))}_getSingleActionButton(e){return e.reduce((e=>e)).filter((e=>e&&"button"===e.type)).at(0)}_countActions(e){return e.reduce(((e,t)=>e+t.length),0)}_focusSelectedDragEl(e,t){this._selectedDragItemLayerUid===t.layer.uid&&requestAnimationFrame((()=>e?.setFocus()))}_handleCalciteListItemDragHandleChange(e,t){e.stopPropagation();const i=e.target.dragSelected;this._selectedDragItemLayerUid=i?t.layer.uid:null}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const o=e.target.selectedItems.map((e=>w(e))).filter(Boolean);i.removeAll(),i.addMany(o)}_togglePanel(e){e.open=!e.open,e.open&&(this._focusPanelFlowItem=!0)}_triggerAction(e,t){t&&e&&("toggle"===t.type&&(t.value=!t.value),this.triggerAction(t,e))}};e([s()],L.prototype,"_focusRootFlowItem",void 0),e([s()],L.prototype,"_focusPanelFlowItem",void 0),e([s()],L.prototype,"_dragEnabled",null),e([s()],L.prototype,"_filterEnabled",null),e([s()],L.prototype,"collapsed",void 0),e([s()],L.prototype,"dragEnabled",void 0),e([s()],L.prototype,"filterPlaceholder",void 0),e([s()],L.prototype,"filterText",void 0),e([s()],L.prototype,"headingLevel",void 0),e([s()],L.prototype,"icon",void 0),e([s()],L.prototype,"iconClass",void 0),e([s()],L.prototype,"label",null),e([s()],L.prototype,"listItemCanGiveFunction",void 0),e([s()],L.prototype,"listItemCanReceiveFunction",void 0),e([s()],L.prototype,"listItemCreatedFunction",null),e([s()],L.prototype,"map",null),e([s(),g("esri/widgets/TableList/t9n/TableList")],L.prototype,"messages",void 0),e([s(),g("esri/t9n/common")],L.prototype,"messagesCommon",void 0),e([s()],L.prototype,"minDragEnabledItems",void 0),e([s()],L.prototype,"minFilterItems",void 0),e([s()],L.prototype,"multipleSelectionEnabled",null),e([s()],L.prototype,"selectionEnabled",null),e([s()],L.prototype,"selectedItems",void 0),e([s()],L.prototype,"selectionMode",void 0),e([s({readOnly:!0})],L.prototype,"tableItems",null),e([b("trigger-action"),s({type:v})],L.prototype,"viewModel",void 0),e([s({type:y,nonNullable:!0})],L.prototype,"visibleElements",void 0),L=e([n("esri.widgets.TableList")],L);const M=L;export{M as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import o from"../core/Logger.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import{getActionIcon as l,getActionStyles as a}from"../support/actions/actionUtils.js";import r from"./Widget.js";import{minDragEnabledItems as c,minFilterItems as d,getLayerType as m,sortableRoot as p}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as u}from"./support/componentsUtils.js";import{globalCss as h}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as g}from"./support/decorators/messageBundle.js";import{vmEvent as b}from"./support/decorators/vmEvent.js";import{tsx as f}from"./support/jsxFactory.js";import{css as _}from"./TableList/css.js";import I from"./TableList/ListItem.js";import v from"./TableList/TableListViewModel.js";import y from"./TableList/TableListVisibleElements.js";import{getItem as w,sortTablesToIds as E}from"./TableList/support/tableListUtils.js";const C=t.ofType(I),F="table";let L=class extends r{constructor(e,t){super(e,t),this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.icon=null,this.iconClass=_.widgetIcon,this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.messages=null,this.messagesCommon=null,this.minDragEnabledItems=c,this.minFilterItems=d,this.selectedItems=new C,this.selectionMode="none",this.viewModel=new v,this.visibleElements=new y,this._canMove=({dragEl:e,fromEl:t,toEl:i},o)=>{const s="pull"===o?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,n=w(e);if(!n?.sortable)return!1;const l=w(t),a=m(t),r=w(i),c=m(i),d=!!a&&!!c&&a===c,p={selected:n,from:l,to:r};return t.group&&i.group&&"function"==typeof s?s.call(null,p):d},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:o,dragEl:s,newIndex:n}=e;if(!o||!i||t?.newIndex===n&&t?.dragEl===s&&t?.toEl===i&&t?.fromEl===o)return;this._lastDragDetail=e;const l=Array.from(o.children).filter((e=>e?.matches("calcite-list-item"))).map((e=>e.value));E(this.map?.tables,l)}}loadDependencies(){return u({action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group.js"),"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu.js"),button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow.js"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js")})}get _dragEnabled(){return this.viewModel.totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this.viewModel.totalItems>=this.minFilterItems&&this.visibleElements.filter}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get listItemCreatedFunction(){return this.viewModel.listItemCreatedFunction}set listItemCreatedFunction(e){this.viewModel.listItemCreatedFunction=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get multipleSelectionEnabled(){return i(o.getLogger(this),"multipleSelectionEnabled",{replacement:"selectionMode",version:"4.29",warnOnce:!0}),"multiple"===this.selectionMode}set multipleSelectionEnabled(e){i(o.getLogger(this),"multipleSelectionEnabled",{replacement:"selectionMode",version:"4.29",warnOnce:!0}),this.selectionMode=e?"multiple":this.selectionEnabled?"single":"none"}get selectionEnabled(){return i(o.getLogger(this),"selectionEnabled",{replacement:"selectionMode, dragEnabled",version:"4.29",warnOnce:!0}),"none"!==this.selectionMode&&this.dragEnabled}set selectionEnabled(e){i(o.getLogger(this),"selectionEnabled",{replacement:"selectionMode, dragEnabled",version:"4.29",warnOnce:!0}),this.dragEnabled=e,this.selectionMode=e?this.multipleSelectionEnabled?"multiple":"single":"none"}get tableItems(){return this.viewModel.tableItems}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const e=this.viewModel?.state,t={[h.hidden]:"loading"===e,[h.disabled]:"disabled"===e},i=this.tableItems?.filter((e=>!e.hidden&&(this.visibleElements.errors||!e.error)));return f("div",{class:this.classes(_.base,h.widget,h.panel,t)},i?.length?this._renderItems(i):this._renderNoItems())}_renderNoItemsMessage(){return f("div",{slot:"message"},this.messages.noItemsToDisplay)}_renderNoItems(){return f("div",{class:_.itemMessage,key:"esri-layer-list__no-items"},f("calcite-notice",{icon:"information",kind:"info",open:!0,scale:"m",width:"full"},this._renderNoItemsMessage()))}_renderPanelFlowItems(e){return e?.toArray().filter((({panel:e})=>e?.open&&!e.disabled&&e.flowEnabled)).map((({title:e,panel:t})=>{const i=()=>this._handlePanelFlowItemBack(t);return f("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:e,heading:t.title,headingLevel:this.headingLevel,key:`flow-panel-${t.uid}`,onCalciteFlowItemBack:e=>{e.preventDefault(),i()}},t.render(),f("calcite-button",{appearance:"transparent",onclick:i,slot:"footer-actions",width:"full"},this.messagesCommon.back))}))}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,requestAnimationFrame((()=>e?.setFocus())))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,requestAnimationFrame((()=>e?.setFocus())))}_renderItems(e){const{visible:t,collapsed:i,visibleElements:{closeButton:o,collapseButton:s,heading:n,flow:l},_dragEnabled:a,_filterEnabled:r,selectionMode:c,messages:d,filterPlaceholder:m,filterText:u}=this,h=[f("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:o,closed:!t,collapsed:i,collapsible:s,heading:n?d.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",onCalciteFlowItemClose:()=>this.visible=!1},f("calcite-list",{canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),"data-layer-type":F,dragEnabled:a,filterEnabled:r,filterPlaceholder:m,filterText:r?u:"",group:p,key:"root-list",label:d.widgetLabel,selectionAppearance:"border",selectionMode:c,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.target?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},e?.toArray().map((e=>this._renderItem(e))),e?.length&&r?f("div",{class:_.filterNoResults,slot:"filter-no-results"},f("calcite-notice",{kind:"info",open:!0,scale:"m",width:"full"},this._renderNoItemsMessage())):null)),this._renderPanelFlowItems(e)];return t?l?f("calcite-flow",{key:"root-flow"},h):h:null}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:o}=e;t.insertBefore(i,t.children[o])}_renderItemMessage(e){return e.error?f("div",{class:_.itemMessage,key:"esri-layer-list__error",slot:"content-bottom"},f("calcite-notice",{icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",width:"full"},f("div",{slot:"message"},this.messages.tableError))):null}_renderItem(e){const{_selectedDragItemLayerUid:t,selectionMode:i,selectedItems:o,messages:s}=this,n=e.title||s.untitledTable,l=this._filterActions(e.actionsSections),a=this._countActions(l);return f("calcite-list-item",{afterCreate:t=>this._focusSelectedDragEl(t,e),afterUpdate:t=>this._focusSelectedDragEl(t,e),class:_.item,"data-item":e,dragDisabled:!e.sortable,dragSelected:e.layer.uid===t,id:e.layer?.uid,key:`list-item-${e.layer.uid}`,label:n,metadata:{title:n},selected:"none"!==i&&o.includes(e),title:n,value:e.layer?.uid,onCalciteListItemDragHandleChange:t=>this._handleCalciteListItemDragHandleChange(t,e)},f("div",{class:_.itemContent,slot:"content"},n),this._renderItemStatus(e),this._renderItemTemporaryIcon(e),this._renderItemMessage(e),this._renderPanel(e.panel),this._renderPanelAction(e.panel),a>1?this._renderActionsSections(e,l):1===a?this._renderAction({item:e,action:this._getSingleActionButton(l),textEnabled:!1}):null)}_renderItemTemporaryIcon(e){return this.visibleElements.temporaryTableIndicators&&!e.layer.persistenceEnabled?f("calcite-icon",{class:_.itemTemporaryIcon,icon:"temporary",key:"temporary-icon",scale:"s",slot:"actions-start",title:this.messages.temporary}):null}_renderItemStatus(e){const{visibleElements:t}=this;if(!t.statusIndicators)return null;const{publishing:i}=e;return f("calcite-icon",{class:this.classes({[_.statusIndicator]:!0,[_.publishing]:i}),icon:"stop-square",key:"layer-item-status",scale:"s",slot:"actions-end"})}_renderPanel(e){return!e?.open||e.disabled||e.flowEnabled?null:f("div",{class:_.itemContentBottom,key:`content-panel-${e.uid}`,slot:"content-bottom"},e.render())}_renderPanelAction(e){if(!e?.visible)return null;const{open:t,title:i,disabled:o}=e;return f("calcite-action",{active:t,appearance:"transparent",disabled:o,icon:l(e),key:`action-${e.uid}`,onclick:()=>this._togglePanel(e),scale:"s",slot:"actions-end",text:i??"",title:i??void 0},this._renderFallbackIcon(e))}_renderActionsSections(e,t){return f("calcite-action-menu",{appearance:"transparent",key:"item-action-menu",label:this.messagesCommon.menu,open:e.actionsOpen,overlayPositioning:"fixed",placement:"bottom-end",scale:"s",slot:"actions-end",onCalciteActionMenuOpen:t=>e.actionsOpen=t.target.open},f("calcite-action",{appearance:"transparent",icon:"ellipsis",scale:"s",slot:"trigger",text:this.messagesCommon.options,title:this.messagesCommon.options}),t.toArray().map(((t,i)=>this._renderActionSection(e,t,i))))}_renderActionSection(e,t,i){return f("calcite-action-group",{key:`action-section-${i}`},t.toArray().map((t=>this._renderAction({item:e,action:t,textEnabled:!0}))))}_renderFallbackIcon(e){const{className:t,icon:i}=e;if(i)return null;const o="image"in e?e.image:void 0,s={[_.itemActionIcon]:!!t,[_.itemActionImage]:!!o};return t&&(s[t]=!0),o||t?f("span",{"aria-hidden":"true",class:this.classes(_.itemActionIcon,s),key:"icon",styles:a(o)}):null}_renderAction(e){const{item:t,action:i,textEnabled:o}=e,{active:s,disabled:n,title:a,type:r,indicator:c}=i;return f("calcite-action",{active:"toggle"===r&&i.value,appearance:"transparent",disabled:n,icon:l(i),indicator:c,key:`action-${i.uid}`,loading:s,onclick:()=>this._triggerAction(t,i),scale:"s",slot:o?void 0:"actions-end",text:a??"",textEnabled:o,title:a??void 0},this._renderFallbackIcon(i))}_filterActions(e){return e.map((e=>e.filter((e=>e.visible))))}_getSingleActionButton(e){return e.reduce((e=>e)).filter((e=>e&&"button"===e.type)).at(0)}_countActions(e){return e.reduce(((e,t)=>e+t.length),0)}_focusSelectedDragEl(e,t){this._selectedDragItemLayerUid===t.layer.uid&&requestAnimationFrame((()=>e?.setFocus()))}_handleCalciteListItemDragHandleChange(e,t){e.stopPropagation();const i=e.target.dragSelected;this._selectedDragItemLayerUid=i?t.layer.uid:null}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const o=e.target.selectedItems.map((e=>w(e))).filter(Boolean);i.removeAll(),i.addMany(o)}_togglePanel(e){e.open=!e.open,e.open&&(this._focusPanelFlowItem=!0)}_triggerAction(e,t){t&&e&&("toggle"===t.type&&(t.value=!t.value),this.triggerAction(t,e))}};e([s()],L.prototype,"_focusRootFlowItem",void 0),e([s()],L.prototype,"_focusPanelFlowItem",void 0),e([s()],L.prototype,"_dragEnabled",null),e([s()],L.prototype,"_filterEnabled",null),e([s()],L.prototype,"collapsed",void 0),e([s()],L.prototype,"dragEnabled",void 0),e([s()],L.prototype,"filterPlaceholder",void 0),e([s()],L.prototype,"filterText",void 0),e([s()],L.prototype,"headingLevel",void 0),e([s()],L.prototype,"icon",void 0),e([s()],L.prototype,"iconClass",void 0),e([s()],L.prototype,"label",null),e([s()],L.prototype,"listItemCanGiveFunction",void 0),e([s()],L.prototype,"listItemCanReceiveFunction",void 0),e([s()],L.prototype,"listItemCreatedFunction",null),e([s()],L.prototype,"map",null),e([s(),g("esri/widgets/TableList/t9n/TableList")],L.prototype,"messages",void 0),e([s(),g("esri/t9n/common")],L.prototype,"messagesCommon",void 0),e([s()],L.prototype,"minDragEnabledItems",void 0),e([s()],L.prototype,"minFilterItems",void 0),e([s()],L.prototype,"multipleSelectionEnabled",null),e([s()],L.prototype,"selectionEnabled",null),e([s()],L.prototype,"selectedItems",void 0),e([s()],L.prototype,"selectionMode",void 0),e([s({readOnly:!0})],L.prototype,"tableItems",null),e([b("trigger-action"),s({type:v})],L.prototype,"viewModel",void 0),e([s({type:y,nonNullable:!0})],L.prototype,"visibleElements",void 0),L=e([n("esri.widgets.TableList")],L);const M=L;export{M as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.29/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Accessor.js";import i from"../../core/Error.js";import t from"../../core/Logger.js";import{watch as o,initial as s}from"../../core/reactiveUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as d}from"../../core/support/UpdatingHandles.js";import c from"../../portal/Portal.js";import{hasUserTypeExtension as l}from"../../portal/support/utils.js";import{createFeatureServices as h}from"../../rest/featureService/utils.js";import u from"../../versionManagement/VersionManagementService.js";let g=class extends r{constructor(e){super(e),this._currentVersionIdentifiers=new Map,this._initialValidationsFinished=!1,this._portals=new Map,this._updatingHandles=new d,this._validConstructProperties=!0,this.advancedEditingUserTypeExtensionForUrl=new Map,this.executionError=void 0,this.featureServices=new Map,this.layers=null,this.loadError=void 0,this.serverVersionForUrl=new Map,this.serviceNames=new Map,this.userForUrl=new Map,this.versionInfos=new Map,this.versionManagementServices=new Map}initialize(){this.addHandles([o((()=>this.layers?.toArray()),(async()=>{await this._onLayersChange()}),s)])}destroy(){this._updatingHandles.destroy()}get state(){return this.loadError||!this._validConstructProperties?"disabled":this.executionError?"failed":this._updatingHandles.updating?"executing":this._initialValidationsFinished?"ready":"loading"}async alterVersion(e){"disabled"!==this.state?await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const r=this.versionManagementServices.get(e.featureServerUrl);if(!r)return void this._logNoVersionManagementServiceFoundError();if(!this.serverVersionForUrl.has(e.featureServerUrl)||this.serverVersionForUrl.get(e.featureServerUrl)<=11.1)return void this._logError("execution-error","no-valid-enterprise-version");if(!this.advancedEditingUserTypeExtensionForUrl.get(e.featureServerUrl))return void this._logError("execution-error","no-advanced-editing-user-type-extension");const{featureServerUrl:i,versionIdentifier:t,...o}=e;await r.alterVersion(t,o).catch((async e=>{await this.getVersionInfos(i,!0),this._logExecutionError(e)}))})()):this._logError("load-error",this.loadError)}async changeVersion(e,r,i){"disabled"!==this.state?await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const t=this.versionManagementServices.get(e);if(!t)return void this._logNoVersionManagementServiceFoundError();const o=this._currentVersionIdentifiers.get(e)??{name:t.defaultVersionIdentifier.name,guid:t.defaultVersionIdentifier.guid},s={name:r,guid:i};await t.changeVersion(this.featureServices.get(e)?.layers,o,s).catch((e=>{this._logExecutionError(e)}))&&this._currentVersionIdentifiers.set(e,s)})()):this._logError("load-error",this.loadError)}async createVersion(e){"disabled"!==this.state?await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const r=e.featureServerUrl,i=this.versionManagementServices.get(r);if(!i)return void this._logNoVersionManagementServiceFoundError();const t=this.advancedEditingUserTypeExtensionForUrl.get(e.featureServerUrl),o=this.userForUrl.get(r).toUpperCase(),s=this._isEmptyString(e.ownerName)?o:e.ownerName?.trim().toUpperCase();if(s!==o){if(this.serverVersionForUrl.get(r)<=11.1)return void this._logError("execution-error","versioning-api-error");if(!t)return void this._logError("execution-error","no-advanced-editing-user-type-extension")}const n=s===o?e.versionName:e.versionName+"_tmp";if("SDE"===s?.toUpperCase()&&"DEFAULT"===e.versionName.toUpperCase()||this.versionInfos.get(r)?.find((r=>r.versionIdentifier.name.toUpperCase()===(s+"."+e.versionName).toUpperCase())))return void this._logError("execution-error","no-valid-version-name");const a=await i.createVersion({versionName:n,access:e.access,description:e.description}).catch((e=>{this._logExecutionError(e)}));if(this.executionError&&s!==o){const{guid:i,name:t}=a.versionIdentifier;let o={featureServerUrl:r,versionIdentifier:{guid:i,name:t},ownerName:s};await this.alterVersion(o).catch((e=>{this._logExecutionError(e),this.deleteVersion(r,a.versionIdentifier.name,a.versionIdentifier.guid)})),o={featureServerUrl:r,versionIdentifier:{guid:a.versionIdentifier.guid,name:a.versionIdentifier.name},versionName:e.versionName},await this.alterVersion(o).catch((async e=>{await this.deleteVersion(r,a.versionIdentifier.name,a.versionIdentifier.guid),await this.getVersionInfos(r,!0),this._logExecutionError(e)}))}})()):this._logError("load-error",this.loadError)}async deleteVersion(e,r,i){"disabled"!==this.state?await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const t=this.versionManagementServices.get(e);if(!t)return void this._logNoVersionManagementServiceFoundError();if(this.serverVersionForUrl.get(e)<=11.1)return void this._logError("execution-error","versioning-api-error");if(!this.advancedEditingUserTypeExtensionForUrl.get(e))return void this._logError("execution-error","no-advanced-editing-user-type-extension");const o={name:r,guid:i};await t.deleteVersion(o).catch((e=>{this._logExecutionError(e)}))&&await this.getVersionInfos(e,!0).catch((e=>{this._logExecutionError(e)}))})()):this._logError("load-error",this.loadError)}async getVersionInfos(e,r){if("disabled"!==this.state)return await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const i=this.featureServices.get(e)?.featureService;if(!i)return void this._logError("execution-error","no-feature-service-found");if(!i.loaded){await i.load().catch((e=>{this._logExecutionError(e)}));const r=i.url;this.serverVersionForUrl.set(r,i.sourceJSON?.currentVersion??0),this.serverVersionForUrl.get(r)<=11.1&&this.advancedEditingUserTypeExtensionForUrl.set(r,!1);const t=this.userForUrl.get(e);this._portals.get(e)&&t?this.advancedEditingUserTypeExtensionForUrl.set(r,await l(this._portals.get(e),t,"advediting")):this.advancedEditingUserTypeExtensionForUrl.set(r,!1)}i.versionManagementServiceUrl&&this.versionManagementServices.set(i.url,new u({url:i.versionManagementServiceUrl}));const t=this.versionManagementServices.get(e);if(t){if(t.loaded||await t.load().catch((e=>{this._logExecutionError(e)})),!this.versionInfos.get(e)||r){const r=await t.getVersionInfos().catch((e=>{this._logExecutionError(e)}));this.versionInfos.set(e,r),this._currentVersionIdentifiers.set(e,t.defaultVersionIdentifier)}}else this._logNoVersionManagementServiceFoundError()})()),this.versionInfos.get(e);this._logError("load-error",this.loadError)}_isEmptyString(e){return!e||0===e.trim().length}_logError(e,r){switch(e){case"load-error":this._setLoadError(r),t.getLogger(this).error(new i(e,r));break;case"execution-error":this._setExecutionError(r),t.getLogger(this).error(new i(e,r))}}_logExecutionError(e){this._logError("execution-error",e.message)}_logNoVersionManagementServiceFoundError(){this._logError("execution-error","no-version-management-service-found")}async _onLayersChange(){if(this._initialValidationsFinished=!1,this._setLoadError(),this._validConstructProperties=!0,!this.layers)return this._logError("load-error","no-layers-property"),void(this._validConstructProperties=!1);if(this.featureServices=h(this.layers),!this.featureServices.size)return this._logError("load-error","no-feature-services"),void(this._validConstructProperties=!1);for(const e of this.featureServices.keys())if(!this.serviceNames.has(e)){this.serviceNames.set(e,e.split("/").at(-2));const r=new c({authMode:"immediate",url:new URL(e).origin+"/portal"});await r.load(),this._portals.set(e,r);const i=r?.user?.username;i&&this.userForUrl.set(e,i)}this._initialValidationsFinished=!0}_setExecutionError(e){this._set("executionError",e)}_setLoadError(e){this._set("loadError",e)}};e([n()],g.prototype,"_initialValidationsFinished",void 0),e([n({readOnly:!0})],g.prototype,"advancedEditingUserTypeExtensionForUrl",void 0),e([n({readOnly:!0})],g.prototype,"executionError",void 0),e([n()],g.prototype,"featureServices",void 0),e([n()],g.prototype,"layers",void 0),e([n({readOnly:!0})],g.prototype,"loadError",void 0),e([n({readOnly:!0})],g.prototype,"serverVersionForUrl",void 0),e([n()],g.prototype,"serviceNames",void 0),e([n({readOnly:!0})],g.prototype,"state",null),e([n({readOnly:!0})],g.prototype,"userForUrl",void 0),e([n()],g.prototype,"versionInfos",void 0),e([n()],g.prototype,"versionManagementServices",void 0),g=e([a("esri.widgets.VersionManagement.VersionManagementViewModel")],g);const v=g;export{v as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Accessor.js";import i from"../../core/Error.js";import t from"../../core/Logger.js";import{watch as o,initial as s}from"../../core/reactiveUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as d}from"../../core/support/UpdatingHandles.js";import c from"../../portal/Portal.js";import{hasUserTypeExtension as l}from"../../portal/support/utils.js";import{createFeatureServices as h}from"../../rest/featureService/utils.js";import u from"../../versionManagement/VersionManagementService.js";let g=class extends r{constructor(e){super(e),this._currentVersionIdentifiers=new Map,this._initialValidationsFinished=!1,this._portals=new Map,this._updatingHandles=new d,this._validConstructProperties=!0,this.advancedEditingUserTypeExtensionForUrl=new Map,this.executionError=void 0,this.featureServices=new Map,this.layers=null,this.loadError=void 0,this.serverVersionForUrl=new Map,this.serviceNames=new Map,this.userForUrl=new Map,this.versionInfos=new Map,this.versionManagementServices=new Map}initialize(){this.addHandles([o((()=>this.layers?.toArray()),(async()=>{await this._onLayersChange()}),s)])}destroy(){this._updatingHandles.destroy()}get state(){return this.loadError||!this._validConstructProperties?"disabled":this.executionError?"failed":this._updatingHandles.updating?"executing":this._initialValidationsFinished?"ready":"loading"}async alterVersion(e){"disabled"!==this.state?await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const r=this.versionManagementServices.get(e.featureServerUrl);if(!r)return void this._logNoVersionManagementServiceFoundError();if(!this.serverVersionForUrl.has(e.featureServerUrl)||this.serverVersionForUrl.get(e.featureServerUrl)<=11.1)return void this._logError("execution-error","no-valid-enterprise-version");if(!this.advancedEditingUserTypeExtensionForUrl.get(e.featureServerUrl))return void this._logError("execution-error","no-advanced-editing-user-type-extension");const{featureServerUrl:i,versionIdentifier:t,...o}=e;await r.alterVersion(t,o).catch((async e=>{await this.getVersionInfos(i,!0),this._logExecutionError(e)}))})()):this._logError("load-error",this.loadError)}async changeVersion(e,r,i){"disabled"!==this.state?await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const t=this.versionManagementServices.get(e);if(!t)return void this._logNoVersionManagementServiceFoundError();const o=this._currentVersionIdentifiers.get(e)??{name:t.defaultVersionIdentifier.name,guid:t.defaultVersionIdentifier.guid},s={name:r,guid:i};await t.changeVersion(this.featureServices.get(e)?.layers,o,s).catch((e=>{this._logExecutionError(e)}))&&this._currentVersionIdentifiers.set(e,s)})()):this._logError("load-error",this.loadError)}async createVersion(e){"disabled"!==this.state?await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const r=e.featureServerUrl,i=this.versionManagementServices.get(r);if(!i)return void this._logNoVersionManagementServiceFoundError();const t=this.advancedEditingUserTypeExtensionForUrl.get(e.featureServerUrl),o=this.userForUrl.get(r).toUpperCase(),s=this._isEmptyString(e.ownerName)?o:e.ownerName?.trim().toUpperCase();if(s!==o){if(this.serverVersionForUrl.get(r)<=11.1)return void this._logError("execution-error","versioning-api-error");if(!t)return void this._logError("execution-error","no-advanced-editing-user-type-extension")}if("SDE"===s?.toUpperCase()&&"DEFAULT"===e.versionName.toUpperCase()||this.versionInfos.get(r)?.find((r=>r.versionIdentifier.name.toUpperCase()===(s+"."+e.versionName).toUpperCase()||r.versionIdentifier.name.toUpperCase()===(o+"."+e.versionName).toUpperCase())))return void this._logError("execution-error","no-valid-version-name");const n=await i.createVersion({versionName:e.versionName,access:s!==o?"public":e.access,description:e.description}).catch((e=>{this._logExecutionError(e)}));if(!this.executionError&&s!==o){const{guid:i,name:t}=n.versionIdentifier,a={featureServerUrl:r,versionIdentifier:{guid:i,name:t},access:e.access,ownerName:s};await this.alterVersion(a),this.executionError&&this.deleteVersion(r,o+"."+e.versionName,n.versionIdentifier.guid)}await this.getVersionInfos(r,!0)})()):this._logError("load-error",this.loadError)}async deleteVersion(e,r,i){"disabled"!==this.state?await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const t=this.versionManagementServices.get(e);if(!t)return void this._logNoVersionManagementServiceFoundError();if(this.serverVersionForUrl.get(e)<=11.1)return void this._logError("execution-error","versioning-api-error");if(!this.advancedEditingUserTypeExtensionForUrl.get(e))return void this._logError("execution-error","no-advanced-editing-user-type-extension");const o={name:r,guid:i};await t.deleteVersion(o).catch((e=>{this._logExecutionError(e)}))&&await this.getVersionInfos(e,!0).catch((e=>{this._logExecutionError(e)}))})()):this._logError("load-error",this.loadError)}async getVersionInfos(e,r){if("disabled"!==this.state)return await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const i=this.featureServices.get(e)?.featureService;if(!i)return void this._logError("execution-error","no-feature-service-found");if(!i.loaded){await i.load().catch((e=>{this._logExecutionError(e)}));const r=i.url;this.serverVersionForUrl.set(r,i.sourceJSON?.currentVersion??0),this.serverVersionForUrl.get(r)<=11.1&&this.advancedEditingUserTypeExtensionForUrl.set(r,!1);const t=this.userForUrl.get(e);this._portals.get(e)&&t?this.advancedEditingUserTypeExtensionForUrl.set(r,await l(this._portals.get(e),t,"advediting")):this.advancedEditingUserTypeExtensionForUrl.set(r,!1)}i.versionManagementServiceUrl&&this.versionManagementServices.set(i.url,new u({url:i.versionManagementServiceUrl}));const t=this.versionManagementServices.get(e);if(t){if(t.loaded||await t.load().catch((e=>{this._logExecutionError(e)})),!this.versionInfos.get(e)||r){const r=await t.getVersionInfos().catch((e=>{this._logExecutionError(e)}));this.versionInfos.set(e,r),this._currentVersionIdentifiers.set(e,t.defaultVersionIdentifier)}}else this._logNoVersionManagementServiceFoundError()})()),this.versionInfos.get(e);this._logError("load-error",this.loadError)}_isEmptyString(e){return!e||0===e.trim().length}_logError(e,r){switch(e){case"load-error":this._setLoadError(r),t.getLogger(this).error(new i(e,r));break;case"execution-error":this._setExecutionError(r),t.getLogger(this).error(new i(e,r))}}_logExecutionError(e){this._logError("execution-error",e.message)}_logNoVersionManagementServiceFoundError(){this._logError("execution-error","no-version-management-service-found")}async _onLayersChange(){if(this._initialValidationsFinished=!1,this._setLoadError(),this._validConstructProperties=!0,!this.layers)return this._logError("load-error","no-layers-property"),void(this._validConstructProperties=!1);if(this.featureServices=h(this.layers),!this.featureServices.size)return this._logError("load-error","no-feature-services"),void(this._validConstructProperties=!1);for(const e of this.featureServices.keys())if(!this.serviceNames.has(e)){this.serviceNames.set(e,e.split("/").at(-2));const r=new c({authMode:"immediate",url:new URL(e).origin+"/portal"});await r.load(),this._portals.set(e,r);const i=r?.user?.username;i&&this.userForUrl.set(e,i)}this._initialValidationsFinished=!0}_setExecutionError(e){this._set("executionError",e)}_setLoadError(e){this._set("loadError",e)}};e([n()],g.prototype,"_initialValidationsFinished",void 0),e([n({readOnly:!0})],g.prototype,"advancedEditingUserTypeExtensionForUrl",void 0),e([n({readOnly:!0})],g.prototype,"executionError",void 0),e([n()],g.prototype,"featureServices",void 0),e([n()],g.prototype,"layers",void 0),e([n({readOnly:!0})],g.prototype,"loadError",void 0),e([n({readOnly:!0})],g.prototype,"serverVersionForUrl",void 0),e([n()],g.prototype,"serviceNames",void 0),e([n({readOnly:!0})],g.prototype,"state",null),e([n({readOnly:!0})],g.prototype,"userForUrl",void 0),e([n()],g.prototype,"versionInfos",void 0),e([n()],g.prototype,"versionManagementServices",void 0),g=e([a("esri.widgets.VersionManagement.VersionManagementViewModel")],g);const v=g;export{v as default};