@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
@@ -1443,18 +1443,18 @@ export default defineComponent({
1443
1443
  position: relative;
1444
1444
  display: flex;
1445
1445
  justify-content: space-between;
1446
- border: 1px solid var(--dl-color-separator);
1446
+ border: 1px solid var(--dell-gray-500);
1447
1447
  min-width: var(--dl-input-width);
1448
1448
  max-width: var(--dl-input-max-width);
1449
1449
  max-height: var(--dl-input-max-height);
1450
1450
  height: var(--dl-input-height);
1451
1451
 
1452
1452
  &--readonly {
1453
- border-color: var(--dl-color-separator) !important;
1453
+ border-color: var(--dell-gray-500) !important;
1454
1454
  }
1455
1455
 
1456
1456
  &:hover {
1457
- border-color: var(--dl-input-border-color-hover);
1457
+ border-color: var(--dell-gray-800);
1458
1458
  }
1459
1459
  &--error {
1460
1460
  border-color: var(--dl-color-negative);
@@ -1463,20 +1463,23 @@ export default defineComponent({
1463
1463
  border-color: var(--dl-input-border-color-hover);
1464
1464
  }
1465
1465
  &--disabled {
1466
- border-color: var(--dl-color-separator);
1466
+ border-color: var(--dell-gray-500);
1467
1467
  color: var(--dl-color-disabled);
1468
1468
  cursor: not-allowed;
1469
1469
  }
1470
1470
  &--s {
1471
1471
  height: 18px;
1472
1472
  }
1473
+ &--m {
1474
+ height: 26px;
1475
+ }
1473
1476
  }
1474
1477
 
1475
1478
  &__input {
1476
1479
  display: inline-block;
1477
1480
  font-family: Arial, Helvetica, sans-serif;
1478
1481
  border-right: none;
1479
- border-radius: 2px;
1482
+ border-radius: 0px;
1480
1483
  color: var(--dl-color-darker);
1481
1484
  white-space: var(--dl-input-white-space);
1482
1485
  font-size: var(--dl-font-size-body);
@@ -1518,6 +1521,7 @@ export default defineComponent({
1518
1521
  }
1519
1522
 
1520
1523
  &--m {
1524
+ height: 12px;
1521
1525
  line-height: 12px;
1522
1526
  padding-top: 7px;
1523
1527
  padding-bottom: 7px;
@@ -115,15 +115,15 @@ export default defineComponent({
115
115
  },
116
116
  textColor: {
117
117
  type: String,
118
- default: 'dl-color-darker'
118
+ default: 'dell-gray-800'
119
119
  },
120
120
  activeColor: {
121
121
  type: String,
122
- default: 'dl-color-secondary'
122
+ default: 'dell-blue-500'
123
123
  },
124
124
  activeTextColor: {
125
125
  type: String,
126
- default: 'dl-color-text-buttons'
126
+ default: 'dell-white'
127
127
  },
128
128
  totalItems: {
129
129
  type: Number,
@@ -1,18 +1,12 @@
1
1
  <template>
2
- <div
3
- class="dl-pagination--page_navigation"
4
- :style="cssVars"
5
- >
2
+ <div class="dl-pagination--page_navigation" :style="cssVars">
6
3
  <button
7
4
  v-if="boundaryLinks"
8
5
  class="dl-pagination--nav_button"
9
6
  :disabled="disabled || isFirstPage"
10
7
  @click="setPage(min)"
11
8
  >
12
- <dl-icon
13
- icon="icon-dl-first-page"
14
- size="16px"
15
- />
9
+ <dl-icon icon="icon-dl-first-page" size="16px" />
16
10
  </button>
17
11
  <button
18
12
  v-if="directionLinks"
@@ -20,10 +14,7 @@
20
14
  :disabled="disabled || isFirstPage"
21
15
  @click="setPage(value - 1)"
22
16
  >
23
- <dl-icon
24
- icon="icon-dl-previous-page"
25
- size="16px"
26
- />
17
+ <dl-icon icon="icon-dl-previous-page" size="16px" />
27
18
  </button>
28
19
  <div class="dl-pagination--page_buttons_wrapper">
29
20
  <button
@@ -92,10 +83,7 @@
92
83
  :disabled="disabled || isLastPage"
93
84
  @click="setPage(value + 1)"
94
85
  >
95
- <dl-icon
96
- icon="icon-dl-right-next-page"
97
- size="16px"
98
- />
86
+ <dl-icon icon="icon-dl-right-next-page" size="16px" />
99
87
  </button>
100
88
  <button
101
89
  v-if="boundaryLinks"
@@ -103,10 +91,7 @@
103
91
  :disabled="disabled || isLastPage"
104
92
  @click="setPage(max)"
105
93
  >
106
- <dl-icon
107
- icon="icon-dl-last-page"
108
- size="16px"
109
- />
94
+ <dl-icon icon="icon-dl-last-page" size="16px" />
110
95
  </button>
111
96
  </div>
112
97
  </template>
@@ -155,15 +140,15 @@ export default defineComponent({
155
140
  },
156
141
  textColor: {
157
142
  type: String,
158
- default: 'dl-color-darker'
143
+ default: 'dell-gray-800'
159
144
  },
160
145
  activeColor: {
161
146
  type: String,
162
- default: 'dl-color-secondary'
147
+ default: 'dell-blue-500'
163
148
  },
164
149
  activeTextColor: {
165
150
  type: String,
166
- default: 'dl-color-text-buttons'
151
+ default: 'dell-white'
167
152
  }
168
153
  },
169
154
  emits: ['update:model-value'],
@@ -194,12 +179,12 @@ export default defineComponent({
194
179
  ),
195
180
  '--dl-active-button-bg-color': getColor(
196
181
  this.activeColor,
197
- 'dl-color-secondary'
182
+ 'dell-blue-500'
198
183
  ),
199
- '--dl-text-color': getColor(this.textColor, 'dl-color-darker'),
184
+ '--dl-text-color': getColor(this.textColor, 'dell-gray-800'),
200
185
  '--dl-active-text-color': getColor(
201
186
  this.activeTextColor,
202
- 'dl-color-text-buttons'
187
+ 'dell-white'
203
188
  ),
204
189
  '--dl-button-min-width': this.buttonMinWidth
205
190
  }
@@ -319,44 +304,75 @@ export default defineComponent({
319
304
  }
320
305
 
321
306
  &--active {
322
- color: var(--dl-active-text-color) !important;
323
- background-color: var(--dl-active-button-bg-color) !important;
307
+ color: var(--dell-white) !important;
308
+ background-color: var(--dell-blue-500) !important;
324
309
  }
325
310
 
326
- &--page_button,
327
311
  &--nav_button {
312
+ display: flex;
313
+ align-items: center;
314
+ justify-content: center;
328
315
  min-width: var(--dl-button-min-width);
329
316
  padding: 0;
330
317
  cursor: pointer;
331
318
  border: none;
332
319
  border-radius: 2px;
333
- color: var(--dl-text-color);
320
+ color: var(--dell-blue-500) !important;
334
321
  background-color: var(--dl-button-bg-color);
335
322
 
336
- &:active:not(:disabled) {
337
- background-color: var(--dl-color-secondary);
338
- color: var(--dl-color-text-buttons);
323
+ &:hover:not(:disabled) {
324
+ color: var(--dell-blue-600);
325
+ border-radius: 2px;
326
+ background-color: var(--dell-gray-100);
327
+ border: 1px solid var(--dell-gray-100);
339
328
 
340
329
  ::v-deep .dl-icon {
341
- color: var(--dl-color-text-buttons);
330
+ color: var(--dell-blue-600);
331
+ }
332
+ }
333
+
334
+ &:disabled {
335
+ color: var(--dell-gray-500);
336
+ cursor: default;
337
+
338
+ ::v-deep .dl-icon {
339
+ color: var(--dell-gray-500);
340
+ }
341
+ }
342
+ }
343
+
344
+ &--page_button {
345
+ min-width: var(--dl-button-min-width);
346
+ padding: 0;
347
+ cursor: pointer;
348
+ border: none;
349
+ border-radius: 2px;
350
+ color: var(--dell-gray-800);
351
+ background-color: var(--dl-button-bg-color);
352
+
353
+ &:active:not(:disabled) {
354
+ background-color: var(--dell-blue-500);
355
+ color: var(--dell-white);
356
+ ::v-deep .dl-icon {
357
+ color: var(--dell-white);
342
358
  }
343
359
  }
344
360
 
345
361
  &:disabled {
346
- color: var(--dl-color-disabled);
362
+ color: var(--dell-gray-500);
347
363
  cursor: default;
348
364
 
349
365
  ::v-deep .dl-icon {
350
- color: var(--dl-color-disabled);
366
+ color: var(--dell-gray-500);
351
367
  }
352
368
  }
353
369
 
354
370
  &:hover:not(:disabled):not(.active) {
355
- background-color: var(--dl-color-hover);
356
- color: var(--dl-color-text-buttons);
371
+ background-color: var(--dell-gray-100);
372
+ color: var(--dell-gray-800);
357
373
 
358
374
  ::v-deep .dl-icon {
359
- color: var(--dl-color-text-buttons);
375
+ color: var(--dell-gray-800);
360
376
  }
361
377
  }
362
378
  }
@@ -81,7 +81,7 @@ export default defineComponent({
81
81
  .dl-pagination--legend {
82
82
  justify-content: flex-end;
83
83
  display: flex;
84
- color: var(--dl-color-lighter);
84
+ color: var(--dell-gray-500);
85
85
  height: 100%;
86
86
  min-width: min-content;
87
87
  overflow-y: scroll;
@@ -10,32 +10,31 @@
10
10
  :disabled="disabled"
11
11
  @keydown="handleKeyDown"
12
12
  @keyup="handleKeyUp"
13
- >
14
- <dl-button
15
- size="s"
16
- flat
17
- margin="0"
18
- class="dl-pagination--quick_nav_button"
13
+ />
14
+ <dl-link
15
+ class="dl-pagination--quick_nav_link"
16
+ color="dell-blue-600"
19
17
  :disabled="disabled"
18
+ hover-color="dell-blue-700"
20
19
  @click="handleNavigation"
21
20
  >
22
21
  Go
23
- </dl-button>
22
+ </dl-link>
24
23
  </div>
25
24
  </template>
26
25
 
27
26
  <script lang="ts">
28
27
  import { defineComponent } from 'vue-demi'
29
- import { DlButton } from '../../../basic'
30
28
  import { DlTypography } from '../../../essential'
31
29
  import { stopAndPrevent } from '../../../../utils'
32
30
  import { admissibleKeys } from '../../../../utils/nav-keys-constants'
31
+ import { DlLink } from '../../../essential'
33
32
 
34
33
  export default defineComponent({
35
34
  name: 'QuickNavigation',
36
35
  components: {
37
36
  DlTypography,
38
- DlButton
37
+ DlLink
39
38
  },
40
39
  model: {
41
40
  prop: 'modelValue',
@@ -96,16 +95,16 @@ export default defineComponent({
96
95
  &--quick_navigation {
97
96
  display: flex;
98
97
  align-items: center;
99
- color: var(--dl-color-darker);
98
+ color: var(--dell-gray-800);
100
99
  padding-right: 16px;
101
100
  & p {
102
101
  padding-right: 4px;
103
102
  }
104
103
  }
105
104
  &--navigation_input {
106
- border: 1px solid var(--dl-color-separator);
105
+ border: 1px solid var(--dell-gray-500);
107
106
  border-radius: 2px;
108
- color: var(--dl-color-darker);
107
+ color: var(--dell-gray-800);
109
108
  outline: none;
110
109
  background: none;
111
110
  padding-top: 3px;
@@ -121,23 +120,26 @@ export default defineComponent({
121
120
  margin: 0;
122
121
  }
123
122
  &:hover {
124
- border-color: var(--dl-color-hover);
123
+ border-color: var(--dell-blue-600);
125
124
  }
126
125
 
127
126
  &:focus {
128
- border-color: var(--dl-color-secondary);
127
+ border-color: var(--dell-blue-500);
129
128
  }
130
129
 
131
130
  &:disabled {
132
- border-color: var(--dl-color-disabled);
133
- color: var(--dl-color-disabled);
131
+ border-color: var(--dell-gray-500);
132
+ color: var(--dell-gray-500);
134
133
  cursor: not-allowed;
135
134
 
136
135
  &:hover {
137
- border-color: var(--dl-color-disabled);
136
+ border-color: var(--dell-gray-500);
138
137
  }
139
138
  }
140
139
  }
140
+ &--quick_nav_link {
141
+ margin-left: 5px;
142
+ }
141
143
  }
142
144
 
143
145
  ::v-deep .dl-button {
@@ -1,10 +1,9 @@
1
1
  <template>
2
2
  <div class="dl-pagination--rows_selector">
3
- <span class="dl-pagination--rows_per_page_label">{{ itemsName }} per page:</span>
4
- <dl-typography
5
- v-if="hasSingeValue"
6
- color="dl-color-darker"
3
+ <span class="dl-pagination--rows_per_page_label"
4
+ >{{ itemsName }} per page:</span
7
5
  >
6
+ <dl-typography v-if="hasSingeValue" color="dell-gray-800">
8
7
  {{ modelValue }}
9
8
  </dl-typography>
10
9
  <dl-select
@@ -72,7 +71,7 @@ export default defineComponent({
72
71
  &--rows_selector {
73
72
  display: flex;
74
73
  align-items: center;
75
- color: var(--dl-color-darker);
74
+ color: var(--dell-gray-800);
76
75
  }
77
76
 
78
77
  &--rows_per_page_label {
@@ -158,6 +158,18 @@ export default defineComponent({
158
158
  },
159
159
  onSearchButtonPress(): void {
160
160
  this.$emit('search', this.modelValue)
161
+ },
162
+ focus(): void {
163
+ const inputComponent = this.$refs.input as InstanceType<
164
+ typeof DlInput
165
+ >
166
+ inputComponent?.focus()
167
+ },
168
+ blur(): void {
169
+ const inputComponent = this.$refs.input as InstanceType<
170
+ typeof DlInput
171
+ >
172
+ inputComponent?.blur()
161
173
  }
162
174
  }
163
175
  })
@@ -1,12 +1,6 @@
1
1
  <template>
2
- <div
3
- class="dl-smart-search"
4
- :style="cssVars"
5
- >
6
- <div
7
- ref="inputWrapper"
8
- class="dl-smart-search__input-wrapper"
9
- >
2
+ <div class="dl-smart-search" :style="cssVars">
3
+ <div ref="inputWrapper" class="dl-smart-search__input-wrapper">
10
4
  <dl-smart-search-input
11
5
  ref="smartSearchInput"
12
6
  v-model="queryObject"
@@ -18,6 +12,7 @@
18
12
  :color-schema="colorSchema"
19
13
  :strict="strict"
20
14
  :placeholder="placeholder"
15
+ :disabled="disabled"
21
16
  @focus="isFocused = true"
22
17
  @blur="isFocused = false"
23
18
  @search="emitSearchQuery"
@@ -12,11 +12,7 @@
12
12
  :icon="
13
13
  focused ? defaultIcon : statusIcon || defaultIcon
14
14
  "
15
- :color="
16
- focused
17
- ? defaultIconColor
18
- : statusIconColor || defaultIconColor
19
- "
15
+ :color="iconColor"
20
16
  size="16px"
21
17
  :inline="false"
22
18
  />
@@ -53,7 +49,7 @@
53
49
  </div>
54
50
  </div>
55
51
  <dl-tooltip
56
- v-if="!focused"
52
+ v-if="!focused && !noTooltip"
57
53
  border="1px solid var(--dl-color-separator)"
58
54
  background-color="dl-color-panel-background"
59
55
  color="dl-color-darker"
@@ -248,6 +244,10 @@ export default defineComponent({
248
244
  type: String,
249
245
  default: '28px'
250
246
  },
247
+ noTooltip: {
248
+ type: Boolean,
249
+ default: false
250
+ },
251
251
  omitSuggestions: {
252
252
  type: Array as PropType<string[]>,
253
253
  default: () => [] as string[]
@@ -275,6 +275,7 @@ export default defineComponent({
275
275
  'blur',
276
276
  'input',
277
277
  'search',
278
+ 'status',
278
279
  'error',
279
280
  'clear'
280
281
  ],
@@ -297,6 +298,7 @@ export default defineComponent({
297
298
  defaultIcon,
298
299
  defaultIconColor,
299
300
  schema,
301
+ noTooltip,
300
302
  omitSuggestions,
301
303
  operatorsOverride,
302
304
  height,
@@ -960,6 +962,16 @@ export default defineComponent({
960
962
  }
961
963
  })
962
964
 
965
+ const iconColor = computed(() => {
966
+ if (disabled.value) {
967
+ return 'dl-color-disabled'
968
+ }
969
+ if (focused.value) {
970
+ return defaultIconColor.value
971
+ }
972
+ return statusIconColor.value || defaultIconColor.value
973
+ })
974
+
963
975
  const textareaStyles = computed<Record<string, string | number>>(() => {
964
976
  const overflow: string =
965
977
  scroll.value && focused.value ? 'scroll' : 'hidden'
@@ -994,9 +1006,14 @@ export default defineComponent({
994
1006
  })
995
1007
 
996
1008
  const inputClass = computed<string>(() => {
997
- return `dl-smart-search-input__textarea${
998
- focused.value ? ' focus' : ''
999
- }`
1009
+ let classes = 'dl-smart-search-input__textarea'
1010
+ if (focused.value) {
1011
+ classes += ' focus'
1012
+ }
1013
+ if (disabled.value) {
1014
+ classes += ' dl-smart-search-input__textarea--disabled'
1015
+ }
1016
+ return classes
1000
1017
  })
1001
1018
 
1002
1019
  const showClearButton = computed(() => {
@@ -1035,24 +1052,31 @@ export default defineComponent({
1035
1052
  return status.value
1036
1053
  }
1037
1054
 
1055
+ let newStatus: {
1056
+ type: string
1057
+ message: string
1058
+ }
1059
+
1038
1060
  if (!error.value && searchQuery.value !== '') {
1039
- return {
1061
+ newStatus = {
1040
1062
  type: 'success',
1041
1063
  message: ''
1042
1064
  }
1043
- }
1044
-
1045
- if (error.value === 'warning') {
1046
- return {
1065
+ } else if (error.value === 'warning') {
1066
+ newStatus = {
1047
1067
  type: 'warning',
1048
1068
  message: 'The query is not supported technically.'
1049
1069
  }
1070
+ } else {
1071
+ newStatus = {
1072
+ type: 'error',
1073
+ message: error.value
1074
+ }
1050
1075
  }
1051
1076
 
1052
- return {
1053
- type: 'error',
1054
- message: error.value
1055
- }
1077
+ emit('status', newStatus)
1078
+
1079
+ return newStatus
1056
1080
  })
1057
1081
 
1058
1082
  const inputPlaceholder = computed<string>(() => {
@@ -1085,11 +1109,23 @@ export default defineComponent({
1085
1109
  })
1086
1110
  })
1087
1111
 
1112
+ const uuid = v4()
1113
+ const watchFocusIn = () => {
1114
+ focused.value = focused.value ||
1115
+ !!document.activeElement?.closest(`#DlSmartSearchInput${uuid}`)
1116
+ }
1117
+
1088
1118
  watch(focused, (value, old) => {
1089
1119
  if (old === value) {
1090
1120
  return
1091
1121
  }
1092
1122
 
1123
+ if (!value) {
1124
+ const focusIn = 'focusin'
1125
+ window.removeEventListener(focusIn, watchFocusIn)
1126
+ window.addEventListener(focusIn, watchFocusIn)
1127
+ }
1128
+
1093
1129
  updateParentElementWidth()
1094
1130
  })
1095
1131
 
@@ -1150,7 +1186,7 @@ export default defineComponent({
1150
1186
  })
1151
1187
 
1152
1188
  return {
1153
- uuid: v4(),
1189
+ uuid,
1154
1190
  suggestionsDropdown,
1155
1191
  container,
1156
1192
  input,
@@ -1173,6 +1209,7 @@ export default defineComponent({
1173
1209
  debouncedSetInputValue,
1174
1210
  statusIcon,
1175
1211
  statusIconColor,
1212
+ iconColor,
1176
1213
  textareaStyles,
1177
1214
  searchBarClasses,
1178
1215
  inputClass,
@@ -1325,6 +1362,21 @@ export default defineComponent({
1325
1362
  }
1326
1363
  }
1327
1364
 
1365
+ &__textarea--disabled {
1366
+ &::before {
1367
+ color: var(--dl-color-disabled);
1368
+ }
1369
+ }
1370
+
1371
+ &__search-bar--disabled {
1372
+ .dl-smart-search-input__input,
1373
+ .dl-smart-search-input__textarea {
1374
+ &::before {
1375
+ color: var(--dl-color-disabled);
1376
+ }
1377
+ }
1378
+ }
1379
+
1328
1380
  &__input-wrapper,
1329
1381
  &__textarea-wrapper {
1330
1382
  min-height: 28px;