@xuda.io/xuda-widget-plugin-xuda-drive 1.0.45 → 1.0.47
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/index.mjs +30 -5
- package/package.json +1 -1
- package/runtime.mjs +5 -4
package/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var common_fields = {
|
|
|
5
5
|
},
|
|
6
6
|
file_upload_allow_multiple_files: {
|
|
7
7
|
label: "Allow Multiple Files",
|
|
8
|
-
type: "
|
|
8
|
+
type: "boolean",
|
|
9
9
|
render: "segment",
|
|
10
10
|
tooltip: "",
|
|
11
11
|
defaultValue: () => false,
|
|
@@ -51,7 +51,7 @@ var common_fields = {
|
|
|
51
51
|
},
|
|
52
52
|
public_file: {
|
|
53
53
|
label: "Public File",
|
|
54
|
-
type: "
|
|
54
|
+
type: "boolean",
|
|
55
55
|
render: "segment",
|
|
56
56
|
tooltip: "",
|
|
57
57
|
defaultValue: () => false,
|
|
@@ -78,7 +78,7 @@ var common_fields = {
|
|
|
78
78
|
},
|
|
79
79
|
auto_tag_generator: {
|
|
80
80
|
label: "Auto Tag Generator",
|
|
81
|
-
type: "
|
|
81
|
+
type: "boolean",
|
|
82
82
|
render: "segment",
|
|
83
83
|
tooltip: "Create tags extract from file name",
|
|
84
84
|
defaultValue: () => false,
|
|
@@ -105,6 +105,7 @@ var common_fields = {
|
|
|
105
105
|
render: "editor",
|
|
106
106
|
"render_params.language": "json"
|
|
107
107
|
},
|
|
108
|
+
|
|
108
109
|
custom_tags_parser: {
|
|
109
110
|
label: "Custom Tags Parser",
|
|
110
111
|
type: "object",
|
|
@@ -124,7 +125,7 @@ var common_fields = {
|
|
|
124
125
|
},
|
|
125
126
|
clear_on_file_upload: {
|
|
126
127
|
label: "Clear on File Upload",
|
|
127
|
-
type: "
|
|
128
|
+
type: "boolean",
|
|
128
129
|
render: "segment",
|
|
129
130
|
tooltip: "",
|
|
130
131
|
defaultValue: () => false,
|
|
@@ -145,7 +146,7 @@ var common_fields = {
|
|
|
145
146
|
},
|
|
146
147
|
prompt_file_exist: {
|
|
147
148
|
label: "Prompt file exist",
|
|
148
|
-
type: "
|
|
149
|
+
type: "boolean",
|
|
149
150
|
render: "segment",
|
|
150
151
|
tooltip: "",
|
|
151
152
|
defaultValue: () => true,
|
|
@@ -176,6 +177,30 @@ var common_fields = {
|
|
|
176
177
|
value: "ltr"
|
|
177
178
|
}
|
|
178
179
|
]
|
|
180
|
+
},
|
|
181
|
+
navigation: {
|
|
182
|
+
label: "Navigation",
|
|
183
|
+
type: "boolean",
|
|
184
|
+
render: "segment",
|
|
185
|
+
tooltip: "",
|
|
186
|
+
defaultValue: () => true,
|
|
187
|
+
options: [
|
|
188
|
+
{
|
|
189
|
+
label: "Show",
|
|
190
|
+
value: true
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
label: "Hide",
|
|
194
|
+
value: false
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
swiper_options: {
|
|
199
|
+
label: "Auto Tag Translation",
|
|
200
|
+
type: "object",
|
|
201
|
+
tooltip: "Translation is enabled by defining key-value pairs in an object.",
|
|
202
|
+
render: "editor",
|
|
203
|
+
"render_params.language": "json"
|
|
179
204
|
}
|
|
180
205
|
};
|
|
181
206
|
|
package/package.json
CHANGED
package/runtime.mjs
CHANGED
|
@@ -674,7 +674,7 @@ export async function viewer(fields, e) {
|
|
|
674
674
|
</template>
|
|
675
675
|
|
|
676
676
|
<div v-if="view === 'slider'" class="relative flex items-center justify-between py-4 px-4 flex-1 h-full overflow-hidden">
|
|
677
|
-
<div class="absolute inset-y-0 left-6 z-10 flex items-center">
|
|
677
|
+
<div v-if="options.navigation" class="absolute inset-y-0 left-6 z-10 flex items-center">
|
|
678
678
|
<button @click="options.direction === 'rtl' ? swiper.slideNext() : swiper.slidePrev()" class="bg-white -ml-2 lg:-ml-4 flex justify-center items-center w-10 h-10 rounded-full shadow focus:outline-none">
|
|
679
679
|
<svg viewBox="0 0 20 20" fill="currentColor" class="chevron-left w-6 h-6"><path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg>
|
|
680
680
|
</button>
|
|
@@ -693,8 +693,8 @@ export async function viewer(fields, e) {
|
|
|
693
693
|
</div>
|
|
694
694
|
</div>
|
|
695
695
|
|
|
696
|
-
<div class="absolute inset-y-0 right-6 z-10 flex items-center">
|
|
697
|
-
<button @click="options.direction === '
|
|
696
|
+
<div v-if="options.navigation" class="absolute inset-y-0 right-6 z-10 flex items-center">
|
|
697
|
+
<button @click="options.direction === 'rtl' ? swiper.slidePrev() : swiper.slideNext()" class="bg-white -mr-2 lg:-mr-4 flex justify-center items-center w-10 h-10 rounded-full shadow focus:outline-none">
|
|
698
698
|
<svg viewBox="0 0 20 20" fill="currentColor" class="chevron-right w-6 h-6"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>
|
|
699
699
|
</button>
|
|
700
700
|
</div>
|
|
@@ -1162,7 +1162,8 @@ export async function viewer(fields, e) {
|
|
|
1162
1162
|
spaceBetween: 20,
|
|
1163
1163
|
observer: true,
|
|
1164
1164
|
observeParents: true,
|
|
1165
|
-
...
|
|
1165
|
+
...fields.swiper_options
|
|
1166
|
+
// ...(fields?.direction === "rtl" ? { reverseDirection: true } : {})
|
|
1166
1167
|
});
|
|
1167
1168
|
|
|
1168
1169
|
this.swiper.on("slideChange", (event) => {
|