-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from Sapiens-OSS/number
added missing schema types
- Loading branch information
Showing
16 changed files
with
116 additions
and
374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<template> | ||
<SwitchGroup as="div" class="flex items-center justify-between"> | ||
<span class="flex flex-grow flex-col"> | ||
<SwitchLabel | ||
as="span" | ||
class="text-sm font-medium leading-6 text-zinc-100" | ||
passive | ||
>{{ calculateSchemaTitle(props.schema) }}</SwitchLabel | ||
> | ||
<SwitchDescription as="span" class="text-sm text-zinc-400" | ||
>{{ props.schema.description ?? "No description provided." }}</SwitchDescription | ||
> | ||
</span> | ||
<Switch | ||
v-model="model" | ||
:class="[ | ||
model ? 'bg-orange-600' : 'bg-zinc-800', | ||
'relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-1 focus:ring-orange-600 focus:ring-offset-2', | ||
]" | ||
> | ||
<span | ||
aria-hidden="true" | ||
:class="[ | ||
model ? 'translate-x-5' : 'translate-x-0', | ||
'pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out', | ||
]" | ||
/> | ||
</Switch> | ||
</SwitchGroup> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { | ||
Switch, | ||
SwitchDescription, | ||
SwitchGroup, | ||
SwitchLabel, | ||
} from "@headlessui/vue"; | ||
import calculateSchemaTitle from "~/scripts/utils/calculateSchemaTitle"; | ||
const props = defineProps<{ | ||
schema: any; | ||
modelValue: any; | ||
}>(); | ||
const emit = defineEmits(["update:modelValue"]); | ||
const model = computed({ | ||
get() { | ||
return props.modelValue; | ||
}, | ||
set(value) { | ||
emit("update:modelValue", value); | ||
}, | ||
}); | ||
model.value ??= props.schema.default ?? false; | ||
</script> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.