@dataloop-ai/components 0.20.196 → 0.20.198

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.
Files changed (31) hide show
  1. package/package.json +1 -1
  2. package/src/assets/globals.scss +2 -10
  3. package/src/components/basic/DlButton/DlButton.vue +9 -8
  4. package/src/components/compound/DlDateTime/DlDateTimeRange/DateTimeRangeContent.vue +177 -0
  5. package/src/components/compound/DlDateTime/DlDateTimeRange/DlDateTimeRange.vue +101 -106
  6. package/src/components/compound/DlDateTime/DlDateTimeRange/types.ts +5 -0
  7. package/src/components/compound/DlDropdownButton/DlDropdownButton.vue +24 -27
  8. package/src/components/compound/DlInput/DlInput.vue +9 -5
  9. package/src/components/compound/DlPagination/DlPagination.vue +3 -3
  10. package/src/components/compound/DlPagination/components/PageNavigation.vue +55 -39
  11. package/src/components/compound/DlPagination/components/PaginationLegend.vue +1 -1
  12. package/src/components/compound/DlPagination/components/QuickNavigation.vue +19 -17
  13. package/src/components/compound/DlPagination/components/RowsSelector.vue +4 -5
  14. package/src/components/compound/DlSearches/DlSearch/DlSearch.vue +12 -0
  15. package/src/components/compound/DlSearches/DlSmartSearch/DlSmartSearch.vue +3 -8
  16. package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +71 -19
  17. package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchJsonEditorDialog.vue +187 -45
  18. package/src/components/compound/DlSelect/DlSelect.vue +22 -10
  19. package/src/components/compound/DlSelect/components/DlSelectOption.vue +7 -6
  20. package/src/components/compound/DlTable/DlTable.vue +21 -17
  21. package/src/components/compound/DlTable/styles/dl-table-styles.scss +21 -21
  22. package/src/components/compound/DlTreeTable/DlTreeTable.vue +16 -16
  23. package/src/components/compound/DlTreeTable/views/DlTrTreeView.vue +1 -1
  24. package/src/components/essential/DlCheckbox/DlCheckbox.vue +8 -23
  25. package/src/components/essential/DlIcon/DlIcon.vue +1 -1
  26. package/src/components/essential/DlLink/DlLink.vue +14 -8
  27. package/src/components/essential/DlSwitch/DlSwitch.vue +14 -4
  28. package/src/components/essential/DlTypography/DlTypography.vue +1 -1
  29. package/src/components/shared/DlVirtualScroll/DlVirtualScroll.vue +3 -1
  30. package/src/demos/DlDateTimeRangeDemo.vue +20 -0
  31. package/src/demos/SmartSearchDemo/DlSmartSearchDemo.vue +1 -0
@@ -9,20 +9,20 @@
9
9
  border-spacing: 0;
10
10
 
11
11
  .vertical-border {
12
- border-left: 1px solid var(--dl-color-separator);
13
- border-right: 1px solid var(--dl-color-separator);
12
+ border-left: 1px solid var(--dell-gray-300);
13
+ border-right: 1px solid var(--dell-gray-300);
14
14
  }
15
15
 
16
16
  thead {
17
17
  position: sticky;
18
18
  top: 0;
19
- background-color: var(--dl-color-panel-background);
19
+ background-color: var(--dell-white);
20
20
  z-index: 50;
21
21
  }
22
22
 
23
23
  .sticky-col {
24
24
  position: sticky;
25
- background-color: var(--dl-color-panel-background);
25
+ background-color: var(--dell-white);
26
26
  z-index: 50;
27
27
  }
28
28
 
@@ -84,7 +84,7 @@
84
84
  //markup-table
85
85
 
86
86
  &__card {
87
- background-color: var(--dl-color-panel-background);
87
+ background-color: var(--dell-white);
88
88
  border-radius: 2px;
89
89
 
90
90
  .dl-table__middle {
@@ -101,7 +101,7 @@
101
101
  .dl-table__bottom,
102
102
  thead tr:first-child th {
103
103
  /* bg color is important for th; just specify one */
104
- background-color: var(--dl-color-panel-background);
104
+ background-color: var(--dell-white);
105
105
  }
106
106
 
107
107
  thead tr th {
@@ -134,14 +134,14 @@
134
134
  opacity: 1;
135
135
  }
136
136
  td:not(.dl-td--no-hover) {
137
- background-color: var(--dl-color-fill-hover);
137
+ background-color: var(--dell-blue-100);
138
138
  }
139
139
  }
140
140
  }
141
141
 
142
142
  tbody tr.highlighted {
143
143
  td {
144
- background-color: var(--dl-color-fill);
144
+ background-color: var(--dell-blue-100);
145
145
  }
146
146
  }
147
147
 
@@ -158,7 +158,7 @@
158
158
  font-weight: 400;
159
159
  font-size: 14px;
160
160
  line-height: 14px;
161
- color: var(--dl-color-medium);
161
+ color: var(--dell-gray-900);
162
162
  background-color: inherit;
163
163
  user-select: none;
164
164
 
@@ -197,7 +197,7 @@
197
197
  }
198
198
 
199
199
  .dl-td {
200
- background-color: var(--dl-color-panel-background);
200
+ background-color: var(--dell-white);
201
201
  &--no-hover {
202
202
  &:hover {
203
203
  background-color: none !important;
@@ -211,7 +211,7 @@
211
211
 
212
212
  tbody {
213
213
  tr.selected td {
214
- background-color: var(--dl-color-fill);
214
+ background-color: var(--dell-blue-100);
215
215
  }
216
216
 
217
217
  tr.selected td:after {
@@ -264,11 +264,11 @@
264
264
  font-size: 20px;
265
265
  letter-spacing: 0.005em;
266
266
  font-weight: 400;
267
- color: var(--dl-color-darker);
267
+ color: var(--dell-gray-800);
268
268
  }
269
269
 
270
270
  &--bordered {
271
- border: 1px solid var(--dl-color-separator);
271
+ border: 1px solid var(--dell-gray-300);
272
272
  border-radius: 2px;
273
273
  }
274
274
 
@@ -321,7 +321,7 @@
321
321
  }
322
322
 
323
323
  &__bottom {
324
- border-top: 1px solid var(--dl-color-separator);
324
+ border-top: 1px solid var(--dell-gray-300);
325
325
  min-height: 50px;
326
326
  padding: 4px 14px 4px 16px;
327
327
  font-size: 12px;
@@ -364,7 +364,7 @@
364
364
  tr,
365
365
  th,
366
366
  td {
367
- border-color: var(--dl-color-separator);
367
+ border-color: var(--dell-gray-300);
368
368
 
369
369
  &>label {
370
370
  padding: 0;
@@ -377,7 +377,7 @@
377
377
  font-size: 12px;
378
378
  line-height: 14px;
379
379
  background-color: inherit;
380
- color: var(--dl-color-darker);
380
+ color: var(--dell-gray-800);
381
381
 
382
382
  text-overflow: ellipsis;
383
383
  white-space: nowrap;
@@ -400,13 +400,13 @@
400
400
  }
401
401
 
402
402
  &__is-dragging {
403
- background-color: var(--dl-color-fill);
403
+ background-color: var(--dell-blue-200);
404
404
  }
405
405
 
406
406
  &__selected {
407
- background-color: var(--dl-color-fill) !important;
407
+ background-color: var(--dell-blue-100) !important;
408
408
  color: var(--dl-color-fill) !important;
409
- border-color: var(--dl-color-fill) !important;
409
+ border-color: var(--dell-gray-300) !important;
410
410
  }
411
411
 
412
412
  &__drag {
@@ -419,7 +419,7 @@
419
419
  box-shadow: 0px 3px 6px rgba(16, 30, 115, 0.15);
420
420
  border-radius: 2px;
421
421
  font-size: 12px;
422
- background-color: var(--dl-color-panel-background);
422
+ background-color: var(--dell-white);
423
423
 
424
424
  & th {
425
425
  cursor: grabbing !important;
@@ -554,7 +554,7 @@
554
554
 
555
555
  .dl-table__top {
556
556
  position: relative;
557
- border-bottom: 1px solid var(--dl-color-separator);
557
+ border-bottom: 1px solid var(--dell-gray-300);
558
558
  }
559
559
  }
560
560
 
@@ -266,11 +266,11 @@ export default defineComponent({
266
266
  emptyStateProps: {
267
267
  type: Object as PropType<DlEmptyStateProps>,
268
268
  default: () =>
269
- ({
270
- title: '',
271
- subtitle: 'No data to show yet',
272
- icon: 'icon-dl-dataset-filled'
273
- } as unknown as PropType<DlEmptyStateProps>)
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
- row[props.rowKey as string] ?? ''
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
- selectedData.value.length === tableRows.value.length
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 = shouldSkipValidation || checkParentCondition(draggedRow.value, finalTarget)
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
- (originalEvent.srcElement ||
840
- originalEvent.target ||
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
- (() => (this.$slots['table-body'] as any)?.pop())
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>
@@ -16,7 +16,7 @@
16
16
  }`"
17
17
  >
18
18
  <dl-icon
19
- v-if="hasDraggableRows && !row.disableDraggable"
19
+ v-if="hasDraggableRows && !row.disableDraggable"
20
20
  class="draggable-icon"
21
21
  icon="icon-dl-drag"
22
22
  size="12px"
@@ -1,9 +1,5 @@
1
1
  <template>
2
- <div
3
- :id="uuid"
4
- :class="identifierClass"
5
- class="container-wrapper"
6
- >
2
+ <div :id="uuid" :class="identifierClass" class="container-wrapper">
7
3
  <label
8
4
  ref="container"
9
5
  :for="computedId"
@@ -15,10 +11,7 @@
15
11
  @keydown="onKeydown"
16
12
  @keyup="onKeyup"
17
13
  >
18
- <span
19
- class="checkbox-wrapper"
20
- :style="cssSvgVars"
21
- >
14
+ <span class="checkbox-wrapper" :style="cssSvgVars">
22
15
  <input
23
16
  :id="computedId"
24
17
  :value="value"
@@ -27,7 +20,7 @@
27
20
  tabindex="-1"
28
21
  :disabled="disabled"
29
22
  :style="cssSvgVars"
30
- >
23
+ />
31
24
  <svg
32
25
  class="check"
33
26
  :class="{ active: isTrue }"
@@ -56,21 +49,13 @@
56
49
  />
57
50
  </svg>
58
51
  </span>
59
- <span
60
- v-if="hasLabel"
61
- class="checkbox-label"
62
- :for="computedId"
63
- >
52
+ <span v-if="hasLabel" class="checkbox-label" :for="computedId">
64
53
  <slot>
65
54
  {{ label }}
66
55
  </slot>
67
56
  </span>
68
57
  </label>
69
- <div
70
- v-if="hasSubLabel"
71
- :style="subLabelStyle"
72
- class="sub-text"
73
- >
58
+ <div v-if="hasSubLabel" :style="subLabelStyle" class="sub-text">
74
59
  <slot name="sub-label">
75
60
  <span>{{ subLabel }}</span>
76
61
  </slot>
@@ -93,7 +78,7 @@ export default defineComponent({
93
78
  event: 'update:model-value'
94
79
  },
95
80
  props: {
96
- color: { type: String, default: 'dl-color-secondary' },
81
+ color: { type: String, default: 'dell-blue-500' },
97
82
  disabled: { type: Boolean, default: false },
98
83
  id: { type: [String, Number], default: null },
99
84
  modelValue: { type: ValueTypes, required: false, default: null },
@@ -174,9 +159,9 @@ export default defineComponent({
174
159
  methods: {
175
160
  getCurrentColor() {
176
161
  if (this.disabled) {
177
- return 'var(--dl-color-disabled)'
162
+ return 'var(--dell-gray-500)'
178
163
  }
179
- return getColor(this.color, 'dl-color-secondary')
164
+ return getColor(this.color, 'dell-blue-500')
180
165
  },
181
166
  onClick(e: Event) {
182
167
  if (e) {
@@ -127,7 +127,7 @@ export default defineComponent({
127
127
  color.value === 'secondary'
128
128
  ? 'q-color-secondary'
129
129
  : color.value,
130
- 'dl-color-icon-default'
130
+ 'dell-gray-800'
131
131
  )
132
132
  : 'inherit'
133
133
  }
@@ -1,13 +1,10 @@
1
1
  <template>
2
- <div
3
- :id="uuid"
4
- class="link-wrapper"
5
- >
2
+ <div :id="uuid" class="link-wrapper">
6
3
  <a
7
4
  :href="link"
8
5
  :target="target"
9
6
  :rel="rel"
10
- :style="`color: var(--${textColor});`"
7
+ :style="linkStyles"
11
8
  :class="`${disabled ? 'disabled' : ''}`"
12
9
  @click="$emit('click')"
13
10
  >
@@ -28,7 +25,8 @@ export default defineComponent({
28
25
  newtab: { required: false, default: false, type: Boolean },
29
26
  external: { required: false, default: false, type: Boolean },
30
27
  disabled: { required: false, default: false, type: Boolean },
31
- color: { required: false, type: String, default: null }
28
+ color: { required: false, type: String, default: null },
29
+ hoverColor: { required: false, type: String, default: null }
32
30
  },
33
31
  data() {
34
32
  return {
@@ -44,8 +42,13 @@ export default defineComponent({
44
42
  ? `${this.href}`
45
43
  : `${window.origin}/${this.href}`
46
44
  },
47
- textColor(): string {
48
- return this.color ?? 'dl-color-studio-secondary'
45
+ linkStyles(): Record<string, string> {
46
+ const textColor = this.color ?? 'dl-color-studio-secondary'
47
+ const hoverTextColor = this.hoverColor ?? textColor
48
+ return {
49
+ '--link-color': `var(--${textColor})`,
50
+ '--link-hover-color': `var(--${hoverTextColor})`
51
+ }
49
52
  },
50
53
  target(): string | null {
51
54
  if (!this.href) {
@@ -68,16 +71,19 @@ export default defineComponent({
68
71
  a {
69
72
  text-decoration: none;
70
73
  font-size: var(--dl-font-size-body);
74
+ color: var(--link-color) !important;
71
75
  }
72
76
 
73
77
  a:hover {
74
78
  text-decoration: underline;
75
79
  cursor: pointer;
80
+ color: var(--link-hover-color) !important;
76
81
  }
77
82
 
78
83
  .disabled {
79
84
  pointer-events: none;
80
85
  color: var(--dl-color-disabled) !important;
86
+ text-decoration: none !important;
81
87
  }
82
88
 
83
89
  .link-wrapper {
@@ -7,12 +7,14 @@
7
7
  }`"
8
8
  >
9
9
  <label
10
- v-if="!!leftLabel"
10
+ v-if="hasLeftLabel"
11
11
  class="left dl-switch-label"
12
12
  :for="computedId"
13
13
  :style="cssLabelVars"
14
14
  >
15
- {{ leftLabel }}
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="!!rightLabel"
40
+ v-if="hasRightLabel"
39
41
  class="right dl-switch-label"
40
42
  :for="computedId"
41
43
  :style="cssLabelVars"
42
44
  >
43
- {{ rightLabel }}
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`,
@@ -35,7 +35,7 @@ export default defineComponent({
35
35
  bold: Boolean,
36
36
  color: {
37
37
  type: String,
38
- default: 'dl-color-darker'
38
+ default: 'dell-gray-800'
39
39
  }
40
40
  },
41
41
  data() {
@@ -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(40)
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">
@@ -42,6 +42,7 @@
42
42
 
43
43
  <dl-smart-search-input
44
44
  v-model="queryObject"
45
+ no-tooltip
45
46
  :aliases="aliases"
46
47
  :schema="schema"
47
48
  :color-schema="colorSchema"