inertia-bootstrap-forms 1.0.70 → 1.0.72
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-Bx7r3d5Q.js → index-BzMXMMgb.js} +506 -500
- package/dist/{index-SfPqU1M1.js → index-n4pmiUiF.js} +1 -1
- 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 +1 -9
- package/src/FormContainer.vue +1 -0
- package/src/SubmitButton.vue +17 -14
- package/src/UppyInput.vue +4 -3
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: {
|
|
@@ -59,14 +60,6 @@ export default defineComponent({
|
|
|
59
60
|
|
|
60
61
|
return {modelValue, form, group, editorRef, handleInit};
|
|
61
62
|
},
|
|
62
|
-
emits: ['update:modelValue', 'setContent'],
|
|
63
|
-
methods:{
|
|
64
|
-
setContentInModelValue(content, format, paste, selection){
|
|
65
|
-
this.modelValue = content;
|
|
66
|
-
this.$emit('setContent', content, format, paste, selection);
|
|
67
|
-
this.$emit('update:modelValue', content);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
63
|
})
|
|
71
64
|
</script>
|
|
72
65
|
|
|
@@ -74,7 +67,6 @@ export default defineComponent({
|
|
|
74
67
|
<Editor
|
|
75
68
|
ref="editorRef"
|
|
76
69
|
@init="handleInit"
|
|
77
|
-
@setContent="setContentInModelValue"
|
|
78
70
|
v-model="modelValue"
|
|
79
71
|
class="tiny-editor-input-el"
|
|
80
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'));
|
|
@@ -161,9 +164,7 @@ onMounted(() => {
|
|
|
161
164
|
}
|
|
162
165
|
|
|
163
166
|
if(uppy.value?.opts?.restrictions){
|
|
164
|
-
console.log(uppy.value?.opts?.restrictions);
|
|
165
167
|
restrictionCaption.value = buildRestrictionsCaption(uppy.value.opts.restrictions)
|
|
166
|
-
console.log('restrictionCaption', restrictionCaption.value);
|
|
167
168
|
}
|
|
168
169
|
});
|
|
169
170
|
|