@esri/solutions-components 0.10.35 → 0.10.37

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +1 -0
  2. package/dist/cjs/calcite-action-pad_2.cjs.entry.js +2 -2
  3. package/dist/cjs/calcite-alert_5.cjs.entry.js +3 -3
  4. package/dist/cjs/calcite-block_5.cjs.entry.js +2 -2
  5. package/dist/cjs/card-manager_3.cjs.entry.js +2 -2
  6. package/dist/cjs/{constants-0a4fc296.js → constants-51cf394f.js} +57 -1
  7. package/dist/cjs/crowdsource-manager.cjs.entry.js +25 -29
  8. package/dist/cjs/{downloadUtils-20637f89.js → downloadUtils-76bc7e30.js} +6 -5
  9. package/dist/cjs/feature-list.cjs.entry.js +3 -3
  10. package/dist/cjs/{helpers-415179ad.js → helpers-afcac967.js} +1 -1
  11. package/dist/cjs/{index.es-a242cb45.js → index.es-8336efed.js} +2 -2
  12. package/dist/cjs/instant-apps-app-guide.cjs.entry.js +26 -13
  13. package/dist/cjs/instant-apps-export.cjs.entry.js +1086 -59
  14. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +8 -4
  15. package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +10 -5
  16. package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +1 -1
  17. package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +52 -12
  18. package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +9 -3
  19. package/dist/cjs/instant-apps-landing-page.cjs.entry.js +19 -13
  20. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +3 -2
  21. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +1 -1
  22. package/dist/cjs/instant-apps-measurement.cjs.entry.js +2 -2
  23. package/dist/cjs/instant-apps-popover.cjs.entry.js +1 -1
  24. package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +1 -1
  25. package/dist/cjs/instant-apps-sign-in.cjs.entry.js +13 -9
  26. package/dist/cjs/instant-apps-splash.cjs.entry.js +1 -1
  27. package/dist/cjs/instant-apps-time-filter.cjs.entry.js +11 -9
  28. package/dist/cjs/loader.cjs.js +1 -1
  29. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  30. package/dist/cjs/{popupUtils-d477705b.js → popupUtils-bc762034.js} +1 -1
  31. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  32. package/dist/cjs/solution-item-accordion.cjs.entry.js +7 -3
  33. package/dist/cjs/solutions-components.cjs.js +1 -1
  34. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +27 -29
  35. package/dist/collection/components/map-legend/map-legend.js +1 -0
  36. package/dist/collection/components/solution-item-accordion/solution-item-accordion.js +7 -3
  37. package/dist/collection/demos/solution-item-accordion.html +32 -0
  38. package/dist/collection/utils/downloadUtils.js +5 -3
  39. package/dist/collection/utils/downloadUtils.ts +6 -3
  40. package/dist/collection/utils/test/downloadUtils.spec.tsx +10 -12
  41. package/dist/components/crowdsource-manager.js +26 -29
  42. package/dist/components/downloadUtils.js +5 -4
  43. package/dist/components/instant-apps-app-guide.js +28 -14
  44. package/dist/components/instant-apps-export.js +1119 -76
  45. package/dist/components/instant-apps-interactive-legend-classic2.js +8 -4
  46. package/dist/components/instant-apps-interactive-legend-count2.js +6 -3
  47. package/dist/components/instant-apps-interactive-legend-layer-element-caption2.js +5 -2
  48. package/dist/components/instant-apps-interactive-legend-legend-element-caption2.js +52 -12
  49. package/dist/components/instant-apps-interactive-legend.js +13 -4
  50. package/dist/components/instant-apps-landing-page.js +19 -13
  51. package/dist/components/instant-apps-language-switcher.js +3 -1
  52. package/dist/components/instant-apps-language-translator2.js +57 -1
  53. package/dist/components/instant-apps-measurement-tool2.js +2 -2
  54. package/dist/components/instant-apps-measurement.js +2 -2
  55. package/dist/components/instant-apps-popover.js +1 -1
  56. package/dist/components/instant-apps-scoreboard.js +1 -1
  57. package/dist/components/instant-apps-sign-in2.js +14 -9
  58. package/dist/components/instant-apps-social-share2.js +2 -2
  59. package/dist/components/instant-apps-splash.js +1 -1
  60. package/dist/components/instant-apps-time-filter.js +11 -9
  61. package/dist/components/map-legend2.js +1 -0
  62. package/dist/components/solution-item-accordion.js +7 -3
  63. package/dist/components/store.js +1 -1
  64. package/dist/esm/basemap-gallery_7.entry.js +1 -0
  65. package/dist/esm/calcite-action-pad_2.entry.js +2 -2
  66. package/dist/esm/calcite-alert_5.entry.js +3 -3
  67. package/dist/esm/calcite-block_5.entry.js +2 -2
  68. package/dist/esm/card-manager_3.entry.js +2 -2
  69. package/dist/esm/{constants-045d6a1b.js → constants-886c7c2c.js} +57 -1
  70. package/dist/esm/crowdsource-manager.entry.js +25 -29
  71. package/dist/esm/{downloadUtils-e266e98d.js → downloadUtils-bc7a4ba1.js} +6 -5
  72. package/dist/esm/feature-list.entry.js +3 -3
  73. package/dist/esm/{helpers-f9bf9c0b.js → helpers-91087955.js} +1 -1
  74. package/dist/esm/{index.es-c5f258e2.js → index.es-0d189a34.js} +2 -2
  75. package/dist/esm/instant-apps-app-guide.entry.js +26 -13
  76. package/dist/esm/instant-apps-export.entry.js +1086 -59
  77. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +8 -4
  78. package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +10 -5
  79. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +1 -1
  80. package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +52 -12
  81. package/dist/esm/instant-apps-interactive-legend.entry.js +9 -3
  82. package/dist/esm/instant-apps-landing-page.entry.js +19 -13
  83. package/dist/esm/instant-apps-language-switcher.entry.js +3 -2
  84. package/dist/esm/instant-apps-language-translator.entry.js +1 -1
  85. package/dist/esm/instant-apps-measurement.entry.js +2 -2
  86. package/dist/esm/instant-apps-popover.entry.js +1 -1
  87. package/dist/esm/instant-apps-scoreboard.entry.js +1 -1
  88. package/dist/esm/instant-apps-sign-in.entry.js +13 -9
  89. package/dist/esm/instant-apps-splash.entry.js +1 -1
  90. package/dist/esm/instant-apps-time-filter.entry.js +11 -9
  91. package/dist/esm/loader.js +1 -1
  92. package/dist/esm/map-select-tools_3.entry.js +2 -2
  93. package/dist/esm/{popupUtils-4570096e.js → popupUtils-03dc398a.js} +1 -1
  94. package/dist/esm/public-notification.entry.js +2 -2
  95. package/dist/esm/solution-item-accordion.entry.js +7 -3
  96. package/dist/esm/solutions-components.js +1 -1
  97. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-app-guide/instant-apps-app-guide.css +0 -5
  98. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-export/instant-apps-export.css +4 -0
  99. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-classic/instant-apps-interactive-legend-classic.css +14 -0
  100. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-count/instant-apps-interactive-legend-count.css +9 -0
  101. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-layer-element-caption/instant-apps-interactive-legend-layer-element-caption.css +5 -3
  102. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-legend-element-caption/instant-apps-interactive-legend-legend-element-caption.css +29 -0
  103. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-landing-page/instant-apps-landing-page.css +8 -0
  104. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-sign-in/instant-apps-sign-in.css +22 -0
  105. package/dist/solutions-components/demos/solution-item-accordion.html +32 -0
  106. package/dist/solutions-components/{p-cb3199f9.entry.js → p-04ab956c.entry.js} +1 -1
  107. package/dist/solutions-components/p-1e14b3d0.entry.js +6 -0
  108. package/dist/solutions-components/p-2542d5c9.entry.js +6 -0
  109. package/dist/solutions-components/{p-70ecc979.entry.js → p-374ddead.entry.js} +1 -1
  110. package/dist/solutions-components/{p-146acd9a.entry.js → p-3fc18283.entry.js} +1 -1
  111. package/dist/solutions-components/p-43699470.entry.js +6 -0
  112. package/dist/solutions-components/p-5585dcd3.entry.js +6 -0
  113. package/dist/solutions-components/{p-3a513c67.entry.js → p-5b3c0418.entry.js} +1 -1
  114. package/dist/solutions-components/{p-f7e7b830.entry.js → p-6438d1ea.entry.js} +1 -1
  115. package/dist/solutions-components/{p-a568af9f.js → p-6f606cdb.js} +1 -1
  116. package/dist/solutions-components/p-720de4db.entry.js +6 -0
  117. package/dist/solutions-components/p-750b3277.entry.js +6 -0
  118. package/dist/solutions-components/p-8779ee41.entry.js +6 -0
  119. package/dist/solutions-components/p-90fc786f.entry.js +6 -0
  120. package/dist/solutions-components/p-97fe6ec5.entry.js +6 -0
  121. package/dist/solutions-components/{p-43165ebd.entry.js → p-9c170b30.entry.js} +1 -1
  122. package/dist/solutions-components/{p-b4c49411.entry.js → p-9c4fef09.entry.js} +1 -1
  123. package/dist/solutions-components/p-a5b751e2.entry.js +6 -0
  124. package/dist/solutions-components/{p-89046451.entry.js → p-aac0c89c.entry.js} +1 -1
  125. package/dist/solutions-components/p-af573e0d.js +6 -0
  126. package/dist/solutions-components/p-bb8b1ee2.entry.js +6 -0
  127. package/dist/solutions-components/{p-b79f296d.entry.js → p-c48be45f.entry.js} +2 -2
  128. package/dist/solutions-components/p-ca3cbd29.entry.js +6 -0
  129. package/dist/solutions-components/p-cd482a33.js +21 -0
  130. package/dist/solutions-components/p-ceb1030b.js +6 -0
  131. package/dist/solutions-components/{p-b86b2664.entry.js → p-d2612c30.entry.js} +1 -1
  132. package/dist/solutions-components/{p-29047e77.entry.js → p-e1391389.entry.js} +1 -1
  133. package/dist/solutions-components/{p-588adf13.entry.js → p-e345f9c4.entry.js} +1 -1
  134. package/dist/solutions-components/p-f3b71784.entry.js +6 -0
  135. package/dist/solutions-components/{p-759d0beb.entry.js → p-f728af86.entry.js} +1 -1
  136. package/dist/solutions-components/{p-46c8015c.js → p-ff9e28d1.js} +30 -30
  137. package/dist/solutions-components/solutions-components.esm.js +1 -1
  138. package/dist/solutions-components/utils/downloadUtils.ts +6 -3
  139. package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +10 -12
  140. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +4 -7
  141. package/package.json +8 -7
  142. package/dist/solutions-components/p-07a194e6.entry.js +0 -6
  143. package/dist/solutions-components/p-14d78748.entry.js +0 -6
  144. package/dist/solutions-components/p-2360802a.js +0 -21
  145. package/dist/solutions-components/p-24e3f09f.entry.js +0 -6
  146. package/dist/solutions-components/p-3a33ef72.entry.js +0 -6
  147. package/dist/solutions-components/p-402301cb.js +0 -6
  148. package/dist/solutions-components/p-41a6f03d.entry.js +0 -6
  149. package/dist/solutions-components/p-4db86c5e.entry.js +0 -6
  150. package/dist/solutions-components/p-5eb9a413.entry.js +0 -6
  151. package/dist/solutions-components/p-750f234e.entry.js +0 -6
  152. package/dist/solutions-components/p-7e97d4d6.entry.js +0 -6
  153. package/dist/solutions-components/p-7eb5d31a.js +0 -6
  154. package/dist/solutions-components/p-90d2aadc.entry.js +0 -6
  155. package/dist/solutions-components/p-b78a4ce7.entry.js +0 -6
  156. package/dist/solutions-components/p-ecf642c2.entry.js +0 -6
  157. package/dist/solutions-components/p-efb4cb43.entry.js +0 -6
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{l as a}from"./p-4cd4cb85.js";async function n(a,n){var e,t,l;try{const r=null===(l=null===(t=null===(e=null==n?void 0:n.portalItem)||void 0===e?void 0:e.portal)||void 0===t?void 0:t.credential)||void 0===l?void 0:l.token,s={responseType:"json"};r&&(s.query={token:r});var g="cacheBuster="+Date.now();const u=`${n.url}?${g}`,i=await a(u,s);return Promise.resolve(i.data)}catch(a){console.error("Unable to get resource t9n data.")}}async function e(n){if(!n)return null;const[e]=await a(["esri/portal/PortalItemResource"]),t=await n.fetchResources({num:100}),l=`t9n/${null==n?void 0:n.id}.json`,g=new e({path:l,portalItem:n}),r=t.resources.filter((a=>a.resource.path===l));if(0!==r.length)return Promise.resolve(r[0].resource);{const a="application/json",e=new Blob([JSON.stringify({})],{type:a});try{await n.addResource(g,e);const a=await n.fetchResources(),t=`t9n/${null==n?void 0:n.id}.json`,l=a.resources.filter((a=>a.resource.path===t));return Promise.resolve(l[0].resource)}catch(a){return console.error("ERROR: ",a),Promise.reject(null)}}}const t={full:{ar:{language:"Arabic",translated:"عربي"},bg:{language:"Bulgarian",translated:"Български"},bs:{language:"Bosnian",translated:"Bosanski"},ca:{language:"Catalan",translated:"Català"},cs:{language:"Czech",translated:"čeština"},da:{language:"Danish",translated:"Dansk"},de:{language:"German",translated:"Deutsch"},el:{language:"Greek",translated:"Ελλάδα"},en:{language:"English",translated:"English"},es:{language:"Spanish",translated:"Español"},et:{language:"Estonian",translated:"Eesti"},fi:{language:"Finnish",translated:"Suomi"},fr:{language:"French",translated:"Français"},he:{language:"Hebrew",translated:"עברית"},hr:{language:"Croatian",translated:"Hrvatski"},hu:{language:"Hungarian",translated:"Magyar"},id:{language:"Indonesian",translated:"Bahasa Indonesia"},it:{language:"Italian",translated:"Italiano"},ja:{language:"Japanese",translated:"日本語"},ko:{language:"Korean",translated:"한국어"},lt:{language:"Lithuanian",translated:"Lietuvių"},lv:{language:"Latvian",translated:"Latviešu"},nb:{language:"Norwegian",translated:"Norsk"},nl:{language:"Dutch",translated:"Nederlands"},pl:{language:"Polish",translated:"Polski"},"pt-BR":{language:"Portuguese (Brazil)",translated:"Português (Brasil)"},"pt-PT":{language:"Portuguese (Portugal)",translated:"Português (Portugal)"},ro:{language:"Romanian",translated:"Română"},ru:{language:"Russian",translated:"Русский"},sk:{language:"Slovak",translated:"Slovenčina"},sl:{language:"Slovenian",translated:"Slovenščina"},sr:{language:"Serbian",translated:"Srpski"},sv:{language:"Swedish",translated:"Svenska"},th:{language:"Thai",translated:"ไทย"},tr:{language:"Turkish",translated:"Türkiye"},uk:{language:"Ukrainian",translated:"Україна"},vi:{language:"Vietnamese",translated:"Tiếng Việt"},"zh-CN":{language:"Simplified Chinese",translated:"简体中文"},"zh-HK":{language:"Traditional Chinese (Hong Kong)",translated:"繁體中文(香港)"},"zh-TW":{language:"Traditional Chinese (Taiwan)",translated:"繁體中文(台灣)"}},partial:{ab:{language:"Abkhaz",translated:"Аҧсуа"},aa:{language:"Afar",translated:"Afar"},af:{language:"Afrikaans",translated:"Afrikaans"},ak:{language:"Akan",translated:"Akan"},sq:{language:"Albanian",translated:"Shqip"},am:{language:"Amharic",translated:"አማርኛ"},an:{language:"Aragonese",translated:"Aragonés"},hy:{language:"Armenian",translated:"Հայերեն"},as:{language:"Assamese",translated:"অসমীয়া"},av:{language:"Avaric",translated:"авар мацӀ"},ae:{language:"Avestan",translated:"Avesta"},ay:{language:"Aymara",translated:"aymar aru"},az:{language:"Azerbaijani",translated:"azərbaycan dili"},bm:{language:"Bambara",translated:"bamanankan"},ba:{language:"Bashkir",translated:"Башҡорт теле"},eu:{language:"Basque",translated:"euskara"},be:{language:"Belarusian",translated:"Беларуская"},bn:{language:"Bengali",translated:"বাংলা"},bh:{language:"Bihari",translated:"भोजपुरी"},bi:{language:"Bislama",translated:"Bislama"},br:{language:"Breton",translated:"Brezhoneg"},my:{language:"Burmese",translated:"ဗမာစာ"},ch:{language:"Chamorro",translated:"Chamoru"},ce:{language:"Chechen",translated:"нохчийн мотт"},ny:{language:"Chichewa",translated:"chiCheŵa"},cu:{language:"Church Slavic",translated:"ѩзыкъ словѣньскъ"},cv:{language:"Chuvash",translated:"чӑваш чӗлхи"},kw:{language:"Cornish",translated:"Kernewek"},co:{language:"Corsican",translated:"corsu"},cr:{language:"Cree",translated:"ᓀᐦᐃᔭᐍᐏᐣ"},dv:{language:"Divehi",translated:"ދިވެހި"},eo:{language:"Esperanto",translated:"Esperanto"},ee:{language:"Ewe",translated:"Ɛʋɛgbɛ"},fo:{language:"Faroese",translated:"føroyskt"},fj:{language:"Fijian",translated:"Vosa Vakaviti"},ff:{language:"Fulah",translated:"Fulfulde"},gl:{language:"Galician",translated:"galego"},ka:{language:"Georgian",translated:"ქართული"},gn:{language:"Guarani",translated:"Avañe'ẽ"},gu:{language:"Gujarati",translated:"ગુજરાતી"},ht:{language:"Haitian",translated:"Kreyòl Ayisyen"},ha:{language:"Hausa",translated:"هَوُسَ"},hz:{language:"Herero",translated:"Otjiherero"},hi:{language:"Hindi",translated:"हिन्दी"},ho:{language:"Hiri Motu",translated:"Hiri Motu"},is:{language:"Icelandic",translated:"Íslenska"},io:{language:"Ido",translated:"Ido"},ig:{language:"Igbo",translated:"Asụsụ Igbo"},ia:{language:"Interlingua",translated:"Interlingua"},ie:{language:"Interlingue",translated:"Interlingue"},iu:{language:"Inuktitut",translated:"ᐃᓄᒃᑎᑐᑦ"},ip:{language:"Inupiaq",translated:"Iñupiaq"},ga:{language:"Irish",translated:"Gaeilge"},jv:{language:"Javanese",translated:"ꦧꦱꦗꦮ"},kl:{language:"Kalaallisut",translated:"kalaallisut"},kn:{language:"Kannada",translated:"ಕನ್ನಡ"},kr:{language:"Kanuri",translated:"Kanuri"},ks:{language:"Kashmiri",translated:"कश्मीरी"},kk:{language:"Kazakh",translated:"қазақ тілі"},km:{language:"Khmer",translated:"ខ្មែរ"},ki:{language:"Kikuyu",translated:"Gĩkũyũ"},rw:{language:"Kinyarwanda",translated:"Kinyarwanda"},rn:{language:"Kirundi",translated:"Ikirundi"},kv:{language:"Komi",translated:"коми кыв"},kg:{language:"Kongo",translated:"Kikongo"},ku:{language:"Kurdish",translated:"Kurdî"},kj:{language:"Kwanyama",translated:"Kuanyama"},ky:{language:"Kyrgyz",translated:"Кыргызча"},lo:{language:"Lao",translated:"ພາສາລາວ"},la:{language:"Latin",translated:"latine"},li:{language:"Limburgish",translated:"Limburgs"},ln:{language:"Lingala",translated:"Lingála"},lu:{language:"Luba-Katanga",translated:"Kiluba"},lg:{language:"Luganda",translated:"Luganda"},lb:{language:"Luxembourgish",translated:"Lëtzebuergesch"},mk:{language:"Macedonian",translated:"македонски јазик"},mg:{language:"Malagasy",translated:"fiteny malagasy"},ms:{language:"Malay",translated:"Bahasa Melayu"},ml:{language:"Malayalam",translated:"മലയാളം"},mt:{language:"Maltese",translated:"Malti"},gv:{language:"Manx",translated:"Gailck"},mi:{language:"Maori",translated:"te reo Māori"},mr:{language:"Marathi",translated:"मराठी"},mh:{language:"Marshallese",translated:"Kajin M̧ajeļ"},mn:{language:"Mongolian",translated:"Монгол хэл"},na:{language:"Nauru",translated:"Ekakairũ Naoero"},nv:{language:"Navajo",translated:"Diné bizaad"},ng:{language:"Ndonga",translated:"Owambo"},ne:{language:"Nepali",translated:"नेपाली"},nd:{language:"North Ndebele",translated:"isiNdebele"},se:{language:"Northern Sami",translated:"Davvisámegiella"},no:{language:"Norwegian",translated:"Norsk"},nn:{language:"Norwegian Nynorsk",translated:"Norsk nynorsk"},ii:{language:"Nuosu",translated:"ꆈꌠ꒿ Nuosuhxop"},oc:{language:"Occitan",translated:"occitan"},oj:{language:"Ojibwe",translated:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},or:{language:"Oriya",translated:"ଓଡ଼ିଆ"},om:{language:"Oromo",translated:"Afaan Oromoo"},os:{language:"Ossetian",translated:"ирон æвзаг"},pi:{language:"Pali",translated:"पाऴि"},pa:{language:"Panjabi",translated:"ਪੰਜਾਬੀ"},ps:{language:"Pashto",translated:"پښتو"},fa:{language:"Persian",translated:"فارسی"},qu:{language:"Quechua",translated:"Runa Simi"},rm:{language:"Romansh",translated:"rumantsch grischun"},sm:{language:"Samoan",translated:"gagana fa'a Samoa"},sg:{language:"Sango",translated:"yângâ tî sängö"},sa:{language:"Sanskrit",translated:"संस्कृतम्"},sc:{language:"Sardinian",translated:"sardu"},gd:{language:"Scottish Gaelic",translated:"Gàidhlig"},sn:{language:"Shona",translated:"chiShona"},sd:{language:"Sindhi",translated:"सिन्धी"},si:{language:"Sinhala",translated:"සිංහල"},so:{language:"Somali",translated:"Soomaaliga"},nr:{language:"South Ndebele",translated:"isiNdebele"},st:{language:"Southern Sotho",translated:"Sesotho"},su:{language:"Sundanese",translated:"Basa Sunda"},sw:{language:"Swahili",translated:"Kiswahili"},ss:{language:"Swati",translated:"SiSwati"},tl:{language:"Tagalog",translated:"Wikang Tagalog"},ty:{language:"Tahitian",translated:"Reo Tahiti"},tg:{language:"Tajik",translated:"тоҷикӣ"},ta:{language:"Tamil",translated:"தமிழ்"},tt:{language:"Tatar",translated:"татар теле"},te:{language:"Telugu",translated:"తెలుగు"},bo:{language:"Tibetan",translated:"བོད་ཡིག"},ti:{language:"Tigrinya",translated:"ትግርኛ"},to:{language:"Tonga",translated:"faka Tonga"},ts:{language:"Tsonga",translated:"Xitsonga"},tn:{language:"Tswana",translated:"Setswana"},tk:{language:"Turkmen",translated:"Türkmen"},tw:{language:"Twi",translated:"Twi"},ug:{language:"Uighur",translated:"Uyƣurqə"},ur:{language:"Urdu",translated:"اردو"},uz:{language:"Uzbek",translated:"O'zbek"},ve:{language:"Venda",translated:"Tshivenḓa"},vo:{language:"Volapük",translated:"Volapük"},wa:{language:"Walloon",translated:"walon"},cy:{language:"Welsh",translated:"Cymraeg"},fy:{language:"Western Frisian",translated:"Frysk"},wo:{language:"Wolof",translated:"Wollof"},xh:{language:"Xhosa",translated:"isiXhosa"},yi:{language:"Yiddish",translated:"ייִדיש"},yo:{language:"Yoruba",translated:"Yorùbá"},za:{language:"Zhuang",translated:"Saɯ cueŋƅ"},zu:{language:"Zulu",translated:"isiZulu"}}};export{t as L,n as f,e as g}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,c as o,h as e,H as i,g as a}from"./p-4e6eb06e.js";import{g as l}from"./p-5ff711ee.js";import"./p-4cd4cb85.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-ac122d9e.js";const s=class{constructor(e){t(this,e),this.measureActive=o(this,"measureActive",7),this.messages=void 0,this.view=void 0,this.areaUnit=void 0,this.linearUnit=void 0,this.coordinateFormat=void 0,this.activeToolType=void 0,this.closable=!1}async componentWillLoad(){l(this)}componentDidLoad(){}render(){var t;return e(i,{key:"843dd716e3f9b125044afd9a2919a60b937ae8b0"},e("calcite-panel",{key:"45dd9e43decdcdc0526139938751d727bd73b3e0",heading:null===(t=null==this?void 0:this.messages)||void 0===t?void 0:t.label,closable:this.closable},e("div",{key:"beb440bfbb87cd00189630e442aabe97a1e83d9e"},this.renderActionPad()),this.renderMeasureToolPanel()))}renderMeasureToolPanel(){const{view:t,coordinateFormat:o,areaUnit:i,linearUnit:a,activeToolType:l}=this;return e("calcite-panel",{class:"instant-apps-measurement__content"},e("instant-apps-measurement-tool",{ref:t=>{this.measureTool=t},view:t,measureConfiguration:{coordinateFormat:o,areaUnit:i,linearUnit:a,activeToolType:l}}))}renderActionPad(){const{messages:t,activeToolType:o}=this;return e("calcite-action-pad",{"expand-disabled":!0,layout:"horizontal",position:"end"},e("calcite-action",{class:"distance"===o?"active-tool":"",text:null==t?void 0:t.line,icon:"measure",scale:"m","data-value":"distance",onClick:this._handleToolClick.bind(this)},e("calcite-tooltip",{"close-on-click":!0,placement:"bottom",slot:"tooltip"},null==t?void 0:t.line)),e("calcite-action",{class:"area"===o?"active-tool":"",text:null==t?void 0:t.area,scale:"m",icon:"measure-area","data-value":"area",onClick:this._handleToolClick.bind(this)},e("calcite-tooltip",{"close-on-click":!0,placement:"bottom",slot:"tooltip"},null==t?void 0:t.area)),e("calcite-action",{class:"point"===o?"active-tool":"",text:null==t?void 0:t.point,scale:"m",icon:"pin-plus","data-value":"point",onClick:this._handleToolClick.bind(this)},e("calcite-tooltip",{"close-on-click":!0,placement:"bottom",slot:"tooltip"},null==t?void 0:t.point)),e("calcite-action",{text:null==t?void 0:t.clear,scale:"m",icon:"trash","data-value":"clear",onClick:this._handleToolClick.bind(this)},e("calcite-tooltip",{"close-on-click":!0,placement:"bottom",slot:"tooltip"},null==t?void 0:t.clear)))}_handleToolClick(t){var o,e,i,a;if(!(null==this?void 0:this.measureTool))return;const l=null===(o=null==t?void 0:t.target)||void 0===o?void 0:o.dataset.value;this.measureTool.activeTool=l;const s=document.getElementsByClassName("active-tool");for(let t=0;t<(null==s?void 0:s.length);t++)null===(i=null===(e=s[t])||void 0===e?void 0:e.classList)||void 0===i||i.remove("active-tool");null===(a=null==t?void 0:t.target)||void 0===a||a.classList.add("active-tool"),this.measureActive.emit(void 0!==l&&"clear"!==l)}get el(){return a(this)}};s.style=".sc-instant-apps-measurement-h .sc-instant-apps-measurement.sc-instant-apps-measurement{background:var(--calcite-color-foreground-1)}.sc-instant-apps-measurement-h .active-tool.sc-instant-apps-measurement{--calcite-color-foreground-1:#c7eaff}";export{s as instant_apps_measurement}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as e,f as t,h as i,g as n,c as s}from"./p-4e6eb06e.js";import{g as a,m as l,s as o,i as c,a as d,z as r,n as p,l as h,o as v,u as g,p as u,q as f}from"./p-402301cb.js";import{l as m}from"./p-4cd4cb85.js";import"./p-dc9d4be3.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const y=class{constructor(t){e(this,t),this.legendvm=void 0,this.featureCount=void 0,this.activeLayerInfo=void 0,this.messages=void 0,this.isChild=!1,this.expanded=!0}layerCaptionElementExpandUpdatedEmitted(){var e;this.expanded=!!(null===(e=this.layerCaption)||void 0===e?void 0:e.expanded)}async componentWillLoad(){new MutationObserver((()=>{t(this.el)})).observe(this.el,{attributes:!0})}render(){return i("div",{key:"ab9a4911afa5f1021f3270c4fec409a708e2ec51",style:{borderLeft:"1px solid var(--calcite-color-border-3)"},class:"esri-legend__service esri-legend__group-layer"},i("instant-apps-interactive-legend-layer-element-caption",{key:"bc80abe473c1b47920a78b072033d5b214f7822c",ref:e=>this.layerCaption=e,class:a(this.el),legendvm:this.legendvm,"feature-count":this.featureCount,activeLayerInfo:this.activeLayerInfo,messages:this.messages,isChild:this.isChild}),i("div",{key:"cf6dc1620eb0a95430129b9d414a9f6b893b61c2",class:"esri-legend__group-content "+(!1===this.expanded?"hide":"show")},i("slot",{key:"f346b52020e3cf4e3a072fdfa17a3762676aba53",name:"content"})))}get el(){return n(this)}};y.style=".sc-instant-apps-interactive-legend-group-legend-element-h{display:block}.sc-instant-apps-interactive-legend-group-legend-element-h .esri-legend__service.sc-instant-apps-interactive-legend-group-legend-element{margin:0;padding:0}.sc-instant-apps-interactive-legend-group-legend-element-h .hide.sc-instant-apps-interactive-legend-group-legend-element{display:none}";const b=class{constructor(t){e(this,t),this.legendvm=void 0,this.featureCount=void 0,this.activeLayerInfo=void 0,this.messages=void 0,this.isChild=void 0,this.expanded=!0}layerCaptionElementExpandUpdatedEmitted(){this.expanded=this.layerCaption.expanded}componentWillLoad(){new MutationObserver((()=>{t(this.el)})).observe(this.el,{attributes:!0})}render(){var e,t;return i("div",{key:"45305a415db8ba0a08ab69de820ff6b8711e1cee",style:{borderLeft:"1px solid var(--calcite-color-border-3)"},class:"esri-legend__service"+(this.activeLayerInfo.parent?" esri-legend__group-layer-child":""),tabIndex:0},i("instant-apps-interactive-legend-layer-element-caption",{key:"7babce8571540883bca9e0ff07c0a152cbb30fbb",ref:e=>this.layerCaption=e,legendvm:this.legendvm,"feature-count":this.featureCount,activeLayerInfo:this.activeLayerInfo,messages:this.messages,isChild:!!this.isChild,class:a(this.el)}),i("div",{key:"c021d9c441c407d5fac6f246eb9f4b6ce76bcaa5",id:`${null===(t=null===(e=this.activeLayerInfo)||void 0===e?void 0:e.layer)||void 0===t?void 0:t.id}-legend-layer`,class:"esri-legend__layer"+(!1===this.expanded?" hide":" show")},i("slot",{key:"761834066d924654c87a39601c1670625c88d863",name:"content"})))}get el(){return n(this)}};b.style=".sc-instant-apps-interactive-legend-layer-element-h{display:block}.sc-instant-apps-interactive-legend-layer-element-h .esri-legend__service.sc-instant-apps-interactive-legend-layer-element{padding:0}.sc-instant-apps-interactive-legend-layer-element-h .esri-legend__layer-body.sc-instant-apps-interactive-legend-layer-element,.sc-instant-apps-interactive-legend-layer-element-h .esri-legend__layer.sc-instant-apps-interactive-legend-layer-element,.sc-instant-apps-interactive-legend-layer-element-h .esri-legend__layer-table.sc-instant-apps-interactive-legend-layer-element,.sc-instant-apps-interactive-legend-layer-element-h .esri-legend__group-layer-child.sc-instant-apps-interactive-legend-layer-element,.sc-instant-apps-interactive-legend-layer-element-h .esri-legend__layer-child-table.sc-instant-apps-interactive-legend-layer-element{margin:0;overflow:hidden}.sc-instant-apps-interactive-legend-layer-element-h .hide.sc-instant-apps-interactive-legend-layer-element{display:none}";const _=class{constructor(t){e(this,t),this.activeLayerInfo=void 0,this.isSizeRamp=void 0,this.isChild=void 0,this.isColorRamp=void 0,this.isRelationshipRamp=void 0,this.isInteractive=void 0,this.zoomTo=void 0,this.legendElement=void 0,this.titleText=void 0,this.legendvm=void 0,this.legendElementIndex=void 0,this.messages=void 0,this.expanded=!0}legendLayerExpandUpdatedEmitted(){this.expanded=this.legendLayerCaption.expanded}render(){var e,t,n,s,a,c,d,r,p;const h=this.isChild?"esri-legend__layer-child-table":"esri-legend__layer-table",v=1===(null===(t=null===(e=this.legendElement)||void 0===e?void 0:e.infos)||void 0===t?void 0:t.length)&&!(null===(a=null===(s=null===(n=this.activeLayerInfo)||void 0===n?void 0:n.layer)||void 0===s?void 0:s.renderer)||void 0===a?void 0:a.field),g=!this.isSizeRamp&&this.isChild||this.isColorRamp?"":" esri-legend__layer-table--size-ramp",u=this.isInteractive?"":" instant-apps-interactive-legend__non-interactive",f=l(this.activeLayerInfo)?" instant-apps-interactive-legend__nested-unique-symbol":"";let m=!(!v||this.expanded||this.zoomTo)||this.expanded;return this.isRelationshipRamp&&(m=o.get("relationshipRampExpandStates")[this.activeLayerInfo.layer.id]),i("div",{key:"cd76a15dfd77c630708e61535a4d22d66385a4bf",class:`${h}${g}${u}${f}`},i("div",{key:"24eb28f5fa505d1d4471a750b5273b34af2f3428",id:`${null===(d=null===(c=this.activeLayerInfo)||void 0===c?void 0:c.layer)||void 0===d?void 0:d.id}-legend-element-caption`,class:this.isRelationshipRamp||!this.titleText&&!this.zoomTo&&v?"hide":"show"},i("instant-apps-interactive-legend-legend-element-caption",{key:"5ffd04439d1c99251e358afcf077628a780c8e40",ref:e=>this.legendLayerCaption=e,legendvm:this.legendvm,activeLayerInfo:this.activeLayerInfo,layer:this.activeLayerInfo.layer,titleText:this.titleText,legendElement:this.legendElement,legendElementIndex:this.legendElementIndex,zoomTo:this.zoomTo,isInteractive:this.isInteractive,messages:this.messages})),i("div",{key:"content",id:`${null===(p=null===(r=this.activeLayerInfo)||void 0===r?void 0:r.layer)||void 0===p?void 0:p.id}-legend-element-content-${this.legendElementIndex}`,class:!1===m?"hide":"show"},i("slot",{key:"c95e14737a003f85f7c494e6d30d9f946bef464a",name:"content"})))}};_.style=".sc-instant-apps-interactive-legend-legend-element-h{display:block}.sc-instant-apps-interactive-legend-legend-element-h .esri-legend__layer-table.sc-instant-apps-interactive-legend-legend-element,.sc-instant-apps-interactive-legend-legend-element-h .instant-apps-interactive-legend__nested-unique-symbol.sc-instant-apps-interactive-legend-legend-element{margin:0}.sc-instant-apps-interactive-legend-legend-element-h .hide.sc-instant-apps-interactive-legend-legend-element{display:none}";const L=class{constructor(t){e(this,t),this.showAllSelectedEvent=s(this,"showAllSelected",7),this.legendLayerExpandUpdatedEvent=s(this,"legendLayerExpandUpdated",7),this.legendvm=void 0,this.activeLayerInfo=void 0,this.layer=void 0,this.titleText=void 0,this.legendElementIndex=void 0,this.zoomTo=void 0,this.isInteractive=void 0,this.legendElement=void 0,this.expanded=!0,this.messages=void 0}render(){var e,t,n,s;const a=l(this.activeLayerInfo),o=p(this.activeLayerInfo),{expanded:c}=this;return a&&!this.titleText?null:i("div",{class:"esri-legend__layer-caption"},i("calcite-action",{onClick:this.toggleExpanded(),icon:!1===c?"chevron-up":"chevron-down",appearance:"transparent",text:!1===c?null===(e=this.messages)||void 0===e?void 0:e.expand:null===(t=this.messages)||void 0===t?void 0:t.collapse,label:!1===c?null===(n=this.messages)||void 0===n?void 0:n.expand:null===(s=this.messages)||void 0===s?void 0:s.collapse,scale:"s"}),this.isInteractive||o?this.renderLegendElementCaptionControls():null,this.titleText?i("span",{class:"instant-apps-interactive-legend__legend-layer-caption-text",title:this.titleText},this.titleText):null)}renderLegendElementCaptionControls(){var e,t,n,s,a,l,o,d,r,p;const h=this.titleText?"":" instant-apps-interactive-legend__layer-caption-btn-container--no-text",v=(null===(s=null===(n=null===(e=c.data)||void 0===e?void 0:e[null===(t=this.layer)||void 0===t?void 0:t.id])||void 0===n?void 0:n.categories)||void 0===s?void 0:s.size)>1?i("calcite-button",{key:"show-all-button",id:"showAll",onClick:this.handleShowAll(),"icon-start":"list-check-all",appearance:"outline",round:!0,label:null===(a=this.messages)||void 0===a?void 0:a.showAll}):null,g=i("calcite-button",{key:"zoom-to-button",id:"zoomTo",onClick:this.handleZoomTo(),"icon-start":"magnifying-glass-plus",appearance:"outline",round:!0,label:null===(l=this.messages)||void 0===l?void 0:l.zoomTo});return i("div",{key:"layer-caption-btn-container",class:`instant-apps-interactive-legend__layer-caption-btn-container${h}`},v,i("calcite-tooltip",{"reference-element":"showAll",placement:"top",label:null===(o=this.messages)||void 0===o?void 0:o.showAll},null===(d=this.messages)||void 0===d?void 0:d.showAll),this.zoomTo?[g,i("calcite-tooltip",{"reference-element":"zoomTo",placement:"top",label:null===(r=this.messages)||void 0===r?void 0:r.zoomTo},null===(p=this.messages)||void 0===p?void 0:p.zoomTo)]:null)}toggleExpanded(){return()=>{var e,t;this.expanded=!this.expanded,this.legendLayerExpandUpdatedEvent.emit(),(null===(t=null===(e=this.activeLayerInfo)||void 0===e?void 0:e.legendElements)||void 0===t?void 0:t.filter((e=>"relationship-ramp"===e.type))).length>0&&o.set("relationshipRampExpandStates",Object.assign(Object.assign({},c.relationshipRampExpandStates),{[this.activeLayerInfo.layer.id]:this.expanded}))}}handleZoomTo(){return()=>{const e=h(this.layer),t=d(e,this.legendElement);r(e,this.legendvm.view,t)}}handleShowAll(){return()=>{var e,t;const i=null===(e=c.data)||void 0===e?void 0:e[null===(t=this.layer)||void 0===t?void 0:t.id];d(i,this.legendElement)?(()=>{const e=v(i,this.legendElement.title);g({intLegendLayerData:e,layerId:this.layer.id})})():((()=>{const e=u(i);g({intLegendLayerData:e,layerId:this.layer.id})})(),this.showAllSelectedEvent.emit())}}get el(){return n(this)}};L.style=".sc-instant-apps-interactive-legend-legend-element-caption-h{display:block;--instant-apps-interactive-legend-heading-font-size:1rem;--instant-apps-interactive-legend-heading-font-weight:normal;--instant-apps-interactive-legend-caption-font-weight:normal;--instant-apps-interactive-legend-secondary-color:var(--calcite-color-text-1);--instant-apps-interactive-legend-field-name-font-size:1rem;--instant-apps-interactive-legend-total-feature-count-font-size:0.875rem;--instant-apps-interactive-legend-info-font-size:0.875rem;--instant-apps-interactive-legend-info-item-background--selected:#c7ebff;--instant-apps-interactive-legend-info-item-color--selected:var(--calcite-color-text-2);--instant-apps-interactive-legend-secondary-background-color:var(--calcite-color-background);--instant-apps-interactive-legend-ui-padding:15px 10px}.sc-instant-apps-interactive-legend-legend-element-caption-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-legend-element-caption{display:flex;align-items:center;font-size:var(--instant-apps-interactive-legend-field-name-font-size);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}.sc-instant-apps-interactive-legend-legend-element-caption-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-legend-element-caption calcite-action.sc-instant-apps-interactive-legend-legend-element-caption{margin-left:20px}.sc-instant-apps-interactive-legend-legend-element-caption-h .instant-apps-interactive-legend__legend-layer-caption-text.sc-instant-apps-interactive-legend-legend-element-caption{display:inline-block;margin-left:5px;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;line-height:normal}.sc-instant-apps-interactive-legend-legend-element-caption-h .instant-apps-interactive-legend__layer-caption-btn-container.sc-instant-apps-interactive-legend-legend-element-caption{white-space:nowrap}.sc-instant-apps-interactive-legend-legend-element-caption-h .instant-apps-interactive-legend__layer-caption-btn-container.sc-instant-apps-interactive-legend-legend-element-caption calcite-button.sc-instant-apps-interactive-legend-legend-element-caption{margin:2px}.sc-instant-apps-interactive-legend-legend-element-caption-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-legend-element-caption{font-weight:var(--instant-apps-interactive-legend-caption-font-weight);padding:var(--instant-apps-interactive-legend-ui-padding)}html[dir=rtl] .sc-instant-apps-interactive-legend-legend-element-caption-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-legend-element-caption calcite-action.sc-instant-apps-interactive-legend-legend-element-caption{margin-left:unset;margin-right:20px}";const $=".esri-relationship-ramp--diamond__middle-column--ramp svg g",k=class{constructor(t){e(this,t),this.cellNodeCounter=0,this.filterMode=void 0,this.activeLayerInfo=void 0,this.legendElement=void 0,this.messages=void 0}applyInteractivity(){this.applyRelationshipRampInteractivity()}showAllSelectedEmitted(){const e=0===c.data[this.activeLayerInfo.layer.id].queryExpressions.length,t=this.relationshipRamp.querySelector($).children,i=t?Array.from(t):null;e&&(null==i||i.forEach((e=>{e.removeAttribute("stroke"),e.removeAttribute("stroke-width"),e.removeAttribute("stroke-opacity"),e.classList.remove("esri-interactive-legend--selected-cell")})))}async componentWillLoad(){const[e]=await m(["esri/symbols/support/symbolUtils"]);this.symbolUtils=e}render(){var e,t;return i("div",{key:"8b7054296e51e501b5378804dc6055acd113fbfa",ref:e=>{if(!(null==e?void 0:e.querySelector("relationshipStyles"))){const t=document.createElement("style");t.id="relationshipStyles",t.innerHTML="\n rect:hover {\n cursor: pointer;\n opacity: 0.8;\n }\n ",null==e||e.appendChild(t)}}},i("span",{key:"7cd336ef09492b5fc016657a61991f2f255a0b4a",class:"instant-apps-interactive-legend-relationship__instructional-text"},null===(t=null===(e=this.messages)||void 0===e?void 0:e.relationship)||void 0===t?void 0:t.instructionalText),this.renderRelationshipRamp())}renderRelationshipRamp(){var e;const t=(null===(e=this.activeLayerInfo)||void 0===e?void 0:e.layer).renderer,n=this.symbolUtils.renderRelationshipRampPreviewHTML(t);return i("div",{ref:e=>{this.relationshipRamp=e,this.applyRelationshipRampInteractivity()},key:"relationship-ramp-diamond",innerHTML:`${null==n?void 0:n.outerHTML}`})}applyRelationshipRampInteractivity(){if(!(this.relationshipRamp&&this.activeLayerInfo&&this.legendElement&&c.data))return;let e=setInterval((()=>{const t=this.relationshipRamp.querySelector($);t&&(clearInterval(e),this.setupRelationshipDrawingStyle(t.children))}),10)}setupRelationshipDrawingStyle(e){const t=e?Array.from(e):null;if(!t)return;t.map(((e,t)=>{var i,n;const s=(null===(n=null===(i=this.activeLayerInfo)||void 0===i?void 0:i.layer)||void 0===n?void 0:n.renderer).uniqueValueInfos;if(s[t]){const i=s[t].symbol.color;s.forEach(((t,n)=>{const s=t.symbol.color;i.r===s.r&&i.g===s.g&&i.b===s.b&&i.a===s.a&&this.setCellAttributes(e,n)})),e.classList.add("esri-interactive-legend__svg-rect-element")}}));const i=this.reorderCellNodes(t);this.attachFeatureIndexes(i),this.applyEventHandlers()}setCellAttributes(e,t){const i=this.activeLayerInfo.layer.renderer.uniqueValueInfos,n=this.generateIndexPattern(t);i[n]&&(e.setAttribute("data-color",`${i[n].symbol.color}`),e.setAttribute("data-cell-index",`${n}`),e.setAttribute("tabindex","0"))}generateIndexPattern(e){const{focus:t,numClasses:i}=this.legendElement;return"HL"===t?e:2===i?this.twoClasses(e,t):3===i?this.threeClasses(e,t):4===i?this.fourClasses(e,t):null}twoClasses(e,t){return"HH"===t||null===t?0===e||2===e?e+1:1===e||3===e?e-1:null:"LH"===t?0===e?e+3:1===e?e+1:2===e?e-1:3===e?e-3:4===e?e+0:null:"LL"===t?0===e||1===e?e+2:2===e||3===e?e-2:null:void 0}threeClasses(e,t){return"HH"===t||null===t?0===e||3===e||6===e?e+2:2===e||5===e||8===e?e-2:e:"LH"===t?0===e?e+8:1===e?e+6:2===e?e+4:3===e?e+2:5===e?e-2:6===e?e-4:7===e?e-6:8===e?e-8:e:"LL"===t?0===e||1===e||2===e?e+6:6===e||7===e||8===e?e-6:e:void 0}fourClasses(e,t){return"HH"===t||null===t?0===e||4===e||8===e||12===e?e+3:1===e||5===e||9===e||13===e?e+1:2===e||6===e||10===e||14===e?e-1:3===e||7===e||11===e||15===e?e-3:null:"LH"===t?0===e?e+15:1===e?e+13:2===e?e+11:3===e?e+9:4===e?e+7:5===e?e+5:6===e?e+3:7===e?e+1:8===e?e-1:9===e?e-3:10===e?e-5:11===e?e-7:12===e?e-9:13===e?e-11:14===e?e-13:15===e?e-15:null:"LL"===t?0===e||1===e||2===e||3===e?e+12:4===e||5===e||6===e||7===e?e+4:8===e||9===e||10===e||11===e?e-4:12===e||13===e||14===e||15===e?e-12:null:void 0}reorderCellNodes(e){const t=[];for(;this.cellNodeCounter<=e.length-1;)e.map((e=>{parseInt(e.getAttribute("data-cell-index"))===this.cellNodeCounter&&t.push(e)})),this.cellNodeCounter++;return this.cellNodeCounter=0,t}attachFeatureIndexes(e){const{focus:t,numClasses:i}=this.legendElement;"HH"===t||null===t?this.relationshipFocusIsHighHigh(e,i):"LL"===t?this.relationshipFocusIsLowLow(e,i):"LH"===t?this.relationshipFocusIsLowHigh(e,i):"HL"===t&&this.relationshipFocusIsHighLow(e,i),this.cellNodeCounter=0}relationshipFocusIsHighHigh(e,t){for(let i=t-1;i>=0;i--)for(let n=t-1;n>=0;n--)this.setDataAttributes(e,i,n,t),this.cellNodeCounter++}relationshipFocusIsLowLow(e,t){for(let i=0;i<t;i++)for(let n=0;n<t;n++)this.setDataAttributes(e,i,n,t),this.cellNodeCounter++}relationshipFocusIsLowHigh(e,t){for(let i=0;i<t;i++)for(let n=t-1;n>=0;n--)this.setDataAttributes(e,i,n,t),this.cellNodeCounter++}relationshipFocusIsHighLow(e,t){for(let i=t-1;i>=0;i--)for(let n=0;n<t;n++)this.setDataAttributes(e,n,i,t),this.cellNodeCounter++}setDataAttributes(e,t,i,n){const s=e[this.cellNodeCounter];2===n?this.twoClassAttributes(s,t,i):3===n?this.threeClassAttributes(s,t,i):this.fourClassAttributes(s,t,i)}twoClassAttributes(e,t,i){const{legendElement:n}=this;"HL"===n.focus?this.swapDataFeatureIndexes(e,t,i):this.setDataFeatureIndexes(e,t,i)}threeClassAttributes(e,t,i){const{legendElement:n}=this;1===this.cellNodeCounter||3===this.cellNodeCounter||5===this.cellNodeCounter||7===this.cellNodeCounter?"HL"===n.focus?this.swapDataFeatureIndexes(e,t,i):this.setDataFeatureIndexes(e,t,i):"HL"!==n.focus?this.setDataFeatureIndexes(e,t,i):this.swapDataFeatureIndexes(e,t,i)}fourClassAttributes(e,t,i){const{legendElement:n}=this,{focus:s}=n;1===this.cellNodeCounter||2===this.cellNodeCounter||4===this.cellNodeCounter||5===this.cellNodeCounter||7===this.cellNodeCounter||8===this.cellNodeCounter||10===this.cellNodeCounter||11===this.cellNodeCounter||13===this.cellNodeCounter||14===this.cellNodeCounter?"HL"===s?this.swapDataFeatureIndexes(e,t,i):this.setDataFeatureIndexes(e,t,i):"HL"!==s?this.setDataFeatureIndexes(e,t,i):this.swapDataFeatureIndexes(e,t,i)}setDataFeatureIndexes(e,t,i){e.setAttribute("data-feature-i",`${t}`),e.setAttribute("data-feature-j",`${i}`),this.setDataCellFocus(e,t,i)}swapDataFeatureIndexes(e,t,i){e.setAttribute("data-feature-i",`${i}`),e.setAttribute("data-feature-j",`${t}`),this.setDataCellFocus(e,i,t)}setDataCellFocus(e,t,i){const{numClasses:n}=this.legendElement;2===n?this.setDataCellFocusForTwoClasses(e,t,i):3===n?this.setDataCellFocusForThreeClasses(e,t,i):4===n&&this.setDataCellFocusForFourClasses(e,t,i)}setDataCellFocusForTwoClasses(e,t,i){0===t&&0===i?e.setAttribute("data-cell-focus","LL"):0===t&&1===i?e.setAttribute("data-cell-focus","LH"):1===t&&0===i?e.setAttribute("data-cell-focus","HL"):1===t&&1===i&&e.setAttribute("data-cell-focus","HH")}setDataCellFocusForThreeClasses(e,t,i){0===t&&0===i?e.setAttribute("data-cell-focus","LL"):0===t&&1===i?e.setAttribute("data-cell-focus","LM"):0===t&&2===i?e.setAttribute("data-cell-focus","LH"):1===t&&0===i?e.setAttribute("data-cell-focus","ML"):1===t&&1===i?e.setAttribute("data-cell-focus","MM"):1===t&&2===i?e.setAttribute("data-cell-focus","MH"):2===t&&0===i?e.setAttribute("data-cell-focus","HL"):2===t&&1===i?e.setAttribute("data-cell-focus","HM"):2===t&&2===i&&e.setAttribute("data-cell-focus","HH")}setDataCellFocusForFourClasses(e,t,i){0===t&&0===i?e.setAttribute("data-cell-focus","LL"):0===t&&1===i?e.setAttribute("data-cell-focus","LM1"):0===t&&2===i?e.setAttribute("data-cell-focus","LM2"):0===t&&3===i?e.setAttribute("data-cell-focus","LH"):1===t&&0===i?e.setAttribute("data-cell-focus","M1L"):1===t&&1===i?e.setAttribute("data-cell-focus","M1M1"):1===t&&2===i?e.setAttribute("data-cell-focus","M1M2"):1===t&&3===i?e.setAttribute("data-cell-focus","M1H"):2===t&&0===i?e.setAttribute("data-cell-focus","M2L"):2===t&&1===i?e.setAttribute("data-cell-focus","M2M1"):2===t&&2===i?e.setAttribute("data-cell-focus","M2M2"):2===t&&3===i?e.setAttribute("data-cell-focus","M2H"):3===t&&0===i?e.setAttribute("data-cell-focus","HL"):3===t&&1===i?e.setAttribute("data-cell-focus","HM1"):3===t&&2===i?e.setAttribute("data-cell-focus","HM2"):3===t&&3===i&&e.setAttribute("data-cell-focus","HH")}applyEventHandlers(){const e=document.querySelectorAll(".esri-interactive-legend__svg-rect-element");Array.from(e).map((e=>{const t=e.getAttribute("data-feature-i"),i=e.getAttribute("data-feature-j"),n=e.getAttribute("data-cell-focus");e.onclick=()=>{this.handleFilter(t,i,n),this.handleSelectedElement(e)},e.onkeydown=s=>{const{key:a}=s;("Enter"===a||"Space"===a)&&(this.handleFilter(t,i,n),this.handleSelectedElement(e))}}))}async handleFilter(e,t,i){var n,s,a,l,o;const d=this.activeLayerInfo.layer,{authoringInfo:r}=d.renderer,{field1:p,field2:h}=r,{queryExpressions:v,fLayerView:g}=c.data[this.activeLayerInfo.layer.id];if("relationship-ramp"===this.legendElement.type&&r&&p&&h){const c=this.generateExpressionParams(p,h,r,e,t,i),d=this.generateExpressionForRelationship(c);0===v.length?v[0]=d:-1===v.indexOf(d)?v.push(d):v.splice(v.indexOf(d),1);const u=v.join(" OR "),y=null!==(s=null===(n=null==g?void 0:g.filter)||void 0===n?void 0:n.timeExtent)&&void 0!==s?s:null,[b,_]=await m(["esri/layers/support/FeatureFilter","esri/layers/support/FeatureEffect"]);if("filter"===(null===(a=this.filterMode)||void 0===a?void 0:a.type))g.filter=new b({where:u,timeExtent:(null===(l=null==g?void 0:g.filter)||void 0===l?void 0:l.timeExtent)?g.filter.timeExtent:null});else if(null===(o=this.filterMode)||void 0===o?void 0:o.effect){const{includedEffect:e,excludedEffect:t}=this.filterMode.effect,i=await f(t,g,"excludedEffect"),n=await f(e,g,"includedEffect");g.featureEffect=new _({filter:new b({where:u,timeExtent:y}),includedEffect:n,excludedEffect:i})}}}generateExpressionParams(e,t,i,n,s,a){const l=[],o=e.field,c=t.field,d=e.classBreakInfos,r=t.classBreakInfos,p=i.field1.hasOwnProperty("normalizationField")?i.field1.normalizationField:null,h=i.field2.hasOwnProperty("normalizationField")?i.field2.normalizationField:null;return d.forEach(((e,t)=>{const i=[];r.forEach(((e,n)=>{i.push([d[t],r[n]])})),l.push(i)})),{data:l,i:n,j:s,field1:p?`(${o}/${p})`:`${o}`,field2:h?`(${c}/${h})`:`${c}`,focus:a}}generateExpressionForRelationship(e){const{focus:t,field1:i,field2:n,data:s,i:a,j:l}=e;return"LL"===t?`${i} >= ${s[a][l][0].minValue} AND ${i} <= ${s[a][l][0].maxValue} AND ${n} >= ${s[a][l][1].minValue} AND ${n} <= ${s[a][l][1].maxValue}`:"LM"===t||"LM1"===t||"LM2"===t||"LH"===t?`${i} >= ${s[a][l][0].minValue} AND ${i} <= ${s[a][l][0].maxValue} AND ${n} > ${s[a][l][1].minValue} AND ${n} <= ${s[a][l][1].maxValue}`:"ML"===t||"M1L"===t||"M2L"===t||"HL"===t?`${i} > ${s[a][l][0].minValue} AND ${i} <= ${s[a][l][0].maxValue} AND ${n} >= ${s[a][l][1].minValue} AND ${n} <= ${s[a][l][1].maxValue}`:`${i} > ${s[a][l][0].minValue} AND ${i} <= ${s[a][l][0].maxValue} AND ${n} > ${s[a][l][1].minValue} AND ${n} <= ${s[a][l][1].maxValue}`}handleSelectedElement(e){const t=e.classList;t.contains("esri-interactive-legend--selected-cell")?(e.removeAttribute("stroke"),e.removeAttribute("stroke-width"),e.removeAttribute("stroke-opacity"),t.remove("esri-interactive-legend--selected-cell")):(t.add("esri-interactive-legend--selected-cell"),e.setAttribute("stroke","black"),e.setAttribute("stroke-width","3px"),e.setAttribute("stroke-opacity","1"))}};k.style=".sc-instant-apps-interactive-legend-relationship-h{display:block}.sc-instant-apps-interactive-legend-relationship-h .instant-apps-interactive-legend-relationship__instructional-text.sc-instant-apps-interactive-legend-relationship{display:inline-block;width:100%;text-align:center;margin-bottom:10px;background-color:#d2e9f9}.calcite-mode-dark .sc-instant-apps-interactive-legend-relationship-h .instant-apps-interactive-legend-relationship__instructional-text.sc-instant-apps-interactive-legend-relationship{background-color:var(--calcite-color-brand);color:#151515}";export{y as instant_apps_interactive_legend_group_legend_element,b as instant_apps_interactive_legend_layer_element,_ as instant_apps_interactive_legend_legend_element,L as instant_apps_interactive_legend_legend_element_caption,k as instant_apps_interactive_legend_relationship}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,g as i,h as s,H as e,c as a}from"./p-4e6eb06e.js";import{l as h,g as n}from"./p-f4aadb3b.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const o=class{constructor(i){t(this,i),this.mapView=void 0,this.basemapConfig=void 0,this.basemapWidget=void 0}get el(){return i(this)}BasemapGallery;PortalBasemapsSource;_basemapElement;async basemapConfigWatchHandler(){if(this.basemapWidget?.source){const t=this.basemapWidget?.source;t.query=this.basemapConfig?.basemapGroupId?`id:${this.basemapConfig.basemapGroupId}`:null,await t.refresh()}}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initBaseMapGallery(this.mapView)}))}async componentWillLoad(){return this._initModules()}render(){return s(e,{key:"1f8be0f65a784ffaac49b8a5a15ebd6fb72d6643"},s("div",{key:"2c1bde6c0624b476f6c34302ea843da195f535cb",ref:t=>{this._basemapElement=t}}))}async componentDidLoad(){this.mapView&&await this.mapViewWatchHandler()}async _initModules(){const[t,i]=await h(["esri/widgets/BasemapGallery","esri/widgets/BasemapGallery/support/PortalBasemapsSource"]);this.BasemapGallery=t,this.PortalBasemapsSource=i}async _initBaseMapGallery(t){if(this.BasemapGallery){this.basemapWidget&&this.basemapWidget.destroy();const i=new this.PortalBasemapsSource({query:this.basemapConfig?.basemapGroupId?`id:${this.basemapConfig.basemapGroupId}`:null,filterFunction:this.basemapConfig?t=>!this.basemapConfig.basemapIdsToFilter.includes(t.portalItem.id):()=>!0});await i.refresh(),this.basemapWidget=new this.BasemapGallery({container:this._basemapElement,view:t,source:i})}}static get watchers(){return{basemapConfig:["basemapConfigWatchHandler"],mapView:["mapViewWatchHandler"]}}};o.style=":host{display:block}";const r=class{constructor(i){t(this,i),this.facilityChanged=a(this,"facilityChanged",7),this.levelChanged=a(this,"levelChanged",7),this.siteChanged=a(this,"siteChanged",7),this.enabled=void 0,this.floorFilterWidget=void 0,this.mapView=void 0}get el(){return i(this)}FloorFilter;_floorFilterElement;reactiveUtils;_facilityHandle;_levelHandle;_siteHandle;async mapViewWatchHandler(){await this._initFloorFilter(this.mapView)}async enabledWatchHandler(){this.enabled?await this._initFloorFilter(this.mapView):this.enabled||this._destroyWidget()}facilityChanged;levelChanged;siteChanged;async componentWillLoad(){return this._initModules()}render(){return s(e,{key:"7890927db517fe8e1133fce3e0fe977a441f2abf"},s("div",{key:"34ad695eb04dd20a0b9893817a33df5020de7da1",ref:t=>{this._floorFilterElement=t}}))}async componentDidLoad(){this.mapView&&!this.floorFilterWidget&&await this._initFloorFilter(this.mapView)}async _initModules(){const[t,i]=await h(["esri/widgets/FloorFilter","esri/core/reactiveUtils"]);this.FloorFilter=t,this.reactiveUtils=i}_destroyWidget(){this.floorFilterWidget&&(this.floorFilterWidget.destroy(),this.floorFilterWidget=void 0),this._floorFilterElement&&this._floorFilterElement.remove()}_initContainer(){this._destroyWidget(),this._floorFilterElement=document.createElement("div")}async _initFloorFilter(t){const i=t?.map;await i.when((()=>{t&&this.enabled&&this.FloorFilter&&i?.floorInfo&&(this._initContainer(),this.floorFilterWidget=new this.FloorFilter({container:this._floorFilterElement,view:t}),this._facilityHandle?.remove(),this._facilityHandle=this.reactiveUtils.watch((()=>this.floorFilterWidget.facility),(t=>{this.facilityChanged.emit(t)})),this._levelHandle?.remove(),this._levelHandle=this.reactiveUtils.watch((()=>this.floorFilterWidget.level),(t=>{this.levelChanged.emit(t)})),this._siteHandle?.remove(),this._siteHandle=this.reactiveUtils.watch((()=>this.floorFilterWidget.site),(t=>{this.siteChanged.emit(t)})))}))}static get watchers(){return{mapView:["mapViewWatchHandler"],enabled:["enabledWatchHandler"]}}};r.style=":host{display:block}";const c=class{constructor(i){t(this,i),this.fullscreenStateChange=a(this,"fullscreenStateChange",7),this.mapView=void 0,this.fullscreenWidget=void 0}Fullscreen;_fullscreenElement;_fullscreenStateChangeHandle;reactiveUtils;async mapViewWatchHandler(){await this.mapView.when((async()=>{await this._initFullscreenWidget()}))}fullscreenStateChange;async componentWillLoad(){await this._initModules()}render(){return s(e,{key:"350ebb01c52631c9441b6554f5b8e26f8ca1418e"},s("div",{key:"b09344b721da2cc18b74fb21f8017446ba5baa03",class:"fullscreen-widget",ref:t=>{this._fullscreenElement=t}}))}async componentDidUpdate(){await this._initFullscreenWidget()}async componentDidLoad(){await this._initFullscreenWidget()}async _initModules(){const[t,i]=await h(["esri/widgets/Fullscreen","esri/core/reactiveUtils"]);this.Fullscreen=t,this.reactiveUtils=i}async _initFullscreenWidget(){this.mapView&&this._fullscreenElement&&!this.fullscreenWidget?(this.fullscreenWidget=new this.Fullscreen({view:this.mapView}),await this.fullscreenWidget.when((()=>{this._fullscreenStateChangeHandle&&this._fullscreenStateChangeHandle.remove(),this._fullscreenStateChangeHandle=this.reactiveUtils.watch((()=>this.fullscreenWidget.viewModel.state),(t=>this.fullscreenStateChange.emit(t)))}))):this.fullscreenWidget&&(this.fullscreenWidget.view=this.mapView)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};c.style=":host{display:block}";const l=class{constructor(i){t(this,i),this.mapView=void 0,this.legendWidget=void 0}get el(){return i(this)}Legend;_legendElement;async mapViewWatchHandler(){await this.mapView.when((()=>{this._initLegend(this.mapView)}))}async componentWillLoad(){return this._initModules()}render(){return s(e,{key:"2c5cfbfd4048347ace5ff3cf17d411e85454be7a"},s("div",{key:"3927ef8af3a4a93fbd558480a96f982ca5b477a2",ref:t=>{this._legendElement=t}}))}async componentDidLoad(){this.mapView&&await this.mapViewWatchHandler()}async _initModules(){const[t]=await h(["esri/widgets/Legend"]);this.Legend=t}_initLegend(t){t&&this.Legend&&(this.legendWidget?this.legendWidget.view=t:this.legendWidget=new this.Legend({container:this._legendElement,view:t}))}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};l.style=":host{display:block}";const d=class{constructor(i){t(this,i),this.mapInfoChange=a(this,"mapInfoChange",7),this.mapInfos=[],this.isMapLayout=void 0,this._mapListExpanded=!1,this._translations=void 0,this._webMapInfo=void 0}get el(){return i(this)}_list;_loadedId="";_webMapInfoWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&(this._loadedId=t?.id,this.mapInfoChange.emit(t))}async mapInfosWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._webMapSelected(t[0])}async setMapByID(t){const i=this.mapInfos?.filter((i=>i.id===t));t&&i?.length>0&&this._webMapSelected(i[0])}async close(){this._mapListExpanded&&(this._mapListExpanded=!1)}async toggle(t){this._mapListExpanded=t}mapInfoChange;async componentWillLoad(){await this._getTranslations()}render(){return s(e,{key:"84cc43e195045e28fe01e35fe2f6f06cbe28fefd"},this._getToolbar(),this._getMapNameList(this._mapListExpanded))}async componentDidLoad(){const t=this.mapInfos&&this.mapInfos.length>0?this.mapInfos[0]:void 0;t&&this._webMapSelected(t)}_getMapPicker(){const t="map-picker-expand-toggle";return s("div",{class:"width-full"},s("calcite-button",{alignment:"icon-end-space-between",appearance:"transparent",class:"width-full height-full",iconEnd:this._mapListExpanded?"chevron-up":"chevron-down",iconStart:"map",id:t,kind:"neutral",onClick:()=>this._chooseMap(),width:"full"},this._webMapInfo?.name),s("calcite-tooltip",{placement:"bottom","reference-element":t},s("span",null,this._translations.switchMap)))}_getToolbar(){return s("div",{class:"display-flex border-right"},s("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:"header"},this._getMapPicker()))}_getMapNameList(t){return s("div",{class:t?"map-list border-bottom-1 adjusted-height "+(this.isMapLayout?"width-26":"width-full"):"display-none"},s("calcite-list",{id:"mapList",ref:t=>this._list=t,selectionAppearance:"border",selectionMode:"single"},this.mapInfos.map((t=>s("calcite-list-item",{label:t.name,onClick:()=>this._webMapSelected(t),selected:t.id===this._loadedId,value:t.id})))))}_webMapSelected(t){this._mapListExpanded=!1,this._webMapInfo=t}_chooseMap(){this._mapListExpanded=!this._mapListExpanded}async _getTranslations(){const t=await n(this.el);this._translations=t[0]}static get watchers(){return{_webMapInfo:["_webMapInfoWatchHandler"],mapInfos:["mapInfosWatchHandler"]}}};d.style=":host{display:block;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.width-full{width:100%}.width-26{width:26% !important}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-color-border-3)}.border-right{border-right:1px solid var(--calcite-color-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-color-background);z-index:1000;width:100%;height:-moz-fit-content;height:fit-content}.display-none{display:none}.align-center{align-items:center}.adjusted-height{max-height:calc(100% - 52px);overflow-y:auto}";const p=class{constructor(i){t(this,i),this.mapView=void 0,this.popupEnabled=!1,this.resultGraphicEnabled=!1,this.searchConfiguration=void 0,this.searchTerm=void 0,this.searchWidget=void 0}FeatureLayer;Search;_searchElement;_searchResult;async watchSearchConfigurationHandler(){this._initSearchWidget()}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initSearchWidget()}))}async componentWillLoad(){await this._initModules()}async componentDidLoad(){return this._initSearchWidget()}render(){return s(e,{key:"482d8d891f8c6905eefee8b26f0837a4c7c2e525"},s("div",{key:"9a3993ab8a7506299cf2bdbfab23b47ac7fe3037",class:"search-widget",ref:t=>{this._searchElement=t}}))}async _initModules(){const[t,i]=await h(["esri/widgets/Search","esri/layers/FeatureLayer"]);this.Search=t,this.FeatureLayer=i}_initSearchWidget(){if(this.mapView&&this._searchElement&&!this.searchWidget){let t={view:this.mapView,container:this._searchElement,searchTerm:this.searchTerm};this.searchConfiguration&&(t={...this._getSearchConfig(this.searchConfiguration,this.mapView)}),this.searchWidget=new this.Search(t),this.searchWidget.popupEnabled=this.popupEnabled,this.searchWidget.resultGraphicEnabled=this.resultGraphicEnabled}else this.searchWidget&&(this.searchWidget.view=this.mapView)}_getSearchConfig(t,i){const s=t.sources;return s?.length>0?(t.includeDefaultSources=!1,s.forEach((t=>{if(t.hasOwnProperty("layer")){const s=t,e=s.layer?.id,a=e?i.map.findLayerById(e):null,h=s?.layer?.url;a?s.layer=a:h&&(s.layer=new this.FeatureLayer(h))}})),s?.forEach((t=>{if(t.hasOwnProperty("locator")){const i=t;"ArcGIS World Geocoding Service"===i?.name&&(i.outFields=i.outFields||["Addr_type","Match_addr","StAddr","City"],i.singleLineFieldName="SingleLine"),i.url=i.url,delete i.url}}))):t={...t,includeDefaultSources:!0},t}static get watchers(){return{searchConfiguration:["watchSearchConfigurationHandler"],mapView:["mapViewWatchHandler"]}}};p.style=":host{display:block}.search-widget{width:100% !important;border:1px solid var(--calcite-color-border-input)}";const m=class{constructor(i){t(this,i),this.basemapConfig=void 0,this.enableLegend=void 0,this.enableFloorFilter=void 0,this.enableFullscreen=void 0,this.enableSearch=void 0,this.enableBasemap=void 0,this.enableHome=void 0,this.enableSingleExpand=void 0,this.homeZoomToolsSize="m",this.layout="vertical",this.mapView=void 0,this.mapWidgetsSize="m",this.position="top-right",this.searchConfiguration=void 0,this.stackTools=!0,this.toolOrder=void 0,this._hasFloorInfo=!1,this._translations=void 0,this._showTools=!0,this._showBasemapWidget=!1,this._showFloorFilter=!1,this._showFullscreen=!1,this._showLegendWidget=!1,this._showSearchWidget=!1}get el(){return i(this)}Expand;_basemapElement;_floorFilterElement;_fullscreenElement;_legendElement;_searchElement;_widgets=[];async mapViewWatchHandler(){await this.mapView.when((()=>{this._hasFloorInfo=this.mapView?.map?.floorInfo}))}async _showBasemapWidgetWatchHandler(t){t?this.mapView.ui.add(this._basemapElement.basemapWidget,{position:this.position,index:1}):this.mapView.ui.remove(this._basemapElement.basemapWidget)}async _showFloorFilterWatchHandler(t){const i=this._floorFilterElement.floorFilterWidget;t?this.mapView.ui.add(i,{position:this.position,index:1}):this.mapView.ui.remove(i)}async _showFullscreenWatchHandler(t){const i=this._fullscreenElement.fullscreenWidget;t?"ready"===i.viewModel.state&&i.viewModel.enter():"active"===i.viewModel.state&&i.viewModel.exit()}async _showLegendWidgetWatchHandler(t){t?this.mapView.ui.add(this._legendElement.legendWidget,{position:this.position,index:1}):this.mapView.ui.remove(this._legendElement.legendWidget)}async _showSearchWidgetWatchHandler(t){t?this.mapView.ui.add(this._searchElement.searchWidget,{position:this.position,index:1}):this.mapView.ui.remove(this._searchElement.searchWidget)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){this._setZoomToolsSize();const t=this._showTools?"":"display-none",i=this._showSearchWidget?"":"display-none",a=this._showBasemapWidget?"":"display-none",h=this._showLegendWidget?"":"display-none",n=this._showFloorFilter?"":"display-none",o=this._showFullscreen?"":"display-none",r=this.enableSingleExpand?"margin-top-1-2":"",c=this.toolOrder?this.toolOrder:["legend","search","fullscreen","floorfilter"],l=this.stackTools?"box-shadow":"";return s(e,{key:"224b99c53e7f8ac9c072efbd2c2093c6c9684a9a"},s("div",{key:"ead56063c6aa28146d4c50044b6e7c98fd2ed1ab",class:this.enableBasemap||this.enableFullscreen||this.enableLegend||this.enableSearch?"":"display-none"},this.enableSingleExpand?s("div",{class:"box-shadow"},this._getActionGroup(this._showTools?"chevrons-up":"chevrons-down",!1,this._showTools?this._translations.collapse:this._translations.expand,(()=>this._toggleTools()))):void 0,s("div",{key:"3fd7a2bd6225c10b89e282d4521486ad7eb5802a",class:`${r} ${l} ${t}`},this._getMapWidgets(c))),s("basemap-gallery",{key:"43063099ee4b3a72d96b2ae6e4ca750dff109ae2",basemapConfig:this.basemapConfig,class:a,mapView:this.mapView,ref:t=>{this._basemapElement=t}}),s("map-search",{key:"5c149ea67f2a2450864e968a50acce565d95e0b6",class:i,mapView:this.mapView,ref:t=>{this._searchElement=t},resultGraphicEnabled:!0,searchConfiguration:this.searchConfiguration}),s("map-legend",{key:"d3add3a5f820c5d654fec793d3e6e46b6a8919a3",class:h,mapView:this.mapView,ref:t=>{this._legendElement=t}}),s("map-fullscreen",{key:"e18a3a5d021d76e7c8fa9ecf3903105d5a43bed2",class:o,mapView:this.mapView,onFullscreenStateChange:t=>this._fullscreenStateChange(t.detail),ref:t=>{this._fullscreenElement=t}}),s("floor-filter",{key:"cb5d92e503248818e9627ba4ee8d70c81495599d",class:n,enabled:this.enableFloorFilter,mapView:this.mapView,ref:t=>{this._floorFilterElement=t}}))}async _initModules(){const[t]=await h(["esri/widgets/Expand"]);this.Expand=t}_setZoomToolsSize(){const t=document.getElementsByClassName("esri-zoom")[0]?.children[0],i=document.getElementsByClassName("esri-zoom")[0]?.children[1];if(t&&i){const s="s"===this.homeZoomToolsSize?"32px":"m"===this.homeZoomToolsSize?"40px":"48px";t.style.width=s,t.style.height=s,i.style.width=s,i.style.height=s}}_getMapWidgets(t){const i=this._showFullscreen?"full-screen-exit":"full-screen",s=this._showFullscreen?this._translations.exitFullscreen:this._translations.enterFullscreen;return t.map((t=>{switch(t){case"legend":return this.enableLegend&&this.enableSingleExpand?this._getActionGroup("legend",!1,this._translations.legend,(()=>this._showLegend())):this.enableLegend?this._getWidget(t,this._legendElement?.legendWidget,!0):void 0;case"search":return this.enableSearch&&this.enableSingleExpand?this._getActionGroup("magnifying-glass",!1,this._translations.search,(()=>this._search())):this.enableSearch?this._getWidget(t,this._searchElement?.searchWidget,!0):void 0;case"fullscreen":return this.enableFullscreen&&this.enableSingleExpand?this._getActionGroup(i,!1,s,(()=>this._expand())):this.enableFullscreen?this._getWidget(t,this._fullscreenElement?.fullscreenWidget,!1):void 0;case"basemap":return this.enableBasemap&&this.enableSingleExpand?this._getActionGroup("basemap",!1,this._translations.basemap,(()=>this._toggleBasemapPicker())):this.enableBasemap?this._getWidget(t,this._basemapElement?.basemapWidget,!0):void 0;case"floorfilter":return this.enableFloorFilter&&this._hasFloorInfo&&this.enableSingleExpand?this._getActionGroup("urban-model",!1,this._translations.floorFilter,(()=>this._toggleFloorFilter())):this.enableFloorFilter&&this._hasFloorInfo?this._getWidget(t,this._floorFilterElement?.floorFilterWidget,!0):void 0}}))}_fullscreenStateChange(t){"ready"===t&&this._showFullscreen?this._showFullscreen=!1:"active"!==t||this._showFullscreen||(this._showFullscreen=!0)}_getActionGroup(t,i,e,a){return s("div",null,s("calcite-action",{alignment:"center",class:`${"s"===this.mapWidgetsSize?"square-32":"m"===this.mapWidgetsSize?"square-40":"square-48"} ${this.stackTools?"":"margin-bottom-1-2"} border-bottom ${this.stackTools?"":"box-shadow"}`,compact:!1,disabled:i,icon:t,id:t,onClick:a,scale:"s",text:""},s("calcite-icon",{icon:"cheveron-up",scale:"s",slot:"icon"})),s("calcite-tooltip",{label:"",placement:"trailing","reference-element":t},s("span",null,e)))}_getWidget(t,i,s){if(this._widgets.indexOf(t)<0&&this.mapView&&i){const e=this.toolOrder.indexOf(t),a=new this.Expand({view:this.mapView,content:i});this.mapView.ui.add(s?a:i,{position:this.position,index:e>-1?e+(this.enableHome?2:1):1}),this._widgets.push(t)}}_showLegend(){this._showLegendWidget=!this._showLegendWidget,this._showTools=!1}_search(){this._showSearchWidget=!this._showSearchWidget,this._showTools=!1}_toggleBasemapPicker(){this._showBasemapWidget=!this._showBasemapWidget,this._showTools=!1}_toggleFloorFilter(){this._showFloorFilter=!this._showFloorFilter,this._showTools=!1}_expand(){this._showFullscreen=!this._showFullscreen}_toggleTools(){this._showTools||(this._showBasemapWidget=!1,this._showSearchWidget=!1,this._showLegendWidget=!1,this._showFloorFilter=!1),this._showTools=!this._showTools}async _getTranslations(){const t=await n(this.el);this._translations=t[0]}static get watchers(){return{mapView:["mapViewWatchHandler"],_showBasemapWidget:["_showBasemapWidgetWatchHandler"],_showFloorFilter:["_showFloorFilterWatchHandler"],_showFullscreen:["_showFullscreenWatchHandler"],_showLegendWidget:["_showLegendWidgetWatchHandler"],_showSearchWidget:["_showSearchWidgetWatchHandler"]}}};m.style=":host{display:block}.display-none{display:none}.margin-top-1-2{margin-top:0.5rem}.square-32{width:32px;height:32px}.square-40{width:40px;height:40px}.square-48{width:48px;height:48px}.width-40{width:40px}.square-40-41{width:40px;height:41px}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.box-shadow{box-shadow:0 1px 2px rgba(0, 0, 0, 0.3)}.margin-bottom-1-2{margin-bottom:0.5rem}";export{o as basemap_gallery,r as floor_filter,c as map_fullscreen,l as map_legend,d as map_picker,p as map_search,m as map_tools}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,g as e,h as i,H as s}from"./p-4e6eb06e.js";import{g as a}from"./p-f4aadb3b.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const r=class{constructor(e){t(this,e),this.templateInfos=[],this._sortedTemplateInfos=[],this._translations=void 0}get el(){return e(this)}_sortOrder=["Hub Site Application","Hub Page","Web Experience","Instant App","Web Mapping Application","Dashboard","StoryMap","Form","QuickCapture Project","Workflow","Big Data Analytic","Real Time Analytic","Feed","Tool","Notebook","Data Pipeline","Project Package","Desktop Application Template","TypeNotFound","Web Map","Web Scene","Feature Layer (hosted, view)","Feature Layer (hosted)","Tile Layer","CSV","Microsoft Excel","Microsoft Word","Report Template","Rule Package","Group"];_types=[];async templateInfosWatchHandler(){this._types=[],this._sortedTemplateInfos=this._sortTemplates()}async componentWillLoad(){await this._getTranslations()}async componentWillRender(){0===this._sortedTemplateInfos.length&&this.templateInfos?.length>0&&(this._sortedTemplateInfos=this._sortTemplates())}render(){return i(s,{key:"9a940187b8b91f94346f51cd67cb3c9fd2d8f470"},this._getAccordion())}_getAccordion(){return i("calcite-accordion",{selectionMode:"single"},this._sortedTemplateInfos.reduce(((t,e)=>{const i=this._getTypeForDisplay(e.type,e.typeKeywords);return this._types.indexOf(i)<0&&(this._types.push(i),t.push(this._getAccordionItem(e))),t}),[]))}_getAccordionItem(t){const e=this._getTypeForDisplay(t.type,t.typeKeywords),s=this._sortedTemplateInfos.filter((t=>this._getTypeForDisplay(t.type,t.typeKeywords)===e));return i("calcite-accordion-item",{description:`${e} (${s.length})`},i("solution-item-icon",{class:"padding-start-1",slot:"actions-start",type:t.type,typeKeywords:t.typeKeywords}),this._getList(s))}_getList(t){const e=this._sortTemplatesByTitle(t);return i("calcite-list",null,e.map((t=>this._getListItem(t))))}_getListItem(t){return i("calcite-list-item",{class:"font-size-override",description:t.snippet,label:t.title,value:t.id})}_sortTemplatesByTitle(t){return t.sort(((t,e)=>t.title<e.title?-1:t.title>e.title?1:0))}_sortTemplates(){return this.templateInfos.sort(((t,e)=>{const i=this._getTypeForSort(t),s=this._getTypeForSort(e);return this._sortOrder.indexOf(i)-this._sortOrder.indexOf(s)}))}_getTypeForSort(t){let e=this._getTypeForDisplay(t.type,t.typeKeywords);return this._sortOrder.indexOf(e)<0&&(e="TypeNotFound"),e}_getTypeForDisplay(t,e){let i=t;return"Feature Service"===t&&(i=e.indexOf("View Service")>-1?"Feature Layer (hosted, view)":"Feature Layer (hosted)"),"Web Mapping Application"===t&&(i=e.indexOf("configurableApp")>-1?"Instant App":i),i}async _getTranslations(){const t=await a(this.el);this._translations=t[0]}static get watchers(){return{templateInfos:["templateInfosWatchHandler"]}}};r.style=":host{display:block}.padding-start-1{padding-inline-start:1rem}.font-size-override{--calcite-font-size--2:var(--calcite-font-size--1)}";export{r as solution_item_accordion}