@doenet/doenetml 0.6.0-alpha1
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/.prettierrc +3 -0
- package/LICENSE +661 -0
- package/README.md +146 -0
- package/cypress/e2e/ActivityViewer/activityVariants.cy.js +1770 -0
- package/cypress/e2e/ActivityViewer/compiledActivity.cy.js +83 -0
- package/cypress/e2e/ActivityViewer/relationshipsAmongPages.cy.js +697 -0
- package/cypress/e2e/answerValidation/errorinnumbers.cy.js +2125 -0
- package/cypress/e2e/answerValidation/factoring.cy.js +1945 -0
- package/cypress/e2e/answerValidation/factoringOldAlgorithm.cy.js +892 -0
- package/cypress/e2e/answerValidation/functionanswers.cy.js +314 -0
- package/cypress/e2e/answerValidation/matchingpatterns.cy.js +287 -0
- package/cypress/e2e/answerValidation/matchpartial.cy.js +6711 -0
- package/cypress/e2e/answerValidation/pointlocation.cy.js +3989 -0
- package/cypress/e2e/answerValidation/symbolicequality.cy.js +1893 -0
- package/cypress/e2e/answerValidation/videoProgress.cy.js +210 -0
- package/cypress/e2e/assignNames/basiccopy.cy.js +2376 -0
- package/cypress/e2e/assignNames/collections.cy.js +9247 -0
- package/cypress/e2e/assignNames/selects.cy.js +105 -0
- package/cypress/e2e/assignNames/sequences.cy.js +1964 -0
- package/cypress/e2e/baseComponent/basecomponentproperties.cy.js +999 -0
- package/cypress/e2e/baseComponent/doenetMLtext.cy.js +427 -0
- package/cypress/e2e/chemistry/atom.cy.js +201 -0
- package/cypress/e2e/chemistry/ion.cy.js +608 -0
- package/cypress/e2e/chemistry/ioniccompound.cy.js +133 -0
- package/cypress/e2e/dynamicalsystem/cobwebpolyline.cy.js +2653 -0
- package/cypress/e2e/dynamicalsystem/equilibriumcurve.cy.js +311 -0
- package/cypress/e2e/dynamicalsystem/equilibriumline.cy.js +279 -0
- package/cypress/e2e/dynamicalsystem/equilibriumpoint.cy.js +283 -0
- package/cypress/e2e/dynamicalsystem/odesystem.cy.js +1834 -0
- package/cypress/e2e/equality/mathexpressions.cy.js +948 -0
- package/cypress/e2e/graphing/graphreferences.cy.js +978 -0
- package/cypress/e2e/graphing/graphreferences2.cy.js +615 -0
- package/cypress/e2e/linearAlgebra/eigenDecomposition.cy.js +401 -0
- package/cypress/e2e/tagSpecific/angle.cy.js +3898 -0
- package/cypress/e2e/tagSpecific/animatefromsequence.cy.js +2306 -0
- package/cypress/e2e/tagSpecific/answer.cy.js +31647 -0
- package/cypress/e2e/tagSpecific/bestfitline.cy.js +612 -0
- package/cypress/e2e/tagSpecific/blockquote.cy.js +30 -0
- package/cypress/e2e/tagSpecific/boolean.cy.js +742 -0
- package/cypress/e2e/tagSpecific/booleaninput.cy.js +1283 -0
- package/cypress/e2e/tagSpecific/booleanlist.cy.js +588 -0
- package/cypress/e2e/tagSpecific/booleanoperators.cy.js +596 -0
- package/cypress/e2e/tagSpecific/booleanoperatorsonmath.cy.js +498 -0
- package/cypress/e2e/tagSpecific/callaction.cy.js +2835 -0
- package/cypress/e2e/tagSpecific/choiceinput.cy.js +3205 -0
- package/cypress/e2e/tagSpecific/circle.cy.js +22036 -0
- package/cypress/e2e/tagSpecific/codeeditor.cy.js +1995 -0
- package/cypress/e2e/tagSpecific/collect.cy.js +5035 -0
- package/cypress/e2e/tagSpecific/componentsize.cy.js +502 -0
- package/cypress/e2e/tagSpecific/conditionalcontent.cy.js +3495 -0
- package/cypress/e2e/tagSpecific/contentBrowser.cy.js +335 -0
- package/cypress/e2e/tagSpecific/contentpicker.cy.js +261 -0
- package/cypress/e2e/tagSpecific/copy.cy.js +12627 -0
- package/cypress/e2e/tagSpecific/copy2.cy.js +5698 -0
- package/cypress/e2e/tagSpecific/curve.bezier.cy.js +12440 -0
- package/cypress/e2e/tagSpecific/curve.cy.js +1716 -0
- package/cypress/e2e/tagSpecific/curve.function.cy.js +1471 -0
- package/cypress/e2e/tagSpecific/curve.parametrized.cy.js +920 -0
- package/cypress/e2e/tagSpecific/document.cy.js +234 -0
- package/cypress/e2e/tagSpecific/endpoint.cy.js +197 -0
- package/cypress/e2e/tagSpecific/evaluate.cy.js +8895 -0
- package/cypress/e2e/tagSpecific/extract.cy.js +2282 -0
- package/cypress/e2e/tagSpecific/feedback.cy.js +2941 -0
- package/cypress/e2e/tagSpecific/function.cy.js +9450 -0
- package/cypress/e2e/tagSpecific/functioniterates.cy.js +1178 -0
- package/cypress/e2e/tagSpecific/functionoperators.cy.js +4047 -0
- package/cypress/e2e/tagSpecific/graph.cy.js +2491 -0
- package/cypress/e2e/tagSpecific/group.cy.js +683 -0
- package/cypress/e2e/tagSpecific/hint.cy.js +204 -0
- package/cypress/e2e/tagSpecific/image.cy.js +770 -0
- package/cypress/e2e/tagSpecific/integer.cy.js +206 -0
- package/cypress/e2e/tagSpecific/label.cy.js +800 -0
- package/cypress/e2e/tagSpecific/legend.cy.js +1001 -0
- package/cypress/e2e/tagSpecific/line.cy.js +12167 -0
- package/cypress/e2e/tagSpecific/linesegment.cy.js +4749 -0
- package/cypress/e2e/tagSpecific/lorem.cy.js +289 -0
- package/cypress/e2e/tagSpecific/map.cy.js +4476 -0
- package/cypress/e2e/tagSpecific/matchespattern.cy.js +693 -0
- package/cypress/e2e/tagSpecific/math.cy.js +10990 -0
- package/cypress/e2e/tagSpecific/mathdisplay.cy.js +2689 -0
- package/cypress/e2e/tagSpecific/mathinput.cy.js +15628 -0
- package/cypress/e2e/tagSpecific/mathinputgraph.cy.js +566 -0
- package/cypress/e2e/tagSpecific/mathlist.cy.js +4073 -0
- package/cypress/e2e/tagSpecific/mathoperators.cy.js +13851 -0
- package/cypress/e2e/tagSpecific/matrix.cy.js +8825 -0
- package/cypress/e2e/tagSpecific/matrixinput.cy.js +16277 -0
- package/cypress/e2e/tagSpecific/module.cy.js +1771 -0
- package/cypress/e2e/tagSpecific/number.cy.js +2221 -0
- package/cypress/e2e/tagSpecific/numberlist.cy.js +1285 -0
- package/cypress/e2e/tagSpecific/p.cy.js +72 -0
- package/cypress/e2e/tagSpecific/paginator.cy.js +2983 -0
- package/cypress/e2e/tagSpecific/parabola.cy.js +14331 -0
- package/cypress/e2e/tagSpecific/paragraphmarkup.cy.js +104 -0
- package/cypress/e2e/tagSpecific/periodicset.cy.js +1439 -0
- package/cypress/e2e/tagSpecific/piecewisefunction.cy.js +1055 -0
- package/cypress/e2e/tagSpecific/pluralize.cy.js +274 -0
- package/cypress/e2e/tagSpecific/point.cy.js +8895 -0
- package/cypress/e2e/tagSpecific/point2.cy.js +10259 -0
- package/cypress/e2e/tagSpecific/polygon.cy.js +5039 -0
- package/cypress/e2e/tagSpecific/polyline.cy.js +4704 -0
- package/cypress/e2e/tagSpecific/problem.cy.js +2768 -0
- package/cypress/e2e/tagSpecific/ray.cy.js +10770 -0
- package/cypress/e2e/tagSpecific/rectangle.cy.js +2143 -0
- package/cypress/e2e/tagSpecific/ref.cy.js +420 -0
- package/cypress/e2e/tagSpecific/regularPolygon.cy.js +1006 -0
- package/cypress/e2e/tagSpecific/regularPolygon2.cy.js +100 -0
- package/cypress/e2e/tagSpecific/regularPolygon3.cy.js +777 -0
- package/cypress/e2e/tagSpecific/samplerandomnumbers.cy.js +3619 -0
- package/cypress/e2e/tagSpecific/sectioning.cy.js +3530 -0
- package/cypress/e2e/tagSpecific/select.cy.js +5376 -0
- package/cypress/e2e/tagSpecific/selectfromsequence.cy.js +3846 -0
- package/cypress/e2e/tagSpecific/selectrandomnumbers.cy.js +2914 -0
- package/cypress/e2e/tagSpecific/sequence.cy.js +2093 -0
- package/cypress/e2e/tagSpecific/shuffle.cy.js +490 -0
- package/cypress/e2e/tagSpecific/sidebyside.cy.js +8057 -0
- package/cypress/e2e/tagSpecific/singlecharactercomponents.cy.js +72 -0
- package/cypress/e2e/tagSpecific/slider.cy.js +914 -0
- package/cypress/e2e/tagSpecific/solution.cy.js +109 -0
- package/cypress/e2e/tagSpecific/solveequations.cy.js +1026 -0
- package/cypress/e2e/tagSpecific/sort.cy.js +1685 -0
- package/cypress/e2e/tagSpecific/spreadsheet.cy.js +5971 -0
- package/cypress/e2e/tagSpecific/subsetofreals.cy.js +2725 -0
- package/cypress/e2e/tagSpecific/substitute.cy.js +2646 -0
- package/cypress/e2e/tagSpecific/tabular.cy.js +36 -0
- package/cypress/e2e/tagSpecific/text.cy.js +975 -0
- package/cypress/e2e/tagSpecific/textinput.cy.js +2177 -0
- package/cypress/e2e/tagSpecific/textlist.cy.js +369 -0
- package/cypress/e2e/tagSpecific/triangle.cy.js +1936 -0
- package/cypress/e2e/tagSpecific/triggerset.cy.js +2023 -0
- package/cypress/e2e/tagSpecific/updatevalue.cy.js +3288 -0
- package/cypress/e2e/tagSpecific/vector.cy.js +20183 -0
- package/cypress/e2e/tagSpecific/video.cy.js +612 -0
- package/cypress/e2e/tagSpecific/when.cy.js +202 -0
- package/cypress/e2e/variants/specifysinglevariant.cy.js +6726 -0
- package/cypress/e2e/variants/uniquevariants.cy.js +4846 -0
- package/cypress/fixtures/example.json +5 -0
- package/cypress/support/commands.js +32 -0
- package/cypress/support/e2e.js +31 -0
- package/cypress.config.js +18 -0
- package/docs/codeSnippet.jsx +11 -0
- package/docs/index.html +133 -0
- package/docs/index.jsx +138 -0
- package/docs/prism.css +3 -0
- package/index.html +14 -0
- package/index.js +21 -0
- package/media/answer_example.png +0 -0
- package/media/graph_example.png +0 -0
- package/media/graph_markup_example.png +0 -0
- package/package.json +83 -0
- package/public/favicon.ico +0 -0
- package/public/fonts/files/open-sans-v18-latin-700.woff +0 -0
- package/public/fonts/files/open-sans-v18-latin-700.woff2 +0 -0
- package/public/fonts/files/open-sans-v18-latin-700italic.woff +0 -0
- package/public/fonts/files/open-sans-v18-latin-700italic.woff2 +0 -0
- package/public/fonts/files/open-sans-v18-latin-italic.woff +0 -0
- package/public/fonts/files/open-sans-v18-latin-italic.woff2 +0 -0
- package/public/fonts/files/open-sans-v18-latin-light-italic.woff +0 -0
- package/public/fonts/files/open-sans-v18-latin-light-italic.woff2 +0 -0
- package/public/fonts/files/open-sans-v18-latin-light.woff +0 -0
- package/public/fonts/files/open-sans-v18-latin-light.woff2 +0 -0
- package/public/fonts/files/open-sans-v18-latin-regular.woff +0 -0
- package/public/fonts/files/open-sans-v18-latin-regular.woff2 +0 -0
- package/src/Core/ComponentTypes.js +426 -0
- package/src/Core/Core.js +11852 -0
- package/src/Core/CoreWorker.js +127 -0
- package/src/Core/Dependencies.js +8226 -0
- package/src/Core/Numerics.js +473 -0
- package/src/Core/ParameterStack.js +36 -0
- package/src/Core/ReadOnlyProxyHandler.js +41 -0
- package/src/Core/StateProxyHandler.js +88 -0
- package/src/Core/components/Aliases.js +67 -0
- package/src/Core/components/Angle.js +758 -0
- package/src/Core/components/AnimateFromSequence.js +922 -0
- package/src/Core/components/Answer.js +2087 -0
- package/src/Core/components/AsList.js +83 -0
- package/src/Core/components/AttractTo.js +245 -0
- package/src/Core/components/AttractToAngles.js +262 -0
- package/src/Core/components/AttractToConstraint.js +104 -0
- package/src/Core/components/AttractToGrid.js +315 -0
- package/src/Core/components/Award.js +906 -0
- package/src/Core/components/BestFitLine.js +318 -0
- package/src/Core/components/BezierControls.js +719 -0
- package/src/Core/components/BlockQuote.js +35 -0
- package/src/Core/components/Boolean.js +500 -0
- package/src/Core/components/BooleanInput.js +330 -0
- package/src/Core/components/BooleanList.js +396 -0
- package/src/Core/components/BooleanOperators.js +35 -0
- package/src/Core/components/BooleanOperatorsOfMath.js +148 -0
- package/src/Core/components/CallAction.js +261 -0
- package/src/Core/components/Caption.js +73 -0
- package/src/Core/components/Case.js +56 -0
- package/src/Core/components/Cell.js +439 -0
- package/src/Core/components/CellBlock.js +64 -0
- package/src/Core/components/Chart.js +795 -0
- package/src/Core/components/Choice.js +266 -0
- package/src/Core/components/ChoiceInput.js +1407 -0
- package/src/Core/components/Circle.js +2884 -0
- package/src/Core/components/CodeEditor.js +647 -0
- package/src/Core/components/CodeViewer.js +294 -0
- package/src/Core/components/CollaborateGroupSetup.js +46 -0
- package/src/Core/components/CollaborateGroups.js +119 -0
- package/src/Core/components/Collect.js +850 -0
- package/src/Core/components/Column.js +608 -0
- package/src/Core/components/ConditionalContent.js +468 -0
- package/src/Core/components/ConsiderAsResponses.js +49 -0
- package/src/Core/components/ConstrainTo.js +161 -0
- package/src/Core/components/ConstrainToAngles.js +244 -0
- package/src/Core/components/ConstrainToGraph.js +142 -0
- package/src/Core/components/ConstrainToGrid.js +175 -0
- package/src/Core/components/ConstraintUnion.js +119 -0
- package/src/Core/components/Constraints.js +497 -0
- package/src/Core/components/ContentBrowser.js +441 -0
- package/src/Core/components/ContentPicker.js +263 -0
- package/src/Core/components/ControlVectors.js +25 -0
- package/src/Core/components/Coords.js +63 -0
- package/src/Core/components/Copy.js +3412 -0
- package/src/Core/components/Curve.js +4130 -0
- package/src/Core/components/CustomAttribute.js +175 -0
- package/src/Core/components/DataFrame.js +357 -0
- package/src/Core/components/DiscreteSimulationResultList.js +342 -0
- package/src/Core/components/DiscreteSimulationResultPolyline.js +581 -0
- package/src/Core/components/Divisions.js +55 -0
- package/src/Core/components/Document.js +888 -0
- package/src/Core/components/Embed.js +65 -0
- package/src/Core/components/Endpoint.js +62 -0
- package/src/Core/components/Evaluate.js +321 -0
- package/src/Core/components/Extract.js +656 -0
- package/src/Core/components/Extrema.js +556 -0
- package/src/Core/components/Feedback.js +200 -0
- package/src/Core/components/FeedbackDefinitions.js +97 -0
- package/src/Core/components/Figure.js +148 -0
- package/src/Core/components/Footnote.js +73 -0
- package/src/Core/components/Function.js +5344 -0
- package/src/Core/components/FunctionIterates.js +306 -0
- package/src/Core/components/FunctionOperators.js +702 -0
- package/src/Core/components/Graph.js +1679 -0
- package/src/Core/components/Group.js +7 -0
- package/src/Core/components/HasSameFactoring.js +407 -0
- package/src/Core/components/Hint.js +241 -0
- package/src/Core/components/Image.js +524 -0
- package/src/Core/components/Indexing.js +79 -0
- package/src/Core/components/IntComma.js +64 -0
- package/src/Core/components/Integer.js +81 -0
- package/src/Core/components/Intersection.js +328 -0
- package/src/Core/components/Interval.js +29 -0
- package/src/Core/components/Label.js +492 -0
- package/src/Core/components/Latex.js +104 -0
- package/src/Core/components/Legend.js +329 -0
- package/src/Core/components/Line.js +2040 -0
- package/src/Core/components/LineSegment.js +882 -0
- package/src/Core/components/Lists.js +180 -0
- package/src/Core/components/Lorem.js +249 -0
- package/src/Core/components/MMeMen.js +377 -0
- package/src/Core/components/Map.js +873 -0
- package/src/Core/components/Markers.js +101 -0
- package/src/Core/components/MatchesPattern.js +339 -0
- package/src/Core/components/Math.js +2552 -0
- package/src/Core/components/MathInput.js +948 -0
- package/src/Core/components/MathList.js +828 -0
- package/src/Core/components/MathOperators.js +1286 -0
- package/src/Core/components/Matrix.js +497 -0
- package/src/Core/components/MatrixInput.js +3157 -0
- package/src/Core/components/MdMdnMrow.js +394 -0
- package/src/Core/components/Module.js +16 -0
- package/src/Core/components/Number.js +1031 -0
- package/src/Core/components/NumberList.js +550 -0
- package/src/Core/components/Option.js +24 -0
- package/src/Core/components/P.js +71 -0
- package/src/Core/components/Paginator.js +338 -0
- package/src/Core/components/Panel.js +126 -0
- package/src/Core/components/Parabola.js +1561 -0
- package/src/Core/components/ParagraphMarkup.js +59 -0
- package/src/Core/components/Pegboard.js +43 -0
- package/src/Core/components/PeriodicSet.js +291 -0
- package/src/Core/components/PiecewiseFunction.js +832 -0
- package/src/Core/components/Pluralize.js +198 -0
- package/src/Core/components/Point.js +1295 -0
- package/src/Core/components/Polygon.js +408 -0
- package/src/Core/components/Polyline.js +841 -0
- package/src/Core/components/RandomizedTextList.js +225 -0
- package/src/Core/components/Ray.js +1737 -0
- package/src/Core/components/Rectangle.js +1535 -0
- package/src/Core/components/Ref.js +350 -0
- package/src/Core/components/RegionBetweenCurveXAxis.js +124 -0
- package/src/Core/components/RegionHalfPlane.js +107 -0
- package/src/Core/components/RegularPolygon.js +2118 -0
- package/src/Core/components/RenderDoenetML.js +181 -0
- package/src/Core/components/Row.js +780 -0
- package/src/Core/components/SampleRandomNumbers.js +653 -0
- package/src/Core/components/Sectioning.js +303 -0
- package/src/Core/components/Select.js +947 -0
- package/src/Core/components/SelectFromSequence.js +1242 -0
- package/src/Core/components/SelectRandomNumbers.js +225 -0
- package/src/Core/components/Sequence.js +444 -0
- package/src/Core/components/Setup.js +53 -0
- package/src/Core/components/Shuffle.js +470 -0
- package/src/Core/components/SideBySide.js +2130 -0
- package/src/Core/components/SingleCharacterComponents.js +41 -0
- package/src/Core/components/Slider.js +819 -0
- package/src/Core/components/SolutionContainer.js +67 -0
- package/src/Core/components/Solutions.js +334 -0
- package/src/Core/components/SolveEquations.js +568 -0
- package/src/Core/components/Sort.js +398 -0
- package/src/Core/components/Sources.js +108 -0
- package/src/Core/components/Split.js +205 -0
- package/src/Core/components/Spreadsheet.js +1507 -0
- package/src/Core/components/StyleDefinitions.js +111 -0
- package/src/Core/components/SubsetOfReals.js +348 -0
- package/src/Core/components/SubsetOfRealsInput.js +1474 -0
- package/src/Core/components/Substitute.js +496 -0
- package/src/Core/components/SummaryStatistics.js +652 -0
- package/src/Core/components/Table.js +145 -0
- package/src/Core/components/Tabular.js +384 -0
- package/src/Core/components/Template.js +360 -0
- package/src/Core/components/Text.js +341 -0
- package/src/Core/components/TextInput.js +566 -0
- package/src/Core/components/TextList.js +442 -0
- package/src/Core/components/TextListFromString.js +137 -0
- package/src/Core/components/TextOperatorsOfMath.js +21 -0
- package/src/Core/components/Triangle.js +280 -0
- package/src/Core/components/TriggerSet.js +189 -0
- package/src/Core/components/TupleList.js +43 -0
- package/src/Core/components/UpdateValue.js +435 -0
- package/src/Core/components/VariantControl.js +36 -0
- package/src/Core/components/Vector.js +2478 -0
- package/src/Core/components/Verbatim.js +125 -0
- package/src/Core/components/Video.js +673 -0
- package/src/Core/components/When.js +198 -0
- package/src/Core/components/abstract/AngleListComponent.js +140 -0
- package/src/Core/components/abstract/BaseComponent.js +1496 -0
- package/src/Core/components/abstract/BlockComponent.js +5 -0
- package/src/Core/components/abstract/BooleanBaseOperator.js +88 -0
- package/src/Core/components/abstract/BooleanBaseOperatorOfMath.js +100 -0
- package/src/Core/components/abstract/BooleanBaseOperatorOneInput.js +44 -0
- package/src/Core/components/abstract/ComponentSize.js +789 -0
- package/src/Core/components/abstract/ComponentWithSelectableType.js +537 -0
- package/src/Core/components/abstract/CompositeComponent.js +142 -0
- package/src/Core/components/abstract/ConstraintComponent.js +19 -0
- package/src/Core/components/abstract/FunctionBaseOperator.js +680 -0
- package/src/Core/components/abstract/GraphicalComponent.js +56 -0
- package/src/Core/components/abstract/InlineComponent.js +5 -0
- package/src/Core/components/abstract/InlineRenderInlineChildren.js +63 -0
- package/src/Core/components/abstract/Input.js +192 -0
- package/src/Core/components/abstract/IntervalListComponent.js +218 -0
- package/src/Core/components/abstract/LineListComponent.js +114 -0
- package/src/Core/components/abstract/MathBaseOperator.js +631 -0
- package/src/Core/components/abstract/MathBaseOperatorOneInput.js +112 -0
- package/src/Core/components/abstract/PointListComponent.js +238 -0
- package/src/Core/components/abstract/SectioningComponent.js +1262 -0
- package/src/Core/components/abstract/SingleCharacterInline.js +23 -0
- package/src/Core/components/abstract/TextBaseOperatorOfMath.js +47 -0
- package/src/Core/components/abstract/TextOrInline.js +66 -0
- package/src/Core/components/abstract/VariableName.js +31 -0
- package/src/Core/components/abstract/VariableNameList.js +83 -0
- package/src/Core/components/abstract/VectorListComponent.js +235 -0
- package/src/Core/components/chemistry/Atom.js +910 -0
- package/src/Core/components/chemistry/ElectronConfiguration.js +36 -0
- package/src/Core/components/chemistry/Ion.js +684 -0
- package/src/Core/components/chemistry/IonicCompound.js +189 -0
- package/src/Core/components/chemistry/OrbitalDiagram.js +175 -0
- package/src/Core/components/chemistry/OrbitalDiagramInput.js +753 -0
- package/src/Core/components/chemistry/index.js +6 -0
- package/src/Core/components/commonsugar/breakstrings.js +627 -0
- package/src/Core/components/commonsugar/lists.js +177 -0
- package/src/Core/components/dynamicalSystems/CobwebPolyline.js +913 -0
- package/src/Core/components/dynamicalSystems/EquilibriumCurve.js +95 -0
- package/src/Core/components/dynamicalSystems/EquilibriumLine.js +93 -0
- package/src/Core/components/dynamicalSystems/EquilibriumPoint.js +93 -0
- package/src/Core/components/dynamicalSystems/ODESystem.js +943 -0
- package/src/Core/components/dynamicalSystems/index.js +5 -0
- package/src/Core/components/linearAlgebra/EigenDecomposition.js +294 -0
- package/src/Core/utils/array.js +30 -0
- package/src/Core/utils/booleanLogic.js +965 -0
- package/src/Core/utils/checkEquality.js +818 -0
- package/src/Core/utils/cid.js +29 -0
- package/src/Core/utils/componentInfoObjects.js +100 -0
- package/src/Core/utils/constraints.js +23 -0
- package/src/Core/utils/copy.js +572 -0
- package/src/Core/utils/deepFunctions.js +173 -0
- package/src/Core/utils/descendants.js +252 -0
- package/src/Core/utils/enumeration.js +234 -0
- package/src/Core/utils/feedback.js +84 -0
- package/src/Core/utils/function.js +1343 -0
- package/src/Core/utils/graphical.js +196 -0
- package/src/Core/utils/label.js +396 -0
- package/src/Core/utils/math.js +1056 -0
- package/src/Core/utils/naming.js +45 -0
- package/src/Core/utils/periodicSetEquality.js +403 -0
- package/src/Core/utils/randomNumbers.js +70 -0
- package/src/Core/utils/retrieveMedia.js +98 -0
- package/src/Core/utils/retrieveTextFile.js +140 -0
- package/src/Core/utils/returnAllPossibleVariants.js +73 -0
- package/src/Core/utils/rounding.js +316 -0
- package/src/Core/utils/sequence.js +754 -0
- package/src/Core/utils/serializedStateProcessing.js +4049 -0
- package/src/Core/utils/size.js +22 -0
- package/src/Core/utils/stateVariables.js +138 -0
- package/src/Core/utils/style.js +535 -0
- package/src/Core/utils/subset-of-reals.js +796 -0
- package/src/Core/utils/table.js +41 -0
- package/src/Core/utils/text.js +16 -0
- package/src/Core/utils/triggering.js +167 -0
- package/src/Core/utils/variants.js +477 -0
- package/src/DoenetML.css +308 -0
- package/src/DoenetML.jsx +201 -0
- package/src/Parser/doenet.grammar +90 -0
- package/src/Parser/doenet.js +33 -0
- package/src/Parser/doenet.terms.js +20 -0
- package/src/Parser/parser.js +266 -0
- package/src/Parser/tokens.js +129 -0
- package/src/Tools/CodeMirror.jsx +440 -0
- package/src/Tools/DarkmodeController.jsx +21 -0
- package/src/Tools/Footers/MathInputSelector.jsx +34 -0
- package/src/Tools/Footers/VirtualKeyboard.jsx +751 -0
- package/src/Tools/cypressTest/CypressTest.jsx +341 -0
- package/src/Tools/cypressTest/index.html +102 -0
- package/src/Tools/cypressTest/index.jsx +40 -0
- package/src/Viewer/ActivityViewer.jsx +1461 -0
- package/src/Viewer/PageViewer.jsx +1329 -0
- package/src/Viewer/renderers/alert.jsx +17 -0
- package/src/Viewer/renderers/angle.jsx +209 -0
- package/src/Viewer/renderers/answer.jsx +206 -0
- package/src/Viewer/renderers/asList.jsx +25 -0
- package/src/Viewer/renderers/blockQuote.jsx +41 -0
- package/src/Viewer/renderers/boolean.jsx +17 -0
- package/src/Viewer/renderers/booleanInput.css +105 -0
- package/src/Viewer/renderers/booleanInput.jsx +636 -0
- package/src/Viewer/renderers/button.jsx +369 -0
- package/src/Viewer/renderers/c.jsx +17 -0
- package/src/Viewer/renderers/callAction.jsx +18 -0
- package/src/Viewer/renderers/cell.jsx +59 -0
- package/src/Viewer/renderers/chart.jsx +83 -0
- package/src/Viewer/renderers/choiceInput.css +223 -0
- package/src/Viewer/renderers/choiceInput.jsx +535 -0
- package/src/Viewer/renderers/circle.jsx +990 -0
- package/src/Viewer/renderers/cobwebPolyline.jsx +442 -0
- package/src/Viewer/renderers/codeEditor.jsx +248 -0
- package/src/Viewer/renderers/codeViewer.jsx +105 -0
- package/src/Viewer/renderers/containerBlock.jsx +41 -0
- package/src/Viewer/renderers/containerInline.jsx +17 -0
- package/src/Viewer/renderers/contentBrowser.jsx +159 -0
- package/src/Viewer/renderers/contentPicker.jsx +160 -0
- package/src/Viewer/renderers/curve.jsx +1072 -0
- package/src/Viewer/renderers/ellipsis.jsx +17 -0
- package/src/Viewer/renderers/em.jsx +17 -0
- package/src/Viewer/renderers/embed.jsx +110 -0
- package/src/Viewer/renderers/feedback.jsx +74 -0
- package/src/Viewer/renderers/figure.jsx +131 -0
- package/src/Viewer/renderers/footnote.jsx +52 -0
- package/src/Viewer/renderers/graph.jsx +925 -0
- package/src/Viewer/renderers/hint.jsx +142 -0
- package/src/Viewer/renderers/image.jsx +581 -0
- package/src/Viewer/renderers/jsxgraph-distrib/jsxgraphcore.mjs +2 -0
- package/src/Viewer/renderers/jsxgraph-distrib/jsxgraphcore.mjs.map +1 -0
- package/src/Viewer/renderers/label.jsx +470 -0
- package/src/Viewer/renderers/legend.jsx +306 -0
- package/src/Viewer/renderers/line.jsx +511 -0
- package/src/Viewer/renderers/lineSegment.jsx +754 -0
- package/src/Viewer/renderers/list.jsx +111 -0
- package/src/Viewer/renderers/lq.jsx +12 -0
- package/src/Viewer/renderers/lsq.jsx +12 -0
- package/src/Viewer/renderers/math.jsx +582 -0
- package/src/Viewer/renderers/mathInput.css +10 -0
- package/src/Viewer/renderers/mathInput.jsx +425 -0
- package/src/Viewer/renderers/mathInputog.jsx +534 -0
- package/src/Viewer/renderers/mathList.jsx +39 -0
- package/src/Viewer/renderers/matrixInput.jsx +317 -0
- package/src/Viewer/renderers/mdash.jsx +12 -0
- package/src/Viewer/renderers/nbsp.jsx +12 -0
- package/src/Viewer/renderers/ndash.jsx +12 -0
- package/src/Viewer/renderers/number.jsx +454 -0
- package/src/Viewer/renderers/numberList.jsx +35 -0
- package/src/Viewer/renderers/orbitalDiagram.jsx +247 -0
- package/src/Viewer/renderers/orbitalDiagramInput.jsx +450 -0
- package/src/Viewer/renderers/p.jsx +38 -0
- package/src/Viewer/renderers/paginatorControls.jsx +41 -0
- package/src/Viewer/renderers/pegboard.jsx +239 -0
- package/src/Viewer/renderers/point.jsx +649 -0
- package/src/Viewer/renderers/polygon.jsx +612 -0
- package/src/Viewer/renderers/polyline.jsx +608 -0
- package/src/Viewer/renderers/pre.jsx +34 -0
- package/src/Viewer/renderers/q.jsx +17 -0
- package/src/Viewer/renderers/ray.jsx +410 -0
- package/src/Viewer/renderers/ref.jsx +149 -0
- package/src/Viewer/renderers/regionBetweenCurveXAxis.jsx +182 -0
- package/src/Viewer/renderers/renderDoenetML.jsx +56 -0
- package/src/Viewer/renderers/row.jsx +31 -0
- package/src/Viewer/renderers/rq.jsx +12 -0
- package/src/Viewer/renderers/rsq.jsx +12 -0
- package/src/Viewer/renderers/section.jsx +427 -0
- package/src/Viewer/renderers/sideBySide.jsx +80 -0
- package/src/Viewer/renderers/slider.jsx +800 -0
- package/src/Viewer/renderers/solution.jsx +134 -0
- package/src/Viewer/renderers/spreadsheet.jsx +83 -0
- package/src/Viewer/renderers/sq.jsx +17 -0
- package/src/Viewer/renderers/styles/global.css +14 -0
- package/src/Viewer/renderers/subsetOfRealsInput.jsx +392 -0
- package/src/Viewer/renderers/summaryStatistics.jsx +83 -0
- package/src/Viewer/renderers/table.jsx +78 -0
- package/src/Viewer/renderers/tabular.jsx +58 -0
- package/src/Viewer/renderers/tag.jsx +26 -0
- package/src/Viewer/renderers/text.jsx +439 -0
- package/src/Viewer/renderers/textInput.jsx +774 -0
- package/src/Viewer/renderers/textList.jsx +30 -0
- package/src/Viewer/renderers/triggerSet.jsx +52 -0
- package/src/Viewer/renderers/updateValue.jsx +30 -0
- package/src/Viewer/renderers/utils/css.js +13 -0
- package/src/Viewer/renderers/utils/graph.js +159 -0
- package/src/Viewer/renderers/utils/offGraphIndicators.js +91 -0
- package/src/Viewer/renderers/vector.jsx +678 -0
- package/src/Viewer/renderers/video.jsx +494 -0
- package/src/Viewer/useDoenetRenderer.jsx +128 -0
- package/src/main.jsx +16 -0
- package/src/media/fonts/files/open-sans-v18-latin-700.woff +0 -0
- package/src/media/fonts/files/open-sans-v18-latin-700.woff2 +0 -0
- package/src/media/fonts/files/open-sans-v18-latin-700italic.woff +0 -0
- package/src/media/fonts/files/open-sans-v18-latin-700italic.woff2 +0 -0
- package/src/media/fonts/files/open-sans-v18-latin-italic.woff +0 -0
- package/src/media/fonts/files/open-sans-v18-latin-italic.woff2 +0 -0
- package/src/media/fonts/files/open-sans-v18-latin-light-italic.woff +0 -0
- package/src/media/fonts/files/open-sans-v18-latin-light-italic.woff2 +0 -0
- package/src/media/fonts/files/open-sans-v18-latin-light.woff +0 -0
- package/src/media/fonts/files/open-sans-v18-latin-light.woff2 +0 -0
- package/src/media/fonts/files/open-sans-v18-latin-regular.woff +0 -0
- package/src/media/fonts/files/open-sans-v18-latin-regular.woff2 +0 -0
- package/src/test/testCode.doenet +26 -0
- package/src/test/testViewer.jsx +158 -0
- package/src/uiComponents/ActionButton.jsx +157 -0
- package/src/uiComponents/ActionButtonGroup.jsx +93 -0
- package/src/uiComponents/Button.jsx +160 -0
- package/src/uiComponents/ButtonGroup.jsx +56 -0
- package/src/uiComponents/ToggleButton.jsx +194 -0
- package/src/uiComponents/ToggleButtonGroup.jsx +77 -0
- package/src/utils/activityUtils.js +713 -0
- package/src/utils/array.js +17 -0
- package/src/utils/cid.js +34 -0
- package/src/utils/componentInfoObjects.js +89 -0
- package/src/utils/deepFunctions.js +165 -0
- package/src/utils/enumeration.js +226 -0
- package/src/utils/math.js +624 -0
- package/src/utils/naming.js +44 -0
- package/src/utils/retrieveTextFile.js +156 -0
- package/src/utils/returnAllPossibleVariants.js +81 -0
- package/src/utils/sequence.js +715 -0
- package/src/utils/serialize.js +29 -0
- package/src/utils/serializedStateProcessing.js +2587 -0
- package/src/utils/subset-of-reals.js +783 -0
- package/src/utils/url.js +19 -0
- package/vite.config.js +14 -0
|
@@ -0,0 +1,1295 @@
|
|
|
1
|
+
import GraphicalComponent from "./abstract/GraphicalComponent";
|
|
2
|
+
import me from "math-expressions";
|
|
3
|
+
import {
|
|
4
|
+
convertValueToMathExpression,
|
|
5
|
+
roundForDisplay,
|
|
6
|
+
vectorOperators,
|
|
7
|
+
} from "../utils/math";
|
|
8
|
+
import { breakEmbeddedStringByCommas } from "./commonsugar/breakstrings";
|
|
9
|
+
import { deepClone } from "../utils/deepFunctions";
|
|
10
|
+
import { returnTextStyleDescriptionDefinitions } from "../utils/style";
|
|
11
|
+
import {
|
|
12
|
+
returnRoundingAttributeComponentShadowing,
|
|
13
|
+
returnRoundingAttributes,
|
|
14
|
+
returnRoundingStateVariableDefinitions,
|
|
15
|
+
} from "../utils/rounding";
|
|
16
|
+
|
|
17
|
+
export default class Point extends GraphicalComponent {
|
|
18
|
+
constructor(args) {
|
|
19
|
+
super(args);
|
|
20
|
+
|
|
21
|
+
Object.assign(this.actions, {
|
|
22
|
+
movePoint: this.movePoint.bind(this),
|
|
23
|
+
switchPoint: this.switchPoint.bind(this),
|
|
24
|
+
pointClicked: this.pointClicked.bind(this),
|
|
25
|
+
pointFocused: this.pointFocused.bind(this),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
static componentType = "point";
|
|
29
|
+
|
|
30
|
+
// Note: for other components with public point state variables,
|
|
31
|
+
// the recommended course of action is not to have
|
|
32
|
+
// a public state variable with component type point, which would use coordsShadow
|
|
33
|
+
// Instead have a public array state variable of maths for each component
|
|
34
|
+
// and use wrapping components to create points from those
|
|
35
|
+
static primaryStateVariableForDefinition = "coordsShadow";
|
|
36
|
+
static stateVariableForAttributeValue = "coords";
|
|
37
|
+
|
|
38
|
+
static createAttributesObject() {
|
|
39
|
+
let attributes = super.createAttributesObject();
|
|
40
|
+
attributes.draggable = {
|
|
41
|
+
createComponentOfType: "boolean",
|
|
42
|
+
createStateVariable: "draggable",
|
|
43
|
+
defaultValue: true,
|
|
44
|
+
public: true,
|
|
45
|
+
forRenderer: true,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
attributes.x = {
|
|
49
|
+
createComponentOfType: "math",
|
|
50
|
+
};
|
|
51
|
+
attributes.y = {
|
|
52
|
+
createComponentOfType: "math",
|
|
53
|
+
};
|
|
54
|
+
attributes.z = {
|
|
55
|
+
createComponentOfType: "math",
|
|
56
|
+
};
|
|
57
|
+
attributes.xs = {
|
|
58
|
+
createComponentOfType: "mathList",
|
|
59
|
+
};
|
|
60
|
+
attributes.coords = {
|
|
61
|
+
createComponentOfType: "coords",
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
Object.assign(attributes, returnRoundingAttributes());
|
|
65
|
+
|
|
66
|
+
attributes.labelPosition = {
|
|
67
|
+
createComponentOfType: "text",
|
|
68
|
+
createStateVariable: "labelPosition",
|
|
69
|
+
defaultValue: "upperright",
|
|
70
|
+
public: true,
|
|
71
|
+
forRenderer: true,
|
|
72
|
+
toLowerCase: true,
|
|
73
|
+
validValues: [
|
|
74
|
+
"upperright",
|
|
75
|
+
"upperleft",
|
|
76
|
+
"lowerright",
|
|
77
|
+
"lowerleft",
|
|
78
|
+
"top",
|
|
79
|
+
"bottom",
|
|
80
|
+
"left",
|
|
81
|
+
"right",
|
|
82
|
+
],
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
attributes.showCoordsWhenDragging = {
|
|
86
|
+
createComponentOfType: "boolean",
|
|
87
|
+
createStateVariable: "showCoordsWhenDragging",
|
|
88
|
+
defaultValue: true,
|
|
89
|
+
public: true,
|
|
90
|
+
forRenderer: true,
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
attributes.hideOffGraphIndicator = {
|
|
94
|
+
createComponentOfType: "boolean",
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
return attributes;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
static returnSugarInstructions() {
|
|
101
|
+
let sugarInstructions = super.returnSugarInstructions();
|
|
102
|
+
|
|
103
|
+
let breakIntoXsOrCoords = function ({
|
|
104
|
+
matchedChildren,
|
|
105
|
+
componentInfoObjects,
|
|
106
|
+
}) {
|
|
107
|
+
let componentIsSpecifiedType =
|
|
108
|
+
componentInfoObjects.componentIsSpecifiedType;
|
|
109
|
+
|
|
110
|
+
// Find potential component children, i.e., consecutive children that aren't constraints or labels
|
|
111
|
+
let componentChildren = [],
|
|
112
|
+
nonComponentChildrenBegin = [],
|
|
113
|
+
nonComponentChildrenEnd = [];
|
|
114
|
+
|
|
115
|
+
for (let child of matchedChildren) {
|
|
116
|
+
if (
|
|
117
|
+
componentIsSpecifiedType(child, "constraints") ||
|
|
118
|
+
componentIsSpecifiedType(child, "label")
|
|
119
|
+
) {
|
|
120
|
+
if (componentChildren.length > 0) {
|
|
121
|
+
nonComponentChildrenEnd.push(child);
|
|
122
|
+
} else {
|
|
123
|
+
nonComponentChildrenBegin.push(child);
|
|
124
|
+
}
|
|
125
|
+
} else if (nonComponentChildrenEnd.length > 0) {
|
|
126
|
+
nonComponentChildrenEnd.push(child);
|
|
127
|
+
} else {
|
|
128
|
+
componentChildren.push(child);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (componentChildren.length === 0) {
|
|
133
|
+
return { success: false };
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (componentChildren.length === 1) {
|
|
137
|
+
let child = componentChildren[0];
|
|
138
|
+
|
|
139
|
+
if (
|
|
140
|
+
componentIsSpecifiedType(child, "point") ||
|
|
141
|
+
componentIsSpecifiedType(child, "vector")
|
|
142
|
+
) {
|
|
143
|
+
// if have an isolated point or vector, don't use sugar
|
|
144
|
+
// and that child will picked up by the point or vector child group
|
|
145
|
+
return { success: false };
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
let nCompChildren = componentChildren.length;
|
|
150
|
+
|
|
151
|
+
// check if componentChildren represent a single expression inside parens
|
|
152
|
+
let firstChar, lastChar;
|
|
153
|
+
if (typeof componentChildren[0] === "string") {
|
|
154
|
+
componentChildren[0] = componentChildren[0].trimStart();
|
|
155
|
+
firstChar = componentChildren[0][0];
|
|
156
|
+
}
|
|
157
|
+
if (typeof componentChildren[nCompChildren - 1] === "string") {
|
|
158
|
+
componentChildren[nCompChildren - 1] =
|
|
159
|
+
componentChildren[nCompChildren - 1].trimEnd();
|
|
160
|
+
let lastChild = componentChildren[nCompChildren - 1];
|
|
161
|
+
lastChar = lastChild[lastChild.length - 1];
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (firstChar === "(" && lastChar === ")") {
|
|
165
|
+
// start and end with parens, check if can split by commas after removing these parens
|
|
166
|
+
let modifiedChildren = [...componentChildren];
|
|
167
|
+
modifiedChildren[0] = modifiedChildren[0].substring(1);
|
|
168
|
+
|
|
169
|
+
let lastChild = modifiedChildren[modifiedChildren.length - 1];
|
|
170
|
+
modifiedChildren[modifiedChildren.length - 1] = lastChild.substring(
|
|
171
|
+
0,
|
|
172
|
+
lastChild.length - 1,
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
let breakResult = breakEmbeddedStringByCommas({
|
|
176
|
+
childrenList: modifiedChildren,
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
if (breakResult.success) {
|
|
180
|
+
// wrap maths around each piece, wrap whole thing in mathList
|
|
181
|
+
// and use for xs attribute
|
|
182
|
+
return {
|
|
183
|
+
success: true,
|
|
184
|
+
newAttributes: {
|
|
185
|
+
xs: {
|
|
186
|
+
component: {
|
|
187
|
+
componentType: "mathList",
|
|
188
|
+
children: breakResult.pieces.map((x) => ({
|
|
189
|
+
componentType: "math",
|
|
190
|
+
children: x,
|
|
191
|
+
})),
|
|
192
|
+
skipSugar: true,
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
newChildren: [
|
|
197
|
+
...nonComponentChildrenBegin,
|
|
198
|
+
...nonComponentChildrenEnd,
|
|
199
|
+
],
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// if didn't succeed in breaking it into xs, then use the component children as a coords
|
|
205
|
+
return {
|
|
206
|
+
success: true,
|
|
207
|
+
newAttributes: {
|
|
208
|
+
coords: {
|
|
209
|
+
component: {
|
|
210
|
+
componentType: "coords",
|
|
211
|
+
children: componentChildren,
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
newChildren: [...nonComponentChildrenBegin, ...nonComponentChildrenEnd],
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
sugarInstructions.push({
|
|
220
|
+
replacementFunction: breakIntoXsOrCoords,
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
return sugarInstructions;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
static returnChildGroups() {
|
|
227
|
+
let childGroups = super.returnChildGroups();
|
|
228
|
+
|
|
229
|
+
childGroups.push(
|
|
230
|
+
...[
|
|
231
|
+
{
|
|
232
|
+
group: "pointsAndVectors",
|
|
233
|
+
componentTypes: ["point", "vector"],
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
group: "constraints",
|
|
237
|
+
componentTypes: ["constraints"],
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
);
|
|
241
|
+
|
|
242
|
+
return childGroups;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
static returnStateVariableDefinitions() {
|
|
246
|
+
let stateVariableDefinitions = super.returnStateVariableDefinitions();
|
|
247
|
+
|
|
248
|
+
Object.assign(
|
|
249
|
+
stateVariableDefinitions,
|
|
250
|
+
returnRoundingStateVariableDefinitions(),
|
|
251
|
+
);
|
|
252
|
+
|
|
253
|
+
let styleDescriptionDefinitions = returnTextStyleDescriptionDefinitions();
|
|
254
|
+
Object.assign(stateVariableDefinitions, styleDescriptionDefinitions);
|
|
255
|
+
|
|
256
|
+
stateVariableDefinitions.styleDescription = {
|
|
257
|
+
public: true,
|
|
258
|
+
shadowingInstructions: {
|
|
259
|
+
createComponentOfType: "text",
|
|
260
|
+
},
|
|
261
|
+
returnDependencies: () => ({
|
|
262
|
+
selectedStyle: {
|
|
263
|
+
dependencyType: "stateVariable",
|
|
264
|
+
variableName: "selectedStyle",
|
|
265
|
+
},
|
|
266
|
+
document: {
|
|
267
|
+
dependencyType: "ancestor",
|
|
268
|
+
componentType: "document",
|
|
269
|
+
variableNames: ["theme"],
|
|
270
|
+
},
|
|
271
|
+
}),
|
|
272
|
+
definition: function ({ dependencyValues }) {
|
|
273
|
+
let markerColorWord;
|
|
274
|
+
if (dependencyValues.document?.stateValues.theme === "dark") {
|
|
275
|
+
markerColorWord =
|
|
276
|
+
dependencyValues.selectedStyle.markerColorWordDarkMode;
|
|
277
|
+
} else {
|
|
278
|
+
markerColorWord = dependencyValues.selectedStyle.markerColorWord;
|
|
279
|
+
}
|
|
280
|
+
return {
|
|
281
|
+
setValue: {
|
|
282
|
+
styleDescription: markerColorWord,
|
|
283
|
+
},
|
|
284
|
+
};
|
|
285
|
+
},
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
stateVariableDefinitions.styleDescriptionWithNoun = {
|
|
289
|
+
public: true,
|
|
290
|
+
shadowingInstructions: {
|
|
291
|
+
createComponentOfType: "text",
|
|
292
|
+
},
|
|
293
|
+
returnDependencies: () => ({
|
|
294
|
+
selectedStyle: {
|
|
295
|
+
dependencyType: "stateVariable",
|
|
296
|
+
variableName: "selectedStyle",
|
|
297
|
+
},
|
|
298
|
+
styleDescription: {
|
|
299
|
+
dependencyType: "stateVariable",
|
|
300
|
+
variableName: "styleDescription",
|
|
301
|
+
},
|
|
302
|
+
}),
|
|
303
|
+
definition: function ({ dependencyValues }) {
|
|
304
|
+
let pointDescription =
|
|
305
|
+
dependencyValues.styleDescription +
|
|
306
|
+
" " +
|
|
307
|
+
dependencyValues.selectedStyle.markerStyleWord;
|
|
308
|
+
return { setValue: { styleDescriptionWithNoun: pointDescription } };
|
|
309
|
+
},
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
stateVariableDefinitions.hideOffGraphIndicator = {
|
|
313
|
+
public: true,
|
|
314
|
+
forRenderer: true,
|
|
315
|
+
shadowingInstructions: {
|
|
316
|
+
createComponentOfType: "boolean",
|
|
317
|
+
},
|
|
318
|
+
returnDependencies: () => ({
|
|
319
|
+
hideOffGraphIndicatorAttr: {
|
|
320
|
+
dependencyType: "attributeComponent",
|
|
321
|
+
attributeName: "hideOffGraphIndicator",
|
|
322
|
+
variableNames: ["value"],
|
|
323
|
+
},
|
|
324
|
+
graphAncestor: {
|
|
325
|
+
dependencyType: "ancestor",
|
|
326
|
+
componentType: "graph",
|
|
327
|
+
variableNames: ["hideOffGraphIndicators"],
|
|
328
|
+
},
|
|
329
|
+
}),
|
|
330
|
+
definition({ dependencyValues }) {
|
|
331
|
+
if (dependencyValues.hideOffGraphIndicatorAttr) {
|
|
332
|
+
return {
|
|
333
|
+
setValue: {
|
|
334
|
+
hideOffGraphIndicator:
|
|
335
|
+
dependencyValues.hideOffGraphIndicatorAttr.stateValues.value,
|
|
336
|
+
},
|
|
337
|
+
};
|
|
338
|
+
} else if (dependencyValues.graphAncestor) {
|
|
339
|
+
return {
|
|
340
|
+
setValue: {
|
|
341
|
+
hideOffGraphIndicator:
|
|
342
|
+
dependencyValues.graphAncestor.stateValues
|
|
343
|
+
.hideOffGraphIndicators,
|
|
344
|
+
},
|
|
345
|
+
};
|
|
346
|
+
} else {
|
|
347
|
+
return {
|
|
348
|
+
setValue: { hideOffGraphIndicator: false },
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
// coordsShadow will be null unless point was created
|
|
355
|
+
// via an adapter or copy prop or from serialized state with coords value
|
|
356
|
+
// In case of adapter or copy prop,
|
|
357
|
+
// given the primaryStateVariableForDefinition static variable,
|
|
358
|
+
// the definition of coordsShadow will be changed to be the value
|
|
359
|
+
// that shadows the component adapted or copied
|
|
360
|
+
stateVariableDefinitions.coordsShadow = {
|
|
361
|
+
defaultValue: null,
|
|
362
|
+
isLocation: true,
|
|
363
|
+
hasEssential: true,
|
|
364
|
+
essentialVarName: "coords",
|
|
365
|
+
returnDependencies: () => ({}),
|
|
366
|
+
definition: () => ({
|
|
367
|
+
useEssentialOrDefaultValue: {
|
|
368
|
+
coordsShadow: true,
|
|
369
|
+
},
|
|
370
|
+
}),
|
|
371
|
+
inverseDefinition: async function ({
|
|
372
|
+
desiredStateVariableValues,
|
|
373
|
+
stateValues,
|
|
374
|
+
workspace,
|
|
375
|
+
}) {
|
|
376
|
+
return {
|
|
377
|
+
success: true,
|
|
378
|
+
instructions: [
|
|
379
|
+
{
|
|
380
|
+
setEssentialValue: "coordsShadow",
|
|
381
|
+
value: desiredStateVariableValues.coordsShadow,
|
|
382
|
+
},
|
|
383
|
+
],
|
|
384
|
+
};
|
|
385
|
+
},
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
stateVariableDefinitions.numDimensions = {
|
|
389
|
+
public: true,
|
|
390
|
+
shadowingInstructions: {
|
|
391
|
+
createComponentOfType: "number",
|
|
392
|
+
},
|
|
393
|
+
returnDependencies: () => ({
|
|
394
|
+
coordsShadow: {
|
|
395
|
+
dependencyType: "stateVariable",
|
|
396
|
+
variableName: "coordsShadow",
|
|
397
|
+
},
|
|
398
|
+
coords: {
|
|
399
|
+
dependencyType: "attributeComponent",
|
|
400
|
+
attributeName: "coords",
|
|
401
|
+
variableNames: ["value"],
|
|
402
|
+
},
|
|
403
|
+
x: {
|
|
404
|
+
dependencyType: "attributeComponent",
|
|
405
|
+
attributeName: "x",
|
|
406
|
+
},
|
|
407
|
+
y: {
|
|
408
|
+
dependencyType: "attributeComponent",
|
|
409
|
+
attributeName: "y",
|
|
410
|
+
},
|
|
411
|
+
z: {
|
|
412
|
+
dependencyType: "attributeComponent",
|
|
413
|
+
attributeName: "z",
|
|
414
|
+
},
|
|
415
|
+
xs: {
|
|
416
|
+
dependencyType: "attributeComponent",
|
|
417
|
+
attributeName: "xs",
|
|
418
|
+
variableNames: ["numComponents"],
|
|
419
|
+
},
|
|
420
|
+
pointOrVectorChild: {
|
|
421
|
+
dependencyType: "child",
|
|
422
|
+
childGroups: ["pointsAndVectors"],
|
|
423
|
+
variableNames: ["numDimensions"],
|
|
424
|
+
},
|
|
425
|
+
}),
|
|
426
|
+
definition: function ({ dependencyValues }) {
|
|
427
|
+
// console.log(`numDimensions definition`)
|
|
428
|
+
// console.log(dependencyValues)
|
|
429
|
+
|
|
430
|
+
let basedOnCoords = false;
|
|
431
|
+
let coords;
|
|
432
|
+
let numDimensions;
|
|
433
|
+
|
|
434
|
+
// if have a component child, they will overwrite any other component values
|
|
435
|
+
// so is a minimum for numDimensions
|
|
436
|
+
// Exception if only x is specified, least numDimensions at zero
|
|
437
|
+
// so that only specifying x still gives a 2D point
|
|
438
|
+
// (If want 1D point, specify via other means, such as coords or xs)
|
|
439
|
+
if (dependencyValues.z !== null) {
|
|
440
|
+
numDimensions = 3;
|
|
441
|
+
} else if (dependencyValues.y !== null) {
|
|
442
|
+
numDimensions = 2;
|
|
443
|
+
} else {
|
|
444
|
+
numDimensions = 0;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
if (dependencyValues.coords !== null) {
|
|
448
|
+
basedOnCoords = true;
|
|
449
|
+
coords = dependencyValues.coords.stateValues.value;
|
|
450
|
+
} else if (dependencyValues.coordsShadow) {
|
|
451
|
+
basedOnCoords = true;
|
|
452
|
+
coords = dependencyValues.coordsShadow.tuples_to_vectors();
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
if (basedOnCoords) {
|
|
456
|
+
let coordsTree = coords.expand().simplify().tree;
|
|
457
|
+
if (
|
|
458
|
+
Array.isArray(coordsTree) &&
|
|
459
|
+
vectorOperators.includes(coordsTree[0])
|
|
460
|
+
) {
|
|
461
|
+
numDimensions = Math.max(coordsTree.length - 1, numDimensions);
|
|
462
|
+
} else {
|
|
463
|
+
numDimensions = Math.max(1, numDimensions);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
// if based on coords, should check for actual change
|
|
467
|
+
// as frequently the dimension doesn't change
|
|
468
|
+
return {
|
|
469
|
+
setValue: { numDimensions },
|
|
470
|
+
checkForActualChange: { numDimensions: true },
|
|
471
|
+
};
|
|
472
|
+
} else {
|
|
473
|
+
if (dependencyValues.xs !== null) {
|
|
474
|
+
return {
|
|
475
|
+
setValue: {
|
|
476
|
+
numDimensions: Math.max(
|
|
477
|
+
dependencyValues.xs.stateValues.numComponents,
|
|
478
|
+
numDimensions,
|
|
479
|
+
),
|
|
480
|
+
},
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
if (dependencyValues.pointOrVectorChild.length > 0) {
|
|
484
|
+
return {
|
|
485
|
+
setValue: {
|
|
486
|
+
numDimensions: Math.max(
|
|
487
|
+
dependencyValues.pointOrVectorChild[0].stateValues
|
|
488
|
+
.numDimensions,
|
|
489
|
+
numDimensions,
|
|
490
|
+
),
|
|
491
|
+
},
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
if (numDimensions === 0) {
|
|
496
|
+
// if nothing specified, make it a 2D point
|
|
497
|
+
numDimensions = 2;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
return {
|
|
501
|
+
setValue: { numDimensions },
|
|
502
|
+
checkForActualChange: { numDimensions: true },
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
stateVariableDefinitions.arrayVariableForConstraints = {
|
|
509
|
+
returnDependencies: () => ({}),
|
|
510
|
+
definition: () => ({
|
|
511
|
+
setValue: { arrayVariableForConstraints: "unconstrainedXs" },
|
|
512
|
+
}),
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
stateVariableDefinitions.arrayEntryPrefixForConstraints = {
|
|
516
|
+
returnDependencies: () => ({}),
|
|
517
|
+
definition: () => ({
|
|
518
|
+
setValue: { arrayEntryPrefixForConstraints: "unconstrainedX" },
|
|
519
|
+
}),
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
stateVariableDefinitions.numDimensionsForConstraints = {
|
|
523
|
+
isAlias: true,
|
|
524
|
+
targetVariableName: "numDimensions",
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
stateVariableDefinitions.unconstrainedXs = {
|
|
528
|
+
isArray: true,
|
|
529
|
+
isLocation: true,
|
|
530
|
+
entryPrefixes: ["unconstrainedX"],
|
|
531
|
+
defaultValueByArrayKey: () => me.fromAst(0),
|
|
532
|
+
hasEssential: true,
|
|
533
|
+
returnArraySizeDependencies: () => ({
|
|
534
|
+
numDimensions: {
|
|
535
|
+
dependencyType: "stateVariable",
|
|
536
|
+
variableName: "numDimensions",
|
|
537
|
+
},
|
|
538
|
+
}),
|
|
539
|
+
returnArraySize({ dependencyValues }) {
|
|
540
|
+
return [dependencyValues.numDimensions];
|
|
541
|
+
},
|
|
542
|
+
returnArrayDependenciesByKey({ arrayKeys }) {
|
|
543
|
+
let globalDependencies = {
|
|
544
|
+
coordsShadow: {
|
|
545
|
+
dependencyType: "stateVariable",
|
|
546
|
+
variableName: "coordsShadow",
|
|
547
|
+
},
|
|
548
|
+
coords: {
|
|
549
|
+
dependencyType: "attributeComponent",
|
|
550
|
+
attributeName: "coords",
|
|
551
|
+
variableNames: ["value"],
|
|
552
|
+
},
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
let dependenciesByKey = {};
|
|
556
|
+
for (let arrayKey of arrayKeys) {
|
|
557
|
+
let varEnding = Number(arrayKey) + 1;
|
|
558
|
+
dependenciesByKey[arrayKey] = {
|
|
559
|
+
xs: {
|
|
560
|
+
dependencyType: "attributeComponent",
|
|
561
|
+
attributeName: "xs",
|
|
562
|
+
variableNames: ["math" + varEnding],
|
|
563
|
+
},
|
|
564
|
+
pointOrVectorChild: {
|
|
565
|
+
dependencyType: "child",
|
|
566
|
+
childGroups: ["pointsAndVectors"],
|
|
567
|
+
variableNames: ["x" + varEnding],
|
|
568
|
+
},
|
|
569
|
+
};
|
|
570
|
+
if (arrayKey === "0") {
|
|
571
|
+
dependenciesByKey[arrayKey].component = {
|
|
572
|
+
dependencyType: "attributeComponent",
|
|
573
|
+
attributeName: "x",
|
|
574
|
+
variableNames: ["value"],
|
|
575
|
+
};
|
|
576
|
+
} else if (arrayKey === "1") {
|
|
577
|
+
dependenciesByKey[arrayKey].component = {
|
|
578
|
+
dependencyType: "attributeComponent",
|
|
579
|
+
attributeName: "y",
|
|
580
|
+
variableNames: ["value"],
|
|
581
|
+
};
|
|
582
|
+
} else if (arrayKey === "2") {
|
|
583
|
+
dependenciesByKey[arrayKey].component = {
|
|
584
|
+
dependencyType: "attributeComponent",
|
|
585
|
+
attributeName: "z",
|
|
586
|
+
variableNames: ["value"],
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
return { globalDependencies, dependenciesByKey };
|
|
592
|
+
},
|
|
593
|
+
arrayDefinitionByKey({
|
|
594
|
+
globalDependencyValues,
|
|
595
|
+
dependencyValuesByKey,
|
|
596
|
+
arrayKeys,
|
|
597
|
+
}) {
|
|
598
|
+
// console.log(`unconstrained xs definition by key for ${componentName}`)
|
|
599
|
+
// console.log(deepClone(globalDependencyValues))
|
|
600
|
+
// console.log(deepClone(dependencyValuesByKey))
|
|
601
|
+
// console.log(deepClone(arrayKeys));
|
|
602
|
+
|
|
603
|
+
let newXs = {};
|
|
604
|
+
let essentialXs = {};
|
|
605
|
+
|
|
606
|
+
let basedOnCoords = false;
|
|
607
|
+
let coords;
|
|
608
|
+
|
|
609
|
+
if (globalDependencyValues.coords !== null) {
|
|
610
|
+
basedOnCoords = true;
|
|
611
|
+
coords = globalDependencyValues.coords.stateValues.value;
|
|
612
|
+
} else if (globalDependencyValues.coordsShadow) {
|
|
613
|
+
basedOnCoords = true;
|
|
614
|
+
coords = globalDependencyValues.coordsShadow.tuples_to_vectors();
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
if (basedOnCoords) {
|
|
618
|
+
coords = coords.expand().simplify();
|
|
619
|
+
let coordsTree = coords.tree;
|
|
620
|
+
if (
|
|
621
|
+
Array.isArray(coordsTree) &&
|
|
622
|
+
vectorOperators.includes(coordsTree[0])
|
|
623
|
+
) {
|
|
624
|
+
for (let arrayKey of arrayKeys) {
|
|
625
|
+
let ind = Number(arrayKey);
|
|
626
|
+
if (ind >= 0 || ind < coordsTree.length - 1) {
|
|
627
|
+
if (coordsTree[ind + 1] === undefined) {
|
|
628
|
+
newXs[arrayKey] = me.fromAst("\uff3f");
|
|
629
|
+
} else {
|
|
630
|
+
newXs[arrayKey] = coords.get_component(ind);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
} else {
|
|
635
|
+
if (arrayKeys.includes("0")) {
|
|
636
|
+
newXs[0] = coords;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
} else {
|
|
640
|
+
for (let arrayKey of arrayKeys) {
|
|
641
|
+
let varEnding = Number(arrayKey) + 1;
|
|
642
|
+
let xs = dependencyValuesByKey[arrayKey].xs;
|
|
643
|
+
if (xs !== null) {
|
|
644
|
+
let val = xs.stateValues["math" + varEnding];
|
|
645
|
+
if (val !== undefined) {
|
|
646
|
+
newXs[arrayKey] = val.simplify();
|
|
647
|
+
}
|
|
648
|
+
} else {
|
|
649
|
+
let pointOrVectorChild =
|
|
650
|
+
dependencyValuesByKey[arrayKey].pointOrVectorChild;
|
|
651
|
+
if (pointOrVectorChild.length > 0) {
|
|
652
|
+
newXs[arrayKey] =
|
|
653
|
+
pointOrVectorChild[0].stateValues["x" + varEnding];
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
// if have a component, that supercedes other values
|
|
660
|
+
for (let arrayKey of arrayKeys) {
|
|
661
|
+
let component = dependencyValuesByKey[arrayKey].component;
|
|
662
|
+
if (component) {
|
|
663
|
+
newXs[arrayKey] = component.stateValues.value.simplify();
|
|
664
|
+
} else if (newXs[arrayKey] === undefined) {
|
|
665
|
+
essentialXs[arrayKey] = true;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
// console.log("newXs");
|
|
670
|
+
// console.log(newXs);
|
|
671
|
+
// console.log("essentialXs");
|
|
672
|
+
// console.log(essentialXs);
|
|
673
|
+
let result = {};
|
|
674
|
+
if (Object.keys(newXs).length > 0) {
|
|
675
|
+
result.setValue = { unconstrainedXs: newXs };
|
|
676
|
+
}
|
|
677
|
+
if (Object.keys(essentialXs).length > 0) {
|
|
678
|
+
result.useEssentialOrDefaultValue = { unconstrainedXs: essentialXs };
|
|
679
|
+
}
|
|
680
|
+
return result;
|
|
681
|
+
},
|
|
682
|
+
inverseArrayDefinitionByKey({
|
|
683
|
+
desiredStateVariableValues,
|
|
684
|
+
globalDependencyValues,
|
|
685
|
+
dependencyValuesByKey,
|
|
686
|
+
dependencyNamesByKey,
|
|
687
|
+
arraySize,
|
|
688
|
+
}) {
|
|
689
|
+
// console.log(`invertUnconstrainedXs, ${componentName}`);
|
|
690
|
+
// console.log(desiredStateVariableValues)
|
|
691
|
+
// console.log(globalDependencyValues);
|
|
692
|
+
// console.log(dependencyValuesByKey);
|
|
693
|
+
|
|
694
|
+
let instructions = [];
|
|
695
|
+
let basedOnCoords = false;
|
|
696
|
+
let coordsDependency;
|
|
697
|
+
let coordsTree;
|
|
698
|
+
let setCoords = false;
|
|
699
|
+
|
|
700
|
+
if (globalDependencyValues.coords !== null) {
|
|
701
|
+
basedOnCoords = true;
|
|
702
|
+
coordsDependency = "coords";
|
|
703
|
+
coordsTree = Array(arraySize[0] + 1);
|
|
704
|
+
} else if (globalDependencyValues.coordsShadow !== null) {
|
|
705
|
+
basedOnCoords = true;
|
|
706
|
+
coordsDependency = "coordsShadow";
|
|
707
|
+
coordsTree = Array(arraySize[0] + 1);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
for (let arrayKey of Object.keys(
|
|
711
|
+
desiredStateVariableValues.unconstrainedXs,
|
|
712
|
+
).reverse()) {
|
|
713
|
+
let desiredValue = convertValueToMathExpression(
|
|
714
|
+
desiredStateVariableValues.unconstrainedXs[arrayKey],
|
|
715
|
+
);
|
|
716
|
+
|
|
717
|
+
let component = dependencyValuesByKey[arrayKey].component;
|
|
718
|
+
if (component !== null) {
|
|
719
|
+
instructions.push({
|
|
720
|
+
setDependency: dependencyNamesByKey[arrayKey].component,
|
|
721
|
+
desiredValue,
|
|
722
|
+
childIndex: 0,
|
|
723
|
+
variableIndex: 0,
|
|
724
|
+
});
|
|
725
|
+
} else if (basedOnCoords) {
|
|
726
|
+
coordsTree[Number(arrayKey) + 1] = desiredValue.tree;
|
|
727
|
+
setCoords = true;
|
|
728
|
+
} else {
|
|
729
|
+
let xs = dependencyValuesByKey[arrayKey].xs;
|
|
730
|
+
if (xs !== null) {
|
|
731
|
+
instructions.push({
|
|
732
|
+
setDependency: dependencyNamesByKey[arrayKey].xs,
|
|
733
|
+
desiredValue,
|
|
734
|
+
childIndex: 0,
|
|
735
|
+
variableIndex: 0,
|
|
736
|
+
});
|
|
737
|
+
} else {
|
|
738
|
+
let pointOrVectorChild =
|
|
739
|
+
dependencyValuesByKey[arrayKey].pointOrVectorChild;
|
|
740
|
+
if (pointOrVectorChild.length > 0) {
|
|
741
|
+
instructions.push({
|
|
742
|
+
setDependency:
|
|
743
|
+
dependencyNamesByKey[arrayKey].pointOrVectorChild,
|
|
744
|
+
desiredValue,
|
|
745
|
+
childIndex: 0,
|
|
746
|
+
variableIndex: 0,
|
|
747
|
+
});
|
|
748
|
+
} else {
|
|
749
|
+
instructions.push({
|
|
750
|
+
setEssentialValue: "unconstrainedXs",
|
|
751
|
+
value: { [arrayKey]: desiredValue },
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
if (setCoords) {
|
|
759
|
+
let desiredCoords;
|
|
760
|
+
if (arraySize[0] === 1) {
|
|
761
|
+
desiredCoords = me.fromAst(coordsTree[1]);
|
|
762
|
+
} else {
|
|
763
|
+
coordsTree[0] = "vector";
|
|
764
|
+
desiredCoords = me.fromAst(coordsTree);
|
|
765
|
+
}
|
|
766
|
+
let instruction = {
|
|
767
|
+
setDependency: coordsDependency,
|
|
768
|
+
desiredValue: desiredCoords,
|
|
769
|
+
};
|
|
770
|
+
if (coordsDependency === "coords") {
|
|
771
|
+
instruction.childIndex = 0;
|
|
772
|
+
instruction.variableIndex = 0;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
instructions.push(instruction);
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
return {
|
|
779
|
+
success: true,
|
|
780
|
+
instructions,
|
|
781
|
+
};
|
|
782
|
+
},
|
|
783
|
+
};
|
|
784
|
+
|
|
785
|
+
stateVariableDefinitions.xs = {
|
|
786
|
+
public: true,
|
|
787
|
+
isLocation: true,
|
|
788
|
+
shadowingInstructions: {
|
|
789
|
+
createComponentOfType: "math",
|
|
790
|
+
addAttributeComponentsShadowingStateVariables:
|
|
791
|
+
returnRoundingAttributeComponentShadowing(),
|
|
792
|
+
},
|
|
793
|
+
isArray: true,
|
|
794
|
+
entryPrefixes: ["x"],
|
|
795
|
+
returnArraySizeDependencies: () => ({
|
|
796
|
+
numDimensions: {
|
|
797
|
+
dependencyType: "stateVariable",
|
|
798
|
+
variableName: "numDimensions",
|
|
799
|
+
},
|
|
800
|
+
}),
|
|
801
|
+
returnArraySize({ dependencyValues }) {
|
|
802
|
+
return [dependencyValues.numDimensions];
|
|
803
|
+
},
|
|
804
|
+
returnArrayDependenciesByKey({ arrayKeys }) {
|
|
805
|
+
let dependenciesByKey = {};
|
|
806
|
+
for (let arrayKey of arrayKeys) {
|
|
807
|
+
let varEnding = Number(arrayKey) + 1;
|
|
808
|
+
|
|
809
|
+
let keyDeps = {};
|
|
810
|
+
keyDeps.unconstrainedX = {
|
|
811
|
+
dependencyType: "stateVariable",
|
|
812
|
+
variableName: `unconstrainedX${varEnding}`,
|
|
813
|
+
};
|
|
814
|
+
keyDeps.constraintsChild = {
|
|
815
|
+
dependencyType: "child",
|
|
816
|
+
childGroups: ["constraints"],
|
|
817
|
+
variableNames: [`constraintResult${varEnding}`],
|
|
818
|
+
};
|
|
819
|
+
dependenciesByKey[arrayKey] = keyDeps;
|
|
820
|
+
}
|
|
821
|
+
return { dependenciesByKey };
|
|
822
|
+
},
|
|
823
|
+
arrayDefinitionByKey({ dependencyValuesByKey, arrayKeys }) {
|
|
824
|
+
// console.log('array definition of xs')
|
|
825
|
+
// console.log(deepClone(dependencyValuesByKey))
|
|
826
|
+
// console.log(deepClone(arrayKeys));
|
|
827
|
+
|
|
828
|
+
let xs = {};
|
|
829
|
+
|
|
830
|
+
for (let arrayKey of arrayKeys) {
|
|
831
|
+
if (dependencyValuesByKey[arrayKey].constraintsChild.length > 0) {
|
|
832
|
+
let varEnding = Number(arrayKey) + 1;
|
|
833
|
+
xs[arrayKey] = convertValueToMathExpression(
|
|
834
|
+
dependencyValuesByKey[arrayKey].constraintsChild[0].stateValues[
|
|
835
|
+
"constraintResult" + varEnding
|
|
836
|
+
],
|
|
837
|
+
);
|
|
838
|
+
} else {
|
|
839
|
+
xs[arrayKey] = convertValueToMathExpression(
|
|
840
|
+
dependencyValuesByKey[arrayKey].unconstrainedX,
|
|
841
|
+
);
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
if (arrayKeys.length > 0) {
|
|
846
|
+
return { setValue: { xs } };
|
|
847
|
+
} else {
|
|
848
|
+
return {};
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
async inverseArrayDefinitionByKey({
|
|
852
|
+
desiredStateVariableValues,
|
|
853
|
+
dependencyValuesByKey,
|
|
854
|
+
dependencyNamesByKey,
|
|
855
|
+
initialChange,
|
|
856
|
+
stateValues,
|
|
857
|
+
}) {
|
|
858
|
+
// console.log('invert xs')
|
|
859
|
+
// console.log(desiredStateVariableValues);
|
|
860
|
+
// console.log(dependencyValuesByKey);
|
|
861
|
+
// console.log(dependencyNamesByKey);
|
|
862
|
+
|
|
863
|
+
// if not draggable, then disallow initial change
|
|
864
|
+
if (initialChange && !(await stateValues.draggable)) {
|
|
865
|
+
return { success: false };
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
let instructions = [];
|
|
869
|
+
for (let arrayKey of Object.keys(
|
|
870
|
+
desiredStateVariableValues.xs,
|
|
871
|
+
).reverse()) {
|
|
872
|
+
if (!dependencyValuesByKey[arrayKey]) {
|
|
873
|
+
continue;
|
|
874
|
+
}
|
|
875
|
+
if (dependencyValuesByKey[arrayKey].constraintsChild.length > 0) {
|
|
876
|
+
instructions.push({
|
|
877
|
+
setDependency: dependencyNamesByKey[arrayKey].constraintsChild,
|
|
878
|
+
desiredValue: desiredStateVariableValues.xs[arrayKey],
|
|
879
|
+
childIndex: 0,
|
|
880
|
+
variableIndex: 0,
|
|
881
|
+
});
|
|
882
|
+
} else {
|
|
883
|
+
instructions.push({
|
|
884
|
+
setDependency: dependencyNamesByKey[arrayKey].unconstrainedX,
|
|
885
|
+
desiredValue: desiredStateVariableValues.xs[arrayKey],
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
return {
|
|
891
|
+
success: true,
|
|
892
|
+
instructions,
|
|
893
|
+
};
|
|
894
|
+
},
|
|
895
|
+
};
|
|
896
|
+
|
|
897
|
+
stateVariableDefinitions.x = {
|
|
898
|
+
isAlias: true,
|
|
899
|
+
targetVariableName: "x1",
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
stateVariableDefinitions.y = {
|
|
903
|
+
isAlias: true,
|
|
904
|
+
targetVariableName: "x2",
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
stateVariableDefinitions.z = {
|
|
908
|
+
isAlias: true,
|
|
909
|
+
targetVariableName: "x3",
|
|
910
|
+
};
|
|
911
|
+
|
|
912
|
+
stateVariableDefinitions.coords = {
|
|
913
|
+
public: true,
|
|
914
|
+
isLocation: true,
|
|
915
|
+
shadowingInstructions: {
|
|
916
|
+
createComponentOfType: "coords",
|
|
917
|
+
addAttributeComponentsShadowingStateVariables:
|
|
918
|
+
returnRoundingAttributeComponentShadowing(),
|
|
919
|
+
},
|
|
920
|
+
returnDependencies: () => ({
|
|
921
|
+
xs: {
|
|
922
|
+
dependencyType: "stateVariable",
|
|
923
|
+
variableName: "xs",
|
|
924
|
+
},
|
|
925
|
+
}),
|
|
926
|
+
definition: function ({ dependencyValues }) {
|
|
927
|
+
// console.log(`definition of coords`)
|
|
928
|
+
// console.log(deepClone(dependencyValues));
|
|
929
|
+
let coordsAst = [];
|
|
930
|
+
for (let v of dependencyValues.xs) {
|
|
931
|
+
if (v) {
|
|
932
|
+
coordsAst.push(v.tree);
|
|
933
|
+
} else {
|
|
934
|
+
coordsAst.push("\uff3f");
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
if (coordsAst.length > 1) {
|
|
938
|
+
coordsAst = ["vector", ...coordsAst];
|
|
939
|
+
} else if (coordsAst.length === 1) {
|
|
940
|
+
coordsAst = coordsAst[0];
|
|
941
|
+
} else {
|
|
942
|
+
coordsAst = "\uff3f";
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
return { setValue: { coords: me.fromAst(coordsAst) } };
|
|
946
|
+
},
|
|
947
|
+
|
|
948
|
+
inverseDefinition: async function ({
|
|
949
|
+
desiredStateVariableValues,
|
|
950
|
+
stateValues,
|
|
951
|
+
initialChange,
|
|
952
|
+
}) {
|
|
953
|
+
// console.log("invertCoords");
|
|
954
|
+
// console.log(desiredStateVariableValues)
|
|
955
|
+
// console.log(stateValues);
|
|
956
|
+
|
|
957
|
+
// if not draggable, then disallow initial change
|
|
958
|
+
if (initialChange && !(await stateValues.draggable)) {
|
|
959
|
+
return { success: false };
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
let instructions = [];
|
|
963
|
+
|
|
964
|
+
let desiredXValues = {};
|
|
965
|
+
|
|
966
|
+
let coordsTree = desiredStateVariableValues.coords.tree;
|
|
967
|
+
|
|
968
|
+
if (
|
|
969
|
+
!(
|
|
970
|
+
Array.isArray(coordsTree) && vectorOperators.includes(coordsTree[0])
|
|
971
|
+
)
|
|
972
|
+
) {
|
|
973
|
+
desiredXValues[0] = desiredStateVariableValues.coords;
|
|
974
|
+
} else {
|
|
975
|
+
for (let i = 0; i < coordsTree.length - 1; i++) {
|
|
976
|
+
let desiredValue =
|
|
977
|
+
desiredStateVariableValues.coords.get_component(i);
|
|
978
|
+
if (desiredValue.tree !== undefined) {
|
|
979
|
+
desiredXValues[i] = desiredValue;
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
instructions.push({
|
|
985
|
+
setDependency: "xs",
|
|
986
|
+
desiredValue: desiredXValues,
|
|
987
|
+
});
|
|
988
|
+
|
|
989
|
+
return {
|
|
990
|
+
success: true,
|
|
991
|
+
instructions,
|
|
992
|
+
};
|
|
993
|
+
},
|
|
994
|
+
};
|
|
995
|
+
|
|
996
|
+
stateVariableDefinitions.latex = {
|
|
997
|
+
forRenderer: true,
|
|
998
|
+
public: true,
|
|
999
|
+
shadowingInstructions: {
|
|
1000
|
+
createComponentOfType: "latex",
|
|
1001
|
+
},
|
|
1002
|
+
returnDependencies: () => ({
|
|
1003
|
+
coords: {
|
|
1004
|
+
dependencyType: "stateVariable",
|
|
1005
|
+
variableName: "coords",
|
|
1006
|
+
},
|
|
1007
|
+
displayDigits: {
|
|
1008
|
+
dependencyType: "stateVariable",
|
|
1009
|
+
variableName: "displayDigits",
|
|
1010
|
+
},
|
|
1011
|
+
displayDecimals: {
|
|
1012
|
+
dependencyType: "stateVariable",
|
|
1013
|
+
variableName: "displayDecimals",
|
|
1014
|
+
},
|
|
1015
|
+
displaySmallAsZero: {
|
|
1016
|
+
dependencyType: "stateVariable",
|
|
1017
|
+
variableName: "displaySmallAsZero",
|
|
1018
|
+
},
|
|
1019
|
+
padZeros: {
|
|
1020
|
+
dependencyType: "stateVariable",
|
|
1021
|
+
variableName: "padZeros",
|
|
1022
|
+
},
|
|
1023
|
+
}),
|
|
1024
|
+
definition: function ({ dependencyValues }) {
|
|
1025
|
+
let params = {};
|
|
1026
|
+
if (dependencyValues.padZeros) {
|
|
1027
|
+
if (Number.isFinite(dependencyValues.displayDecimals)) {
|
|
1028
|
+
params.padToDecimals = dependencyValues.displayDecimals;
|
|
1029
|
+
}
|
|
1030
|
+
if (dependencyValues.displayDigits >= 1) {
|
|
1031
|
+
params.padToDigits = dependencyValues.displayDigits;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
let latex = roundForDisplay({
|
|
1035
|
+
value: dependencyValues.coords,
|
|
1036
|
+
dependencyValues,
|
|
1037
|
+
}).toLatex(params);
|
|
1038
|
+
|
|
1039
|
+
return { setValue: { latex } };
|
|
1040
|
+
},
|
|
1041
|
+
};
|
|
1042
|
+
|
|
1043
|
+
// currently value is used by answer to get variable for response
|
|
1044
|
+
stateVariableDefinitions.value = {
|
|
1045
|
+
isAlias: true,
|
|
1046
|
+
targetVariableName: "coords",
|
|
1047
|
+
};
|
|
1048
|
+
|
|
1049
|
+
stateVariableDefinitions.constraintUsed = {
|
|
1050
|
+
public: true,
|
|
1051
|
+
shadowingInstructions: {
|
|
1052
|
+
createComponentOfType: "boolean",
|
|
1053
|
+
},
|
|
1054
|
+
returnDependencies: () => ({
|
|
1055
|
+
constraintsChild: {
|
|
1056
|
+
dependencyType: "child",
|
|
1057
|
+
childGroups: ["constraints"],
|
|
1058
|
+
variableNames: ["constraintUsed"],
|
|
1059
|
+
},
|
|
1060
|
+
}),
|
|
1061
|
+
definition: function ({ dependencyValues }) {
|
|
1062
|
+
if (dependencyValues.constraintsChild.length === 0) {
|
|
1063
|
+
return { setValue: { constraintUsed: false } };
|
|
1064
|
+
} else {
|
|
1065
|
+
return {
|
|
1066
|
+
setValue: {
|
|
1067
|
+
constraintUsed:
|
|
1068
|
+
dependencyValues.constraintsChild[0].stateValues.constraintUsed,
|
|
1069
|
+
},
|
|
1070
|
+
};
|
|
1071
|
+
}
|
|
1072
|
+
},
|
|
1073
|
+
};
|
|
1074
|
+
|
|
1075
|
+
stateVariableDefinitions.numericalXs = {
|
|
1076
|
+
isArray: true,
|
|
1077
|
+
entryPrefixes: ["numericalX"],
|
|
1078
|
+
forRenderer: true,
|
|
1079
|
+
returnArraySizeDependencies: () => ({
|
|
1080
|
+
numDimensions: {
|
|
1081
|
+
dependencyType: "stateVariable",
|
|
1082
|
+
variableName: "numDimensions",
|
|
1083
|
+
},
|
|
1084
|
+
}),
|
|
1085
|
+
returnArraySize({ dependencyValues }) {
|
|
1086
|
+
return [dependencyValues.numDimensions];
|
|
1087
|
+
},
|
|
1088
|
+
returnArrayDependenciesByKey({ arrayKeys }) {
|
|
1089
|
+
let dependenciesByKey = {};
|
|
1090
|
+
for (let arrayKey of arrayKeys) {
|
|
1091
|
+
let varEnding = Number(arrayKey) + 1;
|
|
1092
|
+
dependenciesByKey[arrayKey] = {
|
|
1093
|
+
[`x`]: {
|
|
1094
|
+
dependencyType: "stateVariable",
|
|
1095
|
+
variableName: `x${varEnding}`,
|
|
1096
|
+
},
|
|
1097
|
+
};
|
|
1098
|
+
}
|
|
1099
|
+
return { dependenciesByKey };
|
|
1100
|
+
},
|
|
1101
|
+
arrayDefinitionByKey({ dependencyValuesByKey, arrayKeys }) {
|
|
1102
|
+
// console.log(`definition of numericalXs`)
|
|
1103
|
+
// console.log(deepClone(dependencyValuesByKey))
|
|
1104
|
+
// console.log(deepClone(arrayKeys))
|
|
1105
|
+
|
|
1106
|
+
let numericalXs = {};
|
|
1107
|
+
|
|
1108
|
+
for (let arrayKey of arrayKeys) {
|
|
1109
|
+
let x = dependencyValuesByKey[arrayKey].x;
|
|
1110
|
+
if (x) {
|
|
1111
|
+
x = dependencyValuesByKey[arrayKey].x.evaluate_to_constant();
|
|
1112
|
+
numericalXs[arrayKey] = x;
|
|
1113
|
+
} else {
|
|
1114
|
+
numericalXs[arrayKey] = NaN;
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
return { setValue: { numericalXs } };
|
|
1119
|
+
},
|
|
1120
|
+
|
|
1121
|
+
async inverseArrayDefinitionByKey({
|
|
1122
|
+
desiredStateVariableValues,
|
|
1123
|
+
dependencyNamesByKey,
|
|
1124
|
+
initialChange,
|
|
1125
|
+
stateValues,
|
|
1126
|
+
}) {
|
|
1127
|
+
// if not draggable, then disallow initial change
|
|
1128
|
+
if (initialChange && !(await stateValues.draggable)) {
|
|
1129
|
+
return { success: false };
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
let instructions = [];
|
|
1133
|
+
for (let arrayKey in desiredStateVariableValues.numericalXs) {
|
|
1134
|
+
if (!dependencyNamesByKey[arrayKey]) {
|
|
1135
|
+
continue;
|
|
1136
|
+
}
|
|
1137
|
+
instructions.push({
|
|
1138
|
+
setDependency: dependencyNamesByKey[arrayKey].xs,
|
|
1139
|
+
desiredValue: desiredStateVariableValues.numericalXs[arrayKey],
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
return {
|
|
1144
|
+
success: true,
|
|
1145
|
+
instructions,
|
|
1146
|
+
};
|
|
1147
|
+
},
|
|
1148
|
+
};
|
|
1149
|
+
|
|
1150
|
+
stateVariableDefinitions.nearestPoint = {
|
|
1151
|
+
returnDependencies: () => ({
|
|
1152
|
+
numDimensions: {
|
|
1153
|
+
dependencyType: "stateVariable",
|
|
1154
|
+
variableName: "numDimensions",
|
|
1155
|
+
},
|
|
1156
|
+
numericalXs: {
|
|
1157
|
+
dependencyType: "stateVariable",
|
|
1158
|
+
variableName: "numericalXs",
|
|
1159
|
+
},
|
|
1160
|
+
}),
|
|
1161
|
+
definition: ({ dependencyValues }) => ({
|
|
1162
|
+
setValue: {
|
|
1163
|
+
nearestPoint: function () {
|
|
1164
|
+
// for point, nearest point is just the point itself
|
|
1165
|
+
// only implement for numerical values
|
|
1166
|
+
let result = {};
|
|
1167
|
+
|
|
1168
|
+
for (let ind = 1; ind <= dependencyValues.numDimensions; ind++) {
|
|
1169
|
+
let x = dependencyValues.numericalXs[ind - 1];
|
|
1170
|
+
if (!Number.isFinite(x)) {
|
|
1171
|
+
return {};
|
|
1172
|
+
}
|
|
1173
|
+
result["x" + ind] = x;
|
|
1174
|
+
}
|
|
1175
|
+
return result;
|
|
1176
|
+
},
|
|
1177
|
+
},
|
|
1178
|
+
}),
|
|
1179
|
+
};
|
|
1180
|
+
|
|
1181
|
+
return stateVariableDefinitions;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
static adapters = [
|
|
1185
|
+
{
|
|
1186
|
+
stateVariable: "coords",
|
|
1187
|
+
stateVariablesToShadow: Object.keys(
|
|
1188
|
+
returnRoundingStateVariableDefinitions(),
|
|
1189
|
+
),
|
|
1190
|
+
},
|
|
1191
|
+
];
|
|
1192
|
+
|
|
1193
|
+
async movePoint({
|
|
1194
|
+
x,
|
|
1195
|
+
y,
|
|
1196
|
+
z,
|
|
1197
|
+
transient,
|
|
1198
|
+
actionId,
|
|
1199
|
+
sourceInformation = {},
|
|
1200
|
+
skipRendererUpdate = false,
|
|
1201
|
+
}) {
|
|
1202
|
+
let components = {};
|
|
1203
|
+
if (x !== undefined) {
|
|
1204
|
+
components[0] = me.fromAst(x);
|
|
1205
|
+
}
|
|
1206
|
+
if (y !== undefined) {
|
|
1207
|
+
components[1] = me.fromAst(y);
|
|
1208
|
+
}
|
|
1209
|
+
if (z !== undefined) {
|
|
1210
|
+
components[2] = me.fromAst(z);
|
|
1211
|
+
}
|
|
1212
|
+
if (transient) {
|
|
1213
|
+
return await this.coreFunctions.performUpdate({
|
|
1214
|
+
updateInstructions: [
|
|
1215
|
+
{
|
|
1216
|
+
updateType: "updateValue",
|
|
1217
|
+
componentName: this.componentName,
|
|
1218
|
+
stateVariable: "xs",
|
|
1219
|
+
value: components,
|
|
1220
|
+
},
|
|
1221
|
+
],
|
|
1222
|
+
transient,
|
|
1223
|
+
actionId,
|
|
1224
|
+
sourceInformation,
|
|
1225
|
+
skipRendererUpdate,
|
|
1226
|
+
});
|
|
1227
|
+
} else {
|
|
1228
|
+
return await this.coreFunctions.performUpdate({
|
|
1229
|
+
updateInstructions: [
|
|
1230
|
+
{
|
|
1231
|
+
updateType: "updateValue",
|
|
1232
|
+
componentName: this.componentName,
|
|
1233
|
+
stateVariable: "xs",
|
|
1234
|
+
value: components,
|
|
1235
|
+
},
|
|
1236
|
+
],
|
|
1237
|
+
actionId,
|
|
1238
|
+
sourceInformation,
|
|
1239
|
+
skipRendererUpdate,
|
|
1240
|
+
event: {
|
|
1241
|
+
verb: "interacted",
|
|
1242
|
+
object: {
|
|
1243
|
+
componentName: this.componentName,
|
|
1244
|
+
componentType: this.componentType,
|
|
1245
|
+
},
|
|
1246
|
+
result: {
|
|
1247
|
+
x,
|
|
1248
|
+
y,
|
|
1249
|
+
z,
|
|
1250
|
+
},
|
|
1251
|
+
},
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
switchPoint() {}
|
|
1257
|
+
|
|
1258
|
+
async pointClicked({
|
|
1259
|
+
actionId,
|
|
1260
|
+
name,
|
|
1261
|
+
sourceInformation = {},
|
|
1262
|
+
skipRendererUpdate = false,
|
|
1263
|
+
}) {
|
|
1264
|
+
if (!(await this.stateValues.fixed)) {
|
|
1265
|
+
await this.coreFunctions.triggerChainedActions({
|
|
1266
|
+
triggeringAction: "click",
|
|
1267
|
+
componentName: name, // use name rather than this.componentName to get original name if adapted
|
|
1268
|
+
actionId,
|
|
1269
|
+
sourceInformation,
|
|
1270
|
+
skipRendererUpdate,
|
|
1271
|
+
});
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
this.coreFunctions.resolveAction({ actionId });
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
async pointFocused({
|
|
1278
|
+
actionId,
|
|
1279
|
+
name,
|
|
1280
|
+
sourceInformation = {},
|
|
1281
|
+
skipRendererUpdate = false,
|
|
1282
|
+
}) {
|
|
1283
|
+
if (!(await this.stateValues.fixed)) {
|
|
1284
|
+
await this.coreFunctions.triggerChainedActions({
|
|
1285
|
+
triggeringAction: "focus",
|
|
1286
|
+
componentName: name, // use name rather than this.componentName to get original name if adapted
|
|
1287
|
+
actionId,
|
|
1288
|
+
sourceInformation,
|
|
1289
|
+
skipRendererUpdate,
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
this.coreFunctions.resolveAction({ actionId });
|
|
1294
|
+
}
|
|
1295
|
+
}
|