@dosgato/dialog 1.3.2 → 1.3.4
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/FieldRadio.svelte
CHANGED
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
async function reactToChoices (..._: any[]) {
|
|
36
36
|
if (!finalDeserialize) return
|
|
37
37
|
if (!choices.length) {
|
|
38
|
-
return await store.setField(finalPath, finalDeserialize(''))
|
|
38
|
+
return await store.setField(finalPath, finalDeserialize(''), { notDirty: true })
|
|
39
39
|
}
|
|
40
40
|
const val = get($store.data, finalPath)
|
|
41
|
-
if (!choices.some(o => equal(o.value, val))) await store.setField(finalPath, notNull ? defaultValue : finalDeserialize(''))
|
|
41
|
+
if (!choices.some(o => equal(o.value, val))) await store.setField(finalPath, notNull ? defaultValue : finalDeserialize(''), { notDirty: true })
|
|
42
42
|
}
|
|
43
43
|
$: reactToChoices(choices).catch(console.error)
|
|
44
44
|
onMount(reactToChoices)
|
package/dist/FieldSelect.svelte
CHANGED
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
async function reactToChoices (..._: any[]) {
|
|
39
39
|
if (!finalDeserialize) return
|
|
40
40
|
if (!choices.length) {
|
|
41
|
-
return await store.setField(finalPath, finalDeserialize(''))
|
|
41
|
+
return await store.setField(finalPath, finalDeserialize(''), { notDirty: true })
|
|
42
42
|
}
|
|
43
43
|
const val = get($store.data, finalPath)
|
|
44
|
-
if (!choices.some(o => equal(o.value, val))) await store.setField(finalPath, notNull ? defaultValue : finalDeserialize(''))
|
|
44
|
+
if (!choices.some(o => equal(o.value, val))) await store.setField(finalPath, notNull ? defaultValue : finalDeserialize(''), { notDirty: true })
|
|
45
45
|
}
|
|
46
46
|
$: reactToChoices(choices).catch(console.error)
|
|
47
47
|
onMount(reactToChoices)
|
|
@@ -18,9 +18,9 @@ declare const __propDef: {
|
|
|
18
18
|
};
|
|
19
19
|
slots: {};
|
|
20
20
|
};
|
|
21
|
-
export type
|
|
22
|
-
export type
|
|
23
|
-
export type
|
|
24
|
-
export default class
|
|
21
|
+
export type UploadUIProps = typeof __propDef.props;
|
|
22
|
+
export type UploadUIEvents = typeof __propDef.events;
|
|
23
|
+
export type UploadUISlots = typeof __propDef.slots;
|
|
24
|
+
export default class UploadUI extends SvelteComponentTyped<UploadUIProps, UploadUIEvents, UploadUISlots> {
|
|
25
25
|
}
|
|
26
26
|
export {};
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
async function reactToOptions (..._: any[]) {
|
|
28
28
|
const val = get($store.data, finalPath)
|
|
29
29
|
if (!val) return
|
|
30
|
-
if (!options.length) await store.setField(finalPath, addAllOption ? 'alternating' : undefined)
|
|
31
|
-
else if (val !== 'alternating' && !options.some(o => o.value === val)) await store.setField(finalPath, notNull ? options[0].value : (addAllOption ? 'alternating' : undefined))
|
|
30
|
+
if (!options.length) await store.setField(finalPath, addAllOption ? 'alternating' : undefined, { notDirty: true })
|
|
31
|
+
else if (val !== 'alternating' && !options.some(o => o.value === val)) await store.setField(finalPath, notNull ? options[0].value : (addAllOption ? 'alternating' : undefined), { notDirty: true })
|
|
32
32
|
}
|
|
33
33
|
$: reactToOptions(options).catch(console.error)
|
|
34
34
|
onMount(reactToOptions)
|
|
@@ -164,13 +164,13 @@
|
|
|
164
164
|
if ($store.selected.size <= 1) dispatch('choose', item)
|
|
165
165
|
}
|
|
166
166
|
function onDragStart (e: DragEvent) {
|
|
167
|
-
userWantsCopy = e.
|
|
167
|
+
userWantsCopy = e.ctrlKey || e.metaKey
|
|
168
168
|
e.dataTransfer!.effectAllowed = 'copyMove'
|
|
169
169
|
e.dataTransfer!.setData('text/plain', item.id)
|
|
170
170
|
store.dragStart(item)
|
|
171
171
|
}
|
|
172
172
|
function onDragOver (e: DragEvent) {
|
|
173
|
-
userWantsCopy = e.
|
|
173
|
+
userWantsCopy = e.ctrlKey || e.metaKey
|
|
174
174
|
if (dropZone) {
|
|
175
175
|
e.preventDefault()
|
|
176
176
|
e.dataTransfer!.dropEffect = store.dropEffect(item, false, userWantsCopy)
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
return !dropZone
|
|
179
179
|
}
|
|
180
180
|
function onDragOverAbove (e: DragEvent) {
|
|
181
|
-
userWantsCopy = e.
|
|
181
|
+
userWantsCopy = e.ctrlKey || e.metaKey
|
|
182
182
|
if (dropAbove) {
|
|
183
183
|
e.preventDefault()
|
|
184
184
|
e.dataTransfer!.dropEffect = store.dropEffect(item, true, userWantsCopy)
|
package/package.json
CHANGED