Skip to content

Commit

Permalink
Rename some ldap UI files and variables
Browse files Browse the repository at this point in the history
  • Loading branch information
VakarisZ committed Jun 22, 2023
1 parent e362d04 commit 97a68a1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
:options="inputOptions"
:value="inputValue"
:label="text"
:loading="isLoading"
:isLoading="isLoading"
:track-by="text"
:single-label="singleLabel"
:on-select="onSelect"
:on-remove="onRemove"
:on-open="onOpen"
:on-close="onClose"
:no-connection="noConnection"
:is-connected="isConnected"
:is-focused="isFocused"
:is-disabled="isDisabled"
:placeholder="$i18n.t('Search')"
Expand All @@ -25,7 +25,7 @@ import {BaseInputChosenOneSearchableProps} from '@/components/new'
import {getFormNamespace, setFormNamespace} from '@/composables/useInputValue'
import {computed, inject, ref, unref} from '@vue/composition-api'
import MultiselectFacade
from '@/views/Configuration/sources/_components/ldapCondition/multiselectFacade.vue'
from '@/views/Configuration/sources/_components/ldapCondition/MultiselectFacade.vue'
import {namespaceToYupPath} from '@/composables/useInputValidator'
import {valueToSelectValue} from '@/utils/convert';
import ProvidedKeys from '@/views/Configuration/sources/_components/ldapCondition/ProvidedKeys';
Expand All @@ -46,9 +46,9 @@ function setup(props, _) { // eslint-disable-line
const form = inject('form')
const isFocused = ref(false)
const isLoading = computed(() => inject(ProvidedKeys.LdapAttributesLoading).value)
const noConnection = computed(() => !inject(ProvidedKeys.connectedToLdap).value)
const isConnected = computed(() => inject(ProvidedKeys.connectedToLdap).value)
const allOptions = computed(() => {
if (noConnection.value) {
if (!isConnected.value) {
return []
}
return moveSelectionToTop(inject(ProvidedKeys.LdapAttributes).value.map(valueToSelectValue))
Expand Down Expand Up @@ -121,7 +121,7 @@ function setup(props, _) { // eslint-disable-line
isDisabled,
isFocused,
isLoading,
noConnection,
isConnected,
onSelect,
onOpen,
onClose,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
:on-open="onOpen"
:on-remove="onRemove"
:on-close="onClose"
:no-connection="noConnection"
:is-connected="isConnected"
:is-focused="isFocused"
:is-disabled="isDisabled"
:loading="isLoading"
:isLoading="isLoading"
:placeholder="$i18n.t('Search')"
:search-query-invalid-feedback="searchQueryInvalidFeedback"
:search-query-valid-feedback="''"
Expand All @@ -26,14 +26,11 @@ import {BaseInputChosenOneSearchableProps} from '@/components/new'
import {getFormNamespace, setFormNamespace} from '@/composables/useInputValue'
import {computed, inject, ref, unref} from '@vue/composition-api'
import MultiselectFacade
from '@/views/Configuration/sources/_components/ldapCondition/multiselectFacade.vue'
from '@/views/Configuration/sources/_components/ldapCondition/MultiselectFacade.vue'
import {namespaceToYupPath} from '@/composables/useInputValidator'
import {valueToSelectValue} from '@/utils/convert'
import _ from 'lodash'
import ProvidedKeys from '@/views/Configuration/sources/_components/ldapCondition/ProvidedKeys';
import {
parseLdapStringToArray
} from '@/views/Configuration/sources/_components/ldapCondition/common';
export const props = {
Expand Down Expand Up @@ -79,7 +76,7 @@ function setup(props, context) { // eslint-disable-line
const isLoading = ref(false)
const isDisabled = inject('isLoading')
const sendLdapSearchRequest = inject(ProvidedKeys.performSearch)
const noConnection = computed(() => !inject(ProvidedKeys.connectedToLdap).value)
const isConnected = computed(() => inject(ProvidedKeys.connectedToLdap).value)
const defaultSelectedValue = null
const selectedValue = ref(defaultSelectedValue)
const initialValue = getFormNamespace(props.namespace.split('.'), form.value)
Expand Down Expand Up @@ -182,7 +179,7 @@ function setup(props, context) { // eslint-disable-line
isDisabled,
isLoading,
isFocused,
noConnection,
isConnected,
onSearch,
onSelect,
onOpen,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
:label="label"
:limit="limit"
:limit-text="limitText"
:loading="loading"
:loading="isLoading"
:name="name"
:options="selectOptions"
:open-direction="openDirection"
Expand Down Expand Up @@ -44,14 +44,14 @@
<i aria-hidden="true" tabindex="1" class="multiselect__tag-icon"></i>
</span>
</template>
<template v-if="!noConnection" v-slot:beforeList>
<template v-if="isConnected" v-slot:beforeList>
<li v-if="!internalSearch" class="multiselect__element">
<div class="col-form-label py-1 px-2 text-dark text-left bg-light border-bottom">
{{ $t('Type to search') }}
</div>
</li>
</template>
<template v-if="noConnection" v-slot:noOptions>
<template v-if="!isConnected" v-slot:noOptions>
<b-media class="text-secondary" md="auto">
<template #aside>
<icon name="exclamation-triangle" scale="1.5" class="mt-2 ml-2"></icon>
Expand All @@ -69,7 +69,7 @@
<b-form-text class="font-weight-light">{{ $t('Type to search results.') }}</b-form-text>
</b-media>
</template>
<template v-if="!loading" v-slot:noResult>
<template v-if="!isLoading" v-slot:noResult>
<b-media class="text-secondary" md="auto">
<template v-slot:aside>
<icon name="search" scale="1.5" class="mt-2 ml-2"></icon>
Expand Down Expand Up @@ -109,10 +109,6 @@ export const props = {
validator: value => ['sm', 'md', 'lg'].includes(value)
},
noConnection: {
type: Boolean,
default: false
},
onSearch: {
type: Function,
Expand Down Expand Up @@ -144,6 +140,11 @@ export const props = {
}
},
isConnected: {
type: Boolean,
default: true
},
isFocused: {
type: Boolean,
default: false
Expand All @@ -154,16 +155,16 @@ export const props = {
default: false
},
isLoading: {
type: Boolean,
default: false
},
singleLabel: {
type: String,
default: ''
},
loading: {
type: Boolean,
default: false
},
searchQueryInvalidFeedback: {
type: String,
default: ''
Expand Down

0 comments on commit 97a68a1

Please sign in to comment.