@hpcc-js/ddl-shim 2.21.0 → 2.24.0
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/index.js +889 -9868
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +2 -0
- package/dist/index.umd.cjs.map +1 -0
- package/package.json +26 -30
- package/src/__package__.ts +2 -2
- package/src/cli.ts +1 -1
- package/src/dermatology.ts +1 -1
- package/src/index.ts +5 -5
- package/src/upgrade.ts +4 -4
- package/src/validate.ts +4 -5
- package/types/__package__.d.ts +2 -3
- package/types/ddl/v1.d.ts +0 -1
- package/types/ddl/v2.d.ts +0 -1
- package/types/dermatology.d.ts +1 -2
- package/types/index.d.ts +5 -6
- package/types/upgrade.d.ts +2 -3
- package/types/validate.d.ts +1 -2
- package/dist/cli.js +0 -2656
- package/dist/cli.js.map +0 -1
- package/dist/index.es6.js +0 -9852
- package/dist/index.es6.js.map +0 -1
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.map +0 -1
- package/schema/v1.json +0 -1386
- package/schema/v2.json +0 -1567
- package/types/__package__.d.ts.map +0 -1
- package/types/cli.d.ts +0 -2
- package/types/cli.d.ts.map +0 -1
- package/types/ddl/v0_0_22.d.ts +0 -271
- package/types/ddl/v0_0_22.d.ts.map +0 -1
- package/types/ddl/v1.d.ts.map +0 -1
- package/types/ddl/v2.d.ts.map +0 -1
- package/types/ddl/v2_0_23.d.ts +0 -315
- package/types/ddl/v2_0_23.d.ts.map +0 -1
- package/types/ddl/v2_1_0.d.ts +0 -322
- package/types/ddl/v2_1_0.d.ts.map +0 -1
- package/types/dermatology.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types/upgrade.d.ts.map +0 -1
- package/types/validate.d.ts.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("ajv")):"function"==typeof define&&define.amd?define(["exports","ajv"],i):i((e="undefined"!=typeof globalThis?globalThis:e||self)["@hpcc-js/ddl-shim"]={},e.ajv)}(this,function(e,i){var t,r,s,o=Object.create,a=Object.defineProperty,n=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,d=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=e=>{let i={};for(var t in e)a(i,t,{get:e[t],enumerable:!0});return i};s=null!=(t=i)?o(d(t)):{},i=((e,i,t,r)=>{if(i&&"object"==typeof i||"function"==typeof i)for(var s,o=p(i),d=0,u=o.length;d<u;d++)s=o[d],l.call(e,s)||s===t||a(e,s,{get:(e=>i[e]).bind(null,s),enumerable:!(r=n(i,s))||r.enumerable});return e})(!r&&t&&t.__esModule?s:a(s,"default",{value:t,enumerable:!0}),t);const f="@hpcc-js/ddl-shim",c="3.0.0";var y=u({isChoroVisualization:()=>D,isDatabombDatasource:()=>m,isFormVisualization:()=>$,isGeohashMapping:()=>j,isGraphVisualization:()=>w,isHeatMapVisualization:()=>F,isHipieDatasource:()=>h,isLineVisualization:()=>b,isPieVisualization:()=>I,isSliderVisualization:()=>v,isTableVisualization:()=>_,isUSCountyMapping:()=>T,isUSStateMapping:()=>P,isWorkunitDatasource:()=>g});function g(e){return void 0!==e.WUID}function m(e){return!0===e.databomb}function h(e){return void 0!==e.URL}function I(e){return"PIE"===e.type||"BAR"===e.type}function b(e){return"LINE"===e.type}function D(e){return"CHORO"===e.type}function _(e){return"TABLE"===e.type}function v(e){return"SLIDER"===e.type}function w(e){return"GRAPH"===e.type}function F(e){return"HEAT_MAP"===e.type}function $(e){return"FORM"===e.type}function P(e){return void 0!==e.state}function T(e){return void 0!==e.county}function j(e){return void 0!==e.geohash}var C=u({VisibilitySet:()=>B,isDatabombRef:()=>L,isFilterActivity:()=>A,isGroupByActivity:()=>O,isIFilterCondition:()=>R,isLimitActivity:()=>V,isMappingsActivity:()=>z,isProjectActivity:()=>M,isRoxieServiceRef:()=>q,isSortActivity:()=>x,isWUResultRef:()=>S});function L(e){return!S(e)&&!q(e)}function S(e){return void 0!==e.output&&!q(e)}function q(e){return void 0!==e.request}function R(e){return!!e.viewID}function A(e){return"filter"===e.type}function M(e){return"project"===e.type}function z(e){return"mappings"===e.type}function O(e){return"groupby"===e.type}function x(e){return"sort"===e.type}function V(e){return"limit"===e.type}const B=["normal","flyout"];var U={c3chart_Bar:"chart_Bar",c3chart_Column:"chart_Column",c3chart_Pie:"chart_Pie",c3chart_Area:"chart_Area",c3chart_Line:"chart_Line",amchart_Bar:"chart_Bar",amchart_Column:"chart_Column",amchart_Pie:"chart_Pie",amchart_Area:"chart_Area",amchart_Line:"chart_Line",google_Bar:"chart_Bar",google_Column:"chart_Column",google_Pie:"chart_Pie",google_Area:"chart_Area",google_Line:"chart_Line",other_Table:"dgrid_Table"},E={xAxisLabelRotation:[{name:"xAxisOverlapMode",transform:e=>"rotate"},{name:"xAxisLabelRotation",transform:e=>e}],tooltipLabelColor:{name:"tooltipLabelColor"},tooltipSeriesColor:{name:"tooltipSeriesColor"},tooltipValueColor:{name:"tooltipValueColor"},tooltipValueFormat:{name:"tooltipValueFormat"},timePattern:{name:"xAxisTypeTimePattern"},smoothLines:{name:"interpolate",transform:e=>!1===e?"linear":"catmullRom"},holePercent:{name:"innerRadius"},flip:{name:"orientation",transform:e=>e?"vertical":"horizontal"},bottomText:{name:"xAxisTitle"},xAxisTypeTimePattern:{name:"xAxisTypeTimePattern"},yAxisTypeTimePattern:{name:"yAxisTypeTimePattern"},valueFormat:{name:"tooltipValueFormat"},stacked:{name:"yAxisStacked"},showYGrid:{name:"yAxisGuideLines"},showXGrid:{name:"xAxisGuideLines"},showValueLabel:{name:"showValue"},low:{name:"yAxisDomainLow"},high:{name:"yAxisDomainHigh"},fillOpacity:{name:"interpolateFillOpacity"},areaFillOpacity:{name:"interpolateFillOpacity"},showToolbar:{name:"titleVisible"},showCSV:{name:"downloadButtonVisible"}};function G(e,i,t){let r;for(const s in e){if(s===i&&e[s]===t){r=e;break}if(e[s]&&"object"==typeof e[s]&&(r=G(e[s],i,t),void 0!==r))break}return r}function N(e,i){e.dataviews.forEach(function(e){const t=e.id,r=G(i,"__id",t);if(r){const i=r.__properties,t=r.__properties.chart?r.__properties.chart:r.__properties.widget,s=t.__properties;!function(i){e.visualization.__class=t(i.__class),e.visualization.properties.__class="marshaller_VizChartPanel",e.visualization.properties.widget||(e.visualization.properties.widget={});function t(e){return U[e]?U[e]:e}e.visualization.properties.widget.__class=e.visualization.__class}(t),function(i,t){e.visualization.title=i.title||"",e.visualization.description="",e.visualization.visibility="flyout"===e.visualization.visibility?"flyout":"normal",e.visualization.chartType=e.visualization.__class.split("_")[1];for(const r in i)if(void 0!==E[r]){const t=E[r].name;"function"==typeof E[r].transform?e.visualization.properties[t]=E[r].transform(i[r]):e.visualization.properties[t]=i[r]}t&&t.showLegend&&e.visualization.properties&&(e.visualization.properties.legendVisible=!0)}(i,s),function(i,t){e.visualization.title=e.visualization.title||t.title||"",e.visualization.description="",e.visualization.visibility="flyout"===e.visualization.visibility?"flyout":"normal",e.visualization.chartType=e.visualization.__class.split("_")[1];for(const r in t)if(void 0!==E[r])if(E[r]instanceof Array)E[r].forEach(i=>{const s=i.name;e.visualization.properties.widget[s]=i.transform(t[r]),"function"==typeof E[r].transform?e.visualization.properties.widget[s]=E[r].transform(t[r]):e.visualization.properties.widget[s]=t[r]});else{const i=E[r].name;e.visualization.properties.widget[i]=E[r].transform(t[r])}}(0,s),e.visualization.properties.chartType&&(e.visualization.properties.charttype=e.visualization.properties.chartType)}else console.warn(t+" not found in dermObj")})}function W(e){return e}var H=class{_ddl;_baseUrl;_wuid;_toLowerCase;_datasources={};_datasourceUpdates={};_visualizations={};_ddl2Datasources={};_ddl2DatasourceFields={};_ddl2Dataviews={};_ddl2DataviewActivities={};constructor(e,i="http://localhost:8010",t="WUID",r=!0){this._ddl=e,this._baseUrl=i,this._wuid=t,this._toLowerCase=r,this.indexDDL(),this.readDDL()}toLowerCase(e){return this._toLowerCase?e.toLowerCase():e}isVizDatasourceRoxie(e){if(e.source){if(h(this._datasources[e.source.id]))return!0}return!1}getDatasourceOutputs(e,i){const t=[],r=this._datasources[e];for(const s of r.outputs)if(s.notify)for(const e of s.notify)e===i&&t.push({datasource:r,output:s});return t}getDatasourceFilters(e,i){const t={};for(const r of this.getDatasourceOutputs(e,i))if(r.output.filter)for(const e of r.output.filter)t[e.fieldid]={datasource:r.datasource,output:r.output,filter:e};return t}indexDDL(){for(const e of this._ddl.dashboards)for(const i of e.visualizations)this._visualizations[i.id]=i;for(const e of this._ddl.datasources){this._datasources[e.id]=e;for(const i of e.outputs)if(i.notify)for(const t of i.notify)this._datasourceUpdates[t]={id:e.id,output:i.from||i.id}}}readDDL(){for(const e of this._ddl.datasources)if(g(e)){const i={type:"wuresult",id:e.id,url:this._baseUrl,wuid:this._wuid,outputs:{}};for(const t of e.outputs)this.output2output(t,i.outputs);this._ddl2Datasources[e.id]=i}else if(m(e));else{const i=e.URL.split("/WsEcl/submit/query/"),t=i[0],r=i[1].split("/"),s={type:"hipie",id:e.id,url:t,querySet:r[0],queryID:r[1],inputs:[],outputs:{}};for(const o of e.outputs)this.output2output(o,s.outputs);this._ddl2Datasources[e.id]=s}for(const e of this._ddl.dashboards)for(const i of e.visualizations)"FORM"===i.type?(this._ddl2Datasources[i.id]={type:"form",id:i.id,fields:this.formFields2field(i.fields)},this._datasourceUpdates[i.id]={id:i.id}):"SLIDER"===i.type&&(this._ddl2Datasources[i.id]={type:"form",id:i.id,fields:this.formFields2field(i.fields,!0)},this._datasourceUpdates[i.id]={id:i.id}),this._ddl2Dataviews[i.id]=this.anyViz2view(i);this.readGroupBy(),this.readFilters(),this.readSort(),this.readMappings()}readGroupBy(){for(const e of this._ddl.dashboards)for(const i of e.visualizations)if(i.fields){const e=[],t=[],r=[];for(const s of i.fields)if(s.properties&&s.properties.function)switch(s.properties.function){case"SUM":case"MIN":case"MAX":r.push({type:this.func2aggr(s.properties.function),inFieldID:this.toLowerCase(s.properties.params.param1),fieldID:this.toLowerCase(s.id)});break;case"AVE":r.push({type:this.func2aggr(s.properties.function),inFieldID:this.toLowerCase(s.properties.params.param1),baseCountFieldID:s.properties.params.param2?this.toLowerCase(s.properties.params.param2):void 0,fieldID:this.toLowerCase(s.id)});break;case"SCALE":if("object"==typeof s.properties.params.param1){const e=s.properties.params.param1;switch(e.function){case"SUM":case"MIN":case"MAX":r.push({type:this.func2aggr(e.function),inFieldID:this.toLowerCase(e.params.param1),fieldID:this.toLowerCase(s.id)})}}e.push({type:"scale",sourceFieldID:this.toLowerCase(s.id),fieldID:this.toLowerCase(s.id),factor:+s.properties.params.param2});break;default:throw t.push(this.toLowerCase(s.id)),new Error(`Unhandled field function: ${s.properties.function}`)}else t.push(this.toLowerCase(s.id));e.length&&(this._ddl2DataviewActivities[i.id].project.transformations=e),r.length&&(this._ddl2DataviewActivities[i.id].groupBy.groupByIDs=[...t],this._ddl2DataviewActivities[i.id].groupBy.aggregates=r)}}func2aggr(e){switch(e){case"SUM":return"sum";case"AVE":return"mean";case"MIN":return"min";case"MAX":return"max"}throw new Error(`Unknown DDL1 Function Type: ${e}`)}readMappings(){for(const e of this._ddl.dashboards)for(const i of e.visualizations)if($(i));else if(I(i))this.readPieMappings(i);else if(D(i))this.readChoroMappings(i);else if(b(i))this.readLineMappings(i);else if(_(i))this.readTableMappings(i);else if(w(i))this.readGraphMappings(i);else{if(!v(i))throw new Error(`Unkown DDL1 mapping type: ${i.type}`);this.readSliderMappings(i)}}readPieMappings(e){const i=this._ddl2DataviewActivities[e.id].mappings;i.transformations.push({fieldID:"label",type:"=",sourceFieldID:this.toLowerCase(e.source.mappings.label)}),i.transformations.push({fieldID:"weight",type:"=",sourceFieldID:this.toLowerCase(e.source.mappings.weight[0])})}readChoroMappings(e){const i=this._ddl2DataviewActivities[e.id].mappings;i.transformations.push({fieldID:"label",type:"=",sourceFieldID:this.toLowerCase(this.anyChoroMapping2label(e.source.mappings))}),i.transformations.push({fieldID:"weight",type:"=",sourceFieldID:this.toLowerCase(e.source.mappings.weight[0])})}anyChoroMapping2label(e){return e.state||e.county||e.geohash}readLineMappings(e){const i=this._ddl2DataviewActivities[e.id].mappings;i.transformations.push({fieldID:e.source.mappings.x[0],type:"=",sourceFieldID:this.toLowerCase(e.source.mappings.x[0])});for(let t=0;t<e.source.mappings.y.length;++t)i.transformations.push({fieldID:e.source.mappings.y[t],type:"=",sourceFieldID:this.toLowerCase(e.source.mappings.y[t])})}readTableMappings(e){const i=this._ddl2DataviewActivities[e.id].mappings;for(let t=0;t<e.label.length;++t)i.transformations.push({fieldID:e.label[t],type:"=",sourceFieldID:this.toLowerCase(e.source.mappings.value[t])})}readGraphEnums(e,i=!1){const t=[];if(e)for(const r in e){const s={};for(const t in e[r])"faChar"===t?s[t]=W(e[r][t]):i&&0===t.indexOf("icon_")?(console.warn("Deprecated flag property: "+t),s[t.split("icon_")[1]]=e[r][t]):s[t]=e[r][t];i&&"0"===r||t.push({value:r,newValue:s})}return t}readGraphMappings(e){const i=this._ddl2DataviewActivities[e.id].mappings;i.transformations.push({fieldID:"uid",type:"=",sourceFieldID:this.toLowerCase(e.source.mappings.uid)}),i.transformations.push({fieldID:"label",type:"=",sourceFieldID:this.toLowerCase(e.source.mappings.label)}),e.icon.fieldid&&i.transformations.push({fieldID:"icon",type:"map",sourceFieldID:this.toLowerCase(e.icon.fieldid),default:{fachar:e.icon.faChar},mappings:this.readGraphEnums(e.icon.valuemappings)});let t=0;if(e.flag)for(const r of e.flag)r.fieldid&&i.transformations.push({fieldID:"annotation_"+t++,type:"map",sourceFieldID:this.toLowerCase(r.fieldid),default:{},mappings:this.readGraphEnums(r.valuemappings,!0)});i.transformations.push({fieldID:"links",type:"=",sourceFieldID:this.toLowerCase(e.source.link.childfile),transformations:[{fieldID:"uid",type:"=",sourceFieldID:this.toLowerCase(e.source.link.mappings.uid)}]})}readSliderMappings(e){this._ddl2DataviewActivities[e.id].mappings.transformations.push({fieldID:"label",type:"=",sourceFieldID:this.toLowerCase(e.source.mappings.label)})}readFilters(){for(const e of this._ddl.dashboards)for(const i of e.visualizations)if(i.events)for(const e in i.events){const t=i.events[e];for(const e of t.updates){const t=this._ddl2Dataviews[e.visualization],r=this.getDatasourceFilters(e.datasource,t.id);if(e.mappings)if(q(t.datasource))for(const s in e.mappings)t.datasource.request.push({source:i.id,remoteFieldID:this.toLowerCase(s),localFieldID:this.toLowerCase(e.mappings[s])});else{const s={viewID:i.id,mappings:[]};for(const o in e.mappings){const a=e.mappings[o],n=a&&r[a]?r[a].filter:void 0;n?s.mappings.push({remoteFieldID:this.toLowerCase(o),localFieldID:this.toLowerCase(e.mappings[o]),condition:this.rule2condition(n.rule),nullable:n.nullable}):console.warn(`Select Mapping "${a}" in viz "${i.id}" not found in filters for "${t.id}"`)}this._ddl2DataviewActivities[t.id].filters.conditions.push(s)}}}}rule2condition(e){switch(e){case"set":return"in";case"notequals":return"!="}return e}readSort(){for(const e of this._ddl.dashboards)for(const i of e.visualizations)if(i.source){if(i.source.sort){this._ddl2DataviewActivities[i.id].sort.conditions=i.source.sort.map(e=>0===e.indexOf("-")?{fieldID:this.toLowerCase(e.substr(1)),descending:!0}:{fieldID:this.toLowerCase(e),descending:!1})}if(i.source.first){this._ddl2DataviewActivities[i.id].limit.limit=+i.source.first}}}anyViz2view(e){const i={type:"project",transformations:[]},t={type:"filter",conditions:[]},r={type:"groupby",groupByIDs:[],aggregates:[]},s={type:"sort",conditions:[]},o={type:"limit",limit:0},a={type:"mappings",transformations:[]};this._ddl2DataviewActivities[e.id]={project:i,filters:t,sort:s,groupBy:r,limit:o,mappings:a};const n=this.isVizDatasourceRoxie(e)?{id:this._datasourceUpdates[e.id].id,request:[],output:this._datasourceUpdates[e.id].output}:{id:this._datasourceUpdates[e.id].id,output:this._datasourceUpdates[e.id].output};return{id:e.id,datasource:n,activities:[i,t,s,r,o],visualization:{id:e.id,title:e.title||"",description:"",visibility:e.properties&&!0===e.properties.flyout?"flyout":"normal",...this.type2chartType(e.type),mappings:a,properties:e.properties||{}}}}type2chartType(e){switch(e){case"LINE":return{chartType:"Line",__class:"chart_Line"};case"BUBBLE":return{chartType:"Bubble",__class:"chart_Bubble"};case"PIE":return{chartType:"Pie",__class:"chart_Pie"};case"BAR":case"2DCHART":return{chartType:"Column",__class:"chart_Column"};case"FORM":case"SLIDER":return{chartType:"FieldForm",__class:"form_FieldForm"};case"WORD_CLOUD":return{chartType:"WordCloud",__class:"chart_WordCloud"};case"CHORO":return{chartType:"ChoroplethStates",__class:"map_ChoroplethStates"};case"SUMMARY":return{chartType:"Summary",__class:"chart_Summary"};case"HEAT_MAP":return{chartType:"HeatMap",__class:"other_HeatMap"};case"GRAPH":return{chartType:"AdjacencyGraph",__class:"graph_AdjacencyGraph"};default:return{chartType:"Table",__class:"dgrid_Table"}}}formFields2field(e,i=!1){return e?e.map(e=>{switch(e.properties.type){case"range":return{type:"range",id:e.id,default:e.properties.default?e.properties.default:void 0};case"dataset":return{type:"dataset",id:e.id,default:[],children:[]};default:return{type:this.formFieldType2fieldType(e.properties.datatype,i),id:e.id,default:e.properties.default?e.properties.default[0]:void 0}}}):[]}formFieldType2fieldType(e,i){switch(e){case"bool":case"boolean":return"boolean";case"integer":case"unsigned":case"float":case"double":case"real":return"number";case"string":return"string";default:return i?"number":"string"}}output2output(e,i){i[e.from||e.id]={fields:this.filters2fields(e.filter)}}filters2fields(e){return e?e.filter(e=>{const i=e.fieldid.split("-");return 1===i.length||"range"===i[1]}).map(e=>({type:"string",id:e.fieldid.split("-")[0]})):[]}getVizField(e,i){return{type:"string",id:"",default:""}}writeDatasources(){const e=[];for(const i in this._ddl2Datasources)e.push(this._ddl2Datasources[i]);return e}writeDataviews(){const e=[];for(const i in this._ddl2Dataviews)e.push(this._ddl2Dataviews[i]);return e}writeProperties(){return{}}write(){return{version:"2.2.1",createdBy:{name:f,version:c},datasources:this.writeDatasources(),dataviews:this.writeDataviews(),properties:this.writeProperties()}}};var k={$ref:"#/definitions/Schema",$schema:"http://json-schema.org/draft-07/schema#",definitions:JSON.parse('{"ActivityType":{"anyOf":[{"$ref":"#/definitions/IFilter"},{"$ref":"#/definitions/IProject"},{"$ref":"#/definitions/IGroupBy"},{"$ref":"#/definitions/ISort"},{"$ref":"#/definitions/ILimit"},{"$ref":"#/definitions/IMappings"}]},"AggregateType":{"anyOf":[{"$ref":"#/definitions/IAggregate"},{"$ref":"#/definitions/ICount"}]},"Dataset":{"items":{},"type":"array"},"DatasourceType":{"anyOf":[{"$ref":"#/definitions/IWUResult"},{"$ref":"#/definitions/ILogicalFile"},{"$ref":"#/definitions/IRoxieService"},{"$ref":"#/definitions/IHipieService"},{"$ref":"#/definitions/IRestService"},{"$ref":"#/definitions/IForm"},{"$ref":"#/definitions/IDatabomb"}]},"FilterCondition":{"anyOf":[{"$ref":"#/definitions/IFilterCondition"},{"$ref":"#/definitions/IFilterStaticCondition"}]},"IAggregate":{"additionalProperties":false,"properties":{"baseCountFieldID":{"type":"string"},"fieldID":{"type":"string"},"inFieldID":{"type":"string"},"type":{"$ref":"#/definitions/IAggregateType"}},"required":["fieldID","type","inFieldID"],"type":"object"},"IAggregateType":{"enum":["min","max","sum","mean","variance","deviation"],"type":"string"},"ICalculated":{"additionalProperties":false,"properties":{"fieldID":{"type":"string"},"sourceFieldID1":{"type":"string"},"sourceFieldID2":{"type":"string"},"type":{"$ref":"#/definitions/ICalculatedType"}},"required":["fieldID","type","sourceFieldID1","sourceFieldID2"],"type":"object"},"ICalculatedType":{"enum":["+","-","*","/"],"type":"string"},"ICount":{"additionalProperties":false,"properties":{"fieldID":{"type":"string"},"type":{"const":"count","type":"string"}},"required":["fieldID","type"],"type":"object"},"IDatabomb":{"additionalProperties":false,"properties":{"fields":{"items":{"$ref":"#/definitions/IField"},"type":"array"},"format":{"$ref":"#/definitions/IDatabombFormat"},"id":{"type":"string"},"payload":{"type":"string"},"type":{"const":"databomb","type":"string"}},"required":["fields","format","id","type"],"type":"object"},"IDatabombFormat":{"enum":["csv","tsv","json"],"type":"string"},"IDatabombRef":{"additionalProperties":false,"properties":{"id":{"type":"string"}},"required":["id"],"type":"object"},"IDatasource":{"additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"$ref":"#/definitions/IDatasourceType"}},"required":["type","id"],"type":"object"},"IDatasourceRef":{"anyOf":[{"$ref":"#/definitions/IDatabombRef"},{"$ref":"#/definitions/IWUResultRef"},{"$ref":"#/definitions/IRoxieServiceRef"},{"$ref":"#/definitions/IHipieSqlRef"}]},"IDatasourceType":{"enum":["wuresult","logicalfile","roxie","hipie","rest","form","databomb"],"type":"string"},"IEquals":{"additionalProperties":false,"properties":{"fieldID":{"type":"string"},"sourceFieldID":{"type":"string"},"transformations":{"items":{"$ref":"#/definitions/MultiTransformationType"},"type":"array"},"type":{"const":"=","type":"string"}},"required":["fieldID","type","sourceFieldID"],"type":"object"},"IField":{"anyOf":[{"$ref":"#/definitions/IFieldBoolean"},{"$ref":"#/definitions/IFieldNumber"},{"$ref":"#/definitions/IFieldNumber64"},{"$ref":"#/definitions/IFieldString"},{"$ref":"#/definitions/IFieldRange"},{"$ref":"#/definitions/IFieldDataset"},{"$ref":"#/definitions/IFieldSet"},{"$ref":"#/definitions/IFieldObject"}]},"IFieldBoolean":{"additionalProperties":false,"properties":{"default":{"type":"boolean"},"id":{"type":"string"},"type":{"const":"boolean","type":"string"}},"required":["type","id"],"type":"object"},"IFieldDataset":{"additionalProperties":false,"properties":{"children":{"items":{"$ref":"#/definitions/IField"},"type":"array"},"default":{"$ref":"#/definitions/Dataset"},"id":{"type":"string"},"type":{"const":"dataset","type":"string"}},"required":["type","id","children"],"type":"object"},"IFieldNumber":{"additionalProperties":false,"properties":{"default":{"type":"number"},"id":{"type":"string"},"type":{"const":"number","type":"string"}},"required":["type","id"],"type":"object"},"IFieldNumber64":{"additionalProperties":false,"properties":{"default":{"$ref":"#/definitions/Number64"},"id":{"type":"string"},"type":{"const":"number64","type":"string"}},"required":["type","id"],"type":"object"},"IFieldObject":{"additionalProperties":false,"properties":{"default":{"type":"object"},"fields":{"additionalProperties":{"$ref":"#/definitions/IField"},"type":"object"},"id":{"type":"string"},"type":{"const":"object","type":"string"}},"required":["type","id","fields"],"type":"object"},"IFieldRange":{"additionalProperties":false,"properties":{"default":{"$ref":"#/definitions/Range"},"id":{"type":"string"},"type":{"const":"range","type":"string"}},"required":["type","id"],"type":"object"},"IFieldSet":{"additionalProperties":false,"properties":{"default":{"items":{"type":["string","number"]},"type":"array"},"fieldType":{"enum":["string","number"],"type":"string"},"id":{"type":"string"},"type":{"const":"set","type":"string"}},"required":["type","id","fieldType"],"type":"object"},"IFieldString":{"additionalProperties":false,"properties":{"default":{"type":"string"},"id":{"type":"string"},"type":{"const":"string","type":"string"}},"required":["type","id"],"type":"object"},"IFieldType":{"enum":["boolean","number","number64","string","range","dataset","set","object"],"type":"string"},"IFilter":{"additionalProperties":false,"properties":{"conditions":{"items":{"$ref":"#/definitions/FilterCondition"},"type":"array"},"type":{"const":"filter","type":"string"}},"required":["conditions","type"],"type":"object"},"IFilterCondition":{"additionalProperties":false,"properties":{"mappings":{"items":{"$ref":"#/definitions/IMapping"},"type":"array"},"viewID":{"type":"string"}},"required":["viewID","mappings"],"type":"object"},"IFilterStaticCondition":{"additionalProperties":false,"properties":{"condition":{"$ref":"#/definitions/IMappingConditionType"},"localFieldID":{"type":"string"},"value":{"type":["string","number"]}},"required":["localFieldID","condition","value"],"type":"object"},"IForm":{"additionalProperties":false,"properties":{"fields":{"items":{"$ref":"#/definitions/IField"},"type":"array"},"id":{"type":"string"},"type":{"const":"form","type":"string"}},"required":["fields","id","type"],"type":"object"},"IGroupBy":{"additionalProperties":false,"properties":{"aggregates":{"items":{"$ref":"#/definitions/AggregateType"},"type":"array"},"groupByIDs":{"items":{"type":"string"},"type":"array"},"type":{"const":"groupby","type":"string"}},"required":["aggregates","groupByIDs","type"],"type":"object"},"IHipieService":{"additionalProperties":false,"properties":{"id":{"type":"string"},"inputs":{"items":{"$ref":"#/definitions/IField"},"type":"array"},"outputs":{"$ref":"#/definitions/OutputDict"},"queryID":{"type":"string"},"querySet":{"type":"string"},"type":{"const":"hipie","type":"string"},"url":{"type":"string"}},"required":["id","inputs","outputs","queryID","querySet","type","url"],"type":"object"},"IHipieSqlRef":{"additionalProperties":false,"properties":{"id":{"type":"string"}},"required":["id"],"type":"object"},"ILimit":{"additionalProperties":false,"properties":{"limit":{"type":"number"},"type":{"const":"limit","type":"string"}},"required":["limit","type"],"type":"object"},"ILogicalFile":{"additionalProperties":false,"properties":{"fields":{"items":{"$ref":"#/definitions/IField"},"type":"array"},"id":{"type":"string"},"logicalFile":{"type":"string"},"type":{"const":"logicalfile","type":"string"},"url":{"type":"string"}},"required":["fields","id","logicalFile","type","url"],"type":"object"},"IMap":{"additionalProperties":false,"properties":{"default":{},"fieldID":{"type":"string"},"mappings":{"items":{"$ref":"#/definitions/IMapMapping"},"type":"array"},"sourceFieldID":{"type":"string"},"type":{"const":"map","type":"string"}},"required":["fieldID","type","sourceFieldID","default","mappings"],"type":"object"},"IMapMapping":{"additionalProperties":false,"properties":{"newValue":{},"value":{}},"required":["value","newValue"],"type":"object"},"IMapping":{"additionalProperties":false,"properties":{"condition":{"$ref":"#/definitions/IMappingConditionType"},"localFieldID":{"type":"string"},"nullable":{"type":"boolean"},"remoteFieldID":{"type":"string"}},"required":["remoteFieldID","localFieldID","condition","nullable"],"type":"object"},"IMappingConditionType":{"enum":["==","!=",">",">=","<","<=","range","in"],"type":"string"},"IMappings":{"additionalProperties":false,"properties":{"transformations":{"items":{"$ref":"#/definitions/ProjectTransformationType"},"type":"array"},"type":{"const":"mappings","type":"string"}},"required":["transformations","type"],"type":"object"},"IMulti":{"additionalProperties":false,"properties":{"fieldID":{"type":"string"},"transformations":{"items":{"$ref":"#/definitions/MultiTransformationType"},"type":"array"},"type":{"const":"multi","type":"string"}},"required":["fieldID","type","transformations"],"type":"object"},"IOutput":{"additionalProperties":false,"properties":{"fields":{"items":{"$ref":"#/definitions/IField"},"type":"array"}},"required":["fields"],"type":"object"},"IProject":{"additionalProperties":false,"properties":{"transformations":{"items":{"$ref":"#/definitions/ProjectTransformationType"},"type":"array"},"type":{"const":"project","type":"string"}},"required":["transformations","type"],"type":"object"},"IProperties":{"type":"object"},"IRequestField":{"additionalProperties":false,"properties":{"localFieldID":{"type":"string"},"remoteFieldID":{"type":"string"},"source":{"type":"string"},"value":{"type":"string"}},"required":["localFieldID","source","remoteFieldID","value"],"type":"object"},"IRestService":{"additionalProperties":false,"properties":{"action":{"type":"string"},"id":{"type":"string"},"inputs":{"items":{"$ref":"#/definitions/IField"},"type":"array"},"mode":{"enum":["get","post"],"type":"string"},"outputs":{"$ref":"#/definitions/OutputDict"},"type":{"const":"rest","type":"string"},"url":{"type":"string"}},"required":["action","id","inputs","outputs","type","url"],"type":"object"},"IRoxieService":{"additionalProperties":false,"properties":{"id":{"type":"string"},"inputs":{"items":{"$ref":"#/definitions/IField"},"type":"array"},"outputs":{"$ref":"#/definitions/OutputDict"},"queryID":{"type":"string"},"querySet":{"type":"string"},"type":{"const":"roxie","type":"string"},"url":{"type":"string"}},"required":["id","inputs","outputs","queryID","querySet","type","url"],"type":"object"},"IRoxieServiceRef":{"additionalProperties":false,"properties":{"id":{"type":"string"},"output":{"type":"string"},"request":{"items":{"$ref":"#/definitions/IRequestField"},"type":"array"}},"required":["id","output","request"],"type":"object"},"IScale":{"additionalProperties":false,"properties":{"factor":{"type":"number"},"fieldID":{"type":"string"},"sourceFieldID":{"type":"string"},"type":{"const":"scale","type":"string"}},"required":["fieldID","type","sourceFieldID","factor"],"type":"object"},"ISort":{"additionalProperties":false,"properties":{"conditions":{"items":{"$ref":"#/definitions/ISortCondition"},"type":"array"},"type":{"const":"sort","type":"string"}},"required":["conditions","type"],"type":"object"},"ISortCondition":{"additionalProperties":false,"properties":{"descending":{"type":"boolean"},"fieldID":{"type":"string"}},"required":["fieldID","descending"],"type":"object"},"ITemplate":{"additionalProperties":false,"properties":{"fieldID":{"type":"string"},"template":{"type":"string"},"type":{"const":"template","type":"string"}},"required":["fieldID","type","template"],"type":"object"},"IView":{"additionalProperties":false,"properties":{"activities":{"items":{"$ref":"#/definitions/ActivityType"},"type":"array"},"datasource":{"$ref":"#/definitions/IDatasourceRef"},"id":{"type":"string"},"visualization":{"$ref":"#/definitions/IVisualization"}},"required":["id","datasource","activities","visualization"],"type":"object"},"IVisualization":{"additionalProperties":false,"properties":{"__class":{"type":"string"},"chartType":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"mappings":{"$ref":"#/definitions/IMappings"},"properties":{"$ref":"#/definitions/IWidgetProperties"},"secondaryDataviewID":{"type":"string"},"title":{"type":"string"},"visibility":{"$ref":"#/definitions/VisibilityType"}},"required":["__class","chartType","id","mappings","properties","title","visibility"],"type":"object"},"IWUResult":{"additionalProperties":false,"properties":{"id":{"type":"string"},"outputs":{"$ref":"#/definitions/OutputDict"},"type":{"const":"wuresult","type":"string"},"url":{"type":"string"},"wuid":{"type":"string"}},"required":["id","outputs","type","url","wuid"],"type":"object"},"IWUResultRef":{"additionalProperties":false,"properties":{"id":{"type":"string"},"output":{"type":"string"}},"required":["id","output"],"type":"object"},"IWidgetProperties":{"additionalProperties":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"number"},{"type":"boolean"},{"not":{}},{"$ref":"#/definitions/IWidgetProperties"},{"items":{"$ref":"#/definitions/IWidgetProperties"},"type":"array"}]},"properties":{"__class":{"type":"string"}},"required":["__class"],"type":"object"},"MultiTransformationType":{"anyOf":[{"$ref":"#/definitions/IEquals"},{"$ref":"#/definitions/ICalculated"},{"$ref":"#/definitions/IScale"},{"$ref":"#/definitions/ITemplate"},{"$ref":"#/definitions/IMap"}]},"Number64":{"type":"string"},"OutputDict":{"additionalProperties":{"$ref":"#/definitions/IOutput"},"type":"object"},"ProjectTransformationType":{"anyOf":[{"$ref":"#/definitions/MultiTransformationType"},{"$ref":"#/definitions/IMulti"}]},"Range":{"items":{"type":["number","string"]},"maxItems":2,"minItems":2,"type":"array"},"Schema":{"additionalProperties":false,"properties":{"createdBy":{"additionalProperties":false,"properties":{"name":{"type":"string"},"version":{"type":"string"}},"required":["name","version"],"type":"object"},"datasources":{"items":{"$ref":"#/definitions/DatasourceType"},"type":"array"},"dataviews":{"items":{"$ref":"#/definitions/IView"},"type":"array"},"defs":{"additionalProperties":false,"properties":{"activityTypes":{"additionalProperties":false,"properties":{"filter":{"$ref":"#/definitions/IFilter"},"groupby":{"$ref":"#/definitions/IGroupBy"},"limit":{"$ref":"#/definitions/ILimit"},"mappings":{"$ref":"#/definitions/IMappings"},"project":{"$ref":"#/definitions/IProject"},"sort":{"$ref":"#/definitions/ISort"}},"required":["filter","project","groupby","sort","limit","mappings"],"type":"object"},"aggregateTypes":{"additionalProperties":false,"properties":{"aggregate":{"$ref":"#/definitions/IAggregate"},"count":{"$ref":"#/definitions/ICount"}},"required":["aggregate","count"],"type":"object"},"datasourceRefTypes":{"additionalProperties":false,"properties":{"roxieServiceRef":{"$ref":"#/definitions/IRoxieServiceRef"},"wuResultRef":{"$ref":"#/definitions/IWUResultRef"}},"required":["wuResultRef","roxieServiceRef"],"type":"object"},"datasourceTypes":{"additionalProperties":false,"properties":{"databomb":{"$ref":"#/definitions/IDatabomb"},"datasource":{"$ref":"#/definitions/IDatasource"},"form":{"$ref":"#/definitions/IForm"},"hipieService":{"$ref":"#/definitions/IHipieService"},"logicalFile":{"$ref":"#/definitions/ILogicalFile"},"roxieService":{"$ref":"#/definitions/IRoxieService"},"wuresult":{"$ref":"#/definitions/IWUResult"}},"required":["datasource","logicalFile","form","databomb","wuresult","hipieService","roxieService"],"type":"object"},"fieldTypes":{"additionalProperties":false,"properties":{"dataset":{"$ref":"#/definitions/Dataset"},"field":{"$ref":"#/definitions/IField"},"fieldBoolean":{"$ref":"#/definitions/IFieldBoolean"},"fieldDataset":{"$ref":"#/definitions/IFieldDataset"},"fieldNumber":{"$ref":"#/definitions/IFieldNumber"},"fieldNumber64":{"$ref":"#/definitions/IFieldNumber64"},"fieldObject":{"$ref":"#/definitions/IFieldObject"},"fieldRange":{"$ref":"#/definitions/IFieldRange"},"fieldSet":{"$ref":"#/definitions/IFieldSet"},"fieldString":{"$ref":"#/definitions/IFieldString"},"fieldType":{"$ref":"#/definitions/IFieldType"},"number64":{"$ref":"#/definitions/Number64"},"range":{"$ref":"#/definitions/Range"}},"required":["number64","range","dataset","fieldType","fieldBoolean","fieldNumber","fieldNumber64","fieldString","fieldRange","fieldDataset","fieldSet","fieldObject","field"],"type":"object"},"transformationTypes":{"additionalProperties":false,"properties":{"calculated":{"$ref":"#/definitions/ICalculated"},"equals":{"$ref":"#/definitions/IEquals"},"map":{"$ref":"#/definitions/IMap"},"multi":{"$ref":"#/definitions/IMulti"},"scale":{"$ref":"#/definitions/IScale"},"template":{"$ref":"#/definitions/ITemplate"}},"required":["equals","calculated","scale","template","map","multi"],"type":"object"}},"required":["fieldTypes","datasourceTypes","datasourceRefTypes","activityTypes","aggregateTypes","transformationTypes"],"type":"object"},"hipieProperties":{"$ref":"#/definitions/IProperties"},"properties":{"$ref":"#/definitions/IProperties"},"version":{"const":"2.2.1","type":"string"}},"required":["version","createdBy","datasources","dataviews"],"type":"object"},"VisibilityType":{"enum":["normal","flyout"],"type":"string"}}')},X=i.default||i;const K=k;var Y={allErrors:!1,verbose:!0,jsonPointers:!1};e.BUILD_VERSION="3.2.1",Object.defineProperty(e,"DDL1",{enumerable:!0,get:function(){return y}}),Object.defineProperty(e,"DDL2",{enumerable:!0,get:function(){return C}}),e.PKG_NAME=f,e.PKG_VERSION=c,e.ddl2Schema=K,e.isDDL2Schema=function(e){return void 0!==e.version&&void 0!==e.datasources&&void 0!==e.dataviews},e.upgrade=function(e,i,t,r=!0,s={}){const o=new H(e,i,t,r).write();var a;return o.properties=(N(o,a=s),function(e,i){const t={layout:[]};if(i&&i.__properties)return i.__properties.content.forEach(e=>{const i={id:e.__properties.widget.__id,position:[e.__properties.gridCol,e.__properties.gridRow,e.__properties.gridColSpan,e.__properties.gridRowSpan]};t.layout.push(i)}),t}(0,a)),o},e.validate2=function(e){return function(e,i){const t=new X(Y).compile(i);return{success:t(e),errors:t.errors}}(e,k)}});
|
|
2
|
+
//# sourceMappingURL=index.umd.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.umd.cjs","names":["VisibilitySet: VisibilityType[]","classMappings: any","propertyMappings: any","dermPanelObj: any","dermPanelProps: any","dermWidgetObj: any","dermWidgetProps: any","retVal: DDLProperties","cellPosition: CellPosition","UPGRADE_HEX_CHAR: boolean","retVal: IDatasourceOutput[]","retVal: { [id: string]: IDatasourceOutputFilter }","ddl2DS: DDL2.IWUResult","ddl2DS: DDL2.IHipieService","projectTransformations: DDL2.ProjectTransformationType[]","groupByColumns: string[]","aggrFields: DDL2.IAggregate[]","props: any","retVal: DDL2.IMapMapping[]","newValue: { [key: string]: string | number | boolean | undefined }","condition: DDL2.IFilterCondition","project: DDL2.IProject","filters: DDL2.IFilter","groupBy: DDL2.IGroupBy","sort: DDL2.ISort","limit: DDL2.ILimit","mappings: DDL2.IMappings","datasourceRef: DDL2.IDatasourceBaseRef | DDL2.IRoxieServiceRef","retVal: DDL2.IFieldString","retVal: DDL2.DatasourceType[]","retVal: DDL2.IView[]","ddl2Schema: object","options: _Ajv.Options","ajv: _Ajv.Ajv"],"sources":["../src/__package__.ts","../src/ddl/v1.ts","../src/ddl/v2.ts","../src/dermatology.ts","../src/upgrade.ts","../schema/v2.json","../src/validate.ts","../src/index.ts"],"sourcesContent":["export const PKG_NAME = \"@hpcc-js/ddl-shim\";\nexport const PKG_VERSION = \"3.0.0\";\nexport const BUILD_VERSION = \"3.2.1\";\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.ts\";\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__.ts\";\nimport * as DDL1 from \"./ddl/v1.ts\";\nimport * as DDL2 from \"./ddl/v2.ts\";\nimport { upgrade as dermatologyUpgrade } from \"./dermatology.ts\";\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.warn(\"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","{\n \"$ref\": \"#/definitions/Schema\",\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"definitions\": {\n \"ActivityType\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/IFilter\"\n },\n {\n \"$ref\": \"#/definitions/IProject\"\n },\n {\n \"$ref\": \"#/definitions/IGroupBy\"\n },\n {\n \"$ref\": \"#/definitions/ISort\"\n },\n {\n \"$ref\": \"#/definitions/ILimit\"\n },\n {\n \"$ref\": \"#/definitions/IMappings\"\n }\n ]\n },\n \"AggregateType\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/IAggregate\"\n },\n {\n \"$ref\": \"#/definitions/ICount\"\n }\n ]\n },\n \"Dataset\": {\n \"items\": {},\n \"type\": \"array\"\n },\n \"DatasourceType\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/IWUResult\"\n },\n {\n \"$ref\": \"#/definitions/ILogicalFile\"\n },\n {\n \"$ref\": \"#/definitions/IRoxieService\"\n },\n {\n \"$ref\": \"#/definitions/IHipieService\"\n },\n {\n \"$ref\": \"#/definitions/IRestService\"\n },\n {\n \"$ref\": \"#/definitions/IForm\"\n },\n {\n \"$ref\": \"#/definitions/IDatabomb\"\n }\n ]\n },\n \"FilterCondition\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/IFilterCondition\"\n },\n {\n \"$ref\": \"#/definitions/IFilterStaticCondition\"\n }\n ]\n },\n \"IAggregate\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"baseCountFieldID\": {\n \"type\": \"string\"\n },\n \"fieldID\": {\n \"type\": \"string\"\n },\n \"inFieldID\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"$ref\": \"#/definitions/IAggregateType\"\n }\n },\n \"required\": [\n \"fieldID\",\n \"type\",\n \"inFieldID\"\n ],\n \"type\": \"object\"\n },\n \"IAggregateType\": {\n \"enum\": [\n \"min\",\n \"max\",\n \"sum\",\n \"mean\",\n \"variance\",\n \"deviation\"\n ],\n \"type\": \"string\"\n },\n \"ICalculated\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"fieldID\": {\n \"type\": \"string\"\n },\n \"sourceFieldID1\": {\n \"type\": \"string\"\n },\n \"sourceFieldID2\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"$ref\": \"#/definitions/ICalculatedType\"\n }\n },\n \"required\": [\n \"fieldID\",\n \"type\",\n \"sourceFieldID1\",\n \"sourceFieldID2\"\n ],\n \"type\": \"object\"\n },\n \"ICalculatedType\": {\n \"enum\": [\n \"+\",\n \"-\",\n \"*\",\n \"/\"\n ],\n \"type\": \"string\"\n },\n \"ICount\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"fieldID\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"count\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"fieldID\",\n \"type\"\n ],\n \"type\": \"object\"\n },\n \"IDatabomb\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"fields\": {\n \"items\": {\n \"$ref\": \"#/definitions/IField\"\n },\n \"type\": \"array\"\n },\n \"format\": {\n \"$ref\": \"#/definitions/IDatabombFormat\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"payload\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"databomb\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"fields\",\n \"format\",\n \"id\",\n \"type\"\n ],\n \"type\": \"object\"\n },\n \"IDatabombFormat\": {\n \"enum\": [\n \"csv\",\n \"tsv\",\n \"json\"\n ],\n \"type\": \"string\"\n },\n \"IDatabombRef\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\"\n ],\n \"type\": \"object\"\n },\n \"IDatasource\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"$ref\": \"#/definitions/IDatasourceType\"\n }\n },\n \"required\": [\n \"type\",\n \"id\"\n ],\n \"type\": \"object\"\n },\n \"IDatasourceRef\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/IDatabombRef\"\n },\n {\n \"$ref\": \"#/definitions/IWUResultRef\"\n },\n {\n \"$ref\": \"#/definitions/IRoxieServiceRef\"\n },\n {\n \"$ref\": \"#/definitions/IHipieSqlRef\"\n }\n ]\n },\n \"IDatasourceType\": {\n \"enum\": [\n \"wuresult\",\n \"logicalfile\",\n \"roxie\",\n \"hipie\",\n \"rest\",\n \"form\",\n \"databomb\"\n ],\n \"type\": \"string\"\n },\n \"IEquals\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"fieldID\": {\n \"type\": \"string\"\n },\n \"sourceFieldID\": {\n \"type\": \"string\"\n },\n \"transformations\": {\n \"items\": {\n \"$ref\": \"#/definitions/MultiTransformationType\"\n },\n \"type\": \"array\"\n },\n \"type\": {\n \"const\": \"=\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"fieldID\",\n \"type\",\n \"sourceFieldID\"\n ],\n \"type\": \"object\"\n },\n \"IField\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/IFieldBoolean\"\n },\n {\n \"$ref\": \"#/definitions/IFieldNumber\"\n },\n {\n \"$ref\": \"#/definitions/IFieldNumber64\"\n },\n {\n \"$ref\": \"#/definitions/IFieldString\"\n },\n {\n \"$ref\": \"#/definitions/IFieldRange\"\n },\n {\n \"$ref\": \"#/definitions/IFieldDataset\"\n },\n {\n \"$ref\": \"#/definitions/IFieldSet\"\n },\n {\n \"$ref\": \"#/definitions/IFieldObject\"\n }\n ]\n },\n \"IFieldBoolean\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"default\": {\n \"type\": \"boolean\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"boolean\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"id\"\n ],\n \"type\": \"object\"\n },\n \"IFieldDataset\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"children\": {\n \"items\": {\n \"$ref\": \"#/definitions/IField\"\n },\n \"type\": \"array\"\n },\n \"default\": {\n \"$ref\": \"#/definitions/Dataset\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"dataset\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"id\",\n \"children\"\n ],\n \"type\": \"object\"\n },\n \"IFieldNumber\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"default\": {\n \"type\": \"number\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"number\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"id\"\n ],\n \"type\": \"object\"\n },\n \"IFieldNumber64\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"default\": {\n \"$ref\": \"#/definitions/Number64\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"number64\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"id\"\n ],\n \"type\": \"object\"\n },\n \"IFieldObject\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"default\": {\n \"type\": \"object\"\n },\n \"fields\": {\n \"additionalProperties\": {\n \"$ref\": \"#/definitions/IField\"\n },\n \"type\": \"object\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"object\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"id\",\n \"fields\"\n ],\n \"type\": \"object\"\n },\n \"IFieldRange\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"default\": {\n \"$ref\": \"#/definitions/Range\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"range\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"id\"\n ],\n \"type\": \"object\"\n },\n \"IFieldSet\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"default\": {\n \"items\": {\n \"type\": [\n \"string\",\n \"number\"\n ]\n },\n \"type\": \"array\"\n },\n \"fieldType\": {\n \"enum\": [\n \"string\",\n \"number\"\n ],\n \"type\": \"string\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"set\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"id\",\n \"fieldType\"\n ],\n \"type\": \"object\"\n },\n \"IFieldString\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"default\": {\n \"type\": \"string\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"string\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"id\"\n ],\n \"type\": \"object\"\n },\n \"IFieldType\": {\n \"enum\": [\n \"boolean\",\n \"number\",\n \"number64\",\n \"string\",\n \"range\",\n \"dataset\",\n \"set\",\n \"object\"\n ],\n \"type\": \"string\"\n },\n \"IFilter\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"conditions\": {\n \"items\": {\n \"$ref\": \"#/definitions/FilterCondition\"\n },\n \"type\": \"array\"\n },\n \"type\": {\n \"const\": \"filter\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"conditions\",\n \"type\"\n ],\n \"type\": \"object\"\n },\n \"IFilterCondition\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"mappings\": {\n \"items\": {\n \"$ref\": \"#/definitions/IMapping\"\n },\n \"type\": \"array\"\n },\n \"viewID\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"viewID\",\n \"mappings\"\n ],\n \"type\": \"object\"\n },\n \"IFilterStaticCondition\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"condition\": {\n \"$ref\": \"#/definitions/IMappingConditionType\"\n },\n \"localFieldID\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": [\n \"string\",\n \"number\"\n ]\n }\n },\n \"required\": [\n \"localFieldID\",\n \"condition\",\n \"value\"\n ],\n \"type\": \"object\"\n },\n \"IForm\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"fields\": {\n \"items\": {\n \"$ref\": \"#/definitions/IField\"\n },\n \"type\": \"array\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"form\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"fields\",\n \"id\",\n \"type\"\n ],\n \"type\": \"object\"\n },\n \"IGroupBy\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"aggregates\": {\n \"items\": {\n \"$ref\": \"#/definitions/AggregateType\"\n },\n \"type\": \"array\"\n },\n \"groupByIDs\": {\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n },\n \"type\": {\n \"const\": \"groupby\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"aggregates\",\n \"groupByIDs\",\n \"type\"\n ],\n \"type\": \"object\"\n },\n \"IHipieService\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"inputs\": {\n \"items\": {\n \"$ref\": \"#/definitions/IField\"\n },\n \"type\": \"array\"\n },\n \"outputs\": {\n \"$ref\": \"#/definitions/OutputDict\"\n },\n \"queryID\": {\n \"type\": \"string\"\n },\n \"querySet\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"hipie\",\n \"type\": \"string\"\n },\n \"url\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"inputs\",\n \"outputs\",\n \"queryID\",\n \"querySet\",\n \"type\",\n \"url\"\n ],\n \"type\": \"object\"\n },\n \"IHipieSqlRef\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\"\n ],\n \"type\": \"object\"\n },\n \"ILimit\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"limit\": {\n \"type\": \"number\"\n },\n \"type\": {\n \"const\": \"limit\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"limit\",\n \"type\"\n ],\n \"type\": \"object\"\n },\n \"ILogicalFile\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"fields\": {\n \"items\": {\n \"$ref\": \"#/definitions/IField\"\n },\n \"type\": \"array\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"logicalFile\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"logicalfile\",\n \"type\": \"string\"\n },\n \"url\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"fields\",\n \"id\",\n \"logicalFile\",\n \"type\",\n \"url\"\n ],\n \"type\": \"object\"\n },\n \"IMap\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"default\": {},\n \"fieldID\": {\n \"type\": \"string\"\n },\n \"mappings\": {\n \"items\": {\n \"$ref\": \"#/definitions/IMapMapping\"\n },\n \"type\": \"array\"\n },\n \"sourceFieldID\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"map\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"fieldID\",\n \"type\",\n \"sourceFieldID\",\n \"default\",\n \"mappings\"\n ],\n \"type\": \"object\"\n },\n \"IMapMapping\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"newValue\": {},\n \"value\": {}\n },\n \"required\": [\n \"value\",\n \"newValue\"\n ],\n \"type\": \"object\"\n },\n \"IMapping\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"condition\": {\n \"$ref\": \"#/definitions/IMappingConditionType\"\n },\n \"localFieldID\": {\n \"type\": \"string\"\n },\n \"nullable\": {\n \"type\": \"boolean\"\n },\n \"remoteFieldID\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"remoteFieldID\",\n \"localFieldID\",\n \"condition\",\n \"nullable\"\n ],\n \"type\": \"object\"\n },\n \"IMappingConditionType\": {\n \"enum\": [\n \"==\",\n \"!=\",\n \">\",\n \">=\",\n \"<\",\n \"<=\",\n \"range\",\n \"in\"\n ],\n \"type\": \"string\"\n },\n \"IMappings\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"transformations\": {\n \"items\": {\n \"$ref\": \"#/definitions/ProjectTransformationType\"\n },\n \"type\": \"array\"\n },\n \"type\": {\n \"const\": \"mappings\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"transformations\",\n \"type\"\n ],\n \"type\": \"object\"\n },\n \"IMulti\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"fieldID\": {\n \"type\": \"string\"\n },\n \"transformations\": {\n \"items\": {\n \"$ref\": \"#/definitions/MultiTransformationType\"\n },\n \"type\": \"array\"\n },\n \"type\": {\n \"const\": \"multi\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"fieldID\",\n \"type\",\n \"transformations\"\n ],\n \"type\": \"object\"\n },\n \"IOutput\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"fields\": {\n \"items\": {\n \"$ref\": \"#/definitions/IField\"\n },\n \"type\": \"array\"\n }\n },\n \"required\": [\n \"fields\"\n ],\n \"type\": \"object\"\n },\n \"IProject\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"transformations\": {\n \"items\": {\n \"$ref\": \"#/definitions/ProjectTransformationType\"\n },\n \"type\": \"array\"\n },\n \"type\": {\n \"const\": \"project\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"transformations\",\n \"type\"\n ],\n \"type\": \"object\"\n },\n \"IProperties\": {\n \"type\": \"object\"\n },\n \"IRequestField\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"localFieldID\": {\n \"type\": \"string\"\n },\n \"remoteFieldID\": {\n \"type\": \"string\"\n },\n \"source\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"localFieldID\",\n \"source\",\n \"remoteFieldID\",\n \"value\"\n ],\n \"type\": \"object\"\n },\n \"IRestService\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"action\": {\n \"type\": \"string\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"inputs\": {\n \"items\": {\n \"$ref\": \"#/definitions/IField\"\n },\n \"type\": \"array\"\n },\n \"mode\": {\n \"enum\": [\n \"get\",\n \"post\"\n ],\n \"type\": \"string\"\n },\n \"outputs\": {\n \"$ref\": \"#/definitions/OutputDict\"\n },\n \"type\": {\n \"const\": \"rest\",\n \"type\": \"string\"\n },\n \"url\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"action\",\n \"id\",\n \"inputs\",\n \"outputs\",\n \"type\",\n \"url\"\n ],\n \"type\": \"object\"\n },\n \"IRoxieService\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"inputs\": {\n \"items\": {\n \"$ref\": \"#/definitions/IField\"\n },\n \"type\": \"array\"\n },\n \"outputs\": {\n \"$ref\": \"#/definitions/OutputDict\"\n },\n \"queryID\": {\n \"type\": \"string\"\n },\n \"querySet\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"roxie\",\n \"type\": \"string\"\n },\n \"url\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"inputs\",\n \"outputs\",\n \"queryID\",\n \"querySet\",\n \"type\",\n \"url\"\n ],\n \"type\": \"object\"\n },\n \"IRoxieServiceRef\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"output\": {\n \"type\": \"string\"\n },\n \"request\": {\n \"items\": {\n \"$ref\": \"#/definitions/IRequestField\"\n },\n \"type\": \"array\"\n }\n },\n \"required\": [\n \"id\",\n \"output\",\n \"request\"\n ],\n \"type\": \"object\"\n },\n \"IScale\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"factor\": {\n \"type\": \"number\"\n },\n \"fieldID\": {\n \"type\": \"string\"\n },\n \"sourceFieldID\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"scale\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"fieldID\",\n \"type\",\n \"sourceFieldID\",\n \"factor\"\n ],\n \"type\": \"object\"\n },\n \"ISort\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"conditions\": {\n \"items\": {\n \"$ref\": \"#/definitions/ISortCondition\"\n },\n \"type\": \"array\"\n },\n \"type\": {\n \"const\": \"sort\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"conditions\",\n \"type\"\n ],\n \"type\": \"object\"\n },\n \"ISortCondition\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"descending\": {\n \"type\": \"boolean\"\n },\n \"fieldID\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"fieldID\",\n \"descending\"\n ],\n \"type\": \"object\"\n },\n \"ITemplate\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"fieldID\": {\n \"type\": \"string\"\n },\n \"template\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"const\": \"template\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"fieldID\",\n \"type\",\n \"template\"\n ],\n \"type\": \"object\"\n },\n \"IView\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"activities\": {\n \"items\": {\n \"$ref\": \"#/definitions/ActivityType\"\n },\n \"type\": \"array\"\n },\n \"datasource\": {\n \"$ref\": \"#/definitions/IDatasourceRef\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"visualization\": {\n \"$ref\": \"#/definitions/IVisualization\"\n }\n },\n \"required\": [\n \"id\",\n \"datasource\",\n \"activities\",\n \"visualization\"\n ],\n \"type\": \"object\"\n },\n \"IVisualization\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"__class\": {\n \"type\": \"string\"\n },\n \"chartType\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"mappings\": {\n \"$ref\": \"#/definitions/IMappings\"\n },\n \"properties\": {\n \"$ref\": \"#/definitions/IWidgetProperties\"\n },\n \"secondaryDataviewID\": {\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"visibility\": {\n \"$ref\": \"#/definitions/VisibilityType\"\n }\n },\n \"required\": [\n \"__class\",\n \"chartType\",\n \"id\",\n \"mappings\",\n \"properties\",\n \"title\",\n \"visibility\"\n ],\n \"type\": \"object\"\n },\n \"IWUResult\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"outputs\": {\n \"$ref\": \"#/definitions/OutputDict\"\n },\n \"type\": {\n \"const\": \"wuresult\",\n \"type\": \"string\"\n },\n \"url\": {\n \"type\": \"string\"\n },\n \"wuid\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"outputs\",\n \"type\",\n \"url\",\n \"wuid\"\n ],\n \"type\": \"object\"\n },\n \"IWUResultRef\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"output\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"output\"\n ],\n \"type\": \"object\"\n },\n \"IWidgetProperties\": {\n \"additionalProperties\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n },\n {\n \"type\": \"number\"\n },\n {\n \"type\": \"boolean\"\n },\n {\n \"not\": {}\n },\n {\n \"$ref\": \"#/definitions/IWidgetProperties\"\n },\n {\n \"items\": {\n \"$ref\": \"#/definitions/IWidgetProperties\"\n },\n \"type\": \"array\"\n }\n ]\n },\n \"properties\": {\n \"__class\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"__class\"\n ],\n \"type\": \"object\"\n },\n \"MultiTransformationType\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/IEquals\"\n },\n {\n \"$ref\": \"#/definitions/ICalculated\"\n },\n {\n \"$ref\": \"#/definitions/IScale\"\n },\n {\n \"$ref\": \"#/definitions/ITemplate\"\n },\n {\n \"$ref\": \"#/definitions/IMap\"\n }\n ]\n },\n \"Number64\": {\n \"type\": \"string\"\n },\n \"OutputDict\": {\n \"additionalProperties\": {\n \"$ref\": \"#/definitions/IOutput\"\n },\n \"type\": \"object\"\n },\n \"ProjectTransformationType\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/definitions/MultiTransformationType\"\n },\n {\n \"$ref\": \"#/definitions/IMulti\"\n }\n ]\n },\n \"Range\": {\n \"items\": {\n \"type\": [\n \"number\",\n \"string\"\n ]\n },\n \"maxItems\": 2,\n \"minItems\": 2,\n \"type\": \"array\"\n },\n \"Schema\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"createdBy\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"version\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"name\",\n \"version\"\n ],\n \"type\": \"object\"\n },\n \"datasources\": {\n \"items\": {\n \"$ref\": \"#/definitions/DatasourceType\"\n },\n \"type\": \"array\"\n },\n \"dataviews\": {\n \"items\": {\n \"$ref\": \"#/definitions/IView\"\n },\n \"type\": \"array\"\n },\n \"defs\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"activityTypes\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/definitions/IFilter\"\n },\n \"groupby\": {\n \"$ref\": \"#/definitions/IGroupBy\"\n },\n \"limit\": {\n \"$ref\": \"#/definitions/ILimit\"\n },\n \"mappings\": {\n \"$ref\": \"#/definitions/IMappings\"\n },\n \"project\": {\n \"$ref\": \"#/definitions/IProject\"\n },\n \"sort\": {\n \"$ref\": \"#/definitions/ISort\"\n }\n },\n \"required\": [\n \"filter\",\n \"project\",\n \"groupby\",\n \"sort\",\n \"limit\",\n \"mappings\"\n ],\n \"type\": \"object\"\n },\n \"aggregateTypes\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"aggregate\": {\n \"$ref\": \"#/definitions/IAggregate\"\n },\n \"count\": {\n \"$ref\": \"#/definitions/ICount\"\n }\n },\n \"required\": [\n \"aggregate\",\n \"count\"\n ],\n \"type\": \"object\"\n },\n \"datasourceRefTypes\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"roxieServiceRef\": {\n \"$ref\": \"#/definitions/IRoxieServiceRef\"\n },\n \"wuResultRef\": {\n \"$ref\": \"#/definitions/IWUResultRef\"\n }\n },\n \"required\": [\n \"wuResultRef\",\n \"roxieServiceRef\"\n ],\n \"type\": \"object\"\n },\n \"datasourceTypes\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"databomb\": {\n \"$ref\": \"#/definitions/IDatabomb\"\n },\n \"datasource\": {\n \"$ref\": \"#/definitions/IDatasource\"\n },\n \"form\": {\n \"$ref\": \"#/definitions/IForm\"\n },\n \"hipieService\": {\n \"$ref\": \"#/definitions/IHipieService\"\n },\n \"logicalFile\": {\n \"$ref\": \"#/definitions/ILogicalFile\"\n },\n \"roxieService\": {\n \"$ref\": \"#/definitions/IRoxieService\"\n },\n \"wuresult\": {\n \"$ref\": \"#/definitions/IWUResult\"\n }\n },\n \"required\": [\n \"datasource\",\n \"logicalFile\",\n \"form\",\n \"databomb\",\n \"wuresult\",\n \"hipieService\",\n \"roxieService\"\n ],\n \"type\": \"object\"\n },\n \"fieldTypes\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"dataset\": {\n \"$ref\": \"#/definitions/Dataset\"\n },\n \"field\": {\n \"$ref\": \"#/definitions/IField\"\n },\n \"fieldBoolean\": {\n \"$ref\": \"#/definitions/IFieldBoolean\"\n },\n \"fieldDataset\": {\n \"$ref\": \"#/definitions/IFieldDataset\"\n },\n \"fieldNumber\": {\n \"$ref\": \"#/definitions/IFieldNumber\"\n },\n \"fieldNumber64\": {\n \"$ref\": \"#/definitions/IFieldNumber64\"\n },\n \"fieldObject\": {\n \"$ref\": \"#/definitions/IFieldObject\"\n },\n \"fieldRange\": {\n \"$ref\": \"#/definitions/IFieldRange\"\n },\n \"fieldSet\": {\n \"$ref\": \"#/definitions/IFieldSet\"\n },\n \"fieldString\": {\n \"$ref\": \"#/definitions/IFieldString\"\n },\n \"fieldType\": {\n \"$ref\": \"#/definitions/IFieldType\"\n },\n \"number64\": {\n \"$ref\": \"#/definitions/Number64\"\n },\n \"range\": {\n \"$ref\": \"#/definitions/Range\"\n }\n },\n \"required\": [\n \"number64\",\n \"range\",\n \"dataset\",\n \"fieldType\",\n \"fieldBoolean\",\n \"fieldNumber\",\n \"fieldNumber64\",\n \"fieldString\",\n \"fieldRange\",\n \"fieldDataset\",\n \"fieldSet\",\n \"fieldObject\",\n \"field\"\n ],\n \"type\": \"object\"\n },\n \"transformationTypes\": {\n \"additionalProperties\": false,\n \"properties\": {\n \"calculated\": {\n \"$ref\": \"#/definitions/ICalculated\"\n },\n \"equals\": {\n \"$ref\": \"#/definitions/IEquals\"\n },\n \"map\": {\n \"$ref\": \"#/definitions/IMap\"\n },\n \"multi\": {\n \"$ref\": \"#/definitions/IMulti\"\n },\n \"scale\": {\n \"$ref\": \"#/definitions/IScale\"\n },\n \"template\": {\n \"$ref\": \"#/definitions/ITemplate\"\n }\n },\n \"required\": [\n \"equals\",\n \"calculated\",\n \"scale\",\n \"template\",\n \"map\",\n \"multi\"\n ],\n \"type\": \"object\"\n }\n },\n \"required\": [\n \"fieldTypes\",\n \"datasourceTypes\",\n \"datasourceRefTypes\",\n \"activityTypes\",\n \"aggregateTypes\",\n \"transformationTypes\"\n ],\n \"type\": \"object\"\n },\n \"hipieProperties\": {\n \"$ref\": \"#/definitions/IProperties\"\n },\n \"properties\": {\n \"$ref\": \"#/definitions/IProperties\"\n },\n \"version\": {\n \"const\": \"2.2.1\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"version\",\n \"createdBy\",\n \"datasources\",\n \"dataviews\"\n ],\n \"type\": \"object\"\n },\n \"VisibilityType\": {\n \"enum\": [\n \"normal\",\n \"flyout\"\n ],\n \"type\": \"string\"\n }\n }\n}\n","import * as _Ajv from \"ajv\";\nimport * as DDL from \"./ddl/v1.ts\";\nimport * as DDL2 from \"./ddl/v2.ts\";\n\nconst Ajv = (_Ajv as any).default || _Ajv;\n\nexport const ddl2Schema: object = _ddl2Schema;\n\nconst options: _Ajv.Options = {\n allErrors: false,\n verbose: true,\n jsonPointers: false\n};\n\nfunction doValidate(ddl: DDL.DDLSchema | DDL2.Schema, schema: DDL.DDLSchema | DDL2.Schema) {\n const ajv: _Ajv.Ajv = new Ajv(options);\n const validate = ajv.compile(schema);\n const success = validate(ddl);\n return {\n success,\n errors: validate.errors\n };\n}\n\n/* Not needed ---\n// @ts-ignore\nimport * as ddlSchema from \"../schema/v1.json\";\n\nexport function validate(ddl: DDL.DDLSchema) {\n return doValidate(ddl, ddlSchema);\n}\n*/\n\nimport _ddl2Schema from \"../schema/v2.json\" with { type: \"json\" };\n\nexport function validate2(ddl: DDL2.Schema) {\n return doValidate(ddl, _ddl2Schema as any);\n}\n","export * from \"./__package__.ts\";\nimport * as DDL1 from \"./ddl/v1.ts\";\nimport * as DDL2 from \"./ddl/v2.ts\";\nexport * from \"./upgrade.ts\";\nexport * from \"./validate.ts\";\n\nexport { DDL1, DDL2 };\n\nexport function isDDL2Schema(ref: DDL1.DDLSchema | DDL2.Schema): ref is DDL2.Schema {\n return (ref as DDL2.Schema).version !== undefined && (ref as DDL2.Schema).datasources !== undefined && (ref as DDL2.Schema).dataviews !== undefined;\n}\n"],"mappings":"4yBAAA,MAAa,EAAW,oBACX,EAAc,8XC2B3B,SAAgB,EAAqB,GACjC,YAA6C,IAArC,EAA4B,KAMxC,SAAgB,EAAqB,GACjC,OAAiD,IAAzC,EAA4B,SAMxC,SAAgB,EAAkB,GAC9B,YAAyC,IAAjC,EAAyB,IA2JrC,SAAgB,EAAmB,GAC/B,MAA2C,QAAnC,EAA0B,MAAsD,QAAnC,EAA0B,KAOnF,SAAgB,EAAoB,GAChC,MAA4C,SAApC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
-
]
|
|
16
|
-
}
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.umd.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./types/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.umd.cjs"
|
|
13
|
+
},
|
|
14
|
+
"./dist/*": "./dist/*"
|
|
17
15
|
},
|
|
16
|
+
"browser": "./dist/index.umd.cjs",
|
|
17
|
+
"types": "./types/index.d.ts",
|
|
18
18
|
"files": [
|
|
19
19
|
"dist/*",
|
|
20
20
|
"src/*",
|
|
21
|
-
"schema/*.json",
|
|
22
21
|
"types/*"
|
|
23
22
|
],
|
|
24
23
|
"scripts": {
|
|
25
24
|
"preinstall": "echo \"\" > cli.js",
|
|
26
|
-
"clean": "rimraf --glob bin lib* types dist ./src/ddl*Schema*.ts ./schema/*.json *.tsbuildinfo",
|
|
27
|
-
"compile-es6": "tsc --module es6 --outDir ./lib-es6",
|
|
28
|
-
"compile-es6-watch": "npm run compile-es6 -- -w",
|
|
25
|
+
"clean": "rimraf --glob bin lib* types dist ./src/ddl*Schema*.ts ./schema/*.json *.tsbuildinfo .turbo",
|
|
29
26
|
"generate-v1": "ts-json-schema-generator --tsconfig tsconfig-schema.json --type DDLSchema > ./schema/v1.json",
|
|
30
27
|
"generate-v2": "ts-json-schema-generator --tsconfig tsconfig-schema.json --type Schema > ./schema/v2.json",
|
|
31
28
|
"generate": "run-p generate-v1 generate-v2",
|
|
32
|
-
"bundle": "
|
|
33
|
-
"bundle-watch": "
|
|
34
|
-
"
|
|
35
|
-
"gen-
|
|
36
|
-
"build": "run-
|
|
37
|
-
"watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch",
|
|
38
|
-
"stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js",
|
|
29
|
+
"bundle": "vite build",
|
|
30
|
+
"bundle-watch": "vite",
|
|
31
|
+
"gen-types": "tsc --project tsconfig.json",
|
|
32
|
+
"gen-types-watch": "npm run gen-types -- --watch",
|
|
33
|
+
"build": "npm-run-all --serial generate --parallel gen-types bundle",
|
|
39
34
|
"lint": "eslint ./src",
|
|
35
|
+
"lint-fix": "eslint --fix src/**/*.ts",
|
|
40
36
|
"docs": "typedoc --options tdoptions.json .",
|
|
41
|
-
"
|
|
37
|
+
"coverage": "vitest run --coverage",
|
|
38
|
+
"update": "npx --yes npm-check-updates -u -t minor",
|
|
39
|
+
"update-major": "npx --yes npm-check-updates -u"
|
|
42
40
|
},
|
|
43
41
|
"dependencies": {
|
|
44
42
|
"ajv": "6.12.6"
|
|
45
43
|
},
|
|
46
44
|
"devDependencies": {
|
|
47
|
-
"@hpcc-js/
|
|
45
|
+
"@hpcc-js/esbuild-plugins": "^1.5.2",
|
|
48
46
|
"@rodrigoff/ajv-cli": "5.2.0",
|
|
49
|
-
"
|
|
50
|
-
"ts-json-schema-generator": "0.98.0",
|
|
51
|
-
"tslib": "2.6.3"
|
|
47
|
+
"ts-json-schema-generator": "0.98.0"
|
|
52
48
|
},
|
|
53
49
|
"repository": {
|
|
54
50
|
"type": "git",
|
|
@@ -61,5 +57,5 @@
|
|
|
61
57
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
62
58
|
},
|
|
63
59
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
64
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "a35882216a554b24a2586f30ce829d511941aecd"
|
|
65
61
|
}
|
package/src/__package__.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export const PKG_NAME = "@hpcc-js/ddl-shim";
|
|
2
|
-
export const PKG_VERSION = "
|
|
3
|
-
export const BUILD_VERSION = "2.
|
|
2
|
+
export const PKG_VERSION = "3.0.0";
|
|
3
|
+
export const BUILD_VERSION = "3.2.1";
|
package/src/cli.ts
CHANGED
package/src/dermatology.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./__package__";
|
|
2
|
-
import * as DDL1 from "./ddl/v1";
|
|
3
|
-
import * as DDL2 from "./ddl/v2";
|
|
4
|
-
export * from "./upgrade";
|
|
5
|
-
export * from "./validate";
|
|
1
|
+
export * from "./__package__.ts";
|
|
2
|
+
import * as DDL1 from "./ddl/v1.ts";
|
|
3
|
+
import * as DDL2 from "./ddl/v2.ts";
|
|
4
|
+
export * from "./upgrade.ts";
|
|
5
|
+
export * from "./validate.ts";
|
|
6
6
|
|
|
7
7
|
export { DDL1, DDL2 };
|
|
8
8
|
|
package/src/upgrade.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PKG_NAME, PKG_VERSION } from "./__package__";
|
|
2
|
-
import * as DDL1 from "./ddl/v1";
|
|
3
|
-
import * as DDL2 from "./ddl/v2";
|
|
4
|
-
import { upgrade as dermatologyUpgrade } from "./dermatology";
|
|
1
|
+
import { PKG_NAME, PKG_VERSION } from "./__package__.ts";
|
|
2
|
+
import * as DDL1 from "./ddl/v1.ts";
|
|
3
|
+
import * as DDL2 from "./ddl/v2.ts";
|
|
4
|
+
import { upgrade as dermatologyUpgrade } from "./dermatology.ts";
|
|
5
5
|
|
|
6
6
|
interface IDatasourceOutput {
|
|
7
7
|
datasource: DDL1.IAnyDatasource;
|
package/src/validate.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _Ajv from "ajv";
|
|
2
|
-
import * as DDL from "./ddl/v1";
|
|
3
|
-
import * as DDL2 from "./ddl/v2";
|
|
2
|
+
import * as DDL from "./ddl/v1.ts";
|
|
3
|
+
import * as DDL2 from "./ddl/v2.ts";
|
|
4
4
|
|
|
5
5
|
const Ajv = (_Ajv as any).default || _Ajv;
|
|
6
6
|
|
|
@@ -31,9 +31,8 @@ export function validate(ddl: DDL.DDLSchema) {
|
|
|
31
31
|
}
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
import * as _ddl2Schema from "../schema/v2.json";
|
|
34
|
+
import _ddl2Schema from "../schema/v2.json" with { type: "json" };
|
|
36
35
|
|
|
37
36
|
export function validate2(ddl: DDL2.Schema) {
|
|
38
|
-
return doValidate(ddl, _ddl2Schema);
|
|
37
|
+
return doValidate(ddl, _ddl2Schema as any);
|
|
39
38
|
}
|
package/types/__package__.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export declare const PKG_NAME = "@hpcc-js/ddl-shim";
|
|
2
|
-
export declare const PKG_VERSION = "
|
|
3
|
-
export declare const BUILD_VERSION = "2.
|
|
4
|
-
//# sourceMappingURL=__package__.d.ts.map
|
|
2
|
+
export declare const PKG_VERSION = "3.0.0";
|
|
3
|
+
export declare const BUILD_VERSION = "3.2.1";
|