@internetarchive/collection-browser 0.1.7 → 0.1.8
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/demo/app-root.ts +20 -0
- package/dist/{src/waveform-view.d.ts → .nojekyll} +0 -0
- package/dist/app-root.js +816 -0
- package/dist/demo/app-root.d.ts +2 -0
- package/dist/demo/app-root.js +22 -0
- package/dist/demo/app-root.js.map +1 -1
- package/dist/index.html +23 -0
- package/dist/src/assets/img/icons/restricted.d.ts +1 -0
- package/dist/src/assets/img/icons/restricted.js +29 -0
- package/dist/src/assets/img/icons/restricted.js.map +1 -0
- package/dist/src/collection-browser.d.ts +5 -0
- package/dist/src/collection-browser.js +51 -20
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/models.d.ts +2 -0
- package/dist/src/models.js.map +1 -1
- package/dist/src/styles/index.d.ts +8 -0
- package/dist/src/styles/index.js +101 -0
- package/dist/src/styles/index.js.map +1 -0
- package/dist/src/tiles/grid/account-tile.js +14 -1
- package/dist/src/tiles/grid/account-tile.js.map +1 -1
- package/dist/src/tiles/image/item-image.d.ts +18 -0
- package/dist/src/tiles/image/item-image.js +210 -0
- package/dist/src/tiles/image/item-image.js.map +1 -0
- package/dist/src/tiles/image/waveform-image.d.ts +16 -0
- package/dist/src/tiles/image/waveform-image.js +168 -0
- package/dist/src/tiles/image/waveform-image.js.map +1 -0
- package/dist/src/tiles/item-image.d.ts +7 -5
- package/dist/src/tiles/item-image.js +86 -23
- package/dist/src/tiles/item-image.js.map +1 -1
- package/dist/src/tiles/item-tile-image.d.ts +15 -0
- package/dist/src/tiles/item-tile-image.js +68 -0
- package/dist/src/tiles/item-tile-image.js.map +1 -0
- package/dist/src/tiles/list/tile-list-compact.js +54 -59
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
- package/dist/src/tiles/list/tile-list.js +25 -22
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/img/icons/restricted.ts +29 -0
- package/src/collection-browser.ts +29 -0
- package/src/models.ts +2 -0
- package/src/tiles/grid/account-tile.ts +14 -1
- package/src/tiles/item-image.ts +90 -31
- package/src/tiles/list/tile-list-compact.ts +45 -50
- package/src/tiles/list/tile-list.ts +22 -21
- package/dist/src/assets/img/icons/mediatype/livemusic.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/livemusic.js +0 -7
- package/dist/src/assets/img/icons/mediatype/livemusic.js.map +0 -1
- package/dist/src/assets/img/icons/mediatype/photos.d.ts +0 -1
- package/dist/src/assets/img/icons/mediatype/photos.js +0 -7
- package/dist/src/assets/img/icons/mediatype/photos.js.map +0 -1
- package/dist/src/helpers.d.ts +0 -1
- package/dist/src/helpers.js +0 -20
- package/dist/src/helpers.js.map +0 -1
- package/dist/src/mediatype/mediatype-color.d.ts +0 -3
- package/dist/src/mediatype/mediatype-color.js +0 -15
- package/dist/src/mediatype/mediatype-color.js.map +0 -1
- package/dist/src/mediatype/mediatype-display.d.ts +0 -3
- package/dist/src/mediatype/mediatype-display.js +0 -86
- package/dist/src/mediatype/mediatype-display.js.map +0 -1
- package/dist/src/mediatype/mediatype-icon.d.ts +0 -10
- package/dist/src/mediatype/mediatype-icon.js +0 -105
- package/dist/src/mediatype/mediatype-icon.js.map +0 -1
- package/dist/src/mediatype/mediatype-text.d.ts +0 -3
- package/dist/src/mediatype/mediatype-text.js +0 -17
- package/dist/src/mediatype/mediatype-text.js.map +0 -1
- package/dist/src/mediatype/mediatypeConfig.d.ts +0 -3
- package/dist/src/mediatype/mediatypeConfig.js +0 -86
- package/dist/src/mediatype/mediatypeConfig.js.map +0 -1
- package/dist/src/mediatype-icon.d.ts +0 -9
- package/dist/src/mediatype-icon.js +0 -78
- package/dist/src/mediatype-icon.js.map +0 -1
- package/dist/src/sort-filter-bar/img/grid.d.ts +0 -1
- package/dist/src/sort-filter-bar/img/grid.js +0 -5
- package/dist/src/sort-filter-bar/img/grid.js.map +0 -1
- package/dist/src/tiles/list/tile-list-detail.d.ts +0 -7
- package/dist/src/tiles/list/tile-list-detail.js +0 -28
- package/dist/src/tiles/list/tile-list-detail.js.map +0 -1
- package/dist/src/tiles/loading-tile.d.ts +0 -5
- package/dist/src/tiles/loading-tile.js +0 -32
- package/dist/src/tiles/loading-tile.js.map +0 -1
- package/dist/src/utils/format-string.d.ts +0 -2
- package/dist/src/utils/format-string.js +0 -7
- package/dist/src/utils/format-string.js.map +0 -1
- package/dist/src/waveform-thumbnail.d.ts +0 -7
- package/dist/src/waveform-thumbnail.js +0 -106
- package/dist/src/waveform-thumbnail.js.map +0 -1
- package/dist/src/waveform-view.js +0 -2
- package/dist/src/waveform-view.js.map +0 -1
- package/dist/src/your-webcomponent.d.ts +0 -8
- package/dist/src/your-webcomponent.js +0 -38
- package/dist/src/your-webcomponent.js.map +0 -1
- package/dist/test/mediatype-icon.test.d.ts +0 -0
- package/dist/test/mediatype-icon.test.js +0 -3
- package/dist/test/mediatype-icon.test.js.map +0 -1
- package/dist/test/mediatypeConfig.test.d.ts +0 -1
- package/dist/test/mediatypeConfig.test.js +0 -17
- package/dist/test/mediatypeConfig.test.js.map +0 -1
- package/dist/test/utils/format-string.test.d.ts +0 -1
- package/dist/test/utils/format-string.test.js +0 -17
- package/dist/test/utils/format-string.test.js.map +0 -1
- package/dist/test/your-webcomponent.test.d.ts +0 -1
- package/dist/test/your-webcomponent.test.js +0 -23
- package/dist/test/your-webcomponent.test.js.map +0 -1
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { css, html, LitElement } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
let WaveformThumbnail = class WaveformThumbnail extends LitElement {
|
|
5
|
-
render() {
|
|
6
|
-
const imgSrcUrl = `${this.baseNavigationUrl}/services/img/${this.identifier}`;
|
|
7
|
-
const randomGradient = `grad${Math.floor(Math.random() * (6 - 1) + 1)}`;
|
|
8
|
-
return html `
|
|
9
|
-
<div class="box" id=${randomGradient}>
|
|
10
|
-
<div
|
|
11
|
-
class="item-image"
|
|
12
|
-
style="background-image:url(${imgSrcUrl})"
|
|
13
|
-
></div>
|
|
14
|
-
</div>
|
|
15
|
-
`;
|
|
16
|
-
}
|
|
17
|
-
static get styles() {
|
|
18
|
-
return css `
|
|
19
|
-
.box {
|
|
20
|
-
width: 16rem;
|
|
21
|
-
height: 16rem;
|
|
22
|
-
overflow: hidden;
|
|
23
|
-
position: relative;
|
|
24
|
-
box-shadow: 1px 1px 2px 0px;
|
|
25
|
-
display: flex;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.item-image {
|
|
29
|
-
width: 16rem;
|
|
30
|
-
height: 16rem;
|
|
31
|
-
object-fit: cover;
|
|
32
|
-
background-repeat: no-repeat;
|
|
33
|
-
background-position: center center;
|
|
34
|
-
position: relative;
|
|
35
|
-
-webkit-appearance: none;
|
|
36
|
-
overflow: visible;
|
|
37
|
-
mix-blend-mode: screen;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
#grad1 {
|
|
41
|
-
background: linear-gradient(
|
|
42
|
-
hsl(300, 80%, 55%),
|
|
43
|
-
hsl(330, 80%, 33%) 35%,
|
|
44
|
-
hsl(330, 80%, 22%) 70%,
|
|
45
|
-
hsl(0, 0%, 0%)
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
#grad2 {
|
|
50
|
-
background: linear-gradient(
|
|
51
|
-
hsl(200, 80%, 55%),
|
|
52
|
-
hsl(230, 80%, 33%) 35%,
|
|
53
|
-
hsl(230, 80%, 22%) 70%,
|
|
54
|
-
hsl(0, 0%, 0%)
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
#grad3 {
|
|
59
|
-
background: linear-gradient(
|
|
60
|
-
hsl(160, 80%, 55%),
|
|
61
|
-
hsl(190, 80%, 33%) 35%,
|
|
62
|
-
hsl(190, 80%, 22%) 70%,
|
|
63
|
-
hsl(0, 0%, 0%)
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
#grad4 {
|
|
68
|
-
background: linear-gradient(
|
|
69
|
-
hsl(250, 80%, 55%),
|
|
70
|
-
hsl(280, 80%, 33%) 35%,
|
|
71
|
-
hsl(280, 80%, 22%) 70%,
|
|
72
|
-
hsl(0, 0%, 0%)
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
#grad5 {
|
|
77
|
-
background: linear-gradient(
|
|
78
|
-
hsl(280, 80%, 55%),
|
|
79
|
-
hsl(310, 80%, 33%) 35%,
|
|
80
|
-
hsl(310, 80%, 22%) 70%,
|
|
81
|
-
hsl(0, 0%, 0%)
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
#grad6 {
|
|
86
|
-
background: linear-gradient(
|
|
87
|
-
hsl(340, 80%, 55%),
|
|
88
|
-
hsl(0, 80%, 33%) 35%,
|
|
89
|
-
hsl(0, 80%, 22%) 70%,
|
|
90
|
-
hsl(0, 0%, 0%)
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
`;
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
__decorate([
|
|
97
|
-
property({ type: String })
|
|
98
|
-
], WaveformThumbnail.prototype, "baseNavigationUrl", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
property({ type: String })
|
|
101
|
-
], WaveformThumbnail.prototype, "identifier", void 0);
|
|
102
|
-
WaveformThumbnail = __decorate([
|
|
103
|
-
customElement('waveform-thumbnail')
|
|
104
|
-
], WaveformThumbnail);
|
|
105
|
-
export { WaveformThumbnail };
|
|
106
|
-
//# sourceMappingURL=waveform-thumbnail.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"waveform-thumbnail.js","sourceRoot":"","sources":["../../src/waveform-thumbnail.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAkB,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG5D,IAAa,iBAAiB,GAA9B,MAAa,iBAAkB,SAAQ,UAAU;IAK/C,MAAM;QACJ,MAAM,SAAS,GAAG,GAAG,IAAI,CAAC,iBAAiB,iBAAiB,IAAI,CAAC,UAAU,EAAE,CAAC;QAC9E,MAAM,cAAc,GAAG,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QAExE,OAAO,IAAI,CAAA;4BACa,cAAc;;;wCAGF,SAAS;;;KAG5C,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2ET,CAAC;IACJ,CAAC;CACF,CAAA;AAhG6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4DAA4B;AAE3B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAqB;AAHrC,iBAAiB;IAD7B,aAAa,CAAC,oBAAoB,CAAC;GACvB,iBAAiB,CAiG7B;SAjGY,iBAAiB","sourcesContent":["import { css, CSSResultGroup, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\n@customElement('waveform-thumbnail')\nexport class WaveformThumbnail extends LitElement {\n @property({ type: String }) baseNavigationUrl?: string;\n\n @property({ type: String }) identifier?: string;\n\n render() {\n const imgSrcUrl = `${this.baseNavigationUrl}/services/img/${this.identifier}`;\n const randomGradient = `grad${Math.floor(Math.random() * (6 - 1) + 1)}`;\n\n return html`\n <div class=\"box\" id=${randomGradient}>\n <div\n class=\"item-image\"\n style=\"background-image:url(${imgSrcUrl})\"\n ></div>\n </div>\n `;\n }\n\n static get styles(): CSSResultGroup {\n return css`\n .box {\n width: 16rem;\n height: 16rem;\n overflow: hidden;\n position: relative;\n box-shadow: 1px 1px 2px 0px;\n display: flex;\n }\n\n .item-image {\n width: 16rem;\n height: 16rem;\n object-fit: cover;\n background-repeat: no-repeat;\n background-position: center center;\n position: relative;\n -webkit-appearance: none;\n overflow: visible;\n mix-blend-mode: screen;\n }\n\n #grad1 {\n background: linear-gradient(\n hsl(300, 80%, 55%),\n hsl(330, 80%, 33%) 35%,\n hsl(330, 80%, 22%) 70%,\n hsl(0, 0%, 0%)\n );\n }\n\n #grad2 {\n background: linear-gradient(\n hsl(200, 80%, 55%),\n hsl(230, 80%, 33%) 35%,\n hsl(230, 80%, 22%) 70%,\n hsl(0, 0%, 0%)\n );\n }\n\n #grad3 {\n background: linear-gradient(\n hsl(160, 80%, 55%),\n hsl(190, 80%, 33%) 35%,\n hsl(190, 80%, 22%) 70%,\n hsl(0, 0%, 0%)\n );\n }\n\n #grad4 {\n background: linear-gradient(\n hsl(250, 80%, 55%),\n hsl(280, 80%, 33%) 35%,\n hsl(280, 80%, 22%) 70%,\n hsl(0, 0%, 0%)\n );\n }\n\n #grad5 {\n background: linear-gradient(\n hsl(280, 80%, 55%),\n hsl(310, 80%, 33%) 35%,\n hsl(310, 80%, 22%) 70%,\n hsl(0, 0%, 0%)\n );\n }\n\n #grad6 {\n background: linear-gradient(\n hsl(340, 80%, 55%),\n hsl(0, 80%, 33%) 35%,\n hsl(0, 80%, 22%) 70%,\n hsl(0, 0%, 0%)\n );\n }\n `;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"waveform-view.js","sourceRoot":"","sources":["../../src/waveform-view.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { html, css, LitElement } from 'lit';
|
|
3
|
-
import { property, customElement } from 'lit/decorators.js';
|
|
4
|
-
let YourWebComponent = class YourWebComponent extends LitElement {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.title = 'Hey there';
|
|
8
|
-
this.counter = 5;
|
|
9
|
-
}
|
|
10
|
-
increment() {
|
|
11
|
-
this.counter += 1;
|
|
12
|
-
}
|
|
13
|
-
render() {
|
|
14
|
-
return html `
|
|
15
|
-
<h2>${this.title}, Number: ${this.counter}!</h2>
|
|
16
|
-
<button @click=${this.increment}>increment</button>
|
|
17
|
-
<slot name="my-slot"> </slot>
|
|
18
|
-
`;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
YourWebComponent.styles = css `
|
|
22
|
-
:host {
|
|
23
|
-
display: block;
|
|
24
|
-
padding: 25px;
|
|
25
|
-
color: var(--your-webcomponent-text-color, #000);
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
__decorate([
|
|
29
|
-
property({ type: String })
|
|
30
|
-
], YourWebComponent.prototype, "title", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
property({ type: Number })
|
|
33
|
-
], YourWebComponent.prototype, "counter", void 0);
|
|
34
|
-
YourWebComponent = __decorate([
|
|
35
|
-
customElement('your-webcomponent')
|
|
36
|
-
], YourWebComponent);
|
|
37
|
-
export { YourWebComponent };
|
|
38
|
-
//# sourceMappingURL=your-webcomponent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"your-webcomponent.js","sourceRoot":"","sources":["../../src/your-webcomponent.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG5D,IAAa,gBAAgB,GAA7B,MAAa,gBAAiB,SAAQ,UAAU;IAAhD;;QAC8B,UAAK,GAAG,WAAW,CAAC;QAEpB,YAAO,GAAG,CAAC,CAAC;IAqB1C,CAAC;IAnBS,SAAS;QACf,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;YACH,IAAI,CAAC,KAAK,aAAa,IAAI,CAAC,OAAO;uBACxB,IAAI,CAAC,SAAS;;KAEhC,CAAC;IACJ,CAAC;CASF,CAAA;AAPQ,uBAAM,GAAG,GAAG,CAAA;;;;;;GAMlB,CAAC;AAtB0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAqB;AAEpB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAa;AAH7B,gBAAgB;IAD5B,aAAa,CAAC,mBAAmB,CAAC;GACtB,gBAAgB,CAwB5B;SAxBY,gBAAgB","sourcesContent":["import { html, css, LitElement } from 'lit';\nimport { property, customElement } from 'lit/decorators.js';\n\n@customElement('your-webcomponent')\nexport class YourWebComponent extends LitElement {\n @property({ type: String }) title = 'Hey there';\n\n @property({ type: Number }) counter = 5;\n\n private increment() {\n this.counter += 1;\n }\n\n render() {\n return html`\n <h2>${this.title}, Number: ${this.counter}!</h2>\n <button @click=${this.increment}>increment</button>\n <slot name=\"my-slot\"> </slot>\n `;\n }\n\n static styles = css`\n :host {\n display: block;\n padding: 25px;\n color: var(--your-webcomponent-text-color, #000);\n }\n `;\n}\n"]}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mediatype-icon.test.js","sourceRoot":"","sources":["../../test/mediatype-icon.test.ts"],"names":[],"mappings":";AAAA,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC","sourcesContent":["describe('MediatypeIcon', () => {});\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { expect } from '@open-wc/testing';
|
|
2
|
-
import { mediatypeConfig } from '../src/mediatype/mediatypeConfig';
|
|
3
|
-
describe('mediatypeConfig', () => {
|
|
4
|
-
it('returns undefined', () => {
|
|
5
|
-
expect(mediatypeConfig['']).to.equal(undefined);
|
|
6
|
-
expect(mediatypeConfig.test).to.equal(undefined);
|
|
7
|
-
expect(mediatypeConfig.media).to.equal(undefined);
|
|
8
|
-
expect(mediatypeConfig.testing).to.equal(undefined);
|
|
9
|
-
});
|
|
10
|
-
it('returns audio', () => {
|
|
11
|
-
expect(mediatypeConfig.audio).to.exist;
|
|
12
|
-
expect(mediatypeConfig.audio.color).to.exist;
|
|
13
|
-
expect(mediatypeConfig.audio.icon).to.exist;
|
|
14
|
-
expect(mediatypeConfig.audio.text).to.exist;
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=mediatypeConfig.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mediatypeConfig.test.js","sourceRoot":"","sources":["../../test/mediatypeConfig.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAChD,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAClD,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE,GAAG,EAAE;QACvB,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QACvC,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAC7C,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAC5C,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect } from '@open-wc/testing';\nimport { mediatypeConfig } from '../src/mediatype/mediatypeConfig';\n\ndescribe('mediatypeConfig', () => {\n it('returns undefined', () => {\n expect(mediatypeConfig['']).to.equal(undefined);\n expect(mediatypeConfig.test).to.equal(undefined);\n expect(mediatypeConfig.media).to.equal(undefined);\n expect(mediatypeConfig.testing).to.equal(undefined);\n });\n\n it('returns audio', () => {\n expect(mediatypeConfig.audio).to.exist;\n expect(mediatypeConfig.audio.color).to.exist;\n expect(mediatypeConfig.audio.icon).to.exist;\n expect(mediatypeConfig.audio.text).to.exist;\n });\n});\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { expect } from '@open-wc/testing';
|
|
2
|
-
import { isStrOneLiner } from '../../src/utils/format-string';
|
|
3
|
-
const testShortTextNoSpaces = 'Loremipsumdolorsitamet';
|
|
4
|
-
const testLongText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua';
|
|
5
|
-
const testLongOnelineText = 'Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua';
|
|
6
|
-
describe('isStrOneLiner', () => {
|
|
7
|
-
it('returns true if string has no spaces and have long text', () => {
|
|
8
|
-
expect(isStrOneLiner(testLongOnelineText)).to.equal(true);
|
|
9
|
-
});
|
|
10
|
-
it('returns false if string has no spaces but text length not more than 24', () => {
|
|
11
|
-
expect(isStrOneLiner(testShortTextNoSpaces)).to.equal(false);
|
|
12
|
-
});
|
|
13
|
-
it('returns false if string has spaces', () => {
|
|
14
|
-
expect(isStrOneLiner(testLongText)).to.equal(false);
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=format-string.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-string.test.js","sourceRoot":"","sources":["../../../test/utils/format-string.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AACvD,MAAM,YAAY,GAChB,4HAA4H,CAAC;AAC/H,MAAM,mBAAmB,GACvB,0GAA0G,CAAC;AAE7G,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wEAAwE,EAAE,GAAG,EAAE;QAChF,MAAM,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect } from '@open-wc/testing';\nimport { isStrOneLiner } from '../../src/utils/format-string';\n\nconst testShortTextNoSpaces = 'Loremipsumdolorsitamet';\nconst testLongText =\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua';\nconst testLongOnelineText =\n 'Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua';\n\ndescribe('isStrOneLiner', () => {\n it('returns true if string has no spaces and have long text', () => {\n expect(isStrOneLiner(testLongOnelineText)).to.equal(true);\n });\n\n it('returns false if string has no spaces but text length not more than 24', () => {\n expect(isStrOneLiner(testShortTextNoSpaces)).to.equal(false);\n });\n\n it('returns false if string has spaces', () => {\n expect(isStrOneLiner(testLongText)).to.equal(false);\n });\n});\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '../src/your-webcomponent';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { html, fixture, expect } from '@open-wc/testing';
|
|
2
|
-
import '../src/your-webcomponent';
|
|
3
|
-
describe('YourWebComponent', () => {
|
|
4
|
-
it('has a default title "Hey there" and counter 5', async () => {
|
|
5
|
-
const el = await fixture(html `<your-webcomponent></your-webcomponent>`);
|
|
6
|
-
expect(el.title).to.equal('Hey there');
|
|
7
|
-
expect(el.counter).to.equal(5);
|
|
8
|
-
});
|
|
9
|
-
it('increases the counter on button click', async () => {
|
|
10
|
-
const el = await fixture(html `<your-webcomponent></your-webcomponent>`);
|
|
11
|
-
el.shadowRoot.querySelector('button').click();
|
|
12
|
-
expect(el.counter).to.equal(6);
|
|
13
|
-
});
|
|
14
|
-
it('can override the title via attribute', async () => {
|
|
15
|
-
const el = await fixture(html `<your-webcomponent title="attribute title"></your-webcomponent>`);
|
|
16
|
-
expect(el.title).to.equal('attribute title');
|
|
17
|
-
});
|
|
18
|
-
it('passes the a11y audit', async () => {
|
|
19
|
-
const el = await fixture(html `<your-webcomponent></your-webcomponent>`);
|
|
20
|
-
await expect(el).shadowDom.to.be.accessible();
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=your-webcomponent.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"your-webcomponent.test.js","sourceRoot":"","sources":["../../test/your-webcomponent.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGzD,OAAO,0BAA0B,CAAC;AAElC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,+CAA+C,EAAE,KAAK,IAAI,EAAE;QAC7D,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA,yCAAyC,CAC9C,CAAC;QAEF,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACvC,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;QACrD,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA,yCAAyC,CAC9C,CAAC;QACF,EAAE,CAAC,UAAW,CAAC,aAAa,CAAC,QAAQ,CAAE,CAAC,KAAK,EAAE,CAAC;QAEhD,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;QACpD,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA,iEAAiE,CACtE,CAAC;QAEF,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;QACrC,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA,yCAAyC,CAC9C,CAAC;QAEF,MAAM,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { html, fixture, expect } from '@open-wc/testing';\n\nimport type { YourWebComponent } from '../src/your-webcomponent';\nimport '../src/your-webcomponent';\n\ndescribe('YourWebComponent', () => {\n it('has a default title \"Hey there\" and counter 5', async () => {\n const el = await fixture<YourWebComponent>(\n html`<your-webcomponent></your-webcomponent>`\n );\n\n expect(el.title).to.equal('Hey there');\n expect(el.counter).to.equal(5);\n });\n\n it('increases the counter on button click', async () => {\n const el = await fixture<YourWebComponent>(\n html`<your-webcomponent></your-webcomponent>`\n );\n el.shadowRoot!.querySelector('button')!.click();\n\n expect(el.counter).to.equal(6);\n });\n\n it('can override the title via attribute', async () => {\n const el = await fixture<YourWebComponent>(\n html`<your-webcomponent title=\"attribute title\"></your-webcomponent>`\n );\n\n expect(el.title).to.equal('attribute title');\n });\n\n it('passes the a11y audit', async () => {\n const el = await fixture<YourWebComponent>(\n html`<your-webcomponent></your-webcomponent>`\n );\n\n await expect(el).shadowDom.to.be.accessible();\n });\n});\n"]}
|