selectic 3.0.11 → 3.0.13
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/README.md +1 -0
- package/dist/selectic.common.js +5 -11
- package/dist/selectic.esm.js +6 -12
- package/package.json +4 -2
- package/src/index.tsx +7 -12
package/README.md
CHANGED
package/dist/selectic.common.js
CHANGED
|
@@ -2119,7 +2119,7 @@ let Selectic = class Selectic extends vtyx.Vue {
|
|
|
2119
2119
|
}];
|
|
2120
2120
|
}
|
|
2121
2121
|
get hasGivenValue() {
|
|
2122
|
-
const value = this.value;
|
|
2122
|
+
const value = vue.unref(this.value);
|
|
2123
2123
|
return value !== null && value !== undefined;
|
|
2124
2124
|
}
|
|
2125
2125
|
get defaultValue() {
|
|
@@ -2439,12 +2439,12 @@ let Selectic = class Selectic extends vtyx.Vue {
|
|
|
2439
2439
|
var _a, _b, _c;
|
|
2440
2440
|
this._elementsListeners = [];
|
|
2441
2441
|
this.store = new SelecticStore({
|
|
2442
|
-
options: this.options,
|
|
2443
|
-
value: this.value,
|
|
2442
|
+
options: deepClone(this.options),
|
|
2443
|
+
value: deepClone(this.value),
|
|
2444
2444
|
selectionIsExcluded: this.selectionIsExcluded,
|
|
2445
2445
|
disabled: this.disabled,
|
|
2446
2446
|
texts: this.texts,
|
|
2447
|
-
groups: this.groups,
|
|
2447
|
+
groups: deepClone(this.groups),
|
|
2448
2448
|
keepOpenWithOtherSelectic: !!this.params.keepOpenWithOtherSelectic,
|
|
2449
2449
|
params: {
|
|
2450
2450
|
multiple: ((_a = this.multiple) !== null && _a !== void 0 ? _a : false) !== false,
|
|
@@ -2611,13 +2611,7 @@ __decorate([
|
|
|
2611
2611
|
vtyx.Watch('store.state.internalValue', { deep: true })
|
|
2612
2612
|
], Selectic.prototype, "onInternalValueChange", null);
|
|
2613
2613
|
__decorate([
|
|
2614
|
-
vtyx.
|
|
2615
|
-
vtyx.Emit('change'),
|
|
2616
|
-
vtyx.Emit('open'),
|
|
2617
|
-
vtyx.Emit('focus'),
|
|
2618
|
-
vtyx.Emit('close'),
|
|
2619
|
-
vtyx.Emit('blur'),
|
|
2620
|
-
vtyx.Emit('item:click')
|
|
2614
|
+
vtyx.Emits(['input', 'change', 'open', 'focus', 'close', 'blur', 'item:click'])
|
|
2621
2615
|
], Selectic.prototype, "render", null);
|
|
2622
2616
|
Selectic = __decorate([
|
|
2623
2617
|
vtyx.Component
|
package/dist/selectic.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Prop, Watch, Component, Vue, h,
|
|
1
|
+
import { Prop, Watch, Component, Vue, h, Emits } from 'vtyx';
|
|
2
2
|
import { unref, reactive, computed, watch } from 'vue';
|
|
3
3
|
|
|
4
4
|
function styleInject(css, ref) {
|
|
@@ -2115,7 +2115,7 @@ let Selectic = class Selectic extends Vue {
|
|
|
2115
2115
|
}];
|
|
2116
2116
|
}
|
|
2117
2117
|
get hasGivenValue() {
|
|
2118
|
-
const value = this.value;
|
|
2118
|
+
const value = unref(this.value);
|
|
2119
2119
|
return value !== null && value !== undefined;
|
|
2120
2120
|
}
|
|
2121
2121
|
get defaultValue() {
|
|
@@ -2435,12 +2435,12 @@ let Selectic = class Selectic extends Vue {
|
|
|
2435
2435
|
var _a, _b, _c;
|
|
2436
2436
|
this._elementsListeners = [];
|
|
2437
2437
|
this.store = new SelecticStore({
|
|
2438
|
-
options: this.options,
|
|
2439
|
-
value: this.value,
|
|
2438
|
+
options: deepClone(this.options),
|
|
2439
|
+
value: deepClone(this.value),
|
|
2440
2440
|
selectionIsExcluded: this.selectionIsExcluded,
|
|
2441
2441
|
disabled: this.disabled,
|
|
2442
2442
|
texts: this.texts,
|
|
2443
|
-
groups: this.groups,
|
|
2443
|
+
groups: deepClone(this.groups),
|
|
2444
2444
|
keepOpenWithOtherSelectic: !!this.params.keepOpenWithOtherSelectic,
|
|
2445
2445
|
params: {
|
|
2446
2446
|
multiple: ((_a = this.multiple) !== null && _a !== void 0 ? _a : false) !== false,
|
|
@@ -2607,13 +2607,7 @@ __decorate([
|
|
|
2607
2607
|
Watch('store.state.internalValue', { deep: true })
|
|
2608
2608
|
], Selectic.prototype, "onInternalValueChange", null);
|
|
2609
2609
|
__decorate([
|
|
2610
|
-
|
|
2611
|
-
Emit('change'),
|
|
2612
|
-
Emit('open'),
|
|
2613
|
-
Emit('focus'),
|
|
2614
|
-
Emit('close'),
|
|
2615
|
-
Emit('blur'),
|
|
2616
|
-
Emit('item:click')
|
|
2610
|
+
Emits(['input', 'change', 'open', 'focus', 'close', 'blur', 'item:click'])
|
|
2617
2611
|
], Selectic.prototype, "render", null);
|
|
2618
2612
|
Selectic = __decorate([
|
|
2619
2613
|
Component
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "selectic",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.13",
|
|
4
4
|
"description": "Smart Select for VueJS 3.x",
|
|
5
5
|
"main": "dist/selectic.common.js",
|
|
6
6
|
"module": "dist/selectic.esm.js",
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
"select",
|
|
20
20
|
"multiselect",
|
|
21
21
|
"multi-select",
|
|
22
|
+
"multi-select",
|
|
22
23
|
"dynamic select",
|
|
24
|
+
"smart select",
|
|
23
25
|
"vue",
|
|
24
26
|
"vue.js",
|
|
25
27
|
"vueJS",
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
"test": "npm run build && tape test/**/*.spec.js"
|
|
37
39
|
},
|
|
38
40
|
"dependencies": {
|
|
39
|
-
"vtyx": "4.0.
|
|
41
|
+
"vtyx": "4.0.4"
|
|
40
42
|
},
|
|
41
43
|
"devDependencies": {
|
|
42
44
|
"@babel/types": "^7.16.7",
|
package/src/index.tsx
CHANGED
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
* close [component]: triggered when the list closes.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
import {Vue, Component,
|
|
21
|
+
import {Vue, Component, Emits, Prop, Watch, h} from 'vtyx';
|
|
22
|
+
import { unref } from 'vue';
|
|
22
23
|
import './css/selectic.css';
|
|
23
24
|
|
|
24
25
|
import { deepClone } from './tools';
|
|
@@ -373,7 +374,7 @@ export default class Selectic extends Vue<Props> {
|
|
|
373
374
|
}
|
|
374
375
|
|
|
375
376
|
get hasGivenValue() {
|
|
376
|
-
const value = this.value;
|
|
377
|
+
const value = unref(this.value);
|
|
377
378
|
|
|
378
379
|
return value !== null && value !== undefined;
|
|
379
380
|
}
|
|
@@ -781,12 +782,12 @@ export default class Selectic extends Vue<Props> {
|
|
|
781
782
|
this._elementsListeners = [];
|
|
782
783
|
|
|
783
784
|
this.store = new Store({
|
|
784
|
-
options: this.options,
|
|
785
|
-
value: this.value,
|
|
785
|
+
options: deepClone(this.options),
|
|
786
|
+
value: deepClone(this.value),
|
|
786
787
|
selectionIsExcluded: this.selectionIsExcluded,
|
|
787
788
|
disabled: this.disabled,
|
|
788
789
|
texts: this.texts,
|
|
789
|
-
groups: this.groups,
|
|
790
|
+
groups: deepClone(this.groups),
|
|
790
791
|
keepOpenWithOtherSelectic: !!this.params.keepOpenWithOtherSelectic,
|
|
791
792
|
params: {
|
|
792
793
|
multiple: (this.multiple ?? false) !== false,
|
|
@@ -859,13 +860,7 @@ export default class Selectic extends Vue<Props> {
|
|
|
859
860
|
|
|
860
861
|
/* }}} */
|
|
861
862
|
|
|
862
|
-
@
|
|
863
|
-
@Emit('change')
|
|
864
|
-
@Emit('open')
|
|
865
|
-
@Emit('focus')
|
|
866
|
-
@Emit('close')
|
|
867
|
-
@Emit('blur')
|
|
868
|
-
@Emit('item:click')
|
|
863
|
+
@Emits(['input', 'change', 'open', 'focus', 'close', 'blur', 'item:click'])
|
|
869
864
|
public render() {
|
|
870
865
|
const id = this.id || undefined;
|
|
871
866
|
const store = this.store;
|