@orangelogic/design-system 3.2.0 → 3.4.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/{asset-link-format.BnIUG_vO.js → asset-link-format.O2It93rl.js} +191 -192
- package/library/components/asset-link-format.js +1 -1
- package/library/components/organisms.js +1 -1
- package/library/components/types.js +14892 -14886
- package/library/package.json +1 -1
- package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +20 -1
- package/library/packages/organisms/src/carousel/carousel.d.ts +13 -0
- package/library/react-web-component.d.ts +4 -0
- package/package.json +1 -1
- package/library/packages/types/src/download-format-picker.d.ts +0 -7
package/library/package.json
CHANGED
|
@@ -57,6 +57,13 @@ export default class CxAssetPicker extends CortexElement {
|
|
|
57
57
|
* other type are rejected on confirmation. When false, `type` only pre-fills the filter.
|
|
58
58
|
*/
|
|
59
59
|
restrict: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Asset types whose original `src` is used as-is, bypassing the API's
|
|
62
|
+
* representative (thumbnail/preview) URL. Only images are renderable
|
|
63
|
+
* directly, so every other type — video, audio, documents — falls back to its
|
|
64
|
+
* representative when the API returns one.
|
|
65
|
+
*/
|
|
66
|
+
noRepresentativeFor: AssetType[];
|
|
60
67
|
/**
|
|
61
68
|
* A callback function that is called when the user requests to select an asset.
|
|
62
69
|
* It should return a promise that resolves to an Asset object.
|
|
@@ -78,8 +85,20 @@ export default class CxAssetPicker extends CortexElement {
|
|
|
78
85
|
handleValueChange(): Promise<void>;
|
|
79
86
|
handleRecordIdChange(): Promise<void>;
|
|
80
87
|
private handleDeleteClick;
|
|
81
|
-
/** True when the picker accepts this asset type. */
|
|
88
|
+
/** True when the picker accepts this asset type. `all` accepts every type. */
|
|
82
89
|
private acceptsType;
|
|
90
|
+
/**
|
|
91
|
+
* Resolves the URL a consumer should render as the selected asset's preview.
|
|
92
|
+
* Types listed in `noRepresentativeFor` keep their original `src`; all other
|
|
93
|
+
* types prefer the representative and fall back to `src` when the API did not
|
|
94
|
+
* return one. `src` itself is always emitted unchanged so consumers that need
|
|
95
|
+
* the original file keep access to it.
|
|
96
|
+
*
|
|
97
|
+
* `type` is optional because it originates from the host app's
|
|
98
|
+
* `onRequestAsset` callback and can be absent at runtime; an asset with no
|
|
99
|
+
* type prefers its representative.
|
|
100
|
+
*/
|
|
101
|
+
resolvePreviewSrc(asset: Pick<Asset, 'representative' | 'src'> & Partial<Pick<Asset, 'type'>>): string;
|
|
83
102
|
private renderAssetPreview;
|
|
84
103
|
render(): import('lit').TemplateResult<1>;
|
|
85
104
|
}
|
|
@@ -257,6 +257,19 @@ export default class CxCarousel extends CortexElement {
|
|
|
257
257
|
get selectedCarouselItem(): string;
|
|
258
258
|
get canMoveCarouselItem(): boolean;
|
|
259
259
|
get canDeleteCarouselItem(): boolean;
|
|
260
|
+
/**
|
|
261
|
+
* The `sizes` hint for slide images, derived from the slide layout rather than a
|
|
262
|
+
* measured width: the carousel sizes slides purely in CSS, so no pixel width is
|
|
263
|
+
* available at render time.
|
|
264
|
+
*
|
|
265
|
+
* Vertical carousels stack slides, so each one spans the full width regardless of
|
|
266
|
+
* `slidesPerPage` — only the horizontal layout divides the row.
|
|
267
|
+
*
|
|
268
|
+
* This uses the viewport rather than the carousel's own box, so a carousel rendered
|
|
269
|
+
* in a narrow column over-estimates and requests one ladder rung too large. That is
|
|
270
|
+
* still far better than the full-resolution original served without `sizes`.
|
|
271
|
+
*/
|
|
272
|
+
private get slideSizes();
|
|
260
273
|
constructor();
|
|
261
274
|
connectedUpdatedCallback(): void;
|
|
262
275
|
runFirstUpdated(): void;
|
|
@@ -5397,6 +5397,10 @@
|
|
|
5397
5397
|
* When true, restricts selection to the picker's declared `type`(s): assets of any other type are rejected on confirmation. When false, `type` only pre-fills the filter.
|
|
5398
5398
|
*/
|
|
5399
5399
|
restrict?: boolean;
|
|
5400
|
+
/**
|
|
5401
|
+
* Asset types whose original `src` is used as-is, bypassing the API's representative (thumbnail/preview) URL. Only images are renderable directly, so every other type — video, audio, documents — falls back to its representative when the API returns one.
|
|
5402
|
+
*/
|
|
5403
|
+
noRepresentativeFor?: 'all' | 'audio' | 'image' | 'other' | 'video'[];
|
|
5400
5404
|
/**
|
|
5401
5405
|
* An optional record ID (or space-separated list of record IDs, for `multiple` pickers) used to fetch a clean preview image and title, bypassing any stored URL/name that may be stale or have transformations applied.
|
|
5402
5406
|
*/
|
package/package.json
CHANGED