@dataloop-ai/components 0.18.144 → 0.19.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.
Files changed (86) hide show
  1. package/package.json +4 -1
  2. package/src/assets/constants.scss +25 -26
  3. package/src/assets/globals.scss +58 -56
  4. package/src/assets/grid.css +1 -1
  5. package/src/assets/grid.scss +4 -4
  6. package/src/components/basic/DlAccordion/DlAccordion.vue +10 -3
  7. package/src/components/basic/DlEmptyState/types.ts +1 -1
  8. package/src/components/basic/DlGrid/DlGrid.vue +2 -1
  9. package/src/components/basic/DlPopup/DlPopup.vue +159 -396
  10. package/src/components/basic/DlWidget/DlWidget.vue +2 -1
  11. package/src/components/basic/utils.ts +0 -9
  12. package/src/components/blocks/DlLabelPicker/DlLabelPicker.vue +127 -0
  13. package/src/components/blocks/DlLabelPicker/index.ts +3 -0
  14. package/src/components/blocks/DlLabelPicker/types.ts +6 -0
  15. package/src/components/blocks/index.ts +1 -0
  16. package/src/components/blocks/types.ts +1 -0
  17. package/src/components/compound/DlCodeEditor/README.md +5 -4
  18. package/src/components/compound/DlCodeEditor/styles/themes-base16.css +16934 -11289
  19. package/src/components/compound/DlCodeEditor/styles/themes.css +5122 -3448
  20. package/src/components/compound/DlInput/DlInput.vue +609 -178
  21. package/src/components/compound/DlInput/components/InputFileElement.vue +97 -0
  22. package/src/components/compound/DlInput/types.ts +12 -0
  23. package/src/components/compound/DlInput/utils.ts +117 -0
  24. package/src/components/compound/DlSearches/DlSearch/DlSearch.vue +10 -1
  25. package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +12 -3
  26. package/src/components/compound/DlSearches/DlSmartSearch/utils/highlightSyntax.ts +1 -1
  27. package/src/components/compound/DlSlider/sliderStyles.scss +92 -92
  28. package/src/components/compound/DlTable/DlTable.vue +701 -358
  29. package/src/components/compound/DlTable/components/DlTd.vue +11 -9
  30. package/src/components/compound/DlTable/components/DlTh.vue +22 -21
  31. package/src/components/compound/DlTable/components/SortableJS.vue +33 -0
  32. package/src/components/compound/DlTable/hooks/tableActions.ts +3 -3
  33. package/src/components/compound/DlTable/hooks/tableColumnSelection.ts +3 -4
  34. package/src/components/compound/DlTable/hooks/use-sortable.ts +152 -0
  35. package/src/components/compound/DlTable/styles/dl-table-styles.scss +372 -377
  36. package/src/components/compound/DlTable/types.ts +6 -0
  37. package/src/components/compound/DlTable/utils/getCellValue.ts +27 -0
  38. package/src/components/compound/DlTable/utils/insertAtIndex.ts +22 -0
  39. package/src/components/compound/DlTable/utils/tableClasses.ts +22 -0
  40. package/src/components/compound/DlToast/api/useToast.ts +10 -4
  41. package/src/components/compound/DlToast/components/ToastComponent.vue +26 -21
  42. package/src/components/compound/DlToast/utils/render.ts +15 -8
  43. package/src/components/compound/DlTreeTable/DlTreeTable.vue +708 -323
  44. package/src/components/compound/DlTreeTable/components/DlTdTree.vue +10 -9
  45. package/src/components/compound/DlTreeTable/components/DlTrTree.vue +13 -0
  46. package/src/components/compound/DlTreeTable/emits.ts +2 -2
  47. package/src/components/compound/DlTreeTable/utils/index.ts +6 -0
  48. package/src/components/compound/DlTreeTable/utils/moveNestedRow.ts +95 -0
  49. package/src/components/compound/DlTreeTable/utils/trSpacing.ts +12 -1
  50. package/src/components/compound/DlTreeTable/utils/treeTableRowSelection.ts +10 -7
  51. package/src/components/compound/DlTreeTable/views/DlTrTreeView.vue +52 -58
  52. package/src/components/essential/DlMenu/DlMenu.vue +25 -0
  53. package/src/components/index.ts +1 -0
  54. package/src/components/shared/DlVirtualScroll/DlVirtualScroll.vue +2 -1
  55. package/src/components/shared/DlVirtualScroll/styles/dl-virtual-scroll-styles.scss +62 -41
  56. package/src/components/types.ts +1 -0
  57. package/src/demos/DlAccordionDemo.vue +32 -0
  58. package/src/demos/DlButtonDemo.vue +7 -0
  59. package/src/demos/DlDemoPage.vue +1 -0
  60. package/src/demos/DlInputDemo.vue +122 -64
  61. package/src/demos/DlLabelPickerDemo.vue +46 -0
  62. package/src/demos/DlPopupDemo.vue +94 -4
  63. package/src/demos/DlSearchDemo.vue +0 -1
  64. package/src/demos/DlTableDemo.vue +261 -162
  65. package/src/demos/DlToastDemo.vue +28 -1
  66. package/src/demos/DlTreeTableDemo.vue +266 -262
  67. package/src/demos/DlVirtualScrollDemo.vue +1 -4
  68. package/src/demos/index.ts +3 -1
  69. package/src/hooks/use-model-toggle.ts +26 -62
  70. package/src/utils/browse-nested-nodes.ts +26 -0
  71. package/src/utils/draggable-table.ts +100 -488
  72. package/src/utils/get-element-above.ts +8 -0
  73. package/src/utils/getSlotByVersion.ts +11 -0
  74. package/src/utils/index.ts +4 -0
  75. package/src/utils/keyCodes.ts +1 -1
  76. package/src/utils/remove-child-nodes.ts +5 -0
  77. package/src/utils/render-fn.ts +46 -0
  78. package/src/utils/resizable-table.ts +110 -0
  79. package/src/utils/selection.ts +196 -0
  80. package/src/utils/swap-nodes.ts +11 -0
  81. package/src/utils/table-columns.ts +209 -0
  82. package/src/components/compound/DlTable/utils/ResizableManager.ts +0 -236
  83. package/src/components/compound/DlTable/utils/index.ts +0 -1
  84. package/src/components/compound/DlTable/utils/props.ts +0 -120
  85. package/src/components/compound/DlTreeTable/props.ts +0 -134
  86. package/src/components/compound/DlTreeTable/utils/flatTreeData.ts +0 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.18.144",
3
+ "version": "0.19.0",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -32,10 +32,12 @@
32
32
  "moment": "^2.29.4",
33
33
  "sass": "^1.51.0",
34
34
  "sass-loader": "^12.6.0",
35
+ "sortablejs": "^1.15.0",
35
36
  "uuid": "^8.3.2",
36
37
  "v-wave": "^1.5.0",
37
38
  "vanilla-jsoneditor": "^0.10.2",
38
39
  "vue-demi": "^0.14.5",
40
+ "vue-sortable": "^0.1.3",
39
41
  "vue2-teleport": "^1.0.1"
40
42
  },
41
43
  "devDependencies": {
@@ -51,6 +53,7 @@
51
53
  "@types/jsdom": "^16.2.14",
52
54
  "@types/node": "^18.7.18",
53
55
  "@types/resize-observer-browser": "^0.1.7",
56
+ "@types/sortablejs": "^1.15.2",
54
57
  "@types/uuid": "^8.3.4",
55
58
  "@typescript-eslint/eslint-plugin": "^5.20.0",
56
59
  "@typescript-eslint/parser": "^5.20.0",
@@ -1,13 +1,13 @@
1
1
  :root {
2
2
  // Constants
3
- --dl-color-alert-success: #38D079;
4
- --dl-color-alert-success-background: #E1FFF0;
5
- --dl-color-alert-warn: #FFDA3A;
6
- --dl-color-alert-warn-background: #FFF7D6;
7
- --dl-color-alert-error: #FF3434;
8
- --dl-color-alert-error-background: #FFEAEA ;
9
- --dl-color-alert-info: #4E81B3;
10
- --dl-color-alert-info-background: #F3F9FF;
3
+ --dl-color-alert-success: #38d079;
4
+ --dl-color-alert-success-background: #e1fff0;
5
+ --dl-color-alert-warn: #ffda3a;
6
+ --dl-color-alert-warn-background: #fff7d6;
7
+ --dl-color-alert-error: #ff3434;
8
+ --dl-color-alert-error-background: #ffeaea;
9
+ --dl-color-alert-info: #4e81b3;
10
+ --dl-color-alert-info-background: #f3f9ff;
11
11
  --dl-color-alert-text: #171723;
12
12
 
13
13
  // Z-Index
@@ -24,24 +24,23 @@
24
24
  --dl-z-index-menu: 6000;
25
25
  --dl-z-index-tooltip: 9000;
26
26
 
27
-
28
27
  // chart colors
29
- --dl-color-chart-1: #4DB1D3;
30
- --dl-color-chart-2: #FF2F7A;
31
- --dl-color-chart-3: #D4E3FF;
32
- --dl-color-chart-4: #BECB5D;
33
- --dl-color-chart-5: #839E30;
34
- --dl-color-chart-6: #6B5935;
35
- --dl-color-chart-7: #752B86;
36
- --dl-color-chart-8: #BB96A3;
37
- --dl-color-chart-9: #870F49;
38
- --dl-color-chart-10: #CC566C;
39
- --dl-color-chart-11: #F0A18C;
40
- --dl-color-chart-12: #EDAB55;
41
- --dl-color-chart-13: #FF5934;
42
- --dl-color-chart-14: #9CD2E3;
43
- --dl-color-chart-15: #928F80;
28
+ --dl-color-chart-1: #4db1d3;
29
+ --dl-color-chart-2: #ff2f7a;
30
+ --dl-color-chart-3: #d4e3ff;
31
+ --dl-color-chart-4: #becb5d;
32
+ --dl-color-chart-5: #839e30;
33
+ --dl-color-chart-6: #6b5935;
34
+ --dl-color-chart-7: #752b86;
35
+ --dl-color-chart-8: #bb96a3;
36
+ --dl-color-chart-9: #870f49;
37
+ --dl-color-chart-10: #cc566c;
38
+ --dl-color-chart-11: #f0a18c;
39
+ --dl-color-chart-12: #edab55;
40
+ --dl-color-chart-13: #ff5934;
41
+ --dl-color-chart-14: #9cd2e3;
42
+ --dl-color-chart-15: #928f80;
44
43
  --dl-color-chart-16: #575567;
45
44
  --dl-color-chart-17: #979797;
46
- --dl-color-chart-18: #D9D9D9;
47
- }
45
+ --dl-color-chart-18: #d9d9d9;
46
+ }
@@ -1,12 +1,11 @@
1
1
  @import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
2
2
  @import 'constants';
3
3
 
4
-
5
4
  body {
6
5
  font-family: 'Roboto', sans-serif;
7
6
  font-weight: 400;
8
7
 
9
- &>* {
8
+ & > * {
10
9
  font-weight: 400;
11
10
  font-family: 'Roboto', sans-serif;
12
11
  }
@@ -19,6 +18,10 @@ body {
19
18
  transform: rotate(180deg);
20
19
  }
21
20
 
21
+ .display-none {
22
+ display: none !important;
23
+ }
24
+
22
25
  .text {
23
26
  &-center {
24
27
  text-align: center;
@@ -34,18 +37,19 @@ body {
34
37
  }
35
38
 
36
39
  .dl-text-transform {
37
- &--uppercase{
40
+ &--uppercase {
38
41
  text-transform: uppercase;
39
42
  }
40
- &--lowercase{
43
+ &--lowercase {
41
44
  text-transform: lowercase;
42
45
  }
43
- &--capitalize{
46
+ &--capitalize {
44
47
  text-transform: capitalize;
45
48
  }
46
- &--none{
49
+ &--none {
47
50
  text-transform: none;
48
51
  }
52
+
49
53
  &--default {
50
54
  &,
51
55
  & > * {
@@ -150,11 +154,11 @@ body {
150
154
  .full-width {
151
155
  width: 100%;
152
156
  }
157
+
153
158
  .full-height {
154
159
  height: 100%;
155
160
  }
156
161
 
157
-
158
162
  :root {
159
163
  // common
160
164
  --dl-color-white: #fff;
@@ -177,33 +181,33 @@ body {
177
181
  --dl-menu-shadow: 0px 3px 6px rgba(16, 30, 115, 0.15);
178
182
 
179
183
  // colors
180
- --dl-color-tooltip-text: #FEFEFE;
184
+ --dl-color-tooltip-text: #fefefe;
181
185
  --dl-color-tooltip-background: #171723d9;
182
186
  --dl-color-text-darker-buttons: #171723;
183
- --dl-color-secondary: #3452FF;
184
- --dl-color-secondary-opaque: #3452FF10;
185
- --dl-color-text-buttons: #FFFFFF;
187
+ --dl-color-secondary: #3452ff;
188
+ --dl-color-secondary-opaque: #3452ff10;
189
+ --dl-color-text-buttons: #ffffff;
186
190
  --dl-color-darker: #171723;
187
191
  --dl-color-medium: #767676;
188
192
  --dl-color-lighter: #999999;
189
- --dl-color-hover: #7B8CFF;
190
- --dl-color-disabled: #B3B3B3;
193
+ --dl-color-hover: #7b8cff;
194
+ --dl-color-disabled: #b3b3b3;
191
195
  --dl-color-fill: #00000005;
192
196
  --dl-color-fill-hover: #00000010;
193
- --dl-color-separator: #E4E4E4;
194
- --dl-color-scrollbar: #E4E4E4;
195
- --dl-color-body-background: #EEF1FF;
196
- --dl-color-panel-background: #FFFFFF;
197
- --dl-color-side-panel: #18195C;
198
- --dl-color-shadow: #FFFFFF;
197
+ --dl-color-separator: #e4e4e4;
198
+ --dl-color-scrollbar: #e4e4e4;
199
+ --dl-color-body-background: #eef1ff;
200
+ --dl-color-panel-background: #ffffff;
201
+ --dl-color-side-panel: #18195c;
202
+ --dl-color-shadow: #ffffff;
199
203
  --dl-color-icon-default: #171723;
200
- --dl-color-fill-secondary: #FBF8F8;
201
- --dl-color-fill-third: #FBFBFB;
202
- --dl-color-link: #20ABFA;
203
- --dl-color-cell-background: #FFFAE2;
204
- --dl-color-disabled-slider: #E4E4E4;
205
- --q-color-positive: #38D079;
206
- --q-color-warning: #E1B75B;
204
+ --dl-color-fill-secondary: #fbf8f8;
205
+ --dl-color-fill-third: #fbfbfb;
206
+ --dl-color-link: #20abfa;
207
+ --dl-color-cell-background: #fffae2;
208
+ --dl-color-disabled-slider: #e4e4e4;
209
+ --q-color-positive: #38d079;
210
+ --q-color-warning: #e1b75b;
207
211
 
208
212
  // alert colors
209
213
  --dl-color-negative: var(--dl-color-alert-error);
@@ -215,13 +219,11 @@ body {
215
219
  --dl-color-info: var(--dl-color-alert-info);
216
220
  --dl-color-info-background: var(--dl-color-alert-info-background);
217
221
 
218
-
219
- --dl-color-chart-brush: #EEF1FF;
222
+ --dl-color-chart-brush: #eef1ff;
220
223
 
221
224
  --dl-date-picker-shadow: 0px 3px 6px #101e7326;
222
225
  --dl-date-picker-selected-strip: rgb(52, 82, 255, 0.2);
223
- --dl-date-picker-selected-date: #8FA0FF;
224
-
226
+ --dl-date-picker-selected-date: #8fa0ff;
225
227
 
226
228
  // DlJsonEditor based on atom one themes
227
229
  --dl-json-editor-key-color: #a626a4;
@@ -234,52 +236,51 @@ body {
234
236
 
235
237
  /* Define styles for the root window with dark - mode preference */
236
238
  [data-theme='dark-mode'] {
237
-
238
239
  // shadows
239
240
  --dl-menu-shadow: 0px 3px 6px rgba(41, 46, 53, 0.5);
240
241
 
241
242
  // colors
242
- --dl-color-bg: #30363D;
243
+ --dl-color-bg: #30363d;
243
244
  --dl-color-tooltip-text: #161616;
244
245
  --dl-color-tooltip-background: #ffffffd9;
245
246
  --dl-color-text-darker-buttons: #171723;
246
- --dl-color-secondary: #7C8CFF;
247
- --dl-color-secondary-opaque: #7C8CFF10;
248
- --dl-color-text-buttons: #FFFFFF;
247
+ --dl-color-secondary: #7c8cff;
248
+ --dl-color-secondary-opaque: #7c8cff10;
249
+ --dl-color-text-buttons: #ffffff;
249
250
  --dl-color-darker: #ffffffcc;
250
251
  --dl-color-medium: #ffffff99;
251
252
  --dl-color-lighter: #ffffff66;
252
- --dl-color-hover: #AEB9FF;
253
+ --dl-color-hover: #aeb9ff;
253
254
  --dl-color-disabled: #ffffff40;
254
255
  --dl-color-fill: #ffffff05;
255
- --dl-color-fill-secondary: #F8F8F81A;
256
+ --dl-color-fill-secondary: #f8f8f81a;
256
257
  --dl-color-fill-hover: #ffffff10;
257
258
  --dl-color-separator: #ffffff26;
258
- --dl-color-body-background: #24282D;
259
- --dl-color-panel-background: #30363D;
260
- --dl-color-side-panel: #2A343E;
261
- --dl-color-shadow: #30363D;
259
+ --dl-color-body-background: #24282d;
260
+ --dl-color-panel-background: #30363d;
261
+ --dl-color-side-panel: #2a343e;
262
+ --dl-color-shadow: #30363d;
262
263
  --dl-color-icon-default: #ffffffbf;
263
- --dl-color-fill-secondary: #FFFFFF1A;
264
- --dl-color-fill-third: #9E9E9E1A;
265
- --dl-color-link: #53B2E8;
266
- --dl-color-cell-background: #FFFAE2;
267
- --dl-color-disabled-slider: #64686D;
268
- --q-color-positive: #A1E5B6;
269
- --q-color-warning: #F8D29A;
264
+ --dl-color-fill-secondary: #ffffff1a;
265
+ --dl-color-fill-third: #9e9e9e1a;
266
+ --dl-color-link: #53b2e8;
267
+ --dl-color-cell-background: #fffae2;
268
+ --dl-color-disabled-slider: #64686d;
269
+ --q-color-positive: #a1e5b6;
270
+ --q-color-warning: #f8d29a;
270
271
 
271
272
  // alert colors
272
273
  --dl-color-negative-background: #734145;
273
- --dl-color-warning-background: #7B7241;
274
- --dl-color-positive-background: #3A644E;
275
- --dl-color-info-background: #4B5A6B;
276
- --dl-color-info: #92CDF2;
274
+ --dl-color-warning-background: #7b7241;
275
+ --dl-color-positive-background: #3a644e;
276
+ --dl-color-info-background: #4b5a6b;
277
+ --dl-color-info: #92cdf2;
277
278
 
278
279
  --dl-color-chart-brush: #475077;
279
280
 
280
281
  --dl-date-picker-shadow: 0px 3px 6px #292e3580;
281
282
  --dl-date-picker-selected-strip: rgb(124, 140, 255, 0.2);
282
- --dl-date-picker-selected-date: #535E96;
283
+ --dl-date-picker-selected-date: #535e96;
283
284
 
284
285
  --dl-json-editor-key-color: #c678dd;
285
286
  --dl-json-editor-background-color: #282c34;
@@ -297,7 +298,7 @@ html {
297
298
  scrollbar-color: var(--dl-color-scrollbar);
298
299
 
299
300
  // IE
300
- scrollbar-face-color: #E4E4E4;
301
+ scrollbar-face-color: #e4e4e4;
301
302
  scrollbar-face-color: var(--dl-color-scrollbar);
302
303
  }
303
304
 
@@ -339,9 +340,10 @@ html {
339
340
  [disabled] {
340
341
  opacity: 0.6 !important;
341
342
  }
342
- [disabled], [disabled] * {
343
+ [disabled],
344
+ [disabled] * {
343
345
  outline: 0 !important;
344
346
  cursor: not-allowed !important;
345
347
  }
346
348
 
347
- @import 'grid';
349
+ @import 'grid';
@@ -6,4 +6,4 @@ grid {
6
6
  }
7
7
  .grid-cols-3 {
8
8
  grid-template-columns: 1fr 1fr 1fr;
9
- }
9
+ }
@@ -1,9 +1,9 @@
1
1
  .grid {
2
- display: grid;
2
+ display: grid;
3
3
  }
4
4
  .grid-cols-2 {
5
- grid-template-columns: 1fr 1fr;
5
+ grid-template-columns: 1fr 1fr;
6
6
  }
7
7
  .grid-cols-3 {
8
- grid-template-columns: 1fr 1fr 1fr;
9
- }
8
+ grid-template-columns: 1fr 1fr 1fr;
9
+ }
@@ -22,7 +22,11 @@
22
22
  <div
23
23
  ref="dlAccordionContent"
24
24
  class="accordion-content"
25
- :class="{ closed: !isOpen, 'right-side': rightSide }"
25
+ :class="{
26
+ closed: !isOpen,
27
+ 'right-side': rightSide,
28
+ 'accordion-content__border': separator
29
+ }"
26
30
  >
27
31
  <slot v-if="isOpen && !isEmpty" />
28
32
  <dl-empty-state
@@ -80,7 +84,8 @@ export default defineComponent({
80
84
  emptyStateProps: {
81
85
  type: Object as PropType<DlEmptyStateProps>,
82
86
  default: () => accordionEmptyStateProps
83
- }
87
+ },
88
+ separator: { type: Boolean, default: false }
84
89
  },
85
90
  emits: ['update:model-value', 'hide', 'show'],
86
91
  data() {
@@ -121,9 +126,11 @@ export default defineComponent({
121
126
  line-height: 16px;
122
127
  padding: 0 16px 15px 38px;
123
128
  color: var(--dl-color-darker);
124
- border-bottom: 1px solid var(--dl-color-separator);
125
129
  max-height: fit-content;
126
130
  overflow: hidden;
131
+ &__border {
132
+ border-bottom: 1px solid var(--dl-color-separator);
133
+ }
127
134
  &.right-side {
128
135
  padding: 0 38px 16px 16px;
129
136
  }
@@ -14,7 +14,7 @@ export type DlEmptyStateProps = {
14
14
  iconSize?: string
15
15
  iconColor?: string
16
16
  responsive?: boolean
17
- align: 'center' | 'left'
17
+ align?: 'center' | 'left'
18
18
  }
19
19
 
20
20
  export type DlEmptyStateSlots = ['cta', 'links']
@@ -22,7 +22,8 @@ import {
22
22
  watch
23
23
  } from 'vue-demi'
24
24
  import { getGridTemplate, swapElementsInMatrix } from './utils'
25
- import { isCustomEvent, getElementAbove } from '../utils'
25
+ import { isCustomEvent } from '../utils'
26
+ import { getElementAbove } from '../../../utils'
26
27
  import { DlGridMode } from './types'
27
28
 
28
29
  export default defineComponent({