adata-ui 0.1.21 → 0.1.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adata-ui",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <header class="a-header" :class="[{'bordered': isBordered}, {'fixed': isFixed}]">
2
+ <header v-if="windowOpen" class="a-header" :class="[{'bordered': isBordered}, {'fixed': isFixed}]">
3
3
  <div class="container">
4
4
  <div class="a-header__left">
5
5
  <a class="logo" :href="toAdtdev('https://adata.kz')">
@@ -130,6 +130,7 @@ export default {
130
130
  data() {
131
131
  return {
132
132
  profileDropDown,
133
+ windowOpen: false,
133
134
  subheaderItems: [
134
135
  {
135
136
  id: 1,
@@ -156,6 +157,7 @@ export default {
156
157
  };
157
158
  },
158
159
  mounted() {
160
+ this.windowOpen = true;
159
161
  this.setBalance(this.balance);
160
162
  },
161
163
  computed: {
@@ -4,19 +4,14 @@ export default {
4
4
  title: 'SearchTextField',
5
5
  component: ASearchTextField,
6
6
  data: () => ({ value: "" }),
7
- methods: {
8
- inputHandle(val) {
9
- console.log(val);
10
- }
11
- },
12
- template: "<a-search-text-field v-model='value' @input='inputHandle' label='Example'></a-search-text-field>>"
7
+ template: "<a-search-text-field @input='(val) => {this.value = val}' label='Example'></a-search-text-field>>"
13
8
  }
14
9
 
10
+
15
11
  const Template = (args, { argTypes }) => ({
16
12
  components: { ASearchTextField },
17
13
  props: Object.keys(argTypes),
18
- data: () => ({ val: "" }),
19
- template: '<a-search-text-field v-model="val" v-bind="$props"></a-search-text-field>'
14
+ template: '<a-search-text-field v-bind="$props"></a-search-text-field>'
20
15
  })
21
16
 
22
17
  export const WithIcon = Template.bind({});
@@ -10,8 +10,7 @@
10
10
  :type="type"
11
11
  :value="value"
12
12
  required
13
- @input="inputHandler($event)"
14
- @keydown="handleKeyDown"
13
+ @input="$emit('input', $event.target.value)"
15
14
  @keypress.enter="$emit('enterPressed')"
16
15
  @focus="showAutocomplete = true"
17
16
  @click="$emit('showVTour')"
@@ -91,6 +90,7 @@ export default {
91
90
  value: {
92
91
  type: String,
93
92
  required: true,
93
+ default: ""
94
94
  },
95
95
  clearable: {
96
96
  type: Boolean,
@@ -179,13 +179,6 @@ export default {
179
179
  autocompleteOption.setAttribute("id", 'searchVariant');
180
180
  return autocompleteOption.innerText;
181
181
  },
182
- handleKeyDown(e) {
183
- if (+e.keyCode === 9) this.showAutocomplete = false;
184
- const specialKeys = [8, 188, 190, 110] // 8 - Backspace, 188 - ",", 190 and 110 - "."
185
- const charCode = e.keyCode
186
- if ((charCode >= 48 && charCode <= 57) || (charCode >= 96 && charCode <= 105) || specialKeys.indexOf(charCode) !== -1) return;
187
- else e.preventDefault()
188
- },
189
182
  inputHandler(e) {
190
183
  this.$emit('input', e.target.value);
191
184
  this.showAutocomplete = true;
@@ -6,6 +6,7 @@ import AAlert from './Alert/Alert'
6
6
  import AHeader from './Header/Header'
7
7
  import AFooter from './Footer/Footer'
8
8
  import ASearchTextField from './SearchTextField/SearchTextField'
9
+
9
10
  const Components = {
10
11
  AButton,
11
12
  ATextField,