Rename calculate position global mixin to avoid name collisions
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
:reduce="s => s.connectionID"
|
||||
:placeholder="$t('connection.placeholder')"
|
||||
:get-option-label="getConnectionLabel"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
/>
|
||||
</b-form-group>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
:placeholder="$t('searchFields')"
|
||||
:get-option-label="getOptionLabel"
|
||||
:options="filterFieldOptions(rule)"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
/>
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
option-text="label"
|
||||
:reduce="f => f.name"
|
||||
append-to-body
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
:class="{ 'filter-field-picker': !!filter.name }"
|
||||
class="field-selector bg-white"
|
||||
@input="onChange($event, groupIndex, index)"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
:close-on-select="false"
|
||||
append-to-body
|
||||
:placeholder="$t('kind.user.roles.placeholder')"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
multiple
|
||||
label="name"
|
||||
class="bg-white"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
option-value="recordID"
|
||||
option-text="label"
|
||||
:append-to-body="appendToBody"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
:clearable="false"
|
||||
:filterable="false"
|
||||
:searchable="searchable"
|
||||
@@ -74,7 +74,7 @@
|
||||
option-value="recordID"
|
||||
option-text="label"
|
||||
:append-to-body="appendToBody"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
:clearable="false"
|
||||
:filterable="false"
|
||||
:searchable="searchable"
|
||||
@@ -103,7 +103,7 @@
|
||||
option-value="recordID"
|
||||
option-text="label"
|
||||
:append-to-body="appendToBody"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
:clearable="false"
|
||||
:filterable="false"
|
||||
:searchable="searchable"
|
||||
@@ -144,7 +144,7 @@
|
||||
option-value="recordID"
|
||||
option-text="label"
|
||||
:append-to-body="appendToBody"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
:placeholder="placeholder"
|
||||
:filterable="false"
|
||||
:searchable="searchable"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
:get-option-label="getOptionLabel"
|
||||
:get-option-key="getOptionKey"
|
||||
:append-to-body="appendToBody"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
:clearable="false"
|
||||
:filterable="false"
|
||||
:selectable="option => option.selectable"
|
||||
@@ -71,7 +71,7 @@
|
||||
:get-option-label="getOptionLabel"
|
||||
:get-option-key="getOptionKey"
|
||||
:append-to-body="appendToBody"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
:filterable="false"
|
||||
:selectable="option => option.selectable"
|
||||
:loading="processing"
|
||||
@@ -98,7 +98,7 @@
|
||||
:get-option-key="getOptionKey"
|
||||
:value="getUserByIndex(ctx.index)"
|
||||
:append-to-body="appendToBody"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
:clearable="false"
|
||||
:filterable="false"
|
||||
:selectable="option => option.selectable"
|
||||
@@ -129,7 +129,7 @@
|
||||
:get-option-key="getOptionKey"
|
||||
:value="getUserByIndex()"
|
||||
:append-to-body="appendToBody"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
:filterable="false"
|
||||
:selectable="option => option.selectable"
|
||||
:loading="processing"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
:value="namespace"
|
||||
:selectable="option => option.namespaceID !== namespace.namespaceID"
|
||||
:placeholder="$t('pickNamespace')"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
@option:selected="namespaceSelected"
|
||||
>
|
||||
<template #list-header>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
:get-option-label="getUserLabel"
|
||||
:loading="processingUsers"
|
||||
:placeholder="$t('field.kind.user.suggestionPlaceholder')"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
:reduce="user => user.userID"
|
||||
option-value="userID"
|
||||
class="bg-white"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:options="charts"
|
||||
:placeholder="$t('chart.pick')"
|
||||
:reduce="option => option.chartID"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
label="name"
|
||||
append-to-body
|
||||
class="chart-selector bg-white"
|
||||
@@ -50,7 +50,7 @@
|
||||
:disabled="!options.drillDown.enabled"
|
||||
:get-option-label="o => o.title || o.kind"
|
||||
:reduce="option => option.blockID"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
:clearable="true"
|
||||
:placeholder="$t('chart.drillDown.openInModal')"
|
||||
append-to-body
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
:placeholder="$t('metric.edit.metricFieldSelect')"
|
||||
:options="metricFields"
|
||||
:reduce="f => f.name"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
/>
|
||||
</b-form-group>
|
||||
@@ -194,7 +194,7 @@
|
||||
:placeholder="$t('metric.edit.metricSelectAggregate')"
|
||||
:options="aggregationOperations"
|
||||
:reduce="a => a.operation"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
/>
|
||||
</b-form-group>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
:options="tree"
|
||||
append-to-body
|
||||
label="title"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
:reduce="f => f.pageID"
|
||||
option-value="pageID"
|
||||
option-text="title"
|
||||
@@ -60,7 +60,6 @@ import base from './base'
|
||||
|
||||
import { VueSelect } from 'vue-select'
|
||||
import { compose } from '@cortezaproject/corteza-js'
|
||||
import calculatePosition from 'corteza-webapp-compose/src/mixins/vue-select-position'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -69,10 +68,6 @@ export default {
|
||||
|
||||
extends: base,
|
||||
|
||||
mixins: [
|
||||
calculatePosition,
|
||||
],
|
||||
|
||||
props: {
|
||||
namespace: {
|
||||
type: compose.Namespace,
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
:placeholder="$t('progress.module.select')"
|
||||
:options="modules"
|
||||
:reduce="m => m.moduleID"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
/>
|
||||
</b-form-group>
|
||||
@@ -78,7 +78,7 @@
|
||||
:placeholder="$t('progress.field.select')"
|
||||
:options="valueModuleFields"
|
||||
:reduce="f => f.name"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
@input="fieldChanged($event, options.value)"
|
||||
/>
|
||||
@@ -99,7 +99,7 @@
|
||||
:placeholder="$t('progress.aggregate.select')"
|
||||
:options="aggregationOperations"
|
||||
:reduce="a => a.operation"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
/>
|
||||
</b-form-group>
|
||||
@@ -144,7 +144,7 @@
|
||||
:placeholder="$t('progress.module.select')"
|
||||
:options="modules"
|
||||
:reduce="m => m.moduleID"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
/>
|
||||
</b-form-group>
|
||||
@@ -185,7 +185,7 @@
|
||||
:placeholder="$t('progress.field.select')"
|
||||
:options="minValueModuleFields"
|
||||
:reduce="f => f.name"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
@input="fieldChanged($event, options.minValue)"
|
||||
/>
|
||||
@@ -206,7 +206,7 @@
|
||||
:placeholder="$t('progress.aggregate.select')"
|
||||
:options="aggregationOperations"
|
||||
:reduce="a => a.operation"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
/>
|
||||
</b-form-group>
|
||||
@@ -251,7 +251,7 @@
|
||||
:placeholder="$t('progress.module.select')"
|
||||
:options="modules"
|
||||
:reduce="m => m.moduleID"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
/>
|
||||
</b-form-group>
|
||||
@@ -292,7 +292,7 @@
|
||||
:placeholder="$t('progress.field.select')"
|
||||
:options="maxValueModuleFields"
|
||||
:reduce="f => f.name"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
@input="fieldChanged($event, options.maxValue)"
|
||||
/>
|
||||
@@ -313,7 +313,7 @@
|
||||
:placeholder="$t('progress.aggregate.select')"
|
||||
:options="aggregationOperations"
|
||||
:reduce="a => a.operation"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
/>
|
||||
</b-form-group>
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
:selectable="option => isSelectable(option)"
|
||||
:get-option-label="getOptionLabel"
|
||||
:reduce="option => option.isSystem ? option.name : option.fieldID"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="field-selector bg-white"
|
||||
/>
|
||||
</b-td>
|
||||
|
||||
@@ -315,7 +315,7 @@
|
||||
:get-option-label="getRoleLabel"
|
||||
:placeholder="$t('recordList.filter.role.placeholder')"
|
||||
:reduce="role => role.roleID"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
append-to-body
|
||||
multiple
|
||||
class="bg-white"
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
:get-option-label="getBlockLabel"
|
||||
:selectable="option => isSelectable(option)"
|
||||
:reduce="option => option.value"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
append-to-body
|
||||
class="block-selector bg-white"
|
||||
/>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
:get-option-label="getFieldLabel"
|
||||
:options="moduleFields"
|
||||
append-to-body
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
:selectable="option => !fields.includes(option.name)"
|
||||
:reduce="f => f.name"
|
||||
class="bg-white position-relative"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createPopper } from '@popperjs/core'
|
||||
|
||||
export default {
|
||||
methods: {
|
||||
calculatePosition (dropdownList, component, { width }) {
|
||||
calculateDropdownPosition (dropdownList, component, { width }) {
|
||||
/**
|
||||
* We need to explicitly define the dropdown width since
|
||||
* it is usually inherited from the parent with CSS.
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
option-value="value"
|
||||
:placeholder="$t('colorScheme.placeholder')"
|
||||
:clearable="true"
|
||||
:calculate-position="calculatePosition"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white h-100 w-100"
|
||||
>
|
||||
<template #option="option">
|
||||
|
||||
Reference in New Issue
Block a user