@orangelogic/design-system 2.149.0 → 2.150.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/library/chunks/{asset-link-format.Cfj8l9X6.js → asset-link-format.CrSdl1zX.js} +200 -179
  2. package/library/chunks/{button.Dxb7AACZ.js → button.BHIyGIB2.js} +1 -1
  3. package/library/chunks/{color-swatch-group.CLoDU6aG.js → color-swatch-group.BB8EmEAc.js} +11 -12
  4. package/library/chunks/{color-swatch.D1HqWocK.js → color-swatch.B2qHfRcj.js} +1 -1
  5. package/library/chunks/{confirm-popover.Cb-pC5oI.js → confirm-popover.CYIZynVQ.js} +3 -3
  6. package/library/chunks/{dialog.DK0ZZQY3.js → dialog.CwkvxMDM.js} +2 -2
  7. package/library/chunks/{document-viewer.Cr7ARRer.js → document-viewer.B9C_4TEb.js} +5 -5
  8. package/library/chunks/{dot-pagination.CjZm-pju.js → dot-pagination.DQNVHzNH.js} +1 -1
  9. package/library/chunks/{folder-select.DHnp7EO0.js → folder-select.BnvzmNLY.js} +4 -4
  10. package/library/chunks/{header.B4IwSY-l.js → header.DwmSpdtF.js} +1 -1
  11. package/library/chunks/{i18n.S781IU3H.js → i18n.BwXikn4k.js} +1 -0
  12. package/library/chunks/{icon-button.B-GBGmBo.js → icon-button.Bwv0pBA9.js} +1 -1
  13. package/library/chunks/{iframe.BLb7TAM7.js → iframe.5FgxxThO.js} +1 -1
  14. package/library/chunks/{image.C1a_eXtI.js → image.C-rHqDVB.js} +1 -1
  15. package/library/chunks/{input.eQ-tc3ew.js → input.D28SuP1Z.js} +1 -1
  16. package/library/chunks/{option.Bo4ryyg8.js → option.BQt-5Vdg.js} +1 -1
  17. package/library/chunks/{pagination.vaTRiEs-.js → pagination.B8l2Cvm9.js} +5 -5
  18. package/library/chunks/{tab-group.Owu-XQzM.js → tab-group.C4u2fCN7.js} +3 -3
  19. package/library/chunks/{tree.BYD88cAs.js → tree.C9d7pyKM.js} +1 -1
  20. package/library/components/alert.js +2 -2
  21. package/library/components/asset-link-format.js +3 -3
  22. package/library/components/atoms.js +13 -13
  23. package/library/components/audio.js +2 -2
  24. package/library/components/border-input-group.js +2 -2
  25. package/library/components/breadcrumb.js +1 -1
  26. package/library/components/button.js +2 -2
  27. package/library/components/color-picker.js +3 -3
  28. package/library/components/color-swatch-group.js +3 -3
  29. package/library/components/color-swatch.js +2 -2
  30. package/library/components/confirm-popover.js +4 -4
  31. package/library/components/copy-button.js +1 -1
  32. package/library/components/corner-position-input-group.js +3 -3
  33. package/library/components/date-calendar.js +1 -1
  34. package/library/components/details.js +1 -1
  35. package/library/components/dialog.js +3 -3
  36. package/library/components/document-viewer.js +3 -3
  37. package/library/components/dot-pagination.js +2 -2
  38. package/library/components/drawer.js +2 -2
  39. package/library/components/dropdown.js +2 -2
  40. package/library/components/dynamic-select.js +4 -4
  41. package/library/components/e-chart.js +1 -1
  42. package/library/components/element-clamp.js +2 -2
  43. package/library/components/file-on-demand.js +9 -9
  44. package/library/components/folder-select.js +4 -4
  45. package/library/components/format-bytes.js +1 -1
  46. package/library/components/format-date.js +1 -1
  47. package/library/components/format-number.js +1 -1
  48. package/library/components/format-time.js +1 -1
  49. package/library/components/header.js +2 -2
  50. package/library/components/icon-button.js +2 -2
  51. package/library/components/iframe.js +2 -2
  52. package/library/components/image-comparer.js +1 -1
  53. package/library/components/image.js +2 -2
  54. package/library/components/input.js +2 -2
  55. package/library/components/line-clamp.js +1 -1
  56. package/library/components/masonry.js +2 -2
  57. package/library/components/menu-item.js +1 -1
  58. package/library/components/menu.js +1 -1
  59. package/library/components/molecules.js +3 -3
  60. package/library/components/option.js +2 -2
  61. package/library/components/organisms.js +2 -2
  62. package/library/components/padding-input-group.js +1 -1
  63. package/library/components/pagination.js +6 -6
  64. package/library/components/popup.js +1 -1
  65. package/library/components/position-picker.js +1 -1
  66. package/library/components/progress-bar.js +1 -1
  67. package/library/components/progress-ring.js +1 -1
  68. package/library/components/range.js +1 -1
  69. package/library/components/rating.js +1 -1
  70. package/library/components/relative-time.js +1 -1
  71. package/library/components/select.js +2 -2
  72. package/library/components/shadow-input-group.js +1 -1
  73. package/library/components/share-option-list.js +1 -1
  74. package/library/components/sidebar.js +1 -1
  75. package/library/components/size-input-group.js +3 -3
  76. package/library/components/spinner.js +1 -1
  77. package/library/components/split-panel.js +1 -1
  78. package/library/components/tab-group.js +4 -4
  79. package/library/components/tab.js +2 -2
  80. package/library/components/tag.js +2 -2
  81. package/library/components/tooltip.js +1 -1
  82. package/library/components/tree-item.js +2 -2
  83. package/library/components/tree.js +2 -2
  84. package/library/components/typeface.js +2 -2
  85. package/library/components/types.js +21582 -21483
  86. package/library/components/video.js +2 -2
  87. package/library/package.json +1 -1
  88. package/library/packages/hybrid/table-core/src/tabulator-tables/core/TabulatorFull.d.ts +6 -1
  89. package/library/packages/molecules/src/index.d.ts +1 -0
  90. package/library/packages/molecules/src/type-subtype-select/type-subtype-select.d.ts +64 -0
  91. package/library/packages/molecules/src/type-subtype-select/type-subtype-select.styles.d.ts +2 -0
  92. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +6 -0
  93. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +5 -4
  94. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-resize/asset-link-format-resize.d.ts +8 -0
  95. package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +2 -0
  96. package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +2 -0
  97. package/library/packages/organisms/src/content-builder/styleController.d.ts +5 -1
  98. package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +4 -6
  99. package/library/packages/types/src/content-builder.d.ts +8 -1
  100. package/library/packages/utils/src/custom-element/i18n.d.ts +1 -0
  101. package/library/react-web-component.d.ts +38 -4
  102. package/library/utils.js +1 -1
  103. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
1
  import "../components/cropper.js";
2
- import { C as G } from "./button.Dxb7AACZ.js";
2
+ import { C as G } from "./button.BHIyGIB2.js";
3
3
  import D from "../components/space.js";
4
4
  import { C as N } from "./typography.IqHbnd3C.js";
5
5
  import { n, C as O } from "./lib-cortex-element.CVMmyPMC.js";
6
6
  import { h as _, a as Ht, C as Et, S as Nt, b as Ot, c as Lt, d as Ut } from "./endpoints.Bn_YviaU.js";
7
- import { M as vt, U as o, T as p } from "./asset-link-format.QzzboHHE.js";
7
+ import { M as At, U as o, T as p } from "./asset-link-format.QzzboHHE.js";
8
8
  import "./browser.BHOCIF_A.js";
9
- import { i as L, x as v, E as qt } from "./lit-element.jLBm65_O.js";
9
+ import { i as L, x as S, E as qt } from "./lit-element.jLBm65_O.js";
10
10
  import "./form.BSqXLytJ.js";
11
- import { L as U } from "./i18n.S781IU3H.js";
11
+ import { L as U } from "./i18n.BwXikn4k.js";
12
12
  import { a as Bt } from "./string.BmBJ_BLT.js";
13
13
  import "./date-picker.BGHn6qg8.js";
14
14
  import "./content-builder.DZRw6hpX.js";
@@ -17,16 +17,16 @@ import { b as jt } from "./_baseUniq.CoXu-orP.js";
17
17
  import { c as q } from "./component.styles.CRO4Odto.js";
18
18
  import { c as B } from "./custom-element.L4WJXn1j.js";
19
19
  import { w as $ } from "./watch.K-dbDP6P.js";
20
- import { s as At, c as et } from "./number.CtCaI0T_.js";
20
+ import { s as vt, c as et } from "./number.CtCaI0T_.js";
21
21
  import { b as it } from "./transformation.DGzjBg6V.js";
22
22
  import { r as b } from "./state.CSDxrqLd.js";
23
- import { n as F } from "./when.Dr1es41R.js";
23
+ import { n as M } from "./when.Dr1es41R.js";
24
24
  import Z from "../components/details.js";
25
25
  import Vt from "../components/divider.js";
26
26
  import { C as Y } from "./icon.CsF1BoUl.js";
27
- import { C as mt } from "./icon-button.B-GBGmBo.js";
28
- import { C as ft } from "./input.eQ-tc3ew.js";
29
- import { C as ht } from "./option.Bo4ryyg8.js";
27
+ import { C as mt } from "./icon-button.Bwv0pBA9.js";
28
+ import { C as ft } from "./input.D28SuP1Z.js";
29
+ import { C as ht } from "./option.BQt-5Vdg.js";
30
30
  import nt from "../components/select.js";
31
31
  import { c as Gt } from "./image.QVlPFadX.js";
32
32
  import { e as J } from "./query.BBf1UFkC.js";
@@ -128,7 +128,7 @@ function st(t) {
128
128
  }
129
129
  return ee(t);
130
130
  }
131
- const ut = "CoreField.LargeSizePreview", bt = "CoreField.DocType", ie = "Document.Title", se = "Document.CaptionLong", kt = "Document.FileExtension", Ct = "CoreField.FileSize", Rt = "CoreField.Identifier", $t = "CoreField.Keywords", _t = "CoreField.MaxHeight", Pt = "CoreField.MaxWidth", at = "Document.RecordID", Mt = "CoreField.DocSubType", Wt = "CoreField.TitleWithFallback", ot = "CoreField.OriginalFileName", rt = "CoreField.UpdatedFileName", X = "CoreField.OriginalPreview", pt = {
131
+ const ut = "CoreField.LargeSizePreview", bt = "CoreField.DocType", ie = "Document.Title", se = "Document.CaptionLong", Ct = "Document.FileExtension", kt = "CoreField.FileSize", Rt = "CoreField.Identifier", $t = "CoreField.Keywords", _t = "CoreField.MaxHeight", Mt = "CoreField.MaxWidth", at = "Document.RecordID", Pt = "CoreField.DocSubType", Wt = "CoreField.TitleWithFallback", ot = "CoreField.OriginalFileName", rt = "CoreField.UpdatedFileName", X = "CoreField.OriginalPreview", pt = {
132
132
  DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
133
133
  FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
134
134
  ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
@@ -280,17 +280,17 @@ async function xi({
280
280
  originalUrl: w(f, X),
281
281
  recordId: w(f, at),
282
282
  ...h.reduce(
283
- (E, z) => (E[z] = w(f, z), E),
283
+ (E, A) => (E[A] = w(f, A), E),
284
284
  {}
285
285
  )
286
286
  };
287
287
  }).sort(
288
288
  (f, R) => (c.get(f.recordId) ?? 1 / 0) - (c.get(R.recordId) ?? 1 / 0)
289
- ), k = x.reduce(
289
+ ), C = x.reduce(
290
290
  (f, R) => f + R.totalCount,
291
291
  0
292
292
  );
293
- return { facets: [], items: y, totalCount: k };
293
+ return { facets: [], items: y, totalCount: C };
294
294
  }
295
295
  function w(t, e) {
296
296
  const i = t[e];
@@ -312,25 +312,25 @@ async function yi({
312
312
  }) {
313
313
  if (!e && !l)
314
314
  return { facets: [], items: [], totalCount: 0 };
315
- const k = (i?.filter((z) => z && typeof z == "string") ?? []).map((z) => z.replace("%20", " ")), f = {
315
+ const C = (i?.filter((A) => A && typeof A == "string") ?? []).map((A) => A.replace("%20", " ")), f = {
316
316
  directParentFolderIdentifier: e,
317
317
  parentFolderIdentifier: l,
318
- ...r.length > 0 ? { docType: [vt.Image, vt.Audio] } : {}
318
+ ...r.length > 0 ? { docType: [At.Image, At.Audio] } : {}
319
319
  }, R = await Dt({
320
320
  countPerPage: t,
321
321
  fields: [
322
- ...k,
322
+ ...C,
323
323
  Wt,
324
324
  ut,
325
325
  X,
326
326
  $t,
327
- Pt,
327
+ Mt,
328
328
  _t,
329
- Ct,
329
+ kt,
330
330
  bt,
331
- Mt,
331
+ Pt,
332
332
  Rt,
333
- kt,
333
+ Ct,
334
334
  at,
335
335
  ot,
336
336
  rt
@@ -342,26 +342,26 @@ async function yi({
342
342
  securityByPassToken: x,
343
343
  sort: void 0,
344
344
  token: y
345
- }), E = R.items.map((z) => {
346
- let K = w(z, kt), ct = w(z, rt), xt = w(z, ut);
347
- K && !K.startsWith(".") && (K = "." + K), ct === "" && (ct = w(z, ot)), K.toLowerCase() === ".gif" && (xt = w(z, X));
348
- const yt = w(z, at);
345
+ }), E = R.items.map((A) => {
346
+ let K = w(A, Ct), ct = w(A, rt), xt = w(A, ut);
347
+ K && !K.startsWith(".") && (K = "." + K), ct === "" && (ct = w(A, ot)), K.toLowerCase() === ".gif" && (xt = w(A, X));
348
+ const yt = w(A, at);
349
349
  return {
350
- docSubType: w(z, Mt),
351
- docType: w(z, bt) || "",
350
+ docSubType: w(A, Pt),
351
+ docType: w(A, bt) || "",
352
352
  extension: K,
353
- height: w(z, _t) || "0",
353
+ height: w(A, _t) || "0",
354
354
  id: yt,
355
- identifier: w(z, Rt),
355
+ identifier: w(A, Rt),
356
356
  imageUrl: xt,
357
357
  name: ct,
358
- originalUrl: w(z, X),
358
+ originalUrl: w(A, X),
359
359
  recordId: yt,
360
- size: w(z, Ct) || "0 MB",
361
- tags: w(z, $t),
362
- width: w(z, Pt) || "0",
363
- ...k.reduce(
364
- (St, zt) => (St[zt] = w(z, zt), St),
360
+ size: w(A, kt) || "0 MB",
361
+ tags: w(A, $t),
362
+ width: w(A, Mt) || "0",
363
+ ...C.reduce(
364
+ (St, zt) => (St[zt] = w(A, zt), St),
365
365
  {}
366
366
  )
367
367
  };
@@ -471,7 +471,7 @@ async function zi({
471
471
  return { formatsByDocType: {} };
472
472
  }
473
473
  }
474
- async function vi({
474
+ async function Ai({
475
475
  recordIds: t,
476
476
  rightsToCheck: e
477
477
  }) {
@@ -495,7 +495,7 @@ async function vi({
495
495
  }
496
496
  }
497
497
  const ce = L`.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,.asset-link-format__reset{--color:var(--cx-color-primary);--background-color:transparent}`, pe = L`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}`;
498
- var de = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, S = (t, e, i, s) => {
498
+ var de = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
499
499
  for (var a = s > 1 ? void 0 : s ? ue(e, i) : e, r = t.length - 1, h; r >= 0; r--)
500
500
  (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
501
501
  return s && a && de(e, i, a), a;
@@ -724,23 +724,23 @@ let g = class extends O {
724
724
  }
725
725
  render() {
726
726
  const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
727
- return v`<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">${F(
727
+ return S`<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">${M(
728
728
  !this.noRatioModes,
729
- () => v`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${I({
729
+ () => S`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${I({
730
730
  width: "100%"
731
731
  })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${tt(
732
732
  t,
733
733
  (i) => i.value,
734
- ({ label: i, value: s }) => v`<cx-option value=${s}>${i}</cx-option>`
734
+ ({ label: i, value: s }) => S`<cx-option value=${s}>${i}</cx-option>`
735
735
  )}
736
- ${F(
736
+ ${M(
737
737
  e.length > 0,
738
- () => v`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
738
+ () => S`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
739
739
  )}
740
740
  ${tt(
741
741
  e,
742
742
  (i) => i.value,
743
- ({ label: i, value: s }) => v`<cx-option value=${s}>${i}</cx-option>`
743
+ ({ label: i, value: s }) => S`<cx-option value=${s}>${i}</cx-option>`
744
744
  )}</cx-select>`
745
745
  )}<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 === o.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">
746
746
  W
@@ -748,14 +748,17 @@ let g = class extends O {
748
748
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
749
749
  })} ?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 === o.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">
750
750
  H
751
- </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=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select></cx-space>${F(
751
+ </cx-typography></cx-input></div>${M(
752
+ !this.noRatioModes,
753
+ () => S`<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=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
754
+ )}</cx-space>${M(
752
755
  this.focusModes.length > 0,
753
- () => v`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${I({
756
+ () => S`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${I({
754
757
  width: "100%"
755
758
  })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${tt(
756
759
  this.focusModes,
757
760
  (i) => i.value,
758
- ({ label: i, value: s }) => v`<cx-option value=${s}>${i}</cx-option>`
761
+ ({ label: i, value: s }) => S`<cx-option value=${s}>${i}</cx-option>`
759
762
  )}</cx-select>`
760
763
  )}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${I({
761
764
  marginLeft: "auto"
@@ -775,85 +778,85 @@ g.dependencies = {
775
778
  "cx-space": D,
776
779
  "cx-typography": N
777
780
  };
778
- S([
781
+ z([
779
782
  J(".details")
780
783
  ], g.prototype, "base", 2);
781
- S([
784
+ z([
782
785
  n({ reflect: !0, type: Boolean })
783
786
  ], g.prototype, "open", 2);
784
- S([
787
+ z([
785
788
  n({ reflect: !0, type: Number })
786
789
  ], g.prototype, "width", 2);
787
- S([
790
+ z([
788
791
  n({ reflect: !0, type: Number })
789
792
  ], g.prototype, "height", 2);
790
- S([
793
+ z([
791
794
  n({ attribute: "max-width", reflect: !0, type: Number })
792
795
  ], g.prototype, "maxWidth", 2);
793
- S([
796
+ z([
794
797
  n({ attribute: "max-height", reflect: !0, type: Number })
795
798
  ], g.prototype, "maxHeight", 2);
796
- S([
799
+ z([
797
800
  n({ attribute: "ratio-width", reflect: !0, type: Number })
798
801
  ], g.prototype, "ratioWidth", 2);
799
- S([
802
+ z([
800
803
  n({ attribute: "ratio-height", reflect: !0, type: Number })
801
804
  ], g.prototype, "ratioHeight", 2);
802
- S([
805
+ z([
803
806
  n({ attribute: "percentage-width", reflect: !0, type: Number })
804
807
  ], g.prototype, "percentageWidth", 2);
805
- S([
808
+ z([
806
809
  n({ attribute: "percentage-height", reflect: !0, type: Number })
807
810
  ], g.prototype, "percentageHeight", 2);
808
- S([
811
+ z([
809
812
  n({ reflect: !0, type: String })
810
813
  ], g.prototype, "unit", 2);
811
- S([
814
+ z([
812
815
  n({ attribute: "disabled-apply", reflect: !0, type: Boolean })
813
816
  ], g.prototype, "disabledApply", 2);
814
- S([
817
+ z([
815
818
  n({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
816
819
  ], g.prototype, "noRatioModes", 2);
817
- S([
820
+ z([
818
821
  n({ attribute: "last-applied-setting", reflect: !1, type: Object })
819
822
  ], g.prototype, "lastAppliedSetting", 2);
820
- S([
823
+ z([
821
824
  n({ reflect: !0, type: Boolean })
822
825
  ], g.prototype, "loading", 2);
823
- S([
826
+ z([
824
827
  n({ attribute: "crop-modes", reflect: !1, type: Array })
825
828
  ], g.prototype, "cropModes", 2);
826
- S([
829
+ z([
827
830
  n({ attribute: "focus-modes", reflect: !1, type: Object })
828
831
  ], g.prototype, "focusModes", 2);
829
- S([
832
+ z([
830
833
  n({ attribute: "focus-mode", reflect: !0, type: String })
831
834
  ], g.prototype, "focusMode", 2);
832
- S([
835
+ z([
833
836
  n({ attribute: "crop-mode", reflect: !0, type: String })
834
837
  ], g.prototype, "cropMode", 2);
835
- S([
838
+ z([
836
839
  n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
837
840
  ], g.prototype, "keepAspectRatio", 2);
838
- S([
841
+ z([
839
842
  b()
840
843
  ], g.prototype, "invalidWidth", 2);
841
- S([
844
+ z([
842
845
  b()
843
846
  ], g.prototype, "invalidHeight", 2);
844
- S([
847
+ z([
845
848
  b()
846
849
  ], g.prototype, "aspectRatio", 2);
847
- S([
850
+ z([
848
851
  $("cropMode", { waitUntilFirstUpdate: !0 }),
849
852
  $("maxWidth", { waitUntilFirstUpdate: !0 }),
850
853
  $("maxHeight", { waitUntilFirstUpdate: !0 }),
851
854
  $("keepAspectRatio")
852
855
  ], g.prototype, "handleCropModeChange", 1);
853
- S([
856
+ z([
854
857
  $("open", { waitUntilFirstUpdate: !0 })
855
858
  ], g.prototype, "handleOpenChange", 1);
856
- g = S([
859
+ g = z([
857
860
  B("cx-asset-link-format-crop")
858
861
  ], g);
859
862
  const me = L`.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%}}`;
@@ -873,10 +876,10 @@ let V = class extends O {
873
876
  });
874
877
  }
875
878
  render() {
876
- return v`<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}>${tt(
879
+ return S`<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}>${tt(
877
880
  this.items,
878
881
  (t) => t.value,
879
- (t) => v`<cx-option value=${t.value}>${t.displayName}</cx-option>`
882
+ (t) => S`<cx-option value=${t.value}>${t.displayName}</cx-option>`
880
883
  )}</cx-select></cx-space>`;
881
884
  }
882
885
  };
@@ -948,10 +951,10 @@ let P = class extends O {
948
951
  t.target !== this.base && t.stopPropagation();
949
952
  }
950
953
  render() {
951
- return v`<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}>${tt(
954
+ return S`<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}>${tt(
952
955
  this.items,
953
956
  (t) => t.id,
954
- (t) => v`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
957
+ (t) => S`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
955
958
  )}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${I({
956
959
  "margin-left": "auto"
957
960
  })} ?disabled=${this.scopedValue === this.value} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
@@ -995,10 +998,10 @@ P = W([
995
998
  B("cx-asset-link-format-proxy")
996
999
  ], P);
997
1000
  const ze = L`cx-details::part(base){border-bottom-width:0}`;
998
- var ve = Object.defineProperty, Ae = Object.getOwnPropertyDescriptor, Q = (t, e, i, s) => {
999
- for (var a = s > 1 ? void 0 : s ? Ae(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1001
+ var Ae = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, Q = (t, e, i, s) => {
1002
+ for (var a = s > 1 ? void 0 : s ? ve(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1000
1003
  (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1001
- return s && a && ve(e, i, a), a;
1004
+ return s && a && Ae(e, i, a), a;
1002
1005
  };
1003
1006
  let H = class extends O {
1004
1007
  constructor() {
@@ -1046,7 +1049,7 @@ let H = class extends O {
1046
1049
  t.target !== this.base && t.stopPropagation();
1047
1050
  }
1048
1051
  render() {
1049
- return v`<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=${I({
1052
+ return S`<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=${I({
1050
1053
  flex: "1"
1051
1054
  })} @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>`;
1052
1055
  }
@@ -1083,17 +1086,17 @@ H = Q([
1083
1086
  B("cx-asset-link-format-quality")
1084
1087
  ], H);
1085
1088
  const we = L`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}`;
1086
- var be = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, C = (t, e, i, s) => {
1087
- for (var a = s > 1 ? void 0 : s ? ke(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1089
+ var be = Object.defineProperty, Ce = Object.getOwnPropertyDescriptor, k = (t, e, i, s) => {
1090
+ for (var a = s > 1 ? void 0 : s ? Ce(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1088
1091
  (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1089
1092
  return s && a && be(e, i, a), a;
1090
1093
  };
1091
- let A = class extends O {
1094
+ let v = class extends O {
1092
1095
  constructor() {
1093
1096
  super(...arguments), this.localize = new U(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 = {
1094
1097
  [o.Pixel]: { height: 0, width: 0 },
1095
1098
  [o.AspectRatio]: { height: 1, width: 1 }
1096
- }, this.loading = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
1099
+ }, this.loading = !1, this.noRatioModes = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
1097
1100
  }
1098
1101
  /**
1099
1102
  * A computed property that checks if the current resize settings match the last applied settings.
@@ -1227,19 +1230,22 @@ let A = class extends O {
1227
1230
  });
1228
1231
  }
1229
1232
  render() {
1230
- return v`<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 === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1233
+ return S`<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 === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1231
1234
  W
1232
1235
  </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=${I({
1233
1236
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
1234
1237
  })} ?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 === o.Pixel ? this.height.toString() : this.ratioHeight.toString()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1235
1238
  H
1236
- </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=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.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=${I({
1239
+ </cx-typography></cx-input></div>${M(
1240
+ !this.noRatioModes,
1241
+ () => S`<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=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
1242
+ )}</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=${I({
1237
1243
  marginLeft: "auto"
1238
1244
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1239
1245
  }
1240
1246
  };
1241
- A.styles = [q, we];
1242
- A.dependencies = {
1247
+ v.styles = [q, we];
1248
+ v.dependencies = {
1243
1249
  "cx-button": G,
1244
1250
  "cx-details": Z,
1245
1251
  "cx-icon": Y,
@@ -1250,70 +1256,73 @@ A.dependencies = {
1250
1256
  "cx-space": D,
1251
1257
  "cx-typography": N
1252
1258
  };
1253
- C([
1259
+ k([
1254
1260
  J(".details")
1255
- ], A.prototype, "base", 2);
1256
- C([
1261
+ ], v.prototype, "base", 2);
1262
+ k([
1257
1263
  n({ reflect: !0, type: Boolean })
1258
- ], A.prototype, "open", 2);
1259
- C([
1264
+ ], v.prototype, "open", 2);
1265
+ k([
1260
1266
  n({ reflect: !0, type: Number })
1261
- ], A.prototype, "width", 2);
1262
- C([
1267
+ ], v.prototype, "width", 2);
1268
+ k([
1263
1269
  n({ reflect: !0, type: Number })
1264
- ], A.prototype, "height", 2);
1265
- C([
1270
+ ], v.prototype, "height", 2);
1271
+ k([
1266
1272
  n({ attribute: "max-width", reflect: !0, type: Number })
1267
- ], A.prototype, "maxWidth", 2);
1268
- C([
1273
+ ], v.prototype, "maxWidth", 2);
1274
+ k([
1269
1275
  n({ attribute: "max-height", reflect: !0, type: Number })
1270
- ], A.prototype, "maxHeight", 2);
1271
- C([
1276
+ ], v.prototype, "maxHeight", 2);
1277
+ k([
1272
1278
  n({ attribute: "ratio-width", reflect: !0, type: Number })
1273
- ], A.prototype, "ratioWidth", 2);
1274
- C([
1279
+ ], v.prototype, "ratioWidth", 2);
1280
+ k([
1275
1281
  n({ attribute: "ratio-height", reflect: !0, type: Number })
1276
- ], A.prototype, "ratioHeight", 2);
1277
- C([
1282
+ ], v.prototype, "ratioHeight", 2);
1283
+ k([
1278
1284
  n({ reflect: !0, type: String })
1279
- ], A.prototype, "unit", 2);
1280
- C([
1285
+ ], v.prototype, "unit", 2);
1286
+ k([
1281
1287
  n({ attribute: "last-applied-setting", reflect: !1, type: Object })
1282
- ], A.prototype, "lastAppliedSetting", 2);
1283
- C([
1288
+ ], v.prototype, "lastAppliedSetting", 2);
1289
+ k([
1284
1290
  n({ reflect: !0, type: Boolean })
1285
- ], A.prototype, "loading", 2);
1286
- C([
1291
+ ], v.prototype, "loading", 2);
1292
+ k([
1293
+ n({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
1294
+ ], v.prototype, "noRatioModes", 2);
1295
+ k([
1287
1296
  n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1288
- ], A.prototype, "keepAspectRatio", 2);
1289
- C([
1297
+ ], v.prototype, "keepAspectRatio", 2);
1298
+ k([
1290
1299
  b()
1291
- ], A.prototype, "invalidWidth", 2);
1292
- C([
1300
+ ], v.prototype, "invalidWidth", 2);
1301
+ k([
1293
1302
  b()
1294
- ], A.prototype, "invalidHeight", 2);
1295
- C([
1303
+ ], v.prototype, "invalidHeight", 2);
1304
+ k([
1296
1305
  b()
1297
- ], A.prototype, "aspectRatio", 2);
1298
- C([
1306
+ ], v.prototype, "aspectRatio", 2);
1307
+ k([
1299
1308
  $("cropMode", { waitUntilFirstUpdate: !0 }),
1300
1309
  $("maxWidth", { waitUntilFirstUpdate: !0 }),
1301
1310
  $("maxHeight", { waitUntilFirstUpdate: !0 }),
1302
1311
  $("keepAspectRatio")
1303
- ], A.prototype, "handleCropModeChange", 1);
1304
- C([
1312
+ ], v.prototype, "handleCropModeChange", 1);
1313
+ k([
1305
1314
  $("open", { waitUntilFirstUpdate: !0 })
1306
- ], A.prototype, "handleOpenChange", 1);
1307
- A = C([
1315
+ ], v.prototype, "handleOpenChange", 1);
1316
+ v = k([
1308
1317
  B("cx-asset-link-format-resize")
1309
- ], A);
1310
- const Ce = L`cx-details::part(base){border-bottom-width:0}`;
1318
+ ], v);
1319
+ const ke = L`cx-details::part(base){border-bottom-width:0}`;
1311
1320
  var Re = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, j = (t, e, i, s) => {
1312
1321
  for (var a = s > 1 ? void 0 : s ? $e(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1313
1322
  (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1314
1323
  return s && a && Re(e, i, a), a;
1315
1324
  };
1316
- let M = class extends O {
1325
+ let F = class extends O {
1317
1326
  constructor() {
1318
1327
  super(...arguments), this.localize = new U(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
1319
1328
  }
@@ -1326,14 +1335,14 @@ let M = class extends O {
1326
1335
  const e = t.target.value, i = Number(e);
1327
1336
  if (Number.isNaN(i))
1328
1337
  return;
1329
- const s = At(i);
1338
+ const s = vt(i);
1330
1339
  (i > 360 || i < -360) && (t.target.value = s.toString()), this.emit("cx-asset-link-format-rotation-change", {
1331
1340
  detail: s
1332
1341
  });
1333
1342
  }
1334
1343
  handleButtonClick(t) {
1335
1344
  this.emit("cx-asset-link-format-rotation-change", {
1336
- detail: At(t)
1345
+ detail: vt(t)
1337
1346
  });
1338
1347
  }
1339
1348
  handleClockwiseClick() {
@@ -1353,14 +1362,14 @@ let M = class extends O {
1353
1362
  });
1354
1363
  }
1355
1364
  render() {
1356
- return v`<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=${I({
1365
+ return S`<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=${I({
1357
1366
  flex: "none",
1358
1367
  width: "80px"
1359
1368
  })} @cx-input=${this.handleRotationChange}></cx-input><cx-button data-testid="cx-asset-link-format-rotation-apply" variant="primary" ?disabled=${this.value === this.lastAppliedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1360
1369
  }
1361
1370
  };
1362
- M.styles = [q, Ce];
1363
- M.dependencies = {
1371
+ F.styles = [q, ke];
1372
+ F.dependencies = {
1364
1373
  "cx-button": G,
1365
1374
  "cx-button-group": Qt,
1366
1375
  "cx-details": Z,
@@ -1371,33 +1380,33 @@ M.dependencies = {
1371
1380
  };
1372
1381
  j([
1373
1382
  J(".details")
1374
- ], M.prototype, "base", 2);
1383
+ ], F.prototype, "base", 2);
1375
1384
  j([
1376
1385
  n({ reflect: !0, type: Boolean })
1377
- ], M.prototype, "open", 2);
1386
+ ], F.prototype, "open", 2);
1378
1387
  j([
1379
1388
  n({ reflect: !0, type: Number })
1380
- ], M.prototype, "value", 2);
1389
+ ], F.prototype, "value", 2);
1381
1390
  j([
1382
1391
  n({ attribute: "default-value", reflect: !0, type: Number })
1383
- ], M.prototype, "defaultValue", 2);
1392
+ ], F.prototype, "defaultValue", 2);
1384
1393
  j([
1385
1394
  n({ reflect: !0, type: Boolean })
1386
- ], M.prototype, "loading", 2);
1395
+ ], F.prototype, "loading", 2);
1387
1396
  j([
1388
1397
  n({ attribute: "last-applied-value", reflect: !0, type: Number })
1389
- ], M.prototype, "lastAppliedValue", 2);
1398
+ ], F.prototype, "lastAppliedValue", 2);
1390
1399
  j([
1391
1400
  $("open", { waitUntilFirstUpdate: !0 })
1392
- ], M.prototype, "handleOpenChange", 1);
1393
- M = j([
1401
+ ], F.prototype, "handleOpenChange", 1);
1402
+ F = j([
1394
1403
  B("cx-asset-link-format-rotation")
1395
- ], M);
1404
+ ], F);
1396
1405
  const _e = L`cx-details::part(base){border-bottom-width:0}`;
1397
- var Pe = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, lt = (t, e, i, s) => {
1398
- for (var a = s > 1 ? void 0 : s ? Me(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1406
+ var Me = Object.defineProperty, Pe = Object.getOwnPropertyDescriptor, lt = (t, e, i, s) => {
1407
+ for (var a = s > 1 ? void 0 : s ? Pe(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1399
1408
  (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1400
- return s && a && Pe(e, i, a), a;
1409
+ return s && a && Me(e, i, a), a;
1401
1410
  };
1402
1411
  let T = class extends O {
1403
1412
  constructor() {
@@ -1425,7 +1434,7 @@ let T = class extends O {
1425
1434
  t.target !== this.base && t.stopPropagation();
1426
1435
  }
1427
1436
  render() {
1428
- return v`<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>`;
1437
+ return S`<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>`;
1429
1438
  }
1430
1439
  };
1431
1440
  T.styles = [q, _e];
@@ -1568,6 +1577,16 @@ let d = class extends O {
1568
1577
  (e) => e.key === p.Crop
1569
1578
  )?.value.unit ?? o.Pixel;
1570
1579
  }
1580
+ /**
1581
+ * The focus mode of the last applied crop transformation, for the no-asset case only.
1582
+ * Reflects whatever focus mode the last committed Crop transformation used, or 'manual'
1583
+ * when nothing has been applied yet.
1584
+ */
1585
+ get lastAppliedCropFocusMode() {
1586
+ return this.transformations.findLast(
1587
+ (e) => e.key === p.Crop
1588
+ )?.value.focusMode ?? "manual";
1589
+ }
1571
1590
  /**
1572
1591
  * Checks if the crop apply button should be disabled.
1573
1592
  * This is determined by comparing the current crop size with the last crop size.
@@ -1579,8 +1598,10 @@ let d = class extends O {
1579
1598
  return !1;
1580
1599
  if (this.cropSize.unit === o.AspectRatio && !this.asset) {
1581
1600
  const e = this.lastCropSize[o.AspectRatio];
1582
- return this.cropSize.ratioWidth === e.width && this.cropSize.ratioHeight === e.height;
1601
+ return this.cropSize.ratioWidth === e.width && this.cropSize.ratioHeight === e.height && this.cropSize.focusMode === this.lastAppliedCropFocusMode;
1583
1602
  }
1603
+ if (!this.asset && this.cropSize.focusMode !== this.lastAppliedCropFocusMode)
1604
+ return !1;
1584
1605
  const t = [
1585
1606
  "height",
1586
1607
  "percentageHeight",
@@ -1864,7 +1885,7 @@ let d = class extends O {
1864
1885
  (c) => c.key === p.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
1865
1886
  );
1866
1887
  if (r?.value.unit === o.AspectRatio && r.value.ratioWidth && r.value.ratioHeight) {
1867
- const { focusMode: c, ratioHeight: y, ratioWidth: k } = r.value;
1888
+ const { focusMode: c, ratioHeight: y, ratioWidth: C } = r.value;
1868
1889
  this.cropSize = {
1869
1890
  ...this.cropSize,
1870
1891
  cropMode: "free",
@@ -1872,11 +1893,11 @@ let d = class extends O {
1872
1893
  percentageHeight: 100,
1873
1894
  percentageWidth: 100,
1874
1895
  ratioHeight: y,
1875
- ratioWidth: k,
1896
+ ratioWidth: C,
1876
1897
  unit: o.AspectRatio
1877
1898
  };
1878
1899
  } else if (r) {
1879
- const { focusMode: c, height: y, unit: k, width: f, x: R = 0, y: E = 0 } = r.value;
1900
+ const { focusMode: c, height: y, unit: C, width: f, x: R = 0, y: E = 0 } = r.value;
1880
1901
  this.cropSize = {
1881
1902
  ...this.cropSize,
1882
1903
  cropMode: "free",
@@ -1884,7 +1905,7 @@ let d = class extends O {
1884
1905
  height: y,
1885
1906
  percentageHeight: 100,
1886
1907
  percentageWidth: 100,
1887
- unit: k ?? o.Pixel,
1908
+ unit: C ?? o.Pixel,
1888
1909
  width: f,
1889
1910
  x: R,
1890
1911
  y: E
@@ -1920,12 +1941,12 @@ let d = class extends O {
1920
1941
  unit: o.AspectRatio
1921
1942
  };
1922
1943
  } else if (h) {
1923
- const { height: c = 0, unit: y, width: k = 0 } = h.value;
1944
+ const { height: c = 0, unit: y, width: C = 0 } = h.value;
1924
1945
  this.resizeSize = {
1925
1946
  ...this.resizeSize,
1926
1947
  height: c,
1927
1948
  unit: y ?? o.Pixel,
1928
- width: k
1949
+ width: C
1929
1950
  };
1930
1951
  } else
1931
1952
  this.resizeSize = {
@@ -2196,11 +2217,11 @@ let d = class extends O {
2196
2217
  imageUrl: this.selectedFormat.url
2197
2218
  });
2198
2219
  if (y) {
2199
- let k = a, f = r;
2200
- i || (k = y.height * 100 / this.selectedFormat.height), c || (f = y.width * 100 / this.selectedFormat.width), this.cropSize = {
2220
+ let C = a, f = r;
2221
+ i || (C = y.height * 100 / this.selectedFormat.height), c || (f = y.width * 100 / this.selectedFormat.width), this.cropSize = {
2201
2222
  ...this.cropSize,
2202
2223
  height: y.height,
2203
- percentageHeight: k ?? this.cropSize.percentageHeight,
2224
+ percentageHeight: C ?? this.cropSize.percentageHeight,
2204
2225
  percentageWidth: f ?? this.cropSize.percentageWidth,
2205
2226
  width: y.width,
2206
2227
  x: y.x * 100 / this.selectedFormat.width,
@@ -2237,7 +2258,7 @@ let d = class extends O {
2237
2258
  ));
2238
2259
  const c = this.cropSize.focusMode;
2239
2260
  this.focusModes.find(
2240
- (k) => k.value === c
2261
+ (C) => C.value === c
2241
2262
  )?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
2242
2263
  focusMode: c,
2243
2264
  height: m,
@@ -2387,11 +2408,11 @@ let d = class extends O {
2387
2408
  ratioHeight: x,
2388
2409
  ratioWidth: c,
2389
2410
  unit: y,
2390
- width: k,
2411
+ width: C,
2391
2412
  x: f,
2392
2413
  y: R
2393
2414
  } = this.cropSize, E = this.focusModes.find(
2394
- (z) => z.value === l
2415
+ (A) => A.value === l
2395
2416
  )?.auto ?? !1;
2396
2417
  if (y === o.AspectRatio) {
2397
2418
  c && x && this.upsertTransformation({
@@ -2406,14 +2427,14 @@ let d = class extends O {
2406
2427
  });
2407
2428
  return;
2408
2429
  }
2409
- (m || k) && this.upsertTransformation({
2430
+ (m || C) && this.upsertTransformation({
2410
2431
  key: p.Crop,
2411
2432
  value: {
2412
2433
  focusMode: l,
2413
2434
  height: m,
2414
2435
  isFocusModeAuto: E,
2415
2436
  unit: y,
2416
- width: k,
2437
+ width: C,
2417
2438
  x: Number.isFinite(f) ? f : void 0,
2418
2439
  y: Number.isFinite(R) ? R : void 0
2419
2440
  }
@@ -2624,33 +2645,33 @@ let d = class extends O {
2624
2645
  this.selectedProxy = t ? this.defaultProxy : this.selectedProxy || this.proxies?.[0]?.id || "", this.transformations = [], this.frozenIndex = -1, this.syncQuality();
2625
2646
  }
2626
2647
  render() {
2627
- return v`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${F(
2648
+ return S`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${M(
2628
2649
  !this.hideHeader,
2629
- () => v`<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-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${F(this.canReset, () => v`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${this.transformations.length === 0} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
2650
+ () => S`<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-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${M(this.canReset, () => S`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${this.transformations.length === 0} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
2630
2651
  () => qt
2631
2652
  )}
2632
- ${F(
2653
+ ${M(
2633
2654
  !this.noFormat,
2634
- () => v`<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>`
2655
+ () => S`<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>`
2635
2656
  )}
2636
- ${F(
2657
+ ${M(
2637
2658
  !this.noCrop,
2638
- () => v`<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} ?no-ratio-modes=${!this.asset} ?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.asset ? this.lastResizeSize[o.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[o.Pixel].height : 1 / 0} 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>`
2659
+ () => S`<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} ?no-ratio-modes=${!this.asset} ?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.asset ? this.lastResizeSize[o.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[o.Pixel].height : 1 / 0} 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>`
2639
2660
  )}
2640
- ${F(
2661
+ ${M(
2641
2662
  !this.noResize,
2642
- () => v`<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.asset ? this.imageSize.width : 1 / 0} max-height=${this.asset ? this.imageSize.height : 1 / 0} 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>`
2663
+ () => S`<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} ?no-ratio-modes=${!this.asset} ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio} width=${this.resizeSize.width} height=${this.resizeSize.height} max-width=${this.asset ? this.imageSize.width : 1 / 0} max-height=${this.asset ? this.imageSize.height : 1 / 0} 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>`
2643
2664
  )}
2644
- ${F(
2665
+ ${M(
2645
2666
  !this.noRotate,
2646
- () => v`<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} last-applied-value=${this.lastRotation} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
2647
- )}<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>${F(
2667
+ () => S`<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} last-applied-value=${this.lastRotation} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
2668
+ )}<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>${M(
2648
2669
  !this.noMetadata,
2649
- () => v`<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>`
2670
+ () => S`<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>`
2650
2671
  )}
2651
- ${F(
2672
+ ${M(
2652
2673
  this.useCustomExtension,
2653
- () => v`<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>`
2674
+ () => S`<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>`
2654
2675
  )}</div>`;
2655
2676
  }
2656
2677
  };
@@ -2661,8 +2682,8 @@ d.dependencies = {
2661
2682
  "cx-asset-link-format-metadata": T,
2662
2683
  "cx-asset-link-format-proxy": P,
2663
2684
  "cx-asset-link-format-quality": H,
2664
- "cx-asset-link-format-resize": A,
2665
- "cx-asset-link-format-rotation": M,
2685
+ "cx-asset-link-format-resize": v,
2686
+ "cx-asset-link-format-rotation": F,
2666
2687
  "cx-button": G,
2667
2688
  "cx-space": D,
2668
2689
  "cx-typography": N
@@ -2787,20 +2808,20 @@ export {
2787
2808
  _t as F,
2788
2809
  X as O,
2789
2810
  yi as a,
2790
- Pt as b,
2811
+ Mt as b,
2791
2812
  bt as c,
2792
2813
  xi as d,
2793
- kt as e,
2814
+ Ct as e,
2794
2815
  ie as f,
2795
2816
  Wt as g,
2796
2817
  zi as h,
2797
- vi as i,
2818
+ Ai as i,
2798
2819
  Si as j,
2799
2820
  Dt as k,
2800
2821
  at as l,
2801
- Ct as m,
2822
+ kt as m,
2802
2823
  Rt as n,
2803
- Mt as o,
2824
+ Pt as o,
2804
2825
  Zt as p,
2805
2826
  Xt as u
2806
2827
  };