@dataloop-ai/components 0.20.186 → 0.20.187-ds-v3.0
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/DateTimeRangeContent.vue +177 -0
- package/src/components/compound/DlDateTime/DlDateTimeRange/DlDateTimeRange.vue +101 -106
- package/src/components/compound/DlDateTime/DlDateTimeRange/types.ts +5 -0
- package/src/components/compound/DlDropdownButton/DlDropdownButton.vue +24 -27
- package/src/components/compound/DlInput/DlInput.vue +4 -0
- package/src/components/compound/DlSearches/DlSearch/DlSearch.vue +12 -0
- package/src/components/compound/DlSearches/DlSmartSearch/DlSmartSearch.vue +3 -8
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +58 -18
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchJsonEditorDialog.vue +187 -45
- package/src/components/compound/DlSelect/DlSelect.vue +15 -3
- package/src/components/compound/DlSelect/components/DlSelectOption.vue +7 -6
- 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 +14 -4
- package/src/components/shared/DlVirtualScroll/DlVirtualScroll.vue +3 -1
- package/src/demos/DlDateTimeRangeDemo.vue +20 -0
- package/src/demos/SmartSearchDemo/DlSmartSearchDemo.vue +1 -0
|
@@ -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,7 +811,9 @@ export default defineComponent({
|
|
|
811
811
|
targetRow: finalTarget
|
|
812
812
|
})
|
|
813
813
|
|
|
814
|
-
const isDragValid =
|
|
814
|
+
const isDragValid =
|
|
815
|
+
shouldSkipValidation ||
|
|
816
|
+
checkParentCondition(draggedRow.value, finalTarget)
|
|
815
817
|
if (isDragValid) {
|
|
816
818
|
const smartSortingMovement = {
|
|
817
819
|
...sortingMovement.value,
|
|
@@ -835,10 +837,9 @@ export default defineComponent({
|
|
|
835
837
|
return
|
|
836
838
|
}
|
|
837
839
|
|
|
838
|
-
const srcEl =
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
null) as HTMLElement | null
|
|
840
|
+
const srcEl = (originalEvent.srcElement ||
|
|
841
|
+
originalEvent.target ||
|
|
842
|
+
null) as HTMLElement | null
|
|
842
843
|
const passedElement = srcEl ? getElementAbove(srcEl, 'dl-tr') : null
|
|
843
844
|
if (passedElement) {
|
|
844
845
|
const targetRowId = passedElement.dataset.id
|
|
@@ -1243,7 +1244,7 @@ export default defineComponent({
|
|
|
1243
1244
|
this.vue2h = vue2h
|
|
1244
1245
|
const tableBodySlot = isVue2
|
|
1245
1246
|
? this.$slots['table-body'] &&
|
|
1246
|
-
|
|
1247
|
+
(() => (this.$slots['table-body'] as any)?.pop())
|
|
1247
1248
|
: this.$slots['table-body']
|
|
1248
1249
|
const tbody =
|
|
1249
1250
|
tableBodySlot ?? (this.isDataEmpty ? null : this.renderTBody)
|
|
@@ -1307,7 +1308,7 @@ export default defineComponent({
|
|
|
1307
1308
|
justify-content: center;
|
|
1308
1309
|
flex-wrap: wrap;
|
|
1309
1310
|
|
|
1310
|
-
|
|
1311
|
+
& > * {
|
|
1311
1312
|
flex-grow: 1;
|
|
1312
1313
|
}
|
|
1313
1314
|
}
|
|
@@ -1336,7 +1337,6 @@ tr {
|
|
|
1336
1337
|
}
|
|
1337
1338
|
|
|
1338
1339
|
.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,12 +7,14 @@
|
|
|
7
7
|
}`"
|
|
8
8
|
>
|
|
9
9
|
<label
|
|
10
|
-
v-if="
|
|
10
|
+
v-if="hasLeftLabel"
|
|
11
11
|
class="left dl-switch-label"
|
|
12
12
|
:for="computedId"
|
|
13
13
|
:style="cssLabelVars"
|
|
14
14
|
>
|
|
15
|
-
|
|
15
|
+
<slot name="left-label">
|
|
16
|
+
{{ leftLabel }}
|
|
17
|
+
</slot>
|
|
16
18
|
</label>
|
|
17
19
|
<span
|
|
18
20
|
class="dl-switch-container"
|
|
@@ -35,12 +37,14 @@
|
|
|
35
37
|
/>
|
|
36
38
|
</span>
|
|
37
39
|
<label
|
|
38
|
-
v-if="
|
|
40
|
+
v-if="hasRightLabel"
|
|
39
41
|
class="right dl-switch-label"
|
|
40
42
|
:for="computedId"
|
|
41
43
|
:style="cssLabelVars"
|
|
42
44
|
>
|
|
43
|
-
|
|
45
|
+
<slot name="right-label">
|
|
46
|
+
{{ rightLabel }}
|
|
47
|
+
</slot>
|
|
44
48
|
</label>
|
|
45
49
|
</div>
|
|
46
50
|
</template>
|
|
@@ -143,6 +147,12 @@ export default defineComponent({
|
|
|
143
147
|
? this.index === -1
|
|
144
148
|
: toRaw(this.modelValue) === toRaw(this.falseValue)
|
|
145
149
|
},
|
|
150
|
+
hasLeftLabel(): boolean {
|
|
151
|
+
return !!this.leftLabel || !!this.$slots['left-label']
|
|
152
|
+
},
|
|
153
|
+
hasRightLabel(): boolean {
|
|
154
|
+
return !!this.rightLabel || !!this.$slots['right-label']
|
|
155
|
+
},
|
|
146
156
|
cssVars(): Record<string, string> {
|
|
147
157
|
return {
|
|
148
158
|
'--dl-checkbox-height': `${this.size}px`,
|
|
@@ -124,7 +124,9 @@ 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(
|
|
127
|
+
const scrollSizeItem: Ref<number> = ref(
|
|
128
|
+
virtualScrollItemSize.value || 40
|
|
129
|
+
)
|
|
128
130
|
|
|
129
131
|
const isDefined = (v: any) => v !== undefined && v !== null
|
|
130
132
|
|
|
@@ -176,6 +176,26 @@
|
|
|
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>
|
|
179
199
|
</div>
|
|
180
200
|
</template>
|
|
181
201
|
<script lang="ts">
|