@hpcc-js/ddl-shim 2.17.16 → 2.17.20
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/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.es6.js +63 -9
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +63 -9
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +7 -6
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/CHANGELOG.md +0 -1658
package/dist/cli.js
CHANGED
|
@@ -1700,7 +1700,7 @@ function __spreadArray(to, from, pack) {
|
|
|
1700
1700
|
}
|
|
1701
1701
|
|
|
1702
1702
|
var PKG_NAME = "@hpcc-js/ddl-shim";
|
|
1703
|
-
var PKG_VERSION = "2.17.
|
|
1703
|
+
var PKG_VERSION = "2.17.20";
|
|
1704
1704
|
|
|
1705
1705
|
function isWorkunitDatasource(ref) {
|
|
1706
1706
|
return ref.WUID !== undefined;
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sources":["../../../node_modules/tslib/tslib.es6.js","../src/__package__.ts","../src/ddl/v1.ts","../src/ddl/v2.ts","../src/dermatology.ts","../src/upgrade.ts","../src/cli.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || from);\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","export const PKG_NAME = \"@hpcc-js/ddl-shim\";\r\nexport const PKG_VERSION = \"2.17.16\";\r\nexport const BUILD_VERSION = \"2.71.0\";\r\n","export type StringStringDict = { [key: string]: string; };\n\n// Datasource ===============================================================\nexport type IFilterRule = \"==\" | \"!=\" | \"<\" | \"<=\" | \">\" | \">=\" | \"set\" | \"notequals\";\nexport interface IFilter {\n fieldid: string;\n nullable: boolean;\n rule: IFilterRule;\n minid?: string;\n maxid?: string;\n}\n\nexport interface IOutput {\n id: string;\n from?: string;\n filter?: IFilter[];\n notify?: string[];\n}\n\nexport interface IDatasource {\n id: string;\n filter?: IFilter[];\n outputs: IOutput[];\n}\n\nexport interface IWorkunitDatasource extends IDatasource {\n WUID: boolean;\n}\nexport function isWorkunitDatasource(ref: IAnyDatasource): ref is IWorkunitDatasource {\n return (ref as IWorkunitDatasource).WUID !== undefined;\n}\n\nexport interface IDatabombDatasource extends IDatasource {\n databomb: true;\n}\nexport function isDatabombDatasource(ref: IAnyDatasource): ref is IDatabombDatasource {\n return (ref as IDatabombDatasource).databomb === true;\n}\n\nexport interface IHipieDatasource extends IDatasource {\n URL: string;\n}\nexport function isHipieDatasource(ref: IAnyDatasource): ref is IHipieDatasource {\n return (ref as IHipieDatasource).URL !== undefined;\n}\n\nexport type IAnyDatasource = IWorkunitDatasource | IDatabombDatasource | IHipieDatasource;\n// Event ====================================================================\nexport interface IEventUpdate {\n visualization: string;\n instance?: string;\n datasource: string;\n col?: string;\n merge: boolean;\n mappings?: StringStringDict;\n}\n\nexport interface IEvent {\n mappings?: StringStringDict; // Legacy\n updates: IEventUpdate[];\n}\n\n// Mappings =================================================================\nexport interface IPieMapping {\n label: string;\n weight: string;\n}\n\nexport interface ILineMapping {\n x: string[];\n y: string[];\n}\n\nexport interface ITableMapping {\n value: string[];\n}\n\nexport interface IChoroMapping {\n weight: string | string[];\n}\n\nexport interface IChoroUSStateMapping extends IChoroMapping {\n state: string;\n}\n\nexport interface IChoroUSCountyMapping extends IChoroMapping {\n county: string;\n}\n\nexport interface IChoroGeohashMapping extends IChoroMapping {\n geohash: string;\n}\n\nexport interface IGraphMapping {\n uid: string;\n label: string;\n weight: string;\n flags: string;\n}\n\nexport interface IGraphLinkMapping {\n uid: string;\n}\n\nexport interface IHeatMapMapping {\n x: string;\n y: string;\n weight: string;\n}\n\nexport interface ISliderMapping {\n label: string;\n}\n// Source ===================================================================\nexport interface ISource {\n id: string;\n output: string;\n sort?: string[];\n first?: string | number;\n reverse?: boolean;\n properties?: StringStringDict; // TODO Needed?\n}\n\nexport interface IPieSource extends ISource {\n mappings: IPieMapping;\n}\n\nexport interface ILineSource extends ISource {\n mappings: ILineMapping;\n}\n\nexport interface ITableSource extends ISource {\n mappings: ITableMapping;\n}\n\nexport interface IGraphLink {\n mappings: IGraphLinkMapping;\n childfile: string;\n}\n\nexport interface IGraphSource extends ISource {\n mappings: IGraphMapping;\n link: IGraphLink;\n}\n\nexport interface IHeatMapSource extends ISource {\n mappings: IHeatMapMapping;\n}\n\nexport interface IChoroSource extends ISource {\n mappings: IAnyChoroMapping;\n}\n\nexport interface ISliderSource extends ISource {\n mappings: ISliderMapping;\n}\n\n// Visualization ============================================================\nexport type VisualizationType = \"PIE\" | \"LINE\" | \"BAR\" | \"TABLE\" | \"CHORO\" | \"GRAPH\" | \"HEAT_MAP\" | \"SLIDER\" | \"SUMMARY\" | \"FORM\" | \"2DCHART\" | \"WORD_CLOUD\" | \"BUBBLE\";\nexport type VisualizationFieldDataType = \"bool\" | \"boolean\" | \"integer\" | \"integer4\" | \"integer8\" | \"unsigned\" | \"unsigned4\" | \"unsigned8\" | \"float\" | \"double\" | \"real\" | \"real4\" | \"real8\" | \"string\" | \"date\" | \"time\" | \"geohash\" | \"dataset\" | \"visualization\";\nexport type VisualizationFieldType = VisualizationFieldDataType | \"range\";\nexport type VisualizationFieldFuncitonType = \"SUM\" | \"AVE\" | \"MIN\" | \"MAX\" | \"SCALE\";\n\nexport interface IVisualizationField {\n id: string;\n properties: {\n label?: string;\n datatype: VisualizationFieldDataType;\n default?: any[];\n function?: VisualizationFieldFuncitonType;\n params?: {\n param1: string;\n param2: string;\n }\n type: VisualizationFieldType;\n };\n}\n\nexport interface IVisualization {\n id: string;\n title?: string;\n type: VisualizationType;\n fields?: IVisualizationField[];\n properties?: {\n charttype?: string,\n\n // TODO Split Known Properties ---\n [key: string]: any\n };\n events?: { [key: string]: IEvent };\n onSelect?: any; // legacy\n color?: any; // legacy\n}\n\nexport interface IPieVisualization extends IVisualization {\n type: \"PIE\" | \"BAR\";\n source: IPieSource;\n}\nexport function isPieVisualization(viz: IAnyVisualization): viz is IPieVisualization {\n return (viz as IPieVisualization).type === \"PIE\" || (viz as IPieVisualization).type === \"BAR\";\n}\n\nexport interface ILineVisualization extends IVisualization {\n type: \"LINE\";\n source: ILineSource;\n}\nexport function isLineVisualization(viz: IAnyVisualization): viz is ILineVisualization {\n return (viz as ILineVisualization).type === \"LINE\";\n}\n\nexport type ChoroColor = \"default\" | \"YlGn\" | \"YlGnBu\" | \"GnBu\" | \"BuGn\" | \"PuBuGn\" | \"PuBu\" | \"BuPu\" | \"RdPu\" | \"PuRd\" | \"OrRd\" | \"YlOrRd\" | \"YlOrBr\" | \"Purples\" | \"Blues\" | \"Greens\" | \"Oranges\" | \"Reds\" | \"Greys\" | \"PuOr\" | \"BrBG\" | \"PRGn\" | \"PiYG\" | \"RdBu\" | \"RdGy\" | \"RdYlBu\" | \"Spectral\" | \"RdYlGn\" | \"RdWhGr\";\nexport interface IChoroVisualization extends IVisualization {\n type: \"CHORO\";\n source: IChoroSource;\n\n visualizations?: IChoroVisualization[];\n color?: ChoroColor;\n}\nexport function isChoroVisualization(viz: IAnyVisualization): viz is IChoroVisualization {\n return (viz as IChoroVisualization).type === \"CHORO\";\n}\n\nexport interface ITableVisualization extends IVisualization {\n type: \"TABLE\";\n label: string[];\n source: ITableSource;\n}\nexport function isTableVisualization(viz: IAnyVisualization): viz is ITableVisualization {\n return (viz as ITableVisualization).type === \"TABLE\";\n}\n\nexport interface ISliderVisualization extends IVisualization {\n type: \"SLIDER\";\n source: ISliderSource;\n range?: number[];\n}\nexport function isSliderVisualization(viz: IAnyVisualization): viz is ISliderVisualization {\n return (viz as ISliderVisualization).type === \"SLIDER\";\n}\n\nexport interface IIcon {\n [id: string]: string | number | boolean;\n}\n\nexport type IValueMappings = { [key: string]: IIcon; };\n\nexport interface IVisualizationIcon {\n fieldid?: string;\n faChar?: string;\n valuemappings?: IValueMappings;\n}\n\nexport interface IGraphVisualization extends IVisualization {\n type: \"GRAPH\";\n source: IGraphSource;\n\n label: string[];\n icon: IVisualizationIcon;\n flag: IVisualizationIcon[];\n}\nexport function isGraphVisualization(viz: IAnyVisualization): viz is IGraphVisualization {\n return (viz as IGraphVisualization).type === \"GRAPH\";\n}\n\nexport interface IHeatMapVisualization extends IVisualization {\n type: \"HEAT_MAP\";\n source: IHeatMapSource;\n}\nexport function isHeatMapVisualization(viz: IAnyVisualization): viz is IHeatMapVisualization {\n return (viz as IHeatMapVisualization).type === \"HEAT_MAP\";\n}\n\nexport interface IFormVisualization extends IVisualization {\n type: \"FORM\";\n}\nexport function isFormVisualization(viz: IAnyVisualization): viz is IFormVisualization {\n return (viz as IFormVisualization).type === \"FORM\";\n}\n\n// Dashboard ================================================================\nexport interface IDashboard {\n id?: string;\n title?: string;\n enable?: string;\n label?: string;\n primary?: boolean;\n visualizations: IAnyVisualization[];\n}\n\nexport interface IDDL {\n dashboards: IDashboard[];\n datasources: IAnyDatasource[];\n hipieversion: string;\n visualizationversion: string;\n}\n\n// DDL ======================================================================\nexport type DDLSchema = IDDL;\n\n// Helpers ==================================================================\nexport type IAnyChoroMapping = IChoroUSStateMapping | IChoroUSCountyMapping | IChoroGeohashMapping;\nexport function isUSStateMapping(mappings: IAnyChoroMapping) {\n return (mappings as IChoroUSStateMapping).state !== undefined;\n}\nexport function isUSCountyMapping(mappings: IAnyChoroMapping) {\n return (mappings as IChoroUSCountyMapping).county !== undefined;\n}\nexport function isGeohashMapping(mappings: IAnyChoroMapping) {\n return (mappings as IChoroGeohashMapping).geohash !== undefined;\n}\nexport type IAnyMapping = IPieMapping | ILineMapping | IGraphMapping | IAnyChoroMapping | ITableMapping | IHeatMapMapping;\nexport type IAnySource = IPieSource | ILineSource | ITableSource | IChoroSource | IGraphSource | IHeatMapSource;\nexport type IAnyVisualization = IPieVisualization | ILineVisualization | ITableVisualization | IChoroVisualization | IGraphVisualization | IHeatMapVisualization | ISliderVisualization | IFormVisualization;\n","export type RowType = { [key: string]: any; };\n\n// Fields ==============================================================\nexport type Number64 = string;\nexport type Range = [number | string, number | string];\nexport type Dataset = any[];\nexport type IFieldType = \"boolean\" | \"number\" | \"number64\" | \"string\" | \"range\" | \"dataset\" | \"set\" | \"object\";\n\nexport interface IFieldBoolean {\n type: \"boolean\";\n id: string;\n default?: boolean;\n}\n\nexport interface IFieldNumber {\n type: \"number\";\n id: string;\n default?: number;\n}\n\nexport interface IFieldNumber64 {\n type: \"number64\";\n id: string;\n default?: Number64;\n}\n\nexport interface IFieldString {\n type: \"string\";\n id: string;\n default?: string;\n}\n\nexport interface IFieldRange {\n type: \"range\";\n id: string;\n default?: Range;\n}\n\nexport interface IFieldDataset {\n type: \"dataset\";\n id: string;\n default?: Dataset;\n children: IField[];\n}\n\nexport interface IFieldSet {\n type: \"set\";\n id: string;\n default?: Array<string | number>;\n fieldType: \"string\" | \"number\";\n}\n\nexport interface IFieldObject {\n type: \"object\";\n id: string;\n default?: object;\n fields: { [key: string]: IField };\n}\n\nexport type IField = IFieldBoolean | IFieldNumber | IFieldNumber64 | IFieldString | IFieldRange | IFieldDataset | IFieldSet | IFieldObject;\n\n// Datasources ==============================================================\nexport type IDatasourceType = \"wuresult\" | \"logicalfile\" | \"roxie\" | \"hipie\" | \"rest\" | \"form\" | \"databomb\";\nexport type DatasourceType = IWUResult | ILogicalFile | IRoxieService | IHipieService | IRestService | IForm | IDatabomb;\n\nexport interface IDatasource {\n type: IDatasourceType;\n id: string;\n}\n\nexport interface IService extends IDatasource {\n url: string;\n}\n\nexport interface IOutput {\n fields: IField[];\n}\n\nexport type OutputDict = { [key: string]: IOutput };\n\nexport interface IWUResult extends IService {\n type: \"wuresult\";\n wuid: string;\n outputs: OutputDict;\n}\n\nexport interface ILogicalFile extends IService {\n type: \"logicalfile\";\n logicalFile: string;\n fields: IField[];\n}\n\nexport interface IRoxieService extends IService {\n type: \"roxie\";\n querySet: string;\n queryID: string;\n inputs: IField[];\n outputs: OutputDict;\n}\n\nexport interface IHipieService extends IService {\n type: \"hipie\";\n querySet: string;\n queryID: string;\n inputs: IField[];\n outputs: OutputDict;\n}\n\nexport interface IRestService extends IService {\n type: \"rest\";\n action: string;\n mode?: \"get\" | \"post\";\n inputs: IField[];\n outputs: OutputDict;\n}\n\nexport interface IForm extends IDatasource {\n type: \"form\";\n fields: IField[];\n}\n\nexport type IDatabombFormat = \"csv\" | \"tsv\" | \"json\";\nexport interface IDatabomb extends IDatasource {\n type: \"databomb\";\n fields: IField[];\n format: IDatabombFormat;\n payload?: string;\n}\n\n// IDatasorceRef ---\nexport interface IDatasourceBaseRef {\n id: string;\n}\n\nexport interface IDatabombRef extends IDatasourceBaseRef {\n}\n\nexport interface IWUResultRef extends IDatasourceBaseRef {\n output: string;\n}\n\nexport interface IRestResultRef extends IDatasourceBaseRef {\n responseField: string;\n}\n\nexport interface IHipieSqlRef extends IDatasourceBaseRef {\n}\n\nexport interface IRequestField {\n localFieldID: string;\n source: string;\n remoteFieldID: string;\n value: string;\n}\n\nexport interface IRoxieServiceRef extends IDatasourceBaseRef {\n request: IRequestField[];\n output: string;\n}\n\nexport type IDatasourceRef = IDatabombRef | IWUResultRef | IRoxieServiceRef | IHipieSqlRef;\n\nexport function isDatabombRef(ref: IDatasourceRef): ref is IDatabombRef {\n return !isWUResultRef(ref) && !isRoxieServiceRef(ref);\n}\n\nexport function isWUResultRef(ref: IDatasourceRef): ref is IWUResultRef {\n return (ref as IWUResultRef).output !== undefined && !isRoxieServiceRef(ref);\n}\n\nexport function isRoxieServiceRef(ref: IDatasourceRef): ref is IRoxieServiceRef {\n return (ref as IRoxieServiceRef).request !== undefined;\n}\n\n// Activities ===============================================================\nexport type IActivityType = \"filter\" | \"project\" | \"groupby\" | \"sort\" | \"limit\" | \"mappings\";\nexport type ActivityType = IFilter | IProject | IGroupBy | ISort | ILimit | IMappings;\n\nexport interface IActivity {\n type: IActivityType;\n}\n\n// Filter ===================================================================\nexport type IMappingConditionType = \"==\" | \"!=\" | \">\" | \">=\" | \"<\" | \"<=\" | \"range\" | \"in\";\nexport interface IMapping {\n remoteFieldID: string;\n localFieldID: string;\n condition: IMappingConditionType;\n nullable: boolean;\n}\n\nexport interface IFilterCondition {\n viewID: string;\n mappings: IMapping[];\n}\n\nexport interface IFilterStaticCondition {\n localFieldID: string;\n condition: IMappingConditionType;\n value: string | number;\n}\n\nexport type FilterCondition = IFilterCondition | IFilterStaticCondition;\nexport function isIFilterCondition(fc: FilterCondition): fc is IFilterCondition {\n return !!(fc as IFilterCondition).viewID;\n}\n\nexport interface IFilter extends IActivity {\n type: \"filter\";\n conditions: FilterCondition[];\n}\nexport function isFilterActivity(activity: IActivity): activity is IFilter {\n return activity.type === \"filter\";\n}\n\n// Project ==================================================================\nexport interface IEquals {\n fieldID: string;\n type: \"=\";\n sourceFieldID: string;\n transformations?: MultiTransformationType[];\n}\nexport type ICalculatedType = \"+\" | \"-\" | \"*\" | \"/\";\nexport interface ICalculated {\n fieldID: string;\n type: ICalculatedType;\n sourceFieldID1: string;\n sourceFieldID2: string;\n}\n\nexport interface IScale {\n fieldID: string;\n type: \"scale\";\n sourceFieldID: string;\n factor: number;\n}\n\nexport interface ITemplate {\n fieldID: string;\n type: \"template\";\n template: string;\n}\n\nexport interface IMapMapping {\n value: any;\n newValue: any;\n}\n\nexport interface IMap {\n fieldID: string;\n type: \"map\";\n sourceFieldID: string;\n default: any;\n mappings: IMapMapping[];\n}\n\nexport type MultiTransformationType = IEquals | ICalculated | IScale | ITemplate | IMap;\nexport interface IMulti {\n fieldID: string;\n type: \"multi\";\n transformations: MultiTransformationType[];\n}\n\nexport type ProjectTransformationType = MultiTransformationType | IMulti;\nexport interface IProject extends IActivity {\n type: \"project\";\n transformations: ProjectTransformationType[];\n}\nexport function isProjectActivity(activity: IActivity): activity is IProject {\n return activity.type === \"project\";\n}\nexport interface IMappings extends IActivity {\n type: \"mappings\";\n transformations: ProjectTransformationType[];\n}\nexport function isMappingsActivity(activity: IActivity): activity is IMappings {\n return activity.type === \"mappings\";\n}\n// GroupBy ==================================================================\nexport type IAggregateType = \"min\" | \"max\" | \"sum\" | \"mean\" | \"variance\" | \"deviation\";\nexport interface IAggregate {\n fieldID: string;\n type: IAggregateType;\n inFieldID: string;\n baseCountFieldID?: string;\n}\n\nexport interface ICount {\n fieldID: string;\n type: \"count\";\n}\n\nexport type AggregateType = IAggregate | ICount;\n\nexport interface IGroupBy extends IActivity {\n type: \"groupby\";\n groupByIDs: string[];\n aggregates: AggregateType[];\n}\nexport function isGroupByActivity(activity: IActivity): activity is IGroupBy {\n return activity.type === \"groupby\";\n}\n\n// Sort =====================================================================\nexport interface ISortCondition {\n fieldID: string;\n descending: boolean;\n}\n\nexport interface ISort extends IActivity {\n type: \"sort\";\n conditions: ISortCondition[];\n}\nexport function isSortActivity(activity: IActivity): activity is ISort {\n return activity.type === \"sort\";\n}\n\n// Limit ====================================================================\nexport interface ILimit extends IActivity {\n type: \"limit\";\n limit: number;\n}\nexport function isLimitActivity(activity: IActivity): activity is ILimit {\n return activity.type === \"limit\";\n}\n\n// Visualization ============================================================\nexport interface IWidgetProperties {\n __class: string;\n [propID: string]: string | string[] | number | boolean | undefined | IWidgetProperties | IWidgetProperties[];\n}\n\nexport interface IWidget {\n id: string;\n chartType: string;\n __class: string;\n properties: IWidgetProperties;\n}\n\nexport type VisibilityType = \"normal\" | \"flyout\";\nexport const VisibilitySet: VisibilityType[] = [\"normal\", \"flyout\"];\n\nexport interface IVisualization extends IWidget {\n title: string;\n description?: string;\n visibility: VisibilityType;\n mappings: IMappings;\n secondaryDataviewID?: string;\n}\n\n// View =====================================================================\nexport interface IView {\n id: string;\n datasource: IDatasourceRef;\n activities: ActivityType[];\n visualization: IVisualization;\n}\n\n// DDL ======================================================================\nexport interface IProperties {\n [propID: string]: any;\n}\n\nexport interface Schema {\n version: \"2.2.1\";\n createdBy: {\n name: string;\n version: string;\n };\n datasources: DatasourceType[];\n dataviews: IView[];\n properties?: IProperties;\n hipieProperties?: IProperties;\n\n // The following defs are only provided to assist the Java code generation (from the the generated schema) ---\n defs?: {\n fieldTypes: {\n number64: Number64;\n range: Range;\n dataset: Dataset;\n fieldType: IFieldType;\n fieldBoolean: IFieldBoolean;\n fieldNumber: IFieldNumber;\n fieldNumber64: IFieldNumber64\n fieldString: IFieldString;\n fieldRange: IFieldRange;\n fieldDataset: IFieldDataset;\n fieldSet: IFieldSet;\n fieldObject: IFieldObject;\n field: IField;\n };\n datasourceTypes: {\n datasource: IDatasource;\n logicalFile: ILogicalFile;\n form: IForm;\n databomb: IDatabomb;\n wuresult: IWUResult;\n hipieService: IHipieService;\n roxieService: IRoxieService;\n };\n datasourceRefTypes: {\n wuResultRef: IWUResultRef;\n roxieServiceRef: IRoxieServiceRef;\n };\n activityTypes: {\n filter: IFilter;\n project: IProject;\n groupby: IGroupBy;\n sort: ISort;\n limit: ILimit;\n mappings: IMappings;\n };\n aggregateTypes: {\n aggregate: IAggregate;\n count: ICount;\n };\n transformationTypes: {\n equals: IEquals;\n calculated: ICalculated;\n scale: IScale;\n template: ITemplate;\n map: IMap;\n multi: IMulti;\n };\n };\n}\n","import * as DDL2 from \"./ddl/v2\";\n\nconst classMappings: any = {\n c3chart_Bar: \"chart_Bar\",\n c3chart_Column: \"chart_Column\",\n c3chart_Pie: \"chart_Pie\",\n c3chart_Area: \"chart_Area\",\n c3chart_Line: \"chart_Line\",\n amchart_Bar: \"chart_Bar\",\n amchart_Column: \"chart_Column\",\n amchart_Pie: \"chart_Pie\",\n amchart_Area: \"chart_Area\",\n amchart_Line: \"chart_Line\",\n google_Bar: \"chart_Bar\",\n google_Column: \"chart_Column\",\n google_Pie: \"chart_Pie\",\n google_Area: \"chart_Area\",\n google_Line: \"chart_Line\",\n other_Table: \"dgrid_Table\"\n};\nconst propertyMappings: any = {\n xAxisLabelRotation: [\n { name: \"xAxisOverlapMode\", transform: (n: any) => \"rotate\" },\n { name: \"xAxisLabelRotation\", transform: (n: any) => n }\n ],\n tooltipLabelColor: {\n name: \"tooltipLabelColor\"\n },\n tooltipSeriesColor: {\n name: \"tooltipSeriesColor\"\n },\n tooltipValueColor: {\n name: \"tooltipValueColor\"\n },\n tooltipValueFormat: {\n name: \"tooltipValueFormat\"\n },\n timePattern: {\n name: \"xAxisTypeTimePattern\"\n },\n smoothLines: {\n name: \"interpolate\",\n transform: (n: any) => {\n if (n === false) return \"linear\";\n return \"catmullRom\";\n }\n },\n holePercent: {\n name: \"innerRadius\"\n },\n flip: {\n name: \"orientation\",\n transform: (n: any) => n ? \"vertical\" : \"horizontal\"\n },\n bottomText: {\n name: \"xAxisTitle\"\n },\n xAxisTypeTimePattern: {\n name: \"xAxisTypeTimePattern\"\n },\n yAxisTypeTimePattern: {\n name: \"yAxisTypeTimePattern\"\n },\n valueFormat: {\n name: \"tooltipValueFormat\"\n },\n stacked: {\n name: \"yAxisStacked\"\n },\n showYGrid: {\n name: \"yAxisGuideLines\"\n },\n showXGrid: {\n name: \"xAxisGuideLines\"\n },\n showValueLabel: {\n name: \"showValue\"\n },\n low: {\n name: \"yAxisDomainLow\"\n },\n high: {\n name: \"yAxisDomainHigh\"\n },\n fillOpacity: {\n name: \"interpolateFillOpacity\"\n },\n areaFillOpacity: {\n name: \"interpolateFillOpacity\"\n },\n showToolbar: {\n name: \"titleVisible\"\n },\n showCSV: {\n name: \"downloadButtonVisible\"\n }\n};\n\nfunction findKeyVal(object: any, key: any, val: any): any {\n let value;\n\n for (const k in object) {\n if (k === key && object[k] === val) {\n value = object;\n break;\n }\n if (object[k] && typeof object[k] === \"object\") {\n value = findKeyVal(object[k], key, val);\n if (value !== undefined) {\n break;\n }\n }\n }\n return value;\n}\n\nfunction apply_to_dataviews(ddl2: DDL2.Schema, dermObj: any) {\n\n ddl2.dataviews.forEach(apply_to_dataview);\n\n function apply_to_dataview(dv: any) {\n const widgetId = dv.id;\n const dermPanelObj: any = findKeyVal(dermObj, \"__id\", widgetId);\n if (dermPanelObj) {\n const dermPanelProps: any = dermPanelObj.__properties;\n const dermWidgetObj: any = dermPanelObj.__properties.chart ? dermPanelObj.__properties.chart : dermPanelObj.__properties.widget;\n const dermWidgetProps: any = dermWidgetObj.__properties;\n apply_class_mapping(dermWidgetObj);\n apply_panel_property_mapping(dermPanelProps, dermWidgetProps);\n apply_widget_property_mapping(dermPanelProps, dermWidgetProps);\n if (dv.visualization.properties.chartType) {\n dv.visualization.properties.charttype = dv.visualization.properties.chartType;\n }\n } else {\n console.warn(widgetId + \" not found in dermObj\");\n }\n\n function apply_class_mapping(dermWidgetObj: any) {\n dv.visualization.__class = swap_with_supported_class(dermWidgetObj.__class);\n dv.visualization.properties.__class = \"marshaller_VizChartPanel\";\n if (!dv.visualization.properties.widget) dv.visualization.properties.widget = {};\n dv.visualization.properties.widget.__class = dv.visualization.__class;\n\n function swap_with_supported_class(_class: string): string {\n return classMappings[_class] ? classMappings[_class] : _class;\n }\n }\n function apply_panel_property_mapping(dermPanelProps: any, dermWidgetProps: any) {\n dv.visualization.title = dermPanelProps.title || \"\";\n dv.visualization.description = \"\";\n dv.visualization.visibility = dv.visualization.visibility === \"flyout\" ? \"flyout\" : \"normal\";\n dv.visualization.chartType = dv.visualization.__class.split(\"_\")[1];\n for (const propName in dermPanelProps) {\n if (typeof propertyMappings[propName] !== \"undefined\") {\n const newPropName = propertyMappings[propName].name;\n\n if (typeof propertyMappings[propName].transform === \"function\") {\n dv.visualization.properties[newPropName] = propertyMappings[propName].transform(dermPanelProps[propName]);\n } else {\n dv.visualization.properties[newPropName] = dermPanelProps[propName];\n }\n\n }\n }\n if (dermWidgetProps && dermWidgetProps.showLegend && dv.visualization.properties) {\n dv.visualization.properties.legendVisible = true;\n }\n }\n function apply_widget_property_mapping(dermPanelProps: any, dermWidgetProps: any) {\n dv.visualization.title = dv.visualization.title || dermWidgetProps.title || \"\";\n dv.visualization.description = \"\"; // TODO - should this map to anything?\n dv.visualization.visibility = dv.visualization.visibility === \"flyout\" ? \"flyout\" : \"normal\";\n dv.visualization.chartType = dv.visualization.__class.split(\"_\")[1];\n for (const propName in dermWidgetProps) {\n if (typeof propertyMappings[propName] !== \"undefined\") {\n if (propertyMappings[propName] instanceof Array) {\n propertyMappings[propName].forEach((p: any) => {\n const newPropName = p.name;\n dv.visualization.properties.widget[newPropName] = p.transform(dermWidgetProps[propName]);\n if (typeof propertyMappings[propName].transform === \"function\") {\n dv.visualization.properties.widget[newPropName] = propertyMappings[propName].transform(dermWidgetProps[propName]);\n } else {\n dv.visualization.properties.widget[newPropName] = dermWidgetProps[propName];\n }\n });\n } else {\n const newPropName = propertyMappings[propName].name;\n dv.visualization.properties.widget[newPropName] = propertyMappings[propName].transform(dermWidgetProps[propName]);\n }\n }\n }\n }\n }\n}\n\ntype CellPosition = {\n id: string;\n position: [number, number, number, number];\n};\n\ntype DDLProperties = {\n layout: CellPosition[]\n};\n\nfunction apply_to_properties_layout(ddl2: DDL2.Schema, dermObj: any) {\n const retVal: DDLProperties = {\n layout: []\n };\n if (!dermObj || !dermObj.__properties) return;\n dermObj.__properties.content.forEach((cell: any) => {\n const cellPosition: CellPosition = {\n // TODO - if \"id\" could be avoided then layouts could apply to any dashboard with the same number of widgets\n id: cell.__properties.widget.__id,\n position: [\n cell.__properties.gridCol,\n cell.__properties.gridRow,\n cell.__properties.gridColSpan,\n cell.__properties.gridRowSpan\n ]\n };\n retVal.layout.push(cellPosition);\n });\n return retVal;\n}\n\nexport function upgrade(ddl2: DDL2.Schema, dermObj: any) {\n apply_to_dataviews(ddl2, dermObj);\n return apply_to_properties_layout(ddl2, dermObj);\n}\n","import { PKG_NAME, PKG_VERSION } from \"./__package__\";\nimport * as DDL1 from \"./ddl/v1\";\nimport * as DDL2 from \"./ddl/v2\";\nimport { upgrade as dermatologyUpgrade } from \"./dermatology\";\n\ninterface IDatasourceOutput {\n datasource: DDL1.IAnyDatasource;\n output: DDL1.IOutput;\n}\n\ninterface IDatasourceOutputFilter extends IDatasourceOutput {\n filter: DDL1.IFilter;\n}\n\nconst UPGRADE_HEX_CHAR: boolean = false;\nfunction faCharFix(faChar: any): string | undefined {\n if (UPGRADE_HEX_CHAR && typeof faChar === \"string\") {\n return String.fromCharCode(parseInt(faChar));\n }\n return faChar;\n}\n\nclass DDLUpgrade {\n _ddl: DDL1.IDDL;\n _baseUrl: string;\n _wuid?: string;\n _toLowerCase: boolean;\n\n _datasources: { [id: string]: DDL1.IAnyDatasource } = {};\n _datasourceUpdates: { [id: string]: { id: string, output?: string } } = {};\n _visualizations: { [id: string]: DDL1.IAnyVisualization } = {};\n\n _ddl2Datasources: { [id: string]: DDL2.DatasourceType } = {};\n _ddl2DatasourceFields: { [dsid: string]: { [outputID: string]: { [fieldID: string]: DDL2.IField } } } = {};\n\n _ddl2Dataviews: { [id: string]: DDL2.IView } = {};\n _ddl2DataviewActivities: {\n [viewID: string]: {\n project: DDL2.IProject,\n filters: DDL2.IFilter,\n sort: DDL2.ISort,\n groupBy: DDL2.IGroupBy,\n limit: DDL2.ILimit,\n mappings: DDL2.IMappings\n }\n } = {};\n\n constructor(ddl: DDL1.IDDL, baseUrl: string = \"http://localhost:8010\", wuid: string = \"WUID\", toLowerCase = true) {\n this._ddl = ddl;\n this._baseUrl = baseUrl;\n this._wuid = wuid;\n this._toLowerCase = toLowerCase;\n\n this.indexDDL();\n this.readDDL();\n }\n\n toLowerCase(s: string): string {\n return this._toLowerCase ? s.toLowerCase() : s;\n }\n\n isVizDatasourceRoxie(viz: DDL1.IAnyVisualization): boolean {\n if ((viz as any).source) {\n const ds = this._datasources[(viz as any).source.id];\n if (DDL1.isHipieDatasource(ds)) {\n return true;\n }\n }\n return false;\n }\n\n getDatasourceOutputs(dsID: string, vizID: string): IDatasourceOutput[] {\n const retVal: IDatasourceOutput[] = [];\n const datasource = this._datasources[dsID];\n for (const output of datasource.outputs) {\n if (output.notify) {\n for (const notify of output.notify) {\n if (notify === vizID) {\n retVal.push({\n datasource,\n output\n });\n }\n }\n }\n }\n return retVal;\n }\n\n getDatasourceFilters(dsID: string, vizID: string): { [id: string]: IDatasourceOutputFilter } {\n const retVal: { [id: string]: IDatasourceOutputFilter } = {};\n for (const dsOut of this.getDatasourceOutputs(dsID, vizID)) {\n if (dsOut.output.filter) {\n for (const filter of dsOut.output.filter) {\n retVal[filter.fieldid] = {\n datasource: dsOut.datasource,\n output: dsOut.output,\n filter\n };\n }\n }\n }\n return retVal;\n }\n\n indexDDL() {\n for (const dash of this._ddl.dashboards) {\n for (const viz of dash.visualizations) {\n this._visualizations[viz.id] = viz;\n }\n }\n\n for (const ds of this._ddl.datasources) {\n this._datasources[ds.id] = ds;\n for (const output of ds.outputs) {\n if (output.notify) {\n for (const notify of output.notify) {\n this._datasourceUpdates[notify] = {\n id: ds.id,\n output: output.from || output.id\n };\n }\n }\n }\n }\n }\n\n readDDL() {\n for (const ds of this._ddl.datasources) {\n if (DDL1.isWorkunitDatasource(ds)) {\n const ddl2DS: DDL2.IWUResult = {\n type: \"wuresult\",\n id: ds.id,\n url: this._baseUrl,\n wuid: this._wuid!,\n outputs: {}\n };\n for (const output of ds.outputs) {\n this.output2output(output, ddl2DS.outputs);\n }\n this._ddl2Datasources[ds.id] = ddl2DS;\n } else if (DDL1.isDatabombDatasource(ds)) {\n } else {\n const urlParts = ds.URL!.split(\"/WsEcl/submit/query/\");\n const hostParts = urlParts[0];\n const roxieParts = urlParts[1].split(\"/\");\n const ddl2DS: DDL2.IHipieService = {\n type: \"hipie\",\n id: ds.id,\n url: hostParts,\n querySet: roxieParts[0],\n queryID: roxieParts[1],\n inputs: [],\n outputs: {}\n };\n for (const output of ds.outputs) {\n this.output2output(output, ddl2DS.outputs);\n }\n this._ddl2Datasources[ds.id] = ddl2DS;\n }\n }\n for (const dash of this._ddl.dashboards) {\n for (const viz of dash.visualizations) {\n if (viz.type === \"FORM\") {\n this._ddl2Datasources[viz.id] = {\n type: \"form\",\n id: viz.id,\n fields: this.formFields2field(viz.fields)\n };\n this._datasourceUpdates[viz.id] = { id: viz.id };\n } else if (viz.type === \"SLIDER\") {\n this._ddl2Datasources[viz.id] = {\n type: \"form\",\n id: viz.id,\n fields: this.formFields2field(viz.fields, true)\n };\n this._datasourceUpdates[viz.id] = { id: viz.id };\n }\n\n this._ddl2Dataviews[viz.id] = this.anyViz2view(viz);\n }\n }\n\n this.readGroupBy();\n this.readFilters();\n this.readSort();\n this.readMappings();\n }\n\n readGroupBy() {\n for (const dash of this._ddl.dashboards) {\n for (const viz of dash.visualizations) {\n if (viz.fields) {\n const projectTransformations: DDL2.ProjectTransformationType[] = [];\n const groupByColumns: string[] = [];\n const aggrFields: DDL2.IAggregate[] = [];\n for (const field of viz.fields) {\n if (field.properties && field.properties.function) {\n switch (field.properties.function) {\n case \"SUM\":\n case \"MIN\":\n case \"MAX\":\n aggrFields.push({\n type: this.func2aggr(field.properties.function),\n inFieldID: this.toLowerCase(field.properties.params!.param1),\n fieldID: this.toLowerCase(field.id)\n } as DDL2.IAggregate);\n break;\n case \"AVE\":\n aggrFields.push({\n type: this.func2aggr(field.properties.function),\n inFieldID: this.toLowerCase(field.properties.params!.param1),\n baseCountFieldID: field.properties.params!.param2 ? this.toLowerCase(field.properties.params!.param2) : undefined,\n fieldID: this.toLowerCase(field.id)\n } as DDL2.IAggregate);\n break;\n case \"SCALE\":\n if (typeof field.properties.params!.param1 === \"object\") {\n const props: any = field.properties.params!.param1;\n switch (props.function) {\n case \"SUM\":\n case \"MIN\":\n case \"MAX\":\n aggrFields.push({\n type: this.func2aggr(props.function),\n inFieldID: this.toLowerCase(props.params.param1),\n fieldID: this.toLowerCase(field.id)\n });\n break;\n }\n }\n projectTransformations.push({\n type: \"scale\",\n sourceFieldID: this.toLowerCase(field.id),\n fieldID: this.toLowerCase(field.id),\n factor: +field.properties.params!.param2\n });\n break;\n default:\n groupByColumns.push(this.toLowerCase(field.id));\n throw new Error(`Unhandled field function: ${field.properties.function}`);\n }\n } else {\n groupByColumns.push(this.toLowerCase(field.id));\n }\n }\n if (projectTransformations.length) {\n this._ddl2DataviewActivities[viz.id].project.transformations = projectTransformations;\n }\n if (aggrFields.length) {\n this._ddl2DataviewActivities[viz.id].groupBy.groupByIDs = [...groupByColumns];\n this._ddl2DataviewActivities[viz.id].groupBy.aggregates = aggrFields;\n }\n }\n }\n }\n }\n\n func2aggr(func: DDL1.VisualizationFieldFuncitonType): DDL2.IAggregateType {\n switch (func) {\n case \"SUM\":\n return \"sum\";\n case \"AVE\":\n return \"mean\";\n case \"MIN\":\n return \"min\";\n case \"MAX\":\n return \"max\";\n }\n throw new Error(`Unknown DDL1 Function Type: ${func}`);\n }\n\n readMappings() {\n for (const dash of this._ddl.dashboards) {\n for (const viz of dash.visualizations) {\n if (DDL1.isFormVisualization(viz)) {\n } else if (DDL1.isPieVisualization(viz)) {\n this.readPieMappings(viz);\n } else if (DDL1.isChoroVisualization(viz)) {\n this.readChoroMappings(viz);\n } else if (DDL1.isLineVisualization(viz)) {\n this.readLineMappings(viz);\n } else if (DDL1.isTableVisualization(viz)) {\n this.readTableMappings(viz);\n } else if (DDL1.isGraphVisualization(viz)) {\n this.readGraphMappings(viz);\n } else if (DDL1.isSliderVisualization(viz)) {\n this.readSliderMappings(viz);\n } else {\n throw new Error(`Unkown DDL1 mapping type: ${viz.type}`);\n }\n }\n }\n }\n\n readPieMappings(viz: DDL1.IPieVisualization) {\n const mappings = this._ddl2DataviewActivities[viz.id].mappings;\n mappings.transformations.push({\n fieldID: \"label\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.label)\n });\n mappings.transformations.push({\n fieldID: \"weight\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.weight[0])\n });\n }\n\n readChoroMappings(viz: DDL1.IChoroVisualization) {\n const mappings = this._ddl2DataviewActivities[viz.id].mappings;\n mappings.transformations.push({\n fieldID: \"label\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(this.anyChoroMapping2label(viz.source.mappings))\n });\n mappings.transformations.push({\n fieldID: \"weight\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.weight[0])\n });\n }\n\n anyChoroMapping2label(mapping: any) {\n return mapping.state || mapping.county || mapping.geohash;\n }\n\n readLineMappings(viz: DDL1.ILineVisualization) {\n const mappings = this._ddl2DataviewActivities[viz.id].mappings;\n mappings.transformations.push({\n fieldID: viz.source.mappings.x[0],\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.x[0])\n });\n for (let i = 0; i < viz.source.mappings.y.length; ++i) {\n mappings.transformations.push({\n fieldID: viz.source.mappings.y[i],\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.y[i])\n });\n }\n }\n\n readTableMappings(viz: DDL1.ITableVisualization) {\n const mappings = this._ddl2DataviewActivities[viz.id].mappings;\n for (let i = 0; i < viz.label.length; ++i) {\n mappings.transformations.push({\n fieldID: viz.label[i],\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.value[i])\n });\n }\n }\n\n readGraphEnums(valueMappings?: DDL1.IValueMappings, annotation: boolean = false): DDL2.IMapMapping[] {\n const retVal: DDL2.IMapMapping[] = [];\n if (valueMappings) {\n for (const value in valueMappings) {\n const newValue: { [key: string]: string | number | boolean | undefined } = {};\n for (const key in valueMappings[value]) {\n if (key === \"faChar\") {\n newValue[key] = faCharFix(valueMappings[value][key]);\n } else if (annotation && key.indexOf(\"icon_\") === 0) {\n console.log(\"Deprecated flag property: \" + key);\n newValue[key.split(\"icon_\")[1]] = valueMappings[value][key];\n } else {\n newValue[key] = valueMappings[value][key];\n }\n }\n // remove v1.x \"0\" annotations as they equated to \"nothing\" ---\n if (!annotation || value !== \"0\") {\n retVal.push({\n value,\n newValue\n });\n }\n }\n }\n return retVal;\n }\n\n readGraphMappings(viz: DDL1.IGraphVisualization) {\n const mappings = this._ddl2DataviewActivities[viz.id].mappings;\n mappings.transformations.push({\n fieldID: \"uid\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.uid)\n });\n mappings.transformations.push({\n fieldID: \"label\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.label)\n });\n if (viz.icon.fieldid) {\n mappings.transformations.push({\n fieldID: \"icon\",\n type: \"map\",\n sourceFieldID: this.toLowerCase(viz.icon.fieldid),\n default: { fachar: faCharFix(viz.icon.faChar) },\n mappings: this.readGraphEnums(viz.icon.valuemappings)\n });\n }\n let idx = 0;\n if (viz.flag) {\n for (const flag of viz.flag) {\n if (flag.fieldid) {\n mappings.transformations.push({\n fieldID: `annotation_${idx++}`,\n type: \"map\",\n sourceFieldID: this.toLowerCase(flag.fieldid),\n default: {},\n mappings: this.readGraphEnums(flag.valuemappings, true)\n });\n }\n }\n }\n mappings.transformations.push({\n fieldID: \"links\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.link.childfile),\n transformations: [{\n fieldID: \"uid\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.link.mappings.uid)\n }]\n });\n }\n\n readSliderMappings(viz: DDL1.ISliderVisualization) {\n const mappings = this._ddl2DataviewActivities[viz.id].mappings;\n mappings.transformations.push({\n fieldID: \"label\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.label)\n });\n }\n\n readFilters() {\n for (const dash of this._ddl.dashboards) {\n for (const viz of dash.visualizations) {\n if (viz.events) {\n for (const eventID in viz.events) {\n const event = viz.events[eventID];\n for (const update of event.updates) {\n const otherViz = this._ddl2Dataviews[update.visualization];\n const dsFilters = this.getDatasourceFilters(update.datasource, otherViz.id);\n if (update.mappings) {\n if (DDL2.isRoxieServiceRef(otherViz.datasource)) {\n for (const key in update.mappings) {\n otherViz.datasource.request.push({\n source: viz.id,\n remoteFieldID: this.toLowerCase(key),\n localFieldID: this.toLowerCase(update.mappings[key])\n } as DDL2.IRequestField);\n }\n } else {\n const condition: DDL2.IFilterCondition = {\n viewID: viz.id,\n mappings: []\n };\n for (const key in update.mappings) {\n const mapping = update.mappings[key];\n const dsFilter = (mapping && dsFilters[mapping]) ? dsFilters[mapping].filter : undefined;\n if (!dsFilter) {\n console.warn(`Select Mapping \"${mapping}\" in viz \"${viz.id}\" not found in filters for \"${otherViz.id}\"`);\n } else {\n condition.mappings.push({\n remoteFieldID: this.toLowerCase(key),\n localFieldID: this.toLowerCase(update.mappings[key]),\n condition: this.rule2condition(dsFilter.rule),\n nullable: dsFilter.nullable\n });\n }\n }\n this._ddl2DataviewActivities[otherViz.id].filters.conditions.push(condition);\n }\n }\n }\n }\n }\n }\n }\n }\n\n rule2condition(_: DDL1.IFilterRule): DDL2.IMappingConditionType {\n switch (_) {\n case \"set\":\n return \"in\";\n case \"notequals\":\n return \"!=\";\n }\n return _;\n }\n\n readSort() {\n for (const dash of this._ddl.dashboards) {\n for (const viz of dash.visualizations) {\n if ((viz as any).source) {\n if ((viz as any).source.sort) {\n const vizSort = this._ddl2DataviewActivities[viz.id].sort;\n vizSort.conditions = ((viz as any).source.sort as string[]).map(s => {\n if (s.indexOf(\"-\") === 0) {\n return {\n fieldID: this.toLowerCase(s.substr(1)),\n descending: true\n } as DDL2.ISortCondition;\n }\n return {\n fieldID: this.toLowerCase(s),\n descending: false\n } as DDL2.ISortCondition;\n });\n }\n if ((viz as any).source.first) {\n const vizLimit = this._ddl2DataviewActivities[viz.id].limit;\n vizLimit.limit = +(viz as any).source.first;\n }\n }\n }\n }\n }\n\n anyViz2view(viz: DDL1.IAnyVisualization): DDL2.IView {\n const project: DDL2.IProject = {\n type: \"project\",\n transformations: []\n };\n const filters: DDL2.IFilter = {\n type: \"filter\",\n conditions: []\n };\n const groupBy: DDL2.IGroupBy = {\n type: \"groupby\",\n groupByIDs: [],\n aggregates: []\n };\n const sort: DDL2.ISort = {\n type: \"sort\",\n conditions: []\n };\n const limit: DDL2.ILimit = {\n type: \"limit\",\n limit: 0\n };\n const mappings: DDL2.IMappings = {\n type: \"mappings\",\n transformations: []\n };\n this._ddl2DataviewActivities[viz.id] = {\n project,\n filters,\n sort,\n groupBy,\n limit,\n mappings\n };\n const datasourceRef: DDL2.IDatasourceBaseRef | DDL2.IRoxieServiceRef = this.isVizDatasourceRoxie(viz) ? {\n id: this._datasourceUpdates[viz.id].id,\n request: [],\n output: this._datasourceUpdates[viz.id].output\n } : {\n id: this._datasourceUpdates[viz.id].id,\n output: this._datasourceUpdates[viz.id].output\n };\n return {\n id: viz.id,\n datasource: datasourceRef,\n activities: [\n project,\n filters,\n sort,\n groupBy,\n limit\n ],\n visualization: {\n id: viz.id,\n title: viz.title || \"\",\n description: \"\",\n visibility: viz.properties && viz.properties.flyout === true ? \"flyout\" : \"normal\",\n ...this.type2chartType(viz.type),\n mappings,\n properties: (viz.properties || {}) as DDL2.IWidgetProperties\n }\n };\n }\n\n type2chartType(chartType: DDL1.VisualizationType): { chartType: string, __class: string } {\n switch (chartType) {\n case \"LINE\":\n return { chartType: \"Line\", __class: \"chart_Line\" };\n case \"BUBBLE\":\n return { chartType: \"Bubble\", __class: \"chart_Bubble\" };\n case \"PIE\":\n return { chartType: \"Pie\", __class: \"chart_Pie\" };\n case \"BAR\":\n return { chartType: \"Column\", __class: \"chart_Column\" };\n case \"FORM\":\n return { chartType: \"FieldForm\", __class: \"form_FieldForm\" };\n case \"WORD_CLOUD\":\n return { chartType: \"WordCloud\", __class: \"chart_WordCloud\" };\n case \"CHORO\":\n return { chartType: \"ChoroplethStates\", __class: \"map_ChoroplethStates\" };\n case \"SUMMARY\":\n return { chartType: \"Summary\", __class: \"chart_Summary\" };\n case \"SLIDER\":\n return { chartType: \"FieldForm\", __class: \"form_FieldForm\" };\n case \"HEAT_MAP\":\n return { chartType: \"HeatMap\", __class: \"other_HeatMap\" };\n case \"2DCHART\":\n return { chartType: \"Column\", __class: \"chart_Column\" };\n case \"GRAPH\":\n return { chartType: \"AdjacencyGraph\", __class: \"graph_AdjacencyGraph\" };\n case \"TABLE\":\n default:\n return { chartType: \"Table\", __class: \"dgrid_Table\" };\n }\n }\n\n formFields2field(fields?: DDL1.IVisualizationField[], slider: boolean = false): DDL2.IField[] {\n if (!fields) return [];\n return fields.map(field => {\n switch (field.properties.type) {\n case \"range\":\n return {\n type: \"range\",\n id: field.id,\n default: (field.properties.default ? field.properties.default as DDL2.Range : undefined)\n };\n case \"dataset\":\n return {\n type: \"dataset\",\n id: field.id,\n default: [],\n children: []\n };\n default:\n return {\n type: this.formFieldType2fieldType(field.properties.datatype, slider),\n id: field.id,\n default: field.properties.default ? field.properties.default[0] : undefined\n };\n }\n });\n }\n\n formFieldType2fieldType(fieldType: DDL1.VisualizationFieldType, slider: boolean): \"string\" | \"number\" | \"boolean\" {\n switch (fieldType) {\n case \"bool\":\n case \"boolean\":\n return \"boolean\";\n case \"integer\":\n case \"unsigned\":\n case \"float\":\n case \"double\":\n case \"real\":\n return \"number\";\n case \"string\":\n return \"string\";\n default:\n return slider ? \"number\" : \"string\";\n }\n }\n\n output2output(output: DDL1.IOutput, target: DDL2.OutputDict) {\n target[output.from || output.id] = {\n fields: this.filters2fields(output.filter)\n };\n }\n\n filters2fields(filters?: DDL1.IFilter[]): DDL2.IField[] {\n if (!filters) return [];\n return filters.filter(filter => {\n const idParts = filter.fieldid.split(\"-\");\n return idParts.length === 1 || idParts[1] === \"range\";\n }).map(filter => {\n const idParts = filter.fieldid.split(\"-\");\n const retVal: DDL2.IFieldString = {\n type: \"string\",\n id: idParts[0]\n };\n return retVal;\n });\n }\n\n getVizField(vizID: string, fieldID: string): DDL2.IField {\n return {\n type: \"string\",\n id: \"\",\n default: \"\"\n };\n }\n\n writeDatasources(): DDL2.DatasourceType[] {\n const retVal: DDL2.DatasourceType[] = [];\n for (const id in this._ddl2Datasources) {\n retVal.push(this._ddl2Datasources[id]);\n }\n return retVal;\n }\n\n writeDataviews(): DDL2.IView[] {\n const retVal: DDL2.IView[] = [];\n for (const id in this._ddl2Dataviews) {\n retVal.push(this._ddl2Dataviews[id]);\n }\n return retVal;\n }\n\n writeProperties(): DDL2.IProperties | undefined {\n return {\n // TODO\n };\n }\n\n write(): DDL2.Schema {\n return {\n version: \"2.2.1\",\n createdBy: {\n name: PKG_NAME,\n version: PKG_VERSION\n },\n datasources: this.writeDatasources(),\n dataviews: this.writeDataviews(),\n properties: this.writeProperties()\n };\n }\n}\n\nexport function upgrade(ddl: DDL1.IDDL, baseUrl?: string, wuid?: string, toLowerCase: boolean = true, dermatologyJson = {}): DDL2.Schema {\n const ddlUp = new DDLUpgrade(ddl, baseUrl, wuid, toLowerCase);\n const retVal = ddlUp.write();\n retVal.properties = dermatologyUpgrade(retVal, dermatologyJson);\n return retVal;\n}\n","import * as fs from \"fs\";\n\n// @ts-ignore\nimport * as ddl2Schema from \"../schema/v2.json\";\nimport { upgrade } from \"./upgrade\";\n\nconst args = process.argv.slice(2);\n\nswitch (args[0]) {\n case \"--echo\":\n process.stdout.write(args[1]);\n break;\n case \"--schema\":\n process.stdout.write(JSON.stringify(ddl2Schema));\n break;\n case \"--upgrade\":\n case \"--upgradeNoLower\":\n const srcPath = args[1];\n const destPath = args[2];\n const baseUrl = args[3];\n const wuid = args[4];\n const layoutPath = args[5];\n if (srcPath && destPath && srcPath !== destPath) {\n let layoutJson = {};\n if (layoutPath) {\n try {\n layoutJson = JSON.parse(fs.readFileSync(layoutPath).toString());\n } catch (e) {\n console.error(e);\n }\n }\n fs.readFile(srcPath, \"utf8\", function (err, data) {\n if (err) throw err;\n const ddl2 = upgrade(\n JSON.parse(data),\n baseUrl || \"http://localhost:8010\",\n wuid || \"WUID\",\n args[0] === \"--upgrade\",\n layoutJson\n );\n fs.writeFile(destPath, JSON.stringify(ddl2), function (err) {\n if (err) throw err;\n console.log(\"complete\");\n });\n });\n }\n break;\n case \"--help\":\n break;\n default:\n process.stdout.write(`\nUsage: <command>\n\nwhere <command> is one of:\n --schema: output DDL2 schmea.\n --upgrade ddl1 [baseUrl wuid [layout]]: updgrade ddl and layout version 1 to ddl version 2.\n --upgradeNoLower ddl1 [baseUrl wuid [layout]]: updgrade ddl and layout version 1 to ddl version 2 without changing field IDs upper/lower casing.\n --help: this message.\n`);\n}\n"],"names":["DDL1.isHipieDatasource","DDL1.isWorkunitDatasource","DDL1.isDatabombDatasource","DDL1.isFormVisualization","DDL1.isPieVisualization","DDL1.isChoroVisualization","DDL1.isLineVisualization","DDL1.isTableVisualization","DDL1.isGraphVisualization","DDL1.isSliderVisualization","DDL2.isRoxieServiceRef","upgrade","dermatologyUpgrade","fs.readFileSync","fs.readFile","fs.writeFile"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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OAAO,IAAI,UAAQ,IAAI,OAAO,KAAK,UAAQ,EAAE;YAC7C,IAAI,YAAU,GAAG,EAAE,CAAC;YACpB,IAAI,UAAU,EAAE;gBACZ,IAAI;oBACA,YAAU,GAAG,IAAI,CAAC,KAAK,CAACC,eAAe,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;iBACnE;gBAAC,OAAO,CAAC,EAAE;oBACR,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;iBACpB;aACJ;YACDC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,GAAG,EAAE,IAAI;gBAC5C,IAAI,GAAG;oBAAE,MAAM,GAAG,CAAC;gBACnB,IAAM,IAAI,GAAGH,SAAO,CAChB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAChB,SAAO,IAAI,uBAAuB,EAClC,MAAI,IAAI,MAAM,EACd,IAAI,CAAC,CAAC,CAAC,KAAK,WAAW,EACvB,YAAU,CACb,CAAC;gBACFI,YAAY,CAAC,UAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG;oBACtD,IAAI,GAAG;wBAAE,MAAM,GAAG,CAAC;oBACnB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;iBAC3B,CAAC,CAAC;aACN,CAAC,CAAC;SACN;QACD,MAAM;IACV,KAAK,QAAQ;QACT,MAAM;IACV;QACI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,8WAQ5B,CAAC,CAAC;"}
|
|
1
|
+
{"version":3,"file":"cli.js","sources":["../../../node_modules/tslib/tslib.es6.js","../src/__package__.ts","../src/ddl/v1.ts","../src/ddl/v2.ts","../src/dermatology.ts","../src/upgrade.ts","../src/cli.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || from);\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","export const PKG_NAME = \"@hpcc-js/ddl-shim\";\r\nexport const PKG_VERSION = \"2.17.20\";\r\nexport const BUILD_VERSION = \"2.94.0\";\r\n","export type StringStringDict = { [key: string]: string; };\n\n// Datasource ===============================================================\nexport type IFilterRule = \"==\" | \"!=\" | \"<\" | \"<=\" | \">\" | \">=\" | \"set\" | \"notequals\";\nexport interface IFilter {\n fieldid: string;\n nullable: boolean;\n rule: IFilterRule;\n minid?: string;\n maxid?: string;\n}\n\nexport interface IOutput {\n id: string;\n from?: string;\n filter?: IFilter[];\n notify?: string[];\n}\n\nexport interface IDatasource {\n id: string;\n filter?: IFilter[];\n outputs: IOutput[];\n}\n\nexport interface IWorkunitDatasource extends IDatasource {\n WUID: boolean;\n}\nexport function isWorkunitDatasource(ref: IAnyDatasource): ref is IWorkunitDatasource {\n return (ref as IWorkunitDatasource).WUID !== undefined;\n}\n\nexport interface IDatabombDatasource extends IDatasource {\n databomb: true;\n}\nexport function isDatabombDatasource(ref: IAnyDatasource): ref is IDatabombDatasource {\n return (ref as IDatabombDatasource).databomb === true;\n}\n\nexport interface IHipieDatasource extends IDatasource {\n URL: string;\n}\nexport function isHipieDatasource(ref: IAnyDatasource): ref is IHipieDatasource {\n return (ref as IHipieDatasource).URL !== undefined;\n}\n\nexport type IAnyDatasource = IWorkunitDatasource | IDatabombDatasource | IHipieDatasource;\n// Event ====================================================================\nexport interface IEventUpdate {\n visualization: string;\n instance?: string;\n datasource: string;\n col?: string;\n merge: boolean;\n mappings?: StringStringDict;\n}\n\nexport interface IEvent {\n mappings?: StringStringDict; // Legacy\n updates: IEventUpdate[];\n}\n\n// Mappings =================================================================\nexport interface IPieMapping {\n label: string;\n weight: string;\n}\n\nexport interface ILineMapping {\n x: string[];\n y: string[];\n}\n\nexport interface ITableMapping {\n value: string[];\n}\n\nexport interface IChoroMapping {\n weight: string | string[];\n}\n\nexport interface IChoroUSStateMapping extends IChoroMapping {\n state: string;\n}\n\nexport interface IChoroUSCountyMapping extends IChoroMapping {\n county: string;\n}\n\nexport interface IChoroGeohashMapping extends IChoroMapping {\n geohash: string;\n}\n\nexport interface IGraphMapping {\n uid: string;\n label: string;\n weight: string;\n flags: string;\n}\n\nexport interface IGraphLinkMapping {\n uid: string;\n}\n\nexport interface IHeatMapMapping {\n x: string;\n y: string;\n weight: string;\n}\n\nexport interface ISliderMapping {\n label: string;\n}\n// Source ===================================================================\nexport interface ISource {\n id: string;\n output: string;\n sort?: string[];\n first?: string | number;\n reverse?: boolean;\n properties?: StringStringDict; // TODO Needed?\n}\n\nexport interface IPieSource extends ISource {\n mappings: IPieMapping;\n}\n\nexport interface ILineSource extends ISource {\n mappings: ILineMapping;\n}\n\nexport interface ITableSource extends ISource {\n mappings: ITableMapping;\n}\n\nexport interface IGraphLink {\n mappings: IGraphLinkMapping;\n childfile: string;\n}\n\nexport interface IGraphSource extends ISource {\n mappings: IGraphMapping;\n link: IGraphLink;\n}\n\nexport interface IHeatMapSource extends ISource {\n mappings: IHeatMapMapping;\n}\n\nexport interface IChoroSource extends ISource {\n mappings: IAnyChoroMapping;\n}\n\nexport interface ISliderSource extends ISource {\n mappings: ISliderMapping;\n}\n\n// Visualization ============================================================\nexport type VisualizationType = \"PIE\" | \"LINE\" | \"BAR\" | \"TABLE\" | \"CHORO\" | \"GRAPH\" | \"HEAT_MAP\" | \"SLIDER\" | \"SUMMARY\" | \"FORM\" | \"2DCHART\" | \"WORD_CLOUD\" | \"BUBBLE\";\nexport type VisualizationFieldDataType = \"bool\" | \"boolean\" | \"integer\" | \"integer4\" | \"integer8\" | \"unsigned\" | \"unsigned4\" | \"unsigned8\" | \"float\" | \"double\" | \"real\" | \"real4\" | \"real8\" | \"string\" | \"date\" | \"time\" | \"geohash\" | \"dataset\" | \"visualization\";\nexport type VisualizationFieldType = VisualizationFieldDataType | \"range\";\nexport type VisualizationFieldFuncitonType = \"SUM\" | \"AVE\" | \"MIN\" | \"MAX\" | \"SCALE\";\n\nexport interface IVisualizationField {\n id: string;\n properties: {\n label?: string;\n datatype: VisualizationFieldDataType;\n default?: any[];\n function?: VisualizationFieldFuncitonType;\n params?: {\n param1: string;\n param2: string;\n }\n type: VisualizationFieldType;\n };\n}\n\nexport interface IVisualization {\n id: string;\n title?: string;\n type: VisualizationType;\n fields?: IVisualizationField[];\n properties?: {\n charttype?: string,\n\n // TODO Split Known Properties ---\n [key: string]: any\n };\n events?: { [key: string]: IEvent };\n onSelect?: any; // legacy\n color?: any; // legacy\n}\n\nexport interface IPieVisualization extends IVisualization {\n type: \"PIE\" | \"BAR\";\n source: IPieSource;\n}\nexport function isPieVisualization(viz: IAnyVisualization): viz is IPieVisualization {\n return (viz as IPieVisualization).type === \"PIE\" || (viz as IPieVisualization).type === \"BAR\";\n}\n\nexport interface ILineVisualization extends IVisualization {\n type: \"LINE\";\n source: ILineSource;\n}\nexport function isLineVisualization(viz: IAnyVisualization): viz is ILineVisualization {\n return (viz as ILineVisualization).type === \"LINE\";\n}\n\nexport type ChoroColor = \"default\" | \"YlGn\" | \"YlGnBu\" | \"GnBu\" | \"BuGn\" | \"PuBuGn\" | \"PuBu\" | \"BuPu\" | \"RdPu\" | \"PuRd\" | \"OrRd\" | \"YlOrRd\" | \"YlOrBr\" | \"Purples\" | \"Blues\" | \"Greens\" | \"Oranges\" | \"Reds\" | \"Greys\" | \"PuOr\" | \"BrBG\" | \"PRGn\" | \"PiYG\" | \"RdBu\" | \"RdGy\" | \"RdYlBu\" | \"Spectral\" | \"RdYlGn\" | \"RdWhGr\";\nexport interface IChoroVisualization extends IVisualization {\n type: \"CHORO\";\n source: IChoroSource;\n\n visualizations?: IChoroVisualization[];\n color?: ChoroColor;\n}\nexport function isChoroVisualization(viz: IAnyVisualization): viz is IChoroVisualization {\n return (viz as IChoroVisualization).type === \"CHORO\";\n}\n\nexport interface ITableVisualization extends IVisualization {\n type: \"TABLE\";\n label: string[];\n source: ITableSource;\n}\nexport function isTableVisualization(viz: IAnyVisualization): viz is ITableVisualization {\n return (viz as ITableVisualization).type === \"TABLE\";\n}\n\nexport interface ISliderVisualization extends IVisualization {\n type: \"SLIDER\";\n source: ISliderSource;\n range?: number[];\n}\nexport function isSliderVisualization(viz: IAnyVisualization): viz is ISliderVisualization {\n return (viz as ISliderVisualization).type === \"SLIDER\";\n}\n\nexport interface IIcon {\n [id: string]: string | number | boolean;\n}\n\nexport type IValueMappings = { [key: string]: IIcon; };\n\nexport interface IVisualizationIcon {\n fieldid?: string;\n faChar?: string;\n valuemappings?: IValueMappings;\n}\n\nexport interface IGraphVisualization extends IVisualization {\n type: \"GRAPH\";\n source: IGraphSource;\n\n label: string[];\n icon: IVisualizationIcon;\n flag: IVisualizationIcon[];\n}\nexport function isGraphVisualization(viz: IAnyVisualization): viz is IGraphVisualization {\n return (viz as IGraphVisualization).type === \"GRAPH\";\n}\n\nexport interface IHeatMapVisualization extends IVisualization {\n type: \"HEAT_MAP\";\n source: IHeatMapSource;\n}\nexport function isHeatMapVisualization(viz: IAnyVisualization): viz is IHeatMapVisualization {\n return (viz as IHeatMapVisualization).type === \"HEAT_MAP\";\n}\n\nexport interface IFormVisualization extends IVisualization {\n type: \"FORM\";\n}\nexport function isFormVisualization(viz: IAnyVisualization): viz is IFormVisualization {\n return (viz as IFormVisualization).type === \"FORM\";\n}\n\n// Dashboard ================================================================\nexport interface IDashboard {\n id?: string;\n title?: string;\n enable?: string;\n label?: string;\n primary?: boolean;\n visualizations: IAnyVisualization[];\n}\n\nexport interface IDDL {\n dashboards: IDashboard[];\n datasources: IAnyDatasource[];\n hipieversion: string;\n visualizationversion: string;\n}\n\n// DDL ======================================================================\nexport type DDLSchema = IDDL;\n\n// Helpers ==================================================================\nexport type IAnyChoroMapping = IChoroUSStateMapping | IChoroUSCountyMapping | IChoroGeohashMapping;\nexport function isUSStateMapping(mappings: IAnyChoroMapping) {\n return (mappings as IChoroUSStateMapping).state !== undefined;\n}\nexport function isUSCountyMapping(mappings: IAnyChoroMapping) {\n return (mappings as IChoroUSCountyMapping).county !== undefined;\n}\nexport function isGeohashMapping(mappings: IAnyChoroMapping) {\n return (mappings as IChoroGeohashMapping).geohash !== undefined;\n}\nexport type IAnyMapping = IPieMapping | ILineMapping | IGraphMapping | IAnyChoroMapping | ITableMapping | IHeatMapMapping;\nexport type IAnySource = IPieSource | ILineSource | ITableSource | IChoroSource | IGraphSource | IHeatMapSource;\nexport type IAnyVisualization = IPieVisualization | ILineVisualization | ITableVisualization | IChoroVisualization | IGraphVisualization | IHeatMapVisualization | ISliderVisualization | IFormVisualization;\n","export type RowType = { [key: string]: any; };\n\n// Fields ==============================================================\nexport type Number64 = string;\nexport type Range = [number | string, number | string];\nexport type Dataset = any[];\nexport type IFieldType = \"boolean\" | \"number\" | \"number64\" | \"string\" | \"range\" | \"dataset\" | \"set\" | \"object\";\n\nexport interface IFieldBoolean {\n type: \"boolean\";\n id: string;\n default?: boolean;\n}\n\nexport interface IFieldNumber {\n type: \"number\";\n id: string;\n default?: number;\n}\n\nexport interface IFieldNumber64 {\n type: \"number64\";\n id: string;\n default?: Number64;\n}\n\nexport interface IFieldString {\n type: \"string\";\n id: string;\n default?: string;\n}\n\nexport interface IFieldRange {\n type: \"range\";\n id: string;\n default?: Range;\n}\n\nexport interface IFieldDataset {\n type: \"dataset\";\n id: string;\n default?: Dataset;\n children: IField[];\n}\n\nexport interface IFieldSet {\n type: \"set\";\n id: string;\n default?: Array<string | number>;\n fieldType: \"string\" | \"number\";\n}\n\nexport interface IFieldObject {\n type: \"object\";\n id: string;\n default?: object;\n fields: { [key: string]: IField };\n}\n\nexport type IField = IFieldBoolean | IFieldNumber | IFieldNumber64 | IFieldString | IFieldRange | IFieldDataset | IFieldSet | IFieldObject;\n\n// Datasources ==============================================================\nexport type IDatasourceType = \"wuresult\" | \"logicalfile\" | \"roxie\" | \"hipie\" | \"rest\" | \"form\" | \"databomb\";\nexport type DatasourceType = IWUResult | ILogicalFile | IRoxieService | IHipieService | IRestService | IForm | IDatabomb;\n\nexport interface IDatasource {\n type: IDatasourceType;\n id: string;\n}\n\nexport interface IService extends IDatasource {\n url: string;\n}\n\nexport interface IOutput {\n fields: IField[];\n}\n\nexport type OutputDict = { [key: string]: IOutput };\n\nexport interface IWUResult extends IService {\n type: \"wuresult\";\n wuid: string;\n outputs: OutputDict;\n}\n\nexport interface ILogicalFile extends IService {\n type: \"logicalfile\";\n logicalFile: string;\n fields: IField[];\n}\n\nexport interface IRoxieService extends IService {\n type: \"roxie\";\n querySet: string;\n queryID: string;\n inputs: IField[];\n outputs: OutputDict;\n}\n\nexport interface IHipieService extends IService {\n type: \"hipie\";\n querySet: string;\n queryID: string;\n inputs: IField[];\n outputs: OutputDict;\n}\n\nexport interface IRestService extends IService {\n type: \"rest\";\n action: string;\n mode?: \"get\" | \"post\";\n inputs: IField[];\n outputs: OutputDict;\n}\n\nexport interface IForm extends IDatasource {\n type: \"form\";\n fields: IField[];\n}\n\nexport type IDatabombFormat = \"csv\" | \"tsv\" | \"json\";\nexport interface IDatabomb extends IDatasource {\n type: \"databomb\";\n fields: IField[];\n format: IDatabombFormat;\n payload?: string;\n}\n\n// IDatasorceRef ---\nexport interface IDatasourceBaseRef {\n id: string;\n}\n\nexport interface IDatabombRef extends IDatasourceBaseRef {\n}\n\nexport interface IWUResultRef extends IDatasourceBaseRef {\n output: string;\n}\n\nexport interface IRestResultRef extends IDatasourceBaseRef {\n responseField: string;\n}\n\nexport interface IHipieSqlRef extends IDatasourceBaseRef {\n}\n\nexport interface IRequestField {\n localFieldID: string;\n source: string;\n remoteFieldID: string;\n value: string;\n}\n\nexport interface IRoxieServiceRef extends IDatasourceBaseRef {\n request: IRequestField[];\n output: string;\n}\n\nexport type IDatasourceRef = IDatabombRef | IWUResultRef | IRoxieServiceRef | IHipieSqlRef;\n\nexport function isDatabombRef(ref: IDatasourceRef): ref is IDatabombRef {\n return !isWUResultRef(ref) && !isRoxieServiceRef(ref);\n}\n\nexport function isWUResultRef(ref: IDatasourceRef): ref is IWUResultRef {\n return (ref as IWUResultRef).output !== undefined && !isRoxieServiceRef(ref);\n}\n\nexport function isRoxieServiceRef(ref: IDatasourceRef): ref is IRoxieServiceRef {\n return (ref as IRoxieServiceRef).request !== undefined;\n}\n\n// Activities ===============================================================\nexport type IActivityType = \"filter\" | \"project\" | \"groupby\" | \"sort\" | \"limit\" | \"mappings\";\nexport type ActivityType = IFilter | IProject | IGroupBy | ISort | ILimit | IMappings;\n\nexport interface IActivity {\n type: IActivityType;\n}\n\n// Filter ===================================================================\nexport type IMappingConditionType = \"==\" | \"!=\" | \">\" | \">=\" | \"<\" | \"<=\" | \"range\" | \"in\";\nexport interface IMapping {\n remoteFieldID: string;\n localFieldID: string;\n condition: IMappingConditionType;\n nullable: boolean;\n}\n\nexport interface IFilterCondition {\n viewID: string;\n mappings: IMapping[];\n}\n\nexport interface IFilterStaticCondition {\n localFieldID: string;\n condition: IMappingConditionType;\n value: string | number;\n}\n\nexport type FilterCondition = IFilterCondition | IFilterStaticCondition;\nexport function isIFilterCondition(fc: FilterCondition): fc is IFilterCondition {\n return !!(fc as IFilterCondition).viewID;\n}\n\nexport interface IFilter extends IActivity {\n type: \"filter\";\n conditions: FilterCondition[];\n}\nexport function isFilterActivity(activity: IActivity): activity is IFilter {\n return activity.type === \"filter\";\n}\n\n// Project ==================================================================\nexport interface IEquals {\n fieldID: string;\n type: \"=\";\n sourceFieldID: string;\n transformations?: MultiTransformationType[];\n}\nexport type ICalculatedType = \"+\" | \"-\" | \"*\" | \"/\";\nexport interface ICalculated {\n fieldID: string;\n type: ICalculatedType;\n sourceFieldID1: string;\n sourceFieldID2: string;\n}\n\nexport interface IScale {\n fieldID: string;\n type: \"scale\";\n sourceFieldID: string;\n factor: number;\n}\n\nexport interface ITemplate {\n fieldID: string;\n type: \"template\";\n template: string;\n}\n\nexport interface IMapMapping {\n value: any;\n newValue: any;\n}\n\nexport interface IMap {\n fieldID: string;\n type: \"map\";\n sourceFieldID: string;\n default: any;\n mappings: IMapMapping[];\n}\n\nexport type MultiTransformationType = IEquals | ICalculated | IScale | ITemplate | IMap;\nexport interface IMulti {\n fieldID: string;\n type: \"multi\";\n transformations: MultiTransformationType[];\n}\n\nexport type ProjectTransformationType = MultiTransformationType | IMulti;\nexport interface IProject extends IActivity {\n type: \"project\";\n transformations: ProjectTransformationType[];\n}\nexport function isProjectActivity(activity: IActivity): activity is IProject {\n return activity.type === \"project\";\n}\nexport interface IMappings extends IActivity {\n type: \"mappings\";\n transformations: ProjectTransformationType[];\n}\nexport function isMappingsActivity(activity: IActivity): activity is IMappings {\n return activity.type === \"mappings\";\n}\n// GroupBy ==================================================================\nexport type IAggregateType = \"min\" | \"max\" | \"sum\" | \"mean\" | \"variance\" | \"deviation\";\nexport interface IAggregate {\n fieldID: string;\n type: IAggregateType;\n inFieldID: string;\n baseCountFieldID?: string;\n}\n\nexport interface ICount {\n fieldID: string;\n type: \"count\";\n}\n\nexport type AggregateType = IAggregate | ICount;\n\nexport interface IGroupBy extends IActivity {\n type: \"groupby\";\n groupByIDs: string[];\n aggregates: AggregateType[];\n}\nexport function isGroupByActivity(activity: IActivity): activity is IGroupBy {\n return activity.type === \"groupby\";\n}\n\n// Sort =====================================================================\nexport interface ISortCondition {\n fieldID: string;\n descending: boolean;\n}\n\nexport interface ISort extends IActivity {\n type: \"sort\";\n conditions: ISortCondition[];\n}\nexport function isSortActivity(activity: IActivity): activity is ISort {\n return activity.type === \"sort\";\n}\n\n// Limit ====================================================================\nexport interface ILimit extends IActivity {\n type: \"limit\";\n limit: number;\n}\nexport function isLimitActivity(activity: IActivity): activity is ILimit {\n return activity.type === \"limit\";\n}\n\n// Visualization ============================================================\nexport interface IWidgetProperties {\n __class: string;\n [propID: string]: string | string[] | number | boolean | undefined | IWidgetProperties | IWidgetProperties[];\n}\n\nexport interface IWidget {\n id: string;\n chartType: string;\n __class: string;\n properties: IWidgetProperties;\n}\n\nexport type VisibilityType = \"normal\" | \"flyout\";\nexport const VisibilitySet: VisibilityType[] = [\"normal\", \"flyout\"];\n\nexport interface IVisualization extends IWidget {\n title: string;\n description?: string;\n visibility: VisibilityType;\n mappings: IMappings;\n secondaryDataviewID?: string;\n}\n\n// View =====================================================================\nexport interface IView {\n id: string;\n datasource: IDatasourceRef;\n activities: ActivityType[];\n visualization: IVisualization;\n}\n\n// DDL ======================================================================\nexport interface IProperties {\n [propID: string]: any;\n}\n\nexport interface Schema {\n version: \"2.2.1\";\n createdBy: {\n name: string;\n version: string;\n };\n datasources: DatasourceType[];\n dataviews: IView[];\n properties?: IProperties;\n hipieProperties?: IProperties;\n\n // The following defs are only provided to assist the Java code generation (from the the generated schema) ---\n defs?: {\n fieldTypes: {\n number64: Number64;\n range: Range;\n dataset: Dataset;\n fieldType: IFieldType;\n fieldBoolean: IFieldBoolean;\n fieldNumber: IFieldNumber;\n fieldNumber64: IFieldNumber64\n fieldString: IFieldString;\n fieldRange: IFieldRange;\n fieldDataset: IFieldDataset;\n fieldSet: IFieldSet;\n fieldObject: IFieldObject;\n field: IField;\n };\n datasourceTypes: {\n datasource: IDatasource;\n logicalFile: ILogicalFile;\n form: IForm;\n databomb: IDatabomb;\n wuresult: IWUResult;\n hipieService: IHipieService;\n roxieService: IRoxieService;\n };\n datasourceRefTypes: {\n wuResultRef: IWUResultRef;\n roxieServiceRef: IRoxieServiceRef;\n };\n activityTypes: {\n filter: IFilter;\n project: IProject;\n groupby: IGroupBy;\n sort: ISort;\n limit: ILimit;\n mappings: IMappings;\n };\n aggregateTypes: {\n aggregate: IAggregate;\n count: ICount;\n };\n transformationTypes: {\n equals: IEquals;\n calculated: ICalculated;\n scale: IScale;\n template: ITemplate;\n map: IMap;\n multi: IMulti;\n };\n };\n}\n","import * as DDL2 from \"./ddl/v2\";\n\nconst classMappings: any = {\n c3chart_Bar: \"chart_Bar\",\n c3chart_Column: \"chart_Column\",\n c3chart_Pie: \"chart_Pie\",\n c3chart_Area: \"chart_Area\",\n c3chart_Line: \"chart_Line\",\n amchart_Bar: \"chart_Bar\",\n amchart_Column: \"chart_Column\",\n amchart_Pie: \"chart_Pie\",\n amchart_Area: \"chart_Area\",\n amchart_Line: \"chart_Line\",\n google_Bar: \"chart_Bar\",\n google_Column: \"chart_Column\",\n google_Pie: \"chart_Pie\",\n google_Area: \"chart_Area\",\n google_Line: \"chart_Line\",\n other_Table: \"dgrid_Table\"\n};\nconst propertyMappings: any = {\n xAxisLabelRotation: [\n { name: \"xAxisOverlapMode\", transform: (n: any) => \"rotate\" },\n { name: \"xAxisLabelRotation\", transform: (n: any) => n }\n ],\n tooltipLabelColor: {\n name: \"tooltipLabelColor\"\n },\n tooltipSeriesColor: {\n name: \"tooltipSeriesColor\"\n },\n tooltipValueColor: {\n name: \"tooltipValueColor\"\n },\n tooltipValueFormat: {\n name: \"tooltipValueFormat\"\n },\n timePattern: {\n name: \"xAxisTypeTimePattern\"\n },\n smoothLines: {\n name: \"interpolate\",\n transform: (n: any) => {\n if (n === false) return \"linear\";\n return \"catmullRom\";\n }\n },\n holePercent: {\n name: \"innerRadius\"\n },\n flip: {\n name: \"orientation\",\n transform: (n: any) => n ? \"vertical\" : \"horizontal\"\n },\n bottomText: {\n name: \"xAxisTitle\"\n },\n xAxisTypeTimePattern: {\n name: \"xAxisTypeTimePattern\"\n },\n yAxisTypeTimePattern: {\n name: \"yAxisTypeTimePattern\"\n },\n valueFormat: {\n name: \"tooltipValueFormat\"\n },\n stacked: {\n name: \"yAxisStacked\"\n },\n showYGrid: {\n name: \"yAxisGuideLines\"\n },\n showXGrid: {\n name: \"xAxisGuideLines\"\n },\n showValueLabel: {\n name: \"showValue\"\n },\n low: {\n name: \"yAxisDomainLow\"\n },\n high: {\n name: \"yAxisDomainHigh\"\n },\n fillOpacity: {\n name: \"interpolateFillOpacity\"\n },\n areaFillOpacity: {\n name: \"interpolateFillOpacity\"\n },\n showToolbar: {\n name: \"titleVisible\"\n },\n showCSV: {\n name: \"downloadButtonVisible\"\n }\n};\n\nfunction findKeyVal(object: any, key: any, val: any): any {\n let value;\n\n for (const k in object) {\n if (k === key && object[k] === val) {\n value = object;\n break;\n }\n if (object[k] && typeof object[k] === \"object\") {\n value = findKeyVal(object[k], key, val);\n if (value !== undefined) {\n break;\n }\n }\n }\n return value;\n}\n\nfunction apply_to_dataviews(ddl2: DDL2.Schema, dermObj: any) {\n\n ddl2.dataviews.forEach(apply_to_dataview);\n\n function apply_to_dataview(dv: any) {\n const widgetId = dv.id;\n const dermPanelObj: any = findKeyVal(dermObj, \"__id\", widgetId);\n if (dermPanelObj) {\n const dermPanelProps: any = dermPanelObj.__properties;\n const dermWidgetObj: any = dermPanelObj.__properties.chart ? dermPanelObj.__properties.chart : dermPanelObj.__properties.widget;\n const dermWidgetProps: any = dermWidgetObj.__properties;\n apply_class_mapping(dermWidgetObj);\n apply_panel_property_mapping(dermPanelProps, dermWidgetProps);\n apply_widget_property_mapping(dermPanelProps, dermWidgetProps);\n if (dv.visualization.properties.chartType) {\n dv.visualization.properties.charttype = dv.visualization.properties.chartType;\n }\n } else {\n console.warn(widgetId + \" not found in dermObj\");\n }\n\n function apply_class_mapping(dermWidgetObj: any) {\n dv.visualization.__class = swap_with_supported_class(dermWidgetObj.__class);\n dv.visualization.properties.__class = \"marshaller_VizChartPanel\";\n if (!dv.visualization.properties.widget) dv.visualization.properties.widget = {};\n dv.visualization.properties.widget.__class = dv.visualization.__class;\n\n function swap_with_supported_class(_class: string): string {\n return classMappings[_class] ? classMappings[_class] : _class;\n }\n }\n function apply_panel_property_mapping(dermPanelProps: any, dermWidgetProps: any) {\n dv.visualization.title = dermPanelProps.title || \"\";\n dv.visualization.description = \"\";\n dv.visualization.visibility = dv.visualization.visibility === \"flyout\" ? \"flyout\" : \"normal\";\n dv.visualization.chartType = dv.visualization.__class.split(\"_\")[1];\n for (const propName in dermPanelProps) {\n if (typeof propertyMappings[propName] !== \"undefined\") {\n const newPropName = propertyMappings[propName].name;\n\n if (typeof propertyMappings[propName].transform === \"function\") {\n dv.visualization.properties[newPropName] = propertyMappings[propName].transform(dermPanelProps[propName]);\n } else {\n dv.visualization.properties[newPropName] = dermPanelProps[propName];\n }\n\n }\n }\n if (dermWidgetProps && dermWidgetProps.showLegend && dv.visualization.properties) {\n dv.visualization.properties.legendVisible = true;\n }\n }\n function apply_widget_property_mapping(dermPanelProps: any, dermWidgetProps: any) {\n dv.visualization.title = dv.visualization.title || dermWidgetProps.title || \"\";\n dv.visualization.description = \"\"; // TODO - should this map to anything?\n dv.visualization.visibility = dv.visualization.visibility === \"flyout\" ? \"flyout\" : \"normal\";\n dv.visualization.chartType = dv.visualization.__class.split(\"_\")[1];\n for (const propName in dermWidgetProps) {\n if (typeof propertyMappings[propName] !== \"undefined\") {\n if (propertyMappings[propName] instanceof Array) {\n propertyMappings[propName].forEach((p: any) => {\n const newPropName = p.name;\n dv.visualization.properties.widget[newPropName] = p.transform(dermWidgetProps[propName]);\n if (typeof propertyMappings[propName].transform === \"function\") {\n dv.visualization.properties.widget[newPropName] = propertyMappings[propName].transform(dermWidgetProps[propName]);\n } else {\n dv.visualization.properties.widget[newPropName] = dermWidgetProps[propName];\n }\n });\n } else {\n const newPropName = propertyMappings[propName].name;\n dv.visualization.properties.widget[newPropName] = propertyMappings[propName].transform(dermWidgetProps[propName]);\n }\n }\n }\n }\n }\n}\n\ntype CellPosition = {\n id: string;\n position: [number, number, number, number];\n};\n\ntype DDLProperties = {\n layout: CellPosition[]\n};\n\nfunction apply_to_properties_layout(ddl2: DDL2.Schema, dermObj: any) {\n const retVal: DDLProperties = {\n layout: []\n };\n if (!dermObj || !dermObj.__properties) return;\n dermObj.__properties.content.forEach((cell: any) => {\n const cellPosition: CellPosition = {\n // TODO - if \"id\" could be avoided then layouts could apply to any dashboard with the same number of widgets\n id: cell.__properties.widget.__id,\n position: [\n cell.__properties.gridCol,\n cell.__properties.gridRow,\n cell.__properties.gridColSpan,\n cell.__properties.gridRowSpan\n ]\n };\n retVal.layout.push(cellPosition);\n });\n return retVal;\n}\n\nexport function upgrade(ddl2: DDL2.Schema, dermObj: any) {\n apply_to_dataviews(ddl2, dermObj);\n return apply_to_properties_layout(ddl2, dermObj);\n}\n","import { PKG_NAME, PKG_VERSION } from \"./__package__\";\nimport * as DDL1 from \"./ddl/v1\";\nimport * as DDL2 from \"./ddl/v2\";\nimport { upgrade as dermatologyUpgrade } from \"./dermatology\";\n\ninterface IDatasourceOutput {\n datasource: DDL1.IAnyDatasource;\n output: DDL1.IOutput;\n}\n\ninterface IDatasourceOutputFilter extends IDatasourceOutput {\n filter: DDL1.IFilter;\n}\n\nconst UPGRADE_HEX_CHAR: boolean = false;\nfunction faCharFix(faChar: any): string | undefined {\n if (UPGRADE_HEX_CHAR && typeof faChar === \"string\") {\n return String.fromCharCode(parseInt(faChar));\n }\n return faChar;\n}\n\nclass DDLUpgrade {\n _ddl: DDL1.IDDL;\n _baseUrl: string;\n _wuid?: string;\n _toLowerCase: boolean;\n\n _datasources: { [id: string]: DDL1.IAnyDatasource } = {};\n _datasourceUpdates: { [id: string]: { id: string, output?: string } } = {};\n _visualizations: { [id: string]: DDL1.IAnyVisualization } = {};\n\n _ddl2Datasources: { [id: string]: DDL2.DatasourceType } = {};\n _ddl2DatasourceFields: { [dsid: string]: { [outputID: string]: { [fieldID: string]: DDL2.IField } } } = {};\n\n _ddl2Dataviews: { [id: string]: DDL2.IView } = {};\n _ddl2DataviewActivities: {\n [viewID: string]: {\n project: DDL2.IProject,\n filters: DDL2.IFilter,\n sort: DDL2.ISort,\n groupBy: DDL2.IGroupBy,\n limit: DDL2.ILimit,\n mappings: DDL2.IMappings\n }\n } = {};\n\n constructor(ddl: DDL1.IDDL, baseUrl: string = \"http://localhost:8010\", wuid: string = \"WUID\", toLowerCase = true) {\n this._ddl = ddl;\n this._baseUrl = baseUrl;\n this._wuid = wuid;\n this._toLowerCase = toLowerCase;\n\n this.indexDDL();\n this.readDDL();\n }\n\n toLowerCase(s: string): string {\n return this._toLowerCase ? s.toLowerCase() : s;\n }\n\n isVizDatasourceRoxie(viz: DDL1.IAnyVisualization): boolean {\n if ((viz as any).source) {\n const ds = this._datasources[(viz as any).source.id];\n if (DDL1.isHipieDatasource(ds)) {\n return true;\n }\n }\n return false;\n }\n\n getDatasourceOutputs(dsID: string, vizID: string): IDatasourceOutput[] {\n const retVal: IDatasourceOutput[] = [];\n const datasource = this._datasources[dsID];\n for (const output of datasource.outputs) {\n if (output.notify) {\n for (const notify of output.notify) {\n if (notify === vizID) {\n retVal.push({\n datasource,\n output\n });\n }\n }\n }\n }\n return retVal;\n }\n\n getDatasourceFilters(dsID: string, vizID: string): { [id: string]: IDatasourceOutputFilter } {\n const retVal: { [id: string]: IDatasourceOutputFilter } = {};\n for (const dsOut of this.getDatasourceOutputs(dsID, vizID)) {\n if (dsOut.output.filter) {\n for (const filter of dsOut.output.filter) {\n retVal[filter.fieldid] = {\n datasource: dsOut.datasource,\n output: dsOut.output,\n filter\n };\n }\n }\n }\n return retVal;\n }\n\n indexDDL() {\n for (const dash of this._ddl.dashboards) {\n for (const viz of dash.visualizations) {\n this._visualizations[viz.id] = viz;\n }\n }\n\n for (const ds of this._ddl.datasources) {\n this._datasources[ds.id] = ds;\n for (const output of ds.outputs) {\n if (output.notify) {\n for (const notify of output.notify) {\n this._datasourceUpdates[notify] = {\n id: ds.id,\n output: output.from || output.id\n };\n }\n }\n }\n }\n }\n\n readDDL() {\n for (const ds of this._ddl.datasources) {\n if (DDL1.isWorkunitDatasource(ds)) {\n const ddl2DS: DDL2.IWUResult = {\n type: \"wuresult\",\n id: ds.id,\n url: this._baseUrl,\n wuid: this._wuid!,\n outputs: {}\n };\n for (const output of ds.outputs) {\n this.output2output(output, ddl2DS.outputs);\n }\n this._ddl2Datasources[ds.id] = ddl2DS;\n } else if (DDL1.isDatabombDatasource(ds)) {\n } else {\n const urlParts = ds.URL!.split(\"/WsEcl/submit/query/\");\n const hostParts = urlParts[0];\n const roxieParts = urlParts[1].split(\"/\");\n const ddl2DS: DDL2.IHipieService = {\n type: \"hipie\",\n id: ds.id,\n url: hostParts,\n querySet: roxieParts[0],\n queryID: roxieParts[1],\n inputs: [],\n outputs: {}\n };\n for (const output of ds.outputs) {\n this.output2output(output, ddl2DS.outputs);\n }\n this._ddl2Datasources[ds.id] = ddl2DS;\n }\n }\n for (const dash of this._ddl.dashboards) {\n for (const viz of dash.visualizations) {\n if (viz.type === \"FORM\") {\n this._ddl2Datasources[viz.id] = {\n type: \"form\",\n id: viz.id,\n fields: this.formFields2field(viz.fields)\n };\n this._datasourceUpdates[viz.id] = { id: viz.id };\n } else if (viz.type === \"SLIDER\") {\n this._ddl2Datasources[viz.id] = {\n type: \"form\",\n id: viz.id,\n fields: this.formFields2field(viz.fields, true)\n };\n this._datasourceUpdates[viz.id] = { id: viz.id };\n }\n\n this._ddl2Dataviews[viz.id] = this.anyViz2view(viz);\n }\n }\n\n this.readGroupBy();\n this.readFilters();\n this.readSort();\n this.readMappings();\n }\n\n readGroupBy() {\n for (const dash of this._ddl.dashboards) {\n for (const viz of dash.visualizations) {\n if (viz.fields) {\n const projectTransformations: DDL2.ProjectTransformationType[] = [];\n const groupByColumns: string[] = [];\n const aggrFields: DDL2.IAggregate[] = [];\n for (const field of viz.fields) {\n if (field.properties && field.properties.function) {\n switch (field.properties.function) {\n case \"SUM\":\n case \"MIN\":\n case \"MAX\":\n aggrFields.push({\n type: this.func2aggr(field.properties.function),\n inFieldID: this.toLowerCase(field.properties.params!.param1),\n fieldID: this.toLowerCase(field.id)\n } as DDL2.IAggregate);\n break;\n case \"AVE\":\n aggrFields.push({\n type: this.func2aggr(field.properties.function),\n inFieldID: this.toLowerCase(field.properties.params!.param1),\n baseCountFieldID: field.properties.params!.param2 ? this.toLowerCase(field.properties.params!.param2) : undefined,\n fieldID: this.toLowerCase(field.id)\n } as DDL2.IAggregate);\n break;\n case \"SCALE\":\n if (typeof field.properties.params!.param1 === \"object\") {\n const props: any = field.properties.params!.param1;\n switch (props.function) {\n case \"SUM\":\n case \"MIN\":\n case \"MAX\":\n aggrFields.push({\n type: this.func2aggr(props.function),\n inFieldID: this.toLowerCase(props.params.param1),\n fieldID: this.toLowerCase(field.id)\n });\n break;\n }\n }\n projectTransformations.push({\n type: \"scale\",\n sourceFieldID: this.toLowerCase(field.id),\n fieldID: this.toLowerCase(field.id),\n factor: +field.properties.params!.param2\n });\n break;\n default:\n groupByColumns.push(this.toLowerCase(field.id));\n throw new Error(`Unhandled field function: ${field.properties.function}`);\n }\n } else {\n groupByColumns.push(this.toLowerCase(field.id));\n }\n }\n if (projectTransformations.length) {\n this._ddl2DataviewActivities[viz.id].project.transformations = projectTransformations;\n }\n if (aggrFields.length) {\n this._ddl2DataviewActivities[viz.id].groupBy.groupByIDs = [...groupByColumns];\n this._ddl2DataviewActivities[viz.id].groupBy.aggregates = aggrFields;\n }\n }\n }\n }\n }\n\n func2aggr(func: DDL1.VisualizationFieldFuncitonType): DDL2.IAggregateType {\n switch (func) {\n case \"SUM\":\n return \"sum\";\n case \"AVE\":\n return \"mean\";\n case \"MIN\":\n return \"min\";\n case \"MAX\":\n return \"max\";\n }\n throw new Error(`Unknown DDL1 Function Type: ${func}`);\n }\n\n readMappings() {\n for (const dash of this._ddl.dashboards) {\n for (const viz of dash.visualizations) {\n if (DDL1.isFormVisualization(viz)) {\n } else if (DDL1.isPieVisualization(viz)) {\n this.readPieMappings(viz);\n } else if (DDL1.isChoroVisualization(viz)) {\n this.readChoroMappings(viz);\n } else if (DDL1.isLineVisualization(viz)) {\n this.readLineMappings(viz);\n } else if (DDL1.isTableVisualization(viz)) {\n this.readTableMappings(viz);\n } else if (DDL1.isGraphVisualization(viz)) {\n this.readGraphMappings(viz);\n } else if (DDL1.isSliderVisualization(viz)) {\n this.readSliderMappings(viz);\n } else {\n throw new Error(`Unkown DDL1 mapping type: ${viz.type}`);\n }\n }\n }\n }\n\n readPieMappings(viz: DDL1.IPieVisualization) {\n const mappings = this._ddl2DataviewActivities[viz.id].mappings;\n mappings.transformations.push({\n fieldID: \"label\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.label)\n });\n mappings.transformations.push({\n fieldID: \"weight\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.weight[0])\n });\n }\n\n readChoroMappings(viz: DDL1.IChoroVisualization) {\n const mappings = this._ddl2DataviewActivities[viz.id].mappings;\n mappings.transformations.push({\n fieldID: \"label\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(this.anyChoroMapping2label(viz.source.mappings))\n });\n mappings.transformations.push({\n fieldID: \"weight\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.weight[0])\n });\n }\n\n anyChoroMapping2label(mapping: any) {\n return mapping.state || mapping.county || mapping.geohash;\n }\n\n readLineMappings(viz: DDL1.ILineVisualization) {\n const mappings = this._ddl2DataviewActivities[viz.id].mappings;\n mappings.transformations.push({\n fieldID: viz.source.mappings.x[0],\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.x[0])\n });\n for (let i = 0; i < viz.source.mappings.y.length; ++i) {\n mappings.transformations.push({\n fieldID: viz.source.mappings.y[i],\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.y[i])\n });\n }\n }\n\n readTableMappings(viz: DDL1.ITableVisualization) {\n const mappings = this._ddl2DataviewActivities[viz.id].mappings;\n for (let i = 0; i < viz.label.length; ++i) {\n mappings.transformations.push({\n fieldID: viz.label[i],\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.value[i])\n });\n }\n }\n\n readGraphEnums(valueMappings?: DDL1.IValueMappings, annotation: boolean = false): DDL2.IMapMapping[] {\n const retVal: DDL2.IMapMapping[] = [];\n if (valueMappings) {\n for (const value in valueMappings) {\n const newValue: { [key: string]: string | number | boolean | undefined } = {};\n for (const key in valueMappings[value]) {\n if (key === \"faChar\") {\n newValue[key] = faCharFix(valueMappings[value][key]);\n } else if (annotation && key.indexOf(\"icon_\") === 0) {\n console.log(\"Deprecated flag property: \" + key);\n newValue[key.split(\"icon_\")[1]] = valueMappings[value][key];\n } else {\n newValue[key] = valueMappings[value][key];\n }\n }\n // remove v1.x \"0\" annotations as they equated to \"nothing\" ---\n if (!annotation || value !== \"0\") {\n retVal.push({\n value,\n newValue\n });\n }\n }\n }\n return retVal;\n }\n\n readGraphMappings(viz: DDL1.IGraphVisualization) {\n const mappings = this._ddl2DataviewActivities[viz.id].mappings;\n mappings.transformations.push({\n fieldID: \"uid\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.uid)\n });\n mappings.transformations.push({\n fieldID: \"label\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.label)\n });\n if (viz.icon.fieldid) {\n mappings.transformations.push({\n fieldID: \"icon\",\n type: \"map\",\n sourceFieldID: this.toLowerCase(viz.icon.fieldid),\n default: { fachar: faCharFix(viz.icon.faChar) },\n mappings: this.readGraphEnums(viz.icon.valuemappings)\n });\n }\n let idx = 0;\n if (viz.flag) {\n for (const flag of viz.flag) {\n if (flag.fieldid) {\n mappings.transformations.push({\n fieldID: `annotation_${idx++}`,\n type: \"map\",\n sourceFieldID: this.toLowerCase(flag.fieldid),\n default: {},\n mappings: this.readGraphEnums(flag.valuemappings, true)\n });\n }\n }\n }\n mappings.transformations.push({\n fieldID: \"links\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.link.childfile),\n transformations: [{\n fieldID: \"uid\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.link.mappings.uid)\n }]\n });\n }\n\n readSliderMappings(viz: DDL1.ISliderVisualization) {\n const mappings = this._ddl2DataviewActivities[viz.id].mappings;\n mappings.transformations.push({\n fieldID: \"label\",\n type: \"=\",\n sourceFieldID: this.toLowerCase(viz.source.mappings.label)\n });\n }\n\n readFilters() {\n for (const dash of this._ddl.dashboards) {\n for (const viz of dash.visualizations) {\n if (viz.events) {\n for (const eventID in viz.events) {\n const event = viz.events[eventID];\n for (const update of event.updates) {\n const otherViz = this._ddl2Dataviews[update.visualization];\n const dsFilters = this.getDatasourceFilters(update.datasource, otherViz.id);\n if (update.mappings) {\n if (DDL2.isRoxieServiceRef(otherViz.datasource)) {\n for (const key in update.mappings) {\n otherViz.datasource.request.push({\n source: viz.id,\n remoteFieldID: this.toLowerCase(key),\n localFieldID: this.toLowerCase(update.mappings[key])\n } as DDL2.IRequestField);\n }\n } else {\n const condition: DDL2.IFilterCondition = {\n viewID: viz.id,\n mappings: []\n };\n for (const key in update.mappings) {\n const mapping = update.mappings[key];\n const dsFilter = (mapping && dsFilters[mapping]) ? dsFilters[mapping].filter : undefined;\n if (!dsFilter) {\n console.warn(`Select Mapping \"${mapping}\" in viz \"${viz.id}\" not found in filters for \"${otherViz.id}\"`);\n } else {\n condition.mappings.push({\n remoteFieldID: this.toLowerCase(key),\n localFieldID: this.toLowerCase(update.mappings[key]),\n condition: this.rule2condition(dsFilter.rule),\n nullable: dsFilter.nullable\n });\n }\n }\n this._ddl2DataviewActivities[otherViz.id].filters.conditions.push(condition);\n }\n }\n }\n }\n }\n }\n }\n }\n\n rule2condition(_: DDL1.IFilterRule): DDL2.IMappingConditionType {\n switch (_) {\n case \"set\":\n return \"in\";\n case \"notequals\":\n return \"!=\";\n }\n return _;\n }\n\n readSort() {\n for (const dash of this._ddl.dashboards) {\n for (const viz of dash.visualizations) {\n if ((viz as any).source) {\n if ((viz as any).source.sort) {\n const vizSort = this._ddl2DataviewActivities[viz.id].sort;\n vizSort.conditions = ((viz as any).source.sort as string[]).map(s => {\n if (s.indexOf(\"-\") === 0) {\n return {\n fieldID: this.toLowerCase(s.substr(1)),\n descending: true\n } as DDL2.ISortCondition;\n }\n return {\n fieldID: this.toLowerCase(s),\n descending: false\n } as DDL2.ISortCondition;\n });\n }\n if ((viz as any).source.first) {\n const vizLimit = this._ddl2DataviewActivities[viz.id].limit;\n vizLimit.limit = +(viz as any).source.first;\n }\n }\n }\n }\n }\n\n anyViz2view(viz: DDL1.IAnyVisualization): DDL2.IView {\n const project: DDL2.IProject = {\n type: \"project\",\n transformations: []\n };\n const filters: DDL2.IFilter = {\n type: \"filter\",\n conditions: []\n };\n const groupBy: DDL2.IGroupBy = {\n type: \"groupby\",\n groupByIDs: [],\n aggregates: []\n };\n const sort: DDL2.ISort = {\n type: \"sort\",\n conditions: []\n };\n const limit: DDL2.ILimit = {\n type: \"limit\",\n limit: 0\n };\n const mappings: DDL2.IMappings = {\n type: \"mappings\",\n transformations: []\n };\n this._ddl2DataviewActivities[viz.id] = {\n project,\n filters,\n sort,\n groupBy,\n limit,\n mappings\n };\n const datasourceRef: DDL2.IDatasourceBaseRef | DDL2.IRoxieServiceRef = this.isVizDatasourceRoxie(viz) ? {\n id: this._datasourceUpdates[viz.id].id,\n request: [],\n output: this._datasourceUpdates[viz.id].output\n } : {\n id: this._datasourceUpdates[viz.id].id,\n output: this._datasourceUpdates[viz.id].output\n };\n return {\n id: viz.id,\n datasource: datasourceRef,\n activities: [\n project,\n filters,\n sort,\n groupBy,\n limit\n ],\n visualization: {\n id: viz.id,\n title: viz.title || \"\",\n description: \"\",\n visibility: viz.properties && viz.properties.flyout === true ? \"flyout\" : \"normal\",\n ...this.type2chartType(viz.type),\n mappings,\n properties: (viz.properties || {}) as DDL2.IWidgetProperties\n }\n };\n }\n\n type2chartType(chartType: DDL1.VisualizationType): { chartType: string, __class: string } {\n switch (chartType) {\n case \"LINE\":\n return { chartType: \"Line\", __class: \"chart_Line\" };\n case \"BUBBLE\":\n return { chartType: \"Bubble\", __class: \"chart_Bubble\" };\n case \"PIE\":\n return { chartType: \"Pie\", __class: \"chart_Pie\" };\n case \"BAR\":\n return { chartType: \"Column\", __class: \"chart_Column\" };\n case \"FORM\":\n return { chartType: \"FieldForm\", __class: \"form_FieldForm\" };\n case \"WORD_CLOUD\":\n return { chartType: \"WordCloud\", __class: \"chart_WordCloud\" };\n case \"CHORO\":\n return { chartType: \"ChoroplethStates\", __class: \"map_ChoroplethStates\" };\n case \"SUMMARY\":\n return { chartType: \"Summary\", __class: \"chart_Summary\" };\n case \"SLIDER\":\n return { chartType: \"FieldForm\", __class: \"form_FieldForm\" };\n case \"HEAT_MAP\":\n return { chartType: \"HeatMap\", __class: \"other_HeatMap\" };\n case \"2DCHART\":\n return { chartType: \"Column\", __class: \"chart_Column\" };\n case \"GRAPH\":\n return { chartType: \"AdjacencyGraph\", __class: \"graph_AdjacencyGraph\" };\n case \"TABLE\":\n default:\n return { chartType: \"Table\", __class: \"dgrid_Table\" };\n }\n }\n\n formFields2field(fields?: DDL1.IVisualizationField[], slider: boolean = false): DDL2.IField[] {\n if (!fields) return [];\n return fields.map(field => {\n switch (field.properties.type) {\n case \"range\":\n return {\n type: \"range\",\n id: field.id,\n default: (field.properties.default ? field.properties.default as DDL2.Range : undefined)\n };\n case \"dataset\":\n return {\n type: \"dataset\",\n id: field.id,\n default: [],\n children: []\n };\n default:\n return {\n type: this.formFieldType2fieldType(field.properties.datatype, slider),\n id: field.id,\n default: field.properties.default ? field.properties.default[0] : undefined\n };\n }\n });\n }\n\n formFieldType2fieldType(fieldType: DDL1.VisualizationFieldType, slider: boolean): \"string\" | \"number\" | \"boolean\" {\n switch (fieldType) {\n case \"bool\":\n case \"boolean\":\n return \"boolean\";\n case \"integer\":\n case \"unsigned\":\n case \"float\":\n case \"double\":\n case \"real\":\n return \"number\";\n case \"string\":\n return \"string\";\n default:\n return slider ? \"number\" : \"string\";\n }\n }\n\n output2output(output: DDL1.IOutput, target: DDL2.OutputDict) {\n target[output.from || output.id] = {\n fields: this.filters2fields(output.filter)\n };\n }\n\n filters2fields(filters?: DDL1.IFilter[]): DDL2.IField[] {\n if (!filters) return [];\n return filters.filter(filter => {\n const idParts = filter.fieldid.split(\"-\");\n return idParts.length === 1 || idParts[1] === \"range\";\n }).map(filter => {\n const idParts = filter.fieldid.split(\"-\");\n const retVal: DDL2.IFieldString = {\n type: \"string\",\n id: idParts[0]\n };\n return retVal;\n });\n }\n\n getVizField(vizID: string, fieldID: string): DDL2.IField {\n return {\n type: \"string\",\n id: \"\",\n default: \"\"\n };\n }\n\n writeDatasources(): DDL2.DatasourceType[] {\n const retVal: DDL2.DatasourceType[] = [];\n for (const id in this._ddl2Datasources) {\n retVal.push(this._ddl2Datasources[id]);\n }\n return retVal;\n }\n\n writeDataviews(): DDL2.IView[] {\n const retVal: DDL2.IView[] = [];\n for (const id in this._ddl2Dataviews) {\n retVal.push(this._ddl2Dataviews[id]);\n }\n return retVal;\n }\n\n writeProperties(): DDL2.IProperties | undefined {\n return {\n // TODO\n };\n }\n\n write(): DDL2.Schema {\n return {\n version: \"2.2.1\",\n createdBy: {\n name: PKG_NAME,\n version: PKG_VERSION\n },\n datasources: this.writeDatasources(),\n dataviews: this.writeDataviews(),\n properties: this.writeProperties()\n };\n }\n}\n\nexport function upgrade(ddl: DDL1.IDDL, baseUrl?: string, wuid?: string, toLowerCase: boolean = true, dermatologyJson = {}): DDL2.Schema {\n const ddlUp = new DDLUpgrade(ddl, baseUrl, wuid, toLowerCase);\n const retVal = ddlUp.write();\n retVal.properties = dermatologyUpgrade(retVal, dermatologyJson);\n return retVal;\n}\n","import * as fs from \"fs\";\n\n// @ts-ignore\nimport * as ddl2Schema from \"../schema/v2.json\";\nimport { upgrade } from \"./upgrade\";\n\nconst args = process.argv.slice(2);\n\nswitch (args[0]) {\n case \"--echo\":\n process.stdout.write(args[1]);\n break;\n case \"--schema\":\n process.stdout.write(JSON.stringify(ddl2Schema));\n break;\n case \"--upgrade\":\n case \"--upgradeNoLower\":\n const srcPath = args[1];\n const destPath = args[2];\n const baseUrl = args[3];\n const wuid = args[4];\n const layoutPath = args[5];\n if (srcPath && destPath && srcPath !== destPath) {\n let layoutJson = {};\n if (layoutPath) {\n try {\n layoutJson = JSON.parse(fs.readFileSync(layoutPath).toString());\n } catch (e) {\n console.error(e);\n }\n }\n fs.readFile(srcPath, \"utf8\", function (err, data) {\n if (err) throw err;\n const ddl2 = upgrade(\n JSON.parse(data),\n baseUrl || \"http://localhost:8010\",\n wuid || \"WUID\",\n args[0] === \"--upgrade\",\n layoutJson\n );\n fs.writeFile(destPath, JSON.stringify(ddl2), function (err) {\n if (err) throw err;\n console.log(\"complete\");\n });\n });\n }\n break;\n case \"--help\":\n break;\n default:\n process.stdout.write(`\nUsage: <command>\n\nwhere <command> is one of:\n --schema: output DDL2 schmea.\n --upgrade ddl1 [baseUrl wuid [layout]]: updgrade ddl and layout version 1 to ddl version 2.\n --upgradeNoLower ddl1 [baseUrl wuid [layout]]: updgrade ddl and layout version 1 to ddl version 2 without changing field IDs upper/lower casing.\n --help: this message.\n`);\n}\n"],"names":["DDL1.isHipieDatasource","DDL1.isWorkunitDatasource","DDL1.isDatabombDatasource","DDL1.isFormVisualization","DDL1.isPieVisualization","DDL1.isChoroVisualization","DDL1.isLineVisualization","DDL1.isTableVisualization","DDL1.isGraphVisualization","DDL1.isSliderVisualization","DDL2.isRoxieServiceRef","upgrade","dermatologyUpgrade","fs.readFileSync","fs.readFile","fs.writeFile"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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