@dataloop-ai/components 0.19.192 → 0.19.194

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.19.192",
3
+ "version": "0.19.194",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -22,7 +22,7 @@
22
22
  "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"
23
23
  },
24
24
  "dependencies": {
25
- "@dataloop-ai/icons": "^3.0.33",
25
+ "@dataloop-ai/icons": "^3.0.35",
26
26
  "@types/flat": "^5.0.2",
27
27
  "@types/lodash": "^4.14.184",
28
28
  "@types/sortablejs": "^1.15.7",
@@ -302,9 +302,12 @@ export function setValueAliases(json: Data, schema: Data) {
302
302
 
303
303
  if (isArrayOperator) {
304
304
  for (let i = 0; i < opVal.length; ++i) {
305
- const value = aliases[opVal[i] as string]
306
- if (value) {
307
- val[Object.keys(val)[0]][i] = value
305
+ const value = opVal[i]
306
+ for (const alias in aliases) {
307
+ if (value === aliases[alias]) {
308
+ val[Object.keys(val)[0]][i] = alias
309
+ break
310
+ }
308
311
  }
309
312
  }
310
313
  } else {
@@ -40,6 +40,7 @@ import { v4 } from 'uuid'
40
40
  import {
41
41
  computed,
42
42
  defineComponent,
43
+ onMounted,
43
44
  onUnmounted,
44
45
  ref,
45
46
  toRefs,
@@ -152,14 +153,6 @@ export default defineComponent({
152
153
  return { display: inline.value ? 'inline-flex' : 'flex' }
153
154
  })
154
155
 
155
- watch(icon, () => {
156
- const possibleToLoadSvg =
157
- isSVG.value && icon.value && icon.value !== ''
158
- if (possibleToLoadSvg) {
159
- loadSvg()
160
- }
161
- })
162
-
163
156
  const loadSvg = () => {
164
157
  return new Promise<void>((resolve, reject) => {
165
158
  const svgElement = new Image()
@@ -192,6 +185,18 @@ export default defineComponent({
192
185
  })
193
186
  }
194
187
 
188
+ watch(
189
+ icon,
190
+ () => {
191
+ const possibleToLoadSvg =
192
+ isSVG.value && icon.value && icon.value !== ''
193
+ if (possibleToLoadSvg) {
194
+ loadSvg()
195
+ }
196
+ },
197
+ { immediate: true }
198
+ )
199
+
195
200
  onUnmounted(() => {
196
201
  isDestroyed.value = true
197
202
  })
@@ -126,6 +126,7 @@ export default defineComponent({
126
126
  annotated: 'boolean',
127
127
  hidden: 'boolean',
128
128
  metadata: {
129
+ name: ['string', { Voltaire: 'Arouet' }],
129
130
  system: {
130
131
  width: 'number',
131
132
  height: 'number',