@exmg/exm-chip-input 1.0.0 → 1.0.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/index.d.ts +3 -3
- package/index.js +3 -3
- package/package.json +2 -2
- package/src/exm-chip-input-dropdown.d.ts +4 -4
- package/src/exm-chip-input-dropdown.js +11 -11
- package/src/exm-chip-input.d.ts +2 -2
- package/src/exm-chip-input.js +6 -6
- package/src/exm-chip.d.ts +2 -2
- package/src/exm-chip.js +11 -11
- package/src/selection-controller.d.ts +1 -1
- package/src/selection-controller.js +1 -1
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export { ExmChipInput } from './src/exm-chip-input.js';
|
|
2
|
+
export { ExmChip } from './src/exm-chip.js';
|
|
3
|
+
export { ExmChipInputDropdown } from './src/exm-chip-input-dropdown.js';
|
|
4
4
|
export { style as chipInputStyles } from './src/styles/exm-chip-input-css.js';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export { ExmChipInput } from './src/exm-chip-input.js';
|
|
2
|
+
export { ExmChip } from './src/exm-chip.js';
|
|
3
|
+
export { ExmChipInputDropdown } from './src/exm-chip-input-dropdown.js';
|
|
4
4
|
export { style as chipInputStyles } from './src/styles/exm-chip-input-css.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exmg/exm-chip-input",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "313ba6df520ba0a4f3ac614c1c3f8df970291b19"
|
|
47
47
|
}
|
|
@@ -5,10 +5,10 @@ import '@material/web/icon/icon.js';
|
|
|
5
5
|
import '@material/web/menu/menu.js';
|
|
6
6
|
import './dropdown/dropdown-container.js';
|
|
7
7
|
import { ChipSet } from '@material/web/chips/internal/chip-set.js';
|
|
8
|
-
import {
|
|
8
|
+
import { ExmChip } from './exm-chip.js';
|
|
9
9
|
declare global {
|
|
10
10
|
interface HTMLElementTagNameMap {
|
|
11
|
-
'exm-chip-input-dropdown':
|
|
11
|
+
'exm-chip-input-dropdown': ExmChipInputDropdown;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
@@ -16,11 +16,11 @@ declare global {
|
|
|
16
16
|
* @final
|
|
17
17
|
* @suppress {visibility}
|
|
18
18
|
*/
|
|
19
|
-
export declare class
|
|
19
|
+
export declare class ExmChipInputDropdown extends ChipSet {
|
|
20
20
|
label: string;
|
|
21
21
|
dropdownTitle: string;
|
|
22
22
|
btnAddText: string;
|
|
23
|
-
selectedChips?:
|
|
23
|
+
selectedChips?: ExmChip[];
|
|
24
24
|
private menuOpen;
|
|
25
25
|
static styles: import("lit").CSSResult[];
|
|
26
26
|
constructor();
|
|
@@ -16,7 +16,7 @@ import { style } from './styles/exm-chip-input-dropdown-css.js';
|
|
|
16
16
|
* @final
|
|
17
17
|
* @suppress {visibility}
|
|
18
18
|
*/
|
|
19
|
-
let
|
|
19
|
+
let ExmChipInputDropdown = class ExmChipInputDropdown extends ChipSet {
|
|
20
20
|
constructor() {
|
|
21
21
|
super();
|
|
22
22
|
this.label = '';
|
|
@@ -29,7 +29,7 @@ let ExmgChipInputDropdown = class ExmgChipInputDropdown extends ChipSet {
|
|
|
29
29
|
_onSelect(e) {
|
|
30
30
|
const clickedElement = e.target;
|
|
31
31
|
const elementType = clickedElement.tagName;
|
|
32
|
-
if (elementType === '
|
|
32
|
+
if (elementType === 'EXM-CHIP') {
|
|
33
33
|
// @ts-ignore
|
|
34
34
|
this.selectedChips = this.chips.filter((chip) => chip.selected);
|
|
35
35
|
}
|
|
@@ -131,24 +131,24 @@ let ExmgChipInputDropdown = class ExmgChipInputDropdown extends ChipSet {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
-
|
|
134
|
+
ExmChipInputDropdown.styles = [style];
|
|
135
135
|
__decorate([
|
|
136
136
|
property({ type: String })
|
|
137
|
-
],
|
|
137
|
+
], ExmChipInputDropdown.prototype, "label", void 0);
|
|
138
138
|
__decorate([
|
|
139
139
|
property({ type: String })
|
|
140
|
-
],
|
|
140
|
+
], ExmChipInputDropdown.prototype, "dropdownTitle", void 0);
|
|
141
141
|
__decorate([
|
|
142
142
|
property({ type: String })
|
|
143
|
-
],
|
|
143
|
+
], ExmChipInputDropdown.prototype, "btnAddText", void 0);
|
|
144
144
|
__decorate([
|
|
145
145
|
property({ type: Array })
|
|
146
|
-
],
|
|
146
|
+
], ExmChipInputDropdown.prototype, "selectedChips", void 0);
|
|
147
147
|
__decorate([
|
|
148
148
|
state()
|
|
149
|
-
],
|
|
150
|
-
|
|
149
|
+
], ExmChipInputDropdown.prototype, "menuOpen", void 0);
|
|
150
|
+
ExmChipInputDropdown = __decorate([
|
|
151
151
|
customElement('exm-chip-input-dropdown')
|
|
152
|
-
],
|
|
153
|
-
export {
|
|
152
|
+
], ExmChipInputDropdown);
|
|
153
|
+
export { ExmChipInputDropdown };
|
|
154
154
|
//# sourceMappingURL=exm-chip-input-dropdown.js.map
|
package/src/exm-chip-input.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChipSet } from '@material/web/chips/internal/chip-set.js';
|
|
2
2
|
declare global {
|
|
3
3
|
interface HTMLElementTagNameMap {
|
|
4
|
-
'exm-chip-input':
|
|
4
|
+
'exm-chip-input': ExmChipInput;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
@@ -9,7 +9,7 @@ declare global {
|
|
|
9
9
|
* @final
|
|
10
10
|
* @suppress {visibility}
|
|
11
11
|
*/
|
|
12
|
-
export declare class
|
|
12
|
+
export declare class ExmChipInput extends ChipSet {
|
|
13
13
|
label: string;
|
|
14
14
|
static styles: import("lit").CSSResult[];
|
|
15
15
|
protected render(): import("lit-html").TemplateResult<1>;
|
package/src/exm-chip-input.js
CHANGED
|
@@ -10,7 +10,7 @@ import { property } from 'lit/decorators.js';
|
|
|
10
10
|
* @final
|
|
11
11
|
* @suppress {visibility}
|
|
12
12
|
*/
|
|
13
|
-
let
|
|
13
|
+
let ExmChipInput = class ExmChipInput extends ChipSet {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.label = '';
|
|
@@ -47,12 +47,12 @@ let ExmgChipInput = class ExmgChipInput extends ChipSet {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
|
|
50
|
+
ExmChipInput.styles = [styles, style];
|
|
51
51
|
__decorate([
|
|
52
52
|
property({ type: String })
|
|
53
|
-
],
|
|
54
|
-
|
|
53
|
+
], ExmChipInput.prototype, "label", void 0);
|
|
54
|
+
ExmChipInput = __decorate([
|
|
55
55
|
customElement('exm-chip-input')
|
|
56
|
-
],
|
|
57
|
-
export {
|
|
56
|
+
], ExmChipInput);
|
|
57
|
+
export { ExmChipInput };
|
|
58
58
|
//# sourceMappingURL=exm-chip-input.js.map
|
package/src/exm-chip.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { getFormState, getFormValue } from '@material/web/labs/behaviors/form-as
|
|
|
4
4
|
import { ChipValidator } from './validator/chip-validator.js';
|
|
5
5
|
declare global {
|
|
6
6
|
interface HTMLElementTagNameMap {
|
|
7
|
-
'exm-chip':
|
|
7
|
+
'exm-chip': ExmChip;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
declare const CHECKED: unique symbol;
|
|
@@ -14,7 +14,7 @@ declare const FilterChipBaseClass: import("@material/web/labs/behaviors/mixin.js
|
|
|
14
14
|
* @final
|
|
15
15
|
* @suppress {visibility}
|
|
16
16
|
*/
|
|
17
|
-
export declare class
|
|
17
|
+
export declare class ExmChip extends FilterChipBaseClass {
|
|
18
18
|
static styles: import("lit").CSSResult[];
|
|
19
19
|
removable: boolean;
|
|
20
20
|
selected: boolean;
|
package/src/exm-chip.js
CHANGED
|
@@ -24,7 +24,7 @@ const FilterChipBaseClass = mixinConstraintValidation(mixinFormAssociated(mixinE
|
|
|
24
24
|
* @final
|
|
25
25
|
* @suppress {visibility}
|
|
26
26
|
*/
|
|
27
|
-
let
|
|
27
|
+
let ExmChip = class ExmChip extends FilterChipBaseClass {
|
|
28
28
|
/**
|
|
29
29
|
* Whether or not the radio is selected.
|
|
30
30
|
*/
|
|
@@ -120,30 +120,30 @@ let ExmgChip = class ExmgChip extends FilterChipBaseClass {
|
|
|
120
120
|
return this.container;
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
|
-
|
|
123
|
+
ExmChip.styles = [sharedStyles, elevatedStyles, trailingIconStyles, selectableStyles, styles];
|
|
124
124
|
__decorate([
|
|
125
125
|
property({ type: Boolean })
|
|
126
|
-
],
|
|
126
|
+
], ExmChip.prototype, "removable", void 0);
|
|
127
127
|
__decorate([
|
|
128
128
|
property({ type: Boolean, reflect: true }),
|
|
129
129
|
observer(function (selected) {
|
|
130
130
|
this.checked = selected;
|
|
131
131
|
})
|
|
132
|
-
],
|
|
132
|
+
], ExmChip.prototype, "selected", void 0);
|
|
133
133
|
__decorate([
|
|
134
134
|
property({ type: Boolean })
|
|
135
|
-
],
|
|
135
|
+
], ExmChip.prototype, "checked", null);
|
|
136
136
|
__decorate([
|
|
137
137
|
property({ type: Boolean })
|
|
138
|
-
],
|
|
138
|
+
], ExmChip.prototype, "required", void 0);
|
|
139
139
|
__decorate([
|
|
140
140
|
property()
|
|
141
|
-
],
|
|
141
|
+
], ExmChip.prototype, "value", void 0);
|
|
142
142
|
__decorate([
|
|
143
143
|
query('.container')
|
|
144
|
-
],
|
|
145
|
-
|
|
144
|
+
], ExmChip.prototype, "container", void 0);
|
|
145
|
+
ExmChip = __decorate([
|
|
146
146
|
customElement('exm-chip')
|
|
147
|
-
],
|
|
148
|
-
export {
|
|
147
|
+
], ExmChip);
|
|
148
|
+
export { ExmChip };
|
|
149
149
|
//# sourceMappingURL=exm-chip.js.map
|
|
@@ -24,7 +24,7 @@ export interface SelectionElement extends HTMLElement {
|
|
|
24
24
|
* @property({ type: Boolean }) removable = false;
|
|
25
25
|
*
|
|
26
26
|
* @property({ type: Boolean, reflect: true })
|
|
27
|
-
* @observer(function (this:
|
|
27
|
+
* @observer(function (this: ExmChip, selected: boolean) {
|
|
28
28
|
* this.checked = selected;
|
|
29
29
|
* })
|
|
30
30
|
* selected = false;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* @property({ type: Boolean }) removable = false;
|
|
15
15
|
*
|
|
16
16
|
* @property({ type: Boolean, reflect: true })
|
|
17
|
-
* @observer(function (this:
|
|
17
|
+
* @observer(function (this: ExmChip, selected: boolean) {
|
|
18
18
|
* this.checked = selected;
|
|
19
19
|
* })
|
|
20
20
|
* selected = false;
|