-
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.
Adds namespace sec with nonlocalized string widget
- Loading branch information
1 parent
b141d12
commit b1bd6b2
Showing
22 changed files
with
440 additions
and
50 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
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
22 changes: 22 additions & 0 deletions
22
arches_lingo/src/arches_lingo/components/generic/ControlledListItem.vue
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,22 @@ | ||
<script lang="ts"> | ||
const UPDATE = "update"; | ||
</script> | ||
<script setup lang="ts"> | ||
import type { ControlledListItem } from "@/arches_lingo/types"; | ||
import ControlledListItemViewer from "@/arches_lingo/components/generic/ControlledListItemViewer.vue"; | ||
type DataComponentMode = "edit" | "view"; | ||
const props = defineProps<{ | ||
mode?: DataComponentMode; | ||
value?: ControlledListItem; | ||
}>(); | ||
defineEmits([UPDATE]); | ||
</script> | ||
<template> | ||
<div> | ||
<div v-if="!props.mode || props.mode === 'view'"> | ||
<ControlledListItemViewer :value="props.value" /> | ||
</div> | ||
<div v-if="props.mode === 'edit'"></div> | ||
</div> | ||
</template> |
8 changes: 8 additions & 0 deletions
8
arches_lingo/src/arches_lingo/components/generic/ControlledListItemViewer.vue
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,8 @@ | ||
<script setup lang="ts"> | ||
import type { ControlledListItem } from "@/arches_lingo/types"; | ||
const props = defineProps<{ value?: ControlledListItem }>(); | ||
</script> | ||
<template> | ||
<p>{{ props.value?.labels }}</p> | ||
</template> |
27 changes: 27 additions & 0 deletions
27
arches_lingo/src/arches_lingo/components/generic/NonLocalizedString.vue
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,27 @@ | ||
<script lang="ts"> | ||
const UPDATE = "update"; | ||
</script> | ||
<script setup lang="ts"> | ||
import NonLocalizedStringViewer from "@/arches_lingo/components/generic/NonLocalizedStringViewer.vue"; | ||
import NonLocalizedStringEditor from "@/arches_lingo/components/generic//NonLocalizedStringEditor.vue"; | ||
type DataComponentMode = "edit" | "view"; | ||
const props = defineProps<{ mode?: DataComponentMode; value?: string }>(); | ||
const emits = defineEmits([UPDATE]); | ||
const onUpdate = (val: string) => { | ||
emits(UPDATE, val); | ||
}; | ||
</script> | ||
<template> | ||
<div> | ||
<div v-if="!props.mode || props.mode === 'view'"> | ||
<NonLocalizedStringViewer :value="props.value ?? ''" /> | ||
</div> | ||
<div v-if="props.mode === 'edit'"> | ||
<NonLocalizedStringEditor | ||
:value="props.value ?? ''" | ||
@update="onUpdate" | ||
/> | ||
</div> | ||
</div> | ||
</template> |
22 changes: 22 additions & 0 deletions
22
arches_lingo/src/arches_lingo/components/generic/NonLocalizedStringEditor.vue
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,22 @@ | ||
<script setup lang="ts"> | ||
import { ref, watch } from "vue"; | ||
import InputText from "primevue/inputtext"; | ||
const props = defineProps<{ value: string }>(); | ||
const updateableValue = ref<string>(props.value as string); | ||
const emit = defineEmits(["update"]); | ||
watch(props, (newValue) => { | ||
updateableValue.value = newValue.value; | ||
}); | ||
watch(updateableValue, (newValue) => { | ||
emit("update", newValue); | ||
}); | ||
</script> | ||
<template> | ||
<div> | ||
<InputText | ||
v-model="updateableValue" | ||
type="text" | ||
/> | ||
</div> | ||
</template> |
6 changes: 6 additions & 0 deletions
6
arches_lingo/src/arches_lingo/components/generic/NonLocalizedStringViewer.vue
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,6 @@ | ||
<script setup lang="ts"> | ||
const props = defineProps<{ value?: string | null }>(); | ||
</script> | ||
<template> | ||
<p>{{ props.value }}</p> | ||
</template> |
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.