selectic 3.0.7 → 3.0.8
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/dist/selectic.common.js +17 -17
- package/dist/selectic.esm.js +17 -17
- package/package.json +1 -1
- package/src/ExtendedList.tsx +2 -2
- package/src/Filter.tsx +1 -1
- package/src/List.tsx +1 -1
- package/src/MainInput.tsx +1 -1
- package/src/Store.tsx +6 -6
- package/src/index.tsx +6 -6
- package/types/ExtendedList.d.ts +1 -1
- package/types/Filter.d.ts +1 -1
- package/types/index.d.ts +1 -1
package/dist/selectic.common.js
CHANGED
|
@@ -211,17 +211,17 @@ class SelecticStore {
|
|
|
211
211
|
this.commit('isOpen', false);
|
|
212
212
|
this.buildAllOptions(true);
|
|
213
213
|
this.buildSelectedOptions();
|
|
214
|
-
});
|
|
214
|
+
}, { deep: true });
|
|
215
215
|
vue.watch(() => [this.listOptions, this.elementOptions], () => {
|
|
216
216
|
/* TODO: transform allOptions as a computed properties and this
|
|
217
217
|
* watcher become useless */
|
|
218
218
|
this.buildAllOptions(true);
|
|
219
|
-
});
|
|
219
|
+
}, { deep: true });
|
|
220
220
|
vue.watch(() => this.props.value, () => {
|
|
221
221
|
var _a;
|
|
222
222
|
const value = (_a = this.props.value) !== null && _a !== void 0 ? _a : null;
|
|
223
223
|
this.commit('internalValue', value);
|
|
224
|
-
});
|
|
224
|
+
}, { deep: true });
|
|
225
225
|
vue.watch(() => this.props.selectionIsExcluded, () => {
|
|
226
226
|
this.commit('selectionIsExcluded', this.props.selectionIsExcluded);
|
|
227
227
|
});
|
|
@@ -237,14 +237,14 @@ class SelecticStore {
|
|
|
237
237
|
areAllSelected = this.state.filteredOptions.every((item) => !!(+item.selected ^ selectionIsExcluded));
|
|
238
238
|
}
|
|
239
239
|
this.state.status.areAllSelected = areAllSelected;
|
|
240
|
-
});
|
|
240
|
+
}, { deep: true });
|
|
241
241
|
vue.watch(() => this.state.internalValue, () => {
|
|
242
242
|
this.buildSelectedOptions();
|
|
243
|
-
});
|
|
243
|
+
}, { deep: true });
|
|
244
244
|
vue.watch(() => this.state.allOptions, () => {
|
|
245
245
|
this.checkAutoSelect();
|
|
246
246
|
this.checkAutoDisabled();
|
|
247
|
-
});
|
|
247
|
+
}, { deep: true });
|
|
248
248
|
vue.watch(() => this.state.totalAllOptions, () => {
|
|
249
249
|
this.checkHideFilter();
|
|
250
250
|
});
|
|
@@ -1393,7 +1393,7 @@ __decorate$4([
|
|
|
1393
1393
|
vtyx.Prop({ default: '' })
|
|
1394
1394
|
], MainInput.prototype, "id", void 0);
|
|
1395
1395
|
__decorate$4([
|
|
1396
|
-
vtyx.Watch('store.state.internalValue')
|
|
1396
|
+
vtyx.Watch('store.state.internalValue', { deep: true })
|
|
1397
1397
|
], MainInput.prototype, "onInternalChange", null);
|
|
1398
1398
|
MainInput = __decorate$4([
|
|
1399
1399
|
vtyx.Component
|
|
@@ -1497,7 +1497,7 @@ let FilterPanel = class FilterPanel extends vtyx.Vue {
|
|
|
1497
1497
|
document.addEventListener('keypress', this.onKeyPressed);
|
|
1498
1498
|
this.getFocus();
|
|
1499
1499
|
}
|
|
1500
|
-
|
|
1500
|
+
unmounted() {
|
|
1501
1501
|
document.removeEventListener('keypress', this.onKeyPressed);
|
|
1502
1502
|
}
|
|
1503
1503
|
/* }}} */
|
|
@@ -1757,7 +1757,7 @@ __decorate$2([
|
|
|
1757
1757
|
vtyx.Watch('store.state.offsetItem')
|
|
1758
1758
|
], List.prototype, "onOffsetChange", null);
|
|
1759
1759
|
__decorate$2([
|
|
1760
|
-
vtyx.Watch('filteredOptions')
|
|
1760
|
+
vtyx.Watch('filteredOptions', { deep: true })
|
|
1761
1761
|
], List.prototype, "onFilteredOptionsChange", null);
|
|
1762
1762
|
__decorate$2([
|
|
1763
1763
|
vtyx.Watch('groupId')
|
|
@@ -1928,7 +1928,7 @@ let ExtendedList = class ExtendedList extends vtyx.Vue {
|
|
|
1928
1928
|
document.body.addEventListener('keydown', this.onKeyDown);
|
|
1929
1929
|
this.computeListSize();
|
|
1930
1930
|
}
|
|
1931
|
-
|
|
1931
|
+
unmounted() {
|
|
1932
1932
|
document.body.removeEventListener('keydown', this.onKeyDown);
|
|
1933
1933
|
/* force the element to be removed from DOM */
|
|
1934
1934
|
if (this.$el.parentNode) {
|
|
@@ -1973,7 +1973,7 @@ __decorate$1([
|
|
|
1973
1973
|
vtyx.Prop({ default: 300 })
|
|
1974
1974
|
], ExtendedList.prototype, "width", void 0);
|
|
1975
1975
|
__decorate$1([
|
|
1976
|
-
vtyx.Watch('store.state.filteredOptions')
|
|
1976
|
+
vtyx.Watch('store.state.filteredOptions', { deep: true })
|
|
1977
1977
|
], ExtendedList.prototype, "onFilteredOptionsChange", null);
|
|
1978
1978
|
__decorate$1([
|
|
1979
1979
|
vtyx.Watch('store.state.hideFilter')
|
|
@@ -2462,7 +2462,7 @@ let Selectic = class Selectic extends vtyx.Vue {
|
|
|
2462
2462
|
// }
|
|
2463
2463
|
// this.store.childOptions = options;
|
|
2464
2464
|
}
|
|
2465
|
-
|
|
2465
|
+
beforeUnmount() {
|
|
2466
2466
|
this.removeListeners();
|
|
2467
2467
|
}
|
|
2468
2468
|
/* }}} */
|
|
@@ -2538,22 +2538,22 @@ __decorate([
|
|
|
2538
2538
|
vtyx.Prop()
|
|
2539
2539
|
], Selectic.prototype, "_getMethods", void 0);
|
|
2540
2540
|
__decorate([
|
|
2541
|
-
vtyx.Watch('value')
|
|
2541
|
+
vtyx.Watch('value', { deep: true })
|
|
2542
2542
|
], Selectic.prototype, "onValueChange", null);
|
|
2543
2543
|
__decorate([
|
|
2544
2544
|
vtyx.Watch('selectionIsExcluded')
|
|
2545
2545
|
], Selectic.prototype, "onExcludedChange", null);
|
|
2546
2546
|
__decorate([
|
|
2547
|
-
vtyx.Watch('options')
|
|
2547
|
+
vtyx.Watch('options', { deep: true })
|
|
2548
2548
|
], Selectic.prototype, "onOptionsChange", null);
|
|
2549
2549
|
__decorate([
|
|
2550
|
-
vtyx.Watch('texts')
|
|
2550
|
+
vtyx.Watch('texts', { deep: true })
|
|
2551
2551
|
], Selectic.prototype, "onTextsChange", null);
|
|
2552
2552
|
__decorate([
|
|
2553
2553
|
vtyx.Watch('disabled')
|
|
2554
2554
|
], Selectic.prototype, "onDisabledChange", null);
|
|
2555
2555
|
__decorate([
|
|
2556
|
-
vtyx.Watch('groups')
|
|
2556
|
+
vtyx.Watch('groups', { deep: true })
|
|
2557
2557
|
], Selectic.prototype, "onGroupsChanged", null);
|
|
2558
2558
|
__decorate([
|
|
2559
2559
|
vtyx.Watch('placeholder')
|
|
@@ -2565,7 +2565,7 @@ __decorate([
|
|
|
2565
2565
|
vtyx.Watch('isFocused')
|
|
2566
2566
|
], Selectic.prototype, "onFocusChanged", null);
|
|
2567
2567
|
__decorate([
|
|
2568
|
-
vtyx.Watch('store.state.internalValue')
|
|
2568
|
+
vtyx.Watch('store.state.internalValue', { deep: true })
|
|
2569
2569
|
], Selectic.prototype, "onInternalValueChange", null);
|
|
2570
2570
|
__decorate([
|
|
2571
2571
|
vtyx.Emit('input'),
|
package/dist/selectic.esm.js
CHANGED
|
@@ -207,17 +207,17 @@ class SelecticStore {
|
|
|
207
207
|
this.commit('isOpen', false);
|
|
208
208
|
this.buildAllOptions(true);
|
|
209
209
|
this.buildSelectedOptions();
|
|
210
|
-
});
|
|
210
|
+
}, { deep: true });
|
|
211
211
|
watch(() => [this.listOptions, this.elementOptions], () => {
|
|
212
212
|
/* TODO: transform allOptions as a computed properties and this
|
|
213
213
|
* watcher become useless */
|
|
214
214
|
this.buildAllOptions(true);
|
|
215
|
-
});
|
|
215
|
+
}, { deep: true });
|
|
216
216
|
watch(() => this.props.value, () => {
|
|
217
217
|
var _a;
|
|
218
218
|
const value = (_a = this.props.value) !== null && _a !== void 0 ? _a : null;
|
|
219
219
|
this.commit('internalValue', value);
|
|
220
|
-
});
|
|
220
|
+
}, { deep: true });
|
|
221
221
|
watch(() => this.props.selectionIsExcluded, () => {
|
|
222
222
|
this.commit('selectionIsExcluded', this.props.selectionIsExcluded);
|
|
223
223
|
});
|
|
@@ -233,14 +233,14 @@ class SelecticStore {
|
|
|
233
233
|
areAllSelected = this.state.filteredOptions.every((item) => !!(+item.selected ^ selectionIsExcluded));
|
|
234
234
|
}
|
|
235
235
|
this.state.status.areAllSelected = areAllSelected;
|
|
236
|
-
});
|
|
236
|
+
}, { deep: true });
|
|
237
237
|
watch(() => this.state.internalValue, () => {
|
|
238
238
|
this.buildSelectedOptions();
|
|
239
|
-
});
|
|
239
|
+
}, { deep: true });
|
|
240
240
|
watch(() => this.state.allOptions, () => {
|
|
241
241
|
this.checkAutoSelect();
|
|
242
242
|
this.checkAutoDisabled();
|
|
243
|
-
});
|
|
243
|
+
}, { deep: true });
|
|
244
244
|
watch(() => this.state.totalAllOptions, () => {
|
|
245
245
|
this.checkHideFilter();
|
|
246
246
|
});
|
|
@@ -1389,7 +1389,7 @@ __decorate$4([
|
|
|
1389
1389
|
Prop({ default: '' })
|
|
1390
1390
|
], MainInput.prototype, "id", void 0);
|
|
1391
1391
|
__decorate$4([
|
|
1392
|
-
Watch('store.state.internalValue')
|
|
1392
|
+
Watch('store.state.internalValue', { deep: true })
|
|
1393
1393
|
], MainInput.prototype, "onInternalChange", null);
|
|
1394
1394
|
MainInput = __decorate$4([
|
|
1395
1395
|
Component
|
|
@@ -1493,7 +1493,7 @@ let FilterPanel = class FilterPanel extends Vue {
|
|
|
1493
1493
|
document.addEventListener('keypress', this.onKeyPressed);
|
|
1494
1494
|
this.getFocus();
|
|
1495
1495
|
}
|
|
1496
|
-
|
|
1496
|
+
unmounted() {
|
|
1497
1497
|
document.removeEventListener('keypress', this.onKeyPressed);
|
|
1498
1498
|
}
|
|
1499
1499
|
/* }}} */
|
|
@@ -1753,7 +1753,7 @@ __decorate$2([
|
|
|
1753
1753
|
Watch('store.state.offsetItem')
|
|
1754
1754
|
], List.prototype, "onOffsetChange", null);
|
|
1755
1755
|
__decorate$2([
|
|
1756
|
-
Watch('filteredOptions')
|
|
1756
|
+
Watch('filteredOptions', { deep: true })
|
|
1757
1757
|
], List.prototype, "onFilteredOptionsChange", null);
|
|
1758
1758
|
__decorate$2([
|
|
1759
1759
|
Watch('groupId')
|
|
@@ -1924,7 +1924,7 @@ let ExtendedList = class ExtendedList extends Vue {
|
|
|
1924
1924
|
document.body.addEventListener('keydown', this.onKeyDown);
|
|
1925
1925
|
this.computeListSize();
|
|
1926
1926
|
}
|
|
1927
|
-
|
|
1927
|
+
unmounted() {
|
|
1928
1928
|
document.body.removeEventListener('keydown', this.onKeyDown);
|
|
1929
1929
|
/* force the element to be removed from DOM */
|
|
1930
1930
|
if (this.$el.parentNode) {
|
|
@@ -1969,7 +1969,7 @@ __decorate$1([
|
|
|
1969
1969
|
Prop({ default: 300 })
|
|
1970
1970
|
], ExtendedList.prototype, "width", void 0);
|
|
1971
1971
|
__decorate$1([
|
|
1972
|
-
Watch('store.state.filteredOptions')
|
|
1972
|
+
Watch('store.state.filteredOptions', { deep: true })
|
|
1973
1973
|
], ExtendedList.prototype, "onFilteredOptionsChange", null);
|
|
1974
1974
|
__decorate$1([
|
|
1975
1975
|
Watch('store.state.hideFilter')
|
|
@@ -2458,7 +2458,7 @@ let Selectic = class Selectic extends Vue {
|
|
|
2458
2458
|
// }
|
|
2459
2459
|
// this.store.childOptions = options;
|
|
2460
2460
|
}
|
|
2461
|
-
|
|
2461
|
+
beforeUnmount() {
|
|
2462
2462
|
this.removeListeners();
|
|
2463
2463
|
}
|
|
2464
2464
|
/* }}} */
|
|
@@ -2534,22 +2534,22 @@ __decorate([
|
|
|
2534
2534
|
Prop()
|
|
2535
2535
|
], Selectic.prototype, "_getMethods", void 0);
|
|
2536
2536
|
__decorate([
|
|
2537
|
-
Watch('value')
|
|
2537
|
+
Watch('value', { deep: true })
|
|
2538
2538
|
], Selectic.prototype, "onValueChange", null);
|
|
2539
2539
|
__decorate([
|
|
2540
2540
|
Watch('selectionIsExcluded')
|
|
2541
2541
|
], Selectic.prototype, "onExcludedChange", null);
|
|
2542
2542
|
__decorate([
|
|
2543
|
-
Watch('options')
|
|
2543
|
+
Watch('options', { deep: true })
|
|
2544
2544
|
], Selectic.prototype, "onOptionsChange", null);
|
|
2545
2545
|
__decorate([
|
|
2546
|
-
Watch('texts')
|
|
2546
|
+
Watch('texts', { deep: true })
|
|
2547
2547
|
], Selectic.prototype, "onTextsChange", null);
|
|
2548
2548
|
__decorate([
|
|
2549
2549
|
Watch('disabled')
|
|
2550
2550
|
], Selectic.prototype, "onDisabledChange", null);
|
|
2551
2551
|
__decorate([
|
|
2552
|
-
Watch('groups')
|
|
2552
|
+
Watch('groups', { deep: true })
|
|
2553
2553
|
], Selectic.prototype, "onGroupsChanged", null);
|
|
2554
2554
|
__decorate([
|
|
2555
2555
|
Watch('placeholder')
|
|
@@ -2561,7 +2561,7 @@ __decorate([
|
|
|
2561
2561
|
Watch('isFocused')
|
|
2562
2562
|
], Selectic.prototype, "onFocusChanged", null);
|
|
2563
2563
|
__decorate([
|
|
2564
|
-
Watch('store.state.internalValue')
|
|
2564
|
+
Watch('store.state.internalValue', { deep: true })
|
|
2565
2565
|
], Selectic.prototype, "onInternalValueChange", null);
|
|
2566
2566
|
__decorate([
|
|
2567
2567
|
Emit('input'),
|
package/package.json
CHANGED
package/src/ExtendedList.tsx
CHANGED
|
@@ -192,7 +192,7 @@ export default class ExtendedList extends Vue<Props> {
|
|
|
192
192
|
/* }}} */
|
|
193
193
|
/* {{{ watch */
|
|
194
194
|
|
|
195
|
-
@Watch('store.state.filteredOptions')
|
|
195
|
+
@Watch('store.state.filteredOptions', { deep: true })
|
|
196
196
|
public onFilteredOptionsChange() {
|
|
197
197
|
this.$nextTick(this.computeListSize);
|
|
198
198
|
}
|
|
@@ -228,7 +228,7 @@ export default class ExtendedList extends Vue<Props> {
|
|
|
228
228
|
this.computeListSize();
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
public
|
|
231
|
+
public unmounted() {
|
|
232
232
|
document.body.removeEventListener('keydown', this.onKeyDown);
|
|
233
233
|
|
|
234
234
|
/* force the element to be removed from DOM */
|
package/src/Filter.tsx
CHANGED
package/src/List.tsx
CHANGED
package/src/MainInput.tsx
CHANGED
package/src/Store.tsx
CHANGED
|
@@ -567,18 +567,18 @@ export default class SelecticStore {
|
|
|
567
567
|
this.commit('isOpen', false);
|
|
568
568
|
this.buildAllOptions(true);
|
|
569
569
|
this.buildSelectedOptions();
|
|
570
|
-
});
|
|
570
|
+
}, { deep: true });
|
|
571
571
|
|
|
572
572
|
watch(() => [this.listOptions, this.elementOptions], () => {
|
|
573
573
|
/* TODO: transform allOptions as a computed properties and this
|
|
574
574
|
* watcher become useless */
|
|
575
575
|
this.buildAllOptions(true);
|
|
576
|
-
});
|
|
576
|
+
}, { deep: true });
|
|
577
577
|
|
|
578
578
|
watch(() => this.props.value, () => {
|
|
579
579
|
const value = this.props.value ?? null;
|
|
580
580
|
this.commit('internalValue', value);
|
|
581
|
-
});
|
|
581
|
+
}, { deep: true });
|
|
582
582
|
|
|
583
583
|
watch(() => this.props.selectionIsExcluded, () => {
|
|
584
584
|
this.commit('selectionIsExcluded', this.props.selectionIsExcluded);
|
|
@@ -600,16 +600,16 @@ export default class SelecticStore {
|
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
this.state.status.areAllSelected = areAllSelected;
|
|
603
|
-
});
|
|
603
|
+
}, { deep: true });
|
|
604
604
|
|
|
605
605
|
watch(() => this.state.internalValue, () => {
|
|
606
606
|
this.buildSelectedOptions();
|
|
607
|
-
});
|
|
607
|
+
}, { deep: true });
|
|
608
608
|
|
|
609
609
|
watch(() => this.state.allOptions, () => {
|
|
610
610
|
this.checkAutoSelect();
|
|
611
611
|
this.checkAutoDisabled();
|
|
612
|
-
});
|
|
612
|
+
}, { deep: true });
|
|
613
613
|
|
|
614
614
|
watch(() => this.state.totalAllOptions, () => {
|
|
615
615
|
this.checkHideFilter();
|
package/src/index.tsx
CHANGED
|
@@ -537,7 +537,7 @@ export default class Selectic extends Vue<Props> {
|
|
|
537
537
|
/* }}} */
|
|
538
538
|
/* {{{ watch */
|
|
539
539
|
|
|
540
|
-
@Watch('value')
|
|
540
|
+
@Watch('value', { deep: true })
|
|
541
541
|
public onValueChange() {
|
|
542
542
|
const currentValue = this.store.state.internalValue;
|
|
543
543
|
const newValue = this.value ?? null;
|
|
@@ -556,12 +556,12 @@ export default class Selectic extends Vue<Props> {
|
|
|
556
556
|
this.store.props.selectionIsExcluded = this.selectionIsExcluded;
|
|
557
557
|
}
|
|
558
558
|
|
|
559
|
-
@Watch('options')
|
|
559
|
+
@Watch('options', { deep: true })
|
|
560
560
|
public onOptionsChange() {
|
|
561
561
|
this.store.props.options = Array.from(this.options);
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
@Watch('texts')
|
|
564
|
+
@Watch('texts', { deep: true })
|
|
565
565
|
public onTextsChange() {
|
|
566
566
|
const texts = this.texts;
|
|
567
567
|
|
|
@@ -575,7 +575,7 @@ export default class Selectic extends Vue<Props> {
|
|
|
575
575
|
this.store.props.disabled = this.disabled;
|
|
576
576
|
}
|
|
577
577
|
|
|
578
|
-
@Watch('groups')
|
|
578
|
+
@Watch('groups', { deep: true })
|
|
579
579
|
public onGroupsChanged() {
|
|
580
580
|
this.store.changeGroups(this.groups);
|
|
581
581
|
}
|
|
@@ -595,7 +595,7 @@ export default class Selectic extends Vue<Props> {
|
|
|
595
595
|
this.focusToggled();
|
|
596
596
|
}
|
|
597
597
|
|
|
598
|
-
@Watch('store.state.internalValue')
|
|
598
|
+
@Watch('store.state.internalValue', { deep: true })
|
|
599
599
|
public onInternalValueChange() {
|
|
600
600
|
const oldValue = this._oldValue;
|
|
601
601
|
const value = this.getValue();
|
|
@@ -851,7 +851,7 @@ export default class Selectic extends Vue<Props> {
|
|
|
851
851
|
// this.store.childOptions = options;
|
|
852
852
|
}
|
|
853
853
|
|
|
854
|
-
public
|
|
854
|
+
public beforeUnmount() {
|
|
855
855
|
this.removeListeners();
|
|
856
856
|
}
|
|
857
857
|
|
package/types/ExtendedList.d.ts
CHANGED
package/types/Filter.d.ts
CHANGED