@umbraco-ui/uui-combobox 1.6.0 → 1.7.0
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/lib/index.js +8 -25
- package/package.json +10 -10
package/lib/index.js
CHANGED
|
@@ -7,25 +7,12 @@ import { LitElement, html, css } from 'lit';
|
|
|
7
7
|
import { property, query, queryAssignedElements, state } from 'lit/decorators.js';
|
|
8
8
|
import { UUIEvent } from '@umbraco-ui/uui-base/lib/events';
|
|
9
9
|
|
|
10
|
-
var __defProp$1 = Object.defineProperty;
|
|
11
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
12
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
13
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
14
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15
|
-
var __spreadValues = (a, b) => {
|
|
16
|
-
for (var prop in b || (b = {}))
|
|
17
|
-
if (__hasOwnProp.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
if (__getOwnPropSymbols)
|
|
20
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
21
|
-
if (__propIsEnum.call(b, prop))
|
|
22
|
-
__defNormalProp(a, prop, b[prop]);
|
|
23
|
-
}
|
|
24
|
-
return a;
|
|
25
|
-
};
|
|
26
10
|
class UUIComboboxEvent extends UUIEvent {
|
|
27
11
|
constructor(evName, eventInit = {}) {
|
|
28
|
-
super(evName,
|
|
12
|
+
super(evName, {
|
|
13
|
+
...{ bubbles: true },
|
|
14
|
+
...eventInit
|
|
15
|
+
});
|
|
29
16
|
}
|
|
30
17
|
}
|
|
31
18
|
UUIComboboxEvent.SEARCH = "search";
|
|
@@ -82,8 +69,7 @@ let UUIComboboxElement = class extends FormControlMixin(LitElement) {
|
|
|
82
69
|
});
|
|
83
70
|
__privateAdd(this, _onMouseDown, () => requestAnimationFrame(() => this._inputElement.focus()));
|
|
84
71
|
__privateAdd(this, _onBlur, () => requestAnimationFrame(() => {
|
|
85
|
-
|
|
86
|
-
if (!((_a = this.shadowRoot) == null ? void 0 : _a.activeElement)) {
|
|
72
|
+
if (!this.shadowRoot?.activeElement) {
|
|
87
73
|
__privateGet(this, _onClose).call(this);
|
|
88
74
|
}
|
|
89
75
|
}));
|
|
@@ -95,14 +81,12 @@ let UUIComboboxElement = class extends FormControlMixin(LitElement) {
|
|
|
95
81
|
__privateGet(this, _onOpen).call(this);
|
|
96
82
|
});
|
|
97
83
|
__privateAdd(this, _onSlotChange, () => {
|
|
98
|
-
|
|
99
|
-
if (this.value && this.value !== ((_a = __privateGet(this, _comboboxList)) == null ? void 0 : _a.value)) {
|
|
84
|
+
if (this.value && this.value !== __privateGet(this, _comboboxList)?.value) {
|
|
100
85
|
__privateMethod(this, _updateValue, updateValue_fn).call(this, this.value);
|
|
101
86
|
}
|
|
102
87
|
});
|
|
103
88
|
__privateAdd(this, _onChange, () => {
|
|
104
|
-
|
|
105
|
-
this.value = ((_a = __privateGet(this, _comboboxList)) == null ? void 0 : _a.value) || "";
|
|
89
|
+
this.value = __privateGet(this, _comboboxList)?.value || "";
|
|
106
90
|
this.search = this.value ? this.search : "";
|
|
107
91
|
__privateGet(this, _onClose).call(this);
|
|
108
92
|
this.dispatchEvent(new UUIComboboxEvent(UUIComboboxEvent.CHANGE));
|
|
@@ -247,8 +231,7 @@ let UUIComboboxElement = class extends FormControlMixin(LitElement) {
|
|
|
247
231
|
__privateGet(this, _phoneMediaQuery).removeEventListener("change", __privateGet(this, _onPhoneChange));
|
|
248
232
|
}
|
|
249
233
|
async firstUpdated() {
|
|
250
|
-
|
|
251
|
-
const list = (_a = this._comboboxListElements) == null ? void 0 : _a[0];
|
|
234
|
+
const list = this._comboboxListElements?.[0];
|
|
252
235
|
if (list) {
|
|
253
236
|
__privateSet(this, _comboboxList, list);
|
|
254
237
|
__privateGet(this, _comboboxList).for = this;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-combobox",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"custom-elements.json"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@umbraco-ui/uui-base": "1.
|
|
34
|
-
"@umbraco-ui/uui-button": "1.
|
|
35
|
-
"@umbraco-ui/uui-combobox-list": "1.
|
|
36
|
-
"@umbraco-ui/uui-icon": "1.
|
|
37
|
-
"@umbraco-ui/uui-popover-container": "1.
|
|
38
|
-
"@umbraco-ui/uui-scroll-container": "1.
|
|
39
|
-
"@umbraco-ui/uui-symbol-expand": "1.
|
|
33
|
+
"@umbraco-ui/uui-base": "1.7.0",
|
|
34
|
+
"@umbraco-ui/uui-button": "1.7.0",
|
|
35
|
+
"@umbraco-ui/uui-combobox-list": "1.7.0",
|
|
36
|
+
"@umbraco-ui/uui-icon": "1.7.0",
|
|
37
|
+
"@umbraco-ui/uui-popover-container": "1.7.0",
|
|
38
|
+
"@umbraco-ui/uui-scroll-container": "1.7.0",
|
|
39
|
+
"@umbraco-ui/uui-symbol-expand": "1.7.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
|
-
"build": "npm run analyze && tsc --build
|
|
42
|
+
"build": "npm run analyze && tsc --build && rollup -c rollup.config.js",
|
|
43
43
|
"clean": "tsc --build --clean && rimraf -g dist lib/*.js lib/**/*.js *.tgz lib/**/*.d.ts custom-elements.json",
|
|
44
44
|
"analyze": "web-component-analyzer **/*.element.ts --outFile custom-elements.json"
|
|
45
45
|
},
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-combobox",
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "1f139dc2b4ed9ba7b9fb1af5e934589d7c4d8f06"
|
|
51
51
|
}
|