geostyler 8.0.2 → 9.0.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 (316) hide show
  1. package/README.md +54 -32
  2. package/browser/geostyler.css +1 -1
  3. package/browser/geostyler.js +1 -1
  4. package/browser/geostyler.js.LICENSE.txt +2 -0
  5. package/dist/Component/Breadcrumb/Breadcrumb.css +8 -0
  6. package/dist/Component/Breadcrumb/Breadcrumb.d.ts +17 -0
  7. package/dist/Component/{DefaultValueContext/DefaultValueContext.js → Breadcrumb/Breadcrumb.js} +28 -5
  8. package/dist/Component/Breadcrumb/Breadcrumb.js.map +1 -0
  9. package/dist/Component/BulkEditor/BulkEditor.css +0 -0
  10. package/dist/Component/BulkEditor/BulkEditor.d.ts +69 -0
  11. package/dist/Component/BulkEditor/BulkEditor.js +131 -0
  12. package/dist/Component/BulkEditor/BulkEditor.js.map +1 -0
  13. package/dist/Component/CardStyle/CardStyle.css +10 -0
  14. package/dist/Component/CardStyle/CardStyle.d.ts +102 -0
  15. package/dist/Component/CardStyle/CardStyle.js +304 -0
  16. package/dist/Component/CardStyle/CardStyle.js.map +1 -0
  17. package/dist/Component/CodeEditor/CodeEditor.css +36 -5
  18. package/dist/Component/CodeEditor/CodeEditor.d.ts +2 -7
  19. package/dist/Component/CodeEditor/CodeEditor.js +68 -37
  20. package/dist/Component/CodeEditor/CodeEditor.js.map +1 -1
  21. package/dist/Component/DataInput/DataLoader/DataLoader.d.ts +2 -5
  22. package/dist/Component/DataInput/DataLoader/DataLoader.js +3 -1
  23. package/dist/Component/DataInput/DataLoader/DataLoader.js.map +1 -1
  24. package/dist/Component/DataInput/StyleLoader/StyleLoader.d.ts +2 -5
  25. package/dist/Component/DataInput/StyleLoader/StyleLoader.js +3 -1
  26. package/dist/Component/DataInput/StyleLoader/StyleLoader.js.map +1 -1
  27. package/dist/Component/DataInput/WfsParserInput/WfsParserInput.d.ts +2 -11
  28. package/dist/Component/DataInput/WfsParserInput/WfsParserInput.js +2 -2
  29. package/dist/Component/DataInput/WfsParserInput/WfsParserInput.js.map +1 -1
  30. package/dist/Component/FieldContainer/FieldContainer.css +3 -0
  31. package/dist/Component/FieldContainer/FieldContainer.d.ts +10 -0
  32. package/dist/Component/{CompositionContext/CompositionContext.js → FieldContainer/FieldContainer.js} +14 -4
  33. package/dist/Component/FieldContainer/FieldContainer.js.map +1 -0
  34. package/dist/Component/FieldSet/FieldSet.js +2 -2
  35. package/dist/Component/FieldSet/FieldSet.js.map +1 -1
  36. package/dist/Component/Filter/ComparisonFilter/ComparisonFilter.d.ts +9 -9
  37. package/dist/Component/Filter/ComparisonFilter/ComparisonFilter.js +18 -20
  38. package/dist/Component/Filter/ComparisonFilter/ComparisonFilter.js.map +1 -1
  39. package/dist/Component/Filter/FilterEditorWindow/FilterEditorWindow.d.ts +2 -4
  40. package/dist/Component/Filter/FilterEditorWindow/FilterEditorWindow.js +2 -2
  41. package/dist/Component/Filter/FilterEditorWindow/FilterEditorWindow.js.map +1 -1
  42. package/dist/Component/Filter/FilterTree/FilterTree.d.ts +2 -13
  43. package/dist/Component/Filter/FilterTree/FilterTree.js +73 -43
  44. package/dist/Component/Filter/FilterTree/FilterTree.js.map +1 -1
  45. package/dist/Component/Filter/NumberFilterField/NumberFilterField.js +0 -1
  46. package/dist/Component/Filter/NumberFilterField/NumberFilterField.js.map +1 -1
  47. package/dist/Component/Filter/OperatorCombo/OperatorCombo.js.map +1 -1
  48. package/dist/Component/Filter/TextFilterField/TextFilterField.js +0 -1
  49. package/dist/Component/Filter/TextFilterField/TextFilterField.js.map +1 -1
  50. package/dist/Component/FilterOverview/FilterOverview.css +6 -0
  51. package/dist/Component/FilterOverview/FilterOverview.d.ts +71 -0
  52. package/dist/Component/FilterOverview/FilterOverview.js +56 -0
  53. package/dist/Component/FilterOverview/FilterOverview.js.map +1 -0
  54. package/dist/Component/LocaleWrapper/LocaleWrapper.js +1 -1
  55. package/dist/Component/LocaleWrapper/LocaleWrapper.js.map +1 -1
  56. package/dist/Component/NameField/NameField.js.map +1 -1
  57. package/dist/Component/ParserFeedback/ParserFeedback.css +38 -0
  58. package/dist/Component/ParserFeedback/ParserFeedback.d.ts +12 -0
  59. package/dist/Component/ParserFeedback/ParserFeedback.js +94 -0
  60. package/dist/Component/ParserFeedback/ParserFeedback.js.map +1 -0
  61. package/dist/Component/PreviewMap/PreviewMap.d.ts +9 -91
  62. package/dist/Component/PreviewMap/PreviewMap.js +108 -174
  63. package/dist/Component/PreviewMap/PreviewMap.js.map +1 -1
  64. package/dist/Component/Removable/Removable.css +0 -0
  65. package/dist/Component/Removable/Removable.d.ts +10 -0
  66. package/dist/Component/Removable/Removable.js +52 -0
  67. package/dist/Component/Removable/Removable.js.map +1 -0
  68. package/dist/Component/Removable/RemovableItem/RemovableItem.css +14 -0
  69. package/dist/Component/Removable/RemovableItem/RemovableItem.d.ts +10 -0
  70. package/dist/Component/Removable/RemovableItem/RemovableItem.js +50 -0
  71. package/dist/Component/Removable/RemovableItem/RemovableItem.js.map +1 -0
  72. package/dist/Component/Renderer/Renderer.css +0 -0
  73. package/dist/Component/Renderer/Renderer.d.ts +21 -0
  74. package/dist/Component/Renderer/Renderer.js +62 -0
  75. package/dist/Component/Renderer/Renderer.js.map +1 -0
  76. package/dist/Component/Rule/RemoveButton/RemoveButton.d.ts +2 -1
  77. package/dist/Component/Rule/RemoveButton/RemoveButton.js +1 -0
  78. package/dist/Component/Rule/RemoveButton/RemoveButton.js.map +1 -1
  79. package/dist/Component/Rule/Rule.d.ts +4 -18
  80. package/dist/Component/Rule/Rule.js +3 -2
  81. package/dist/Component/Rule/Rule.js.map +1 -1
  82. package/dist/Component/Rule/TitleField/TitleField.d.ts +1 -0
  83. package/dist/Component/Rule/TitleField/TitleField.js +1 -0
  84. package/dist/Component/Rule/TitleField/TitleField.js.map +1 -1
  85. package/dist/Component/RuleCard/RuleCard.css +32 -0
  86. package/dist/Component/RuleCard/RuleCard.d.ts +21 -0
  87. package/dist/Component/RuleCard/RuleCard.js +93 -0
  88. package/dist/Component/RuleCard/RuleCard.js.map +1 -0
  89. package/dist/Component/RuleFieldContainer/RuleFieldContainer.css +21 -0
  90. package/dist/Component/RuleFieldContainer/RuleFieldContainer.d.ts +82 -0
  91. package/dist/Component/RuleFieldContainer/RuleFieldContainer.js +95 -0
  92. package/dist/Component/RuleFieldContainer/RuleFieldContainer.js.map +1 -0
  93. package/dist/Component/RuleGenerator/ClassificationCombo/ClassificationCombo.d.ts +3 -14
  94. package/dist/Component/RuleGenerator/ClassificationCombo/ClassificationCombo.js +10 -44
  95. package/dist/Component/RuleGenerator/ClassificationCombo/ClassificationCombo.js.map +1 -1
  96. package/dist/Component/RuleGenerator/ColorRampCombo/ColorRampCombo.d.ts +4 -12
  97. package/dist/Component/RuleGenerator/ColorRampCombo/ColorRampCombo.js +18 -51
  98. package/dist/Component/RuleGenerator/ColorRampCombo/ColorRampCombo.js.map +1 -1
  99. package/dist/Component/RuleGenerator/ColorSpaceCombo/ColorSpaceCombo.d.ts +3 -8
  100. package/dist/Component/RuleGenerator/ColorSpaceCombo/ColorSpaceCombo.js +10 -44
  101. package/dist/Component/RuleGenerator/ColorSpaceCombo/ColorSpaceCombo.js.map +1 -1
  102. package/dist/Component/RuleGenerator/ColorsPreview/ColorsPreview.d.ts +1 -5
  103. package/dist/Component/RuleGenerator/ColorsPreview/ColorsPreview.js +6 -33
  104. package/dist/Component/RuleGenerator/ColorsPreview/ColorsPreview.js.map +1 -1
  105. package/dist/Component/RuleGenerator/RuleGenerator.d.ts +5 -58
  106. package/dist/Component/RuleGenerator/RuleGenerator.js +112 -165
  107. package/dist/Component/RuleGenerator/RuleGenerator.js.map +1 -1
  108. package/dist/Component/RuleGenerator/RuleGeneratorWindow.d.ts +3 -10
  109. package/dist/Component/RuleGenerator/RuleGeneratorWindow.js +28 -57
  110. package/dist/Component/RuleGenerator/RuleGeneratorWindow.js.map +1 -1
  111. package/dist/Component/RuleOverview/RuleOverview.css +0 -0
  112. package/dist/Component/RuleOverview/RuleOverview.d.ts +83 -0
  113. package/dist/Component/RuleOverview/RuleOverview.js +134 -0
  114. package/dist/Component/RuleOverview/RuleOverview.js.map +1 -0
  115. package/dist/Component/RuleTable/RuleReorderButtons/RuleReorderButtons.d.ts +4 -12
  116. package/dist/Component/RuleTable/RuleReorderButtons/RuleReorderButtons.js +21 -49
  117. package/dist/Component/RuleTable/RuleReorderButtons/RuleReorderButtons.js.map +1 -1
  118. package/dist/Component/RuleTable/RuleTable.d.ts +17 -69
  119. package/dist/Component/RuleTable/RuleTable.js +204 -287
  120. package/dist/Component/RuleTable/RuleTable.js.map +1 -1
  121. package/dist/Component/Rules/Rules.css +17 -0
  122. package/dist/Component/Rules/Rules.d.ts +106 -0
  123. package/dist/Component/Rules/Rules.js +194 -0
  124. package/dist/Component/Rules/Rules.js.map +1 -0
  125. package/dist/Component/ScaleDenominator/MaxScaleDenominator.d.ts +1 -4
  126. package/dist/Component/ScaleDenominator/MaxScaleDenominator.js +6 -32
  127. package/dist/Component/ScaleDenominator/MaxScaleDenominator.js.map +1 -1
  128. package/dist/Component/ScaleDenominator/MinScaleDenominator.d.ts +1 -4
  129. package/dist/Component/ScaleDenominator/MinScaleDenominator.js +6 -32
  130. package/dist/Component/ScaleDenominator/MinScaleDenominator.js.map +1 -1
  131. package/dist/Component/ScaleDenominator/ScaleDenominator.d.ts +4 -20
  132. package/dist/Component/ScaleDenominator/ScaleDenominator.js +36 -65
  133. package/dist/Component/ScaleDenominator/ScaleDenominator.js.map +1 -1
  134. package/dist/Component/Selectable/Selectable.css +0 -0
  135. package/dist/Component/Selectable/Selectable.d.ts +12 -0
  136. package/dist/Component/Selectable/Selectable.js +98 -0
  137. package/dist/Component/Selectable/Selectable.js.map +1 -0
  138. package/dist/Component/Selectable/SelectableItem/SelectableItem.css +14 -0
  139. package/dist/Component/Selectable/SelectableItem/SelectableItem.d.ts +12 -0
  140. package/dist/Component/Selectable/SelectableItem/SelectableItem.js +45 -0
  141. package/dist/Component/Selectable/SelectableItem/SelectableItem.js.map +1 -0
  142. package/dist/Component/Style/Style.d.ts +5 -50
  143. package/dist/Component/Style/Style.js +291 -335
  144. package/dist/Component/Style/Style.js.map +1 -1
  145. package/dist/Component/StyleFieldContainer/StyleFieldContainer.css +0 -0
  146. package/dist/Component/StyleFieldContainer/StyleFieldContainer.d.ts +71 -0
  147. package/dist/Component/StyleFieldContainer/StyleFieldContainer.js +89 -0
  148. package/dist/Component/StyleFieldContainer/StyleFieldContainer.js.map +1 -0
  149. package/dist/Component/StyleOverview/StyleOverview.css +0 -0
  150. package/dist/Component/StyleOverview/StyleOverview.d.ts +82 -0
  151. package/dist/Component/StyleOverview/StyleOverview.js +110 -0
  152. package/dist/Component/StyleOverview/StyleOverview.js.map +1 -0
  153. package/dist/Component/Symbolizer/BulkEditModals/BulkEditModals.d.ts +6 -28
  154. package/dist/Component/Symbolizer/BulkEditModals/BulkEditModals.js +61 -109
  155. package/dist/Component/Symbolizer/BulkEditModals/BulkEditModals.js.map +1 -1
  156. package/dist/Component/Symbolizer/ColorMapEditor/ColorMapEditor.d.ts +5 -67
  157. package/dist/Component/Symbolizer/ColorMapEditor/ColorMapEditor.js +166 -217
  158. package/dist/Component/Symbolizer/ColorMapEditor/ColorMapEditor.js.map +1 -1
  159. package/dist/Component/Symbolizer/Editor/Editor.d.ts +25 -48
  160. package/dist/Component/Symbolizer/Editor/Editor.js +92 -172
  161. package/dist/Component/Symbolizer/Editor/Editor.js.map +1 -1
  162. package/dist/Component/Symbolizer/Field/ChannelField/ChannelField.d.ts +2 -6
  163. package/dist/Component/Symbolizer/Field/ChannelField/ChannelField.js +1 -1
  164. package/dist/Component/Symbolizer/Field/ChannelField/ChannelField.js.map +1 -1
  165. package/dist/Component/Symbolizer/Field/ColorField/ColorField.d.ts +2 -6
  166. package/dist/Component/Symbolizer/Field/ColorField/ColorField.js +1 -1
  167. package/dist/Component/Symbolizer/Field/ColorField/ColorField.js.map +1 -1
  168. package/dist/Component/Symbolizer/Field/ColorMapEntryField/ColorMapEntryField.d.ts +2 -7
  169. package/dist/Component/Symbolizer/Field/ColorMapEntryField/ColorMapEntryField.js +1 -1
  170. package/dist/Component/Symbolizer/Field/ColorMapEntryField/ColorMapEntryField.js.map +1 -1
  171. package/dist/Component/Symbolizer/Field/ColorMapTypeField/ColorMapTypeField.d.ts +2 -1
  172. package/dist/Component/Symbolizer/Field/ColorMapTypeField/ColorMapTypeField.js +1 -1
  173. package/dist/Component/Symbolizer/Field/ColorMapTypeField/ColorMapTypeField.js.map +1 -1
  174. package/dist/Component/Symbolizer/Field/GraphicTypeField/GraphicTypeField.d.ts +2 -7
  175. package/dist/Component/Symbolizer/Field/GraphicTypeField/GraphicTypeField.js +1 -1
  176. package/dist/Component/Symbolizer/Field/GraphicTypeField/GraphicTypeField.js.map +1 -1
  177. package/dist/Component/Symbolizer/Field/GrayChannelField/GrayChannelField.d.ts +2 -4
  178. package/dist/Component/Symbolizer/Field/GrayChannelField/GrayChannelField.js +1 -1
  179. package/dist/Component/Symbolizer/Field/GrayChannelField/GrayChannelField.js.map +1 -1
  180. package/dist/Component/Symbolizer/Field/ImageField/ImageField.d.ts +12 -0
  181. package/dist/Component/Symbolizer/Field/ImageField/ImageField.js +9 -4
  182. package/dist/Component/Symbolizer/Field/ImageField/ImageField.js.map +1 -1
  183. package/dist/Component/Symbolizer/Field/KindField/KindField.d.ts +2 -11
  184. package/dist/Component/Symbolizer/Field/KindField/KindField.js +1 -1
  185. package/dist/Component/Symbolizer/Field/KindField/KindField.js.map +1 -1
  186. package/dist/Component/Symbolizer/Field/LineCapField/LineCapField.js +1 -1
  187. package/dist/Component/Symbolizer/Field/LineCapField/LineCapField.js.map +1 -1
  188. package/dist/Component/Symbolizer/Field/LineJoinField/LineJoinField.js +1 -1
  189. package/dist/Component/Symbolizer/Field/LineJoinField/LineJoinField.js.map +1 -1
  190. package/dist/Component/Symbolizer/Field/RadiusField/RadiusField.js.map +1 -1
  191. package/dist/Component/Symbolizer/Field/ResamplingField/ResamplingField.d.ts +1 -5
  192. package/dist/Component/Symbolizer/Field/ResamplingField/ResamplingField.js +8 -36
  193. package/dist/Component/Symbolizer/Field/ResamplingField/ResamplingField.js.map +1 -1
  194. package/dist/Component/Symbolizer/Field/RgbChannelField/RgbChannelField.d.ts +2 -6
  195. package/dist/Component/Symbolizer/Field/RgbChannelField/RgbChannelField.js +1 -1
  196. package/dist/Component/Symbolizer/Field/RgbChannelField/RgbChannelField.js.map +1 -1
  197. package/dist/Component/Symbolizer/Field/WellKnownNameField/WellKnownNameField.d.ts +2 -11
  198. package/dist/Component/Symbolizer/Field/WellKnownNameField/WellKnownNameField.js +1 -1
  199. package/dist/Component/Symbolizer/Field/WellKnownNameField/WellKnownNameField.js.map +1 -1
  200. package/dist/Component/Symbolizer/FillEditor/FillEditor.d.ts +5 -32
  201. package/dist/Component/Symbolizer/FillEditor/FillEditor.js +140 -187
  202. package/dist/Component/Symbolizer/FillEditor/FillEditor.js.map +1 -1
  203. package/dist/Component/Symbolizer/GraphicEditor/GraphicEditor.d.ts +1 -19
  204. package/dist/Component/Symbolizer/GraphicEditor/GraphicEditor.js +33 -73
  205. package/dist/Component/Symbolizer/GraphicEditor/GraphicEditor.js.map +1 -1
  206. package/dist/Component/Symbolizer/IconEditor/IconEditor.d.ts +10 -22
  207. package/dist/Component/Symbolizer/IconEditor/IconEditor.js +80 -119
  208. package/dist/Component/Symbolizer/IconEditor/IconEditor.js.map +1 -1
  209. package/dist/Component/Symbolizer/IconSelector/IconSelector.d.ts +4 -26
  210. package/dist/Component/Symbolizer/IconSelector/IconSelector.js +45 -93
  211. package/dist/Component/Symbolizer/IconSelector/IconSelector.js.map +1 -1
  212. package/dist/Component/Symbolizer/IconSelectorWindow/IconSelectorWindow.d.ts +3 -10
  213. package/dist/Component/Symbolizer/IconSelectorWindow/IconSelectorWindow.js +25 -55
  214. package/dist/Component/Symbolizer/IconSelectorWindow/IconSelectorWindow.js.map +1 -1
  215. package/dist/Component/Symbolizer/LineEditor/LineEditor.d.ts +5 -34
  216. package/dist/Component/Symbolizer/LineEditor/LineEditor.js +155 -204
  217. package/dist/Component/Symbolizer/LineEditor/LineEditor.js.map +1 -1
  218. package/dist/Component/Symbolizer/MarkEditor/MarkEditor.d.ts +5 -22
  219. package/dist/Component/Symbolizer/MarkEditor/MarkEditor.js +28 -75
  220. package/dist/Component/Symbolizer/MarkEditor/MarkEditor.js.map +1 -1
  221. package/dist/Component/Symbolizer/MultiEditor/MultiEditor.d.ts +3 -14
  222. package/dist/Component/Symbolizer/MultiEditor/MultiEditor.js +34 -69
  223. package/dist/Component/Symbolizer/MultiEditor/MultiEditor.js.map +1 -1
  224. package/dist/Component/Symbolizer/Preview/Preview.d.ts +5 -7
  225. package/dist/Component/Symbolizer/Preview/Preview.js +3 -2
  226. package/dist/Component/Symbolizer/Preview/Preview.js.map +1 -1
  227. package/dist/Component/Symbolizer/PropTextEditor/PropTextEditor.css +1 -1
  228. package/dist/Component/Symbolizer/PropTextEditor/PropTextEditor.d.ts +3 -31
  229. package/dist/Component/Symbolizer/PropTextEditor/PropTextEditor.js +124 -152
  230. package/dist/Component/Symbolizer/PropTextEditor/PropTextEditor.js.map +1 -1
  231. package/dist/Component/Symbolizer/RasterChannelEditor/RasterChannelEditor.d.ts +5 -39
  232. package/dist/Component/Symbolizer/RasterChannelEditor/RasterChannelEditor.js +81 -146
  233. package/dist/Component/Symbolizer/RasterChannelEditor/RasterChannelEditor.js.map +1 -1
  234. package/dist/Component/Symbolizer/RasterEditor/RasterEditor.d.ts +5 -39
  235. package/dist/Component/Symbolizer/RasterEditor/RasterEditor.js +130 -174
  236. package/dist/Component/Symbolizer/RasterEditor/RasterEditor.js.map +1 -1
  237. package/dist/Component/Symbolizer/Renderer/Renderer.css +2 -0
  238. package/dist/Component/Symbolizer/Renderer/Renderer.d.ts +2 -23
  239. package/dist/Component/Symbolizer/Renderer/Renderer.js +102 -126
  240. package/dist/Component/Symbolizer/Renderer/Renderer.js.map +1 -1
  241. package/dist/Component/Symbolizer/SLDRenderer/SLDRenderer.d.ts +2 -21
  242. package/dist/Component/Symbolizer/SLDRenderer/SLDRenderer.js +118 -155
  243. package/dist/Component/Symbolizer/SLDRenderer/SLDRenderer.js.map +1 -1
  244. package/dist/Component/Symbolizer/SLDUnitsSelect/SLDUnitsSelect.d.ts +23 -37
  245. package/dist/Component/Symbolizer/SLDUnitsSelect/SLDUnitsSelect.js +40 -49
  246. package/dist/Component/Symbolizer/SLDUnitsSelect/SLDUnitsSelect.js.map +1 -1
  247. package/dist/Component/Symbolizer/SymbolizerEditorWindow/SymbolizerEditorWindow.d.ts +3 -10
  248. package/dist/Component/Symbolizer/SymbolizerEditorWindow/SymbolizerEditorWindow.js +24 -54
  249. package/dist/Component/Symbolizer/SymbolizerEditorWindow/SymbolizerEditorWindow.js.map +1 -1
  250. package/dist/Component/Symbolizer/TextEditor/TextEditor.d.ts +4 -37
  251. package/dist/Component/Symbolizer/TextEditor/TextEditor.js +181 -230
  252. package/dist/Component/Symbolizer/TextEditor/TextEditor.js.map +1 -1
  253. package/dist/Component/Symbolizer/WellKnownNameEditor/WellKnownNameEditor.d.ts +3 -30
  254. package/dist/Component/Symbolizer/WellKnownNameEditor/WellKnownNameEditor.js +144 -184
  255. package/dist/Component/Symbolizer/WellKnownNameEditor/WellKnownNameEditor.js.map +1 -1
  256. package/dist/Component/SymbolizerCard/SymbolizerCard.css +41 -0
  257. package/dist/Component/SymbolizerCard/SymbolizerCard.d.ts +72 -0
  258. package/dist/Component/SymbolizerCard/SymbolizerCard.js +50 -0
  259. package/dist/Component/SymbolizerCard/SymbolizerCard.js.map +1 -0
  260. package/dist/Component/Symbolizers/Symbolizers.css +68 -0
  261. package/dist/Component/Symbolizers/Symbolizers.d.ts +77 -0
  262. package/dist/Component/Symbolizers/Symbolizers.js +122 -0
  263. package/dist/Component/Symbolizers/Symbolizers.js.map +1 -0
  264. package/dist/Component/UploadButton/UploadButton.d.ts +3 -8
  265. package/dist/Component/UploadButton/UploadButton.js +9 -34
  266. package/dist/Component/UploadButton/UploadButton.js.map +1 -1
  267. package/dist/DataProvider/DataProvider.js +1 -1
  268. package/dist/DataProvider/DataProvider.js.map +1 -1
  269. package/dist/Util/CardViewUtil.d.ts +13 -0
  270. package/dist/Util/CardViewUtil.js +46 -0
  271. package/dist/Util/CardViewUtil.js.map +1 -0
  272. package/dist/Util/DataUtil.js +2 -2
  273. package/dist/Util/DataUtil.js.map +1 -1
  274. package/dist/Util/FileUtil.js.map +1 -1
  275. package/dist/Util/FilterUtil.d.ts +10 -2
  276. package/dist/Util/FilterUtil.js +55 -42
  277. package/dist/Util/FilterUtil.js.map +1 -1
  278. package/dist/Util/GeometryUtil.d.ts +9 -0
  279. package/dist/Util/GeometryUtil.js +87 -0
  280. package/dist/Util/GeometryUtil.js.map +1 -0
  281. package/dist/Util/HTTPUtil.d.ts +3 -3
  282. package/dist/Util/HTTPUtil.js +3 -3
  283. package/dist/Util/HTTPUtil.js.map +1 -1
  284. package/dist/Util/RuleGeneratorUtil.js +6 -1
  285. package/dist/Util/RuleGeneratorUtil.js.map +1 -1
  286. package/dist/Util/StyleUtil.d.ts +9 -0
  287. package/dist/Util/StyleUtil.js +87 -0
  288. package/dist/Util/StyleUtil.js.map +1 -0
  289. package/dist/Util/TestUtil.js.map +1 -1
  290. package/dist/index.d.ts +29 -1316
  291. package/dist/index.js +48 -13
  292. package/dist/index.js.map +1 -1
  293. package/dist/locale/de_DE.d.ts +3 -341
  294. package/dist/locale/de_DE.js +131 -68
  295. package/dist/locale/de_DE.js.map +1 -1
  296. package/dist/locale/en_US.d.ts +3 -346
  297. package/dist/locale/en_US.js +125 -66
  298. package/dist/locale/en_US.js.map +1 -1
  299. package/dist/locale/es_ES.d.ts +3 -283
  300. package/dist/locale/es_ES.js +175 -61
  301. package/dist/locale/es_ES.js.map +1 -1
  302. package/dist/locale/fr_FR.d.ts +3 -0
  303. package/dist/locale/fr_FR.js +373 -0
  304. package/dist/locale/fr_FR.js.map +1 -0
  305. package/dist/locale/locale.d.ts +386 -0
  306. package/dist/locale/locale.js +4 -0
  307. package/dist/locale/locale.js.map +1 -0
  308. package/dist/locale/zh_CN.d.ts +3 -346
  309. package/dist/locale/zh_CN.js +125 -66
  310. package/dist/locale/zh_CN.js.map +1 -1
  311. package/package.json +27 -23
  312. package/dist/Component/CompositionContext/CompositionContext.d.ts +0 -85
  313. package/dist/Component/CompositionContext/CompositionContext.js.map +0 -1
  314. package/dist/Component/DefaultValueContext/DefaultValueContext.d.ts +0 -59
  315. package/dist/Component/DefaultValueContext/DefaultValueContext.js.map +0 -1
  316. package/dist/Component/OptionsContext/OptionsContext.d.ts +0 -85
@@ -0,0 +1,304 @@
1
+ "use strict";
2
+ /* Released under the BSD 2-Clause License
3
+ *
4
+ * Copyright © 2018-present, terrestris GmbH & Co. KG and GeoStyler contributors
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are met:
9
+ *
10
+ * * Redistributions of source code must retain the above copyright notice,
11
+ * this list of conditions and the following disclaimer.
12
+ *
13
+ * * Redistributions in binary form must reproduce the above copyright notice,
14
+ * this list of conditions and the following disclaimer in the documentation
15
+ * and/or other materials provided with the distribution.
16
+ *
17
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
+ * POSSIBILITY OF SUCH DAMAGE.
28
+ */
29
+ var __assign = (this && this.__assign) || function () {
30
+ __assign = Object.assign || function(t) {
31
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
32
+ s = arguments[i];
33
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
34
+ t[p] = s[p];
35
+ }
36
+ return t;
37
+ };
38
+ return __assign.apply(this, arguments);
39
+ };
40
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
41
+ if (k2 === undefined) k2 = k;
42
+ var desc = Object.getOwnPropertyDescriptor(m, k);
43
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
44
+ desc = { enumerable: true, get: function() { return m[k]; } };
45
+ }
46
+ Object.defineProperty(o, k2, desc);
47
+ }) : (function(o, m, k, k2) {
48
+ if (k2 === undefined) k2 = k;
49
+ o[k2] = m[k];
50
+ }));
51
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
52
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
53
+ }) : function(o, v) {
54
+ o["default"] = v;
55
+ });
56
+ var __importStar = (this && this.__importStar) || function (mod) {
57
+ if (mod && mod.__esModule) return mod;
58
+ var result = {};
59
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
60
+ __setModuleDefault(result, mod);
61
+ return result;
62
+ };
63
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
64
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
65
+ if (ar || !(i in from)) {
66
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
67
+ ar[i] = from[i];
68
+ }
69
+ }
70
+ return to.concat(ar || Array.prototype.slice.call(from));
71
+ };
72
+ var __importDefault = (this && this.__importDefault) || function (mod) {
73
+ return (mod && mod.__esModule) ? mod : { "default": mod };
74
+ };
75
+ Object.defineProperty(exports, "__esModule", { value: true });
76
+ exports.CardStyle = void 0;
77
+ var react_1 = __importStar(require("react"));
78
+ var cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
79
+ var geostyler_style_1 = require("geostyler-style");
80
+ var LocaleWrapper_1 = require("../LocaleWrapper/LocaleWrapper");
81
+ var en_US_1 = __importDefault(require("../../locale/en_US"));
82
+ require("./CardStyle.css");
83
+ var Breadcrumb_1 = __importDefault(require("../Breadcrumb/Breadcrumb"));
84
+ var StyleOverview_1 = __importDefault(require("../StyleOverview/StyleOverview"));
85
+ var RuleOverview_1 = __importDefault(require("../RuleOverview/RuleOverview"));
86
+ var CardViewUtil_1 = __importDefault(require("../../Util/CardViewUtil"));
87
+ var Editor_1 = require("../Symbolizer/Editor/Editor");
88
+ var FilterTree_1 = __importDefault(require("../Filter/FilterTree/FilterTree"));
89
+ var RuleGenerator_1 = __importDefault(require("../RuleGenerator/RuleGenerator"));
90
+ var BulkEditor_1 = require("../BulkEditor/BulkEditor");
91
+ var IconSelector_1 = __importDefault(require("../Symbolizer/IconSelector/IconSelector"));
92
+ var Renderer_1 = __importDefault(require("../Renderer/Renderer"));
93
+ var STYLEVIEW = CardViewUtil_1.default.STYLEVIEW;
94
+ var RULEVIEW = CardViewUtil_1.default.RULEVIEW;
95
+ var CLASSIFICATIONVIEW = CardViewUtil_1.default.CLASSIFICATIONVIEW;
96
+ var MULTIEDITVIEW = CardViewUtil_1.default.MULTIEDITVIEW;
97
+ var SYMBOLIZERVIEW = CardViewUtil_1.default.SYMBOLIZERVIEW;
98
+ var FILTEREDITVIEW = CardViewUtil_1.default.FILTEREDITVIEW;
99
+ var ICONLIBRARIESVIEW = CardViewUtil_1.default.ICONLIBRARIESVIEW;
100
+ var CardStyle = function (_a) {
101
+ var _b = _a.locale, locale = _b === void 0 ? en_US_1.default.CardStyle : _b,
102
+ // enableClassification = true,
103
+ _c = _a.style,
104
+ // enableClassification = true,
105
+ style = _c === void 0 ? { name: 'My Style', rules: [] } : _c, data = _a.data, onStyleChange = _a.onStyleChange, filterUiProps = _a.filterUiProps, rendererType = _a.rendererType, iconLibraries = _a.iconLibraries, enableClassification = _a.enableClassification, styleOverviewProps = _a.styleOverviewProps, ruleOverviewProps = _a.ruleOverviewProps, editorProps = _a.editorProps, ruleGeneratorProps = _a.ruleGeneratorProps;
106
+ var defaultCrumb = { view: STYLEVIEW, title: locale.styleTitle, indices: [] };
107
+ var defaultView = {
108
+ view: STYLEVIEW,
109
+ props: [],
110
+ path: [defaultCrumb]
111
+ };
112
+ var _d = (0, react_1.useState)(defaultView), currentView = _d[0], setCurrentView = _d[1];
113
+ var getPathForView = function (viewName, indices) {
114
+ var _a, _b, _c, _d;
115
+ switch (viewName) {
116
+ case STYLEVIEW:
117
+ return [{ view: STYLEVIEW, title: locale.styleTitle, indices: [] }];
118
+ case RULEVIEW:
119
+ return [
120
+ { view: STYLEVIEW, title: locale.styleTitle, indices: [] },
121
+ { view: RULEVIEW, title: (_a = style.rules[indices[0]]) === null || _a === void 0 ? void 0 : _a.name, indices: __spreadArray([], indices, true) }
122
+ ];
123
+ case CLASSIFICATIONVIEW:
124
+ return [
125
+ { view: STYLEVIEW, title: locale.styleTitle, indices: [] },
126
+ { view: CLASSIFICATIONVIEW, title: locale.classificationTitle, indices: [] }
127
+ ];
128
+ case MULTIEDITVIEW:
129
+ return [
130
+ { view: STYLEVIEW, title: locale.styleTitle, indices: [] },
131
+ { view: MULTIEDITVIEW, title: locale.multiEditTitle, indices: __spreadArray([], indices, true) }
132
+ ];
133
+ case SYMBOLIZERVIEW:
134
+ return [
135
+ { view: STYLEVIEW, title: locale.styleTitle, indices: [] },
136
+ { view: RULEVIEW, title: (_b = style.rules[indices[0]]) === null || _b === void 0 ? void 0 : _b.name, indices: [indices[0]] },
137
+ { view: SYMBOLIZERVIEW, title: locale.symbolizerTitle, indices: __spreadArray([], indices, true) }
138
+ ];
139
+ case FILTEREDITVIEW:
140
+ return [
141
+ { view: STYLEVIEW, title: locale.styleTitle, indices: [] },
142
+ { view: RULEVIEW, title: (_c = style.rules[indices[0]]) === null || _c === void 0 ? void 0 : _c.name, indices: [indices[0]] },
143
+ { view: FILTEREDITVIEW, title: locale.filterTitle, indices: __spreadArray([], indices, true) },
144
+ ];
145
+ case ICONLIBRARIESVIEW:
146
+ return [
147
+ { view: STYLEVIEW, title: locale.styleTitle, indices: [] },
148
+ { view: RULEVIEW, title: (_d = style.rules[indices[0]]) === null || _d === void 0 ? void 0 : _d.name, indices: [indices[0]] },
149
+ { view: SYMBOLIZERVIEW, title: locale.symbolizerTitle, indices: __spreadArray([], indices, true) },
150
+ { view: SYMBOLIZERVIEW, title: locale.iconLibrariesTitle, indices: __spreadArray([], indices, true) }
151
+ ];
152
+ default:
153
+ return [];
154
+ }
155
+ };
156
+ var changeView = function (viewName, indices) {
157
+ var view = { view: viewName, props: indices, path: [] };
158
+ view.path = getPathForView(viewName, indices);
159
+ setCurrentView(view);
160
+ };
161
+ /**
162
+ * Update the title for all path elements with view RULEVIEW.
163
+ *
164
+ * @param ruleName The new name of the rule that should be used as title.
165
+ * @param path The path list to search for RULEVIEWs.
166
+ * @returns The path list with updated titles.
167
+ */
168
+ var updateRuleNameForPath = function (ruleName, path) {
169
+ return path.map(function (pathItem) {
170
+ if (pathItem.view === RULEVIEW) {
171
+ pathItem.title = ruleName;
172
+ }
173
+ return pathItem;
174
+ });
175
+ };
176
+ var onRuleChange = function (newRule) {
177
+ var styleClone = (0, cloneDeep_1.default)(style);
178
+ var ruleIdx = currentView.path[currentView.path.length - 1].indices[0];
179
+ styleClone.rules[ruleIdx] = newRule;
180
+ var pathClone = (0, cloneDeep_1.default)(currentView.path);
181
+ var newCurrentViewPath = updateRuleNameForPath(newRule.name, pathClone);
182
+ setCurrentView(__assign(__assign({}, currentView), { path: newCurrentViewPath }));
183
+ if (onStyleChange) {
184
+ onStyleChange(styleClone);
185
+ }
186
+ };
187
+ var onRulesChange = function (rules) {
188
+ var styleClone = (0, cloneDeep_1.default)(style);
189
+ styleClone.rules = rules;
190
+ if (onStyleChange) {
191
+ onStyleChange(styleClone);
192
+ changeView(STYLEVIEW, currentView.path[0].indices);
193
+ }
194
+ };
195
+ var onSymbolizerChange = function (symbolizer) {
196
+ var styleClone = (0, cloneDeep_1.default)(style);
197
+ var ruleIdx = currentView.path[currentView.path.length - 1].indices[0];
198
+ var symbolizerIdx = currentView.path[currentView.path.length - 1].indices[1];
199
+ styleClone.rules[ruleIdx].symbolizers[symbolizerIdx] = symbolizer;
200
+ if (onStyleChange) {
201
+ onStyleChange(styleClone);
202
+ }
203
+ };
204
+ var onFilterChange = function (filter) {
205
+ var styleClone = (0, cloneDeep_1.default)(style);
206
+ var ruleIdx = currentView.path[currentView.path.length - 1].indices[0];
207
+ styleClone.rules[ruleIdx].filter = filter;
208
+ if (onStyleChange) {
209
+ onStyleChange(styleClone);
210
+ }
211
+ };
212
+ var onBulkEditorChange = function (prop, val) {
213
+ var styleClone = (0, cloneDeep_1.default)(style);
214
+ var selectedRuleIds = currentView.path[currentView.path.length - 1].indices;
215
+ styleClone.rules
216
+ .filter(function (rule, idx) {
217
+ return selectedRuleIds.includes(idx);
218
+ })
219
+ .forEach(function (rule) {
220
+ rule.symbolizers.forEach(function (sym) {
221
+ sym[prop] = val;
222
+ if (prop === 'image' && sym.wellKnownName) {
223
+ delete sym.wellKnownName;
224
+ sym.kind = 'Icon';
225
+ }
226
+ if (prop === 'wellKnownName' && sym.image) {
227
+ delete sym.image;
228
+ }
229
+ });
230
+ });
231
+ if (onStyleChange) {
232
+ onStyleChange(styleClone);
233
+ }
234
+ };
235
+ var onIconSelect = function (iconSrc) {
236
+ var styleClone = (0, cloneDeep_1.default)(style);
237
+ var ruleIdx = currentView.path[currentView.path.length - 1].indices[0];
238
+ var symbolizerIdx = currentView.path[currentView.path.length - 1].indices[1];
239
+ var symbolizer = styleClone.rules[ruleIdx].symbolizers[symbolizerIdx];
240
+ if ((0, geostyler_style_1.isIconSymbolizer)(symbolizer)) {
241
+ symbolizer.image = iconSrc;
242
+ }
243
+ if (onStyleChange) {
244
+ onStyleChange(styleClone);
245
+ }
246
+ };
247
+ /**
248
+ * Get the image url for the currently selected symbolizer.
249
+ */
250
+ var getSelectedIconSrc = function () {
251
+ var symbolizer = style
252
+ .rules[currentView.path[currentView.path.length - 1].indices[0]]
253
+ .symbolizers[currentView.path[currentView.path.length - 1].indices[1]];
254
+ if ((0, geostyler_style_1.isIconSymbolizer)(symbolizer)) {
255
+ return symbolizer.image;
256
+ }
257
+ return '';
258
+ };
259
+ var onRuleChangeView = function (viewName, indices) {
260
+ var newIndices = __spreadArray([currentView.path[currentView.path.length - 1].indices[0]], indices, true);
261
+ changeView(viewName, newIndices);
262
+ };
263
+ var onIconEditorChangeView = function () {
264
+ var newIndices = __spreadArray([], currentView.path[currentView.path.length - 1].indices, true);
265
+ changeView(ICONLIBRARIESVIEW, newIndices);
266
+ };
267
+ var styleOverviewPropsOverwrites = {
268
+ rulesProps: {
269
+ ruleCardProps: {
270
+ rendererProps: {
271
+ rendererType: rendererType
272
+ }
273
+ }
274
+ }
275
+ };
276
+ var mergedStyleOverviewProps = __assign(__assign({}, styleOverviewProps), styleOverviewPropsOverwrites);
277
+ return (react_1.default.createElement("div", { className: 'gs-card-style' },
278
+ react_1.default.createElement(Breadcrumb_1.default, { crumbs: currentView.path, onClick: changeView }),
279
+ currentView.view === STYLEVIEW && (react_1.default.createElement(StyleOverview_1.default, __assign({ style: style, data: data, onStyleChange: onStyleChange, onChangeView: changeView, enableClassification: enableClassification }, mergedStyleOverviewProps))),
280
+ currentView.view === RULEVIEW && (react_1.default.createElement(RuleOverview_1.default, __assign({ rule: style.rules[currentView.path[currentView.path.length - 1].indices[0]], data: data, onRuleChange: onRuleChange, onChangeView: onRuleChangeView }, ruleOverviewProps))),
281
+ currentView.view === SYMBOLIZERVIEW && (react_1.default.createElement(react_1.default.Fragment, null,
282
+ react_1.default.createElement(Renderer_1.default, { symbolizers: [
283
+ style
284
+ .rules[currentView.path[currentView.path.length - 1].indices[0]]
285
+ .symbolizers[currentView.path[currentView.path.length - 1].indices[1]]
286
+ ], data: data, rendererType: rendererType }),
287
+ react_1.default.createElement(Editor_1.Editor, __assign({ symbolizer: style
288
+ .rules[currentView.path[currentView.path.length - 1].indices[0]]
289
+ .symbolizers[currentView.path[currentView.path.length - 1].indices[1]], onSymbolizerChange: onSymbolizerChange, iconEditorProps: {
290
+ imageFieldProps: {
291
+ windowless: true,
292
+ onIconLibrariesClick: onIconEditorChangeView
293
+ }
294
+ }, internalDataDef: data, iconLibraries: iconLibraries }, editorProps)))),
295
+ currentView.view === FILTEREDITVIEW && (react_1.default.createElement(FilterTree_1.default, { filter: style
296
+ .rules[currentView.path[currentView.path.length - 1].indices[0]]
297
+ .filter, onFilterChange: onFilterChange, internalDataDef: data, filterUiProps: filterUiProps })),
298
+ currentView.view === CLASSIFICATIONVIEW && (react_1.default.createElement(RuleGenerator_1.default, __assign({ internalDataDef: data, onRulesChange: onRulesChange }, ruleGeneratorProps))),
299
+ currentView.view === MULTIEDITVIEW && (react_1.default.createElement(BulkEditor_1.BulkEditor, { onStylePropChange: onBulkEditorChange })),
300
+ currentView.view === ICONLIBRARIESVIEW && (react_1.default.createElement(IconSelector_1.default, { iconLibraries: iconLibraries, onIconSelect: onIconSelect, selectedIconSrc: getSelectedIconSrc() }))));
301
+ };
302
+ exports.CardStyle = CardStyle;
303
+ exports.default = (0, LocaleWrapper_1.localize)(exports.CardStyle, 'CardStyle');
304
+ //# sourceMappingURL=CardStyle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardStyle.js","sourceRoot":"","sources":["../../../src/Component/CardStyle/CardStyle.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,IAAI,KAAK,aAAa,IAAI,CACpC,8BAAC,uBAAU,IACT,iBAAiB,EAAE,kBAAkB,GACrC,CACH;QAGD,WAAW,CAAC,IAAI,KAAK,iBAAiB,IAAI,CACxC,8BAAC,sBAAY,IACX,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,kBAAkB,EAAE,GACrC,CACH,CAEC,CACP,CAAC;AACJ,CAAC,CAAC;AArTW,QAAA,SAAS,aAqTpB;AAEF,kBAAe,IAAA,wBAAQ,EAAC,iBAAS,EAAE,WAAW,CAAC,CAAC","sourcesContent":["/* Released under the BSD 2-Clause License\n *\n * Copyright © 2018-present, terrestris GmbH & Co. KG and GeoStyler contributors\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n *\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport React, { useState } from 'react';\n\nimport _get from 'lodash/get';\nimport _isEqual from 'lodash/isEqual';\nimport _cloneDeep from 'lodash/cloneDeep';\nimport _merge from 'lodash/merge';\n\nimport {\n Style as GsStyle,\n Rule as GsRule,\n Symbolizer as GsSymbolizer,\n Filter as GsFilter,\n isIconSymbolizer\n} from 'geostyler-style';\n\nimport {\n Data\n} from 'geostyler-data';\n\nimport { localize } from '../LocaleWrapper/LocaleWrapper';\nimport en_US from '../../locale/en_US';\n\nimport './CardStyle.less';\nimport Breadcrumb, { Crumb } from '../Breadcrumb/Breadcrumb';\nimport StyleOverview, { StyleOverviewProps } from '../StyleOverview/StyleOverview';\nimport RuleOverview, { RuleOverviewProps } from '../RuleOverview/RuleOverview';\nimport CardViewUtil from '../../Util/CardViewUtil';\nimport { Editor, EditorProps } from '../Symbolizer/Editor/Editor';\nimport FilterTree from '../Filter/FilterTree/FilterTree';\nimport RuleGenerator, { RuleGeneratorProps } from '../RuleGenerator/RuleGenerator';\nimport { BulkEditor } from '../BulkEditor/BulkEditor';\nimport IconSelector, { IconLibrary } from '../Symbolizer/IconSelector/IconSelector';\nimport { ComparisonFilterProps } from '../Filter/ComparisonFilter/ComparisonFilter';\nimport { GeoStylerLocale } from '../../locale/locale';\nimport Renderer from '../Renderer/Renderer';\n\n// default props\ninterface CardStyleDefaultProps {\n /** The geoStylerStyle object */\n style: GsStyle;\n /** Locale object containing translated text snippets */\n locale: GeoStylerLocale['CardStyle'];\n}\n\n// non default props\nexport interface CardStyleProps extends Partial<CardStyleDefaultProps> {\n /** Reference to internal data object (holding schema and example features) */\n data?: Data;\n /** The callback function that is triggered when the state changes */\n onStyleChange?: (style: GsStyle) => void;\n /** Properties of the filter components */\n filterUiProps?: Partial<ComparisonFilterProps>;\n /** The renderer to use for previews. */\n rendererType?: 'SLD' | 'OpenLayers';\n /** The passthrough props for the StyleOverview component. */\n styleOverviewProps?: Partial<StyleOverviewProps>;\n /** The passthrough props for the RuleOverview component. */\n ruleOverviewProps?: Partial<RuleOverviewProps>;\n /** The passthrough props for the RuleGenerator component. */\n ruleGeneratorProps?: Partial<RuleGeneratorProps>;\n /** The passthrough props for the Editor component. */\n editorProps?: Partial<EditorProps>;\n // /** List of supported icons ordered as library */\n iconLibraries?: IconLibrary[];\n /** Enable classification */\n enableClassification?: boolean;\n}\n\nexport interface CardView {\n view: string;\n props: any[];\n path: Crumb[];\n}\n\nconst STYLEVIEW = CardViewUtil.STYLEVIEW;\nconst RULEVIEW = CardViewUtil.RULEVIEW;\nconst CLASSIFICATIONVIEW = CardViewUtil.CLASSIFICATIONVIEW;\nconst MULTIEDITVIEW = CardViewUtil.MULTIEDITVIEW;\nconst SYMBOLIZERVIEW = CardViewUtil.SYMBOLIZERVIEW;\nconst FILTEREDITVIEW = CardViewUtil.FILTEREDITVIEW;\nconst ICONLIBRARIESVIEW = CardViewUtil.ICONLIBRARIESVIEW;\n\nexport const CardStyle: React.FC<CardStyleProps> = ({\n locale = en_US.CardStyle,\n // enableClassification = true,\n style = { name: 'My Style', rules: [] },\n data,\n onStyleChange,\n filterUiProps,\n rendererType,\n iconLibraries,\n enableClassification,\n styleOverviewProps,\n ruleOverviewProps,\n editorProps,\n ruleGeneratorProps\n}) => {\n\n const defaultCrumb: Crumb = {view: STYLEVIEW, title: locale.styleTitle, indices: []};\n const defaultView: CardView = {\n view: STYLEVIEW,\n props: [],\n path: [defaultCrumb]\n };\n const [currentView, setCurrentView] = useState<CardView>(defaultView);\n\n const getPathForView = (viewName: string, indices: number[]): Crumb[] => {\n switch (viewName) {\n case STYLEVIEW:\n return [{view: STYLEVIEW, title: locale.styleTitle, indices: []}];\n case RULEVIEW:\n return [\n {view: STYLEVIEW, title: locale.styleTitle, indices: []},\n {view: RULEVIEW, title: style.rules[indices[0]]?.name, indices: [...indices]}\n ];\n case CLASSIFICATIONVIEW:\n return [\n {view: STYLEVIEW, title: locale.styleTitle, indices: []},\n {view: CLASSIFICATIONVIEW, title: locale.classificationTitle, indices: []}\n ];\n case MULTIEDITVIEW:\n return [\n {view: STYLEVIEW, title: locale.styleTitle, indices: []},\n {view: MULTIEDITVIEW, title: locale.multiEditTitle, indices: [...indices]}\n ];\n case SYMBOLIZERVIEW:\n return [\n {view: STYLEVIEW, title: locale.styleTitle, indices: []},\n {view: RULEVIEW, title: style.rules[indices[0]]?.name, indices: [indices[0]]},\n {view: SYMBOLIZERVIEW, title: locale.symbolizerTitle, indices: [...indices]}\n ];\n case FILTEREDITVIEW:\n return [\n {view: STYLEVIEW, title: locale.styleTitle, indices: []},\n {view: RULEVIEW, title: style.rules[indices[0]]?.name, indices: [indices[0]]},\n {view: FILTEREDITVIEW, title: locale.filterTitle, indices: [...indices]},\n ];\n case ICONLIBRARIESVIEW:\n return [\n {view: STYLEVIEW, title: locale.styleTitle, indices: []},\n {view: RULEVIEW, title: style.rules[indices[0]]?.name, indices: [indices[0]]},\n {view: SYMBOLIZERVIEW, title: locale.symbolizerTitle, indices: [...indices]},\n {view: SYMBOLIZERVIEW, title: locale.iconLibrariesTitle, indices: [...indices]}\n ];\n default:\n return [];\n }\n\n };\n\n const changeView = (viewName: string, indices: number[]) => {\n let view: CardView = {view: viewName, props: indices, path: []};\n view.path = getPathForView(viewName, indices);\n setCurrentView(view);\n };\n\n /**\n * Update the title for all path elements with view RULEVIEW.\n *\n * @param ruleName The new name of the rule that should be used as title.\n * @param path The path list to search for RULEVIEWs.\n * @returns The path list with updated titles.\n */\n const updateRuleNameForPath = (ruleName: string, path: Crumb[]): Crumb[] => {\n return path.map(pathItem => {\n if (pathItem.view === RULEVIEW) {\n pathItem.title = ruleName;\n }\n return pathItem;\n });\n };\n\n const onRuleChange = (newRule: GsRule) => {\n let styleClone = _cloneDeep(style);\n const ruleIdx = currentView.path[currentView.path.length - 1].indices[0];\n styleClone.rules[ruleIdx] = newRule;\n const pathClone = _cloneDeep(currentView.path);\n const newCurrentViewPath = updateRuleNameForPath(newRule.name, pathClone);\n setCurrentView({...currentView, path: newCurrentViewPath});\n if (onStyleChange) {\n onStyleChange(styleClone);\n }\n };\n\n const onRulesChange = (rules: GsRule[]) => {\n let styleClone = _cloneDeep(style);\n styleClone.rules = rules;\n if (onStyleChange) {\n onStyleChange(styleClone);\n changeView(STYLEVIEW, currentView.path[0].indices);\n }\n };\n\n const onSymbolizerChange = (symbolizer: GsSymbolizer) => {\n let styleClone = _cloneDeep(style);\n const ruleIdx = currentView.path[currentView.path.length - 1].indices[0];\n const symbolizerIdx = currentView.path[currentView.path.length - 1].indices[1];\n styleClone.rules[ruleIdx].symbolizers[symbolizerIdx] = symbolizer;\n if (onStyleChange) {\n onStyleChange(styleClone);\n }\n };\n\n const onFilterChange = (filter: GsFilter) => {\n let styleClone = _cloneDeep(style);\n const ruleIdx = currentView.path[currentView.path.length - 1].indices[0];\n styleClone.rules[ruleIdx].filter = filter;\n if (onStyleChange) {\n onStyleChange(styleClone);\n }\n };\n\n const onBulkEditorChange = (prop: string, val: any) => {\n const styleClone = _cloneDeep(style);\n const selectedRuleIds = currentView.path[currentView.path.length - 1].indices;\n styleClone.rules\n .filter((rule: GsRule, idx: number) => {\n return selectedRuleIds.includes(idx);\n })\n .forEach((rule: GsRule) => {\n rule.symbolizers.forEach((sym: any) => {\n sym[prop] = val;\n if (prop === 'image' && sym.wellKnownName) {\n delete sym.wellKnownName;\n sym.kind = 'Icon';\n }\n if (prop === 'wellKnownName' && sym.image) {\n delete sym.image;\n }\n });\n });\n\n if (onStyleChange) {\n onStyleChange(styleClone);\n }\n };\n\n const onIconSelect = (iconSrc: string) => {\n const styleClone = _cloneDeep(style);\n const ruleIdx = currentView.path[currentView.path.length - 1].indices[0];\n const symbolizerIdx = currentView.path[currentView.path.length - 1].indices[1];\n const symbolizer = styleClone.rules[ruleIdx].symbolizers[symbolizerIdx];\n if (isIconSymbolizer(symbolizer)) {\n symbolizer.image = iconSrc;\n }\n\n if (onStyleChange) {\n onStyleChange(styleClone);\n }\n };\n\n /**\n * Get the image url for the currently selected symbolizer.\n */\n const getSelectedIconSrc = (): string => {\n const symbolizer = style\n .rules[currentView.path[currentView.path.length - 1].indices[0]]\n .symbolizers[currentView.path[currentView.path.length - 1].indices[1]];\n\n if (isIconSymbolizer(symbolizer)) {\n return symbolizer.image;\n }\n return '';\n };\n\n const onRuleChangeView = (viewName: string, indices: number[]) => {\n const newIndices = [currentView.path[currentView.path.length - 1].indices[0], ...indices];\n changeView(viewName, newIndices);\n };\n\n const onIconEditorChangeView = () => {\n const newIndices = [...currentView.path[currentView.path.length - 1].indices];\n changeView(ICONLIBRARIESVIEW, newIndices);\n };\n\n const styleOverviewPropsOverwrites = {\n rulesProps: {\n ruleCardProps: {\n rendererProps: {\n rendererType: rendererType\n }\n }\n }\n };\n const mergedStyleOverviewProps = {...styleOverviewProps, ...styleOverviewPropsOverwrites};\n\n return (\n <div\n className='gs-card-style'\n >\n <Breadcrumb\n crumbs={currentView.path}\n onClick={changeView}\n />\n {\n currentView.view === STYLEVIEW && (\n <StyleOverview\n style={style}\n data={data}\n onStyleChange={onStyleChange}\n onChangeView={changeView}\n enableClassification={enableClassification}\n {...mergedStyleOverviewProps}\n />\n )\n }\n {\n currentView.view === RULEVIEW && (\n <RuleOverview\n rule={style.rules[currentView.path[currentView.path.length - 1].indices[0]]}\n data={data}\n onRuleChange={onRuleChange}\n onChangeView={onRuleChangeView}\n {...ruleOverviewProps}\n />\n )\n }\n {\n currentView.view === SYMBOLIZERVIEW && (\n <>\n <Renderer\n symbolizers={[\n style\n .rules[currentView.path[currentView.path.length - 1].indices[0]]\n .symbolizers[currentView.path[currentView.path.length - 1].indices[1]]\n ]}\n data={data}\n rendererType={rendererType}\n // TODO add sldRendererProps\n />\n <Editor\n symbolizer={\n style\n .rules[currentView.path[currentView.path.length - 1].indices[0]]\n .symbolizers[currentView.path[currentView.path.length - 1].indices[1]]\n }\n onSymbolizerChange={onSymbolizerChange}\n iconEditorProps={{\n imageFieldProps: {\n windowless: true,\n onIconLibrariesClick: onIconEditorChangeView\n }\n }}\n internalDataDef={data}\n iconLibraries={iconLibraries}\n {...editorProps}\n />\n </>\n )\n }\n {\n currentView.view === FILTEREDITVIEW && (\n <FilterTree\n filter={\n style\n .rules[currentView.path[currentView.path.length - 1].indices[0]]\n .filter\n }\n onFilterChange={onFilterChange}\n internalDataDef={data}\n filterUiProps={filterUiProps}\n />\n )\n }\n {\n currentView.view === CLASSIFICATIONVIEW && (\n <RuleGenerator\n internalDataDef={data}\n onRulesChange={onRulesChange}\n {...ruleGeneratorProps}\n />\n )\n }\n {\n currentView.view === MULTIEDITVIEW && (\n <BulkEditor\n onStylePropChange={onBulkEditorChange}\n />\n )\n }\n {\n currentView.view === ICONLIBRARIESVIEW && (\n <IconSelector\n iconLibraries={iconLibraries}\n onIconSelect={onIconSelect}\n selectedIconSrc={getSelectedIconSrc()}\n />\n )\n }\n </div>\n );\n};\n\nexport default localize(CardStyle, 'CardStyle');\n"]}
@@ -30,24 +30,55 @@
30
30
  text-align: left;
31
31
  display: flex;
32
32
  flex-direction: column;
33
- align-items: flex-end;
33
+ position: relative;
34
34
  }
35
- .gs-code-editor .gs-code-editor-errormessage {
36
- color: red;
35
+ .gs-code-editor .gs-code-editor-feedback {
37
36
  background-color: lightgray;
37
+ overflow: hidden;
38
+ transition: max-height 0.3s ease-out;
39
+ position: absolute;
40
+ bottom: 42px;
41
+ width: 100%;
42
+ }
43
+ .gs-code-editor .gs-code-editor-feedback .write-feedback span,
44
+ .gs-code-editor .gs-code-editor-feedback .read-feedback span {
45
+ padding: 0 1em;
46
+ font-weight: bold;
47
+ }
48
+ .gs-code-editor .gs-code-editor-feedback.feedback-hidden {
49
+ max-height: 0;
50
+ }
51
+ .gs-code-editor .gs-code-editor-feedback.feedback-visible {
52
+ max-height: 400px;
38
53
  }
39
54
  .gs-code-editor .gs-code-editor-toolbar,
40
55
  .gs-code-editor .gs-code-editor-bottombar {
41
56
  width: 100%;
57
+ height: 42px;
42
58
  padding: 5px 0;
43
59
  display: flex;
44
60
  align-items: center;
45
61
  justify-content: center;
46
62
  }
47
- .gs-code-editor .gs-code-editor-toolbar .gs-code-editor-format-select,
48
- .gs-code-editor .gs-code-editor-bottombar .gs-code-editor-format-select {
63
+ .gs-code-editor .gs-code-editor-toolbar .gs-code-editor-format-select {
49
64
  width: 300px;
50
65
  }
66
+ .gs-code-editor .gs-code-editor-bottombar .center-items {
67
+ flex: 6;
68
+ display: flex;
69
+ justify-content: center;
70
+ }
71
+ .gs-code-editor .gs-code-editor-bottombar .left-items {
72
+ flex: 1;
73
+ padding-left: 1em;
74
+ }
75
+ .gs-code-editor .gs-code-editor-bottombar .right-items {
76
+ flex: 1;
77
+ padding-right: 1em;
78
+ }
79
+ .gs-code-editor .gs-code-editor-bottombar .anticon {
80
+ font-size: 1.5em;
81
+ }
51
82
  .gs-code-editor .gs-code-editor-download-button,
52
83
  .gs-code-editor .gs-code-editor-copy-button {
53
84
  margin: 0 5px;
@@ -2,15 +2,10 @@ import React from 'react';
2
2
  import 'blob';
3
3
  import './CodeEditor.css';
4
4
  import { Style as GsStyle, StyleParser } from 'geostyler-style';
5
- export interface CodeEditorLocale {
6
- downloadButtonLabel: string;
7
- formatSelectLabel: string;
8
- copyButtonLabel: string;
9
- styleCopied: string;
10
- }
5
+ import { GeoStylerLocale } from '../../locale/locale';
11
6
  export interface CodeEditorProps {
12
7
  /** Locale object containing translated text snippets */
13
- locale?: CodeEditorLocale;
8
+ locale?: GeoStylerLocale['CodeEditor'];
14
9
  /** Delay in ms until onStyleChange will be called */
15
10
  delay?: number;
16
11
  /** Show save button */
@@ -112,20 +112,29 @@ var LocaleWrapper_1 = require("../LocaleWrapper/LocaleWrapper");
112
112
  var en_US_1 = __importDefault(require("../../locale/en_US"));
113
113
  var SLDUnitsSelect_1 = require("../Symbolizer/SLDUnitsSelect/SLDUnitsSelect");
114
114
  var UsePrevious_1 = require("../../hook/UsePrevious");
115
+ var ParserFeedback_1 = __importDefault(require("../ParserFeedback/ParserFeedback"));
116
+ var icons_1 = require("@ant-design/icons");
115
117
  var MODELPATH = 'geostyler.json'; // associate with our model
116
118
  var SCHEMAURI = schema_json_1.default.$id;
117
119
  exports.COMPONENTNAME = 'CodeEditor';
118
120
  var CodeEditor = function (_a) {
119
- var defaultParser = _a.defaultParser, _b = _a.delay, delay = _b === void 0 ? 500 : _b, _c = _a.locale, locale = _c === void 0 ? en_US_1.default.GsCodeEditor : _c, _d = _a.onStyleChange, onStyleChange = _d === void 0 ? function () { return undefined; } : _d, _e = _a.parsers, parsers = _e === void 0 ? [] : _e, _f = _a.showCopyButton, showCopyButton = _f === void 0 ? false : _f, _g = _a.showSaveButton, showSaveButton = _g === void 0 ? false : _g, style = _a.style;
121
+ var defaultParser = _a.defaultParser, _b = _a.delay, delay = _b === void 0 ? 500 : _b, _c = _a.locale, locale = _c === void 0 ? en_US_1.default.CodeEditor : _c, _d = _a.onStyleChange, onStyleChange = _d === void 0 ? function () { return undefined; } : _d, _e = _a.parsers, parsers = _e === void 0 ? [] : _e, _f = _a.showCopyButton, showCopyButton = _f === void 0 ? false : _f, _g = _a.showSaveButton, showSaveButton = _g === void 0 ? false : _g, style = _a.style;
120
122
  var editTimeout;
121
123
  var _h = (0, react_1.useState)(defaultParser), activeParser = _h[0], setActiveParser = _h[1];
122
124
  var _j = (0, react_1.useState)(false), isSldParser = _j[0], setIsSldParser = _j[1];
123
125
  var _k = (0, react_1.useState)(''), value = _k[0], setValue = _k[1];
124
- var _l = (0, react_1.useState)(''), invalidMessage = _l[0], setInvalidMessage = _l[1];
125
- var _m = (0, react_1.useState)(false), hasError = _m[0], setHasError = _m[1];
126
+ var _l = (0, react_1.useState)(), writeStyleResult = _l[0], setWriteStyleResult = _l[1];
127
+ var _m = (0, react_1.useState)(), readStyleResult = _m[0], setReadStyleResult = _m[1];
128
+ var _o = (0, react_1.useState)(false), showFeedback = _o[0], setShowFeedback = _o[1];
129
+ var _p = (0, react_1.useState)(false), hasError = _p[0], setHasError = _p[1];
126
130
  var previousStyle = (0, UsePrevious_1.usePrevious)(style);
127
131
  var previouseParser = (0, UsePrevious_1.usePrevious)(activeParser);
128
132
  var monaco = (0, react_2.useMonaco)();
133
+ (0, react_1.useEffect)(function () {
134
+ if (writeStyleResult === null || writeStyleResult === void 0 ? void 0 : writeStyleResult.output) {
135
+ setValue(writeStyleResult.output);
136
+ }
137
+ }, [writeStyleResult]);
129
138
  (0, react_1.useEffect)(function () {
130
139
  if (monaco) {
131
140
  monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
@@ -140,21 +149,17 @@ var CodeEditor = function (_a) {
140
149
  }, [monaco]);
141
150
  var updateValueFromStyle = (0, react_1.useCallback)(function (s) {
142
151
  setHasError(false);
152
+ setWriteStyleResult(undefined);
143
153
  (new Promise(function () { return __awaiter(void 0, void 0, void 0, function () {
144
- var _a, parsedStyle, errors;
154
+ var _a;
145
155
  return __generator(this, function (_b) {
146
156
  switch (_b.label) {
147
157
  case 0:
148
158
  if (!activeParser) return [3 /*break*/, 2];
159
+ _a = setWriteStyleResult;
149
160
  return [4 /*yield*/, activeParser.writeStyle(s)];
150
161
  case 1:
151
- _a = _b.sent(), parsedStyle = _a.output, errors = _a.errors;
152
- if ((errors === null || errors === void 0 ? void 0 : errors.length) > 0) {
153
- setInvalidMessage(errors.map(function (e) { return e.message; }).join(', '));
154
- }
155
- else {
156
- setValue(parsedStyle);
157
- }
162
+ _a.apply(void 0, [_b.sent()]);
158
163
  return [3 /*break*/, 3];
159
164
  case 2:
160
165
  setValue(JSON.stringify(s, null, 2));
@@ -162,7 +167,11 @@ var CodeEditor = function (_a) {
162
167
  case 3: return [2 /*return*/];
163
168
  }
164
169
  });
165
- }); })).catch(function () { return setHasError(true); });
170
+ }); })).catch(function (err) {
171
+ setWriteStyleResult({
172
+ errors: [err.message]
173
+ });
174
+ });
166
175
  }, [activeParser]);
167
176
  (0, react_1.useEffect)(function () {
168
177
  if (!(0, isEqual_1.default)(previousStyle, style) || !(0, isEqual_1.default)(previouseParser, activeParser)) {
@@ -173,39 +182,36 @@ var CodeEditor = function (_a) {
173
182
  setIsSldParser(activeParser === null || activeParser === void 0 ? void 0 : activeParser.title.includes('SLD'));
174
183
  }, [activeParser]);
175
184
  if (hasError) {
176
- return (react_1.default.createElement("h1", null, "An error occured in the CodeEditor UI."));
185
+ return (react_1.default.createElement("h1", null, "An error occurred in the CodeEditor UI."));
177
186
  }
178
187
  var onChange = function (v) { return __awaiter(void 0, void 0, void 0, function () {
179
- var parsedStyle, _a, output, _b, errors, err_1;
180
- return __generator(this, function (_c) {
181
- switch (_c.label) {
188
+ var parsedStyle, _a, err_1;
189
+ return __generator(this, function (_b) {
190
+ switch (_b.label) {
182
191
  case 0:
183
192
  setValue(v);
184
- setInvalidMessage(undefined);
185
- _c.label = 1;
193
+ setReadStyleResult(undefined);
194
+ _b.label = 1;
186
195
  case 1:
187
- _c.trys.push([1, 5, , 6]);
196
+ _b.trys.push([1, 5, , 6]);
188
197
  parsedStyle = void 0;
189
198
  if (!activeParser) return [3 /*break*/, 3];
199
+ _a = setReadStyleResult;
190
200
  return [4 /*yield*/, activeParser.readStyle(v)];
191
201
  case 2:
192
- _a = _c.sent(), output = _a.output, _b = _a.errors, errors = _b === void 0 ? [] : _b;
193
- if (errors.length > 0) {
194
- setInvalidMessage(errors.map(function (e) { return e.message; }).join(', '));
195
- }
196
- else {
197
- parsedStyle = output;
198
- }
202
+ _a.apply(void 0, [_b.sent()]);
199
203
  return [3 /*break*/, 4];
200
204
  case 3:
201
205
  parsedStyle = JSON.parse(v);
202
- _c.label = 4;
206
+ _b.label = 4;
203
207
  case 4:
204
208
  onStyleChange(parsedStyle);
205
209
  return [3 /*break*/, 6];
206
210
  case 5:
207
- err_1 = _c.sent();
208
- setInvalidMessage(err_1.message);
211
+ err_1 = _b.sent();
212
+ setReadStyleResult({
213
+ errors: [err_1.message]
214
+ });
209
215
  return [3 /*break*/, 6];
210
216
  case 6: return [2 /*return*/];
211
217
  }
@@ -248,9 +254,6 @@ var CodeEditor = function (_a) {
248
254
  (0, file_saver_1.saveAs)(blob, fileName);
249
255
  }
250
256
  };
251
- var onCopyButtonClick = function () {
252
- copyToClipboard(value);
253
- };
254
257
  /**
255
258
  * Copies the a value to the clipboard.
256
259
  * Credits: https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f
@@ -274,7 +277,22 @@ var CodeEditor = function (_a) {
274
277
  document.getSelection().addRange(selected);
275
278
  }
276
279
  };
280
+ var onCopyButtonClick = function () {
281
+ copyToClipboard(value);
282
+ };
283
+ var toggleFeedback = function () {
284
+ setShowFeedback(!showFeedback);
285
+ };
277
286
  var parserHasUnitSelect = isSldParser && activeParser && activeParser.sldVersion !== '1.0.0';
287
+ var writeStyleHasFeedback = (writeStyleResult === null || writeStyleResult === void 0 ? void 0 : writeStyleResult.errors) ||
288
+ (writeStyleResult === null || writeStyleResult === void 0 ? void 0 : writeStyleResult.warnings) ||
289
+ (writeStyleResult === null || writeStyleResult === void 0 ? void 0 : writeStyleResult.unsupportedProperties);
290
+ var readStyleHasFeedback = (readStyleResult === null || readStyleResult === void 0 ? void 0 : readStyleResult.errors) ||
291
+ (readStyleResult === null || readStyleResult === void 0 ? void 0 : readStyleResult.warnings) ||
292
+ (readStyleResult === null || readStyleResult === void 0 ? void 0 : readStyleResult.unsupportedProperties);
293
+ var hasAlerts = (writeStyleResult === null || writeStyleResult === void 0 ? void 0 : writeStyleResult.errors) || (readStyleResult === null || readStyleResult === void 0 ? void 0 : readStyleResult.errors);
294
+ var hasWarnings = readStyleHasFeedback || writeStyleHasFeedback && (!hasAlerts);
295
+ var alertExtraClass = showFeedback ? 'feedback-visible' : 'feedback-hidden';
278
296
  return (react_1.default.createElement("div", { className: "gs-code-editor" },
279
297
  react_1.default.createElement("div", { className: "gs-code-editor-toolbar" },
280
298
  locale.formatSelectLabel,
@@ -283,12 +301,25 @@ var CodeEditor = function (_a) {
283
301
  parserHasUnitSelect &&
284
302
  react_1.default.createElement(SLDUnitsSelect_1.SLDUnitsSelect, { changeHandler: onUnitSelect })),
285
303
  react_1.default.createElement(react_2.default, { className: "gs-code-editor-monaco", value: value, path: isSldParser ? undefined : MODELPATH, language: isSldParser ? 'xml' : 'json', onChange: handleOnChange }),
286
- react_1.default.createElement("div", { className: "gs-code-editor-errormessage" }, invalidMessage),
304
+ react_1.default.createElement("div", { className: "gs-code-editor-feedback ".concat(alertExtraClass) },
305
+ (writeStyleHasFeedback) &&
306
+ react_1.default.createElement("div", { className: 'write-feedback' },
307
+ react_1.default.createElement("span", null, "".concat(locale.writeFeedback, " ").concat(activeParser === null || activeParser === void 0 ? void 0 : activeParser.title)),
308
+ react_1.default.createElement(ParserFeedback_1.default, { feedback: writeStyleResult })),
309
+ (readStyleHasFeedback) &&
310
+ react_1.default.createElement("div", { className: 'read-feedback' },
311
+ react_1.default.createElement("span", null, "".concat(locale.readFeedback, " ").concat(activeParser === null || activeParser === void 0 ? void 0 : activeParser.title)),
312
+ react_1.default.createElement(ParserFeedback_1.default, { feedback: readStyleResult }))),
287
313
  react_1.default.createElement("div", { className: "gs-code-editor-bottombar" },
288
- showCopyButton &&
289
- react_1.default.createElement(antd_1.Button, { className: "gs-code-editor-copy-button", type: "primary", onClick: onCopyButtonClick }, locale.copyButtonLabel),
290
- showSaveButton &&
291
- react_1.default.createElement(antd_1.Button, { className: "gs-code-editor-download-button", type: "primary", onClick: onDownloadButtonClick }, locale.downloadButtonLabel))));
314
+ react_1.default.createElement("div", { className: 'left-items' },
315
+ hasAlerts && react_1.default.createElement(icons_1.WarningTwoTone, { twoToneColor: "#ff4d4f", onClick: toggleFeedback }),
316
+ hasWarnings && react_1.default.createElement(icons_1.ExclamationCircleTwoTone, { twoToneColor: "#faad14", onClick: toggleFeedback })),
317
+ react_1.default.createElement("div", { className: 'center-items' },
318
+ showCopyButton &&
319
+ react_1.default.createElement(antd_1.Button, { className: "gs-code-editor-copy-button", type: "primary", onClick: onCopyButtonClick }, locale.copyButtonLabel),
320
+ showSaveButton &&
321
+ react_1.default.createElement(antd_1.Button, { className: "gs-code-editor-download-button", type: "primary", onClick: onDownloadButtonClick }, locale.downloadButtonLabel)),
322
+ react_1.default.createElement("div", { className: 'right-items' }))));
292
323
  };
293
324
  exports.CodeEditor = CodeEditor;
294
325
  exports.default = (0, LocaleWrapper_1.localize)(exports.CodeEditor, exports.COMPONENTNAME);