@orangelogic/design-system 2.0.0-29DUO2-beta-3 → 2.0.0-29IORR-beta-2

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 (307) hide show
  1. package/library/chunks/{AxisLabelRadial.CgPb7ghO.js → AxisLabelRadial.Bs1P_q_F.js} +1 -1
  2. package/library/chunks/{BaseColumnSeries.B6rG-Ylz.js → BaseColumnSeries.C7jwOxIJ.js} +1 -1
  3. package/library/chunks/{CandlestickSeries.C-YfO-57.js → CandlestickSeries.CkXGtRWE.js} +2 -2
  4. package/library/chunks/{Circle.DhoXSsjo.js → Circle.DBa5Ok8V.js} +1 -1
  5. package/library/chunks/{ColumnSeries.CZi2LBZ2.js → ColumnSeries.DGazbfza.js} +2 -2
  6. package/library/chunks/{EditableAxisLabel.CykTMTsG.js → EditableAxisLabel.wN0t_G2B.js} +2 -2
  7. package/library/chunks/{EditableLabel.BlQ7B4D0.js → EditableLabel.BWeq6fgX.js} +1 -1
  8. package/library/chunks/{Gradient.BQ0JzFEe.js → Gradient.CdcsPIru.js} +1 -1
  9. package/library/chunks/{LinearGradient.DuVS2EHe.js → LinearGradient.B1z9AGUt.js} +2 -2
  10. package/library/chunks/{Picture.DRO0jnR6.js → Picture.YSPC0l0Q.js} +1 -1
  11. package/library/chunks/{Polygon.DEO3f_qs.js → Polygon.BwMvXN2H.js} +1 -1
  12. package/library/chunks/{ProgressPie.Bryx2w1J.js → ProgressPie.DlCwXN17.js} +5 -5
  13. package/library/chunks/{RadialLabel.TyXECvYG.js → RadialLabel.DyVOf2K8.js} +1 -1
  14. package/library/chunks/{Scrollbar.DK48nKk4.js → Scrollbar.BdZVb_Z-.js} +1 -1
  15. package/library/chunks/{Slice.DbXRplXx.js → Slice.DiEswWa6.js} +1 -1
  16. package/library/chunks/{Slider.B27osQYu.js → Slider.C20No2z5.js} +1 -1
  17. package/library/chunks/{SpriteResizer.C4wFzD_x.js → SpriteResizer.DFnmcy0h.js} +1 -1
  18. package/library/chunks/{Triangle.BEmFiHyd.js → Triangle.BaOef7HV.js} +1 -1
  19. package/library/chunks/{ZoomTools.CBqjLDqb.js → ZoomTools.D5JPehoL.js} +1 -1
  20. package/library/chunks/{_baseUniq.Df-fLIBx.js → _baseUniq.BUihBa8c.js} +56 -53
  21. package/library/chunks/{am-chart.B_OdX4Q-.js → am-chart.H2jnOzFc.js} +254 -262
  22. package/library/chunks/{animation.DfUHRQry.js → animation.7ifl4x2S.js} +4 -8
  23. package/library/chunks/array.DCtvHiLS.js +81 -0
  24. package/library/chunks/asset.D7E0-cUV.js +460 -0
  25. package/library/chunks/{button.KnE3mcyM.js → button.CauAHfdl.js} +10 -45
  26. package/library/chunks/button.styles.CKqn956w.js +5 -0
  27. package/library/chunks/{capitalize.WSkCXkNE.js → capitalize.CNStXZBq.js} +1 -1
  28. package/library/chunks/{color-swatch-group.p3Sdqlat.js → color-swatch-group.D5BP2W3P.js} +50 -220
  29. package/library/chunks/{color-swatch.C0oPHfOu.js → color-swatch.2HS4bc3N.js} +20 -204
  30. package/library/chunks/{colorPicker.CJwbdhtn.js → colorPicker.06n6P3aK.js} +5 -5
  31. package/library/chunks/component.styles.CRO4Odto.js +5 -0
  32. package/library/chunks/confirm-popover.DmGAMS8X.js +121 -0
  33. package/library/chunks/{cropper.tSDgXKqJ.js → cropper.ZU2Dy-MM.js} +8182 -8540
  34. package/library/chunks/{dialog.DpZBbTCn.js → dialog.2UW1LNm1.js} +117 -314
  35. package/library/chunks/{dom.BQVKDNd8.js → dom.BslZF2Y_.js} +1 -1
  36. package/library/chunks/dot-pagination.DsAfSNzr.js +204 -0
  37. package/library/chunks/{endpoints.B7lcoc1N.js → endpoints.Fpyb8xvv.js} +214 -203
  38. package/library/chunks/{exporting.DCqJtW6l.js → exporting.Chnl3UWi.js} +2 -2
  39. package/library/chunks/file-on-demand.Dig_iVvx.js +1956 -0
  40. package/library/chunks/{flow.Ch1rU01m.js → flow.D2CqFQa7.js} +5 -5
  41. package/library/chunks/folder-select.BT1drT8C.js +775 -0
  42. package/library/chunks/form-control.styles.CaGWmeAS.js +5 -0
  43. package/library/chunks/{form.DgwYWi0O.js → form.CFc09rKh.js} +1 -1
  44. package/library/chunks/{gantt.rWdF_jmG.js → gantt.DSHD2gjO.js} +8 -8
  45. package/library/chunks/header.BePZwMCQ.js +170 -0
  46. package/library/chunks/{hierarchy.HoRJAu6S.js → hierarchy.DwVsMmsP.js} +5 -5
  47. package/library/chunks/{hub-connection.CfARlehM.js → hub-connection.Ot2odiCz.js} +1 -1
  48. package/library/chunks/{i18n.C0iakJkV.js → i18n.BFqTRDCA.js} +19 -12
  49. package/library/chunks/icon-button.rKe0N4VB.js +149 -0
  50. package/library/chunks/iframe.DznmlYpV.js +73 -0
  51. package/library/chunks/{image.C9avagDq.js → image.CEtCGsNL.js} +275 -488
  52. package/library/chunks/{index.D2JPKXqq.js → index.C9khsiad.js} +17 -17
  53. package/library/chunks/isObjectLike.z36Fu426.js +34 -0
  54. package/library/chunks/{isSymbol.huJ_Cvxt.js → isSymbol.L0C2ND_U.js} +1 -1
  55. package/library/chunks/{json.DHNMAC-m.js → json.zyETMOw-.js} +3 -3
  56. package/library/chunks/{list-editor.B2mFE9f7.js → list-editor.CJ96S1Np.js} +58 -372
  57. package/library/chunks/{map.BHmZ4Crx.js → map.CqM2O6LB.js} +2 -2
  58. package/library/chunks/option.COnEtd3X.js +123 -0
  59. package/library/chunks/{overlayscrollbars.XhGWx9Zk.js → overlayscrollbars.BMav4RQ4.js} +252 -958
  60. package/library/chunks/pagination.DaD9Yul6.js +334 -0
  61. package/library/chunks/{percent.CM9cr1H3.js → percent.DuQwbCCg.js} +3 -3
  62. package/library/chunks/{radar.CQUnnhGk.js → radar.FpYl3UH5.js} +4 -4
  63. package/library/chunks/{responsive.CrX-HUow.js → responsive.BndCeSg0.js} +1 -1
  64. package/library/chunks/{sliceGrouper.iv1p8MAK.js → sliceGrouper.BsE7fGMt.js} +1 -1
  65. package/library/chunks/{stock.CU0y6a5P.js → stock.BR-ag4Pt.js} +9 -9
  66. package/library/chunks/string.BigZhczf.js +185 -0
  67. package/library/chunks/{tab-group.05PY0smt.js → tab-group.0Po0eoxR.js} +33 -584
  68. package/library/chunks/{table.DNTm_GMS.js → table.WNd284in.js} +3535 -4852
  69. package/library/chunks/{timeline.yzdwtGKM.js → timeline.DkzkmgEM.js} +5 -5
  70. package/library/chunks/{toString.CRT5zqEU.js → toString.CL_lYXbK.js} +3 -3
  71. package/library/chunks/toast.B2cJgW5u.js +71 -0
  72. package/library/chunks/transformation.CzBptarI.js +140 -0
  73. package/library/chunks/{tree.CeMLCbs-.js → tree.QCQd_cuc.js} +32 -400
  74. package/library/chunks/typography.DJC_UXgs.js +52 -0
  75. package/library/chunks/url.Cj9cIQXJ.js +27 -0
  76. package/library/chunks/{venn.BOEi13la.js → venn.D739bOV3.js} +1 -1
  77. package/library/chunks/watch.BCJD77bD.js +547 -0
  78. package/library/chunks/{wc.V-lq02JF.js → wc.DzW311D-.js} +1 -1
  79. package/library/chunks/{xy.Df1hy9ac.js → xy.DCRDfTsa.js} +10 -10
  80. package/library/components/alert.js +11 -179
  81. package/library/components/am-chart.js +3 -3
  82. package/library/components/animated-image.js +13 -101
  83. package/library/components/animation.js +3 -3
  84. package/library/components/array-line-clamp.js +8 -89
  85. package/library/components/asset-link-format.js +718 -1380
  86. package/library/components/atoms.js +18 -18
  87. package/library/components/avatar.js +6 -95
  88. package/library/components/badge.js +11 -139
  89. package/library/components/bicolor-picker.js +4 -23
  90. package/library/components/border-input-group.js +5 -26
  91. package/library/components/breadcrumb-item.js +25 -156
  92. package/library/components/breadcrumb.js +4 -22
  93. package/library/components/button-group.js +3 -28
  94. package/library/components/button.js +6 -6
  95. package/library/components/card.js +4 -126
  96. package/library/components/checkbox.js +13 -254
  97. package/library/components/color-picker.js +57 -728
  98. package/library/components/color-swatch-group.js +9 -9
  99. package/library/components/color-swatch.js +5 -5
  100. package/library/components/confirm-popover.js +6 -6
  101. package/library/components/copy-button.js +11 -256
  102. package/library/components/corner-position-input-group.js +5 -58
  103. package/library/components/cropper.js +2 -2
  104. package/library/components/details.js +6 -152
  105. package/library/components/dialog.js +6 -6
  106. package/library/components/divider.js +6 -68
  107. package/library/components/dot-pagination.js +4 -4
  108. package/library/components/dot-status.js +25 -95
  109. package/library/components/drawer.js +11 -242
  110. package/library/components/dropdown.js +49 -151
  111. package/library/components/dynamic-select.js +10 -75
  112. package/library/components/e-chart.js +8 -51
  113. package/library/components/element-clamp.js +7 -80
  114. package/library/components/file-on-demand.js +13 -13
  115. package/library/components/folder-select.js +9 -7
  116. package/library/components/format-bytes.js +1 -1
  117. package/library/components/format-date.js +3 -7
  118. package/library/components/format-number.js +1 -1
  119. package/library/components/format-time.js +4 -14
  120. package/library/components/grid-item.js +5 -172
  121. package/library/components/grid.js +5 -41
  122. package/library/components/header.js +4 -4
  123. package/library/components/hub-connection.js +2 -2
  124. package/library/components/icon-button.js +14 -679
  125. package/library/components/icon.js +9 -2449
  126. package/library/components/iframe.js +4 -4
  127. package/library/components/image-comparer.js +9 -129
  128. package/library/components/image.js +4 -4
  129. package/library/components/include.js +3 -7
  130. package/library/components/input-group.js +4 -29
  131. package/library/components/input.js +358 -966
  132. package/library/components/line-clamp.js +7 -83
  133. package/library/components/list-editor.js +9 -9
  134. package/library/components/markdown.js +2 -4
  135. package/library/components/masonry.js +24 -223
  136. package/library/components/menu-item.js +155 -445
  137. package/library/components/menu-label.js +3 -20
  138. package/library/components/menu-section.js +3 -17
  139. package/library/components/menu.js +5 -113
  140. package/library/components/molecules.js +5 -5
  141. package/library/components/mutation-observer.js +3 -7
  142. package/library/components/option.js +4 -4
  143. package/library/components/organisms.js +2 -2
  144. package/library/components/padding-input-group.js +5 -16
  145. package/library/components/pagination.js +10 -8
  146. package/library/components/popup.js +385 -682
  147. package/library/components/position-picker.js +4 -94
  148. package/library/components/progress-bar.js +19 -136
  149. package/library/components/progress-ring.js +4 -95
  150. package/library/components/qr-code.js +5 -17
  151. package/library/components/radio-button.js +5 -25
  152. package/library/components/radio-card.js +8 -176
  153. package/library/components/radio-group.js +22 -153
  154. package/library/components/radio.js +14 -171
  155. package/library/components/range.js +123 -660
  156. package/library/components/rating.js +58 -238
  157. package/library/components/relative-time.js +3 -13
  158. package/library/components/resize-observer.js +4 -8
  159. package/library/components/select.js +305 -1012
  160. package/library/components/shadow-input-group.js +5 -24
  161. package/library/components/share-option-list.js +21 -313
  162. package/library/components/sidebar.js +15 -221
  163. package/library/components/size-input-group.js +12 -77
  164. package/library/components/skeleton.js +7 -80
  165. package/library/components/space.js +6 -143
  166. package/library/components/spinner.js +7 -76
  167. package/library/components/split-panel.js +18 -125
  168. package/library/components/step.js +21 -272
  169. package/library/components/stepper-wizard.js +9 -43
  170. package/library/components/stepper.js +17 -34
  171. package/library/components/switch.js +13 -276
  172. package/library/components/tab-group.js +7 -7
  173. package/library/components/tab-panel.js +5 -32
  174. package/library/components/tab.js +11 -257
  175. package/library/components/table.js +8 -8
  176. package/library/components/tag.js +15 -166
  177. package/library/components/textarea.js +183 -504
  178. package/library/components/timecode.js +6 -25
  179. package/library/components/tooltip.js +10 -94
  180. package/library/components/tree-item.js +4 -4
  181. package/library/components/tree.js +4 -4
  182. package/library/components/typeface.js +24 -123
  183. package/library/components/types.js +37225 -47339
  184. package/library/components/typography.js +2 -2
  185. package/library/components/video.js +3875 -6263
  186. package/library/components/visually-hidden.js +3 -15
  187. package/library/package.json +4 -1
  188. package/library/packages/atoms/src/components/dialog/dialog.d.ts +10 -0
  189. package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +2 -1
  190. package/library/packages/atoms/src/components/image/image.d.ts +15 -1
  191. package/library/packages/atoms/src/components/input/auto-grow-controller.d.ts +23 -0
  192. package/library/packages/atoms/src/components/input/input.d.ts +10 -2
  193. package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +4 -0
  194. package/library/packages/atoms/src/components/pagination/pagination.d.ts +32 -2
  195. package/library/packages/atoms/src/components/popup/overlay/Overlay.d.ts +10 -0
  196. package/library/packages/atoms/src/components/popup/popup.d.ts +1 -1
  197. package/library/packages/atoms/src/components/select/select.d.ts +11 -0
  198. package/library/packages/atoms/src/components/table/table.d.ts +49 -8
  199. package/library/packages/atoms/src/components/table/tabulator-tables/core/Tabulator.d.ts +1 -0
  200. package/library/packages/atoms/src/components/table/tabulator-tables/core/TabulatorFull.d.ts +1 -0
  201. package/library/packages/atoms/src/components/table/tabulator-tables/core/tools/DataLoader.d.ts +3 -1
  202. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Ajax/Ajax.d.ts +1 -1
  203. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/Edit.d.ts +1 -0
  204. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/List.d.ts +40 -1
  205. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Filter/Filter.d.ts +10 -3
  206. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Filter/formatter-display-resolvers.d.ts +93 -0
  207. package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/Group.d.ts +8 -0
  208. package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupComponent.d.ts +3 -1
  209. package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupLoadMore.d.ts +7 -0
  210. package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupRows.d.ts +2 -0
  211. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Page/Page.d.ts +2 -2
  212. package/library/packages/atoms/src/components/textarea/textarea.d.ts +19 -4
  213. package/library/packages/atoms/src/components/video/video.d.ts +3 -1
  214. package/library/packages/events/src/cx-asset-transformation-dialog-cancel.d.ts +6 -0
  215. package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +11 -0
  216. package/library/packages/events/src/cx-asset-transformation-dialog-delete.d.ts +6 -0
  217. package/library/packages/events/src/cx-bento-range-change.d.ts +9 -0
  218. package/library/packages/events/src/cx-content-builder-gallery-fetched.d.ts +10 -0
  219. package/library/packages/events/src/cx-lightbox-close.d.ts +6 -0
  220. package/library/packages/events/src/cx-lightbox-download.d.ts +11 -0
  221. package/library/packages/events/src/cx-unauthorized.d.ts +10 -0
  222. package/library/packages/events/src/cx-video-format-picker-delete.d.ts +6 -0
  223. package/library/packages/events/src/cx-video-format-picker-select.d.ts +8 -0
  224. package/library/packages/events/src/events.d.ts +11 -1
  225. package/library/packages/molecules/src/cropper/cropper.d.ts +2 -0
  226. package/library/packages/molecules/src/cropper/react/Cropper.d.ts +2 -0
  227. package/library/packages/molecules/src/estimated-reading-time/estimated-reading-time.d.ts +3 -2
  228. package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +26 -0
  229. package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +46 -0
  230. package/library/packages/molecules/src/folder-select/folder-select.d.ts +25 -0
  231. package/library/packages/molecules/src/index.d.ts +1 -0
  232. package/library/packages/molecules/src/storybook/storybook.d.ts +60 -23
  233. package/library/packages/molecules/src/timeline/timeline.d.ts +14 -0
  234. package/library/packages/molecules/src/video-format-picker/video-format-picker.d.ts +55 -0
  235. package/library/packages/molecules/src/video-format-picker/video-format-picker.styles.d.ts +2 -0
  236. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +9 -1
  237. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +7 -7
  238. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +95 -0
  239. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.styles.d.ts +2 -0
  240. package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +57 -26
  241. package/library/packages/organisms/src/bento-grid/bento-layout.d.ts +44 -0
  242. package/library/packages/organisms/src/carousel/carousel.d.ts +5 -1
  243. package/library/packages/organisms/src/comment/comment.d.ts +1 -0
  244. package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +7 -0
  245. package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +11 -0
  246. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +10 -0
  247. package/library/packages/organisms/src/content-builder/components/folder-picker/folder-picker.d.ts +6 -0
  248. package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +6 -2
  249. package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +6 -2
  250. package/library/packages/organisms/src/content-builder/configs/image.d.ts +7 -4
  251. package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +5 -2
  252. package/library/packages/organisms/src/content-builder/configs/video.d.ts +11 -2
  253. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +45 -4
  254. package/library/packages/organisms/src/content-builder/content-builder.d.ts +13 -0
  255. package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +45 -1
  256. package/library/packages/organisms/src/content-builder/styleController.d.ts +20 -2
  257. package/library/packages/organisms/src/index.d.ts +2 -0
  258. package/library/packages/organisms/src/lightbox/lightbox.d.ts +79 -0
  259. package/library/packages/organisms/src/lightbox/lightbox.styles.d.ts +2 -0
  260. package/library/packages/services/src/api/asset/asset.d.ts +3 -2
  261. package/library/packages/services/src/api/asset/asset.types.d.ts +84 -0
  262. package/library/packages/services/src/api/asset/asset.utils.d.ts +9 -0
  263. package/library/packages/services/src/api/endpoints.d.ts +1 -1
  264. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
  265. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +17 -5
  266. package/library/packages/types/src/asset-click-action.d.ts +3 -1
  267. package/library/packages/types/src/bento-grid.d.ts +37 -0
  268. package/library/packages/types/src/content-builder.d.ts +27 -1
  269. package/library/packages/types/src/gallery.d.ts +0 -6
  270. package/library/packages/types/src/icon-button.d.ts +7 -0
  271. package/library/packages/types/src/menu-item.d.ts +33 -0
  272. package/library/packages/types/src/storybook.d.ts +19 -0
  273. package/library/packages/types/src/table.d.ts +37 -1
  274. package/library/packages/types/src/textarea.d.ts +4 -0
  275. package/library/packages/types/src/video-format-picker.d.ts +11 -0
  276. package/library/packages/utils/src/actions/asset-click.d.ts +1 -3
  277. package/library/packages/utils/src/custom-element/i18n.d.ts +10 -3
  278. package/library/packages/utils/src/index.d.ts +1 -0
  279. package/library/packages/utils/src/string/string.d.ts +33 -0
  280. package/library/packages/utils/src/transformation/index.d.ts +1 -0
  281. package/library/packages/utils/src/url/url.d.ts +9 -0
  282. package/library/react-web-component.d.ts +293 -29
  283. package/library/utils.js +483 -178
  284. package/package.json +4 -1
  285. package/library/chunks/_baseRest.ClTMQtN1.js +0 -67
  286. package/library/chunks/asset.CG_yXtWK.js +0 -288
  287. package/library/chunks/button.styles.Dl5IQLHU.js +0 -718
  288. package/library/chunks/component.styles.DMSLciL5.js +0 -71
  289. package/library/chunks/confirm-popover.zmOFI4e-.js +0 -288
  290. package/library/chunks/content-builder.D_phDrlo.js +0 -127
  291. package/library/chunks/dot-pagination.COBkyhoJ.js +0 -325
  292. package/library/chunks/file-on-demand.CbE-qsiP.js +0 -3740
  293. package/library/chunks/folder-select.Bl_WkhVE.js +0 -844
  294. package/library/chunks/form-control.styles.CUGhvlfT.js +0 -67
  295. package/library/chunks/header.BduX6KJP.js +0 -777
  296. package/library/chunks/identity.ByMq8VxU.js +0 -6
  297. package/library/chunks/iframe.BPKV2K7z.js +0 -160
  298. package/library/chunks/index.B3wJT3XS.js +0 -373
  299. package/library/chunks/isObjectLike.D3cpZO39.js +0 -81
  300. package/library/chunks/option.DnpkE8Xi.js +0 -296
  301. package/library/chunks/pagination.C30LoTya.js +0 -341
  302. package/library/chunks/string.B_rEG27K.js +0 -160
  303. package/library/chunks/toast.BXNbwZV8.js +0 -25
  304. package/library/chunks/typography.oDzoLbZS.js +0 -149
  305. package/library/chunks/url.LjsR2sB5.js +0 -15
  306. package/library/chunks/watch.q1sEjPWL.js +0 -501
  307. /package/library/packages/{organisms/src/asset-link-format/asset-link-format.utils.d.ts → utils/src/transformation/transformation.d.ts} +0 -0
@@ -1,238 +1,56 @@
1
- import "../chunks/cropper.tSDgXKqJ.js";
2
- import { C as q } from "../chunks/button.KnE3mcyM.js";
3
- import H from "./space.js";
4
- import { C as W } from "../chunks/typography.oDzoLbZS.js";
5
- import { n as l, C as F } from "../chunks/lib-cortex-element.CVMmyPMC.js";
6
- import { b as rt, c as ht } from "../chunks/asset.CG_yXtWK.js";
7
- import { c as E } from "../chunks/component.styles.DMSLciL5.js";
8
- import { T as c, U as o } from "../chunks/asset-link-format.BSRDqHg7.js";
9
- import { c as N } from "../chunks/custom-element.L4WJXn1j.js";
10
- import { L as O } from "../chunks/i18n.C0iakJkV.js";
11
- import { w as k } from "../chunks/watch.q1sEjPWL.js";
12
- import { s as it, c as st } from "../chunks/number.CjNxU7Xs.js";
13
- import { i as D, x as b, E as lt } from "../chunks/lit-element.jLBm65_O.js";
14
- import { r as z } from "../chunks/state.CSDxrqLd.js";
15
- import { n as G } from "../chunks/when.Dr1es41R.js";
16
- import L from "./details.js";
17
- import nt from "./divider.js";
18
- import j from "./icon.js";
19
- import K from "./icon-button.js";
20
- import tt from "./input.js";
21
- import { C as X } from "../chunks/option.DnpkE8Xi.js";
22
- import Y from "./select.js";
23
- import { c as ct } from "../chunks/image.mbpyiQpQ.js";
24
- import { e as T } from "../chunks/query.BBf1UFkC.js";
25
- import { c as Q } from "../chunks/repeat.DbF2p5ae.js";
26
- import { o as M } from "../chunks/style-map.llVFPd__.js";
27
- import at from "./tooltip.js";
28
- import pt from "./button-group.js";
29
- import dt from "./checkbox.js";
30
- const ut = D`
31
- .asset-link-format__details {
32
- --header-padding: var(--cx-spacing-small) var(--cx-spacing-medium);
33
- }
34
-
35
- .asset-link-format__details::part(icon) {
36
- width: var(--cx-font-size-3x-large);
37
- height: var(--cx-font-size-3x-large);
38
- display: flex;
39
- align-items: center;
40
- justify-content: center;
41
- background-color: var(--cx-color-neutral-100);
42
- border-radius: var(--cx-border-radius-large);
43
- color: var(--cx-color-neutral-600);
44
- font-size: var(--cx-font-size-large);
45
- }
46
-
47
- .asset-link-format__details::part(input-label) {
48
- color: var(--cx-color-neutral-400);
49
- margin-inline-start: var(--cx-spacing-small);
50
- }
51
-
52
- .asset-link-format__header {
53
- padding: var(--cx-spacing-medium);
54
- }
55
-
56
- .asset-link-format__section-header {
57
- padding: 0 var(--cx-spacing-medium);
58
- border-top: solid 1px var(--cx-color-neutral-200);
59
- background-color: var(--cx-color-neutral-50);
60
- }
61
-
62
- .asset-link-format__undo {
63
- --color: var(--cx-color-primary);
64
- --background-color: transparent;
65
- }
66
- `;
67
- function J({
68
- asset: t,
69
- baseUrl: e,
70
- extension: i,
71
- parameters: s,
72
- transformations: a,
73
- useSession: h = ""
74
- }) {
75
- let r = e;
76
- a && a.length > 0 && (r += "/t/");
77
- const m = a?.findLast(
78
- (v) => v.key === c.Quality
79
- );
80
- m && (a = [
81
- ...a?.filter(
82
- (v) => v.key !== c.Quality
83
- ) || [],
84
- m
85
- ]), a?.forEach(({ key: v, value: w }) => {
86
- if (v === c.Resize) {
87
- const x = [
88
- ...[
89
- {
90
- key: "re_w_",
91
- value: Math.round(w.width ?? 0)
92
- },
93
- {
94
- key: "re_h_",
95
- value: Math.round(w.height ?? 0)
96
- }
97
- ].filter((n) => n.value !== void 0).map((n) => ({
98
- key: n.key,
99
- value: Math.round(Number(n.value))
100
- })),
101
- {
102
- key: "re_rm_",
103
- value: "stretch"
104
- }
105
- ];
106
- x.forEach(({ key: n, value: $ }, B) => {
107
- r += `${n}${$}${B < x.length - 1 ? "," : ""}`;
108
- }), r += "/";
109
- }
110
- if (v === c.Crop) {
111
- const x = [
112
- ...[
113
- {
114
- key: "c_",
115
- value: w.mode
116
- },
117
- ...w.disabledSize ? [] : [
118
- {
119
- key: "c_w_",
120
- value: Math.round(w.width ?? 0)
121
- },
122
- {
123
- key: "c_h_",
124
- value: Math.round(w.height ?? 0)
125
- },
126
- {
127
- key: "c_x_",
128
- value: Math.round(w.x ?? 0)
129
- },
130
- {
131
- key: "c_y_",
132
- value: Math.round(w.y ?? 0)
133
- }
134
- ]
135
- ].filter((n) => n.value !== void 0 && n.value !== null).map((n) => ({
136
- key: n.key,
137
- value: n.value
138
- })),
139
- {
140
- key: "c_whu_",
141
- value: "pixel"
142
- }
143
- ];
144
- x.forEach(({ key: n, value: $ }, B) => {
145
- const ot = ["c_w_", "c_h_", "c_x_", "c_y_"].includes(n);
146
- r += `${n}${ot ? Math.round(Number($)) : $}${B < x.length - 1 ? "," : ""}`;
147
- }), r += "/";
148
- }
149
- if (v === c.Rotate && ([
150
- {
151
- key: "r_a_",
152
- value: w.rotation
153
- }
154
- ].filter((n) => n.value !== void 0).map((n) => ({
155
- key: n.key,
156
- value: Math.round(Number(n.value))
157
- })).forEach(({ key: n, value: $ }) => {
158
- r += `${n}${$}`;
159
- }), r += "/"), v === c.Quality) {
160
- const x = [
161
- {
162
- key: "q_level_",
163
- value: w.quality
164
- }
165
- ].filter((n) => n.value !== void 0).map((n) => ({
166
- key: n.key,
167
- value: Math.round(Number(n.value))
168
- }));
169
- x.forEach(({ key: n, value: $ }, B) => {
170
- r += `${n}${$}${B < x.length - 1 ? "," : ""}`;
171
- }), r += "/";
172
- }
173
- if (v === c.Metadata) {
174
- const x = [
175
- {
176
- key: "fl_keep_metadata",
177
- value: w.keepMetadata
178
- }
179
- ].filter((n) => n.value !== void 0).map((n) => ({ key: n.key, value: n.value }));
180
- x.forEach(({ key: n }, $) => {
181
- r += `${n}${$ < x.length - 1 ? "," : ""}`;
182
- }), r += "/";
183
- }
184
- }), i && (r += `${t?.identifier}${i}`);
185
- const y = [];
186
- return s && s.length > 0 && s.forEach(({ key: v, value: w }) => {
187
- y.push(
188
- `${encodeURIComponent(v.trim())}=${encodeURIComponent(w.trim())}`
189
- );
190
- }), y.length > 0 && (r += `?${y.join("&")}`), r.endsWith("/") && (r = r.slice(0, -1)), r;
191
- }
192
- const gt = D`
193
- cx-details::part(base) {
194
- border-bottom-width: 0;
195
- }
196
-
197
- cx-space {
198
- width: 100%;
199
- }
200
-
201
- cx-space cx-input {
202
- flex: 1;
203
- }
204
-
205
- .crop__unit-select {
206
- width: 120px;
207
- }
208
-
209
- .crop__input-group {
210
- display: flex;
211
- flex: 1;
212
- }
213
- `;
214
- var mt = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, g = (t, e, i, s) => {
215
- for (var a = s > 1 ? void 0 : s ? xt(e, i) : e, h = t.length - 1, r; h >= 0; h--)
216
- (r = t[h]) && (a = (s ? r(e, i, a) : r(a)) || a);
217
- return s && a && mt(e, i, a), a;
1
+ import "../chunks/cropper.ZU2Dy-MM.js";
2
+ import { C as D } from "../chunks/button.CauAHfdl.js";
3
+ import P from "./space.js";
4
+ import { C as H } from "../chunks/typography.DJC_UXgs.js";
5
+ import { n, C as _ } from "../chunks/lib-cortex-element.CVMmyPMC.js";
6
+ import { b as at, c as ot } from "../chunks/asset.D7E0-cUV.js";
7
+ import { c as W } from "../chunks/component.styles.CRO4Odto.js";
8
+ import { U as a, T as p } from "../chunks/asset-link-format.BSRDqHg7.js";
9
+ import { c as F } from "../chunks/custom-element.L4WJXn1j.js";
10
+ import { L as E } from "../chunks/i18n.BFqTRDCA.js";
11
+ import { w as S } from "../chunks/watch.BCJD77bD.js";
12
+ import { s as et, c as it } from "../chunks/number.CjNxU7Xs.js";
13
+ import { b as Y } from "../chunks/transformation.CzBptarI.js";
14
+ import { i as N, x as m, E as rt } from "../chunks/lit-element.jLBm65_O.js";
15
+ import { r as f } from "../chunks/state.CSDxrqLd.js";
16
+ import { n as R } from "../chunks/when.Dr1es41R.js";
17
+ import I from "./details.js";
18
+ import ht from "./divider.js";
19
+ import L from "./icon.js";
20
+ import { C as K } from "../chunks/icon-button.rKe0N4VB.js";
21
+ import Z from "./input.js";
22
+ import { C as Q } from "../chunks/option.COnEtd3X.js";
23
+ import G from "./select.js";
24
+ import { c as nt } from "../chunks/image.mbpyiQpQ.js";
25
+ import { e as V } from "../chunks/query.BBf1UFkC.js";
26
+ import { c as j } from "../chunks/repeat.DbF2p5ae.js";
27
+ import { o as C } from "../chunks/style-map.llVFPd__.js";
28
+ import st from "./tooltip.js";
29
+ import lt from "./button-group.js";
30
+ import ct from "./checkbox.js";
31
+ const pt = N`.asset-link-format__details{--header-padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__details::part(icon){width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__details::part(input-label){color:var(--cx-color-neutral-400);margin-inline-start:var(--cx-spacing-small)}.asset-link-format__header{padding:var(--cx-spacing-medium)}.asset-link-format__section-header{padding:0 var(--cx-spacing-medium);border-top:var(--section-header-border-width,1px) solid var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-50)}.asset-link-format__undo{--color:var(--cx-color-primary);--background-color:transparent}`, dt = N`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.crop__unit-select{width:120px}.crop__input-group{flex:1;display:flex}`;
32
+ var ut = Object.defineProperty, gt = Object.getOwnPropertyDescriptor, u = (t, e, i, s) => {
33
+ for (var o = s > 1 ? void 0 : s ? gt(e, i) : e, h = t.length - 1, r; h >= 0; h--)
34
+ (r = t[h]) && (o = (s ? r(e, i, o) : r(o)) || o);
35
+ return s && o && ut(e, i, o), o;
218
36
  };
219
- let d = class extends F {
37
+ let d = class extends _ {
220
38
  constructor() {
221
- super(...arguments), this.localize = new O(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = o.Pixel, this.disabledApply = !1, this.lastAppliedSetting = {
222
- [o.Pixel]: {
39
+ super(...arguments), this.localize = new E(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = a.Pixel, this.disabledApply = !1, this.lastAppliedSetting = {
40
+ [a.Pixel]: {
223
41
  height: 0,
224
42
  percentageHeight: 100,
225
43
  percentageWidth: 100,
226
- unit: o.Pixel,
44
+ unit: a.Pixel,
227
45
  width: 0,
228
46
  x: 0,
229
47
  y: 0
230
48
  },
231
- [o.AspectRatio]: {
49
+ [a.AspectRatio]: {
232
50
  height: 1,
233
51
  percentageHeight: 100,
234
52
  percentageWidth: 100,
235
- unit: o.AspectRatio,
53
+ unit: a.AspectRatio,
236
54
  width: 1,
237
55
  x: 0,
238
56
  y: 0
@@ -249,10 +67,10 @@ let d = class extends F {
249
67
  return;
250
68
  }
251
69
  if (this.keepAspectRatio) {
252
- if (this.unit === o.Pixel && this.width && this.height) {
70
+ if (this.unit === a.Pixel && this.width && this.height) {
253
71
  this.aspectRatio = this.width / this.height;
254
72
  return;
255
- } else if (this.unit === o.AspectRatio && this.ratioWidth && this.ratioHeight) {
73
+ } else if (this.unit === a.AspectRatio && this.ratioWidth && this.ratioHeight) {
256
74
  this.aspectRatio = this.ratioWidth / this.ratioHeight;
257
75
  return;
258
76
  }
@@ -264,12 +82,12 @@ let d = class extends F {
264
82
  this.aspectRatio = 1;
265
83
  }
266
84
  async handleOpenChange() {
267
- this.cropMode = "free", await this.updateComplete, this.open || (this.width = this.lastAppliedSetting[o.Pixel].width, this.height = this.lastAppliedSetting[o.Pixel].height, this.unit = o.Pixel, this.emit("cx-asset-link-format-crop-change", {
85
+ this.cropMode = "free", await this.updateComplete, this.open || (this.width = this.lastAppliedSetting[a.Pixel].width, this.height = this.lastAppliedSetting[a.Pixel].height, this.unit = a.Pixel, this.emit("cx-asset-link-format-crop-change", {
268
86
  detail: {
269
- height: this.lastAppliedSetting[o.Pixel].height,
87
+ height: this.lastAppliedSetting[a.Pixel].height,
270
88
  keepAspectRatio: this.keepAspectRatio,
271
- unit: o.Pixel,
272
- width: this.lastAppliedSetting[o.Pixel].width
89
+ unit: a.Pixel,
90
+ width: this.lastAppliedSetting[a.Pixel].width
273
91
  }
274
92
  }));
275
93
  }
@@ -280,9 +98,9 @@ let d = class extends F {
280
98
  }
281
99
  this.invalidWidth = !1;
282
100
  let e = Number(t.target.value);
283
- this.unit === o.Pixel && (e = Math.max(Math.min(e, this.maxWidth), 1)), t.target.value = e.toString();
284
- let i = this.unit === o.Pixel ? this.height : this.ratioHeight, s = !1;
285
- this.keepAspectRatio && (i = Math.round(e / this.aspectRatio), this.unit === o.Pixel && i > this.maxHeight && (i = this.maxHeight, s = !0)), this.invalidHeight = !1, this.emit("cx-asset-link-format-crop-change", {
101
+ this.unit === a.Pixel && (e = Math.max(Math.min(e, this.maxWidth), 1)), t.target.value = e.toString();
102
+ let i = this.unit === a.Pixel ? this.height : this.ratioHeight, s = !1;
103
+ this.keepAspectRatio && (i = Math.round(e / this.aspectRatio), this.unit === a.Pixel && i > this.maxHeight && (i = this.maxHeight, s = !0)), this.invalidHeight = !1, this.emit("cx-asset-link-format-crop-change", {
286
104
  detail: {
287
105
  breakAspectRatio: s,
288
106
  height: i,
@@ -299,9 +117,9 @@ let d = class extends F {
299
117
  }
300
118
  this.invalidHeight = !1;
301
119
  let e = Number(t.target.value);
302
- this.unit === o.Pixel && (e = Math.max(Math.min(e, this.maxHeight), 1)), t.target.value = e.toString();
303
- let i = this.unit === o.Pixel ? this.width : this.ratioWidth, s = !1;
304
- this.keepAspectRatio && (i = Math.round(e * this.aspectRatio), this.unit === o.Pixel && i > this.maxWidth && (i = this.maxWidth, s = !0)), this.invalidWidth = !1, this.emit("cx-asset-link-format-crop-change", {
120
+ this.unit === a.Pixel && (e = Math.max(Math.min(e, this.maxHeight), 1)), t.target.value = e.toString();
121
+ let i = this.unit === a.Pixel ? this.width : this.ratioWidth, s = !1;
122
+ this.keepAspectRatio && (i = Math.round(e * this.aspectRatio), this.unit === a.Pixel && i > this.maxWidth && (i = this.maxWidth, s = !0)), this.invalidWidth = !1, this.emit("cx-asset-link-format-crop-change", {
305
123
  detail: {
306
124
  breakAspectRatio: s,
307
125
  height: e,
@@ -316,38 +134,38 @@ let d = class extends F {
316
134
  if (e === "free")
317
135
  this.selectedMode?.auto && this.emit("cx-asset-link-format-crop-change", {
318
136
  detail: {
319
- height: this.lastAppliedSetting[o.Pixel].height,
137
+ height: this.lastAppliedSetting[a.Pixel].height,
320
138
  keepAspectRatio: !1,
321
139
  silent: !0,
322
- unit: o.Pixel,
323
- width: this.lastAppliedSetting[o.Pixel].width
140
+ unit: a.Pixel,
141
+ width: this.lastAppliedSetting[a.Pixel].width
324
142
  }
325
143
  });
326
144
  else if (!i) {
327
- const [s, a] = e.split(":").map(Number);
328
- if (this.unit === o.Pixel) {
329
- const { height: h, width: r } = ct(
145
+ const [s, o] = e.split(":").map(Number);
146
+ if (this.unit === a.Pixel) {
147
+ const { height: h, width: r } = nt(
330
148
  this.maxWidth,
331
149
  this.maxHeight,
332
150
  s,
333
- a
151
+ o
334
152
  );
335
153
  this.emit("cx-asset-link-format-crop-change", {
336
154
  detail: {
337
155
  height: h,
338
156
  keepAspectRatio: !0,
339
157
  silent: !0,
340
- unit: o.Pixel,
158
+ unit: a.Pixel,
341
159
  width: r
342
160
  }
343
161
  });
344
162
  } else
345
163
  this.emit("cx-asset-link-format-crop-change", {
346
164
  detail: {
347
- height: a,
165
+ height: o,
348
166
  keepAspectRatio: !0,
349
167
  silent: !0,
350
- unit: o.AspectRatio,
168
+ unit: a.AspectRatio,
351
169
  width: s
352
170
  }
353
171
  });
@@ -373,19 +191,19 @@ let d = class extends F {
373
191
  * This allows the parent component to update the crop settings accordingly.
374
192
  */
375
193
  onUnitChange(t) {
376
- t.target.value === o.AspectRatio ? this.emit("cx-asset-link-format-crop-change", {
194
+ t.target.value === a.AspectRatio ? this.emit("cx-asset-link-format-crop-change", {
377
195
  detail: {
378
- height: this.lastAppliedSetting[o.AspectRatio].height,
196
+ height: this.lastAppliedSetting[a.AspectRatio].height,
379
197
  keepAspectRatio: this.keepAspectRatio,
380
- unit: o.AspectRatio,
381
- width: this.lastAppliedSetting[o.AspectRatio].width
198
+ unit: a.AspectRatio,
199
+ width: this.lastAppliedSetting[a.AspectRatio].width
382
200
  }
383
201
  }) : this.emit("cx-asset-link-format-crop-change", {
384
202
  detail: {
385
- height: this.lastAppliedSetting[o.Pixel].height,
203
+ height: this.lastAppliedSetting[a.Pixel].height,
386
204
  keepAspectRatio: this.keepAspectRatio,
387
- unit: o.Pixel,
388
- width: this.lastAppliedSetting[o.Pixel].width
205
+ unit: a.Pixel,
206
+ width: this.lastAppliedSetting[a.Pixel].width
389
207
  }
390
208
  }), this.emit("cx-asset-link-format-crop-mode-change", {
391
209
  detail: {
@@ -428,262 +246,150 @@ let d = class extends F {
428
246
  }
429
247
  }), this.emit("cx-asset-link-format-crop-change", {
430
248
  detail: {
431
- height: this.unit === o.Pixel ? this.height : this.ratioHeight,
249
+ height: this.unit === a.Pixel ? this.height : this.ratioHeight,
432
250
  keepAspectRatio: !this.keepAspectRatio,
433
251
  unit: this.unit,
434
- width: this.unit === o.Pixel ? this.width : this.ratioWidth
252
+ width: this.unit === a.Pixel ? this.width : this.ratioWidth
435
253
  }
436
254
  });
437
255
  }
438
256
  render() {
439
257
  const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
440
- return b`<cx-details
441
- class="details"
442
- ?open=${this.open}
443
- @cx-show=${this.onShowDetails}
444
- @cx-hide=${this.onHideDetails}
445
- >
446
- <cx-space slot="summary" align-items="center">
447
- <div part="icon">
448
- <cx-icon name="crop"></cx-icon>
449
- </div>
450
- <cx-typography variant="body2">
451
- ${this.localize.term("crop")}
452
- </cx-typography>
453
- </cx-space>
454
- <cx-space direction="vertical" spacing="small">
455
- <cx-select
456
- data-testid="cx-asset-link-format-crop-mode"
457
- value=${this.cropMode}
458
- hoist
459
- style=${M({
258
+ return m`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${C({
460
259
  width: "100%"
461
- })}
462
- @cx-change=${this.onCropModeChange}
463
- ?disabled=${this.loading}
464
- >
465
- ${Q(
260
+ })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${j(
466
261
  t,
467
262
  (i) => i.value,
468
- ({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
263
+ ({ label: i, value: s }) => m`<cx-option value=${s}>${i}</cx-option>`
469
264
  )}
470
- ${G(
265
+ ${R(
471
266
  e.length > 0,
472
- () => b`<cx-divider></cx-divider>
473
- <small>${this.localize.term("autoCropping")}</small>`
267
+ () => m`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
474
268
  )}
475
- ${Q(
269
+ ${j(
476
270
  e,
477
271
  (i) => i.value,
478
- ({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
479
- )}
480
- </cx-select>
481
- <cx-space spacing="small">
482
- <div class="crop__input-group">
483
- <cx-input
484
- data-testid="cx-asset-link-format-crop-width"
485
- placeholder=${this.localize.term("width")}
486
- type="number"
487
- step="1"
488
- value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()}
489
- @cx-change=${this.handleInputChange}
490
- @cx-input=${this.handleWidthChange}
491
- required
492
- ?disabled=${this.loading}
493
- >
494
- <cx-typography slot="prefix" variant="body3" part="input-label">
272
+ ({ label: i, value: s }) => m`<cx-option value=${s}>${i}</cx-option>`
273
+ )}</cx-select><cx-space spacing="small"><div class="crop__input-group"><cx-input data-testid="cx-asset-link-format-crop-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === a.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-change=${this.handleInputChange} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
495
274
  W
496
- </cx-typography>
497
- </cx-input>
498
- <cx-icon-button
499
- data-testid="cx-asset-link-format-crop-aspect-ratio"
500
- name=${this.keepAspectRatio ? "insert_link" : "link_off"}
501
- @click=${this.handleAspectRatioClick}
502
- style=${M({
275
+ </cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${C({
503
276
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
504
- })}
505
- ?disabled=${this.loading}
506
- ></cx-icon-button>
507
- <cx-input
508
- data-testid="cx-asset-link-format-crop-height"
509
- placeholder=${this.localize.term("height")}
510
- type="number"
511
- step="1"
512
- value=${this.unit === o.Pixel ? this.height.toString() : this.ratioHeight.toString()}
513
- ?disabled=${this.loading}
514
- @cx-change=${this.handleInputChange}
515
- @cx-input=${this.handleHeightChange}
516
- required
517
- >
518
- <cx-typography slot="prefix" variant="body3" part="input-label">
277
+ })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-crop-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === a.Pixel ? this.height.toString() : this.ratioHeight.toString()} ?disabled=${this.loading} @cx-change=${this.handleInputChange} @cx-input=${this.handleHeightChange} required><cx-typography slot="prefix" variant="body3" part="input-label">
519
278
  H
520
- </cx-typography>
521
- </cx-input>
522
- </div>
523
- <cx-select
524
- data-testid="cx-asset-link-format-crop-unit"
525
- value=${this.unit}
526
- hoist
527
- class="crop__unit-select"
528
- ?disabled=${this.loading}
529
- @cx-change=${this.onUnitChange}
530
- >
531
- <cx-option value=${o.Pixel}>
532
- ${this.localize.term("pixels")}
533
- </cx-option>
534
- <cx-option value=${o.AspectRatio}>
535
- ${this.localize.term("aspectRatio")}
536
- </cx-option>
537
- </cx-select>
538
- </cx-space>
539
- ${G(
279
+ </cx-typography></cx-input></div><cx-select data-testid="cx-asset-link-format-crop-unit" value=${this.unit} hoist class="crop__unit-select" ?disabled=${this.loading} @cx-change=${this.onUnitChange}><cx-option value=${a.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${a.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select></cx-space>${R(
540
280
  this.focusModes.length > 0,
541
- () => b`
542
- <cx-select
543
- data-testid="cx-asset-link-format-crop-focus-mode"
544
- value=${this.focusMode}
545
- hoist
546
- style=${M({
281
+ () => m`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${C({
547
282
  width: "100%"
548
- })}
549
- @cx-change=${this.onFocusModeChange}
550
- ?disabled=${this.loading || this.selectedMode?.disabledSize}
551
- >
552
- ${Q(
283
+ })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${j(
553
284
  this.focusModes,
554
285
  (i) => i.value,
555
- ({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
556
- )}
557
- </cx-select>
558
- `
559
- )}
560
- <cx-button
561
- data-testid="cx-asset-link-format-crop-apply"
562
- variant="primary"
563
- ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth}
564
- ?loading=${this.loading}
565
- style=${M({
286
+ ({ label: i, value: s }) => m`<cx-option value=${s}>${i}</cx-option>`
287
+ )}</cx-select>`
288
+ )}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${C({
566
289
  marginLeft: "auto"
567
- })}
568
- @click=${this.handleApply}
569
- >
570
- ${this.localize.term("apply")}
571
- </cx-button>
572
- </cx-space>
573
- </cx-details>`;
290
+ })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
574
291
  }
575
292
  };
576
- d.styles = [E, gt];
293
+ d.styles = [W, dt];
577
294
  d.dependencies = {
578
- "cx-button": q,
579
- "cx-details": L,
580
- "cx-divider": nt,
581
- "cx-icon": j,
295
+ "cx-button": D,
296
+ "cx-details": I,
297
+ "cx-divider": ht,
298
+ "cx-icon": L,
582
299
  "cx-icon-button": K,
583
- "cx-input": tt,
584
- "cx-option": X,
585
- "cx-select": Y,
586
- "cx-space": H,
587
- "cx-typography": W
300
+ "cx-input": Z,
301
+ "cx-option": Q,
302
+ "cx-select": G,
303
+ "cx-space": P,
304
+ "cx-typography": H
588
305
  };
589
- g([
590
- T(".details")
306
+ u([
307
+ V(".details")
591
308
  ], d.prototype, "base", 2);
592
- g([
593
- l({ reflect: !0, type: Boolean })
309
+ u([
310
+ n({ reflect: !0, type: Boolean })
594
311
  ], d.prototype, "open", 2);
595
- g([
596
- l({ reflect: !0, type: Number })
312
+ u([
313
+ n({ reflect: !0, type: Number })
597
314
  ], d.prototype, "width", 2);
598
- g([
599
- l({ reflect: !0, type: Number })
315
+ u([
316
+ n({ reflect: !0, type: Number })
600
317
  ], d.prototype, "height", 2);
601
- g([
602
- l({ attribute: "max-width", reflect: !0, type: Number })
318
+ u([
319
+ n({ attribute: "max-width", reflect: !0, type: Number })
603
320
  ], d.prototype, "maxWidth", 2);
604
- g([
605
- l({ attribute: "max-height", reflect: !0, type: Number })
321
+ u([
322
+ n({ attribute: "max-height", reflect: !0, type: Number })
606
323
  ], d.prototype, "maxHeight", 2);
607
- g([
608
- l({ attribute: "ratio-width", reflect: !0, type: Number })
324
+ u([
325
+ n({ attribute: "ratio-width", reflect: !0, type: Number })
609
326
  ], d.prototype, "ratioWidth", 2);
610
- g([
611
- l({ attribute: "ratio-height", reflect: !0, type: Number })
327
+ u([
328
+ n({ attribute: "ratio-height", reflect: !0, type: Number })
612
329
  ], d.prototype, "ratioHeight", 2);
613
- g([
614
- l({ attribute: "percentage-width", reflect: !0, type: Number })
330
+ u([
331
+ n({ attribute: "percentage-width", reflect: !0, type: Number })
615
332
  ], d.prototype, "percentageWidth", 2);
616
- g([
617
- l({ attribute: "percentage-height", reflect: !0, type: Number })
333
+ u([
334
+ n({ attribute: "percentage-height", reflect: !0, type: Number })
618
335
  ], d.prototype, "percentageHeight", 2);
619
- g([
620
- l({ reflect: !0, type: String })
336
+ u([
337
+ n({ reflect: !0, type: String })
621
338
  ], d.prototype, "unit", 2);
622
- g([
623
- l({ attribute: "disabled-apply", reflect: !0, type: Boolean })
339
+ u([
340
+ n({ attribute: "disabled-apply", reflect: !0, type: Boolean })
624
341
  ], d.prototype, "disabledApply", 2);
625
- g([
626
- l({ attribute: "last-applied-setting", reflect: !1, type: Object })
342
+ u([
343
+ n({ attribute: "last-applied-setting", reflect: !1, type: Object })
627
344
  ], d.prototype, "lastAppliedSetting", 2);
628
- g([
629
- l({ reflect: !0, type: Boolean })
345
+ u([
346
+ n({ reflect: !0, type: Boolean })
630
347
  ], d.prototype, "loading", 2);
631
- g([
632
- l({ attribute: "crop-modes", reflect: !1, type: Array })
348
+ u([
349
+ n({ attribute: "crop-modes", reflect: !1, type: Array })
633
350
  ], d.prototype, "cropModes", 2);
634
- g([
635
- l({ attribute: "focus-modes", reflect: !1, type: Object })
351
+ u([
352
+ n({ attribute: "focus-modes", reflect: !1, type: Object })
636
353
  ], d.prototype, "focusModes", 2);
637
- g([
638
- l({ attribute: "focus-mode", reflect: !0, type: String })
354
+ u([
355
+ n({ attribute: "focus-mode", reflect: !0, type: String })
639
356
  ], d.prototype, "focusMode", 2);
640
- g([
641
- l({ attribute: "crop-mode", reflect: !0, type: String })
357
+ u([
358
+ n({ attribute: "crop-mode", reflect: !0, type: String })
642
359
  ], d.prototype, "cropMode", 2);
643
- g([
644
- l({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
360
+ u([
361
+ n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
645
362
  ], d.prototype, "keepAspectRatio", 2);
646
- g([
647
- z()
363
+ u([
364
+ f()
648
365
  ], d.prototype, "invalidWidth", 2);
649
- g([
650
- z()
366
+ u([
367
+ f()
651
368
  ], d.prototype, "invalidHeight", 2);
652
- g([
653
- z()
369
+ u([
370
+ f()
654
371
  ], d.prototype, "aspectRatio", 2);
655
- g([
656
- k("cropMode", { waitUntilFirstUpdate: !0 }),
657
- k("maxWidth", { waitUntilFirstUpdate: !0 }),
658
- k("maxHeight", { waitUntilFirstUpdate: !0 }),
659
- k("keepAspectRatio")
372
+ u([
373
+ S("cropMode", { waitUntilFirstUpdate: !0 }),
374
+ S("maxWidth", { waitUntilFirstUpdate: !0 }),
375
+ S("maxHeight", { waitUntilFirstUpdate: !0 }),
376
+ S("keepAspectRatio")
660
377
  ], d.prototype, "handleCropModeChange", 1);
661
- g([
662
- k("open")
378
+ u([
379
+ S("open")
663
380
  ], d.prototype, "handleOpenChange", 1);
664
- d = g([
665
- N("cx-asset-link-format-crop")
381
+ d = u([
382
+ F("cx-asset-link-format-crop")
666
383
  ], d);
667
- const ft = D`
668
- .extension {
669
- padding: var(--cx-spacing-small) var(--cx-spacing-medium);
670
- border: solid 1px var(--cx-color-neutral-200);
671
- background-color: var(--cx-color-neutral-0);
672
-
673
- cx-select {
674
- flex: 1;
675
- width: 100%;
676
- }
677
- }
678
- `;
679
- var yt = Object.defineProperty, vt = Object.getOwnPropertyDescriptor, et = (t, e, i, s) => {
680
- for (var a = s > 1 ? void 0 : s ? vt(e, i) : e, h = t.length - 1, r; h >= 0; h--)
681
- (r = t[h]) && (a = (s ? r(e, i, a) : r(a)) || a);
682
- return s && a && yt(e, i, a), a;
384
+ const mt = N`.extension{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border:solid 1px var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-0);& cx-select{flex:1;width:100%}}`;
385
+ var xt = Object.defineProperty, ft = Object.getOwnPropertyDescriptor, J = (t, e, i, s) => {
386
+ for (var o = s > 1 ? void 0 : s ? ft(e, i) : e, h = t.length - 1, r; h >= 0; h--)
387
+ (r = t[h]) && (o = (s ? r(e, i, o) : r(o)) || o);
388
+ return s && o && xt(e, i, o), o;
683
389
  };
684
- let U = class extends F {
390
+ let O = class extends _ {
685
391
  constructor() {
686
- super(...arguments), this.localize = new O(this), this.value = "", this.items = [];
392
+ super(...arguments), this.localize = new E(this), this.value = "", this.items = [];
687
393
  }
688
394
  handleExtensionChange(t) {
689
395
  const e = t.target.value;
@@ -692,59 +398,38 @@ let U = class extends F {
692
398
  });
693
399
  }
694
400
  render() {
695
- return b`
696
- <cx-space direction="vertical" spacing="small" class="extension">
697
- <cx-typography variant="body2">
698
- ${this.localize.term("extension")}
699
- </cx-typography>
700
- <cx-select
701
- data-label=${this.localize.term("extension")}
702
- data-testid="cx-asset-link-format-extension-select"
703
- value=${this.value}
704
- hoist
705
- @cx-change=${this.handleExtensionChange}
706
- >
707
- ${Q(
401
+ return m`<cx-space direction="vertical" spacing="small" class="extension"><cx-typography variant="body2">${this.localize.term("extension")}</cx-typography><cx-select data-label=${this.localize.term("extension")} data-testid="cx-asset-link-format-extension-select" value=${this.value} hoist @cx-change=${this.handleExtensionChange}>${j(
708
402
  this.items,
709
403
  (t) => t.value,
710
- (t) => b`
711
- <cx-option value=${t.value}>${t.displayName}</cx-option>
712
- `
713
- )}
714
- </cx-select>
715
- </cx-space>
716
- `;
404
+ (t) => m`<cx-option value=${t.value}>${t.displayName}</cx-option>`
405
+ )}</cx-select></cx-space>`;
717
406
  }
718
407
  };
719
- U.styles = [E, ft];
720
- U.dependencies = {
721
- "cx-option": X,
722
- "cx-select": Y,
723
- "cx-space": H,
724
- "cx-typography": W
408
+ O.styles = [W, mt];
409
+ O.dependencies = {
410
+ "cx-option": Q,
411
+ "cx-select": G,
412
+ "cx-space": P,
413
+ "cx-typography": H
725
414
  };
726
- et([
727
- l({ reflect: !0, type: String })
728
- ], U.prototype, "value", 2);
729
- et([
730
- l({ reflect: !1, type: Array })
731
- ], U.prototype, "items", 2);
732
- U = et([
733
- N("cx-asset-link-format-extension")
734
- ], U);
735
- const wt = D`
736
- cx-details::part(base) {
737
- border-bottom-width: 0;
738
- }
739
- `;
740
- var zt = Object.defineProperty, St = Object.getOwnPropertyDescriptor, _ = (t, e, i, s) => {
741
- for (var a = s > 1 ? void 0 : s ? St(e, i) : e, h = t.length - 1, r; h >= 0; h--)
742
- (r = t[h]) && (a = (s ? r(e, i, a) : r(a)) || a);
743
- return s && a && zt(e, i, a), a;
415
+ J([
416
+ n({ reflect: !0, type: String })
417
+ ], O.prototype, "value", 2);
418
+ J([
419
+ n({ reflect: !1, type: Array })
420
+ ], O.prototype, "items", 2);
421
+ O = J([
422
+ F("cx-asset-link-format-extension")
423
+ ], O);
424
+ const yt = N`cx-details::part(base){border-bottom-width:0}`;
425
+ var zt = Object.defineProperty, St = Object.getOwnPropertyDescriptor, A = (t, e, i, s) => {
426
+ for (var o = s > 1 ? void 0 : s ? St(e, i) : e, h = t.length - 1, r; h >= 0; h--)
427
+ (r = t[h]) && (o = (s ? r(e, i, o) : r(o)) || o);
428
+ return s && o && zt(e, i, o), o;
744
429
  };
745
- let C = class extends F {
430
+ let w = class extends _ {
746
431
  constructor() {
747
- super(...arguments), this.localize = new O(this), this.open = !1, this.value = "", this.items = [], this.loading = !1, this.scopedValue = "";
432
+ super(...arguments), this.localize = new E(this), this.open = !1, this.value = "", this.items = [], this.loading = !1, this.scopedValue = "";
748
433
  }
749
434
  handleValueChange() {
750
435
  this.scopedValue = this.value;
@@ -788,105 +473,61 @@ let C = class extends F {
788
473
  t.target !== this.base && t.stopPropagation();
789
474
  }
790
475
  render() {
791
- return b`
792
- <cx-details
793
- class="details"
794
- ?open=${this.open}
795
- @cx-show=${this.onShowDetails}
796
- @cx-hide=${this.onHideDetails}
797
- >
798
- <cx-space slot="summary" align-items="center">
799
- <div part="icon">
800
- <cx-icon name="photo_size_select_large"></cx-icon>
801
- </div>
802
- <cx-typography variant="body2">
803
- ${this.localize.term("format")}
804
- </cx-typography>
805
- </cx-space>
806
- <cx-space direction="vertical" spacing="small" class="format">
807
- <cx-select
808
- data-label=${this.localize.term("imageFormat")}
809
- data-testid="cx-asset-link-format-proxy-select"
810
- value=${this.scopedValue}
811
- hoist
812
- @cx-change=${this.handleProxyChange}
813
- ?disabled=${this.loading}
814
- >
815
- ${Q(
476
+ return m`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="photo_size_select_large"></cx-icon></div><cx-typography variant="body2">${this.localize.term("format")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small" class="format"><cx-select data-label=${this.localize.term("imageFormat")} data-testid="cx-asset-link-format-proxy-select" value=${this.scopedValue} hoist @cx-change=${this.handleProxyChange} ?disabled=${this.loading}>${j(
816
477
  this.items,
817
478
  (t) => t.id,
818
- (t) => b`
819
- <cx-option value=${t.id}>${t.proxyLabel}</cx-option>
820
- `
821
- )}
822
- </cx-select>
823
- <cx-button
824
- data-testid="cx-asset-link-format-proxy-apply"
825
- variant="primary"
826
- style=${M({
479
+ (t) => m`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
480
+ )}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${C({
827
481
  "margin-left": "auto"
828
- })}
829
- ?disabled=${this.scopedValue === this.value}
830
- ?loading=${this.loading}
831
- @click=${this.handleApply}
832
- >
833
- ${this.localize.term("apply")}
834
- </cx-button>
835
- </cx-space>
836
- </cx-details>
837
- `;
482
+ })} ?disabled=${this.scopedValue === this.value} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
838
483
  }
839
484
  };
840
- C.styles = [E, wt];
841
- C.dependencies = {
842
- "cx-button": q,
843
- "cx-details": L,
844
- "cx-icon": j,
845
- "cx-option": X,
846
- "cx-select": Y,
847
- "cx-space": H,
848
- "cx-typography": W
485
+ w.styles = [W, yt];
486
+ w.dependencies = {
487
+ "cx-button": D,
488
+ "cx-details": I,
489
+ "cx-icon": L,
490
+ "cx-option": Q,
491
+ "cx-select": G,
492
+ "cx-space": P,
493
+ "cx-typography": H
849
494
  };
850
- _([
851
- T(".details")
852
- ], C.prototype, "base", 2);
853
- _([
854
- l({ reflect: !0, type: Boolean })
855
- ], C.prototype, "open", 2);
856
- _([
857
- l({ reflect: !0, type: String })
858
- ], C.prototype, "value", 2);
859
- _([
860
- l({ reflect: !1, type: Array })
861
- ], C.prototype, "items", 2);
862
- _([
863
- l({ reflect: !0, type: Boolean })
864
- ], C.prototype, "loading", 2);
865
- _([
866
- z()
867
- ], C.prototype, "scopedValue", 2);
868
- _([
869
- k("value")
870
- ], C.prototype, "handleValueChange", 1);
871
- _([
872
- k("open", { waitUntilFirstUpdate: !0 })
873
- ], C.prototype, "handleOpenChange", 1);
874
- C = _([
875
- N("cx-asset-link-format-proxy")
876
- ], C);
877
- const bt = D`
878
- cx-details::part(base) {
879
- border-bottom-width: 0;
880
- }
881
- `;
882
- var kt = Object.defineProperty, $t = Object.getOwnPropertyDescriptor, I = (t, e, i, s) => {
883
- for (var a = s > 1 ? void 0 : s ? $t(e, i) : e, h = t.length - 1, r; h >= 0; h--)
884
- (r = t[h]) && (a = (s ? r(e, i, a) : r(a)) || a);
885
- return s && a && kt(e, i, a), a;
495
+ A([
496
+ V(".details")
497
+ ], w.prototype, "base", 2);
498
+ A([
499
+ n({ reflect: !0, type: Boolean })
500
+ ], w.prototype, "open", 2);
501
+ A([
502
+ n({ reflect: !0, type: String })
503
+ ], w.prototype, "value", 2);
504
+ A([
505
+ n({ reflect: !1, type: Array })
506
+ ], w.prototype, "items", 2);
507
+ A([
508
+ n({ reflect: !0, type: Boolean })
509
+ ], w.prototype, "loading", 2);
510
+ A([
511
+ f()
512
+ ], w.prototype, "scopedValue", 2);
513
+ A([
514
+ S("value")
515
+ ], w.prototype, "handleValueChange", 1);
516
+ A([
517
+ S("open", { waitUntilFirstUpdate: !0 })
518
+ ], w.prototype, "handleOpenChange", 1);
519
+ w = A([
520
+ F("cx-asset-link-format-proxy")
521
+ ], w);
522
+ const wt = N`cx-details::part(base){border-bottom-width:0}`;
523
+ var bt = Object.defineProperty, kt = Object.getOwnPropertyDescriptor, U = (t, e, i, s) => {
524
+ for (var o = s > 1 ? void 0 : s ? kt(e, i) : e, h = t.length - 1, r; h >= 0; h--)
525
+ (r = t[h]) && (o = (s ? r(e, i, o) : r(o)) || o);
526
+ return s && o && bt(e, i, o), o;
886
527
  };
887
- let A = class extends F {
528
+ let b = class extends _ {
888
529
  constructor() {
889
- super(...arguments), this.localize = new O(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
530
+ super(...arguments), this.localize = new E(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
890
531
  }
891
532
  /**
892
533
  * A computed property that checks if the current quality value is invalid.
@@ -930,121 +571,53 @@ let A = class extends F {
930
571
  t.target !== this.base && t.stopPropagation();
931
572
  }
932
573
  render() {
933
- return b`
934
- <cx-details
935
- class="details"
936
- ?open=${this.open}
937
- @cx-show=${this.onShowDetails}
938
- @cx-hide=${this.onHideDetails}
939
- >
940
- <cx-space slot="summary" align-items="center">
941
- <div class="details__summary__icon">
942
- <div part="icon">
943
- <cx-icon name="blur_on"></cx-icon>
944
- </div>
945
- </div>
946
- <cx-typography variant="body2">
947
- ${this.localize.term("quality")}
948
- </cx-typography>
949
- </cx-space>
950
- <cx-space spacing="small">
951
- <cx-tooltip
952
- data-testid="cx-asset-link-format-quality-tooltip"
953
- content=${this.localize.term("qualityHelpText")}
954
- hoist
955
- >
956
- <cx-input
957
- data-testid="cx-asset-link-format-quality"
958
- class="details__checkbox"
959
- type="number"
960
- value=${this.scopedValue}
961
- min="0"
962
- max="100"
963
- step="1"
964
- style=${M({
574
+ return m`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="blur_on"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("quality")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-quality-tooltip" content=${this.localize.term("qualityHelpText")} hoist><cx-input data-testid="cx-asset-link-format-quality" class="details__checkbox" mask="num" .maskBlocks=${{ num: { mask: Number, max: 100, min: 1 } }} value=${this.scopedValue.toString()} style=${C({
965
575
  flex: "1"
966
- })}
967
- @cx-input=${this.handleQualityChange}
968
- >
969
- </cx-input>
970
- </cx-tooltip>
971
- <cx-button
972
- data-testid="cx-asset-link-format-quality-apply"
973
- variant="primary"
974
- ?disabled=${this.invalidValue}
975
- ?loading=${this.loading}
976
- @click=${this.handleApply}
977
- >
978
- ${this.localize.term("apply")}
979
- </cx-button>
980
- </cx-space>
981
- </cx-details>
982
- `;
576
+ })} @cx-input=${this.handleQualityChange}></cx-input></cx-tooltip><cx-button data-testid="cx-asset-link-format-quality-apply" variant="primary" ?disabled=${this.invalidValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
983
577
  }
984
578
  };
985
- A.styles = [E, bt];
986
- A.dependencies = {
987
- "cx-button": q,
988
- "cx-details": L,
989
- "cx-icon": j,
990
- "cx-input": tt,
991
- "cx-space": H,
992
- "cx-tooltip": at,
993
- "cx-typography": W
579
+ b.styles = [W, wt];
580
+ b.dependencies = {
581
+ "cx-button": D,
582
+ "cx-details": I,
583
+ "cx-icon": L,
584
+ "cx-input": Z,
585
+ "cx-space": P,
586
+ "cx-tooltip": st,
587
+ "cx-typography": H
994
588
  };
995
- I([
996
- T(".details")
997
- ], A.prototype, "base", 2);
998
- I([
999
- l({ reflect: !0, type: Boolean })
1000
- ], A.prototype, "open", 2);
1001
- I([
1002
- l({ reflect: !0, type: Number })
1003
- ], A.prototype, "value", 2);
1004
- I([
1005
- l({ reflect: !0, type: Boolean })
1006
- ], A.prototype, "loading", 2);
1007
- I([
1008
- z()
1009
- ], A.prototype, "scopedValue", 2);
1010
- I([
1011
- k("value")
1012
- ], A.prototype, "handleValueChange", 1);
1013
- A = I([
1014
- N("cx-asset-link-format-quality")
1015
- ], A);
1016
- const Ct = D`
1017
- cx-details::part(base) {
1018
- border-bottom-width: 0;
1019
- }
1020
-
1021
- cx-space {
1022
- width: 100%;
1023
- }
1024
-
1025
- cx-space cx-input {
1026
- flex: 1;
1027
- }
1028
-
1029
- .resize__unit-select {
1030
- width: 120px;
1031
- }
1032
-
1033
- .resize__input-group {
1034
- display: flex;
1035
- flex: 1;
1036
- }
1037
- `;
1038
- var At = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, S = (t, e, i, s) => {
1039
- for (var a = s > 1 ? void 0 : s ? Rt(e, i) : e, h = t.length - 1, r; h >= 0; h--)
1040
- (r = t[h]) && (a = (s ? r(e, i, a) : r(a)) || a);
1041
- return s && a && At(e, i, a), a;
589
+ U([
590
+ V(".details")
591
+ ], b.prototype, "base", 2);
592
+ U([
593
+ n({ reflect: !0, type: Boolean })
594
+ ], b.prototype, "open", 2);
595
+ U([
596
+ n({ reflect: !0, type: Number })
597
+ ], b.prototype, "value", 2);
598
+ U([
599
+ n({ reflect: !0, type: Boolean })
600
+ ], b.prototype, "loading", 2);
601
+ U([
602
+ f()
603
+ ], b.prototype, "scopedValue", 2);
604
+ U([
605
+ S("value")
606
+ ], b.prototype, "handleValueChange", 1);
607
+ b = U([
608
+ F("cx-asset-link-format-quality")
609
+ ], b);
610
+ const vt = N`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.resize__unit-select{width:120px}.resize__input-group{flex:1;display:flex}`;
611
+ var $t = Object.defineProperty, Ct = Object.getOwnPropertyDescriptor, y = (t, e, i, s) => {
612
+ for (var o = s > 1 ? void 0 : s ? Ct(e, i) : e, h = t.length - 1, r; h >= 0; h--)
613
+ (r = t[h]) && (o = (s ? r(e, i, o) : r(o)) || o);
614
+ return s && o && $t(e, i, o), o;
1042
615
  };
1043
- let f = class extends F {
616
+ let g = class extends _ {
1044
617
  constructor() {
1045
- super(...arguments), this.localize = new O(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = o.Pixel, this.lastAppliedSetting = {
1046
- [o.Pixel]: { height: 0, width: 0 },
1047
- [o.AspectRatio]: { height: 1, width: 1 }
618
+ super(...arguments), this.localize = new E(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = a.Pixel, this.lastAppliedSetting = {
619
+ [a.Pixel]: { height: 0, width: 0 },
620
+ [a.AspectRatio]: { height: 1, width: 1 }
1048
621
  }, this.loading = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
1049
622
  }
1050
623
  /**
@@ -1057,10 +630,10 @@ let f = class extends F {
1057
630
  }
1058
631
  async handleCropModeChange() {
1059
632
  if (this.keepAspectRatio) {
1060
- if (this.unit === o.Pixel && this.width && this.height) {
633
+ if (this.unit === a.Pixel && this.width && this.height) {
1061
634
  this.aspectRatio = this.width / this.height;
1062
635
  return;
1063
- } else if (this.unit === o.AspectRatio && this.ratioWidth && this.ratioHeight) {
636
+ } else if (this.unit === a.AspectRatio && this.ratioWidth && this.ratioHeight) {
1064
637
  this.aspectRatio = this.ratioWidth / this.ratioHeight;
1065
638
  return;
1066
639
  }
@@ -1072,12 +645,12 @@ let f = class extends F {
1072
645
  this.aspectRatio = 1;
1073
646
  }
1074
647
  async handleOpenChange() {
1075
- await this.updateComplete, this.open || (this.width = this.lastAppliedSetting[o.Pixel].width, this.height = this.lastAppliedSetting[o.Pixel].height, this.unit = o.Pixel, this.emit("cx-asset-link-format-resize-change", {
648
+ await this.updateComplete, this.open || (this.width = this.lastAppliedSetting[a.Pixel].width, this.height = this.lastAppliedSetting[a.Pixel].height, this.unit = a.Pixel, this.emit("cx-asset-link-format-resize-change", {
1076
649
  detail: {
1077
- height: this.lastAppliedSetting[o.Pixel].height,
650
+ height: this.lastAppliedSetting[a.Pixel].height,
1078
651
  keepAspectRatio: this.keepAspectRatio,
1079
- unit: o.Pixel,
1080
- width: this.lastAppliedSetting[o.Pixel].width
652
+ unit: a.Pixel,
653
+ width: this.lastAppliedSetting[a.Pixel].width
1081
654
  }
1082
655
  }));
1083
656
  }
@@ -1088,8 +661,8 @@ let f = class extends F {
1088
661
  }
1089
662
  this.invalidWidth = !1;
1090
663
  let e = Number(t.target.value);
1091
- this.unit === o.Pixel && (e = Math.max(Math.min(e, this.maxWidth), 1)), t.target.value = e.toString();
1092
- let i = this.unit === o.Pixel ? this.height : this.ratioHeight;
664
+ this.unit === a.Pixel && (e = Math.max(Math.min(e, this.maxWidth), 1)), t.target.value = e.toString();
665
+ let i = this.unit === a.Pixel ? this.height : this.ratioHeight;
1093
666
  this.keepAspectRatio && (i = Math.min(
1094
667
  Math.round(e / this.aspectRatio),
1095
668
  this.maxHeight
@@ -1109,8 +682,8 @@ let f = class extends F {
1109
682
  }
1110
683
  this.invalidHeight = !1;
1111
684
  let e = Number(t.target.value);
1112
- this.unit === o.Pixel && (e = Math.max(Math.min(e, this.maxHeight), 1)), t.target.value = e.toString();
1113
- let i = this.unit === o.Pixel ? this.width : this.ratioWidth;
685
+ this.unit === a.Pixel && (e = Math.max(Math.min(e, this.maxHeight), 1)), t.target.value = e.toString();
686
+ let i = this.unit === a.Pixel ? this.width : this.ratioWidth;
1114
687
  this.keepAspectRatio && (i = Math.min(
1115
688
  Math.round(e * this.aspectRatio),
1116
689
  this.maxWidth
@@ -1124,19 +697,19 @@ let f = class extends F {
1124
697
  });
1125
698
  }
1126
699
  onUnitChange(t) {
1127
- t.target.value === o.AspectRatio ? this.emit("cx-asset-link-format-resize-change", {
700
+ t.target.value === a.AspectRatio ? this.emit("cx-asset-link-format-resize-change", {
1128
701
  detail: {
1129
- height: this.lastAppliedSetting[o.AspectRatio].height,
702
+ height: this.lastAppliedSetting[a.AspectRatio].height,
1130
703
  keepAspectRatio: this.keepAspectRatio,
1131
- unit: o.AspectRatio,
1132
- width: this.lastAppliedSetting[o.AspectRatio].width
704
+ unit: a.AspectRatio,
705
+ width: this.lastAppliedSetting[a.AspectRatio].width
1133
706
  }
1134
707
  }) : this.emit("cx-asset-link-format-resize-change", {
1135
708
  detail: {
1136
- height: this.lastAppliedSetting[o.Pixel].height,
709
+ height: this.lastAppliedSetting[a.Pixel].height,
1137
710
  keepAspectRatio: this.keepAspectRatio,
1138
- unit: o.Pixel,
1139
- width: this.lastAppliedSetting[o.Pixel].width
711
+ unit: a.Pixel,
712
+ width: this.lastAppliedSetting[a.Pixel].width
1140
713
  }
1141
714
  });
1142
715
  }
@@ -1168,182 +741,103 @@ let f = class extends F {
1168
741
  handleAspectRatioClick() {
1169
742
  this.emit("cx-asset-link-format-resize-change", {
1170
743
  detail: {
1171
- height: this.unit === o.Pixel ? this.height : this.ratioHeight,
744
+ height: this.unit === a.Pixel ? this.height : this.ratioHeight,
1172
745
  keepAspectRatio: !this.keepAspectRatio,
1173
746
  unit: this.unit,
1174
- width: this.unit === o.Pixel ? this.width : this.ratioWidth
747
+ width: this.unit === a.Pixel ? this.width : this.ratioWidth
1175
748
  }
1176
749
  });
1177
750
  }
1178
751
  render() {
1179
- return b`<cx-details
1180
- class="details"
1181
- ?open=${this.open}
1182
- @cx-show=${this.onShowDetails}
1183
- @cx-hide=${this.onHideDetails}
1184
- >
1185
- <cx-space slot="summary" align-items="center">
1186
- <div part="icon">
1187
- <cx-icon name="aspect_ratio"></cx-icon>
1188
- </div>
1189
- <cx-typography variant="body2">
1190
- ${this.localize.term("resize")}
1191
- </cx-typography>
1192
- </cx-space>
1193
- <cx-space direction="vertical" spacing="small">
1194
- <cx-space spacing="small">
1195
- <div class="resize__input-group">
1196
- <cx-input
1197
- data-testid="cx-asset-link-format-resize-width"
1198
- placeholder=${this.localize.term("width")}
1199
- type="number"
1200
- step="1"
1201
- value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()}
1202
- @cx-input=${this.handleWidthChange}
1203
- required
1204
- ?disabled=${this.loading}
1205
- >
1206
- <cx-typography slot="prefix" variant="body3" part="input-label">
752
+ return m`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="aspect_ratio"></cx-icon></div><cx-typography variant="body2">${this.localize.term("resize")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-space spacing="small"><div class="resize__input-group"><cx-input data-testid="cx-asset-link-format-resize-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === a.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1207
753
  W
1208
- </cx-typography>
1209
- </cx-input>
1210
- <cx-icon-button
1211
- data-testid="cx-asset-link-format-resize-aspect-ratio"
1212
- name=${this.keepAspectRatio ? "insert_link" : "link_off"}
1213
- @click=${this.handleAspectRatioClick}
1214
- style=${M({
754
+ </cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-resize-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${C({
1215
755
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
1216
- })}
1217
- ?disabled=${this.loading}
1218
- ></cx-icon-button>
1219
- <cx-input
1220
- data-testid="cx-asset-link-format-resize-height"
1221
- placeholder=${this.localize.term("height")}
1222
- type="number"
1223
- step="1"
1224
- value=${this.unit === o.Pixel ? this.height.toString() : this.ratioHeight.toString()}
1225
- @cx-input=${this.handleHeightChange}
1226
- required
1227
- ?disabled=${this.loading}
1228
- >
1229
- <cx-typography slot="prefix" variant="body3" part="input-label">
756
+ })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-resize-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === a.Pixel ? this.height.toString() : this.ratioHeight.toString()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1230
757
  H
1231
- </cx-typography>
1232
- </cx-input>
1233
- </div>
1234
- <cx-select
1235
- data-testid="cx-asset-link-format-resize-unit"
1236
- value=${this.unit}
1237
- hoist
1238
- class="resize__unit-select"
1239
- @cx-change=${this.onUnitChange}
1240
- >
1241
- <cx-option value=${o.Pixel}>
1242
- ${this.localize.term("pixels")}
1243
- </cx-option>
1244
- <cx-option value=${o.AspectRatio}>
1245
- ${this.localize.term("aspectRatio")}
1246
- </cx-option>
1247
- </cx-select>
1248
- </cx-space>
1249
- <cx-button
1250
- data-testid="cx-asset-link-format-resize-apply"
1251
- variant="primary"
1252
- ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth}
1253
- ?loading=${this.loading}
1254
- style=${M({
758
+ </cx-typography></cx-input></div><cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @cx-change=${this.onUnitChange}><cx-option value=${a.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${a.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select></cx-space><cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${C({
1255
759
  marginLeft: "auto"
1256
- })}
1257
- @click=${this.handleApply}
1258
- >
1259
- ${this.localize.term("apply")}
1260
- </cx-button>
1261
- </cx-space>
1262
- </cx-details>`;
760
+ })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1263
761
  }
1264
762
  };
1265
- f.styles = [E, Ct];
1266
- f.dependencies = {
1267
- "cx-button": q,
1268
- "cx-details": L,
1269
- "cx-icon": j,
763
+ g.styles = [W, vt];
764
+ g.dependencies = {
765
+ "cx-button": D,
766
+ "cx-details": I,
767
+ "cx-icon": L,
1270
768
  "cx-icon-button": K,
1271
- "cx-input": tt,
1272
- "cx-option": X,
1273
- "cx-select": Y,
1274
- "cx-space": H,
1275
- "cx-typography": W
769
+ "cx-input": Z,
770
+ "cx-option": Q,
771
+ "cx-select": G,
772
+ "cx-space": P,
773
+ "cx-typography": H
1276
774
  };
1277
- S([
1278
- T(".details")
1279
- ], f.prototype, "base", 2);
1280
- S([
1281
- l({ reflect: !0, type: Boolean })
1282
- ], f.prototype, "open", 2);
1283
- S([
1284
- l({ reflect: !0, type: Number })
1285
- ], f.prototype, "width", 2);
1286
- S([
1287
- l({ reflect: !0, type: Number })
1288
- ], f.prototype, "height", 2);
1289
- S([
1290
- l({ attribute: "max-width", reflect: !0, type: Number })
1291
- ], f.prototype, "maxWidth", 2);
1292
- S([
1293
- l({ attribute: "max-height", reflect: !0, type: Number })
1294
- ], f.prototype, "maxHeight", 2);
1295
- S([
1296
- l({ attribute: "ratio-width", reflect: !0, type: Number })
1297
- ], f.prototype, "ratioWidth", 2);
1298
- S([
1299
- l({ attribute: "ratio-height", reflect: !0, type: Number })
1300
- ], f.prototype, "ratioHeight", 2);
1301
- S([
1302
- l({ reflect: !0, type: String })
1303
- ], f.prototype, "unit", 2);
1304
- S([
1305
- l({ attribute: "last-applied-setting", reflect: !1, type: Object })
1306
- ], f.prototype, "lastAppliedSetting", 2);
1307
- S([
1308
- l({ reflect: !0, type: Boolean })
1309
- ], f.prototype, "loading", 2);
1310
- S([
1311
- l({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1312
- ], f.prototype, "keepAspectRatio", 2);
1313
- S([
1314
- z()
1315
- ], f.prototype, "invalidWidth", 2);
1316
- S([
1317
- z()
1318
- ], f.prototype, "invalidHeight", 2);
1319
- S([
1320
- z()
1321
- ], f.prototype, "aspectRatio", 2);
1322
- S([
1323
- k("cropMode", { waitUntilFirstUpdate: !0 }),
1324
- k("maxWidth", { waitUntilFirstUpdate: !0 }),
1325
- k("maxHeight", { waitUntilFirstUpdate: !0 }),
1326
- k("keepAspectRatio")
1327
- ], f.prototype, "handleCropModeChange", 1);
1328
- S([
1329
- k("open")
1330
- ], f.prototype, "handleOpenChange", 1);
1331
- f = S([
1332
- N("cx-asset-link-format-resize")
1333
- ], f);
1334
- const Mt = D`
1335
- cx-details::part(base) {
1336
- border-bottom-width: 0;
1337
- }
1338
- `;
1339
- var _t = Object.defineProperty, Pt = Object.getOwnPropertyDescriptor, V = (t, e, i, s) => {
1340
- for (var a = s > 1 ? void 0 : s ? Pt(e, i) : e, h = t.length - 1, r; h >= 0; h--)
1341
- (r = t[h]) && (a = (s ? r(e, i, a) : r(a)) || a);
1342
- return s && a && _t(e, i, a), a;
775
+ y([
776
+ V(".details")
777
+ ], g.prototype, "base", 2);
778
+ y([
779
+ n({ reflect: !0, type: Boolean })
780
+ ], g.prototype, "open", 2);
781
+ y([
782
+ n({ reflect: !0, type: Number })
783
+ ], g.prototype, "width", 2);
784
+ y([
785
+ n({ reflect: !0, type: Number })
786
+ ], g.prototype, "height", 2);
787
+ y([
788
+ n({ attribute: "max-width", reflect: !0, type: Number })
789
+ ], g.prototype, "maxWidth", 2);
790
+ y([
791
+ n({ attribute: "max-height", reflect: !0, type: Number })
792
+ ], g.prototype, "maxHeight", 2);
793
+ y([
794
+ n({ attribute: "ratio-width", reflect: !0, type: Number })
795
+ ], g.prototype, "ratioWidth", 2);
796
+ y([
797
+ n({ attribute: "ratio-height", reflect: !0, type: Number })
798
+ ], g.prototype, "ratioHeight", 2);
799
+ y([
800
+ n({ reflect: !0, type: String })
801
+ ], g.prototype, "unit", 2);
802
+ y([
803
+ n({ attribute: "last-applied-setting", reflect: !1, type: Object })
804
+ ], g.prototype, "lastAppliedSetting", 2);
805
+ y([
806
+ n({ reflect: !0, type: Boolean })
807
+ ], g.prototype, "loading", 2);
808
+ y([
809
+ n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
810
+ ], g.prototype, "keepAspectRatio", 2);
811
+ y([
812
+ f()
813
+ ], g.prototype, "invalidWidth", 2);
814
+ y([
815
+ f()
816
+ ], g.prototype, "invalidHeight", 2);
817
+ y([
818
+ f()
819
+ ], g.prototype, "aspectRatio", 2);
820
+ y([
821
+ S("cropMode", { waitUntilFirstUpdate: !0 }),
822
+ S("maxWidth", { waitUntilFirstUpdate: !0 }),
823
+ S("maxHeight", { waitUntilFirstUpdate: !0 }),
824
+ S("keepAspectRatio")
825
+ ], g.prototype, "handleCropModeChange", 1);
826
+ y([
827
+ S("open")
828
+ ], g.prototype, "handleOpenChange", 1);
829
+ g = y([
830
+ F("cx-asset-link-format-resize")
831
+ ], g);
832
+ const At = N`cx-details::part(base){border-bottom-width:0}`;
833
+ var Rt = Object.defineProperty, Mt = Object.getOwnPropertyDescriptor, q = (t, e, i, s) => {
834
+ for (var o = s > 1 ? void 0 : s ? Mt(e, i) : e, h = t.length - 1, r; h >= 0; h--)
835
+ (r = t[h]) && (o = (s ? r(e, i, o) : r(o)) || o);
836
+ return s && o && Rt(e, i, o), o;
1343
837
  };
1344
- let R = class extends F {
838
+ let k = class extends _ {
1345
839
  constructor() {
1346
- super(...arguments), this.localize = new O(this), this.open = !1, this.value = 0, this.loading = !1, this.invalidValue = !1;
840
+ super(...arguments), this.localize = new E(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1;
1347
841
  }
1348
842
  handleOpenChange() {
1349
843
  this.open || this.emit("cx-asset-link-format-rotation-change", {
@@ -1351,16 +845,14 @@ let R = class extends F {
1351
845
  });
1352
846
  }
1353
847
  handleRotationChange(t) {
1354
- const e = t.target.value;
1355
- e ? this.invalidValue = !1 : this.invalidValue = !0;
1356
- const i = it(Number(e));
848
+ const e = t.target.value, i = et(Number(e));
1357
849
  (Number(e) > 360 || Number(e) < -360) && (t.target.value = i.toString()), this.emit("cx-asset-link-format-rotation-change", {
1358
850
  detail: i
1359
851
  });
1360
852
  }
1361
853
  handleButtonClick(t) {
1362
854
  this.emit("cx-asset-link-format-rotation-change", {
1363
- detail: it(t)
855
+ detail: et(t)
1364
856
  });
1365
857
  }
1366
858
  handleClockwiseClick() {
@@ -1375,115 +867,57 @@ let R = class extends F {
1375
867
  * It prevents further actions if the component is currently loading.
1376
868
  */
1377
869
  handleApply() {
1378
- this.invalidValue || this.value === 360 || this.value === -360 || this.loading || this.emit("cx-asset-link-format-rotation-apply", {
870
+ this.value === 360 || this.value === -360 || this.loading || this.emit("cx-asset-link-format-rotation-apply", {
1379
871
  detail: this.value
1380
872
  });
1381
873
  }
1382
874
  render() {
1383
- return b`
1384
- <cx-details class="details" ?open=${this.open}>
1385
- <cx-space slot="summary" align-items="center">
1386
- <div part="icon">
1387
- <cx-icon name="rotate_90_degrees_cw"></cx-icon>
1388
- </div>
1389
- <cx-typography variant="body2">Rotate</cx-typography>
1390
- </cx-space>
1391
- <cx-space spacing="small">
1392
- <cx-button-group label=${this.localize.term("history")}>
1393
- <cx-icon-button
1394
- data-testid="cx-asset-link-format-rotation-ccw"
1395
- name="rotate_90_degrees_ccw"
1396
- label=${this.localize.term("undo")}
1397
- outline
1398
- size="small"
1399
- ?disabled=${this.loading || this.value === -360}
1400
- @click=${this.handleCounterClockwiseClick}
1401
- >
1402
- </cx-icon-button>
1403
- <cx-icon-button
1404
- data-testid="cx-asset-link-format-rotation-cw"
1405
- name="rotate_90_degrees_cw"
1406
- label=${this.localize.term("redo")}
1407
- outline
1408
- size="small"
1409
- ?disabled=${this.loading || this.value === 360}
1410
- @click=${this.handleClockwiseClick}
1411
- >
1412
- </cx-icon-button>
1413
- </cx-button-group>
1414
- <cx-input
1415
- data-testid="cx-asset-link-format-rotation"
1416
- value=${this.invalidValue ? "" : this.value.toString()}
1417
- placeholder="0"
1418
- type="number"
1419
- min="-360"
1420
- max="360"
1421
- ?disabled=${this.loading}
1422
- style=${M({
875
+ return m`<cx-details class="details" ?open=${this.open}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="rotate_90_degrees_cw"></cx-icon></div><cx-typography variant="body2">Rotate</cx-typography></cx-space><cx-space spacing="small"><cx-button-group label=${this.localize.term("history")}><cx-icon-button data-testid="cx-asset-link-format-rotation-ccw" name="rotate_90_degrees_ccw" label=${this.localize.term("undo")} outline size="small" ?disabled=${this.loading || this.value === -360} @click=${this.handleCounterClockwiseClick}></cx-icon-button><cx-icon-button data-testid="cx-asset-link-format-rotation-cw" name="rotate_90_degrees_cw" label=${this.localize.term("redo")} outline size="small" ?disabled=${this.loading || this.value === 360} @click=${this.handleClockwiseClick}></cx-icon-button></cx-button-group><cx-input data-testid="cx-asset-link-format-rotation" value=${(this.value + this.defaultValue).toString()} placeholder="0" mask="num" .maskBlocks=${{ num: { mask: Number, max: 360, min: -360, signed: !0 } }} ?disabled=${this.loading} style=${C({
1423
876
  flex: "none",
1424
877
  width: "80px"
1425
- })}
1426
- @cx-input=${this.handleRotationChange}
1427
- step="1"
1428
- ></cx-input>
1429
- <cx-button
1430
- data-testid="cx-asset-link-format-rotation-apply"
1431
- variant="primary"
1432
- ?disabled=${this.value === 360 || this.value === -360 || this.invalidValue}
1433
- ?loading=${this.loading}
1434
- @click=${this.handleApply}
1435
- >
1436
- ${this.localize.term("apply")}
1437
- </cx-button>
1438
- </cx-space>
1439
- </cx-details>
1440
- `;
878
+ })} @cx-input=${this.handleRotationChange}></cx-input><cx-button data-testid="cx-asset-link-format-rotation-apply" variant="primary" ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1441
879
  }
1442
880
  };
1443
- R.styles = [E, Mt];
1444
- R.dependencies = {
1445
- "cx-button": q,
1446
- "cx-button-group": pt,
1447
- "cx-details": L,
1448
- "cx-icon": j,
881
+ k.styles = [W, At];
882
+ k.dependencies = {
883
+ "cx-button": D,
884
+ "cx-button-group": lt,
885
+ "cx-details": I,
886
+ "cx-icon": L,
1449
887
  "cx-icon-button": K,
1450
- "cx-space": H,
1451
- "cx-typography": W
888
+ "cx-space": P,
889
+ "cx-typography": H
1452
890
  };
1453
- V([
1454
- T(".details")
1455
- ], R.prototype, "base", 2);
1456
- V([
1457
- l({ reflect: !0, type: Boolean })
1458
- ], R.prototype, "open", 2);
1459
- V([
1460
- l({ reflect: !0, type: Number })
1461
- ], R.prototype, "value", 2);
1462
- V([
1463
- l({ reflect: !0, type: Boolean })
1464
- ], R.prototype, "loading", 2);
1465
- V([
1466
- z()
1467
- ], R.prototype, "invalidValue", 2);
1468
- V([
1469
- k("open", { waitUntilFirstUpdate: !0 })
1470
- ], R.prototype, "handleOpenChange", 1);
1471
- R = V([
1472
- N("cx-asset-link-format-rotation")
1473
- ], R);
1474
- const Ht = D`
1475
- cx-details::part(base) {
1476
- border-bottom-width: 0;
1477
- }
1478
- `;
1479
- var Wt = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, Z = (t, e, i, s) => {
1480
- for (var a = s > 1 ? void 0 : s ? Ft(e, i) : e, h = t.length - 1, r; h >= 0; h--)
1481
- (r = t[h]) && (a = (s ? r(e, i, a) : r(a)) || a);
1482
- return s && a && Wt(e, i, a), a;
891
+ q([
892
+ V(".details")
893
+ ], k.prototype, "base", 2);
894
+ q([
895
+ n({ reflect: !0, type: Boolean })
896
+ ], k.prototype, "open", 2);
897
+ q([
898
+ n({ reflect: !0, type: Number })
899
+ ], k.prototype, "value", 2);
900
+ q([
901
+ n({ attribute: "default-value", reflect: !0, type: Number })
902
+ ], k.prototype, "defaultValue", 2);
903
+ q([
904
+ n({ reflect: !0, type: Boolean })
905
+ ], k.prototype, "loading", 2);
906
+ q([
907
+ S("open", { waitUntilFirstUpdate: !0 })
908
+ ], k.prototype, "handleOpenChange", 1);
909
+ k = q([
910
+ F("cx-asset-link-format-rotation")
911
+ ], k);
912
+ const Pt = N`cx-details::part(base){border-bottom-width:0}`;
913
+ var Ht = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, X = (t, e, i, s) => {
914
+ for (var o = s > 1 ? void 0 : s ? _t(e, i) : e, h = t.length - 1, r; h >= 0; h--)
915
+ (r = t[h]) && (o = (s ? r(e, i, o) : r(o)) || o);
916
+ return s && o && Ht(e, i, o), o;
1483
917
  };
1484
- let P = class extends F {
918
+ let M = class extends _ {
1485
919
  constructor() {
1486
- super(...arguments), this.localize = new O(this), this.open = !1, this.value = !1;
920
+ super(...arguments), this.localize = new E(this), this.open = !1, this.value = !1;
1487
921
  }
1488
922
  handleApply(t) {
1489
923
  this.emit("cx-asset-link-format-metadata-change", {
@@ -1507,73 +941,39 @@ let P = class extends F {
1507
941
  t.target !== this.base && t.stopPropagation();
1508
942
  }
1509
943
  render() {
1510
- return b`
1511
- <cx-details
1512
- class="details"
1513
- ?open=${this.open}
1514
- @cx-show=${this.onShowDetails}
1515
- @cx-hide=${this.onHideDetails}
1516
- >
1517
- <cx-space slot="summary" align-items="center">
1518
- <div class="details__summary__icon">
1519
- <div part="icon">
1520
- <cx-icon name="short_text"></cx-icon>
1521
- </div>
1522
- </div>
1523
- <cx-typography variant="body2">
1524
- ${this.localize.term("metadata")}
1525
- </cx-typography>
1526
- </cx-space>
1527
- <cx-space spacing="small">
1528
- <cx-tooltip
1529
- data-testid="cx-asset-link-format-metadata-tooltip"
1530
- content=${this.localize.term("metadataHelpText")}
1531
- hoist
1532
- >
1533
- <cx-checkbox
1534
- data-testid="cx-asset-link-format-metadata"
1535
- class="details__checkbox"
1536
- ?checked=${this.value}
1537
- @cx-change=${this.handleApply}
1538
- >
1539
- ${this.localize.term("preserveMetadata")}
1540
- </cx-checkbox>
1541
- </cx-tooltip>
1542
- </cx-space>
1543
- </cx-details>
1544
- `;
944
+ return m`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="short_text"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("metadata")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-metadata-tooltip" content=${this.localize.term("metadataHelpText")} hoist><cx-checkbox data-testid="cx-asset-link-format-metadata" class="details__checkbox" ?checked=${this.value} @cx-change=${this.handleApply}>${this.localize.term("preserveMetadata")}</cx-checkbox></cx-tooltip></cx-space></cx-details>`;
1545
945
  }
1546
946
  };
1547
- P.styles = [E, Ht];
1548
- P.dependencies = {
1549
- "cx-button": q,
1550
- "cx-checkbox": dt,
1551
- "cx-details": L,
1552
- "cx-icon": j,
1553
- "cx-space": H,
1554
- "cx-tooltip": at,
1555
- "cx-typography": W
947
+ M.styles = [W, Pt];
948
+ M.dependencies = {
949
+ "cx-button": D,
950
+ "cx-checkbox": ct,
951
+ "cx-details": I,
952
+ "cx-icon": L,
953
+ "cx-space": P,
954
+ "cx-tooltip": st,
955
+ "cx-typography": H
1556
956
  };
1557
- Z([
1558
- T(".details")
1559
- ], P.prototype, "base", 2);
1560
- Z([
1561
- l({ reflect: !0, type: Boolean })
1562
- ], P.prototype, "open", 2);
1563
- Z([
1564
- l({ reflect: !0, type: Boolean })
1565
- ], P.prototype, "value", 2);
1566
- P = Z([
1567
- N("cx-asset-link-format-metadata")
1568
- ], P);
1569
- var Et = Object.defineProperty, Nt = Object.getOwnPropertyDescriptor, u = (t, e, i, s) => {
1570
- for (var a = s > 1 ? void 0 : s ? Nt(e, i) : e, h = t.length - 1, r; h >= 0; h--)
1571
- (r = t[h]) && (a = (s ? r(e, i, a) : r(a)) || a);
1572
- return s && a && Et(e, i, a), a;
957
+ X([
958
+ V(".details")
959
+ ], M.prototype, "base", 2);
960
+ X([
961
+ n({ reflect: !0, type: Boolean })
962
+ ], M.prototype, "open", 2);
963
+ X([
964
+ n({ reflect: !0, type: Boolean })
965
+ ], M.prototype, "value", 2);
966
+ M = X([
967
+ F("cx-asset-link-format-metadata")
968
+ ], M);
969
+ var Wt = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, c = (t, e, i, s) => {
970
+ for (var o = s > 1 ? void 0 : s ? Ft(e, i) : e, h = t.length - 1, r; h >= 0; h--)
971
+ (r = t[h]) && (o = (s ? r(e, i, o) : r(o)) || o);
972
+ return s && o && Wt(e, i, o), o;
1573
973
  };
1574
- let p = class extends F {
974
+ let l = class extends _ {
1575
975
  constructor() {
1576
- super(), this.localize = new O(this), this.baseUrl = void 0, this.asset = void 0, this.cropModes = [
976
+ super(), this.localize = new E(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
1577
977
  {
1578
978
  label: "Free",
1579
979
  value: "free"
@@ -1632,7 +1032,7 @@ let p = class extends F {
1632
1032
  label: "Smart Swatch",
1633
1033
  value: "SmartSwatch"
1634
1034
  }
1635
- ], this.extensions = [], this.proxies = void 0, this.forCropper = void 0, this.useSession = "", this.transformations = [], this.selectedProxy = "", this.useCustomExtension = !1, this.lastImageSize = {
1035
+ ], this.extensions = [], this.proxies = void 0, this.forCropper = void 0, this.useSession = "", this.transformations = [], this.selectedProxy = "", this.useCustomExtension = !1, this.noMetadata = !1, this.noCrop = !1, this.noResize = !1, this.noRotate = !1, this.lastImageSize = {
1636
1036
  height: 0,
1637
1037
  width: 0
1638
1038
  }, this.hideHeader = !1, this.queryElement = null, this.activeSetting = "cx-asset-link-format-proxy", this.selectedFormat = void 0, this.resizeSize = {
@@ -1640,7 +1040,7 @@ let p = class extends F {
1640
1040
  keepAspectRatio: !0,
1641
1041
  ratioHeight: 1,
1642
1042
  ratioWidth: 1,
1643
- unit: o.Pixel,
1043
+ unit: a.Pixel,
1644
1044
  width: 0
1645
1045
  }, this.cropSize = {
1646
1046
  cropMode: "free",
@@ -1651,14 +1051,14 @@ let p = class extends F {
1651
1051
  percentageWidth: 0,
1652
1052
  ratioHeight: 1,
1653
1053
  ratioWidth: 1,
1654
- unit: o.Pixel,
1054
+ unit: a.Pixel,
1655
1055
  width: 0,
1656
1056
  x: 0,
1657
1057
  y: 0
1658
1058
  }, this.rotation = 0, this.defaultSize = {
1659
1059
  height: 0,
1660
1060
  width: 0
1661
- }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.apiGetTransformAssetLink = rt, this.apiGetCropFocusMode = ht, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1061
+ }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.apiGetTransformAssetLink = at, this.apiGetCropFocusMode = ot, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1662
1062
  }
1663
1063
  /**
1664
1064
  * Checks if the crop apply button should be disabled.
@@ -1700,25 +1100,25 @@ let p = class extends F {
1700
1100
  * It returns an object with the last crop size in both pixel and aspect ratio units.
1701
1101
  */
1702
1102
  get lastCropSize() {
1703
- const t = st(
1103
+ const t = it(
1704
1104
  this.lastImageSize.width,
1705
1105
  this.lastImageSize.height
1706
1106
  );
1707
1107
  return {
1708
- [o.AspectRatio]: {
1108
+ [a.AspectRatio]: {
1709
1109
  height: t.height,
1710
1110
  percentageHeight: 100,
1711
1111
  percentageWidth: 100,
1712
- unit: o.AspectRatio,
1112
+ unit: a.AspectRatio,
1713
1113
  width: t.width,
1714
1114
  x: 0,
1715
1115
  y: 0
1716
1116
  },
1717
- [o.Pixel]: {
1117
+ [a.Pixel]: {
1718
1118
  height: this.lastImageSize.height,
1719
1119
  percentageHeight: 100,
1720
1120
  percentageWidth: 100,
1721
- unit: o.Pixel,
1121
+ unit: a.Pixel,
1722
1122
  width: this.lastImageSize.width,
1723
1123
  x: 0,
1724
1124
  y: 0
@@ -1731,19 +1131,19 @@ let p = class extends F {
1731
1131
  * It returns an object with the last resize size in both pixel and aspect ratio units.
1732
1132
  */
1733
1133
  get lastResizeSize() {
1734
- const t = st(
1134
+ const t = it(
1735
1135
  this.lastImageSize.width,
1736
1136
  this.lastImageSize.height
1737
1137
  );
1738
1138
  return {
1739
- [o.AspectRatio]: {
1139
+ [a.AspectRatio]: {
1740
1140
  height: t.height,
1741
- unit: o.AspectRatio,
1141
+ unit: a.AspectRatio,
1742
1142
  width: t.width
1743
1143
  },
1744
- [o.Pixel]: {
1144
+ [a.Pixel]: {
1745
1145
  height: this.lastImageSize.height,
1746
- unit: o.Pixel,
1146
+ unit: a.Pixel,
1747
1147
  width: this.lastImageSize.width
1748
1148
  }
1749
1149
  };
@@ -1752,7 +1152,7 @@ let p = class extends F {
1752
1152
  * Returns the transformation string for the asset link.
1753
1153
  */
1754
1154
  get transformationString() {
1755
- return J({
1155
+ return Y({
1756
1156
  asset: this.asset,
1757
1157
  baseUrl: "",
1758
1158
  parameters: this.parameters,
@@ -1789,9 +1189,10 @@ let p = class extends F {
1789
1189
  assetId: this.asset.id,
1790
1190
  extension: this.asset.extension,
1791
1191
  format: e?.proxyName ?? "",
1192
+ token: this.token,
1792
1193
  transformations: this.transformationString
1793
1194
  }).then((s) => {
1794
- this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === c.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
1195
+ this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === p.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
1795
1196
  height: s.height,
1796
1197
  width: s.width
1797
1198
  }, this.selectedFormat = {
@@ -1805,7 +1206,7 @@ let p = class extends F {
1805
1206
  */
1806
1207
  });
1807
1208
  });
1808
- const i = J({
1209
+ const i = Y({
1809
1210
  asset: this.asset,
1810
1211
  baseUrl: "",
1811
1212
  extension: this.selectedFormat.extension,
@@ -1831,13 +1232,14 @@ let p = class extends F {
1831
1232
  if (await this.updateComplete, !this.asset || !this.selectedFormat)
1832
1233
  return;
1833
1234
  const t = this.proxies?.find(
1834
- (a) => a.id === this.selectedProxy
1235
+ (r) => r.id === this.selectedProxy
1835
1236
  );
1836
1237
  this.loading = !0;
1837
1238
  const e = await this.apiGetTransformAssetLink({
1838
1239
  assetId: this.asset.id,
1839
1240
  extension: this.selectedFormat.extension,
1840
1241
  format: t?.proxyName ?? "",
1242
+ token: this.token,
1841
1243
  transformations: this.transformationString
1842
1244
  });
1843
1245
  if (this.loading = !1, !e?.relativePath || !this.selectedFormat)
@@ -1850,7 +1252,7 @@ let p = class extends F {
1850
1252
  keepAspectRatio: !0,
1851
1253
  ratioHeight: 1,
1852
1254
  ratioWidth: 1,
1853
- unit: o.Pixel,
1255
+ unit: a.Pixel,
1854
1256
  width: e.width
1855
1257
  }, this.cropSize = {
1856
1258
  cropMode: "free",
@@ -1861,18 +1263,24 @@ let p = class extends F {
1861
1263
  percentageWidth: 100,
1862
1264
  ratioHeight: 1,
1863
1265
  ratioWidth: 1,
1864
- unit: o.Pixel,
1266
+ unit: a.Pixel,
1865
1267
  width: e.width,
1866
1268
  x: 0,
1867
1269
  y: 0
1868
- }, this.lastAction === c.Rotate && (this.rotation = 0), this.lastAction = void 0;
1270
+ }, this.lastAction === p.Rotate && (this.rotation = 0), this.lastAction = void 0;
1869
1271
  const i = this.transformations.some(
1870
- (a) => a.key === c.Metadata
1272
+ (r) => r.key === p.Metadata
1273
+ ), s = this.transformations.findLast(
1274
+ (r) => r.key === p.Quality
1275
+ ), o = this.transformations.findLast(
1276
+ (r) => r.key === p.Rotate
1871
1277
  );
1872
1278
  this.selectedFormat = {
1873
1279
  ...this.selectedFormat,
1874
1280
  height: e.height,
1875
1281
  keepMetadata: i,
1282
+ quality: s?.value?.quality ?? this.selectedFormat.quality,
1283
+ rotation: o?.value?.rotation ?? 0,
1876
1284
  url: this.baseUrl && this.baseUrl.length > 0 ? `${this.baseUrl}/${e.relativePath}` : e.relativePath,
1877
1285
  width: e.width
1878
1286
  /**
@@ -1880,7 +1288,7 @@ let p = class extends F {
1880
1288
  * url: `${this.baseUrl}/${response.relativePath}`,
1881
1289
  */
1882
1290
  };
1883
- const s = J({
1291
+ const h = Y({
1884
1292
  asset: this.asset,
1885
1293
  baseUrl: "",
1886
1294
  extension: this.selectedFormat.extension,
@@ -1889,7 +1297,7 @@ let p = class extends F {
1889
1297
  useSession: this.useSession
1890
1298
  });
1891
1299
  this.emit("cx-asset-link-format-change", {
1892
- detail: s
1300
+ detail: h
1893
1301
  });
1894
1302
  }
1895
1303
  handleCropperElementChange() {
@@ -1912,7 +1320,9 @@ let p = class extends F {
1912
1320
  width: Number.parseInt(this.asset.width, 10)
1913
1321
  });
1914
1322
  const t = this.transformations.findLast(
1915
- (e) => e.key === c.Quality
1323
+ (i) => i.key === p.Quality
1324
+ ), e = this.transformations.findLast(
1325
+ (i) => i.key === p.Rotate
1916
1326
  );
1917
1327
  this.selectedFormat = {
1918
1328
  extension: this.asset.extension,
@@ -1920,7 +1330,7 @@ let p = class extends F {
1920
1330
  keepMetadata: !1,
1921
1331
  originalUrl: this.asset.originalUrl,
1922
1332
  quality: t?.value?.quality || 100,
1923
- rotation: 0,
1333
+ rotation: e?.value?.rotation ?? 0,
1924
1334
  url: this.asset.imageUrl,
1925
1335
  width: this.defaultSize.width,
1926
1336
  x: 0,
@@ -1938,7 +1348,7 @@ let p = class extends F {
1938
1348
  percentageWidth: 100,
1939
1349
  ratioHeight: 1,
1940
1350
  ratioWidth: 1,
1941
- unit: o.Pixel,
1351
+ unit: a.Pixel,
1942
1352
  width: this.defaultSize.width,
1943
1353
  x: 0,
1944
1354
  y: 0
@@ -1958,20 +1368,20 @@ let p = class extends F {
1958
1368
  e.proxyName === "TRX" && (e.formatHeight = Number(this.asset.height), e.formatWidth = Number(this.asset.width));
1959
1369
  const i = this.proxies?.find((s) => s.id === t);
1960
1370
  i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
1961
- if (s.key === c.Crop) {
1962
- const a = s.value, h = a.width / i.formatWidth * e.formatWidth, r = a.height / i.formatHeight * e.formatHeight, m = a.x / i.formatWidth * e.formatWidth, y = a.y / i.formatHeight * e.formatHeight;
1371
+ if (s.key === p.Crop) {
1372
+ const o = s.value, h = o.width / i.formatWidth * e.formatWidth, r = o.height / i.formatHeight * e.formatHeight, x = o.x / i.formatWidth * e.formatWidth, z = o.y / i.formatHeight * e.formatHeight;
1963
1373
  return {
1964
1374
  ...s,
1965
1375
  value: {
1966
1376
  height: r,
1967
1377
  width: h,
1968
- x: m,
1969
- y
1378
+ x,
1379
+ y: z
1970
1380
  }
1971
1381
  };
1972
1382
  }
1973
- if (s.key === c.Resize) {
1974
- const a = s.value, h = a.width / i.formatWidth * e.formatWidth, r = a.height / i.formatHeight * e.formatHeight;
1383
+ if (s.key === p.Resize) {
1384
+ const o = s.value, h = o.width / i.formatWidth * e.formatWidth, r = o.height / i.formatHeight * e.formatHeight;
1975
1385
  return {
1976
1386
  ...s,
1977
1387
  value: {
@@ -1991,26 +1401,26 @@ let p = class extends F {
1991
1401
  }, await this.updateComplete, this.cropSize = {
1992
1402
  cropMode: "free",
1993
1403
  focusMode: "manual",
1994
- height: this.lastCropSize[o.Pixel].height,
1404
+ height: this.lastCropSize[a.Pixel].height,
1995
1405
  keepAspectRatio: !0,
1996
1406
  percentageHeight: 100,
1997
1407
  percentageWidth: 100,
1998
1408
  ratioHeight: 1,
1999
1409
  ratioWidth: 1,
2000
- unit: o.Pixel,
2001
- width: this.lastCropSize[o.Pixel].width,
1410
+ unit: a.Pixel,
1411
+ width: this.lastCropSize[a.Pixel].width,
2002
1412
  x: 0,
2003
1413
  y: 0
2004
1414
  }, this.resizeSize = {
2005
- height: this.lastResizeSize[o.Pixel].height,
1415
+ height: this.lastResizeSize[a.Pixel].height,
2006
1416
  keepAspectRatio: !0,
2007
1417
  ratioHeight: 1,
2008
1418
  ratioWidth: 1,
2009
- unit: o.Pixel,
2010
- width: this.lastResizeSize[o.Pixel].width
1419
+ unit: a.Pixel,
1420
+ width: this.lastResizeSize[a.Pixel].width
2011
1421
  };
2012
1422
  }
2013
- async handleLoadingChange() {
1423
+ handleLoadingChange() {
2014
1424
  this.cropperElement && (this.cropperElement.loading = this.loading);
2015
1425
  }
2016
1426
  handleSelectedFormatChange() {
@@ -2027,12 +1437,12 @@ let p = class extends F {
2027
1437
  }
2028
1438
  handleActiveSettingChange() {
2029
1439
  this.cropperElement && (this.resizeSize = {
2030
- height: this.lastResizeSize[o.Pixel].height,
1440
+ height: this.lastResizeSize[a.Pixel].height,
2031
1441
  keepAspectRatio: !0,
2032
1442
  ratioHeight: 1,
2033
1443
  ratioWidth: 1,
2034
- unit: o.Pixel,
2035
- width: this.lastResizeSize[o.Pixel].width
1444
+ unit: a.Pixel,
1445
+ width: this.lastResizeSize[a.Pixel].width
2036
1446
  }, this.cropperElement.disabled = this.activeSetting !== "cx-asset-link-format-crop");
2037
1447
  }
2038
1448
  async handleRequestAutoCropSuggestion({
@@ -2040,34 +1450,34 @@ let p = class extends F {
2040
1450
  focusMode: e,
2041
1451
  height: i,
2042
1452
  keepAspectRatio: s,
2043
- percentageHeight: a,
1453
+ percentageHeight: o,
2044
1454
  percentageWidth: h,
2045
1455
  ratioHeight: r,
2046
- ratioWidth: m,
2047
- unit: y,
2048
- useCropMode: v,
2049
- width: w
1456
+ ratioWidth: x,
1457
+ unit: z,
1458
+ useCropMode: $,
1459
+ width: B
2050
1460
  }) {
2051
1461
  if (!this.selectedFormat?.url || e === "manual")
2052
1462
  return;
2053
- this.loading = !0, this.lastAction = c.Crop;
2054
- const x = await this.apiGetCropFocusMode({
1463
+ this.loading = !0, this.lastAction = p.Crop;
1464
+ const v = await this.apiGetCropFocusMode({
2055
1465
  autoCropMode: e,
2056
1466
  cropHeight: i,
2057
- cropWidth: w,
1467
+ cropWidth: B,
2058
1468
  imageUrl: this.selectedFormat.url
2059
1469
  });
2060
- if (x) {
2061
- let n = a, $ = h;
2062
- i || (n = x.height * 100 / this.selectedFormat.height), w || ($ = x.width * 100 / this.selectedFormat.width), this.cropSize = {
1470
+ if (v) {
1471
+ let T = o, tt = h;
1472
+ i || (T = v.height * 100 / this.selectedFormat.height), B || (tt = v.width * 100 / this.selectedFormat.width), this.cropSize = {
2063
1473
  ...this.cropSize,
2064
- height: x.height,
2065
- percentageHeight: n ?? this.cropSize.percentageHeight,
2066
- percentageWidth: $ ?? this.cropSize.percentageWidth,
2067
- width: x.width,
2068
- x: x.x * 100 / this.selectedFormat.width,
2069
- y: x.y * 100 / this.selectedFormat.height,
2070
- ...v ? {
1474
+ height: v.height,
1475
+ percentageHeight: T ?? this.cropSize.percentageHeight,
1476
+ percentageWidth: tt ?? this.cropSize.percentageWidth,
1477
+ width: v.width,
1478
+ x: v.x * 100 / this.selectedFormat.width,
1479
+ y: v.y * 100 / this.selectedFormat.height,
1480
+ ...$ ? {
2071
1481
  cropMode: e,
2072
1482
  focusMode: "manual",
2073
1483
  keepAspectRatio: !1
@@ -2077,8 +1487,8 @@ let p = class extends F {
2077
1487
  },
2078
1488
  keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
2079
1489
  ratioHeight: r ?? this.cropSize.ratioHeight,
2080
- ratioWidth: m ?? this.cropSize.ratioWidth,
2081
- unit: y ?? this.cropSize.unit
1490
+ ratioWidth: x ?? this.cropSize.ratioWidth,
1491
+ unit: z ?? this.cropSize.unit
2082
1492
  };
2083
1493
  }
2084
1494
  this.loading = !1, this.lastAction = void 0;
@@ -2087,29 +1497,29 @@ let p = class extends F {
2087
1497
  const { croppedArea: e } = t.detail, {
2088
1498
  height: i,
2089
1499
  width: s,
2090
- x: a,
1500
+ x: o,
2091
1501
  y: h
2092
- } = e, r = this.cropSize.percentageWidth !== s, m = this.cropSize.percentageHeight !== i;
2093
- let y = this.cropSize.height, v = this.cropSize.width;
2094
- r && (v = Math.round(s * this.selectedFormat.width / 100)), m && (y = Math.round(
1502
+ } = e, r = this.cropSize.percentageWidth !== s, x = this.cropSize.percentageHeight !== i;
1503
+ let z = this.cropSize.height, $ = this.cropSize.width;
1504
+ r && ($ = Math.round(s * this.selectedFormat.width / 100)), x && (z = Math.round(
2095
1505
  i * this.selectedFormat.height / 100
2096
1506
  ));
2097
- const w = this.cropSize.focusMode;
1507
+ const B = this.cropSize.focusMode;
2098
1508
  this.focusModes.find(
2099
- (n) => n.value === w
1509
+ (T) => T.value === B
2100
1510
  )?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
2101
- focusMode: w,
2102
- height: y,
1511
+ focusMode: B,
1512
+ height: z,
2103
1513
  percentageHeight: i,
2104
1514
  percentageWidth: s,
2105
- width: v
1515
+ width: $
2106
1516
  }) : this.cropSize = {
2107
1517
  ...this.cropSize,
2108
- height: y,
1518
+ height: z,
2109
1519
  percentageHeight: i,
2110
1520
  percentageWidth: s,
2111
- width: v,
2112
- x: a,
1521
+ width: $,
1522
+ x: o,
2113
1523
  y: h
2114
1524
  };
2115
1525
  }
@@ -2133,7 +1543,7 @@ let p = class extends F {
2133
1543
  }
2134
1544
  onProxyChange(t) {
2135
1545
  const e = t.detail;
2136
- this.lastAction = c.Proxy, this.selectedProxy = e.id;
1546
+ this.lastAction = p.Proxy, this.selectedProxy = e.id;
2137
1547
  }
2138
1548
  async onCropModeChange(t) {
2139
1549
  const { mode: e } = t.detail;
@@ -2144,22 +1554,22 @@ let p = class extends F {
2144
1554
  });
2145
1555
  else {
2146
1556
  const s = this.focusModes.find(
2147
- (y) => y.value === this.cropSize.focusMode
1557
+ (z) => z.value === this.cropSize.focusMode
2148
1558
  )?.auto;
2149
- let a = this.cropSize.keepAspectRatio, h = this.cropSize.focusMode, r = this.cropSize.x, m = this.cropSize.y;
2150
- e === "free" ? (a = !1, h = "manual") : this.cropSize.unit === o.Pixel && !s && (r = 0, m = 0), s ? await this.handleRequestAutoCropSuggestion({
1559
+ let o = this.cropSize.keepAspectRatio, h = this.cropSize.focusMode, r = this.cropSize.x, x = this.cropSize.y;
1560
+ e === "free" ? (o = !1, h = "manual") : this.cropSize.unit === a.Pixel && !s && (r = 0, x = 0), s ? await this.handleRequestAutoCropSuggestion({
2151
1561
  cropMode: e,
2152
1562
  focusMode: h,
2153
1563
  height: this.cropSize.height,
2154
- keepAspectRatio: a,
1564
+ keepAspectRatio: o,
2155
1565
  width: this.cropSize.width
2156
1566
  }) : this.cropSize = {
2157
1567
  ...this.cropSize,
2158
1568
  cropMode: e,
2159
1569
  focusMode: h,
2160
- keepAspectRatio: a,
1570
+ keepAspectRatio: o,
2161
1571
  x: r,
2162
- y: m
1572
+ y: x
2163
1573
  };
2164
1574
  }
2165
1575
  }
@@ -2176,51 +1586,51 @@ let p = class extends F {
2176
1586
  }
2177
1587
  async onCropChange(t) {
2178
1588
  const e = this.cropSize.unit;
2179
- if (t.detail.unit === o.AspectRatio) {
1589
+ if (t.detail.unit === a.AspectRatio) {
2180
1590
  const i = t.detail.width / t.detail.height, s = Math.min(
2181
1591
  Math.max(Math.round(this.cropSize.height * i), 0),
2182
1592
  this.resizeSize.width
2183
- ), a = Math.min(
1593
+ ), o = Math.min(
2184
1594
  Math.max(Math.round(s / i), 0),
2185
1595
  this.resizeSize.height
2186
- ), h = a * 100 / this.selectedFormat.height, r = s * 100 / this.selectedFormat.width;
2187
- let m = this.cropSize.x, y = this.cropSize.y;
2188
- m + r > 100 && (m = 100 - r), y + h > 100 && (y = 100 - h);
2189
- let v = this.cropSize.cropMode;
1596
+ ), h = o * 100 / this.selectedFormat.height, r = s * 100 / this.selectedFormat.width;
1597
+ let x = this.cropSize.x, z = this.cropSize.y;
1598
+ x + r > 100 && (x = 100 - r), z + h > 100 && (z = 100 - h);
1599
+ let $ = this.cropSize.cropMode;
2190
1600
  this.cropModes.find(
2191
- (x) => x.value === v
2192
- )?.auto && (v = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = h, this.cropSize.percentageWidth = r, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
1601
+ (v) => v.value === $
1602
+ )?.auto && ($ = "free"), t.detail.silent ? (this.cropSize.height = o, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = h, this.cropSize.percentageWidth = r, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = a.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2193
1603
  ...this.cropSize,
2194
- cropMode: v,
2195
- height: a,
1604
+ cropMode: $,
1605
+ height: o,
2196
1606
  keepAspectRatio: t.detail.keepAspectRatio,
2197
1607
  percentageHeight: h,
2198
1608
  percentageWidth: r,
2199
1609
  ratioHeight: t.detail.height,
2200
1610
  ratioWidth: t.detail.width,
2201
- unit: o.AspectRatio,
1611
+ unit: a.AspectRatio,
2202
1612
  width: s,
2203
- x: m,
2204
- y
1613
+ x,
1614
+ y: z
2205
1615
  };
2206
1616
  } else {
2207
1617
  const i = this.selectedFormat ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.selectedFormat ? t.detail.width * 100 / this.selectedFormat.width : 100;
2208
- let a = this.cropSize.x, h = this.cropSize.y;
2209
- a + s > 100 && (a = 100 - s), h + i > 100 && (h = 100 - i);
1618
+ let o = this.cropSize.x, h = this.cropSize.y;
1619
+ o + s > 100 && (o = 100 - s), h + i > 100 && (h = 100 - i);
2210
1620
  let r = this.cropSize.cropMode;
2211
- const m = this.cropModes.find(
2212
- (y) => y.value === r
1621
+ const x = this.cropModes.find(
1622
+ (z) => z.value === r
2213
1623
  )?.auto;
2214
- (t.detail.breakAspectRatio || m) && (r = "free"), t.detail.silent ? (this.cropSize.cropMode = r, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = o.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = a, this.cropSize.y = h) : this.cropSize = {
1624
+ (t.detail.breakAspectRatio || x) && (r = "free"), t.detail.silent ? (this.cropSize.cropMode = r, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = a.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = o, this.cropSize.y = h) : this.cropSize = {
2215
1625
  ...this.cropSize,
2216
1626
  cropMode: r,
2217
1627
  height: t.detail.height,
2218
1628
  keepAspectRatio: t.detail.keepAspectRatio,
2219
1629
  percentageHeight: i,
2220
1630
  percentageWidth: s,
2221
- unit: o.Pixel,
1631
+ unit: a.Pixel,
2222
1632
  width: t.detail.width,
2223
- x: a,
1633
+ x: o,
2224
1634
  y: h
2225
1635
  };
2226
1636
  }
@@ -2239,15 +1649,15 @@ let p = class extends F {
2239
1649
  });
2240
1650
  }
2241
1651
  onCropApply(t) {
2242
- const { height: e, mode: i, unit: s, width: a } = t.detail;
2243
- if (this.lastAction = c.Crop, !(!this.cropperElement || !this.selectedFormat))
2244
- if (e && a && s) {
2245
- let h = a, r = e;
2246
- if (s === o.AspectRatio && (h = this.cropSize.percentageWidth * this.selectedFormat.width / 100, r = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
1652
+ const { height: e, mode: i, unit: s, width: o } = t.detail;
1653
+ if (this.lastAction = p.Crop, !(!this.cropperElement || !this.selectedFormat))
1654
+ if (e && o && s) {
1655
+ let h = o, r = e;
1656
+ if (s === a.AspectRatio && (h = this.cropSize.percentageWidth * this.selectedFormat.width / 100, r = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
2247
1657
  this.transformations = [
2248
1658
  ...this.transformations,
2249
1659
  {
2250
- key: c.Crop,
1660
+ key: p.Crop,
2251
1661
  value: {
2252
1662
  height: r,
2253
1663
  mode: i,
@@ -2256,17 +1666,17 @@ let p = class extends F {
2256
1666
  }
2257
1667
  ];
2258
1668
  else {
2259
- const m = this.cropSize.x / 100 * this.selectedFormat.width, y = this.cropSize.y / 100 * this.selectedFormat.height;
1669
+ const x = this.cropSize.x / 100 * this.selectedFormat.width, z = this.cropSize.y / 100 * this.selectedFormat.height;
2260
1670
  this.transformations = [
2261
1671
  ...this.transformations,
2262
1672
  {
2263
- key: c.Crop,
1673
+ key: p.Crop,
2264
1674
  value: {
2265
1675
  height: r,
2266
1676
  unit: s,
2267
1677
  width: h,
2268
- x: m,
2269
- y
1678
+ x,
1679
+ y: z
2270
1680
  }
2271
1681
  }
2272
1682
  ];
@@ -2274,7 +1684,7 @@ let p = class extends F {
2274
1684
  } else i && (this.transformations = [
2275
1685
  ...this.transformations,
2276
1686
  {
2277
- key: c.Crop,
1687
+ key: p.Crop,
2278
1688
  value: {
2279
1689
  mode: i
2280
1690
  }
@@ -2282,9 +1692,9 @@ let p = class extends F {
2282
1692
  ]);
2283
1693
  }
2284
1694
  onResizeChange(t) {
2285
- if (t.detail.unit === o.AspectRatio) {
1695
+ if (t.detail.unit === a.AspectRatio) {
2286
1696
  const e = t.detail.width / t.detail.height, i = Math.max(
2287
- Math.round(this.lastResizeSize[o.Pixel].height * e),
1697
+ Math.round(this.lastResizeSize[a.Pixel].height * e),
2288
1698
  0
2289
1699
  ), s = Math.max(Math.round(i / e), 0);
2290
1700
  this.resizeSize = {
@@ -2309,15 +1719,15 @@ let p = class extends F {
2309
1719
  if (!this.selectedFormat)
2310
1720
  return;
2311
1721
  const { height: e, unit: i, width: s } = t.detail;
2312
- this.lastAction = c.Resize;
2313
- const a = this.selectedFormat.width || this.defaultSize.width, h = this.selectedFormat.height || this.defaultSize.height;
2314
- let r = s, m = e;
2315
- this.resizeSize.unit !== i ? (r = a, m = h) : i === o.AspectRatio && (r = Math.round(s / e * h), m = h), this.transformations = [
1722
+ this.lastAction = p.Resize;
1723
+ const o = this.selectedFormat.width || this.defaultSize.width, h = this.selectedFormat.height || this.defaultSize.height;
1724
+ let r = s, x = e;
1725
+ this.resizeSize.unit !== i ? (r = o, x = h) : i === a.AspectRatio && (r = Math.round(s / e * h), x = h), this.transformations = [
2316
1726
  ...this.transformations,
2317
1727
  {
2318
- key: c.Resize,
1728
+ key: p.Resize,
2319
1729
  value: {
2320
- height: m,
1730
+ height: x,
2321
1731
  unit: i,
2322
1732
  width: r
2323
1733
  }
@@ -2331,12 +1741,12 @@ let p = class extends F {
2331
1741
  if (!this.selectedFormat)
2332
1742
  return;
2333
1743
  const e = t.detail;
2334
- this.lastAction = c.Rotate, this.transformations = [
1744
+ this.lastAction = p.Rotate, this.transformations = [
2335
1745
  ...this.transformations,
2336
1746
  {
2337
- key: c.Rotate,
1747
+ key: p.Rotate,
2338
1748
  value: {
2339
- rotation: e
1749
+ rotation: e + (this.selectedFormat.rotation || 0)
2340
1750
  }
2341
1751
  }
2342
1752
  ];
@@ -2345,10 +1755,10 @@ let p = class extends F {
2345
1755
  if (!this.selectedFormat)
2346
1756
  return;
2347
1757
  const e = t.detail;
2348
- this.selectedFormat.quality = e, this.lastAction = c.Quality, this.transformations = [
1758
+ this.selectedFormat.quality = e, this.lastAction = p.Quality, this.transformations = [
2349
1759
  ...this.transformations,
2350
1760
  {
2351
- key: c.Quality,
1761
+ key: p.Quality,
2352
1762
  value: {
2353
1763
  quality: e
2354
1764
  }
@@ -2364,16 +1774,16 @@ let p = class extends F {
2364
1774
  keepMetadata: e
2365
1775
  }, e ? this.transformations = [
2366
1776
  ...this.transformations.filter(
2367
- (i) => i.key !== c.Metadata
1777
+ (i) => i.key !== p.Metadata
2368
1778
  ),
2369
1779
  {
2370
- key: c.Metadata,
1780
+ key: p.Metadata,
2371
1781
  value: {
2372
1782
  keepMetadata: e
2373
1783
  }
2374
1784
  }
2375
1785
  ] : this.transformations = this.transformations.filter(
2376
- (i) => i.key !== c.Metadata
1786
+ (i) => i.key !== p.Metadata
2377
1787
  );
2378
1788
  }
2379
1789
  onExtensionChange(t) {
@@ -2388,229 +1798,157 @@ let p = class extends F {
2388
1798
  handleUndo() {
2389
1799
  this.transformations = this.transformations.slice(0, -1);
2390
1800
  const t = this.transformations.findLast(
2391
- (e) => e.key === c.Quality
2392
- )?.value?.quality;
1801
+ (i) => i.key === p.Quality
1802
+ )?.value?.quality, e = this.transformations.findLast(
1803
+ (i) => i.key === p.Rotate
1804
+ )?.value?.rotation;
2393
1805
  this.selectedFormat && (this.selectedFormat = {
2394
1806
  ...this.selectedFormat,
2395
- quality: t ?? 100
1807
+ quality: t ?? 100,
1808
+ rotation: e ?? 0
2396
1809
  });
2397
1810
  }
2398
1811
  render() {
2399
- return b`<div
2400
- class="asset-link-format"
2401
- @cx-show=${this.onDetailsShow}
2402
- @cx-hide=${this.onDetailsHide}
2403
- >
2404
- ${G(
1812
+ return m`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${R(
2405
1813
  !this.hideHeader,
2406
- () => b`
2407
- <cx-space
2408
- class="asset-link-format__section-header"
2409
- direction="horizontal"
2410
- spacing="small"
2411
- align-items="center"
2412
- justify-content="space-between"
2413
- >
2414
- <cx-typography variant="body3">
2415
- ${this.localize.term("transformations")}
2416
- </cx-typography>
2417
- <cx-button
2418
- class="asset-link-format__undo"
2419
- variant="custom"
2420
- ?disabled=${this.transformations.length === 0 || this.frozenIndex !== void 0 && this.frozenIndex >= this.transformations.length - 1}
2421
- @click=${this.handleUndo}
2422
- >
2423
- ${this.localize.term("undo")}
2424
- </cx-button>
2425
- </cx-space>
2426
- `,
2427
- () => lt
1814
+ () => m`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${this.transformations.length === 0 || this.frozenIndex !== void 0 && this.frozenIndex >= this.transformations.length - 1} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button></cx-space>`,
1815
+ () => rt
1816
+ )}<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} .items=${this.formats} ?loading=${this.loading && this.lastAction === p.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>${R(
1817
+ !this.noCrop,
1818
+ () => m`<cx-asset-link-format-crop class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?loading=${this.loading && this.lastAction === p.Crop} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${this.lastResizeSize[a.Pixel].width} max-height=${this.lastResizeSize[a.Pixel].height} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} ratio-width=${this.cropSize.ratioWidth} ratio-height=${this.cropSize.ratioHeight} unit=${this.cropSize.unit} .lastAppliedSetting=${this.lastCropSize} .cropModes=${this.cropModes} .focusModes=${this.focusModes} @cx-asset-link-format-crop-mode-change=${this.onCropModeChange} @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange} @cx-asset-link-format-crop-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
2428
1819
  )}
2429
- <cx-asset-link-format-proxy
2430
- class="asset-link-format__details"
2431
- value=${this.selectedProxy ?? ""}
2432
- ?open=${this.activeSetting === "cx-asset-link-format-proxy"}
2433
- .items=${this.formats}
2434
- ?loading=${this.loading && this.lastAction === c.Proxy}
2435
- @cx-asset-link-format-proxy-change=${this.onProxyChange}
2436
- ></cx-asset-link-format-proxy>
2437
- <cx-asset-link-format-crop
2438
- class="asset-link-format__details"
2439
- ?open=${this.activeSetting === "cx-asset-link-format-crop"}
2440
- ?disabled-apply=${this.disabledCropApply}
2441
- ?loading=${this.loading && this.lastAction === c.Crop}
2442
- ?keep-aspect-ratio=${this.cropSize.keepAspectRatio}
2443
- focus-mode=${this.cropSize.focusMode}
2444
- crop-mode=${this.cropSize.cropMode}
2445
- width=${this.cropSize.width}
2446
- height=${this.cropSize.height}
2447
- max-width=${this.lastResizeSize[o.Pixel].width}
2448
- max-height=${this.lastResizeSize[o.Pixel].height}
2449
- percentage-width=${this.cropSize.percentageWidth}
2450
- percentage-height=${this.cropSize.percentageHeight}
2451
- ratio-width=${this.cropSize.ratioWidth}
2452
- ratio-height=${this.cropSize.ratioHeight}
2453
- unit=${this.cropSize.unit}
2454
- .lastAppliedSetting=${this.lastCropSize}
2455
- .cropModes=${this.cropModes}
2456
- .focusModes=${this.focusModes}
2457
- @cx-asset-link-format-crop-mode-change=${this.onCropModeChange}
2458
- @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange}
2459
- @cx-asset-link-format-crop-change=${this.onCropChange}
2460
- @cx-asset-link-format-crop-changed=${this.onCropChanged}
2461
- @cx-asset-link-format-crop-apply=${this.onCropApply}
2462
- ></cx-asset-link-format-crop>
2463
- <cx-asset-link-format-resize
2464
- class="asset-link-format__details"
2465
- ?open=${this.activeSetting === "cx-asset-link-format-resize"}
2466
- ?loading=${this.loading && this.lastAction === c.Resize}
2467
- ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio}
2468
- width=${this.resizeSize.width}
2469
- height=${this.resizeSize.height}
2470
- max-width=${this.imageSize.width}
2471
- max-height=${this.imageSize.height}
2472
- ratio-width=${this.resizeSize.ratioWidth}
2473
- ratio-height=${this.resizeSize.ratioHeight}
2474
- unit=${this.resizeSize.unit}
2475
- .lastAppliedSetting=${this.lastResizeSize}
2476
- @cx-asset-link-format-resize-change=${this.onResizeChange}
2477
- @cx-asset-link-format-resize-apply=${this.onResizeApply}
2478
- ></cx-asset-link-format-resize>
2479
- <cx-asset-link-format-rotation
2480
- class="asset-link-format__details"
2481
- ?loading=${this.loading && this.lastAction === c.Rotate}
2482
- ?open=${this.activeSetting === "cx-asset-link-format-rotation"}
2483
- value=${this.rotation}
2484
- @cx-asset-link-format-rotation-change=${this.onRotationChange}
2485
- @cx-asset-link-format-rotation-apply=${this.onRotationApply}
2486
- ></cx-asset-link-format-rotation>
2487
- <cx-asset-link-format-quality
2488
- class="asset-link-format__details"
2489
- ?loading=${this.loading && this.lastAction === c.Quality}
2490
- ?open=${this.activeSetting === "cx-asset-link-format-quality"}
2491
- value=${this.selectedFormat?.quality ?? 100}
2492
- @cx-asset-link-format-quality-change=${this.onQualityChange}
2493
- ></cx-asset-link-format-quality>
2494
- <cx-asset-link-format-metadata
2495
- class="asset-link-format__details"
2496
- ?open=${this.activeSetting === "cx-asset-link-format-metadata"}
2497
- .value=${this.selectedFormat?.keepMetadata ?? !1}
2498
- @cx-asset-link-format-metadata-change=${this.onMetadataChange}
2499
- >
2500
- </cx-asset-link-format-metadata>
2501
- ${G(
2502
- this.useCustomExtension,
2503
- () => b`
2504
- <cx-asset-link-format-extension
2505
- .items=${this.extensions}
2506
- value=${this.selectedFormat?.extension ?? ""}
2507
- @cx-asset-link-format-extension-change=${this.onExtensionChange}
2508
- ></cx-asset-link-format-extension>
2509
- `
1820
+ ${R(
1821
+ !this.noResize,
1822
+ () => m`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === p.Resize} ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio} width=${this.resizeSize.width} height=${this.resizeSize.height} max-width=${this.imageSize.width} max-height=${this.imageSize.height} ratio-width=${this.resizeSize.ratioWidth} ratio-height=${this.resizeSize.ratioHeight} unit=${this.resizeSize.unit} .lastAppliedSetting=${this.lastResizeSize} @cx-asset-link-format-resize-change=${this.onResizeChange} @cx-asset-link-format-resize-apply=${this.onResizeApply}></cx-asset-link-format-resize>`
2510
1823
  )}
2511
- </div>`;
1824
+ ${R(
1825
+ !this.noRotate,
1826
+ () => m`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === p.Rotate} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
1827
+ )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === p.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${R(
1828
+ !this.noMetadata,
1829
+ () => m`<cx-asset-link-format-metadata class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-metadata"} .value=${this.selectedFormat?.keepMetadata ?? !1} @cx-asset-link-format-metadata-change=${this.onMetadataChange}></cx-asset-link-format-metadata>`
1830
+ )}
1831
+ ${R(
1832
+ this.useCustomExtension,
1833
+ () => m`<cx-asset-link-format-extension .items=${this.extensions} value=${this.selectedFormat?.extension ?? ""} @cx-asset-link-format-extension-change=${this.onExtensionChange}></cx-asset-link-format-extension>`
1834
+ )}</div>`;
2512
1835
  }
2513
1836
  };
2514
- p.styles = [E, ut];
2515
- p.dependencies = {
1837
+ l.styles = [W, pt];
1838
+ l.dependencies = {
2516
1839
  "cx-asset-link-format-crop": d,
2517
- "cx-asset-link-format-extension": U,
2518
- "cx-asset-link-format-metadata": P,
2519
- "cx-asset-link-format-proxy": C,
2520
- "cx-asset-link-format-quality": A,
2521
- "cx-asset-link-format-resize": f,
2522
- "cx-asset-link-format-rotation": R,
2523
- "cx-button": q,
2524
- "cx-space": H,
2525
- "cx-typography": W
1840
+ "cx-asset-link-format-extension": O,
1841
+ "cx-asset-link-format-metadata": M,
1842
+ "cx-asset-link-format-proxy": w,
1843
+ "cx-asset-link-format-quality": b,
1844
+ "cx-asset-link-format-resize": g,
1845
+ "cx-asset-link-format-rotation": k,
1846
+ "cx-button": D,
1847
+ "cx-space": P,
1848
+ "cx-typography": H
2526
1849
  };
2527
- u([
2528
- l({ attribute: "base-url", reflect: !0, type: String })
2529
- ], p.prototype, "baseUrl", 2);
2530
- u([
2531
- l({ reflect: !1, type: Object })
2532
- ], p.prototype, "asset", 2);
2533
- u([
2534
- l({ attribute: "crop-modes", reflect: !1, type: Array })
2535
- ], p.prototype, "cropModes", 2);
2536
- u([
2537
- l({ attribute: "focus-modes", reflect: !1, type: Object })
2538
- ], p.prototype, "focusModes", 2);
2539
- u([
2540
- l({ reflect: !1, type: Array })
2541
- ], p.prototype, "extensions", 2);
2542
- u([
2543
- l({ reflect: !1, type: Array })
2544
- ], p.prototype, "proxies", 2);
2545
- u([
2546
- l({ attribute: "for-cropper", reflect: !0, type: String })
2547
- ], p.prototype, "forCropper", 2);
2548
- u([
2549
- l({ attribute: "use-session", reflect: !0, type: String })
2550
- ], p.prototype, "useSession", 2);
2551
- u([
2552
- l({ reflect: !1, type: Array })
2553
- ], p.prototype, "transformations", 2);
2554
- u([
2555
- l({ attribute: "selected-proxy", reflect: !0, type: String })
2556
- ], p.prototype, "selectedProxy", 2);
2557
- u([
2558
- l({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
2559
- ], p.prototype, "useCustomExtension", 2);
2560
- u([
2561
- l({ attribute: "last-image-size", reflect: !1, type: Object })
2562
- ], p.prototype, "lastImageSize", 2);
2563
- u([
2564
- l({ attribute: "hide-header", reflect: !1, type: Boolean })
2565
- ], p.prototype, "hideHeader", 2);
2566
- u([
2567
- l({ attribute: !1, reflect: !1, type: Object })
2568
- ], p.prototype, "queryElement", 2);
2569
- u([
2570
- z()
2571
- ], p.prototype, "activeSetting", 2);
2572
- u([
2573
- z()
2574
- ], p.prototype, "selectedFormat", 2);
2575
- u([
2576
- z()
2577
- ], p.prototype, "resizeSize", 2);
2578
- u([
2579
- z()
2580
- ], p.prototype, "cropSize", 2);
2581
- u([
2582
- z()
2583
- ], p.prototype, "rotation", 2);
2584
- u([
2585
- z()
2586
- ], p.prototype, "defaultSize", 2);
2587
- u([
2588
- z()
2589
- ], p.prototype, "cropperElement", 2);
2590
- u([
2591
- z()
2592
- ], p.prototype, "parameters", 2);
2593
- u([
2594
- z()
2595
- ], p.prototype, "loading", 2);
2596
- u([
2597
- z()
2598
- ], p.prototype, "lastAction", 2);
2599
- u([
2600
- z()
2601
- ], p.prototype, "frozenIndex", 2);
2602
- u([
2603
- k(["transformations"])
2604
- ], p.prototype, "handleTransformationsChange", 1);
2605
- u([
2606
- k("selectedProxy")
2607
- ], p.prototype, "handleSelectedProxyChange", 1);
2608
- u([
2609
- k("loading")
2610
- ], p.prototype, "handleLoadingChange", 1);
2611
- p = u([
2612
- N("cx-asset-link-format")
2613
- ], p);
1850
+ c([
1851
+ n({ attribute: "base-url", type: String })
1852
+ ], l.prototype, "baseUrl", 2);
1853
+ c([
1854
+ n({ attribute: "token", type: String })
1855
+ ], l.prototype, "token", 2);
1856
+ c([
1857
+ n({ reflect: !1, type: Object })
1858
+ ], l.prototype, "asset", 2);
1859
+ c([
1860
+ n({ attribute: "crop-modes", reflect: !1, type: Array })
1861
+ ], l.prototype, "cropModes", 2);
1862
+ c([
1863
+ n({ attribute: "focus-modes", reflect: !1, type: Object })
1864
+ ], l.prototype, "focusModes", 2);
1865
+ c([
1866
+ n({ reflect: !1, type: Array })
1867
+ ], l.prototype, "extensions", 2);
1868
+ c([
1869
+ n({ reflect: !1, type: Array })
1870
+ ], l.prototype, "proxies", 2);
1871
+ c([
1872
+ n({ attribute: "for-cropper", reflect: !0, type: String })
1873
+ ], l.prototype, "forCropper", 2);
1874
+ c([
1875
+ n({ attribute: "use-session", reflect: !0, type: String })
1876
+ ], l.prototype, "useSession", 2);
1877
+ c([
1878
+ n({ reflect: !1, type: Array })
1879
+ ], l.prototype, "transformations", 2);
1880
+ c([
1881
+ n({ attribute: "selected-proxy", reflect: !0, type: String })
1882
+ ], l.prototype, "selectedProxy", 2);
1883
+ c([
1884
+ n({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
1885
+ ], l.prototype, "useCustomExtension", 2);
1886
+ c([
1887
+ n({ attribute: "no-metadata", reflect: !0, type: Boolean })
1888
+ ], l.prototype, "noMetadata", 2);
1889
+ c([
1890
+ n({ attribute: "no-crop", reflect: !0, type: Boolean })
1891
+ ], l.prototype, "noCrop", 2);
1892
+ c([
1893
+ n({ attribute: "no-resize", reflect: !0, type: Boolean })
1894
+ ], l.prototype, "noResize", 2);
1895
+ c([
1896
+ n({ attribute: "no-rotate", reflect: !0, type: Boolean })
1897
+ ], l.prototype, "noRotate", 2);
1898
+ c([
1899
+ n({ attribute: "last-image-size", reflect: !1, type: Object })
1900
+ ], l.prototype, "lastImageSize", 2);
1901
+ c([
1902
+ n({ attribute: "hide-header", reflect: !1, type: Boolean })
1903
+ ], l.prototype, "hideHeader", 2);
1904
+ c([
1905
+ n({ attribute: !1, reflect: !1, type: Object })
1906
+ ], l.prototype, "queryElement", 2);
1907
+ c([
1908
+ f()
1909
+ ], l.prototype, "activeSetting", 2);
1910
+ c([
1911
+ f()
1912
+ ], l.prototype, "selectedFormat", 2);
1913
+ c([
1914
+ f()
1915
+ ], l.prototype, "resizeSize", 2);
1916
+ c([
1917
+ f()
1918
+ ], l.prototype, "cropSize", 2);
1919
+ c([
1920
+ f()
1921
+ ], l.prototype, "rotation", 2);
1922
+ c([
1923
+ f()
1924
+ ], l.prototype, "defaultSize", 2);
1925
+ c([
1926
+ f()
1927
+ ], l.prototype, "cropperElement", 2);
1928
+ c([
1929
+ f()
1930
+ ], l.prototype, "parameters", 2);
1931
+ c([
1932
+ f()
1933
+ ], l.prototype, "loading", 2);
1934
+ c([
1935
+ f()
1936
+ ], l.prototype, "lastAction", 2);
1937
+ c([
1938
+ f()
1939
+ ], l.prototype, "frozenIndex", 2);
1940
+ c([
1941
+ S(["transformations"])
1942
+ ], l.prototype, "handleTransformationsChange", 1);
1943
+ c([
1944
+ S("selectedProxy")
1945
+ ], l.prototype, "handleSelectedProxyChange", 1);
1946
+ c([
1947
+ S("loading")
1948
+ ], l.prototype, "handleLoadingChange", 1);
1949
+ l = c([
1950
+ F("cx-asset-link-format")
1951
+ ], l);
2614
1952
  export {
2615
- p as default
1953
+ l as default
2616
1954
  };