@gravitee/ui-components 3.25.3-typescript-8a53edf → 3.25.3-typescript-e7256ca

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 (370) hide show
  1. package/package.json +3 -4
  2. package/src/atoms/gv-autocomplete.d.ts +104 -0
  3. package/src/atoms/gv-autocomplete.js +1 -461
  4. package/src/atoms/gv-button.d.ts +109 -0
  5. package/src/atoms/gv-button.js +1 -410
  6. package/src/atoms/gv-checkbox.d.ts +114 -0
  7. package/src/atoms/gv-checkbox.js +1 -187
  8. package/src/atoms/gv-date-picker-calendar.d.ts +190 -0
  9. package/src/atoms/gv-date-picker-calendar.js +1 -894
  10. package/src/atoms/gv-date-picker-cell.d.ts +80 -0
  11. package/src/atoms/gv-date-picker-cell.js +1 -190
  12. package/src/atoms/gv-date-picker.d.ts +194 -0
  13. package/src/atoms/gv-date-picker.js +1 -671
  14. package/src/atoms/gv-file-upload.d.ts +64 -0
  15. package/src/atoms/gv-file-upload.js +1 -367
  16. package/src/atoms/gv-icon.d.ts +26 -0
  17. package/src/atoms/gv-icon.js +1 -103
  18. package/src/atoms/gv-image.d.ts +45 -0
  19. package/src/atoms/gv-image.js +1 -144
  20. package/src/atoms/gv-input-message.d.ts +20 -0
  21. package/src/atoms/gv-input-message.js +1 -84
  22. package/src/atoms/gv-input.d.ts +246 -0
  23. package/src/atoms/gv-input.js +1 -561
  24. package/src/atoms/gv-link.d.ts +67 -0
  25. package/src/atoms/gv-link.js +1 -210
  26. package/src/atoms/gv-message.d.ts +23 -0
  27. package/src/atoms/gv-message.js +1 -128
  28. package/src/atoms/gv-metric.d.ts +32 -0
  29. package/src/atoms/gv-metric.js +1 -117
  30. package/src/atoms/gv-relative-time.d.ts +45 -0
  31. package/src/atoms/gv-relative-time.js +1 -156
  32. package/src/atoms/gv-select-native.d.ts +174 -0
  33. package/src/atoms/gv-select-native.js +1 -388
  34. package/src/atoms/gv-select.d.ts +71 -0
  35. package/src/atoms/gv-select.js +1 -437
  36. package/src/atoms/gv-spinner.d.ts +10 -0
  37. package/src/atoms/gv-spinner.js +1 -57
  38. package/src/atoms/gv-state.d.ts +50 -0
  39. package/src/atoms/gv-state.js +1 -130
  40. package/src/atoms/gv-switch.d.ts +60 -0
  41. package/src/atoms/gv-switch.js +1 -243
  42. package/src/atoms/gv-tag.d.ts +69 -0
  43. package/src/atoms/gv-tag.js +1 -168
  44. package/src/atoms/gv-text.d.ts +110 -0
  45. package/src/atoms/gv-text.js +1 -168
  46. package/src/charts/gv-chart-bar.d.ts +50 -0
  47. package/src/charts/gv-chart-bar.js +1 -103
  48. package/src/charts/gv-chart-gauge.d.ts +58 -0
  49. package/src/charts/gv-chart-gauge.js +1 -100
  50. package/src/charts/gv-chart-histogram.d.ts +48 -0
  51. package/src/charts/gv-chart-histogram.js +1 -83
  52. package/src/charts/gv-chart-line.d.ts +52 -0
  53. package/src/charts/gv-chart-line.js +1 -224
  54. package/src/charts/gv-chart-map.d.ts +50 -0
  55. package/src/charts/gv-chart-map.js +1 -112
  56. package/src/charts/gv-chart-pie.d.ts +50 -0
  57. package/src/charts/gv-chart-pie.js +1 -91
  58. package/src/index.d.ts +77 -0
  59. package/src/index.js +1 -77
  60. package/src/lib/cron-expression.d.ts +1 -0
  61. package/src/lib/cron-expression.js +1 -205
  62. package/src/lib/date.d.ts +1 -0
  63. package/src/lib/date.js +1 -44
  64. package/src/lib/events.d.ts +1 -0
  65. package/src/lib/events.js +1 -26
  66. package/src/lib/http-client-schema-form.d.ts +68 -0
  67. package/src/lib/http-client-schema-form.js +1 -67
  68. package/src/lib/http.d.ts +222 -0
  69. package/src/lib/http.js +1 -237
  70. package/src/lib/i18n.d.ts +30 -0
  71. package/src/lib/i18n.js +1 -103
  72. package/src/lib/item.d.ts +12 -0
  73. package/src/lib/item.js +1 -118
  74. package/src/lib/properties.d.ts +42 -0
  75. package/src/lib/properties.js +1 -189
  76. package/src/lib/schema-form.d.ts +5 -0
  77. package/src/lib/schema-form.js +1 -44
  78. package/src/lib/studio.d.ts +2 -0
  79. package/src/lib/studio.js +1 -141
  80. package/src/lib/style.d.ts +6 -0
  81. package/src/lib/style.js +1 -41
  82. package/src/lib/text-format.d.ts +6 -0
  83. package/src/lib/text-format.js +1 -69
  84. package/src/lib/theme.d.ts +4 -0
  85. package/src/lib/theme.js +1 -63
  86. package/src/lib/utils.d.ts +9 -0
  87. package/src/lib/utils.js +1 -111
  88. package/src/mixins/chart-element.d.ts +39 -0
  89. package/src/mixins/chart-element.js +1 -165
  90. package/src/mixins/input-element.d.ts +64 -0
  91. package/src/mixins/input-element.js +1 -144
  92. package/src/mixins/item-resource.d.ts +56 -0
  93. package/src/mixins/item-resource.js +1 -120
  94. package/src/mixins/keyboard-element.d.ts +25 -0
  95. package/src/mixins/keyboard-element.js +1 -69
  96. package/src/mixins/update-after-browser.d.ts +11 -0
  97. package/src/mixins/update-after-browser.js +1 -30
  98. package/src/mixins/with-resize-observer.d.ts +12 -0
  99. package/src/mixins/with-resize-observer.js +1 -68
  100. package/src/mixins/with-skeleton-attribute.d.ts +35 -0
  101. package/src/mixins/with-skeleton-attribute.js +1 -112
  102. package/src/molecules/gv-card-full.d.ts +78 -0
  103. package/src/molecules/gv-card-full.js +1 -218
  104. package/src/molecules/gv-card-list.d.ts +33 -0
  105. package/src/molecules/gv-card-list.js +1 -113
  106. package/src/molecules/gv-card.d.ts +65 -0
  107. package/src/molecules/gv-card.js +1 -133
  108. package/src/molecules/gv-category-list.d.ts +17 -0
  109. package/src/molecules/gv-category-list.js +1 -60
  110. package/src/molecules/gv-category.d.ts +64 -0
  111. package/src/molecules/gv-category.js +1 -170
  112. package/src/molecules/gv-code.d.ts +192 -0
  113. package/src/molecules/gv-code.js +1 -359
  114. package/src/molecules/gv-confirm.d.ts +60 -0
  115. package/src/molecules/gv-confirm.js +1 -188
  116. package/src/molecules/gv-cron-editor.d.ts +115 -0
  117. package/src/molecules/gv-cron-editor.js +1 -710
  118. package/src/molecules/gv-dropdown-menu.d.ts +28 -0
  119. package/src/molecules/gv-dropdown-menu.js +1 -116
  120. package/src/molecules/gv-expandable.d.ts +37 -0
  121. package/src/molecules/gv-expandable.js +1 -122
  122. package/src/molecules/gv-expression-language.d.ts +150 -0
  123. package/src/molecules/gv-expression-language.js +1 -270
  124. package/src/molecules/gv-identity-picture.d.ts +44 -0
  125. package/src/molecules/gv-identity-picture.js +1 -148
  126. package/src/molecules/gv-list.d.ts +123 -0
  127. package/src/molecules/gv-list.js +1 -227
  128. package/src/molecules/gv-metrics.d.ts +65 -0
  129. package/src/molecules/gv-metrics.js +1 -162
  130. package/src/molecules/gv-modal.d.ts +64 -0
  131. package/src/molecules/gv-modal.js +1 -213
  132. package/src/molecules/gv-nav.d.ts +41 -0
  133. package/src/molecules/gv-nav.js +1 -196
  134. package/src/molecules/gv-option.d.ts +65 -0
  135. package/src/molecules/gv-option.js +1 -242
  136. package/src/molecules/gv-plans.d.ts +73 -0
  137. package/src/molecules/gv-plans.js +1 -429
  138. package/src/molecules/gv-popover.d.ts +91 -0
  139. package/src/molecules/gv-popover.js +1 -351
  140. package/src/molecules/gv-promote.d.ts +108 -0
  141. package/src/molecules/gv-promote.js +1 -209
  142. package/src/molecules/gv-rating-list.d.ts +77 -0
  143. package/src/molecules/gv-rating-list.js +1 -365
  144. package/src/molecules/gv-rating.d.ts +55 -0
  145. package/src/molecules/gv-rating.js +1 -253
  146. package/src/molecules/gv-row-expandable.d.ts +8 -0
  147. package/src/molecules/gv-row-expandable.js +1 -45
  148. package/src/molecules/gv-row.d.ts +37 -0
  149. package/src/molecules/gv-row.js +1 -210
  150. package/src/molecules/gv-stats.d.ts +53 -0
  151. package/src/molecules/gv-stats.js +1 -121
  152. package/src/molecules/gv-stepper.d.ts +46 -0
  153. package/src/molecules/gv-stepper.js +1 -288
  154. package/src/molecules/gv-table.d.ts +159 -0
  155. package/src/molecules/gv-table.js +1 -685
  156. package/src/molecules/gv-tree.d.ts +44 -0
  157. package/src/molecules/gv-tree.js +1 -250
  158. package/src/organisms/gv-documentation.d.ts +52 -0
  159. package/src/organisms/gv-documentation.js +1 -215
  160. package/src/organisms/gv-header.d.ts +60 -0
  161. package/src/organisms/gv-header.js +1 -288
  162. package/src/organisms/gv-http-client.d.ts +57 -0
  163. package/src/organisms/gv-http-client.js +1 -275
  164. package/src/organisms/gv-menu.d.ts +74 -0
  165. package/src/organisms/gv-menu.js +1 -263
  166. package/src/organisms/gv-newsletter-subscription.d.ts +82 -0
  167. package/src/organisms/gv-newsletter-subscription.js +1 -271
  168. package/src/organisms/gv-pagination.d.ts +63 -0
  169. package/src/organisms/gv-pagination.js +1 -198
  170. package/src/organisms/gv-properties.d.ts +229 -0
  171. package/src/organisms/gv-properties.js +1 -920
  172. package/src/organisms/gv-resizable-views.d.ts +33 -0
  173. package/src/organisms/gv-resizable-views.js +1 -396
  174. package/src/organisms/gv-resources.d.ts +125 -0
  175. package/src/organisms/gv-resources.js +1 -535
  176. package/src/organisms/gv-schema-form-array.d.ts +55 -0
  177. package/src/organisms/gv-schema-form-array.js +1 -250
  178. package/src/organisms/gv-schema-form-control-object.d.ts +64 -0
  179. package/src/organisms/gv-schema-form-control-object.js +1 -154
  180. package/src/organisms/gv-schema-form-control.d.ts +90 -0
  181. package/src/organisms/gv-schema-form-control.js +1 -443
  182. package/src/organisms/gv-schema-form.d.ts +156 -0
  183. package/src/organisms/gv-schema-form.js +1 -751
  184. package/src/organisms/gv-tabs.d.ts +56 -0
  185. package/src/organisms/gv-tabs.js +1 -210
  186. package/src/organisms/gv-user-menu.d.ts +56 -0
  187. package/src/organisms/gv-user-menu.js +1 -314
  188. package/src/organisms/gv-vertical-menu.d.ts +28 -0
  189. package/src/organisms/gv-vertical-menu.js +1 -123
  190. package/src/policy-studio/gv-flow-step.d.ts +142 -0
  191. package/src/policy-studio/gv-flow-step.js +1 -464
  192. package/src/policy-studio/gv-flow.d.ts +89 -0
  193. package/src/policy-studio/gv-flow.js +1 -621
  194. package/src/policy-studio/gv-policy-studio-menu.d.ts +94 -0
  195. package/src/policy-studio/gv-policy-studio-menu.js +1 -750
  196. package/src/policy-studio/gv-policy-studio.d.ts +464 -0
  197. package/src/policy-studio/gv-policy-studio.js +1 -1842
  198. package/src/styles/empty.d.ts +1 -0
  199. package/src/styles/empty.js +1 -36
  200. package/src/styles/input.d.ts +1 -0
  201. package/src/styles/input.js +1 -263
  202. package/src/styles/link.d.ts +1 -0
  203. package/src/styles/link.js +1 -32
  204. package/src/styles/shapes.d.ts +2 -0
  205. package/src/styles/shapes.js +1 -17
  206. package/src/styles/skeleton.d.ts +1 -0
  207. package/src/styles/skeleton.js +1 -53
  208. package/src/styles/zoom.d.ts +1 -0
  209. package/src/styles/zoom.js +1 -40
  210. package/src/theme/gv-theme.d.ts +81 -0
  211. package/src/theme/gv-theme.js +1 -203
  212. package/wc/gv-autocomplete.d.ts +1 -0
  213. package/wc/gv-autocomplete.js +1 -1
  214. package/wc/gv-button.d.ts +1 -0
  215. package/wc/gv-button.js +1 -1
  216. package/wc/gv-card-full.d.ts +1 -0
  217. package/wc/gv-card-full.js +1 -1
  218. package/wc/gv-card-list.d.ts +1 -0
  219. package/wc/gv-card-list.js +1 -1
  220. package/wc/gv-card.d.ts +1 -0
  221. package/wc/gv-card.js +1 -1
  222. package/wc/gv-category-list.d.ts +1 -0
  223. package/wc/gv-category-list.js +1 -1
  224. package/wc/gv-category.d.ts +1 -0
  225. package/wc/gv-category.js +1 -1
  226. package/wc/gv-chart-bar.d.ts +1 -0
  227. package/wc/gv-chart-bar.js +1 -1
  228. package/wc/gv-chart-gauge.d.ts +1 -0
  229. package/wc/gv-chart-gauge.js +1 -1
  230. package/wc/gv-chart-histogram.d.ts +1 -0
  231. package/wc/gv-chart-histogram.js +1 -1
  232. package/wc/gv-chart-line.d.ts +1 -0
  233. package/wc/gv-chart-line.js +1 -1
  234. package/wc/gv-chart-map.d.ts +1 -0
  235. package/wc/gv-chart-map.js +1 -1
  236. package/wc/gv-chart-pie.d.ts +1 -0
  237. package/wc/gv-chart-pie.js +1 -1
  238. package/wc/gv-checkbox.d.ts +1 -0
  239. package/wc/gv-checkbox.js +1 -1
  240. package/wc/gv-code.d.ts +1 -0
  241. package/wc/gv-code.js +1 -1
  242. package/wc/gv-confirm.d.ts +1 -0
  243. package/wc/gv-confirm.js +1 -1
  244. package/wc/gv-cron-editor.d.ts +1 -0
  245. package/wc/gv-cron-editor.js +1 -1
  246. package/wc/gv-date-picker-calendar.d.ts +1 -0
  247. package/wc/gv-date-picker-calendar.js +1 -1
  248. package/wc/gv-date-picker-cell.d.ts +1 -0
  249. package/wc/gv-date-picker-cell.js +1 -1
  250. package/wc/gv-date-picker.d.ts +1 -0
  251. package/wc/gv-date-picker.js +1 -1
  252. package/wc/gv-documentation.d.ts +1 -0
  253. package/wc/gv-documentation.js +1 -1
  254. package/wc/gv-dropdown-menu.d.ts +1 -0
  255. package/wc/gv-dropdown-menu.js +1 -1
  256. package/wc/gv-expandable.d.ts +1 -0
  257. package/wc/gv-expandable.js +1 -1
  258. package/wc/gv-expression-language.d.ts +1 -0
  259. package/wc/gv-expression-language.js +1 -1
  260. package/wc/gv-file-upload.d.ts +1 -0
  261. package/wc/gv-file-upload.js +1 -1
  262. package/wc/gv-flow-step.d.ts +1 -0
  263. package/wc/gv-flow-step.js +1 -1
  264. package/wc/gv-flow.d.ts +1 -0
  265. package/wc/gv-flow.js +1 -1
  266. package/wc/gv-header.d.ts +1 -0
  267. package/wc/gv-header.js +1 -1
  268. package/wc/gv-http-client.d.ts +1 -0
  269. package/wc/gv-http-client.js +1 -1
  270. package/wc/gv-icon.d.ts +1 -0
  271. package/wc/gv-icon.js +1 -1
  272. package/wc/gv-identity-picture.d.ts +1 -0
  273. package/wc/gv-identity-picture.js +1 -1
  274. package/wc/gv-image.d.ts +1 -0
  275. package/wc/gv-image.js +1 -1
  276. package/wc/gv-input-message.d.ts +1 -0
  277. package/wc/gv-input-message.js +1 -1
  278. package/wc/gv-input.d.ts +1 -0
  279. package/wc/gv-input.js +1 -1
  280. package/wc/gv-link.d.ts +1 -0
  281. package/wc/gv-link.js +1 -1
  282. package/wc/gv-list.d.ts +1 -0
  283. package/wc/gv-list.js +1 -1
  284. package/wc/gv-menu.d.ts +1 -0
  285. package/wc/gv-menu.js +1 -1
  286. package/wc/gv-message.d.ts +1 -0
  287. package/wc/gv-message.js +1 -1
  288. package/wc/gv-metric.d.ts +1 -0
  289. package/wc/gv-metric.js +1 -1
  290. package/wc/gv-metrics.d.ts +1 -0
  291. package/wc/gv-metrics.js +1 -1
  292. package/wc/gv-modal.d.ts +1 -0
  293. package/wc/gv-modal.js +1 -1
  294. package/wc/gv-nav.d.ts +1 -0
  295. package/wc/gv-nav.js +1 -1
  296. package/wc/gv-newsletter-subscription.d.ts +1 -0
  297. package/wc/gv-newsletter-subscription.js +1 -1
  298. package/wc/gv-option.d.ts +1 -0
  299. package/wc/gv-option.js +1 -1
  300. package/wc/gv-pagination.d.ts +1 -0
  301. package/wc/gv-pagination.js +1 -1
  302. package/wc/gv-plans.d.ts +1 -0
  303. package/wc/gv-plans.js +1 -1
  304. package/wc/gv-policy-studio-menu.d.ts +1 -0
  305. package/wc/gv-policy-studio-menu.js +1 -1
  306. package/wc/gv-policy-studio.d.ts +1 -0
  307. package/wc/gv-policy-studio.js +1 -1
  308. package/wc/gv-popover.d.ts +1 -0
  309. package/wc/gv-popover.js +1 -1
  310. package/wc/gv-promote.d.ts +1 -0
  311. package/wc/gv-promote.js +1 -1
  312. package/wc/gv-properties.d.ts +1 -0
  313. package/wc/gv-properties.js +1 -1
  314. package/wc/gv-rating-list.d.ts +1 -0
  315. package/wc/gv-rating-list.js +1 -1
  316. package/wc/gv-rating.d.ts +1 -0
  317. package/wc/gv-rating.js +1 -1
  318. package/wc/gv-relative-time.d.ts +1 -0
  319. package/wc/gv-relative-time.js +1 -1
  320. package/wc/gv-resizable-views.d.ts +1 -0
  321. package/wc/gv-resizable-views.js +1 -1
  322. package/wc/gv-resources.d.ts +1 -0
  323. package/wc/gv-resources.js +1 -1
  324. package/wc/gv-row-expandable.d.ts +1 -0
  325. package/wc/gv-row-expandable.js +1 -1
  326. package/wc/gv-row.d.ts +1 -0
  327. package/wc/gv-row.js +1 -1
  328. package/wc/gv-schema-form-array.d.ts +1 -0
  329. package/wc/gv-schema-form-array.js +1 -1
  330. package/wc/gv-schema-form-control-object.d.ts +1 -0
  331. package/wc/gv-schema-form-control-object.js +1 -1
  332. package/wc/gv-schema-form-control.d.ts +1 -0
  333. package/wc/gv-schema-form-control.js +1 -1
  334. package/wc/gv-schema-form.d.ts +1 -0
  335. package/wc/gv-schema-form.js +1 -1
  336. package/wc/gv-select-native.d.ts +1 -0
  337. package/wc/gv-select-native.js +1 -1
  338. package/wc/gv-select.d.ts +1 -0
  339. package/wc/gv-select.js +1 -1
  340. package/wc/gv-spinner.d.ts +1 -0
  341. package/wc/gv-spinner.js +1 -1
  342. package/wc/gv-state.d.ts +1 -0
  343. package/wc/gv-state.js +1 -1
  344. package/wc/gv-stats.d.ts +1 -0
  345. package/wc/gv-stats.js +1 -1
  346. package/wc/gv-stepper.d.ts +1 -0
  347. package/wc/gv-stepper.js +1 -1
  348. package/wc/gv-switch.d.ts +1 -0
  349. package/wc/gv-switch.js +1 -1
  350. package/wc/gv-table.d.ts +1 -0
  351. package/wc/gv-table.js +1 -1
  352. package/wc/gv-tabs.d.ts +1 -0
  353. package/wc/gv-tabs.js +1 -1
  354. package/wc/gv-tag.d.ts +1 -0
  355. package/wc/gv-tag.js +1 -1
  356. package/wc/gv-text.d.ts +1 -0
  357. package/wc/gv-text.js +1 -1
  358. package/wc/gv-theme.d.ts +1 -0
  359. package/wc/gv-theme.js +1 -1
  360. package/wc/gv-tree.d.ts +1 -0
  361. package/wc/gv-tree.js +1 -1
  362. package/wc/gv-user-menu.d.ts +1 -0
  363. package/wc/gv-user-menu.js +1 -1
  364. package/wc/gv-vertical-menu.d.ts +1 -0
  365. package/wc/gv-vertical-menu.js +1 -1
  366. package/CHANGELOG.md +0 -1292
  367. package/LICENSE.txt +0 -202
  368. package/README.md +0 -195
  369. package/src/.eslintrc.js +0 -19
  370. package/src/theme/definition.json +0 -1762
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Resizable views component
3
+ *
4
+ * @fires gv-resizable-views:resize - when user click to resize action
5
+ * @fires gv-resizable-views:move - when user move the resize cursor
6
+ *
7
+ * @slot top - The top content
8
+ * @slot bottom - The bottom content
9
+ *
10
+ * @attr {String} direction - the direction [vertical|horizonal]
11
+ * @attr {Boolean} no-overflow - true if slot containers should have `overflow: hidden`
12
+ */
13
+ export class GvResizableViews extends LitElement {
14
+ static get properties(): {
15
+ direction: {
16
+ type: StringConstructor;
17
+ reflect: boolean;
18
+ };
19
+ noOverflow: {
20
+ type: BooleanConstructor;
21
+ attribute: string;
22
+ };
23
+ };
24
+ static get styles(): import("lit").CSSResult[];
25
+ direction: string;
26
+ split(): void;
27
+ maximizeTop(): void;
28
+ maximizeBottom(): void;
29
+ resize(top?: number, bottom?: number): void;
30
+ resizable(resizer: any): void;
31
+ get shape(): "design:vertical" | "design:horizontal";
32
+ }
33
+ import { LitElement } from "lit-element/lit-element";
@@ -1,396 +1 @@
1
- /*
2
- * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { css, LitElement, html } from 'lit';
17
- import { classMap } from 'lit/directives/class-map';
18
- import { dispatchCustomEvent } from '../lib/events';
19
-
20
- /**
21
- * Resizable views component
22
- *
23
- * @fires gv-resizable-views:resize - when user click to resize action
24
- * @fires gv-resizable-views:move - when user move the resize cursor
25
- *
26
- * @slot top - The top content
27
- * @slot bottom - The bottom content
28
- *
29
- * @attr {String} direction - the direction [vertical|horizonal]
30
- * @attr {Boolean} no-overflow - true if slot containers should have `overflow: hidden`
31
- */
32
- export class GvResizableViews extends LitElement {
33
- static get properties() {
34
- return {
35
- direction: { type: String, reflect: true },
36
- noOverflow: { type: Boolean, attribute: 'no-overflow' },
37
- };
38
- }
39
-
40
- constructor() {
41
- super();
42
- this.direction = 'vertical';
43
- }
44
-
45
- split() {
46
- this.resize();
47
- }
48
-
49
- maximizeTop() {
50
- this.resize(85, 15);
51
- }
52
-
53
- maximizeBottom() {
54
- this.resize(20, 80);
55
- }
56
-
57
- resize(top = 50, bottom = 50) {
58
- this.shadowRoot.querySelector('.top').style.height = `${top}%`;
59
- this.shadowRoot.querySelector('.bottom').style.height = `${bottom}%`;
60
- // Dispatch event after transition
61
- setTimeout(() => {
62
- dispatchCustomEvent(this, 'resize', { top, bottom });
63
- }, 350);
64
- }
65
-
66
- resizable(resizer) {
67
- const direction = resizer.getAttribute('data-direction') || 'horizontal';
68
- const prevSibling = resizer.previousElementSibling;
69
- const nextSibling = resizer.nextElementSibling;
70
-
71
- // The current position of mouse
72
- let x = 0;
73
- let y = 0;
74
- let prevSiblingHeight = 0;
75
- let prevSiblingWidth = 0;
76
- const shadowRoot = this.shadowRoot;
77
- const me = this;
78
-
79
- // Handle the mousedown event
80
- // that's triggered when user drags the resizer
81
- const mouseDownHandler = function (e) {
82
- if (!e.target.classList.contains('action')) {
83
- // Get the current mouse position
84
- shadowRoot.querySelector('.box').classList.remove('transition');
85
- x = e.clientX;
86
- y = e.clientY;
87
- const rect = prevSibling.getBoundingClientRect();
88
- prevSiblingHeight = rect.height;
89
- prevSiblingWidth = rect.width;
90
-
91
- // Attach the listeners to `document`
92
- document.addEventListener('mousemove', mouseMoveHandler);
93
- document.addEventListener('mouseup', mouseUpHandler);
94
- }
95
- };
96
-
97
- const mouseMoveHandler = function (e) {
98
- // How far the mouse has been moved
99
- const dx = e.clientX - x;
100
- const dy = e.clientY - y;
101
- dispatchCustomEvent(me, 'move', { direction });
102
- switch (direction) {
103
- case 'vertical':
104
- prevSibling.style.height = `${((prevSiblingHeight + dy) * 100) / resizer.parentNode.getBoundingClientRect().height}%`;
105
- nextSibling.style.height = `${100 - ((prevSiblingHeight + dy) * 100) / resizer.parentNode.getBoundingClientRect().height}%`;
106
- break;
107
- case 'horizontal':
108
- default:
109
- prevSibling.style.width = `${((prevSiblingWidth + dx) * 100) / resizer.parentNode.getBoundingClientRect().width}%`;
110
- break;
111
- }
112
-
113
- const cursor = direction === 'horizontal' ? 'col-resize' : 'row-resize';
114
- resizer.style.cursor = cursor;
115
- resizer.classList.add('drag');
116
- document.body.style.cursor = cursor;
117
-
118
- prevSibling.style.userSelect = 'none';
119
- prevSibling.style.pointerEvents = 'none';
120
-
121
- nextSibling.style.userSelect = 'none';
122
- nextSibling.style.pointerEvents = 'none';
123
- };
124
-
125
- const mouseUpHandler = function () {
126
- resizer.style.removeProperty('cursor');
127
- resizer.classList.remove('drag');
128
- document.body.style.removeProperty('cursor');
129
-
130
- prevSibling.style.removeProperty('user-select');
131
- prevSibling.style.removeProperty('pointer-events');
132
-
133
- nextSibling.style.removeProperty('user-select');
134
- nextSibling.style.removeProperty('pointer-events');
135
-
136
- // Remove the handlers of `mousemove` and `mouseup`
137
- document.removeEventListener('mousemove', mouseMoveHandler);
138
- document.removeEventListener('mouseup', mouseUpHandler);
139
-
140
- shadowRoot.querySelector('.box').classList.add('transition');
141
- };
142
-
143
- // Attach the handler
144
- resizer.addEventListener('mousedown', mouseDownHandler);
145
- }
146
-
147
- firstUpdated() {
148
- this.shadowRoot.querySelectorAll('.resizer').forEach((elt) => this.resizable(elt));
149
- }
150
-
151
- get shape() {
152
- if (this.direction === 'horizontal') {
153
- return 'design:vertical';
154
- }
155
- return 'design:horizontal';
156
- }
157
-
158
- render() {
159
- return html`
160
- <div class="${classMap({ box: true, transition: true, 'no-overflow': this.noOverflow })}">
161
- <div class="top"><slot name="top"></slot></div>
162
- <div class="resizer" data-direction="${this.direction}">
163
- <gv-icon shape="${this.shape}"></gv-icon>
164
- <div class="actions">
165
- <gv-icon class="layout-icon" shape="layout:layout-right-panel-2"></gv-icon>
166
- <gv-button
167
- small
168
- link
169
- class="action"
170
- icon="layout:layout-bottom-panel"
171
- title="Maximize top"
172
- @gv-button:click="${this.maximizeTop}"
173
- ></gv-button>
174
- <gv-button
175
- small
176
- link
177
- class="action"
178
- icon="layout:layout-horizontal-2"
179
- title="Split screen"
180
- @gv-button:click="${this.split}"
181
- ></gv-button>
182
- <gv-button
183
- small
184
- link
185
- class="action"
186
- icon="layout:layout-top-panel-6"
187
- title="Maximize bottom"
188
- @gv-button:click="${this.maximizeBottom}"
189
- ></gv-button>
190
- </div>
191
- </div>
192
- <div class="bottom"><slot name="bottom"></slot></div>
193
- </div>
194
- `;
195
- }
196
-
197
- static get styles() {
198
- return [
199
- // language=css
200
- css`
201
- .box {
202
- display: flex;
203
- height: 100%;
204
- flex: 1 1 0;
205
- flex-direction: column;
206
- }
207
-
208
- :host([direction='horizontal']) .box {
209
- flex-direction: row;
210
- }
211
-
212
- :host([direction='horizontal']) .layout-icon {
213
- display: none;
214
- }
215
-
216
- * {
217
- box-sizing: border-box;
218
- }
219
-
220
- ::slotted(*) {
221
- display: inline-block;
222
- width: 100%;
223
- }
224
-
225
- .no-overflow ::slotted(*) {
226
- height: 100%;
227
- position: relative;
228
- }
229
-
230
- .top,
231
- .bottom {
232
- position: relative;
233
- }
234
-
235
- .no-overflow .top,
236
- .no-overflow .bottom {
237
- overflow: hidden;
238
- }
239
-
240
- .bottom {
241
- display: flex;
242
- flex-grow: 1;
243
- }
244
-
245
- .left {
246
- width: 70%;
247
- }
248
-
249
- .left,
250
- .right {
251
- padding: 0.2rem;
252
- overflow: auto;
253
- }
254
-
255
- .top,
256
- .bottom {
257
- border-left: 1px solid #bfbfbf;
258
- border-right: 1px solid #bfbfbf;
259
- height: 100%;
260
- }
261
-
262
- :host([direction='horizontal']) .top {
263
- border-right: 0;
264
- }
265
-
266
- :host([direction='horizontal']) .bottom {
267
- border-left: 0;
268
- }
269
-
270
- .transition .top,
271
- .transition .bottom {
272
- transition: height 350ms ease-in-out;
273
- }
274
-
275
- .top {
276
- overflow-y: auto;
277
- overflow-x: hidden;
278
- height: 50%;
279
- }
280
-
281
- .bottom {
282
- overflow-y: auto;
283
- overflow-x: hidden;
284
- height: 50%;
285
- }
286
-
287
- :host([direction='horizontal']) .top,
288
- :host([direction='horizontal']) .bottom {
289
- height: 100%;
290
- width: 50%;
291
- }
292
-
293
- .resizer {
294
- z-index: 10;
295
- background-color: #d9d9d9;
296
- --gv-icon--s: 20px;
297
- display: flex;
298
- align-items: center;
299
- justify-content: flex-end;
300
- --gv-icon--c: #28444f;
301
- transition: all 0.2s ease-in-out;
302
- position: relative;
303
- }
304
-
305
- .resizer.drag {
306
- border-width: 4px 0;
307
- border-style: double;
308
- border-color: #d9d9d9;
309
- background-color: white;
310
- }
311
-
312
- .resizer gv-icon,
313
- .resizer .actions {
314
- transition: all 0.2s ease-in-out;
315
- }
316
-
317
- .resizer.drag gv-icon,
318
- .resizer.drag .actions {
319
- visibility: hidden;
320
- opacity: 0;
321
- }
322
-
323
- :host([direction='horizontal']) .resizer.drag {
324
- border-width: 0 4px;
325
- }
326
-
327
- .resizer > gv-icon {
328
- position: absolute;
329
- }
330
-
331
- :host([direction='horizontal']) .resizer {
332
- align-items: flex-start;
333
- }
334
-
335
- :host([direction='vertical']) .resizer gv-icon {
336
- right: 45px;
337
- }
338
-
339
- :host([direction='horizontal']) .resizer gv-icon {
340
- left: -9px;
341
- top: 45px;
342
- }
343
-
344
- .resizer[data-direction='vertical'] {
345
- cursor: ns-resize;
346
- height: 2px;
347
- width: 100%;
348
- }
349
-
350
- .resizer[data-direction='horizontal'] {
351
- cursor: ew-resize;
352
- height: 100%;
353
- width: 2px;
354
- }
355
-
356
- .actions {
357
- margin-top: -22px;
358
- margin-right: 15px;
359
- padding: 0 0.2rem;
360
- border-radius: 4px 4px 0 0;
361
- background-color: #d9d9d9;
362
- }
363
-
364
- .actions gv-button {
365
- margin: 0.2rem 0.1rem;
366
- visibility: hidden;
367
- opacity: 0;
368
- display: none;
369
- transition: all 250ms ease-in-out;
370
- }
371
-
372
- .actions:focus-within,
373
- .actions:hover {
374
- padding: 0.2rem;
375
- margin-top: -66px;
376
- }
377
-
378
- .actions:focus-within gv-button,
379
- .actions:hover gv-button {
380
- display: block;
381
- opacity: 1;
382
- visibility: visible;
383
- }
384
-
385
- .actions:focus-within gv-icon,
386
- .actions:hover gv-icon {
387
- display: none;
388
- opacity: 0;
389
- visibility: hidden;
390
- }
391
- `,
392
- ];
393
- }
394
- }
395
-
396
- window.customElements.define('gv-resizable-views', GvResizableViews);
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.GvResizableViews=void 0;const t=require("lit"),e=require("lit/directives/class-map"),o=require("../lib/events");class i extends t.LitElement{static get properties(){return{direction:{type:String,reflect:!0},noOverflow:{type:Boolean,attribute:"no-overflow"}}}constructor(){super(),this.direction="vertical"}split(){this.resize()}maximizeTop(){this.resize(85,15)}maximizeBottom(){this.resize(20,80)}resize(t=50,e=50){this.shadowRoot.querySelector(".top").style.height=`${t}%`,this.shadowRoot.querySelector(".bottom").style.height=`${e}%`,setTimeout((()=>{(0,o.dispatchCustomEvent)(this,"resize",{top:t,bottom:e})}),350)}resizable(t){const e=t.getAttribute("data-direction")||"horizontal",i=t.previousElementSibling,r=t.nextElementSibling;let s=0,n=0,l=0,a=0;const c=this.shadowRoot,d=this,h=function(c){const h=c.clientX-s,v=c.clientY-n;if((0,o.dispatchCustomEvent)(d,"move",{direction:e}),"vertical"===e)i.style.height=100*(l+v)/t.parentNode.getBoundingClientRect().height+"%",r.style.height=100-100*(l+v)/t.parentNode.getBoundingClientRect().height+"%";else i.style.width=100*(a+h)/t.parentNode.getBoundingClientRect().width+"%";const u="horizontal"===e?"col-resize":"row-resize";t.style.cursor=u,t.classList.add("drag"),document.body.style.cursor=u,i.style.userSelect="none",i.style.pointerEvents="none",r.style.userSelect="none",r.style.pointerEvents="none"},v=function(){t.style.removeProperty("cursor"),t.classList.remove("drag"),document.body.style.removeProperty("cursor"),i.style.removeProperty("user-select"),i.style.removeProperty("pointer-events"),r.style.removeProperty("user-select"),r.style.removeProperty("pointer-events"),document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",v),c.querySelector(".box").classList.add("transition")};t.addEventListener("mousedown",(function(t){if(!t.target.classList.contains("action")){c.querySelector(".box").classList.remove("transition"),s=t.clientX,n=t.clientY;const e=i.getBoundingClientRect();l=e.height,a=e.width,document.addEventListener("mousemove",h),document.addEventListener("mouseup",v)}}))}firstUpdated(){this.shadowRoot.querySelectorAll(".resizer").forEach((t=>this.resizable(t)))}get shape(){return"horizontal"===this.direction?"design:vertical":"design:horizontal"}render(){return t.html`<div class="${(0,e.classMap)({box:!0,transition:!0,"no-overflow":this.noOverflow})}"><div class="top"><slot name="top"></slot></div><div class="resizer" data-direction="${this.direction}"><gv-icon shape="${this.shape}"></gv-icon><div class="actions"><gv-icon class="layout-icon" shape="layout:layout-right-panel-2"></gv-icon><gv-button small link class="action" icon="layout:layout-bottom-panel" title="Maximize top" @gv-button:click="${this.maximizeTop}"></gv-button><gv-button small link class="action" icon="layout:layout-horizontal-2" title="Split screen" @gv-button:click="${this.split}"></gv-button><gv-button small link class="action" icon="layout:layout-top-panel-6" title="Maximize bottom" @gv-button:click="${this.maximizeBottom}"></gv-button></div></div><div class="bottom"><slot name="bottom"></slot></div></div>`}static get styles(){return[t.css`.box{display:flex;height:100%;flex:1 1 0;flex-direction:column}:host([direction=horizontal]) .box{flex-direction:row}:host([direction=horizontal]) .layout-icon{display:none}*{box-sizing:border-box}::slotted(*){display:inline-block;width:100%}.no-overflow ::slotted(*){height:100%;position:relative}.bottom,.top{position:relative}.no-overflow .bottom,.no-overflow .top{overflow:hidden}.bottom{display:flex;flex-grow:1}.left{width:70%}.left,.right{padding:.2rem;overflow:auto}.bottom,.top{border-left:1px solid #bfbfbf;border-right:1px solid #bfbfbf;height:100%}:host([direction=horizontal]) .top{border-right:0}:host([direction=horizontal]) .bottom{border-left:0}.transition .bottom,.transition .top{transition:height 350ms ease-in-out}.top{overflow-y:auto;overflow-x:hidden;height:50%}.bottom{overflow-y:auto;overflow-x:hidden;height:50%}:host([direction=horizontal]) .bottom,:host([direction=horizontal]) .top{height:100%;width:50%}.resizer{z-index:10;background-color:#d9d9d9;--gv-icon--s:20px;display:flex;align-items:center;justify-content:flex-end;--gv-icon--c:#28444f;transition:all .2s ease-in-out;position:relative}.resizer.drag{border-width:4px 0;border-style:double;border-color:#d9d9d9;background-color:#fff}.resizer .actions,.resizer gv-icon{transition:all .2s ease-in-out}.resizer.drag .actions,.resizer.drag gv-icon{visibility:hidden;opacity:0}:host([direction=horizontal]) .resizer.drag{border-width:0 4px}.resizer>gv-icon{position:absolute}:host([direction=horizontal]) .resizer{align-items:flex-start}:host([direction=vertical]) .resizer gv-icon{right:45px}:host([direction=horizontal]) .resizer gv-icon{left:-9px;top:45px}.resizer[data-direction=vertical]{cursor:ns-resize;height:2px;width:100%}.resizer[data-direction=horizontal]{cursor:ew-resize;height:100%;width:2px}.actions{margin-top:-22px;margin-right:15px;padding:0 .2rem;border-radius:4px 4px 0 0;background-color:#d9d9d9}.actions gv-button{margin:.2rem .1rem;visibility:hidden;opacity:0;display:none;transition:all 250ms ease-in-out}.actions:focus-within,.actions:hover{padding:.2rem;margin-top:-66px}.actions:focus-within gv-button,.actions:hover gv-button{display:block;opacity:1;visibility:visible}.actions:focus-within gv-icon,.actions:hover gv-icon{display:none;opacity:0;visibility:hidden}`]}}exports.GvResizableViews=i,window.customElements.define("gv-resizable-views",i);
@@ -0,0 +1,125 @@
1
+ declare const GvResources_base: {
2
+ new (): {
3
+ [x: string]: any;
4
+ _controller: {};
5
+ _handleKeyDown: (e: any) => void;
6
+ _handleKeyUp: (e: any) => void;
7
+ connectedCallback(): void;
8
+ disconnectedCallback(): void;
9
+ _onKeyDown(e: any): void;
10
+ _onKeyUp(e: any): void;
11
+ isPressed(...keys: any[]): boolean;
12
+ onKeyboard(controller: any): void;
13
+ };
14
+ [x: string]: any;
15
+ };
16
+ export class GvResources extends GvResources_base {
17
+ static get properties(): {
18
+ resources: {
19
+ type: ArrayConstructor;
20
+ };
21
+ _resources: {
22
+ type: ArrayConstructor;
23
+ attribute: boolean;
24
+ };
25
+ types: {
26
+ type: ArrayConstructor;
27
+ };
28
+ documentation: {
29
+ type: ObjectConstructor;
30
+ };
31
+ _currentResource: {
32
+ type: ObjectConstructor;
33
+ attribute: boolean;
34
+ };
35
+ _currentResourceLoading: {
36
+ type: BooleanConstructor;
37
+ attribute: boolean;
38
+ };
39
+ _filter: {
40
+ type: StringConstructor;
41
+ };
42
+ readonly: {
43
+ type: BooleanConstructor;
44
+ reflect: boolean;
45
+ };
46
+ };
47
+ static get styles(): import("lit").CSSResult[];
48
+ set resources(arg: any);
49
+ get resources(): any;
50
+ types: any[];
51
+ _currentResource: {
52
+ type: any;
53
+ title: string;
54
+ icon: string;
55
+ schema: {
56
+ properties: any;
57
+ required: any[];
58
+ };
59
+ values: {};
60
+ submitLabel: string;
61
+ dirty: boolean;
62
+ _id?: undefined;
63
+ } | {
64
+ _id: any;
65
+ title: string;
66
+ type: any;
67
+ icon: string;
68
+ schema: {
69
+ properties: any;
70
+ required: any[];
71
+ };
72
+ values: any;
73
+ submitLabel: string;
74
+ dirty?: undefined;
75
+ } | null;
76
+ _emptymessage: string;
77
+ firstUpdated(): void;
78
+ _resources: any;
79
+ _generateId(list: any): any;
80
+ _getResizableViews(): any;
81
+ _maximizeTopView(): void;
82
+ _maximizeBottomView(): void;
83
+ _splitMainViews(): void;
84
+ _onCancelResourceForm(): void;
85
+ documentation: any;
86
+ _removeResource(item: any): void;
87
+ _buildResourceSchema(resourceType: any): {
88
+ properties: any;
89
+ required: any[];
90
+ };
91
+ _onCreateResource({ detail }: {
92
+ detail: any;
93
+ }): void;
94
+ _currentResourceLoading: boolean | undefined;
95
+ _onSubmitResourceForm({ detail }: {
96
+ detail: any;
97
+ }): void;
98
+ _onChangeResourceForm({ detail }: {
99
+ detail: any;
100
+ }): void;
101
+ _onResetResourceForm(): void;
102
+ _findResourceById(id: any): any;
103
+ _onSelectResource({ detail: { items } }: {
104
+ detail: {
105
+ items: any;
106
+ };
107
+ }): void;
108
+ _onEditResource(resource: any): void;
109
+ _onCloseDocumentation(): void;
110
+ _getCurrentResourceType(): any;
111
+ _onFetchDocumentation(): void;
112
+ get dirty(): any;
113
+ confirm(): any;
114
+ _onChangeResourceState(item: any, event: any): void;
115
+ _renderForm(): import("lit-html").TemplateResult<1>;
116
+ _renderDoc(): import("lit-html").TemplateResult<1>;
117
+ _renderBottom(): import("lit-html").TemplateResult<1> | undefined;
118
+ _onSearchResource({ detail }: {
119
+ detail: any;
120
+ }): void;
121
+ _filter: any;
122
+ _onClearResource(): void;
123
+ render(): import("lit-html").TemplateResult<1>;
124
+ }
125
+ export {};