@bagelink/vue 0.0.258 → 0.0.262

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.
@@ -1,23 +1,63 @@
1
1
  <template>
2
- <div class="bagel-input text-input"
3
- :class="{ dense, small, shrink, toggleEdit, editMode, textInputIconWrap: icon, txtInputIconStart: iconStart, code }"
4
- :title="title">
5
- <label :for="id">
2
+ <div
3
+ class="bagel-input text-input"
4
+ :class="{
5
+ dense, small, shrink, toggleEdit, editMode, code,
6
+ textInputIconWrap: icon,
7
+ txtInputIconStart: iconStart,
8
+ }"
9
+ :title="title"
10
+ >
11
+ <label
12
+ :for="id"
13
+ >
6
14
  {{ label }}
7
- <input :title="title" :autocomplete="autocomplete" v-if="!multiline && !autoheight && !code" :id="id"
8
- v-model="inputVal" :type="type" :rows="1" ref="input" :placeholder="placeholder || label"
9
- :disabled="!editMode" :required="required" :pattern="pattern" v-bind="nativeInputAttrs"
10
- @dblclick="toggleEditAction">
11
- <textarea :title="title" v-else :id="id" v-model="inputVal" :type="type" :rows="rows" ref="input"
12
- :placeholder="placeholder || label" :disabled="!editMode" :required="required" :pattern="pattern"
13
- v-bind="nativeInputAttrs" @dblclick="toggleEditAction" />
15
+ <input
16
+ v-if="!multiline && !autoheight && !code"
17
+ :title="title"
18
+ :autocomplete="autocomplete"
19
+ :id="id"
20
+ v-model="inputVal"
21
+ :type="type"
22
+ :rows="1" ref="input"
23
+ :placeholder="placeholder || label"
24
+ :disabled="!editMode"
25
+ :required="required"
26
+ :pattern="pattern"
27
+ v-bind="nativeInputAttrs"
28
+ @dblclick="toggleEditAction"
29
+ >
30
+ <textarea
31
+ v-else
32
+ :title="title"
33
+ :id="id"
34
+ v-model="inputVal"
35
+ :type="type"
36
+ :rows="rows" ref="input"
37
+ :placeholder="placeholder || label"
38
+ :disabled="!editMode"
39
+ :required="required"
40
+ :pattern="pattern"
41
+ v-bind="nativeInputAttrs"
42
+ @dblclick="toggleEditAction"
43
+ />
14
44
  <p v-if="helptext">{{ helptext }}</p>
15
45
  </label>
16
46
 
17
- <MaterialIcon class="iconStart" v-if="iconStart" :icon="iconStart" />
18
- <MaterialIcon v-if="icon" :icon="icon" />
19
- <Btn class="toggleEditBtn" v-if="toggleEdit" thin @click="toggleEditAction" :icon="editMode ? 'check' : 'edit'"
20
- flat />
47
+ <MaterialIcon
48
+ class="iconStart" v-if="iconStart"
49
+ :icon="iconStart"
50
+ />
51
+ <MaterialIcon
52
+ v-if="icon"
53
+ :icon="icon"
54
+ />
55
+ <Btn
56
+ class="toggleEditBtn" v-if="toggleEdit" thin @click="toggleEditAction"
57
+ :icon="editMode ? 'check'
58
+ : 'edit'"
59
+ flat
60
+ />
21
61
  </div>
22
62
  </template>
23
63
 
@@ -21,6 +21,7 @@ interface ModalFormOptions {
21
21
  modelValue?: Record<string, any>;
22
22
  onSubmit?: (formData: any) => Promise<any>;
23
23
  onDelete?: (id: string) => Promise<void>;
24
+ onError?: ((err: any) => void);
24
25
  }
25
26
 
26
27
  interface ModalApi {
package/src/types/file.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type StorageFile = {
2
- organization: string[];
2
+ organization?: string[];
3
3
  name: string;
4
4
  url: string;
5
5
  mimetype?: string;