@dataloop-ai/components 0.20.122 → 0.20.124

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.20.122",
3
+ "version": "0.20.124",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -23,7 +23,7 @@
23
23
  "check-only": "if grep -E -H -r --exclude-dir=.git --exclude-dir=node_modules --exclude=*.json --exclude=*.yml '^(describe|it).only' .; then echo 'Found only in test files' && exit 1; fi"
24
24
  },
25
25
  "dependencies": {
26
- "@dataloop-ai/icons": "^3.1.13",
26
+ "@dataloop-ai/icons": "^3.1.15",
27
27
  "@types/flat": "^5.0.2",
28
28
  "@types/lodash": "^4.14.184",
29
29
  "@types/sortablejs": "^1.15.7",
@@ -238,6 +238,7 @@
238
238
  :readonly="isReadonlyOption(item)"
239
239
  :indentation="indentation"
240
240
  :is-expanded="item.expanded"
241
+ :tooltip="getOptionTooltip(item)"
241
242
  @update:model-value="handleModelValueUpdate"
242
243
  @click="selectOption(item)"
243
244
  @selected="handleSelected"
@@ -288,6 +289,7 @@
288
289
  :readonly="isReadonlyOption(option)"
289
290
  :indentation="indentation"
290
291
  :is-expanded="isExpandedOption(option)"
292
+ :tooltip="getOptionTooltip(option)"
291
293
  @update:model-value="handleModelValueUpdate"
292
294
  @click="selectOption(option)"
293
295
  @selected="handleSelected"
@@ -984,6 +986,12 @@ export default defineComponent({
984
986
  getOptionCount(option: any) {
985
987
  return option?.count ?? null
986
988
  },
989
+ getOptionTooltip(option: DlSelectOptionType): string | null {
990
+ if (typeof option === 'object' && option?.tooltip) {
991
+ return option.tooltip
992
+ }
993
+ return null
994
+ },
987
995
  getKeyForOption(
988
996
  option:
989
997
  | string
@@ -5,6 +5,9 @@
5
5
  :class="[{ 'readonly-option': true }, { capitalized }]"
6
6
  :style="`padding-left: ${10 + depth * indentation}px;`"
7
7
  >
8
+ <dl-tooltip v-if="tooltip">
9
+ {{ tooltip }}
10
+ </dl-tooltip>
8
11
  <slot>
9
12
  {{ label ? (capitalized ? label.toLowerCase() : label) : null }}
10
13
  </slot>
@@ -43,6 +46,9 @@
43
46
  @checked="handleSingleSelect"
44
47
  @unchecked="handleSingleDeselect"
45
48
  >
49
+ <dl-tooltip v-if="tooltip">
50
+ {{ tooltip }}
51
+ </dl-tooltip>
46
52
  <slot>
47
53
  {{
48
54
  capitalized
@@ -54,6 +60,9 @@
54
60
  <span v-if="count" class="counter"> ({{ count }}) </span>
55
61
  </span>
56
62
  <div v-else :class="{ capitalized }">
63
+ <dl-tooltip v-if="tooltip">
64
+ {{ tooltip }}
65
+ </dl-tooltip>
57
66
  <slot>
58
67
  {{
59
68
  capitalized
@@ -88,6 +97,7 @@
88
97
  :is-expanded="isExpanded"
89
98
  :filter-term="filterTerm"
90
99
  :fit-content="fitContent"
100
+ :tooltip="tooltip"
91
101
  @update:model-value="handleCheckboxUpdate"
92
102
  @selected="handleSingleSelect($event, true)"
93
103
  @deselected="handleSingleDeselect"
@@ -119,7 +129,7 @@
119
129
  import { defineComponent, PropType } from 'vue-demi'
120
130
  import { DlListItem } from '../../../basic'
121
131
  import { DlIcon, DlCheckbox, DlEllipsis } from '../../../essential'
122
- import { DlItemSection } from '../../../shared'
132
+ import { DlItemSection, DlTooltip } from '../../../shared'
123
133
  import { v4 } from 'uuid'
124
134
  import { debounce } from 'lodash'
125
135
  import { stateManager } from '../../../../StateManager'
@@ -139,7 +149,8 @@ export default defineComponent({
139
149
  DlItemSection,
140
150
  DlCheckbox,
141
151
  DlIcon,
142
- DlEllipsis
152
+ DlEllipsis,
153
+ DlTooltip
143
154
  },
144
155
  model: {
145
156
  prop: 'modelValue',
@@ -182,7 +193,8 @@ export default defineComponent({
182
193
  selectChildren: {
183
194
  type: Boolean,
184
195
  default: true
185
- }
196
+ },
197
+ tooltip: { type: String, default: null }
186
198
  },
187
199
  emits: [
188
200
  'update:model-value',
@@ -5,6 +5,7 @@ export interface DlSelectOption {
5
5
  expanded?: boolean
6
6
  children?: DlSelectOption[]
7
7
  readonly?: boolean
8
+ tooltip?: string
8
9
  }
9
10
 
10
11
  export type DlSelectOptionType = string | number | DlSelectOption
@@ -201,7 +201,9 @@
201
201
  handleVisibleColumnsUpdate
202
202
  "
203
203
  >
204
- <dl-list>
204
+ <dl-list
205
+ :class="menuClass"
206
+ >
205
207
  <dl-option-group
206
208
  :model-value="
207
209
  computedVisibleCols
@@ -598,7 +600,9 @@
598
600
  handleVisibleColumnsUpdate
599
601
  "
600
602
  >
601
- <dl-list>
603
+ <dl-list
604
+ :class="menuClass"
605
+ >
602
606
  <dl-option-group
603
607
  :model-value="
604
608
  computedVisibleCols
@@ -1212,6 +1216,10 @@ export default defineComponent({
1212
1216
  type: [String, Array, Object],
1213
1217
  default: null as unknown as PropType<any[]>
1214
1218
  },
1219
+ menuClass: {
1220
+ type: [String, Array, Object],
1221
+ default: null as unknown as PropType<any[]>
1222
+ },
1215
1223
  noHover: Boolean,
1216
1224
  /**
1217
1225
  * Will add another column with a button opening a menu which lets the user choose the visible columns
@@ -1286,6 +1294,7 @@ export default defineComponent({
1286
1294
  tableClass,
1287
1295
  tableHeaderStyle,
1288
1296
  tableHeaderClass,
1297
+ menuClass,
1289
1298
  dense,
1290
1299
  draggable,
1291
1300
  virtualScroll,
@@ -249,6 +249,10 @@ export default defineComponent({
249
249
  type: [String, Array, Object],
250
250
  default: null as unknown as PropType<any[]>
251
251
  },
252
+ menuClass: {
253
+ type: [String, Array, Object],
254
+ default: null as unknown as PropType<any[]>
255
+ },
252
256
  noHover: Boolean,
253
257
  /**
254
258
  * Indicates the data is empty
@@ -922,6 +926,7 @@ export default defineComponent({
922
926
  'onUpdate:selected': this.updateSelected,
923
927
  onColUpdate: this.updateColumns,
924
928
  class: this.containerClass,
929
+ menuClass: this.menuClass,
925
930
  hideBottom: this.hideBottom,
926
931
  hideNoData: this.hideNoData,
927
932
  hideHeader: this.hideHeader,
@@ -204,6 +204,7 @@
204
204
  :rows="tableRows"
205
205
  :columns="tableColumns"
206
206
  title="Editable Columns"
207
+ menu-class="editable-menu-class"
207
208
  :visible-columns="tableColumns.slice(0, -1)"
208
209
  />
209
210
  </div>