@contrail/documents 1.16.0-alpha.fd404ec → 2.0.1-alpha.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/CHANGELOG.md +1 -1
- package/lib/components/components.d.ts +50 -4
- package/lib/components/components.js +11 -0
- package/package.json +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -9,7 +9,7 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
11
|
|
|
12
|
-
- `ASSET_VIEW_TEMPLATE` and its `asset-view` entry in `ComponentRegistry` — the component definition for an asset card. Image-
|
|
12
|
+
- `ASSET_VIEW_TEMPLATE` and its `asset-view` entry in `ComponentRegistry` — the component definition for an asset card. Image-forward: one image bound to the asset's viewable, one text row bound to `asset.fileName` — the asset's seeded property, present in both client- and server-side hydration (a bare `asset.name` is frequently unset and the API's document rebind would blank the label). Consumers resolve it by slug through `DocumentElementFactory.createComponent('asset-view', …)`.
|
|
13
13
|
|
|
14
14
|
### Fixed
|
|
15
15
|
|
|
@@ -354,7 +354,7 @@ export declare const PATTERN_VIEW_TEMPLATE: {
|
|
|
354
354
|
})[];
|
|
355
355
|
};
|
|
356
356
|
export declare const ASSET_VIEW_TEMPLATE: {
|
|
357
|
-
elements: {
|
|
357
|
+
elements: ({
|
|
358
358
|
type: string;
|
|
359
359
|
size: {
|
|
360
360
|
width: number;
|
|
@@ -364,11 +364,34 @@ export declare const ASSET_VIEW_TEMPLATE: {
|
|
|
364
364
|
background: {
|
|
365
365
|
size: BackgroundSizeType;
|
|
366
366
|
};
|
|
367
|
+
font?: undefined;
|
|
367
368
|
};
|
|
368
369
|
propertyBindings: {
|
|
369
370
|
url: string;
|
|
371
|
+
text?: undefined;
|
|
370
372
|
};
|
|
371
|
-
|
|
373
|
+
position?: undefined;
|
|
374
|
+
} | {
|
|
375
|
+
type: string;
|
|
376
|
+
position: {
|
|
377
|
+
x: number;
|
|
378
|
+
y: number;
|
|
379
|
+
};
|
|
380
|
+
size: {
|
|
381
|
+
height: number;
|
|
382
|
+
width: number;
|
|
383
|
+
};
|
|
384
|
+
style: {
|
|
385
|
+
font: {
|
|
386
|
+
size: number;
|
|
387
|
+
};
|
|
388
|
+
background?: undefined;
|
|
389
|
+
};
|
|
390
|
+
propertyBindings: {
|
|
391
|
+
text: string;
|
|
392
|
+
url?: undefined;
|
|
393
|
+
};
|
|
394
|
+
})[];
|
|
372
395
|
};
|
|
373
396
|
export declare const ITEM_VIEW: {
|
|
374
397
|
slug: string;
|
|
@@ -737,7 +760,7 @@ export declare const PATTERN_VIEW: {
|
|
|
737
760
|
export declare const ASSET_VIEW: {
|
|
738
761
|
slug: string;
|
|
739
762
|
defaultTemplate: {
|
|
740
|
-
elements: {
|
|
763
|
+
elements: ({
|
|
741
764
|
type: string;
|
|
742
765
|
size: {
|
|
743
766
|
width: number;
|
|
@@ -747,11 +770,34 @@ export declare const ASSET_VIEW: {
|
|
|
747
770
|
background: {
|
|
748
771
|
size: BackgroundSizeType;
|
|
749
772
|
};
|
|
773
|
+
font?: undefined;
|
|
750
774
|
};
|
|
751
775
|
propertyBindings: {
|
|
752
776
|
url: string;
|
|
777
|
+
text?: undefined;
|
|
753
778
|
};
|
|
754
|
-
|
|
779
|
+
position?: undefined;
|
|
780
|
+
} | {
|
|
781
|
+
type: string;
|
|
782
|
+
position: {
|
|
783
|
+
x: number;
|
|
784
|
+
y: number;
|
|
785
|
+
};
|
|
786
|
+
size: {
|
|
787
|
+
height: number;
|
|
788
|
+
width: number;
|
|
789
|
+
};
|
|
790
|
+
style: {
|
|
791
|
+
font: {
|
|
792
|
+
size: number;
|
|
793
|
+
};
|
|
794
|
+
background?: undefined;
|
|
795
|
+
};
|
|
796
|
+
propertyBindings: {
|
|
797
|
+
text: string;
|
|
798
|
+
url?: undefined;
|
|
799
|
+
};
|
|
800
|
+
})[];
|
|
755
801
|
};
|
|
756
802
|
};
|
|
757
803
|
export declare class ComponentRegistry {
|
|
@@ -210,6 +210,17 @@ exports.ASSET_VIEW_TEMPLATE = {
|
|
|
210
210
|
style: { background: { size: types_1.BackgroundSizeType.CONTAIN } },
|
|
211
211
|
propertyBindings: { url: 'viewable.mediumViewableDownloadUrl' },
|
|
212
212
|
},
|
|
213
|
+
{
|
|
214
|
+
type: 'text',
|
|
215
|
+
position: { x: 0, y: 126 },
|
|
216
|
+
size: { height: 25, width: 125 },
|
|
217
|
+
style: {
|
|
218
|
+
font: {
|
|
219
|
+
size: 8,
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
propertyBindings: { text: 'asset.fileName' },
|
|
223
|
+
},
|
|
213
224
|
],
|
|
214
225
|
};
|
|
215
226
|
exports.ITEM_VIEW = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/documents",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1-alpha.0",
|
|
4
4
|
"description": "Documents library for contrail platform",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"tslint": "^5.11.0",
|
|
23
23
|
"tslint-config-prettier": "^1.18.0",
|
|
24
24
|
"typescript": "^5.8.3",
|
|
25
|
-
"@contrail/telemetry": "^
|
|
25
|
+
"@contrail/telemetry": "^3.0.1-alpha.1"
|
|
26
26
|
},
|
|
27
27
|
"jest": {
|
|
28
28
|
"moduleFileExtensions": [
|
|
@@ -39,14 +39,17 @@
|
|
|
39
39
|
"testEnvironment": "node"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@contrail/actions": "^1.0
|
|
43
|
-
"@contrail/document-table": "^1.
|
|
44
|
-
"@contrail/document-util": "^
|
|
45
|
-
"@contrail/types": "^
|
|
42
|
+
"@contrail/actions": "^2.0.1-alpha.0",
|
|
43
|
+
"@contrail/document-table": "^2.0.1-alpha.0",
|
|
44
|
+
"@contrail/document-util": "^2.0.1-alpha.1",
|
|
45
|
+
"@contrail/types": "^4.0.1-alpha.1",
|
|
46
46
|
"fractional-indexing": "^2.1.0",
|
|
47
47
|
"reflect-metadata": "^0.1.13"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@contrail/telemetry": "^
|
|
50
|
+
"@contrail/telemetry": "^3.0.1-alpha.1"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=24"
|
|
51
54
|
}
|
|
52
55
|
}
|