@orangelogic/design-system 4.38.0 → 4.40.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.
- package/library/chunks/{alert.D8Gwfkvy.js → alert.C7jo45Pq.js} +2 -2
- package/library/chunks/{array-line-clamp.DSzPRb_y.js → array-line-clamp.BWWMLJhi.js} +2 -2
- package/library/chunks/asset-link-format.COPyGdND.js +22 -0
- package/library/chunks/{asset-link-format.vbmd2KkO.js → asset-link-format.P8WKO488.js} +1124 -578
- package/library/chunks/{audio.RwF9cR3b.js → audio.C8rPv9iZ.js} +2 -2
- package/library/chunks/{bicolor-picker.CoEkuFFa.js → bicolor-picker.Dbag6AHo.js} +1 -1
- package/library/chunks/{block-width.Bpxcj778.js → block-width.C5qELJEx.js} +394 -389
- package/library/chunks/{border-input-group.B7tkimlE.js → border-input-group.B12EFZFD.js} +3 -3
- package/library/chunks/{breadcrumb.C_NpOjQB.js → breadcrumb.BLCAOe89.js} +1 -1
- package/library/chunks/{button.BlhGCsjP.js → button.DnOMjl_G.js} +2 -2
- package/library/chunks/{color-picker.Cs91unvg.js → color-picker.Dz6vVcZS.js} +10 -10
- package/library/chunks/{color-swatch-group.BF_AFUh6.js → color-swatch-group.CZx1bZyC.js} +22 -22
- package/library/chunks/{color-swatch.By2bJtpB.js → color-swatch.C3Elv0dG.js} +3 -3
- package/library/chunks/{config-manager.CfFtxFHj.js → config-manager.Dsb1DCbi.js} +28 -28
- package/library/chunks/{configs-controller.DSc6DiFO.js → configs-controller.Cm21QV6C.js} +425 -416
- package/library/chunks/{confirm-popover.CNgNi7H6.js → confirm-popover.CahmeTbf.js} +4 -4
- package/library/chunks/{copy-button.D9kDKwlR.js → copy-button.D2ZwXadV.js} +2 -2
- package/library/chunks/{corner-position-input-group.Cc0hzrPR.js → corner-position-input-group.BV8b7GsS.js} +4 -4
- package/library/chunks/{cropper.D4ymxgab.js → cropper.BRsN8h2t.js} +1 -1
- package/library/chunks/{date-calendar.Dc3XKO0t.js → date-calendar.BpfgvrtE.js} +1 -1
- package/library/chunks/{details.BacO3ROq.js → details.BGlfx87d.js} +1 -1
- package/library/chunks/{dialog.Ci7Q_ZOR.js → dialog.BfGASgvs.js} +3 -3
- package/library/chunks/{document-viewer.CdA65_RB.js → document-viewer.BtB-RTvP.js} +14 -14
- package/library/chunks/{dot-pagination.DDt0UoT8.js → dot-pagination.BUZhiikk.js} +2 -2
- package/library/chunks/{drawer.BeMBXsqi.js → drawer.BEXLFfil.js} +2 -2
- package/library/chunks/{dropdown.DFLP9K18.js → dropdown.CnT7uTzf.js} +4 -4
- package/library/chunks/{dynamic-select.wu648W9-.js → dynamic-select.BeqPRh6t.js} +5 -5
- package/library/chunks/{e-chart.fGTLKIDX.js → e-chart.BkqfNGfV.js} +2 -2
- package/library/chunks/{element-clamp.B509oA2s.js → element-clamp.CwFlUOET.js} +2 -2
- package/library/chunks/{file-on-demand.C17w6fng.js → file-on-demand.BEAjdrt_.js} +16 -16
- package/library/chunks/{folder-select.CQllI-Id.js → folder-select.B02Mdr8b.js} +31 -34
- package/library/chunks/{format-time.DZCXUWmw.js → format-time.ysWqJKLC.js} +1 -1
- package/library/chunks/{header.BDEqW3TI.js → header.NoiopyyV.js} +2 -2
- package/library/chunks/{i18n.BJ2p4em8.js → i18n.CQPiI18Q.js} +3 -0
- package/library/chunks/{icon-button.Dd-oDRfX.js → icon-button.BAUsYiQh.js} +2 -2
- package/library/chunks/{iframe.DsOaw03m.js → iframe.CKoHB0lA.js} +1 -1
- package/library/chunks/{image-comparer.FB0ZzA0d.js → image-comparer.WUKRGHqI.js} +1 -1
- package/library/chunks/{image.Cmh2WYdP.js → image.CRrj-94o.js} +2 -2
- package/library/chunks/{input.Fmdh6pnf.js → input.D1UkXp3F.js} +1 -1
- package/library/chunks/{line-clamp.CgiUerew.js → line-clamp.B7QEzpUF.js} +2 -2
- package/library/chunks/{markdown.DMexA2xN.js → markdown.CrAalbNm.js} +2 -2
- package/library/chunks/{masonry.DqU7fvCr.js → masonry.B5kwpjVE.js} +4 -4
- package/library/chunks/{menu-item.Du9N-cKj.js → menu-item.BgoL4QFj.js} +3 -3
- package/library/chunks/{menu.gmy0sy3a.js → menu.DJBOpi__.js} +2 -2
- package/library/chunks/{option._7i4rjM5.js → option.C97GEvQ6.js} +1 -1
- package/library/chunks/{padding-input-group.E8trRZI5.js → padding-input-group.CGDq3Cct.js} +1 -1
- package/library/chunks/{pagination.C0YML9vO.js → pagination.GiwV5ZHF.js} +7 -7
- package/library/chunks/{popup.uU7UtxmR.js → popup.C2ySgZ9I.js} +1 -1
- package/library/chunks/{position-picker.DwDC9gDl.js → position-picker.DzRyAx7a.js} +1 -1
- package/library/chunks/{progress-bar.BJfkoZ6G.js → progress-bar.BfHPsueW.js} +1 -1
- package/library/chunks/{progress-ring.BSfnNF9M.js → progress-ring.Cn08Dbar.js} +1 -1
- package/library/chunks/{radio-card.DOnTPgND.js → radio-card.BPumEe9b.js} +1 -1
- package/library/chunks/{range.blqKtzMI.js → range.E1wPWa7j.js} +2 -2
- package/library/chunks/{rating.BgUId4FT.js → rating.BjGQtyCk.js} +1 -1
- package/library/chunks/{relative-time.BSSaZxeD.js → relative-time.BcpFkSZT.js} +1 -1
- package/library/chunks/{select.BddyhkLW.js → select.DGL9C_32.js} +6 -6
- package/library/chunks/{shadow-input-group.k4MBg4Pf.js → shadow-input-group.CaCaO1C9.js} +2 -2
- package/library/chunks/{share-option-list.8OSETkgd.js → share-option-list.u2Q0zMae.js} +2 -2
- package/library/chunks/{sidebar.B1MjUxBY.js → sidebar.CwAW3KaC.js} +1 -1
- package/library/chunks/{size-input-group.CR0wHbEO.js → size-input-group.Ciupfrja.js} +5 -5
- package/library/chunks/{sortable.esm.W3y3EWKS.js → sortable.esm.BVU0_hc5.js} +339 -334
- package/library/chunks/{spinner.o3Rjsff7.js → spinner.DsWszid8.js} +1 -1
- package/library/chunks/{split-panel.CVyqM2Dr.js → split-panel.KzmC5IAW.js} +1 -1
- package/library/chunks/{src.BBVUYHbX.js → src.HY1opSC4.js} +47 -47
- package/library/chunks/{src.CDbx_BKW.js → src.QIRlv8bQ.js} +53 -53
- package/library/chunks/{step.7RkKgH1n.js → step.CpXaHTmn.js} +3 -3
- package/library/chunks/{stepper-wizard.D7XpenfO.js → stepper-wizard.DZ7up5KF.js} +2 -2
- package/library/chunks/{stepper.BhLxi6eC.js → stepper.BAqogLwg.js} +1 -1
- package/library/chunks/{endpoints.jOHOmF_t.js → string-array.Dstcqyjm.js} +5 -2
- package/library/chunks/{tab-group.DPhCgEOG.js → tab-group.Ib4bahXC.js} +7 -7
- package/library/chunks/{tab.Cv9UFQjo.js → tab.BOJ3V4IE.js} +3 -3
- package/library/chunks/{tag.V9YP_T0h.js → tag.BySfbRok.js} +3 -3
- package/library/chunks/{tooltip.GjnTzFeL.js → tooltip.DWx9VYtS.js} +2 -2
- package/library/chunks/{tree.Cvx7TQer.js → tree.B3qvSTCo.js} +4 -4
- package/library/chunks/{typeface.CHo-Lj6f.js → typeface.BcNOEnVy.js} +3 -3
- package/library/chunks/{video.DFfkHdKQ.js → video.DVuLcN2J.js} +3 -3
- package/library/components/alert.js +1 -1
- package/library/components/array-line-clamp.js +1 -1
- package/library/components/asset-link-format.js +1 -1
- package/library/components/atoms.js +48 -48
- package/library/components/audio.js +1 -1
- package/library/components/bicolor-picker.js +1 -1
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +1 -1
- package/library/components/color-picker.js +1 -1
- package/library/components/color-swatch-group.js +1 -1
- package/library/components/color-swatch.js +1 -1
- package/library/components/confirm-popover.js +1 -1
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +1 -1
- package/library/components/cropper.js +1 -1
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +1 -1
- package/library/components/document-viewer.js +1 -1
- package/library/components/dot-pagination.js +1 -1
- package/library/components/drawer.js +1 -1
- package/library/components/dropdown.js +1 -1
- package/library/components/dynamic-select.js +1 -1
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +1 -1
- package/library/components/file-on-demand.js +1 -1
- package/library/components/folder-select.js +1 -1
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +1 -1
- package/library/components/icon-button.js +1 -1
- package/library/components/iframe.js +1 -1
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +1 -1
- package/library/components/input.js +1 -1
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +1 -1
- package/library/components/masonry.js +1 -1
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +17 -17
- package/library/components/option.js +1 -1
- package/library/components/organisms.js +3 -3
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +1 -1
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +1 -1
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +1 -1
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/step.js +1 -1
- package/library/components/stepper-wizard.js +1 -1
- package/library/components/stepper.js +1 -1
- package/library/components/tab-group.js +1 -1
- package/library/components/tab.js +1 -1
- package/library/components/tag.js +1 -1
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +1 -1
- package/library/components/tree.js +1 -1
- package/library/components/typeface.js +1 -1
- package/library/components/types.js +98 -98
- package/library/components/video.js +1 -1
- package/library/package.json +1 -1
- package/library/packages/events/src/cx-asset-link-format-crop-toggle.d.ts +6 -0
- package/library/packages/events/src/cx-asset-link-format-reorder.d.ts +10 -0
- package/library/packages/events/src/events.d.ts +2 -0
- package/library/packages/hybrid/video-advanced/src/react/plugins/Timeline/Viewer.d.ts +1 -0
- package/library/packages/hybrid/video-advanced/src/react/utils/segmentTime.d.ts +2 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +176 -18
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +10 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-dimensions/asset-link-format-dimensions.d.ts +103 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-dimensions/asset-link-format-dimensions.styles.d.ts +2 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-quality/asset-link-format-quality.d.ts +30 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +6 -0
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +7 -7
- package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -3
- package/library/packages/types/src/asset-link-format.d.ts +63 -0
- package/library/packages/types/src/content-builder.d.ts +3 -3
- package/library/packages/utils/src/custom-element/i18n.d.ts +3 -0
- package/library/react-web-component.d.ts +18 -26
- package/library/utils.js +2 -2
- package/package.json +1 -1
- package/library/chunks/asset-link-format.DhdgEsA0.js +0 -12
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { default as CxButton } from '../../../atoms/src/components/button/button.ts';
|
|
2
|
+
import { default as CxIcon } from '../../../atoms/src/components/icon/icon.ts';
|
|
3
|
+
import { default as CxIconButton } from '../../../atoms/src/components/icon-button/icon-button.ts';
|
|
2
4
|
import { default as CxSpace } from '../../../atoms/src/components/space/space.ts';
|
|
5
|
+
import { default as CxSwitch } from '../../../atoms/src/components/switch/switch.ts';
|
|
3
6
|
import { default as CxTypography } from '../../../atoms/src/components/typography/typography.ts';
|
|
7
|
+
import { default as CxVisuallyHidden } from '../../../atoms/src/components/visually-hidden/visually-hidden.ts';
|
|
4
8
|
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
5
9
|
import { default as CxCropper } from '../../../molecules/src/cropper/cropper.ts';
|
|
6
|
-
import { Asset, CropMode, FocusMode, Parameter, Proxy, Transformation, Unit } from '../../../types/src/asset-link-format';
|
|
10
|
+
import { Asset, AssetLinkFormatLayout, AssetLinkFormatPart, CropMode, DimensionsItem, DimensionsValue, FocusMode, Parameter, Proxy, QualityItem, Transformation, Unit } from '../../../types/src/asset-link-format';
|
|
7
11
|
import { PositionPickerValue } from '../../../types/src/position-picker';
|
|
8
12
|
import { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
9
13
|
import { default as CxAssetLinkFormatCrop } from './components/asset-link-format-crop/asset-link-format-crop';
|
|
14
|
+
import { default as CxAssetLinkFormatDimensions } from './components/asset-link-format-dimensions/asset-link-format-dimensions';
|
|
10
15
|
import { default as CxAssetLinkFormatExtension } from './components/asset-link-format-extension/asset-link-format-extension';
|
|
11
16
|
import { default as CxAssetLinkFormatProxy } from './components/asset-link-format-proxy/asset-link-format-proxy';
|
|
12
17
|
import { default as CxAssetLinkFormatQuality } from './components/asset-link-format-quality/asset-link-format-quality';
|
|
@@ -14,16 +19,26 @@ import { default as CxAssetLinkFormatResize } from './components/asset-link-form
|
|
|
14
19
|
import { default as CxAssetLinkFormatRotation } from './components/asset-link-format-rotation/asset-link-format-rotation';
|
|
15
20
|
import { default as CxAssetLinkFormatMetadata } from './components/asset-link-metadata/asset-link-format-metadata';
|
|
16
21
|
export type CxAssetLinkFormatChangeEvent = CustomEvent<string>;
|
|
22
|
+
type ImageSizeBound = {
|
|
23
|
+
height: number;
|
|
24
|
+
width: number;
|
|
25
|
+
};
|
|
17
26
|
/**
|
|
18
27
|
* @summary The `cx-asset-link-format` component is used to format an asset link with various transformations such as cropping, resizing, rotating, and applying quality settings.
|
|
19
28
|
*
|
|
29
|
+
* Dimensions is a step like the others: its own segment
|
|
30
|
+
* (`re_w_<width>,re_h_<height>,re_rm_Fit,re_allowupscale_false`) at its place in the chain.
|
|
31
|
+
* A `Resize` entry stays a Resize.
|
|
32
|
+
*
|
|
33
|
+
* Without an asset, the crop's pixel size is capped by the steps above it.
|
|
34
|
+
*
|
|
20
35
|
* @event `cx-asset-link-format-change` - Emitted when the asset link format is changed.
|
|
36
|
+
* @event cx-asset-link-format-reorder - Emitted with parts and transformations after a user reorder, Undo or Reset of order.
|
|
37
|
+
* @event cx-asset-link-format-crop-toggle - Emitted with the enabled state of Crop in the Formats layout.
|
|
21
38
|
*
|
|
22
|
-
* @property {
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* @property {boolean} no-resize - When true, hides the resize panel.
|
|
26
|
-
* @property {boolean} no-rotate - When true, hides the rotation panel.
|
|
39
|
+
* @property {AssetLinkFormatPart[]} parts - Panels to show, in display order (attribute is a
|
|
40
|
+
* space-separated string, e.g. "proxy crop resize"). Valid tokens: proxy, crop, resize,
|
|
41
|
+
* rotate, quality, metadata, dimensions.
|
|
27
42
|
*
|
|
28
43
|
* @slot footer - Additional content rendered in normal flow after the transformation controls.
|
|
29
44
|
*/
|
|
@@ -31,6 +46,7 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
31
46
|
static readonly styles: CSSResultGroup;
|
|
32
47
|
static readonly dependencies: {
|
|
33
48
|
'cx-asset-link-format-crop': typeof CxAssetLinkFormatCrop;
|
|
49
|
+
'cx-asset-link-format-dimensions': typeof CxAssetLinkFormatDimensions;
|
|
34
50
|
'cx-asset-link-format-extension': typeof CxAssetLinkFormatExtension;
|
|
35
51
|
'cx-asset-link-format-metadata': typeof CxAssetLinkFormatMetadata;
|
|
36
52
|
'cx-asset-link-format-proxy': typeof CxAssetLinkFormatProxy;
|
|
@@ -38,8 +54,12 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
38
54
|
'cx-asset-link-format-resize': typeof CxAssetLinkFormatResize;
|
|
39
55
|
'cx-asset-link-format-rotation': typeof CxAssetLinkFormatRotation;
|
|
40
56
|
'cx-button': typeof CxButton;
|
|
57
|
+
'cx-icon': typeof CxIcon;
|
|
58
|
+
'cx-icon-button': typeof CxIconButton;
|
|
41
59
|
'cx-space': typeof CxSpace;
|
|
60
|
+
'cx-switch': typeof CxSwitch;
|
|
42
61
|
'cx-typography': typeof CxTypography;
|
|
62
|
+
'cx-visually-hidden': typeof CxVisuallyHidden;
|
|
43
63
|
};
|
|
44
64
|
/**
|
|
45
65
|
* Transform requests must resolve to a web-displayable image (the browser renders the
|
|
@@ -48,7 +68,38 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
48
68
|
* extension fallback in asset-transformation-dialog.
|
|
49
69
|
*/
|
|
50
70
|
private static getTransformExtension;
|
|
71
|
+
/**
|
|
72
|
+
* Keep the last value for each type, at that type's first position.
|
|
73
|
+
*/
|
|
74
|
+
static uniqueTransformations(transformations: Transformation[]): Transformation[];
|
|
75
|
+
/**
|
|
76
|
+
* Reorder visible operations only; hidden operations and fixed types keep their slots.
|
|
77
|
+
*/
|
|
78
|
+
static orderTransformations(transformations: Transformation[], parts: AssetLinkFormatPart[]): Transformation[];
|
|
79
|
+
/**
|
|
80
|
+
* The size of a `<width>_<height>` or `<width>x<height>` preset; undefined for others (`original`).
|
|
81
|
+
*/
|
|
82
|
+
static getDimensionsPresetSize(presetValue: string): {
|
|
83
|
+
height: number;
|
|
84
|
+
width: number;
|
|
85
|
+
} | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* The pixel size a Dimensions choice fits into; undefined for a sizeless preset or a percent size.
|
|
88
|
+
*/
|
|
89
|
+
static getDimensionsSize(dimensionsChoice?: DimensionsValue): {
|
|
90
|
+
height: number;
|
|
91
|
+
width: number;
|
|
92
|
+
} | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* The largest image size after `step` (undefined: unknown). A pixel Resize sets it, Dimensions caps
|
|
95
|
+
* it, Rotate turns it (bounding box), an aspect-ratio Resize makes it unknown.
|
|
96
|
+
*/
|
|
97
|
+
static getSizeBoundAfterStep(bound: ImageSizeBound | undefined, step: Transformation): ImageSizeBound | undefined;
|
|
51
98
|
private readonly localize;
|
|
99
|
+
private readonly initialParts;
|
|
100
|
+
private sortable?;
|
|
101
|
+
private sortableRevision;
|
|
102
|
+
private dragPreviousSibling;
|
|
52
103
|
/**
|
|
53
104
|
* The base URL for the asset service.
|
|
54
105
|
* This URL is used to fetch the asset link and apply transformations.
|
|
@@ -125,17 +176,47 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
125
176
|
*/
|
|
126
177
|
autoFormat: boolean;
|
|
127
178
|
useCustomExtension: boolean;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
179
|
+
/**
|
|
180
|
+
* Space-separated list of panels to show, in display order (e.g. "proxy crop resize").
|
|
181
|
+
* Valid tokens: proxy, dimensions, crop, resize, rotate, quality, metadata.
|
|
182
|
+
*/
|
|
183
|
+
parts: AssetLinkFormatPart[];
|
|
184
|
+
/**
|
|
185
|
+
* The accordion UI (default) or the always-visible Formats UI.
|
|
186
|
+
*/
|
|
187
|
+
layout: AssetLinkFormatLayout;
|
|
188
|
+
/**
|
|
189
|
+
* Whether the inline Crop controls are enabled in the Formats layout.
|
|
190
|
+
*/
|
|
191
|
+
cropEnabled: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Allow reordering Crop, Resize, Rotate and Quality. Only effective without an asset.
|
|
194
|
+
*/
|
|
195
|
+
reorderable: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* Dimensions presets in display order, with unique values; items of one group share a heading.
|
|
198
|
+
* A `<width>_<height>` or `<width>x<height>` value is a pixel size; others (`original`) set none.
|
|
199
|
+
*/
|
|
200
|
+
dimensionsItems: DimensionsItem[];
|
|
201
|
+
/**
|
|
202
|
+
* Optional Quality presets. An empty list preserves the numeric input UI.
|
|
203
|
+
* In the Formats layout, a preset applies on selection and Custom applies on the input's `cx-change`,
|
|
204
|
+
* with no Apply button; in the Accordion layout, both apply through the Apply button.
|
|
205
|
+
*/
|
|
206
|
+
qualityItems: QualityItem[];
|
|
207
|
+
/**
|
|
208
|
+
* Include Custom (a width and height in pixels or percent) in the Dimensions dropdown.
|
|
209
|
+
* A percent size writes no segment.
|
|
210
|
+
*/
|
|
211
|
+
canCustomDimensions: boolean;
|
|
133
212
|
lastImageSize: {
|
|
134
213
|
height: number;
|
|
135
214
|
width: number;
|
|
136
215
|
};
|
|
137
216
|
hideHeader: boolean;
|
|
138
|
-
/**
|
|
217
|
+
/**
|
|
218
|
+
* Show a Reset button in the header that clears all transformations. Supports one Undo step after reset.
|
|
219
|
+
*/
|
|
139
220
|
canReset: boolean;
|
|
140
221
|
queryElement: HTMLElement | null;
|
|
141
222
|
/**
|
|
@@ -204,13 +285,29 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
204
285
|
*/
|
|
205
286
|
private lastAction;
|
|
206
287
|
private frozenIndex;
|
|
207
|
-
/**
|
|
288
|
+
/**
|
|
289
|
+
* Snapshot saved on Reset to allow one Undo step back to the pre-reset state.
|
|
290
|
+
*/
|
|
208
291
|
private preResetTransformations;
|
|
209
|
-
/**
|
|
292
|
+
/**
|
|
293
|
+
* The `Auto` state saved alongside `preResetTransformations`, restored by the same Undo.
|
|
294
|
+
*/
|
|
210
295
|
private preResetAutoFormat;
|
|
211
|
-
/**
|
|
296
|
+
/**
|
|
297
|
+
* The proxy saved alongside `preResetAutoFormat`, so Undo restores the pair together.
|
|
298
|
+
*/
|
|
212
299
|
private preResetSelectedProxy;
|
|
213
|
-
|
|
300
|
+
private reorderAnnouncement;
|
|
301
|
+
/**
|
|
302
|
+
* The Dimensions dropdown's choice, kept in step with the Dimensions transformation.
|
|
303
|
+
*/
|
|
304
|
+
private selectedDimensions?;
|
|
305
|
+
private orderUndo;
|
|
306
|
+
private get canReorder();
|
|
307
|
+
private get isFormatsLayout();
|
|
308
|
+
/**
|
|
309
|
+
* True when there are transformations beyond the frozen index (i.e. user has added new ones).
|
|
310
|
+
*/
|
|
214
311
|
private get hasUnfrozenTransformations();
|
|
215
312
|
private apiGetTransformAssetLink;
|
|
216
313
|
private transformRequest?;
|
|
@@ -245,10 +342,23 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
245
342
|
* This is derived from the `proxies` property, filtering out any proxies that have a `cdnName`.
|
|
246
343
|
*/
|
|
247
344
|
get formats(): Proxy[];
|
|
345
|
+
/**
|
|
346
|
+
* Parses `parts` into the ordered, de-duplicated list of valid panel tokens to render.
|
|
347
|
+
* Unknown tokens are filtered out.
|
|
348
|
+
*/
|
|
349
|
+
private get activeParts();
|
|
248
350
|
get imageSize(): {
|
|
249
351
|
height: number;
|
|
250
352
|
width: number;
|
|
251
353
|
};
|
|
354
|
+
/**
|
|
355
|
+
* The steps before the crop, or before where a new crop would be inserted.
|
|
356
|
+
*/
|
|
357
|
+
private get stepsBeforeCrop();
|
|
358
|
+
/**
|
|
359
|
+
* Without an asset, the largest crop the image can take; Infinity when unknown.
|
|
360
|
+
*/
|
|
361
|
+
private get cropMaxSize();
|
|
252
362
|
/**
|
|
253
363
|
* Returns the last crop size based on the transformations applied to the asset link.
|
|
254
364
|
* This is calculated by iterating through the transformations and applying the last crop, resize, or rotate transformation to the default size of the asset.
|
|
@@ -291,6 +401,9 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
291
401
|
unit: Unit;
|
|
292
402
|
width: number;
|
|
293
403
|
};
|
|
404
|
+
/**
|
|
405
|
+
* See lastCropSize's equivalent branch for why this falls back to 1x1, not 0x0.
|
|
406
|
+
*/
|
|
294
407
|
px: {
|
|
295
408
|
height: number;
|
|
296
409
|
unit: Unit;
|
|
@@ -313,6 +426,7 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
313
426
|
constructor();
|
|
314
427
|
runConnectedCallback(): void;
|
|
315
428
|
disconnectedCallback(): void;
|
|
429
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
316
430
|
updated(changedProperties: PropertyValues): void;
|
|
317
431
|
getCropSize(): {
|
|
318
432
|
cropMode: string;
|
|
@@ -329,7 +443,9 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
329
443
|
x: number;
|
|
330
444
|
y: number;
|
|
331
445
|
};
|
|
332
|
-
/**
|
|
446
|
+
/**
|
|
447
|
+
* Captures the current request synchronously; later edits cannot change Save's ratio.
|
|
448
|
+
*/
|
|
333
449
|
getAppliedAspectRatio(): Promise<number | undefined>;
|
|
334
450
|
private get transformRequestOptions();
|
|
335
451
|
private getTransformRequest;
|
|
@@ -337,7 +453,18 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
337
453
|
setActiveSetting(activeSetting: string): void;
|
|
338
454
|
private freezeTransformations;
|
|
339
455
|
private upsertTransformation;
|
|
340
|
-
|
|
456
|
+
/**
|
|
457
|
+
* Whether `crop` holds the size the Crop panel shows: the panel's own Apply, not a crop from
|
|
458
|
+
* outside (restored transformations, Undo, Reset).
|
|
459
|
+
*/
|
|
460
|
+
private isCropPanelSize;
|
|
461
|
+
/**
|
|
462
|
+
* Caps the applied pixel crop at `cropMaxSize`, as the crop inputs do, after a step above it shrank
|
|
463
|
+
* that size. Otherwise the inputs show the capped size while the saved crop keeps the larger one.
|
|
464
|
+
* The Crop panel follows, keeping its ratio mode only when both sides shrink by the same factor.
|
|
465
|
+
*/
|
|
466
|
+
private capCropToMaxSize;
|
|
467
|
+
handleTransformationsChange(previous?: unknown): Promise<void>;
|
|
341
468
|
private handleCropperElementChange;
|
|
342
469
|
private handleCropperSelectorChange;
|
|
343
470
|
private handleAssetChange;
|
|
@@ -355,6 +482,13 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
355
482
|
private handleResizeSizeChange;
|
|
356
483
|
private handleCropSizeChange;
|
|
357
484
|
private handleRotationChange;
|
|
485
|
+
handlePartsChange(): void;
|
|
486
|
+
handleReorderableChange(): void;
|
|
487
|
+
private syncSortable;
|
|
488
|
+
private rememberOrder;
|
|
489
|
+
private emitReorder;
|
|
490
|
+
private movePart;
|
|
491
|
+
private handleReorderKeyDown;
|
|
358
492
|
private handleActiveSettingChange;
|
|
359
493
|
private handleRequestAutoCropSuggestion;
|
|
360
494
|
private onCropComplete;
|
|
@@ -376,14 +510,21 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
376
510
|
private onCropChange;
|
|
377
511
|
private onCropChanged;
|
|
378
512
|
private onCropApply;
|
|
513
|
+
private applyCropTransformation;
|
|
379
514
|
private onResizeChange;
|
|
380
515
|
private onResizeApply;
|
|
381
516
|
private onRotationChange;
|
|
382
517
|
private onRotationApply;
|
|
518
|
+
private applyRotationTransformation;
|
|
383
519
|
private onQualityChange;
|
|
384
520
|
private onMetadataChange;
|
|
385
521
|
private onExtensionChange;
|
|
386
522
|
private syncQuality;
|
|
523
|
+
/**
|
|
524
|
+
* Points the Dimensions dropdown at the Dimensions step: its preset, else Custom. A same-size
|
|
525
|
+
* choice is kept, except when the presets change: Cortex assigns them after the first render.
|
|
526
|
+
*/
|
|
527
|
+
private syncSelectedDimensions;
|
|
387
528
|
/**
|
|
388
529
|
* Whether there is anything for Reset to undo.
|
|
389
530
|
*
|
|
@@ -400,6 +541,22 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
400
541
|
private clearResetSnapshot;
|
|
401
542
|
private handleUndo;
|
|
402
543
|
private handleReset;
|
|
544
|
+
/**
|
|
545
|
+
* A sized choice writes the Dimensions step; a sizeless one (Original) removes it.
|
|
546
|
+
*/
|
|
547
|
+
private onDimensionsChange;
|
|
548
|
+
private onCropToggle;
|
|
549
|
+
private renderDimensionsPart;
|
|
550
|
+
private renderHeader;
|
|
551
|
+
private renderOrderHint;
|
|
552
|
+
private renderProxyPart;
|
|
553
|
+
private renderCropEditor;
|
|
554
|
+
private renderCropPart;
|
|
555
|
+
private renderResizePart;
|
|
556
|
+
private renderRotatePart;
|
|
557
|
+
private renderQualityPart;
|
|
558
|
+
private renderMetadataPart;
|
|
559
|
+
private renderPart;
|
|
403
560
|
render(): TemplateResult;
|
|
404
561
|
}
|
|
405
562
|
declare global {
|
|
@@ -410,3 +567,4 @@ declare global {
|
|
|
410
567
|
'cx-asset-link-format-change': CxAssetLinkFormatChangeEvent;
|
|
411
568
|
}
|
|
412
569
|
}
|
|
570
|
+
export {};
|
|
@@ -49,6 +49,7 @@ export type CxAssetLinkFormatCropPositionChangeEvent = CustomEvent<{
|
|
|
49
49
|
*
|
|
50
50
|
* @property {boolean} no-ratio-modes - When true, hides the ratio mode select (Free, Widescreen, Square, etc.) and the unit select (Pixels / Aspect Ratio).
|
|
51
51
|
* @property {boolean} show-position-picker - When true, shows the position picker grid right after the focus mode select, while `focusMode` is 'manual'.
|
|
52
|
+
* @property {boolean} inline - When true, keeps the controls visible without an accordion header or Apply button.
|
|
52
53
|
* @property {string} position - The selected anchor position from the position picker (e.g. top-left, center-center).
|
|
53
54
|
*/
|
|
54
55
|
export default class CxAssetLinkFormatCrop extends CortexElement {
|
|
@@ -82,6 +83,10 @@ export default class CxAssetLinkFormatCrop extends CortexElement {
|
|
|
82
83
|
* The open state of the details section.
|
|
83
84
|
*/
|
|
84
85
|
open: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Render the controls as always-visible content without an Apply button.
|
|
88
|
+
*/
|
|
89
|
+
inline: boolean;
|
|
85
90
|
/**
|
|
86
91
|
* The width of the asset to be cropped.
|
|
87
92
|
*/
|
|
@@ -226,6 +231,11 @@ export default class CxAssetLinkFormatCrop extends CortexElement {
|
|
|
226
231
|
*/
|
|
227
232
|
private onHideDetails;
|
|
228
233
|
private handleAspectRatioClick;
|
|
234
|
+
/**
|
|
235
|
+
* The mask of a size input: whole numbers from 1. In pixels it also stops at `max`, and `autofix`
|
|
236
|
+
* turns a larger number into `max` as it is typed. Ratio values and an unknown (0) max have no cap.
|
|
237
|
+
*/
|
|
238
|
+
private getSizeMaskBlocks;
|
|
229
239
|
render(): TemplateResult;
|
|
230
240
|
}
|
|
231
241
|
declare global {
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { default as CxButton } from '../../../../../atoms/src/components/button/button.ts';
|
|
2
|
+
import { default as CxDetails } from '../../../../../atoms/src/components/details/details.ts';
|
|
3
|
+
import { default as CxDivider } from '../../../../../atoms/src/components/divider/divider.ts';
|
|
4
|
+
import { default as CxIcon } from '../../../../../atoms/src/components/icon/icon.ts';
|
|
5
|
+
import { default as CxInput } from '../../../../../atoms/src/components/input/input.ts';
|
|
6
|
+
import { default as CxMenuLabel } from '../../../../../atoms/src/components/menu-label/menu-label.ts';
|
|
7
|
+
import { default as CxOption } from '../../../../../atoms/src/components/option/option.ts';
|
|
8
|
+
import { default as CxSelect } from '../../../../../atoms/src/components/select/select.ts';
|
|
9
|
+
import { default as CxSpace } from '../../../../../atoms/src/components/space/space.ts';
|
|
10
|
+
import { default as CxTypography } from '../../../../../atoms/src/components/typography/typography.ts';
|
|
11
|
+
import { default as CortexElement } from '../../../../../base/src/cortex-element.ts';
|
|
12
|
+
import { AssetLinkFormatApplyBehavior, DimensionsItem, DimensionsValue } from '../../../../../types/src/asset-link-format';
|
|
13
|
+
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
14
|
+
export type CxAssetLinkFormatDimensionsChangeEvent = CustomEvent<DimensionsValue>;
|
|
15
|
+
/**
|
|
16
|
+
* @summary Select a dimensions preset or a custom maximum width and height, in pixels or percent.
|
|
17
|
+
* @event cx-asset-link-format-dimensions-change - Emitted with the selected dimensions value.
|
|
18
|
+
* `cx-asset-link-format` turns it into its Dimensions transformation.
|
|
19
|
+
* @csspart icon - The summary icon.
|
|
20
|
+
* @csspart input-label - The width and height prefixes.
|
|
21
|
+
*/
|
|
22
|
+
export default class CxAssetLinkFormatDimensions extends CortexElement {
|
|
23
|
+
static readonly styles: CSSResultGroup;
|
|
24
|
+
static readonly dependencies: {
|
|
25
|
+
'cx-button': typeof CxButton;
|
|
26
|
+
'cx-details': typeof CxDetails;
|
|
27
|
+
'cx-divider': typeof CxDivider;
|
|
28
|
+
'cx-icon': typeof CxIcon;
|
|
29
|
+
'cx-input': typeof CxInput;
|
|
30
|
+
'cx-menu-label': typeof CxMenuLabel;
|
|
31
|
+
'cx-option': typeof CxOption;
|
|
32
|
+
'cx-select': typeof CxSelect;
|
|
33
|
+
'cx-space': typeof CxSpace;
|
|
34
|
+
'cx-typography': typeof CxTypography;
|
|
35
|
+
};
|
|
36
|
+
private readonly localize;
|
|
37
|
+
/**
|
|
38
|
+
* Expand the settings panel.
|
|
39
|
+
*/
|
|
40
|
+
open: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Render the section as always-visible content instead of an accordion.
|
|
43
|
+
*/
|
|
44
|
+
inline: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Controls whether edits emit immediately or wait for an explicit Apply action.
|
|
47
|
+
* Legacy preserves the original immediate Dimensions behavior.
|
|
48
|
+
*/
|
|
49
|
+
applyBehavior: AssetLinkFormatApplyBehavior;
|
|
50
|
+
/**
|
|
51
|
+
* Disable editing while processing.
|
|
52
|
+
*/
|
|
53
|
+
loading: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Presets in display order, with unique values and optional groups.
|
|
56
|
+
*/
|
|
57
|
+
items: DimensionsItem[];
|
|
58
|
+
/**
|
|
59
|
+
* Offer custom width and height controls.
|
|
60
|
+
*/
|
|
61
|
+
canCustom: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Selected preset or custom size. Undefined means no selection.
|
|
64
|
+
*/
|
|
65
|
+
value?: DimensionsValue;
|
|
66
|
+
/**
|
|
67
|
+
* The custom unit the user picked.
|
|
68
|
+
*/
|
|
69
|
+
private customDimensionsUnit;
|
|
70
|
+
/**
|
|
71
|
+
* The dropdown's selection: `preset:<value>`, `custom`, or empty.
|
|
72
|
+
*/
|
|
73
|
+
private dimensionsSelection;
|
|
74
|
+
/**
|
|
75
|
+
* The custom width and height as typed, per unit, kept while another option is selected.
|
|
76
|
+
*/
|
|
77
|
+
private customDimensionsDrafts;
|
|
78
|
+
handleDimensionsValueChange(): void;
|
|
79
|
+
private emitDimensionsValue;
|
|
80
|
+
private getCustomDimensionsValue;
|
|
81
|
+
private get pendingValue();
|
|
82
|
+
private get applyDisabled();
|
|
83
|
+
private applyPendingValue;
|
|
84
|
+
private onDimensionsSelectChange;
|
|
85
|
+
private onDimensionsInput;
|
|
86
|
+
private onDimensionsCustomChange;
|
|
87
|
+
private onDimensionsUnitChange;
|
|
88
|
+
private onApply;
|
|
89
|
+
private onDimensionsShow;
|
|
90
|
+
private onDimensionsHide;
|
|
91
|
+
private renderCustomDimensions;
|
|
92
|
+
private renderSummary;
|
|
93
|
+
private renderContent;
|
|
94
|
+
render(): TemplateResult;
|
|
95
|
+
}
|
|
96
|
+
declare global {
|
|
97
|
+
interface HTMLElementTagNameMap {
|
|
98
|
+
'cx-asset-link-format-dimensions': CxAssetLinkFormatDimensions;
|
|
99
|
+
}
|
|
100
|
+
interface GlobalEventHandlersEventMap {
|
|
101
|
+
'cx-asset-link-format-dimensions-change': CxAssetLinkFormatDimensionsChangeEvent;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { default as CxButton } from '../../../../../atoms/src/components/button/button.ts';
|
|
2
2
|
import { default as CxDetails } from '../../../../../atoms/src/components/details/details.ts';
|
|
3
|
+
import { default as CxDivider } from '../../../../../atoms/src/components/divider/divider.ts';
|
|
3
4
|
import { default as CxIcon } from '../../../../../atoms/src/components/icon/icon.ts';
|
|
4
5
|
import { default as CxInput } from '../../../../../atoms/src/components/input/input.ts';
|
|
6
|
+
import { default as CxOption } from '../../../../../atoms/src/components/option/option.ts';
|
|
7
|
+
import { default as CxSelect } from '../../../../../atoms/src/components/select/select.ts';
|
|
5
8
|
import { default as CxSpace } from '../../../../../atoms/src/components/space/space.ts';
|
|
6
9
|
import { default as CxTooltip } from '../../../../../atoms/src/components/tooltip/tooltip.ts';
|
|
7
10
|
import { default as CxTypography } from '../../../../../atoms/src/components/typography/typography.ts';
|
|
8
11
|
import { default as CortexElement } from '../../../../../base/src/cortex-element.ts';
|
|
12
|
+
import { AssetLinkFormatApplyBehavior, QualityItem } from '../../../../../types/src/asset-link-format';
|
|
9
13
|
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
10
14
|
export type CxAssetLinkFormatQualityChangeEvent = CustomEvent<number>;
|
|
11
15
|
/**
|
|
@@ -18,8 +22,11 @@ export default class CxAssetLinkFormatQuality extends CortexElement {
|
|
|
18
22
|
static readonly dependencies: {
|
|
19
23
|
'cx-button': typeof CxButton;
|
|
20
24
|
'cx-details': typeof CxDetails;
|
|
25
|
+
'cx-divider': typeof CxDivider;
|
|
21
26
|
'cx-icon': typeof CxIcon;
|
|
22
27
|
'cx-input': typeof CxInput;
|
|
28
|
+
'cx-option': typeof CxOption;
|
|
29
|
+
'cx-select': typeof CxSelect;
|
|
23
30
|
'cx-space': typeof CxSpace;
|
|
24
31
|
'cx-tooltip': typeof CxTooltip;
|
|
25
32
|
'cx-typography': typeof CxTypography;
|
|
@@ -35,12 +42,29 @@ export default class CxAssetLinkFormatQuality extends CortexElement {
|
|
|
35
42
|
* @default false
|
|
36
43
|
*/
|
|
37
44
|
open: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Render the section as always-visible content instead of an accordion.
|
|
47
|
+
*/
|
|
48
|
+
inline: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Controls whether edits emit immediately or wait for an explicit Apply action.
|
|
51
|
+
* Automatic: a preset emits on selection; Custom has no Apply button and emits on the input's `cx-change`.
|
|
52
|
+
* Manual: nothing emits until the Apply button below the controls.
|
|
53
|
+
* Legacy: a preset emits on selection; Custom keeps the Apply button beside the input.
|
|
54
|
+
*/
|
|
55
|
+
applyBehavior: AssetLinkFormatApplyBehavior;
|
|
38
56
|
/**
|
|
39
57
|
* The value of the input quality.
|
|
40
58
|
* This value represents the quality of the asset link format, ranging from 1 to 100.
|
|
41
59
|
* @default 100
|
|
42
60
|
*/
|
|
43
61
|
value: number;
|
|
62
|
+
/**
|
|
63
|
+
* Optional presets with unique values. Custom always offers the existing input.
|
|
64
|
+
* An empty list preserves the input-only UI.
|
|
65
|
+
*/
|
|
66
|
+
items: QualityItem[];
|
|
67
|
+
private customSelected;
|
|
44
68
|
/**
|
|
45
69
|
* The loading state of the component.
|
|
46
70
|
* This is used to indicate that an operation is in progress, such as applying a new quality value.
|
|
@@ -55,7 +79,9 @@ export default class CxAssetLinkFormatQuality extends CortexElement {
|
|
|
55
79
|
*/
|
|
56
80
|
get invalidValue(): boolean;
|
|
57
81
|
handleValueChange(): void;
|
|
82
|
+
private handlePresetChange;
|
|
58
83
|
private handleQualityChange;
|
|
84
|
+
private handleQualityCommit;
|
|
59
85
|
/**
|
|
60
86
|
* Handles the application of the input quality.
|
|
61
87
|
* This method emits a custom event with the input quality when the "Apply" button is clicked.
|
|
@@ -74,6 +100,10 @@ export default class CxAssetLinkFormatQuality extends CortexElement {
|
|
|
74
100
|
* This ensures that the details section is only hidden when the user interacts with the base element.
|
|
75
101
|
*/
|
|
76
102
|
private onHideDetails;
|
|
103
|
+
private renderPresets;
|
|
104
|
+
private renderSummary;
|
|
105
|
+
private renderApplyButton;
|
|
106
|
+
private renderContent;
|
|
77
107
|
render(): TemplateResult;
|
|
78
108
|
}
|
|
79
109
|
declare global {
|
|
@@ -37,6 +37,10 @@ export default class CxAssetLinkFormatRotation extends CortexElement {
|
|
|
37
37
|
* @default false
|
|
38
38
|
*/
|
|
39
39
|
open: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Render the section as always-visible content without an Apply button.
|
|
42
|
+
*/
|
|
43
|
+
inline: boolean;
|
|
40
44
|
/**
|
|
41
45
|
* The value of the defined quality.
|
|
42
46
|
* This value represents the quality of the asset link format, ranging from 1 to 100.
|
|
@@ -73,6 +77,8 @@ export default class CxAssetLinkFormatRotation extends CortexElement {
|
|
|
73
77
|
* It prevents further actions if the component is currently loading.
|
|
74
78
|
*/
|
|
75
79
|
private handleApply;
|
|
80
|
+
private renderSummary;
|
|
81
|
+
private renderControls;
|
|
76
82
|
render(): TemplateResult;
|
|
77
83
|
}
|
|
78
84
|
declare global {
|
package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { default as CxTooltip } from '../../../atoms/src/components/tooltip/tool
|
|
|
9
9
|
import { default as CxTypography } from '../../../atoms/src/components/typography/typography.ts';
|
|
10
10
|
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
11
11
|
import { default as CxCropper } from '../../../molecules/src/cropper/cropper.ts';
|
|
12
|
-
import { Transformation } from '../../../types/src/asset-link-format';
|
|
12
|
+
import { AssetLinkFormatPart, Transformation } from '../../../types/src/asset-link-format';
|
|
13
13
|
import { default as CxAssetLinkFormat } from '../asset-link-format/asset-link-format';
|
|
14
14
|
/**
|
|
15
15
|
* @summary Dialog that wraps `cx-cropper` and `cx-asset-link-format` side by side,
|
|
@@ -74,12 +74,12 @@ export default class CxAssetTransformationDialog extends CortexElement {
|
|
|
74
74
|
transformations: Transformation[];
|
|
75
75
|
/** Show stack of layers indicating the transformations will be applied to multiple assets. */
|
|
76
76
|
multiple: boolean;
|
|
77
|
-
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Panels to show inside cx-asset-link-format, in display order. Forwarded directly to its
|
|
79
|
+
* `parts` property. The metadata panel is omitted from the default, matching this dialog's
|
|
80
|
+
* previous hardcoded `no-metadata` behavior.
|
|
81
|
+
*/
|
|
82
|
+
parts: AssetLinkFormatPart[];
|
|
83
83
|
/** Show a Reset button inside cx-asset-link-format that clears all transformations. */
|
|
84
84
|
canReset: boolean;
|
|
85
85
|
/** When true, uses the Site Builder search endpoint for asset fetching. */
|
|
@@ -61,9 +61,7 @@ export default class StyleController {
|
|
|
61
61
|
formatKey?: string;
|
|
62
62
|
manualFormatKey?: string;
|
|
63
63
|
multiple?: boolean;
|
|
64
|
-
|
|
65
|
-
noResize?: boolean;
|
|
66
|
-
noRotate?: boolean;
|
|
64
|
+
parts?: import('../../../types/src/asset-link-format').AssetLinkFormatPart[];
|
|
67
65
|
recordsKey?: string;
|
|
68
66
|
srcKey?: string;
|
|
69
67
|
};
|