@digital-realty/ix-switch-bar 2.1.2
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/LICENSE +21 -0
- package/README.md +68 -0
- package/dist/src/IxSwitchBar.d.ts +20 -0
- package/dist/src/IxSwitchBar.js +65 -0
- package/dist/src/IxSwitchBar.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/ix-switch-bar-styles.d.ts +1 -0
- package/dist/src/ix-switch-bar-styles.js +37 -0
- package/dist/src/ix-switch-bar-styles.js.map +1 -0
- package/dist/src/ix-switch-bar.d.ts +1 -0
- package/dist/src/ix-switch-bar.js +3 -0
- package/dist/src/ix-switch-bar.js.map +1 -0
- package/dist/src/react/IxSwitchBar.d.ts +2 -0
- package/dist/src/react/IxSwitchBar.js +10 -0
- package/dist/src/react/IxSwitchBar.js.map +1 -0
- package/dist/test/ix-switch-bar.test.d.ts +1 -0
- package/dist/test/ix-switch-bar.test.js +39 -0
- package/dist/test/ix-switch-bar.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +96 -0
- package/src/IxSwitchBar.ts +55 -0
- package/src/index.ts +1 -0
- package/src/ix-switch-bar-styles.ts +37 -0
- package/src/ix-switch-bar.ts +3 -0
- package/src/react/IxSwitchBar.ts +11 -0
- package/test/ix-switch-bar.test.ts +55 -0
- package/tsconfig.json +21 -0
- package/web-dev-server.config.mjs +27 -0
- package/web-test-runner.config.mjs +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 ix-switch-bar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# \<ix-switch-bar>
|
|
2
|
+
|
|
3
|
+
This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i @digital-realty/ix-switch-bar
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<script type="module">
|
|
15
|
+
import '@digital-realty/ix-switch-bar';
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<ix-switch-bar></ix-switch-bar>
|
|
19
|
+
```
|
|
20
|
+
### In React
|
|
21
|
+
```html
|
|
22
|
+
<script type="module">
|
|
23
|
+
import { IxSwitchBar } from '@digital-realty/ix-switch-bar/IxSwitchBar'
|
|
24
|
+
</script>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Linting and formatting
|
|
28
|
+
|
|
29
|
+
To scan the project for linting and formatting errors, run
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm run lint
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
To automatically fix linting and formatting errors, run
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm run format
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Testing with Web Test Runner
|
|
42
|
+
|
|
43
|
+
To execute a single test run:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm run test
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
To run the tests in interactive watch mode run:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm run test:watch
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## Tooling configs
|
|
57
|
+
|
|
58
|
+
For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
|
|
59
|
+
|
|
60
|
+
If you customize the configuration a lot, you can consider moving them to individual files.
|
|
61
|
+
|
|
62
|
+
## Local Demo with `web-dev-server`
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm start
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
To run a local development server that serves the basic demo located in `demo/index.html`
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LitElement, nothing } from 'lit';
|
|
2
|
+
import '@digital-realty/ix-switch';
|
|
3
|
+
export declare class IxSwitchBar extends LitElement {
|
|
4
|
+
text: string;
|
|
5
|
+
note: string;
|
|
6
|
+
selected: boolean;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
required: boolean;
|
|
9
|
+
icons: boolean;
|
|
10
|
+
showOnlySelectedIcon: boolean;
|
|
11
|
+
static get styles(): import("lit").CSSResult[];
|
|
12
|
+
get isNoteProvided(): number | "";
|
|
13
|
+
renderNote(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
14
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
15
|
+
}
|
|
16
|
+
declare global {
|
|
17
|
+
interface HTMLElementTagNameMap {
|
|
18
|
+
'ix-switch-bar': IxSwitchBar;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, LitElement, nothing } from 'lit';
|
|
3
|
+
import { property } from 'lit/decorators.js';
|
|
4
|
+
import { IxSwitchBarStyle } from './ix-switch-bar-styles.js';
|
|
5
|
+
import '@digital-realty/ix-switch';
|
|
6
|
+
export class IxSwitchBar extends LitElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.text = '';
|
|
10
|
+
this.note = '';
|
|
11
|
+
this.selected = false;
|
|
12
|
+
this.disabled = false;
|
|
13
|
+
this.required = false;
|
|
14
|
+
this.icons = false;
|
|
15
|
+
this.showOnlySelectedIcon = false;
|
|
16
|
+
}
|
|
17
|
+
static get styles() {
|
|
18
|
+
return [IxSwitchBarStyle];
|
|
19
|
+
}
|
|
20
|
+
get isNoteProvided() {
|
|
21
|
+
return this.note && this.note.length;
|
|
22
|
+
}
|
|
23
|
+
renderNote() {
|
|
24
|
+
if (!this.isNoteProvided)
|
|
25
|
+
return nothing;
|
|
26
|
+
return html ` <p class="switch-bar__note">${this.note}</p> `;
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
return html `
|
|
30
|
+
<div class="switch-bar__label">
|
|
31
|
+
<p>${this.text}</p>
|
|
32
|
+
${this.renderNote()}
|
|
33
|
+
</div>
|
|
34
|
+
<ix-switch
|
|
35
|
+
?selected="${this.selected}"
|
|
36
|
+
?disabled="${this.disabled}"
|
|
37
|
+
?required="${this.required}"
|
|
38
|
+
?icons="${this.icons}"
|
|
39
|
+
?showOnlySelectedIcon="${this.showOnlySelectedIcon}"
|
|
40
|
+
></ix-switch>
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
__decorate([
|
|
45
|
+
property({ type: String })
|
|
46
|
+
], IxSwitchBar.prototype, "text", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
property({ type: String })
|
|
49
|
+
], IxSwitchBar.prototype, "note", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
property({ type: Boolean })
|
|
52
|
+
], IxSwitchBar.prototype, "selected", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
property({ type: Boolean })
|
|
55
|
+
], IxSwitchBar.prototype, "disabled", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
property({ type: Boolean })
|
|
58
|
+
], IxSwitchBar.prototype, "required", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
property({ type: Boolean })
|
|
61
|
+
], IxSwitchBar.prototype, "icons", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
property({ type: Boolean })
|
|
64
|
+
], IxSwitchBar.prototype, "showOnlySelectedIcon", void 0);
|
|
65
|
+
//# sourceMappingURL=IxSwitchBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IxSwitchBar.js","sourceRoot":"","sources":["../../src/IxSwitchBar.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,2BAA2B,CAAC;AAEnC,MAAM,OAAO,WAAY,SAAQ,UAAU;IAA3C;;QAC8B,SAAI,GAAW,EAAE,CAAC;QAElB,SAAI,GAAW,EAAE,CAAC;QAEjB,aAAQ,GAAY,KAAK,CAAC;QAE1B,aAAQ,GAAY,KAAK,CAAC;QAE1B,aAAQ,GAAY,KAAK,CAAC;QAE1B,UAAK,GAAY,KAAK,CAAC;QAEvB,yBAAoB,GAAY,KAAK,CAAC;IA8BrE,CAAC;IA5BC,MAAM,KAAK,MAAM;QACf,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC5B,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IACvC,CAAC;IAED,UAAU;QACR,IAAI,CAAC,IAAI,CAAC,cAAc;YAAE,OAAO,OAAO,CAAC;QACzC,OAAO,IAAI,CAAA,gCAAgC,IAAI,CAAC,IAAI,OAAO,CAAC;IAC9D,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;;aAEF,IAAI,CAAC,IAAI;UACZ,IAAI,CAAC,UAAU,EAAE;;;qBAGN,IAAI,CAAC,QAAQ;qBACb,IAAI,CAAC,QAAQ;qBACb,IAAI,CAAC,QAAQ;kBAChB,IAAI,CAAC,KAAK;iCACK,IAAI,CAAC,oBAAoB;;KAErD,CAAC;IACJ,CAAC;CACF;AA1C6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAmB;AAElB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAmB;AAEjB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CAA2B;AAE1B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CAA2B;AAE1B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CAA2B;AAE1B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0CAAwB;AAEvB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yDAAuC","sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { IxSwitchBarStyle } from './ix-switch-bar-styles.js';\nimport '@digital-realty/ix-switch';\n\nexport class IxSwitchBar extends LitElement {\n @property({ type: String }) text: string = '';\n\n @property({ type: String }) note: string = '';\n\n @property({ type: Boolean }) selected: boolean = false;\n\n @property({ type: Boolean }) disabled: boolean = false;\n\n @property({ type: Boolean }) required: boolean = false;\n\n @property({ type: Boolean }) icons: boolean = false;\n\n @property({ type: Boolean }) showOnlySelectedIcon: boolean = false;\n\n static get styles() {\n return [IxSwitchBarStyle];\n }\n\n get isNoteProvided() {\n return this.note && this.note.length;\n }\n\n renderNote() {\n if (!this.isNoteProvided) return nothing;\n return html` <p class=\"switch-bar__note\">${this.note}</p> `;\n }\n\n render() {\n return html`\n <div class=\"switch-bar__label\">\n <p>${this.text}</p>\n ${this.renderNote()}\n </div>\n <ix-switch\n ?selected=\"${this.selected}\"\n ?disabled=\"${this.disabled}\"\n ?required=\"${this.required}\"\n ?icons=\"${this.icons}\"\n ?showOnlySelectedIcon=\"${this.showOnlySelectedIcon}\"\n ></ix-switch>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ix-switch-bar': IxSwitchBar;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IxSwitchBar } from './IxSwitchBar.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { IxSwitchBar } from './IxSwitchBar.js';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const IxSwitchBarStyle: import("lit").CSSResult;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const IxSwitchBarStyle = css `
|
|
3
|
+
:host {
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
align-items: center;
|
|
7
|
+
border: 1px solid lightgrey;
|
|
8
|
+
border-width: 1px 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host([hidden]) {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
p {
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
p:not(:last-child) {
|
|
20
|
+
margin: 0 0 0.25rem;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.switch-bar__label {
|
|
24
|
+
padding: 0.5em 0;
|
|
25
|
+
margin-right: 0.5em;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.switch-bar__note {
|
|
29
|
+
font-size: 0.875rem;
|
|
30
|
+
font-weight: normal;
|
|
31
|
+
line-height: 1rem;
|
|
32
|
+
margin: 0;
|
|
33
|
+
font-style: italic;
|
|
34
|
+
color: #595959;
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
//# sourceMappingURL=ix-switch-bar-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ix-switch-bar-styles.js","sourceRoot":"","sources":["../../src/ix-switch-bar-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkClC,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const IxSwitchBarStyle = css`\n :host {\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid lightgrey;\n border-width: 1px 0;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n p {\n margin: 0;\n }\n\n p:not(:last-child) {\n margin: 0 0 0.25rem;\n }\n\n .switch-bar__label {\n padding: 0.5em 0;\n margin-right: 0.5em;\n }\n\n .switch-bar__note {\n font-size: 0.875rem;\n font-weight: normal;\n line-height: 1rem;\n margin: 0;\n font-style: italic;\n color: #595959;\n }\n`;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ix-switch-bar.js","sourceRoot":"","sources":["../../src/ix-switch-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import { IxSwitchBar } from './IxSwitchBar.js';\n\nwindow.customElements.define('ix-switch-bar', IxSwitchBar);\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit-labs/react';
|
|
3
|
+
import { IxSwitchBar as LitComp } from '../IxSwitchBar.js';
|
|
4
|
+
window.customElements.define('ix-switch-bar', LitComp);
|
|
5
|
+
export const IxSwitchBar = createComponent({
|
|
6
|
+
tagName: 'ix-switch-bar',
|
|
7
|
+
elementClass: LitComp,
|
|
8
|
+
react: React,
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=IxSwitchBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IxSwitchBar.js","sourceRoot":"","sources":["../../../src/react/IxSwitchBar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;AAEvD,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;IACzC,OAAO,EAAE,eAAe;IACxB,YAAY,EAAE,OAAO;IACrB,KAAK,EAAE,KAAK;CACb,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { createComponent } from '@lit-labs/react';\nimport { IxSwitchBar as LitComp } from '../IxSwitchBar.js';\n\nwindow.customElements.define('ix-switch-bar', LitComp);\n\nexport const IxSwitchBar = createComponent({\n tagName: 'ix-switch-bar',\n elementClass: LitComp,\n react: React,\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../src/ix-switch-bar.js';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { html, fixture, expect } from '@open-wc/testing';
|
|
2
|
+
import '../src/ix-switch-bar.js';
|
|
3
|
+
describe('<ix-switch-bar>', () => {
|
|
4
|
+
it('Should be initialized with properties', async () => {
|
|
5
|
+
const props = {
|
|
6
|
+
text: 'test',
|
|
7
|
+
note: 'note',
|
|
8
|
+
};
|
|
9
|
+
await fixture(html ` <ix-switch-bar
|
|
10
|
+
.text="${props.text}"
|
|
11
|
+
.note="${props.note}"
|
|
12
|
+
>
|
|
13
|
+
</ix-switch-bar>`);
|
|
14
|
+
const ixSwitchBar = document.querySelector('ix-switch-bar');
|
|
15
|
+
const ixSwitchBarShadowRoot = ixSwitchBar === null || ixSwitchBar === void 0 ? void 0 : ixSwitchBar.shadowRoot;
|
|
16
|
+
const text = ixSwitchBarShadowRoot === null || ixSwitchBarShadowRoot === void 0 ? void 0 : ixSwitchBarShadowRoot.querySelector('div.switch-bar__label p');
|
|
17
|
+
expect(text === null || text === void 0 ? void 0 : text.textContent).to.equal('test');
|
|
18
|
+
const note = ixSwitchBarShadowRoot === null || ixSwitchBarShadowRoot === void 0 ? void 0 : ixSwitchBarShadowRoot.querySelector('p.switch-bar__note');
|
|
19
|
+
expect(note === null || note === void 0 ? void 0 : note.textContent).to.equal('note');
|
|
20
|
+
const switchInput = ixSwitchBarShadowRoot === null || ixSwitchBarShadowRoot === void 0 ? void 0 : ixSwitchBarShadowRoot.querySelector('ix-switch');
|
|
21
|
+
expect(switchInput).to.not.be.null;
|
|
22
|
+
});
|
|
23
|
+
it('Should not display note if no value is provided ', async () => {
|
|
24
|
+
const props = {
|
|
25
|
+
text: 'test',
|
|
26
|
+
};
|
|
27
|
+
await fixture(html ` <ix-switch-bar .text="${props.text}">
|
|
28
|
+
</ix-switch-bar>`);
|
|
29
|
+
const ixSwitchBar = document.querySelector('ix-switch-bar');
|
|
30
|
+
const ixSwitchBarShadowRoot = ixSwitchBar === null || ixSwitchBar === void 0 ? void 0 : ixSwitchBar.shadowRoot;
|
|
31
|
+
const text = ixSwitchBarShadowRoot === null || ixSwitchBarShadowRoot === void 0 ? void 0 : ixSwitchBarShadowRoot.querySelector('div.switch-bar__label p');
|
|
32
|
+
expect(text === null || text === void 0 ? void 0 : text.textContent).to.equal('test');
|
|
33
|
+
const note = ixSwitchBarShadowRoot === null || ixSwitchBarShadowRoot === void 0 ? void 0 : ixSwitchBarShadowRoot.querySelector('p.switch-bar__note');
|
|
34
|
+
expect(note).to.be.null;
|
|
35
|
+
const switchInput = ixSwitchBarShadowRoot === null || ixSwitchBarShadowRoot === void 0 ? void 0 : ixSwitchBarShadowRoot.querySelector('ix-switch');
|
|
36
|
+
expect(switchInput).to.not.be.null;
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=ix-switch-bar.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ix-switch-bar.test.js","sourceRoot":"","sources":["../../test/ix-switch-bar.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,yBAAyB,CAAC;AAEjC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;QACrD,MAAM,KAAK,GAAG;YACZ,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;SACb,CAAC;QAEF,MAAM,OAAO,CAAC,IAAI,CAAA;eACP,KAAK,CAAC,IAAI;eACV,KAAK,CAAC,IAAI;;qBAEJ,CAAC,CAAC;QAEnB,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;QAC5D,MAAM,qBAAqB,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,CAAC;QAEtD,MAAM,IAAI,GAAG,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,aAAa,CAC/C,yBAAyB,CAC1B,CAAC;QACF,MAAM,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAE3C,MAAM,IAAI,GAAG,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAE3C,MAAM,WAAW,GAAG,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,aAAa,CAAC,WAAW,CAAC,CAAC;QACtE,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kDAAkD,EAAE,KAAK,IAAI,EAAE;QAChE,MAAM,KAAK,GAAG;YACZ,IAAI,EAAE,MAAM;SACb,CAAC;QAEF,MAAM,OAAO,CAAC,IAAI,CAAA,0BAA0B,KAAK,CAAC,IAAI;qBACrC,CAAC,CAAC;QAEnB,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;QAC5D,MAAM,qBAAqB,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,CAAC;QAEtD,MAAM,IAAI,GAAG,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,aAAa,CAC/C,yBAAyB,CAC1B,CAAC;QACF,MAAM,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAE3C,MAAM,IAAI,GAAG,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAExB,MAAM,WAAW,GAAG,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,aAAa,CAAC,WAAW,CAAC,CAAC;QACtE,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { html, fixture, expect } from '@open-wc/testing';\n\nimport '../src/ix-switch-bar.js';\n\ndescribe('<ix-switch-bar>', () => {\n it('Should be initialized with properties', async () => {\n const props = {\n text: 'test',\n note: 'note',\n };\n\n await fixture(html` <ix-switch-bar\n .text=\"${props.text}\"\n .note=\"${props.note}\"\n >\n </ix-switch-bar>`);\n\n const ixSwitchBar = document.querySelector('ix-switch-bar');\n const ixSwitchBarShadowRoot = ixSwitchBar?.shadowRoot;\n\n const text = ixSwitchBarShadowRoot?.querySelector(\n 'div.switch-bar__label p'\n );\n expect(text?.textContent).to.equal('test');\n\n const note = ixSwitchBarShadowRoot?.querySelector('p.switch-bar__note');\n expect(note?.textContent).to.equal('note');\n\n const switchInput = ixSwitchBarShadowRoot?.querySelector('ix-switch');\n expect(switchInput).to.not.be.null;\n });\n\n it('Should not display note if no value is provided ', async () => {\n const props = {\n text: 'test',\n };\n\n await fixture(html` <ix-switch-bar .text=\"${props.text}\">\n </ix-switch-bar>`);\n\n const ixSwitchBar = document.querySelector('ix-switch-bar');\n const ixSwitchBarShadowRoot = ixSwitchBar?.shadowRoot;\n\n const text = ixSwitchBarShadowRoot?.querySelector(\n 'div.switch-bar__label p'\n );\n expect(text?.textContent).to.equal('test');\n\n const note = ixSwitchBarShadowRoot?.querySelector('p.switch-bar__note');\n expect(note).to.be.null;\n\n const switchInput = ixSwitchBarShadowRoot?.querySelector('ix-switch');\n expect(switchInput).to.not.be.null;\n });\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/@lit/reactive-element/css-tag.d.ts","../../../node_modules/@lit/reactive-element/reactive-controller.d.ts","../../../node_modules/@lit/reactive-element/reactive-element.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/@types/trusted-types/index.d.ts","../../../node_modules/lit-html/directive.d.ts","../../../node_modules/lit-html/lit-html.d.ts","../../../node_modules/lit-element/lit-element.d.ts","../../../node_modules/lit-html/is-server.d.ts","../../../node_modules/lit/index.d.ts","../../../node_modules/@lit/reactive-element/decorators/base.d.ts","../../../node_modules/@lit/reactive-element/decorators/custom-element.d.ts","../../../node_modules/@lit/reactive-element/decorators/property.d.ts","../../../node_modules/@lit/reactive-element/decorators/state.d.ts","../../../node_modules/@lit/reactive-element/decorators/event-options.d.ts","../../../node_modules/@lit/reactive-element/decorators/query.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-all.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-async.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts","../../../node_modules/lit/decorators.d.ts","../src/ix-switch-bar-styles.ts","../../../node_modules/@material/web/internal/controller/attachable-controller.d.ts","../../../node_modules/@material/web/focus/internal/focus-ring.d.ts","../../../node_modules/@material/web/focus/md-focus-ring.d.ts","../../../node_modules/@material/web/ripple/internal/ripple.d.ts","../../../node_modules/@material/web/ripple/ripple.d.ts","../../../node_modules/@material/web/switch/internal/switch.d.ts","../../../node_modules/@material/web/switch/switch.d.ts","../../ix-switch/dist/src/ixswitch.d.ts","../../ix-switch/dist/src/index.d.ts","../src/ixswitchbar.ts","../src/index.ts","../src/ix-switch-bar.ts","../../../node_modules/@types/react/ts5.0/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/scheduler/tracing.d.ts","../../../node_modules/@types/react/ts5.0/index.d.ts","../../../node_modules/@lit-labs/react/create-component.d.ts","../../../node_modules/@lit-labs/react/index.d.ts","../src/react/ixswitchbar.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@open-wc/semantic-dom-diff/get-diffable-html.d.ts","../../../node_modules/@open-wc/semantic-dom-diff/chai-dom-diff-plugin.d.ts","../../../node_modules/@open-wc/semantic-dom-diff/chai-dom-diff.d.ts","../../../node_modules/@open-wc/semantic-dom-diff/index.d.ts","../../../node_modules/chai-a11y-axe/chai-a11y-axe-plugin.d.ts","../../../node_modules/chai-a11y-axe/src/accessible.d.ts","../../../node_modules/chai-a11y-axe/index.d.ts","../../../node_modules/@types/chai-dom/index.d.ts","../../../node_modules/@types/sinonjs__fake-timers/index.d.ts","../../../node_modules/@types/sinon/index.d.ts","../../../node_modules/@types/sinon-chai/index.d.ts","../../../node_modules/@open-wc/testing/register-chai-plugins.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/elementupdated.d.ts","../../../node_modules/lit-html/static.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/renderable.d.ts","../../../node_modules/@open-wc/dedupe-mixin/index.d.ts","../../../node_modules/@open-wc/scoped-elements/types/src/types.d.ts","../../../node_modules/@open-wc/scoped-elements/types/src/scopedelementsmixin.d.ts","../../../node_modules/@open-wc/scoped-elements/types/index.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/fixture-no-side-effect.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/fixture.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/fixturewrapper.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/helpers.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/scopedelementswrapper.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/litfixture.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/stringfixture.d.ts","../../../node_modules/@open-wc/testing-helpers/types/index.d.ts","../../../node_modules/@open-wc/testing/index.d.ts","../test/ix-switch-bar.test.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/accepts/index.d.ts","../../../node_modules/@types/babel__code-frame/index.d.ts","../../../node_modules/@types/connect/index.d.ts","../../../node_modules/@types/body-parser/index.d.ts","../../../node_modules/@types/qs/index.d.ts","../../../node_modules/@types/co-body/index.d.ts","../../../node_modules/@types/command-line-args/index.d.ts","../../../node_modules/@types/content-disposition/index.d.ts","../../../node_modules/@types/convert-source-map/index.d.ts","../../../node_modules/@types/mime/index.d.ts","../../../node_modules/@types/send/index.d.ts","../../../node_modules/@types/range-parser/index.d.ts","../../../node_modules/@types/express-serve-static-core/index.d.ts","../../../node_modules/@types/http-errors/index.d.ts","../../../node_modules/@types/serve-static/index.d.ts","../../../node_modules/@types/express/index.d.ts","../../../node_modules/@types/keygrip/index.d.ts","../../../node_modules/@types/cookies/index.d.ts","../../../node_modules/@types/debounce/index.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/hast/index.d.ts","../../../node_modules/@types/http-assert/index.d.ts","../../../node_modules/@types/intl-tel-input/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/@types/jquery/jquerystatic.d.ts","../../../node_modules/@types/jquery/jquery.d.ts","../../../node_modules/@types/jquery/misc.d.ts","../../../node_modules/@types/jquery/legacy.d.ts","../../../node_modules/@types/sizzle/index.d.ts","../../../node_modules/@types/jquery/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/json5/index.d.ts","../../../node_modules/@types/koa-compose/index.d.ts","../../../node_modules/@types/koa/index.d.ts","../../../node_modules/@types/lodash/common/common.d.ts","../../../node_modules/@types/lodash/common/array.d.ts","../../../node_modules/@types/lodash/common/collection.d.ts","../../../node_modules/@types/lodash/common/date.d.ts","../../../node_modules/@types/lodash/common/function.d.ts","../../../node_modules/@types/lodash/common/lang.d.ts","../../../node_modules/@types/lodash/common/math.d.ts","../../../node_modules/@types/lodash/common/number.d.ts","../../../node_modules/@types/lodash/common/object.d.ts","../../../node_modules/@types/lodash/common/seq.d.ts","../../../node_modules/@types/lodash/common/string.d.ts","../../../node_modules/@types/lodash/common/util.d.ts","../../../node_modules/@types/lodash/index.d.ts","../../../node_modules/@types/mdast/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/minimist/index.d.ts","../../../node_modules/@types/mocha/index.d.ts","../../../node_modules/@types/normalize-package-data/index.d.ts","../../../node_modules/@types/parse-json/index.d.ts","../../../node_modules/@types/parse5/lib/tree-adapters/default.d.ts","../../../node_modules/@types/parse5/index.d.ts","../../../node_modules/@types/prismjs/index.d.ts","../../../node_modules/@types/resolve/index.d.ts","../../../node_modules/@types/scheduler/index.d.ts","../../../node_modules/@types/semver/classes/semver.d.ts","../../../node_modules/@types/semver/functions/parse.d.ts","../../../node_modules/@types/semver/functions/valid.d.ts","../../../node_modules/@types/semver/functions/clean.d.ts","../../../node_modules/@types/semver/functions/inc.d.ts","../../../node_modules/@types/semver/functions/diff.d.ts","../../../node_modules/@types/semver/functions/major.d.ts","../../../node_modules/@types/semver/functions/minor.d.ts","../../../node_modules/@types/semver/functions/patch.d.ts","../../../node_modules/@types/semver/functions/prerelease.d.ts","../../../node_modules/@types/semver/functions/compare.d.ts","../../../node_modules/@types/semver/functions/rcompare.d.ts","../../../node_modules/@types/semver/functions/compare-loose.d.ts","../../../node_modules/@types/semver/functions/compare-build.d.ts","../../../node_modules/@types/semver/functions/sort.d.ts","../../../node_modules/@types/semver/functions/rsort.d.ts","../../../node_modules/@types/semver/functions/gt.d.ts","../../../node_modules/@types/semver/functions/lt.d.ts","../../../node_modules/@types/semver/functions/eq.d.ts","../../../node_modules/@types/semver/functions/neq.d.ts","../../../node_modules/@types/semver/functions/gte.d.ts","../../../node_modules/@types/semver/functions/lte.d.ts","../../../node_modules/@types/semver/functions/cmp.d.ts","../../../node_modules/@types/semver/functions/coerce.d.ts","../../../node_modules/@types/semver/classes/comparator.d.ts","../../../node_modules/@types/semver/classes/range.d.ts","../../../node_modules/@types/semver/functions/satisfies.d.ts","../../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../../node_modules/@types/semver/ranges/min-version.d.ts","../../../node_modules/@types/semver/ranges/valid.d.ts","../../../node_modules/@types/semver/ranges/outside.d.ts","../../../node_modules/@types/semver/ranges/gtr.d.ts","../../../node_modules/@types/semver/ranges/ltr.d.ts","../../../node_modules/@types/semver/ranges/intersects.d.ts","../../../node_modules/@types/semver/ranges/simplify.d.ts","../../../node_modules/@types/semver/ranges/subset.d.ts","../../../node_modules/@types/semver/internals/identifiers.d.ts","../../../node_modules/@types/semver/index.d.ts","../../../node_modules/@types/ws/index.d.ts","../../../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","52dd370c807255c61765347fc90a9bee3c522b8744dc222714e2bf6b5be3a823","1e5743b25a63fd34ffbae89adcbf248ee17db6ed08d90079ffa93803c3e80d2a","ccf8ea81b0ac699c220b874b804ad02b8aabc5b494e1c3bda0d255ec8d08694d","15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e",{"version":"17f2b4d00e42e0cc1dfc3be692a6da5a14a6cb73b87259e6d20ff02bcd6d573f","affectsGlobalScope":true},"c567d37119d6f56381af48eb7516030ccf35a36f9aca045e238d9c207a7c536c","b448dfbb5a6c4505f6b6beab587cf41f180ad62bcb506b44e3f2c09d20ba63a9","eba7cf33380cc3a3cf614faf67300e14d0bdff9ea6c5cd6f4b040b1756a48ab1","5e7e090243bf203382a5cb04eabbdc38d78f6d5922f16f543e4da8fa007d5ff9","cd823094ded7c8ac4f94ab6dc387dab699293eb8323d9f948304efc07e4ae7b2","d45c02bf8b85203f35de2971eafb8f8092090d150c7805a189b3e197f53b12b6","ac388c7c7a262213a3700451bc921e382a93fb27c0252c34ccf03540b4ce044b","097a7e3badfd1c4b35f72aa0f722f5714a4f6a84e53fca5a79dcfebbfc5e718d","fb0107c83e2e0e75b77dacd0c3c6c3ab6844e98dce2a8f858c6f0a57c12136a6","ea410c8280b0ec480acb195c7dd36c1f054403f5fccee0beca85717777cf8562","628bceb593b3a5b3d73ff44a808a347ec07d6ee397104a1d88b0f9a20d8b4599","57e25505a5de058216a8f4416ca850788bfc3a412c8e90109b2ef91f75fdd615","2ba453918c1fcf1cbb2836f731534f356d5fe65ed9628811f686e8de3920ed0e","4bcb813ea56182beaaab1e8274524eb9f1449b0d8e79efc4a0399de09e43f816","cc689acd4eff461c808e01225be6a16d1787e44d451310be5dd556dd7ab08457","f0380f581cb015778c0fe51e95b5b7f6dae237280654558469b2486c1572268a",{"version":"9d86435dc73581c4bf669e54da69ae05beeebb36514b0dfe9d4d0b3481dd2b35","signature":"a83f834b5465824ee8f3b3d370e6ac3c93d8e3c94f41af914d302a19c4760342"},"905800cc110167503d0cf58bb0dd6fa4aaac1e9cedc9bd9c48e5d1f8b5b8d4c8","37577c4f865accbe17a77e46395831df983810f7f40029dcecab030e0dcf1a98",{"version":"17fef45daf4268739c248d3fd4904112e247beaa33ec18214cf0830cbebae306","affectsGlobalScope":true},"2c887f29f6796ea68247c626acbef560ff29bb8d0042b641e4fc69559841463d",{"version":"726740c77a2cfbf8ddf85c52584bb359be7effbbcb8da1eb74132c9fda946c29","affectsGlobalScope":true},"0aef975456f286060c9d4ff6b6a89dafd129b434480643ba077b2b3fd9c0d84f",{"version":"2c64cdf8517876b4ad7281a4b3db0c976f9f427379800a93a1fbcd197f1023c0","affectsGlobalScope":true},{"version":"3d9a47c97980a187bd5e34d35fe4d98e35362d3736411723eb881c2b9cba66b2","affectsGlobalScope":true},"195871a0392af42342763e04e36a34abad6a4616f1b07e2e2c190545dd9e7ac7",{"version":"b53d4b89f7be720af6114ef94121e7a21d4b1bb97f15d7edf38b76515687ec75","signature":"cf1bc90b3e64ab69aff4b432163a30cddd19a4d8cc4102da67d43ee64cfa8e27","affectsGlobalScope":true},"6f8cad8acbb3d0fc3ffd9bb96c8507c82ea08c7393ab36226d2d303b9499de49",{"version":"caeb13c6334b323f1360f863d9591c0e4333024b5a7706de103b87b4ae8fe886","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"0bd5e7096c7bc02bf70b2cc017fc45ef489cb19bd2f32a71af39ff5787f1b56a","affectsGlobalScope":true},"4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","60ecad5852d4d83edae430e597405132d278a79c10499e9363aecbe1ddc0eade","5f8f00356f6a82e21493b2d57b2178f11b00cf8960df00bd37bdcae24c9333ca",{"version":"a694c85180021f7681f98dbde94b648b4e1483ad6fad4afc1d217619613f833a","affectsGlobalScope":true},"346cc70aa5304faf122846a7854b32a000d02851a69fad84862307e5bcfec93a","17a3826f371a5253a1dd7bce7a4751e005ca8702fc2dbdc8084be25e1efb38ce",{"version":"cb6f0b96c44424064ac89e70e6a7e7b812fb700793f7a4ed04795b1adbce4afa","signature":"32b713f8b66cb0dea475672108ae9aa36f054def3457b7a39ee81ee89b171f25"},{"version":"1fb008c1a29f86a8a0e9a674b7235f23c6d2a86c9658772941fb626a60aac53b","affectsGlobalScope":true},"8a659f7d82d932649a78f89643c5b436953424a219d705d49b8b3d9ccd6e35ff",{"version":"2d412861573a672bd90fdcb1e48740593324565f3b3aaf6808c0e3e2f0d54ae8","affectsGlobalScope":true},{"version":"cd711db43a952f15464b571ac11b7a440332cd52342bc92c4bf908c70688f57f","affectsGlobalScope":true},"9d8709c916778cb34830708ed47b78e9a46d1fb2eb73a682b14eee990bed4aa6",{"version":"507e2131e89b515ce40c05c0c2fef6cc575ba8947703f92e8cdf36078747a9ff","affectsGlobalScope":true},"999a90d30a3183dcee987d0a5a7c586aba5bacbf6ce087ba8635124082ccfeea","8a5878edd52f4a720560b4c6e6247e9ddc3df6118ad9cf2f9927903b03d5f440",{"version":"31214658e22c23eb58ff8383346bf6c8d135b3eab0748f3226aa7b6f30d2021f","affectsGlobalScope":true},"cc75216f6b332971954ef74bf3d14c3881c461e82987050d5f62af3e5966e845","ee1fb501d38eaafa8099e00bd1fc7014ccc99bee616c660f605ae3559324793d",{"version":"4b93bb181cf4f25ccbf2ec1f559912c81678433a9784ce84163b5c9e1548998f","affectsGlobalScope":true},"65b91a3725399231d3469529b5e27b85bf2aa98013e607f308e5fe260b47eeff","a11181f6d68200e83ccb1fb48b262a7132a3257e0a230f41c9dc4c351964297a","359f23bc7fccaec08632ee5c33eb333a5b207fc8ae17c881c7b69919aced4d58","51bce1535d9cb87390d75581866d79de7b2e2cb525a89fba84411c8bb5be52d2","88cda4269c54f0803834fd62b2fac61af8bff7a085693f7ca9df85c1f19dee8a",{"version":"d40075d9f1c08b4a8d8e468076f5258900e99895e7259c40f3923b7044bbed6c","affectsGlobalScope":true},"754006450e5de2b7dac5993194326e3a65c1474673f7304c20810f5eda18ca05","fdf0aa1a72ff0188a9013926201a391116ef6701cd439b89850786abdf755fb8","0b5817d9435c019648f2a2326eaf1086efb72e8e90e28eb53a58b2f31f61e161","abf9ea97b78a7b239186cf5b7ed59c4a593abac3c408c8c95fc5e604cfdfdb43","ae91c9161caf0af81c89e780a045fc5ea8382407e516342e409c5db9161d3b32","d30c69f9eb16583b0a406358224c312b865514a6a7c787a57f16ef08e49b1886","5e02756608c1ac8ddf96878c3af3d4db7ed4e272aef24837e255859ee0a4fb71","4a662115c4c7186cc027ef4a8163e48c7f1c57f05247f08d5acb2344fae2ca53","d598157512ae6e0d3aa6bb0dd261ae34845831dccf7bc7739695ee2589eb76f5","905fbc07f65451b05cb5594d162674eb3ef8f2bf5f13552a1702215664aae3e7","50f63746fc2a779d1f9c5657fd78e292045dc98b540e026799e039ea629f2943",{"version":"8326c93bae6787afc19c00bedc4c43c4057f03d1cc0f1421791a973b9c93218a","signature":"428bc0e0126d64dcb53497ffa07e3ad364809cf4ad139aeb91525f8e5fa85d1b"},"09df3b4f1c937f02e7fee2836d4c4d7a63e66db70fd4d4e97126f4542cc21d9d","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419",{"version":"32465ea19404cb188e84cf08c6b1f6b12d739140436402cdbc184a3fd20a7d81","affectsGlobalScope":true},"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c",{"version":"62486c25ff70799e9faac5c6108820969617daeb6e65644c212d03cdb5902a3c","affectsGlobalScope":true},"546ab07e19116d935ad982e76a223275b53bff7771dab94f433b7ab04652936e","7b43160a49cf2c6082da0465876c4a0b164e160b81187caeb0a6ca7a281e85ba",{"version":"aefb5a4a209f756b580eb53ea771cca8aad411603926f307a5e5b8ec6b16dcf6","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","f5a8b7ec4b798c88679194a8ebc25dcb6f5368e6e5811fcda9fe12b0d445b8db","b86e1a45b29437f3a99bad4147cb9fe2357617e8008c0484568e5bb5138d6e13","b5b719a47968cd61a6f83f437236bb6fe22a39223b6620da81ef89f5d7a78fb7","42c431e7965b641106b5e25ab3283aa4865ca7bb9909610a2abfa6226e4348be","0b7e732af0a9599be28c091d6bd1cb22c856ec0d415d4749c087c3881ca07a56","b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e",{"version":"2c71199d1fc83bf17636ad5bf63a945633406b7b94887612bba4ef027c662b3e","affectsGlobalScope":true},{"version":"8d6138a264ddc6f94f16e99d4e117a2d6eb31b217891cf091b6437a2f114d561","affectsGlobalScope":true},"3b4c85eea12187de9929a76792b98406e8778ce575caca8c574f06da82622c54","f788131a39c81e0c9b9e463645dd7132b5bc1beb609b0e31e5c1ceaea378b4df","0c236069ce7bded4f6774946e928e4b3601894d294054af47a553f7abcafe2c1","21894466693f64957b9bd4c80fa3ec7fdfd4efa9d1861e070aca23f10220c9b2","396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","ad8848c289c0b633452e58179f46edccd14b5a0fe90ebce411f79ff040b803e0",{"version":"5d4ef3f46c7f9d62f7c964f9f9ccdd293be99fb3dcc66c983f2aea7430e3c7c6","affectsGlobalScope":true},"91f8b5abcdff8f9ecb9656b9852878718416fb7700b2c4fad8331e5b97c080bb","59d8f064f86a4a2be03b33c0efcc9e7a268ad27b22f82dce16899f3364f70ba8","0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7",{"version":"f49fb15c4aa06b65b0dce4db4584bfd8a9f74644baef1511b404dc95be34af00","affectsGlobalScope":true},{"version":"d48009cbe8a30a504031cc82e1286f78fed33b7a42abf7602c23b5547b382563","affectsGlobalScope":true},"7aaeb5e62f90e1b2be0fc4844df78cdb1be15c22b427bc6c39d57308785b8f10","3ba30205a029ebc0c91d7b1ab4da73f6277d730ca1fc6692d5a9144c6772c76b","d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","458b216959c231df388a5de9dcbcafd4b4ca563bc3784d706d0455467d7d4942","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","f8c87b19eae111f8720b0345ab301af8d81add39621b63614dfc2d15fd6f140a","831c22d257717bf2cbb03afe9c4bcffc5ccb8a2074344d4238bf16d3a857bb12",{"version":"24ba151e213906027e2b1f5223d33575a3612b0234a0e2b56119520bbe0e594b","affectsGlobalScope":true},{"version":"cbf046714f3a3ba2544957e1973ac94aa819fa8aa668846fa8de47eb1c41b0b2","affectsGlobalScope":true},"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","eae74e3d50820f37c72c0679fed959cd1e63c98f6a146a55b8c4361582fa6a52","7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df",{"version":"aed89e3c18f4c659ee8153a76560dffda23e2d801e1e60d7a67abd84bc555f8d","affectsGlobalScope":true},{"version":"0ed13c80faeb2b7160bffb4926ff299c468e67a37a645b3ae0917ba0db633c1b","affectsGlobalScope":true},"e393915d3dc385e69c0e2390739c87b2d296a610662eb0b1cb85224e55992250","2f940651c2f30e6b29f8743fae3f40b7b1c03615184f837132b56ea75edad08b","5749c327c3f789f658072f8340786966c8b05ea124a56c1d8d60e04649495a4d",{"version":"c9d62b2a51b2ff166314d8be84f6881a7fcbccd37612442cf1c70d27d5352f50","affectsGlobalScope":true},"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"d3f4c342fb62f348f25f54b473b0ab7371828cbf637134194fa9cdf04856f87b","6738101ae8e56cd3879ab3f99630ada7d78097fc9fd334df7e766216778ca219","ef437dd282a112d1172b50ac7fd86713d475a496da7aeb31119f529f1313c8d5","82819f9ecc249a6a3e284003540d02ea1b1f56f410c23231797b9e1e4b9622df","81a109b6bb6adf5ed70f2c7e6d907b8c3adcf7b47b5ee09701c5f97370fd29b7","c7da551241b7be719b7bd654ab12a5098c3206fbb189076dd2d8871011a6ab5a","f78253406029c78c96d8923b15e89a5900836e47a2b98bee6c83dc142421d395","5ae76b5a59f2f787e9eb2d4f1a066ceb4505a52bf8fe77ac321d791ef2e72000","64fcc79ee3c237816b9cef0a9289b00bf3da5b17040cd970ac04ba03c4ac1595","49f1d42ac650932fe64a9b623c27ea6e681335ea2e7cda52a5358f4248701001","f6218314af6f492ce5461bdadac5b829f5b4b31a3d1da3d04e77ed0afe0829fb","7167d932a7e2e991084421bb22af20024ada5a046d948c742de0f89996de5d0b","e2d3bfa79f0fad3ad67dfb0685c50dbe19b364a440160a2d40d0e3f44c75938c",{"version":"1c598f8d911f0bc39f04910c8c93f2f76fbb65f892ee5ecc38a2b58bb95af752","affectsGlobalScope":true},"4eadf1158f1ae8f7b0deea0f96b391359042cf74d1eb3ce1dacdb69de96e590d","f0120fc76274f614e7b8f5420a74abce69eee25b81e2084479fa426f33ccd46a","003f07cf566395059625b39785398f18652c8952e19790e7d6eeb22a9cbe0440","432dc46f22f9790797d98ccf09f7dc4a897bb5e874921217b951fb808947446b","28ed61ddc42936537ad29ade1404d533b4b28967460e29811409e5a40d9fc3b3","a36023d4a654c11e071b99cde8203d55d9feaf4940c766b9c960b8e0eb4f4c1f","42fe73978ddb3a82329bf41a116e921deb266551e4f0ad9e9c7bdc581c24f085","0670eede14b39fd186fe7e224db70510158af5279528d12292df9b980867c1d0","4274d4169679f93587cb887aa43570c2b5a840db17022093aa232ac2a9ca9beb","e98185f4249720ace1921d59c1ff4612fa5c633a183fc9bf28e2e7b8e3c7fd51",{"version":"481dc63ed954bc59b9169888ef7f009578f0aa395ff56059c173cba33c7ee065","affectsGlobalScope":true},"8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","c79bd2f3e5c05e7ad80dc82ce8d339cac23ac1f5e6cfab96c860bb70d5162873","e3328cedfe4d7fac23ba75d00bf5169269800ab949d0837cd88c4211a52c3762",{"version":"0e2d2d0ccf42bdd96e597727fad4d30bceabe0d161280824eb60d0d7c8929312","affectsGlobalScope":true},{"version":"6f8d2fca4cba47ab1b4ab6238c69d4b91d0e0a232109e4d26b2f9eda946e873c","affectsGlobalScope":true},{"version":"1ba37271a244a1b872be0134c1b86e2bd446093c312d2f76e405b1c989e2fe97","affectsGlobalScope":true},{"version":"381236c13b79159876be4802d48edfc72dea4e8662e58d189676de9d54ad725f","affectsGlobalScope":true},"592c25a8a783ccd3666c22292dab7125aacee947b9fd0e79204a609284ba80e7","2b1af4170f6dfa90f43d2fe3d6c36f95b7fa121aa434a2acefb763d7be460a53","dd89872dd0647dfd63665f3d525c06d114310a2f7a5a9277e5982a152b31be2b","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","fa849c825ac37d70ca78097a1cd06bb5ac281651f765fff8e491cfb0709de57b","c39e1ee964fa0bb318ee2db72c430b3aede3b50dbde414b03b4e43915f80c292","32ab25b7b28b24a138d879ca371b18c8fdfdd564ad5107e1333c5aa5d5fea494","458111fc89d11d2151277c822dfdc1a28fa5b6b2493cf942e37d4cd0a6ee5f22","da2b6356b84a40111aaecb18304ea4e4fcb43d70efb1c13ca7d7a906445ee0d3","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","6f294731b495c65ecf46a5694f0082954b961cf05463bea823f8014098eaffa0","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","dcd91d3b697cb650b95db5471189b99815af5db2a1cd28760f91e0b12ede8ed5","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","b03afe4bec768ae333582915146f48b161e567a81b5ebc31c4d78af089770ac9","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","30abc554c7ad13063a02ddd06757929b34357aea1f6fcf4ca39114cb0fc19384","2f768f764e91667b3018488352dfcb4b6ef2d14b3e472bbeca7c0b3eae8d7d15","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","0eacae49e20c8004e5022b3abc41cee708925a7bb0a52bafa2e416eca424d39d",{"version":"5f186a758a616c107c70e8918db4630d063bd782f22e6e0b17573b125765b40b","affectsGlobalScope":true},"58b3082802116f10782ecaa577a473499def44650204beb38a8541d4d98b757b","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","fc37aca06f6b8b296c42412a2e75ab53d30cd1fa8a340a3bb328a723fd678377","5f2c582b9ef260cb9559a64221b38606378c1fabe17694592cdfe5975a6d7efa","5cd2c1aad6f55e97990dfb8883885be47f885b78a8576f492389ff85e484d698","8a19491eba2108d5c333c249699f40aff05ad312c04a17504573b27d91f0aede","4964ba28dd6c9d086735062e8f4c63f23dd14e20b9b6d2acdc5774760d47b132","cc0700b1b97e18a3d5d9184470502d8762ec85158819d662730c3a8c5d702584","9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","f77ff4cd234d3fd18ddd5aeadb6f94374511931976d41f4b9f594cb71f7ce6f3","4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","4f18b4e6081e5e980ef53ddf57b9c959d36cffe1eb153865f512a01aeffb5e1e","7f17d4846a88eca5fe71c4474ef687ee89c4acf9b5372ab9b2ee68644b7e0fe0","b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","58e0cee50add50d4b6d47a935e26aeb0080d98c9cf729f8af389511cdfa10526","bc81aff061c53a7140270555f4b22da4ecfe8601e8027cf5aa175fbdc7927c31","5fdc3a2b97a9b1987cea799a36c6a4ea2f34fb60e52734361451cb5445f11a94"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./","rootDir":"..","sourceMap":true,"strict":true,"target":5},"fileIdsList":[[82,162],[83,162],[162],[46,162],[54,162],[46,54,162],[46,54,62,162],[44,45,162],[53,66,162],[53,67,162],[53,162],[50,53,66,162],[53,69,162],[53,68,70,162],[53,71,162],[104,162],[46,102,103,162],[46,102,162],[86,87,162],[88,162],[87,89,162],[99,100,107,108,109,111,112,162],[101,105,162],[106,162],[102,162],[101,106,110,162],[101,162],[86,98,113,162],[90,93,94,97,162],[135,162,169],[135,162,169,172],[86,162],[135,162,169,174],[135,162,169,172,185,186],[132,135,162,169,174,180,181],[162,173,174,182,184],[162,190],[162,194],[162,195],[162,197,198,199,200,201],[162,206],[132,135,136,140,146,161,162,169,170,177,183,186,187,192,205],[162,207,209,210,211,212,213,214,215,216,217,218,219],[162,207,208,210,211,212,213,214,215,216,217,218,219],[162,208,209,210,211,212,213,214,215,216,217,218,219],[162,207,208,209,211,212,213,214,215,216,217,218,219],[162,207,208,209,210,212,213,214,215,216,217,218,219],[162,207,208,209,210,211,213,214,215,216,217,218,219],[162,207,208,209,210,211,212,214,215,216,217,218,219],[162,207,208,209,210,211,212,213,215,216,217,218,219],[162,207,208,209,210,211,212,213,214,216,217,218,219],[162,207,208,209,210,211,212,213,214,215,217,218,219],[162,207,208,209,210,211,212,213,214,215,216,218,219],[162,207,208,209,210,211,212,213,214,215,216,217,219],[162,207,208,209,210,211,212,213,214,215,216,217,218],[116,162],[119,162],[120,125,153,162],[121,132,133,140,150,161,162],[121,122,132,140,162],[123,162],[124,125,133,141,162],[125,150,158,162],[126,128,132,140,162],[127,162],[128,129,162],[132,162],[130,132,162],[119,132,162],[132,133,134,150,161,162],[132,133,134,147,150,153,162],[162,166],[128,132,135,140,150,161,162],[132,133,135,136,140,150,158,161,162],[135,137,150,158,161,162],[116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168],[132,138,162],[139,161,162,166],[128,132,140,150,162],[141,162],[142,162],[119,143,162],[144,160,162,166],[145,162],[146,162],[132,147,148,162],[147,149,162,164],[120,132,150,151,152,153,162],[120,150,152,162],[150,151,162],[153,162],[154,162],[119,150,162],[132,156,157,162],[156,157,162],[125,140,150,158,162],[159,162],[140,160,162],[120,135,146,161,162],[125,162],[150,162,163],[139,162,164],[162,165],[120,125,132,134,143,150,161,162,164,166],[150,162,167],[162,226],[162,227],[78,79,80,81,162],[162,169],[162,231,270],[162,231,255,270],[162,270],[162,231],[162,231,256,270],[162,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269],[162,256,270],[133,150,162,169,179],[135,162,169,179,183],[86,96,162],[95,162],[47,162],[132,135,137,140,150,158,161,162,167,169],[132,150,162,169],[92,162],[91,162],[46,50,162],[50,162],[48,49,162],[55,56,57,58,59,60,61,62,63,162],[46,50,51,52,162],[43,75,162],[43,53,162],[43,53,64,65,74,162],[43,75,82,84,162],[43,77,114,162],[73,162],[50,53,72,162],[53],[50,53,74],[75,84],[77]],"referencedMap":[[83,1],[84,2],[44,3],[54,4],[55,5],[58,6],[56,6],[60,6],[63,7],[62,3],[61,6],[59,6],[57,5],[45,3],[46,8],[67,9],[68,10],[66,11],[69,12],[70,13],[71,14],[72,15],[102,3],[105,16],[104,17],[103,18],[88,19],[89,20],[87,3],[90,21],[113,22],[99,3],[106,23],[107,24],[108,3],[109,25],[111,26],[101,11],[110,27],[112,24],[114,28],[98,29],[170,30],[171,3],[173,31],[94,32],[86,3],[175,33],[176,3],[172,30],[177,3],[178,3],[187,34],[188,3],[189,3],[182,35],[185,36],[191,37],[192,3],[183,3],[193,3],[194,3],[195,38],[196,39],[202,40],[198,3],[197,3],[200,3],[199,3],[203,3],[204,3],[186,3],[205,41],[206,42],[208,43],[209,44],[207,45],[210,46],[211,47],[212,48],[213,49],[214,50],[215,51],[216,52],[217,53],[218,54],[219,55],[220,37],[179,3],[221,3],[222,3],[223,3],[116,56],[117,56],[119,57],[120,58],[121,59],[122,60],[123,61],[124,62],[125,63],[126,64],[127,65],[128,66],[129,66],[131,67],[130,68],[132,69],[133,70],[134,71],[118,72],[168,3],[135,73],[136,74],[137,75],[169,76],[138,77],[139,78],[140,79],[141,80],[142,81],[143,82],[144,83],[145,84],[146,85],[147,86],[148,86],[149,87],[150,88],[152,89],[151,90],[153,91],[154,92],[155,93],[156,94],[157,95],[158,96],[159,97],[160,98],[161,99],[162,100],[163,101],[164,102],[165,103],[166,104],[167,105],[224,3],[225,3],[227,106],[226,107],[228,3],[80,3],[174,3],[181,3],[78,3],[82,108],[229,109],[230,3],[81,3],[255,110],[256,111],[231,112],[234,112],[253,110],[254,110],[244,110],[243,113],[241,110],[236,110],[249,110],[247,110],[251,110],[235,110],[248,110],[252,110],[237,110],[238,110],[250,110],[232,110],[239,110],[240,110],[242,110],[246,110],[257,114],[245,110],[233,110],[270,115],[269,3],[264,114],[266,116],[265,114],[258,114],[259,114],[261,114],[263,114],[267,116],[268,116],[260,116],[262,116],[180,117],[184,118],[97,119],[96,120],[95,3],[201,3],[48,121],[47,3],[190,3],[271,122],[272,123],[91,32],[93,124],[92,125],[79,3],[51,126],[49,127],[52,3],[50,128],[100,127],[64,129],[53,130],[43,3],[8,3],[10,3],[9,3],[2,3],[11,3],[12,3],[13,3],[14,3],[15,3],[16,3],[17,3],[18,3],[3,3],[4,3],[22,3],[19,3],[20,3],[21,3],[23,3],[24,3],[25,3],[5,3],[26,3],[27,3],[28,3],[29,3],[6,3],[33,3],[30,3],[31,3],[32,3],[34,3],[7,3],[35,3],[40,3],[41,3],[36,3],[37,3],[38,3],[39,3],[1,3],[42,3],[76,131],[65,132],[77,131],[75,133],[85,134],[115,135],[74,136],[73,137]],"exportedModulesMap":[[83,1],[84,2],[44,3],[54,4],[55,5],[58,6],[56,6],[60,6],[63,7],[62,3],[61,6],[59,6],[57,5],[45,3],[46,8],[67,9],[68,10],[66,11],[69,12],[70,13],[71,14],[72,15],[102,3],[105,16],[104,17],[103,18],[88,19],[89,20],[87,3],[90,21],[113,22],[99,3],[106,23],[107,24],[108,3],[109,25],[111,26],[101,11],[110,27],[112,24],[114,28],[98,29],[170,30],[171,3],[173,31],[94,32],[86,3],[175,33],[176,3],[172,30],[177,3],[178,3],[187,34],[188,3],[189,3],[182,35],[185,36],[191,37],[192,3],[183,3],[193,3],[194,3],[195,38],[196,39],[202,40],[198,3],[197,3],[200,3],[199,3],[203,3],[204,3],[186,3],[205,41],[206,42],[208,43],[209,44],[207,45],[210,46],[211,47],[212,48],[213,49],[214,50],[215,51],[216,52],[217,53],[218,54],[219,55],[220,37],[179,3],[221,3],[222,3],[223,3],[116,56],[117,56],[119,57],[120,58],[121,59],[122,60],[123,61],[124,62],[125,63],[126,64],[127,65],[128,66],[129,66],[131,67],[130,68],[132,69],[133,70],[134,71],[118,72],[168,3],[135,73],[136,74],[137,75],[169,76],[138,77],[139,78],[140,79],[141,80],[142,81],[143,82],[144,83],[145,84],[146,85],[147,86],[148,86],[149,87],[150,88],[152,89],[151,90],[153,91],[154,92],[155,93],[156,94],[157,95],[158,96],[159,97],[160,98],[161,99],[162,100],[163,101],[164,102],[165,103],[166,104],[167,105],[224,3],[225,3],[227,106],[226,107],[228,3],[80,3],[174,3],[181,3],[78,3],[82,108],[229,109],[230,3],[81,3],[255,110],[256,111],[231,112],[234,112],[253,110],[254,110],[244,110],[243,113],[241,110],[236,110],[249,110],[247,110],[251,110],[235,110],[248,110],[252,110],[237,110],[238,110],[250,110],[232,110],[239,110],[240,110],[242,110],[246,110],[257,114],[245,110],[233,110],[270,115],[269,3],[264,114],[266,116],[265,114],[258,114],[259,114],[261,114],[263,114],[267,116],[268,116],[260,116],[262,116],[180,117],[184,118],[97,119],[96,120],[95,3],[201,3],[48,121],[47,3],[190,3],[271,122],[272,123],[91,32],[93,124],[92,125],[79,3],[51,126],[49,127],[52,3],[50,128],[100,127],[64,129],[53,130],[43,3],[8,3],[10,3],[9,3],[2,3],[11,3],[12,3],[13,3],[14,3],[15,3],[16,3],[17,3],[18,3],[3,3],[4,3],[22,3],[19,3],[20,3],[21,3],[23,3],[24,3],[25,3],[5,3],[26,3],[27,3],[28,3],[29,3],[6,3],[33,3],[30,3],[31,3],[32,3],[34,3],[7,3],[35,3],[40,3],[41,3],[36,3],[37,3],[38,3],[39,3],[1,3],[42,3],[76,131],[65,138],[75,139],[85,140],[115,141],[74,136],[73,137]],"semanticDiagnosticsPerFile":[83,84,44,54,55,58,56,60,63,62,61,59,57,45,46,67,68,66,69,70,71,72,102,105,104,103,88,89,87,90,113,99,106,107,108,109,111,101,110,112,114,98,170,171,173,94,86,175,176,172,177,178,187,188,189,182,185,191,192,183,193,194,195,196,202,198,197,200,199,203,204,186,205,206,208,209,207,210,211,212,213,214,215,216,217,218,219,220,179,221,222,223,116,117,119,120,121,122,123,124,125,126,127,128,129,131,130,132,133,134,118,168,135,136,137,169,138,139,140,141,142,143,144,145,146,147,148,149,150,152,151,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,224,225,227,226,228,80,174,181,78,82,229,230,81,255,256,231,234,253,254,244,243,241,236,249,247,251,235,248,252,237,238,250,232,239,240,242,246,257,245,233,270,269,264,266,265,258,259,261,263,267,268,260,262,180,184,97,96,95,201,48,47,190,271,272,91,93,92,79,51,49,52,50,100,64,53,43,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,76,65,77,75,85,115,74,73]},"version":"4.9.5"}
|
package/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@digital-realty/ix-switch-bar",
|
|
3
|
+
"description": "Webcomponent ix-switch-bar following open-wc recommendations",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"author": "Digital Realty",
|
|
6
|
+
"version": "2.1.2",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/src/index.js",
|
|
9
|
+
"module": "dist/src/index.js",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./dist/src/index.js",
|
|
12
|
+
"./ix-switch-bar.js": "./dist/src/ix-switch-bar.js",
|
|
13
|
+
"./IxSwitchBar": "./dist/src/react/IxSwitchBar.js"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"analyze": "cem analyze --litelement",
|
|
20
|
+
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
|
|
21
|
+
"build": "tsc && npm run analyze -- --exclude dist",
|
|
22
|
+
"prepublish": "tsc && npm run analyze -- --exclude dist",
|
|
23
|
+
"lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
|
|
24
|
+
"format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
|
|
25
|
+
"test": "tsc && wtr --coverage",
|
|
26
|
+
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@digital-realty/ix-switch": "^2.1.2",
|
|
30
|
+
"@lit-labs/react": "^2.0.3",
|
|
31
|
+
"lit": "^2.0.2",
|
|
32
|
+
"react": "^18.2.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
36
|
+
"@open-wc/eslint-config": "^9.2.1",
|
|
37
|
+
"@open-wc/testing": "^3.1.6",
|
|
38
|
+
"@types/react": "^18.2.22",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
|
40
|
+
"@typescript-eslint/parser": "^5.48.0",
|
|
41
|
+
"@web/dev-server": "^0.1.34",
|
|
42
|
+
"@web/test-runner": "^0.14.0",
|
|
43
|
+
"concurrently": "^5.3.0",
|
|
44
|
+
"eslint": "^8.31.0",
|
|
45
|
+
"eslint-config-prettier": "^8.3.0",
|
|
46
|
+
"husky": "^4.3.8",
|
|
47
|
+
"lint-staged": "^10.5.4",
|
|
48
|
+
"prettier": "^2.4.1",
|
|
49
|
+
"tslib": "^2.3.1",
|
|
50
|
+
"typescript": "^4.5.2"
|
|
51
|
+
},
|
|
52
|
+
"customElements": "custom-elements.json",
|
|
53
|
+
"eslintConfig": {
|
|
54
|
+
"parser": "@typescript-eslint/parser",
|
|
55
|
+
"root": true,
|
|
56
|
+
"extends": [
|
|
57
|
+
"@open-wc/eslint-config",
|
|
58
|
+
"eslint-config-prettier",
|
|
59
|
+
"plugin:json/recommended"
|
|
60
|
+
],
|
|
61
|
+
"plugins": [
|
|
62
|
+
"@typescript-eslint"
|
|
63
|
+
],
|
|
64
|
+
"rules": {
|
|
65
|
+
"class-methods-use-this": "off",
|
|
66
|
+
"no-unused-vars": "off",
|
|
67
|
+
"@typescript-eslint/no-unused-vars": [
|
|
68
|
+
"error"
|
|
69
|
+
],
|
|
70
|
+
"import/no-unresolved": "off",
|
|
71
|
+
"import/extensions": [
|
|
72
|
+
"error",
|
|
73
|
+
"always",
|
|
74
|
+
{
|
|
75
|
+
"ignorePackages": true
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"prettier": {
|
|
81
|
+
"singleQuote": true,
|
|
82
|
+
"arrowParens": "avoid"
|
|
83
|
+
},
|
|
84
|
+
"husky": {
|
|
85
|
+
"hooks": {
|
|
86
|
+
"pre-commit": "lint-staged"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"lint-staged": {
|
|
90
|
+
"*.ts": [
|
|
91
|
+
"eslint --fix",
|
|
92
|
+
"prettier --write"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"gitHead": "1e8e36ae0147d1fb0037ba85c727e3a30daebbc9"
|
|
96
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { html, LitElement, nothing } from 'lit';
|
|
2
|
+
import { property } from 'lit/decorators.js';
|
|
3
|
+
import { IxSwitchBarStyle } from './ix-switch-bar-styles.js';
|
|
4
|
+
import '@digital-realty/ix-switch';
|
|
5
|
+
|
|
6
|
+
export class IxSwitchBar extends LitElement {
|
|
7
|
+
@property({ type: String }) text: string = '';
|
|
8
|
+
|
|
9
|
+
@property({ type: String }) note: string = '';
|
|
10
|
+
|
|
11
|
+
@property({ type: Boolean }) selected: boolean = false;
|
|
12
|
+
|
|
13
|
+
@property({ type: Boolean }) disabled: boolean = false;
|
|
14
|
+
|
|
15
|
+
@property({ type: Boolean }) required: boolean = false;
|
|
16
|
+
|
|
17
|
+
@property({ type: Boolean }) icons: boolean = false;
|
|
18
|
+
|
|
19
|
+
@property({ type: Boolean }) showOnlySelectedIcon: boolean = false;
|
|
20
|
+
|
|
21
|
+
static get styles() {
|
|
22
|
+
return [IxSwitchBarStyle];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
get isNoteProvided() {
|
|
26
|
+
return this.note && this.note.length;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
renderNote() {
|
|
30
|
+
if (!this.isNoteProvided) return nothing;
|
|
31
|
+
return html` <p class="switch-bar__note">${this.note}</p> `;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
render() {
|
|
35
|
+
return html`
|
|
36
|
+
<div class="switch-bar__label">
|
|
37
|
+
<p>${this.text}</p>
|
|
38
|
+
${this.renderNote()}
|
|
39
|
+
</div>
|
|
40
|
+
<ix-switch
|
|
41
|
+
?selected="${this.selected}"
|
|
42
|
+
?disabled="${this.disabled}"
|
|
43
|
+
?required="${this.required}"
|
|
44
|
+
?icons="${this.icons}"
|
|
45
|
+
?showOnlySelectedIcon="${this.showOnlySelectedIcon}"
|
|
46
|
+
></ix-switch>
|
|
47
|
+
`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare global {
|
|
52
|
+
interface HTMLElementTagNameMap {
|
|
53
|
+
'ix-switch-bar': IxSwitchBar;
|
|
54
|
+
}
|
|
55
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IxSwitchBar } from './IxSwitchBar.js';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
|
|
3
|
+
export const IxSwitchBarStyle = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
align-items: center;
|
|
8
|
+
border: 1px solid lightgrey;
|
|
9
|
+
border-width: 1px 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:host([hidden]) {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
p {
|
|
17
|
+
margin: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
p:not(:last-child) {
|
|
21
|
+
margin: 0 0 0.25rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.switch-bar__label {
|
|
25
|
+
padding: 0.5em 0;
|
|
26
|
+
margin-right: 0.5em;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.switch-bar__note {
|
|
30
|
+
font-size: 0.875rem;
|
|
31
|
+
font-weight: normal;
|
|
32
|
+
line-height: 1rem;
|
|
33
|
+
margin: 0;
|
|
34
|
+
font-style: italic;
|
|
35
|
+
color: #595959;
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit-labs/react';
|
|
3
|
+
import { IxSwitchBar as LitComp } from '../IxSwitchBar.js';
|
|
4
|
+
|
|
5
|
+
window.customElements.define('ix-switch-bar', LitComp);
|
|
6
|
+
|
|
7
|
+
export const IxSwitchBar = createComponent({
|
|
8
|
+
tagName: 'ix-switch-bar',
|
|
9
|
+
elementClass: LitComp,
|
|
10
|
+
react: React,
|
|
11
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { html, fixture, expect } from '@open-wc/testing';
|
|
2
|
+
|
|
3
|
+
import '../src/ix-switch-bar.js';
|
|
4
|
+
|
|
5
|
+
describe('<ix-switch-bar>', () => {
|
|
6
|
+
it('Should be initialized with properties', async () => {
|
|
7
|
+
const props = {
|
|
8
|
+
text: 'test',
|
|
9
|
+
note: 'note',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
await fixture(html` <ix-switch-bar
|
|
13
|
+
.text="${props.text}"
|
|
14
|
+
.note="${props.note}"
|
|
15
|
+
>
|
|
16
|
+
</ix-switch-bar>`);
|
|
17
|
+
|
|
18
|
+
const ixSwitchBar = document.querySelector('ix-switch-bar');
|
|
19
|
+
const ixSwitchBarShadowRoot = ixSwitchBar?.shadowRoot;
|
|
20
|
+
|
|
21
|
+
const text = ixSwitchBarShadowRoot?.querySelector(
|
|
22
|
+
'div.switch-bar__label p'
|
|
23
|
+
);
|
|
24
|
+
expect(text?.textContent).to.equal('test');
|
|
25
|
+
|
|
26
|
+
const note = ixSwitchBarShadowRoot?.querySelector('p.switch-bar__note');
|
|
27
|
+
expect(note?.textContent).to.equal('note');
|
|
28
|
+
|
|
29
|
+
const switchInput = ixSwitchBarShadowRoot?.querySelector('ix-switch');
|
|
30
|
+
expect(switchInput).to.not.be.null;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('Should not display note if no value is provided ', async () => {
|
|
34
|
+
const props = {
|
|
35
|
+
text: 'test',
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
await fixture(html` <ix-switch-bar .text="${props.text}">
|
|
39
|
+
</ix-switch-bar>`);
|
|
40
|
+
|
|
41
|
+
const ixSwitchBar = document.querySelector('ix-switch-bar');
|
|
42
|
+
const ixSwitchBarShadowRoot = ixSwitchBar?.shadowRoot;
|
|
43
|
+
|
|
44
|
+
const text = ixSwitchBarShadowRoot?.querySelector(
|
|
45
|
+
'div.switch-bar__label p'
|
|
46
|
+
);
|
|
47
|
+
expect(text?.textContent).to.equal('test');
|
|
48
|
+
|
|
49
|
+
const note = ixSwitchBarShadowRoot?.querySelector('p.switch-bar__note');
|
|
50
|
+
expect(note).to.be.null;
|
|
51
|
+
|
|
52
|
+
const switchInput = ixSwitchBarShadowRoot?.querySelector('ix-switch');
|
|
53
|
+
expect(switchInput).to.not.be.null;
|
|
54
|
+
});
|
|
55
|
+
});
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2018",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"noEmitOnError": true,
|
|
7
|
+
"lib": ["es2017", "dom"],
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": false,
|
|
10
|
+
"allowSyntheticDefaultImports": true,
|
|
11
|
+
"experimentalDecorators": true,
|
|
12
|
+
"importHelpers": true,
|
|
13
|
+
"outDir": "dist",
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"inlineSources": true,
|
|
16
|
+
"rootDir": "./",
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"incremental": true
|
|
19
|
+
},
|
|
20
|
+
"include": ["**/*.ts"]
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
|
|
2
|
+
|
|
3
|
+
/** Use Hot Module replacement by adding --hmr to the start command */
|
|
4
|
+
const hmr = process.argv.includes('--hmr');
|
|
5
|
+
|
|
6
|
+
export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
|
|
7
|
+
open: '/demo/',
|
|
8
|
+
/** Use regular watch mode if HMR is not enabled. */
|
|
9
|
+
watch: !hmr,
|
|
10
|
+
/** Resolve bare module imports */
|
|
11
|
+
nodeResolve: {
|
|
12
|
+
exportConditions: ['browser', 'development'],
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
/** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
|
|
16
|
+
// esbuildTarget: 'auto'
|
|
17
|
+
|
|
18
|
+
/** Set appIndex to enable SPA routing */
|
|
19
|
+
// appIndex: 'demo/index.html',
|
|
20
|
+
|
|
21
|
+
plugins: [
|
|
22
|
+
/** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
|
|
23
|
+
// hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
|
|
24
|
+
],
|
|
25
|
+
|
|
26
|
+
// See documentation for all available options
|
|
27
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// import { playwrightLauncher } from '@web/test-runner-playwright';
|
|
2
|
+
|
|
3
|
+
const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
|
|
4
|
+
|
|
5
|
+
export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
|
|
6
|
+
/** Test files to run */
|
|
7
|
+
files: 'dist/test/**/*.test.js',
|
|
8
|
+
|
|
9
|
+
/** Resolve bare module imports */
|
|
10
|
+
nodeResolve: {
|
|
11
|
+
exportConditions: ['browser', 'development'],
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
port: 8017,
|
|
15
|
+
|
|
16
|
+
/** Filter out lit dev mode logs */
|
|
17
|
+
filterBrowserLogs(log) {
|
|
18
|
+
for (const arg of log.args) {
|
|
19
|
+
if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
/** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
|
|
27
|
+
// esbuildTarget: 'auto',
|
|
28
|
+
|
|
29
|
+
/** Amount of browsers to run concurrently */
|
|
30
|
+
// concurrentBrowsers: 2,
|
|
31
|
+
|
|
32
|
+
/** Amount of test files per browser to test concurrently */
|
|
33
|
+
// concurrency: 1,
|
|
34
|
+
|
|
35
|
+
/** Browsers to run tests on */
|
|
36
|
+
// browsers: [
|
|
37
|
+
// playwrightLauncher({ product: 'chromium' }),
|
|
38
|
+
// playwrightLauncher({ product: 'firefox' }),
|
|
39
|
+
// playwrightLauncher({ product: 'webkit' }),
|
|
40
|
+
// ],
|
|
41
|
+
|
|
42
|
+
// See documentation for all available options
|
|
43
|
+
});
|