@devgateway/dvz-ui-react 1.3.5 → 1.5.0

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 (310) hide show
  1. package/dist/cjs/_virtual/_commonjsHelpers.js +1 -0
  2. package/dist/cjs/_virtual/_nodeUtil.js +1 -0
  3. package/dist/cjs/_virtual/isBuffer.js +1 -0
  4. package/dist/cjs/_virtual/isEqual.js +1 -0
  5. package/dist/cjs/embeddable/big-number-trend/index.js +1 -1
  6. package/dist/cjs/embeddable/body/index.js +1 -1
  7. package/dist/cjs/embeddable/chart/Bar.js +1 -1
  8. package/dist/cjs/embeddable/chart/Line.js +1 -1
  9. package/dist/cjs/embeddable/chart/colors/ColorProvider.js +1 -1
  10. package/dist/cjs/embeddable/chart/colors/ManualColors.js +1 -1
  11. package/dist/cjs/embeddable/chart/colors/SystemColors.js +1 -1
  12. package/dist/cjs/embeddable/chart/data/Bar.js +1 -1
  13. package/dist/cjs/embeddable/chart/data/Line.js +1 -1
  14. package/dist/cjs/embeddable/chart/data/Utils.js +1 -1
  15. package/dist/cjs/embeddable/d3Map/BaseLayer.js +1 -1
  16. package/dist/cjs/embeddable/d3Map/DataLayer.js +1 -1
  17. package/dist/cjs/embeddable/d3Map/FlowLayer.js +1 -1
  18. package/dist/cjs/embeddable/data/DataContext.js +1 -1
  19. package/dist/cjs/embeddable/featuredtabs/index.js +1 -1
  20. package/dist/cjs/embeddable/filter/index.js +1 -1
  21. package/dist/cjs/embeddable/filtered-posts/NoData.js +11 -0
  22. package/dist/cjs/embeddable/filtered-posts/index.js +1 -0
  23. package/dist/cjs/embeddable/index.js +1 -1
  24. package/dist/cjs/embeddable/inlinelist/index.js +1 -1
  25. package/dist/cjs/embeddable/map/MapDataFrame.js +1 -1
  26. package/dist/cjs/embeddable/map/index.js +2 -2
  27. package/dist/cjs/embeddable/map/map.js +4 -4
  28. package/dist/cjs/embeddable/new-time-line/index.js +1 -1
  29. package/dist/cjs/embeddable/new-time-line/timeline.js +1 -1
  30. package/dist/cjs/embeddable/posts-filter/PostsFilterDropdown.js +1 -0
  31. package/dist/cjs/embeddable/posts-filter/index.js +1 -0
  32. package/dist/cjs/embeddable/posts-filters-reset-button/index.js +1 -0
  33. package/dist/cjs/embeddable/posts-pagination/index.js +1 -0
  34. package/dist/cjs/embeddable/postscarousel/index.js +1 -1
  35. package/dist/cjs/embeddable/reducers/data-api.js +1 -1
  36. package/dist/cjs/embeddable/reducers/data.js +1 -1
  37. package/dist/cjs/embeddable/showcase/index.js +1 -1
  38. package/dist/cjs/embeddable/time-line/desktop.js +1 -1
  39. package/dist/cjs/embeddable/time-line/mobile.js +1 -1
  40. package/dist/cjs/embeddable/vertical-featuredtabs/index.js +2 -2
  41. package/dist/cjs/layout/ClassicHeader.js +1 -1
  42. package/dist/cjs/layout/CustomSemanticSearch.js +1 -1
  43. package/dist/cjs/layout/Header.js +3 -3
  44. package/dist/cjs/layout/Layout.js +1 -1
  45. package/dist/cjs/layout/SearchControl.js +1 -1
  46. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_DataView.js +1 -0
  47. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js +1 -0
  48. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js +1 -0
  49. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js +1 -0
  50. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js +1 -0
  51. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Promise.js +1 -0
  52. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Set.js +1 -0
  53. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js +1 -0
  54. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Stack.js +1 -0
  55. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js +1 -0
  56. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Uint8Array.js +1 -0
  57. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_WeakMap.js +1 -0
  58. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayFilter.js +1 -0
  59. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js +1 -0
  60. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js +1 -0
  61. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arraySome.js +1 -0
  62. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js +1 -0
  63. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetAllKeys.js +1 -0
  64. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js +1 -0
  65. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js +1 -0
  66. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqual.js +1 -0
  67. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqualDeep.js +1 -0
  68. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js +1 -0
  69. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js +1 -0
  70. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeys.js +1 -0
  71. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTimes.js +1 -0
  72. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js +1 -0
  73. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js +1 -0
  74. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js +1 -0
  75. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalArrays.js +1 -0
  76. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalByTag.js +1 -0
  77. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalObjects.js +1 -0
  78. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js +1 -0
  79. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeys.js +1 -0
  80. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js +1 -0
  81. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js +1 -0
  82. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js +1 -0
  83. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbols.js +1 -0
  84. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getTag.js +1 -0
  85. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js +1 -0
  86. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js +1 -0
  87. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js +1 -0
  88. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js +1 -0
  89. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js +1 -0
  90. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js +1 -0
  91. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js +1 -0
  92. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js +1 -0
  93. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js +1 -0
  94. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isPrototype.js +1 -0
  95. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js +1 -0
  96. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js +1 -0
  97. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js +1 -0
  98. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js +1 -0
  99. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js +1 -0
  100. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js +1 -0
  101. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js +1 -0
  102. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js +1 -0
  103. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js +1 -0
  104. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js +1 -0
  105. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapToArray.js +1 -0
  106. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js +1 -0
  107. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeys.js +1 -0
  108. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js +1 -0
  109. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js +1 -0
  110. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js +1 -0
  111. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js +1 -0
  112. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheAdd.js +1 -0
  113. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheHas.js +1 -0
  114. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToArray.js +1 -0
  115. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackClear.js +1 -0
  116. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackDelete.js +1 -0
  117. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackGet.js +1 -0
  118. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackHas.js +1 -0
  119. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackSet.js +1 -0
  120. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js +1 -0
  121. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js +1 -0
  122. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js +1 -0
  123. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js +1 -0
  124. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js +1 -0
  125. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js +1 -0
  126. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEqual.js +1 -0
  127. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js +1 -0
  128. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js +1 -0
  129. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js +1 -0
  130. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js +1 -0
  131. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js +1 -0
  132. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js +1 -0
  133. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubArray.js +1 -0
  134. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubFalse.js +1 -0
  135. package/dist/cjs/node_modules/.pnpm/pure-react-carousel@1.32.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/pure-react-carousel/dist/react-carousel.es.css +1 -0
  136. package/dist/cjs/styles.css +1 -1
  137. package/dist/cjs/translations/am.json.js +1 -0
  138. package/dist/cjs/utils/data.js +1 -1
  139. package/dist/esm/_virtual/_commonjsHelpers.js +8 -0
  140. package/dist/esm/_virtual/_nodeUtil.js +4 -0
  141. package/dist/esm/_virtual/isBuffer.js +4 -0
  142. package/dist/esm/_virtual/isEqual.js +7 -0
  143. package/dist/esm/embeddable/big-number-trend/index.js +36 -36
  144. package/dist/esm/embeddable/body/index.js +141 -95
  145. package/dist/esm/embeddable/chart/Bar.js +390 -382
  146. package/dist/esm/embeddable/chart/Line.js +101 -102
  147. package/dist/esm/embeddable/chart/colors/ColorProvider.js +42 -39
  148. package/dist/esm/embeddable/chart/colors/ManualColors.js +40 -29
  149. package/dist/esm/embeddable/chart/colors/SystemColors.js +28 -17
  150. package/dist/esm/embeddable/chart/data/Bar.js +112 -114
  151. package/dist/esm/embeddable/chart/data/Line.js +126 -126
  152. package/dist/esm/embeddable/chart/data/Utils.js +32 -26
  153. package/dist/esm/embeddable/d3Map/BaseLayer.js +3 -8
  154. package/dist/esm/embeddable/d3Map/DataLayer.js +2 -9
  155. package/dist/esm/embeddable/d3Map/FlowLayer.js +12 -15
  156. package/dist/esm/embeddable/data/DataContext.js +1 -0
  157. package/dist/esm/embeddable/featuredtabs/index.js +128 -124
  158. package/dist/esm/embeddable/filter/index.js +207 -206
  159. package/dist/esm/embeddable/filtered-posts/NoData.js +31 -0
  160. package/dist/esm/embeddable/filtered-posts/index.js +123 -0
  161. package/dist/esm/embeddable/index.js +34 -31
  162. package/dist/esm/embeddable/inlinelist/index.js +82 -70
  163. package/dist/esm/embeddable/map/MapDataFrame.js +17 -14
  164. package/dist/esm/embeddable/map/index.js +180 -169
  165. package/dist/esm/embeddable/map/map.js +520 -437
  166. package/dist/esm/embeddable/new-time-line/index.js +9 -8
  167. package/dist/esm/embeddable/new-time-line/timeline.js +3 -2
  168. package/dist/esm/embeddable/posts-filter/PostsFilterDropdown.js +190 -0
  169. package/dist/esm/embeddable/posts-filter/index.js +215 -0
  170. package/dist/esm/embeddable/posts-filters-reset-button/index.js +33 -0
  171. package/dist/esm/embeddable/posts-pagination/index.js +69 -0
  172. package/dist/esm/embeddable/postscarousel/index.js +12 -11
  173. package/dist/esm/embeddable/reducers/data-api.js +40 -25
  174. package/dist/esm/embeddable/reducers/data.js +180 -99
  175. package/dist/esm/embeddable/showcase/index.js +1 -1
  176. package/dist/esm/embeddable/time-line/desktop.js +3 -2
  177. package/dist/esm/embeddable/time-line/mobile.js +140 -162
  178. package/dist/esm/embeddable/vertical-featuredtabs/index.js +177 -168
  179. package/dist/esm/layout/ClassicHeader.js +62 -62
  180. package/dist/esm/layout/CustomSemanticSearch.js +40 -102
  181. package/dist/esm/layout/Header.js +152 -144
  182. package/dist/esm/layout/Layout.js +4 -3
  183. package/dist/esm/layout/SearchControl.js +130 -113
  184. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_DataView.js +12 -0
  185. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js +22 -0
  186. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js +22 -0
  187. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js +12 -0
  188. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js +22 -0
  189. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Promise.js +12 -0
  190. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Set.js +12 -0
  191. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js +18 -0
  192. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Stack.js +20 -0
  193. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js +11 -0
  194. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Uint8Array.js +11 -0
  195. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_WeakMap.js +12 -0
  196. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayFilter.js +16 -0
  197. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js +26 -0
  198. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js +14 -0
  199. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arraySome.js +15 -0
  200. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js +17 -0
  201. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetAllKeys.js +16 -0
  202. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js +16 -0
  203. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js +15 -0
  204. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqual.js +15 -0
  205. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqualDeep.js +38 -0
  206. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js +22 -0
  207. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js +17 -0
  208. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeys.js +20 -0
  209. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTimes.js +14 -0
  210. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js +14 -0
  211. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js +12 -0
  212. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js +11 -0
  213. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalArrays.js +46 -0
  214. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalByTag.js +51 -0
  215. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalObjects.js +42 -0
  216. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js +11 -0
  217. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeys.js +16 -0
  218. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js +15 -0
  219. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js +16 -0
  220. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js +21 -0
  221. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbols.js +16 -0
  222. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getTag.js +33 -0
  223. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js +12 -0
  224. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js +14 -0
  225. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js +13 -0
  226. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js +19 -0
  227. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js +15 -0
  228. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js +15 -0
  229. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js +14 -0
  230. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js +13 -0
  231. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js +17 -0
  232. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isPrototype.js +14 -0
  233. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js +12 -0
  234. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js +18 -0
  235. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js +15 -0
  236. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js +14 -0
  237. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js +15 -0
  238. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js +20 -0
  239. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js +15 -0
  240. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js +14 -0
  241. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js +14 -0
  242. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js +15 -0
  243. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapToArray.js +15 -0
  244. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js +11 -0
  245. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeys.js +11 -0
  246. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js +19 -0
  247. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js +13 -0
  248. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js +14 -0
  249. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js +11 -0
  250. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheAdd.js +13 -0
  251. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheHas.js +12 -0
  252. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToArray.js +15 -0
  253. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackClear.js +14 -0
  254. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackDelete.js +13 -0
  255. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackGet.js +12 -0
  256. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackHas.js +12 -0
  257. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackSet.js +23 -0
  258. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js +23 -0
  259. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js +12 -0
  260. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js +16 -0
  261. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js +10 -0
  262. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js +15 -0
  263. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js +14 -0
  264. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEqual.js +14 -0
  265. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js +18 -0
  266. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js +13 -0
  267. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js +13 -0
  268. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js +12 -0
  269. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js +13 -0
  270. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js +16 -0
  271. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubArray.js +12 -0
  272. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubFalse.js +12 -0
  273. package/dist/esm/node_modules/.pnpm/pure-react-carousel@1.32.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/pure-react-carousel/dist/react-carousel.es.css +1 -0
  274. package/dist/esm/styles.css +1 -1
  275. package/dist/esm/translations/am.json.js +46 -0
  276. package/dist/esm/utils/data.js +4 -9
  277. package/dist/types/dvz-ui/src/countries.d.ts +7 -0
  278. package/dist/types/dvz-ui/src/embeddable/chart/colors/ManualColors.d.ts +1 -1
  279. package/dist/types/dvz-ui/src/embeddable/chart/colors/SystemColors.d.ts +1 -1
  280. package/dist/types/dvz-ui/src/embeddable/data/DataContext.d.ts +1 -0
  281. package/dist/types/dvz-ui/src/embeddable/featuredtabs/index.d.ts +1 -0
  282. package/dist/types/dvz-ui/src/embeddable/filtered-posts/NoData.d.ts +7 -0
  283. package/dist/types/dvz-ui/src/embeddable/filtered-posts/index.d.ts +21 -0
  284. package/dist/types/dvz-ui/src/embeddable/inlinelist/index.d.ts +2 -0
  285. package/dist/types/dvz-ui/src/embeddable/map/MapDataFrame.d.ts +1 -6
  286. package/dist/types/dvz-ui/src/embeddable/map/map.d.ts +1 -0
  287. package/dist/types/dvz-ui/src/embeddable/posts-filter/PostsFilterDropdown.d.ts +21 -0
  288. package/dist/types/dvz-ui/src/embeddable/posts-filter/index.d.ts +25 -0
  289. package/dist/types/dvz-ui/src/embeddable/posts-filters-reset-button/index.d.ts +3 -0
  290. package/dist/types/dvz-ui/src/embeddable/posts-pagination/index.d.ts +10 -0
  291. package/dist/types/dvz-ui/src/embeddable/reducers/data-api.d.ts +11 -0
  292. package/dist/types/dvz-ui/src/embeddable/reducers/post-reducer.d.ts +158 -0
  293. package/dist/types/dvz-ui/src/embeddable/vertical-featuredtabs/index.d.ts +1 -0
  294. package/dist/types/dvz-ui/src/layout/Header.d.ts +2 -2
  295. package/dist/types/dvz-ui/src/translations/am.json.d.ts +39 -0
  296. package/package.json +3 -3
  297. package/dist/cjs/embeddable/posts-with-filters/DropDownFilter.js +0 -1
  298. package/dist/cjs/embeddable/posts-with-filters/Post.js +0 -1
  299. package/dist/cjs/embeddable/posts-with-filters/index.js +0 -1
  300. package/dist/esm/embeddable/posts-with-filters/DropDownFilter.js +0 -25
  301. package/dist/esm/embeddable/posts-with-filters/Post.js +0 -51
  302. package/dist/esm/embeddable/posts-with-filters/index.js +0 -206
  303. package/dist/types/dvz-ui/src/embeddable/posts-with-filters/DropDownFilter.d.ts +0 -4
  304. package/dist/types/dvz-ui/src/embeddable/posts-with-filters/Post.d.ts +0 -5
  305. package/dist/types/dvz-ui/src/embeddable/posts-with-filters/index.d.ts +0 -21
  306. /package/dist/cjs/{utils/countries.js → countries.js} +0 -0
  307. /package/dist/cjs/embeddable/{posts-with-filters → filtered-posts}/utils.js +0 -0
  308. /package/dist/esm/{utils/countries.js → countries.js} +0 -0
  309. /package/dist/esm/embeddable/{posts-with-filters → filtered-posts}/utils.js +0 -0
  310. /package/dist/types/dvz-ui/src/embeddable/{posts-with-filters → filtered-posts}/utils.d.ts +0 -0
@@ -1,18 +1,28 @@
1
- var $ = Object.defineProperty;
2
- var J = (T, I, e) => I in T ? $(T, I, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[I] = e;
3
- var _ = (T, I, e) => J(T, typeof I != "symbol" ? I + "" : I, e);
4
- import { jsx as b, jsxs as w, Fragment as X } from "react/jsx-runtime";
5
- import { injectIntl as Y, FormattedMessage as q } from "react-intl";
6
- import * as m from "d3";
7
- import { Container as R, Segment as K, Dimmer as Q, Loader as ee, Message as N, Icon as E, Popup as te, Grid as O } from "semantic-ui-react";
8
- import H from "react";
9
- import * as se from "topojson-client";
10
- import ie from "./legend.js";
1
+ var X = Object.defineProperty;
2
+ var Y = (w, F, e) => F in w ? X(w, F, { enumerable: !0, configurable: !0, writable: !0, value: e }) : w[F] = e;
3
+ var H = (w, F, e) => Y(w, typeof F != "symbol" ? F + "" : F, e);
4
+ import { jsx as b, jsxs as M, Fragment as R } from "react/jsx-runtime";
5
+ import { injectIntl as q, FormattedMessage as K } from "react-intl";
6
+ import * as g from "d3";
7
+ import { Container as U, Segment as Q, Dimmer as ee, Loader as te, Message as N, Icon as E, Popup as se, Grid as S } from "semantic-ui-react";
8
+ import V from "react";
9
+ import * as ie from "topojson-client";
10
+ import oe from "./legend.js";
11
11
  import { formatContent as k } from "../common/MapTooltip.js";
12
- import F from "../../utils/deviceType.js";
13
- import oe from "geostats";
12
+ import T from "../../utils/deviceType.js";
13
+ import ae from "geostats";
14
14
  import { Config as re } from "../../conf/index.js";
15
- const ae = "_Color_", U = "location", S = "showAll", j = "ifUnitHasData", le = 10, ne = {
15
+ function O(w, F, e) {
16
+ var l;
17
+ if (!(w != null && w.length)) return F;
18
+ const s = ((l = w[0]) == null ? void 0 : l.items) ?? [], i = (a) => (a == null ? void 0 : a.trim().toLowerCase()) ?? "", o = i(F), t = i(e).toUpperCase(), r = s.find(
19
+ (a) => i(a.value) === o || a.code.trim().toLowerCase() === o
20
+ ) ?? null;
21
+ if (!r) return F;
22
+ const n = t && r.labels && r.labels[t] ? r.labels[t] : r.value;
23
+ return (n == null ? void 0 : n.trim()) || r.value.trim();
24
+ }
25
+ const le = "_Color_", G = "location", j = "showAll", B = "ifUnitHasData", ne = 10, pe = {
16
26
  mobile: 4,
17
27
  tablet: 4,
18
28
  midTablet: 2,
@@ -26,14 +36,14 @@ const ae = "_Color_", U = "location", S = "showAll", j = "ifUnitHasData", le = 1
26
36
  laptop: 200,
27
37
  desktop: 100,
28
38
  wide: 100
29
- }, V = {
39
+ }, Z = {
30
40
  mobile: 250,
31
41
  tablet: 250,
32
42
  midTablet: 250,
33
43
  laptop: 0,
34
44
  desktop: 0,
35
45
  wide: 0
36
- }, pe = {
46
+ }, he = {
37
47
  greens: [
38
48
  "#ccffdd",
39
49
  "#b3ffcc",
@@ -106,102 +116,144 @@ const ae = "_Color_", U = "location", S = "showAll", j = "ifUnitHasData", le = 1
106
116
  "#1a66ff",
107
117
  "#0055ff"
108
118
  ]
109
- }, he = ["mobile", "tablet", "midTablet"].includes(F()), G = ["mobile", "tablet"].includes(F());
110
- class de extends H.Component {
119
+ }, de = ["mobile", "tablet", "midTablet"].includes(
120
+ T()
121
+ ), $ = ["mobile", "tablet"].includes(T());
122
+ class ue extends V.Component {
111
123
  constructor(e) {
124
+ var s;
112
125
  super(e);
113
- _(this, "handleScroll", () => {
126
+ H(this, "handleScroll", () => {
114
127
  let e = null;
115
128
  clearTimeout(e), e = setTimeout(() => {
116
- m.select(this.getMapId()).selectAll(".map-labels-container").size() > 0 || this.updateFeatures(this.getFeatures(), !1);
129
+ g.select(this.getMapId()).selectAll(".map-labels-container").size() > 0 || this.updateFeatures(this.getFeatures(), !1);
117
130
  }, 300);
118
131
  });
119
- this.mapContainer = H.createRef(), this.state = { mainLayer: null, layers: null }, this.classColor = this.classColor.bind(this), this.featuresZoom = this.featuresZoom.bind(this), this.fullView = this.fullView.bind(this), this.onZoomIn = this.onZoomIn.bind(this), this.onZoomOut = this.onZoomOut.bind(this), this.onReset = this.onReset.bind(this), this.onClick = this.onClick.bind(this), this.showTooltip = this.showTooltip.bind(this), this.mousemove = this.mousemove.bind(this), this.mouseout = this.mouseout.bind(this), this.updateFeatures = this.updateFeatures.bind(this), this.d3Map = this.d3Map.bind(this), this.getFeatures = this.getFeatures.bind(this), this.boundingExtent = this.boundingExtent.bind(this), this.getMapId = this.getMapId.bind(this), this.zoomed = this.zoomed.bind(this), this.zoomEnd = this.zoomEnd.bind(this), this.drawPoints = this.drawPoints.bind(this), this.extractFeatures = this.extractFeatures.bind(this), this.getLayers = this.getLayers.bind(this), this.onPointClick = this.onPointClick.bind(this), this.onPolygonClick = this.onPolygonClick.bind(this), this.getCenter = this.getCenter.bind(this), this.mapPosition = null, this.zooming = !1, this.translateValue = ne[F()], this.projection = m.geoMercator().scale(e.scale).center(e.center).translate([this.getWidth() / this.translateValue, this.getHeight() / 2]), this.path = m.geoPath().projection(this.projection), this.zoom = m.zoom().scaleExtent([1, 16]).on("zoom", this.zoomed).on("end", this.zoomEnd), this.centered = null, this.state = {
132
+ this.mapContainer = V.createRef(), this.state = { mainLayer: null, layers: null }, this.classColor = this.classColor.bind(this), this.featuresZoom = this.featuresZoom.bind(this), this.fullView = this.fullView.bind(this), this.onZoomIn = this.onZoomIn.bind(this), this.onZoomOut = this.onZoomOut.bind(this), this.onReset = this.onReset.bind(this), this.onClick = this.onClick.bind(this), this.showTooltip = this.showTooltip.bind(this), this.mousemove = this.mousemove.bind(this), this.mouseout = this.mouseout.bind(this), this.updateFeatures = this.updateFeatures.bind(this), this.d3Map = this.d3Map.bind(this), this.getFeatures = this.getFeatures.bind(this), this.boundingExtent = this.boundingExtent.bind(this), this.getMapId = this.getMapId.bind(this), this.zoomed = this.zoomed.bind(this), this.zoomEnd = this.zoomEnd.bind(this), this.drawPoints = this.drawPoints.bind(this), this.extractFeatures = this.extractFeatures.bind(this), this.getLayers = this.getLayers.bind(this), this.onPointClick = this.onPointClick.bind(this), this.onPolygonClick = this.onPolygonClick.bind(this), this.getCenter = this.getCenter.bind(this), this.mapPosition = null, this.zooming = !1, this.translateValue = pe[T()], this.projection = g.geoMercator().scale(e.scale).center(e.center).translate([this.getWidth() / this.translateValue, this.getHeight() / 2]), this.path = g.geoPath().projection(this.projection), this.zoom = g.zoom().scaleExtent([1, 16]).on("zoom", this.zoomed).on("end", this.zoomEnd), this.centered = null, this.state = {
120
133
  selectedMeasure: e.transformedData && e.transformedData.measures && e.transformedData.measures.length > 1 ? e.transformedData.measures[0] : null,
121
134
  generatedBreaks: [],
122
135
  selectedPolygon: null,
123
136
  layersLoading: !1
124
- };
137
+ }, this.metadataTypes = ((s = e.transformedData) == null ? void 0 : s.types) || [];
125
138
  }
126
139
  componentDidMount() {
127
- window.addEventListener("scroll", this.handleScroll, { passive: !0 }), window.addEventListener("touchmove", this.handleScroll, { passive: !0 }), this.loadLayers(), this.tooltip = m.select("body").append("div").style("position", "absolute").style("visibility", "hidden");
140
+ window.addEventListener("scroll", this.handleScroll, { passive: !0 }), window.addEventListener("touchmove", this.handleScroll, { passive: !0 }), this.loadLayers(), this.tooltip = g.select("body").append("div").style("position", "absolute").style("visibility", "hidden"), console.log("Map props", this.metadataTypes);
128
141
  }
129
- componentDidCatch(e, t) {
142
+ componentDidCatch(e, s) {
130
143
  console.log(e);
131
144
  }
132
145
  componentWillUnmount() {
133
146
  window.removeEventListener("scroll", this.handleScroll);
134
147
  }
135
148
  loadLayers() {
136
- const { source: e, mainLayerId: t, enabledLayers: i } = this.props;
149
+ const { source: e, mainLayerId: s, enabledLayers: i } = this.props;
137
150
  if (this.setState({
138
151
  layers: [],
139
152
  layersLoading: !0
140
153
  }), i && i.length > 0) {
141
154
  const o = [];
142
- i.forEach((s) => {
155
+ i.forEach((t) => {
143
156
  o.push(
144
- new Promise((l, c) => {
145
- m.json(re.REACT_APP_WP_API + "/wp/v2/media/" + s.id).then((r) => {
146
- l({ id: s.id, url: r.source_url, index: s.index });
147
- }).catch(function(r) {
148
- l({ id: s.id, url: null, index: s.index });
157
+ new Promise((r, n) => {
158
+ g.json(re.REACT_APP_WP_API + "/wp/v2/media/" + t.id).then((l) => {
159
+ r({
160
+ id: t.id,
161
+ url: l.source_url,
162
+ index: t.index,
163
+ layerMappingField: t.layerMappingField,
164
+ layerDatasource: t.datasource,
165
+ layerApiField: t.apiField,
166
+ layerLocale: t.locale,
167
+ displayLayerLabels: t.displayLayerLabels
168
+ });
169
+ }).catch(function(l) {
170
+ r({
171
+ id: t.id,
172
+ url: null,
173
+ index: t.index,
174
+ layerMappingField: t.layerMappingField,
175
+ layerDatasource: t.datasource,
176
+ layerApiField: t.apiField,
177
+ layerLocale: t.locale,
178
+ displayLayerLabels: t.displayLayerLabels
179
+ });
149
180
  });
150
181
  })
151
182
  );
152
- }), Promise.all(o).then((s) => {
153
- const l = [];
154
- s.forEach((c) => {
155
- c.url && l.push(
156
- new Promise((r, a) => {
157
- m.json(c.url).then((h) => {
158
- r({ id: c.id, data: h, index: c.index });
183
+ }), Promise.all(o).then((t) => {
184
+ const r = [];
185
+ t.forEach((n) => {
186
+ n.url && r.push(
187
+ new Promise((l, a) => {
188
+ g.json(n.url).then((h) => {
189
+ l({
190
+ id: n.id,
191
+ data: h,
192
+ index: n.index,
193
+ layerMappingField: n.layerMappingField,
194
+ layerDatasource: n.layerDatasource,
195
+ layerApiField: n.layerApiField,
196
+ layerLocale: n.layerLocale,
197
+ displayLayerLabels: n.displayLayerLabels
198
+ });
159
199
  });
160
200
  })
161
201
  );
162
- }), Promise.all(l).then((c) => {
202
+ }), Promise.all(r).then((n) => {
163
203
  this.setState({
164
- layers: c,
204
+ layers: n,
165
205
  layersLoading: !1
166
206
  });
167
207
  });
168
208
  });
169
209
  } else
170
- m.json(e).then((o) => {
210
+ g.json(e).then((o) => {
171
211
  this.setState({
172
- layers: [{ id: null, url: e, data: o, index: 0 }],
212
+ layers: [
213
+ {
214
+ id: null,
215
+ url: e,
216
+ data: o,
217
+ index: 0,
218
+ layerMappingField: null,
219
+ layerDatasource: null,
220
+ layerApiField: null,
221
+ layerLocale: null,
222
+ displayLayerLabels: !1
223
+ }
224
+ ],
173
225
  layersLoading: !1
174
226
  });
175
227
  });
176
228
  }
177
229
  getMainLayer() {
178
- const e = this.getLayers(), { mainLayerId: t, enabledLayers: i } = this.props;
230
+ const e = this.getLayers(), { mainLayerId: s, enabledLayers: i } = this.props;
179
231
  let o;
180
232
  return e && (o = e.filter(
181
- (s) => s.id == t || s.id == null
233
+ (t) => t.id == s || t.id == null
182
234
  )[0] || e[0]), o ? o.data : null;
183
235
  }
184
- componentDidUpdate(e, t, i) {
185
- const { selectedMeasure: o, layers: s, selectedPolygon: l } = this.state, c = this.getMainLayer(), { transformedData: r, intl: a, zoomOnFilterField: h, appliedFilters: n } = this.props, { appliedFilters: u } = e;
236
+ componentDidUpdate(e, s, i) {
237
+ const { selectedMeasure: o, layers: t, selectedPolygon: r } = this.state, n = this.getMainLayer(), { transformedData: l, intl: a, zoomOnFilterField: h, appliedFilters: p } = this.props, { appliedFilters: d } = e;
186
238
  if (h) {
187
- const L = [], p = [];
188
- u && Object.keys(u).forEach((d) => {
189
- u[d] != null && u[d] instanceof Array && L.push(
190
- ...u[d].filter(
191
- (v) => v != Number.MIN_SAFE_INTEGER
239
+ const v = [], c = [];
240
+ d && Object.keys(d).forEach((f) => {
241
+ d[f] != null && d[f] instanceof Array && v.push(
242
+ ...d[f].filter(
243
+ (y) => y != Number.MIN_SAFE_INTEGER
192
244
  )
193
245
  );
194
- }), n && Object.keys(n).forEach((d) => {
195
- n[d] != null && n[d] instanceof Array && p.push(
196
- ...n[d].filter((v) => v != Number.MIN_SAFE_INTEGER)
246
+ }), p && Object.keys(p).forEach((f) => {
247
+ p[f] != null && p[f] instanceof Array && c.push(
248
+ ...p[f].filter((y) => y != Number.MIN_SAFE_INTEGER)
197
249
  );
198
- }), L.length > 0 && p.length == 0 && this.onReset();
250
+ }), v.length > 0 && c.length == 0 && this.onReset();
199
251
  }
200
252
  this.tooltip.style("visibility", "hidden"), e.enabledLayers.length != this.props.enabledLayers.length && this.loadLayers();
201
- const f = this.getFeatures();
253
+ const u = this.getFeatures();
202
254
  e.center !== this.props.center && (this.mapPosition = null, this.projection.scale(this.props.scale).center(this.props.center).translate([this.getWidth() / 2, this.getHeight() / 2]));
203
- const g = this.filterUpdated(e, t);
204
- this.d3Map(f, g), s && r && (r != e.transformedData || s != t.layers || o != t.selectedMeasure || l != t.selectedPolygon || c != t.mainLayer || e.mainLayerId !== this.props.mainLayerId || JSON.stringify(e.enabledLayers) != JSON.stringify(this.props.enabledLayers)) && this.updateFeatures(this.getFeatures(), g);
255
+ const m = this.filterUpdated(e, s);
256
+ this.d3Map(u, m), t && l && (l != e.transformedData || t != s.layers || o != s.selectedMeasure || r != s.selectedPolygon || n != s.mainLayer || e.mainLayerId !== this.props.mainLayerId || JSON.stringify(e.enabledLayers) != JSON.stringify(this.props.enabledLayers)) && this.updateFeatures(this.getFeatures(), m);
205
257
  }
206
258
  getHeight() {
207
259
  return this.props.height;
@@ -210,99 +262,99 @@ class de extends H.Component {
210
262
  return this.mapContainer.current ? this.mapContainer.current.offsetWidth : this.props.width;
211
263
  }
212
264
  boundingExtent(e) {
213
- let t, i, o, s;
214
- for (const l in e) {
215
- const [[c, r], [a, h]] = this.path.bounds(e[l]);
216
- (c < t || t == null) && (t = c), (a > i || i == null) && (i = a), (r < o || o == null) && (o = r), (h > s || s == null) && (s = h);
265
+ let s, i, o, t;
266
+ for (const r in e) {
267
+ const [[n, l], [a, h]] = this.path.bounds(e[r]);
268
+ (n < s || s == null) && (s = n), (a > i || i == null) && (i = a), (l < o || o == null) && (o = l), (h > t || t == null) && (t = h);
217
269
  }
218
270
  return [
219
- [t, o],
220
- [i, s]
271
+ [s, o],
272
+ [i, t]
221
273
  ];
222
274
  }
223
275
  onReset() {
224
276
  this.mapPosition = null, this.tooltip.style("visibility", "hidden"), this.fullView();
225
277
  }
226
278
  resizeLabels(e) {
227
- const { labelFontSize: t, mapLabelField: i } = this.props;
228
- m.select(this.getMapId()).selectAll(".map-labels-container").each((o, s, l) => {
229
- const c = m.select(l[s]), r = c.select("div"), a = e.k > 1 ? e.k : 1, h = t / a;
230
- r.style("font-size", `${h}px`);
231
- const n = this.getLabelPosition(o), u = this.getLabelBoxWidth(o) / a, f = n[0] - u / 2, g = e.k > 1 ? 10 / e.k : 10, L = n[1] - g;
232
- c.attr("x", f).attr("y", L).attr("width", this.getLabelBoxWidth(o) / a).attr("height", this.getLabelBoxHeight(o) / a);
279
+ const { labelFontSize: s, mapLabelField: i } = this.props;
280
+ g.select(this.getMapId()).selectAll(".map-labels-container").each((o, t, r) => {
281
+ const n = g.select(r[t]), l = n.select("div"), a = e.k > 1 ? e.k : 1, h = s / a;
282
+ l.style("font-size", `${h}px`);
283
+ const p = this.getLabelPosition(o), d = this.getLabelBoxWidth(o) / a, u = p[0] - d / 2, m = e.k > 1 ? 10 / e.k : 10, v = p[1] - m;
284
+ n.attr("x", u).attr("y", v).attr("width", this.getLabelBoxWidth(o) / a).attr("height", this.getLabelBoxHeight(o) / a);
233
285
  });
234
286
  }
235
287
  resizePointLabels(e) {
236
- const { labelFontSize: t } = this.props;
237
- m.select(this.getMapId()).selectAll(".point-labels-container").each((i, o, s) => {
238
- const l = m.select(s[o]), c = l.select("div"), r = e.k > 1 ? e.k : 1, a = t / r;
239
- c.style("font-size", `${a}px`);
288
+ const { labelFontSize: s } = this.props;
289
+ g.select(this.getMapId()).selectAll(".point-labels-container").each((i, o, t) => {
290
+ const r = g.select(t[o]), n = r.select("div"), l = e.k > 1 ? e.k : 1, a = s / l;
291
+ n.style("font-size", `${a}px`);
240
292
  const h = this.projection([
241
293
  i.geometry.coordinates[1],
242
294
  i.geometry.coordinates[0]
243
- ]), n = (this.getLabelBoxWidth(i) + 20) / r, u = this.getLabelBoxHeight(i) / r, f = h[0] - n / 2, g = h[1] - u / 2;
244
- l.attr("x", f).attr("y", g).attr("width", n).attr("height", u);
295
+ ]), p = (this.getLabelBoxWidth(i) + 20) / l, d = this.getLabelBoxHeight(i) / l, u = h[0] - p / 2, m = h[1] - d / 2;
296
+ r.attr("x", u).attr("y", m).attr("width", p).attr("height", d);
245
297
  });
246
298
  }
247
299
  resizeCircles(e) {
248
- m.select(this.getMapId()).select("svg").selectAll("circle").attr("r", e.k > 1 ? 6 / e.k : 6);
300
+ g.select(this.getMapId()).select("svg").selectAll("circle").attr("r", e.k > 1 ? 6 / e.k : 6);
249
301
  }
250
302
  zoomed(e) {
251
303
  this.tooltip.style("visibility", "hidden");
252
- const t = e.transform;
253
- m.select(this.getMapId()).select("svg").select("g").attr("transform", t), this.resizeCircles(t), this.resizeLabels(t), this.resizePointLabels(t);
304
+ const s = e.transform;
305
+ g.select(this.getMapId()).select("svg").select("g").attr("transform", s), this.resizeCircles(s), this.resizeLabels(s), this.resizePointLabels(s);
254
306
  }
255
307
  zoomEnd(e) {
256
- const { editing: t } = this.props, i = e.transform;
257
- this.mapPosition = { k: i.k, x: i.x, y: i.y }, t && window.parent.postMessage(
308
+ const { editing: s } = this.props, i = e.transform;
309
+ this.mapPosition = { k: i.k, x: i.x, y: i.y }, s && window.parent.postMessage(
258
310
  { type: "map", value: JSON.stringify(this.mapPosition) },
259
311
  "*"
260
312
  );
261
313
  }
262
314
  classColor(e) {
263
- let { zoomEnabled: t } = this.props;
264
- return t || (t = !!["mobile", "tablet", "midTablet"].includes(
265
- F()
266
- )), t ? "active zoom-enabled" : "active";
315
+ let { zoomEnabled: s } = this.props;
316
+ return s || (s = !!["mobile", "tablet", "midTablet"].includes(
317
+ T()
318
+ )), s ? "active zoom-enabled" : "active";
267
319
  }
268
320
  generateBreaks(e) {
269
- const { autoGenerateBreaks: t, numberOfBreaks: i, colorScheme: o } = this.props, s = [];
270
- if (t && e && e.length > 0) {
271
- const l = e.filter((a) => a.properties && a.properties.value != null).map((a) => a.properties.value.toFixed(2)), c = [];
272
- l.forEach((a) => {
321
+ const { autoGenerateBreaks: s, numberOfBreaks: i, colorScheme: o } = this.props, t = [];
322
+ if (s && e && e.length > 0) {
323
+ const r = e.filter((a) => a.properties && a.properties.value != null).map((a) => a.properties.value.toFixed(2)), n = [];
324
+ r.forEach((a) => {
273
325
  if (a > 0) {
274
- const h = a * 0.99, n = a * 1.01;
275
- c.indexOf(h) === -1 && c.push(h), c.indexOf(n) === -1 && c.push(n);
326
+ const h = a * 0.99, p = a * 1.01;
327
+ n.indexOf(h) === -1 && n.push(h), n.indexOf(p) === -1 && n.push(p);
276
328
  }
277
329
  });
278
- const r = pe[o];
279
- if (c.length > 0) {
280
- const a = new oe(c);
330
+ const l = he[o];
331
+ if (n.length > 0) {
332
+ const a = new ae(n);
281
333
  a.setPrecision(2);
282
- const h = c.length > 1 ? c.length - 1 : c.length;
283
- return a.getJenks(Math.min(i, h)), a.ranges.forEach((n, u) => {
284
- const f = {};
285
- f.min = parseFloat(n.substr(0, n.indexOf("-") - 1)) + (u > 0 ? 0.01 : 0), f.max = parseFloat(
286
- n.substr(n.indexOf("-") + 2, n.length)
287
- ), f.color = r[u], s.push(f);
288
- }), s;
334
+ const h = n.length > 1 ? n.length - 1 : n.length;
335
+ return a.getJenks(Math.min(i, h)), a.ranges.forEach((p, d) => {
336
+ const u = {};
337
+ u.min = parseFloat(p.substr(0, p.indexOf("-") - 1)) + (d > 0 ? 0.01 : 0), u.max = parseFloat(
338
+ p.substr(p.indexOf("-") + 2, p.length)
339
+ ), u.color = l[d], t.push(u);
340
+ }), t;
289
341
  }
290
342
  }
291
- return s;
343
+ return t;
292
344
  }
293
345
  getBreaks() {
294
- const { legendBreaks: e, autoGenerateBreaks: t } = this.props;
295
- if (t) {
346
+ const { legendBreaks: e, autoGenerateBreaks: s } = this.props;
347
+ if (s) {
296
348
  const i = this.getFeatures();
297
349
  return this.generateBreaks(i);
298
350
  } else {
299
351
  let i = e;
300
352
  return this.getSelectedMeasure() && (i = e.filter((o) => o.measure === this.getSelectedMeasure()).filter((o) => {
301
353
  if (o.filters && o.filters.length > 0 && this.props.appliedFilters && JSON.stringify(this.props.appliedFilters) !== "{}") {
302
- const l = Object.keys(this.props.appliedFilters);
303
- return o.filters.filter((r) => {
304
- if (l.indexOf(r.field) != -1) {
305
- const a = this.props.appliedFilters[r.field], h = r.values;
354
+ const r = Object.keys(this.props.appliedFilters);
355
+ return o.filters.filter((l) => {
356
+ if (r.indexOf(l.field) != -1) {
357
+ const a = this.props.appliedFilters[l.field], h = l.values;
306
358
  return a.join(",").indexOf(h) != -1;
307
359
  }
308
360
  return !1;
@@ -312,33 +364,33 @@ class de extends H.Component {
312
364
  })), i;
313
365
  }
314
366
  }
315
- fillColor(e, t) {
367
+ fillColor(e, s) {
316
368
  const { mapNoDataColor: i, mainLayerId: o } = this.props;
317
- let s;
369
+ let t;
318
370
  if (e.properties && e.properties.variables && this.state.selectedMeasure && e.properties.value != null) {
319
- const c = ae + this.state.selectedMeasure;
320
- if (s = e.properties.variables[c.trim()], s)
321
- return s;
371
+ const n = le + this.state.selectedMeasure;
372
+ if (t = e.properties.variables[n.trim()], t)
373
+ return t;
322
374
  }
323
375
  if (e.properties.value != null && (o && e.properties.layerId === o || !o)) {
324
- const c = t.find((r) => {
325
- if (r.min != null && r.max != null)
326
- return e.properties.value >= r.min && e.properties.value <= r.max;
327
- if (r.min != null)
328
- return e.properties.value >= r.min;
329
- if (r.max != null)
330
- return e.properties.value <= r.max;
376
+ const n = s.find((l) => {
377
+ if (l.min != null && l.max != null)
378
+ return e.properties.value >= l.min && e.properties.value <= l.max;
379
+ if (l.min != null)
380
+ return e.properties.value >= l.min;
381
+ if (l.max != null)
382
+ return e.properties.value <= l.max;
331
383
  });
332
- return c && c.color ? c.color : i;
384
+ return n && n.color ? n.color : i;
333
385
  }
334
- const l = this.props.enabledLayers.filter(
335
- (c) => c.id === e.properties.layerId
386
+ const r = this.props.enabledLayers.filter(
387
+ (n) => n.id === e.properties.layerId
336
388
  )[0];
337
- return l && l.bgColor && l.bgColor != "undefined" ? l.bgColor : i;
389
+ return r && r.bgColor && r.bgColor != "undefined" ? r.bgColor : i;
338
390
  }
339
391
  setValues() {
340
392
  const e = this.getFeatures();
341
- m.select(this.getMapId()).select("svg").select("g").selectAll("path").data(e).join("path").attr("d", this.path);
393
+ g.select(this.getMapId()).select("svg").select("g").selectAll("path").data(e).join("path").attr("d", this.path);
342
394
  }
343
395
  getLabelPosition(e) {
344
396
  return e.properties.LABEL_LATITUDE && e.properties.LABEL_LONGITUDE ? this.projection([
@@ -346,158 +398,166 @@ class de extends H.Component {
346
398
  e.properties.LABEL_LATITUDE
347
399
  ]) : this.path.centroid(e);
348
400
  }
349
- updateFeatures(e, t) {
350
- const { mapLabelField: i, symbols: o, highlightedLocation: s } = this.props, l = [
351
- ...e.filter((c) => s != c.properties[i]),
352
- ...e.filter((c) => s == c.properties[i])
401
+ updateFeatures(e, s) {
402
+ const { mapLabelField: i, symbols: o, highlightedLocation: t } = this.props, r = [
403
+ ...e.filter((n) => t != n.properties[i]),
404
+ ...e.filter((n) => t == n.properties[i])
353
405
  ];
354
- this.drawPolygons(l), this.drawLabels(l), this.drawPoints(l, t), o.length > 0 && this.addSymbols(o, l);
406
+ this.drawPolygons(r), this.drawLabels(r), this.drawPoints(r, s), o.length > 0 && this.addSymbols(o, r);
355
407
  }
356
408
  drawLabels(e) {
357
409
  const {
358
- mapLabelField: t,
410
+ mapLabelField: s,
359
411
  mapLabelShowValue: i,
360
412
  intl: o,
361
- valueFormat: s,
362
- showNoDataLabel: l,
363
- labelFontColor: c,
364
- labelFontWeight: r,
413
+ valueFormat: t,
414
+ showNoDataLabel: r,
415
+ labelFontColor: n,
416
+ labelFontWeight: l,
365
417
  labelFontSize: a,
366
418
  showAdminUnitLabel: h,
367
- mapType: n,
368
- noDataText: u,
369
- labelsExclusionList: f
370
- } = this.props, g = m.select(this.getMapId()).select("svg").select("g");
371
- if (g.selectAll(".map-labels-container").size() > 0) {
419
+ mapType: p,
420
+ noDataText: d,
421
+ labelsExclusionList: u
422
+ } = this.props, m = g.select(this.getMapId()).select("svg").select("g");
423
+ if (m.selectAll(".map-labels-container").size() > 0) {
372
424
  console.log("Labels already exist, skipping redraw...");
373
425
  return;
374
426
  }
375
- g.selectAll(".map-labels").data(
376
- e.filter((p) => f && f.length > 0 ? !f.includes(p.properties[t]) : !0)
377
- ).enter().append("foreignObject").attr("class", "map-labels-container").attr("x", (p) => {
378
- const d = this.getLabelPosition(p);
379
- if (p.properties[t]) {
380
- const v = this.getLabelBoxWidth(p);
381
- return d[0] - v / 2;
427
+ m.selectAll(".map-labels").data(
428
+ e.filter((c) => u && u.length > 0 ? !u.includes(c.properties[s]) : !0)
429
+ ).enter().append("foreignObject").attr("class", "map-labels-container").attr("x", (c) => {
430
+ const f = this.getLabelPosition(c);
431
+ if (c.properties[s]) {
432
+ const y = this.getLabelBoxWidth(c);
433
+ return f[0] - y / 2;
382
434
  }
383
- return d[0];
384
- }).attr("y", (p) => this.getLabelPosition(p)[1] - 10).attr("width", (p) => this.getLabelBoxWidth(p)).attr("height", (p) => this.getLabelBoxHeight(p)).attr("font-size", (p, d) => `${a}px`).attr("overflow", "visible").attr("opacity", 1).style("display", (p) => h === S || h === j && p.properties.hasDataRow ? "block" : "none").attr("pointer-events", n == "POINTS_MAP" ? "none" : "all").on("mouseover", this.showTooltip).on("mousemove", this.mousemove).on("mouseout", this.mouseout).append("xhtml:div").style("font-size", (p) => `${a}px`).style("color", (p, d) => c).style("font-weight", (p) => r).style("background-color", (p) => p.properties.hasDataRow && i && (p.properties.value != null || p.properties.value == null && l) ? "#fff6e1" : "none").style("border-radius", (p) => "4px").style("line-height", "95%").style("text-align", "center").html((p, d) => this.createLabel(p));
435
+ return f[0];
436
+ }).attr("y", (c) => this.getLabelPosition(c)[1] - 10).attr("width", (c) => this.getLabelBoxWidth(c)).attr("height", (c) => this.getLabelBoxHeight(c)).attr("font-size", (c, f) => `${a}px`).attr("overflow", "visible").attr("opacity", 1).style("display", (c) => h === j || h === B && c.properties.hasDataRow || c.properties.displayLayerLabels ? "block" : "none").attr("pointer-events", p == "POINTS_MAP" ? "none" : "all").on("mouseover", this.showTooltip).on("mousemove", this.mousemove).on("mouseout", this.mouseout).append("xhtml:div").style("font-size", (c) => `${a}px`).style("color", (c, f) => n).style("font-weight", (c) => l).style("background-color", (c) => c.properties.hasDataRow && i && (c.properties.value != null || c.properties.value == null && r) ? "#fff6e1" : "none").style("border-radius", (c) => "4px").style("line-height", "95%").style("text-align", "center").html((c, f) => this.createLabel(c));
437
+ }
438
+ getTranslatedLocationName(e, s, i) {
439
+ if (e.properties.displayLayerLabels && e.properties.layerLocale) {
440
+ const o = e.properties.layerMappingField || s, t = e.properties[o];
441
+ return O(this.metadataTypes, t, e.properties.layerLocale);
442
+ }
443
+ return e.properties[s];
385
444
  }
386
445
  createLabel(e) {
387
446
  const {
388
- mapLabelField: t,
447
+ mapLabelField: s,
389
448
  mapLabelShowValue: i,
390
449
  intl: o,
391
- valueFormat: s,
392
- showNoDataLabel: l,
393
- showAdminUnitLabel: c,
394
- noDataText: r
450
+ valueFormat: t,
451
+ showNoDataLabel: r,
452
+ showAdminUnitLabel: n,
453
+ noDataText: l
395
454
  } = this.props;
396
455
  let a = "";
397
- if (c == S || c == j && e.properties.hasDataRow) {
398
- a = e.properties[t];
399
- const h = e.properties.abbrev;
400
- if (a && a.length > le && h && (a = h), i)
456
+ if (n == j || n == B && e.properties.hasDataRow || e.properties.displayLayerLabels) {
457
+ const h = e.properties.displayLayerLabels && e.properties.layerMappingField ? e.properties.layerMappingField : s, p = e.properties[h], d = e.properties.layerLocale || (o == null ? void 0 : o.locale);
458
+ a = O(this.metadataTypes, p, d);
459
+ const u = e.properties.abbrev;
460
+ if (a && a.length > ne && u && (a = u), i)
401
461
  if (e.properties.value != null) {
402
- const n = e.properties.variables || {};
462
+ const m = e.properties.variables || {};
403
463
  a += "<br><span class='map-label-value'>" + k(
404
- s,
464
+ t,
405
465
  {
406
466
  value: e.properties.value,
407
467
  measure: this.getSelectedMeasure(),
408
- ...n
468
+ ...m
409
469
  },
410
470
  o
411
471
  ) + "</span>";
412
472
  } else
413
- l == !0 && e.properties.value == null && e.properties.hasDataRow && (a += "<br><span class='map-label-value'>" + r + "</span>");
473
+ r == !0 && e.properties.value == null && e.properties.hasDataRow && (a += "<br><span class='map-label-value'>" + l + "</span>");
414
474
  }
415
475
  return a;
416
476
  }
417
477
  drawPolygons(e) {
418
478
  const {
419
- mapLabelField: t,
479
+ mapLabelField: s,
420
480
  mapBoundaryColor: i,
421
481
  mapFocusBoundaryColor: o,
422
- highlightedLocation: s
423
- } = this.props, l = this.getBreaks(), c = m.select(this.getMapId()).select("svg").select("g"), r = e.filter(
482
+ highlightedLocation: t
483
+ } = this.props, r = this.getBreaks(), n = g.select(this.getMapId()).select("svg").select("g"), l = e.filter(
424
484
  (a) => a.geometry && a.geometry && (a.geometry.type == "Polygon" || a.geometry.type == "MultiPolygon")
425
485
  );
426
- r.length > 0 && c.selectAll("path").data(r).join("path").attr("d", this.path).attr("fill", (a) => this.fillColor(a, l)).attr("stroke-width", (a) => s == a.properties[t] ? 1.2 : 0.4).attr("stroke", (a) => s == a.properties[t] ? o : i).on("click", this.onPolygonClick);
486
+ l.length > 0 && n.selectAll("path").data(l).join("path").attr("d", this.path).attr("fill", (a) => this.fillColor(a, r)).attr("stroke-width", (a) => t == a.properties[s] ? 1.2 : 0.4).attr("stroke", (a) => t == a.properties[s] ? o : i).on("click", this.onPolygonClick);
427
487
  }
428
- drawPoints(e, t) {
488
+ drawPoints(e, s) {
429
489
  const {
430
490
  intl: i,
431
491
  pointLabelColor: o,
432
- pointLabelFormat: s,
433
- transformedData: l,
434
- defaultPointColor: c,
435
- appliedFilters: r,
492
+ pointLabelFormat: t,
493
+ transformedData: r,
494
+ defaultPointColor: n,
495
+ appliedFilters: l,
436
496
  zoomOnFilterField: a,
437
497
  noDataText: h,
438
- showShadingLayerLabels: n
439
- } = this.props, u = m.select(this.getMapId()).select("svg").select("g");
440
- let f = [];
441
- if (l.pointsData) {
442
- let p = this.state.selectedPolygon;
443
- t && r && r[a] && (p = r[a]), f = l.pointsData.filter((d) => d.lat && d.lng && d.label == p).map((d) => ({
498
+ showShadingLayerLabels: p
499
+ } = this.props, d = g.select(this.getMapId()).select("svg").select("g");
500
+ let u = [];
501
+ if (r.pointsData) {
502
+ let c = this.state.selectedPolygon;
503
+ s && l && l[a] && (c = l[a]), u = r.pointsData.filter((f) => f.lat && f.lng && f.label == c).map((f) => ({
444
504
  properties: {
445
- label: d.label,
446
- lat: d.lat,
447
- lng: d.lng,
448
- value: d.value,
449
- variables: d.variables
505
+ label: f.label,
506
+ lat: f.lat,
507
+ lng: f.lng,
508
+ value: f.value,
509
+ variables: f.variables
450
510
  }
451
- })), u.selectAll(".circle").data(f).enter().append("circle").attr("id", (d, v) => "circle" + v).attr("cx", (d) => this.projection([
452
- d.properties.lng,
453
- d.properties.lat
454
- ])[0]).attr("cy", (d) => this.projection([
455
- d.properties.lng,
456
- d.properties.lat
457
- ])[1]).attr("r", (d, v) => 2).style("stroke-width", 0.5).style("fill", (d, v) => c).on("mouseover", (d, v) => this.onPointClick(d, v)).on("mouseout", this.mouseout);
511
+ })), d.selectAll(".circle").data(u).enter().append("circle").attr("id", (f, y) => "circle" + y).attr("cx", (f) => this.projection([
512
+ f.properties.lng,
513
+ f.properties.lat
514
+ ])[0]).attr("cy", (f) => this.projection([
515
+ f.properties.lng,
516
+ f.properties.lat
517
+ ])[1]).attr("r", (f, y) => 2).style("stroke-width", 0.5).style("fill", (f, y) => n).on("mouseover", (f, y) => this.onPointClick(f, y)).on("mouseout", this.mouseout);
458
518
  }
459
- const g = this.getBreaks();
460
- let L = [];
461
- n == S ? L = e.filter(
462
- (p) => p.geometry && p.geometry.type == "Point"
463
- ) : n == j && (L = e.filter(
464
- (p) => p.geometry && p.geometry.type == "Point" && p.properties.hasDataRow
465
- )), L.length > 0 && u.selectAll(".point-labels").data(L).enter().append("foreignObject").attr("id", (p, d) => "point-label" + d).attr("class", "point-labels-container").attr("x", (p) => {
466
- const d = this.getLabelBoxWidth(p) + 20;
519
+ const m = this.getBreaks();
520
+ let v = [];
521
+ p == j ? v = e.filter(
522
+ (c) => c.geometry && c.geometry.type == "Point"
523
+ ) : p == B && (v = e.filter(
524
+ (c) => c.geometry && c.geometry.type == "Point" && c.properties.hasDataRow
525
+ )), v.length > 0 && d.selectAll(".point-labels").data(v).enter().append("foreignObject").attr("id", (c, f) => "point-label" + f).attr("class", "point-labels-container").attr("x", (c) => {
526
+ const f = this.getLabelBoxWidth(c) + 20;
467
527
  return this.projection([
468
- p.geometry.coordinates[1],
469
- p.geometry.coordinates[0]
470
- ])[0] - d / 2;
471
- }).attr("y", (p) => this.projection([
472
- p.geometry.coordinates[1],
473
- p.geometry.coordinates[0]
474
- ])[1] - this.getLabelBoxHeight(p) / 2).attr("width", (p) => this.getLabelBoxWidth(p) + 20).attr("height", (p) => "1px").attr("overflow", "visible").attr("font-size", "12px").style("opacity", 1).append("xhtml:div").style("color", (p, d) => o).style("font-weight", (p) => "bold").style("background-color", (p) => this.fillColor(p, g)).style("padding", (p) => "5px 3px 5px 3px").style("border-radius", (p) => "4px").style("line-height", "100%").style("text-align", "center").html((p, d) => k(
475
- s,
528
+ c.geometry.coordinates[1],
529
+ c.geometry.coordinates[0]
530
+ ])[0] - f / 2;
531
+ }).attr("y", (c) => this.projection([
532
+ c.geometry.coordinates[1],
533
+ c.geometry.coordinates[0]
534
+ ])[1] - this.getLabelBoxHeight(c) / 2).attr("width", (c) => this.getLabelBoxWidth(c) + 20).attr("height", (c) => "1px").attr("overflow", "visible").attr("font-size", "12px").style("opacity", 1).append("xhtml:div").style("color", (c, f) => o).style("font-weight", (c) => "bold").style("background-color", (c) => this.fillColor(c, m)).style("padding", (c) => "5px 3px 5px 3px").style("border-radius", (c) => "4px").style("line-height", "100%").style("text-align", "center").html((c, f) => k(
535
+ t,
476
536
  {
477
- value: p.properties.value,
478
- locationName: p.properties[this.props.mapLabelField]
537
+ value: c.properties.value,
538
+ locationName: c.properties[this.props.mapLabelField]
479
539
  },
480
540
  i
481
- )).on("mouseover", (p, d, v) => {
482
- m.select(this.getMapId()).select("svg").select("g").select("#point-label" + v).raise(), this.showTooltip(p, d);
541
+ )).on("mouseover", (c, f, y) => {
542
+ g.select(this.getMapId()).select("svg").select("g").select("#point-label" + y).raise(), this.showTooltip(c, f);
483
543
  }).on("mousemove", this.mousemove).on("mouseout", this.mouseout);
484
544
  }
485
- addSymbols(e, t) {
486
- const { mappingField: i } = this.props, o = m.select(this.getMapId()).select("svg").select("g");
487
- e.forEach((s) => {
488
- if (s.field && s.image && s.values) {
489
- const l = t.filter((r) => {
490
- const a = U == s.field ? i : "value", h = (r.properties[a] || (r.properties.variables ? r.properties.variables[a] : "")) + "", u = (s.values + "").split(",");
491
- return r.properties.LATITUDE && r.properties.LONGITUDE && u.filter(
492
- (f) => f.trim().toLowerCase() == h.trim().toLowerCase()
545
+ addSymbols(e, s) {
546
+ const { mappingField: i } = this.props, o = g.select(this.getMapId()).select("svg").select("g");
547
+ e.forEach((t) => {
548
+ if (t.field && t.image && t.values) {
549
+ const r = s.filter((l) => {
550
+ const a = G == t.field ? i : "value", h = (l.properties[a] || (l.properties.variables ? l.properties.variables[a] : "")) + "", d = (t.values + "").split(",");
551
+ return l.properties.LATITUDE && l.properties.LONGITUDE && d.filter(
552
+ (u) => u.trim().toLowerCase() == h.trim().toLowerCase()
493
553
  ).length > 0;
494
- }), c = t.filter((r) => {
495
- const a = U == s.field ? i : "value", h = (r.properties[a] || (r.properties.variables ? r.properties.variables[a] : "")) + "", u = (s.values + "").split(",");
496
- return !r.properties.LATITUDE && !r.properties.LONGITUDE && u.filter(
497
- (f) => f.trim().toLowerCase() == h.trim().toLowerCase()
554
+ }), n = s.filter((l) => {
555
+ const a = G == t.field ? i : "value", h = (l.properties[a] || (l.properties.variables ? l.properties.variables[a] : "")) + "", d = (t.values + "").split(",");
556
+ return !l.properties.LATITUDE && !l.properties.LONGITUDE && d.filter(
557
+ (u) => u.trim().toLowerCase() == h.trim().toLowerCase()
498
558
  ).length > 0;
499
559
  });
500
- o.selectAll("image").data(l).enter().append("image").attr("width", 40).attr("height", 40).attr("class", "map-symbol").attr("xlink:href", "/" + s.image).attr("transform", (r) => "translate(" + this.projection([r.properties.LONGITUDE, r.properties.LATITUDE]) + ")").on("mouseover", this.showTooltip).on("mousemove", this.mousemove).on("mouseout", this.mouseout), o.selectAll("image").data(c).enter().append("image").attr("width", 40).attr("height", 40).attr("class", "map-symbol").attr("xlink:href", "/" + s.image).attr("x", (r) => this.path.centroid(r)[0] - 20).attr("y", (r) => this.path.centroid(r)[1]).on("mouseover", this.showTooltip).on("mousemove", this.mousemove).on("mouseout", this.mouseout);
560
+ o.selectAll("image").data(r).enter().append("image").attr("width", 40).attr("height", 40).attr("class", "map-symbol").attr("xlink:href", "/" + t.image).attr("transform", (l) => "translate(" + this.projection([l.properties.LONGITUDE, l.properties.LATITUDE]) + ")").on("mouseover", this.showTooltip).on("mousemove", this.mousemove).on("mouseout", this.mouseout), o.selectAll("image").data(n).enter().append("image").attr("width", 40).attr("height", 40).attr("class", "map-symbol").attr("xlink:href", "/" + t.image).attr("x", (l) => this.path.centroid(l)[0] - 20).attr("y", (l) => this.path.centroid(l)[1]).on("mouseover", this.showTooltip).on("mousemove", this.mousemove).on("mouseout", this.mouseout);
501
561
  }
502
562
  });
503
563
  }
@@ -506,187 +566,196 @@ class de extends H.Component {
506
566
  return e ? 30 : 25;
507
567
  }
508
568
  getLabelBoxWidth(e) {
509
- const { mapLabelField: t } = this.props, i = 80;
510
- if (e.properties[t]) {
511
- const o = e.properties[t].length;
569
+ const { mapLabelField: s } = this.props, i = 80;
570
+ if (e.properties[s]) {
571
+ const o = e.properties[s].length;
512
572
  return o < 10 ? i : o * 8;
513
573
  }
514
574
  return 0;
515
575
  }
516
- featuresZoom(e, t, i) {
517
- const o = m.select(this.getMapId()).select("svg"), s = this.boundingExtent(e), [[l, c], [r, a]] = s, h = this.getWidth(), n = this.getHeight(), u = Math.min(
576
+ featuresZoom(e, s, i) {
577
+ const o = g.select(this.getMapId()).select("svg"), t = this.boundingExtent(e), [[r, n], [l, a]] = t, h = this.getWidth(), p = this.getHeight(), d = Math.min(
518
578
  8,
519
- 0.9 / Math.max((r - l) / h, (a - c) / n)
520
- ), f = [h / 2 - (l + r) / 2, n / 2 - (c + a) / 2];
521
- t ? o.call(
579
+ 0.9 / Math.max((l - r) / h, (a - n) / p)
580
+ ), u = [h / 2 - (r + l) / 2, p / 2 - (n + a) / 2];
581
+ s ? o.call(
522
582
  this.zoom.transform,
523
- m.zoomIdentity.translate(f[0], f[1]).scale(u)
583
+ g.zoomIdentity.translate(u[0], u[1]).scale(d)
524
584
  ) : o.transition().duration(450).call(
525
585
  this.zoom.transform,
526
- m.zoomIdentity.translate(f[0], f[1]).scale(u)
586
+ g.zoomIdentity.translate(u[0], u[1]).scale(d)
527
587
  ).on("end", i);
528
588
  }
529
589
  fullView() {
530
- const { mapPosition: e, editing: t } = this.props, i = m.select(this.getMapId()).select("svg");
590
+ const { mapPosition: e, editing: s } = this.props, i = g.select(this.getMapId()).select("svg");
531
591
  i.select("g").selectAll(".active").attr("class", function() {
532
- return m.select(this).attr("class").replace(/background/gi, "");
592
+ return g.select(this).attr("class").replace(/background/gi, "");
533
593
  });
534
- let s = m.zoomIdentity;
535
- e && !t ? s = s.translate(e.x, e.y).scale(e.k) : s = s.translate(0, 0).scale(1), i.transition().duration(300).call(this.zoom.transform, s);
594
+ let t = g.zoomIdentity;
595
+ e && !s ? t = t.translate(e.x, e.y).scale(e.k) : t = t.translate(0, 0).scale(1), i.transition().duration(300).call(this.zoom.transform, t);
536
596
  }
537
- showTooltip(e, t) {
597
+ showTooltip(e, s) {
538
598
  let {
539
599
  showTooltip: i,
540
600
  zoomEnabled: o,
541
- tooltipTheme: s,
542
- customTooltips: l,
543
- tooltipFontSize: c,
544
- tooltipFormat: r,
601
+ tooltipTheme: t,
602
+ customTooltips: r,
603
+ tooltipFontSize: n,
604
+ tooltipFormat: l,
545
605
  intl: a,
546
606
  mappingField: h,
547
- showNoDataTooltip: n,
548
- fields: u,
549
- mapType: f,
550
- noDataText: g
607
+ showNoDataTooltip: p,
608
+ fields: d,
609
+ mapType: u,
610
+ noDataText: m
551
611
  } = this.props;
552
612
  if (o = !!["mobile", "tablet", "midTablet"].includes(
553
- F()
554
- ), i && t.properties.value != null || i && n) {
555
- m.select(this.getMapId()).select("svg").select("g").selectAll(".active").attr("class", (z) => z.properties[h] === t.properties[h] ? "focus" + (o ? " zoom-enabled" : "") : "active" + (o ? " zoom-enabled" : ""));
556
- const d = r || `{locationName} %({value},2)
557
- {label}: %({value},2)`, v = t.properties.variables || {}, M = {
558
- ...t.properties,
559
- value: t.properties.value,
613
+ T()
614
+ ), i && s.properties.value != null || i && p) {
615
+ g.select(this.getMapId()).select("svg").select("g").selectAll(".active").attr("class", (A) => A.properties[h] === s.properties[h] ? "focus" + (o ? " zoom-enabled" : "") : "active" + (o ? " zoom-enabled" : ""));
616
+ const f = l || `{locationName} %({value},2)
617
+ {label}: %({value},2)`, y = s.properties.variables || {}, I = {
618
+ ...s.properties,
619
+ value: s.properties.value,
560
620
  measure: this.getSelectedMeasure(),
561
- measureLabel: t.properties.measureLabel,
562
- locationName: t.properties[h],
563
- ...v
621
+ measureLabel: s.properties.measureLabel,
622
+ locationName: this.getTranslatedLocationName(s, h, a),
623
+ label: this.getTranslatedLocationName(s, h, a),
624
+ ...y
564
625
  };
565
- this.tooltip.attr("class", s).style("position", "absolute").style("visibility", "hidden").style("visibility", "visible").html((z) => {
566
- let y = `<div style='font-size:${c}px;' class='tooltip-content' >`;
567
- if (t.properties.value != null) {
568
- const x = d.split(`
569
- `), A = x[0], B = x.length > 1 ? x[1] : null;
570
- let D = 1, P;
571
- u.length > 1 && f != "POINTS_MAP" ? (D = x.length > 2 ? 2 : 1, P = x[D]) : P = null, A && (y += k(A, M, a)), B && (y.endsWith("<hr>") || (y += "<hr>"), y += k(B, M, a)), P && t.properties.children && t.properties.children.forEach((C, W) => {
572
- const Z = {
626
+ this.tooltip.attr("class", t).style("position", "absolute").style("visibility", "hidden").style("visibility", "visible").html((A) => {
627
+ let L = `<div style='font-size:${n}px;' class='tooltip-content' >`;
628
+ if (s.properties.value != null) {
629
+ const x = f.split(`
630
+ `), D = x[0], W = x.length > 1 ? x[1] : null;
631
+ let z = 1, P;
632
+ d.length > 1 && u != "POINTS_MAP" ? (z = x.length > 2 ? 2 : 1, P = x[z]) : P = null, D && (L += k(D, I, a)), W && (L.endsWith("<hr>") || (L += "<hr>"), L += k(W, I, a)), P && s.properties.children && s.properties.children.forEach((C, _) => {
633
+ const J = {
573
634
  value: C.value,
574
635
  label: C.label,
575
636
  measure: this.getSelectedMeasure(),
576
- measureLabel: t.properties.measureLabel,
577
- ...v
637
+ measureLabel: s.properties.measureLabel,
638
+ ...y
578
639
  };
579
- y.endsWith("<hr>") || (y += "<hr>"), y += k(
640
+ L.endsWith("<hr>") || (L += "<hr>"), L += k(
580
641
  P,
581
- Z,
642
+ J,
582
643
  a
583
644
  );
584
- }), x.length > D + 1 && (y.endsWith("<hr>") || (y += "<hr>"), x.forEach((C, W) => {
585
- W > D && (y.endsWith("<hr>") || (y += "<hr>"), y += k(C, M, a));
586
- })), l.filter(
587
- (C) => C.location === t.properties[h]
645
+ }), x.length > z + 1 && (L.endsWith("<hr>") || (L += "<hr>"), x.forEach((C, _) => {
646
+ _ > z && (L.endsWith("<hr>") || (L += "<hr>"), L += k(C, I, a));
647
+ })), r.filter(
648
+ (C) => C.location === s.properties[h]
588
649
  ).forEach((C) => {
589
- y.endsWith("<hr>") || (y += "<hr>"), y += C.tooltip;
650
+ L.endsWith("<hr>") || (L += "<hr>"), L += C.tooltip;
590
651
  });
591
652
  } else {
592
- const x = r || `{locationName} %({value},2)
593
- {label}: %({value},2)`, A = {
653
+ const x = l || `{locationName} %({value},2)
654
+ {label}: %({value},2)`, D = {
594
655
  value: null,
595
656
  measure: this.getSelectedMeasure(),
596
- measureLabel: t.properties.measureLabel,
597
- locationName: t.properties[h],
598
- ...v
657
+ measureLabel: s.properties.measureLabel,
658
+ locationName: this.getTranslatedLocationName(s, h, a),
659
+ ...y
599
660
  };
600
- y += k(x, A, a), y += "</div>";
661
+ L += k(x, D, a), L += "</div>";
601
662
  }
602
- return y;
663
+ return L;
603
664
  });
604
665
  }
605
666
  }
606
- mousemove(e, t) {
667
+ mousemove(e, s) {
607
668
  this.tooltip.style("top", e.pageY + "px").style("left", e.pageX + 5 + "px");
608
669
  }
609
- mouseout(e, t) {
670
+ mouseout(e, s) {
610
671
  const { showTooltip: i } = this.props;
611
- i && (m.select(this.getMapId()).select("svg").select("g").selectAll(".focus").attr("class", "active"), this.tooltip.style("visibility", "hidden"));
672
+ i && (g.select(this.getMapId()).select("svg").select("g").selectAll(".focus").attr("class", "active"), this.tooltip.style("visibility", "hidden"));
612
673
  }
613
- onClick(e, t) {
614
- t.properties && this.tooltip.style("visibility", "visible").style("top", e.pageY + "px").style("left", e.pageX + 5 + "px"), e.stopPropagation(), e.preventDefault();
674
+ onClick(e, s) {
675
+ s.properties && this.tooltip.style("visibility", "visible").style("top", e.pageY + "px").style("left", e.pageX + 5 + "px"), e.stopPropagation(), e.preventDefault();
615
676
  }
616
- onPointClick(e, t, i) {
617
- this.showTooltip(e, t), this.tooltip.style("visibility", "visible").style("top", e.pageY + "px").style("left", e.pageX + 5 + "px");
618
- const o = m.select(this.getMapId()).select("svg").select("g");
677
+ onPointClick(e, s, i) {
678
+ this.showTooltip(e, s), this.tooltip.style("visibility", "visible").style("top", e.pageY + "px").style("left", e.pageX + 5 + "px");
679
+ const o = g.select(this.getMapId()).select("svg").select("g");
619
680
  o.selectAll("circle").style("fill", this.props.defaultPointColor).style("stroke", "none"), o.select("#circle" + i).raise().style("fill", "#fff");
620
681
  }
621
- onPolygonClick(e, t) {
682
+ onPolygonClick(e, s) {
622
683
  const { mappingField: i } = this.props;
623
- this.state.selectedPolygon !== t.properties[i] && t.properties.value !== null && this.setState({ selectedPolygon: t.properties[i] });
684
+ this.state.selectedPolygon !== s.properties[i] && s.properties.value !== null && this.setState({ selectedPolygon: s.properties[i] });
624
685
  }
625
686
  onZoomIn(e) {
626
- m.select(this.getMapId()).select("svg").transition().call(this.zoom.scaleBy, 1.5);
687
+ g.select(this.getMapId()).select("svg").transition().call(this.zoom.scaleBy, 1.5);
627
688
  }
628
689
  onZoomOut() {
629
- m.select(this.getMapId()).select("svg").transition().call(this.zoom.scaleBy, 0.6667);
690
+ g.select(this.getMapId()).select("svg").transition().call(this.zoom.scaleBy, 0.6667);
630
691
  }
631
692
  getSelectedMeasure() {
632
693
  let e = this.state.selectedMeasure;
633
694
  return !e && this.props.transformedData && this.props.transformedData.measures && this.props.transformedData.measures.length > 1 && (e = this.props.transformedData.measures[0]), e;
634
695
  }
635
696
  getCollectionField(e) {
636
- const { topoJSONField: t } = this.props;
697
+ const { topoJSONField: s } = this.props;
637
698
  if (e && e.objects) {
638
699
  const i = Object.keys(e.objects);
639
700
  for (const o in i) {
640
- const s = i[o];
641
- if (e.objects[s].type == "GeometryCollection")
642
- return s;
701
+ const t = i[o];
702
+ if (e.objects[t].type == "GeometryCollection")
703
+ return t;
643
704
  }
644
705
  }
645
- return t;
706
+ return s;
646
707
  }
647
708
  extractFeatures(e) {
648
- const t = this.getCollectionField(e);
649
- return e && e.objects && e.objects[t] ? se.feature(e, e.objects[t]).features : e && e.features ? e.features : [];
709
+ const s = this.getCollectionField(e);
710
+ return e && e.objects && e.objects[s] ? ie.feature(e, e.objects[s]).features : e && e.features ? e.features : [];
650
711
  }
651
712
  getLayers() {
652
- const { layers: e } = this.state, { enabledLayers: t } = this.props;
713
+ const { layers: e } = this.state, { enabledLayers: s } = this.props;
653
714
  return e && e.length > 0 ? e.map((o) => {
654
- const s = t.find((l) => l.id == o.id);
655
- return o.index = s ? s.index : 0, o;
656
- }).sort((o, s) => parseInt(o.index) < parseInt(s.index) ? 1 : parseInt(o.index) > parseInt(s.index) ? -1 : 0) : [];
715
+ const t = s.find((r) => r.id == o.id);
716
+ return o.index = t ? t.index : 0, o;
717
+ }).sort((o, t) => parseInt(o.index) < parseInt(t.index) ? 1 : parseInt(o.index) > parseInt(t.index) ? -1 : 0) : [];
657
718
  }
658
719
  getFeatures() {
659
- const e = this.getMainLayer(), t = this.getLayers();
720
+ const e = this.getMainLayer(), s = this.getLayers();
660
721
  if (e) {
661
- const { transformedData: i, mappingField: o, app: s, mainLayerId: l, enabledLayers: c } = this.props;
662
- let r = [];
722
+ const { transformedData: i, mappingField: o, app: t, mainLayerId: r, enabledLayers: n } = this.props;
723
+ let l = [];
663
724
  try {
664
- r = this.extractFeatures(e), r.map((n) => (n.properties.layerId = l, n)), t && t.forEach((n) => {
665
- if (n.id != l) {
666
- let u = this.extractFeatures(n.data);
667
- u = u.map((f) => (f.properties.layerId = n.id, f)), r = [...u, ...r];
725
+ l = this.extractFeatures(e), l.map((p) => {
726
+ p.properties.layerId = r;
727
+ const d = s.find((u) => String(u.id) === String(r));
728
+ return d && (p.properties.layerMappingField = d.layerMappingField, p.properties.layerDatasource = d.layerDatasource, p.properties.layerApiField = d.layerApiField, p.properties.layerLocale = d.layerLocale, p.properties.displayLayerLabels = d.displayLayerLabels), n.forEach((u) => {
729
+ String(u.id) == r && Object.keys(u || {}).forEach((m) => {
730
+ p.properties[m] = u[m];
731
+ });
732
+ }), p;
733
+ }), s && s.forEach((p) => {
734
+ if (p.id != r) {
735
+ let d = this.extractFeatures(p.data);
736
+ d = d.map((u) => (u.properties.layerId = p.id, u.properties.layerMappingField = p.layerMappingField, u.properties.layerDatasource = p.layerDatasource, u.properties.layerApiField = p.layerApiField, u.properties.layerLocale = p.layerLocale, u.properties.displayLayerLabels = p.displayLayerLabels, u)), l = [...d, ...l];
668
737
  }
669
738
  });
670
- } catch (n) {
671
- console.log("error updating features .." + n);
739
+ } catch (p) {
740
+ console.log("error updating features .." + p);
672
741
  }
673
- const a = r.filter((n) => n.properties != null);
742
+ const a = l.filter((p) => p.properties != null);
674
743
  let h = i.locationsData;
675
744
  return i.measures && i.measures.length > 1 && (h = i.locationsData.filter(
676
- (n) => n.measure === this.getSelectedMeasure()
677
- )), a.map((n) => {
745
+ (p) => p.measure === this.getSelectedMeasure()
746
+ )), a.map((p) => {
678
747
  if (h) {
679
- const u = h.find((f) => {
680
- const g = f.label ? ("" + f.label).toLowerCase() : "", L = n.properties[o] ? n.properties[o].toLowerCase() : "";
681
- return g === L;
748
+ const d = h.find((u) => {
749
+ const m = u.label ? ("" + u.label).toLowerCase() : "", v = p.properties[o] ? p.properties[o].toLowerCase() : "";
750
+ return m === v;
682
751
  });
683
- if (u) {
684
- let f = u.measure;
685
- i.measureLabelMap && u.measure && i.measureLabelMap[u.measure] && (f = i.measureLabelMap[u.measure]), n.properties.value = u.value, n.properties.measure = u.measure, n.properties.measureLabel = f, n.properties.children = u.children, n.properties.variables = u.variables, n.properties.hasDataRow = !0, Object.keys(u).forEach((g) => {
686
- n.properties[g] = u[g];
752
+ if (d) {
753
+ let u = d.measure;
754
+ i.measureLabelMap && d.measure && i.measureLabelMap[d.measure] && (u = i.measureLabelMap[d.measure]), p.properties.value = d.value, p.properties.measure = d.measure, p.properties.measureLabel = u, p.properties.children = d.children, p.properties.variables = d.variables, p.properties.hasDataRow = !0, Object.keys(d).forEach((m) => {
755
+ p.properties[m] = d[m];
687
756
  });
688
757
  } else
689
- n.properties.value = null, n.properties.measure = null, n.properties.children = null, n.properties.measureLabel = null, n.properties.hasDataRow = !1;
758
+ p.properties.value = null, p.properties.measure = null, p.properties.children = null, p.properties.measureLabel = null, p.properties.hasDataRow = !1;
690
759
  }
691
760
  }), a;
692
761
  }
@@ -696,75 +765,75 @@ class de extends H.Component {
696
765
  const { unique: e } = this.props;
697
766
  return ".map.wrapper." + e;
698
767
  }
699
- filterUpdated(e, t) {
700
- const { zoomOnFilterField: i } = this.props, o = e && e.appliedFilters || {}, s = this.props.appliedFilters || {};
701
- let l = !1;
702
- return o[i] != s[i] && (l = !0), l;
768
+ filterUpdated(e, s) {
769
+ const { zoomOnFilterField: i } = this.props, o = e && e.appliedFilters || {}, t = this.props.appliedFilters || {};
770
+ let r = !1;
771
+ return o[i] != t[i] && (r = !0), r;
703
772
  }
704
- getCenter(e, t) {
705
- const { zoomOnFilter: i, zoomOnFilterField: o, mappingField: s, appliedFilters: l } = this.props;
706
- let c = null;
773
+ getCenter(e, s) {
774
+ const { zoomOnFilter: i, zoomOnFilterField: o, mappingField: t, appliedFilters: r } = this.props;
775
+ let n = null;
707
776
  if (i && o) {
708
- let r = this.state.selectedPolygon;
709
- t && l && l[o] && (r = l[o]);
777
+ let l = this.state.selectedPolygon;
778
+ s && r && r[o] && (l = r[o]);
710
779
  const a = e.filter(
711
- (h) => h.properties != null && h.properties[s] == r
780
+ (h) => h.properties != null && h.properties[t] == l
712
781
  )[0];
713
- a && a.properties != null && a.properties.value && (c = a);
782
+ a && a.properties != null && a.properties.value && (n = a);
714
783
  }
715
- return c;
784
+ return n;
716
785
  }
717
786
  area(e) {
718
- let t = 0;
787
+ let s = 0;
719
788
  const i = e.coordinates.length > 1 ? e.coordinates[0][0] : e.coordinates[0];
720
789
  for (let o = 0; o < i.length - 1; o++)
721
- t += i[o][0] * i[o + 1][1] - i[o + 1][0] * i[o][1];
722
- return 0.5 * t;
790
+ s += i[o][0] * i[o + 1][1] - i[o + 1][0] * i[o][1];
791
+ return 0.5 * s;
723
792
  }
724
793
  centroid(e) {
725
- const t = [0, 0], i = e.coordinates.length > 1 ? e.coordinates[0][0] : e.coordinates[0];
726
- for (let s = 0; s < i.length - 1; s++)
727
- t[0] += (i[s][0] + i[s + 1][0]) * (i[s][0] * i[s + 1][1] - i[s + 1][0] * i[s][1]), t[1] += (i[s][1] + i[s + 1][1]) * (i[s][0] * i[s + 1][1] - i[s + 1][0] * i[s][1]);
794
+ const s = [0, 0], i = e.coordinates.length > 1 ? e.coordinates[0][0] : e.coordinates[0];
795
+ for (let t = 0; t < i.length - 1; t++)
796
+ s[0] += (i[t][0] + i[t + 1][0]) * (i[t][0] * i[t + 1][1] - i[t + 1][0] * i[t][1]), s[1] += (i[t][1] + i[t + 1][1]) * (i[t][0] * i[t + 1][1] - i[t + 1][0] * i[t][1]);
728
797
  const o = this.area(e);
729
- return t[0] /= o * 6, t[1] /= o * 6, t;
730
- }
731
- d3Map(e, t) {
732
- let { zoomEnabled: i, mapContainerBgColor: o, mapPosition: s, editing: l, mapType: c } = this.props;
733
- i || (i = !!["mobile", "tablet"].includes(F()));
734
- const r = this.getBreaks(), a = m.select(this.getMapId());
735
- let h = a.select("svg"), n = this.getWidth();
736
- n === 0 ? n = window.innerWidth + V[F()] : n += V[F()];
737
- const u = this.getHeight() - 100;
738
- if (h.empty() ? h = a.append("svg") : h.selectAll("*").remove(), h.attr("style", `background-color:${o};`).attr("viewBox", `0 0 ${n} ${u}`).attr("preserveAspectRatio", "xMidYMid meet"), h.append("g").selectAll("path").data(e).enter().append("path").attr("fill", (g) => this.fillColor(g, r)).attr("d", m.geoPath().projection(this.projection)).attr("class", (g) => this.classColor(g)).on("mouseover", c !== "POINTS_MAP" ? this.showTooltip : null).on("mousemove", c !== "POINTS_MAP" ? this.mousemove : null).on("mouseout", c !== "POINTS_MAP" ? this.mouseout : null), this.mapPosition && h.transition().duration(300).call(
798
+ return s[0] /= o * 6, s[1] /= o * 6, s;
799
+ }
800
+ d3Map(e, s) {
801
+ let { zoomEnabled: i, mapContainerBgColor: o, mapPosition: t, editing: r, mapType: n } = this.props;
802
+ i || (i = !!["mobile", "tablet"].includes(T()));
803
+ const l = this.getBreaks(), a = g.select(this.getMapId());
804
+ let h = a.select("svg"), p = this.getWidth();
805
+ p === 0 ? p = window.innerWidth + Z[T()] : p += Z[T()];
806
+ const d = this.getHeight() - 100;
807
+ if (h.empty() ? h = a.append("svg") : h.selectAll("*").remove(), h.attr("style", `background-color:${o};`).attr("viewBox", `0 0 ${p} ${d}`).attr("preserveAspectRatio", "xMidYMid meet"), h.append("g").selectAll("path").data(e).enter().append("path").attr("fill", (m) => this.fillColor(m, l)).attr("d", g.geoPath().projection(this.projection)).attr("class", (m) => this.classColor(m)).on("mouseover", n !== "POINTS_MAP" ? this.showTooltip : null).on("mousemove", n !== "POINTS_MAP" ? this.mousemove : null).on("mouseout", n !== "POINTS_MAP" ? this.mouseout : null), this.mapPosition && h.transition().duration(300).call(
739
808
  this.zoom.transform,
740
- m.zoomIdentity.translate(this.mapPosition.x, this.mapPosition.y).scale(this.mapPosition.k)
741
- ), !this.mapPosition && s && s.x && s.y && s.k && (h.transition().duration(300).call(
809
+ g.zoomIdentity.translate(this.mapPosition.x, this.mapPosition.y).scale(this.mapPosition.k)
810
+ ), !this.mapPosition && t && t.x && t.y && t.k && (h.transition().duration(300).call(
742
811
  this.zoom.transform,
743
- m.zoomIdentity.translate(s.x, s.y).scale(s.k)
744
- ), c === "POINTS_MAP")) {
745
- const L = {
812
+ g.zoomIdentity.translate(t.x, t.y).scale(t.k)
813
+ ), n === "POINTS_MAP")) {
814
+ const v = {
746
815
  mobile: 100,
747
816
  tablet: 0,
748
817
  midTablet: 0,
749
818
  desktop: 0,
750
819
  laptop: 0,
751
820
  wide: 0
752
- }[F()];
821
+ }[T()];
753
822
  h.transition().duration(300).call(
754
823
  this.zoom.transform,
755
- m.zoomIdentity.translate(s.x + L, s.y).scale(s.k)
824
+ g.zoomIdentity.translate(t.x + v, t.y).scale(t.k)
756
825
  );
757
826
  }
758
- i || l ? h.call(this.zoom) : h.on("dblclick.zoom", null);
759
- const f = this.getCenter(e, t);
760
- if (f) {
761
- const g = this.path.bounds(f), L = [
762
- (g[0][0] + g[1][0]) / 2,
763
- (g[0][1] + g[1][1]) / 2
827
+ i || r ? h.call(this.zoom) : h.on("dblclick.zoom", null);
828
+ const u = this.getCenter(e, s);
829
+ if (u) {
830
+ const m = this.path.bounds(u), v = [
831
+ (m[0][0] + m[1][0]) / 2,
832
+ (m[0][1] + m[1][1]) / 2
764
833
  ];
765
834
  h.transition().duration(750).call(
766
835
  this.zoom.transform,
767
- m.zoomIdentity.translate(n / 2, u / 2).scale(12).translate(-L[0], -L[1])
836
+ g.zoomIdentity.translate(p / 2, d / 2).scale(12).translate(-v[0], -v[1])
768
837
  );
769
838
  }
770
839
  }
@@ -776,52 +845,65 @@ class de extends H.Component {
776
845
  this.state.selectedMeasure != e && this.setState({ selectedMeasure: e });
777
846
  }
778
847
  getFilters() {
779
- const { appliedFilters: e } = this.props, t = {};
848
+ const { appliedFilters: e } = this.props, s = {};
780
849
  return e && Object.keys(e).forEach((o) => {
781
- const s = e[o];
782
- s && (t[o] = Array.isArray(s) ? s.join(" ,") : s);
783
- }), t;
850
+ const t = e[o];
851
+ t && (s[o] = Array.isArray(t) ? t.join(" ,") : t);
852
+ }), s;
784
853
  }
785
854
  getHighlightedLocationData() {
786
- const { highlightedLocation: e, transformedData: t } = this.props;
787
- let i = t.locationsData;
788
- return t.measures && t.measures.length > 1 && (i = t.locationsData.filter(
789
- (s) => s.measure === this.getSelectedMeasure()
855
+ const { highlightedLocation: e, transformedData: s } = this.props;
856
+ let i = s.locationsData;
857
+ return s.measures && s.measures.length > 1 && (i = s.locationsData.filter(
858
+ (t) => t.measure === this.getSelectedMeasure()
790
859
  )), i.find(
791
- (s) => s.label === e
860
+ (t) => t.label === e
861
+ );
862
+ }
863
+ getTranslatedHighlightedLocationName() {
864
+ const { highlightedLocation: e, mapLabelField: s, intl: i } = this.props;
865
+ if (!e)
866
+ return null;
867
+ const t = this.getFeatures().find(
868
+ (r) => r.properties[s] === e
792
869
  );
870
+ if (t && t.properties.displayLayerLabels && t.properties.layerLocale) {
871
+ const r = t.properties.layerMappingField || s, n = t.properties[r];
872
+ return O(this.metadataTypes, n, t.properties.layerLocale);
873
+ }
874
+ return e;
793
875
  }
794
876
  getHighlightedLocationColor(e) {
795
- const t = this.getBreaks(), { mapNoDataColor: i } = this.props, o = e ? e.value : null;
877
+ const s = this.getBreaks(), { mapNoDataColor: i } = this.props, o = e ? e.value : null;
796
878
  if (o != null) {
797
- const s = t.find((l) => {
798
- if (l.min != null && l.max != null)
799
- return o >= l.min && o <= l.max;
800
- if (l.min != null)
801
- return o >= l.min;
802
- if (l.max != null)
803
- return o <= l.max;
879
+ const t = s.find((r) => {
880
+ if (r.min != null && r.max != null)
881
+ return o >= r.min && o <= r.max;
882
+ if (r.min != null)
883
+ return o >= r.min;
884
+ if (r.max != null)
885
+ return o <= r.max;
804
886
  });
805
- return s && s.color ? s.color : i;
887
+ return t && t.color ? t.color : i;
806
888
  }
807
889
  return i;
808
890
  }
809
891
  renderLoader() {
810
- return /* @__PURE__ */ b(R, { className: "loading", children: /* @__PURE__ */ b(
811
- K,
892
+ return /* @__PURE__ */ b(U, { className: "loading", children: /* @__PURE__ */ b(
893
+ Q,
812
894
  {
813
895
  basic: !0,
814
896
  padded: !0,
815
897
  textAlign: "center",
816
898
  style: { margin: "30px" },
817
- children: /* @__PURE__ */ b(Q, { active: !0, inverted: !0, children: /* @__PURE__ */ b(ee, { size: "medium" }) })
899
+ children: /* @__PURE__ */ b(ee, { active: !0, inverted: !0, children: /* @__PURE__ */ b(te, { size: "medium" }) })
818
900
  }
819
901
  ) });
820
902
  }
821
903
  noMapSelected() {
822
- return /* @__PURE__ */ w(N, { icon: !0, warning: !0, children: [
904
+ return /* @__PURE__ */ M(N, { icon: !0, warning: !0, children: [
823
905
  /* @__PURE__ */ b(E, { name: "map outline" }),
824
- /* @__PURE__ */ w(N.Content, { children: [
906
+ /* @__PURE__ */ M(N.Content, { children: [
825
907
  /* @__PURE__ */ b(N.Header, { children: "No map selected" }),
826
908
  "Pick one from the list in the ",
827
909
  /* @__PURE__ */ b("strong", { children: "Map Layers" }),
@@ -832,53 +914,53 @@ class de extends H.Component {
832
914
  render() {
833
915
  let {
834
916
  app: e,
835
- legendTitle: t,
917
+ legendTitle: s,
836
918
  nationalAverageLabel: i,
837
919
  intl: o,
838
- zoomEnabled: s,
839
- transformedData: l,
840
- measureSelectorLabel: c,
841
- valueFormat: r,
920
+ zoomEnabled: t,
921
+ transformedData: r,
922
+ measureSelectorLabel: n,
923
+ valueFormat: l,
842
924
  showOverallValue: a,
843
925
  unique: h,
844
- highlightedLocation: n,
845
- labelFontColor: u,
846
- legendFontSize: f,
847
- editing: g,
848
- highlightedLocLabelFormat: L,
849
- noDataText: p
926
+ highlightedLocation: p,
927
+ labelFontColor: d,
928
+ legendFontSize: u,
929
+ editing: m,
930
+ highlightedLocLabelFormat: v,
931
+ noDataText: c
850
932
  } = this.props;
851
- s || (s = !!["mobile", "tablet", "midTablet"].includes(
852
- F()
933
+ t || (t = !!["mobile", "tablet", "midTablet"].includes(
934
+ T()
853
935
  ));
854
- const d = this.getAvg(), v = this.getFilters(), M = this.getHighlightedLocationData(), z = {
855
- backgroundColor: this.getHighlightedLocationColor(M),
856
- color: u,
857
- fontSize: f + "px"
936
+ const f = this.getAvg(), y = this.getFilters(), I = this.getHighlightedLocationData(), A = {
937
+ backgroundColor: this.getHighlightedLocationColor(I),
938
+ color: d,
939
+ fontSize: u + "px"
858
940
  };
859
- g && (z.marginTop = "25px");
860
- const y = () => /* @__PURE__ */ w(R, { fluid: !0, className: "footnote ", children: [
861
- /* @__PURE__ */ w(O, { columns: 2, children: [
862
- e !== "csv" && a && /* @__PURE__ */ b(O.Column, { textAlign: "left", width: 4, children: /* @__PURE__ */ w("div", { className: "national-average-div", children: [
941
+ m && (A.marginTop = "25px");
942
+ const L = () => /* @__PURE__ */ M(U, { fluid: !0, className: "footnote ", children: [
943
+ /* @__PURE__ */ M(S, { columns: 2, children: [
944
+ e !== "csv" && a && /* @__PURE__ */ b(S.Column, { textAlign: "left", width: 4, children: /* @__PURE__ */ M("div", { className: "national-average-div", children: [
863
945
  /* @__PURE__ */ b("span", { className: "national-avg-label", children: i }),
864
946
  /* @__PURE__ */ b("span", { className: "national-avg-value", children: k(
865
- r,
866
- { value: d },
947
+ l,
948
+ { value: f },
867
949
  o
868
950
  ) })
869
951
  ] }) }),
870
952
  /* @__PURE__ */ b(
871
- O.Column,
953
+ S.Column,
872
954
  {
873
955
  textAlign: "right",
874
956
  width: e !== "csv" && a ? 12 : 16,
875
957
  children: /* @__PURE__ */ b(
876
- ie,
958
+ oe,
877
959
  {
878
960
  filteredBreaks: this.getBreaks(),
879
961
  formattedLegendTitle: k(
880
- t,
881
- { ...v },
962
+ s,
963
+ { ...y },
882
964
  o
883
965
  ),
884
966
  selectedMeasure: this.state.selectedMeasure,
@@ -888,9 +970,9 @@ class de extends H.Component {
888
970
  }
889
971
  )
890
972
  ] }),
891
- /* @__PURE__ */ b("div", { className: "measure-selector", children: /* @__PURE__ */ w("ul", { children: [
892
- c && /* @__PURE__ */ b("li", { children: /* @__PURE__ */ b("span", { className: "label", children: c }) }),
893
- l && l.measures && l.measures.length > 1 && l.measures.map((x) => /* @__PURE__ */ w("li", { onClick: this.selectedMeasureChanged.bind(this, x), children: [
973
+ /* @__PURE__ */ b("div", { className: "measure-selector", children: /* @__PURE__ */ M("ul", { children: [
974
+ n && /* @__PURE__ */ b("li", { children: /* @__PURE__ */ b("span", { className: "label", children: n }) }),
975
+ r && r.measures && r.measures.length > 1 && r.measures.map((x) => /* @__PURE__ */ M("li", { onClick: this.selectedMeasureChanged.bind(this, x), children: [
894
976
  /* @__PURE__ */ b(
895
977
  "input",
896
978
  {
@@ -899,49 +981,49 @@ class de extends H.Component {
899
981
  value: x
900
982
  }
901
983
  ),
902
- /* @__PURE__ */ b("label", { children: l.measureLabelMap[x] || x })
984
+ /* @__PURE__ */ b("label", { children: r.measureLabelMap[x] || x })
903
985
  ] }))
904
986
  ] }) })
905
987
  ] });
906
- return /* @__PURE__ */ w("div", { className: "map component wp-data-viz-map", ref: this.mapContainer, children: [
907
- this.state.layersLoading && (g ? this.noMapSelected() : this.renderLoader()),
908
- !this.state.layersLoading && /* @__PURE__ */ w(X, { children: [
909
- !G && /* @__PURE__ */ b(y, {}),
910
- /* @__PURE__ */ w(
988
+ return /* @__PURE__ */ M("div", { className: "map component wp-data-viz-map", ref: this.mapContainer, children: [
989
+ this.state.layersLoading && (m ? this.noMapSelected() : this.renderLoader()),
990
+ !this.state.layersLoading && /* @__PURE__ */ M(R, { children: [
991
+ !$ && /* @__PURE__ */ b(L, {}),
992
+ /* @__PURE__ */ M(
911
993
  "div",
912
994
  {
913
995
  className: "map wrapper scaling-svg-container " + h,
914
996
  style: {
915
- height: this.props.height - ce[F()] + "px"
997
+ height: this.props.height - ce[T()] + "px"
916
998
  },
917
999
  children: [
918
- M && M.value && /* @__PURE__ */ b(
1000
+ I ? /* @__PURE__ */ b(
919
1001
  "div",
920
1002
  {
921
1003
  className: "highlighted-loc-info",
922
- style: z,
923
- children: /* @__PURE__ */ w("span", { children: [
1004
+ style: A,
1005
+ children: /* @__PURE__ */ M("span", { children: [
924
1006
  " ",
925
1007
  k(
926
- L,
1008
+ v,
927
1009
  {
928
- value: M.value,
929
- locationName: M.label,
930
- measureName: M.measure
1010
+ value: I.value,
1011
+ locationName: this.getTranslatedHighlightedLocationName() || I.label,
1012
+ measureName: I.measure
931
1013
  },
932
1014
  o
933
1015
  )
934
1016
  ] })
935
1017
  }
936
- ),
937
- (g || s) && !he && /* @__PURE__ */ w("div", { className: "control panel ignore", children: [
1018
+ ) : /* @__PURE__ */ b(R, { children: " " }),
1019
+ (m || t) && !de && /* @__PURE__ */ M("div", { className: "control panel ignore", children: [
938
1020
  /* @__PURE__ */ b("div", { className: "zoom plus", onClick: this.onZoomIn, children: /* @__PURE__ */ b(E, { name: "plus", size: "large" }) }),
939
1021
  /* @__PURE__ */ b("div", { className: "zoom minus", onClick: this.onZoomOut, children: /* @__PURE__ */ b(E, { name: "minus", size: "large" }) }),
940
1022
  /* @__PURE__ */ b(
941
- te,
1023
+ se,
942
1024
  {
943
1025
  content: /* @__PURE__ */ b(
944
- q,
1026
+ K,
945
1027
  {
946
1028
  id: "map.reset.tooltip",
947
1029
  defaultMessage: "Reset zoom"
@@ -954,12 +1036,13 @@ class de extends H.Component {
954
1036
  ]
955
1037
  }
956
1038
  ),
957
- G && /* @__PURE__ */ b(y, {})
1039
+ $ && /* @__PURE__ */ b(L, {})
958
1040
  ] })
959
1041
  ] });
960
1042
  }
961
1043
  }
962
- const Me = Y(de);
1044
+ const Te = q(ue);
963
1045
  export {
964
- Me as default
1046
+ Te as default,
1047
+ O as getTranslatedItemLabel
965
1048
  };