@dataloop-ai/components 0.20.194-ds-v3.0 → 0.20.195
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 +2 -2
- package/src/components/basic/DlButton/DlButton.vue +8 -9
- 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 +19 -71
- 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 +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/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/utils/splitByQuotes.ts +11 -0
- package/src/components/compound/DlDateTime/DlDateTimeRange/DateTimeRangeContent.vue +0 -177
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
<div
|
|
162
162
|
v-if="
|
|
163
163
|
visibleColumns &&
|
|
164
|
-
|
|
164
|
+
visibleColumns.length
|
|
165
165
|
"
|
|
166
166
|
class="visible-columns-justify-end"
|
|
167
167
|
style="width: 100%; display: flex"
|
|
@@ -274,8 +274,8 @@
|
|
|
274
274
|
isRowSelected(getRowKey(props.item))
|
|
275
275
|
? 'selected'
|
|
276
276
|
: hasAnyAction
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
? ' cursor-pointer'
|
|
278
|
+
: ''
|
|
279
279
|
"
|
|
280
280
|
:no-hover="noHover"
|
|
281
281
|
@click="
|
|
@@ -565,7 +565,7 @@
|
|
|
565
565
|
<div
|
|
566
566
|
v-if="
|
|
567
567
|
visibleColumns &&
|
|
568
|
-
|
|
568
|
+
visibleColumns.length
|
|
569
569
|
"
|
|
570
570
|
class="visible-columns-justify-end"
|
|
571
571
|
style="width: 100%; display: flex"
|
|
@@ -674,8 +674,8 @@
|
|
|
674
674
|
<dl-top-scroll
|
|
675
675
|
v-if="
|
|
676
676
|
tableScroll &&
|
|
677
|
-
|
|
678
|
-
|
|
677
|
+
infiniteScroll &&
|
|
678
|
+
!isDataEmpty
|
|
679
679
|
"
|
|
680
680
|
:container-ref="tableScroll"
|
|
681
681
|
@scroll-to-top="
|
|
@@ -709,8 +709,8 @@
|
|
|
709
709
|
isRowSelected(getRowKey(row))
|
|
710
710
|
? 'selected'
|
|
711
711
|
: hasAnyAction
|
|
712
|
-
|
|
713
|
-
|
|
712
|
+
? ' cursor-pointer'
|
|
713
|
+
: ''
|
|
714
714
|
"
|
|
715
715
|
:no-hover="noHover"
|
|
716
716
|
@click="onTrClick($event, row, pageIndex)"
|
|
@@ -845,8 +845,8 @@
|
|
|
845
845
|
<dl-bottom-scroll
|
|
846
846
|
v-if="
|
|
847
847
|
tableScroll &&
|
|
848
|
-
|
|
849
|
-
|
|
848
|
+
infiniteScroll &&
|
|
849
|
+
!isDataEmpty
|
|
850
850
|
"
|
|
851
851
|
:container-ref="tableScroll"
|
|
852
852
|
@scroll-to-bottom="
|
|
@@ -903,7 +903,7 @@
|
|
|
903
903
|
<div
|
|
904
904
|
v-if="
|
|
905
905
|
hasBottomSelectionBanner &&
|
|
906
|
-
|
|
906
|
+
selectedRowsLabel(rowsSelectedNumber)
|
|
907
907
|
"
|
|
908
908
|
class="dl-table__control"
|
|
909
909
|
>
|
|
@@ -266,11 +266,11 @@ export default defineComponent({
|
|
|
266
266
|
emptyStateProps: {
|
|
267
267
|
type: Object as PropType<DlEmptyStateProps>,
|
|
268
268
|
default: () =>
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
269
|
+
({
|
|
270
|
+
title: '',
|
|
271
|
+
subtitle: 'No data to show yet',
|
|
272
|
+
icon: 'icon-dl-dataset-filled'
|
|
273
|
+
} as unknown as PropType<DlEmptyStateProps>)
|
|
274
274
|
},
|
|
275
275
|
/**
|
|
276
276
|
* Custom icon class to use for expanded rows.
|
|
@@ -392,7 +392,7 @@ export default defineComponent({
|
|
|
392
392
|
typeof props.rowKey === 'function'
|
|
393
393
|
? props.rowKey
|
|
394
394
|
: (row: Record<string, any>) =>
|
|
395
|
-
|
|
395
|
+
row[props.rowKey as string] ?? ''
|
|
396
396
|
)
|
|
397
397
|
|
|
398
398
|
const hasDraggableRows = computed(() =>
|
|
@@ -537,7 +537,7 @@ export default defineComponent({
|
|
|
537
537
|
const onMultipleSelectionSet = (val: boolean) => {
|
|
538
538
|
const value =
|
|
539
539
|
selectedData.value.length > 0 &&
|
|
540
|
-
|
|
540
|
+
selectedData.value.length === tableRows.value.length
|
|
541
541
|
? false
|
|
542
542
|
: val
|
|
543
543
|
|
|
@@ -811,9 +811,7 @@ export default defineComponent({
|
|
|
811
811
|
targetRow: finalTarget
|
|
812
812
|
})
|
|
813
813
|
|
|
814
|
-
const isDragValid =
|
|
815
|
-
shouldSkipValidation ||
|
|
816
|
-
checkParentCondition(draggedRow.value, finalTarget)
|
|
814
|
+
const isDragValid = shouldSkipValidation || checkParentCondition(draggedRow.value, finalTarget)
|
|
817
815
|
if (isDragValid) {
|
|
818
816
|
const smartSortingMovement = {
|
|
819
817
|
...sortingMovement.value,
|
|
@@ -837,9 +835,10 @@ export default defineComponent({
|
|
|
837
835
|
return
|
|
838
836
|
}
|
|
839
837
|
|
|
840
|
-
const srcEl =
|
|
841
|
-
originalEvent.
|
|
842
|
-
|
|
838
|
+
const srcEl =
|
|
839
|
+
(originalEvent.srcElement ||
|
|
840
|
+
originalEvent.target ||
|
|
841
|
+
null) as HTMLElement | null
|
|
843
842
|
const passedElement = srcEl ? getElementAbove(srcEl, 'dl-tr') : null
|
|
844
843
|
if (passedElement) {
|
|
845
844
|
const targetRowId = passedElement.dataset.id
|
|
@@ -1244,7 +1243,7 @@ export default defineComponent({
|
|
|
1244
1243
|
this.vue2h = vue2h
|
|
1245
1244
|
const tableBodySlot = isVue2
|
|
1246
1245
|
? this.$slots['table-body'] &&
|
|
1247
|
-
|
|
1246
|
+
(() => (this.$slots['table-body'] as any)?.pop())
|
|
1248
1247
|
: this.$slots['table-body']
|
|
1249
1248
|
const tbody =
|
|
1250
1249
|
tableBodySlot ?? (this.isDataEmpty ? null : this.renderTBody)
|
|
@@ -1308,7 +1307,7 @@ export default defineComponent({
|
|
|
1308
1307
|
justify-content: center;
|
|
1309
1308
|
flex-wrap: wrap;
|
|
1310
1309
|
|
|
1311
|
-
|
|
1310
|
+
&>* {
|
|
1312
1311
|
flex-grow: 1;
|
|
1313
1312
|
}
|
|
1314
1313
|
}
|
|
@@ -1337,6 +1336,7 @@ tr {
|
|
|
1337
1336
|
}
|
|
1338
1337
|
|
|
1339
1338
|
.sticky-header {
|
|
1339
|
+
|
|
1340
1340
|
::v-deep .dl-table__top,
|
|
1341
1341
|
::v-deep .dl-table__bottom,
|
|
1342
1342
|
::v-deep thead tr:first-child th {
|
|
@@ -1359,4 +1359,4 @@ tr {
|
|
|
1359
1359
|
top: 40px;
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
|
-
</style>
|
|
1362
|
+
</style>
|
|
@@ -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">
|
|
@@ -96,6 +96,17 @@ tokenizer.rule(/\s+/, (ctx) => {
|
|
|
96
96
|
ctx.accept(TokenType.WHITESPACE)
|
|
97
97
|
})
|
|
98
98
|
|
|
99
|
+
tokenizer.rule(/[a-z*]*/i, (ctx, match) => {
|
|
100
|
+
if (
|
|
101
|
+
ctx.tagged(Tags.HAD_FIELD) &&
|
|
102
|
+
!ctx.tagged(Tags.HAD_VALUE) &&
|
|
103
|
+
!['TRUE', 'FALSE'].includes(match[0].toUpperCase())
|
|
104
|
+
) {
|
|
105
|
+
// an unquoted string with an asterisk
|
|
106
|
+
ctx.accept(TokenType.PARTIAL_VALUE).tag(Tags.HAD_VALUE)
|
|
107
|
+
}
|
|
108
|
+
})
|
|
109
|
+
|
|
99
110
|
tokenizer.rule(/.+/, (ctx, match) => {
|
|
100
111
|
// unrecognized token
|
|
101
112
|
ctx.accept(TokenType.WHITESPACE, match[0].replaceAll(/./g, ' '))
|
|
@@ -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>
|