@avakhula/ui 0.0.253 → 0.0.255
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/index.js +19 -10
- package/dist/index.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +16 -12
- package/src/components/Form/Toggle/Toggle.vue +1 -0
- package/src/components/TreeSelect/Select.vue +23 -7
- package/src/components/TreeSelect/scss/select.scss +7 -0
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name="email"
|
|
6
|
-
@input="val => console.log(val)"
|
|
7
|
-
@blur="val => console.log(val)"
|
|
8
|
-
/>
|
|
2
|
+
<div class="test">
|
|
3
|
+
<limit-selector />
|
|
4
|
+
</div>
|
|
9
5
|
</template>
|
|
10
6
|
|
|
11
7
|
<script>
|
|
12
|
-
import
|
|
13
|
-
|
|
8
|
+
import LimitSelector from "./components/Pagination/LimitSelector.vue"
|
|
14
9
|
export default {
|
|
15
10
|
components: {
|
|
16
|
-
|
|
17
|
-
}
|
|
11
|
+
LimitSelector
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<style lang="scss">
|
|
18
|
+
.test {
|
|
19
|
+
height: 100vh;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: end;
|
|
18
22
|
}
|
|
19
|
-
</
|
|
23
|
+
</style>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
:vertical="vertical"
|
|
11
11
|
ref="dropdown"
|
|
12
12
|
@close="onClose"
|
|
13
|
-
@open="
|
|
13
|
+
@open="onOpen"
|
|
14
14
|
>
|
|
15
15
|
<template v-if="hasTrigger" v-slot:trigger>
|
|
16
16
|
<slot v-bind:selected-count="selectedKeys.length" name="trigger"></slot>
|
|
@@ -242,6 +242,7 @@
|
|
|
242
242
|
</template>
|
|
243
243
|
|
|
244
244
|
<script>
|
|
245
|
+
// <!-- TODO: use constants for vertical position -->
|
|
245
246
|
import IbInput from "../Form/Input/Input.vue";
|
|
246
247
|
import Option from "./Option.vue";
|
|
247
248
|
import Mark from "mark.js/dist/mark.es6.min";
|
|
@@ -374,9 +375,10 @@ export default {
|
|
|
374
375
|
type: Boolean,
|
|
375
376
|
default: false,
|
|
376
377
|
},
|
|
377
|
-
vertical: {
|
|
378
|
-
|
|
379
|
-
|
|
378
|
+
// vertical: {
|
|
379
|
+
// type: String,
|
|
380
|
+
// default: "bottom"
|
|
381
|
+
// },
|
|
380
382
|
emptyMessage: {
|
|
381
383
|
type: String,
|
|
382
384
|
default: "",
|
|
@@ -515,6 +517,7 @@ export default {
|
|
|
515
517
|
actualBookmarkedOptions: {},
|
|
516
518
|
selected: [],
|
|
517
519
|
isOpen: false,
|
|
520
|
+
vertical: "bottom",
|
|
518
521
|
allOptionsIsChecked: true,
|
|
519
522
|
hasTreeChildren: false,
|
|
520
523
|
uid: `f${(~~(Math.random() * 1e8)).toString(16)}`,
|
|
@@ -638,7 +641,6 @@ export default {
|
|
|
638
641
|
filter(filterString, options) {
|
|
639
642
|
this.filterString = filterString;
|
|
640
643
|
this.$emit("search", { search: this.filterString });
|
|
641
|
-
console.log(options, filterString, 'test')
|
|
642
644
|
this.defaultFilter(options);
|
|
643
645
|
},
|
|
644
646
|
setPreparedValues(opt) {
|
|
@@ -756,7 +758,6 @@ export default {
|
|
|
756
758
|
|
|
757
759
|
options.forEach(option => {
|
|
758
760
|
let isVisible = option.initiallyVisible && option.title && option.title.toString().toLowerCase().includes(filterString) && !this.actualBookmarkedOptions[option.id];
|
|
759
|
-
console.log(option, option.initiallyVisible, option.title, option.title.toString().toLowerCase().includes(filterString), !this.actualBookmarkedOptions[option.id])
|
|
760
761
|
|
|
761
762
|
if (option.children && option.children.length) {
|
|
762
763
|
let visibleChildrenCount = this.filterFunc(option.children, filterString);
|
|
@@ -780,7 +781,6 @@ export default {
|
|
|
780
781
|
visibleOptionsCount++;
|
|
781
782
|
}
|
|
782
783
|
});
|
|
783
|
-
|
|
784
784
|
return visibleOptionsCount;
|
|
785
785
|
},
|
|
786
786
|
submit() {
|
|
@@ -912,7 +912,23 @@ export default {
|
|
|
912
912
|
this.$emit("close", Object.keys(this.selected)[0]);
|
|
913
913
|
}
|
|
914
914
|
this.$emit("blur");
|
|
915
|
+
this.vertical = "bottom";
|
|
915
916
|
},
|
|
917
|
+
onOpen() {
|
|
918
|
+
const screenHeight = document.documentElement.scrollHeight;
|
|
919
|
+
this.isOpen = true;
|
|
920
|
+
|
|
921
|
+
this.$nextTick(() => {
|
|
922
|
+
const newScreenHeight = document.documentElement.scrollHeight
|
|
923
|
+
|
|
924
|
+
console.log(screenHeight, "screenHeight")
|
|
925
|
+
console.log(newScreenHeight, "newScreenHeight")
|
|
926
|
+
if(newScreenHeight > screenHeight) {
|
|
927
|
+
console.log('test')
|
|
928
|
+
this.vertical = "top";
|
|
929
|
+
}
|
|
930
|
+
})
|
|
931
|
+
}
|
|
916
932
|
},
|
|
917
933
|
computed: {
|
|
918
934
|
hasTrigger() {
|