@eturnity/eturnity_reusable_components 1.2.31-3d-master.9 → 1.2.31-3d-master.10

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": "@eturnity/eturnity_reusable_components",
3
- "version": "1.2.31-3d-master.9",
3
+ "version": "1.2.31-3d-master.10",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -17,7 +17,7 @@
17
17
  inputWidth="420px"
18
18
  textAlign="left"
19
19
  :isInteractive="true"
20
- :interactionStep="50"
20
+ :interactionStep="1"
21
21
  alignItems="horizontal"
22
22
  @on-input="value=$event"
23
23
  @input-change="changeHandler"
@@ -30,68 +30,16 @@
30
30
  </div>
31
31
  </template>
32
32
  </input-number>
33
- <input-number
34
- :value="value2"
35
- :minNumber="0"
36
- unitName="mm"
37
- :numberPrecision="0"
38
- backgroundColor="transparent"
39
- inputHeight="34px"
40
- inputWidth="420px"
41
- textAlign="left"
42
- :isInteractive="true"
43
- :interactionStep="50"
44
- alignItems="horizontal"
45
- @input-change="changeHandler"
46
- @input-focus="focusHandler"
47
- @input-blur="blurHandler"
48
- @on-input="inputHandler"
49
- >
50
- <template v-slot:label>
51
- <div>
52
- Interactive Label
53
- </div>
54
- </template>
55
- </input-number>
56
- <Select
57
- selectWidth="100%"
58
- optionWidth="50%"
59
- label="that is a label"
60
- alignItems="vertical"
61
- colorMode="light"
62
- >
63
- <template #selector="{selectedValue}">
64
- value selected: {{selectedValue}}
65
- </template>
66
- <template #dropdown>
67
- <Option value="1">value one</Option>
68
- <Option value="2">value two</Option>
69
- <Option value="3">value three</Option>
70
- <Option value="4">value four</Option>
71
- </template>
72
- </Select>
73
- <Select
74
- selectWidth="100%"
75
- optionWidth="50%"
76
- label="that is a label"
77
- alignItems="vertical"
78
- >
79
- <template #selector="{selectedValue}">
80
- value selected: {{selectedValue}}
81
- </template>
82
- <template #dropdown>
83
- <Option value="1">value one</Option>
84
- <Option value="2">value two</Option>
85
- <Option value="3">value three</Option>
86
- <Option value="4">value four</Option>
87
- </template>
88
- </Select>
33
+
34
+
89
35
  <Select
36
+ :value="value"
90
37
  selectWidth="100%"
91
38
  optionWidth="50%"
92
39
  label="that is a label"
93
40
  alignItems="vertical"
94
41
  colorMode="dark"
42
+ @input-change="value=$event"
95
43
  >
96
44
  <template #selector="{selectedValue}">
97
45
  value selected: {{selectedValue}}
@@ -103,34 +51,8 @@
103
51
  <Option value="4">value four</Option>
104
52
  </template>
105
53
  </Select>
106
- <hr>
107
- <SwitchField
108
- @on-switch-change="onInputChange($event)"
109
- :options="[{value:0,content:'zero'},{value:1,content:'one'},{value:2,content:'two'}]"
110
- :value="1"
111
- label="label"
112
- toggleColor="red"
113
- size="large"
114
- backgroundColor="blue"
115
- labelAlign="left"
116
- fontColor="black"
117
- :disabled="false"
118
- />
119
- <div :style="{padding:'50px',backgroundColor:'#1e1e1e'}">
120
- <SwitchField
121
- @on-switch-change="onInputChange($event)"
122
- :options="[{value:'test',content:'zero'},{value:'1',content:'one'},{value:'2',content:'two'}]"
123
- value='test'
124
- label="label"
125
- toggleColor="red"
126
- size="large"
127
- backgroundColor="blue"
128
- labelAlign="left"
129
- colorMode="dark"
130
- alignItems="vertical"
131
- />
54
+
132
55
  </div>
133
- </div>
134
56
  </modal>
135
57
  </page-container>
136
58
  </ThemeProvider>
@@ -144,7 +66,6 @@ import InputNumber from "@/components/inputs/inputNumber"
144
66
  import Select from "@/components/inputs/select"
145
67
  import Option from "@/components/inputs/select/option"
146
68
  import Modal from "@/components/modals/modal"
147
- import SwitchField from "@/components/inputs/switchField"
148
69
 
149
70
  // import TableDropdown from "@/components/tableDropdown"
150
71
 
@@ -167,7 +88,6 @@ export default {
167
88
  Modal,
168
89
  Option,
169
90
  Select,
170
- SwitchField
171
91
  },
172
92
  data() {
173
93
  return {
@@ -456,10 +456,13 @@ export default {
456
456
  return evaluated
457
457
  },
458
458
  onInput(value){
459
+ let evaluatedVal
459
460
  try{
460
- const evaluatedVal=this.onEvaluateCode(value)
461
- this.$emit('on-input',evaluatedVal)
462
- }catch(err){
461
+ evaluatedVal=this.onEvaluateCode(value)
462
+ }finally {
463
+ if(evaluatedVal){
464
+ this.$emit('on-input',evaluatedVal)
465
+ }
463
466
  }
464
467
  },
465
468
  onInputBlur(e) {
@@ -269,6 +269,11 @@ const InputWrapper = styled('div', inputAttrs)`
269
269
  },
270
270
  },
271
271
  computed: {
272
+ },
273
+ watch:{
274
+ value(val){
275
+ this.selectedValue=val
276
+ }
272
277
  }
273
278
  }
274
279
  </script>
@@ -55,18 +55,18 @@
55
55
  <script>
56
56
  // import Toggle from "@eturnity/eturnity_reusable_components/src/components/inputs/toggle"
57
57
  // To use:
58
- // <SwitchField
59
- // @on-switch-change="onInputChange($event)"
60
- // :options="[{value:0,content:'zero'},{value:1,content:'one'},{value:2,content:'two'}]"
61
- // :value="1"
62
- // label="label"
63
- // toggleColor="red"
64
- // size="large"
65
- // backgroundColor="blue"
66
- // labelAlign="left"
67
- // fontColor="black"
68
- // :disabled="false"
69
- // />
58
+ // <SwitchField
59
+ // @on-switch-change="onInputChange($event)"
60
+ // :options="[{value:0,content:'zero'},{value:1,content:'one'},{value:2,content:'two'}]"
61
+ // :value="1"
62
+ // label="label"
63
+ // toggleColor="red"
64
+ // size="large"
65
+ // backgroundColor="blue"
66
+ // labelAlign="left"
67
+ // fontColor="black"
68
+ // :disabled="false"
69
+ // />
70
70
 
71
71
  import styled from "vue-styled-components"
72
72
  import InfoText from "../../infoText"