Skip to content

Commit

Permalink
chore: updated format
Browse files Browse the repository at this point in the history
Signed-off-by: Johan Enell <[email protected]>
  • Loading branch information
enell committed Sep 12, 2024
1 parent 7854608 commit 44add9c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
28 changes: 14 additions & 14 deletions packages/picasso.js/src/core/component/interpolate-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ export function value(a, b, k) {
: (t === 'number'
? number
: t === 'string'
? (c = color(b)) && colorKeys.includes(k)
? ((b = c), rgb)
: string
: b instanceof color
? rgb
: b instanceof Date
? date
: isNumberArray(b)
? numberArray
: Array.isArray(b)
? genericArray
: (typeof b.valueOf !== 'function' && typeof b.toString !== 'function') || isNaN(b)
? object
: number)(a, b);
? (c = color(b)) && colorKeys.includes(k)
? ((b = c), rgb)
: string
: b instanceof color
? rgb
: b instanceof Date
? date
: isNumberArray(b)
? numberArray
: Array.isArray(b)
? genericArray
: (typeof b.valueOf !== 'function' && typeof b.toString !== 'function') || isNaN(b)
? object
: number)(a, b);
}

export default function object(a, b) {
Expand Down
8 changes: 4 additions & 4 deletions packages/picasso.js/src/core/data/extractor-matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ function datumExtract(propCfg, cell, { key }) {
typeof propCfg.value === 'function' // eslint-disable-line no-nested-ternary
? propCfg.value(cell)
: typeof propCfg.value !== 'undefined'
? propCfg.value
: cell,
? propCfg.value
: cell,
};

datum.label =
typeof propCfg.label === 'function' // eslint-disable-line no-nested-ternary
? propCfg.label(cell)
: typeof propCfg.label !== 'undefined'
? String(propCfg.label)
: String(datum.value);
? String(propCfg.label)
: String(datum.value);

if (propCfg.field) {
datum.source = {
Expand Down
16 changes: 8 additions & 8 deletions plugins/q/src/data/extractor-s.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ function datumExtract(propCfg, cell, { key }) {
typeof propCfg.value === 'function'
? propCfg.value(cell)
: typeof propCfg.value !== 'undefined'
? propCfg.value
: cell, // eslint-disable-line no-nested-ternary
? propCfg.value
: cell, // eslint-disable-line no-nested-ternary
};

datum.label =
typeof propCfg.label === 'function'
? propCfg.label(cell)
: typeof propCfg.label !== 'undefined'
? String(propCfg.label)
: String(datum.value); // eslint-disable-line no-nested-ternary
? String(propCfg.label)
: String(datum.value); // eslint-disable-line no-nested-ternary

if (propCfg.field) {
datum.source = {
Expand Down Expand Up @@ -165,14 +165,14 @@ export default function extract(config, dataset, cache, util) {
typeof p.value === 'function'
? p.value(fieldValues)
: typeof p.value !== 'undefined'
? p.value
: fieldValues,
? p.value
: fieldValues,
label:
typeof p.label === 'function'
? p.label(fieldLabels)
: typeof p.label !== 'undefined'
? String(p.label)
: String(ret[propsArr[l]].value),
? String(p.label)
: String(ret[propsArr[l]].value),
};
}
}
Expand Down
8 changes: 4 additions & 4 deletions plugins/q/src/data/extractor-t.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,16 @@ function datumExtract(propCfg, cell, { key }) {
typeof propCfg.value === 'function'
? propCfg.value(cell)
: typeof propCfg.value !== 'undefined'
? propCfg.value
: cell, // eslint-disable-line no-nested-ternary
? propCfg.value
: cell, // eslint-disable-line no-nested-ternary
};

datum.label =
typeof propCfg.label === 'function'
? propCfg.label(cell)
: typeof propCfg.label !== 'undefined'
? String(propCfg.label)
: String(datum.value); // eslint-disable-line no-nested-ternary
? String(propCfg.label)
: String(datum.value); // eslint-disable-line no-nested-ternary

if (propCfg.field) {
datum.source = {
Expand Down

0 comments on commit 44add9c

Please sign in to comment.