@internetarchive/collection-browser 0.1.8 → 0.1.9

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.
@@ -1,68 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { html, LitElement } from 'lit';
3
- import { customElement, property } from 'lit/decorators.js';
4
- import './image/item-image';
5
- import './image/waveform-image';
6
- let ItemTileImage = class ItemTileImage extends LitElement {
7
- constructor() {
8
- super(...arguments);
9
- this.isListTile = false;
10
- this.isCompactTile = false;
11
- }
12
- render() {
13
- return html `
14
- ${this.isWithWaveformMediatype
15
- ? this.waveformImageTemplate
16
- : this.itemImageTemplate}
17
- `;
18
- }
19
- get imageSrc() {
20
- var _a;
21
- return `${this.baseImageUrl}/services/img/${(_a = this.model) === null || _a === void 0 ? void 0 : _a.identifier}`;
22
- }
23
- get isWithWaveformMediatype() {
24
- var _a, _b;
25
- return (((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype) === 'audio' || ((_b = this.model) === null || _b === void 0 ? void 0 : _b.mediatype) === 'etree');
26
- }
27
- // Templates
28
- get itemImageTemplate() {
29
- return html `
30
- <item-image
31
- .model=${this.model}
32
- .imageSrc=${this.imageSrc}
33
- .isCompactTile=${this.isCompactTile}
34
- .isListTile=${this.isListTile}
35
- >
36
- </item-image>
37
- `;
38
- }
39
- get waveformImageTemplate() {
40
- var _a;
41
- return html `
42
- <waveform-image
43
- .imageSrc=${this.imageSrc}
44
- .identifier=${(_a = this.model) === null || _a === void 0 ? void 0 : _a.identifier}
45
- .isCompactTile=${this.isCompactTile}
46
- .isListTile=${this.isListTile}
47
- >
48
- </waveform-image>
49
- `;
50
- }
51
- };
52
- __decorate([
53
- property({ type: Object })
54
- ], ItemTileImage.prototype, "model", void 0);
55
- __decorate([
56
- property({ type: String })
57
- ], ItemTileImage.prototype, "baseImageUrl", void 0);
58
- __decorate([
59
- property({ type: Boolean })
60
- ], ItemTileImage.prototype, "isListTile", void 0);
61
- __decorate([
62
- property({ type: Boolean })
63
- ], ItemTileImage.prototype, "isCompactTile", void 0);
64
- ItemTileImage = __decorate([
65
- customElement('item-tile-image')
66
- ], ItemTileImage);
67
- export { ItemTileImage };
68
- //# sourceMappingURL=item-tile-image.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"item-tile-image.js","sourceRoot":"","sources":["../../../src/tiles/item-tile-image.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI5D,OAAO,oBAAoB,CAAC;AAC5B,OAAO,wBAAwB,CAAC;AAGhC,IAAa,aAAa,GAA1B,MAAa,aAAc,SAAQ,UAAU;IAA7C;;QAK+B,eAAU,GAAG,KAAK,CAAC;QAEnB,kBAAa,GAAG,KAAK,CAAC;IA4CrD,CAAC;IA1CC,MAAM;QACJ,OAAO,IAAI,CAAA;QACP,IAAI,CAAC,uBAAuB;YAC5B,CAAC,CAAC,IAAI,CAAC,qBAAqB;YAC5B,CAAC,CAAC,IAAI,CAAC,iBAAiB;KAC3B,CAAC;IACJ,CAAC;IAED,IAAY,QAAQ;;QAClB,OAAO,GAAG,IAAI,CAAC,YAAY,iBAAiB,MAAA,IAAI,CAAC,KAAK,0CAAE,UAAU,EAAE,CAAC;IACvE,CAAC;IAED,IAAY,uBAAuB;;QACjC,OAAO,CACL,CAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,SAAS,MAAK,OAAO,IAAI,CAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,SAAS,MAAK,OAAO,CACvE,CAAC;IACJ,CAAC;IAED,YAAY;IACZ,IAAY,iBAAiB;QAC3B,OAAO,IAAI,CAAA;;iBAEE,IAAI,CAAC,KAAK;oBACP,IAAI,CAAC,QAAQ;yBACR,IAAI,CAAC,aAAa;sBACrB,IAAI,CAAC,UAAU;;;KAGhC,CAAC;IACJ,CAAC;IAED,IAAY,qBAAqB;;QAC/B,OAAO,IAAI,CAAA;;oBAEK,IAAI,CAAC,QAAQ;sBACX,MAAA,IAAI,CAAC,KAAK,0CAAE,UAAU;yBACnB,IAAI,CAAC,aAAa;sBACrB,IAAI,CAAC,UAAU;;;KAGhC,CAAC;IACJ,CAAC;CACF,CAAA;AAlD6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAmB;AAElB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAuB;AAErB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDAAoB;AAEnB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDAAuB;AAPxC,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CAmDzB;SAnDY,aAAa","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { TileModel } from '../models';\n\nimport './image/item-image';\nimport './image/waveform-image';\n\n@customElement('item-tile-image')\nexport class ItemTileImage extends LitElement {\n @property({ type: Object }) model?: TileModel;\n\n @property({ type: String }) baseImageUrl?: string;\n\n @property({ type: Boolean }) isListTile = false;\n\n @property({ type: Boolean }) isCompactTile = false;\n\n render() {\n return html`\n ${this.isWithWaveformMediatype\n ? this.waveformImageTemplate\n : this.itemImageTemplate}\n `;\n }\n\n private get imageSrc() {\n return `${this.baseImageUrl}/services/img/${this.model?.identifier}`;\n }\n\n private get isWithWaveformMediatype() {\n return (\n this.model?.mediatype === 'audio' || this.model?.mediatype === 'etree'\n );\n }\n\n // Templates\n private get itemImageTemplate() {\n return html`\n <item-image\n .model=${this.model}\n .imageSrc=${this.imageSrc}\n .isCompactTile=${this.isCompactTile}\n .isListTile=${this.isListTile}\n >\n </item-image>\n `;\n }\n\n private get waveformImageTemplate() {\n return html`\n <waveform-image\n .imageSrc=${this.imageSrc}\n .identifier=${this.model?.identifier}\n .isCompactTile=${this.isCompactTile}\n .isListTile=${this.isListTile}\n >\n </waveform-image>\n `;\n }\n}\n"]}