@dataloop-ai/components 0.20.188-ds-v3.0 → 0.20.188
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/compound/DlDateTime/DlDateTimeRange/DlDateTimeRange.vue +106 -101
- package/src/components/compound/DlDateTime/DlDateTimeRange/types.ts +0 -5
- package/src/components/compound/DlDropdownButton/DlDropdownButton.vue +27 -24
- package/src/components/compound/DlInput/DlInput.vue +0 -4
- package/src/components/compound/DlSearches/DlSearch/DlSearch.vue +0 -12
- package/src/components/compound/DlSearches/DlSmartSearch/DlSmartSearch.vue +8 -3
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +18 -58
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchJsonEditorDialog.vue +45 -187
- package/src/components/compound/DlSelect/DlSelect.vue +3 -15
- package/src/components/compound/DlSelect/components/DlSelectOption.vue +6 -7
- package/src/components/compound/DlStepper/components/DlStepperSidebar.vue +4 -1
- package/src/components/compound/DlStepper/models/Step.ts +9 -0
- package/src/components/compound/DlStepper/models/interfaces.ts +1 -0
- package/src/components/compound/DlTable/DlTable.vue +11 -11
- package/src/components/compound/DlTreeTable/DlTreeTable.vue +16 -16
- package/src/components/compound/DlTreeTable/views/DlTrTreeView.vue +1 -1
- package/src/components/essential/DlEllipsis/DlEllipsis.vue +7 -2
- package/src/components/essential/DlSwitch/DlSwitch.vue +4 -14
- package/src/components/shared/DlVirtualScroll/DlVirtualScroll.vue +1 -3
- package/src/demos/DlDateTimeRangeDemo.vue +0 -20
- package/src/demos/SmartSearchDemo/DlSmartSearchDemo.vue +0 -1
- package/src/components/compound/DlDateTime/DlDateTimeRange/DateTimeRangeContent.vue +0 -177
package/package.json
CHANGED
|
@@ -1,71 +1,104 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :id="uuid" class="dl-date-time-range">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
<date-input
|
|
4
|
+
:text="dateInputText"
|
|
5
|
+
:input-style="dateInputStyle"
|
|
6
|
+
:disabled="disabled"
|
|
7
|
+
:width="width"
|
|
8
|
+
>
|
|
9
|
+
<dl-menu
|
|
10
|
+
ref="dateTimeRangeMenu"
|
|
11
|
+
anchor="bottom middle"
|
|
12
|
+
self="top middle"
|
|
13
|
+
:offset="[0, 5]"
|
|
7
14
|
:disabled="disabled"
|
|
8
|
-
:width="width"
|
|
9
15
|
>
|
|
10
|
-
<dl-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
16
|
+
<div class="dl-date-time-range--card">
|
|
17
|
+
<div
|
|
18
|
+
v-if="mode === 'multi'"
|
|
19
|
+
class="dl-date-time-range--card_sidebar"
|
|
20
|
+
>
|
|
21
|
+
<card-sidebar
|
|
22
|
+
v-if="typeState === 'day'"
|
|
23
|
+
:options="sidebarDayOptions"
|
|
24
|
+
:current-option="currentSidebarOption"
|
|
25
|
+
@click="handleDayTypeOptionClick"
|
|
26
|
+
/>
|
|
27
|
+
<card-sidebar
|
|
28
|
+
v-else
|
|
29
|
+
:options="sidebarMonthOptions"
|
|
30
|
+
:current-option="currentSidebarOption"
|
|
31
|
+
@click="handleMonthTypeOptionClick"
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
<div
|
|
35
|
+
class="dl-date-time-range--card_content"
|
|
36
|
+
:style="cardContentStyles"
|
|
37
|
+
>
|
|
38
|
+
<dl-date-picker
|
|
39
|
+
:model-value="dateInterval"
|
|
40
|
+
:type="typeState"
|
|
41
|
+
:available-range="availableRange"
|
|
42
|
+
:disabled="isInputDisabled"
|
|
43
|
+
:normalize-calendars="normalizeCalendars"
|
|
44
|
+
:active-date-from="activeDateFrom"
|
|
45
|
+
:active-date-to="activeDateTo"
|
|
46
|
+
@update:model-value="
|
|
47
|
+
updateDateIntervalWithAutoClose
|
|
48
|
+
"
|
|
49
|
+
@update:from-to-date="updateFromToDate"
|
|
50
|
+
/>
|
|
51
|
+
<dl-time-picker
|
|
52
|
+
v-if="showTime && typeState === 'day'"
|
|
53
|
+
:disabled="isInputDisabled"
|
|
54
|
+
:model-value="dateInterval"
|
|
55
|
+
@update:model-value="updateDateInterval"
|
|
56
|
+
/>
|
|
57
|
+
|
|
58
|
+
<dl-button
|
|
59
|
+
size="s"
|
|
60
|
+
outlined
|
|
61
|
+
class="dl-date-time-range--button"
|
|
62
|
+
@click="handleClearAction"
|
|
63
|
+
>
|
|
64
|
+
<span style="text-transform: capitalize">
|
|
65
|
+
Clear
|
|
66
|
+
</span>
|
|
67
|
+
</dl-button>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</dl-menu>
|
|
71
|
+
</date-input>
|
|
44
72
|
</div>
|
|
45
73
|
</template>
|
|
46
74
|
<script lang="ts">
|
|
75
|
+
import { DlTimePicker } from '../DlTimePicker'
|
|
47
76
|
import { DateInterval } from '../types'
|
|
77
|
+
import CardSidebar from './CardSidebar.vue'
|
|
48
78
|
import {
|
|
49
79
|
DayTypeOption,
|
|
50
80
|
DAY_SIDEBAR_OPTION,
|
|
51
81
|
MonthTypeOption,
|
|
52
|
-
MONTH_SIDEBAR_OPTION
|
|
53
|
-
DATETIME_RANGE_VIEW_MODE
|
|
82
|
+
MONTH_SIDEBAR_OPTION
|
|
54
83
|
} from './types'
|
|
55
84
|
import { CustomDate } from '../DlDatePicker/models/CustomDate'
|
|
85
|
+
import DlDatePicker from '../DlDatePicker/DlDatePicker.vue'
|
|
56
86
|
import { CalendarDate } from '../DlDatePicker/models/CalendarDate'
|
|
57
87
|
import DateInput from './DateInput.vue'
|
|
58
|
-
import DateTimeRangeContent from './DateTimeRangeContent.vue'
|
|
59
88
|
import { DlMenu } from '../../../essential'
|
|
89
|
+
import { DlButton } from '../../../basic'
|
|
60
90
|
import { defineComponent, PropType } from 'vue-demi'
|
|
61
91
|
import { isInRange } from '../DlDatePicker/utils'
|
|
62
92
|
import { v4 } from 'uuid'
|
|
63
93
|
|
|
64
94
|
export default defineComponent({
|
|
65
95
|
components: {
|
|
96
|
+
CardSidebar,
|
|
97
|
+
DlDatePicker,
|
|
98
|
+
DlTimePicker,
|
|
66
99
|
DateInput,
|
|
67
|
-
|
|
68
|
-
|
|
100
|
+
DlMenu,
|
|
101
|
+
DlButton
|
|
69
102
|
},
|
|
70
103
|
model: {
|
|
71
104
|
prop: 'modelValue',
|
|
@@ -119,14 +152,6 @@ export default defineComponent({
|
|
|
119
152
|
shouldClearSelectFirstOption: {
|
|
120
153
|
type: Boolean,
|
|
121
154
|
default: false
|
|
122
|
-
},
|
|
123
|
-
viewMode: {
|
|
124
|
-
type: String as PropType<DATETIME_RANGE_VIEW_MODE>,
|
|
125
|
-
default: DATETIME_RANGE_VIEW_MODE.input
|
|
126
|
-
},
|
|
127
|
-
hideClearButton: {
|
|
128
|
-
type: Boolean,
|
|
129
|
-
default: false
|
|
130
155
|
}
|
|
131
156
|
},
|
|
132
157
|
emits: ['update:model-value', 'set-type', 'change'],
|
|
@@ -412,27 +437,6 @@ export default defineComponent({
|
|
|
412
437
|
return {
|
|
413
438
|
'--card-content-width': this.datePickerCardWidth
|
|
414
439
|
}
|
|
415
|
-
},
|
|
416
|
-
isInputMode(): boolean {
|
|
417
|
-
return this.viewMode === DATETIME_RANGE_VIEW_MODE.input
|
|
418
|
-
},
|
|
419
|
-
dateTimeRangeContentProps(): Record<string, any> {
|
|
420
|
-
return {
|
|
421
|
-
mode: this.mode,
|
|
422
|
-
typeState: this.typeState,
|
|
423
|
-
sidebarDayOptions: this.sidebarDayOptions,
|
|
424
|
-
sidebarMonthOptions: this.sidebarMonthOptions,
|
|
425
|
-
currentSidebarOption: this.currentSidebarOption,
|
|
426
|
-
dateInterval: this.dateInterval,
|
|
427
|
-
availableRange: this.availableRange,
|
|
428
|
-
isInputDisabled: this.isInputDisabled,
|
|
429
|
-
normalizeCalendars: this.normalizeCalendars,
|
|
430
|
-
activeDateFrom: this.activeDateFrom,
|
|
431
|
-
activeDateTo: this.activeDateTo,
|
|
432
|
-
showTime: this.showTime,
|
|
433
|
-
cardContentStyles: this.cardContentStyles,
|
|
434
|
-
hideClearButton: this.hideClearButton
|
|
435
|
-
}
|
|
436
440
|
}
|
|
437
441
|
},
|
|
438
442
|
watch: {
|
|
@@ -512,10 +516,7 @@ export default defineComponent({
|
|
|
512
516
|
this.typeState = value
|
|
513
517
|
this.$emit('set-type', value)
|
|
514
518
|
},
|
|
515
|
-
updateDateInterval(
|
|
516
|
-
value: DateInterval | null,
|
|
517
|
-
skipSidebarUpdate = false
|
|
518
|
-
) {
|
|
519
|
+
updateDateInterval(value: DateInterval | null) {
|
|
519
520
|
if (value === null) {
|
|
520
521
|
this.dateInterval = null
|
|
521
522
|
} else {
|
|
@@ -523,14 +524,6 @@ export default defineComponent({
|
|
|
523
524
|
from: value.from,
|
|
524
525
|
to: new Date(value.to)
|
|
525
526
|
}
|
|
526
|
-
// When in multi mode, update sidebar option to custom if user manually selects date
|
|
527
|
-
if (this.mode === 'multi' && !skipSidebarUpdate) {
|
|
528
|
-
this.currentSidebarOption =
|
|
529
|
-
this.typeState === 'day'
|
|
530
|
-
? DAY_SIDEBAR_OPTION.custom
|
|
531
|
-
: MONTH_SIDEBAR_OPTION.custom
|
|
532
|
-
this.isInputDisabled = false
|
|
533
|
-
}
|
|
534
527
|
}
|
|
535
528
|
this.$emit('update:model-value', value)
|
|
536
529
|
this.$emit('change', value)
|
|
@@ -539,24 +532,16 @@ export default defineComponent({
|
|
|
539
532
|
this.activeDateFrom = value?.from || null
|
|
540
533
|
this.activeDateTo = value?.to || null
|
|
541
534
|
},
|
|
542
|
-
updateDateIntervalWithAutoClose(
|
|
543
|
-
value
|
|
544
|
-
skipSidebarUpdate = false
|
|
545
|
-
) {
|
|
546
|
-
this.updateDateInterval(value, skipSidebarUpdate)
|
|
535
|
+
updateDateIntervalWithAutoClose(value: DateInterval) {
|
|
536
|
+
this.updateDateInterval(value)
|
|
547
537
|
|
|
548
|
-
if (
|
|
549
|
-
this.autoClose &&
|
|
550
|
-
this.viewMode === DATETIME_RANGE_VIEW_MODE.input
|
|
551
|
-
) {
|
|
538
|
+
if (this.autoClose) {
|
|
552
539
|
const dateTimeRangeMenu = this.$refs[
|
|
553
540
|
'dateTimeRangeMenu'
|
|
554
541
|
] as unknown as {
|
|
555
542
|
hide: () => void
|
|
556
543
|
}
|
|
557
|
-
|
|
558
|
-
dateTimeRangeMenu.hide()
|
|
559
|
-
}
|
|
544
|
+
dateTimeRangeMenu.hide()
|
|
560
545
|
}
|
|
561
546
|
},
|
|
562
547
|
handleDayTypeOptionClick(option: DayTypeOption) {
|
|
@@ -570,9 +555,9 @@ export default defineComponent({
|
|
|
570
555
|
|
|
571
556
|
if (option.key === DAY_SIDEBAR_OPTION.custom_by_month) {
|
|
572
557
|
this.handleTypeChange('month')
|
|
573
|
-
this.updateDateInterval(option.value
|
|
558
|
+
this.updateDateInterval(option.value)
|
|
574
559
|
} else {
|
|
575
|
-
this.updateDateIntervalWithAutoClose(option.value
|
|
560
|
+
this.updateDateIntervalWithAutoClose(option.value)
|
|
576
561
|
}
|
|
577
562
|
},
|
|
578
563
|
handleMonthTypeOptionClick(option: MonthTypeOption) {
|
|
@@ -586,9 +571,9 @@ export default defineComponent({
|
|
|
586
571
|
|
|
587
572
|
if (option.key === MONTH_SIDEBAR_OPTION.custom_by_day) {
|
|
588
573
|
this.handleTypeChange('day')
|
|
589
|
-
this.updateDateInterval(option.value
|
|
574
|
+
this.updateDateInterval(option.value)
|
|
590
575
|
} else {
|
|
591
|
-
this.updateDateIntervalWithAutoClose(option.value
|
|
576
|
+
this.updateDateIntervalWithAutoClose(option.value)
|
|
592
577
|
}
|
|
593
578
|
}
|
|
594
579
|
}
|
|
@@ -598,5 +583,25 @@ export default defineComponent({
|
|
|
598
583
|
.dl-date-time-range {
|
|
599
584
|
display: flex;
|
|
600
585
|
justify-content: center;
|
|
586
|
+
|
|
587
|
+
&--card {
|
|
588
|
+
background-color: var(--dl-color-bg);
|
|
589
|
+
z-index: 1;
|
|
590
|
+
display: flex;
|
|
591
|
+
border-radius: 2px;
|
|
592
|
+
border-radius: 2px;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
&--card_content {
|
|
596
|
+
width: var(--card-content-width);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
&--button {
|
|
600
|
+
display: flex;
|
|
601
|
+
margin-left: auto;
|
|
602
|
+
width: fit-content;
|
|
603
|
+
margin-right: 16px;
|
|
604
|
+
margin-bottom: 16px;
|
|
605
|
+
}
|
|
601
606
|
}
|
|
602
607
|
</style>
|
|
@@ -58,17 +58,15 @@
|
|
|
58
58
|
:style="`
|
|
59
59
|
background-color: ${separatorColor}`"
|
|
60
60
|
/>
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
/>
|
|
71
|
-
</slot>
|
|
61
|
+
<dl-icon
|
|
62
|
+
class="expand-icon"
|
|
63
|
+
:class="iconClass"
|
|
64
|
+
:icon="dropdownIcon"
|
|
65
|
+
:size="iconSize"
|
|
66
|
+
:color="getIconColor"
|
|
67
|
+
:tooltip="iconTooltip"
|
|
68
|
+
@click="onIconClicked"
|
|
69
|
+
/>
|
|
72
70
|
</dl-button>
|
|
73
71
|
<dl-menu
|
|
74
72
|
ref="menuRef"
|
|
@@ -118,7 +116,10 @@
|
|
|
118
116
|
@click="onClick"
|
|
119
117
|
>
|
|
120
118
|
<div class="dl-button-dropdown--simple__title">
|
|
121
|
-
<
|
|
119
|
+
<template v-if="hasLabelSlot">
|
|
120
|
+
<slot name="label" />
|
|
121
|
+
</template>
|
|
122
|
+
<template v-else>
|
|
122
123
|
<span
|
|
123
124
|
:class="{
|
|
124
125
|
'dl-button-no-wrap': noWrap
|
|
@@ -127,17 +128,15 @@
|
|
|
127
128
|
>
|
|
128
129
|
{{ label }}
|
|
129
130
|
</span>
|
|
130
|
-
</
|
|
131
|
-
<
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
/>
|
|
140
|
-
</slot>
|
|
131
|
+
</template>
|
|
132
|
+
<dl-icon
|
|
133
|
+
:class="iconClass"
|
|
134
|
+
:icon="dropdownIcon"
|
|
135
|
+
:size="iconSize"
|
|
136
|
+
:color="getIconColor"
|
|
137
|
+
:tooltip="iconTooltip"
|
|
138
|
+
@click="onIconClicked"
|
|
139
|
+
/>
|
|
141
140
|
</div>
|
|
142
141
|
|
|
143
142
|
<dl-menu
|
|
@@ -302,6 +301,9 @@ export default defineComponent({
|
|
|
302
301
|
const showing = ref<boolean>(!!props.modelValue) as Ref<boolean>
|
|
303
302
|
const menuRef = ref(null)
|
|
304
303
|
|
|
304
|
+
const hasLabelSlot = computed(() => {
|
|
305
|
+
return !!slots.label
|
|
306
|
+
})
|
|
305
307
|
const attributes = computed(() => {
|
|
306
308
|
const acc: Record<string, string> = {
|
|
307
309
|
'aria-expanded': showing.value === true ? 'true' : 'false',
|
|
@@ -510,7 +512,8 @@ export default defineComponent({
|
|
|
510
512
|
cssVars,
|
|
511
513
|
getIconColor,
|
|
512
514
|
computedTextColor,
|
|
513
|
-
separatorColor
|
|
515
|
+
separatorColor,
|
|
516
|
+
hasLabelSlot
|
|
514
517
|
}
|
|
515
518
|
}
|
|
516
519
|
})
|
|
@@ -1470,9 +1470,6 @@ export default defineComponent({
|
|
|
1470
1470
|
&--s {
|
|
1471
1471
|
height: 18px;
|
|
1472
1472
|
}
|
|
1473
|
-
&--m {
|
|
1474
|
-
height: 26px;
|
|
1475
|
-
}
|
|
1476
1473
|
}
|
|
1477
1474
|
|
|
1478
1475
|
&__input {
|
|
@@ -1521,7 +1518,6 @@ export default defineComponent({
|
|
|
1521
1518
|
}
|
|
1522
1519
|
|
|
1523
1520
|
&--m {
|
|
1524
|
-
height: 12px;
|
|
1525
1521
|
line-height: 12px;
|
|
1526
1522
|
padding-top: 7px;
|
|
1527
1523
|
padding-bottom: 7px;
|
|
@@ -158,18 +158,6 @@ export default defineComponent({
|
|
|
158
158
|
},
|
|
159
159
|
onSearchButtonPress(): void {
|
|
160
160
|
this.$emit('search', this.modelValue)
|
|
161
|
-
},
|
|
162
|
-
focus(): void {
|
|
163
|
-
const inputComponent = this.$refs.input as InstanceType<
|
|
164
|
-
typeof DlInput
|
|
165
|
-
>
|
|
166
|
-
inputComponent?.focus()
|
|
167
|
-
},
|
|
168
|
-
blur(): void {
|
|
169
|
-
const inputComponent = this.$refs.input as InstanceType<
|
|
170
|
-
typeof DlInput
|
|
171
|
-
>
|
|
172
|
-
inputComponent?.blur()
|
|
173
161
|
}
|
|
174
162
|
}
|
|
175
163
|
})
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
2
|
+
<div
|
|
3
|
+
class="dl-smart-search"
|
|
4
|
+
:style="cssVars"
|
|
5
|
+
>
|
|
6
|
+
<div
|
|
7
|
+
ref="inputWrapper"
|
|
8
|
+
class="dl-smart-search__input-wrapper"
|
|
9
|
+
>
|
|
4
10
|
<dl-smart-search-input
|
|
5
11
|
ref="smartSearchInput"
|
|
6
12
|
v-model="queryObject"
|
|
@@ -12,7 +18,6 @@
|
|
|
12
18
|
:color-schema="colorSchema"
|
|
13
19
|
:strict="strict"
|
|
14
20
|
:placeholder="placeholder"
|
|
15
|
-
:disabled="disabled"
|
|
16
21
|
@focus="isFocused = true"
|
|
17
22
|
@blur="isFocused = false"
|
|
18
23
|
@search="emitSearchQuery"
|
|
@@ -12,7 +12,11 @@
|
|
|
12
12
|
:icon="
|
|
13
13
|
focused ? defaultIcon : statusIcon || defaultIcon
|
|
14
14
|
"
|
|
15
|
-
:color="
|
|
15
|
+
:color="
|
|
16
|
+
focused
|
|
17
|
+
? defaultIconColor
|
|
18
|
+
: statusIconColor || defaultIconColor
|
|
19
|
+
"
|
|
16
20
|
size="16px"
|
|
17
21
|
:inline="false"
|
|
18
22
|
/>
|
|
@@ -49,7 +53,7 @@
|
|
|
49
53
|
</div>
|
|
50
54
|
</div>
|
|
51
55
|
<dl-tooltip
|
|
52
|
-
v-if="!focused
|
|
56
|
+
v-if="!focused"
|
|
53
57
|
border="1px solid var(--dl-color-separator)"
|
|
54
58
|
background-color="dl-color-panel-background"
|
|
55
59
|
color="dl-color-darker"
|
|
@@ -244,10 +248,6 @@ export default defineComponent({
|
|
|
244
248
|
type: String,
|
|
245
249
|
default: '28px'
|
|
246
250
|
},
|
|
247
|
-
noTooltip: {
|
|
248
|
-
type: Boolean,
|
|
249
|
-
default: false
|
|
250
|
-
},
|
|
251
251
|
omitSuggestions: {
|
|
252
252
|
type: Array as PropType<string[]>,
|
|
253
253
|
default: () => [] as string[]
|
|
@@ -275,7 +275,6 @@ export default defineComponent({
|
|
|
275
275
|
'blur',
|
|
276
276
|
'input',
|
|
277
277
|
'search',
|
|
278
|
-
'status',
|
|
279
278
|
'error',
|
|
280
279
|
'clear'
|
|
281
280
|
],
|
|
@@ -298,7 +297,6 @@ export default defineComponent({
|
|
|
298
297
|
defaultIcon,
|
|
299
298
|
defaultIconColor,
|
|
300
299
|
schema,
|
|
301
|
-
noTooltip,
|
|
302
300
|
omitSuggestions,
|
|
303
301
|
operatorsOverride,
|
|
304
302
|
height,
|
|
@@ -962,16 +960,6 @@ export default defineComponent({
|
|
|
962
960
|
}
|
|
963
961
|
})
|
|
964
962
|
|
|
965
|
-
const iconColor = computed(() => {
|
|
966
|
-
if (disabled.value) {
|
|
967
|
-
return 'dl-color-disabled'
|
|
968
|
-
}
|
|
969
|
-
if (focused.value) {
|
|
970
|
-
return defaultIconColor.value
|
|
971
|
-
}
|
|
972
|
-
return statusIconColor.value || defaultIconColor.value
|
|
973
|
-
})
|
|
974
|
-
|
|
975
963
|
const textareaStyles = computed<Record<string, string | number>>(() => {
|
|
976
964
|
const overflow: string =
|
|
977
965
|
scroll.value && focused.value ? 'scroll' : 'hidden'
|
|
@@ -1006,14 +994,9 @@ export default defineComponent({
|
|
|
1006
994
|
})
|
|
1007
995
|
|
|
1008
996
|
const inputClass = computed<string>(() => {
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
}
|
|
1013
|
-
if (disabled.value) {
|
|
1014
|
-
classes += ' dl-smart-search-input__textarea--disabled'
|
|
1015
|
-
}
|
|
1016
|
-
return classes
|
|
997
|
+
return `dl-smart-search-input__textarea${
|
|
998
|
+
focused.value ? ' focus' : ''
|
|
999
|
+
}`
|
|
1017
1000
|
})
|
|
1018
1001
|
|
|
1019
1002
|
const showClearButton = computed(() => {
|
|
@@ -1052,31 +1035,24 @@ export default defineComponent({
|
|
|
1052
1035
|
return status.value
|
|
1053
1036
|
}
|
|
1054
1037
|
|
|
1055
|
-
let newStatus: {
|
|
1056
|
-
type: string
|
|
1057
|
-
message: string
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
1038
|
if (!error.value && searchQuery.value !== '') {
|
|
1061
|
-
|
|
1039
|
+
return {
|
|
1062
1040
|
type: 'success',
|
|
1063
1041
|
message: ''
|
|
1064
1042
|
}
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
if (error.value === 'warning') {
|
|
1046
|
+
return {
|
|
1067
1047
|
type: 'warning',
|
|
1068
1048
|
message: 'The query is not supported technically.'
|
|
1069
1049
|
}
|
|
1070
|
-
} else {
|
|
1071
|
-
newStatus = {
|
|
1072
|
-
type: 'error',
|
|
1073
|
-
message: error.value
|
|
1074
|
-
}
|
|
1075
1050
|
}
|
|
1076
1051
|
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1052
|
+
return {
|
|
1053
|
+
type: 'error',
|
|
1054
|
+
message: error.value
|
|
1055
|
+
}
|
|
1080
1056
|
})
|
|
1081
1057
|
|
|
1082
1058
|
const inputPlaceholder = computed<string>(() => {
|
|
@@ -1197,7 +1173,6 @@ export default defineComponent({
|
|
|
1197
1173
|
debouncedSetInputValue,
|
|
1198
1174
|
statusIcon,
|
|
1199
1175
|
statusIconColor,
|
|
1200
|
-
iconColor,
|
|
1201
1176
|
textareaStyles,
|
|
1202
1177
|
searchBarClasses,
|
|
1203
1178
|
inputClass,
|
|
@@ -1350,21 +1325,6 @@ export default defineComponent({
|
|
|
1350
1325
|
}
|
|
1351
1326
|
}
|
|
1352
1327
|
|
|
1353
|
-
&__textarea--disabled {
|
|
1354
|
-
&::before {
|
|
1355
|
-
color: var(--dl-color-disabled);
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
&__search-bar--disabled {
|
|
1360
|
-
.dl-smart-search-input__input,
|
|
1361
|
-
.dl-smart-search-input__textarea {
|
|
1362
|
-
&::before {
|
|
1363
|
-
color: var(--dl-color-disabled);
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
1328
|
&__input-wrapper,
|
|
1369
1329
|
&__textarea-wrapper {
|
|
1370
1330
|
min-height: 28px;
|