-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-2024-fall' into observation/FOUR-19662
- Loading branch information
Showing
21 changed files
with
784 additions
and
49 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,7 +73,6 @@ | |
"variableStore", | ||
"dataSelectionOptions", | ||
"singleField" | ||
]; | ||
export default { | ||
components: { | ||
|
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,65 @@ | ||
<template> | ||
<div> | ||
<div> | ||
<label for="collectiondesigner">{{ $t("Table Style") }}</label> | ||
<b-form-select | ||
id="collectiondesigner" | ||
v-model="designerOptions" | ||
:options="designerListOptions" | ||
data-cy="inspector-collection-designer-model" | ||
/> | ||
</div> | ||
</div> | ||
</template> | ||
<script> | ||
import { cloneDeep } from "lodash"; | ||
const CONFIG_FIELDS = [ | ||
"designerOptions" | ||
]; | ||
export default { | ||
props: ["value", "screenType"], | ||
data() { | ||
return { | ||
fields: [], | ||
designerOptions: "Classic", | ||
designerListOptions: [ | ||
{ | ||
text: this.$t('Classic'), | ||
value: 'Classic', | ||
}, | ||
{ | ||
text: this.$t('Modern'), | ||
value: 'Modern', | ||
}, | ||
], | ||
}; | ||
}, | ||
computed: { | ||
options() { | ||
return Object.fromEntries( | ||
CONFIG_FIELDS.map((field) => [field, this[field]]) | ||
); | ||
} | ||
}, | ||
watch: { | ||
value: { | ||
handler(value) { | ||
if (!value) { | ||
return; | ||
} | ||
CONFIG_FIELDS.forEach((field) => (this[field] = value[field])); | ||
}, | ||
immediate: true | ||
}, | ||
options: { | ||
handler() { | ||
this.$emit("input", this.options); | ||
this.$root.$emit("style-mode", this.options.designerOptions); | ||
}, | ||
deep: true | ||
}, | ||
}, | ||
}; | ||
</script> |
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,101 @@ | ||
<template> | ||
<div class="form-group"> | ||
<div> | ||
<b-button-toolbar> | ||
<b-button-group size="lg"> | ||
<b-button | ||
v-for="option in options" | ||
:key="option.value" | ||
size="sm" | ||
variant="outline-light" | ||
class="color-option" | ||
:class="['bg-' + parsedColor(option.value)]" | ||
:title="option.content" | ||
> | ||
<i | ||
class="fas fa-check" | ||
:class="[ | ||
option.value === value | ||
? 'text-light' | ||
: 'text-' + parsedColor(option.value) | ||
]" | ||
@click="selectColor(option.value)" | ||
/> | ||
</b-button> | ||
</b-button-group> | ||
</b-button-toolbar> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
components: {}, | ||
props: { | ||
/** | ||
* The label for the color select | ||
*/ | ||
label: {}, | ||
/** | ||
* The value of the color select. eg. `alert alert-success` | ||
*/ | ||
value: {}, | ||
/** | ||
* The helper text for the color select (not visible yet) | ||
*/ | ||
helper: {}, | ||
/** | ||
* The options for the color select | ||
*/ | ||
options: {}, | ||
}, | ||
data() { | ||
return { | ||
newColor: "" | ||
}; | ||
}, | ||
computed: { | ||
hasColor() { | ||
return Boolean(this.value); | ||
} | ||
}, | ||
methods: { | ||
emitChanges(value) { | ||
this.$emit("input", value); | ||
this.$emit("update-state"); | ||
}, | ||
checkColor() { | ||
if (this.hasColor) { | ||
this.emitChanges(""); | ||
} | ||
}, | ||
selectColor(color) { | ||
this.emitChanges(color); | ||
}, | ||
parsedColor(color) { | ||
return color.split("-")[1]; | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.image-preview { | ||
border: 1px solid #ced4da; | ||
border-radius: 4px; | ||
height: 4em; | ||
text-align: center; | ||
overflow: hidden; | ||
} | ||
.color-option { | ||
left: -8px; | ||
border-radius: 4px; | ||
width: 48px; | ||
height: 48px; | ||
margin-right: 15px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
position: relative; | ||
} | ||
</style> |
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.