inertia-bootstrap-forms 1.0.69 → 1.0.71
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-CLKOiKDh.js → index-C4NQJHiU.js} +1 -1
- package/dist/{index-CrmPY_JJ.js → index-CnoQ3ORF.js} +660 -652
- package/dist/inertia-bootstrap-forms.es.js +1 -1
- package/dist/inertia-bootstrap-forms.umd.js +6 -6
- package/package.json +1 -1
- package/src/EditorInput.vue +2 -9
- package/src/FormContainer.vue +1 -0
- package/src/SubmitButton.vue +17 -14
- package/src/UppyInput.vue +4 -1
package/package.json
CHANGED
package/src/EditorInput.vue
CHANGED
|
@@ -3,6 +3,7 @@ import Editor from '@tinymce/tinymce-vue';
|
|
|
3
3
|
import {computed, defineComponent, inject, ref} from "vue";
|
|
4
4
|
|
|
5
5
|
export default defineComponent({
|
|
6
|
+
emits: ['update:modelValue', 'setContent'],
|
|
6
7
|
components: {Editor},
|
|
7
8
|
props: {
|
|
8
9
|
name: {
|
|
@@ -57,15 +58,8 @@ export default defineComponent({
|
|
|
57
58
|
}
|
|
58
59
|
});
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
modelValue.value = content;
|
|
62
|
-
emit('setContent', content, format, paste, selection)
|
|
63
|
-
emit('update:modelValue', content)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return {modelValue, form, group, editorRef, handleInit, setContentInModelValue};
|
|
61
|
+
return {modelValue, form, group, editorRef, handleInit};
|
|
67
62
|
},
|
|
68
|
-
emits: ['update:modelValue', 'setContent'],
|
|
69
63
|
})
|
|
70
64
|
</script>
|
|
71
65
|
|
|
@@ -73,7 +67,6 @@ export default defineComponent({
|
|
|
73
67
|
<Editor
|
|
74
68
|
ref="editorRef"
|
|
75
69
|
@init="handleInit"
|
|
76
|
-
@SetContent="setContentInModelValue"
|
|
77
70
|
v-model="modelValue"
|
|
78
71
|
class="tiny-editor-input-el"
|
|
79
72
|
:init="{
|
package/src/FormContainer.vue
CHANGED
package/src/SubmitButton.vue
CHANGED
|
@@ -3,21 +3,24 @@ import {Spinner} from 'vue3-bootstrap-components';
|
|
|
3
3
|
import {defineComponent} from "vue";
|
|
4
4
|
|
|
5
5
|
export default defineComponent({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
components: {
|
|
7
|
+
Spinner
|
|
8
|
+
},
|
|
9
|
+
inject: ['form'],
|
|
10
|
+
props: {},
|
|
11
11
|
})
|
|
12
12
|
</script>
|
|
13
13
|
<template>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
<button
|
|
15
|
+
type="submit"
|
|
16
|
+
:disabled="form?.processing || form?.uploading"
|
|
17
|
+
class="btn btn-primary px-3 px-sm-4">
|
|
18
|
+
<Spinner v-if="form?.processing || form?.uploading"/>
|
|
19
|
+
<slot :form="form">
|
|
20
|
+
تایید و ثبت اطلاعات
|
|
21
|
+
</slot>
|
|
22
|
+
<slot name="progress">
|
|
23
|
+
<span class="submit-upload-percent" v-if="form?.uploading">{{ form?.uploading }}%</span>
|
|
24
|
+
</slot>
|
|
25
|
+
</button>
|
|
23
26
|
</template>
|
package/src/UppyInput.vue
CHANGED
|
@@ -119,7 +119,10 @@ uppy.value.on('file-removed', (file) => {
|
|
|
119
119
|
emits('file-removed', file);
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
uppy.value.on('progress', (progress) =>
|
|
122
|
+
uppy.value.on('progress', (progress) => {
|
|
123
|
+
form.value['uploading'] = (progress >= 100 || progress <=0) ? null : progress;
|
|
124
|
+
emits('progress', progress)
|
|
125
|
+
});
|
|
123
126
|
uppy.value.on('upload-progress', (file, progress) => emits('upload-progress', file, progress));
|
|
124
127
|
uppy.value.on('upload-pause', (file, progress) => emits('upload-pause', file, progress));
|
|
125
128
|
uppy.value.on('cancel-all', () => emits('cancel-all'));
|