@enervance/insight-cim-model 0.0.12 → 0.0.14

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.
Files changed (770) hide show
  1. package/dist/config/westnetz-integral7/integral7-load.config.js.map +1 -1
  2. package/dist/config/westnetz-neplan/neplan-load.config.js +6 -1
  3. package/dist/config/westnetz-neplan/neplan-load.config.js.map +1 -1
  4. package/dist/constants/cim-class-definition.js +19 -0
  5. package/dist/constants/cim-class-definition.js.map +1 -1
  6. package/dist/constants/cim-class-names.d.ts +10 -0
  7. package/dist/constants/cim-class-names.js +10 -0
  8. package/dist/constants/cim-class-names.js.map +1 -1
  9. package/dist/constants/init-data/ASSET_HEALTH_EVENTS.js +10 -0
  10. package/dist/constants/init-data/ASSET_HEALTH_EVENTS.js.map +1 -1
  11. package/dist/constants/init-data/PSR_TYPES.js +17 -0
  12. package/dist/constants/init-data/PSR_TYPES.js.map +1 -1
  13. package/dist/converter/cgmes-validator.d.ts +5 -0
  14. package/dist/converter/cgmes-validator.js +23 -0
  15. package/dist/converter/cgmes-validator.js.map +1 -0
  16. package/dist/converter/integral7/ConverterIntegral7.d.ts +26 -19
  17. package/dist/converter/integral7/ConverterIntegral7.js +595 -272
  18. package/dist/converter/integral7/ConverterIntegral7.js.map +1 -1
  19. package/dist/converter/integral7/model/integral/BaseClass.d.ts +1 -0
  20. package/dist/converter/integral7/model/integral/BaseClass.js.map +1 -1
  21. package/dist/converter/integral7/model/interfaces.d.ts +36 -0
  22. package/dist/converter/integral7/sql/integral.sql.d.ts +10 -0
  23. package/dist/converter/integral7/sql/integral.sql.js +25 -1
  24. package/dist/converter/integral7/sql/integral.sql.js.map +1 -1
  25. package/dist/converter/integral7/utils.d.ts +3 -0
  26. package/dist/converter/integral7/utils.js +81 -17
  27. package/dist/converter/integral7/utils.js.map +1 -1
  28. package/dist/etl-neplan/etl-neplan-csv.d.ts +37 -0
  29. package/dist/etl-neplan/etl-neplan-csv.js +243 -0
  30. package/dist/etl-neplan/etl-neplan-csv.js.map +1 -0
  31. package/dist/etl-neplan/etl-neplan-geo.d.ts +12 -0
  32. package/dist/etl-neplan/etl-neplan-geo.js +74 -0
  33. package/dist/etl-neplan/etl-neplan-geo.js.map +1 -0
  34. package/dist/etl-neplan/neplan-contingency-analysis.js +0 -20
  35. package/dist/etl-neplan/neplan-contingency-analysis.js.map +1 -1
  36. package/dist/index.d.ts +8 -0
  37. package/dist/index.js +16 -0
  38. package/dist/index.js.map +1 -1
  39. package/dist/interfaces/default-values-config.d.ts +171 -0
  40. package/dist/interfaces/default-values-config.js +3 -0
  41. package/dist/interfaces/default-values-config.js.map +1 -0
  42. package/dist/interfaces/model/common/ILocation.d.ts +15 -0
  43. package/dist/interfaces/model/common/ILocation.js +3 -0
  44. package/dist/interfaces/model/common/ILocation.js.map +1 -0
  45. package/dist/interfaces/model/core/IIdentifiedObject.d.ts +3 -0
  46. package/dist/interfaces/model/wires/IACLineSegment.d.ts +10 -0
  47. package/dist/interfaces/model/wires/IConductor.d.ts +2 -1
  48. package/dist/model/assets/Asset.d.ts +12 -5
  49. package/dist/model/assets/Asset.js +86 -21
  50. package/dist/model/assets/Asset.js.map +1 -1
  51. package/dist/model/assets/LifecycleDate.d.ts +1 -0
  52. package/dist/model/assets/LifecycleDate.js +9 -1
  53. package/dist/model/assets/LifecycleDate.js.map +1 -1
  54. package/dist/model/common/CoordinateSystem.d.ts +3 -1
  55. package/dist/model/common/CoordinateSystem.js +13 -1
  56. package/dist/model/common/CoordinateSystem.js.map +1 -1
  57. package/dist/model/common/Location.d.ts +5 -3
  58. package/dist/model/common/Location.js +17 -11
  59. package/dist/model/common/Location.js.map +1 -1
  60. package/dist/model/common/PositionPoint.d.ts +9 -3
  61. package/dist/model/common/PositionPoint.js +23 -1
  62. package/dist/model/common/PositionPoint.js.map +1 -1
  63. package/dist/model/common/Status.d.ts +2 -1
  64. package/dist/model/common/Status.js +9 -1
  65. package/dist/model/common/Status.js.map +1 -1
  66. package/dist/model/core/ACDCTerminal.d.ts +2 -0
  67. package/dist/model/core/ACDCTerminal.js +9 -1
  68. package/dist/model/core/ACDCTerminal.js.map +1 -1
  69. package/dist/model/core/BaseVoltage.js.map +1 -1
  70. package/dist/model/core/Bay.js.map +1 -1
  71. package/dist/model/core/GeographicalRegion.js.map +1 -1
  72. package/dist/model/core/IdentifiedObject.d.ts +3 -1
  73. package/dist/model/core/IdentifiedObject.js +42 -21
  74. package/dist/model/core/IdentifiedObject.js.map +1 -1
  75. package/dist/model/core/PowerSystemResource.js.map +1 -1
  76. package/dist/model/core/SubGeographicalRegion.js.map +1 -1
  77. package/dist/model/core/Substation.d.ts +1 -0
  78. package/dist/model/core/Substation.js +3 -2
  79. package/dist/model/core/Substation.js.map +1 -1
  80. package/dist/model/core/Terminal.d.ts +3 -1
  81. package/dist/model/core/Terminal.js +14 -14
  82. package/dist/model/core/Terminal.js.map +1 -1
  83. package/dist/model/core/VoltageLevel.js +4 -2
  84. package/dist/model/core/VoltageLevel.js.map +1 -1
  85. package/dist/model/dc/ACDCConverter.d.ts +3 -0
  86. package/dist/model/dc/ACDCConverter.js +56 -14
  87. package/dist/model/dc/ACDCConverter.js.map +1 -1
  88. package/dist/model/dc/ACDCConverterDCTerminal.js +2 -6
  89. package/dist/model/dc/ACDCConverterDCTerminal.js.map +1 -1
  90. package/dist/model/dc/CsConverter.d.ts +2 -0
  91. package/dist/model/dc/CsConverter.js +45 -17
  92. package/dist/model/dc/CsConverter.js.map +1 -1
  93. package/dist/model/dc/DCConverterUnit.d.ts +2 -0
  94. package/dist/model/dc/DCConverterUnit.js +13 -7
  95. package/dist/model/dc/DCConverterUnit.js.map +1 -1
  96. package/dist/model/dc/DCLine.js.map +1 -1
  97. package/dist/model/dc/DCLineSegment.js +4 -8
  98. package/dist/model/dc/DCLineSegment.js.map +1 -1
  99. package/dist/model/dc/VsConverter.d.ts +2 -0
  100. package/dist/model/dc/VsConverter.js +53 -5
  101. package/dist/model/dc/VsConverter.js.map +1 -1
  102. package/dist/model/equivalents/EquivalentBranch.d.ts +2 -0
  103. package/dist/model/equivalents/EquivalentBranch.js +63 -0
  104. package/dist/model/equivalents/EquivalentBranch.js.map +1 -1
  105. package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js +0 -3
  106. package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js.map +1 -1
  107. package/dist/model/extensions/enervance/wires/EVACLineSegment.d.ts +16 -0
  108. package/{src/model/wires/PetersenCoil.ts → dist/model/extensions/enervance/wires/EVACLineSegment.js} +43 -47
  109. package/dist/model/extensions/enervance/wires/EVACLineSegment.js.map +1 -0
  110. package/dist/model/extensions/enervance/wires/EVACLineSubSegment.d.ts +25 -0
  111. package/dist/model/extensions/enervance/wires/EVACLineSubSegment.js +126 -0
  112. package/dist/model/extensions/enervance/wires/EVACLineSubSegment.js.map +1 -0
  113. package/dist/model/extensions/neplan-westnetz/assets/WNFacility.js +4 -12
  114. package/dist/model/extensions/neplan-westnetz/assets/WNFacility.js.map +1 -1
  115. package/dist/model/extensions/neplan-westnetz/common/WNLocation.d.ts +18 -0
  116. package/dist/model/extensions/neplan-westnetz/common/WNLocation.js +82 -0
  117. package/dist/model/extensions/neplan-westnetz/common/WNLocation.js.map +1 -0
  118. package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.d.ts +5 -0
  119. package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.js +23 -0
  120. package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.js.map +1 -1
  121. package/dist/model/generation/GeneratingUnit.d.ts +2 -0
  122. package/dist/model/generation/GeneratingUnit.js +23 -0
  123. package/dist/model/generation/GeneratingUnit.js.map +1 -1
  124. package/dist/model/generation/ThermalGeneratingUnit.js.map +1 -1
  125. package/dist/model/loadmodel/ConformLoad.d.ts +6 -1
  126. package/dist/model/loadmodel/ConformLoad.js +48 -3
  127. package/dist/model/loadmodel/ConformLoad.js.map +1 -1
  128. package/dist/model/loadmodel/ConformLoadGroup.d.ts +7 -0
  129. package/dist/model/loadmodel/ConformLoadGroup.js +48 -0
  130. package/dist/model/loadmodel/ConformLoadGroup.js.map +1 -0
  131. package/dist/model/loadmodel/EnergyArea.d.ts +3 -0
  132. package/dist/model/loadmodel/EnergyArea.js +8 -0
  133. package/dist/model/loadmodel/EnergyArea.js.map +1 -0
  134. package/dist/model/loadmodel/LoadArea.d.ts +10 -0
  135. package/dist/model/loadmodel/LoadArea.js +51 -0
  136. package/dist/model/loadmodel/LoadArea.js.map +1 -0
  137. package/dist/model/loadmodel/LoadGroup.d.ts +8 -0
  138. package/dist/model/loadmodel/LoadGroup.js +21 -0
  139. package/dist/model/loadmodel/LoadGroup.js.map +1 -0
  140. package/dist/model/loadmodel/SubLoadArea.d.ts +14 -0
  141. package/dist/model/loadmodel/SubLoadArea.js +63 -0
  142. package/dist/model/loadmodel/SubLoadArea.js.map +1 -0
  143. package/dist/model/model/Model.d.ts +40 -11
  144. package/dist/model/model/Model.js +100 -6
  145. package/dist/model/model/Model.js.map +1 -1
  146. package/dist/model/operationallimits/CurrentLimit.js.map +1 -1
  147. package/dist/model/operationallimits/OperationalLimitSet.js.map +1 -1
  148. package/dist/model/wires/ACLineSegment.d.ts +6 -2
  149. package/dist/model/wires/ACLineSegment.js +51 -44
  150. package/dist/model/wires/ACLineSegment.js.map +1 -1
  151. package/dist/model/wires/AsynchronousMachine.d.ts +2 -1
  152. package/dist/model/wires/AsynchronousMachine.js +34 -34
  153. package/dist/model/wires/AsynchronousMachine.js.map +1 -1
  154. package/dist/model/wires/BusbarSection.d.ts +2 -0
  155. package/dist/model/wires/BusbarSection.js +6 -0
  156. package/dist/model/wires/BusbarSection.js.map +1 -1
  157. package/dist/model/wires/Conductor.d.ts +4 -1
  158. package/dist/model/wires/Conductor.js +15 -6
  159. package/dist/model/wires/Conductor.js.map +1 -1
  160. package/dist/model/wires/EnergyConsumer.d.ts +6 -2
  161. package/dist/model/wires/EnergyConsumer.js +24 -3
  162. package/dist/model/wires/EnergyConsumer.js.map +1 -1
  163. package/dist/model/wires/EnergySource.d.ts +8 -4
  164. package/dist/model/wires/EnergySource.js +37 -21
  165. package/dist/model/wires/EnergySource.js.map +1 -1
  166. package/dist/model/wires/ExternalNetworkInjection.d.ts +2 -0
  167. package/dist/model/wires/ExternalNetworkInjection.js +81 -1
  168. package/dist/model/wires/ExternalNetworkInjection.js.map +1 -1
  169. package/dist/model/wires/Line.js.map +1 -1
  170. package/dist/model/wires/LinearShuntCompensator.d.ts +15 -0
  171. package/dist/model/wires/LinearShuntCompensator.js +96 -0
  172. package/dist/model/wires/LinearShuntCompensator.js.map +1 -0
  173. package/dist/model/wires/PowerTransformer.js +0 -3
  174. package/dist/model/wires/PowerTransformer.js.map +1 -1
  175. package/dist/model/wires/PowerTransformerEnd.js.map +1 -1
  176. package/dist/model/wires/RatioTapChanger.js.map +1 -1
  177. package/dist/model/wires/RatioTapChangerTable.js.map +1 -1
  178. package/dist/model/wires/RegulatingCondEq.d.ts +3 -0
  179. package/dist/model/wires/RegulatingCondEq.js +17 -6
  180. package/dist/model/wires/RegulatingCondEq.js.map +1 -1
  181. package/dist/model/wires/RegulatingControl.d.ts +2 -0
  182. package/dist/model/wires/RegulatingControl.js +43 -7
  183. package/dist/model/wires/RegulatingControl.js.map +1 -1
  184. package/dist/model/wires/RotatingMachine.d.ts +2 -0
  185. package/dist/model/wires/RotatingMachine.js +17 -0
  186. package/dist/model/wires/RotatingMachine.js.map +1 -1
  187. package/dist/model/wires/SeriesCompensator.d.ts +2 -1
  188. package/dist/model/wires/SeriesCompensator.js +42 -42
  189. package/dist/model/wires/SeriesCompensator.js.map +1 -1
  190. package/dist/model/wires/ShuntCompensator.d.ts +17 -0
  191. package/dist/model/wires/ShuntCompensator.js +50 -0
  192. package/dist/model/wires/ShuntCompensator.js.map +1 -0
  193. package/dist/model/wires/SynchronousMachine.d.ts +2 -0
  194. package/dist/model/wires/SynchronousMachine.js +70 -5
  195. package/dist/model/wires/SynchronousMachine.js.map +1 -1
  196. package/dist/model/wires/TapChangerControl.js.map +1 -1
  197. package/dist/util/utils.d.ts +8 -1
  198. package/dist/util/utils.js +13 -38
  199. package/dist/util/utils.js.map +1 -1
  200. package/dist/util/xml/xml.serializer.d.ts +3 -1
  201. package/dist/util/xml/xml.serializer.js +46 -45
  202. package/dist/util/xml/xml.serializer.js.map +1 -1
  203. package/package.json +4 -1
  204. package/.nycrc +0 -28
  205. package/jasmine/jasmine_all.json +0 -13
  206. package/jasmine/jasmine_fuseki_interface.json +0 -13
  207. package/jasmine/jasmine_fuseki_psdm.json +0 -13
  208. package/jasmine/jasmine_integral_7.json +0 -13
  209. package/jasmine/jasmine_psdm.json +0 -13
  210. package/src/config/lew-sincal/lew-sincal-load.config.ts +0 -58
  211. package/src/config/power-system-datamodel/psdm-load.config.ts +0 -57
  212. package/src/config/westnetz-integral7/integral7-load.config.ts +0 -53
  213. package/src/config/westnetz-neplan/callbacks/cb-connectivitynode.ts +0 -159
  214. package/src/config/westnetz-neplan/callbacks/cb-psr.ts +0 -30
  215. package/src/config/westnetz-neplan/callbacks/cb-wnenergyconsumer.ts +0 -70
  216. package/src/config/westnetz-neplan/neplan-load.config.ts +0 -131
  217. package/src/config/westnetz-neplan/property-handler-westenergy.config.ts +0 -52
  218. package/src/constants/cim-class-definition.ts +0 -169
  219. package/src/constants/cim-class-names.ts +0 -118
  220. package/src/constants/cim-constants.ts +0 -5
  221. package/src/constants/init-data/ASSET_HEALTH_EVENTS.ts +0 -45
  222. package/src/constants/init-data/ASSSET_OWNER.ts +0 -11
  223. package/src/constants/init-data/JENA_SPARQL.ts +0 -328
  224. package/src/constants/init-data/PSR_TYPES.ts +0 -75
  225. package/src/constants/init-data/xml/AssetHealtEvent.xml +0 -45
  226. package/src/constants/init-data/xml/AssetOwner.xml +0 -11
  227. package/src/constants/init-data/xml/PsrType.xml +0 -80
  228. package/src/constants/rdf-xml.ts +0 -52
  229. package/src/converter/PSDM/ConverterPowerSystemDataModel.ts +0 -546
  230. package/src/converter/PSDM/model/FixedFeedIn.ts +0 -28
  231. package/src/converter/PSDM/model/Line.ts +0 -39
  232. package/src/converter/PSDM/model/LineType.ts +0 -29
  233. package/src/converter/PSDM/model/Load.ts +0 -38
  234. package/src/converter/PSDM/model/Node.ts +0 -16
  235. package/src/converter/PSDM/model/TimeSeriesMapping.ts +0 -13
  236. package/src/converter/PSDM/model/Transformer.ts +0 -34
  237. package/src/converter/PSDM/model/TransformerType.ts +0 -49
  238. package/src/converter/PSDM/model/geo/Crs.ts +0 -4
  239. package/src/converter/PSDM/model/geo/GeoPosition.ts +0 -7
  240. package/src/converter/integral7/ConverterIntegral7.ts +0 -3916
  241. package/src/converter/integral7/config/db-config.ts +0 -13
  242. package/src/converter/integral7/config/generation-unit-fuel-types.ts +0 -51
  243. package/src/converter/integral7/config/integral-prefix.ts +0 -20
  244. package/src/converter/integral7/model/integral/BaseClass.ts +0 -28
  245. package/src/converter/integral7/model/integral/BaseClassNsg.ts +0 -21
  246. package/src/converter/integral7/model/integral/Hgueleitung.ts +0 -12
  247. package/src/converter/integral7/model/integral/KnotenSo.ts +0 -41
  248. package/src/converter/integral7/model/integral/KnotenSoNsg.ts +0 -24
  249. package/src/converter/integral7/model/integral/Kopfstation.ts +0 -46
  250. package/src/converter/integral7/model/integral/Leitung.ts +0 -73
  251. package/src/converter/integral7/model/integral/LeitungNsg.ts +0 -46
  252. package/src/converter/integral7/model/integral/Point.ts +0 -14
  253. package/src/converter/integral7/model/integral/Schaltanlage.ts +0 -151
  254. package/src/converter/integral7/model/integral/SchaltanlageNSG.ts +0 -30
  255. package/src/converter/integral7/model/integral/Schaltanlagenabschnitt.ts +0 -44
  256. package/src/converter/integral7/model/integral/SchaltanlagenabschnittNsg.ts +0 -27
  257. package/src/converter/integral7/model/integral/Schaltfeld.ts +0 -116
  258. package/src/converter/integral7/model/integral/SchaltfeldNsg.ts +0 -35
  259. package/src/converter/integral7/model/integral/Standort.ts +0 -53
  260. package/src/converter/integral7/model/integral/StandortNsg.ts +0 -24
  261. package/src/converter/integral7/model/integral/Trafo2w.ts +0 -22
  262. package/src/converter/integral7/model/integral/Trafo2wNsg.ts +0 -13
  263. package/src/converter/integral7/model/interfaces.ts +0 -450
  264. package/src/converter/integral7/sql/integral.sql.ts +0 -345
  265. package/src/converter/integral7/utils-schema.ts +0 -50
  266. package/src/converter/integral7/utils-trafo3w.ts +0 -321
  267. package/src/converter/integral7/utils.ts +0 -693
  268. package/src/etl-neplan/etl-neplan-contingency-analysis.ts +0 -188
  269. package/src/etl-neplan/etl-neplan-feederline.ts +0 -229
  270. package/src/etl-neplan/etl-neplan.ts +0 -344
  271. package/src/etl-neplan/neplan-contingency-analysis.ts +0 -571
  272. package/src/graph/Types.ts +0 -7
  273. package/src/graph/connections/connection.ts +0 -29
  274. package/src/graph/edges/edge.ts +0 -27
  275. package/src/graph/graph-interfaces.ts +0 -21
  276. package/src/graph/graph-util.ts +0 -158
  277. package/src/graph/graph.ts +0 -84
  278. package/src/graph/nodes/node.ts +0 -43
  279. package/src/index.ts +0 -307
  280. package/src/interfaces/model/assets/IAsset.ts +0 -5
  281. package/src/interfaces/model/assets/IAssetContainer.ts +0 -5
  282. package/src/interfaces/model/assets/IFacility.ts +0 -5
  283. package/src/interfaces/model/common/IDocument.ts +0 -5
  284. package/src/interfaces/model/core/IACDCTerminal.ts +0 -8
  285. package/src/interfaces/model/core/IBaseVoltage.ts +0 -7
  286. package/src/interfaces/model/core/IConductingEquipment.ts +0 -16
  287. package/src/interfaces/model/core/IConnectivityNode.ts +0 -27
  288. package/src/interfaces/model/core/IConnectivityNodeContainer.ts +0 -11
  289. package/src/interfaces/model/core/IEquipment.ts +0 -11
  290. package/src/interfaces/model/core/IEquipmentContainer.ts +0 -12
  291. package/src/interfaces/model/core/IFeeder.ts +0 -21
  292. package/src/interfaces/model/core/IIdentifiedObject.ts +0 -108
  293. package/src/interfaces/model/core/IPowerSystemResource.ts +0 -3
  294. package/src/interfaces/model/core/ISubstation.ts +0 -8
  295. package/src/interfaces/model/core/ITerminal.ts +0 -57
  296. package/src/interfaces/model/core/IVoltageLevel.ts +0 -14
  297. package/src/interfaces/model/diagram/IDiagram.ts +0 -21
  298. package/src/interfaces/model/diagram/IDiagramObject.ts +0 -21
  299. package/src/interfaces/model/diagram/IDiagramObjectPoint.ts +0 -16
  300. package/src/interfaces/model/domain/IActivePower.ts +0 -3
  301. package/src/interfaces/model/domain/IAngleDegrees.ts +0 -3
  302. package/src/interfaces/model/domain/IApparentPower.ts +0 -3
  303. package/src/interfaces/model/domain/ICurrentFlow.ts +0 -3
  304. package/src/interfaces/model/domain/IDataType.ts +0 -9
  305. package/src/interfaces/model/domain/IReactivePower.ts +0 -3
  306. package/src/interfaces/model/domain/IVoltage.ts +0 -3
  307. package/src/interfaces/model/domain/UnitMultiplier.ts +0 -13
  308. package/src/interfaces/model/domain/UnitSymbol.ts +0 -30
  309. package/src/interfaces/model/enums/EnumShapeInfo.ts +0 -5
  310. package/src/interfaces/model/faults/IFault.ts +0 -11
  311. package/src/interfaces/model/model/IModel.ts +0 -91
  312. package/src/interfaces/model/operations/IOutage.ts +0 -23
  313. package/src/interfaces/model/operations/ISwitchingAction.ts +0 -9
  314. package/src/interfaces/model/operations/ISwitchingPlan.ts +0 -26
  315. package/src/interfaces/model/statevariables/ISvPowerFlow.ts +0 -20
  316. package/src/interfaces/model/statevariables/ISvVoltage.ts +0 -16
  317. package/src/interfaces/model/topology/ITopologicalIsland.ts +0 -11
  318. package/src/interfaces/model/topology/ITopologicalNode.ts +0 -24
  319. package/src/interfaces/model/wires/IACLineSegment.ts +0 -4
  320. package/src/interfaces/model/wires/IBusbarSection.ts +0 -4
  321. package/src/interfaces/model/wires/ICompositeSwitch.ts +0 -6
  322. package/src/interfaces/model/wires/IConductor.ts +0 -6
  323. package/src/interfaces/model/wires/IConnector.ts +0 -5
  324. package/src/interfaces/model/wires/IDisconnector.ts +0 -4
  325. package/src/interfaces/model/wires/IEnergyConsumer.ts +0 -7
  326. package/src/interfaces/model/wires/IEnergySource.ts +0 -20
  327. package/src/interfaces/model/wires/IExternalNetworkInjection.ts +0 -34
  328. package/src/interfaces/model/wires/ILoadBreakSwitch.ts +0 -4
  329. package/src/interfaces/model/wires/IPowerTransformer.ts +0 -7
  330. package/src/interfaces/model/wires/IPowerTransformerEnd.ts +0 -10
  331. package/src/interfaces/model/wires/IProtectedSwitch.ts +0 -4
  332. package/src/interfaces/model/wires/IRegulatingCondEq.ts +0 -4
  333. package/src/interfaces/model/wires/ISwitch.ts +0 -11
  334. package/src/interfaces/model/wires/ITransformerEnd.ts +0 -14
  335. package/src/interfaces/observable/IObservable.ts +0 -6
  336. package/src/interfaces/observable/IObserver.ts +0 -3
  337. package/src/interfaces/persistence-interfaces.ts +0 -12
  338. package/src/interfaces/schema-settings/ShapeInfos.ts +0 -28
  339. package/src/model/assetinfo/AssetInfo.ts +0 -13
  340. package/src/model/assetinfo/CableInfo.ts +0 -8
  341. package/src/model/assetinfo/OverheadWireInfo.ts +0 -8
  342. package/src/model/assetinfo/PowerTransformer2WInfo.ts +0 -13
  343. package/src/model/assetinfo/PowerTransformer3WInfo.ts +0 -18
  344. package/src/model/assetinfo/PowerTransformerInfo.ts +0 -14
  345. package/src/model/assetinfo/TapChangerInfo.ts +0 -60
  346. package/src/model/assetinfo/TransformerEndInfo.ts +0 -38
  347. package/src/model/assetinfo/WireInfo.ts +0 -22
  348. package/src/model/assets/AggregateScore.ts +0 -9
  349. package/src/model/assets/AnalyticScore.ts +0 -41
  350. package/src/model/assets/Asset.ts +0 -164
  351. package/src/model/assets/AssetContainer.ts +0 -11
  352. package/src/model/assets/AssetDeployment.ts +0 -122
  353. package/src/model/assets/AssetHealthEvent.ts +0 -73
  354. package/src/model/assets/AssetOrganisationRole.ts +0 -51
  355. package/src/model/assets/AssetOwner.ts +0 -54
  356. package/src/model/assets/DeploymentDate.ts +0 -20
  357. package/src/model/assets/DeploymentStateKind.ts +0 -7
  358. package/src/model/assets/Facility.ts +0 -107
  359. package/src/model/assets/FacilityKind.ts +0 -9
  360. package/src/model/assets/HealthScore.ts +0 -59
  361. package/src/model/assets/LifecycleDate.ts +0 -17
  362. package/src/model/assets/RiskScore.ts +0 -7
  363. package/src/model/assets/TransformerApplicationKind.ts +0 -6
  364. package/src/model/common/ActivityRecord.ts +0 -93
  365. package/src/model/common/CoordinateSystem.ts +0 -81
  366. package/src/model/common/Document.ts +0 -9
  367. package/src/model/common/Location.ts +0 -237
  368. package/src/model/common/OrganisationRole.ts +0 -7
  369. package/src/model/common/PositionPoint.ts +0 -121
  370. package/src/model/common/Status.ts +0 -11
  371. package/src/model/core/ACDCTerminal.ts +0 -63
  372. package/src/model/core/BaseVoltage.ts +0 -129
  373. package/src/model/core/Bay.ts +0 -178
  374. package/src/model/core/ConductingEquipment.ts +0 -182
  375. package/src/model/core/ConnectivityNode.ts +0 -417
  376. package/src/model/core/ConnectivityNodeContainer.ts +0 -26
  377. package/src/model/core/Curve.ts +0 -55
  378. package/src/model/core/CurveData.ts +0 -74
  379. package/src/model/core/CurveStyle.ts +0 -4
  380. package/src/model/core/Equipment.ts +0 -184
  381. package/src/model/core/EquipmentContainer.ts +0 -40
  382. package/src/model/core/Feeder.ts +0 -186
  383. package/src/model/core/GeographicalRegion.ts +0 -34
  384. package/src/model/core/IdentifiedObject.ts +0 -393
  385. package/src/model/core/PSRType.ts +0 -164
  386. package/src/model/core/PhaseCode.ts +0 -23
  387. package/src/model/core/PowerSystemResource.ts +0 -109
  388. package/src/model/core/SubGeographicalRegion.ts +0 -58
  389. package/src/model/core/Substation.ts +0 -290
  390. package/src/model/core/Terminal.ts +0 -422
  391. package/src/model/core/VoltageLevel.ts +0 -192
  392. package/src/model/dc/ACDCConverter.ts +0 -66
  393. package/src/model/dc/ACDCConverterDCTerminal.ts +0 -64
  394. package/src/model/dc/CsConverter.ts +0 -68
  395. package/src/model/dc/CsOperatingModeKind.ts +0 -4
  396. package/src/model/dc/CsPpccControlKind.ts +0 -5
  397. package/src/model/dc/DCBaseTerminal.ts +0 -30
  398. package/src/model/dc/DCConductingEquipment.ts +0 -8
  399. package/src/model/dc/DCConverterOperatingModeKind.ts +0 -6
  400. package/src/model/dc/DCConverterUnit.ts +0 -60
  401. package/src/model/dc/DCEquipmentContainer.ts +0 -8
  402. package/src/model/dc/DCLine.ts +0 -56
  403. package/src/model/dc/DCLineSegment.ts +0 -81
  404. package/src/model/dc/DCNode.ts +0 -49
  405. package/src/model/dc/DCPolarityKind.ts +0 -5
  406. package/src/model/dc/DCTerminal.ts +0 -45
  407. package/src/model/dc/VsConverter.ts +0 -48
  408. package/src/model/dc/VsPpccControlKind.ts +0 -7
  409. package/src/model/dc/VsQpccControlKind.ts +0 -5
  410. package/src/model/diagram/Diagram.ts +0 -136
  411. package/src/model/diagram/DiagramObject.ts +0 -338
  412. package/src/model/diagram/DiagramObjectPoint.ts +0 -196
  413. package/src/model/diagram/DiagramStyle.ts +0 -32
  414. package/src/model/diagram/OrientationKind.ts +0 -4
  415. package/src/model/domain/ActivePower.ts +0 -14
  416. package/src/model/domain/AngleDegrees.ts +0 -14
  417. package/src/model/domain/ApparentPower.ts +0 -14
  418. package/src/model/domain/Capacitance.ts +0 -15
  419. package/src/model/domain/CapacitancePerLength.ts +0 -15
  420. package/src/model/domain/ConductancePerLength.ts +0 -14
  421. package/src/model/domain/CurrentFlow.ts +0 -14
  422. package/src/model/domain/Reactance.ts +0 -15
  423. package/src/model/domain/ReactancePerLength.ts +0 -14
  424. package/src/model/domain/ReactivePower.ts +0 -14
  425. package/src/model/domain/Resistance.ts +0 -14
  426. package/src/model/domain/ResistancePerLength.ts +0 -14
  427. package/src/model/domain/UnitMultiplier.ts +0 -13
  428. package/src/model/domain/UnitSymbol.ts +0 -30
  429. package/src/model/domain/Voltage.ts +0 -14
  430. package/src/model/equivalents/EquivalentBranch.ts +0 -203
  431. package/src/model/equivalents/EquivalentEquipment.ts +0 -8
  432. package/src/model/extensions/amprion/core/AMPRIONBay.ts +0 -106
  433. package/src/model/extensions/amprion/core/AMPRIONConnectivityNode.ts +0 -51
  434. package/src/model/extensions/amprion/model/AmprionModel.ts +0 -92
  435. package/src/model/extensions/amprion/project/AMPRIONConstructionProject.ts +0 -174
  436. package/src/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.ts +0 -89
  437. package/src/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.ts +0 -64
  438. package/src/model/extensions/amprion/project/AMPRIONErpProject.ts +0 -21
  439. package/src/model/extensions/amprion/project/AMPRIONErpProjectPhase.ts +0 -89
  440. package/src/model/extensions/amprion/project/AMPRIONErpProjectStructure.ts +0 -36
  441. package/src/model/extensions/amprion/project/AMPRIONProjectPriorityKind.ts +0 -5
  442. package/src/model/extensions/amprion/wires/AMPRIONSeriesCompensator.ts +0 -53
  443. package/src/model/extensions/enervance/assets/EVImportanceScore.ts +0 -58
  444. package/src/model/extensions/enervance/core/EVTerminal.ts +0 -63
  445. package/src/model/extensions/enervance/operations/EVTerminalAction.ts +0 -144
  446. package/src/model/extensions/neplan-westnetz/assets/WNFacility.ts +0 -121
  447. package/src/model/extensions/neplan-westnetz/core/WNConnectivityNode.ts +0 -344
  448. package/src/model/extensions/neplan-westnetz/core/WNFeeder.ts +0 -133
  449. package/src/model/extensions/neplan-westnetz/faults/WNFaultConnectivityNode.ts +0 -113
  450. package/src/model/extensions/neplan-westnetz/operations/WNOutage.ts +0 -111
  451. package/src/model/extensions/neplan-westnetz/wires/WNEnergyConsumer.ts +0 -451
  452. package/src/model/faults/EquipmentFault.ts +0 -9
  453. package/src/model/faults/Fault.ts +0 -41
  454. package/src/model/faults/LineFault.ts +0 -10
  455. package/src/model/generation/FossilFuel.ts +0 -53
  456. package/src/model/generation/FuelType.ts +0 -8
  457. package/src/model/generation/GeneratingUnit.ts +0 -157
  458. package/src/model/generation/GeneratorControlSource.ts +0 -6
  459. package/src/model/generation/HydroEnergyConversionKind.ts +0 -4
  460. package/src/model/generation/HydroGeneratingUnit.ts +0 -14
  461. package/src/model/generation/HydroPlantStorageKind.ts +0 -5
  462. package/src/model/generation/HydroPowerPlant.ts +0 -13
  463. package/src/model/generation/HydroPump.ts +0 -13
  464. package/src/model/generation/NuclearGeneratingUnit.ts +0 -8
  465. package/src/model/generation/SolarGeneratingUnit.ts +0 -8
  466. package/src/model/generation/ThermalGeneratingUnit.ts +0 -42
  467. package/src/model/generation/WindGenUnitKind.ts +0 -4
  468. package/src/model/generation/WindGeneratingUnit.ts +0 -84
  469. package/src/model/loadmodel/ConformLoad.ts +0 -34
  470. package/src/model/model/Model.ts +0 -1253
  471. package/src/model/operationallimits/CurrentLimit.ts +0 -92
  472. package/src/model/operationallimits/ENTSOEOperationalLimitType.ts +0 -5
  473. package/src/model/operationallimits/LimitTypeKind.ts +0 -9
  474. package/src/model/operationallimits/OperationalLimit.ts +0 -68
  475. package/src/model/operationallimits/OperationalLimitDirectionKind.ts +0 -5
  476. package/src/model/operationallimits/OperationalLimitSet.ts +0 -124
  477. package/src/model/operationallimits/OperationalLimitType.ts +0 -94
  478. package/src/model/operations/Outage.ts +0 -68
  479. package/src/model/operations/SwitchAction.ts +0 -121
  480. package/src/model/operations/SwitchActionKind.ts +0 -6
  481. package/src/model/operations/SwitchingAction.ts +0 -43
  482. package/src/model/operations/SwitchingPlan.ts +0 -141
  483. package/src/model/operations/UnplannedOutage.ts +0 -9
  484. package/src/model/statevariables/StateVariable.ts +0 -28
  485. package/src/model/statevariables/SvPowerFlow.ts +0 -75
  486. package/src/model/statevariables/SvStatus.ts +0 -51
  487. package/src/model/statevariables/SvTapStep.ts +0 -54
  488. package/src/model/statevariables/SvVoltage.ts +0 -74
  489. package/src/model/topology/TopologicalIsland.ts +0 -57
  490. package/src/model/topology/TopologicalNode.ts +0 -203
  491. package/src/model/wires/ACLineSegment.ts +0 -309
  492. package/src/model/wires/AsynchronousMachine.ts +0 -93
  493. package/src/model/wires/AsynchronousMachineKind.ts +0 -5
  494. package/src/model/wires/Breaker.ts +0 -82
  495. package/src/model/wires/BusbarSection.ts +0 -70
  496. package/src/model/wires/Clamp.ts +0 -33
  497. package/src/model/wires/CompositeSwitch.ts +0 -13
  498. package/src/model/wires/Conductor.ts +0 -55
  499. package/src/model/wires/Connector.ts +0 -16
  500. package/src/model/wires/Cut.ts +0 -7
  501. package/src/model/wires/Disconnector.ts +0 -120
  502. package/src/model/wires/EarthFaultCompensator.ts +0 -20
  503. package/src/model/wires/EnergyConsumer.ts +0 -255
  504. package/src/model/wires/EnergySource.ts +0 -337
  505. package/src/model/wires/ExternalNetworkInjection.ts +0 -276
  506. package/src/model/wires/Ground.ts +0 -40
  507. package/src/model/wires/GroundDisconnector.ts +0 -39
  508. package/src/model/wires/Jumper.ts +0 -8
  509. package/src/model/wires/Junction.ts +0 -57
  510. package/src/model/wires/Line.ts +0 -117
  511. package/src/model/wires/LoadBreakSwitch.ts +0 -107
  512. package/src/model/wires/PetersenCoilModeKind.ts +0 -5
  513. package/src/model/wires/Plant.ts +0 -12
  514. package/src/model/wires/PowerTransformer.ts +0 -231
  515. package/src/model/wires/PowerTransformerEnd.ts +0 -168
  516. package/src/model/wires/ProtectedSwitch.ts +0 -9
  517. package/src/model/wires/RatioTapChanger.ts +0 -96
  518. package/src/model/wires/RatioTapChangerTable.ts +0 -35
  519. package/src/model/wires/RatioTapChangerTablePoint.ts +0 -45
  520. package/src/model/wires/ReactiveCapabilityCurve.ts +0 -35
  521. package/src/model/wires/Recloser.ts +0 -32
  522. package/src/model/wires/RegulatingCondEq.ts +0 -67
  523. package/src/model/wires/RegulatingControl.ts +0 -217
  524. package/src/model/wires/RegulatingControlModeKind.ts +0 -11
  525. package/src/model/wires/RotatingMachine.ts +0 -172
  526. package/src/model/wires/SeriesCompensator.ts +0 -166
  527. package/src/model/wires/ShortCircuitRotorKind.ts +0 -6
  528. package/src/model/wires/Switch.ts +0 -230
  529. package/src/model/wires/SynchronousMachine.ts +0 -267
  530. package/src/model/wires/SynchronousMachineKind.ts +0 -9
  531. package/src/model/wires/SynchronousMachineOperatingMode.ts +0 -5
  532. package/src/model/wires/TapChanger.ts +0 -55
  533. package/src/model/wires/TapChangerControl.ts +0 -32
  534. package/src/model/wires/TapChangerTablePoint.ts +0 -41
  535. package/src/model/wires/TransformerControlMode.ts +0 -4
  536. package/src/model/wires/TransformerEnd.ts +0 -143
  537. package/src/model/wires/WindingConnection.ts +0 -9
  538. package/src/package.json +0 -16
  539. package/src/util/datatype-converter.ts +0 -48
  540. package/src/util/sparql/sparql-building-block.ts +0 -43
  541. package/src/util/sparql/sparql-utils.ts +0 -150
  542. package/src/util/util-create.ts +0 -148
  543. package/src/util/util-search.ts +0 -40
  544. package/src/util/util-topology.ts +0 -175
  545. package/src/util/utils.ts +0 -255
  546. package/src/util/xml/utils.parser.ts +0 -29
  547. package/src/util/xml/xml.parser.ts +0 -107
  548. package/src/util/xml/xml.serializer.ts +0 -245
  549. package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-1.tests.sp-ec.ts +0 -838
  550. package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-2.tests.sp-ec.ts +0 -216
  551. package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-katarina-ruhrau.tests.spec.ts +0 -223
  552. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/LICENSE +0 -617
  553. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/NOTICE +0 -216
  554. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/README +0 -62
  555. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-delete +0 -725
  556. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-get +0 -725
  557. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-head +0 -725
  558. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-post +0 -725
  559. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-put +0 -725
  560. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-query +0 -725
  561. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-update +0 -725
  562. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-update-form +0 -725
  563. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/soh +0 -725
  564. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki +0 -512
  565. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-backup +0 -34
  566. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-server +0 -95
  567. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-server.bat +0 -28
  568. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-server.jar +0 -0
  569. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki.service +0 -59
  570. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki.war +0 -0
  571. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/config.ttl +0 -30
  572. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/configuration/test.ttl +0 -50
  573. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/shiro.ini +0 -38
  574. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GOSP.dat +0 -0
  575. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GOSP.idn +0 -0
  576. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GPOS.dat +0 -0
  577. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GPOS.idn +0 -0
  578. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GSPO.dat +0 -0
  579. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GSPO.idn +0 -0
  580. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSP.dat +0 -0
  581. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSP.idn +0 -0
  582. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSPG.dat +0 -0
  583. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSPG.idn +0 -0
  584. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POS.dat +0 -0
  585. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POS.idn +0 -0
  586. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POSG.dat +0 -0
  587. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POSG.idn +0 -0
  588. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPO.dat +0 -0
  589. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPO.idn +0 -0
  590. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPOG.dat +0 -0
  591. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPOG.idn +0 -0
  592. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/journal.jrnl +0 -0
  593. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/node2id.dat +0 -0
  594. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/node2id.idn +0 -0
  595. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/nodes.dat +0 -0
  596. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefix2id.dat +0 -0
  597. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefix2id.idn +0 -0
  598. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefixIdx.dat +0 -0
  599. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefixIdx.idn +0 -0
  600. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefixes.dat +0 -0
  601. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/tdb.cfg +0 -32
  602. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-mem +0 -27
  603. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-service +0 -23
  604. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb +0 -31
  605. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb-dir +0 -30
  606. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb-mem +0 -30
  607. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb2 +0 -31
  608. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb2-dir +0 -30
  609. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb2-mem +0 -30
  610. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/WEB-INF/web.xml +0 -332
  611. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/admin-logs.html +0 -73
  612. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap-select.min.css +0 -7
  613. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap-theme.css.map +0 -1
  614. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap-theme.min.css +0 -7
  615. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap.css.map +0 -1
  616. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap.min.css +0 -7
  617. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/codemirror.css +0 -301
  618. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/codemirror.min.css +0 -1
  619. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/font-awesome.min.css +0 -4
  620. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/fui.css +0 -191
  621. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.dataTables.css +0 -220
  622. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload-noscript.css +0 -22
  623. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload-ui-noscript.css +0 -17
  624. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload-ui.css +0 -57
  625. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload.css +0 -36
  626. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/pivot.min.css +0 -1
  627. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/qonsole.css +0 -172
  628. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/yasqe.min.css +0 -1
  629. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/yasr.min.css +0 -1
  630. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/dataset.html +0 -247
  631. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/documentation.html +0 -83
  632. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/FontAwesome.otf +0 -0
  633. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.eot +0 -0
  634. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.svg +0 -504
  635. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.ttf +0 -0
  636. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.woff +0 -0
  637. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.eot +0 -0
  638. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.svg +0 -229
  639. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.ttf +0 -0
  640. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.woff +0 -0
  641. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/back_disabled.png +0 -0
  642. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/back_enabled.png +0 -0
  643. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/back_enabled_hover.png +0 -0
  644. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/favicon.ico +0 -0
  645. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/forward_disabled.png +0 -0
  646. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/forward_enabled.png +0 -0
  647. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/forward_enabled_hover.png +0 -0
  648. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/jena-logo-notext-small.png +0 -0
  649. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_asc.png +0 -0
  650. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_asc_disabled.png +0 -0
  651. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_both.png +0 -0
  652. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_desc.png +0 -0
  653. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_desc_disabled.png +0 -0
  654. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/wait30.gif +0 -0
  655. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/index.html +0 -101
  656. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/dataset-controller.js +0 -69
  657. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/index-controller.js +0 -50
  658. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/manage-controller.js +0 -39
  659. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/query-controller.js +0 -72
  660. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/upload-controller.js +0 -42
  661. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/validation-controller.js +0 -38
  662. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/fui.js +0 -33
  663. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.dataset.js +0 -31
  664. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.index.js +0 -24
  665. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.manage.js +0 -27
  666. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.validation.js +0 -24
  667. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/dataset-stats.js +0 -102
  668. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/dataset.js +0 -262
  669. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/fuseki-server.js +0 -180
  670. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/task.js +0 -105
  671. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/validation-options.js +0 -85
  672. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/qonsole-config.js +0 -27
  673. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/services/ping-service.js +0 -54
  674. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/services/validation-service.js +0 -98
  675. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-edit.tpl +0 -58
  676. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-info.tpl +0 -40
  677. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-management.tpl +0 -62
  678. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-selection-list.tpl +0 -22
  679. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-selector.tpl +0 -15
  680. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-simple-create.tpl +0 -85
  681. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-stats.tpl +0 -14
  682. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/file-upload.tpl +0 -46
  683. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/uploadable-file.tpl +0 -23
  684. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/util/page-utils.js +0 -33
  685. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-edit.js +0 -205
  686. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-info.js +0 -76
  687. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-management.js +0 -173
  688. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-selection-list.js +0 -58
  689. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-selector.js +0 -84
  690. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-simple-create.js +0 -102
  691. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-stats.js +0 -41
  692. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/datasets-dropdown-list.js +0 -43
  693. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/file-upload.js +0 -225
  694. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/tabbed-view-manager.js +0 -63
  695. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/uploadable-file.js +0 -39
  696. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/validation-options.js +0 -54
  697. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/common-config.js +0 -94
  698. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/brace-fold.js +0 -105
  699. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/comment-fold.js +0 -57
  700. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/foldcode.js +0 -145
  701. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/foldgutter.js +0 -134
  702. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/xml-fold.js +0 -181
  703. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/backbone-min.js +0 -2
  704. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/backbone.js +0 -1581
  705. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/backbone.marionette.js +0 -2385
  706. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/bootstrap-select.min.js +0 -8
  707. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/bootstrap.min.js +0 -6
  708. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/html5shiv.js +0 -8
  709. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery-1.10.2.js +0 -9789
  710. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery-1.10.2.min.js +0 -6
  711. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery-ui.min.js +0 -7
  712. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.dataTables.min.js +0 -157
  713. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.fileupload.js +0 -1426
  714. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.fileupload.local.js +0 -1428
  715. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.form.js +0 -1278
  716. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.iframe-transport.js +0 -214
  717. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.ui.widget.js +0 -530
  718. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.xdomainrequest.js +0 -90
  719. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/lib/codemirror.js +0 -7638
  720. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/javascript/javascript.js +0 -683
  721. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/sparql/sparql.js +0 -160
  722. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/turtle/turtle.js +0 -160
  723. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/xml/xml.js +0 -384
  724. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/pivot.js +0 -1363
  725. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/pivot.min.js +0 -2
  726. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/pivot.min.js.map +0 -1
  727. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/plugins/text.js +0 -386
  728. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/qonsole.js +0 -577
  729. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/refresh.sh +0 -21
  730. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/require.js +0 -2076
  731. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/require.min.js +0 -36
  732. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/respond.min.js +0 -6
  733. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/sprintf-0.7-beta1.js +0 -183
  734. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/underscore.js +0 -1276
  735. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasqe.min.js +0 -9
  736. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasqe.min.js.map +0 -1
  737. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasr.min.js +0 -8
  738. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasr.min.js.map +0 -1
  739. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/manage.html +0 -110
  740. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/services.html +0 -76
  741. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/test/test-fuseki-config.ttl +0 -27
  742. package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/validate.html +0 -147
  743. package/test/apache-jena-fuseki-interface/data/json/PersistData.json +0 -111
  744. package/test/apache-jena-fuseki-interface/data/xml/AssetHealthEvent.xml +0 -45
  745. package/test/apache-jena-fuseki-interface/data/xml/AssetOwner.xml +0 -11
  746. package/test/apache-jena-fuseki-interface/data/xml/Outages.xml +0 -69
  747. package/test/apache-jena-fuseki-interface/data/xml/PsrType.xml +0 -80
  748. package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_EQ_V1.xml +0 -20867
  749. package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_SSH_V1.xml +0 -3784
  750. package/test/apache-jena-fuseki-interface/data/xml/neplan-eslohe/Eslohe_Rootnet_Area_1_EQ_V1.xml +0 -15755
  751. package/test/apache-jena-fuseki-interface/data/xml/neplan-eslohe/Eslohe_Rootnet_Area_1_EQ_V1_feeder_ext.xml +0 -54
  752. package/test/apache-jena-fuseki-interface/data/xml/neplan-eslohe/Eslohe_Rootnet_Area_1_SSH_V1.xml +0 -2796
  753. package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_EQ_V1.xml +0 -42569
  754. package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SSH_V1.xml +0 -10108
  755. package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SV_V1.xml +0 -6234
  756. package/test/apache-jena-fuseki-interface/data/xml-rdf-data.xml +0 -84
  757. package/test/cim-xml-rdf-parser/cim-xml-rdf-parser.tests.spec.ts +0 -23
  758. package/test/cim-xml-rdf-parser/data/rdfxml_serialisation.xml +0 -192
  759. package/test/integral7-converter/integral7-converter.tests.spec.ts +0 -195
  760. package/test/power-system-data-model-converter/data/fixed_feed_in_input.csv +0 -72
  761. package/test/power-system-data-model-converter/data/line_input.csv +0 -1910
  762. package/test/power-system-data-model-converter/data/line_type_input.csv +0 -5
  763. package/test/power-system-data-model-converter/data/load_input.csv +0 -1829
  764. package/test/power-system-data-model-converter/data/node_input.csv +0 -2835
  765. package/test/power-system-data-model-converter/data/time_series_mapping.csv +0 -878
  766. package/test/power-system-data-model-converter/data/transformer_2_w_input.csv +0 -1047
  767. package/test/power-system-data-model-converter/data/transformer_2_w_type_input.csv +0 -5
  768. package/test/power-system-data-model-converter/power-system-data-model-converter.tests.spec.ts +0 -310
  769. package/tsconfig.json +0 -24
  770. package/webpack.config.js +0 -24
@@ -1,1363 +0,0 @@
1
- (function() {
2
- var callWithJQuery,
3
- __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
4
- __slice = [].slice,
5
- __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
6
- __hasProp = {}.hasOwnProperty;
7
-
8
- callWithJQuery = function(pivotModule) {
9
- if (typeof exports === "object" && typeof module === "object") {
10
- return pivotModule(require("jquery"));
11
- } else if (typeof define === "function" && define.amd) {
12
- return define(["jquery"], pivotModule);
13
- } else {
14
- return pivotModule(jQuery);
15
- }
16
- };
17
-
18
- callWithJQuery(function($) {
19
-
20
- /*
21
- Utilities
22
- */
23
- var PivotData, addSeparators, aggregatorTemplates, aggregators, dayNamesEn, derivers, locales, mthNamesEn, naturalSort, numberFormat, pivotTableRenderer, renderers, usFmt, usFmtInt, usFmtPct, zeroPad;
24
- addSeparators = function(nStr, thousandsSep, decimalSep) {
25
- var rgx, x, x1, x2;
26
- nStr += '';
27
- x = nStr.split('.');
28
- x1 = x[0];
29
- x2 = x.length > 1 ? decimalSep + x[1] : '';
30
- rgx = /(\d+)(\d{3})/;
31
- while (rgx.test(x1)) {
32
- x1 = x1.replace(rgx, '$1' + thousandsSep + '$2');
33
- }
34
- return x1 + x2;
35
- };
36
- numberFormat = function(opts) {
37
- var defaults;
38
- defaults = {
39
- digitsAfterDecimal: 2,
40
- scaler: 1,
41
- thousandsSep: ",",
42
- decimalSep: ".",
43
- prefix: "",
44
- suffix: "",
45
- showZero: false
46
- };
47
- opts = $.extend(defaults, opts);
48
- return function(x) {
49
- var result;
50
- if (isNaN(x) || !isFinite(x)) {
51
- return "";
52
- }
53
- if (x === 0 && !opts.showZero) {
54
- return "";
55
- }
56
- result = addSeparators((opts.scaler * x).toFixed(opts.digitsAfterDecimal), opts.thousandsSep, opts.decimalSep);
57
- return "" + opts.prefix + result + opts.suffix;
58
- };
59
- };
60
- usFmt = numberFormat();
61
- usFmtInt = numberFormat({
62
- digitsAfterDecimal: 0
63
- });
64
- usFmtPct = numberFormat({
65
- digitsAfterDecimal: 1,
66
- scaler: 100,
67
- suffix: "%"
68
- });
69
- aggregatorTemplates = {
70
- count: function(formatter) {
71
- if (formatter == null) {
72
- formatter = usFmtInt;
73
- }
74
- return function() {
75
- return function(data, rowKey, colKey) {
76
- return {
77
- count: 0,
78
- push: function() {
79
- return this.count++;
80
- },
81
- value: function() {
82
- return this.count;
83
- },
84
- format: formatter
85
- };
86
- };
87
- };
88
- },
89
- countUnique: function(formatter) {
90
- if (formatter == null) {
91
- formatter = usFmtInt;
92
- }
93
- return function(_arg) {
94
- var attr;
95
- attr = _arg[0];
96
- return function(data, rowKey, colKey) {
97
- return {
98
- uniq: [],
99
- push: function(record) {
100
- var _ref;
101
- if (_ref = record[attr], __indexOf.call(this.uniq, _ref) < 0) {
102
- return this.uniq.push(record[attr]);
103
- }
104
- },
105
- value: function() {
106
- return this.uniq.length;
107
- },
108
- format: formatter,
109
- numInputs: attr != null ? 0 : 1
110
- };
111
- };
112
- };
113
- },
114
- listUnique: function(sep) {
115
- return function(_arg) {
116
- var attr;
117
- attr = _arg[0];
118
- return function(data, rowKey, colKey) {
119
- return {
120
- uniq: [],
121
- push: function(record) {
122
- var _ref;
123
- if (_ref = record[attr], __indexOf.call(this.uniq, _ref) < 0) {
124
- return this.uniq.push(record[attr]);
125
- }
126
- },
127
- value: function() {
128
- return this.uniq.join(sep);
129
- },
130
- format: function(x) {
131
- return x;
132
- },
133
- numInputs: attr != null ? 0 : 1
134
- };
135
- };
136
- };
137
- },
138
- sum: function(formatter) {
139
- if (formatter == null) {
140
- formatter = usFmt;
141
- }
142
- return function(_arg) {
143
- var attr;
144
- attr = _arg[0];
145
- return function(data, rowKey, colKey) {
146
- return {
147
- sum: 0,
148
- push: function(record) {
149
- if (!isNaN(parseFloat(record[attr]))) {
150
- return this.sum += parseFloat(record[attr]);
151
- }
152
- },
153
- value: function() {
154
- return this.sum;
155
- },
156
- format: formatter,
157
- numInputs: attr != null ? 0 : 1
158
- };
159
- };
160
- };
161
- },
162
- average: function(formatter) {
163
- if (formatter == null) {
164
- formatter = usFmt;
165
- }
166
- return function(_arg) {
167
- var attr;
168
- attr = _arg[0];
169
- return function(data, rowKey, colKey) {
170
- return {
171
- sum: 0,
172
- len: 0,
173
- push: function(record) {
174
- if (!isNaN(parseFloat(record[attr]))) {
175
- this.sum += parseFloat(record[attr]);
176
- return this.len++;
177
- }
178
- },
179
- value: function() {
180
- return this.sum / this.len;
181
- },
182
- format: formatter,
183
- numInputs: attr != null ? 0 : 1
184
- };
185
- };
186
- };
187
- },
188
- sumOverSum: function(formatter) {
189
- if (formatter == null) {
190
- formatter = usFmt;
191
- }
192
- return function(_arg) {
193
- var denom, num;
194
- num = _arg[0], denom = _arg[1];
195
- return function(data, rowKey, colKey) {
196
- return {
197
- sumNum: 0,
198
- sumDenom: 0,
199
- push: function(record) {
200
- if (!isNaN(parseFloat(record[num]))) {
201
- this.sumNum += parseFloat(record[num]);
202
- }
203
- if (!isNaN(parseFloat(record[denom]))) {
204
- return this.sumDenom += parseFloat(record[denom]);
205
- }
206
- },
207
- value: function() {
208
- return this.sumNum / this.sumDenom;
209
- },
210
- format: formatter,
211
- numInputs: (num != null) && (denom != null) ? 0 : 2
212
- };
213
- };
214
- };
215
- },
216
- sumOverSumBound80: function(upper, formatter) {
217
- if (upper == null) {
218
- upper = true;
219
- }
220
- if (formatter == null) {
221
- formatter = usFmt;
222
- }
223
- return function(_arg) {
224
- var denom, num;
225
- num = _arg[0], denom = _arg[1];
226
- return function(data, rowKey, colKey) {
227
- return {
228
- sumNum: 0,
229
- sumDenom: 0,
230
- push: function(record) {
231
- if (!isNaN(parseFloat(record[num]))) {
232
- this.sumNum += parseFloat(record[num]);
233
- }
234
- if (!isNaN(parseFloat(record[denom]))) {
235
- return this.sumDenom += parseFloat(record[denom]);
236
- }
237
- },
238
- value: function() {
239
- var sign;
240
- sign = upper ? 1 : -1;
241
- return (0.821187207574908 / this.sumDenom + this.sumNum / this.sumDenom + 1.2815515655446004 * sign * Math.sqrt(0.410593603787454 / (this.sumDenom * this.sumDenom) + (this.sumNum * (1 - this.sumNum / this.sumDenom)) / (this.sumDenom * this.sumDenom))) / (1 + 1.642374415149816 / this.sumDenom);
242
- },
243
- format: formatter,
244
- numInputs: (num != null) && (denom != null) ? 0 : 2
245
- };
246
- };
247
- };
248
- },
249
- fractionOf: function(wrapped, type, formatter) {
250
- if (type == null) {
251
- type = "total";
252
- }
253
- if (formatter == null) {
254
- formatter = usFmtPct;
255
- }
256
- return function() {
257
- var x;
258
- x = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
259
- return function(data, rowKey, colKey) {
260
- return {
261
- selector: {
262
- total: [[], []],
263
- row: [rowKey, []],
264
- col: [[], colKey]
265
- }[type],
266
- inner: wrapped.apply(null, x)(data, rowKey, colKey),
267
- push: function(record) {
268
- return this.inner.push(record);
269
- },
270
- format: formatter,
271
- value: function() {
272
- return this.inner.value() / data.getAggregator.apply(data, this.selector).inner.value();
273
- },
274
- numInputs: wrapped.apply(null, x)().numInputs
275
- };
276
- };
277
- };
278
- }
279
- };
280
- aggregators = (function(tpl) {
281
- return {
282
- "Count": tpl.count(usFmtInt),
283
- "Count Unique Values": tpl.countUnique(usFmtInt),
284
- "List Unique Values": tpl.listUnique(", "),
285
- "Sum": tpl.sum(usFmt),
286
- "Integer Sum": tpl.sum(usFmtInt),
287
- "Average": tpl.average(usFmt),
288
- "Sum over Sum": tpl.sumOverSum(usFmt),
289
- "80% Upper Bound": tpl.sumOverSumBound80(true, usFmt),
290
- "80% Lower Bound": tpl.sumOverSumBound80(false, usFmt),
291
- "Sum as Fraction of Total": tpl.fractionOf(tpl.sum(), "total", usFmtPct),
292
- "Sum as Fraction of Rows": tpl.fractionOf(tpl.sum(), "row", usFmtPct),
293
- "Sum as Fraction of Columns": tpl.fractionOf(tpl.sum(), "col", usFmtPct),
294
- "Count as Fraction of Total": tpl.fractionOf(tpl.count(), "total", usFmtPct),
295
- "Count as Fraction of Rows": tpl.fractionOf(tpl.count(), "row", usFmtPct),
296
- "Count as Fraction of Columns": tpl.fractionOf(tpl.count(), "col", usFmtPct)
297
- };
298
- })(aggregatorTemplates);
299
- renderers = {
300
- "Table": function(pvtData, opts) {
301
- return pivotTableRenderer(pvtData, opts);
302
- },
303
- "Table Barchart": function(pvtData, opts) {
304
- return $(pivotTableRenderer(pvtData, opts)).barchart();
305
- },
306
- "Heatmap": function(pvtData, opts) {
307
- return $(pivotTableRenderer(pvtData, opts)).heatmap();
308
- },
309
- "Row Heatmap": function(pvtData, opts) {
310
- return $(pivotTableRenderer(pvtData, opts)).heatmap("rowheatmap");
311
- },
312
- "Col Heatmap": function(pvtData, opts) {
313
- return $(pivotTableRenderer(pvtData, opts)).heatmap("colheatmap");
314
- }
315
- };
316
- locales = {
317
- en: {
318
- aggregators: aggregators,
319
- renderers: renderers,
320
- localeStrings: {
321
- renderError: "An error occurred rendering the PivotTable results.",
322
- computeError: "An error occurred computing the PivotTable results.",
323
- uiRenderError: "An error occurred rendering the PivotTable UI.",
324
- selectAll: "Select All",
325
- selectNone: "Select None",
326
- tooMany: "(too many to list)",
327
- filterResults: "Filter results",
328
- totals: "Totals",
329
- vs: "vs",
330
- by: "by"
331
- }
332
- }
333
- };
334
- mthNamesEn = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
335
- dayNamesEn = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
336
- zeroPad = function(number) {
337
- return ("0" + number).substr(-2, 2);
338
- };
339
- derivers = {
340
- bin: function(col, binWidth) {
341
- return function(record) {
342
- return record[col] - record[col] % binWidth;
343
- };
344
- },
345
- dateFormat: function(col, formatString, mthNames, dayNames) {
346
- if (mthNames == null) {
347
- mthNames = mthNamesEn;
348
- }
349
- if (dayNames == null) {
350
- dayNames = dayNamesEn;
351
- }
352
- return function(record) {
353
- var date;
354
- date = new Date(Date.parse(record[col]));
355
- if (isNaN(date)) {
356
- return "";
357
- }
358
- return formatString.replace(/%(.)/g, function(m, p) {
359
- switch (p) {
360
- case "y":
361
- return date.getFullYear();
362
- case "m":
363
- return zeroPad(date.getMonth() + 1);
364
- case "n":
365
- return mthNames[date.getMonth()];
366
- case "d":
367
- return zeroPad(date.getDate());
368
- case "w":
369
- return dayNames[date.getDay()];
370
- case "x":
371
- return date.getDay();
372
- case "H":
373
- return zeroPad(date.getHours());
374
- case "M":
375
- return zeroPad(date.getMinutes());
376
- case "S":
377
- return zeroPad(date.getSeconds());
378
- default:
379
- return "%" + p;
380
- }
381
- });
382
- };
383
- }
384
- };
385
- naturalSort = (function(_this) {
386
- return function(as, bs) {
387
- var a, a1, b, b1, rd, rx, rz;
388
- rx = /(\d+)|(\D+)/g;
389
- rd = /\d/;
390
- rz = /^0/;
391
- if (typeof as === "number" || typeof bs === "number") {
392
- if (isNaN(as)) {
393
- return 1;
394
- }
395
- if (isNaN(bs)) {
396
- return -1;
397
- }
398
- return as - bs;
399
- }
400
- a = String(as).toLowerCase();
401
- b = String(bs).toLowerCase();
402
- if (a === b) {
403
- return 0;
404
- }
405
- if (!(rd.test(a) && rd.test(b))) {
406
- return (a > b ? 1 : -1);
407
- }
408
- a = a.match(rx);
409
- b = b.match(rx);
410
- while (a.length && b.length) {
411
- a1 = a.shift();
412
- b1 = b.shift();
413
- if (a1 !== b1) {
414
- if (rd.test(a1) && rd.test(b1)) {
415
- return a1.replace(rz, ".0") - b1.replace(rz, ".0");
416
- } else {
417
- return (a1 > b1 ? 1 : -1);
418
- }
419
- }
420
- }
421
- return a.length - b.length;
422
- };
423
- })(this);
424
- $.pivotUtilities = {
425
- aggregatorTemplates: aggregatorTemplates,
426
- aggregators: aggregators,
427
- renderers: renderers,
428
- derivers: derivers,
429
- locales: locales,
430
- naturalSort: naturalSort,
431
- numberFormat: numberFormat
432
- };
433
-
434
- /*
435
- Data Model class
436
- */
437
- PivotData = (function() {
438
- function PivotData(input, opts) {
439
- this.getAggregator = __bind(this.getAggregator, this);
440
- this.getRowKeys = __bind(this.getRowKeys, this);
441
- this.getColKeys = __bind(this.getColKeys, this);
442
- this.sortKeys = __bind(this.sortKeys, this);
443
- this.arrSort = __bind(this.arrSort, this);
444
- this.natSort = __bind(this.natSort, this);
445
- this.aggregator = opts.aggregator;
446
- this.aggregatorName = opts.aggregatorName;
447
- this.colAttrs = opts.cols;
448
- this.rowAttrs = opts.rows;
449
- this.valAttrs = opts.vals;
450
- this.tree = {};
451
- this.rowKeys = [];
452
- this.colKeys = [];
453
- this.rowTotals = {};
454
- this.colTotals = {};
455
- this.allTotal = this.aggregator(this, [], []);
456
- this.sorted = false;
457
- PivotData.forEachRecord(input, opts.derivedAttributes, (function(_this) {
458
- return function(record) {
459
- if (opts.filter(record)) {
460
- return _this.processRecord(record);
461
- }
462
- };
463
- })(this));
464
- }
465
-
466
- PivotData.forEachRecord = function(input, derivedAttributes, f) {
467
- var addRecord, compactRecord, i, j, k, record, tblCols, _i, _len, _ref, _results, _results1;
468
- if ($.isEmptyObject(derivedAttributes)) {
469
- addRecord = f;
470
- } else {
471
- addRecord = function(record) {
472
- var k, v, _ref;
473
- for (k in derivedAttributes) {
474
- v = derivedAttributes[k];
475
- record[k] = (_ref = v(record)) != null ? _ref : record[k];
476
- }
477
- return f(record);
478
- };
479
- }
480
- if ($.isFunction(input)) {
481
- return input(addRecord);
482
- } else if ($.isArray(input)) {
483
- if ($.isArray(input[0])) {
484
- _results = [];
485
- for (i in input) {
486
- if (!__hasProp.call(input, i)) continue;
487
- compactRecord = input[i];
488
- if (!(i > 0)) {
489
- continue;
490
- }
491
- record = {};
492
- _ref = input[0];
493
- for (j in _ref) {
494
- if (!__hasProp.call(_ref, j)) continue;
495
- k = _ref[j];
496
- record[k] = compactRecord[j];
497
- }
498
- _results.push(addRecord(record));
499
- }
500
- return _results;
501
- } else {
502
- _results1 = [];
503
- for (_i = 0, _len = input.length; _i < _len; _i++) {
504
- record = input[_i];
505
- _results1.push(addRecord(record));
506
- }
507
- return _results1;
508
- }
509
- } else if (input instanceof jQuery) {
510
- tblCols = [];
511
- $("thead > tr > th", input).each(function(i) {
512
- return tblCols.push($(this).text());
513
- });
514
- return $("tbody > tr", input).each(function(i) {
515
- record = {};
516
- $("td", this).each(function(j) {
517
- return record[tblCols[j]] = $(this).text();
518
- });
519
- return addRecord(record);
520
- });
521
- } else {
522
- throw new Error("unknown input format");
523
- }
524
- };
525
-
526
- PivotData.convertToArray = function(input) {
527
- var result;
528
- result = [];
529
- PivotData.forEachRecord(input, {}, function(record) {
530
- return result.push(record);
531
- });
532
- return result;
533
- };
534
-
535
- PivotData.prototype.natSort = function(as, bs) {
536
- return naturalSort(as, bs);
537
- };
538
-
539
- PivotData.prototype.arrSort = function(a, b) {
540
- return this.natSort(a.join(), b.join());
541
- };
542
-
543
- PivotData.prototype.sortKeys = function() {
544
- if (!this.sorted) {
545
- this.rowKeys.sort(this.arrSort);
546
- this.colKeys.sort(this.arrSort);
547
- }
548
- return this.sorted = true;
549
- };
550
-
551
- PivotData.prototype.getColKeys = function() {
552
- this.sortKeys();
553
- return this.colKeys;
554
- };
555
-
556
- PivotData.prototype.getRowKeys = function() {
557
- this.sortKeys();
558
- return this.rowKeys;
559
- };
560
-
561
- PivotData.prototype.processRecord = function(record) {
562
- var colKey, flatColKey, flatRowKey, rowKey, x, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3;
563
- colKey = [];
564
- rowKey = [];
565
- _ref = this.colAttrs;
566
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
567
- x = _ref[_i];
568
- colKey.push((_ref1 = record[x]) != null ? _ref1 : "null");
569
- }
570
- _ref2 = this.rowAttrs;
571
- for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
572
- x = _ref2[_j];
573
- rowKey.push((_ref3 = record[x]) != null ? _ref3 : "null");
574
- }
575
- flatRowKey = rowKey.join(String.fromCharCode(0));
576
- flatColKey = colKey.join(String.fromCharCode(0));
577
- this.allTotal.push(record);
578
- if (rowKey.length !== 0) {
579
- if (!this.rowTotals[flatRowKey]) {
580
- this.rowKeys.push(rowKey);
581
- this.rowTotals[flatRowKey] = this.aggregator(this, rowKey, []);
582
- }
583
- this.rowTotals[flatRowKey].push(record);
584
- }
585
- if (colKey.length !== 0) {
586
- if (!this.colTotals[flatColKey]) {
587
- this.colKeys.push(colKey);
588
- this.colTotals[flatColKey] = this.aggregator(this, [], colKey);
589
- }
590
- this.colTotals[flatColKey].push(record);
591
- }
592
- if (colKey.length !== 0 && rowKey.length !== 0) {
593
- if (!this.tree[flatRowKey]) {
594
- this.tree[flatRowKey] = {};
595
- }
596
- if (!this.tree[flatRowKey][flatColKey]) {
597
- this.tree[flatRowKey][flatColKey] = this.aggregator(this, rowKey, colKey);
598
- }
599
- return this.tree[flatRowKey][flatColKey].push(record);
600
- }
601
- };
602
-
603
- PivotData.prototype.getAggregator = function(rowKey, colKey) {
604
- var agg, flatColKey, flatRowKey;
605
- flatRowKey = rowKey.join(String.fromCharCode(0));
606
- flatColKey = colKey.join(String.fromCharCode(0));
607
- if (rowKey.length === 0 && colKey.length === 0) {
608
- agg = this.allTotal;
609
- } else if (rowKey.length === 0) {
610
- agg = this.colTotals[flatColKey];
611
- } else if (colKey.length === 0) {
612
- agg = this.rowTotals[flatRowKey];
613
- } else {
614
- agg = this.tree[flatRowKey][flatColKey];
615
- }
616
- return agg != null ? agg : {
617
- value: (function() {
618
- return null;
619
- }),
620
- format: function() {
621
- return "";
622
- }
623
- };
624
- };
625
-
626
- return PivotData;
627
-
628
- })();
629
-
630
- /*
631
- Default Renderer for hierarchical table layout
632
- */
633
- pivotTableRenderer = function(pivotData, opts) {
634
- var aggregator, c, colAttrs, colKey, colKeys, defaults, i, j, r, result, rowAttrs, rowKey, rowKeys, spanSize, td, th, totalAggregator, tr, txt, val, x;
635
- defaults = {
636
- localeStrings: {
637
- totals: "Totals"
638
- }
639
- };
640
- opts = $.extend(defaults, opts);
641
- colAttrs = pivotData.colAttrs;
642
- rowAttrs = pivotData.rowAttrs;
643
- rowKeys = pivotData.getRowKeys();
644
- colKeys = pivotData.getColKeys();
645
- result = document.createElement("table");
646
- result.className = "pvtTable";
647
- spanSize = function(arr, i, j) {
648
- var len, noDraw, stop, x, _i, _j;
649
- if (i !== 0) {
650
- noDraw = true;
651
- for (x = _i = 0; 0 <= j ? _i <= j : _i >= j; x = 0 <= j ? ++_i : --_i) {
652
- if (arr[i - 1][x] !== arr[i][x]) {
653
- noDraw = false;
654
- }
655
- }
656
- if (noDraw) {
657
- return -1;
658
- }
659
- }
660
- len = 0;
661
- while (i + len < arr.length) {
662
- stop = false;
663
- for (x = _j = 0; 0 <= j ? _j <= j : _j >= j; x = 0 <= j ? ++_j : --_j) {
664
- if (arr[i][x] !== arr[i + len][x]) {
665
- stop = true;
666
- }
667
- }
668
- if (stop) {
669
- break;
670
- }
671
- len++;
672
- }
673
- return len;
674
- };
675
- for (j in colAttrs) {
676
- if (!__hasProp.call(colAttrs, j)) continue;
677
- c = colAttrs[j];
678
- tr = document.createElement("tr");
679
- if (parseInt(j) === 0 && rowAttrs.length !== 0) {
680
- th = document.createElement("th");
681
- th.setAttribute("colspan", rowAttrs.length);
682
- th.setAttribute("rowspan", colAttrs.length);
683
- tr.appendChild(th);
684
- }
685
- th = document.createElement("th");
686
- th.className = "pvtAxisLabel";
687
- th.textContent = c;
688
- tr.appendChild(th);
689
- for (i in colKeys) {
690
- if (!__hasProp.call(colKeys, i)) continue;
691
- colKey = colKeys[i];
692
- x = spanSize(colKeys, parseInt(i), parseInt(j));
693
- if (x !== -1) {
694
- th = document.createElement("th");
695
- th.className = "pvtColLabel";
696
- th.textContent = colKey[j];
697
- th.setAttribute("colspan", x);
698
- if (parseInt(j) === colAttrs.length - 1 && rowAttrs.length !== 0) {
699
- th.setAttribute("rowspan", 2);
700
- }
701
- tr.appendChild(th);
702
- }
703
- }
704
- if (parseInt(j) === 0) {
705
- th = document.createElement("th");
706
- th.className = "pvtTotalLabel";
707
- th.innerHTML = opts.localeStrings.totals;
708
- th.setAttribute("rowspan", colAttrs.length + (rowAttrs.length === 0 ? 0 : 1));
709
- tr.appendChild(th);
710
- }
711
- result.appendChild(tr);
712
- }
713
- if (rowAttrs.length !== 0) {
714
- tr = document.createElement("tr");
715
- for (i in rowAttrs) {
716
- if (!__hasProp.call(rowAttrs, i)) continue;
717
- r = rowAttrs[i];
718
- th = document.createElement("th");
719
- th.className = "pvtAxisLabel";
720
- th.textContent = r;
721
- tr.appendChild(th);
722
- }
723
- th = document.createElement("th");
724
- if (colAttrs.length === 0) {
725
- th.className = "pvtTotalLabel";
726
- th.innerHTML = opts.localeStrings.totals;
727
- }
728
- tr.appendChild(th);
729
- result.appendChild(tr);
730
- }
731
- for (i in rowKeys) {
732
- if (!__hasProp.call(rowKeys, i)) continue;
733
- rowKey = rowKeys[i];
734
- tr = document.createElement("tr");
735
- for (j in rowKey) {
736
- if (!__hasProp.call(rowKey, j)) continue;
737
- txt = rowKey[j];
738
- x = spanSize(rowKeys, parseInt(i), parseInt(j));
739
- if (x !== -1) {
740
- th = document.createElement("th");
741
- th.className = "pvtRowLabel";
742
- th.textContent = txt;
743
- th.setAttribute("rowspan", x);
744
- if (parseInt(j) === rowAttrs.length - 1 && colAttrs.length !== 0) {
745
- th.setAttribute("colspan", 2);
746
- }
747
- tr.appendChild(th);
748
- }
749
- }
750
- for (j in colKeys) {
751
- if (!__hasProp.call(colKeys, j)) continue;
752
- colKey = colKeys[j];
753
- aggregator = pivotData.getAggregator(rowKey, colKey);
754
- val = aggregator.value();
755
- td = document.createElement("td");
756
- td.className = "pvtVal row" + i + " col" + j;
757
- td.innerHTML = aggregator.format(val);
758
- td.setAttribute("data-value", val);
759
- tr.appendChild(td);
760
- }
761
- totalAggregator = pivotData.getAggregator(rowKey, []);
762
- val = totalAggregator.value();
763
- td = document.createElement("td");
764
- td.className = "pvtTotal rowTotal";
765
- td.innerHTML = totalAggregator.format(val);
766
- td.setAttribute("data-value", val);
767
- td.setAttribute("data-for", "row" + i);
768
- tr.appendChild(td);
769
- result.appendChild(tr);
770
- }
771
- tr = document.createElement("tr");
772
- th = document.createElement("th");
773
- th.className = "pvtTotalLabel";
774
- th.innerHTML = opts.localeStrings.totals;
775
- th.setAttribute("colspan", rowAttrs.length + (colAttrs.length === 0 ? 0 : 1));
776
- tr.appendChild(th);
777
- for (j in colKeys) {
778
- if (!__hasProp.call(colKeys, j)) continue;
779
- colKey = colKeys[j];
780
- totalAggregator = pivotData.getAggregator([], colKey);
781
- val = totalAggregator.value();
782
- td = document.createElement("td");
783
- td.className = "pvtTotal colTotal";
784
- td.innerHTML = totalAggregator.format(val);
785
- td.setAttribute("data-value", val);
786
- td.setAttribute("data-for", "col" + j);
787
- tr.appendChild(td);
788
- }
789
- totalAggregator = pivotData.getAggregator([], []);
790
- val = totalAggregator.value();
791
- td = document.createElement("td");
792
- td.className = "pvtGrandTotal";
793
- td.innerHTML = totalAggregator.format(val);
794
- td.setAttribute("data-value", val);
795
- tr.appendChild(td);
796
- result.appendChild(tr);
797
- result.setAttribute("data-numrows", rowKeys.length);
798
- result.setAttribute("data-numcols", colKeys.length);
799
- return result;
800
- };
801
-
802
- /*
803
- Pivot Table core: create PivotData object and call Renderer on it
804
- */
805
- $.fn.pivot = function(input, opts) {
806
- var defaults, e, pivotData, result, x;
807
- defaults = {
808
- cols: [],
809
- rows: [],
810
- filter: function() {
811
- return true;
812
- },
813
- aggregator: aggregatorTemplates.count()(),
814
- aggregatorName: "Count",
815
- derivedAttributes: {},
816
- renderer: pivotTableRenderer,
817
- rendererOptions: null,
818
- localeStrings: locales.en.localeStrings
819
- };
820
- opts = $.extend(defaults, opts);
821
- result = null;
822
- try {
823
- pivotData = new PivotData(input, opts);
824
- try {
825
- result = opts.renderer(pivotData, opts.rendererOptions);
826
- } catch (_error) {
827
- e = _error;
828
- if (typeof console !== "undefined" && console !== null) {
829
- console.error(e.stack);
830
- }
831
- result = $("<span>").html(opts.localeStrings.renderError);
832
- }
833
- } catch (_error) {
834
- e = _error;
835
- if (typeof console !== "undefined" && console !== null) {
836
- console.error(e.stack);
837
- }
838
- result = $("<span>").html(opts.localeStrings.computeError);
839
- }
840
- x = this[0];
841
- while (x.hasChildNodes()) {
842
- x.removeChild(x.lastChild);
843
- }
844
- return this.append(result);
845
- };
846
-
847
- /*
848
- Pivot Table UI: calls Pivot Table core above with options set by user
849
- */
850
- $.fn.pivotUI = function(input, inputOpts, overwrite, locale) {
851
- var a, aggregator, attrLength, axisValues, c, colList, defaults, e, existingOpts, i, initialRender, k, opts, pivotTable, refresh, refreshDelayed, renderer, rendererControl, shownAttributes, tblCols, tr1, tr2, uiTable, unusedAttrsVerticalAutoOverride, x, _fn, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3, _ref4;
852
- if (overwrite == null) {
853
- overwrite = false;
854
- }
855
- if (locale == null) {
856
- locale = "en";
857
- }
858
- defaults = {
859
- derivedAttributes: {},
860
- aggregators: locales[locale].aggregators,
861
- renderers: locales[locale].renderers,
862
- hiddenAttributes: [],
863
- menuLimit: 200,
864
- cols: [],
865
- rows: [],
866
- vals: [],
867
- exclusions: {},
868
- unusedAttrsVertical: "auto",
869
- autoSortUnusedAttrs: false,
870
- rendererOptions: {
871
- localeStrings: locales[locale].localeStrings
872
- },
873
- onRefresh: null,
874
- filter: function() {
875
- return true;
876
- },
877
- localeStrings: locales[locale].localeStrings
878
- };
879
- existingOpts = this.data("pivotUIOptions");
880
- if ((existingOpts == null) || overwrite) {
881
- opts = $.extend(defaults, inputOpts);
882
- } else {
883
- opts = existingOpts;
884
- }
885
- try {
886
- input = PivotData.convertToArray(input);
887
- tblCols = (function() {
888
- var _ref, _results;
889
- _ref = input[0];
890
- _results = [];
891
- for (k in _ref) {
892
- if (!__hasProp.call(_ref, k)) continue;
893
- _results.push(k);
894
- }
895
- return _results;
896
- })();
897
- _ref = opts.derivedAttributes;
898
- for (c in _ref) {
899
- if (!__hasProp.call(_ref, c)) continue;
900
- if ((__indexOf.call(tblCols, c) < 0)) {
901
- tblCols.push(c);
902
- }
903
- }
904
- axisValues = {};
905
- for (_i = 0, _len = tblCols.length; _i < _len; _i++) {
906
- x = tblCols[_i];
907
- axisValues[x] = {};
908
- }
909
- PivotData.forEachRecord(input, opts.derivedAttributes, function(record) {
910
- var v, _base, _results;
911
- _results = [];
912
- for (k in record) {
913
- if (!__hasProp.call(record, k)) continue;
914
- v = record[k];
915
- if (!(opts.filter(record))) {
916
- continue;
917
- }
918
- if (v == null) {
919
- v = "null";
920
- }
921
- if ((_base = axisValues[k])[v] == null) {
922
- _base[v] = 0;
923
- }
924
- _results.push(axisValues[k][v]++);
925
- }
926
- return _results;
927
- });
928
- uiTable = $("<table cellpadding='5'>");
929
- rendererControl = $("<td>");
930
- renderer = $("<select class='pvtRenderer'>").appendTo(rendererControl).bind("change", function() {
931
- return refresh();
932
- });
933
- _ref1 = opts.renderers;
934
- for (x in _ref1) {
935
- if (!__hasProp.call(_ref1, x)) continue;
936
- $("<option>").val(x).html(x).appendTo(renderer);
937
- }
938
- colList = $("<td class='pvtAxisContainer pvtUnused'>");
939
- shownAttributes = (function() {
940
- var _j, _len1, _results;
941
- _results = [];
942
- for (_j = 0, _len1 = tblCols.length; _j < _len1; _j++) {
943
- c = tblCols[_j];
944
- if (__indexOf.call(opts.hiddenAttributes, c) < 0) {
945
- _results.push(c);
946
- }
947
- }
948
- return _results;
949
- })();
950
- unusedAttrsVerticalAutoOverride = false;
951
- if (opts.unusedAttrsVertical === "auto") {
952
- attrLength = 0;
953
- for (_j = 0, _len1 = shownAttributes.length; _j < _len1; _j++) {
954
- a = shownAttributes[_j];
955
- attrLength += a.length;
956
- }
957
- unusedAttrsVerticalAutoOverride = attrLength > 120;
958
- }
959
- if (opts.unusedAttrsVertical === true || unusedAttrsVerticalAutoOverride) {
960
- colList.addClass('pvtVertList');
961
- } else {
962
- colList.addClass('pvtHorizList');
963
- }
964
- _fn = function(c) {
965
- var attrElem, btns, checkContainer, filterItem, filterItemExcluded, hasExcludedItem, keys, showFilterList, triangleLink, updateFilter, v, valueList, _k, _len2, _ref2;
966
- keys = (function() {
967
- var _results;
968
- _results = [];
969
- for (k in axisValues[c]) {
970
- _results.push(k);
971
- }
972
- return _results;
973
- })();
974
- hasExcludedItem = false;
975
- valueList = $("<div>").addClass('pvtFilterBox').hide();
976
- valueList.append($("<h4>").text("" + c + " (" + keys.length + ")"));
977
- if (keys.length > opts.menuLimit) {
978
- valueList.append($("<p>").html(opts.localeStrings.tooMany));
979
- } else {
980
- btns = $("<p>").appendTo(valueList);
981
- btns.append($("<button>", {
982
- type: "button"
983
- }).html(opts.localeStrings.selectAll).bind("click", function() {
984
- return valueList.find("input:visible").prop("checked", true);
985
- }));
986
- btns.append($("<button>", {
987
- type: "button"
988
- }).html(opts.localeStrings.selectNone).bind("click", function() {
989
- return valueList.find("input:visible").prop("checked", false);
990
- }));
991
- btns.append($("<input>").addClass("pvtSearch").attr("placeholder", opts.localeStrings.filterResults).bind("keyup", function() {
992
- var filter;
993
- filter = $(this).val().toLowerCase();
994
- return $(this).parents(".pvtFilterBox").find('label span').each(function() {
995
- var testString;
996
- testString = $(this).text().toLowerCase().indexOf(filter);
997
- if (testString !== -1) {
998
- return $(this).parent().show();
999
- } else {
1000
- return $(this).parent().hide();
1001
- }
1002
- });
1003
- }));
1004
- checkContainer = $("<div>").addClass("pvtCheckContainer").appendTo(valueList);
1005
- _ref2 = keys.sort(naturalSort);
1006
- for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
1007
- k = _ref2[_k];
1008
- v = axisValues[c][k];
1009
- filterItem = $("<label>");
1010
- filterItemExcluded = opts.exclusions[c] ? (__indexOf.call(opts.exclusions[c], k) >= 0) : false;
1011
- hasExcludedItem || (hasExcludedItem = filterItemExcluded);
1012
- $("<input type='checkbox' class='pvtFilter'>").attr("checked", !filterItemExcluded).data("filter", [c, k]).appendTo(filterItem);
1013
- filterItem.append($("<span>").text("" + k + " (" + v + ")"));
1014
- checkContainer.append($("<p>").append(filterItem));
1015
- }
1016
- }
1017
- updateFilter = function() {
1018
- var unselectedCount;
1019
- unselectedCount = $(valueList).find("[type='checkbox']").length - $(valueList).find("[type='checkbox']:checked").length;
1020
- if (unselectedCount > 0) {
1021
- attrElem.addClass("pvtFilteredAttribute");
1022
- } else {
1023
- attrElem.removeClass("pvtFilteredAttribute");
1024
- }
1025
- if (keys.length > opts.menuLimit) {
1026
- return valueList.toggle();
1027
- } else {
1028
- return valueList.toggle(0, refresh);
1029
- }
1030
- };
1031
- $("<p>").appendTo(valueList).append($("<button>", {
1032
- type: "button"
1033
- }).text("OK").bind("click", updateFilter));
1034
- showFilterList = function(e) {
1035
- valueList.css({
1036
- left: e.pageX,
1037
- top: e.pageY
1038
- }).toggle();
1039
- $('.pvtSearch').val('');
1040
- return $('label').show();
1041
- };
1042
- triangleLink = $("<span class='pvtTriangle'>").html(" &#x25BE;").bind("click", showFilterList);
1043
- attrElem = $("<li class='axis_" + i + "'>").append($("<span class='pvtAttr'>").text(c).data("attrName", c).append(triangleLink));
1044
- if (hasExcludedItem) {
1045
- attrElem.addClass('pvtFilteredAttribute');
1046
- }
1047
- colList.append(attrElem).append(valueList);
1048
- return attrElem.bind("dblclick", showFilterList);
1049
- };
1050
- for (i in shownAttributes) {
1051
- c = shownAttributes[i];
1052
- _fn(c);
1053
- }
1054
- tr1 = $("<tr>").appendTo(uiTable);
1055
- aggregator = $("<select class='pvtAggregator'>").bind("change", function() {
1056
- return refresh();
1057
- });
1058
- _ref2 = opts.aggregators;
1059
- for (x in _ref2) {
1060
- if (!__hasProp.call(_ref2, x)) continue;
1061
- aggregator.append($("<option>").val(x).html(x));
1062
- }
1063
- $("<td class='pvtVals'>").appendTo(tr1).append(aggregator).append($("<br>"));
1064
- $("<td class='pvtAxisContainer pvtHorizList pvtCols'>").appendTo(tr1);
1065
- tr2 = $("<tr>").appendTo(uiTable);
1066
- tr2.append($("<td valign='top' class='pvtAxisContainer pvtRows'>"));
1067
- pivotTable = $("<td valign='top' class='pvtRendererArea'>").appendTo(tr2);
1068
- if (opts.unusedAttrsVertical === true || unusedAttrsVerticalAutoOverride) {
1069
- uiTable.find('tr:nth-child(1)').prepend(rendererControl);
1070
- uiTable.find('tr:nth-child(2)').prepend(colList);
1071
- } else {
1072
- uiTable.prepend($("<tr>").append(rendererControl).append(colList));
1073
- }
1074
- this.html(uiTable);
1075
- _ref3 = opts.cols;
1076
- for (_k = 0, _len2 = _ref3.length; _k < _len2; _k++) {
1077
- x = _ref3[_k];
1078
- this.find(".pvtCols").append(this.find(".axis_" + (shownAttributes.indexOf(x))));
1079
- }
1080
- _ref4 = opts.rows;
1081
- for (_l = 0, _len3 = _ref4.length; _l < _len3; _l++) {
1082
- x = _ref4[_l];
1083
- this.find(".pvtRows").append(this.find(".axis_" + (shownAttributes.indexOf(x))));
1084
- }
1085
- if (opts.aggregatorName != null) {
1086
- this.find(".pvtAggregator").val(opts.aggregatorName);
1087
- }
1088
- if (opts.rendererName != null) {
1089
- this.find(".pvtRenderer").val(opts.rendererName);
1090
- }
1091
- initialRender = true;
1092
- refreshDelayed = (function(_this) {
1093
- return function() {
1094
- var attr, exclusions, natSort, newDropdown, numInputsToProcess, pivotUIOptions, pvtVals, subopts, unusedAttrsContainer, vals, _len4, _m, _n, _ref5;
1095
- subopts = {
1096
- derivedAttributes: opts.derivedAttributes,
1097
- localeStrings: opts.localeStrings,
1098
- rendererOptions: opts.rendererOptions,
1099
- cols: [],
1100
- rows: []
1101
- };
1102
- numInputsToProcess = (_ref5 = opts.aggregators[aggregator.val()]([])().numInputs) != null ? _ref5 : 0;
1103
- vals = [];
1104
- _this.find(".pvtRows li span.pvtAttr").each(function() {
1105
- return subopts.rows.push($(this).data("attrName"));
1106
- });
1107
- _this.find(".pvtCols li span.pvtAttr").each(function() {
1108
- return subopts.cols.push($(this).data("attrName"));
1109
- });
1110
- _this.find(".pvtVals select.pvtAttrDropdown").each(function() {
1111
- if (numInputsToProcess === 0) {
1112
- return $(this).remove();
1113
- } else {
1114
- numInputsToProcess--;
1115
- if ($(this).val() !== "") {
1116
- return vals.push($(this).val());
1117
- }
1118
- }
1119
- });
1120
- if (numInputsToProcess !== 0) {
1121
- pvtVals = _this.find(".pvtVals");
1122
- for (x = _m = 0; 0 <= numInputsToProcess ? _m < numInputsToProcess : _m > numInputsToProcess; x = 0 <= numInputsToProcess ? ++_m : --_m) {
1123
- newDropdown = $("<select class='pvtAttrDropdown'>").append($("<option>")).bind("change", function() {
1124
- return refresh();
1125
- });
1126
- for (_n = 0, _len4 = shownAttributes.length; _n < _len4; _n++) {
1127
- attr = shownAttributes[_n];
1128
- newDropdown.append($("<option>").val(attr).text(attr));
1129
- }
1130
- pvtVals.append(newDropdown);
1131
- }
1132
- }
1133
- if (initialRender) {
1134
- vals = opts.vals;
1135
- i = 0;
1136
- _this.find(".pvtVals select.pvtAttrDropdown").each(function() {
1137
- $(this).val(vals[i]);
1138
- return i++;
1139
- });
1140
- initialRender = false;
1141
- }
1142
- subopts.aggregatorName = aggregator.val();
1143
- subopts.vals = vals;
1144
- subopts.aggregator = opts.aggregators[aggregator.val()](vals);
1145
- subopts.renderer = opts.renderers[renderer.val()];
1146
- exclusions = {};
1147
- _this.find('input.pvtFilter').not(':checked').each(function() {
1148
- var filter;
1149
- filter = $(this).data("filter");
1150
- if (exclusions[filter[0]] != null) {
1151
- return exclusions[filter[0]].push(filter[1]);
1152
- } else {
1153
- return exclusions[filter[0]] = [filter[1]];
1154
- }
1155
- });
1156
- subopts.filter = function(record) {
1157
- var excludedItems, _ref6;
1158
- if (!opts.filter(record)) {
1159
- return false;
1160
- }
1161
- for (k in exclusions) {
1162
- excludedItems = exclusions[k];
1163
- if (_ref6 = "" + record[k], __indexOf.call(excludedItems, _ref6) >= 0) {
1164
- return false;
1165
- }
1166
- }
1167
- return true;
1168
- };
1169
- pivotTable.pivot(input, subopts);
1170
- pivotUIOptions = $.extend(opts, {
1171
- cols: subopts.cols,
1172
- rows: subopts.rows,
1173
- vals: vals,
1174
- exclusions: exclusions,
1175
- aggregatorName: aggregator.val(),
1176
- rendererName: renderer.val()
1177
- });
1178
- _this.data("pivotUIOptions", pivotUIOptions);
1179
- if (opts.autoSortUnusedAttrs) {
1180
- natSort = $.pivotUtilities.naturalSort;
1181
- unusedAttrsContainer = _this.find("td.pvtUnused.pvtAxisContainer");
1182
- $(unusedAttrsContainer).children("li").sort(function(a, b) {
1183
- return natSort($(a).text(), $(b).text());
1184
- }).appendTo(unusedAttrsContainer);
1185
- }
1186
- pivotTable.css("opacity", 1);
1187
- if (opts.onRefresh != null) {
1188
- return opts.onRefresh(pivotUIOptions);
1189
- }
1190
- };
1191
- })(this);
1192
- refresh = (function(_this) {
1193
- return function() {
1194
- pivotTable.css("opacity", 0.5);
1195
- return setTimeout(refreshDelayed, 10);
1196
- };
1197
- })(this);
1198
- refresh();
1199
- this.find(".pvtAxisContainer").sortable({
1200
- update: function(e, ui) {
1201
- if (ui.sender == null) {
1202
- return refresh();
1203
- }
1204
- },
1205
- connectWith: this.find(".pvtAxisContainer"),
1206
- items: 'li',
1207
- placeholder: 'pvtPlaceholder'
1208
- });
1209
- } catch (_error) {
1210
- e = _error;
1211
- if (typeof console !== "undefined" && console !== null) {
1212
- console.error(e.stack);
1213
- }
1214
- this.html(opts.localeStrings.uiRenderError);
1215
- }
1216
- return this;
1217
- };
1218
-
1219
- /*
1220
- Heatmap post-processing
1221
- */
1222
- $.fn.heatmap = function(scope) {
1223
- var colorGen, heatmapper, i, j, numCols, numRows, _i, _j;
1224
- if (scope == null) {
1225
- scope = "heatmap";
1226
- }
1227
- numRows = this.data("numrows");
1228
- numCols = this.data("numcols");
1229
- colorGen = function(color, min, max) {
1230
- var hexGen;
1231
- hexGen = (function() {
1232
- switch (color) {
1233
- case "red":
1234
- return function(hex) {
1235
- return "ff" + hex + hex;
1236
- };
1237
- case "green":
1238
- return function(hex) {
1239
- return "" + hex + "ff" + hex;
1240
- };
1241
- case "blue":
1242
- return function(hex) {
1243
- return "" + hex + hex + "ff";
1244
- };
1245
- }
1246
- })();
1247
- return function(x) {
1248
- var hex, intensity;
1249
- intensity = 255 - Math.round(255 * (x - min) / (max - min));
1250
- hex = intensity.toString(16).split(".")[0];
1251
- if (hex.length === 1) {
1252
- hex = 0 + hex;
1253
- }
1254
- return hexGen(hex);
1255
- };
1256
- };
1257
- heatmapper = (function(_this) {
1258
- return function(scope, color) {
1259
- var colorFor, forEachCell, values;
1260
- forEachCell = function(f) {
1261
- return _this.find(scope).each(function() {
1262
- var x;
1263
- x = $(this).data("value");
1264
- if ((x != null) && isFinite(x)) {
1265
- return f(x, $(this));
1266
- }
1267
- });
1268
- };
1269
- values = [];
1270
- forEachCell(function(x) {
1271
- return values.push(x);
1272
- });
1273
- colorFor = colorGen(color, Math.min.apply(Math, values), Math.max.apply(Math, values));
1274
- return forEachCell(function(x, elem) {
1275
- return elem.css("background-color", "#" + colorFor(x));
1276
- });
1277
- };
1278
- })(this);
1279
- switch (scope) {
1280
- case "heatmap":
1281
- heatmapper(".pvtVal", "red");
1282
- break;
1283
- case "rowheatmap":
1284
- for (i = _i = 0; 0 <= numRows ? _i < numRows : _i > numRows; i = 0 <= numRows ? ++_i : --_i) {
1285
- heatmapper(".pvtVal.row" + i, "red");
1286
- }
1287
- break;
1288
- case "colheatmap":
1289
- for (j = _j = 0; 0 <= numCols ? _j < numCols : _j > numCols; j = 0 <= numCols ? ++_j : --_j) {
1290
- heatmapper(".pvtVal.col" + j, "red");
1291
- }
1292
- }
1293
- heatmapper(".pvtTotal.rowTotal", "red");
1294
- heatmapper(".pvtTotal.colTotal", "red");
1295
- return this;
1296
- };
1297
-
1298
- /*
1299
- Barchart post-processing
1300
- */
1301
- return $.fn.barchart = function() {
1302
- var barcharter, i, numCols, numRows, _i;
1303
- numRows = this.data("numrows");
1304
- numCols = this.data("numcols");
1305
- barcharter = (function(_this) {
1306
- return function(scope) {
1307
- var forEachCell, max, scaler, values;
1308
- forEachCell = function(f) {
1309
- return _this.find(scope).each(function() {
1310
- var x;
1311
- x = $(this).data("value");
1312
- if ((x != null) && isFinite(x)) {
1313
- return f(x, $(this));
1314
- }
1315
- });
1316
- };
1317
- values = [];
1318
- forEachCell(function(x) {
1319
- return values.push(x);
1320
- });
1321
- max = Math.max.apply(Math, values);
1322
- scaler = function(x) {
1323
- return 100 * x / (1.4 * max);
1324
- };
1325
- return forEachCell(function(x, elem) {
1326
- var text, wrapper;
1327
- text = elem.text();
1328
- wrapper = $("<div>").css({
1329
- "position": "relative",
1330
- "height": "55px"
1331
- });
1332
- wrapper.append($("<div>").css({
1333
- "position": "absolute",
1334
- "bottom": 0,
1335
- "left": 0,
1336
- "right": 0,
1337
- "height": scaler(x) + "%",
1338
- "background-color": "gray"
1339
- }));
1340
- wrapper.append($("<div>").text(text).css({
1341
- "position": "relative",
1342
- "padding-left": "5px",
1343
- "padding-right": "5px"
1344
- }));
1345
- return elem.css({
1346
- "padding": 0,
1347
- "padding-top": "5px",
1348
- "text-align": "center"
1349
- }).html(wrapper);
1350
- });
1351
- };
1352
- })(this);
1353
- for (i = _i = 0; 0 <= numRows ? _i < numRows : _i > numRows; i = 0 <= numRows ? ++_i : --_i) {
1354
- barcharter(".pvtVal.row" + i);
1355
- }
1356
- barcharter(".pvtTotal.colTotal");
1357
- return this;
1358
- };
1359
- });
1360
-
1361
- }).call(this);
1362
-
1363
- //# sourceMappingURL=pivot.js.map