-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1095 from finos/azure-windows-fix
Fix Windows build on Azure
- Loading branch information
Showing
78 changed files
with
5,777 additions
and
5,764 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 15 additions & 15 deletions
30
packages/perspective-viewer-d3fc/src/config/d3fc.watch.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
const pluginConfig = require("./d3fc.plugin.config"); | ||
|
||
const rules = []; //pluginConfig.module.rules.slice(0); | ||
rules.push({ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
loader: "babel-loader" | ||
}); | ||
|
||
module.exports = Object.assign({}, pluginConfig, { | ||
entry: "./src/js/index.js", | ||
module: Object.assign({}, pluginConfig.module, { | ||
rules | ||
}) | ||
}); | ||
const pluginConfig = require("./d3fc.plugin.config"); | ||
|
||
const rules = []; //pluginConfig.module.rules.slice(0); | ||
rules.push({ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
loader: "babel-loader" | ||
}); | ||
|
||
module.exports = Object.assign({}, pluginConfig, { | ||
entry: "./src/js/index.js", | ||
module: Object.assign({}, pluginConfig.module, { | ||
rules | ||
}) | ||
}); |
280 changes: 140 additions & 140 deletions
280
packages/perspective-viewer-d3fc/src/js/axis/axisFactory.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,140 +1,140 @@ | ||
/****************************************************************************** | ||
* | ||
* Copyright (c) 2017, the Perspective Authors. | ||
* | ||
* This file is part of the Perspective library, distributed under the terms of | ||
* the Apache License 2.0. The full license can be found in the LICENSE file. | ||
* | ||
*/ | ||
import * as fc from "d3fc"; | ||
import {axisType} from "./axisType"; | ||
import * as none from "./noAxis"; | ||
import * as linear from "./linearAxis"; | ||
import * as time from "./timeAxis"; | ||
import * as ordinal from "./ordinalAxis"; | ||
|
||
const axisTypes = { | ||
none, | ||
ordinal, | ||
time, | ||
linear | ||
}; | ||
|
||
export const axisFactory = settings => { | ||
let excludeType = null; | ||
let orient = "horizontal"; | ||
let settingName = "crossValues"; | ||
let settingValue = null; | ||
let valueNames = ["crossValue"]; | ||
|
||
const optionalParams = ["include", "paddingStrategy", "pad"]; | ||
const optional = {}; | ||
|
||
const _factory = data => { | ||
const useType = axisType(settings) | ||
.excludeType(excludeType) | ||
.settingName(settingName) | ||
.settingValue(settingValue)(); | ||
|
||
const axis = axisTypes[useType]; | ||
const domainFunction = axis.domain().valueNames(valueNames); | ||
|
||
optionalParams.forEach(p => { | ||
if (optional[p] && domainFunction[p]) domainFunction[p](optional[p]); | ||
}); | ||
if (domainFunction.orient) domainFunction.orient(orient); | ||
|
||
const domain = domainFunction(data); | ||
const component = axis.component ? createComponent(axis, domain, data) : defaultComponent(); | ||
|
||
return { | ||
scale: axis.scale(), | ||
domain, | ||
domainFunction, | ||
labelFunction: axis.labelFunction, | ||
component: { | ||
bottom: component.bottom, | ||
left: component.left, | ||
top: component.top, | ||
right: component.right | ||
}, | ||
size: component.size, | ||
decorate: component.decorate, | ||
label: settings[settingName].map(v => v.name).join(", "), | ||
tickFormatFunction: axis.tickFormatFunction | ||
}; | ||
}; | ||
|
||
const createComponent = (axis, domain, data) => | ||
axis | ||
.component(settings) | ||
.orient(orient) | ||
.settingName(settingName) | ||
.domain(domain)(data); | ||
|
||
const defaultComponent = () => ({ | ||
bottom: fc.axisBottom, | ||
left: fc.axisLeft, | ||
top: fc.axisTop, | ||
right: fc.axisRight, | ||
decorate: () => {} | ||
}); | ||
|
||
_factory.excludeType = (...args) => { | ||
if (!args.length) { | ||
return excludeType; | ||
} | ||
excludeType = args[0]; | ||
return _factory; | ||
}; | ||
|
||
_factory.orient = (...args) => { | ||
if (!args.length) { | ||
return orient; | ||
} | ||
orient = args[0]; | ||
return _factory; | ||
}; | ||
|
||
_factory.settingName = (...args) => { | ||
if (!args.length) { | ||
return settingName; | ||
} | ||
settingName = args[0]; | ||
return _factory; | ||
}; | ||
_factory.settingValue = (...args) => { | ||
if (!args.length) { | ||
return settingValue; | ||
} | ||
settingValue = args[0]; | ||
return _factory; | ||
}; | ||
|
||
_factory.valueName = (...args) => { | ||
if (!args.length) { | ||
return valueNames[0]; | ||
} | ||
valueNames = [args[0]]; | ||
return _factory; | ||
}; | ||
_factory.valueNames = (...args) => { | ||
if (!args.length) { | ||
return valueNames; | ||
} | ||
valueNames = args[0]; | ||
return _factory; | ||
}; | ||
|
||
optionalParams.forEach(p => { | ||
_factory[p] = (...args) => { | ||
if (!args.length) { | ||
return optional[p]; | ||
} | ||
optional[p] = args[0]; | ||
return _factory; | ||
}; | ||
}); | ||
|
||
return _factory; | ||
}; | ||
/****************************************************************************** | ||
* | ||
* Copyright (c) 2017, the Perspective Authors. | ||
* | ||
* This file is part of the Perspective library, distributed under the terms of | ||
* the Apache License 2.0. The full license can be found in the LICENSE file. | ||
* | ||
*/ | ||
import * as fc from "d3fc"; | ||
import {axisType} from "./axisType"; | ||
import * as none from "./noAxis"; | ||
import * as linear from "./linearAxis"; | ||
import * as time from "./timeAxis"; | ||
import * as ordinal from "./ordinalAxis"; | ||
|
||
const axisTypes = { | ||
none, | ||
ordinal, | ||
time, | ||
linear | ||
}; | ||
|
||
export const axisFactory = settings => { | ||
let excludeType = null; | ||
let orient = "horizontal"; | ||
let settingName = "crossValues"; | ||
let settingValue = null; | ||
let valueNames = ["crossValue"]; | ||
|
||
const optionalParams = ["include", "paddingStrategy", "pad"]; | ||
const optional = {}; | ||
|
||
const _factory = data => { | ||
const useType = axisType(settings) | ||
.excludeType(excludeType) | ||
.settingName(settingName) | ||
.settingValue(settingValue)(); | ||
|
||
const axis = axisTypes[useType]; | ||
const domainFunction = axis.domain().valueNames(valueNames); | ||
|
||
optionalParams.forEach(p => { | ||
if (optional[p] && domainFunction[p]) domainFunction[p](optional[p]); | ||
}); | ||
if (domainFunction.orient) domainFunction.orient(orient); | ||
|
||
const domain = domainFunction(data); | ||
const component = axis.component ? createComponent(axis, domain, data) : defaultComponent(); | ||
|
||
return { | ||
scale: axis.scale(), | ||
domain, | ||
domainFunction, | ||
labelFunction: axis.labelFunction, | ||
component: { | ||
bottom: component.bottom, | ||
left: component.left, | ||
top: component.top, | ||
right: component.right | ||
}, | ||
size: component.size, | ||
decorate: component.decorate, | ||
label: settings[settingName].map(v => v.name).join(", "), | ||
tickFormatFunction: axis.tickFormatFunction | ||
}; | ||
}; | ||
|
||
const createComponent = (axis, domain, data) => | ||
axis | ||
.component(settings) | ||
.orient(orient) | ||
.settingName(settingName) | ||
.domain(domain)(data); | ||
|
||
const defaultComponent = () => ({ | ||
bottom: fc.axisBottom, | ||
left: fc.axisLeft, | ||
top: fc.axisTop, | ||
right: fc.axisRight, | ||
decorate: () => {} | ||
}); | ||
|
||
_factory.excludeType = (...args) => { | ||
if (!args.length) { | ||
return excludeType; | ||
} | ||
excludeType = args[0]; | ||
return _factory; | ||
}; | ||
|
||
_factory.orient = (...args) => { | ||
if (!args.length) { | ||
return orient; | ||
} | ||
orient = args[0]; | ||
return _factory; | ||
}; | ||
|
||
_factory.settingName = (...args) => { | ||
if (!args.length) { | ||
return settingName; | ||
} | ||
settingName = args[0]; | ||
return _factory; | ||
}; | ||
_factory.settingValue = (...args) => { | ||
if (!args.length) { | ||
return settingValue; | ||
} | ||
settingValue = args[0]; | ||
return _factory; | ||
}; | ||
|
||
_factory.valueName = (...args) => { | ||
if (!args.length) { | ||
return valueNames[0]; | ||
} | ||
valueNames = [args[0]]; | ||
return _factory; | ||
}; | ||
_factory.valueNames = (...args) => { | ||
if (!args.length) { | ||
return valueNames; | ||
} | ||
valueNames = args[0]; | ||
return _factory; | ||
}; | ||
|
||
optionalParams.forEach(p => { | ||
_factory[p] = (...args) => { | ||
if (!args.length) { | ||
return optional[p]; | ||
} | ||
optional[p] = args[0]; | ||
return _factory; | ||
}; | ||
}); | ||
|
||
return _factory; | ||
}; |
Oops, something went wrong.