kr-elements 0.0.1-alpha.20 → 0.0.1-alpha.21
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.
|
@@ -17,6 +17,7 @@ class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
17
17
|
const text = this.textContent.trim();
|
|
18
18
|
const hasText = text.length > 0;
|
|
19
19
|
if (!value && !label) {
|
|
20
|
+
console.log('!value && !label');
|
|
20
21
|
if (hasNoMarkup && hasText) {
|
|
21
22
|
this.value = text;
|
|
22
23
|
this.label = text;
|
|
@@ -31,13 +32,11 @@ class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
31
32
|
this.label = text;
|
|
32
33
|
}
|
|
33
34
|
else {
|
|
34
|
-
|
|
35
|
+
this.label = value;
|
|
35
36
|
}
|
|
36
|
-
return;
|
|
37
37
|
}
|
|
38
38
|
if (!value && label) {
|
|
39
39
|
this.value = label;
|
|
40
|
-
return;
|
|
41
40
|
}
|
|
42
41
|
if (hasNoMarkup && !hasText) {
|
|
43
42
|
this.textContent = label || value;
|
|
@@ -50,7 +49,7 @@ class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
50
49
|
super.setAttribute('value', String(value));
|
|
51
50
|
}
|
|
52
51
|
get label() {
|
|
53
|
-
return this.getAttribute('
|
|
52
|
+
return this.getAttribute('label');
|
|
54
53
|
}
|
|
55
54
|
set label(value) {
|
|
56
55
|
super.setAttribute('label', String(value));
|
|
@@ -67,7 +66,9 @@ class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
67
66
|
Reflect.set(this, key, value);
|
|
68
67
|
}
|
|
69
68
|
for (const key of _a.stringAttributes) {
|
|
70
|
-
|
|
69
|
+
if (this.hasAttribute(key)) {
|
|
70
|
+
Reflect.set(this, key, this.getAttribute(key));
|
|
71
|
+
}
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
setAttribute(name, value) {
|
|
@@ -13,6 +13,7 @@ export class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
13
13
|
const text = this.textContent.trim();
|
|
14
14
|
const hasText = text.length > 0;
|
|
15
15
|
if (!value && !label) {
|
|
16
|
+
console.log('!value && !label');
|
|
16
17
|
if (hasNoMarkup && hasText) {
|
|
17
18
|
this.value = text;
|
|
18
19
|
this.label = text;
|
|
@@ -27,13 +28,11 @@ export class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
27
28
|
this.label = text;
|
|
28
29
|
}
|
|
29
30
|
else {
|
|
30
|
-
|
|
31
|
+
this.label = value;
|
|
31
32
|
}
|
|
32
|
-
return;
|
|
33
33
|
}
|
|
34
34
|
if (!value && label) {
|
|
35
35
|
this.value = label;
|
|
36
|
-
return;
|
|
37
36
|
}
|
|
38
37
|
if (hasNoMarkup && !hasText) {
|
|
39
38
|
this.textContent = label || value;
|
|
@@ -46,7 +45,7 @@ export class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
46
45
|
super.setAttribute('value', String(value));
|
|
47
46
|
}
|
|
48
47
|
get label() {
|
|
49
|
-
return this.getAttribute('
|
|
48
|
+
return this.getAttribute('label');
|
|
50
49
|
}
|
|
51
50
|
set label(value) {
|
|
52
51
|
super.setAttribute('label', String(value));
|
|
@@ -63,7 +62,9 @@ export class HTMLComboboxOptionElement extends HTMLElement {
|
|
|
63
62
|
Reflect.set(this, key, value);
|
|
64
63
|
}
|
|
65
64
|
for (const key of HTMLComboboxOptionElement.stringAttributes) {
|
|
66
|
-
|
|
65
|
+
if (this.hasAttribute(key)) {
|
|
66
|
+
Reflect.set(this, key, this.getAttribute(key));
|
|
67
|
+
}
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
setAttribute(name, value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTML.combobox.option.element.d.ts","sourceRoot":"","sources":["../../../src/combobox/HTML.combobox.option.element.ts"],"names":[],"mappings":"AAEA,qBAAa,yBAA0B,SAAQ,WAAW;;IACxD,MAAM,CAAC,iBAAiB,cAAyB;IACjD,MAAM,CAAC,gBAAgB,cAA+B;IAEtD,iBAAiB;
|
|
1
|
+
{"version":3,"file":"HTML.combobox.option.element.d.ts","sourceRoot":"","sources":["../../../src/combobox/HTML.combobox.option.element.ts"],"names":[],"mappings":"AAEA,qBAAa,yBAA0B,SAAQ,WAAW;;IACxD,MAAM,CAAC,iBAAiB,cAAyB;IACjD,MAAM,CAAC,gBAAgB,cAA+B;IAEtD,iBAAiB;IA2CjB,IAAI,KAAK,WAER;IACD,IAAI,KAAK,CAAC,KAAK,QAAA,EAEd;IAED,IAAI,KAAK,WAER;IACD,IAAI,KAAK,CAAC,KAAK,QAAA,EAEd;IAED,IAAI,QAAQ,YAEX;IACD,IAAI,QAAQ,CAAC,KAAK,SAAA,EAEjB;IAcD,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAYxC,eAAe,CAAC,IAAI,EAAE,MAAM;CAU7B"}
|