@dataloop-ai/components 0.20.183-ds-v3.2 → 0.20.184
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/assets/theme.css +2 -0
- package/src/components/compound/DlDateTime/DlDateTimeRange/DlDateTimeRange.vue +106 -101
- package/src/components/compound/DlDateTime/DlDateTimeRange/types.ts +0 -5
- 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/components/DlSmartSearchInput.vue +7 -24
- 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/DlTable/DlTable.vue +32 -20
- package/src/components/compound/DlTable/hooks/use-sortable.ts +6 -0
- package/src/components/compound/DlTreeTable/DlTreeTable.vue +2 -4
- package/src/components/compound/DlTreeTable/views/DlTrTreeView.vue +1 -1
- package/src/components/essential/DlProgressBar/DlProgressBar.vue +8 -10
- 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
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
:id="uuid"
|
|
4
|
-
class="dl-progress-wrapper"
|
|
5
|
-
:style="`width: ${width};`"
|
|
6
|
-
>
|
|
2
|
+
<div :id="uuid" class="dl-progress-wrapper" :style="`width: ${width};`">
|
|
7
3
|
<p
|
|
8
|
-
v-if="label"
|
|
4
|
+
v-if="label || labelSlot"
|
|
9
5
|
data-test-id="progress-label"
|
|
10
6
|
align="left"
|
|
11
7
|
class="dl-progress-bar-label"
|
|
12
8
|
>
|
|
13
9
|
{{ label }}
|
|
10
|
+
<slot name="label"> </slot>
|
|
14
11
|
</p>
|
|
15
12
|
<div class="progress-container">
|
|
16
13
|
<span
|
|
@@ -35,10 +32,7 @@
|
|
|
35
32
|
{{ computedValue }}{{ showPercentage ? '%' : '' }}
|
|
36
33
|
</p>
|
|
37
34
|
</div>
|
|
38
|
-
<div
|
|
39
|
-
v-if="summary"
|
|
40
|
-
class="summary"
|
|
41
|
-
>
|
|
35
|
+
<div v-if="summary" class="summary">
|
|
42
36
|
<div>
|
|
43
37
|
{{ summary }}
|
|
44
38
|
</div>
|
|
@@ -63,6 +57,10 @@ export default defineComponent({
|
|
|
63
57
|
type: String,
|
|
64
58
|
default: null
|
|
65
59
|
},
|
|
60
|
+
labelSlot: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false
|
|
63
|
+
},
|
|
66
64
|
showValue: {
|
|
67
65
|
type: Boolean,
|
|
68
66
|
required: false,
|
|
@@ -7,14 +7,12 @@
|
|
|
7
7
|
}`"
|
|
8
8
|
>
|
|
9
9
|
<label
|
|
10
|
-
v-if="
|
|
10
|
+
v-if="!!leftLabel"
|
|
11
11
|
class="left dl-switch-label"
|
|
12
12
|
:for="computedId"
|
|
13
13
|
:style="cssLabelVars"
|
|
14
14
|
>
|
|
15
|
-
|
|
16
|
-
{{ leftLabel }}
|
|
17
|
-
</slot>
|
|
15
|
+
{{ leftLabel }}
|
|
18
16
|
</label>
|
|
19
17
|
<span
|
|
20
18
|
class="dl-switch-container"
|
|
@@ -37,14 +35,12 @@
|
|
|
37
35
|
/>
|
|
38
36
|
</span>
|
|
39
37
|
<label
|
|
40
|
-
v-if="
|
|
38
|
+
v-if="!!rightLabel"
|
|
41
39
|
class="right dl-switch-label"
|
|
42
40
|
:for="computedId"
|
|
43
41
|
:style="cssLabelVars"
|
|
44
42
|
>
|
|
45
|
-
|
|
46
|
-
{{ rightLabel }}
|
|
47
|
-
</slot>
|
|
43
|
+
{{ rightLabel }}
|
|
48
44
|
</label>
|
|
49
45
|
</div>
|
|
50
46
|
</template>
|
|
@@ -147,12 +143,6 @@ export default defineComponent({
|
|
|
147
143
|
? this.index === -1
|
|
148
144
|
: toRaw(this.modelValue) === toRaw(this.falseValue)
|
|
149
145
|
},
|
|
150
|
-
hasLeftLabel(): boolean {
|
|
151
|
-
return !!this.leftLabel || !!this.$slots['left-label']
|
|
152
|
-
},
|
|
153
|
-
hasRightLabel(): boolean {
|
|
154
|
-
return !!this.rightLabel || !!this.$slots['right-label']
|
|
155
|
-
},
|
|
156
146
|
cssVars(): Record<string, string> {
|
|
157
147
|
return {
|
|
158
148
|
'--dl-checkbox-height': `${this.size}px`,
|
|
@@ -124,9 +124,7 @@ export default defineComponent({
|
|
|
124
124
|
|
|
125
125
|
let localScrollTarget: HTMLElement | undefined
|
|
126
126
|
const rootRef: Ref<HTMLElement | null> = ref(null)
|
|
127
|
-
const scrollSizeItem: Ref<number> = ref(
|
|
128
|
-
virtualScrollItemSize.value || 40
|
|
129
|
-
)
|
|
127
|
+
const scrollSizeItem: Ref<number> = ref(40)
|
|
130
128
|
|
|
131
129
|
const isDefined = (v: any) => v !== undefined && v !== null
|
|
132
130
|
|
|
@@ -176,26 +176,6 @@
|
|
|
176
176
|
@change="handleModelValueUpdate"
|
|
177
177
|
/>
|
|
178
178
|
</div>
|
|
179
|
-
<div style="width: 500px; margin-top: 30px">
|
|
180
|
-
<div style="margin-bottom: 10px; font-weight: bold">
|
|
181
|
-
Inline Mode
|
|
182
|
-
</div>
|
|
183
|
-
<dl-date-time-range
|
|
184
|
-
v-model="date"
|
|
185
|
-
:type="type"
|
|
186
|
-
width="100%"
|
|
187
|
-
:available-range="range ? availableRange : null"
|
|
188
|
-
:mode="mode"
|
|
189
|
-
:show-time="showTime"
|
|
190
|
-
:auto-close="autoClose"
|
|
191
|
-
:including-current-month="includesCurrentMonthEnd"
|
|
192
|
-
:should-clear-select-first-option="shouldClearSelectFirstOption"
|
|
193
|
-
:disabled-type="type === 'day' ? 'month' : 'day'"
|
|
194
|
-
view-mode="inline"
|
|
195
|
-
@set-type="handleSetType"
|
|
196
|
-
@change="handleModelValueUpdate"
|
|
197
|
-
/>
|
|
198
|
-
</div>
|
|
199
179
|
</div>
|
|
200
180
|
</template>
|
|
201
181
|
<script lang="ts">
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="dl-date-time-range--card">
|
|
3
|
-
<div v-if="mode === 'multi'" class="dl-date-time-range--card_sidebar">
|
|
4
|
-
<card-sidebar
|
|
5
|
-
v-if="typeState === 'day'"
|
|
6
|
-
:options="sidebarDayOptions"
|
|
7
|
-
:current-option="currentSidebarOption"
|
|
8
|
-
@click="handleDayTypeOptionClick"
|
|
9
|
-
/>
|
|
10
|
-
<card-sidebar
|
|
11
|
-
v-else
|
|
12
|
-
:options="sidebarMonthOptions"
|
|
13
|
-
:current-option="currentSidebarOption"
|
|
14
|
-
@click="handleMonthTypeOptionClick"
|
|
15
|
-
/>
|
|
16
|
-
</div>
|
|
17
|
-
<div
|
|
18
|
-
class="dl-date-time-range--card_content"
|
|
19
|
-
:style="cardContentStyles"
|
|
20
|
-
>
|
|
21
|
-
<dl-date-picker
|
|
22
|
-
:model-value="dateInterval"
|
|
23
|
-
:type="typeState"
|
|
24
|
-
:available-range="availableRange"
|
|
25
|
-
:disabled="isInputDisabled"
|
|
26
|
-
:normalize-calendars="normalizeCalendars"
|
|
27
|
-
:active-date-from="activeDateFrom"
|
|
28
|
-
:active-date-to="activeDateTo"
|
|
29
|
-
@update:model-value="updateDateIntervalWithAutoClose"
|
|
30
|
-
@update:from-to-date="updateFromToDate"
|
|
31
|
-
/>
|
|
32
|
-
<dl-time-picker
|
|
33
|
-
v-if="showTime && typeState === 'day'"
|
|
34
|
-
:disabled="isInputDisabled"
|
|
35
|
-
:model-value="dateInterval"
|
|
36
|
-
@update:model-value="updateDateInterval"
|
|
37
|
-
/>
|
|
38
|
-
|
|
39
|
-
<dl-button
|
|
40
|
-
v-if="!hideClearButton"
|
|
41
|
-
size="s"
|
|
42
|
-
outlined
|
|
43
|
-
class="dl-date-time-range--button"
|
|
44
|
-
@click="handleClear"
|
|
45
|
-
>
|
|
46
|
-
<span style="text-transform: capitalize"> Clear </span>
|
|
47
|
-
</dl-button>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</template>
|
|
51
|
-
|
|
52
|
-
<script lang="ts">
|
|
53
|
-
import { defineComponent, PropType } from 'vue-demi'
|
|
54
|
-
import { DlTimePicker } from '../DlTimePicker'
|
|
55
|
-
import { DateInterval } from '../types'
|
|
56
|
-
import CardSidebar from './CardSidebar.vue'
|
|
57
|
-
import { DayTypeOption, MonthTypeOption } from './types'
|
|
58
|
-
import DlDatePicker from '../DlDatePicker/DlDatePicker.vue'
|
|
59
|
-
import { CalendarDate } from '../DlDatePicker/models/CalendarDate'
|
|
60
|
-
import { DlButton } from '../../../basic'
|
|
61
|
-
|
|
62
|
-
export default defineComponent({
|
|
63
|
-
components: {
|
|
64
|
-
CardSidebar,
|
|
65
|
-
DlDatePicker,
|
|
66
|
-
DlTimePicker,
|
|
67
|
-
DlButton
|
|
68
|
-
},
|
|
69
|
-
props: {
|
|
70
|
-
mode: {
|
|
71
|
-
type: String as PropType<'single' | 'multi'>,
|
|
72
|
-
required: true
|
|
73
|
-
},
|
|
74
|
-
typeState: {
|
|
75
|
-
type: String as PropType<'day' | 'month'>,
|
|
76
|
-
required: true
|
|
77
|
-
},
|
|
78
|
-
sidebarDayOptions: {
|
|
79
|
-
type: Array as PropType<DayTypeOption[]>,
|
|
80
|
-
required: true
|
|
81
|
-
},
|
|
82
|
-
sidebarMonthOptions: {
|
|
83
|
-
type: Array as PropType<MonthTypeOption[]>,
|
|
84
|
-
required: true
|
|
85
|
-
},
|
|
86
|
-
currentSidebarOption: {
|
|
87
|
-
type: String,
|
|
88
|
-
required: true
|
|
89
|
-
},
|
|
90
|
-
dateInterval: {
|
|
91
|
-
type: Object as PropType<DateInterval | null>,
|
|
92
|
-
default: null
|
|
93
|
-
},
|
|
94
|
-
availableRange: {
|
|
95
|
-
type: Object as PropType<Partial<DateInterval> | null>,
|
|
96
|
-
default: null
|
|
97
|
-
},
|
|
98
|
-
isInputDisabled: {
|
|
99
|
-
type: Boolean,
|
|
100
|
-
default: false
|
|
101
|
-
},
|
|
102
|
-
normalizeCalendars: {
|
|
103
|
-
type: Boolean,
|
|
104
|
-
default: false
|
|
105
|
-
},
|
|
106
|
-
activeDateFrom: {
|
|
107
|
-
type: Object as PropType<CalendarDate | null>,
|
|
108
|
-
default: null
|
|
109
|
-
},
|
|
110
|
-
activeDateTo: {
|
|
111
|
-
type: Object as PropType<CalendarDate | null>,
|
|
112
|
-
default: null
|
|
113
|
-
},
|
|
114
|
-
showTime: {
|
|
115
|
-
type: Boolean,
|
|
116
|
-
default: false
|
|
117
|
-
},
|
|
118
|
-
cardContentStyles: {
|
|
119
|
-
type: Object as PropType<Record<string, any>>,
|
|
120
|
-
default: () => ({})
|
|
121
|
-
},
|
|
122
|
-
hideClearButton: {
|
|
123
|
-
type: Boolean,
|
|
124
|
-
default: false
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
emits: [
|
|
128
|
-
'day-type-option-click',
|
|
129
|
-
'month-type-option-click',
|
|
130
|
-
'update-date-interval',
|
|
131
|
-
'update-date-interval-with-auto-close',
|
|
132
|
-
'update-from-to-date',
|
|
133
|
-
'clear'
|
|
134
|
-
],
|
|
135
|
-
methods: {
|
|
136
|
-
handleDayTypeOptionClick(option: DayTypeOption) {
|
|
137
|
-
this.$emit('day-type-option-click', option)
|
|
138
|
-
},
|
|
139
|
-
handleMonthTypeOptionClick(option: MonthTypeOption) {
|
|
140
|
-
this.$emit('month-type-option-click', option)
|
|
141
|
-
},
|
|
142
|
-
updateDateInterval(value: DateInterval | null) {
|
|
143
|
-
this.$emit('update-date-interval', value)
|
|
144
|
-
},
|
|
145
|
-
updateDateIntervalWithAutoClose(value: DateInterval) {
|
|
146
|
-
this.$emit('update-date-interval-with-auto-close', value)
|
|
147
|
-
},
|
|
148
|
-
updateFromToDate(value?: { from: CalendarDate; to: CalendarDate }) {
|
|
149
|
-
this.$emit('update-from-to-date', value)
|
|
150
|
-
},
|
|
151
|
-
handleClear() {
|
|
152
|
-
this.$emit('clear')
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
})
|
|
156
|
-
</script>
|
|
157
|
-
|
|
158
|
-
<style lang="scss" scoped>
|
|
159
|
-
.dl-date-time-range--card {
|
|
160
|
-
background-color: var(--dl-color-bg);
|
|
161
|
-
z-index: 1;
|
|
162
|
-
display: flex;
|
|
163
|
-
border-radius: 2px;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.dl-date-time-range--card_content {
|
|
167
|
-
width: var(--card-content-width);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.dl-date-time-range--button {
|
|
171
|
-
display: flex;
|
|
172
|
-
margin-left: auto;
|
|
173
|
-
width: fit-content;
|
|
174
|
-
margin-right: 16px;
|
|
175
|
-
margin-bottom: 16px;
|
|
176
|
-
}
|
|
177
|
-
</style>
|