@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.
- package/dist/config/westnetz-integral7/integral7-load.config.js.map +1 -1
- package/dist/config/westnetz-neplan/neplan-load.config.js +6 -1
- package/dist/config/westnetz-neplan/neplan-load.config.js.map +1 -1
- package/dist/constants/cim-class-definition.js +19 -0
- package/dist/constants/cim-class-definition.js.map +1 -1
- package/dist/constants/cim-class-names.d.ts +10 -0
- package/dist/constants/cim-class-names.js +10 -0
- package/dist/constants/cim-class-names.js.map +1 -1
- package/dist/constants/init-data/ASSET_HEALTH_EVENTS.js +10 -0
- package/dist/constants/init-data/ASSET_HEALTH_EVENTS.js.map +1 -1
- package/dist/constants/init-data/PSR_TYPES.js +17 -0
- package/dist/constants/init-data/PSR_TYPES.js.map +1 -1
- package/dist/converter/cgmes-validator.d.ts +5 -0
- package/dist/converter/cgmes-validator.js +23 -0
- package/dist/converter/cgmes-validator.js.map +1 -0
- package/dist/converter/integral7/ConverterIntegral7.d.ts +26 -19
- package/dist/converter/integral7/ConverterIntegral7.js +595 -272
- package/dist/converter/integral7/ConverterIntegral7.js.map +1 -1
- package/dist/converter/integral7/model/integral/BaseClass.d.ts +1 -0
- package/dist/converter/integral7/model/integral/BaseClass.js.map +1 -1
- package/dist/converter/integral7/model/interfaces.d.ts +36 -0
- package/dist/converter/integral7/sql/integral.sql.d.ts +10 -0
- package/dist/converter/integral7/sql/integral.sql.js +25 -1
- package/dist/converter/integral7/sql/integral.sql.js.map +1 -1
- package/dist/converter/integral7/utils.d.ts +3 -0
- package/dist/converter/integral7/utils.js +81 -17
- package/dist/converter/integral7/utils.js.map +1 -1
- package/dist/etl-neplan/etl-neplan-csv.d.ts +37 -0
- package/dist/etl-neplan/etl-neplan-csv.js +243 -0
- package/dist/etl-neplan/etl-neplan-csv.js.map +1 -0
- package/dist/etl-neplan/etl-neplan-geo.d.ts +12 -0
- package/dist/etl-neplan/etl-neplan-geo.js +74 -0
- package/dist/etl-neplan/etl-neplan-geo.js.map +1 -0
- package/dist/etl-neplan/neplan-contingency-analysis.js +0 -20
- package/dist/etl-neplan/neplan-contingency-analysis.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/default-values-config.d.ts +171 -0
- package/dist/interfaces/default-values-config.js +3 -0
- package/dist/interfaces/default-values-config.js.map +1 -0
- package/dist/interfaces/model/common/ILocation.d.ts +15 -0
- package/dist/interfaces/model/common/ILocation.js +3 -0
- package/dist/interfaces/model/common/ILocation.js.map +1 -0
- package/dist/interfaces/model/core/IIdentifiedObject.d.ts +3 -0
- package/dist/interfaces/model/wires/IACLineSegment.d.ts +10 -0
- package/dist/interfaces/model/wires/IConductor.d.ts +2 -1
- package/dist/model/assets/Asset.d.ts +12 -5
- package/dist/model/assets/Asset.js +86 -21
- package/dist/model/assets/Asset.js.map +1 -1
- package/dist/model/assets/LifecycleDate.d.ts +1 -0
- package/dist/model/assets/LifecycleDate.js +9 -1
- package/dist/model/assets/LifecycleDate.js.map +1 -1
- package/dist/model/common/CoordinateSystem.d.ts +3 -1
- package/dist/model/common/CoordinateSystem.js +13 -1
- package/dist/model/common/CoordinateSystem.js.map +1 -1
- package/dist/model/common/Location.d.ts +5 -3
- package/dist/model/common/Location.js +17 -11
- package/dist/model/common/Location.js.map +1 -1
- package/dist/model/common/PositionPoint.d.ts +9 -3
- package/dist/model/common/PositionPoint.js +23 -1
- package/dist/model/common/PositionPoint.js.map +1 -1
- package/dist/model/common/Status.d.ts +2 -1
- package/dist/model/common/Status.js +9 -1
- package/dist/model/common/Status.js.map +1 -1
- package/dist/model/core/ACDCTerminal.d.ts +2 -0
- package/dist/model/core/ACDCTerminal.js +9 -1
- package/dist/model/core/ACDCTerminal.js.map +1 -1
- package/dist/model/core/BaseVoltage.js.map +1 -1
- package/dist/model/core/Bay.js.map +1 -1
- package/dist/model/core/GeographicalRegion.js.map +1 -1
- package/dist/model/core/IdentifiedObject.d.ts +3 -1
- package/dist/model/core/IdentifiedObject.js +42 -21
- package/dist/model/core/IdentifiedObject.js.map +1 -1
- package/dist/model/core/PowerSystemResource.js.map +1 -1
- package/dist/model/core/SubGeographicalRegion.js.map +1 -1
- package/dist/model/core/Substation.d.ts +1 -0
- package/dist/model/core/Substation.js +3 -2
- package/dist/model/core/Substation.js.map +1 -1
- package/dist/model/core/Terminal.d.ts +3 -1
- package/dist/model/core/Terminal.js +14 -14
- package/dist/model/core/Terminal.js.map +1 -1
- package/dist/model/core/VoltageLevel.js +4 -2
- package/dist/model/core/VoltageLevel.js.map +1 -1
- package/dist/model/dc/ACDCConverter.d.ts +3 -0
- package/dist/model/dc/ACDCConverter.js +56 -14
- package/dist/model/dc/ACDCConverter.js.map +1 -1
- package/dist/model/dc/ACDCConverterDCTerminal.js +2 -6
- package/dist/model/dc/ACDCConverterDCTerminal.js.map +1 -1
- package/dist/model/dc/CsConverter.d.ts +2 -0
- package/dist/model/dc/CsConverter.js +45 -17
- package/dist/model/dc/CsConverter.js.map +1 -1
- package/dist/model/dc/DCConverterUnit.d.ts +2 -0
- package/dist/model/dc/DCConverterUnit.js +13 -7
- package/dist/model/dc/DCConverterUnit.js.map +1 -1
- package/dist/model/dc/DCLine.js.map +1 -1
- package/dist/model/dc/DCLineSegment.js +4 -8
- package/dist/model/dc/DCLineSegment.js.map +1 -1
- package/dist/model/dc/VsConverter.d.ts +2 -0
- package/dist/model/dc/VsConverter.js +53 -5
- package/dist/model/dc/VsConverter.js.map +1 -1
- package/dist/model/equivalents/EquivalentBranch.d.ts +2 -0
- package/dist/model/equivalents/EquivalentBranch.js +63 -0
- package/dist/model/equivalents/EquivalentBranch.js.map +1 -1
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js +0 -3
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js.map +1 -1
- package/dist/model/extensions/enervance/wires/EVACLineSegment.d.ts +16 -0
- package/{src/model/wires/PetersenCoil.ts → dist/model/extensions/enervance/wires/EVACLineSegment.js} +43 -47
- package/dist/model/extensions/enervance/wires/EVACLineSegment.js.map +1 -0
- package/dist/model/extensions/enervance/wires/EVACLineSubSegment.d.ts +25 -0
- package/dist/model/extensions/enervance/wires/EVACLineSubSegment.js +126 -0
- package/dist/model/extensions/enervance/wires/EVACLineSubSegment.js.map +1 -0
- package/dist/model/extensions/neplan-westnetz/assets/WNFacility.js +4 -12
- package/dist/model/extensions/neplan-westnetz/assets/WNFacility.js.map +1 -1
- package/dist/model/extensions/neplan-westnetz/common/WNLocation.d.ts +18 -0
- package/dist/model/extensions/neplan-westnetz/common/WNLocation.js +82 -0
- package/dist/model/extensions/neplan-westnetz/common/WNLocation.js.map +1 -0
- package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.d.ts +5 -0
- package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.js +23 -0
- package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.js.map +1 -1
- package/dist/model/generation/GeneratingUnit.d.ts +2 -0
- package/dist/model/generation/GeneratingUnit.js +23 -0
- package/dist/model/generation/GeneratingUnit.js.map +1 -1
- package/dist/model/generation/ThermalGeneratingUnit.js.map +1 -1
- package/dist/model/loadmodel/ConformLoad.d.ts +6 -1
- package/dist/model/loadmodel/ConformLoad.js +48 -3
- package/dist/model/loadmodel/ConformLoad.js.map +1 -1
- package/dist/model/loadmodel/ConformLoadGroup.d.ts +7 -0
- package/dist/model/loadmodel/ConformLoadGroup.js +48 -0
- package/dist/model/loadmodel/ConformLoadGroup.js.map +1 -0
- package/dist/model/loadmodel/EnergyArea.d.ts +3 -0
- package/dist/model/loadmodel/EnergyArea.js +8 -0
- package/dist/model/loadmodel/EnergyArea.js.map +1 -0
- package/dist/model/loadmodel/LoadArea.d.ts +10 -0
- package/dist/model/loadmodel/LoadArea.js +51 -0
- package/dist/model/loadmodel/LoadArea.js.map +1 -0
- package/dist/model/loadmodel/LoadGroup.d.ts +8 -0
- package/dist/model/loadmodel/LoadGroup.js +21 -0
- package/dist/model/loadmodel/LoadGroup.js.map +1 -0
- package/dist/model/loadmodel/SubLoadArea.d.ts +14 -0
- package/dist/model/loadmodel/SubLoadArea.js +63 -0
- package/dist/model/loadmodel/SubLoadArea.js.map +1 -0
- package/dist/model/model/Model.d.ts +40 -11
- package/dist/model/model/Model.js +100 -6
- package/dist/model/model/Model.js.map +1 -1
- package/dist/model/operationallimits/CurrentLimit.js.map +1 -1
- package/dist/model/operationallimits/OperationalLimitSet.js.map +1 -1
- package/dist/model/wires/ACLineSegment.d.ts +6 -2
- package/dist/model/wires/ACLineSegment.js +51 -44
- package/dist/model/wires/ACLineSegment.js.map +1 -1
- package/dist/model/wires/AsynchronousMachine.d.ts +2 -1
- package/dist/model/wires/AsynchronousMachine.js +34 -34
- package/dist/model/wires/AsynchronousMachine.js.map +1 -1
- package/dist/model/wires/BusbarSection.d.ts +2 -0
- package/dist/model/wires/BusbarSection.js +6 -0
- package/dist/model/wires/BusbarSection.js.map +1 -1
- package/dist/model/wires/Conductor.d.ts +4 -1
- package/dist/model/wires/Conductor.js +15 -6
- package/dist/model/wires/Conductor.js.map +1 -1
- package/dist/model/wires/EnergyConsumer.d.ts +6 -2
- package/dist/model/wires/EnergyConsumer.js +24 -3
- package/dist/model/wires/EnergyConsumer.js.map +1 -1
- package/dist/model/wires/EnergySource.d.ts +8 -4
- package/dist/model/wires/EnergySource.js +37 -21
- package/dist/model/wires/EnergySource.js.map +1 -1
- package/dist/model/wires/ExternalNetworkInjection.d.ts +2 -0
- package/dist/model/wires/ExternalNetworkInjection.js +81 -1
- package/dist/model/wires/ExternalNetworkInjection.js.map +1 -1
- package/dist/model/wires/Line.js.map +1 -1
- package/dist/model/wires/LinearShuntCompensator.d.ts +15 -0
- package/dist/model/wires/LinearShuntCompensator.js +96 -0
- package/dist/model/wires/LinearShuntCompensator.js.map +1 -0
- package/dist/model/wires/PowerTransformer.js +0 -3
- package/dist/model/wires/PowerTransformer.js.map +1 -1
- package/dist/model/wires/PowerTransformerEnd.js.map +1 -1
- package/dist/model/wires/RatioTapChanger.js.map +1 -1
- package/dist/model/wires/RatioTapChangerTable.js.map +1 -1
- package/dist/model/wires/RegulatingCondEq.d.ts +3 -0
- package/dist/model/wires/RegulatingCondEq.js +17 -6
- package/dist/model/wires/RegulatingCondEq.js.map +1 -1
- package/dist/model/wires/RegulatingControl.d.ts +2 -0
- package/dist/model/wires/RegulatingControl.js +43 -7
- package/dist/model/wires/RegulatingControl.js.map +1 -1
- package/dist/model/wires/RotatingMachine.d.ts +2 -0
- package/dist/model/wires/RotatingMachine.js +17 -0
- package/dist/model/wires/RotatingMachine.js.map +1 -1
- package/dist/model/wires/SeriesCompensator.d.ts +2 -1
- package/dist/model/wires/SeriesCompensator.js +42 -42
- package/dist/model/wires/SeriesCompensator.js.map +1 -1
- package/dist/model/wires/ShuntCompensator.d.ts +17 -0
- package/dist/model/wires/ShuntCompensator.js +50 -0
- package/dist/model/wires/ShuntCompensator.js.map +1 -0
- package/dist/model/wires/SynchronousMachine.d.ts +2 -0
- package/dist/model/wires/SynchronousMachine.js +70 -5
- package/dist/model/wires/SynchronousMachine.js.map +1 -1
- package/dist/model/wires/TapChangerControl.js.map +1 -1
- package/dist/util/utils.d.ts +8 -1
- package/dist/util/utils.js +13 -38
- package/dist/util/utils.js.map +1 -1
- package/dist/util/xml/xml.serializer.d.ts +3 -1
- package/dist/util/xml/xml.serializer.js +46 -45
- package/dist/util/xml/xml.serializer.js.map +1 -1
- package/package.json +4 -1
- package/.nycrc +0 -28
- package/jasmine/jasmine_all.json +0 -13
- package/jasmine/jasmine_fuseki_interface.json +0 -13
- package/jasmine/jasmine_fuseki_psdm.json +0 -13
- package/jasmine/jasmine_integral_7.json +0 -13
- package/jasmine/jasmine_psdm.json +0 -13
- package/src/config/lew-sincal/lew-sincal-load.config.ts +0 -58
- package/src/config/power-system-datamodel/psdm-load.config.ts +0 -57
- package/src/config/westnetz-integral7/integral7-load.config.ts +0 -53
- package/src/config/westnetz-neplan/callbacks/cb-connectivitynode.ts +0 -159
- package/src/config/westnetz-neplan/callbacks/cb-psr.ts +0 -30
- package/src/config/westnetz-neplan/callbacks/cb-wnenergyconsumer.ts +0 -70
- package/src/config/westnetz-neplan/neplan-load.config.ts +0 -131
- package/src/config/westnetz-neplan/property-handler-westenergy.config.ts +0 -52
- package/src/constants/cim-class-definition.ts +0 -169
- package/src/constants/cim-class-names.ts +0 -118
- package/src/constants/cim-constants.ts +0 -5
- package/src/constants/init-data/ASSET_HEALTH_EVENTS.ts +0 -45
- package/src/constants/init-data/ASSSET_OWNER.ts +0 -11
- package/src/constants/init-data/JENA_SPARQL.ts +0 -328
- package/src/constants/init-data/PSR_TYPES.ts +0 -75
- package/src/constants/init-data/xml/AssetHealtEvent.xml +0 -45
- package/src/constants/init-data/xml/AssetOwner.xml +0 -11
- package/src/constants/init-data/xml/PsrType.xml +0 -80
- package/src/constants/rdf-xml.ts +0 -52
- package/src/converter/PSDM/ConverterPowerSystemDataModel.ts +0 -546
- package/src/converter/PSDM/model/FixedFeedIn.ts +0 -28
- package/src/converter/PSDM/model/Line.ts +0 -39
- package/src/converter/PSDM/model/LineType.ts +0 -29
- package/src/converter/PSDM/model/Load.ts +0 -38
- package/src/converter/PSDM/model/Node.ts +0 -16
- package/src/converter/PSDM/model/TimeSeriesMapping.ts +0 -13
- package/src/converter/PSDM/model/Transformer.ts +0 -34
- package/src/converter/PSDM/model/TransformerType.ts +0 -49
- package/src/converter/PSDM/model/geo/Crs.ts +0 -4
- package/src/converter/PSDM/model/geo/GeoPosition.ts +0 -7
- package/src/converter/integral7/ConverterIntegral7.ts +0 -3916
- package/src/converter/integral7/config/db-config.ts +0 -13
- package/src/converter/integral7/config/generation-unit-fuel-types.ts +0 -51
- package/src/converter/integral7/config/integral-prefix.ts +0 -20
- package/src/converter/integral7/model/integral/BaseClass.ts +0 -28
- package/src/converter/integral7/model/integral/BaseClassNsg.ts +0 -21
- package/src/converter/integral7/model/integral/Hgueleitung.ts +0 -12
- package/src/converter/integral7/model/integral/KnotenSo.ts +0 -41
- package/src/converter/integral7/model/integral/KnotenSoNsg.ts +0 -24
- package/src/converter/integral7/model/integral/Kopfstation.ts +0 -46
- package/src/converter/integral7/model/integral/Leitung.ts +0 -73
- package/src/converter/integral7/model/integral/LeitungNsg.ts +0 -46
- package/src/converter/integral7/model/integral/Point.ts +0 -14
- package/src/converter/integral7/model/integral/Schaltanlage.ts +0 -151
- package/src/converter/integral7/model/integral/SchaltanlageNSG.ts +0 -30
- package/src/converter/integral7/model/integral/Schaltanlagenabschnitt.ts +0 -44
- package/src/converter/integral7/model/integral/SchaltanlagenabschnittNsg.ts +0 -27
- package/src/converter/integral7/model/integral/Schaltfeld.ts +0 -116
- package/src/converter/integral7/model/integral/SchaltfeldNsg.ts +0 -35
- package/src/converter/integral7/model/integral/Standort.ts +0 -53
- package/src/converter/integral7/model/integral/StandortNsg.ts +0 -24
- package/src/converter/integral7/model/integral/Trafo2w.ts +0 -22
- package/src/converter/integral7/model/integral/Trafo2wNsg.ts +0 -13
- package/src/converter/integral7/model/interfaces.ts +0 -450
- package/src/converter/integral7/sql/integral.sql.ts +0 -345
- package/src/converter/integral7/utils-schema.ts +0 -50
- package/src/converter/integral7/utils-trafo3w.ts +0 -321
- package/src/converter/integral7/utils.ts +0 -693
- package/src/etl-neplan/etl-neplan-contingency-analysis.ts +0 -188
- package/src/etl-neplan/etl-neplan-feederline.ts +0 -229
- package/src/etl-neplan/etl-neplan.ts +0 -344
- package/src/etl-neplan/neplan-contingency-analysis.ts +0 -571
- package/src/graph/Types.ts +0 -7
- package/src/graph/connections/connection.ts +0 -29
- package/src/graph/edges/edge.ts +0 -27
- package/src/graph/graph-interfaces.ts +0 -21
- package/src/graph/graph-util.ts +0 -158
- package/src/graph/graph.ts +0 -84
- package/src/graph/nodes/node.ts +0 -43
- package/src/index.ts +0 -307
- package/src/interfaces/model/assets/IAsset.ts +0 -5
- package/src/interfaces/model/assets/IAssetContainer.ts +0 -5
- package/src/interfaces/model/assets/IFacility.ts +0 -5
- package/src/interfaces/model/common/IDocument.ts +0 -5
- package/src/interfaces/model/core/IACDCTerminal.ts +0 -8
- package/src/interfaces/model/core/IBaseVoltage.ts +0 -7
- package/src/interfaces/model/core/IConductingEquipment.ts +0 -16
- package/src/interfaces/model/core/IConnectivityNode.ts +0 -27
- package/src/interfaces/model/core/IConnectivityNodeContainer.ts +0 -11
- package/src/interfaces/model/core/IEquipment.ts +0 -11
- package/src/interfaces/model/core/IEquipmentContainer.ts +0 -12
- package/src/interfaces/model/core/IFeeder.ts +0 -21
- package/src/interfaces/model/core/IIdentifiedObject.ts +0 -108
- package/src/interfaces/model/core/IPowerSystemResource.ts +0 -3
- package/src/interfaces/model/core/ISubstation.ts +0 -8
- package/src/interfaces/model/core/ITerminal.ts +0 -57
- package/src/interfaces/model/core/IVoltageLevel.ts +0 -14
- package/src/interfaces/model/diagram/IDiagram.ts +0 -21
- package/src/interfaces/model/diagram/IDiagramObject.ts +0 -21
- package/src/interfaces/model/diagram/IDiagramObjectPoint.ts +0 -16
- package/src/interfaces/model/domain/IActivePower.ts +0 -3
- package/src/interfaces/model/domain/IAngleDegrees.ts +0 -3
- package/src/interfaces/model/domain/IApparentPower.ts +0 -3
- package/src/interfaces/model/domain/ICurrentFlow.ts +0 -3
- package/src/interfaces/model/domain/IDataType.ts +0 -9
- package/src/interfaces/model/domain/IReactivePower.ts +0 -3
- package/src/interfaces/model/domain/IVoltage.ts +0 -3
- package/src/interfaces/model/domain/UnitMultiplier.ts +0 -13
- package/src/interfaces/model/domain/UnitSymbol.ts +0 -30
- package/src/interfaces/model/enums/EnumShapeInfo.ts +0 -5
- package/src/interfaces/model/faults/IFault.ts +0 -11
- package/src/interfaces/model/model/IModel.ts +0 -91
- package/src/interfaces/model/operations/IOutage.ts +0 -23
- package/src/interfaces/model/operations/ISwitchingAction.ts +0 -9
- package/src/interfaces/model/operations/ISwitchingPlan.ts +0 -26
- package/src/interfaces/model/statevariables/ISvPowerFlow.ts +0 -20
- package/src/interfaces/model/statevariables/ISvVoltage.ts +0 -16
- package/src/interfaces/model/topology/ITopologicalIsland.ts +0 -11
- package/src/interfaces/model/topology/ITopologicalNode.ts +0 -24
- package/src/interfaces/model/wires/IACLineSegment.ts +0 -4
- package/src/interfaces/model/wires/IBusbarSection.ts +0 -4
- package/src/interfaces/model/wires/ICompositeSwitch.ts +0 -6
- package/src/interfaces/model/wires/IConductor.ts +0 -6
- package/src/interfaces/model/wires/IConnector.ts +0 -5
- package/src/interfaces/model/wires/IDisconnector.ts +0 -4
- package/src/interfaces/model/wires/IEnergyConsumer.ts +0 -7
- package/src/interfaces/model/wires/IEnergySource.ts +0 -20
- package/src/interfaces/model/wires/IExternalNetworkInjection.ts +0 -34
- package/src/interfaces/model/wires/ILoadBreakSwitch.ts +0 -4
- package/src/interfaces/model/wires/IPowerTransformer.ts +0 -7
- package/src/interfaces/model/wires/IPowerTransformerEnd.ts +0 -10
- package/src/interfaces/model/wires/IProtectedSwitch.ts +0 -4
- package/src/interfaces/model/wires/IRegulatingCondEq.ts +0 -4
- package/src/interfaces/model/wires/ISwitch.ts +0 -11
- package/src/interfaces/model/wires/ITransformerEnd.ts +0 -14
- package/src/interfaces/observable/IObservable.ts +0 -6
- package/src/interfaces/observable/IObserver.ts +0 -3
- package/src/interfaces/persistence-interfaces.ts +0 -12
- package/src/interfaces/schema-settings/ShapeInfos.ts +0 -28
- package/src/model/assetinfo/AssetInfo.ts +0 -13
- package/src/model/assetinfo/CableInfo.ts +0 -8
- package/src/model/assetinfo/OverheadWireInfo.ts +0 -8
- package/src/model/assetinfo/PowerTransformer2WInfo.ts +0 -13
- package/src/model/assetinfo/PowerTransformer3WInfo.ts +0 -18
- package/src/model/assetinfo/PowerTransformerInfo.ts +0 -14
- package/src/model/assetinfo/TapChangerInfo.ts +0 -60
- package/src/model/assetinfo/TransformerEndInfo.ts +0 -38
- package/src/model/assetinfo/WireInfo.ts +0 -22
- package/src/model/assets/AggregateScore.ts +0 -9
- package/src/model/assets/AnalyticScore.ts +0 -41
- package/src/model/assets/Asset.ts +0 -164
- package/src/model/assets/AssetContainer.ts +0 -11
- package/src/model/assets/AssetDeployment.ts +0 -122
- package/src/model/assets/AssetHealthEvent.ts +0 -73
- package/src/model/assets/AssetOrganisationRole.ts +0 -51
- package/src/model/assets/AssetOwner.ts +0 -54
- package/src/model/assets/DeploymentDate.ts +0 -20
- package/src/model/assets/DeploymentStateKind.ts +0 -7
- package/src/model/assets/Facility.ts +0 -107
- package/src/model/assets/FacilityKind.ts +0 -9
- package/src/model/assets/HealthScore.ts +0 -59
- package/src/model/assets/LifecycleDate.ts +0 -17
- package/src/model/assets/RiskScore.ts +0 -7
- package/src/model/assets/TransformerApplicationKind.ts +0 -6
- package/src/model/common/ActivityRecord.ts +0 -93
- package/src/model/common/CoordinateSystem.ts +0 -81
- package/src/model/common/Document.ts +0 -9
- package/src/model/common/Location.ts +0 -237
- package/src/model/common/OrganisationRole.ts +0 -7
- package/src/model/common/PositionPoint.ts +0 -121
- package/src/model/common/Status.ts +0 -11
- package/src/model/core/ACDCTerminal.ts +0 -63
- package/src/model/core/BaseVoltage.ts +0 -129
- package/src/model/core/Bay.ts +0 -178
- package/src/model/core/ConductingEquipment.ts +0 -182
- package/src/model/core/ConnectivityNode.ts +0 -417
- package/src/model/core/ConnectivityNodeContainer.ts +0 -26
- package/src/model/core/Curve.ts +0 -55
- package/src/model/core/CurveData.ts +0 -74
- package/src/model/core/CurveStyle.ts +0 -4
- package/src/model/core/Equipment.ts +0 -184
- package/src/model/core/EquipmentContainer.ts +0 -40
- package/src/model/core/Feeder.ts +0 -186
- package/src/model/core/GeographicalRegion.ts +0 -34
- package/src/model/core/IdentifiedObject.ts +0 -393
- package/src/model/core/PSRType.ts +0 -164
- package/src/model/core/PhaseCode.ts +0 -23
- package/src/model/core/PowerSystemResource.ts +0 -109
- package/src/model/core/SubGeographicalRegion.ts +0 -58
- package/src/model/core/Substation.ts +0 -290
- package/src/model/core/Terminal.ts +0 -422
- package/src/model/core/VoltageLevel.ts +0 -192
- package/src/model/dc/ACDCConverter.ts +0 -66
- package/src/model/dc/ACDCConverterDCTerminal.ts +0 -64
- package/src/model/dc/CsConverter.ts +0 -68
- package/src/model/dc/CsOperatingModeKind.ts +0 -4
- package/src/model/dc/CsPpccControlKind.ts +0 -5
- package/src/model/dc/DCBaseTerminal.ts +0 -30
- package/src/model/dc/DCConductingEquipment.ts +0 -8
- package/src/model/dc/DCConverterOperatingModeKind.ts +0 -6
- package/src/model/dc/DCConverterUnit.ts +0 -60
- package/src/model/dc/DCEquipmentContainer.ts +0 -8
- package/src/model/dc/DCLine.ts +0 -56
- package/src/model/dc/DCLineSegment.ts +0 -81
- package/src/model/dc/DCNode.ts +0 -49
- package/src/model/dc/DCPolarityKind.ts +0 -5
- package/src/model/dc/DCTerminal.ts +0 -45
- package/src/model/dc/VsConverter.ts +0 -48
- package/src/model/dc/VsPpccControlKind.ts +0 -7
- package/src/model/dc/VsQpccControlKind.ts +0 -5
- package/src/model/diagram/Diagram.ts +0 -136
- package/src/model/diagram/DiagramObject.ts +0 -338
- package/src/model/diagram/DiagramObjectPoint.ts +0 -196
- package/src/model/diagram/DiagramStyle.ts +0 -32
- package/src/model/diagram/OrientationKind.ts +0 -4
- package/src/model/domain/ActivePower.ts +0 -14
- package/src/model/domain/AngleDegrees.ts +0 -14
- package/src/model/domain/ApparentPower.ts +0 -14
- package/src/model/domain/Capacitance.ts +0 -15
- package/src/model/domain/CapacitancePerLength.ts +0 -15
- package/src/model/domain/ConductancePerLength.ts +0 -14
- package/src/model/domain/CurrentFlow.ts +0 -14
- package/src/model/domain/Reactance.ts +0 -15
- package/src/model/domain/ReactancePerLength.ts +0 -14
- package/src/model/domain/ReactivePower.ts +0 -14
- package/src/model/domain/Resistance.ts +0 -14
- package/src/model/domain/ResistancePerLength.ts +0 -14
- package/src/model/domain/UnitMultiplier.ts +0 -13
- package/src/model/domain/UnitSymbol.ts +0 -30
- package/src/model/domain/Voltage.ts +0 -14
- package/src/model/equivalents/EquivalentBranch.ts +0 -203
- package/src/model/equivalents/EquivalentEquipment.ts +0 -8
- package/src/model/extensions/amprion/core/AMPRIONBay.ts +0 -106
- package/src/model/extensions/amprion/core/AMPRIONConnectivityNode.ts +0 -51
- package/src/model/extensions/amprion/model/AmprionModel.ts +0 -92
- package/src/model/extensions/amprion/project/AMPRIONConstructionProject.ts +0 -174
- package/src/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.ts +0 -89
- package/src/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.ts +0 -64
- package/src/model/extensions/amprion/project/AMPRIONErpProject.ts +0 -21
- package/src/model/extensions/amprion/project/AMPRIONErpProjectPhase.ts +0 -89
- package/src/model/extensions/amprion/project/AMPRIONErpProjectStructure.ts +0 -36
- package/src/model/extensions/amprion/project/AMPRIONProjectPriorityKind.ts +0 -5
- package/src/model/extensions/amprion/wires/AMPRIONSeriesCompensator.ts +0 -53
- package/src/model/extensions/enervance/assets/EVImportanceScore.ts +0 -58
- package/src/model/extensions/enervance/core/EVTerminal.ts +0 -63
- package/src/model/extensions/enervance/operations/EVTerminalAction.ts +0 -144
- package/src/model/extensions/neplan-westnetz/assets/WNFacility.ts +0 -121
- package/src/model/extensions/neplan-westnetz/core/WNConnectivityNode.ts +0 -344
- package/src/model/extensions/neplan-westnetz/core/WNFeeder.ts +0 -133
- package/src/model/extensions/neplan-westnetz/faults/WNFaultConnectivityNode.ts +0 -113
- package/src/model/extensions/neplan-westnetz/operations/WNOutage.ts +0 -111
- package/src/model/extensions/neplan-westnetz/wires/WNEnergyConsumer.ts +0 -451
- package/src/model/faults/EquipmentFault.ts +0 -9
- package/src/model/faults/Fault.ts +0 -41
- package/src/model/faults/LineFault.ts +0 -10
- package/src/model/generation/FossilFuel.ts +0 -53
- package/src/model/generation/FuelType.ts +0 -8
- package/src/model/generation/GeneratingUnit.ts +0 -157
- package/src/model/generation/GeneratorControlSource.ts +0 -6
- package/src/model/generation/HydroEnergyConversionKind.ts +0 -4
- package/src/model/generation/HydroGeneratingUnit.ts +0 -14
- package/src/model/generation/HydroPlantStorageKind.ts +0 -5
- package/src/model/generation/HydroPowerPlant.ts +0 -13
- package/src/model/generation/HydroPump.ts +0 -13
- package/src/model/generation/NuclearGeneratingUnit.ts +0 -8
- package/src/model/generation/SolarGeneratingUnit.ts +0 -8
- package/src/model/generation/ThermalGeneratingUnit.ts +0 -42
- package/src/model/generation/WindGenUnitKind.ts +0 -4
- package/src/model/generation/WindGeneratingUnit.ts +0 -84
- package/src/model/loadmodel/ConformLoad.ts +0 -34
- package/src/model/model/Model.ts +0 -1253
- package/src/model/operationallimits/CurrentLimit.ts +0 -92
- package/src/model/operationallimits/ENTSOEOperationalLimitType.ts +0 -5
- package/src/model/operationallimits/LimitTypeKind.ts +0 -9
- package/src/model/operationallimits/OperationalLimit.ts +0 -68
- package/src/model/operationallimits/OperationalLimitDirectionKind.ts +0 -5
- package/src/model/operationallimits/OperationalLimitSet.ts +0 -124
- package/src/model/operationallimits/OperationalLimitType.ts +0 -94
- package/src/model/operations/Outage.ts +0 -68
- package/src/model/operations/SwitchAction.ts +0 -121
- package/src/model/operations/SwitchActionKind.ts +0 -6
- package/src/model/operations/SwitchingAction.ts +0 -43
- package/src/model/operations/SwitchingPlan.ts +0 -141
- package/src/model/operations/UnplannedOutage.ts +0 -9
- package/src/model/statevariables/StateVariable.ts +0 -28
- package/src/model/statevariables/SvPowerFlow.ts +0 -75
- package/src/model/statevariables/SvStatus.ts +0 -51
- package/src/model/statevariables/SvTapStep.ts +0 -54
- package/src/model/statevariables/SvVoltage.ts +0 -74
- package/src/model/topology/TopologicalIsland.ts +0 -57
- package/src/model/topology/TopologicalNode.ts +0 -203
- package/src/model/wires/ACLineSegment.ts +0 -309
- package/src/model/wires/AsynchronousMachine.ts +0 -93
- package/src/model/wires/AsynchronousMachineKind.ts +0 -5
- package/src/model/wires/Breaker.ts +0 -82
- package/src/model/wires/BusbarSection.ts +0 -70
- package/src/model/wires/Clamp.ts +0 -33
- package/src/model/wires/CompositeSwitch.ts +0 -13
- package/src/model/wires/Conductor.ts +0 -55
- package/src/model/wires/Connector.ts +0 -16
- package/src/model/wires/Cut.ts +0 -7
- package/src/model/wires/Disconnector.ts +0 -120
- package/src/model/wires/EarthFaultCompensator.ts +0 -20
- package/src/model/wires/EnergyConsumer.ts +0 -255
- package/src/model/wires/EnergySource.ts +0 -337
- package/src/model/wires/ExternalNetworkInjection.ts +0 -276
- package/src/model/wires/Ground.ts +0 -40
- package/src/model/wires/GroundDisconnector.ts +0 -39
- package/src/model/wires/Jumper.ts +0 -8
- package/src/model/wires/Junction.ts +0 -57
- package/src/model/wires/Line.ts +0 -117
- package/src/model/wires/LoadBreakSwitch.ts +0 -107
- package/src/model/wires/PetersenCoilModeKind.ts +0 -5
- package/src/model/wires/Plant.ts +0 -12
- package/src/model/wires/PowerTransformer.ts +0 -231
- package/src/model/wires/PowerTransformerEnd.ts +0 -168
- package/src/model/wires/ProtectedSwitch.ts +0 -9
- package/src/model/wires/RatioTapChanger.ts +0 -96
- package/src/model/wires/RatioTapChangerTable.ts +0 -35
- package/src/model/wires/RatioTapChangerTablePoint.ts +0 -45
- package/src/model/wires/ReactiveCapabilityCurve.ts +0 -35
- package/src/model/wires/Recloser.ts +0 -32
- package/src/model/wires/RegulatingCondEq.ts +0 -67
- package/src/model/wires/RegulatingControl.ts +0 -217
- package/src/model/wires/RegulatingControlModeKind.ts +0 -11
- package/src/model/wires/RotatingMachine.ts +0 -172
- package/src/model/wires/SeriesCompensator.ts +0 -166
- package/src/model/wires/ShortCircuitRotorKind.ts +0 -6
- package/src/model/wires/Switch.ts +0 -230
- package/src/model/wires/SynchronousMachine.ts +0 -267
- package/src/model/wires/SynchronousMachineKind.ts +0 -9
- package/src/model/wires/SynchronousMachineOperatingMode.ts +0 -5
- package/src/model/wires/TapChanger.ts +0 -55
- package/src/model/wires/TapChangerControl.ts +0 -32
- package/src/model/wires/TapChangerTablePoint.ts +0 -41
- package/src/model/wires/TransformerControlMode.ts +0 -4
- package/src/model/wires/TransformerEnd.ts +0 -143
- package/src/model/wires/WindingConnection.ts +0 -9
- package/src/package.json +0 -16
- package/src/util/datatype-converter.ts +0 -48
- package/src/util/sparql/sparql-building-block.ts +0 -43
- package/src/util/sparql/sparql-utils.ts +0 -150
- package/src/util/util-create.ts +0 -148
- package/src/util/util-search.ts +0 -40
- package/src/util/util-topology.ts +0 -175
- package/src/util/utils.ts +0 -255
- package/src/util/xml/utils.parser.ts +0 -29
- package/src/util/xml/xml.parser.ts +0 -107
- package/src/util/xml/xml.serializer.ts +0 -245
- package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-1.tests.sp-ec.ts +0 -838
- package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-2.tests.sp-ec.ts +0 -216
- package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-katarina-ruhrau.tests.spec.ts +0 -223
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/LICENSE +0 -617
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/NOTICE +0 -216
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/README +0 -62
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-delete +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-get +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-head +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-post +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-put +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-query +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-update +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-update-form +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/soh +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki +0 -512
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-backup +0 -34
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-server +0 -95
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-server.bat +0 -28
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-server.jar +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki.service +0 -59
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki.war +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/config.ttl +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/configuration/test.ttl +0 -50
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/shiro.ini +0 -38
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GOSP.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GOSP.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GPOS.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GPOS.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GSPO.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GSPO.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSP.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSP.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSPG.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSPG.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POS.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POS.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POSG.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POSG.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPO.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPO.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPOG.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPOG.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/journal.jrnl +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/node2id.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/node2id.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/nodes.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefix2id.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefix2id.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefixIdx.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefixIdx.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefixes.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/tdb.cfg +0 -32
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-mem +0 -27
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-service +0 -23
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb +0 -31
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb-dir +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb-mem +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb2 +0 -31
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb2-dir +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb2-mem +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/WEB-INF/web.xml +0 -332
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/admin-logs.html +0 -73
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap-select.min.css +0 -7
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap-theme.css.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap-theme.min.css +0 -7
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap.css.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap.min.css +0 -7
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/codemirror.css +0 -301
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/codemirror.min.css +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/font-awesome.min.css +0 -4
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/fui.css +0 -191
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.dataTables.css +0 -220
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload-noscript.css +0 -22
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload-ui-noscript.css +0 -17
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload-ui.css +0 -57
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload.css +0 -36
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/pivot.min.css +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/qonsole.css +0 -172
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/yasqe.min.css +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/yasr.min.css +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/dataset.html +0 -247
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/documentation.html +0 -83
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/FontAwesome.otf +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.eot +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.svg +0 -504
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.ttf +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.woff +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.eot +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.svg +0 -229
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.woff +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/back_disabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/back_enabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/back_enabled_hover.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/favicon.ico +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/forward_disabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/forward_enabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/forward_enabled_hover.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/jena-logo-notext-small.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_asc.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_asc_disabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_both.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_desc.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_desc_disabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/wait30.gif +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/index.html +0 -101
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/dataset-controller.js +0 -69
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/index-controller.js +0 -50
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/manage-controller.js +0 -39
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/query-controller.js +0 -72
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/upload-controller.js +0 -42
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/validation-controller.js +0 -38
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/fui.js +0 -33
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.dataset.js +0 -31
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.index.js +0 -24
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.manage.js +0 -27
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.validation.js +0 -24
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/dataset-stats.js +0 -102
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/dataset.js +0 -262
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/fuseki-server.js +0 -180
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/task.js +0 -105
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/validation-options.js +0 -85
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/qonsole-config.js +0 -27
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/services/ping-service.js +0 -54
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/services/validation-service.js +0 -98
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-edit.tpl +0 -58
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-info.tpl +0 -40
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-management.tpl +0 -62
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-selection-list.tpl +0 -22
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-selector.tpl +0 -15
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-simple-create.tpl +0 -85
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-stats.tpl +0 -14
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/file-upload.tpl +0 -46
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/uploadable-file.tpl +0 -23
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/util/page-utils.js +0 -33
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-edit.js +0 -205
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-info.js +0 -76
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-management.js +0 -173
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-selection-list.js +0 -58
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-selector.js +0 -84
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-simple-create.js +0 -102
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-stats.js +0 -41
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/datasets-dropdown-list.js +0 -43
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/file-upload.js +0 -225
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/tabbed-view-manager.js +0 -63
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/uploadable-file.js +0 -39
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/validation-options.js +0 -54
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/common-config.js +0 -94
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/brace-fold.js +0 -105
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/comment-fold.js +0 -57
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/foldcode.js +0 -145
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/foldgutter.js +0 -134
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/xml-fold.js +0 -181
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/backbone-min.js +0 -2
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/backbone.js +0 -1581
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/backbone.marionette.js +0 -2385
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/bootstrap-select.min.js +0 -8
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/bootstrap.min.js +0 -6
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/html5shiv.js +0 -8
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery-1.10.2.js +0 -9789
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery-1.10.2.min.js +0 -6
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery-ui.min.js +0 -7
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.dataTables.min.js +0 -157
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.fileupload.js +0 -1426
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.fileupload.local.js +0 -1428
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.form.js +0 -1278
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.iframe-transport.js +0 -214
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.ui.widget.js +0 -530
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.xdomainrequest.js +0 -90
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/lib/codemirror.js +0 -7638
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/javascript/javascript.js +0 -683
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/sparql/sparql.js +0 -160
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/turtle/turtle.js +0 -160
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/xml/xml.js +0 -384
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/pivot.js +0 -1363
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/pivot.min.js +0 -2
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/pivot.min.js.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/plugins/text.js +0 -386
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/qonsole.js +0 -577
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/refresh.sh +0 -21
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/require.js +0 -2076
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/require.min.js +0 -36
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/respond.min.js +0 -6
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/sprintf-0.7-beta1.js +0 -183
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/underscore.js +0 -1276
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasqe.min.js +0 -9
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasqe.min.js.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasr.min.js +0 -8
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasr.min.js.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/manage.html +0 -110
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/services.html +0 -76
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/test/test-fuseki-config.ttl +0 -27
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/validate.html +0 -147
- package/test/apache-jena-fuseki-interface/data/json/PersistData.json +0 -111
- package/test/apache-jena-fuseki-interface/data/xml/AssetHealthEvent.xml +0 -45
- package/test/apache-jena-fuseki-interface/data/xml/AssetOwner.xml +0 -11
- package/test/apache-jena-fuseki-interface/data/xml/Outages.xml +0 -69
- package/test/apache-jena-fuseki-interface/data/xml/PsrType.xml +0 -80
- package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_EQ_V1.xml +0 -20867
- package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_SSH_V1.xml +0 -3784
- package/test/apache-jena-fuseki-interface/data/xml/neplan-eslohe/Eslohe_Rootnet_Area_1_EQ_V1.xml +0 -15755
- package/test/apache-jena-fuseki-interface/data/xml/neplan-eslohe/Eslohe_Rootnet_Area_1_EQ_V1_feeder_ext.xml +0 -54
- package/test/apache-jena-fuseki-interface/data/xml/neplan-eslohe/Eslohe_Rootnet_Area_1_SSH_V1.xml +0 -2796
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_EQ_V1.xml +0 -42569
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SSH_V1.xml +0 -10108
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SV_V1.xml +0 -6234
- package/test/apache-jena-fuseki-interface/data/xml-rdf-data.xml +0 -84
- package/test/cim-xml-rdf-parser/cim-xml-rdf-parser.tests.spec.ts +0 -23
- package/test/cim-xml-rdf-parser/data/rdfxml_serialisation.xml +0 -192
- package/test/integral7-converter/integral7-converter.tests.spec.ts +0 -195
- package/test/power-system-data-model-converter/data/fixed_feed_in_input.csv +0 -72
- package/test/power-system-data-model-converter/data/line_input.csv +0 -1910
- package/test/power-system-data-model-converter/data/line_type_input.csv +0 -5
- package/test/power-system-data-model-converter/data/load_input.csv +0 -1829
- package/test/power-system-data-model-converter/data/node_input.csv +0 -2835
- package/test/power-system-data-model-converter/data/time_series_mapping.csv +0 -878
- package/test/power-system-data-model-converter/data/transformer_2_w_input.csv +0 -1047
- package/test/power-system-data-model-converter/data/transformer_2_w_type_input.csv +0 -5
- package/test/power-system-data-model-converter/power-system-data-model-converter.tests.spec.ts +0 -310
- package/tsconfig.json +0 -24
- package/webpack.config.js +0 -24
package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/pivot.js
DELETED
|
@@ -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(" ▾").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
|