@dataloop-ai/components 0.20.178-ds-v3.0 → 0.20.178
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/basic/DlAlert/DlAlert.vue +130 -41
- package/src/components/compound/DlDateTime/DlDateTimeRange/DlDateTimeRange.vue +99 -88
- package/src/components/compound/DlDateTime/DlDateTimeRange/types.ts +0 -5
- 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 +2 -10
- package/src/components/compound/DlTable/DlTable.vue +11 -11
- package/src/components/compound/DlTreeTable/DlTreeTable.vue +2 -4
- package/src/components/compound/DlTreeTable/views/DlTrTreeView.vue +1 -1
- package/src/components/essential/DlSwitch/DlSwitch.vue +4 -14
- package/src/demos/DlAlertDemo.vue +40 -0
- 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,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>
|