@api-client/ui 0.0.5 → 0.0.7

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 (323) hide show
  1. package/demo/elements/http/http-assertions.html +3 -0
  2. package/demo/elements/http/http-assertions.ts +1 -1
  3. package/demo/elements/http/http-flows.html +23 -0
  4. package/demo/elements/http/http-flows.ts +92 -0
  5. package/demo/elements/http/index.html +3 -0
  6. package/demo/pages/http-project/main.ts +5 -6
  7. package/dist/define/dialog/delete-cookie-action-dialog.d.ts +10 -0
  8. package/dist/define/dialog/delete-cookie-action-dialog.d.ts.map +1 -0
  9. package/dist/define/dialog/delete-cookie-action-dialog.js +14 -0
  10. package/dist/define/dialog/delete-cookie-action-dialog.js.map +1 -0
  11. package/dist/define/dialog/set-cookie-action-dialog.d.ts +10 -0
  12. package/dist/define/dialog/set-cookie-action-dialog.d.ts.map +1 -0
  13. package/dist/define/dialog/set-cookie-action-dialog.js +14 -0
  14. package/dist/define/dialog/set-cookie-action-dialog.js.map +1 -0
  15. package/dist/define/http/http-assertions.d.ts +1 -1
  16. package/dist/define/http/http-assertions.d.ts.map +1 -1
  17. package/dist/define/http/http-assertions.js +3 -3
  18. package/dist/define/http/http-assertions.js.map +1 -1
  19. package/dist/define/http/http-flows.d.ts +10 -0
  20. package/dist/define/http/http-flows.d.ts.map +1 -0
  21. package/dist/define/http/http-flows.js +13 -0
  22. package/dist/define/http/http-flows.js.map +1 -0
  23. package/dist/define/ui/ui-divider.d.ts +4 -1
  24. package/dist/define/ui/ui-divider.d.ts.map +1 -1
  25. package/dist/define/ui/ui-divider.js +11 -2
  26. package/dist/define/ui/ui-divider.js.map +1 -1
  27. package/dist/elements/ApiElement.d.ts +4 -0
  28. package/dist/elements/ApiElement.d.ts.map +1 -1
  29. package/dist/elements/ApiElement.js +6 -0
  30. package/dist/elements/ApiElement.js.map +1 -1
  31. package/dist/elements/amf/ApiAuthorizationEditor.element.js +1 -1
  32. package/dist/elements/amf/ApiAuthorizationEditor.element.js.map +1 -1
  33. package/dist/elements/amf/ApiOperationDocument.element.d.ts.map +1 -1
  34. package/dist/elements/amf/ApiOperationDocument.element.js +2 -1
  35. package/dist/elements/amf/ApiOperationDocument.element.js.map +1 -1
  36. package/dist/elements/amf/ApiRequest.element.js +1 -1
  37. package/dist/elements/amf/ApiRequest.element.js.map +1 -1
  38. package/dist/elements/amf/ApiRequestEditor.element.d.ts +0 -1
  39. package/dist/elements/amf/ApiRequestEditor.element.d.ts.map +1 -1
  40. package/dist/elements/amf/ApiRequestEditor.element.js +0 -3
  41. package/dist/elements/amf/ApiRequestEditor.element.js.map +1 -1
  42. package/dist/elements/authorization/ui/Authorization.d.ts +2 -1
  43. package/dist/elements/authorization/ui/Authorization.d.ts.map +1 -1
  44. package/dist/elements/authorization/ui/Authorization.js +0 -3
  45. package/dist/elements/authorization/ui/Authorization.js.map +1 -1
  46. package/dist/elements/dialog/DeleteCookieAction.element.d.ts +20 -0
  47. package/dist/elements/dialog/DeleteCookieAction.element.d.ts.map +1 -0
  48. package/dist/elements/dialog/DeleteCookieAction.element.js +93 -0
  49. package/dist/elements/dialog/DeleteCookieAction.element.js.map +1 -0
  50. package/dist/elements/dialog/DeleteCookieAction.styles.d.ts +3 -0
  51. package/dist/elements/dialog/DeleteCookieAction.styles.d.ts.map +1 -0
  52. package/dist/elements/dialog/DeleteCookieAction.styles.js +13 -0
  53. package/dist/elements/dialog/DeleteCookieAction.styles.js.map +1 -0
  54. package/dist/elements/dialog/Rename.d.ts +7 -6
  55. package/dist/elements/dialog/Rename.d.ts.map +1 -1
  56. package/dist/elements/dialog/Rename.js +7 -6
  57. package/dist/elements/dialog/Rename.js.map +1 -1
  58. package/dist/elements/dialog/SetCookieAction.element.d.ts +22 -0
  59. package/dist/elements/dialog/SetCookieAction.element.d.ts.map +1 -0
  60. package/dist/elements/dialog/SetCookieAction.element.js +173 -0
  61. package/dist/elements/dialog/SetCookieAction.element.js.map +1 -0
  62. package/dist/elements/environment/EnvironmentEditor.d.ts +24 -3
  63. package/dist/elements/environment/EnvironmentEditor.d.ts.map +1 -1
  64. package/dist/elements/environment/EnvironmentEditor.js +69 -23
  65. package/dist/elements/environment/EnvironmentEditor.js.map +1 -1
  66. package/dist/elements/environment/EnvironmentEditor.styles.d.ts.map +1 -1
  67. package/dist/elements/environment/EnvironmentEditor.styles.js +5 -0
  68. package/dist/elements/environment/EnvironmentEditor.styles.js.map +1 -1
  69. package/dist/elements/environment/ServerEditor.d.ts +3 -3
  70. package/dist/elements/environment/ServerEditor.d.ts.map +1 -1
  71. package/dist/elements/environment/ServerEditor.js +3 -6
  72. package/dist/elements/environment/ServerEditor.js.map +1 -1
  73. package/dist/elements/environment/VariablesEditor.d.ts +0 -1
  74. package/dist/elements/environment/VariablesEditor.d.ts.map +1 -1
  75. package/dist/elements/environment/VariablesEditor.js +3 -6
  76. package/dist/elements/environment/VariablesEditor.js.map +1 -1
  77. package/dist/elements/highlight/Prism.styles.d.ts.map +1 -1
  78. package/dist/elements/highlight/Prism.styles.js +12 -5
  79. package/dist/elements/highlight/Prism.styles.js.map +1 -1
  80. package/dist/elements/http/BodyEditor.d.ts +0 -4
  81. package/dist/elements/http/BodyEditor.d.ts.map +1 -1
  82. package/dist/elements/http/BodyEditor.js +10 -16
  83. package/dist/elements/http/BodyEditor.js.map +1 -1
  84. package/dist/elements/http/BodyMultipartEditor.d.ts +3 -16
  85. package/dist/elements/http/BodyMultipartEditor.d.ts.map +1 -1
  86. package/dist/elements/http/BodyMultipartEditor.js +3 -19
  87. package/dist/elements/http/BodyMultipartEditor.js.map +1 -1
  88. package/dist/elements/http/BodyTextEditor.d.ts +0 -1
  89. package/dist/elements/http/BodyTextEditor.d.ts.map +1 -1
  90. package/dist/elements/http/BodyTextEditor.js +0 -3
  91. package/dist/elements/http/BodyTextEditor.js.map +1 -1
  92. package/dist/elements/http/BodyUrlEncodedEditor.d.ts +3 -3
  93. package/dist/elements/http/BodyUrlEncodedEditor.d.ts.map +1 -1
  94. package/dist/elements/http/BodyUrlEncodedEditor.js +3 -5
  95. package/dist/elements/http/BodyUrlEncodedEditor.js.map +1 -1
  96. package/dist/elements/http/HeadersForm.d.ts +0 -4
  97. package/dist/elements/http/HeadersForm.d.ts.map +1 -1
  98. package/dist/elements/http/HeadersForm.js +0 -6
  99. package/dist/elements/http/HeadersForm.js.map +1 -1
  100. package/dist/elements/http/HttpAssertions.element.d.ts +55 -0
  101. package/dist/elements/http/HttpAssertions.element.d.ts.map +1 -0
  102. package/dist/elements/http/HttpAssertions.element.js +264 -0
  103. package/dist/elements/http/HttpAssertions.element.js.map +1 -0
  104. package/dist/elements/http/HttpAssertions.styles.d.ts.map +1 -1
  105. package/dist/elements/http/HttpAssertions.styles.js +7 -156
  106. package/dist/elements/http/HttpAssertions.styles.js.map +1 -1
  107. package/dist/elements/http/HttpFlows.common.d.ts +3 -0
  108. package/dist/elements/http/HttpFlows.common.d.ts.map +1 -0
  109. package/dist/elements/http/HttpFlows.common.js +181 -0
  110. package/dist/elements/http/HttpFlows.common.js.map +1 -0
  111. package/dist/elements/http/HttpFlows.element.d.ts +97 -0
  112. package/dist/elements/http/HttpFlows.element.d.ts.map +1 -0
  113. package/dist/elements/http/HttpFlows.element.js +684 -0
  114. package/dist/elements/http/HttpFlows.element.js.map +1 -0
  115. package/dist/elements/http/HttpFlows.styles.d.ts +3 -0
  116. package/dist/elements/http/HttpFlows.styles.d.ts.map +1 -0
  117. package/dist/elements/http/HttpFlows.styles.js +28 -0
  118. package/dist/elements/http/HttpFlows.styles.js.map +1 -0
  119. package/dist/elements/http/HttpFlowsUi.d.ts +172 -0
  120. package/dist/elements/http/HttpFlowsUi.d.ts.map +1 -0
  121. package/dist/elements/http/HttpFlowsUi.js +1256 -0
  122. package/dist/elements/http/HttpFlowsUi.js.map +1 -0
  123. package/dist/elements/http/RequestConfigElement.d.ts +0 -1
  124. package/dist/elements/http/RequestConfigElement.d.ts.map +1 -1
  125. package/dist/elements/http/RequestConfigElement.js +8 -11
  126. package/dist/elements/http/RequestConfigElement.js.map +1 -1
  127. package/dist/elements/http/RequestEditor.d.ts +10 -10
  128. package/dist/elements/http/RequestEditor.d.ts.map +1 -1
  129. package/dist/elements/http/RequestEditor.js +62 -23
  130. package/dist/elements/http/RequestEditor.js.map +1 -1
  131. package/dist/elements/http/UrlInput.d.ts +3 -3
  132. package/dist/elements/http/UrlInput.d.ts.map +1 -1
  133. package/dist/elements/http/UrlInput.js +2 -2
  134. package/dist/elements/http/UrlInput.js.map +1 -1
  135. package/dist/elements/http/UrlParamsForm.d.ts +0 -1
  136. package/dist/elements/http/UrlParamsForm.d.ts.map +1 -1
  137. package/dist/elements/http/UrlParamsForm.js +0 -3
  138. package/dist/elements/http/UrlParamsForm.js.map +1 -1
  139. package/dist/elements/layout/SplitView.styles.d.ts.map +1 -1
  140. package/dist/elements/layout/SplitView.styles.js +1 -0
  141. package/dist/elements/layout/SplitView.styles.js.map +1 -1
  142. package/dist/elements/navigation/AppNavigationItem.styles.d.ts.map +1 -1
  143. package/dist/elements/navigation/AppNavigationItem.styles.js +2 -0
  144. package/dist/elements/navigation/AppNavigationItem.styles.js.map +1 -1
  145. package/dist/elements/project/HttpProjectRequest.d.ts +2 -1
  146. package/dist/elements/project/HttpProjectRequest.d.ts.map +1 -1
  147. package/dist/elements/project/HttpProjectRequest.js +14 -5
  148. package/dist/elements/project/HttpProjectRequest.js.map +1 -1
  149. package/dist/elements/project/ProjectRunner.d.ts +0 -1
  150. package/dist/elements/project/ProjectRunner.d.ts.map +1 -1
  151. package/dist/elements/project/ProjectRunner.js +1 -4
  152. package/dist/elements/project/ProjectRunner.js.map +1 -1
  153. package/dist/elements/schema-design/AssociationFormElement.d.ts +0 -1
  154. package/dist/elements/schema-design/AssociationFormElement.d.ts.map +1 -1
  155. package/dist/elements/schema-design/AssociationFormElement.js +2 -5
  156. package/dist/elements/schema-design/AssociationFormElement.js.map +1 -1
  157. package/dist/elements/schema-design/DataEntityEditorElement.d.ts +2 -2
  158. package/dist/elements/schema-design/DataEntityEditorElement.d.ts.map +1 -1
  159. package/dist/elements/schema-design/DataEntityEditorElement.js +5 -5
  160. package/dist/elements/schema-design/DataEntityEditorElement.js.map +1 -1
  161. package/dist/elements/schema-design/DataSchemaDocument.d.ts +0 -1
  162. package/dist/elements/schema-design/DataSchemaDocument.d.ts.map +1 -1
  163. package/dist/elements/schema-design/DataSchemaDocument.js +4 -7
  164. package/dist/elements/schema-design/DataSchemaDocument.js.map +1 -1
  165. package/dist/elements/schema-design/EntityFormElement.d.ts +0 -1
  166. package/dist/elements/schema-design/EntityFormElement.d.ts.map +1 -1
  167. package/dist/elements/schema-design/EntityFormElement.js +4 -7
  168. package/dist/elements/schema-design/EntityFormElement.js.map +1 -1
  169. package/dist/elements/schema-design/PropertyFormElement.d.ts +1 -2
  170. package/dist/elements/schema-design/PropertyFormElement.d.ts.map +1 -1
  171. package/dist/elements/schema-design/PropertyFormElement.js +8 -11
  172. package/dist/elements/schema-design/PropertyFormElement.js.map +1 -1
  173. package/dist/pages/ApplicationScreen.d.ts +1 -1
  174. package/dist/pages/ApplicationScreen.d.ts.map +1 -1
  175. package/dist/pages/ApplicationScreen.js +1 -1
  176. package/dist/pages/ApplicationScreen.js.map +1 -1
  177. package/dist/pages/api-client/ApiClient.styles.d.ts.map +1 -1
  178. package/dist/pages/api-client/ApiClient.styles.js +22 -3
  179. package/dist/pages/api-client/ApiClient.styles.js.map +1 -1
  180. package/dist/pages/api-client/Authenticate.screen.d.ts +2 -0
  181. package/dist/pages/api-client/Authenticate.screen.d.ts.map +1 -1
  182. package/dist/pages/api-client/Authenticate.screen.js +19 -3
  183. package/dist/pages/api-client/Authenticate.screen.js.map +1 -1
  184. package/dist/pages/api-client/StoreConfig.screen.d.ts.map +1 -1
  185. package/dist/pages/api-client/StoreConfig.screen.js +4 -2
  186. package/dist/pages/api-client/StoreConfig.screen.js.map +1 -1
  187. package/dist/pages/api-client/StoreConfig.styles.d.ts.map +1 -1
  188. package/dist/pages/api-client/StoreConfig.styles.js +5 -0
  189. package/dist/pages/api-client/StoreConfig.styles.js.map +1 -1
  190. package/dist/pages/api-client/pages/Files.page.d.ts +1 -0
  191. package/dist/pages/api-client/pages/Files.page.d.ts.map +1 -1
  192. package/dist/pages/api-client/pages/Files.page.js +2 -1
  193. package/dist/pages/api-client/pages/Files.page.js.map +1 -1
  194. package/dist/pages/http-project/HttpProject.screen.d.ts +0 -8
  195. package/dist/pages/http-project/HttpProject.screen.d.ts.map +1 -1
  196. package/dist/pages/http-project/HttpProject.screen.js +14 -15
  197. package/dist/pages/http-project/HttpProject.screen.js.map +1 -1
  198. package/dist/pages/http-project/types.d.ts +8 -6
  199. package/dist/pages/http-project/types.d.ts.map +1 -1
  200. package/dist/pages/http-project/types.js.map +1 -1
  201. package/dist/styles/m3/surface.module.d.ts.map +1 -1
  202. package/dist/styles/m3/surface.module.js +11 -27
  203. package/dist/styles/m3/surface.module.js.map +1 -1
  204. package/dist/ui/UiElement.d.ts +4 -0
  205. package/dist/ui/UiElement.d.ts.map +1 -1
  206. package/dist/ui/UiElement.js +6 -0
  207. package/dist/ui/UiElement.js.map +1 -1
  208. package/dist/ui/button/SegmentedButton.styles.d.ts.map +1 -1
  209. package/dist/ui/button/SegmentedButton.styles.js +3 -1
  210. package/dist/ui/button/SegmentedButton.styles.js.map +1 -1
  211. package/dist/ui/dialog/UiDialog.d.ts +3 -0
  212. package/dist/ui/dialog/UiDialog.d.ts.map +1 -1
  213. package/dist/ui/dialog/UiDialog.js +3 -0
  214. package/dist/ui/dialog/UiDialog.js.map +1 -1
  215. package/dist/ui/effects/ripple.d.ts.map +1 -1
  216. package/dist/ui/effects/ripple.js +5 -1
  217. package/dist/ui/effects/ripple.js.map +1 -1
  218. package/dist/ui/icons/Icons.d.ts +3 -2
  219. package/dist/ui/icons/Icons.d.ts.map +1 -1
  220. package/dist/ui/icons/Icons.js +2 -1
  221. package/dist/ui/icons/Icons.js.map +1 -1
  222. package/dist/ui/input/CheckedElement.d.ts +1 -1
  223. package/dist/ui/input/CheckedElement.d.ts.map +1 -1
  224. package/dist/ui/input/CheckedElement.js +3 -3
  225. package/dist/ui/input/CheckedElement.js.map +1 -1
  226. package/dist/ui/input/Input.js +1 -1
  227. package/dist/ui/input/Input.js.map +1 -1
  228. package/dist/ui/list/{DividerElement.d.ts → UiDivider.element.d.ts} +6 -6
  229. package/dist/ui/list/UiDivider.element.d.ts.map +1 -0
  230. package/dist/ui/list/UiDivider.element.js +39 -0
  231. package/dist/ui/list/UiDivider.element.js.map +1 -0
  232. package/dist/ui/list/UiDivider.styles.d.ts +3 -0
  233. package/dist/ui/list/UiDivider.styles.d.ts.map +1 -0
  234. package/dist/ui/list/UiDivider.styles.js +49 -0
  235. package/dist/ui/list/UiDivider.styles.js.map +1 -0
  236. package/dist/ui/tabs/UiTabs.d.ts +13 -1
  237. package/dist/ui/tabs/UiTabs.d.ts.map +1 -1
  238. package/dist/ui/tabs/UiTabs.js +42 -13
  239. package/dist/ui/tabs/UiTabs.js.map +1 -1
  240. package/package.json +1 -1
  241. package/src/define/dialog/delete-cookie-action-dialog.ts +16 -0
  242. package/src/define/dialog/set-cookie-action-dialog.ts +16 -0
  243. package/src/define/http/http-assertions.ts +3 -3
  244. package/src/define/http/http-flows.ts +15 -0
  245. package/src/define/ui/ui-divider.ts +7 -2
  246. package/src/elements/ApiElement.ts +7 -0
  247. package/src/elements/amf/ApiAuthorizationEditor.element.ts +1 -1
  248. package/src/elements/amf/ApiOperationDocument.element.ts +2 -1
  249. package/src/elements/amf/ApiRequest.element.ts +1 -1
  250. package/src/elements/amf/ApiRequestEditor.element.ts +0 -4
  251. package/src/elements/authorization/ui/Authorization.ts +3 -5
  252. package/src/elements/dialog/DeleteCookieAction.element.ts +100 -0
  253. package/src/elements/dialog/DeleteCookieAction.styles.ts +14 -0
  254. package/src/elements/dialog/Rename.ts +8 -7
  255. package/src/elements/dialog/SetCookieAction.element.ts +183 -0
  256. package/src/elements/environment/EnvironmentEditor.styles.ts +5 -0
  257. package/src/elements/environment/EnvironmentEditor.ts +81 -22
  258. package/src/elements/environment/ServerEditor.ts +4 -8
  259. package/src/elements/environment/VariablesEditor.ts +3 -7
  260. package/src/elements/highlight/Prism.styles.ts +12 -5
  261. package/src/elements/http/BodyEditor.ts +10 -17
  262. package/src/elements/http/BodyMultipartEditor.ts +3 -20
  263. package/src/elements/http/BodyTextEditor.ts +0 -4
  264. package/src/elements/http/BodyUrlEncodedEditor.ts +5 -8
  265. package/src/elements/http/HeadersForm.ts +2 -9
  266. package/src/elements/http/HttpAssertions.element.ts +286 -0
  267. package/src/elements/http/HttpAssertions.styles.ts +7 -156
  268. package/src/elements/http/HttpFlows.common.ts +181 -0
  269. package/src/elements/http/HttpFlows.element.ts +722 -0
  270. package/src/elements/http/HttpFlows.styles.ts +29 -0
  271. package/src/elements/http/HttpFlowsUi.ts +1327 -0
  272. package/src/elements/http/RequestConfigElement.ts +10 -14
  273. package/src/elements/http/RequestEditor.ts +77 -35
  274. package/src/elements/http/UrlInput.ts +6 -6
  275. package/src/elements/http/UrlParamsForm.ts +2 -6
  276. package/src/elements/layout/SplitView.styles.ts +1 -0
  277. package/src/elements/navigation/AppNavigationItem.styles.ts +2 -0
  278. package/src/elements/project/HttpProjectRequest.ts +16 -5
  279. package/src/elements/project/ProjectRunner.ts +3 -7
  280. package/src/elements/schema-design/AssociationFormElement.ts +4 -8
  281. package/src/elements/schema-design/DataEntityEditorElement.ts +8 -8
  282. package/src/elements/schema-design/DataSchemaDocument.ts +5 -9
  283. package/src/elements/schema-design/EntityFormElement.ts +6 -10
  284. package/src/elements/schema-design/PropertyFormElement.ts +11 -15
  285. package/src/pages/ApplicationScreen.ts +1 -1
  286. package/src/pages/api-client/ApiClient.styles.ts +22 -3
  287. package/src/pages/api-client/Authenticate.screen.ts +19 -3
  288. package/src/pages/api-client/StoreConfig.screen.ts +4 -2
  289. package/src/pages/api-client/StoreConfig.styles.ts +5 -0
  290. package/src/pages/api-client/pages/Files.page.ts +2 -1
  291. package/src/pages/http-project/HttpProject.screen.ts +14 -26
  292. package/src/pages/http-project/types.ts +8 -6
  293. package/src/styles/m3/surface.module.ts +11 -27
  294. package/src/styles/m3/theme.css +36 -0
  295. package/src/styles/m3/tokens.css +11 -0
  296. package/src/ui/UiElement.ts +7 -0
  297. package/src/ui/button/SegmentedButton.styles.ts +3 -1
  298. package/src/ui/dialog/UiDialog.ts +3 -0
  299. package/src/ui/effects/ripple.ts +6 -1
  300. package/src/ui/icons/Icons.ts +3 -2
  301. package/src/ui/input/CheckedElement.ts +3 -3
  302. package/src/ui/input/Input.ts +1 -1
  303. package/src/ui/list/UiDivider.element.ts +41 -0
  304. package/src/ui/list/UiDivider.styles.ts +49 -0
  305. package/src/ui/tabs/UiTabs.ts +55 -13
  306. package/test/amf/authorization/OAuth2Method.test.ts +1 -1
  307. package/test/elements/http/HttpAssertions.test.ts +5 -6
  308. package/test/elements/http/HttpFlows.test.ts +485 -0
  309. package/dist/elements/http/HttpAssertions.d.ts +0 -114
  310. package/dist/elements/http/HttpAssertions.d.ts.map +0 -1
  311. package/dist/elements/http/HttpAssertions.js +0 -1146
  312. package/dist/elements/http/HttpAssertions.js.map +0 -1
  313. package/dist/elements/http/internals.d.ts +0 -150
  314. package/dist/elements/http/internals.d.ts.map +0 -1
  315. package/dist/elements/http/internals.js +0 -150
  316. package/dist/elements/http/internals.js.map +0 -1
  317. package/dist/ui/list/DividerElement.d.ts.map +0 -1
  318. package/dist/ui/list/DividerElement.js +0 -82
  319. package/dist/ui/list/DividerElement.js.map +0 -1
  320. package/src/elements/http/HttpAssertions.ts +0 -1187
  321. package/src/elements/http/internals.ts +0 -151
  322. package/src/http-client/docs/Files.md +0 -28
  323. package/src/ui/list/DividerElement.ts +0 -84
@@ -1 +1 @@
1
- {"version":3,"file":"DataSchemaDocument.js","sourceRoot":"","sources":["../../../src/elements/schema-design/DataSchemaDocument.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAa,IAAI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C,QAAQ,EAAE;YAClB,OAAO,OAAO,CAAC;SAChB;QACD,OAAO,IAAI,CAAA;;2CAE4B,IAAI,CAAC,mBAAmB;;KAE9D,CAAC;IACJ,CAAC;CACF;AAhzB6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAsB;AAMN;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAc;AAK/C;IAAR,KAAK,EAAE;mDAAgC;AAMG;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4DAA2B;AAOzB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+DAA+B;AAQ9B;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAAoB;AAMtD;IAAR,KAAK,EAAE;kEAA2C","sourcesContent":["import { css, CSSResult, html, TemplateResult, nothing, PropertyValues } from \"lit\";\nimport { DataAssociation, DataEntity, DataNamespace, DataProperty, DataEntityKind } from \"@api-client/core/build/browser.js\";\nimport { property, state } from \"lit/decorators.js\";\nimport { ClassInfo, classMap } from \"lit/directives/class-map.js\";\nimport ApiElement from \"../ApiElement.js\";\nimport theme from '../theme.js';\nimport schemaCommon from './schemaCommon.js';\nimport EditorCommon from './CommonStyles.js';\nimport MarkdownStyles from '../highlight/MarkdownStyles.js';\nimport typography from \"../../styles/m3/typography.module.js\";\nimport '../../define/ui/ui-button.js';\nimport '../../define/ui/ui-icon-button.js';\nimport '../../define/ui/ui-icon.js';\nimport '../../define/ui/ui-radio.js';\nimport RadioElement from \"../../ui/input/RadioElement.js\";\n\n/**\n * We keep the list of expanded attributes in a weak map\n * so the state is kept as long as the namespace is loaded and the DataEntity exists.\n * WeakMap allows to GC the DataEntity when it is removed from the namespace (and also release the values).\n */\nconst expandedState = new WeakMap<DataEntity, string[]>();\n\nconst selectedUnions = new Map<string, string>();\n\ntype UnionType = \"anyOf\" | \"allOf\" | \"oneOf\" | \"not\";\n\n/**\n * An element that renders a documentation view for a data entity.\n * \n * @fires edit - When a property is selected for editing. This is only possible when the `editable` property is set.\n * @fires change - When the entity has changed. This is only possible when the `editable` property is set.\n */\nexport default class DataSchemaDocument extends ApiElement {\n static override get styles(): CSSResult[] {\n return [\n theme,\n schemaCommon,\n MarkdownStyles,\n EditorCommon,\n typography,\n css`\n :host {\n display: block;\n }\n\n .entity-header {\n margin-bottom: 20px;\n }\n\n .entity-header .label {\n margin-bottom: 1em;\n }\n\n .no-info {\n margin: 12px 20px;\n }\n\n .add-property-section {\n margin-top: 20px;\n }\n\n .property-container.selected {\n background: var(--list-active-background);\n }\n\n .tree-view.drop-active {\n background: var(--association-drop-background, #e3f2fd);\n }\n\n .property-container.drag-over {\n background: var(--association-drop-background, #e3f2fd);\n }\n\n .drop-zone {\n position: absolute;\n inset: 0;\n height: unset;\n margin: 0;\n padding: 0;\n background: rgba(255,255,255,0.92);\n }\n `,\n ];\n }\n\n /**\n * The read data namespace.\n */\n @property({ type: Object }) root?: DataNamespace;\n\n /**\n * The entity key to render the schema documentation for\n * @attribute\n */\n @property({ type: String, reflect: true }) key?: string;\n\n /**\n * The read data entity when the \"selected\" change.\n */\n @state() protected _entity?: DataEntity;\n\n /**\n * The key of the property being highlighted.\n * @attribute\n */\n @property({ type: String, reflect: true }) selectedProperty?: string;\n\n /**\n * When set it activates the drop zone in the properties list to drop an entity as an association.\n * This has no effect when `editable` is not set.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) associationDropZone?: boolean;\n\n /**\n * Whether to render the view in the edit-ready model.\n * This mode allows to add new property, create an association, or remove those.\n * It does not allow to manipulate properties of association or properties.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) editable?: boolean;\n\n /**\n * When dragging an entity over an existing association this is the key\n * of the association hovered.\n */\n @state() protected _dropAssociationTarget?: string;\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n if (cp.has('key')) {\n this.computeEntity();\n }\n }\n\n /**\n * Computes the view value for the property.\n * This should be called before the update is complete so this won't trigger another update.\n */\n protected computeEntity(): void {\n const { root, key } = this;\n if (!root || !key) {\n this._entity = undefined;\n return;\n }\n const entity = root.definitions.entities.find(i => i.key === key);\n this._entity = entity;\n }\n\n /**\n * Adds an entity with the given key as an association to this entity.\n * This does nothing when the view is not in the `editable` model.\n * \n * Note, we allow to create an association to self. Also note, an entity can have multiple associations to the same target.\n * \n * @param foreignKey The key of the target entity to add.\n * @param parentAssociation When set, it adds another target to an existing association.\n */\n addAssociation(foreignKey: string, parentAssociation?: string): void {\n const { _entity, editable } = this;\n if (!editable || !foreignKey || !_entity) {\n return;\n }\n if (parentAssociation) {\n const parent = _entity.associations.find(i => i.key === parentAssociation);\n if (!parent) {\n return;\n }\n parent.addTarget(foreignKey);\n } else {\n const created = _entity.addTargetAssociation(foreignKey);\n this.dispatchEvent(new CustomEvent('edit', {\n detail: {\n type: 'association',\n key: created.key,\n }\n }));\n }\n this._notifyChanged();\n }\n\n /**\n * Removes an association from the entity.\n * This does nothing when the view is not in the `editable` model.\n * \n * @param key The key of the association to remove.\n */\n removeAssociation(key: string): void {\n const { _entity, editable } = this;\n if (!editable || !key || !_entity) {\n return;\n }\n _entity.removeAssociation(key);\n this._notifyChanged();\n this.requestUpdate();\n }\n\n addProperty(name?: string): void {\n const { _entity, editable } = this;\n if (!_entity || !editable) {\n return;\n }\n const created = _entity.addNamedProperty(name || 'New property');\n this.selectedProperty = created.key;\n this._notifyChanged();\n this.requestUpdate();\n this.dispatchEvent(new CustomEvent('edit', {\n detail: {\n type: 'property',\n key: created.key,\n }\n }));\n }\n\n removeProperty(key: string): void {\n const { _entity, editable } = this;\n if (!key || !_entity || !editable) {\n return;\n }\n _entity.removeProperty(key);\n if (this.selectedProperty === key) {\n this.selectedProperty = undefined;\n }\n this._notifyChanged();\n this.requestUpdate();\n }\n\n protected _notifyChanged(): void {\n this.dispatchEvent(new Event('change'));\n }\n\n protected _addPropertyHandler(): void {\n this.addProperty();\n }\n\n protected _findParentKeyedElement(node: HTMLElement): HTMLElement | null {\n let target: HTMLElement | null = node;\n while (target) {\n if (target.nodeType !== Node.ELEMENT_NODE || !target.dataset) {\n target = target.parentElement;\n continue;\n }\n if (target.dataset.key) {\n return target;\n }\n target = target.parentElement;\n }\n return null;\n }\n\n protected _removeHandler(e: Event): void {\n const button = e.currentTarget as HTMLElement;\n const { type } = button.dataset;\n if (!type) {\n return;\n }\n const node = this._findParentKeyedElement(e.target as HTMLElement);\n if (node) {\n if (type === 'property') {\n this.removeProperty(node.dataset.key as string);\n } else if (type === 'association') {\n this.removeAssociation(node.dataset.key as string);\n }\n }\n }\n\n protected _editHandler(e: Event): void {\n const button = e.currentTarget as HTMLElement;\n const { type } = button.dataset;\n if (!type) {\n return;\n }\n const node = this._findParentKeyedElement(e.target as HTMLElement);\n if (node) {\n this.dispatchEvent(new CustomEvent('edit', {\n detail: {\n type,\n key: node.dataset.key as string,\n }\n }));\n }\n }\n\n protected _associationDragOver(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n const dt = dataTransfer;\n if (!dt.types.includes(DataEntityKind.toLocaleLowerCase())) {\n return;\n }\n const node = e.currentTarget as HTMLElement;\n const { key } = node.dataset;\n if (key) {\n e.preventDefault();\n dt.effectAllowed = 'copy';\n dt.dropEffect = 'copy';\n this._dropAssociationTarget = key;\n }\n }\n\n protected _associationDragLeave(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n const dt = dataTransfer;\n if (!dt.types.includes(DataEntityKind.toLocaleLowerCase())) {\n return;\n }\n this._dropAssociationTarget = undefined;\n }\n\n protected _associationDrop(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n const dt = dataTransfer;\n if (!dt.types.includes(DataEntityKind.toLocaleLowerCase())) {\n return;\n }\n const { _dropAssociationTarget } = this;\n if (!_dropAssociationTarget) {\n return;\n }\n e.preventDefault();\n this._dropAssociationTarget = undefined; \n const key = dataTransfer.getData('text/key');\n this.addAssociation(key, _dropAssociationTarget);\n }\n\n protected _dragoverHandler(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n if (e.defaultPrevented) {\n return;\n }\n e.preventDefault();\n dataTransfer.dropEffect = \"copy\";\n dataTransfer.effectAllowed = \"copy\";\n }\n\n protected _dropHandler(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n if (e.defaultPrevented) {\n return;\n }\n e.preventDefault();\n const key = dataTransfer.getData('text/key');\n this.addAssociation(key);\n }\n\n /**\n * @returns the list of keys of properties that are expanded (children are rendered).\n */\n protected _getExpandedKeys(): string[] {\n const { _entity } = this;\n if (!_entity) {\n return [];\n }\n if (!expandedState.has(_entity)) {\n expandedState.set(_entity, []);\n }\n return expandedState.get(_entity) as string[];\n }\n\n protected _expandHandler(e: Event): void {\n const button = e.currentTarget as HTMLElement;\n const { id } = button.dataset;\n this._toggleExpandedProperty(id as string);\n }\n\n protected _expandKeydownHandler(e: KeyboardEvent): void {\n if (e.code !== 'Space') {\n return;\n }\n e.preventDefault();\n const button = e.currentTarget as HTMLElement;\n const { id } = button.dataset;\n this._toggleExpandedProperty(id as string);\n }\n\n /**\n * Toggles an \"expanded\" state for a property children.\n * \n * @param id Parent property id that has children to toggle visibility of.\n */\n protected _toggleExpandedProperty(id: string): void {\n const list = this._getExpandedKeys();\n const index = list.indexOf(id);\n if (index === -1) {\n list.push(id);\n } else {\n list.splice(index, 1);\n }\n this.requestUpdate();\n }\n\n protected _isRecursive(association: DataAssociation, target: string): boolean {\n const entity = association.getParent();\n return entity.hasClosedCycle(this.key as string, target);\n }\n\n protected _unionSelectedHandler(e: Event): void {\n const button = e.target as RadioElement;\n if (!button.checked) {\n return;\n }\n const value = button.value as string;\n const { association } = button.dataset;\n if (!association || !value) {\n return;\n }\n selectedUnions.set(association, value);\n this.requestUpdate();\n }\n\n protected override render(): TemplateResult | typeof nothing {\n const { _entity } = this;\n if (!_entity) {\n return nothing;\n }\n const treeClasses = {\n 'drop-active': !!this.associationDropZone && !this._dropAssociationTarget,\n 'tree-view': true,\n }\n return html`\n ${this._headerTemplate(_entity)}\n <div class=\"${classMap(treeClasses)}\" @dragover=\"${this._dragoverHandler}\" @drop=\"${this._dropHandler}\">\n ${this._propertiesTemplate(_entity.properties, _entity.associations)}\n ${this._parentsProperties(_entity.getComputedParents())}\n </div>\n ${this._addButtonTemplate()}\n `;\n }\n\n protected _headerTemplate(entity: DataEntity): TemplateResult {\n const label = entity.info.name || 'Unnamed data entity';\n return html`\n <div class=\"entity-header\">\n <div class=\"label title-large\">${label}</div>\n ${this._descriptionTemplate(entity)}\n </div>\n `;\n }\n\n protected _descriptionTemplate(entity: DataEntity): TemplateResult {\n const { description } = entity.info;\n if (description) {\n return html`\n <div class=\"description\">\n <marked-highlight sanitize .markdown=\"${description}\">\n <div slot=\"markdown-html\" class=\"markdown-body text-selectable\"></div>\n </marked-highlight>\n </div>`;\n }\n return html`\n <div class=\"description\">\n <span class=\"no-description body-medium\">No schema description provided.</span>\n </div>\n `;\n }\n\n protected _propertiesTemplate(properties: DataProperty[], associations: DataAssociation[], readonly?: boolean): TemplateResult {\n if (!properties.length && !associations.length) {\n // don't change the \"div\" to anything else. It's for the CSS to compute borders correctly.\n return html`<div class=\"no-properties\">This entity has no properties or associations.</div>`;\n }\n return html`\n ${properties.map(p => this._propertyTemplate(p, readonly))}\n ${associations.map(a => this._associationTemplate(a, readonly))}\n `;\n }\n\n protected _propertyTemplate(item: DataProperty, readonly=false): TemplateResult {\n const { info, type, key, required, multiple, index, primary } = item;\n const containerClasses = {\n 'property-container': true,\n selected: this.selectedProperty === item.key,\n };\n return html`\n <div class=\"${classMap(containerClasses)}\" data-key=\"${key}\">\n <div class=\"property-border\"></div>\n <div class=\"property-value\">\n <div class=\"property-headline\">\n <div class=\"property-decorator scalar\"><hr></div>\n ${this._paramNameTemplate(item)}\n <span class=\"headline-separator\"></span>\n <div class=\"param-type text-selectable\">${type || 'Any type'}</div>\n ${this._pillTemplate('Required', 'This property is required.', required)}\n ${this._pillTemplate('Multiple', 'Multiple instances of the value are possible.', multiple)}\n ${this._pillTemplate('Index', 'This property is a key which can be indexed.', index)}\n ${this._pillTemplate('Primary', 'This property is the primary key for this entity.', primary, 'primary')}\n </div>\n <div class=\"description-column\"> \n ${this._propertyDescriptionTemplate(info.description)}\n </div>\n <div class=\"details-column\"></div>\n </div>\n ${this._propertyListActions('property', readonly)}\n </div>\n `;\n }\n\n /**\n * A template for the data association list item view.\n * Depending on the number of targets of the association it renders the \"empty target\", single association, or a union association view.\n * \n * @param item The association item to render.\n * @param parent The parent entity of the association.\n * @param readonly Whether to render the view as \"read only\" (no edit controls). We do not show controls for properties inherited from parents.\n */\n protected _associationTemplate(item: DataAssociation, readonly=false): TemplateResult {\n const { targets=[] } = item;\n if (!targets.length) {\n return this._noTargetAssociationTemplate(item, readonly);\n }\n if (targets.length === 1) {\n return this._singleAssociationTemplate(item, readonly);\n }\n return this._unionAssociationTemplate(item, readonly);\n }\n\n /**\n * Renders the template for the an association that has one target. This is a classic association where a property \n * is associated with an object.\n */\n protected _singleAssociationTemplate(item: DataAssociation, readonly=false): TemplateResult {\n const { info, key, required, multiple } = item;\n const containerClasses = {\n 'property-container': true,\n selected: this.selectedProperty === key,\n 'drag-over': this._dropAssociationTarget === key,\n };\n const entity = item.getTargets()[0];\n const recursive = this._isRecursive(item, entity.key) // entity === this._entity || entity === parent;\n let targetLabel: string;\n if (entity) {\n targetLabel = entity.info.renderLabel;\n } else {\n targetLabel = 'Invalid target';\n }\n const list = this._getExpandedKeys();\n const expanded = !recursive && list.includes(key);\n return html`\n <div class=\"${classMap(containerClasses)}\" data-key=\"${key}\" @dragover=\"${this._associationDragOver}\" @dragleave=\"${this._associationDragLeave}\" @drop=\"${this._associationDrop}\">\n <div class=\"property-border\"></div>\n <div class=\"property-value\">\n <div class=\"property-headline\">\n <div class=\"property-decorator object\" tabindex=\"${recursive ? '-1' : '0'}\" data-id=\"${key}\" @click=\"${this._expandHandler}\" @keydown=\"${this._expandKeydownHandler}\">\n <hr>\n ${recursive ? '' : html`<ui-icon icon=\"chevronRight\" class=\"object-toggle-icon ${expanded ? 'opened' : ''}\"></ui-icon>`}\n </div>\n ${this._assocNameTemplate(item)}\n <span class=\"headline-separator\"></span>\n <div class=\"param-type text-selectable\">${multiple ? `Array of ${targetLabel}` : targetLabel}</div>\n ${this._pillTemplate('Recursive shape', 'This association is recursive.', recursive)}\n ${this._pillTemplate('Required', 'This property is required.', required)}\n ${this._pillTemplate('Multiple', 'Multiple instances of the value are possible.', multiple)}\n </div>\n <div class=\"description-column\"> \n ${this._propertyDescriptionTemplate(info.description)}\n </div>\n <div class=\"details-column\"></div>\n </div>\n ${this._propertyListActions('association', readonly)}\n </div>\n ${expanded ? html`\n <div class=\"shape-children\">\n <div class=\"property-border\"></div>\n ${this._associationPropertiesTemplate(item)}\n </div>\n ` : ''}\n `;\n }\n\n /**\n * Renders the template for the an association that has multiple targets. This association represents\n * an union of shapes. This means the property can be any, one of, or either of the union shapes.\n */\n protected _unionAssociationTemplate(item: DataAssociation, readonly=false): TemplateResult {\n const { info, key, required, multiple } = item;\n const containerClasses = {\n 'property-container': true,\n selected: this.selectedProperty === key,\n 'drag-over': this._dropAssociationTarget === key,\n };\n const entities = item.getTargets();\n const adapted = item.readAdapted();\n // The `anyOf` and `oneOf` renders the same as this is a selection of one of the schemas\n // The `allOf` renders properties for all shapes in the union.\n // The not can potentially be a scalar shape and we don't have a concept of that in this tool so probably we gonna skip that.\n let type: UnionType = 'anyOf';\n if (adapted) {\n if (adapted.schema && adapted.schema.unionType) {\n type = adapted.schema.unionType;\n }\n }\n let unionLabel = '';\n if (!entities.length) {\n // this will happen when all targets were removed from the namespace.\n unionLabel = 'invalid targets';\n } else if (type === 'anyOf') {\n const names = entities.map(i => i.info.renderLabel).join(' or ');\n unionLabel = `any of ${names}`;\n } else if (type === 'oneOf') {\n const names = entities.map(i => i.info.renderLabel).join(' or ');\n unionLabel = `one of ${names}`;\n } else {\n const names = entities.map(i => i.info.renderLabel).join(' and ');\n unionLabel = `all of ${names}`;\n }\n if (multiple) {\n unionLabel = `list of ${unionLabel}`;\n }\n const list = this._getExpandedKeys();\n const expanded = list.includes(key);\n return html`\n <div class=\"${classMap(containerClasses)}\" data-key=\"${key}\">\n <div class=\"property-border\"></div>\n <div class=\"property-value\">\n <div class=\"property-headline\">\n <div class=\"property-decorator object\" tabindex=\"0\" data-id=\"${key}\" @click=\"${this._expandHandler}\" @keydown=\"${this._expandKeydownHandler}\">\n <hr>\n <ui-icon icon=\"chevronRight\" class=\"object-toggle-icon ${expanded ? 'opened' : ''}\"></ui-icon>\n </div>\n ${this._assocNameTemplate(item)}\n <span class=\"headline-separator\"></span>\n <div class=\"param-type text-selectable\">${unionLabel}</div>\n ${this._pillTemplate('Required', 'This association is required.', required)}\n ${this._pillTemplate('Multiple', 'Multiple instances of the value are possible.', multiple)}\n ${this._pillTemplate('Union', 'This association is an union.', true)}\n </div>\n <div class=\"description-column\">\n ${this._propertyDescriptionTemplate(info.description)}\n </div>\n <div class=\"details-column\"></div>\n </div>\n ${this._propertyListActions('association', readonly)}\n </div>\n ${expanded ? html`\n <div class=\"shape-children\">\n <div class=\"property-border\"></div>\n ${this._unionPropertiesTemplate(item, type)}\n </div>\n ` : ''}\n `;\n }\n\n /**\n * Renders the template for an association that has no target set.\n */\n protected _noTargetAssociationTemplate(item: DataAssociation, readonly=false): TemplateResult {\n const { info, key, required, multiple } = item;\n const containerClasses = {\n 'property-container': true,\n selected: this.selectedProperty === key,\n 'drag-over': this._dropAssociationTarget === key,\n };\n return html`\n <div class=\"${classMap(containerClasses)}\" data-key=\"${key}\">\n <div class=\"property-border\"></div>\n <div class=\"property-value\">\n <div class=\"property-headline\">\n <div class=\"property-decorator object\">\n <hr>\n </div>\n ${this._assocNameTemplate(item)}\n <span class=\"headline-separator\"></span>\n ${this._pillTemplate('No target', 'This association has no target.', true)}\n ${this._pillTemplate('Required', 'This property is required.', required)}\n ${this._pillTemplate('Multiple', 'Multiple instances of the value are possible.', multiple)}\n </div>\n <div class=\"description-column\">\n ${this._propertyDescriptionTemplate(info.description)}\n </div>\n <div class=\"details-column\"></div>\n </div>\n ${this._propertyListActions('association', readonly)}\n </div>\n `;\n }\n\n protected _associationPropertiesTemplate(item: DataAssociation): TemplateResult {\n const entities = item.getTargets();\n if (!entities.length) {\n // don't change the \"div\" to anything else. It's for the CSS to compute borders correctly.\n return html`<div class=\"no-properties\">Invalid entry. The target entity does not exist.</div>`;\n }\n const [entity] = entities;\n return html`\n <div class=\"tree-view\">\n ${this._propertiesTemplate(entity.properties, entity.associations, true)}\n </div>\n `;\n }\n\n protected _unionPropertiesTemplate(item: DataAssociation, type: UnionType): TemplateResult {\n const entities = item.getTargets();\n if (!entities.length) {\n // don't change the \"div\" to anything else. It's for the CSS to compute borders correctly.\n return html`<div class=\"no-properties\">Invalid entry. The target entity does not exist.</div>`;\n }\n if (type === 'allOf') {\n let allProperties: DataProperty[] = [];\n let allAssociations: DataAssociation[] = [];\n entities.forEach((entity) => {\n const { associations, properties } = entity;\n allProperties = allProperties.concat(properties);\n allAssociations = allAssociations.concat(associations);\n });\n return html`\n <div class=\"tree-view\">\n ${this._unionSelector(item, type, entities)}\n ${this._propertiesTemplate(allProperties, allAssociations, true)}\n </div>`;\n }\n\n let selected = selectedUnions.get(item.key);\n if (!selected) {\n selected = entities[0].key;\n }\n const entity = entities.find(i => i.key === selected);\n if (!entity) {\n return html`\n <div class=\"tree-view\">\n ${this._unionSelector(item, type, entities, selected)}\n <p class=\"no-info\">Invalid selection. Entity not found.</p>\n </div>\n `;\n }\n return html`\n <div class=\"tree-view\">\n ${this._unionSelector(item, type, entities, selected)}\n ${this._propertiesTemplate(entity.properties, entity.associations, true)}\n </div>\n `;\n }\n\n /**\n * Depending on the union type, it renders the union type label and a selector of the union member.\n * \n * This template is intended to use when multiple targets in association were detected.\n * \n * @param item The association item\n * @param type The read from the adapted entity association type.\n * @param entities The list of association targets.\n * @param selected The key of the currently selected association target\n * @returns The template for the union selection in the list of properties.\n */\n protected _unionSelector(item: DataAssociation, type: UnionType, entities: DataEntity[], selected?: string): TemplateResult {\n let label: string;\n if (type === 'anyOf') {\n label = 'Any (one or more) of the following schemas';\n } else if (type === 'oneOf') {\n label = 'One of the following schemas';\n } else if (type === 'allOf') {\n label = 'All properties of union schemas';\n } else {\n label = 'Not matching the schema';\n }\n const renderSelection = ['anyOf', 'oneOf'].includes(type);\n return html`\n <div class=\"union-options\">\n <span class=\"label-large\">${label}</span>\n ${renderSelection ? html`\n ${entities.map((entity) => html`\n <label class=\"label-large\">\n <ui-radio\n class=\"union-toggle\" \n name=\"unionFor${item.key}\"\n data-association=\"${item.key}\"\n value=\"${entity.key}\"\n .checked=\"${selected === entity.key}\" \n @change=\"${this._unionSelectedHandler}\"\n ></ui-radio>\n ${entity.info.renderLabel}\n </label>`)}\n ` : nothing}\n </div>\n `;\n }\n\n protected _propertyDescriptionTemplate(description?: string): TemplateResult {\n return html`\n <div class=\"description\">\n <marked-highlight sanitize .markdown=\"${description || 'No description'}\">\n <div slot=\"markdown-html\" class=\"markdown-body text-selectable\"></div>\n </marked-highlight>\n </div>\n `;\n }\n\n /**\n * Adds the delete and edit buttons to the tree item.\n * This renders nothing when the property is readonly or the element is not `editable`.\n * \n * @param readonly Indicates the property is a readonly mode (e.g. belongs to an external entity.)\n */\n protected _propertyListActions(type: 'property' | 'association', readonly?: boolean): TemplateResult | typeof nothing {\n if (readonly || !this.editable) {\n return nothing;\n }\n const removeTitle = type === 'property' ? 'Remove this property' : 'Remove this association';\n const removeLabel = type === 'property' ? 'Remove property' : 'Remove association';\n const editTitle = type === 'property' ? 'Edit this property' : 'Edit this association';\n const editLabel = type === 'property' ? 'Edit property' : 'Edit association';\n return html`\n <div class=\"property-actions\">\n <ui-icon-button data-type=\"${type}\" aria-label=\"${removeLabel}\" title=\"${removeTitle}\" @click=\"${this._removeHandler}\">\n <ui-icon icon=\"deleteOutline\" role=\"presentation\"></ui-icon>\n </ui-icon-button>\n <ui-icon-button data-type=\"${type}\" aria-label=\"${editLabel}\" title=\"${editTitle}\" @click=\"${this._editHandler}\">\n <ui-icon icon=\"edit\" role=\"presentation\"></ui-icon>\n </ui-icon-button>\n </div>\n `;\n }\n\n /**\n * A template for the display name of a property.\n * @param item The property to render the name filed for\n * @returns The template for the property name. \n */\n protected _paramNameTemplate(item: DataProperty): TemplateResult {\n const { info, required=false, deprecated=false } = item;\n const paramName = !info.displayName ? '' : info.name;\n const classes = {\n 'param-name': true,\n required,\n deprecated,\n };\n return html`\n <div class=\"${classMap(classes)}\">\n <span class=\"param-label text-selectable\">${info.renderLabel}</span>\n </div>\n ${paramName ? html`<span class=\"param-name-secondary text-selectable\" title=\"Schema property name\">${paramName}</span>` : ''}\n `;\n }\n\n /**\n * A template for the display name of an association.\n * @param item The property to render the name filed for\n * @returns The template for the property name. \n */\n protected _assocNameTemplate(item: DataAssociation): TemplateResult {\n const { info, required=false } = item;\n const paramName = !info.displayName ? '' : info.name;\n const classes = {\n 'param-name': true,\n required,\n };\n return html`\n <div class=\"${classMap(classes)}\">\n <span class=\"param-label text-selectable\">${info.renderLabel}</span>\n </div>\n ${paramName ? html`<span class=\"param-name-secondary text-selectable\" title=\"Schema property name\">${paramName}</span>` : ''}\n `;\n }\n\n protected _pillTemplate(label: string, title: string, test: unknown, className?: string): TemplateResult | string {\n if (!test) {\n return '';\n }\n const classes: ClassInfo = {\n pill: true,\n 'param-pill': true,\n [className || '']: !!className,\n };\n return html`<span class=\"${classMap(classes)}\" title=\"${title}\">${label}</span>`;\n }\n\n /**\n * Renders the template for the parents of the entity.\n * \n * @param parents The parents of the entity. This is an unordered list.\n */\n protected _parentsProperties(parents: DataEntity[]): TemplateResult[] | typeof nothing {\n if (!parents.length) {\n return nothing;\n }\n // don't change the \"div\" to anything else. It's for the CSS to compute borders correctly.\n return parents.map(p => html`\n <div class=\"inheritance-label text-selectable\">Properties inherited from <b>${p.info.name}</b>.</div>\n ${this._propertiesTemplate(p.properties, p.associations, true)}\n `);\n }\n\n protected _addButtonTemplate(): TemplateResult | typeof nothing {\n if (!this.editable) {\n return nothing;\n }\n return html`\n <div class=\"add-property-section\">\n <ui-button type=\"outlined\" @click=\"${this._addPropertyHandler}\">Add property</ui-button>\n </div>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"DataSchemaDocument.js","sourceRoot":"","sources":["../../../src/elements/schema-design/DataSchemaDocument.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAa,IAAI,EAAkB,OAAO,EAAkB,MAAM,KAAK,CAAC;AACpF,OAAO,EAA4D,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC7H,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAa,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAC5D,OAAO,UAAU,MAAM,sCAAsC,CAAC;AAE9D,OAAO,8BAA8B,CAAC;AACtC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,4BAA4B,CAAC;AACpC,OAAO,6BAA6B,CAAC;AAErC;;;;GAIG;AACH,MAAM,aAAa,GAAG,IAAI,OAAO,EAAwB,CAAC;AAE1D,MAAM,cAAc,GAAG,IAAI,GAAG,EAAkB,CAAC;AAIjD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU;IACxD,MAAM,KA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ACO,kBAAkB,CAAC,OAAqB;QAChD,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACnB,OAAO,OAAO,CAAC;SAChB;QACD,0FAA0F;QAC1F,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAA;kFACkD,CAAC,CAAC,IAAI,CAAC,IAAI;MACvF,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,YAAY,EAAE,IAAI,CAAC;KAC7D,CAAC,CAAC;IACL,CAAC;IAES,kBAAkB;QAC1B,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,OAAO,OAAO,CAAC;SAChB;QACD,OAAO,IAAI,CAAA;;2CAE4B,IAAI,CAAC,mBAAmB;;KAE9D,CAAC;IACJ,CAAC;CACF;AA5yB6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAsB;AAMN;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAc;AAK/C;IAAR,KAAK,EAAE;mDAAgC;AAMG;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4DAA2B;AAOzB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+DAA+B;AAQ9B;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAAoB;AAMtD;IAAR,KAAK,EAAE;kEAA2C","sourcesContent":["import { css, CSSResult, html, TemplateResult, nothing, PropertyValues } from \"lit\";\nimport { DataAssociation, DataEntity, DataNamespace, DataProperty, DataEntityKind } from \"@api-client/core/build/browser.js\";\nimport { property, state } from \"lit/decorators.js\";\nimport { ClassInfo, classMap } from \"lit/directives/class-map.js\";\nimport ApiElement from \"../ApiElement.js\";\nimport theme from '../theme.js';\nimport schemaCommon from './schemaCommon.js';\nimport EditorCommon from './CommonStyles.js';\nimport MarkdownStyles from '../highlight/MarkdownStyles.js';\nimport typography from \"../../styles/m3/typography.module.js\";\nimport type RadioElement from \"../../ui/input/RadioElement.js\";\nimport '../../define/ui/ui-button.js';\nimport '../../define/ui/ui-icon-button.js';\nimport '../../define/ui/ui-icon.js';\nimport '../../define/ui/ui-radio.js';\n\n/**\n * We keep the list of expanded attributes in a weak map\n * so the state is kept as long as the namespace is loaded and the DataEntity exists.\n * WeakMap allows to GC the DataEntity when it is removed from the namespace (and also release the values).\n */\nconst expandedState = new WeakMap<DataEntity, string[]>();\n\nconst selectedUnions = new Map<string, string>();\n\ntype UnionType = \"anyOf\" | \"allOf\" | \"oneOf\" | \"not\";\n\n/**\n * An element that renders a documentation view for a data entity.\n * \n * @fires edit - When a property is selected for editing. This is only possible when the `editable` property is set.\n * @fires change - When the entity has changed. This is only possible when the `editable` property is set.\n */\nexport default class DataSchemaDocument extends ApiElement {\n static override get styles(): CSSResult[] {\n return [\n theme,\n schemaCommon,\n MarkdownStyles,\n EditorCommon,\n typography,\n css`\n :host {\n display: block;\n }\n\n .entity-header {\n margin-bottom: 20px;\n }\n\n .entity-header .label {\n margin-bottom: 1em;\n }\n\n .no-info {\n margin: 12px 20px;\n }\n\n .add-property-section {\n margin-top: 20px;\n }\n\n .property-container.selected {\n background: var(--list-active-background);\n }\n\n .tree-view.drop-active {\n background: var(--association-drop-background, #e3f2fd);\n }\n\n .property-container.drag-over {\n background: var(--association-drop-background, #e3f2fd);\n }\n\n .drop-zone {\n position: absolute;\n inset: 0;\n height: unset;\n margin: 0;\n padding: 0;\n background: rgba(255,255,255,0.92);\n }\n `,\n ];\n }\n\n /**\n * The read data namespace.\n */\n @property({ type: Object }) root?: DataNamespace;\n\n /**\n * The entity key to render the schema documentation for\n * @attribute\n */\n @property({ type: String, reflect: true }) key?: string;\n\n /**\n * The read data entity when the \"selected\" change.\n */\n @state() protected _entity?: DataEntity;\n\n /**\n * The key of the property being highlighted.\n * @attribute\n */\n @property({ type: String, reflect: true }) selectedProperty?: string;\n\n /**\n * When set it activates the drop zone in the properties list to drop an entity as an association.\n * This has no effect when `editable` is not set.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) associationDropZone?: boolean;\n\n /**\n * Whether to render the view in the edit-ready model.\n * This mode allows to add new property, create an association, or remove those.\n * It does not allow to manipulate properties of association or properties.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) editable?: boolean;\n\n /**\n * When dragging an entity over an existing association this is the key\n * of the association hovered.\n */\n @state() protected _dropAssociationTarget?: string;\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n if (cp.has('key')) {\n this.computeEntity();\n }\n }\n\n /**\n * Computes the view value for the property.\n * This should be called before the update is complete so this won't trigger another update.\n */\n protected computeEntity(): void {\n const { root, key } = this;\n if (!root || !key) {\n this._entity = undefined;\n return;\n }\n const entity = root.definitions.entities.find(i => i.key === key);\n this._entity = entity;\n }\n\n /**\n * Adds an entity with the given key as an association to this entity.\n * This does nothing when the view is not in the `editable` model.\n * \n * Note, we allow to create an association to self. Also note, an entity can have multiple associations to the same target.\n * \n * @param foreignKey The key of the target entity to add.\n * @param parentAssociation When set, it adds another target to an existing association.\n */\n addAssociation(foreignKey: string, parentAssociation?: string): void {\n const { _entity, editable } = this;\n if (!editable || !foreignKey || !_entity) {\n return;\n }\n if (parentAssociation) {\n const parent = _entity.associations.find(i => i.key === parentAssociation);\n if (!parent) {\n return;\n }\n parent.addTarget(foreignKey);\n } else {\n const created = _entity.addTargetAssociation(foreignKey);\n this.dispatchEvent(new CustomEvent('edit', {\n detail: {\n type: 'association',\n key: created.key,\n }\n }));\n }\n this.notifyChange();\n }\n\n /**\n * Removes an association from the entity.\n * This does nothing when the view is not in the `editable` model.\n * \n * @param key The key of the association to remove.\n */\n removeAssociation(key: string): void {\n const { _entity, editable } = this;\n if (!editable || !key || !_entity) {\n return;\n }\n _entity.removeAssociation(key);\n this.notifyChange();\n this.requestUpdate();\n }\n\n addProperty(name?: string): void {\n const { _entity, editable } = this;\n if (!_entity || !editable) {\n return;\n }\n const created = _entity.addNamedProperty(name || 'New property');\n this.selectedProperty = created.key;\n this.notifyChange();\n this.requestUpdate();\n this.dispatchEvent(new CustomEvent('edit', {\n detail: {\n type: 'property',\n key: created.key,\n }\n }));\n }\n\n removeProperty(key: string): void {\n const { _entity, editable } = this;\n if (!key || !_entity || !editable) {\n return;\n }\n _entity.removeProperty(key);\n if (this.selectedProperty === key) {\n this.selectedProperty = undefined;\n }\n this.notifyChange();\n this.requestUpdate();\n }\n\n protected _addPropertyHandler(): void {\n this.addProperty();\n }\n\n protected _findParentKeyedElement(node: HTMLElement): HTMLElement | null {\n let target: HTMLElement | null = node;\n while (target) {\n if (target.nodeType !== Node.ELEMENT_NODE || !target.dataset) {\n target = target.parentElement;\n continue;\n }\n if (target.dataset.key) {\n return target;\n }\n target = target.parentElement;\n }\n return null;\n }\n\n protected _removeHandler(e: Event): void {\n const button = e.currentTarget as HTMLElement;\n const { type } = button.dataset;\n if (!type) {\n return;\n }\n const node = this._findParentKeyedElement(e.target as HTMLElement);\n if (node) {\n if (type === 'property') {\n this.removeProperty(node.dataset.key as string);\n } else if (type === 'association') {\n this.removeAssociation(node.dataset.key as string);\n }\n }\n }\n\n protected _editHandler(e: Event): void {\n const button = e.currentTarget as HTMLElement;\n const { type } = button.dataset;\n if (!type) {\n return;\n }\n const node = this._findParentKeyedElement(e.target as HTMLElement);\n if (node) {\n this.dispatchEvent(new CustomEvent('edit', {\n detail: {\n type,\n key: node.dataset.key as string,\n }\n }));\n }\n }\n\n protected _associationDragOver(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n const dt = dataTransfer;\n if (!dt.types.includes(DataEntityKind.toLocaleLowerCase())) {\n return;\n }\n const node = e.currentTarget as HTMLElement;\n const { key } = node.dataset;\n if (key) {\n e.preventDefault();\n dt.effectAllowed = 'copy';\n dt.dropEffect = 'copy';\n this._dropAssociationTarget = key;\n }\n }\n\n protected _associationDragLeave(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n const dt = dataTransfer;\n if (!dt.types.includes(DataEntityKind.toLocaleLowerCase())) {\n return;\n }\n this._dropAssociationTarget = undefined;\n }\n\n protected _associationDrop(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n const dt = dataTransfer;\n if (!dt.types.includes(DataEntityKind.toLocaleLowerCase())) {\n return;\n }\n const { _dropAssociationTarget } = this;\n if (!_dropAssociationTarget) {\n return;\n }\n e.preventDefault();\n this._dropAssociationTarget = undefined; \n const key = dataTransfer.getData('text/key');\n this.addAssociation(key, _dropAssociationTarget);\n }\n\n protected _dragoverHandler(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n if (e.defaultPrevented) {\n return;\n }\n e.preventDefault();\n dataTransfer.dropEffect = \"copy\";\n dataTransfer.effectAllowed = \"copy\";\n }\n\n protected _dropHandler(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n if (e.defaultPrevented) {\n return;\n }\n e.preventDefault();\n const key = dataTransfer.getData('text/key');\n this.addAssociation(key);\n }\n\n /**\n * @returns the list of keys of properties that are expanded (children are rendered).\n */\n protected _getExpandedKeys(): string[] {\n const { _entity } = this;\n if (!_entity) {\n return [];\n }\n if (!expandedState.has(_entity)) {\n expandedState.set(_entity, []);\n }\n return expandedState.get(_entity) as string[];\n }\n\n protected _expandHandler(e: Event): void {\n const button = e.currentTarget as HTMLElement;\n const { id } = button.dataset;\n this._toggleExpandedProperty(id as string);\n }\n\n protected _expandKeydownHandler(e: KeyboardEvent): void {\n if (e.code !== 'Space') {\n return;\n }\n e.preventDefault();\n const button = e.currentTarget as HTMLElement;\n const { id } = button.dataset;\n this._toggleExpandedProperty(id as string);\n }\n\n /**\n * Toggles an \"expanded\" state for a property children.\n * \n * @param id Parent property id that has children to toggle visibility of.\n */\n protected _toggleExpandedProperty(id: string): void {\n const list = this._getExpandedKeys();\n const index = list.indexOf(id);\n if (index === -1) {\n list.push(id);\n } else {\n list.splice(index, 1);\n }\n this.requestUpdate();\n }\n\n protected _isRecursive(association: DataAssociation, target: string): boolean {\n const entity = association.getParent();\n return entity.hasClosedCycle(this.key as string, target);\n }\n\n protected _unionSelectedHandler(e: Event): void {\n const button = e.target as RadioElement;\n if (!button.checked) {\n return;\n }\n const value = button.value as string;\n const { association } = button.dataset;\n if (!association || !value) {\n return;\n }\n selectedUnions.set(association, value);\n this.requestUpdate();\n }\n\n protected override render(): TemplateResult | typeof nothing {\n const { _entity } = this;\n if (!_entity) {\n return nothing;\n }\n const treeClasses = {\n 'drop-active': !!this.associationDropZone && !this._dropAssociationTarget,\n 'tree-view': true,\n }\n return html`\n ${this._headerTemplate(_entity)}\n <div class=\"${classMap(treeClasses)}\" @dragover=\"${this._dragoverHandler}\" @drop=\"${this._dropHandler}\">\n ${this._propertiesTemplate(_entity.properties, _entity.associations)}\n ${this._parentsProperties(_entity.getComputedParents())}\n </div>\n ${this._addButtonTemplate()}\n `;\n }\n\n protected _headerTemplate(entity: DataEntity): TemplateResult {\n const label = entity.info.name || 'Unnamed data entity';\n return html`\n <div class=\"entity-header\">\n <div class=\"label title-large\">${label}</div>\n ${this._descriptionTemplate(entity)}\n </div>\n `;\n }\n\n protected _descriptionTemplate(entity: DataEntity): TemplateResult {\n const { description } = entity.info;\n if (description) {\n return html`\n <div class=\"description\">\n <marked-highlight sanitize .markdown=\"${description}\">\n <div slot=\"markdown-html\" class=\"markdown-body text-selectable\"></div>\n </marked-highlight>\n </div>`;\n }\n return html`\n <div class=\"description\">\n <span class=\"no-description body-medium\">No schema description provided.</span>\n </div>\n `;\n }\n\n protected _propertiesTemplate(properties: DataProperty[], associations: DataAssociation[], readonly?: boolean): TemplateResult {\n if (!properties.length && !associations.length) {\n // don't change the \"div\" to anything else. It's for the CSS to compute borders correctly.\n return html`<div class=\"no-properties\">This entity has no properties or associations.</div>`;\n }\n return html`\n ${properties.map(p => this._propertyTemplate(p, readonly))}\n ${associations.map(a => this._associationTemplate(a, readonly))}\n `;\n }\n\n protected _propertyTemplate(item: DataProperty, readonly=false): TemplateResult {\n const { info, type, key, required, multiple, index, primary } = item;\n const containerClasses = {\n 'property-container': true,\n selected: this.selectedProperty === item.key,\n };\n return html`\n <div class=\"${classMap(containerClasses)}\" data-key=\"${key}\">\n <div class=\"property-border\"></div>\n <div class=\"property-value\">\n <div class=\"property-headline\">\n <div class=\"property-decorator scalar\"><hr></div>\n ${this._paramNameTemplate(item)}\n <span class=\"headline-separator\"></span>\n <div class=\"param-type text-selectable\">${type || 'Any type'}</div>\n ${this._pillTemplate('Required', 'This property is required.', required)}\n ${this._pillTemplate('Multiple', 'Multiple instances of the value are possible.', multiple)}\n ${this._pillTemplate('Index', 'This property is a key which can be indexed.', index)}\n ${this._pillTemplate('Primary', 'This property is the primary key for this entity.', primary, 'primary')}\n </div>\n <div class=\"description-column\"> \n ${this._propertyDescriptionTemplate(info.description)}\n </div>\n <div class=\"details-column\"></div>\n </div>\n ${this._propertyListActions('property', readonly)}\n </div>\n `;\n }\n\n /**\n * A template for the data association list item view.\n * Depending on the number of targets of the association it renders the \"empty target\", single association, or a union association view.\n * \n * @param item The association item to render.\n * @param parent The parent entity of the association.\n * @param readonly Whether to render the view as \"read only\" (no edit controls). We do not show controls for properties inherited from parents.\n */\n protected _associationTemplate(item: DataAssociation, readonly=false): TemplateResult {\n const { targets=[] } = item;\n if (!targets.length) {\n return this._noTargetAssociationTemplate(item, readonly);\n }\n if (targets.length === 1) {\n return this._singleAssociationTemplate(item, readonly);\n }\n return this._unionAssociationTemplate(item, readonly);\n }\n\n /**\n * Renders the template for the an association that has one target. This is a classic association where a property \n * is associated with an object.\n */\n protected _singleAssociationTemplate(item: DataAssociation, readonly=false): TemplateResult {\n const { info, key, required, multiple } = item;\n const containerClasses = {\n 'property-container': true,\n selected: this.selectedProperty === key,\n 'drag-over': this._dropAssociationTarget === key,\n };\n const entity = item.getTargets()[0];\n const recursive = this._isRecursive(item, entity.key) // entity === this._entity || entity === parent;\n let targetLabel: string;\n if (entity) {\n targetLabel = entity.info.renderLabel;\n } else {\n targetLabel = 'Invalid target';\n }\n const list = this._getExpandedKeys();\n const expanded = !recursive && list.includes(key);\n return html`\n <div class=\"${classMap(containerClasses)}\" data-key=\"${key}\" @dragover=\"${this._associationDragOver}\" @dragleave=\"${this._associationDragLeave}\" @drop=\"${this._associationDrop}\">\n <div class=\"property-border\"></div>\n <div class=\"property-value\">\n <div class=\"property-headline\">\n <div class=\"property-decorator object\" tabindex=\"${recursive ? '-1' : '0'}\" data-id=\"${key}\" @click=\"${this._expandHandler}\" @keydown=\"${this._expandKeydownHandler}\">\n <hr>\n ${recursive ? '' : html`<ui-icon icon=\"chevronRight\" class=\"object-toggle-icon ${expanded ? 'opened' : ''}\"></ui-icon>`}\n </div>\n ${this._assocNameTemplate(item)}\n <span class=\"headline-separator\"></span>\n <div class=\"param-type text-selectable\">${multiple ? `Array of ${targetLabel}` : targetLabel}</div>\n ${this._pillTemplate('Recursive shape', 'This association is recursive.', recursive)}\n ${this._pillTemplate('Required', 'This property is required.', required)}\n ${this._pillTemplate('Multiple', 'Multiple instances of the value are possible.', multiple)}\n </div>\n <div class=\"description-column\"> \n ${this._propertyDescriptionTemplate(info.description)}\n </div>\n <div class=\"details-column\"></div>\n </div>\n ${this._propertyListActions('association', readonly)}\n </div>\n ${expanded ? html`\n <div class=\"shape-children\">\n <div class=\"property-border\"></div>\n ${this._associationPropertiesTemplate(item)}\n </div>\n ` : ''}\n `;\n }\n\n /**\n * Renders the template for the an association that has multiple targets. This association represents\n * an union of shapes. This means the property can be any, one of, or either of the union shapes.\n */\n protected _unionAssociationTemplate(item: DataAssociation, readonly=false): TemplateResult {\n const { info, key, required, multiple } = item;\n const containerClasses = {\n 'property-container': true,\n selected: this.selectedProperty === key,\n 'drag-over': this._dropAssociationTarget === key,\n };\n const entities = item.getTargets();\n const adapted = item.readAdapted();\n // The `anyOf` and `oneOf` renders the same as this is a selection of one of the schemas\n // The `allOf` renders properties for all shapes in the union.\n // The not can potentially be a scalar shape and we don't have a concept of that in this tool so probably we gonna skip that.\n let type: UnionType = 'anyOf';\n if (adapted) {\n if (adapted.schema && adapted.schema.unionType) {\n type = adapted.schema.unionType;\n }\n }\n let unionLabel = '';\n if (!entities.length) {\n // this will happen when all targets were removed from the namespace.\n unionLabel = 'invalid targets';\n } else if (type === 'anyOf') {\n const names = entities.map(i => i.info.renderLabel).join(' or ');\n unionLabel = `any of ${names}`;\n } else if (type === 'oneOf') {\n const names = entities.map(i => i.info.renderLabel).join(' or ');\n unionLabel = `one of ${names}`;\n } else {\n const names = entities.map(i => i.info.renderLabel).join(' and ');\n unionLabel = `all of ${names}`;\n }\n if (multiple) {\n unionLabel = `list of ${unionLabel}`;\n }\n const list = this._getExpandedKeys();\n const expanded = list.includes(key);\n return html`\n <div class=\"${classMap(containerClasses)}\" data-key=\"${key}\">\n <div class=\"property-border\"></div>\n <div class=\"property-value\">\n <div class=\"property-headline\">\n <div class=\"property-decorator object\" tabindex=\"0\" data-id=\"${key}\" @click=\"${this._expandHandler}\" @keydown=\"${this._expandKeydownHandler}\">\n <hr>\n <ui-icon icon=\"chevronRight\" class=\"object-toggle-icon ${expanded ? 'opened' : ''}\"></ui-icon>\n </div>\n ${this._assocNameTemplate(item)}\n <span class=\"headline-separator\"></span>\n <div class=\"param-type text-selectable\">${unionLabel}</div>\n ${this._pillTemplate('Required', 'This association is required.', required)}\n ${this._pillTemplate('Multiple', 'Multiple instances of the value are possible.', multiple)}\n ${this._pillTemplate('Union', 'This association is an union.', true)}\n </div>\n <div class=\"description-column\">\n ${this._propertyDescriptionTemplate(info.description)}\n </div>\n <div class=\"details-column\"></div>\n </div>\n ${this._propertyListActions('association', readonly)}\n </div>\n ${expanded ? html`\n <div class=\"shape-children\">\n <div class=\"property-border\"></div>\n ${this._unionPropertiesTemplate(item, type)}\n </div>\n ` : ''}\n `;\n }\n\n /**\n * Renders the template for an association that has no target set.\n */\n protected _noTargetAssociationTemplate(item: DataAssociation, readonly=false): TemplateResult {\n const { info, key, required, multiple } = item;\n const containerClasses = {\n 'property-container': true,\n selected: this.selectedProperty === key,\n 'drag-over': this._dropAssociationTarget === key,\n };\n return html`\n <div class=\"${classMap(containerClasses)}\" data-key=\"${key}\">\n <div class=\"property-border\"></div>\n <div class=\"property-value\">\n <div class=\"property-headline\">\n <div class=\"property-decorator object\">\n <hr>\n </div>\n ${this._assocNameTemplate(item)}\n <span class=\"headline-separator\"></span>\n ${this._pillTemplate('No target', 'This association has no target.', true)}\n ${this._pillTemplate('Required', 'This property is required.', required)}\n ${this._pillTemplate('Multiple', 'Multiple instances of the value are possible.', multiple)}\n </div>\n <div class=\"description-column\">\n ${this._propertyDescriptionTemplate(info.description)}\n </div>\n <div class=\"details-column\"></div>\n </div>\n ${this._propertyListActions('association', readonly)}\n </div>\n `;\n }\n\n protected _associationPropertiesTemplate(item: DataAssociation): TemplateResult {\n const entities = item.getTargets();\n if (!entities.length) {\n // don't change the \"div\" to anything else. It's for the CSS to compute borders correctly.\n return html`<div class=\"no-properties\">Invalid entry. The target entity does not exist.</div>`;\n }\n const [entity] = entities;\n return html`\n <div class=\"tree-view\">\n ${this._propertiesTemplate(entity.properties, entity.associations, true)}\n </div>\n `;\n }\n\n protected _unionPropertiesTemplate(item: DataAssociation, type: UnionType): TemplateResult {\n const entities = item.getTargets();\n if (!entities.length) {\n // don't change the \"div\" to anything else. It's for the CSS to compute borders correctly.\n return html`<div class=\"no-properties\">Invalid entry. The target entity does not exist.</div>`;\n }\n if (type === 'allOf') {\n let allProperties: DataProperty[] = [];\n let allAssociations: DataAssociation[] = [];\n entities.forEach((entity) => {\n const { associations, properties } = entity;\n allProperties = allProperties.concat(properties);\n allAssociations = allAssociations.concat(associations);\n });\n return html`\n <div class=\"tree-view\">\n ${this._unionSelector(item, type, entities)}\n ${this._propertiesTemplate(allProperties, allAssociations, true)}\n </div>`;\n }\n\n let selected = selectedUnions.get(item.key);\n if (!selected) {\n selected = entities[0].key;\n }\n const entity = entities.find(i => i.key === selected);\n if (!entity) {\n return html`\n <div class=\"tree-view\">\n ${this._unionSelector(item, type, entities, selected)}\n <p class=\"no-info\">Invalid selection. Entity not found.</p>\n </div>\n `;\n }\n return html`\n <div class=\"tree-view\">\n ${this._unionSelector(item, type, entities, selected)}\n ${this._propertiesTemplate(entity.properties, entity.associations, true)}\n </div>\n `;\n }\n\n /**\n * Depending on the union type, it renders the union type label and a selector of the union member.\n * \n * This template is intended to use when multiple targets in association were detected.\n * \n * @param item The association item\n * @param type The read from the adapted entity association type.\n * @param entities The list of association targets.\n * @param selected The key of the currently selected association target\n * @returns The template for the union selection in the list of properties.\n */\n protected _unionSelector(item: DataAssociation, type: UnionType, entities: DataEntity[], selected?: string): TemplateResult {\n let label: string;\n if (type === 'anyOf') {\n label = 'Any (one or more) of the following schemas';\n } else if (type === 'oneOf') {\n label = 'One of the following schemas';\n } else if (type === 'allOf') {\n label = 'All properties of union schemas';\n } else {\n label = 'Not matching the schema';\n }\n const renderSelection = ['anyOf', 'oneOf'].includes(type);\n return html`\n <div class=\"union-options\">\n <span class=\"label-large\">${label}</span>\n ${renderSelection ? html`\n ${entities.map((entity) => html`\n <label class=\"label-large\">\n <ui-radio\n class=\"union-toggle\" \n name=\"unionFor${item.key}\"\n data-association=\"${item.key}\"\n value=\"${entity.key}\"\n .checked=\"${selected === entity.key}\" \n @change=\"${this._unionSelectedHandler}\"\n ></ui-radio>\n ${entity.info.renderLabel}\n </label>`)}\n ` : nothing}\n </div>\n `;\n }\n\n protected _propertyDescriptionTemplate(description?: string): TemplateResult {\n return html`\n <div class=\"description\">\n <marked-highlight sanitize .markdown=\"${description || 'No description'}\">\n <div slot=\"markdown-html\" class=\"markdown-body text-selectable\"></div>\n </marked-highlight>\n </div>\n `;\n }\n\n /**\n * Adds the delete and edit buttons to the tree item.\n * This renders nothing when the property is readonly or the element is not `editable`.\n * \n * @param readonly Indicates the property is a readonly mode (e.g. belongs to an external entity.)\n */\n protected _propertyListActions(type: 'property' | 'association', readonly?: boolean): TemplateResult | typeof nothing {\n if (readonly || !this.editable) {\n return nothing;\n }\n const removeTitle = type === 'property' ? 'Remove this property' : 'Remove this association';\n const removeLabel = type === 'property' ? 'Remove property' : 'Remove association';\n const editTitle = type === 'property' ? 'Edit this property' : 'Edit this association';\n const editLabel = type === 'property' ? 'Edit property' : 'Edit association';\n return html`\n <div class=\"property-actions\">\n <ui-icon-button data-type=\"${type}\" aria-label=\"${removeLabel}\" title=\"${removeTitle}\" @click=\"${this._removeHandler}\">\n <ui-icon icon=\"deleteOutline\" role=\"presentation\"></ui-icon>\n </ui-icon-button>\n <ui-icon-button data-type=\"${type}\" aria-label=\"${editLabel}\" title=\"${editTitle}\" @click=\"${this._editHandler}\">\n <ui-icon icon=\"edit\" role=\"presentation\"></ui-icon>\n </ui-icon-button>\n </div>\n `;\n }\n\n /**\n * A template for the display name of a property.\n * @param item The property to render the name filed for\n * @returns The template for the property name. \n */\n protected _paramNameTemplate(item: DataProperty): TemplateResult {\n const { info, required=false, deprecated=false } = item;\n const paramName = !info.displayName ? '' : info.name;\n const classes = {\n 'param-name': true,\n required,\n deprecated,\n };\n return html`\n <div class=\"${classMap(classes)}\">\n <span class=\"param-label text-selectable\">${info.renderLabel}</span>\n </div>\n ${paramName ? html`<span class=\"param-name-secondary text-selectable\" title=\"Schema property name\">${paramName}</span>` : ''}\n `;\n }\n\n /**\n * A template for the display name of an association.\n * @param item The property to render the name filed for\n * @returns The template for the property name. \n */\n protected _assocNameTemplate(item: DataAssociation): TemplateResult {\n const { info, required=false } = item;\n const paramName = !info.displayName ? '' : info.name;\n const classes = {\n 'param-name': true,\n required,\n };\n return html`\n <div class=\"${classMap(classes)}\">\n <span class=\"param-label text-selectable\">${info.renderLabel}</span>\n </div>\n ${paramName ? html`<span class=\"param-name-secondary text-selectable\" title=\"Schema property name\">${paramName}</span>` : ''}\n `;\n }\n\n protected _pillTemplate(label: string, title: string, test: unknown, className?: string): TemplateResult | string {\n if (!test) {\n return '';\n }\n const classes: ClassInfo = {\n pill: true,\n 'param-pill': true,\n [className || '']: !!className,\n };\n return html`<span class=\"${classMap(classes)}\" title=\"${title}\">${label}</span>`;\n }\n\n /**\n * Renders the template for the parents of the entity.\n * \n * @param parents The parents of the entity. This is an unordered list.\n */\n protected _parentsProperties(parents: DataEntity[]): TemplateResult[] | typeof nothing {\n if (!parents.length) {\n return nothing;\n }\n // don't change the \"div\" to anything else. It's for the CSS to compute borders correctly.\n return parents.map(p => html`\n <div class=\"inheritance-label text-selectable\">Properties inherited from <b>${p.info.name}</b>.</div>\n ${this._propertiesTemplate(p.properties, p.associations, true)}\n `);\n }\n\n protected _addButtonTemplate(): TemplateResult | typeof nothing {\n if (!this.editable) {\n return nothing;\n }\n return html`\n <div class=\"add-property-section\">\n <ui-button type=\"outlined\" @click=\"${this._addPropertyHandler}\">Add property</ui-button>\n </div>\n `;\n }\n}\n"]}
@@ -38,7 +38,6 @@ export default class EntityFormElement extends ApiElement {
38
38
  * @param parentKey The key of the parent to add.
39
39
  */
40
40
  addParent(parentKey: string): void;
41
- protected _notifyChanged(): void;
42
41
  /**
43
42
  * Computes the view value for the property.
44
43
  * This should be called before the update is complete so this won't trigger another update.
@@ -1 +1 @@
1
- {"version":3,"file":"EntityFormElement.d.ts","sourceRoot":"","sources":["../../../src/elements/schema-design/EntityFormElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAQ,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAG3E,OAAO,EAAE,UAAU,EAAE,aAAa,EAAc,MAAM,mCAAmC,CAAC;AAC1F,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAM1C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AACxC,OAAO,+BAA+B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9C,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,SAAS,GAAG,IAAI;IAgB1C,SAAS,CAAC,oBAAoB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;IAO9C;;;OAGG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;cAcZ,MAAM,IAAI,cAAc;IAyB3C,SAAS,CAAC,sBAAsB,CAAC,MAAM,EAAE,UAAU,GAAG,cAAc;IAQpE,SAAS,CAAC,uBAAuB,IAAI,cAAc;IAUnD,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,cAAc;IAO9D,SAAS,CAAC,yBAAyB,IAAI,cAAc;IAMrD,SAAS,CAAC,oBAAoB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,cAAc;IAQrE,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,UAAU,GAAG,cAAc;CAehE"}
@@ -73,10 +73,7 @@ export default class EntityFormElement extends ApiElement {
73
73
  if (!_entity.parents.includes(parentKey)) {
74
74
  _entity.parents.push(parentKey);
75
75
  }
76
- this._notifyChanged();
77
- }
78
- _notifyChanged() {
79
- this.dispatchEvent(new Event('change'));
76
+ this.notifyChange();
80
77
  }
81
78
  /**
82
79
  * Computes the view value for the property.
@@ -104,7 +101,7 @@ export default class EntityFormElement extends ApiElement {
104
101
  return;
105
102
  }
106
103
  _entity.info[name] = value;
107
- this._notifyChanged();
104
+ this.notifyChange();
108
105
  if (name === 'name' || name === 'displayName') {
109
106
  this.dispatchEvent(new Event('namechange'));
110
107
  }
@@ -121,7 +118,7 @@ export default class EntityFormElement extends ApiElement {
121
118
  return;
122
119
  }
123
120
  _entity[name] = checked;
124
- this._notifyChanged();
121
+ this.notifyChange();
125
122
  this.requestUpdate();
126
123
  }
127
124
  _dragoverHandler(e) {
@@ -167,7 +164,7 @@ export default class EntityFormElement extends ApiElement {
167
164
  return;
168
165
  }
169
166
  _entity.parents.splice(index, 1);
170
- this._notifyChanged();
167
+ this.notifyChange();
171
168
  this.requestUpdate();
172
169
  }
173
170
  render() {
@@ -1 +1 @@
1
- {"version":3,"file":"EntityFormElement.js","sourceRoot":"","sources":["../../../src/elements/schema-design/EntityFormElement.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAa,IAAI,EAAkC,MAAM,KAAK,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAA6B,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC1F,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,UAAU,MAAM,sCAAsC,CAAC;AAG9D,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AACxC,OAAO,+BAA+B,CAAC;AACvC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,4BAA4B,CAAC;AAEpC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,UAAU;IACvD,MAAM,KAAc,MAAM;QACxB,OAAO;YACL,KAAK;YACL,YAAY;YACZ,UAAU;YACV,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BF;SACF,CAAA;IACH,CAAC;IAwBkB,UAAU,CAAC,EAAwB;QACpD,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;YACjB,IAAI,CAAC,cAAc,EAAE,CAAC;SACvB;IACH,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,SAAiB;QACzB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,SAAS,IAAI,SAAS,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE;YAC/C,OAAO;SACR;QACD,IAAI,CAAC,OAAO,CA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A2C,MAAM,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;;8FAED,IAAI,CAAC,GAAG,aAAa,IAAI,CAAC,oBAAoB;;;;KAIvI,CAAC;IACJ,CAAC;CACF;AA9N4C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAc;AAK5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAsB;AAMpB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yDAA0B;AAK7C;IAAR,KAAK,EAAE;kDAAgC","sourcesContent":["import { css, CSSResult, html, PropertyValues, TemplateResult } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { live } from \"lit/directives/live.js\";\nimport { DataEntity, DataNamespace, EventUtils } from \"@api-client/core/build/browser.js\";\nimport ApiElement from \"../ApiElement.js\";\nimport EditorCommon from './CommonStyles.js';\nimport theme from '../theme.js';\nimport typography from \"../../styles/m3/typography.module.js\";\nimport Input from \"../../ui/input/Input.js\";\nimport CheckboxElement from \"../../ui/input/CheckboxElement.js\";\nimport '../../define/ui/ui-text-field.js';\nimport '../../define/ui/ui-checkbox.js';\nimport '../../define/ui/ui-divider.js';\nimport '../../define/ui/ui-icon-button.js';\nimport '../../define/ui/ui-icon.js';\n\n/**\n * An editor for a data entity.\n * \n * @fires change - When the entity has changed.\n * @fires namechange - When a name of the entity has changed.\n */\nexport default class EntityFormElement extends ApiElement {\n static override get styles(): CSSResult[] {\n return [\n theme,\n EditorCommon,\n typography,\n css`\n :host {\n display: block;\n }\n\n .no-info {\n margin: 12px 20px;\n }\n\n .parents-list {\n margin: 0;\n padding: 0;\n }\n\n .parent-item {\n list-style: none;\n height: var(--list-item-height, 40px);\n display: flex;\n align-items: center;\n padding: 0 20px;\n }\n\n .parent-item.two-line {\n height: var(--list-item-two-line-height);\n }\n\n .parent-item-wrapper {\n flex: 1;\n }\n `\n ]\n }\n\n /**\n * The key of the entity to edit.\n * @attribute\n */\n @property({ type: String, reflect: true }) key?: string;\n\n /**\n * The read data namespace.\n */\n @property({ type: Object }) root?: DataNamespace;\n\n /**\n * When set it activates the drop zone in the parents list to support drag and drop.\n * @attribute\n */\n @property({ type: Boolean }) parentDropZone?: boolean;\n\n /**\n * The computed entity when the key or root change.\n */\n @state() protected _entity?: DataEntity;\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n if (cp.has('key')) {\n this._computeEntity();\n }\n }\n\n /**\n * Adds a parent entity to this entity.\n * @param parentKey The key of the parent to add.\n */\n addParent(parentKey: string): void {\n const { key, _entity } = this;\n if (!parentKey || parentKey === key || !_entity) {\n return;\n }\n if (!_entity.parents.includes(parentKey)) {\n _entity.parents.push(parentKey);\n }\n this._notifyChanged();\n }\n\n protected _notifyChanged(): void {\n this.dispatchEvent(new Event('change'));\n }\n\n /**\n * Computes the view value for the property.\n * This should be called before the update is complete so this won't trigger another update.\n */\n protected _computeEntity(): void {\n const { root, key } = this;\n if (!root || !key) {\n this._entity = undefined;\n return;\n }\n this._entity = root.definitions.entities.find(i => i.key === key);\n }\n\n protected _infoChangeHandler(e: Event): void {\n const { _entity } = this;\n if (!_entity) {\n return;\n }\n const node = e.target as Input;\n const { name, value } = node;\n if (!['name', 'displayName', 'description'].includes(name as string)) {\n return;\n }\n if (name === 'name' && !value) {\n return;\n }\n _entity.info[name as 'name' | 'description' | 'displayName'] = value;\n this._notifyChanged();\n if (name === 'name' || name === 'displayName') {\n this.dispatchEvent(new Event('namechange'));\n }\n }\n\n protected _checkedHandler(e: Event): void {\n const { _entity } = this;\n if (!_entity) {\n return;\n }\n const input = e.target as CheckboxElement;\n const name = input.name as 'deprecated';\n const { checked } = input;\n if (_entity[name] === checked) {\n return;\n }\n _entity[name] = checked;\n this._notifyChanged();\n this.requestUpdate();\n }\n\n protected _dragoverHandler(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n e.preventDefault();\n e.preventDefault();\n dataTransfer.dropEffect = \"copy\";\n }\n\n protected _dropHandler(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n\n const node = e.target as HTMLElement;\n const { type } = node.dataset;\n if (type === 'entity-parent') {\n e.preventDefault();\n this.parentDropZone = false;\n const key = dataTransfer.getData('text/key');\n this.addParent(key);\n }\n }\n\n protected _parentRemoveHandler(e: Event): void {\n const node = e.currentTarget as HTMLElement;\n if (node.dataset.key) {\n this.removeParent(node.dataset.key);\n }\n }\n\n /**\n * Removes a parent with the given key.\n * @param key The key of the parent to remove.\n */\n removeParent(key: string): void {\n const { _entity } = this;\n if (!key || !_entity) {\n return;\n }\n const index = _entity.parents.indexOf(key);\n if (index < 0) {\n return;\n }\n _entity.parents.splice(index, 1);\n this._notifyChanged();\n this.requestUpdate();\n }\n\n protected override render(): TemplateResult {\n const { _entity: item } = this;\n if (!item) {\n return html``;\n }\n\n const { info, deprecated = false } = item;\n return html`\n <form name=\"entity\" @submit=\"${EventUtils.cancelEvent}\" data-key=\"${item.key}\">\n <ui-text-field class=\"input\" name=\"name\" .value=\"${live(info.name || '')}\" label=\"Entity name\" required @change=\"${this._infoChangeHandler}\"></ui-text-field>\n <ui-text-field class=\"input\" name=\"displayName\" .value=\"${live(info.displayName || '')}\" label=\"Display name (optional)\" @change=\"${this._infoChangeHandler}\"></ui-text-field>\n <ui-text-field class=\"input\" name=\"description\" .value=\"${live(info.description || '')}\" label=\"Entity description (optional)\" @change=\"${this._infoChangeHandler}\"></ui-text-field>\n\n <div class=\"checkbox-group\">\n <label class=\"label-large\">\n <ui-checkbox name=\"deprecated\" .checked=\"${deprecated}\" title=\"Makes this entity deprecated.\" @change=\"${this._checkedHandler}\"></ui-checkbox>\n Deprecated\n </label>\n </div>\n\n ${this._parentsEditorTemplate(item)}\n </form>\n `\n }\n\n protected _parentsEditorTemplate(entity: DataEntity): TemplateResult {\n return html`\n <ui-divider type=\"full\"></ui-divider>\n <div class=\"editor-title title-medium\">Parents</div>\n ${this.parentDropZone ? this._parentDropZoneTemplate() : this._parentsTemplate(entity)}\n `;\n }\n\n protected _parentDropZoneTemplate(): TemplateResult {\n return html`<div \n class=\"drop-zone\" \n data-type=\"entity-parent\" \n @dragover=\"${this._dragoverHandler}\" \n @drop=\"${this._dropHandler}\">\n Drop a parent entity here.\n </div>`;\n }\n\n protected _parentsTemplate(entity: DataEntity): TemplateResult {\n const parents = entity.getComputedParents();\n return html`\n ${parents.length ? this._parentsListTemplate(parents) : this.renderEmptyParentsMessage()}\n `;\n }\n\n protected renderEmptyParentsMessage(): TemplateResult {\n return html`\n <p class=\"no-description no-info body-medium\">No parent entities. You can drop an entity here to create an association.</p>\n `;\n }\n\n protected _parentsListTemplate(parents: DataEntity[]): TemplateResult {\n return html`\n <ul class=\"parents-list\">\n ${parents.map(p => this._parentItemTemplate(p))}\n </ul>\n `;\n }\n\n protected _parentItemTemplate(item: DataEntity): TemplateResult {\n const parent = item.getParent();\n const label = item.info.name || item.key;\n return html`\n <li class=\"parent-item${parent ? ' two-line' : ''}\" data-key=\"${item.key}\">\n <div class=\"parent-item-wrapper\">\n <span class=\"parent-label\">${label}</span>\n ${parent ? html`<div class=\"secondary\">From data model: ${parent.info.name}</div>` : ''}\n </div>\n <ui-icon-button aria-label=\"Remove this parent\" title=\"Removes this parent\" data-key=\"${item.key}\" @click=\"${this._parentRemoveHandler}\">\n <ui-icon icon=\"deleteOutline\" role=\"presentation\"></ui-icon>\n </ui-icon-button>\n </li>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"EntityFormElement.js","sourceRoot":"","sources":["../../../src/elements/schema-design/EntityFormElement.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAa,IAAI,EAAkC,MAAM,KAAK,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,wB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AAK,EAAE;kDAAgC","sourcesContent":["import { css, CSSResult, html, PropertyValues, TemplateResult } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { live } from \"lit/directives/live.js\";\nimport { DataEntity, DataNamespace, EventUtils } from \"@api-client/core/build/browser.js\";\nimport ApiElement from \"../ApiElement.js\";\nimport EditorCommon from './CommonStyles.js';\nimport theme from '../theme.js';\nimport typography from \"../../styles/m3/typography.module.js\";\nimport type Input from \"../../ui/input/Input.js\";\nimport type CheckboxElement from \"../../ui/input/CheckboxElement.js\";\nimport '../../define/ui/ui-text-field.js';\nimport '../../define/ui/ui-checkbox.js';\nimport '../../define/ui/ui-divider.js';\nimport '../../define/ui/ui-icon-button.js';\nimport '../../define/ui/ui-icon.js';\n\n/**\n * An editor for a data entity.\n * \n * @fires change - When the entity has changed.\n * @fires namechange - When a name of the entity has changed.\n */\nexport default class EntityFormElement extends ApiElement {\n static override get styles(): CSSResult[] {\n return [\n theme,\n EditorCommon,\n typography,\n css`\n :host {\n display: block;\n }\n\n .no-info {\n margin: 12px 20px;\n }\n\n .parents-list {\n margin: 0;\n padding: 0;\n }\n\n .parent-item {\n list-style: none;\n height: var(--list-item-height, 40px);\n display: flex;\n align-items: center;\n padding: 0 20px;\n }\n\n .parent-item.two-line {\n height: var(--list-item-two-line-height);\n }\n\n .parent-item-wrapper {\n flex: 1;\n }\n `\n ]\n }\n\n /**\n * The key of the entity to edit.\n * @attribute\n */\n @property({ type: String, reflect: true }) key?: string;\n\n /**\n * The read data namespace.\n */\n @property({ type: Object }) root?: DataNamespace;\n\n /**\n * When set it activates the drop zone in the parents list to support drag and drop.\n * @attribute\n */\n @property({ type: Boolean }) parentDropZone?: boolean;\n\n /**\n * The computed entity when the key or root change.\n */\n @state() protected _entity?: DataEntity;\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n if (cp.has('key')) {\n this._computeEntity();\n }\n }\n\n /**\n * Adds a parent entity to this entity.\n * @param parentKey The key of the parent to add.\n */\n addParent(parentKey: string): void {\n const { key, _entity } = this;\n if (!parentKey || parentKey === key || !_entity) {\n return;\n }\n if (!_entity.parents.includes(parentKey)) {\n _entity.parents.push(parentKey);\n }\n this.notifyChange();\n }\n\n /**\n * Computes the view value for the property.\n * This should be called before the update is complete so this won't trigger another update.\n */\n protected _computeEntity(): void {\n const { root, key } = this;\n if (!root || !key) {\n this._entity = undefined;\n return;\n }\n this._entity = root.definitions.entities.find(i => i.key === key);\n }\n\n protected _infoChangeHandler(e: Event): void {\n const { _entity } = this;\n if (!_entity) {\n return;\n }\n const node = e.target as Input;\n const { name, value } = node;\n if (!['name', 'displayName', 'description'].includes(name as string)) {\n return;\n }\n if (name === 'name' && !value) {\n return;\n }\n _entity.info[name as 'name' | 'description' | 'displayName'] = value;\n this.notifyChange();\n if (name === 'name' || name === 'displayName') {\n this.dispatchEvent(new Event('namechange'));\n }\n }\n\n protected _checkedHandler(e: Event): void {\n const { _entity } = this;\n if (!_entity) {\n return;\n }\n const input = e.target as CheckboxElement;\n const name = input.name as 'deprecated';\n const { checked } = input;\n if (_entity[name] === checked) {\n return;\n }\n _entity[name] = checked;\n this.notifyChange();\n this.requestUpdate();\n }\n\n protected _dragoverHandler(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n e.preventDefault();\n e.preventDefault();\n dataTransfer.dropEffect = \"copy\";\n }\n\n protected _dropHandler(e: DragEvent): void {\n const { dataTransfer } = e;\n if (!dataTransfer) {\n return;\n }\n\n const node = e.target as HTMLElement;\n const { type } = node.dataset;\n if (type === 'entity-parent') {\n e.preventDefault();\n this.parentDropZone = false;\n const key = dataTransfer.getData('text/key');\n this.addParent(key);\n }\n }\n\n protected _parentRemoveHandler(e: Event): void {\n const node = e.currentTarget as HTMLElement;\n if (node.dataset.key) {\n this.removeParent(node.dataset.key);\n }\n }\n\n /**\n * Removes a parent with the given key.\n * @param key The key of the parent to remove.\n */\n removeParent(key: string): void {\n const { _entity } = this;\n if (!key || !_entity) {\n return;\n }\n const index = _entity.parents.indexOf(key);\n if (index < 0) {\n return;\n }\n _entity.parents.splice(index, 1);\n this.notifyChange();\n this.requestUpdate();\n }\n\n protected override render(): TemplateResult {\n const { _entity: item } = this;\n if (!item) {\n return html``;\n }\n\n const { info, deprecated = false } = item;\n return html`\n <form name=\"entity\" @submit=\"${EventUtils.cancelEvent}\" data-key=\"${item.key}\">\n <ui-text-field class=\"input\" name=\"name\" .value=\"${live(info.name || '')}\" label=\"Entity name\" required @change=\"${this._infoChangeHandler}\"></ui-text-field>\n <ui-text-field class=\"input\" name=\"displayName\" .value=\"${live(info.displayName || '')}\" label=\"Display name (optional)\" @change=\"${this._infoChangeHandler}\"></ui-text-field>\n <ui-text-field class=\"input\" name=\"description\" .value=\"${live(info.description || '')}\" label=\"Entity description (optional)\" @change=\"${this._infoChangeHandler}\"></ui-text-field>\n\n <div class=\"checkbox-group\">\n <label class=\"label-large\">\n <ui-checkbox name=\"deprecated\" .checked=\"${deprecated}\" title=\"Makes this entity deprecated.\" @change=\"${this._checkedHandler}\"></ui-checkbox>\n Deprecated\n </label>\n </div>\n\n ${this._parentsEditorTemplate(item)}\n </form>\n `\n }\n\n protected _parentsEditorTemplate(entity: DataEntity): TemplateResult {\n return html`\n <ui-divider type=\"full\"></ui-divider>\n <div class=\"editor-title title-medium\">Parents</div>\n ${this.parentDropZone ? this._parentDropZoneTemplate() : this._parentsTemplate(entity)}\n `;\n }\n\n protected _parentDropZoneTemplate(): TemplateResult {\n return html`<div \n class=\"drop-zone\" \n data-type=\"entity-parent\" \n @dragover=\"${this._dragoverHandler}\" \n @drop=\"${this._dropHandler}\">\n Drop a parent entity here.\n </div>`;\n }\n\n protected _parentsTemplate(entity: DataEntity): TemplateResult {\n const parents = entity.getComputedParents();\n return html`\n ${parents.length ? this._parentsListTemplate(parents) : this.renderEmptyParentsMessage()}\n `;\n }\n\n protected renderEmptyParentsMessage(): TemplateResult {\n return html`\n <p class=\"no-description no-info body-medium\">No parent entities. You can drop an entity here to create an association.</p>\n `;\n }\n\n protected _parentsListTemplate(parents: DataEntity[]): TemplateResult {\n return html`\n <ul class=\"parents-list\">\n ${parents.map(p => this._parentItemTemplate(p))}\n </ul>\n `;\n }\n\n protected _parentItemTemplate(item: DataEntity): TemplateResult {\n const parent = item.getParent();\n const label = item.info.name || item.key;\n return html`\n <li class=\"parent-item${parent ? ' two-line' : ''}\" data-key=\"${item.key}\">\n <div class=\"parent-item-wrapper\">\n <span class=\"parent-label\">${label}</span>\n ${parent ? html`<div class=\"secondary\">From data model: ${parent.info.name}</div>` : ''}\n </div>\n <ui-icon-button aria-label=\"Remove this parent\" title=\"Removes this parent\" data-key=\"${item.key}\" @click=\"${this._parentRemoveHandler}\">\n <ui-icon icon=\"deleteOutline\" role=\"presentation\"></ui-icon>\n </ui-icon-button>\n </li>\n `;\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { DataNamespace, DataProperty, DataPropertyType } from "@api-client/core/build/browser.js";
2
2
  import { CSSResult, TemplateResult, nothing, PropertyValues } from "lit";
3
3
  import ApiElement from "../ApiElement.js";
4
- import { SupportedInputTypes } from "../../types/input.js";
4
+ import type { SupportedInputTypes } from "../../types/input.js";
5
5
  import '../../define/ui/ui-text-field.js';
6
6
  import '../../define/ui/ui-checkbox.js';
7
7
  import '../../define/ui/ui-divider.js';
@@ -33,7 +33,6 @@ export default class PropertyFormElement extends ApiElement {
33
33
  */
34
34
  protected _property?: DataProperty;
35
35
  willUpdate(cp: PropertyValues<this>): void;
36
- protected _notifyChanged(): void;
37
36
  /**
38
37
  * Computes the view value for the property.
39
38
  * This should be called before the update is complete so this won't trigger another update.
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyFormElement.d.ts","sourceRoot":"","sources":["../../../src/elements/schema-design/PropertyFormElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,gBAAgB,EAAiC,MAAM,mCAAmC,CAAC;AACjI,OAAO,EAAO,SAAS,EAAQ,cAAc,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,cAAc,CAAC,IAAI,EAAE,qBAAqB,GAAG,cAAc;IAcrE,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,qBAAqB,GAAG,cAAc;IAezE,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc;CAajE"}
@@ -54,9 +54,6 @@ export default class PropertyFormElement extends ApiElement {
54
54
  this._computeProperty();
55
55
  }
56
56
  }
57
- _notifyChanged() {
58
- this.dispatchEvent(new Event('change'));
59
- }
60
57
  /**
61
58
  * Computes the view value for the property.
62
59
  * This should be called before the update is complete so this won't trigger another update.
@@ -83,7 +80,7 @@ export default class PropertyFormElement extends ApiElement {
83
80
  return;
84
81
  }
85
82
  _property.info[name] = value;
86
- this._notifyChanged();
83
+ this.notifyChange();
87
84
  this.requestUpdate();
88
85
  }
89
86
  setType(value) {
@@ -95,7 +92,7 @@ export default class PropertyFormElement extends ApiElement {
95
92
  return;
96
93
  }
97
94
  _property.type = value;
98
- this._notifyChanged();
95
+ this.notifyChange();
99
96
  this.requestUpdate();
100
97
  }
101
98
  typeSelectHandler(e) {
@@ -120,7 +117,7 @@ export default class PropertyFormElement extends ApiElement {
120
117
  return;
121
118
  }
122
119
  _property[name] = checked;
123
- this._notifyChanged();
120
+ this.notifyChange();
124
121
  this.requestUpdate();
125
122
  }
126
123
  defaultValueHandler(e) {
@@ -157,7 +154,7 @@ export default class PropertyFormElement extends ApiElement {
157
154
  else {
158
155
  delete schema.defaultValue;
159
156
  }
160
- this._notifyChanged();
157
+ this.notifyChange();
161
158
  }
162
159
  /**
163
160
  * Adds an example value to the current property's schema.
@@ -175,7 +172,7 @@ export default class PropertyFormElement extends ApiElement {
175
172
  }
176
173
  const list = schema.examples;
177
174
  list.push(value);
178
- this._notifyChanged();
175
+ this.notifyChange();
179
176
  this.requestUpdate();
180
177
  }
181
178
  /**
@@ -193,7 +190,7 @@ export default class PropertyFormElement extends ApiElement {
193
190
  return;
194
191
  }
195
192
  schema.examples.splice(index, 1);
196
- this._notifyChanged();
193
+ this.notifyChange();
197
194
  this.requestUpdate();
198
195
  }
199
196
  exampleAddHandler(e) {
@@ -230,7 +227,7 @@ export default class PropertyFormElement extends ApiElement {
230
227
  }
231
228
  const list = schema.enum;
232
229
  list.push(value);
233
- this._notifyChanged();
230
+ this.notifyChange();
234
231
  this.requestUpdate();
235
232
  }
236
233
  /**
@@ -248,7 +245,7 @@ export default class PropertyFormElement extends ApiElement {
248
245
  return;
249
246
  }
250
247
  schema.enum.splice(index, 1);
251
- this._notifyChanged();
248
+ this.notifyChange();
252
249
  this.requestUpdate();
253
250
  }
254
251
  enumAddHandler(e) {