@esri/solutions-components 5.1.0-next.146 → 5.1.0-next.147

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.
Files changed (103) hide show
  1. package/dist/cdn/{BQE6IVEF.js → 3A2YSBVB.js} +1 -1
  2. package/dist/cdn/{E6YCTW3S.js → 3MRR3HKE.js} +13 -13
  3. package/dist/cdn/{QKJJHBMB.js → 42GXADY4.js} +1 -1
  4. package/dist/cdn/{L3UI7EZZ.js → 4DAGSZIC.js} +1 -1
  5. package/dist/cdn/{ULUJKWT5.js → 4FRYNYQ6.js} +1 -1
  6. package/dist/cdn/{7CLM77HQ.js → 4SBOBTOR.js} +1 -1
  7. package/dist/cdn/{FAIQTEVJ.js → 4YCLQ3RW.js} +1 -1
  8. package/dist/cdn/{CVRBLJ5O.js → 5MPDXVRM.js} +1 -1
  9. package/dist/cdn/{7ADKNWWI.js → 6AUKNSKW.js} +1 -1
  10. package/dist/cdn/{RIHOGDUV.js → 6IUKH3E3.js} +1 -1
  11. package/dist/cdn/{FSWG7SUT.js → 6K3C5JX2.js} +1 -1
  12. package/dist/cdn/6VCG2ITQ.js +2 -0
  13. package/dist/cdn/{NOXANMDF.js → 757HAEJS.js} +1 -1
  14. package/dist/cdn/{P4XNRWG7.js → 7Q5BT35O.js} +1 -1
  15. package/dist/cdn/{4NZDPHHF.js → 7WYPODAB.js} +1 -1
  16. package/dist/cdn/AH3PJQ6A.js +2 -0
  17. package/dist/cdn/{463VANZI.js → BH42V5CR.js} +1 -1
  18. package/dist/cdn/DD2Y5NOB.js +2 -0
  19. package/dist/cdn/{J5K2SIY6.js → DMM5WA5Q.js} +3 -3
  20. package/dist/cdn/{UKQPYE7U.js → DQQTSOMQ.js} +1 -1
  21. package/dist/cdn/{Y4KGXRSD.js → FWLPMS4Q.js} +1 -1
  22. package/dist/cdn/{M4II4TSX.js → G3C6IL5Y.js} +1 -1
  23. package/dist/cdn/{3DCFUYKP.js → GG4IIHQE.js} +1 -1
  24. package/dist/cdn/{MHVLVLRA.js → HYQVSB6C.js} +1 -1
  25. package/dist/cdn/I46CXTVR.js +2 -0
  26. package/dist/cdn/IZSM7ZJK.js +2 -0
  27. package/dist/cdn/{MIH5YMTN.js → JMBANG5V.js} +1 -1
  28. package/dist/cdn/KETYOYXQ.js +2 -0
  29. package/dist/cdn/{GJD7AOUI.js → KH5WPLZK.js} +1 -1
  30. package/dist/cdn/{IDEOFV22.js → LTLR4VF3.js} +1 -1
  31. package/dist/cdn/NQH7ZZWD.js +2 -0
  32. package/dist/cdn/OANAQ6HY.js +2 -0
  33. package/dist/cdn/PQL3UL3P.js +2 -0
  34. package/dist/cdn/{L6P26BYB.js → Q2DJUFVO.js} +1 -1
  35. package/dist/cdn/{LCV5GKUD.js → Q35DDH7J.js} +123 -123
  36. package/dist/cdn/QDKHYQJB.js +2 -0
  37. package/dist/cdn/{FCJSMT5G.js → RMO244NW.js} +1 -1
  38. package/dist/cdn/RY6KZ77P.js +2 -0
  39. package/dist/cdn/{PBGG3TGN.js → RYBSWXQQ.js} +1 -1
  40. package/dist/cdn/{2UMMLVCR.js → SYQ5E5TV.js} +1 -1
  41. package/dist/cdn/UBEU6ULP.js +2 -0
  42. package/dist/cdn/{MPCJZCL5.js → UTZUXO5F.js} +2 -2
  43. package/dist/cdn/UXKH44PB.js +2 -0
  44. package/dist/cdn/{2PUK3PST.js → W7I22AW3.js} +1 -1
  45. package/dist/cdn/{RUQ4RO4T.js → WUEJANIZ.js} +1 -1
  46. package/dist/cdn/{XGYNSCTA.js → Y37QLEAM.js} +1 -1
  47. package/dist/cdn/{O6ZQYZKL.js → YFJZN5K5.js} +1 -1
  48. package/dist/cdn/{6T35OGRG.js → YTU2BYBP.js} +1 -1
  49. package/dist/cdn/{5LF6C3S5.js → YWALGZAG.js} +1 -1
  50. package/dist/cdn/{F26SXWZ5.js → ZNH7LRND.js} +1 -1
  51. package/dist/cdn/{BMMIXOTR.js → ZWQWBXHR.js} +1 -1
  52. package/dist/cdn/index.js +1 -1
  53. package/dist/chunks/Auth.js +1 -1
  54. package/dist/chunks/deployFlowController.js +1 -1
  55. package/dist/chunks/helpers.js +47 -43
  56. package/dist/chunks/interfaces.js +105 -102
  57. package/dist/chunks/solution-builder-assistant.js +185 -121
  58. package/dist/chunks/solution-deploy-dialog.js +4 -4
  59. package/dist/chunks/solutions-deploy-app-nav.js +2 -2
  60. package/dist/components/arcgis-solutions-assistant/customElement.js +114 -97
  61. package/dist/components/arcgis-solutions-assistant/index.js +1 -0
  62. package/dist/components/card-manager/customElement.js +8 -8
  63. package/dist/components/create-feature/customElement.js +107 -113
  64. package/dist/components/crowdsource-reporter/customElement.js +1 -1
  65. package/dist/components/layer-table/customElement.d.ts +3 -0
  66. package/dist/components/layer-table/customElement.js +110 -100
  67. package/dist/components/solution-configure-titles/customElement.js +11 -10
  68. package/dist/components/solution-delete-dialog/customElement.js +9 -8
  69. package/dist/components/solution-deploy-dialog/customElement.d.ts +6 -2
  70. package/dist/components/solution-deployed-card-panel/customElement.js +41 -38
  71. package/dist/components/solution-details-card/customElement.js +1 -1
  72. package/dist/components/solution-details-panel/customElement.js +78 -64
  73. package/dist/components/solution-resource-card/customElement.js +1 -1
  74. package/dist/components/solution-snapshot-gallery/customElement.js +1 -1
  75. package/dist/components/solutions-all-panel/customElement.js +1 -1
  76. package/dist/components/solutions-deploy-app/customElement.js +9 -11
  77. package/dist/components/solutions-deployed-panel/customElement.js +7 -7
  78. package/dist/components/solutions-deployed-shell/customElement.js +1 -1
  79. package/dist/components/solutions-filter-panel/customElement.js +1 -1
  80. package/dist/components/solutions-searchsort-toolbar/customElement.js +1 -1
  81. package/dist/docs/api.json +1 -1
  82. package/dist/docs/docs.json +1 -1
  83. package/dist/docs/vscode.html-custom-data.json +1 -1
  84. package/dist/docs/web-types.json +1 -1
  85. package/dist/solutions-components_commit.txt +6 -6
  86. package/dist/types/lumina.d.ts +1 -0
  87. package/dist/types/preact.d.ts +1 -0
  88. package/dist/types/react.d.ts +1 -0
  89. package/dist/types/stencil.d.ts +1 -0
  90. package/package.json +1 -1
  91. package/dist/cdn/3JQ2RXVJ.js +0 -2
  92. package/dist/cdn/54AE7WD2.js +0 -2
  93. package/dist/cdn/7WD3GNG4.js +0 -2
  94. package/dist/cdn/D3XPV5W4.js +0 -2
  95. package/dist/cdn/KDNGZ47C.js +0 -2
  96. package/dist/cdn/KIPRPYME.js +0 -2
  97. package/dist/cdn/PBMTIFFX.js +0 -2
  98. package/dist/cdn/PECGJO2P.js +0 -2
  99. package/dist/cdn/QGCF64WY.js +0 -2
  100. package/dist/cdn/Z3B5KW2S.js +0 -2
  101. package/dist/cdn/ZM27FRZG.js +0 -2
  102. package/dist/cdn/ZUPXKH75.js +0 -2
  103. package/dist/cdn/ZYLKUZID.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as R}from"./ONARC6AZ.js";import{a as F}from"./7VD3Y4IF.js";import b from"./PBMTIFFX.js";import{a as $,b as C}from"./2B4SGB3I.js";import{b as d}from"./I2NTSKBD.js";import{a as S}from"./MGEDATQ7.js";import{b as w}from"./2I5LGZNX.js";import{E as n,F as r,G as x,I as c,J as h,h as v,i as a,q as y}from"./FFF5HUPM.js";export default $arcgis.t(([{j:u,k:f,r:_}])=>{var O=v`.display-flex{display:flex}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: 0px;--calcite-panel-header-background-color: var(--calcite-color-surface-3)}.panel-override{--calcite-panel-background-color: var(--calcite-color-surface-3);--calcite-panel-border-color: none}.label-override{--calcite-label-margin-bottom: 0px;font-weight:var(--calcite-font-weight-medium)}.header-button-padding{padding-top:var(--calcite-spacing-sm);padding-bottom:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}.padding-start{padding-inline-start:var(--calcite-spacing-sm)}.align-items-center{align-items:center}.justify-content-end{justify-content:end}.filter-width-350{--calcite-shell-panel-width: 350px}.z-index-1{z-index:1}.z-index-2{z-index:2}h1{font-weight:unset;margin:0;padding:0}@container (max-width: 800px){.filter{display:none}}.mock-fab{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}.background-override{--calcite-shell-panel-background-color: var(--calcite-color-surface-4);--calcite-panel-background-color: var(--calcite-color-surface-4)}.chips-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--calcite-spacing-xs);flex:1;padding-block:var(--calcite-spacing-xs)}.header-content-wrapper{min-height:50px;flex-wrap:wrap;gap:var(--calcite-spacing-xs);padding-inline-start:var(--calcite-spacing-lg);padding-top:8px}.position-relative{position:relative;height:100%;overflow:hidden}.height-100{height:100%}.border-none{border:none}.height-50{height:50px}.chip-group{max-width:100%}.chip-group{display:flex;flex-wrap:wrap}.responsive-chip{max-width:100%}.responsive-chip .chip-text{display:inline-flex;align-items:center;line-height:1;max-width:100%}@container (max-width: 800px){.responsive-chip{max-width:100%;min-width:0}.responsive-chip .chip-text{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.mobile-stack{flex-direction:column;align-items:flex-start;padding-top:var(--calcite-spacing-md)}`,g=class extends x{constructor(){super(),this.solutionsCount=0,this._isLoading=!0,this._filterOpen=!0,this._filters={categories:[],searchTerm:""},this._isMobile=!1,this._translations=S({name:"solutions-all-shell",blocking:!0}),this._allSolutionsPanelRef=n(),this._solutionsFilterPanelRef=n(),this._mainPanelRef=n(),this._panelFixed=!1,this._configContextConsumer=d({context:C,subscribe:!0}),this._isMobileContextConsumer=d({context:$,subscribe:!0,callback:e=>this._isMobile=e}),this.filterRemoved=y(),this.listenOn(window,"searchChanged",e=>{e.detail&&e.detail.scope==="all-solutions"&&this._filterApplied(e.detail.option,e.detail.logSearchTelemetry)}),this.listenOn(window,"toggleFilter",this._toggleFilter),this.listenOn(window,"cardsFetched",()=>{this._isLoading=!1,this._syncSolutionChipOrderWithDisplayedCards()}),this.listenOn(window,"solutionMatchesFromAssistant",e=>{this._applyAssistantSolutionMatches(e.detail)})}static{this.properties={solutionsCount:9,_isLoading:16,_filterOpen:16,_filters:16,_isMobile:16,_translations:16}}static{this.styles=O}willUpdate(e){e.has("_isMobile")&&(this._filterOpen=!this._isMobile)}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async searchSolutions(e){if(this._allSolutionsPanelRef.value.setSearchOptions(e),"industry"in e||"domain"in e){e.displayValue=e.domain||e.industry;let t=e.industry?Object.entries(u).find(([,s])=>s===e.industry)?.[0]:void 0,i=e.domain?Object.entries(f).find(([,s])=>s===e.domain)?.[0]:void 0;e.industry=t||"",e.domain=i||"",e.value=i||t||"",this._solutionsFilterPanelRef.value.changeIndustryFilter(e.industry,e.domain,e.displayValue,!0)}else("searchTerm"in e||"sortType"in e)&&("searchTerm"in e&&(this._filters.searchTerm=e.searchTerm),this._allSolutionsPanelRef.value?.searchSolutions(e))}async load(){this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(i=>{if(i.type==="attributes"&&i.attributeName==="tabindex"){let s=i.target;s.classList.contains("content-wrapper")&&s.tabIndex===0&&(s.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._isMobile?"justify-content-end":"",t=this._isLoading?"display-none":"";return a`<calcite-shell class=${`position-relative ${t}`}>${this._isMobile?"":this._getFilterPanel()}<h1 class="height-100"><calcite-panel class="border-override header-override panel-override z-index-1" ${r(this._mainPanelRef)}><div class=${c(this._isMobile?`mobile-stack ${e}`:`display-flex align-items-center header-content-wrapper ${e}`)} slot=header-content><calcite-label class="label-override">${this._translations.numberOfSolutions.replace("{{count}}",this.solutionsCount.toString())}</calcite-label><div class="chips-container">${this._renderChips()}${this._filters.categories&&this._filters.categories?.length>0&&a`<calcite-button appearance=transparent icon-start=reset kind=neutral @click=${()=>{this._filters={...this._filters,categories:[],searchTerm:""},this._emitSolutionMatchesFromAssistant([],[]),this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this.filterRemoved.emit([])}} .label=${this._translations.clearIndustryFilter}>${this._translations.clearIndustryFilter}</calcite-button>`||""}</div></div>${this._isMobile&&this._getFilterPanel()||""}${this._getSolutionsAllPanel()}</calcite-panel></h1></calcite-shell>`}_emitSolutionMatchesFromAssistant(e,t){window.dispatchEvent(new CustomEvent("solutionMatchesFromAssistant",{detail:{solutionIds:e,solutionTitles:t},bubbles:!0,composed:!0}))}_getFilterPanel(){let e=this._filterOpen?{display:"flex"}:"";return this._isMobile?a`<calcite-panel class=${`border-none ${this._filterOpen?"background-override":"filter background-override"}`} id=solutions-all-shell-panel-start style=${h(e)}><solutions-filter-panel class="height-100" @applyFilter=${t=>{this._filterApplied(t.detail)}} ${r(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel>`:a`<calcite-shell-panel class="filter background-override filter-width-350" id=solutions-all-shell-panel-start slot=panel-start style=${h(e)}><calcite-panel class="border-none"><solutions-filter-panel class="height-100" @applyFilter=${t=>{this._filterApplied(t.detail)}} ${r(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel></calcite-shell-panel>`}_getSolutionsAllPanel(){let e=this._isMobile&&this._filterOpen?{display:"none"}:"";return a`<solutions-all-panel @cardsFetched=${this._updateSolutionCount} style=${h(e)} ${r(this._allSolutionsPanelRef)}></solutions-all-panel>`}_renderChips(){if(!this._filters.categories)return;let e=this._filters.categories.filter(t=>t.type==="industry"||t.type==="domain"||t.type==="solution");if(e.length!==0)return a`<calcite-chip-group class="chip-group" .label=${this._translations.appliedFilters}>${this._filters.displayValue&&this._filters.displayValue!==""?R(`${this._filters.displayValue}`,a`<calcite-chip appearance=outline-fill class=${c(this._isMobile?"responsive-chip":"padding-start responsive-chip")} closable .label=${this._filters.displayValue??""} @calciteChipClose=${()=>this._chipClosed(this._filters.displayValue,"solution")} .value=${this._filters.displayValue}>${this._filters.displayValue}</calcite-chip>`):F(e,t=>`${t.type}:${t.value}`,t=>a`<calcite-chip appearance=outline-fill class=${c(this._isMobile?"responsive-chip":"padding-start responsive-chip")} closable .label=${t.displayValue} @calciteChipClose=${()=>this._chipClosed(t.displayValue,t.type)} .value=${t.displayValue}>${t.displayValue}</calcite-chip>`)}</calcite-chip-group>`}_updateSolutionCount(e){this.solutionsCount=e.detail}_syncSolutionChipOrderWithDisplayedCards(){if(!this._filters.categories?.length)return;let e=this._filters.categories.filter(l=>l.type==="solution");if(e.length<=1)return;let t=this._allSolutionsPanelRef.value?.getDisplayedSolutionIds?.()??[];if(!t.length)return;let i=new Map;t.forEach((l,p)=>{i.set(l,p)});let s=[...e].sort((l,p)=>{let m=i.get(String(l.value)),b=i.get(String(p.value)),T=m===void 0?Number.MAX_SAFE_INTEGER:m,M=b===void 0?Number.MAX_SAFE_INTEGER:b;return T-M}),o=this._filters.categories.filter(l=>l.type!=="solution");this._filters={...this._filters,categories:[...o,...s]}}_chipClosed(e,t){if(this._filters.categories){if(t==="solution"){this._filters.categories=[],this._emitSolutionMatchesFromAssistant([],[]),this._filters={...this._filters,searchTerm:""},this._allSolutionsPanelRef.value?.searchSolutions();return}if(t==="industry")this._filters.categories=[];else{let i=this._filters.categories.filter(s=>s.displayValue!==e&&s.type!==t);this._filters.categories=i}this._filters.categories.length>0?this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories):this._filters.searchTerm!==""?(this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this._allSolutionsPanelRef.value?.searchSolutions({searchTerm:this._filters.searchTerm})):this._allSolutionsPanelRef.value?.searchSolutions(),this.filterRemoved.emit(this._filters.categories)}}_applyAssistantSolutionMatches(e){let t=Array.isArray(e?.solutionIds)?e.solutionIds:[],i=Array.isArray(e?.solutionTitles)?e.solutionTitles:[],s=t.map((o,l)=>({type:"solution",value:o,displayValue:i[l]??o}));this._filters={categories:s,searchTerm:"",displayValue:this._translations.aiAssistantResults},this.filterRemoved.emit([])}_toggleFilter(){this._filterOpen=!this._filterOpen}_logFilterTelemetry(e){if((e.type==="industry"||e.type==="domain")&&e.industry){let t=[u[e.industry]];if(e.domain){let i=f[e.domain];t.push(i)}this._telemetry?.logEvent({category:_.ALL_SOLUTIONS,action:"Filter",dimensions:t})}}_filterApplied(e,t){if(this._filters.categories)if(e){let i=e;if("displayValue"in e)this._filters.categories.push(e),this._logFilterTelemetry(e);else if(Array.isArray(e)&&e.length>0){e.length>=2&&(i=[e[e.length-1]]),this._filters={categories:e,searchTerm:this._filters.searchTerm};let s=e[e.length-1];s&&this._logFilterTelemetry(s)}if("searchTerm"in i&&(this._filters.searchTerm=i.searchTerm,t&&i.searchTerm)){this._telemetry?.logEvent({category:_.ALL_SOLUTIONS,action:"Search",dimensions:[i.searchTerm]});return}this._allSolutionsPanelRef.value?.searchSolutions(i)}else this._filters.categories=[],this._allSolutionsPanelRef.value?.searchSolutions()}};w("solutions-all-shell",g);return g},b)
2
+ import{a as R}from"./ONARC6AZ.js";import{a as F}from"./7VD3Y4IF.js";import b from"./OANAQ6HY.js";import{a as $,b as C}from"./2B4SGB3I.js";import{b as d}from"./I2NTSKBD.js";import{a as S}from"./MGEDATQ7.js";import{b as w}from"./2I5LGZNX.js";import{E as n,F as r,G as x,I as c,J as h,h as v,i as a,q as y}from"./FFF5HUPM.js";export default $arcgis.t(([{j:u,k:f,r:_}])=>{var O=v`.display-flex{display:flex}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: 0px;--calcite-panel-header-background-color: var(--calcite-color-surface-3)}.panel-override{--calcite-panel-background-color: var(--calcite-color-surface-3);--calcite-panel-border-color: none}.label-override{--calcite-label-margin-bottom: 0px;font-weight:var(--calcite-font-weight-medium)}.header-button-padding{padding-top:var(--calcite-spacing-sm);padding-bottom:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}.padding-start{padding-inline-start:var(--calcite-spacing-sm)}.align-items-center{align-items:center}.justify-content-end{justify-content:end}.filter-width-350{--calcite-shell-panel-width: 350px}.z-index-1{z-index:1}.z-index-2{z-index:2}h1{font-weight:unset;margin:0;padding:0}@container (max-width: 800px){.filter{display:none}}.mock-fab{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}.background-override{--calcite-shell-panel-background-color: var(--calcite-color-surface-4);--calcite-panel-background-color: var(--calcite-color-surface-4)}.chips-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--calcite-spacing-xs);flex:1;padding-block:var(--calcite-spacing-xs)}.header-content-wrapper{min-height:50px;flex-wrap:wrap;gap:var(--calcite-spacing-xs);padding-inline-start:var(--calcite-spacing-lg);padding-top:8px}.position-relative{position:relative;height:100%;overflow:hidden}.height-100{height:100%}.border-none{border:none}.height-50{height:50px}.chip-group{max-width:100%}.chip-group{display:flex;flex-wrap:wrap}.responsive-chip{max-width:100%}.responsive-chip .chip-text{display:inline-flex;align-items:center;line-height:1;max-width:100%}@container (max-width: 800px){.responsive-chip{max-width:100%;min-width:0}.responsive-chip .chip-text{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.mobile-stack{flex-direction:column;align-items:flex-start;padding-top:var(--calcite-spacing-md)}`,g=class extends x{constructor(){super(),this.solutionsCount=0,this._isLoading=!0,this._filterOpen=!0,this._filters={categories:[],searchTerm:""},this._isMobile=!1,this._translations=S({name:"solutions-all-shell",blocking:!0}),this._allSolutionsPanelRef=n(),this._solutionsFilterPanelRef=n(),this._mainPanelRef=n(),this._panelFixed=!1,this._configContextConsumer=d({context:C,subscribe:!0}),this._isMobileContextConsumer=d({context:$,subscribe:!0,callback:e=>this._isMobile=e}),this.filterRemoved=y(),this.listenOn(window,"searchChanged",e=>{e.detail&&e.detail.scope==="all-solutions"&&this._filterApplied(e.detail.option,e.detail.logSearchTelemetry)}),this.listenOn(window,"toggleFilter",this._toggleFilter),this.listenOn(window,"cardsFetched",()=>{this._isLoading=!1,this._syncSolutionChipOrderWithDisplayedCards()}),this.listenOn(window,"solutionMatchesFromAssistant",e=>{this._applyAssistantSolutionMatches(e.detail)})}static{this.properties={solutionsCount:9,_isLoading:16,_filterOpen:16,_filters:16,_isMobile:16,_translations:16}}static{this.styles=O}willUpdate(e){e.has("_isMobile")&&(this._filterOpen=!this._isMobile)}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async searchSolutions(e){if(this._allSolutionsPanelRef.value.setSearchOptions(e),"industry"in e||"domain"in e){e.displayValue=e.domain||e.industry;let t=e.industry?Object.entries(u).find(([,s])=>s===e.industry)?.[0]:void 0,i=e.domain?Object.entries(f).find(([,s])=>s===e.domain)?.[0]:void 0;e.industry=t||"",e.domain=i||"",e.value=i||t||"",this._solutionsFilterPanelRef.value.changeIndustryFilter(e.industry,e.domain,e.displayValue,!0)}else("searchTerm"in e||"sortType"in e)&&("searchTerm"in e&&(this._filters.searchTerm=e.searchTerm),this._allSolutionsPanelRef.value?.searchSolutions(e))}async load(){this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(i=>{if(i.type==="attributes"&&i.attributeName==="tabindex"){let s=i.target;s.classList.contains("content-wrapper")&&s.tabIndex===0&&(s.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._isMobile?"justify-content-end":"",t=this._isLoading?"display-none":"";return a`<calcite-shell class=${`position-relative ${t}`}>${this._isMobile?"":this._getFilterPanel()}<h1 class="height-100"><calcite-panel class="border-override header-override panel-override z-index-1" ${r(this._mainPanelRef)}><div class=${c(this._isMobile?`mobile-stack ${e}`:`display-flex align-items-center header-content-wrapper ${e}`)} slot=header-content><calcite-label class="label-override">${this._translations.numberOfSolutions.replace("{{count}}",this.solutionsCount.toString())}</calcite-label><div class="chips-container">${this._renderChips()}${this._filters.categories&&this._filters.categories?.length>0&&a`<calcite-button appearance=transparent icon-start=reset kind=neutral @click=${()=>{this._filters={...this._filters,categories:[],searchTerm:""},this._emitSolutionMatchesFromAssistant([],[]),this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this.filterRemoved.emit([])}} .label=${this._translations.clearIndustryFilter}>${this._translations.clearIndustryFilter}</calcite-button>`||""}</div></div>${this._isMobile&&this._getFilterPanel()||""}${this._getSolutionsAllPanel()}</calcite-panel></h1></calcite-shell>`}_emitSolutionMatchesFromAssistant(e,t){window.dispatchEvent(new CustomEvent("solutionMatchesFromAssistant",{detail:{solutionIds:e,solutionTitles:t},bubbles:!0,composed:!0}))}_getFilterPanel(){let e=this._filterOpen?{display:"flex"}:"";return this._isMobile?a`<calcite-panel class=${`border-none ${this._filterOpen?"background-override":"filter background-override"}`} id=solutions-all-shell-panel-start style=${h(e)}><solutions-filter-panel class="height-100" @applyFilter=${t=>{this._filterApplied(t.detail)}} ${r(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel>`:a`<calcite-shell-panel class="filter background-override filter-width-350" id=solutions-all-shell-panel-start slot=panel-start style=${h(e)}><calcite-panel class="border-none"><solutions-filter-panel class="height-100" @applyFilter=${t=>{this._filterApplied(t.detail)}} ${r(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel></calcite-shell-panel>`}_getSolutionsAllPanel(){let e=this._isMobile&&this._filterOpen?{display:"none"}:"";return a`<solutions-all-panel @cardsFetched=${this._updateSolutionCount} style=${h(e)} ${r(this._allSolutionsPanelRef)}></solutions-all-panel>`}_renderChips(){if(!this._filters.categories)return;let e=this._filters.categories.filter(t=>t.type==="industry"||t.type==="domain"||t.type==="solution");if(e.length!==0)return a`<calcite-chip-group class="chip-group" .label=${this._translations.appliedFilters}>${this._filters.displayValue&&this._filters.displayValue!==""?R(`${this._filters.displayValue}`,a`<calcite-chip appearance=outline-fill class=${c(this._isMobile?"responsive-chip":"padding-start responsive-chip")} closable .label=${this._filters.displayValue??""} @calciteChipClose=${()=>this._chipClosed(this._filters.displayValue,"solution")} .value=${this._filters.displayValue}>${this._filters.displayValue}</calcite-chip>`):F(e,t=>`${t.type}:${t.value}`,t=>a`<calcite-chip appearance=outline-fill class=${c(this._isMobile?"responsive-chip":"padding-start responsive-chip")} closable .label=${t.displayValue} @calciteChipClose=${()=>this._chipClosed(t.displayValue,t.type)} .value=${t.displayValue}>${t.displayValue}</calcite-chip>`)}</calcite-chip-group>`}_updateSolutionCount(e){this.solutionsCount=e.detail}_syncSolutionChipOrderWithDisplayedCards(){if(!this._filters.categories?.length)return;let e=this._filters.categories.filter(l=>l.type==="solution");if(e.length<=1)return;let t=this._allSolutionsPanelRef.value?.getDisplayedSolutionIds?.()??[];if(!t.length)return;let i=new Map;t.forEach((l,p)=>{i.set(l,p)});let s=[...e].sort((l,p)=>{let m=i.get(String(l.value)),b=i.get(String(p.value)),T=m===void 0?Number.MAX_SAFE_INTEGER:m,M=b===void 0?Number.MAX_SAFE_INTEGER:b;return T-M}),o=this._filters.categories.filter(l=>l.type!=="solution");this._filters={...this._filters,categories:[...o,...s]}}_chipClosed(e,t){if(this._filters.categories){if(t==="solution"){this._filters.categories=[],this._emitSolutionMatchesFromAssistant([],[]),this._filters={...this._filters,searchTerm:""},this._allSolutionsPanelRef.value?.searchSolutions();return}if(t==="industry")this._filters.categories=[];else{let i=this._filters.categories.filter(s=>s.displayValue!==e&&s.type!==t);this._filters.categories=i}this._filters.categories.length>0?this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories):this._filters.searchTerm!==""?(this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this._allSolutionsPanelRef.value?.searchSolutions({searchTerm:this._filters.searchTerm})):this._allSolutionsPanelRef.value?.searchSolutions(),this.filterRemoved.emit(this._filters.categories)}}_applyAssistantSolutionMatches(e){let t=Array.isArray(e?.solutionIds)?e.solutionIds:[],i=Array.isArray(e?.solutionTitles)?e.solutionTitles:[],s=t.map((o,l)=>({type:"solution",value:o,displayValue:i[l]??o}));this._filters={categories:s,searchTerm:"",displayValue:this._translations.aiAssistantResults},this.filterRemoved.emit([])}_toggleFilter(){this._filterOpen=!this._filterOpen}_logFilterTelemetry(e){if((e.type==="industry"||e.type==="domain")&&e.industry){let t=[u[e.industry]];if(e.domain){let i=f[e.domain];t.push(i)}this._telemetry?.logEvent({category:_.ALL_SOLUTIONS,action:"Filter",dimensions:t})}}_filterApplied(e,t){if(this._filters.categories)if(e){let i=e;if("displayValue"in e)this._filters.categories.push(e),this._logFilterTelemetry(e);else if(Array.isArray(e)&&e.length>0){e.length>=2&&(i=[e[e.length-1]]),this._filters={categories:e,searchTerm:this._filters.searchTerm};let s=e[e.length-1];s&&this._logFilterTelemetry(s)}if("searchTerm"in i&&(this._filters.searchTerm=i.searchTerm,t&&i.searchTerm)){this._telemetry?.logEvent({category:_.ALL_SOLUTIONS,action:"Search",dimensions:[i.searchTerm]});return}this._allSolutionsPanelRef.value?.searchSolutions(i)}else this._filters.categories=[],this._allSolutionsPanelRef.value?.searchSolutions()}};w("solutions-all-shell",g);return g},b)