@mixd-id/web-scaffold 0.1.230406026 → 0.1.230406028

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.230406026",
4
+ "version": "0.1.230406028",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div :class="computedClass">
3
3
  <slot name="start"></slot>
4
- <textarea @keyup="onKeyUp"
4
+ <textarea
5
5
  :placeholder="placeholder" :rows="rows" ref="input" @blur="onBlur" @input="onInput"
6
6
  :value="modelValue" />
7
7
  <div v-if="state === -2 && !!(errors)">
@@ -52,6 +52,7 @@ export default{
52
52
  modelValue: [ String, Number ],
53
53
 
54
54
  placeholder: String,
55
+
55
56
  rows: String,
56
57
 
57
58
  },
@@ -113,15 +114,6 @@ export default{
113
114
  this.$refs.input.select()
114
115
  },
115
116
 
116
- onKeyUp(e){
117
- if(e.keyCode === 13 && this.$refs.input.value.length > 0){
118
- this.$emit('submit')
119
- }
120
- else if(e.keyCode === 27 && this.clearable){
121
- this.$emit('clear')
122
- }
123
- },
124
-
125
117
  onInput(e){
126
118
  this.$emit('update:modelValue', e.target.value)
127
119
  },
@@ -3,7 +3,7 @@
3
3
  <slot name="start"></slot>
4
4
  <input :type="computedType" :disabled="isDisabled" @focus="isActive = true" @blur="onBlur"
5
5
  :placeholder="placeholder" :maxlength="maxlength" ref="input" autocomplete="new-password"
6
- :value="displayedValue" @input="onInput" :readonly="Boolean(readonly)"
6
+ :value="displayedValue" :readonly="Boolean(readonly)"
7
7
  @keydown="onKeyDown"/>
8
8
  <button class="mr-2" v-if="Boolean(clearable) && !Boolean(readonly) && state >= 1 && modelValue" type="button" @click="$emit('clear')">
9
9
  <svg :class="$style.svg" width="19" height="19" viewBox="0 0 24 24" class="fill-text-200" xmlns="http://www.w3.org/2000/svg">
@@ -132,7 +132,7 @@ const accessNestedObject = function(obj, path) {
132
132
  let nestedObj = obj;
133
133
 
134
134
  for (let key of keys) {
135
- if (nestedObj.hasOwnProperty(key)) {
135
+ if (nestedObj && nestedObj.hasOwnProperty(key)) {
136
136
  nestedObj = nestedObj[key];
137
137
  } else {
138
138
  // Return undefined if any key in the path is missing