-
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.
Updates for namespace section (#128)
* Adds namespace sec with nonlocalized string widget * pr feedback * pr feedback #128
- Loading branch information
1 parent
c198c7a
commit 7f136e1
Showing
21 changed files
with
441 additions
and
59 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
23 changes: 23 additions & 0 deletions
23
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,23 @@ | ||
<script setup lang="ts"> | ||
import type { ControlledListItem } from "@/arches_lingo/types"; | ||
import ControlledListItemViewer from "@/arches_lingo/components/generic/ControlledListItemViewer.vue"; | ||
const VIEW = "view"; | ||
const EDIT = "edit"; | ||
type DataComponentMode = typeof EDIT | typeof 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 setup lang="ts"> | ||
import NonLocalizedStringViewer from "@/arches_lingo/components/generic/NonLocalizedStringViewer.vue"; | ||
import NonLocalizedStringEditor from "@/arches_lingo/components/generic/NonLocalizedStringEditor.vue"; | ||
const EDIT = "edit"; | ||
const VIEW = "view"; | ||
type DataComponentMode = typeof EDIT | typeof 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> |
26 changes: 26 additions & 0 deletions
26
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,26 @@ | ||
<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.