molstar 3.3.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +202 -194
- package/build/viewer/embedded.html +43 -43
- package/build/viewer/index.html +106 -106
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/docking-viewer/viewport.js +1 -1
- package/lib/apps/viewer/app.d.ts +7 -6
- package/lib/apps/viewer/app.js +2 -0
- package/lib/apps/viewer/embedded.html +43 -43
- package/lib/apps/viewer/index.html +106 -106
- package/lib/cli/chem-comp-dict/create-saccharides.d.ts +7 -0
- package/lib/cli/chem-comp-dict/create-saccharides.js +67 -0
- package/lib/cli/cif2bcif/converter.js +1 -1
- package/lib/cli/cif2bcif/index.js +4 -4
- package/lib/commonjs/apps/docking-viewer/index.js +12 -12
- package/lib/commonjs/apps/docking-viewer/viewport.js +33 -33
- package/lib/commonjs/apps/viewer/app.d.ts +7 -6
- package/lib/commonjs/apps/viewer/app.js +24 -22
- package/lib/commonjs/apps/viewer/index.js +1 -1
- package/lib/commonjs/cli/chem-comp-dict/create-ions.js +6 -6
- package/lib/commonjs/cli/chem-comp-dict/create-saccharides.d.ts +7 -0
- package/lib/commonjs/cli/chem-comp-dict/create-saccharides.js +69 -0
- package/lib/commonjs/cli/chem-comp-dict/create-table.js +8 -8
- package/lib/commonjs/cli/chem-comp-dict/util.js +17 -17
- package/lib/commonjs/cli/cif2bcif/converter.js +9 -9
- package/lib/commonjs/cli/cif2bcif/index.js +12 -12
- package/lib/commonjs/cli/cifschema/index.js +27 -27
- package/lib/commonjs/cli/cifschema/util/cif-dic.js +1 -1
- package/lib/commonjs/cli/lipid-params/index.js +9 -9
- package/lib/commonjs/cli/state-docs/index.js +2 -2
- package/lib/commonjs/cli/structure-info/helpers.js +11 -11
- package/lib/commonjs/cli/structure-info/model.js +15 -15
- package/lib/commonjs/cli/structure-info/volume.js +9 -9
- package/lib/commonjs/examples/alpha-orbitals/controls.js +3 -3
- package/lib/commonjs/examples/alpha-orbitals/index.js +11 -11
- package/lib/commonjs/examples/basic-wrapper/controls.js +2 -2
- package/lib/commonjs/examples/basic-wrapper/index.js +22 -22
- package/lib/commonjs/examples/basic-wrapper/superposition.js +8 -8
- package/lib/commonjs/examples/domain-annotation-server/mapping.js +3 -3
- package/lib/commonjs/examples/domain-annotation-server/server.js +6 -6
- package/lib/commonjs/examples/domain-annotation-server/test.js +3 -3
- package/lib/commonjs/examples/lighting/index.js +6 -6
- package/lib/commonjs/examples/proteopedia-wrapper/annotation.js +2 -2
- package/lib/commonjs/examples/proteopedia-wrapper/helpers.js +4 -4
- package/lib/commonjs/examples/proteopedia-wrapper/index.js +26 -26
- package/lib/commonjs/examples/proteopedia-wrapper/ui/controls.js +2 -2
- package/lib/commonjs/examples/task.js +15 -15
- package/lib/commonjs/extensions/alpha-orbitals/collocation.js +2 -2
- package/lib/commonjs/extensions/alpha-orbitals/data-model.js +1 -1
- package/lib/commonjs/extensions/alpha-orbitals/density.js +2 -2
- package/lib/commonjs/extensions/alpha-orbitals/gpu/compute.js +2 -2
- package/lib/commonjs/extensions/alpha-orbitals/orbitals.js +2 -2
- package/lib/commonjs/extensions/alpha-orbitals/transforms.js +13 -13
- package/lib/commonjs/extensions/anvil/algorithm.js +13 -13
- package/lib/commonjs/extensions/anvil/behavior.js +14 -14
- package/lib/commonjs/extensions/anvil/prop.js +7 -7
- package/lib/commonjs/extensions/anvil/representation.js +5 -5
- package/lib/commonjs/extensions/cellpack/index.js +1 -1
- package/lib/commonjs/extensions/cellpack/model.js +26 -24
- package/lib/commonjs/extensions/cellpack/preset.js +6 -6
- package/lib/commonjs/extensions/cellpack/property.js +3 -3
- package/lib/commonjs/extensions/cellpack/representation.js +2 -2
- package/lib/commonjs/extensions/cellpack/state.js +13 -13
- package/lib/commonjs/extensions/cellpack/util.js +14 -14
- package/lib/commonjs/extensions/dnatco/confal-pyramids/behavior.js +7 -7
- package/lib/commonjs/extensions/dnatco/confal-pyramids/color.d.ts +397 -2
- package/lib/commonjs/extensions/dnatco/confal-pyramids/color.js +223 -131
- package/lib/commonjs/extensions/dnatco/confal-pyramids/property.js +6 -8
- package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.js +2 -2
- package/lib/commonjs/extensions/dnatco/confal-pyramids/util.js +19 -20
- package/lib/commonjs/extensions/g3d/data.js +6 -6
- package/lib/commonjs/extensions/g3d/format.js +14 -14
- package/lib/commonjs/extensions/g3d/model.js +4 -4
- package/lib/commonjs/extensions/geo-export/controls.js +3 -3
- package/lib/commonjs/extensions/geo-export/glb-exporter.js +9 -9
- package/lib/commonjs/extensions/geo-export/index.js +1 -1
- package/lib/commonjs/extensions/geo-export/mesh-exporter.js +12 -12
- package/lib/commonjs/extensions/geo-export/obj-exporter.js +7 -7
- package/lib/commonjs/extensions/geo-export/stl-exporter.js +7 -7
- package/lib/commonjs/extensions/geo-export/ui.js +7 -7
- package/lib/commonjs/extensions/geo-export/usdz-exporter.js +9 -9
- package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.js +9 -9
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/plddt.js +4 -4
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/qmean.js +4 -4
- package/lib/commonjs/extensions/model-archive/quality-assessment/prop.js +5 -5
- package/lib/commonjs/extensions/model-export/export.js +4 -4
- package/lib/commonjs/extensions/model-export/index.js +1 -1
- package/lib/commonjs/extensions/model-export/ui.js +5 -5
- package/lib/commonjs/extensions/mp4-export/controls.js +5 -5
- package/lib/commonjs/extensions/mp4-export/encoder.js +4 -4
- package/lib/commonjs/extensions/mp4-export/index.js +1 -1
- package/lib/commonjs/extensions/mp4-export/ui.js +5 -5
- package/lib/commonjs/extensions/pdbe/preferred-assembly.js +2 -2
- package/lib/commonjs/extensions/pdbe/struct-ref-domain.js +2 -2
- package/lib/commonjs/extensions/pdbe/structure-quality-report/behavior.js +1 -1
- package/lib/commonjs/extensions/pdbe/structure-quality-report/prop.js +8 -8
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.js +17 -17
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/color.js +2 -2
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/prop.js +9 -9
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.js +6 -6
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/ui.js +9 -9
- package/lib/commonjs/extensions/rcsb/validation-report/behavior.js +17 -17
- package/lib/commonjs/extensions/rcsb/validation-report/prop.js +15 -15
- package/lib/commonjs/extensions/rcsb/validation-report/representation.js +22 -5
- package/lib/commonjs/extensions/zenodo/index.d.ts +7 -0
- package/lib/commonjs/extensions/zenodo/index.js +35 -0
- package/lib/commonjs/extensions/zenodo/ui.d.ts +61 -0
- package/lib/commonjs/extensions/zenodo/ui.js +306 -0
- package/lib/commonjs/mol-canvas3d/camera/stereo.js +1 -1
- package/lib/commonjs/mol-canvas3d/camera/util.js +1 -1
- package/lib/commonjs/mol-canvas3d/camera.js +2 -1
- package/lib/commonjs/mol-canvas3d/canvas3d.js +14 -14
- package/lib/commonjs/mol-canvas3d/controls/trackball.js +1 -1
- package/lib/commonjs/mol-canvas3d/helper/bounding-sphere-helper.js +1 -1
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.js +5 -5
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.js +5 -5
- package/lib/commonjs/mol-canvas3d/helper/helper.js +1 -1
- package/lib/commonjs/mol-canvas3d/helper/interaction-events.js +2 -2
- package/lib/commonjs/mol-canvas3d/passes/draw.js +3 -3
- package/lib/commonjs/mol-canvas3d/passes/fxaa.js +3 -3
- package/lib/commonjs/mol-canvas3d/passes/image.js +1 -1
- package/lib/commonjs/mol-canvas3d/passes/marking.js +6 -6
- package/lib/commonjs/mol-canvas3d/passes/multi-sample.js +3 -3
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +12 -12
- package/lib/commonjs/mol-canvas3d/passes/smaa.js +9 -9
- package/lib/commonjs/mol-canvas3d/passes/wboit.js +3 -3
- package/lib/commonjs/mol-canvas3d/util.js +2 -2
- package/lib/commonjs/mol-data/db/column.js +2 -2
- package/lib/commonjs/mol-data/db/table.js +1 -1
- package/lib/commonjs/mol-data/db.js +1 -1
- package/lib/commonjs/mol-data/generic.js +3 -3
- package/lib/commonjs/mol-data/index.js +4 -4
- package/lib/commonjs/mol-data/int/interval.js +1 -1
- package/lib/commonjs/mol-data/int/ordered-set.js +1 -1
- package/lib/commonjs/mol-data/int/segmentation.js +1 -1
- package/lib/commonjs/mol-data/int/sorted-array.js +1 -1
- package/lib/commonjs/mol-data/util.js +7 -7
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +3 -3
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.js +3 -3
- package/lib/commonjs/mol-geo/geometry/direct-volume/transfer-function.js +1 -1
- package/lib/commonjs/mol-geo/geometry/image/image.js +3 -3
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/commonjs/mol-geo/geometry/lines/lines.js +3 -3
- package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.js +5 -3
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +3 -3
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/points/points.js +3 -3
- package/lib/commonjs/mol-geo/geometry/size-data.js +1 -1
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +3 -3
- package/lib/commonjs/mol-geo/geometry/text/font-atlas.js +1 -1
- package/lib/commonjs/mol-geo/geometry/text/text-builder.js +3 -2
- package/lib/commonjs/mol-geo/geometry/text/text.js +3 -3
- package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.js +10 -8
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +3 -3
- package/lib/commonjs/mol-geo/primitive/circle.js +1 -1
- package/lib/commonjs/mol-geo/primitive/cylinder.js +1 -1
- package/lib/commonjs/mol-geo/primitive/polyhedron.js +1 -1
- package/lib/commonjs/mol-geo/primitive/prism.js +1 -1
- package/lib/commonjs/mol-geo/primitive/star.js +1 -1
- package/lib/commonjs/mol-geo/primitive/torus.js +1 -1
- package/lib/commonjs/mol-geo/util/marching-cubes/algorithm.js +9 -9
- package/lib/commonjs/mol-gl/compute/grid3d.js +5 -5
- package/lib/commonjs/mol-gl/compute/histogram-pyramid/reduction.js +3 -3
- package/lib/commonjs/mol-gl/compute/histogram-pyramid/sum.js +3 -3
- package/lib/commonjs/mol-gl/compute/marching-cubes/active-voxels.js +3 -3
- package/lib/commonjs/mol-gl/compute/marching-cubes/isosurface.js +3 -3
- package/lib/commonjs/mol-gl/compute/util.js +3 -3
- package/lib/commonjs/mol-gl/renderable/cylinders.js +3 -3
- package/lib/commonjs/mol-gl/renderable/direct-volume.js +3 -3
- package/lib/commonjs/mol-gl/renderable/image.js +3 -3
- package/lib/commonjs/mol-gl/renderable/lines.js +3 -3
- package/lib/commonjs/mol-gl/renderable/mesh.js +3 -3
- package/lib/commonjs/mol-gl/renderable/points.js +3 -3
- package/lib/commonjs/mol-gl/renderable/schema.js +1 -1
- package/lib/commonjs/mol-gl/renderable/spheres.js +3 -3
- package/lib/commonjs/mol-gl/renderable/text.js +3 -3
- package/lib/commonjs/mol-gl/renderable/texture-mesh.js +3 -3
- package/lib/commonjs/mol-gl/renderable/util.js +1 -1
- package/lib/commonjs/mol-gl/shader-code.js +2 -1
- package/lib/commonjs/mol-gl/webgl/buffer.js +4 -5
- package/lib/commonjs/mol-gl/webgl/context.d.ts +1 -1
- package/lib/commonjs/mol-gl/webgl/context.js +5 -5
- package/lib/commonjs/mol-gl/webgl/render-item.js +1 -1
- package/lib/commonjs/mol-gl/webgl/resources.js +2 -2
- package/lib/commonjs/mol-io/common/binary-cif/classifier.js +7 -6
- package/lib/commonjs/mol-io/common/binary-cif/decoder.js +4 -3
- package/lib/commonjs/mol-io/common/binary-cif.js +3 -3
- package/lib/commonjs/mol-io/common/io-buffer.d.ts +206 -0
- package/lib/commonjs/mol-io/common/io-buffer.js +408 -0
- package/lib/commonjs/mol-io/common/netcdf/reader.d.ts +78 -0
- package/lib/commonjs/mol-io/common/netcdf/reader.js +459 -0
- package/lib/commonjs/mol-io/common/typed-array.js +2 -2
- package/lib/commonjs/mol-io/reader/ccp4/parser.js +8 -8
- package/lib/commonjs/mol-io/reader/cif/binary/parser.js +3 -3
- package/lib/commonjs/mol-io/reader/cif/data-model.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif-extras.js +2 -2
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema.js +2 -2
- package/lib/commonjs/mol-io/reader/cif/text/parser.js +7 -7
- package/lib/commonjs/mol-io/reader/cif.js +1 -1
- package/lib/commonjs/mol-io/reader/common/text/tokenizer.js +4 -4
- package/lib/commonjs/mol-io/reader/csv/data-model.js +1 -1
- package/lib/commonjs/mol-io/reader/csv/parser.js +7 -7
- package/lib/commonjs/mol-io/reader/cube/parser.js +2 -2
- package/lib/commonjs/mol-io/reader/dcd/parser.js +2 -2
- package/lib/commonjs/mol-io/reader/dsn6/parser.js +8 -8
- package/lib/commonjs/mol-io/reader/dx/parser.js +4 -4
- package/lib/commonjs/mol-io/reader/gro/parser.js +6 -6
- package/lib/commonjs/mol-io/reader/mol/parser.js +2 -2
- package/lib/commonjs/mol-io/reader/mol2/parser.js +8 -8
- package/lib/commonjs/mol-io/reader/nctraj/parser.d.ts +18 -0
- package/lib/commonjs/mol-io/reader/nctraj/parser.js +101 -0
- package/lib/commonjs/mol-io/reader/obj/parser.js +4 -4
- package/lib/commonjs/mol-io/reader/pdb/parser.js +2 -2
- package/lib/commonjs/mol-io/reader/ply/parser.js +4 -4
- package/lib/commonjs/mol-io/reader/prmtop/parser.d.ts +58 -0
- package/lib/commonjs/mol-io/reader/prmtop/parser.js +172 -0
- package/lib/commonjs/mol-io/reader/psf/parser.js +8 -8
- package/lib/commonjs/mol-io/reader/sdf/parser.js +2 -2
- package/lib/commonjs/mol-io/reader/top/parser.d.ts +37 -0
- package/lib/commonjs/mol-io/reader/top/parser.js +303 -0
- package/lib/commonjs/mol-io/reader/trr/parser.d.ts +22 -0
- package/lib/commonjs/mol-io/reader/trr/parser.js +146 -0
- package/lib/commonjs/mol-io/reader/xtc/parser.js +4 -4
- package/lib/commonjs/mol-io/reader/xyz/parser.js +2 -2
- package/lib/commonjs/mol-io/writer/cif/encoder.js +3 -2
- package/lib/commonjs/mol-io/writer/cif.js +1 -1
- package/lib/commonjs/mol-io/writer/ligand-encoder.js +1 -1
- package/lib/commonjs/mol-io/writer/mol/encoder.js +1 -1
- package/lib/commonjs/mol-io/writer/mol2/encoder.js +1 -1
- package/lib/commonjs/mol-math/geometry/boundary-helper.js +5 -5
- package/lib/commonjs/mol-math/geometry/common.d.ts +2 -1
- package/lib/commonjs/mol-math/geometry/common.js +1 -1
- package/lib/commonjs/mol-math/geometry/gaussian-density/cpu.d.ts +1 -1
- package/lib/commonjs/mol-math/geometry/gaussian-density/cpu.js +6 -6
- package/lib/commonjs/mol-math/geometry/gaussian-density/gpu.d.ts +1 -1
- package/lib/commonjs/mol-math/geometry/gaussian-density/gpu.js +8 -8
- package/lib/commonjs/mol-math/geometry/gaussian-density.d.ts +2 -2
- package/lib/commonjs/mol-math/geometry/gaussian-density.js +5 -5
- package/lib/commonjs/mol-math/geometry/molecular-surface.d.ts +2 -1
- package/lib/commonjs/mol-math/geometry/molecular-surface.js +10 -10
- package/lib/commonjs/mol-math/geometry/primitives/box3d.js +2 -1
- package/lib/commonjs/mol-math/geometry/primitives/sphere3d.js +13 -7
- package/lib/commonjs/mol-math/geometry.js +8 -8
- package/lib/commonjs/mol-math/graph/inter-unit-graph.js +1 -1
- package/lib/commonjs/mol-math/graph.js +1 -1
- package/lib/commonjs/mol-math/linear-algebra.js +2 -2
- package/lib/commonjs/mol-model/sequence/alignment/alignment.js +1 -1
- package/lib/commonjs/mol-model/sequence/sequence.js +2 -1
- package/lib/commonjs/mol-model/sequence.js +1 -1
- package/lib/commonjs/mol-model/shape.js +1 -1
- package/lib/commonjs/mol-model/structure/coordinates.js +1 -1
- package/lib/commonjs/mol-model/structure/export/categories/secondary-structure.js +2 -2
- package/lib/commonjs/mol-model/structure/model/model.js +3 -3
- package/lib/commonjs/mol-model/structure/model/properties/atomic.js +3 -3
- package/lib/commonjs/mol-model/structure/model/properties/coarse.js +2 -2
- package/lib/commonjs/mol-model/structure/model/types/saccharides.d.ts +8 -0
- package/lib/commonjs/mol-model/structure/model/types/saccharides.js +11 -0
- package/lib/commonjs/mol-model/structure/model.js +3 -3
- package/lib/commonjs/mol-model/structure/query/queries/generators.js +2 -2
- package/lib/commonjs/mol-model/structure/query/queries/modifiers.js +2 -2
- package/lib/commonjs/mol-model/structure/query.js +6 -6
- package/lib/commonjs/mol-model/structure/structure/carbohydrates/compute.js +1 -1
- package/lib/commonjs/mol-model/structure/structure/carbohydrates/constants.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/carbohydrates/constants.js +6 -9
- package/lib/commonjs/mol-model/structure/structure/element/element.js +5 -5
- package/lib/commonjs/mol-model/structure/structure/element.js +1 -1
- package/lib/commonjs/mol-model/structure/structure/structure.js +9 -6
- package/lib/commonjs/mol-model/structure/structure/symmetry.js +10 -10
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/data.js +2 -2
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -0
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +6 -4
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.js +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds.js +3 -3
- package/lib/commonjs/mol-model/structure/structure/unit.js +5 -22
- package/lib/commonjs/mol-model/structure/structure/util/superposition.js +1 -1
- package/lib/commonjs/mol-model/structure/structure.js +2 -2
- package/lib/commonjs/mol-model/structure/topology.js +1 -1
- package/lib/commonjs/mol-model/structure.js +6 -6
- package/lib/commonjs/mol-model/volume.js +2 -2
- package/lib/commonjs/mol-model-formats/shape/ply.js +7 -7
- package/lib/commonjs/mol-model-formats/structure/basic/atomic.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/basic/atomic.js +2 -15
- package/lib/commonjs/mol-model-formats/structure/basic/coarse.js +3 -3
- package/lib/commonjs/mol-model-formats/structure/basic/entities.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/basic/parser.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/basic/parser.js +10 -10
- package/lib/commonjs/mol-model-formats/structure/basic/schema.d.ts +2 -2
- package/lib/commonjs/mol-model-formats/structure/basic/schema.js +7 -2
- package/lib/commonjs/mol-model-formats/structure/basic/sort.js +2 -2
- package/lib/commonjs/mol-model-formats/structure/basic/util.d.ts +33 -2
- package/lib/commonjs/mol-model-formats/structure/basic/util.js +26 -2
- package/lib/commonjs/mol-model-formats/structure/cif-core.js +6 -6
- package/lib/commonjs/mol-model-formats/structure/common/component.js +5 -1
- package/lib/commonjs/mol-model-formats/structure/cube.js +5 -5
- package/lib/commonjs/mol-model-formats/structure/dcd.js +2 -2
- package/lib/commonjs/mol-model-formats/structure/gro.js +5 -3
- package/lib/commonjs/mol-model-formats/structure/mmcif.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/mmcif.js +4 -2
- package/lib/commonjs/mol-model-formats/structure/mol.js +5 -5
- package/lib/commonjs/mol-model-formats/structure/mol2.js +6 -6
- package/lib/commonjs/mol-model-formats/structure/nctraj.d.ts +9 -0
- package/lib/commonjs/mol-model-formats/structure/nctraj.js +60 -0
- package/lib/commonjs/mol-model-formats/structure/pdb/to-cif.js +2 -2
- package/lib/commonjs/mol-model-formats/structure/pdb.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/pdb.js +7 -5
- package/lib/commonjs/mol-model-formats/structure/prmtop.d.ts +16 -0
- package/lib/commonjs/mol-model-formats/structure/prmtop.js +147 -0
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/property/symmetry.js +11 -1
- package/lib/commonjs/mol-model-formats/structure/psf.js +5 -3
- package/lib/commonjs/mol-model-formats/structure/top.d.ts +16 -0
- package/lib/commonjs/mol-model-formats/structure/top.js +189 -0
- package/lib/commonjs/mol-model-formats/structure/trr.d.ts +9 -0
- package/lib/commonjs/mol-model-formats/structure/trr.js +46 -0
- package/lib/commonjs/mol-model-formats/structure/util.d.ts +2 -2
- package/lib/commonjs/mol-model-formats/structure/util.js +19 -20
- package/lib/commonjs/mol-model-formats/structure/xtc.js +2 -2
- package/lib/commonjs/mol-model-formats/structure/xyz.js +2 -2
- package/lib/commonjs/mol-model-formats/volume/ccp4.js +2 -2
- package/lib/commonjs/mol-model-formats/volume/cube.js +2 -2
- package/lib/commonjs/mol-model-formats/volume/density-server.js +2 -2
- package/lib/commonjs/mol-model-formats/volume/dsn6.js +2 -2
- package/lib/commonjs/mol-model-formats/volume/dx.js +2 -2
- package/lib/commonjs/mol-model-props/common/custom-element-property.js +2 -2
- package/lib/commonjs/mol-model-props/common/custom-model-property.js +5 -5
- package/lib/commonjs/mol-model-props/common/custom-property.js +1 -1
- package/lib/commonjs/mol-model-props/common/custom-structure-property.js +6 -6
- package/lib/commonjs/mol-model-props/computed/accessible-surface-area/shrake-rupley/area.js +2 -2
- package/lib/commonjs/mol-model-props/computed/accessible-surface-area/shrake-rupley.js +5 -5
- package/lib/commonjs/mol-model-props/computed/accessible-surface-area.js +4 -4
- package/lib/commonjs/mol-model-props/computed/chemistry/valence-model.js +3 -3
- package/lib/commonjs/mol-model-props/computed/helix-orientation.js +2 -2
- package/lib/commonjs/mol-model-props/computed/interactions/common.js +1 -1
- package/lib/commonjs/mol-model-props/computed/interactions/contacts.js +1 -1
- package/lib/commonjs/mol-model-props/computed/interactions/features.js +1 -1
- package/lib/commonjs/mol-model-props/computed/interactions/hydrogen-bonds.js +3 -3
- package/lib/commonjs/mol-model-props/computed/interactions/interactions.js +3 -3
- package/lib/commonjs/mol-model-props/computed/interactions.js +4 -4
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +10 -4
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +12 -7
- package/lib/commonjs/mol-model-props/computed/representations/interactions.js +1 -1
- package/lib/commonjs/mol-model-props/computed/secondary-structure/dssp.js +2 -2
- package/lib/commonjs/mol-model-props/computed/secondary-structure.js +7 -7
- package/lib/commonjs/mol-model-props/computed/valence-model.js +4 -4
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/property.js +2 -2
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.js +12 -3
- package/lib/commonjs/mol-model-props/sequence/sifts-mapping.js +2 -2
- package/lib/commonjs/mol-model-props/sequence/themes/sifts-mapping.js +3 -3
- package/lib/commonjs/mol-plugin/animation-loop.js +2 -2
- package/lib/commonjs/mol-plugin/behavior/behavior.js +5 -5
- package/lib/commonjs/mol-plugin/behavior/dynamic/camera.js +2 -2
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/computed/accessible-surface-area.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/computed/interactions.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/computed/secondary-structure.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/computed/valence-model.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/integrative/cross-link-restraint.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/sequence/sifts-mapping.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/structure-info.js +2 -2
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.js +3 -3
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +11 -11
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/behavior.js +12 -12
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/transformers.js +16 -16
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/util.js +10 -10
- package/lib/commonjs/mol-plugin/behavior/static/state.js +6 -6
- package/lib/commonjs/mol-plugin/behavior.js +8 -8
- package/lib/commonjs/mol-plugin/command.js +2 -2
- package/lib/commonjs/mol-plugin/context.d.ts +2 -1
- package/lib/commonjs/mol-plugin/context.js +9 -8
- package/lib/commonjs/mol-plugin/layout.js +2 -2
- package/lib/commonjs/mol-plugin/spec.js +1 -1
- package/lib/commonjs/mol-plugin/state.js +5 -5
- package/lib/commonjs/mol-plugin/util/task-manager.js +4 -4
- package/lib/commonjs/mol-plugin/util/toast.js +1 -1
- package/lib/commonjs/mol-plugin/util/viewport-screenshot.js +17 -17
- package/lib/commonjs/mol-plugin-state/actions/file.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/actions/file.js +94 -61
- package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +11 -2
- package/lib/commonjs/mol-plugin-state/actions/structure.js +190 -20
- package/lib/commonjs/mol-plugin-state/actions/volume.js +5 -4
- package/lib/commonjs/mol-plugin-state/actions.js +3 -3
- package/lib/commonjs/mol-plugin-state/animation/built-in/assembly-unwind.js +2 -2
- package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.js +3 -3
- package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.js +3 -3
- package/lib/commonjs/mol-plugin-state/animation/built-in/explode-units.js +4 -4
- package/lib/commonjs/mol-plugin-state/animation/built-in/model-index.js +2 -2
- package/lib/commonjs/mol-plugin-state/animation/built-in/spin-structure.js +5 -5
- package/lib/commonjs/mol-plugin-state/animation/built-in/state-interpolation.js +2 -2
- package/lib/commonjs/mol-plugin-state/animation/built-in/state-snapshots.js +5 -5
- package/lib/commonjs/mol-plugin-state/builder/data.js +2 -2
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.js +16 -16
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.js +28 -28
- package/lib/commonjs/mol-plugin-state/builder/structure/representation.js +2 -2
- package/lib/commonjs/mol-plugin-state/builder/structure.js +7 -7
- package/lib/commonjs/mol-plugin-state/component.js +1 -1
- package/lib/commonjs/mol-plugin-state/formats/{structure.d.ts → coordinates.d.ts} +34 -18
- package/lib/commonjs/mol-plugin-state/formats/coordinates.js +70 -0
- package/lib/commonjs/mol-plugin-state/formats/registry.d.ts +3 -3
- package/lib/commonjs/mol-plugin-state/formats/registry.js +13 -8
- package/lib/commonjs/mol-plugin-state/formats/shape.js +2 -2
- package/lib/commonjs/mol-plugin-state/formats/topology.d.ts +73 -0
- package/lib/commonjs/mol-plugin-state/formats/topology.js +87 -0
- package/lib/commonjs/mol-plugin-state/formats/trajectory.js +6 -6
- package/lib/commonjs/mol-plugin-state/formats/volume.js +21 -21
- package/lib/commonjs/mol-plugin-state/helpers/root-structure.js +15 -15
- package/lib/commonjs/mol-plugin-state/helpers/structure-clipping.js +7 -7
- package/lib/commonjs/mol-plugin-state/helpers/structure-component.js +2 -1
- package/lib/commonjs/mol-plugin-state/helpers/structure-overpaint.js +11 -11
- package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.js +3 -3
- package/lib/commonjs/mol-plugin-state/helpers/structure-substance.js +11 -11
- package/lib/commonjs/mol-plugin-state/helpers/structure-transparency.js +11 -11
- package/lib/commonjs/mol-plugin-state/manager/animation.js +17 -17
- package/lib/commonjs/mol-plugin-state/manager/camera.js +1 -1
- package/lib/commonjs/mol-plugin-state/manager/interactivity.js +6 -6
- package/lib/commonjs/mol-plugin-state/manager/snapshots.js +14 -14
- package/lib/commonjs/mol-plugin-state/manager/structure/component.js +26 -26
- package/lib/commonjs/mol-plugin-state/manager/structure/focus.js +2 -2
- package/lib/commonjs/mol-plugin-state/manager/structure/hierarchy-state.js +1 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/hierarchy.js +8 -8
- package/lib/commonjs/mol-plugin-state/manager/structure/measurement.js +21 -21
- package/lib/commonjs/mol-plugin-state/manager/structure/selection.js +3 -3
- package/lib/commonjs/mol-plugin-state/manager/volume/hierarchy.js +1 -1
- package/lib/commonjs/mol-plugin-state/objects.d.ts +47 -1
- package/lib/commonjs/mol-plugin-state/objects.js +46 -30
- package/lib/commonjs/mol-plugin-state/transforms/data.d.ts +6 -0
- package/lib/commonjs/mol-plugin-state/transforms/data.js +93 -41
- package/lib/commonjs/mol-plugin-state/transforms/model.d.ts +14 -2
- package/lib/commonjs/mol-plugin-state/transforms/model.js +163 -54
- package/lib/commonjs/mol-plugin-state/transforms/representation.js +77 -77
- package/lib/commonjs/mol-plugin-state/transforms/shape.js +2 -2
- package/lib/commonjs/mol-plugin-state/transforms/volume.js +16 -16
- package/lib/commonjs/mol-plugin-state/transforms.js +6 -6
- package/lib/commonjs/mol-plugin-ui/base.js +5 -5
- package/lib/commonjs/mol-plugin-ui/context.js +1 -1
- package/lib/commonjs/mol-plugin-ui/controls/action-menu.js +14 -14
- package/lib/commonjs/mol-plugin-ui/controls/color.js +7 -7
- package/lib/commonjs/mol-plugin-ui/controls/common.js +16 -16
- package/lib/commonjs/mol-plugin-ui/controls/icons.js +70 -70
- package/lib/commonjs/mol-plugin-ui/controls/legend.js +7 -7
- package/lib/commonjs/mol-plugin-ui/controls/line-graph/line-graph-component.js +3 -3
- package/lib/commonjs/mol-plugin-ui/controls/line-graph/point-component.js +2 -2
- package/lib/commonjs/mol-plugin-ui/controls/parameters.js +94 -94
- package/lib/commonjs/mol-plugin-ui/controls/screenshot.js +5 -5
- package/lib/commonjs/mol-plugin-ui/controls/slider.js +16 -16
- package/lib/commonjs/mol-plugin-ui/controls.js +16 -16
- package/lib/commonjs/mol-plugin-ui/custom/volume.js +16 -16
- package/lib/commonjs/mol-plugin-ui/index.js +4 -4
- package/lib/commonjs/mol-plugin-ui/left-panel.d.ts +8 -1
- package/lib/commonjs/mol-plugin-ui/left-panel.js +40 -19
- package/lib/commonjs/mol-plugin-ui/plugin.js +17 -17
- package/lib/commonjs/mol-plugin-ui/sequence/chain.js +1 -1
- package/lib/commonjs/mol-plugin-ui/sequence/element.js +1 -1
- package/lib/commonjs/mol-plugin-ui/sequence/hetero.js +1 -1
- package/lib/commonjs/mol-plugin-ui/sequence/polymer.js +1 -1
- package/lib/commonjs/mol-plugin-ui/sequence/sequence.js +6 -6
- package/lib/commonjs/mol-plugin-ui/sequence.js +9 -9
- package/lib/commonjs/mol-plugin-ui/spec.js +1 -1
- package/lib/commonjs/mol-plugin-ui/state/actions.js +2 -2
- package/lib/commonjs/mol-plugin-ui/state/animation.js +2 -2
- package/lib/commonjs/mol-plugin-ui/state/apply-action.js +1 -1
- package/lib/commonjs/mol-plugin-ui/state/common.js +12 -12
- package/lib/commonjs/mol-plugin-ui/state/snapshots.js +29 -29
- package/lib/commonjs/mol-plugin-ui/state/tree.js +19 -19
- package/lib/commonjs/mol-plugin-ui/state/update-transform.js +3 -3
- package/lib/commonjs/mol-plugin-ui/structure/components.js +19 -19
- package/lib/commonjs/mol-plugin-ui/structure/focus.js +4 -4
- package/lib/commonjs/mol-plugin-ui/structure/generic.js +6 -6
- package/lib/commonjs/mol-plugin-ui/structure/measurements.js +13 -13
- package/lib/commonjs/mol-plugin-ui/structure/quick-styles.js +11 -11
- package/lib/commonjs/mol-plugin-ui/structure/selection.js +13 -13
- package/lib/commonjs/mol-plugin-ui/structure/source.js +12 -12
- package/lib/commonjs/mol-plugin-ui/structure/superposition.js +20 -20
- package/lib/commonjs/mol-plugin-ui/structure/volume.js +12 -12
- package/lib/commonjs/mol-plugin-ui/task.js +8 -8
- package/lib/commonjs/mol-plugin-ui/toast.js +6 -6
- package/lib/commonjs/mol-plugin-ui/viewport/canvas.js +5 -5
- package/lib/commonjs/mol-plugin-ui/viewport/help.js +14 -14
- package/lib/commonjs/mol-plugin-ui/viewport/screenshot.js +8 -8
- package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.js +6 -6
- package/lib/commonjs/mol-plugin-ui/viewport.js +7 -7
- package/lib/commonjs/mol-repr/representation.js +4 -4
- package/lib/commonjs/mol-repr/shape/loci/angle.js +9 -9
- package/lib/commonjs/mol-repr/shape/loci/common.js +1 -1
- package/lib/commonjs/mol-repr/shape/loci/dihedral.js +14 -14
- package/lib/commonjs/mol-repr/shape/loci/distance.js +5 -5
- package/lib/commonjs/mol-repr/shape/loci/label.js +3 -3
- package/lib/commonjs/mol-repr/shape/loci/orientation.js +4 -4
- package/lib/commonjs/mol-repr/shape/loci/plane.js +2 -2
- package/lib/commonjs/mol-repr/shape/model/unitcell.js +2 -2
- package/lib/commonjs/mol-repr/shape/representation.js +2 -2
- package/lib/commonjs/mol-repr/structure/complex-representation.js +2 -2
- package/lib/commonjs/mol-repr/structure/complex-visual.js +12 -12
- package/lib/commonjs/mol-repr/structure/params.js +8 -8
- package/lib/commonjs/mol-repr/structure/registry.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/backbone.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/cartoon.js +3 -3
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/label.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/line.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/orientation.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/point.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/putty.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/spacefill.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation.js +1 -1
- package/lib/commonjs/mol-repr/structure/units-representation.js +2 -2
- package/lib/commonjs/mol-repr/structure/units-visual.js +16 -16
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.js +21 -11
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.js +11 -6
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.js +17 -7
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.js +9 -4
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.js +11 -2
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +11 -2
- package/lib/commonjs/mol-repr/structure/visual/element-cross.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/element-point.js +23 -4
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.js +8 -9
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.js +20 -20
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.js +7 -8
- package/lib/commonjs/mol-repr/structure/visual/label-text.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +6 -6
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.js +7 -7
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/util/bond.js +2 -2
- package/lib/commonjs/mol-repr/structure/visual/util/common.d.ts +1 -3
- package/lib/commonjs/mol-repr/structure/visual/util/common.js +3 -28
- package/lib/commonjs/mol-repr/structure/visual/util/element.js +36 -2
- package/lib/commonjs/mol-repr/structure/visual/util/gaussian.js +13 -13
- package/lib/commonjs/mol-repr/structure/visual/util/link.d.ts +13 -3
- package/lib/commonjs/mol-repr/structure/visual/util/link.js +55 -6
- package/lib/commonjs/mol-repr/structure/visual/util/molecular-surface.js +5 -5
- package/lib/commonjs/mol-repr/structure/visual/util/polymer.js +4 -4
- package/lib/commonjs/mol-repr/util.js +1 -1
- package/lib/commonjs/mol-repr/volume/direct-volume.js +3 -3
- package/lib/commonjs/mol-repr/volume/isosurface.js +9 -9
- package/lib/commonjs/mol-repr/volume/registry.js +1 -1
- package/lib/commonjs/mol-repr/volume/representation.js +5 -5
- package/lib/commonjs/mol-repr/volume/slice.js +4 -4
- package/lib/commonjs/mol-script/language/builder.d.ts +1 -0
- package/lib/commonjs/mol-script/language/parser.js +7 -4
- package/lib/commonjs/mol-script/language/symbol-table/internal.js +1 -1
- package/lib/commonjs/mol-script/language/symbol-table/structure-query.js +1 -1
- package/lib/commonjs/mol-script/runtime/query/compiler.js +1 -1
- package/lib/commonjs/mol-script/script/mol-script/symbols.js +1 -1
- package/lib/commonjs/mol-state/action.js +1 -1
- package/lib/commonjs/mol-state/index.js +8 -8
- package/lib/commonjs/mol-state/state/builder.js +2 -2
- package/lib/commonjs/mol-state/state/selection.js +1 -1
- package/lib/commonjs/mol-state/state.js +21 -21
- package/lib/commonjs/mol-state/transform.js +4 -4
- package/lib/commonjs/mol-state/transformer.js +1 -1
- package/lib/commonjs/mol-task/execution/observable.js +5 -5
- package/lib/commonjs/mol-task/task.js +3 -3
- package/lib/commonjs/mol-task/util/chunked.js +2 -2
- package/lib/commonjs/mol-task/util/multistep.js +1 -1
- package/lib/commonjs/mol-task/util/scheduler.d.ts +2 -2
- package/lib/commonjs/mol-task/util/scheduler.js +8 -8
- package/lib/commonjs/mol-theme/color/atom-id.js +1 -1
- package/lib/commonjs/mol-theme/color/chain-id.js +1 -1
- package/lib/commonjs/mol-theme/color/element-index.js +1 -1
- package/lib/commonjs/mol-theme/color/entity-id.js +1 -1
- package/lib/commonjs/mol-theme/color/entity-source.js +2 -2
- package/lib/commonjs/mol-theme/color/hydrophobicity.js +2 -2
- package/lib/commonjs/mol-theme/color/model-index.js +1 -1
- package/lib/commonjs/mol-theme/color/operator-hkl.js +2 -2
- package/lib/commonjs/mol-theme/color/operator-name.js +1 -1
- package/lib/commonjs/mol-theme/color/polymer-id.js +2 -2
- package/lib/commonjs/mol-theme/color/polymer-index.js +2 -2
- package/lib/commonjs/mol-theme/color/unit-index.js +2 -2
- package/lib/commonjs/mol-theme/label.js +6 -6
- package/lib/commonjs/mol-theme/theme.js +3 -3
- package/lib/commonjs/mol-util/assets.js +7 -7
- package/lib/commonjs/mol-util/color/distinct.js +1 -1
- package/lib/commonjs/mol-util/color/palette.js +3 -3
- package/lib/commonjs/mol-util/color/scale.js +2 -2
- package/lib/commonjs/mol-util/data-source.js +14 -13
- package/lib/commonjs/mol-util/file-info.d.ts +1 -3
- package/lib/commonjs/mol-util/file-info.js +2 -10
- package/lib/commonjs/mol-util/graphql-client.js +4 -4
- package/lib/commonjs/mol-util/index.d.ts +1 -0
- package/lib/commonjs/mol-util/index.js +8 -2
- package/lib/commonjs/mol-util/input/input-observer.js +6 -6
- package/lib/commonjs/mol-util/make-dir.js +1 -1
- package/lib/commonjs/mol-util/material.js +2 -2
- package/lib/commonjs/mol-util/monadic-parser.js +2 -2
- package/lib/commonjs/mol-util/param-definition.js +7 -7
- package/lib/commonjs/mol-util/read.js +2 -2
- package/lib/commonjs/mol-util/retry-if.js +2 -2
- package/lib/commonjs/mol-util/string.js +1 -1
- package/lib/commonjs/mol-util/zip/deflate.js +4 -3
- package/lib/commonjs/mol-util/zip/inflate.js +2 -2
- package/lib/commonjs/mol-util/zip/zip.d.ts +7 -1
- package/lib/commonjs/mol-util/zip/zip.js +21 -16
- package/lib/commonjs/servers/common/file-handle.js +1 -1
- package/lib/commonjs/servers/common/swagger-ui/index.js +1 -1
- package/lib/commonjs/servers/model/config.d.ts +2 -2
- package/lib/commonjs/servers/model/config.js +5 -5
- package/lib/commonjs/servers/model/preprocess/converter.js +2 -2
- package/lib/commonjs/servers/model/preprocess/master.js +3 -3
- package/lib/commonjs/servers/model/preprocess/parallel.js +6 -6
- package/lib/commonjs/servers/model/preprocess/preprocess.js +4 -4
- package/lib/commonjs/servers/model/preprocess.js +1 -1
- package/lib/commonjs/servers/model/properties/providers/pdbe.js +8 -8
- package/lib/commonjs/servers/model/properties/providers/wwpdb.js +12 -12
- package/lib/commonjs/servers/model/property-provider.js +3 -3
- package/lib/commonjs/servers/model/query.js +1 -1
- package/lib/commonjs/servers/model/server/api-local.js +2 -2
- package/lib/commonjs/servers/model/server/api-schema.js +2 -2
- package/lib/commonjs/servers/model/server/api-web.js +5 -5
- package/lib/commonjs/servers/model/server/api.js +6 -6
- package/lib/commonjs/servers/model/server/query.js +15 -15
- package/lib/commonjs/servers/model/server/structure-wrapper.js +21 -21
- package/lib/commonjs/servers/model/server.js +2 -2
- package/lib/commonjs/servers/model/utils/fetch-props-pdbe.js +6 -6
- package/lib/commonjs/servers/model/utils/fetch-retry.js +3 -3
- package/lib/commonjs/servers/model/utils/writer.js +3 -3
- package/lib/commonjs/servers/plugin-state/config.js +1 -1
- package/lib/commonjs/servers/plugin-state/index.js +6 -6
- package/lib/commonjs/servers/volume/common/binary-schema.js +1 -1
- package/lib/commonjs/servers/volume/common/data-format.js +3 -3
- package/lib/commonjs/servers/volume/common/file.js +8 -8
- package/lib/commonjs/servers/volume/config.js +6 -6
- package/lib/commonjs/servers/volume/pack/format/ccp4.js +4 -4
- package/lib/commonjs/servers/volume/pack/format/dsn6.js +4 -4
- package/lib/commonjs/servers/volume/pack/format.js +3 -3
- package/lib/commonjs/servers/volume/pack/main.js +13 -13
- package/lib/commonjs/servers/volume/pack/sampling.js +13 -13
- package/lib/commonjs/servers/volume/pack/writer.js +2 -2
- package/lib/commonjs/servers/volume/pack.js +1 -1
- package/lib/commonjs/servers/volume/query.js +4 -4
- package/lib/commonjs/servers/volume/server/algebra/box.js +1 -1
- package/lib/commonjs/servers/volume/server/api.js +8 -8
- package/lib/commonjs/servers/volume/server/local-api.js +8 -8
- package/lib/commonjs/servers/volume/server/query/compose.js +8 -8
- package/lib/commonjs/servers/volume/server/query/execute.js +10 -10
- package/lib/commonjs/servers/volume/server/query/identify.js +2 -2
- package/lib/commonjs/servers/volume/server/web-api.js +7 -7
- package/lib/commonjs/servers/volume/server.js +2 -2
- package/lib/examples/alpha-orbitals/controls.js +2 -2
- package/lib/examples/alpha-orbitals/index.html +61 -61
- package/lib/examples/basic-wrapper/controls.js +1 -1
- package/lib/examples/basic-wrapper/index.html +137 -137
- package/lib/examples/lighting/index.html +88 -88
- package/lib/examples/proteopedia-wrapper/index.html +236 -236
- package/lib/examples/proteopedia-wrapper/ui/controls.js +1 -1
- package/lib/extensions/cellpack/model.js +4 -2
- package/lib/extensions/cellpack/state.js +2 -2
- package/lib/extensions/dnatco/confal-pyramids/color.d.ts +397 -2
- package/lib/extensions/dnatco/confal-pyramids/color.js +224 -132
- package/lib/extensions/dnatco/confal-pyramids/property.js +1 -3
- package/lib/extensions/dnatco/confal-pyramids/util.js +19 -20
- package/lib/extensions/geo-export/ui.js +2 -2
- package/lib/extensions/model-export/ui.js +2 -2
- package/lib/extensions/mp4-export/ui.js +2 -2
- package/lib/extensions/rcsb/assembly-symmetry/ui.js +3 -3
- package/lib/extensions/rcsb/validation-report/representation.js +19 -2
- package/lib/extensions/zenodo/index.d.ts +7 -0
- package/lib/extensions/zenodo/index.js +32 -0
- package/lib/extensions/zenodo/ui.d.ts +61 -0
- package/lib/extensions/zenodo/ui.js +303 -0
- package/lib/mol-canvas3d/camera.js +2 -1
- package/lib/mol-canvas3d/helper/camera-helper.js +1 -1
- package/lib/mol-canvas3d/helper/handle-helper.js +1 -1
- package/lib/mol-canvas3d/helper/interaction-events.js +1 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
- package/lib/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/mol-geo/geometry/mesh/color-smoothing.d.ts +1 -1
- package/lib/mol-geo/geometry/mesh/color-smoothing.js +5 -3
- package/lib/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/mol-geo/geometry/text/text-builder.js +2 -1
- package/lib/mol-geo/geometry/texture-mesh/color-smoothing.d.ts +1 -1
- package/lib/mol-geo/geometry/texture-mesh/color-smoothing.js +6 -4
- package/lib/mol-gl/shader-code.js +2 -1
- package/lib/mol-gl/webgl/buffer.js +2 -3
- package/lib/mol-gl/webgl/context.d.ts +1 -1
- package/lib/mol-gl/webgl/context.js +2 -2
- package/lib/mol-io/common/binary-cif/classifier.js +3 -2
- package/lib/mol-io/common/binary-cif/decoder.js +4 -3
- package/lib/mol-io/common/io-buffer.d.ts +206 -0
- package/lib/mol-io/common/io-buffer.js +405 -0
- package/lib/mol-io/common/netcdf/reader.d.ts +78 -0
- package/lib/mol-io/common/netcdf/reader.js +456 -0
- package/lib/mol-io/reader/cif/schema/mmcif.d.ts +1 -1
- package/lib/mol-io/reader/nctraj/parser.d.ts +18 -0
- package/lib/mol-io/reader/nctraj/parser.js +97 -0
- package/lib/mol-io/reader/prmtop/parser.d.ts +58 -0
- package/lib/mol-io/reader/prmtop/parser.js +168 -0
- package/lib/mol-io/reader/top/parser.d.ts +37 -0
- package/lib/mol-io/reader/top/parser.js +299 -0
- package/lib/mol-io/reader/trr/parser.d.ts +22 -0
- package/lib/mol-io/reader/trr/parser.js +142 -0
- package/lib/mol-io/writer/cif/encoder.js +2 -1
- package/lib/mol-math/geometry/common.d.ts +2 -1
- package/lib/mol-math/geometry/common.js +1 -1
- package/lib/mol-math/geometry/gaussian-density/cpu.d.ts +1 -1
- package/lib/mol-math/geometry/gaussian-density/cpu.js +2 -2
- package/lib/mol-math/geometry/gaussian-density/gpu.d.ts +1 -1
- package/lib/mol-math/geometry/gaussian-density/gpu.js +7 -7
- package/lib/mol-math/geometry/gaussian-density.d.ts +2 -2
- package/lib/mol-math/geometry/gaussian-density.js +1 -1
- package/lib/mol-math/geometry/molecular-surface.d.ts +2 -1
- package/lib/mol-math/geometry/molecular-surface.js +2 -2
- package/lib/mol-math/geometry/primitives/box3d.js +2 -1
- package/lib/mol-math/geometry/primitives/sphere3d.js +12 -6
- package/lib/mol-model/sequence/sequence.js +2 -1
- package/lib/mol-model/structure/model/types/saccharides.d.ts +8 -0
- package/lib/mol-model/structure/model/types/saccharides.js +8 -0
- package/lib/mol-model/structure/structure/carbohydrates/constants.d.ts +1 -1
- package/lib/mol-model/structure/structure/carbohydrates/constants.js +6 -9
- package/lib/mol-model/structure/structure/structure.js +4 -1
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -0
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +4 -2
- package/lib/mol-model/structure/structure/unit.js +1 -18
- package/lib/mol-model-formats/structure/basic/atomic.d.ts +1 -1
- package/lib/mol-model-formats/structure/basic/atomic.js +1 -14
- package/lib/mol-model-formats/structure/basic/parser.d.ts +1 -1
- package/lib/mol-model-formats/structure/basic/parser.js +1 -1
- package/lib/mol-model-formats/structure/basic/schema.d.ts +2 -2
- package/lib/mol-model-formats/structure/basic/schema.js +7 -2
- package/lib/mol-model-formats/structure/basic/util.d.ts +33 -2
- package/lib/mol-model-formats/structure/basic/util.js +24 -1
- package/lib/mol-model-formats/structure/cif-core.js +4 -4
- package/lib/mol-model-formats/structure/common/component.js +5 -1
- package/lib/mol-model-formats/structure/cube.js +3 -3
- package/lib/mol-model-formats/structure/gro.js +3 -1
- package/lib/mol-model-formats/structure/mmcif.d.ts +1 -1
- package/lib/mol-model-formats/structure/mmcif.js +4 -2
- package/lib/mol-model-formats/structure/mol.js +3 -3
- package/lib/mol-model-formats/structure/mol2.js +4 -4
- package/lib/mol-model-formats/structure/nctraj.d.ts +9 -0
- package/lib/mol-model-formats/structure/nctraj.js +56 -0
- package/lib/mol-model-formats/structure/pdb.d.ts +1 -1
- package/lib/mol-model-formats/structure/pdb.js +5 -3
- package/lib/mol-model-formats/structure/prmtop.d.ts +16 -0
- package/lib/mol-model-formats/structure/prmtop.js +144 -0
- package/lib/mol-model-formats/structure/property/symmetry.js +11 -1
- package/lib/mol-model-formats/structure/psf.js +3 -1
- package/lib/mol-model-formats/structure/top.d.ts +16 -0
- package/lib/mol-model-formats/structure/top.js +186 -0
- package/lib/mol-model-formats/structure/trr.d.ts +9 -0
- package/lib/mol-model-formats/structure/trr.js +42 -0
- package/lib/mol-model-formats/structure/util.d.ts +2 -2
- package/lib/mol-model-formats/structure/util.js +19 -20
- package/lib/mol-model-formats/structure/xyz.js +2 -2
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +9 -3
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +10 -5
- package/lib/mol-model-props/integrative/cross-link-restraint/representation.js +10 -1
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/mol-plugin/context.d.ts +2 -1
- package/lib/mol-plugin/context.js +4 -3
- package/lib/mol-plugin/spec.js +1 -1
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/actions/file.d.ts +1 -1
- package/lib/mol-plugin-state/actions/file.js +88 -55
- package/lib/mol-plugin-state/actions/structure.d.ts +11 -2
- package/lib/mol-plugin-state/actions/structure.js +174 -4
- package/lib/mol-plugin-state/actions/volume.js +3 -2
- package/lib/mol-plugin-state/formats/{structure.d.ts → coordinates.d.ts} +34 -18
- package/lib/mol-plugin-state/formats/coordinates.js +67 -0
- package/lib/mol-plugin-state/formats/registry.d.ts +3 -3
- package/lib/mol-plugin-state/formats/registry.js +13 -8
- package/lib/mol-plugin-state/formats/topology.d.ts +73 -0
- package/lib/mol-plugin-state/formats/topology.js +84 -0
- package/lib/mol-plugin-state/helpers/root-structure.js +1 -1
- package/lib/mol-plugin-state/helpers/structure-component.js +2 -1
- package/lib/mol-plugin-state/manager/snapshots.js +4 -4
- package/lib/mol-plugin-state/objects.d.ts +47 -1
- package/lib/mol-plugin-state/objects.js +17 -1
- package/lib/mol-plugin-state/transforms/data.d.ts +6 -0
- package/lib/mol-plugin-state/transforms/data.js +61 -9
- package/lib/mol-plugin-state/transforms/model.d.ts +14 -2
- package/lib/mol-plugin-state/transforms/model.js +112 -3
- package/lib/mol-plugin-ui/base.js +1 -1
- package/lib/mol-plugin-ui/controls/action-menu.js +7 -7
- package/lib/mol-plugin-ui/controls/color.js +3 -3
- package/lib/mol-plugin-ui/controls/common.js +10 -10
- package/lib/mol-plugin-ui/controls/icons.js +70 -70
- package/lib/mol-plugin-ui/controls/legend.js +3 -3
- package/lib/mol-plugin-ui/controls/line-graph/line-graph-component.js +1 -1
- package/lib/mol-plugin-ui/controls/parameters.js +51 -51
- package/lib/mol-plugin-ui/controls/screenshot.js +2 -2
- package/lib/mol-plugin-ui/controls/slider.js +5 -5
- package/lib/mol-plugin-ui/controls.js +7 -7
- package/lib/mol-plugin-ui/custom/volume.js +4 -4
- package/lib/mol-plugin-ui/left-panel.d.ts +8 -1
- package/lib/mol-plugin-ui/left-panel.js +33 -12
- package/lib/mol-plugin-ui/plugin.js +10 -10
- package/lib/mol-plugin-ui/sequence/sequence.js +1 -1
- package/lib/mol-plugin-ui/sequence.js +5 -5
- package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
- package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
- package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
- package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
- package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
- package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
- package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -643
- package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
- package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
- package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
- package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
- package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
- package/lib/mol-plugin-ui/skin/base/components/viewport.scss +128 -128
- package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
- package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
- package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
- package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
- package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
- package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
- package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
- package/lib/mol-plugin-ui/skin/blue.scss +1 -1
- package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
- package/lib/mol-plugin-ui/skin/dark.scss +1 -1
- package/lib/mol-plugin-ui/skin/light.scss +1 -1
- package/lib/mol-plugin-ui/state/actions.js +1 -1
- package/lib/mol-plugin-ui/state/animation.js +1 -1
- package/lib/mol-plugin-ui/state/common.js +7 -7
- package/lib/mol-plugin-ui/state/snapshots.js +9 -9
- package/lib/mol-plugin-ui/state/tree.js +14 -14
- package/lib/mol-plugin-ui/state/update-transform.js +1 -1
- package/lib/mol-plugin-ui/structure/components.js +10 -10
- package/lib/mol-plugin-ui/structure/focus.js +1 -1
- package/lib/mol-plugin-ui/structure/generic.js +4 -4
- package/lib/mol-plugin-ui/structure/measurements.js +8 -8
- package/lib/mol-plugin-ui/structure/quick-styles.js +2 -2
- package/lib/mol-plugin-ui/structure/selection.js +7 -7
- package/lib/mol-plugin-ui/structure/source.js +4 -4
- package/lib/mol-plugin-ui/structure/superposition.js +8 -8
- package/lib/mol-plugin-ui/structure/volume.js +4 -4
- package/lib/mol-plugin-ui/task.js +5 -5
- package/lib/mol-plugin-ui/toast.js +4 -4
- package/lib/mol-plugin-ui/viewport/canvas.js +3 -3
- package/lib/mol-plugin-ui/viewport/help.js +8 -8
- package/lib/mol-plugin-ui/viewport/screenshot.js +3 -3
- package/lib/mol-plugin-ui/viewport/simple-settings.js +1 -1
- package/lib/mol-plugin-ui/viewport.js +4 -4
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +1 -1
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.js +20 -10
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -1
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.js +10 -5
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.js +16 -6
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.js +8 -3
- package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.js +10 -1
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +10 -1
- package/lib/mol-repr/structure/visual/element-point.d.ts +1 -1
- package/lib/mol-repr/structure/visual/element-point.js +22 -3
- package/lib/mol-repr/structure/visual/gaussian-density-volume.js +2 -3
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.js +10 -10
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -1
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.js +4 -5
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +4 -4
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -1
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.js +5 -5
- package/lib/mol-repr/structure/visual/util/common.d.ts +1 -3
- package/lib/mol-repr/structure/visual/util/common.js +1 -24
- package/lib/mol-repr/structure/visual/util/element.js +36 -2
- package/lib/mol-repr/structure/visual/util/link.d.ts +13 -3
- package/lib/mol-repr/structure/visual/util/link.js +55 -6
- package/lib/mol-script/language/builder.d.ts +1 -0
- package/lib/mol-script/language/parser.js +7 -4
- package/lib/mol-task/util/scheduler.d.ts +2 -2
- package/lib/mol-task/util/scheduler.js +7 -7
- package/lib/mol-theme/color/hydrophobicity.js +2 -2
- package/lib/mol-util/data-source.js +2 -1
- package/lib/mol-util/file-info.d.ts +1 -3
- package/lib/mol-util/file-info.js +2 -10
- package/lib/mol-util/index.d.ts +1 -0
- package/lib/mol-util/index.js +5 -0
- package/lib/mol-util/zip/deflate.js +2 -1
- package/lib/mol-util/zip/zip.d.ts +7 -1
- package/lib/mol-util/zip/zip.js +5 -1
- package/lib/servers/model/config.d.ts +2 -2
- package/package.json +160 -160
- package/lib/commonjs/mol-plugin-state/formats/structure.js +0 -64
- package/lib/mol-plugin-state/formats/structure.js +0 -61
|
@@ -9,7 +9,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
9
9
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
10
10
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
11
11
|
*/
|
|
12
|
-
var React =
|
|
12
|
+
var React = tslib_1.__importStar(require("react"));
|
|
13
13
|
var linear_algebra_1 = require("../../mol-math/linear-algebra");
|
|
14
14
|
var assets_1 = require("../../mol-util/assets");
|
|
15
15
|
var color_1 = require("../../mol-util/color");
|
|
@@ -27,7 +27,7 @@ var legend_1 = require("./legend");
|
|
|
27
27
|
var line_graph_component_1 = require("./line-graph/line-graph-component");
|
|
28
28
|
var slider_1 = require("./slider");
|
|
29
29
|
var ParameterControls = /** @class */ (function (_super) {
|
|
30
|
-
|
|
30
|
+
tslib_1.__extends(ParameterControls, _super);
|
|
31
31
|
function ParameterControls() {
|
|
32
32
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
33
33
|
_this.onChange = function (params) {
|
|
@@ -35,7 +35,7 @@ var ParameterControls = /** @class */ (function (_super) {
|
|
|
35
35
|
var _b, _c;
|
|
36
36
|
(_c = (_b = _this.props).onChange) === null || _c === void 0 ? void 0 : _c.call(_b, params, _this.props.values);
|
|
37
37
|
if (_this.props.onChangeValues) {
|
|
38
|
-
var values =
|
|
38
|
+
var values = tslib_1.__assign(tslib_1.__assign({}, _this.props.values), (_a = {}, _a[params.name] = params.value, _a));
|
|
39
39
|
_this.props.onChangeValues(values, _this.props.values);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
@@ -61,7 +61,7 @@ var ParameterControls = /** @class */ (function (_super) {
|
|
|
61
61
|
if (!ctrls)
|
|
62
62
|
return null;
|
|
63
63
|
if (category) {
|
|
64
|
-
return [(0, jsx_runtime_1.jsx)(common_1.ExpandGroup,
|
|
64
|
+
return [(0, jsx_runtime_1.jsx)(common_1.ExpandGroup, tslib_1.__assign({ header: category }, { children: ctrls }), category)];
|
|
65
65
|
}
|
|
66
66
|
return ctrls;
|
|
67
67
|
};
|
|
@@ -86,7 +86,7 @@ var ParameterControls = /** @class */ (function (_super) {
|
|
|
86
86
|
var essentials = this.renderPart(groups.essentials);
|
|
87
87
|
var advanced = this.renderPart(groups.advanced);
|
|
88
88
|
if (essentials && advanced) {
|
|
89
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [essentials, (0, jsx_runtime_1.jsx)(common_1.ExpandGroup,
|
|
89
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [essentials, (0, jsx_runtime_1.jsx)(common_1.ExpandGroup, tslib_1.__assign({ header: 'Advanced Options' }, { children: advanced }))] });
|
|
90
90
|
}
|
|
91
91
|
else if (essentials) {
|
|
92
92
|
return essentials;
|
|
@@ -99,12 +99,12 @@ var ParameterControls = /** @class */ (function (_super) {
|
|
|
99
99
|
}(React.PureComponent));
|
|
100
100
|
exports.ParameterControls = ParameterControls;
|
|
101
101
|
var ParameterMappingControl = /** @class */ (function (_super) {
|
|
102
|
-
|
|
102
|
+
tslib_1.__extends(ParameterMappingControl, _super);
|
|
103
103
|
function ParameterMappingControl() {
|
|
104
104
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
105
105
|
_this.setSettings = function (p, old) {
|
|
106
106
|
var _a;
|
|
107
|
-
var values =
|
|
107
|
+
var values = tslib_1.__assign(tslib_1.__assign({}, old), (_a = {}, _a[p.name] = p.value, _a));
|
|
108
108
|
var t = _this.props.mapping.update(values, _this.plugin);
|
|
109
109
|
_this.props.mapping.apply(t, _this.plugin);
|
|
110
110
|
};
|
|
@@ -118,7 +118,7 @@ var ParameterMappingControl = /** @class */ (function (_super) {
|
|
|
118
118
|
var t = this.props.mapping.getTarget(this.plugin);
|
|
119
119
|
var values = this.props.mapping.getValues(t, this.plugin);
|
|
120
120
|
var params = this.props.mapping.params(this.plugin);
|
|
121
|
-
return (0, jsx_runtime_1.jsx)(ParameterControls, { params: params, values: values, onChange: this.setSettings }
|
|
121
|
+
return (0, jsx_runtime_1.jsx)(ParameterControls, { params: params, values: values, onChange: this.setSettings });
|
|
122
122
|
};
|
|
123
123
|
return ParameterMappingControl;
|
|
124
124
|
}(base_1.PluginUIComponent));
|
|
@@ -201,14 +201,14 @@ function controlFor(param) {
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
var ParamHelp = /** @class */ (function (_super) {
|
|
204
|
-
|
|
204
|
+
tslib_1.__extends(ParamHelp, _super);
|
|
205
205
|
function ParamHelp() {
|
|
206
206
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
207
207
|
}
|
|
208
208
|
ParamHelp.prototype.render = function () {
|
|
209
209
|
var _a = this.props, legend = _a.legend, description = _a.description;
|
|
210
210
|
var Legend = legend && (0, legend_1.legendFor)(legend);
|
|
211
|
-
return (0, jsx_runtime_1.jsx)("div",
|
|
211
|
+
return (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-help-text' }, { children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-help-description' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.HelpOutlineSvg, inline: true }), description] })), Legend && (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-help-legend' }, { children: (0, jsx_runtime_1.jsx)(Legend, { legend: legend }) }))] }) }));
|
|
212
212
|
};
|
|
213
213
|
return ParamHelp;
|
|
214
214
|
}(React.PureComponent));
|
|
@@ -228,10 +228,10 @@ function renderSimple(options) {
|
|
|
228
228
|
var hasHelp = help.description || help.legend;
|
|
229
229
|
var desc = label + (hasHelp ? '. Click for help.' : '');
|
|
230
230
|
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.ControlRow, { className: className, title: desc, label: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [label, hasHelp &&
|
|
231
|
-
(0, jsx_runtime_1.jsx)("button",
|
|
231
|
+
(0, jsx_runtime_1.jsx)("button", tslib_1.__assign({ className: 'msp-help msp-btn-link msp-btn-icon msp-control-group-expander', onClick: toggleHelp, title: desc || "".concat(state.showHelp ? 'Hide' : 'Show', " help"), style: { background: 'transparent', textAlign: 'left', padding: '0' } }, { children: (0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.HelpOutlineSvg }) }))] }), control: control }), hasHelp && state.showHelp && (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: (0, jsx_runtime_1.jsx)(ParamHelp, { legend: help.legend, description: help.description }) })), addOn] });
|
|
232
232
|
}
|
|
233
233
|
var SimpleParam = /** @class */ (function (_super) {
|
|
234
|
-
|
|
234
|
+
tslib_1.__extends(SimpleParam, _super);
|
|
235
235
|
function SimpleParam() {
|
|
236
236
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
237
237
|
_this.state = { showHelp: false };
|
|
@@ -255,20 +255,20 @@ var SimpleParam = /** @class */ (function (_super) {
|
|
|
255
255
|
}(React.PureComponent));
|
|
256
256
|
exports.SimpleParam = SimpleParam;
|
|
257
257
|
var BoolControl = /** @class */ (function (_super) {
|
|
258
|
-
|
|
258
|
+
tslib_1.__extends(BoolControl, _super);
|
|
259
259
|
function BoolControl() {
|
|
260
260
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
261
261
|
_this.onClick = function (e) { _this.update(!_this.props.value); e.currentTarget.blur(); };
|
|
262
262
|
return _this;
|
|
263
263
|
}
|
|
264
264
|
BoolControl.prototype.renderControl = function () {
|
|
265
|
-
return (0, jsx_runtime_1.jsxs)("button",
|
|
265
|
+
return (0, jsx_runtime_1.jsxs)("button", tslib_1.__assign({ onClick: this.onClick, disabled: this.props.isDisabled }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: this.props.value ? icons_1.CheckSvg : icons_1.ClearSvg }), this.props.value ? 'On' : 'Off'] }));
|
|
266
266
|
};
|
|
267
267
|
return BoolControl;
|
|
268
268
|
}(SimpleParam));
|
|
269
269
|
exports.BoolControl = BoolControl;
|
|
270
270
|
var LineGraphControl = /** @class */ (function (_super) {
|
|
271
|
-
|
|
271
|
+
tslib_1.__extends(LineGraphControl, _super);
|
|
272
272
|
function LineGraphControl() {
|
|
273
273
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
274
274
|
_this.state = {
|
|
@@ -298,13 +298,13 @@ var LineGraphControl = /** @class */ (function (_super) {
|
|
|
298
298
|
}
|
|
299
299
|
LineGraphControl.prototype.render = function () {
|
|
300
300
|
var label = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
301
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.ControlRow, { label: label, control: (0, jsx_runtime_1.jsx)("button",
|
|
301
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.ControlRow, { label: label, control: (0, jsx_runtime_1.jsx)("button", tslib_1.__assign({ onClick: this.toggleExpanded, disabled: this.props.isDisabled }, { children: "".concat(this.state.message) })) }), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-offset', style: { display: this.state.isExpanded ? 'block' : 'none' } }, { children: (0, jsx_runtime_1.jsx)(line_graph_component_1.LineGraphComponent, { data: this.props.param.defaultValue, onChange: this.onChange, onHover: this.onHover, onDrag: this.onDrag }) }))] });
|
|
302
302
|
};
|
|
303
303
|
return LineGraphControl;
|
|
304
304
|
}(React.PureComponent));
|
|
305
305
|
exports.LineGraphControl = LineGraphControl;
|
|
306
306
|
var NumberInputControl = /** @class */ (function (_super) {
|
|
307
|
-
|
|
307
|
+
tslib_1.__extends(NumberInputControl, _super);
|
|
308
308
|
function NumberInputControl() {
|
|
309
309
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
310
310
|
_this.state = { value: '0' };
|
|
@@ -319,13 +319,13 @@ var NumberInputControl = /** @class */ (function (_super) {
|
|
|
319
319
|
var placeholder = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
320
320
|
var label = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
321
321
|
var p = (0, number_1.getPrecision)(this.props.param.step || 0.01);
|
|
322
|
-
return (0, jsx_runtime_1.jsx)(common_1.ControlRow, { title: this.props.param.description, label: label, control: (0, jsx_runtime_1.jsx)(common_1.TextInput, { numeric: true, value: parseFloat(this.props.value.toFixed(p)), onEnter: this.props.onEnter, placeholder: placeholder, isDisabled: this.props.isDisabled, onChange: this.update }
|
|
322
|
+
return (0, jsx_runtime_1.jsx)(common_1.ControlRow, { title: this.props.param.description, label: label, control: (0, jsx_runtime_1.jsx)(common_1.TextInput, { numeric: true, value: parseFloat(this.props.value.toFixed(p)), onEnter: this.props.onEnter, placeholder: placeholder, isDisabled: this.props.isDisabled, onChange: this.update }) });
|
|
323
323
|
};
|
|
324
324
|
return NumberInputControl;
|
|
325
325
|
}(React.PureComponent));
|
|
326
326
|
exports.NumberInputControl = NumberInputControl;
|
|
327
327
|
var NumberRangeControl = /** @class */ (function (_super) {
|
|
328
|
-
|
|
328
|
+
tslib_1.__extends(NumberRangeControl, _super);
|
|
329
329
|
function NumberRangeControl() {
|
|
330
330
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
331
331
|
_this.onChange = function (v) { _this.update(v); };
|
|
@@ -333,13 +333,13 @@ var NumberRangeControl = /** @class */ (function (_super) {
|
|
|
333
333
|
}
|
|
334
334
|
NumberRangeControl.prototype.renderControl = function () {
|
|
335
335
|
var value = typeof this.props.value === 'undefined' ? this.props.param.defaultValue : this.props.value;
|
|
336
|
-
return (0, jsx_runtime_1.jsx)(slider_1.Slider, { value: value, min: this.props.param.min, max: this.props.param.max, step: this.props.param.step, onChange: this.onChange, onChangeImmediate: this.props.param.immediateUpdate ? this.onChange : void 0, disabled: this.props.isDisabled, onEnter: this.props.onEnter }
|
|
336
|
+
return (0, jsx_runtime_1.jsx)(slider_1.Slider, { value: value, min: this.props.param.min, max: this.props.param.max, step: this.props.param.step, onChange: this.onChange, onChangeImmediate: this.props.param.immediateUpdate ? this.onChange : void 0, disabled: this.props.isDisabled, onEnter: this.props.onEnter });
|
|
337
337
|
};
|
|
338
338
|
return NumberRangeControl;
|
|
339
339
|
}(SimpleParam));
|
|
340
340
|
exports.NumberRangeControl = NumberRangeControl;
|
|
341
341
|
var TextControl = /** @class */ (function (_super) {
|
|
342
|
-
|
|
342
|
+
tslib_1.__extends(TextControl, _super);
|
|
343
343
|
function TextControl() {
|
|
344
344
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
345
345
|
_this.onChange = function (e) {
|
|
@@ -359,13 +359,13 @@ var TextControl = /** @class */ (function (_super) {
|
|
|
359
359
|
}
|
|
360
360
|
TextControl.prototype.renderControl = function () {
|
|
361
361
|
var placeholder = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
362
|
-
return (0, jsx_runtime_1.jsx)("input", { type: 'text', value: this.props.value || '', placeholder: placeholder, onChange: this.onChange, onKeyPress: this.props.onEnter ? this.onKeyPress : void 0, disabled: this.props.isDisabled }
|
|
362
|
+
return (0, jsx_runtime_1.jsx)("input", { type: 'text', value: this.props.value || '', placeholder: placeholder, onChange: this.onChange, onKeyPress: this.props.onEnter ? this.onKeyPress : void 0, disabled: this.props.isDisabled });
|
|
363
363
|
};
|
|
364
364
|
return TextControl;
|
|
365
365
|
}(SimpleParam));
|
|
366
366
|
exports.TextControl = TextControl;
|
|
367
367
|
var PureSelectControl = /** @class */ (function (_super) {
|
|
368
|
-
|
|
368
|
+
tslib_1.__extends(PureSelectControl, _super);
|
|
369
369
|
function PureSelectControl() {
|
|
370
370
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
371
371
|
_this.onChange = function (e) {
|
|
@@ -384,16 +384,16 @@ var PureSelectControl = /** @class */ (function (_super) {
|
|
|
384
384
|
PureSelectControl.prototype.render = function () {
|
|
385
385
|
var _this = this;
|
|
386
386
|
var isInvalid = this.props.value !== void 0 && !this.props.param.options.some(function (e) { return e[0] === _this.props.value; });
|
|
387
|
-
return (0, jsx_runtime_1.jsxs)("select",
|
|
387
|
+
return (0, jsx_runtime_1.jsxs)("select", tslib_1.__assign({ className: 'msp-form-control', title: this.props.title, value: this.props.value !== void 0 ? this.props.value : this.props.param.defaultValue, onChange: this.onChange, disabled: this.props.isDisabled }, { children: [isInvalid && (0, jsx_runtime_1.jsx)("option", tslib_1.__assign({ value: this.props.value }, { children: "[Invalid] ".concat(this.props.value) }), this.props.value), this.props.param.options.map(function (_a) {
|
|
388
388
|
var value = _a[0], label = _a[1];
|
|
389
|
-
return (0, jsx_runtime_1.jsx)("option",
|
|
390
|
-
})] })
|
|
389
|
+
return (0, jsx_runtime_1.jsx)("option", tslib_1.__assign({ value: value }, { children: label }), value);
|
|
390
|
+
})] }));
|
|
391
391
|
};
|
|
392
392
|
return PureSelectControl;
|
|
393
393
|
}(React.PureComponent));
|
|
394
394
|
exports.PureSelectControl = PureSelectControl;
|
|
395
395
|
var SelectControl = /** @class */ (function (_super) {
|
|
396
|
-
|
|
396
|
+
tslib_1.__extends(SelectControl, _super);
|
|
397
397
|
function SelectControl() {
|
|
398
398
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
399
399
|
_this.state = { showHelp: false, showOptions: false };
|
|
@@ -433,14 +433,14 @@ var SelectControl = /** @class */ (function (_super) {
|
|
|
433
433
|
? (this.props.value === 'on' ? icons_1.CheckSvg
|
|
434
434
|
: this.props.value === 'off' ? icons_1.ClearSvg : void 0)
|
|
435
435
|
: void 0;
|
|
436
|
-
return (0, jsx_runtime_1.jsx)(common_1.ToggleButton, { disabled: this.props.isDisabled, style: { textAlign: textAlign, overflow: 'hidden', textOverflow: 'ellipsis' }, label: label, title: label, icon: icon, toggle: toggle, isSelected: this.state.showOptions }
|
|
436
|
+
return (0, jsx_runtime_1.jsx)(common_1.ToggleButton, { disabled: this.props.isDisabled, style: { textAlign: textAlign, overflow: 'hidden', textOverflow: 'ellipsis' }, label: label, title: label, icon: icon, toggle: toggle, isSelected: this.state.showOptions });
|
|
437
437
|
};
|
|
438
438
|
SelectControl.prototype.renderAddOn = function () {
|
|
439
439
|
if (!this.state.showOptions)
|
|
440
440
|
return null;
|
|
441
441
|
var items = this.items(this.props.param);
|
|
442
442
|
var current = action_menu_1.ActionMenu.findItem(items, this.props.value);
|
|
443
|
-
return (0, jsx_runtime_1.jsx)(action_menu_1.ActionMenu, { items: items, current: current, onSelect: this.onSelect }
|
|
443
|
+
return (0, jsx_runtime_1.jsx)(action_menu_1.ActionMenu, { items: items, current: current, onSelect: this.onSelect });
|
|
444
444
|
};
|
|
445
445
|
SelectControl.prototype.render = function () {
|
|
446
446
|
return renderSimple({
|
|
@@ -455,7 +455,7 @@ var SelectControl = /** @class */ (function (_super) {
|
|
|
455
455
|
}(React.PureComponent));
|
|
456
456
|
exports.SelectControl = SelectControl;
|
|
457
457
|
var ValueRefControl = /** @class */ (function (_super) {
|
|
458
|
-
|
|
458
|
+
tslib_1.__extends(ValueRefControl, _super);
|
|
459
459
|
function ValueRefControl() {
|
|
460
460
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
461
461
|
_this.state = { showHelp: false, showOptions: false };
|
|
@@ -481,14 +481,14 @@ var ValueRefControl = /** @class */ (function (_super) {
|
|
|
481
481
|
var label = current
|
|
482
482
|
? current.label
|
|
483
483
|
: "[Ref] ".concat((_a = this.props.value.ref) !== null && _a !== void 0 ? _a : '');
|
|
484
|
-
return (0, jsx_runtime_1.jsx)(common_1.ToggleButton, { disabled: this.props.isDisabled, style: { textAlign: 'left', overflow: 'hidden', textOverflow: 'ellipsis' }, label: label, title: label, toggle: this.toggle, isSelected: this.state.showOptions }
|
|
484
|
+
return (0, jsx_runtime_1.jsx)(common_1.ToggleButton, { disabled: this.props.isDisabled, style: { textAlign: 'left', overflow: 'hidden', textOverflow: 'ellipsis' }, label: label, title: label, toggle: this.toggle, isSelected: this.state.showOptions });
|
|
485
485
|
};
|
|
486
486
|
ValueRefControl.prototype.renderAddOn = function () {
|
|
487
487
|
if (!this.state.showOptions)
|
|
488
488
|
return null;
|
|
489
489
|
var items = this.items(this.props.param);
|
|
490
490
|
var current = action_menu_1.ActionMenu.findItem(items, this.props.value.ref);
|
|
491
|
-
return (0, jsx_runtime_1.jsx)(action_menu_1.ActionMenu, { items: items, current: current, onSelect: this.onSelect }
|
|
491
|
+
return (0, jsx_runtime_1.jsx)(action_menu_1.ActionMenu, { items: items, current: current, onSelect: this.onSelect });
|
|
492
492
|
};
|
|
493
493
|
ValueRefControl.prototype.render = function () {
|
|
494
494
|
return renderSimple({
|
|
@@ -503,7 +503,7 @@ var ValueRefControl = /** @class */ (function (_super) {
|
|
|
503
503
|
}(React.PureComponent));
|
|
504
504
|
exports.ValueRefControl = ValueRefControl;
|
|
505
505
|
var IntervalControl = /** @class */ (function (_super) {
|
|
506
|
-
|
|
506
|
+
tslib_1.__extends(IntervalControl, _super);
|
|
507
507
|
function IntervalControl() {
|
|
508
508
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
509
509
|
_this.state = { isExpanded: false };
|
|
@@ -513,7 +513,7 @@ var IntervalControl = /** @class */ (function (_super) {
|
|
|
513
513
|
};
|
|
514
514
|
_this.componentChange = function (_a) {
|
|
515
515
|
var name = _a.name, value = _a.value;
|
|
516
|
-
var v =
|
|
516
|
+
var v = tslib_1.__spreadArray([], _this.props.value, true);
|
|
517
517
|
v[+name] = value;
|
|
518
518
|
_this.change(v);
|
|
519
519
|
};
|
|
@@ -531,26 +531,26 @@ var IntervalControl = /** @class */ (function (_super) {
|
|
|
531
531
|
var label = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
532
532
|
var p = (0, number_1.getPrecision)(this.props.param.step || 0.01);
|
|
533
533
|
var value = "[".concat(v[0].toFixed(p), ", ").concat(v[1].toFixed(p), "]");
|
|
534
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.ControlRow, { label: label, control: (0, jsx_runtime_1.jsx)("button",
|
|
534
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.ControlRow, { label: label, control: (0, jsx_runtime_1.jsx)("button", tslib_1.__assign({ onClick: this.toggleExpanded, disabled: this.props.isDisabled }, { children: value })) }), this.state.isExpanded && (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: (0, jsx_runtime_1.jsx)(ParameterControls, { params: this.components, values: v, onChange: this.componentChange, onEnter: this.props.onEnter }) }))] });
|
|
535
535
|
};
|
|
536
536
|
return IntervalControl;
|
|
537
537
|
}(React.PureComponent));
|
|
538
538
|
exports.IntervalControl = IntervalControl;
|
|
539
539
|
var BoundedIntervalControl = /** @class */ (function (_super) {
|
|
540
|
-
|
|
540
|
+
tslib_1.__extends(BoundedIntervalControl, _super);
|
|
541
541
|
function BoundedIntervalControl() {
|
|
542
542
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
543
543
|
_this.onChange = function (v) { _this.update(v); };
|
|
544
544
|
return _this;
|
|
545
545
|
}
|
|
546
546
|
BoundedIntervalControl.prototype.renderControl = function () {
|
|
547
|
-
return (0, jsx_runtime_1.jsx)(slider_1.Slider2, { value: this.props.value, min: this.props.param.min, max: this.props.param.max, step: this.props.param.step, onChange: this.onChange, disabled: this.props.isDisabled, onEnter: this.props.onEnter }
|
|
547
|
+
return (0, jsx_runtime_1.jsx)(slider_1.Slider2, { value: this.props.value, min: this.props.param.min, max: this.props.param.max, step: this.props.param.step, onChange: this.onChange, disabled: this.props.isDisabled, onEnter: this.props.onEnter });
|
|
548
548
|
};
|
|
549
549
|
return BoundedIntervalControl;
|
|
550
550
|
}(SimpleParam));
|
|
551
551
|
exports.BoundedIntervalControl = BoundedIntervalControl;
|
|
552
552
|
var ColorControl = /** @class */ (function (_super) {
|
|
553
|
-
|
|
553
|
+
tslib_1.__extends(ColorControl, _super);
|
|
554
554
|
function ColorControl() {
|
|
555
555
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
556
556
|
_this.onChange = function (e) {
|
|
@@ -569,7 +569,7 @@ var ColorControl = /** @class */ (function (_super) {
|
|
|
569
569
|
};
|
|
570
570
|
};
|
|
571
571
|
ColorControl.prototype.renderControl = function () {
|
|
572
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
572
|
+
return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ style: { position: 'relative' } }, { children: [(0, jsx_runtime_1.jsxs)("select", tslib_1.__assign({ value: this.props.value, onChange: this.onChange }, { children: [(0, color_2.ColorValueOption)(this.props.value), (0, color_2.ColorOptions)()] })), (0, jsx_runtime_1.jsx)("div", { style: this.stripStyle() })] }));
|
|
573
573
|
};
|
|
574
574
|
return ColorControl;
|
|
575
575
|
}(SimpleParam));
|
|
@@ -614,7 +614,7 @@ function colorGradient(colors, banded) {
|
|
|
614
614
|
function createColorListHelpers() {
|
|
615
615
|
var addOn = function (l) {
|
|
616
616
|
var preset = (0, lists_1.getColorListFromName)(l[0]);
|
|
617
|
-
return (0, jsx_runtime_1.jsx)("div", { style: colorStripStyle({ kind: preset.type !== 'qualitative' ? 'interpolate' : 'set', colors: preset.list }) }
|
|
617
|
+
return (0, jsx_runtime_1.jsx)("div", { style: colorStripStyle({ kind: preset.type !== 'qualitative' ? 'interpolate' : 'set', colors: preset.list }) });
|
|
618
618
|
};
|
|
619
619
|
return {
|
|
620
620
|
ColorPresets: {
|
|
@@ -641,7 +641,7 @@ function ColorListHelpers() {
|
|
|
641
641
|
return _colorListHelpers;
|
|
642
642
|
}
|
|
643
643
|
var ColorListControl = /** @class */ (function (_super) {
|
|
644
|
-
|
|
644
|
+
tslib_1.__extends(ColorListControl, _super);
|
|
645
645
|
function ColorListControl() {
|
|
646
646
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
647
647
|
_this.state = { showHelp: false, show: void 0 };
|
|
@@ -674,7 +674,7 @@ var ColorListControl = /** @class */ (function (_super) {
|
|
|
674
674
|
ColorListControl.prototype.renderControl = function () {
|
|
675
675
|
var value = this.props.value;
|
|
676
676
|
// TODO: fix the button right offset
|
|
677
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("button",
|
|
677
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("button", tslib_1.__assign({ onClick: this.toggleEdit, style: { position: 'relative', paddingRight: '33px' } }, { children: [value.colors.length === 1 ? '1 color' : "".concat(value.colors.length, " colors"), (0, jsx_runtime_1.jsx)("div", { style: colorStripStyle(value, '33px') })] })), (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.BookmarksOutlinedSvg, onClick: this.togglePresets, toggleState: this.state.show === 'presets', title: 'Color Presets', style: { padding: 0, position: 'absolute', right: 0, top: 0, width: '32px' } })] });
|
|
678
678
|
};
|
|
679
679
|
ColorListControl.prototype.renderColors = function () {
|
|
680
680
|
if (!this.state.show)
|
|
@@ -682,9 +682,9 @@ var ColorListControl = /** @class */ (function (_super) {
|
|
|
682
682
|
var _a = ColorListHelpers(), ColorPresets = _a.ColorPresets, ColorsParam = _a.ColorsParam, IsInterpolatedParam = _a.IsInterpolatedParam;
|
|
683
683
|
var preset = ColorPresets[this.props.param.presetKind];
|
|
684
684
|
if (this.state.show === 'presets')
|
|
685
|
-
return (0, jsx_runtime_1.jsx)(action_menu_1.ActionMenu, { items: preset, onSelect: this.selectPreset }
|
|
685
|
+
return (0, jsx_runtime_1.jsx)(action_menu_1.ActionMenu, { items: preset, onSelect: this.selectPreset });
|
|
686
686
|
var values = this.props.value.colors.map(function (color) { return ({ color: color }); });
|
|
687
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
687
|
+
return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: [(0, jsx_runtime_1.jsx)(ObjectListControl, { name: 'colors', param: ColorsParam, value: values, onChange: this.colorsChanged, isDisabled: this.props.isDisabled, onEnter: this.props.onEnter }), (0, jsx_runtime_1.jsx)(BoolControl, { name: 'isInterpolated', param: IsInterpolatedParam, value: this.props.value.kind === 'interpolate', onChange: this.isInterpolatedChanged, isDisabled: this.props.isDisabled, onEnter: this.props.onEnter })] }));
|
|
688
688
|
};
|
|
689
689
|
ColorListControl.prototype.render = function () {
|
|
690
690
|
return renderSimple({
|
|
@@ -699,7 +699,7 @@ var ColorListControl = /** @class */ (function (_super) {
|
|
|
699
699
|
}(React.PureComponent));
|
|
700
700
|
exports.ColorListControl = ColorListControl;
|
|
701
701
|
var OffsetColorListControl = /** @class */ (function (_super) {
|
|
702
|
-
|
|
702
|
+
tslib_1.__extends(OffsetColorListControl, _super);
|
|
703
703
|
function OffsetColorListControl() {
|
|
704
704
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
705
705
|
_this.state = { showHelp: false, show: void 0 };
|
|
@@ -731,7 +731,7 @@ var OffsetColorListControl = /** @class */ (function (_super) {
|
|
|
731
731
|
OffsetColorListControl.prototype.renderControl = function () {
|
|
732
732
|
var value = this.props.value;
|
|
733
733
|
// TODO: fix the button right offset
|
|
734
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("button",
|
|
734
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("button", tslib_1.__assign({ onClick: this.toggleEdit, style: { position: 'relative', paddingRight: '33px' } }, { children: [value.colors.length === 1 ? '1 color' : "".concat(value.colors.length, " colors"), (0, jsx_runtime_1.jsx)("div", { style: colorStripStyle(value, '33px') })] })), (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.BookmarksOutlinedSvg, onClick: this.togglePresets, toggleState: this.state.show === 'presets', title: 'Color Presets', style: { padding: 0, position: 'absolute', right: 0, top: 0, width: '32px' } })] });
|
|
735
735
|
};
|
|
736
736
|
OffsetColorListControl.prototype.renderColors = function () {
|
|
737
737
|
if (!this.state.show)
|
|
@@ -739,7 +739,7 @@ var OffsetColorListControl = /** @class */ (function (_super) {
|
|
|
739
739
|
var _a = ColorListHelpers(), ColorPresets = _a.ColorPresets, OffsetColorsParam = _a.OffsetColorsParam, IsInterpolatedParam = _a.IsInterpolatedParam;
|
|
740
740
|
var preset = ColorPresets[this.props.param.presetKind];
|
|
741
741
|
if (this.state.show === 'presets')
|
|
742
|
-
return (0, jsx_runtime_1.jsx)(action_menu_1.ActionMenu, { items: preset, onSelect: this.selectPreset }
|
|
742
|
+
return (0, jsx_runtime_1.jsx)(action_menu_1.ActionMenu, { items: preset, onSelect: this.selectPreset });
|
|
743
743
|
var colors = this.props.value.colors;
|
|
744
744
|
var values = colors.map(function (color, i) {
|
|
745
745
|
if (Array.isArray(color))
|
|
@@ -747,7 +747,7 @@ var OffsetColorListControl = /** @class */ (function (_super) {
|
|
|
747
747
|
return { color: color, offset: i / colors.length };
|
|
748
748
|
});
|
|
749
749
|
values.sort(function (a, b) { return a.offset - b.offset; });
|
|
750
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
750
|
+
return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: [(0, jsx_runtime_1.jsx)(ObjectListControl, { name: 'colors', param: OffsetColorsParam, value: values, onChange: this.colorsChanged, isDisabled: this.props.isDisabled, onEnter: this.props.onEnter }), (0, jsx_runtime_1.jsx)(BoolControl, { name: 'isInterpolated', param: IsInterpolatedParam, value: this.props.value.kind === 'interpolate', onChange: this.isInterpolatedChanged, isDisabled: this.props.isDisabled, onEnter: this.props.onEnter })] }));
|
|
751
751
|
};
|
|
752
752
|
OffsetColorListControl.prototype.render = function () {
|
|
753
753
|
return renderSimple({
|
|
@@ -762,7 +762,7 @@ var OffsetColorListControl = /** @class */ (function (_super) {
|
|
|
762
762
|
}(React.PureComponent));
|
|
763
763
|
exports.OffsetColorListControl = OffsetColorListControl;
|
|
764
764
|
var Vec3Control = /** @class */ (function (_super) {
|
|
765
|
-
|
|
765
|
+
tslib_1.__extends(Vec3Control, _super);
|
|
766
766
|
function Vec3Control() {
|
|
767
767
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
768
768
|
_this.state = { isExpanded: false };
|
|
@@ -791,13 +791,13 @@ var Vec3Control = /** @class */ (function (_super) {
|
|
|
791
791
|
var label = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
792
792
|
var p = (0, number_1.getPrecision)(this.props.param.step || 0.01);
|
|
793
793
|
var value = "[".concat(v[0].toFixed(p), ", ").concat(v[1].toFixed(p), ", ").concat(v[2].toFixed(p), "]");
|
|
794
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.ControlRow, { label: label, control: (0, jsx_runtime_1.jsx)("button",
|
|
794
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.ControlRow, { label: label, control: (0, jsx_runtime_1.jsx)("button", tslib_1.__assign({ onClick: this.toggleExpanded, disabled: this.props.isDisabled }, { children: value })) }), this.state.isExpanded && (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: (0, jsx_runtime_1.jsx)(ParameterControls, { params: this.components, values: v, onChange: this.componentChange, onEnter: this.props.onEnter }) }))] });
|
|
795
795
|
};
|
|
796
796
|
return Vec3Control;
|
|
797
797
|
}(React.PureComponent));
|
|
798
798
|
exports.Vec3Control = Vec3Control;
|
|
799
799
|
var Mat4Control = /** @class */ (function (_super) {
|
|
800
|
-
|
|
800
|
+
tslib_1.__extends(Mat4Control, _super);
|
|
801
801
|
function Mat4Control() {
|
|
802
802
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
803
803
|
_this.state = { isExpanded: false };
|
|
@@ -841,9 +841,9 @@ var Mat4Control = /** @class */ (function (_super) {
|
|
|
841
841
|
for (var j = 0; j < 4; j++) {
|
|
842
842
|
row.push((0, jsx_runtime_1.jsx)(common_1.TextInput, { numeric: true, delayMs: 50, value: linear_algebra_1.Mat4.getValue(v, i, j), onChange: this.changeValue(4 * j + i), className: 'msp-form-control', blurOnEnter: true, isDisabled: this.props.isDisabled }, j));
|
|
843
843
|
}
|
|
844
|
-
rows.push((0, jsx_runtime_1.jsx)("div",
|
|
844
|
+
rows.push((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-flex-row' }, { children: row }), i));
|
|
845
845
|
}
|
|
846
|
-
return (0, jsx_runtime_1.jsx)("div",
|
|
846
|
+
return (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-parameter-matrix' }, { children: rows }));
|
|
847
847
|
},
|
|
848
848
|
enumerable: false,
|
|
849
849
|
configurable: true
|
|
@@ -853,13 +853,13 @@ var Mat4Control = /** @class */ (function (_super) {
|
|
|
853
853
|
json: JSON.stringify(this.props.value)
|
|
854
854
|
};
|
|
855
855
|
var label = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
856
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.ControlRow, { label: label, control: (0, jsx_runtime_1.jsx)("button",
|
|
856
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.ControlRow, { label: label, control: (0, jsx_runtime_1.jsx)("button", tslib_1.__assign({ onClick: this.toggleExpanded, disabled: this.props.isDisabled }, { children: '4\u00D74 Matrix' })) }), this.state.isExpanded && (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: [this.grid, (0, jsx_runtime_1.jsx)(ParameterControls, { params: this.components, values: v, onChange: this.componentChange, onEnter: this.props.onEnter })] }))] });
|
|
857
857
|
};
|
|
858
858
|
return Mat4Control;
|
|
859
859
|
}(React.PureComponent));
|
|
860
860
|
exports.Mat4Control = Mat4Control;
|
|
861
861
|
var UrlControl = /** @class */ (function (_super) {
|
|
862
|
-
|
|
862
|
+
tslib_1.__extends(UrlControl, _super);
|
|
863
863
|
function UrlControl() {
|
|
864
864
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
865
865
|
_this.onChange = function (e) {
|
|
@@ -879,13 +879,13 @@ var UrlControl = /** @class */ (function (_super) {
|
|
|
879
879
|
}
|
|
880
880
|
UrlControl.prototype.renderControl = function () {
|
|
881
881
|
var placeholder = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
882
|
-
return (0, jsx_runtime_1.jsx)("input", { type: 'text', value: assets_1.Asset.getUrl(this.props.value || ''), placeholder: placeholder, onChange: this.onChange, onKeyPress: this.props.onEnter ? this.onKeyPress : void 0, disabled: this.props.isDisabled }
|
|
882
|
+
return (0, jsx_runtime_1.jsx)("input", { type: 'text', value: assets_1.Asset.getUrl(this.props.value || ''), placeholder: placeholder, onChange: this.onChange, onKeyPress: this.props.onEnter ? this.onKeyPress : void 0, disabled: this.props.isDisabled });
|
|
883
883
|
};
|
|
884
884
|
return UrlControl;
|
|
885
885
|
}(SimpleParam));
|
|
886
886
|
exports.UrlControl = UrlControl;
|
|
887
887
|
var FileControl = /** @class */ (function (_super) {
|
|
888
|
-
|
|
888
|
+
tslib_1.__extends(FileControl, _super);
|
|
889
889
|
function FileControl() {
|
|
890
890
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
891
891
|
_this.state = { showHelp: false };
|
|
@@ -900,7 +900,7 @@ var FileControl = /** @class */ (function (_super) {
|
|
|
900
900
|
};
|
|
901
901
|
FileControl.prototype.renderControl = function () {
|
|
902
902
|
var value = this.props.value;
|
|
903
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
903
|
+
return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-btn msp-btn-block msp-btn-action msp-loader-msp-btn-file', style: { marginTop: '1px' } }, { children: [value ? value.name : 'Select a file...', " ", (0, jsx_runtime_1.jsx)("input", { disabled: this.props.isDisabled, onChange: this.onChangeFile, type: 'file', multiple: false, accept: this.props.param.accept })] }));
|
|
904
904
|
};
|
|
905
905
|
FileControl.prototype.render = function () {
|
|
906
906
|
if (this.props.param.label) {
|
|
@@ -920,7 +920,7 @@ var FileControl = /** @class */ (function (_super) {
|
|
|
920
920
|
}(React.PureComponent));
|
|
921
921
|
exports.FileControl = FileControl;
|
|
922
922
|
var FileListControl = /** @class */ (function (_super) {
|
|
923
|
-
|
|
923
|
+
tslib_1.__extends(FileListControl, _super);
|
|
924
924
|
function FileListControl() {
|
|
925
925
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
926
926
|
_this.state = { showHelp: false };
|
|
@@ -951,7 +951,7 @@ var FileListControl = /** @class */ (function (_super) {
|
|
|
951
951
|
var label = names.length === 0
|
|
952
952
|
? 'Select files...' : names.length === 1
|
|
953
953
|
? names[0] : "".concat(names.length, " files selected");
|
|
954
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
954
|
+
return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-btn msp-btn-block msp-btn-action msp-loader-msp-btn-file', style: { marginTop: '1px' } }, { children: [label, " ", (0, jsx_runtime_1.jsx)("input", { disabled: this.props.isDisabled, onChange: this.onChangeFileList, type: 'file', multiple: true, accept: this.props.param.accept })] }));
|
|
955
955
|
};
|
|
956
956
|
FileListControl.prototype.render = function () {
|
|
957
957
|
if (this.props.param.label) {
|
|
@@ -971,7 +971,7 @@ var FileListControl = /** @class */ (function (_super) {
|
|
|
971
971
|
}(React.PureComponent));
|
|
972
972
|
exports.FileListControl = FileListControl;
|
|
973
973
|
var MultiSelectControl = /** @class */ (function (_super) {
|
|
974
|
-
|
|
974
|
+
tslib_1.__extends(MultiSelectControl, _super);
|
|
975
975
|
function MultiSelectControl() {
|
|
976
976
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
977
977
|
_this.state = { isExpanded: false };
|
|
@@ -999,23 +999,23 @@ var MultiSelectControl = /** @class */ (function (_super) {
|
|
|
999
999
|
var current = this.props.value;
|
|
1000
1000
|
var emptyLabel = this.props.param.emptyValue;
|
|
1001
1001
|
var label = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
1002
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.ControlRow, { label: label, control: (0, jsx_runtime_1.jsx)("button",
|
|
1002
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.ControlRow, { label: label, control: (0, jsx_runtime_1.jsx)("button", tslib_1.__assign({ onClick: this.toggleExpanded, disabled: this.props.isDisabled }, { children: current.length === 0 && emptyLabel ? emptyLabel : "".concat(current.length, " of ").concat(this.props.param.options.length) })) }), this.state.isExpanded && (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: this.props.param.options.map(function (_a) {
|
|
1003
1003
|
var value = _a[0], label = _a[1];
|
|
1004
1004
|
var sel = current.indexOf(value) >= 0;
|
|
1005
|
-
return (0, jsx_runtime_1.jsx)(common_1.Button,
|
|
1006
|
-
}) })
|
|
1005
|
+
return (0, jsx_runtime_1.jsx)(common_1.Button, tslib_1.__assign({ onClick: _this.toggle(value), disabled: _this.props.isDisabled, style: { marginTop: '1px' } }, { children: (0, jsx_runtime_1.jsx)("span", tslib_1.__assign({ style: { float: sel ? 'left' : 'right' } }, { children: sel ? "\u2713 ".concat(label) : "".concat(label, " \u2717") })) }), value);
|
|
1006
|
+
}) }))] });
|
|
1007
1007
|
};
|
|
1008
1008
|
return MultiSelectControl;
|
|
1009
1009
|
}(React.PureComponent));
|
|
1010
1010
|
exports.MultiSelectControl = MultiSelectControl;
|
|
1011
1011
|
var GroupControl = /** @class */ (function (_super) {
|
|
1012
|
-
|
|
1012
|
+
tslib_1.__extends(GroupControl, _super);
|
|
1013
1013
|
function GroupControl() {
|
|
1014
1014
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1015
1015
|
_this.state = { isExpanded: !!_this.props.param.isExpanded, showPresets: false, showHelp: false };
|
|
1016
1016
|
_this.onChangeParam = function (e) {
|
|
1017
1017
|
var _a;
|
|
1018
|
-
_this.change(
|
|
1018
|
+
_this.change(tslib_1.__assign(tslib_1.__assign({}, _this.props.value), (_a = {}, _a[e.name] = e.value, _a)));
|
|
1019
1019
|
};
|
|
1020
1020
|
_this.toggleExpanded = function () { return _this.setState({ isExpanded: !_this.state.isExpanded }); };
|
|
1021
1021
|
_this.toggleShowPresets = function () { return _this.setState({ showPresets: !_this.state.showPresets }); };
|
|
@@ -1033,21 +1033,21 @@ var GroupControl = /** @class */ (function (_super) {
|
|
|
1033
1033
|
if (!this.props.param.presets)
|
|
1034
1034
|
return null;
|
|
1035
1035
|
var label = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
1036
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
1036
|
+
return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-control-group-wrapper' }, { children: [(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-group-header' }, { children: (0, jsx_runtime_1.jsxs)("button", tslib_1.__assign({ className: 'msp-btn msp-form-control msp-btn-block', onClick: this.toggleShowPresets }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BookmarksOutlinedSvg }), label, " Presets"] })) })), this.state.showPresets && (0, jsx_runtime_1.jsx)(action_menu_1.ActionMenu, { items: this.presetItems(this.props.param), onSelect: this.onSelectPreset })] }));
|
|
1037
1037
|
};
|
|
1038
1038
|
GroupControl.prototype.presets = function () {
|
|
1039
1039
|
if (!this.props.param.presets)
|
|
1040
1040
|
return null;
|
|
1041
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div",
|
|
1041
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-group-presets-wrapper' }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-group-header' }, { children: (0, jsx_runtime_1.jsxs)("button", tslib_1.__assign({ className: 'msp-btn msp-form-control msp-btn-block', onClick: this.toggleShowPresets }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BookmarksOutlinedSvg }), "Presets"] })) })) })), this.state.showPresets && (0, jsx_runtime_1.jsx)(action_menu_1.ActionMenu, { items: this.presetItems(this.props.param), onSelect: this.onSelectPreset })] });
|
|
1042
1042
|
};
|
|
1043
1043
|
GroupControl.prototype.pivoted = function () {
|
|
1044
1044
|
var key = this.props.param.pivot;
|
|
1045
1045
|
var params = this.props.param.params;
|
|
1046
1046
|
var pivot = params[key];
|
|
1047
1047
|
var Control = controlFor(pivot);
|
|
1048
|
-
var ctrl = (0, jsx_runtime_1.jsx)(Control, { name: key, param: pivot, value: this.props.value[key], onChange: this.onChangeParam, onEnter: this.props.onEnter, isDisabled: this.props.isDisabled }
|
|
1048
|
+
var ctrl = (0, jsx_runtime_1.jsx)(Control, { name: key, param: pivot, value: this.props.value[key], onChange: this.onChangeParam, onEnter: this.props.onEnter, isDisabled: this.props.isDisabled });
|
|
1049
1049
|
if (!this.state.isExpanded) {
|
|
1050
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
1050
|
+
return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-mapped-parameter-group' }, { children: [ctrl, (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.MoreHorizSvg, onClick: this.toggleExpanded, toggleState: this.state.isExpanded, title: "More Options" })] }));
|
|
1051
1051
|
}
|
|
1052
1052
|
var filtered = Object.create(null);
|
|
1053
1053
|
for (var _i = 0, _a = Object.keys(params); _i < _a.length; _i++) {
|
|
@@ -1055,7 +1055,7 @@ var GroupControl = /** @class */ (function (_super) {
|
|
|
1055
1055
|
if (k !== key)
|
|
1056
1056
|
filtered[k] = params[k];
|
|
1057
1057
|
}
|
|
1058
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
1058
|
+
return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-mapped-parameter-group' }, { children: [ctrl, (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.MoreHorizSvg, onClick: this.toggleExpanded, toggleState: this.state.isExpanded, title: "More Options" }), (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: [this.pivotedPresets(), (0, jsx_runtime_1.jsx)(ParameterControls, { params: filtered, onEnter: this.props.onEnter, values: this.props.value, onChange: this.onChangeParam, isDisabled: this.props.isDisabled })] }))] }));
|
|
1059
1059
|
};
|
|
1060
1060
|
GroupControl.prototype.render = function () {
|
|
1061
1061
|
var params = this.props.param.params;
|
|
@@ -1065,20 +1065,20 @@ var GroupControl = /** @class */ (function (_super) {
|
|
|
1065
1065
|
if (this.props.param.pivot)
|
|
1066
1066
|
return this.pivoted();
|
|
1067
1067
|
var label = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
1068
|
-
var controls = (0, jsx_runtime_1.jsx)(ParameterControls, { params: params, onChange: this.onChangeParam, values: this.props.value, onEnter: this.props.onEnter, isDisabled: this.props.isDisabled }
|
|
1068
|
+
var controls = (0, jsx_runtime_1.jsx)(ParameterControls, { params: params, onChange: this.onChangeParam, values: this.props.value, onEnter: this.props.onEnter, isDisabled: this.props.isDisabled });
|
|
1069
1069
|
if (this.props.inMapped) {
|
|
1070
|
-
return (0, jsx_runtime_1.jsx)("div",
|
|
1070
|
+
return (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: controls }));
|
|
1071
1071
|
}
|
|
1072
1072
|
if (this.props.param.isFlat) {
|
|
1073
1073
|
return controls;
|
|
1074
1074
|
}
|
|
1075
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
1075
|
+
return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-control-group-wrapper', style: { position: 'relative' } }, { children: [(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-group-header' }, { children: (0, jsx_runtime_1.jsxs)("button", tslib_1.__assign({ className: 'msp-btn msp-form-control msp-btn-block', onClick: this.toggleExpanded }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: this.state.isExpanded ? icons_1.ArrowDropDownSvg : icons_1.ArrowRightSvg }), label] })) })), this.presets(), this.state.isExpanded && (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: controls }))] }));
|
|
1076
1076
|
};
|
|
1077
1077
|
return GroupControl;
|
|
1078
1078
|
}(React.PureComponent));
|
|
1079
1079
|
exports.GroupControl = GroupControl;
|
|
1080
1080
|
var MappedControl = /** @class */ (function (_super) {
|
|
1081
|
-
|
|
1081
|
+
tslib_1.__extends(MappedControl, _super);
|
|
1082
1082
|
function MappedControl() {
|
|
1083
1083
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1084
1084
|
_this.state = { isExpanded: false };
|
|
@@ -1125,30 +1125,30 @@ var MappedControl = /** @class */ (function (_super) {
|
|
|
1125
1125
|
var Mapped = controlFor(param);
|
|
1126
1126
|
var help = this.props.param.help;
|
|
1127
1127
|
var select = help
|
|
1128
|
-
?
|
|
1129
|
-
var Select = (0, jsx_runtime_1.jsx)(SelectControl, { param: select, isDisabled: this.props.isDisabled, onChange: this.onChangeName, onEnter: this.props.onEnter, name: label, value: value.name }
|
|
1128
|
+
? tslib_1.__assign(tslib_1.__assign({}, this.props.param.select), { help: function (name) { return help({ name: name, params: _this.getValues(name) }); } }) : this.props.param.select;
|
|
1129
|
+
var Select = (0, jsx_runtime_1.jsx)(SelectControl, { param: select, isDisabled: this.props.isDisabled, onChange: this.onChangeName, onEnter: this.props.onEnter, name: label, value: value.name });
|
|
1130
1130
|
if (!Mapped) {
|
|
1131
1131
|
return Select;
|
|
1132
1132
|
}
|
|
1133
1133
|
if (param.type === 'group' && !param.isFlat) {
|
|
1134
1134
|
if (!this.areParamsEmpty(param.params)) {
|
|
1135
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
1135
|
+
return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-mapped-parameter-group' }, { children: [Select, (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.MoreHorizSvg, onClick: this.toggleExpanded, toggleState: this.state.isExpanded, title: "".concat(label, " Properties") }), this.state.isExpanded && (0, jsx_runtime_1.jsx)(GroupControl, { inMapped: true, param: param, value: value.params, name: value.name, onChange: this.onChangeParam, onEnter: this.props.onEnter, isDisabled: this.props.isDisabled })] }));
|
|
1136
1136
|
}
|
|
1137
1137
|
return Select;
|
|
1138
1138
|
}
|
|
1139
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [Select, (0, jsx_runtime_1.jsx)(Mapped, { param: param, value: value.params, name: value.name, onChange: this.onChangeParam, onEnter: this.props.onEnter, isDisabled: this.props.isDisabled }
|
|
1139
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [Select, (0, jsx_runtime_1.jsx)(Mapped, { param: param, value: value.params, name: value.name, onChange: this.onChangeParam, onEnter: this.props.onEnter, isDisabled: this.props.isDisabled })] });
|
|
1140
1140
|
};
|
|
1141
1141
|
return MappedControl;
|
|
1142
1142
|
}(React.PureComponent));
|
|
1143
1143
|
exports.MappedControl = MappedControl;
|
|
1144
1144
|
var ObjectListEditor = /** @class */ (function (_super) {
|
|
1145
|
-
|
|
1145
|
+
tslib_1.__extends(ObjectListEditor, _super);
|
|
1146
1146
|
function ObjectListEditor() {
|
|
1147
1147
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1148
1148
|
_this.state = { current: _this.props.value };
|
|
1149
1149
|
_this.onChangeParam = function (e) {
|
|
1150
1150
|
var _a;
|
|
1151
|
-
_this.setState({ current:
|
|
1151
|
+
_this.setState({ current: tslib_1.__assign(tslib_1.__assign({}, _this.state.current), (_a = {}, _a[e.name] = e.value, _a)) });
|
|
1152
1152
|
};
|
|
1153
1153
|
_this.apply = function () {
|
|
1154
1154
|
_this.props.apply(_this.state.current);
|
|
@@ -1161,12 +1161,12 @@ var ObjectListEditor = /** @class */ (function (_super) {
|
|
|
1161
1161
|
}
|
|
1162
1162
|
};
|
|
1163
1163
|
ObjectListEditor.prototype.render = function () {
|
|
1164
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ParameterControls, { params: this.props.params, onChange: this.onChangeParam, values: this.state.current, onEnter: this.apply, isDisabled: this.props.isDisabled }
|
|
1164
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ParameterControls, { params: this.props.params, onChange: this.onChangeParam, values: this.state.current, onEnter: this.apply, isDisabled: this.props.isDisabled }), (0, jsx_runtime_1.jsx)("button", tslib_1.__assign({ className: "msp-btn msp-btn-block msp-form-control msp-control-top-offset", onClick: this.apply, disabled: this.props.isDisabled }, { children: this.props.isUpdate ? 'Update' : 'Add' }))] });
|
|
1165
1165
|
};
|
|
1166
1166
|
return ObjectListEditor;
|
|
1167
1167
|
}(React.PureComponent));
|
|
1168
1168
|
var ObjectListItem = /** @class */ (function (_super) {
|
|
1169
|
-
|
|
1169
|
+
tslib_1.__extends(ObjectListItem, _super);
|
|
1170
1170
|
function ObjectListItem() {
|
|
1171
1171
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1172
1172
|
_this.state = { isExpanded: false };
|
|
@@ -1191,17 +1191,17 @@ var ObjectListItem = /** @class */ (function (_super) {
|
|
|
1191
1191
|
return _this;
|
|
1192
1192
|
}
|
|
1193
1193
|
ObjectListItem.prototype.render = function () {
|
|
1194
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div",
|
|
1194
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-param-object-list-item' }, { children: [(0, jsx_runtime_1.jsxs)("button", tslib_1.__assign({ className: 'msp-btn msp-btn-block msp-form-control', onClick: this.toggleExpanded }, { children: [(0, jsx_runtime_1.jsx)("span", { children: "".concat(this.props.index + 1, ": ") }), this.props.param.getLabel(this.props.value)] })), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.ArrowDownwardSvg, title: 'Move Up', onClick: this.moveUp, small: true }), (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.ArrowUpwardSvg, title: 'Move Down', onClick: this.moveDown, small: true }), (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.DeleteOutlinedSvg, title: 'Remove', onClick: this.remove, small: true })] })] })), this.state.isExpanded && (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: (0, jsx_runtime_1.jsx)(ObjectListEditor, { params: this.props.param.element, apply: this.update, value: this.props.value, isUpdate: true, isDisabled: this.props.isDisabled }) }))] });
|
|
1195
1195
|
};
|
|
1196
1196
|
return ObjectListItem;
|
|
1197
1197
|
}(React.PureComponent));
|
|
1198
1198
|
var ObjectListControl = /** @class */ (function (_super) {
|
|
1199
|
-
|
|
1199
|
+
tslib_1.__extends(ObjectListControl, _super);
|
|
1200
1200
|
function ObjectListControl() {
|
|
1201
1201
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1202
1202
|
_this.state = { isExpanded: false };
|
|
1203
1203
|
_this.add = function (v) {
|
|
1204
|
-
_this.change(
|
|
1204
|
+
_this.change(tslib_1.__spreadArray(tslib_1.__spreadArray([], _this.props.value, true), [v], false));
|
|
1205
1205
|
};
|
|
1206
1206
|
_this.actions = {
|
|
1207
1207
|
update: function (v, i) {
|
|
@@ -1246,13 +1246,13 @@ var ObjectListControl = /** @class */ (function (_super) {
|
|
|
1246
1246
|
var v = this.props.value;
|
|
1247
1247
|
var label = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
1248
1248
|
var value = "".concat(v.length, " item").concat(v.length !== 1 ? 's' : '');
|
|
1249
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.ControlRow, { label: label, control: (0, jsx_runtime_1.jsx)("button",
|
|
1249
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.ControlRow, { label: label, control: (0, jsx_runtime_1.jsx)("button", tslib_1.__assign({ onClick: this.toggleExpanded, disabled: this.props.isDisabled }, { children: value })) }), this.state.isExpanded && (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: [this.props.value.map(function (v, i) { return (0, jsx_runtime_1.jsx)(ObjectListItem, { param: _this.props.param, value: v, index: i, actions: _this.actions, isDisabled: _this.props.isDisabled }, i); }), (0, jsx_runtime_1.jsx)(common_1.ControlGroup, tslib_1.__assign({ header: 'New Item' }, { children: (0, jsx_runtime_1.jsx)(ObjectListEditor, { params: this.props.param.element, apply: this.add, value: this.props.param.ctor(), isDisabled: this.props.isDisabled }) }))] }))] });
|
|
1250
1250
|
};
|
|
1251
1251
|
return ObjectListControl;
|
|
1252
1252
|
}(React.PureComponent));
|
|
1253
1253
|
exports.ObjectListControl = ObjectListControl;
|
|
1254
1254
|
var ConditionedControl = /** @class */ (function (_super) {
|
|
1255
|
-
|
|
1255
|
+
tslib_1.__extends(ConditionedControl, _super);
|
|
1256
1256
|
function ConditionedControl() {
|
|
1257
1257
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1258
1258
|
_this.onChangeCondition = function (e) {
|
|
@@ -1272,17 +1272,17 @@ var ConditionedControl = /** @class */ (function (_super) {
|
|
|
1272
1272
|
var param = this.props.param.conditionParams[condition];
|
|
1273
1273
|
var label = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
1274
1274
|
var Conditioned = controlFor(param);
|
|
1275
|
-
var select = (0, jsx_runtime_1.jsx)(SelectControl, { param: this.props.param.select, isDisabled: this.props.isDisabled, onChange: this.onChangeCondition, onEnter: this.props.onEnter, name: "".concat(label, " Kind"), value: condition }
|
|
1275
|
+
var select = (0, jsx_runtime_1.jsx)(SelectControl, { param: this.props.param.select, isDisabled: this.props.isDisabled, onChange: this.onChangeCondition, onEnter: this.props.onEnter, name: "".concat(label, " Kind"), value: condition });
|
|
1276
1276
|
if (!Conditioned) {
|
|
1277
1277
|
return select;
|
|
1278
1278
|
}
|
|
1279
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [select, (0, jsx_runtime_1.jsx)(Conditioned, { param: param, value: value, name: label, onChange: this.onChangeParam, onEnter: this.props.onEnter, isDisabled: this.props.isDisabled }
|
|
1279
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [select, (0, jsx_runtime_1.jsx)(Conditioned, { param: param, value: value, name: label, onChange: this.onChangeParam, onEnter: this.props.onEnter, isDisabled: this.props.isDisabled })] });
|
|
1280
1280
|
};
|
|
1281
1281
|
return ConditionedControl;
|
|
1282
1282
|
}(React.PureComponent));
|
|
1283
1283
|
exports.ConditionedControl = ConditionedControl;
|
|
1284
1284
|
var ConvertedControl = /** @class */ (function (_super) {
|
|
1285
|
-
|
|
1285
|
+
tslib_1.__extends(ConvertedControl, _super);
|
|
1286
1286
|
function ConvertedControl() {
|
|
1287
1287
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1288
1288
|
_this.onChange = function (e) {
|
|
@@ -1299,13 +1299,13 @@ var ConvertedControl = /** @class */ (function (_super) {
|
|
|
1299
1299
|
var Converted = controlFor(this.props.param.converted);
|
|
1300
1300
|
if (!Converted)
|
|
1301
1301
|
return null;
|
|
1302
|
-
return (0, jsx_runtime_1.jsx)(Converted, { param: this.props.param.converted, value: value, name: this.props.name, onChange: this.onChange, onEnter: this.props.onEnter, isDisabled: this.props.isDisabled }
|
|
1302
|
+
return (0, jsx_runtime_1.jsx)(Converted, { param: this.props.param.converted, value: value, name: this.props.name, onChange: this.onChange, onEnter: this.props.onEnter, isDisabled: this.props.isDisabled });
|
|
1303
1303
|
};
|
|
1304
1304
|
return ConvertedControl;
|
|
1305
1305
|
}(React.PureComponent));
|
|
1306
1306
|
exports.ConvertedControl = ConvertedControl;
|
|
1307
1307
|
var ScriptControl = /** @class */ (function (_super) {
|
|
1308
|
-
|
|
1308
|
+
tslib_1.__extends(ScriptControl, _super);
|
|
1309
1309
|
function ScriptControl() {
|
|
1310
1310
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1311
1311
|
_this.onChange = function (e) {
|
|
@@ -1326,7 +1326,7 @@ var ScriptControl = /** @class */ (function (_super) {
|
|
|
1326
1326
|
ScriptControl.prototype.renderControl = function () {
|
|
1327
1327
|
// TODO: improve!
|
|
1328
1328
|
var placeholder = this.props.param.label || (0, string_1.camelCaseToWords)(this.props.name);
|
|
1329
|
-
return (0, jsx_runtime_1.jsx)("input", { type: 'text', value: this.props.value.expression || '', placeholder: placeholder, onChange: this.onChange, onKeyPress: this.props.onEnter ? this.onKeyPress : void 0, disabled: this.props.isDisabled }
|
|
1329
|
+
return (0, jsx_runtime_1.jsx)("input", { type: 'text', value: this.props.value.expression || '', placeholder: placeholder, onChange: this.onChange, onKeyPress: this.props.onEnter ? this.onKeyPress : void 0, disabled: this.props.isDisabled });
|
|
1330
1330
|
};
|
|
1331
1331
|
return ScriptControl;
|
|
1332
1332
|
}(SimpleParam));
|