@pie-element/hotspot 11.0.5-esm.1 → 11.1.0-next.1
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/CHANGELOG.md +1087 -2392
- package/configure/CHANGELOG.md +898 -2090
- package/configure/lib/DeleteWidget.js +30 -43
- package/configure/lib/DeleteWidget.js.map +1 -1
- package/configure/lib/button.js +26 -45
- package/configure/lib/button.js.map +1 -1
- package/configure/lib/buttons/circle.js +20 -27
- package/configure/lib/buttons/circle.js.map +1 -1
- package/configure/lib/buttons/polygon.js +26 -33
- package/configure/lib/buttons/polygon.js.map +1 -1
- package/configure/lib/buttons/rectangle.js +26 -33
- package/configure/lib/buttons/rectangle.js.map +1 -1
- package/configure/lib/defaults.js +5 -3
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/hotspot-circle.js +136 -200
- package/configure/lib/hotspot-circle.js.map +1 -1
- package/configure/lib/hotspot-container.js +250 -355
- package/configure/lib/hotspot-container.js.map +1 -1
- package/configure/lib/hotspot-drawable.js +361 -473
- package/configure/lib/hotspot-drawable.js.map +1 -1
- package/configure/lib/hotspot-palette.js +92 -139
- package/configure/lib/hotspot-palette.js.map +1 -1
- package/configure/lib/hotspot-polygon.js +212 -318
- package/configure/lib/hotspot-polygon.js.map +1 -1
- package/configure/lib/hotspot-rectangle.js +132 -195
- package/configure/lib/hotspot-rectangle.js.map +1 -1
- package/configure/lib/icons.js +3 -7
- package/configure/lib/icons.js.map +1 -1
- package/configure/lib/image-konva.js +46 -86
- package/configure/lib/image-konva.js.map +1 -1
- package/configure/lib/index.js +162 -222
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/root.js +302 -394
- package/configure/lib/root.js.map +1 -1
- package/configure/lib/shapes/circle.js +69 -101
- package/configure/lib/shapes/circle.js.map +1 -1
- package/configure/lib/shapes/index.js +4 -12
- package/configure/lib/shapes/index.js.map +1 -1
- package/configure/lib/shapes/polygon.js +64 -96
- package/configure/lib/shapes/polygon.js.map +1 -1
- package/configure/lib/shapes/rectagle.js +69 -101
- package/configure/lib/shapes/rectagle.js.map +1 -1
- package/configure/lib/shapes/utils.js +2 -8
- package/configure/lib/shapes/utils.js.map +1 -1
- package/configure/lib/upload-control.js +25 -52
- package/configure/lib/upload-control.js.map +1 -1
- package/configure/lib/utils.js +85 -139
- package/configure/lib/utils.js.map +1 -1
- package/configure/package.json +13 -12
- package/configure/src/__tests__/DeleteWidget.test.jsx +366 -0
- package/configure/src/__tests__/button.test.jsx +198 -0
- package/configure/src/__tests__/hotspot-circle.test.jsx +259 -0
- package/configure/src/__tests__/hotspot-container.test.js +50 -19
- package/configure/src/__tests__/hotspot-drawable.test.js +55 -34
- package/configure/src/__tests__/hotspot-palette.test.jsx +71 -0
- package/configure/src/__tests__/image-konva.test.jsx +226 -0
- package/configure/src/__tests__/index.test.js +167 -5
- package/configure/src/__tests__/root.test.js +89 -63
- package/configure/src/button.jsx +12 -20
- package/configure/src/defaults.js +1 -0
- package/configure/src/hotspot-circle.jsx +8 -19
- package/configure/src/hotspot-container.jsx +82 -98
- package/configure/src/hotspot-drawable.jsx +44 -46
- package/configure/src/hotspot-palette.jsx +45 -37
- package/configure/src/hotspot-polygon.jsx +3 -20
- package/configure/src/hotspot-rectangle.jsx +7 -19
- package/configure/src/icons.js +4 -2
- package/configure/src/index.js +12 -2
- package/configure/src/root.jsx +86 -80
- package/configure/src/upload-control.jsx +6 -16
- package/configure/src/utils.js +1 -1
- package/controller/CHANGELOG.md +574 -1431
- package/controller/lib/defaults.js +2 -3
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +238 -208
- package/controller/lib/index.js.map +1 -1
- package/controller/lib/utils.js +15 -37
- package/controller/lib/utils.js.map +1 -1
- package/controller/package.json +3 -3
- package/controller/src/__tests__/index.test.js +4 -3
- package/controller/src/index.js +107 -5
- package/controller/src/utils.js +1 -2
- package/lib/hotspot/circle.js +109 -169
- package/lib/hotspot/circle.js.map +1 -1
- package/lib/hotspot/container.js +174 -260
- package/lib/hotspot/container.js.map +1 -1
- package/lib/hotspot/icons.js +4 -9
- package/lib/hotspot/icons.js.map +1 -1
- package/lib/hotspot/image-konva-tooltip.js +65 -112
- package/lib/hotspot/image-konva-tooltip.js.map +1 -1
- package/lib/hotspot/index.js +135 -198
- package/lib/hotspot/index.js.map +1 -1
- package/lib/hotspot/polygon.js +150 -215
- package/lib/hotspot/polygon.js.map +1 -1
- package/lib/hotspot/rectangle.js +128 -186
- package/lib/hotspot/rectangle.js.map +1 -1
- package/lib/index.js +187 -256
- package/lib/index.js.map +1 -1
- package/lib/session-updater.js +12 -18
- package/lib/session-updater.js.map +1 -1
- package/package.json +17 -31
- package/src/__tests__/container.test.jsx +27 -175
- package/src/__tests__/index.test.js +70 -30
- package/src/hotspot/__tests__/circle.test.jsx +464 -0
- package/src/hotspot/__tests__/container.test.jsx +546 -0
- package/src/hotspot/__tests__/image-konva-tooltip.test.jsx +510 -0
- package/src/hotspot/__tests__/polygon.test.jsx +502 -0
- package/src/hotspot/__tests__/rectangle.test.jsx +418 -0
- package/src/hotspot/circle.jsx +1 -13
- package/src/hotspot/container.jsx +35 -50
- package/src/hotspot/icons.js +6 -5
- package/src/hotspot/index.jsx +16 -28
- package/src/hotspot/polygon.jsx +3 -13
- package/src/hotspot/rectangle.jsx +4 -15
- package/src/index.js +21 -12
- package/configure/node_modules/@pie-lib/config-ui/CHANGELOG.json +0 -32
- package/configure/node_modules/@pie-lib/config-ui/CHANGELOG.md +0 -2198
- package/configure/node_modules/@pie-lib/config-ui/NEXT.CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/config-ui/esm/index.js +0 -3808
- package/configure/node_modules/@pie-lib/config-ui/esm/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/alert-dialog.js +0 -75
- package/configure/node_modules/@pie-lib/config-ui/lib/alert-dialog.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/checkbox.js +0 -99
- package/configure/node_modules/@pie-lib/config-ui/lib/checkbox.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js +0 -164
- package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js +0 -445
- package/configure/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/choice-utils.js +0 -54
- package/configure/node_modules/@pie-lib/config-ui/lib/choice-utils.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js +0 -195
- package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js +0 -75
- package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js +0 -189
- package/configure/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/form-section.js +0 -46
- package/configure/node_modules/@pie-lib/config-ui/lib/form-section.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/help.js +0 -147
- package/configure/node_modules/@pie-lib/config-ui/lib/help.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/index.js +0 -216
- package/configure/node_modules/@pie-lib/config-ui/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/input.js +0 -139
- package/configure/node_modules/@pie-lib/config-ui/lib/input.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/inputs.js +0 -139
- package/configure/node_modules/@pie-lib/config-ui/lib/inputs.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/langs.js +0 -179
- package/configure/node_modules/@pie-lib/config-ui/lib/langs.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js +0 -143
- package/configure/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/layout/index.js +0 -24
- package/configure/node_modules/@pie-lib/config-ui/lib/layout/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js +0 -191
- package/configure/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js +0 -86
- package/configure/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/mui-box/index.js +0 -79
- package/configure/node_modules/@pie-lib/config-ui/lib/mui-box/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js +0 -458
- package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field.js +0 -267
- package/configure/node_modules/@pie-lib/config-ui/lib/number-text-field.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/radio-with-label.js +0 -49
- package/configure/node_modules/@pie-lib/config-ui/lib/radio-with-label.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/settings/display-size.js +0 -77
- package/configure/node_modules/@pie-lib/config-ui/lib/settings/display-size.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/settings/index.js +0 -143
- package/configure/node_modules/@pie-lib/config-ui/lib/settings/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/settings/panel.js +0 -463
- package/configure/node_modules/@pie-lib/config-ui/lib/settings/panel.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js +0 -53
- package/configure/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/settings/toggle.js +0 -74
- package/configure/node_modules/@pie-lib/config-ui/lib/settings/toggle.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/tabs/index.js +0 -110
- package/configure/node_modules/@pie-lib/config-ui/lib/tabs/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/tags-input/index.js +0 -198
- package/configure/node_modules/@pie-lib/config-ui/lib/tags-input/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/two-choice.js +0 -180
- package/configure/node_modules/@pie-lib/config-ui/lib/two-choice.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js +0 -84
- package/configure/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js.map +0 -1
- package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/LICENSE +0 -20
- package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/README.md +0 -481
- package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/package.json +0 -59
- package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/src/browser.js +0 -269
- package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/src/common.js +0 -274
- package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/src/index.js +0 -10
- package/configure/node_modules/@pie-lib/config-ui/node_modules/debug/src/node.js +0 -263
- package/configure/node_modules/@pie-lib/config-ui/node_modules/ms/index.js +0 -162
- package/configure/node_modules/@pie-lib/config-ui/node_modules/ms/license.md +0 -21
- package/configure/node_modules/@pie-lib/config-ui/node_modules/ms/package.json +0 -37
- package/configure/node_modules/@pie-lib/config-ui/node_modules/ms/readme.md +0 -60
- package/configure/node_modules/@pie-lib/config-ui/package.json +0 -40
- package/configure/node_modules/@pie-lib/config-ui/src/__tests__/__snapshots__/langs.test.jsx.snap +0 -32
- package/configure/node_modules/@pie-lib/config-ui/src/__tests__/__snapshots__/settings-panel.test.js.snap +0 -115
- package/configure/node_modules/@pie-lib/config-ui/src/__tests__/__snapshots__/two-choice.test.js.snap +0 -171
- package/configure/node_modules/@pie-lib/config-ui/src/__tests__/choice-utils.test.js +0 -12
- package/configure/node_modules/@pie-lib/config-ui/src/__tests__/langs.test.jsx +0 -37
- package/configure/node_modules/@pie-lib/config-ui/src/__tests__/number-text-field.test.jsx +0 -148
- package/configure/node_modules/@pie-lib/config-ui/src/__tests__/settings-panel.test.js +0 -204
- package/configure/node_modules/@pie-lib/config-ui/src/__tests__/two-choice.test.js +0 -24
- package/configure/node_modules/@pie-lib/config-ui/src/alert-dialog.jsx +0 -56
- package/configure/node_modules/@pie-lib/config-ui/src/checkbox.jsx +0 -73
- package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/__tests__/__snapshots__/feedback-menu.test.jsx.snap +0 -51
- package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/__tests__/__snapshots__/index.test.jsx.snap +0 -519
- package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/__tests__/feedback-menu.test.jsx +0 -10
- package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/__tests__/index.test.jsx +0 -92
- package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/feedback-menu.jsx +0 -90
- package/configure/node_modules/@pie-lib/config-ui/src/choice-configuration/index.jsx +0 -365
- package/configure/node_modules/@pie-lib/config-ui/src/choice-utils.js +0 -30
- package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/__tests__/__snapshots__/feedback-config.test.jsx.snap +0 -27
- package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/__tests__/__snapshots__/feedback-selector.test.jsx.snap +0 -38
- package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/__tests__/feedback-config.test.jsx +0 -71
- package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/__tests__/feedback-selector.test.jsx +0 -60
- package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/feedback-selector.jsx +0 -122
- package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/group.jsx +0 -52
- package/configure/node_modules/@pie-lib/config-ui/src/feedback-config/index.jsx +0 -112
- package/configure/node_modules/@pie-lib/config-ui/src/form-section.jsx +0 -23
- package/configure/node_modules/@pie-lib/config-ui/src/help.jsx +0 -87
- package/configure/node_modules/@pie-lib/config-ui/src/index.js +0 -55
- package/configure/node_modules/@pie-lib/config-ui/src/input.jsx +0 -72
- package/configure/node_modules/@pie-lib/config-ui/src/inputs.jsx +0 -98
- package/configure/node_modules/@pie-lib/config-ui/src/langs.jsx +0 -111
- package/configure/node_modules/@pie-lib/config-ui/src/layout/__tests__/__snapshots__/config.layout.test.jsx.snap +0 -59
- package/configure/node_modules/@pie-lib/config-ui/src/layout/__tests__/config.layout.test.jsx +0 -42
- package/configure/node_modules/@pie-lib/config-ui/src/layout/__tests__/layout-content.test.jsx +0 -3
- package/configure/node_modules/@pie-lib/config-ui/src/layout/config-layout.jsx +0 -75
- package/configure/node_modules/@pie-lib/config-ui/src/layout/index.js +0 -4
- package/configure/node_modules/@pie-lib/config-ui/src/layout/layout-contents.jsx +0 -118
- package/configure/node_modules/@pie-lib/config-ui/src/layout/settings-box.jsx +0 -35
- package/configure/node_modules/@pie-lib/config-ui/src/mui-box/index.jsx +0 -64
- package/configure/node_modules/@pie-lib/config-ui/src/number-text-field-custom.jsx +0 -337
- package/configure/node_modules/@pie-lib/config-ui/src/number-text-field.jsx +0 -202
- package/configure/node_modules/@pie-lib/config-ui/src/radio-with-label.jsx +0 -22
- package/configure/node_modules/@pie-lib/config-ui/src/settings/display-size.jsx +0 -52
- package/configure/node_modules/@pie-lib/config-ui/src/settings/index.js +0 -83
- package/configure/node_modules/@pie-lib/config-ui/src/settings/panel.jsx +0 -328
- package/configure/node_modules/@pie-lib/config-ui/src/settings/settings-radio-label.jsx +0 -24
- package/configure/node_modules/@pie-lib/config-ui/src/settings/toggle.jsx +0 -49
- package/configure/node_modules/@pie-lib/config-ui/src/tabs/index.jsx +0 -47
- package/configure/node_modules/@pie-lib/config-ui/src/tags-input/__tests__/__snapshots__/index.test.jsx.snap +0 -170
- package/configure/node_modules/@pie-lib/config-ui/src/tags-input/__tests__/index.test.jsx +0 -62
- package/configure/node_modules/@pie-lib/config-ui/src/tags-input/index.jsx +0 -119
- package/configure/node_modules/@pie-lib/config-ui/src/two-choice.jsx +0 -94
- package/configure/node_modules/@pie-lib/config-ui/src/with-stateful-model.jsx +0 -36
- package/configure/node_modules/@pie-lib/drag/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/drag/CHANGELOG.md +0 -709
- package/configure/node_modules/@pie-lib/drag/NEXT.CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/drag/esm/index.js +0 -525
- package/configure/node_modules/@pie-lib/drag/esm/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/drag/lib/choice.js +0 -129
- package/configure/node_modules/@pie-lib/drag/lib/choice.js.map +0 -1
- package/configure/node_modules/@pie-lib/drag/lib/drag-in-the-blank-dp.js +0 -35
- package/configure/node_modules/@pie-lib/drag/lib/drag-in-the-blank-dp.js.map +0 -1
- package/configure/node_modules/@pie-lib/drag/lib/drag-type.js +0 -15
- package/configure/node_modules/@pie-lib/drag/lib/drag-type.js.map +0 -1
- package/configure/node_modules/@pie-lib/drag/lib/droppable-placeholder.js +0 -82
- package/configure/node_modules/@pie-lib/drag/lib/droppable-placeholder.js.map +0 -1
- package/configure/node_modules/@pie-lib/drag/lib/ica-dp.js +0 -37
- package/configure/node_modules/@pie-lib/drag/lib/ica-dp.js.map +0 -1
- package/configure/node_modules/@pie-lib/drag/lib/index.js +0 -89
- package/configure/node_modules/@pie-lib/drag/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/drag/lib/match-list-dp.js +0 -37
- package/configure/node_modules/@pie-lib/drag/lib/match-list-dp.js.map +0 -1
- package/configure/node_modules/@pie-lib/drag/lib/placeholder.js +0 -153
- package/configure/node_modules/@pie-lib/drag/lib/placeholder.js.map +0 -1
- package/configure/node_modules/@pie-lib/drag/lib/preview-component.js +0 -194
- package/configure/node_modules/@pie-lib/drag/lib/preview-component.js.map +0 -1
- package/configure/node_modules/@pie-lib/drag/lib/swap.js +0 -25
- package/configure/node_modules/@pie-lib/drag/lib/swap.js.map +0 -1
- package/configure/node_modules/@pie-lib/drag/lib/uid-context.js +0 -40
- package/configure/node_modules/@pie-lib/drag/lib/uid-context.js.map +0 -1
- package/configure/node_modules/@pie-lib/drag/lib/with-drag-context.js +0 -59
- package/configure/node_modules/@pie-lib/drag/lib/with-drag-context.js.map +0 -1
- package/configure/node_modules/@pie-lib/drag/package.json +0 -34
- package/configure/node_modules/@pie-lib/drag/src/__tests__/__snapshots__/placeholder.test.jsx.snap +0 -68
- package/configure/node_modules/@pie-lib/drag/src/__tests__/placeholder.test.jsx +0 -48
- package/configure/node_modules/@pie-lib/drag/src/__tests__/uid-context.test.jsx +0 -21
- package/configure/node_modules/@pie-lib/drag/src/choice.jsx +0 -76
- package/configure/node_modules/@pie-lib/drag/src/drag-in-the-blank-dp.jsx +0 -19
- package/configure/node_modules/@pie-lib/drag/src/drag-type.js +0 -7
- package/configure/node_modules/@pie-lib/drag/src/droppable-placeholder.jsx +0 -38
- package/configure/node_modules/@pie-lib/drag/src/ica-dp.jsx +0 -23
- package/configure/node_modules/@pie-lib/drag/src/index.js +0 -23
- package/configure/node_modules/@pie-lib/drag/src/match-list-dp.jsx +0 -23
- package/configure/node_modules/@pie-lib/drag/src/placeholder.jsx +0 -145
- package/configure/node_modules/@pie-lib/drag/src/preview-component.jsx +0 -153
- package/configure/node_modules/@pie-lib/drag/src/swap.js +0 -14
- package/configure/node_modules/@pie-lib/drag/src/uid-context.js +0 -13
- package/configure/node_modules/@pie-lib/drag/src/with-drag-context.js +0 -32
- package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.json +0 -32
- package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +0 -2224
- package/configure/node_modules/@pie-lib/editable-html/NEXT.CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/editable-html/esm/index.js +0 -9998
- package/configure/node_modules/@pie-lib/editable-html/esm/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/block-tags.js +0 -25
- package/configure/node_modules/@pie-lib/editable-html/lib/block-tags.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/constants.js +0 -16
- package/configure/node_modules/@pie-lib/editable-html/lib/constants.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/editor.js +0 -1356
- package/configure/node_modules/@pie-lib/editable-html/lib/editor.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/index.js +0 -269
- package/configure/node_modules/@pie-lib/editable-html/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js +0 -16
- package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popper.js +0 -73
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popper.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js +0 -305
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js +0 -381
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/css/icons/index.js +0 -37
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/css/icons/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/css/index.js +0 -397
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/css/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/customPlugin/index.js +0 -114
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/customPlugin/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/html/icons/index.js +0 -38
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/html/icons/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/html/index.js +0 -80
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/html/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/alt-dialog.js +0 -129
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/alt-dialog.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js +0 -419
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js +0 -177
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js +0 -263
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js +0 -161
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js +0 -402
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js +0 -334
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js +0 -454
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js +0 -387
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js +0 -709
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js +0 -101
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js +0 -93
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/rendering/index.js +0 -46
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/rendering/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js +0 -289
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js +0 -97
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js +0 -57
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js +0 -95
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js +0 -341
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js +0 -75
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/math-templated/index.js +0 -130
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/math-templated/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js +0 -125
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/CustomTablePlugin.js +0 -133
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/CustomTablePlugin.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js +0 -69
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js +0 -483
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js +0 -187
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/textAlign/icons/index.js +0 -226
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/textAlign/icons/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/textAlign/index.js +0 -34
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/textAlign/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js +0 -229
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js +0 -53
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js +0 -286
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js +0 -34
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js +0 -194
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js +0 -376
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js +0 -62
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js +0 -677
- package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/shared/alert-dialog.js +0 -75
- package/configure/node_modules/@pie-lib/editable-html/lib/theme.js +0 -9
- package/configure/node_modules/@pie-lib/editable-html/lib/theme.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/LICENSE +0 -20
- package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/README.md +0 -481
- package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/package.json +0 -59
- package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/src/browser.js +0 -269
- package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/src/common.js +0 -274
- package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/src/index.js +0 -10
- package/configure/node_modules/@pie-lib/editable-html/node_modules/debug/src/node.js +0 -263
- package/configure/node_modules/@pie-lib/editable-html/node_modules/ms/index.js +0 -162
- package/configure/node_modules/@pie-lib/editable-html/node_modules/ms/license.md +0 -21
- package/configure/node_modules/@pie-lib/editable-html/node_modules/ms/package.json +0 -37
- package/configure/node_modules/@pie-lib/editable-html/node_modules/ms/readme.md +0 -60
- package/configure/node_modules/@pie-lib/editable-html/package.json +0 -60
- package/configure/node_modules/@pie-lib/editable-html/src/__tests__/editor.test.jsx +0 -363
- package/configure/node_modules/@pie-lib/editable-html/src/__tests__/serialization.test.js +0 -291
- package/configure/node_modules/@pie-lib/editable-html/src/__tests__/utils.js +0 -36
- package/configure/node_modules/@pie-lib/editable-html/src/block-tags.js +0 -17
- package/configure/node_modules/@pie-lib/editable-html/src/constants.js +0 -7
- package/configure/node_modules/@pie-lib/editable-html/src/editor.jsx +0 -1197
- package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +0 -162
- package/configure/node_modules/@pie-lib/editable-html/src/parse-html.js +0 -8
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/README.md +0 -27
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/custom-popper.js +0 -48
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/index.jsx +0 -284
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/utils.js +0 -447
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/css/icons/index.jsx +0 -17
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/css/index.jsx +0 -346
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/customPlugin/index.jsx +0 -85
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/html/icons/index.jsx +0 -19
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/html/index.jsx +0 -72
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/__snapshots__/component.test.jsx.snap +0 -51
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/__snapshots__/image-toolbar-logic.test.jsx.snap +0 -27
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/__snapshots__/image-toolbar.test.jsx.snap +0 -44
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/component.test.jsx +0 -41
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/image-toolbar-logic.test.jsx +0 -42
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/image-toolbar.test.jsx +0 -11
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/index.test.js +0 -95
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/insert-image-handler.test.js +0 -113
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/__tests__/mock-change.js +0 -15
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/alt-dialog.jsx +0 -82
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/component.jsx +0 -343
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +0 -100
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +0 -227
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/insert-image-handler.js +0 -117
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/index.jsx +0 -360
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/__tests__/index.test.js +0 -54
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +0 -305
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/__tests__/__snapshots__/index.test.jsx.snap +0 -48
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/__tests__/index.test.jsx +0 -245
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +0 -379
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/__tests__/index.test.js +0 -75
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +0 -325
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-dialog.js +0 -624
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-toolbar.jsx +0 -56
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-wrapper.jsx +0 -43
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/rendering/index.js +0 -31
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/choice.jsx +0 -215
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/index.jsx +0 -76
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/explicit-constructed-response/index.jsx +0 -48
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/icons/index.jsx +0 -71
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx +0 -299
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/inline-dropdown/index.jsx +0 -70
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/math-templated/index.jsx +0 -104
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/utils.jsx +0 -90
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/CustomTablePlugin.js +0 -113
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/__tests__/__snapshots__/table-toolbar.test.jsx.snap +0 -44
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/__tests__/index.test.jsx +0 -401
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/__tests__/table-toolbar.test.jsx +0 -42
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/icons/index.jsx +0 -53
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/index.jsx +0 -427
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/table-toolbar.jsx +0 -136
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/textAlign/icons/index.jsx +0 -139
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/textAlign/index.jsx +0 -23
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/__snapshots__/default-toolbar.test.jsx.snap +0 -923
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/__snapshots__/editor-and-toolbar.test.jsx.snap +0 -20
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/__snapshots__/toolbar-buttons.test.jsx.snap +0 -36
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/__snapshots__/toolbar.test.jsx.snap +0 -46
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/default-toolbar.test.jsx +0 -94
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/editor-and-toolbar.test.jsx +0 -37
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/toolbar-buttons.test.jsx +0 -51
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/__tests__/toolbar.test.jsx +0 -106
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/default-toolbar.jsx +0 -206
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/done-button.jsx +0 -38
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/editor-and-toolbar.jsx +0 -257
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/index.jsx +0 -23
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar-buttons.jsx +0 -138
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +0 -338
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/utils.js +0 -31
- package/configure/node_modules/@pie-lib/editable-html/src/serialization.jsx +0 -621
- package/configure/node_modules/@pie-lib/editable-html/src/theme.js +0 -1
- package/configure/node_modules/@pie-lib/icons/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/icons/CHANGELOG.md +0 -539
- package/configure/node_modules/@pie-lib/icons/NEXT.CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/icons/esm/index.js +0 -1153
- package/configure/node_modules/@pie-lib/icons/esm/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/icons/lib/correct-icon.js +0 -89
- package/configure/node_modules/@pie-lib/icons/lib/correct-icon.js.map +0 -1
- package/configure/node_modules/@pie-lib/icons/lib/correct-response-icon.js +0 -153
- package/configure/node_modules/@pie-lib/icons/lib/correct-response-icon.js.map +0 -1
- package/configure/node_modules/@pie-lib/icons/lib/icon-base.js +0 -206
- package/configure/node_modules/@pie-lib/icons/lib/icon-base.js.map +0 -1
- package/configure/node_modules/@pie-lib/icons/lib/icon-root.js +0 -130
- package/configure/node_modules/@pie-lib/icons/lib/icon-root.js.map +0 -1
- package/configure/node_modules/@pie-lib/icons/lib/incorrect-icon.js +0 -92
- package/configure/node_modules/@pie-lib/icons/lib/incorrect-icon.js.map +0 -1
- package/configure/node_modules/@pie-lib/icons/lib/index.js +0 -72
- package/configure/node_modules/@pie-lib/icons/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/icons/lib/instructions-icon.js +0 -229
- package/configure/node_modules/@pie-lib/icons/lib/instructions-icon.js.map +0 -1
- package/configure/node_modules/@pie-lib/icons/lib/learn-more-icon.js +0 -145
- package/configure/node_modules/@pie-lib/icons/lib/learn-more-icon.js.map +0 -1
- package/configure/node_modules/@pie-lib/icons/lib/nothing-submitted-icon.js +0 -183
- package/configure/node_modules/@pie-lib/icons/lib/nothing-submitted-icon.js.map +0 -1
- package/configure/node_modules/@pie-lib/icons/lib/partially-correct-icon.js +0 -82
- package/configure/node_modules/@pie-lib/icons/lib/partially-correct-icon.js.map +0 -1
- package/configure/node_modules/@pie-lib/icons/lib/show-rationale-icon.js +0 -206
- package/configure/node_modules/@pie-lib/icons/lib/show-rationale-icon.js.map +0 -1
- package/configure/node_modules/@pie-lib/icons/lib/sized.js +0 -41
- package/configure/node_modules/@pie-lib/icons/lib/sized.js.map +0 -1
- package/configure/node_modules/@pie-lib/icons/package.json +0 -35
- package/configure/node_modules/@pie-lib/icons/src/__tests__/index.test.js +0 -3
- package/configure/node_modules/@pie-lib/icons/src/correct-icon.jsx +0 -64
- package/configure/node_modules/@pie-lib/icons/src/correct-response-icon.jsx +0 -121
- package/configure/node_modules/@pie-lib/icons/src/icon-base.jsx +0 -158
- package/configure/node_modules/@pie-lib/icons/src/icon-root.jsx +0 -76
- package/configure/node_modules/@pie-lib/icons/src/incorrect-icon.jsx +0 -61
- package/configure/node_modules/@pie-lib/icons/src/index.js +0 -19
- package/configure/node_modules/@pie-lib/icons/src/instructions-icon.jsx +0 -189
- package/configure/node_modules/@pie-lib/icons/src/learn-more-icon.jsx +0 -107
- package/configure/node_modules/@pie-lib/icons/src/nothing-submitted-icon.jsx +0 -130
- package/configure/node_modules/@pie-lib/icons/src/partially-correct-icon.jsx +0 -49
- package/configure/node_modules/@pie-lib/icons/src/show-rationale-icon.jsx +0 -152
- package/configure/node_modules/@pie-lib/icons/src/sized.jsx +0 -25
- package/configure/node_modules/@pie-lib/math-input/CHANGELOG.json +0 -17
- package/configure/node_modules/@pie-lib/math-input/CHANGELOG.md +0 -1077
- package/configure/node_modules/@pie-lib/math-input/NEXT.CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/math-input/esm/index.js +0 -2134
- package/configure/node_modules/@pie-lib/math-input/esm/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js +0 -124
- package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/index.js +0 -76
- package/configure/node_modules/@pie-lib/math-input/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js +0 -512
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js +0 -34
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js +0 -41
- package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js +0 -17
- package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js +0 -49
- package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js +0 -43
- package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js +0 -53
- package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js +0 -17
- package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js +0 -36
- package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js +0 -34
- package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js +0 -169
- package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js +0 -295
- package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js +0 -54
- package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js +0 -32
- package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js +0 -74
- package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js +0 -25
- package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js +0 -18
- package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js +0 -47
- package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js +0 -53
- package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js +0 -120
- package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js +0 -29
- package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/math-input.js +0 -192
- package/configure/node_modules/@pie-lib/math-input/lib/math-input.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/mq/common-mq-styles.js +0 -110
- package/configure/node_modules/@pie-lib/math-input/lib/mq/common-mq-styles.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js +0 -32
- package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js +0 -247
- package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js +0 -356
- package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/shared/constants.js +0 -16
- package/configure/node_modules/@pie-lib/math-input/lib/updateSpans.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/updateSpans.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/node_modules/debug/LICENSE +0 -20
- package/configure/node_modules/@pie-lib/math-input/node_modules/debug/README.md +0 -481
- package/configure/node_modules/@pie-lib/math-input/node_modules/debug/package.json +0 -59
- package/configure/node_modules/@pie-lib/math-input/node_modules/debug/src/browser.js +0 -269
- package/configure/node_modules/@pie-lib/math-input/node_modules/debug/src/common.js +0 -274
- package/configure/node_modules/@pie-lib/math-input/node_modules/debug/src/index.js +0 -10
- package/configure/node_modules/@pie-lib/math-input/node_modules/debug/src/node.js +0 -263
- package/configure/node_modules/@pie-lib/math-input/node_modules/ms/index.js +0 -162
- package/configure/node_modules/@pie-lib/math-input/node_modules/ms/license.md +0 -21
- package/configure/node_modules/@pie-lib/math-input/node_modules/ms/package.json +0 -37
- package/configure/node_modules/@pie-lib/math-input/node_modules/ms/readme.md +0 -60
- package/configure/node_modules/@pie-lib/math-input/package.json +0 -35
- package/configure/node_modules/@pie-lib/math-input/src/__tests__/__snapshots__/math-input-test.jsx.snap +0 -152
- package/configure/node_modules/@pie-lib/math-input/src/__tests__/math-input-test.jsx +0 -85
- package/configure/node_modules/@pie-lib/math-input/src/horizontal-keypad.jsx +0 -69
- package/configure/node_modules/@pie-lib/math-input/src/index.jsx +0 -18
- package/configure/node_modules/@pie-lib/math-input/src/keypad/__tests__/__snapshots__/index.test.jsx.snap +0 -193
- package/configure/node_modules/@pie-lib/math-input/src/keypad/__tests__/index.test.jsx +0 -24
- package/configure/node_modules/@pie-lib/math-input/src/keypad/__tests__/keys-layout.test.js +0 -15
- package/configure/node_modules/@pie-lib/math-input/src/keypad/index.jsx +0 -450
- package/configure/node_modules/@pie-lib/math-input/src/keypad/keys-layout.js +0 -17
- package/configure/node_modules/@pie-lib/math-input/src/keys/__tests__/utils.test.js +0 -57
- package/configure/node_modules/@pie-lib/math-input/src/keys/basic-operators.js +0 -32
- package/configure/node_modules/@pie-lib/math-input/src/keys/chars.js +0 -5
- package/configure/node_modules/@pie-lib/math-input/src/keys/comparison.js +0 -28
- package/configure/node_modules/@pie-lib/math-input/src/keys/constants.js +0 -35
- package/configure/node_modules/@pie-lib/math-input/src/keys/digits.js +0 -40
- package/configure/node_modules/@pie-lib/math-input/src/keys/edit.js +0 -3
- package/configure/node_modules/@pie-lib/math-input/src/keys/exponent.js +0 -28
- package/configure/node_modules/@pie-lib/math-input/src/keys/fractions.js +0 -26
- package/configure/node_modules/@pie-lib/math-input/src/keys/geometry.js +0 -144
- package/configure/node_modules/@pie-lib/math-input/src/keys/grades.js +0 -367
- package/configure/node_modules/@pie-lib/math-input/src/keys/index.js +0 -21
- package/configure/node_modules/@pie-lib/math-input/src/keys/log.js +0 -22
- package/configure/node_modules/@pie-lib/math-input/src/keys/logic.js +0 -15
- package/configure/node_modules/@pie-lib/math-input/src/keys/matrices.js +0 -15
- package/configure/node_modules/@pie-lib/math-input/src/keys/misc.js +0 -65
- package/configure/node_modules/@pie-lib/math-input/src/keys/navigation.js +0 -8
- package/configure/node_modules/@pie-lib/math-input/src/keys/operators.js +0 -10
- package/configure/node_modules/@pie-lib/math-input/src/keys/statistics.js +0 -38
- package/configure/node_modules/@pie-lib/math-input/src/keys/sub-sup.js +0 -15
- package/configure/node_modules/@pie-lib/math-input/src/keys/trigonometry.js +0 -15
- package/configure/node_modules/@pie-lib/math-input/src/keys/utils.js +0 -71
- package/configure/node_modules/@pie-lib/math-input/src/keys/vars.js +0 -19
- package/configure/node_modules/@pie-lib/math-input/src/math-input.jsx +0 -128
- package/configure/node_modules/@pie-lib/math-input/src/mq/__tests__/__snapshots__/input.test.jsx.snap +0 -9
- package/configure/node_modules/@pie-lib/math-input/src/mq/__tests__/input.test.jsx +0 -92
- package/configure/node_modules/@pie-lib/math-input/src/mq/__tests__/static.test.jsx +0 -57
- package/configure/node_modules/@pie-lib/math-input/src/mq/common-mq-styles.js +0 -105
- package/configure/node_modules/@pie-lib/math-input/src/mq/custom-elements.js +0 -11
- package/configure/node_modules/@pie-lib/math-input/src/mq/index.js +0 -5
- package/configure/node_modules/@pie-lib/math-input/src/mq/input.jsx +0 -176
- package/configure/node_modules/@pie-lib/math-input/src/mq/static.jsx +0 -285
- package/configure/node_modules/@pie-lib/math-input/src/updateSpans.js +0 -15
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +0 -775
- package/configure/node_modules/@pie-lib/math-rendering/NEXT.CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/esm/index.js +0 -690
- package/configure/node_modules/@pie-lib/math-rendering/esm/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +0 -38
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mml-to-latex.js +0 -15
- package/configure/node_modules/@pie-lib/math-rendering/lib/mml-to-latex.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +0 -296
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +0 -23
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +0 -109
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js +0 -95
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js +0 -438
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/LICENSE +0 -20
- package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/README.md +0 -481
- package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/package.json +0 -59
- package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/src/browser.js +0 -269
- package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/src/common.js +0 -274
- package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/src/index.js +0 -10
- package/configure/node_modules/@pie-lib/math-rendering/node_modules/debug/src/node.js +0 -263
- package/configure/node_modules/@pie-lib/math-rendering/node_modules/ms/index.js +0 -162
- package/configure/node_modules/@pie-lib/math-rendering/node_modules/ms/license.md +0 -21
- package/configure/node_modules/@pie-lib/math-rendering/node_modules/ms/package.json +0 -37
- package/configure/node_modules/@pie-lib/math-rendering/node_modules/ms/readme.md +0 -60
- package/configure/node_modules/@pie-lib/math-rendering/package.json +0 -28
- package/configure/node_modules/@pie-lib/math-rendering/src/__tests__/mml-to-latex.test.js +0 -14
- package/configure/node_modules/@pie-lib/math-rendering/src/__tests__/normalization.test.js +0 -50
- package/configure/node_modules/@pie-lib/math-rendering/src/__tests__/render-math.test.js +0 -155
- package/configure/node_modules/@pie-lib/math-rendering/src/index.js +0 -5
- package/configure/node_modules/@pie-lib/math-rendering/src/mml-to-latex.js +0 -2
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/__tests__/__snapshots__/chtml.test.js.snap +0 -9
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/__tests__/chtml.test.js +0 -104
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +0 -220
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/index.js +0 -13
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +0 -24
- package/configure/node_modules/@pie-lib/math-rendering/src/normalization.js +0 -69
- package/configure/node_modules/@pie-lib/math-rendering/src/render-math.js +0 -387
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.json +0 -17
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.md +0 -940
- package/configure/node_modules/@pie-lib/math-toolbar/NEXT.CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/esm/index.js +0 -1410
- package/configure/node_modules/@pie-lib/math-toolbar/esm/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js +0 -68
- package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js +0 -575
- package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js +0 -287
- package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js +0 -240
- package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/lib/utils.js +0 -21
- package/configure/node_modules/@pie-lib/math-toolbar/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/LICENSE +0 -20
- package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/README.md +0 -481
- package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/package.json +0 -59
- package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/src/browser.js +0 -269
- package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/src/common.js +0 -274
- package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/src/index.js +0 -10
- package/configure/node_modules/@pie-lib/math-toolbar/node_modules/debug/src/node.js +0 -263
- package/configure/node_modules/@pie-lib/math-toolbar/node_modules/ms/index.js +0 -162
- package/configure/node_modules/@pie-lib/math-toolbar/node_modules/ms/license.md +0 -21
- package/configure/node_modules/@pie-lib/math-toolbar/node_modules/ms/package.json +0 -37
- package/configure/node_modules/@pie-lib/math-toolbar/node_modules/ms/readme.md +0 -60
- package/configure/node_modules/@pie-lib/math-toolbar/package.json +0 -46
- package/configure/node_modules/@pie-lib/math-toolbar/src/__tests__/__snapshots__/editor-and-pad.test.js.snap +0 -31
- package/configure/node_modules/@pie-lib/math-toolbar/src/__tests__/__snapshots__/index.test.js.snap +0 -30
- package/configure/node_modules/@pie-lib/math-toolbar/src/__tests__/__snapshots__/math-preview.test.js.snap +0 -23
- package/configure/node_modules/@pie-lib/math-toolbar/src/__tests__/editor-and-pad.test.js +0 -25
- package/configure/node_modules/@pie-lib/math-toolbar/src/__tests__/index.test.js +0 -28
- package/configure/node_modules/@pie-lib/math-toolbar/src/__tests__/math-preview.test.js +0 -31
- package/configure/node_modules/@pie-lib/math-toolbar/src/done-button.jsx +0 -47
- package/configure/node_modules/@pie-lib/math-toolbar/src/editor-and-pad.jsx +0 -499
- package/configure/node_modules/@pie-lib/math-toolbar/src/index.jsx +0 -224
- package/configure/node_modules/@pie-lib/math-toolbar/src/math-preview.jsx +0 -179
- package/configure/node_modules/@pie-lib/math-toolbar/src/utils.js +0 -11
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +0 -1026
- package/configure/node_modules/@pie-lib/render-ui/NEXT.CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/render-ui/esm/index.js +0 -1616
- package/configure/node_modules/@pie-lib/render-ui/esm/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/append-css-rules.js +0 -88
- package/configure/node_modules/@pie-lib/render-ui/lib/append-css-rules.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/assets/enableAudioAutoplayImage.js +0 -9
- package/configure/node_modules/@pie-lib/render-ui/lib/assets/enableAudioAutoplayImage.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +0 -135
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js +0 -344
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js +0 -150
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/has-media.js +0 -27
- package/configure/node_modules/@pie-lib/render-ui/lib/has-media.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +0 -28
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js +0 -74
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js +0 -136
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js +0 -60
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js +0 -145
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +0 -321
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js +0 -28
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js +0 -28
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js +0 -151
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/ui-layout.js +0 -122
- package/configure/node_modules/@pie-lib/render-ui/lib/ui-layout.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +0 -181
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/LICENSE +0 -20
- package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/README.md +0 -481
- package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/package.json +0 -59
- package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/src/browser.js +0 -269
- package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/src/common.js +0 -274
- package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/src/index.js +0 -10
- package/configure/node_modules/@pie-lib/render-ui/node_modules/debug/src/node.js +0 -263
- package/configure/node_modules/@pie-lib/render-ui/node_modules/ms/index.js +0 -162
- package/configure/node_modules/@pie-lib/render-ui/node_modules/ms/license.md +0 -21
- package/configure/node_modules/@pie-lib/render-ui/node_modules/ms/package.json +0 -37
- package/configure/node_modules/@pie-lib/render-ui/node_modules/ms/readme.md +0 -60
- package/configure/node_modules/@pie-lib/render-ui/package.json +0 -40
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/html-and-math.test.js.snap +0 -11
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/preview-prompt.test.jsx.snap +0 -37
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/purpose.test.jsx.snap +0 -42
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/readable.test.jsx.snap +0 -64
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/response-indicators.test.jsx.snap +0 -27
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/color.test.js +0 -12
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/has-media.test.js +0 -20
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/has-text.test.js +0 -21
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/html-and-math.test.js +0 -24
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/preview-prompt.test.jsx +0 -56
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/purpose.test.jsx +0 -47
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/readable.test.jsx +0 -64
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/response-indicators.test.jsx +0 -16
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/ui-layout.test.jsx +0 -34
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/withUndoReset.test.jsx +0 -254
- package/configure/node_modules/@pie-lib/render-ui/src/append-css-rules.js +0 -51
- package/configure/node_modules/@pie-lib/render-ui/src/assets/enableAudioAutoplayImage.js +0 -1
- package/configure/node_modules/@pie-lib/render-ui/src/collapsible/__tests__/__snapshots__/index.test.jsx.snap +0 -18
- package/configure/node_modules/@pie-lib/render-ui/src/collapsible/__tests__/index.test.jsx +0 -13
- package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +0 -64
- package/configure/node_modules/@pie-lib/render-ui/src/color.js +0 -121
- package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +0 -99
- package/configure/node_modules/@pie-lib/render-ui/src/has-media.js +0 -16
- package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +0 -18
- package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +0 -21
- package/configure/node_modules/@pie-lib/render-ui/src/index.js +0 -35
- package/configure/node_modules/@pie-lib/render-ui/src/input-container.jsx +0 -41
- package/configure/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +0 -95
- package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +0 -254
- package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +0 -17
- package/configure/node_modules/@pie-lib/render-ui/src/readable.jsx +0 -19
- package/configure/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +0 -89
- package/configure/node_modules/@pie-lib/render-ui/src/ui-layout.jsx +0 -66
- package/configure/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +0 -116
- package/configure/node_modules/@pie-lib/test-utils/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/test-utils/CHANGELOG.md +0 -410
- package/configure/node_modules/@pie-lib/test-utils/NEXT.CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-lib/test-utils/esm/index.js +0 -39
- package/configure/node_modules/@pie-lib/test-utils/esm/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/test-utils/lib/index.js +0 -40
- package/configure/node_modules/@pie-lib/test-utils/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/test-utils/package.json +0 -25
- package/configure/node_modules/@pie-lib/test-utils/src/__tests__/index.test.js +0 -45
- package/configure/node_modules/@pie-lib/test-utils/src/index.js +0 -18
- package/configure/node_modules/debug/CHANGELOG.md +0 -395
- package/configure/node_modules/debug/LICENSE +0 -19
- package/configure/node_modules/debug/README.md +0 -437
- package/configure/node_modules/debug/node.js +0 -1
- package/configure/node_modules/debug/package.json +0 -51
- package/configure/node_modules/debug/src/browser.js +0 -180
- package/configure/node_modules/debug/src/common.js +0 -249
- package/configure/node_modules/debug/src/index.js +0 -12
- package/configure/node_modules/debug/src/node.js +0 -177
- package/configure/node_modules/slate-dev-environment/Readme.md +0 -1
- package/configure/node_modules/slate-dev-environment/dist/slate-dev-environment.js +0 -287
- package/configure/node_modules/slate-dev-environment/dist/slate-dev-environment.min.js +0 -1
- package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.es.js +0 -264
- package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.es.js.map +0 -1
- package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.js +0 -282
- package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.js.map +0 -1
- package/configure/node_modules/slate-dev-environment/package.json +0 -21
- package/configure/src/__tests__/DeleteWidget.test.js +0 -64
- package/configure/src/__tests__/__snapshots__/hotspot-container.test.js.snap +0 -192
- package/configure/src/__tests__/__snapshots__/hotspot-drawable.test.js.snap +0 -562
- package/configure/src/__tests__/__snapshots__/root.test.js.snap +0 -469
- package/controller/node_modules/@pie-lib/controller-utils/CHANGELOG.json +0 -1
- package/controller/node_modules/@pie-lib/controller-utils/CHANGELOG.md +0 -410
- package/controller/node_modules/@pie-lib/controller-utils/NEXT.CHANGELOG.json +0 -1
- package/controller/node_modules/@pie-lib/controller-utils/esm/index.js +0 -129
- package/controller/node_modules/@pie-lib/controller-utils/esm/index.js.map +0 -1
- package/controller/node_modules/@pie-lib/controller-utils/lib/index.js +0 -31
- package/controller/node_modules/@pie-lib/controller-utils/lib/index.js.map +0 -1
- package/controller/node_modules/@pie-lib/controller-utils/lib/partial-scoring.js +0 -29
- package/controller/node_modules/@pie-lib/controller-utils/lib/partial-scoring.js.map +0 -1
- package/controller/node_modules/@pie-lib/controller-utils/lib/persistence.js +0 -140
- package/controller/node_modules/@pie-lib/controller-utils/lib/persistence.js.map +0 -1
- package/controller/node_modules/@pie-lib/controller-utils/package.json +0 -25
- package/controller/node_modules/@pie-lib/controller-utils/src/__tests__/partial-scoring.test.js +0 -25
- package/controller/node_modules/@pie-lib/controller-utils/src/__tests__/persistence.test.js +0 -151
- package/controller/node_modules/@pie-lib/controller-utils/src/index.js +0 -4
- package/controller/node_modules/@pie-lib/controller-utils/src/partial-scoring.js +0 -19
- package/controller/node_modules/@pie-lib/controller-utils/src/persistence.js +0 -103
- package/esm/configure.js +0 -31136
- package/esm/configure.js.map +0 -1
- package/esm/controller.js +0 -344
- package/esm/controller.js.map +0 -1
- package/esm/element.js +0 -28985
- package/esm/element.js.map +0 -1
- package/src/__tests__/__snapshots__/container.test.jsx.snap +0 -264
- package/src/__tests__/__snapshots__/index.test.js.snap +0 -81
- package/src/__tests__/__snapshots__/polygon.test.jsx.snap +0 -192
- package/src/__tests__/__snapshots__/rectangle.test.jsx.snap +0 -127
- package/src/__tests__/polygon.test.jsx +0 -230
- package/src/__tests__/rectangle.test.jsx +0 -232
package/lib/index.js
CHANGED
|
@@ -1,282 +1,213 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
-
|
|
16
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
-
|
|
18
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
-
|
|
20
|
-
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
21
|
-
|
|
7
|
+
exports.default = void 0;
|
|
22
8
|
var _react = _interopRequireDefault(require("react"));
|
|
23
|
-
|
|
24
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
25
|
-
|
|
9
|
+
var _client = require("react-dom/client");
|
|
26
10
|
var _mathRendering = require("@pie-lib/math-rendering");
|
|
27
|
-
|
|
28
11
|
var _renderUi = require("@pie-lib/render-ui");
|
|
29
|
-
|
|
30
12
|
var _piePlayerEvents = require("@pie-framework/pie-player-events");
|
|
31
|
-
|
|
32
13
|
var _hotspot = _interopRequireDefault(require("./hotspot"));
|
|
33
|
-
|
|
34
14
|
var _sessionUpdater = require("./session-updater");
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var _super = _createSuper(Hotspot);
|
|
44
|
-
|
|
45
|
-
function Hotspot() {
|
|
46
|
-
var _this;
|
|
47
|
-
|
|
48
|
-
(0, _classCallCheck2["default"])(this, Hotspot);
|
|
49
|
-
_this = _super.call(this);
|
|
50
|
-
_this._model = null;
|
|
51
|
-
_this._session = null;
|
|
52
|
-
_this._audioInitialized = false;
|
|
53
|
-
_this.audioComplete = false;
|
|
54
|
-
return _this;
|
|
15
|
+
class Hotspot extends HTMLElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super();
|
|
18
|
+
this._model = null;
|
|
19
|
+
this._session = null;
|
|
20
|
+
this._audioInitialized = false;
|
|
21
|
+
this.audioComplete = false;
|
|
22
|
+
this._root = null;
|
|
55
23
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
24
|
+
set model(m) {
|
|
25
|
+
this._model = m;
|
|
26
|
+
this.dispatchEvent(new _piePlayerEvents.ModelSetEvent(this.tagName.toLowerCase(), this.isComplete(), !!this._model));
|
|
27
|
+
this._audioInitialized = false;
|
|
28
|
+
this._render();
|
|
29
|
+
}
|
|
30
|
+
isComplete() {
|
|
31
|
+
if (!this._session || !this._session.answers) {
|
|
32
|
+
return false;
|
|
65
33
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
var audio = elementContext.querySelector('audio');
|
|
82
|
-
var isInsidePrompt = audio && audio.closest('#preview-prompt'); // only require audio completion if audio exists and is inside the prompt
|
|
83
|
-
|
|
84
|
-
if (audio && isInsidePrompt) {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
34
|
+
const {
|
|
35
|
+
autoplayAudioEnabled,
|
|
36
|
+
completeAudioEnabled
|
|
37
|
+
} = this._model || {};
|
|
38
|
+
const elementContext = this;
|
|
39
|
+
|
|
40
|
+
// check audio completion if audio settings are enabled and audio actually exists
|
|
41
|
+
if (autoplayAudioEnabled && completeAudioEnabled && !this.audioComplete) {
|
|
42
|
+
if (elementContext) {
|
|
43
|
+
const audio = elementContext.querySelector('audio');
|
|
44
|
+
const isInsidePrompt = audio && audio.closest('#preview-prompt');
|
|
45
|
+
|
|
46
|
+
// only require audio completion if audio exists and is inside the prompt
|
|
47
|
+
if (audio && isInsidePrompt) {
|
|
48
|
+
return false;
|
|
87
49
|
}
|
|
88
50
|
}
|
|
89
|
-
|
|
90
|
-
if (!Array.isArray(this._session.answers)) {
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return this._session.answers.length > 0;
|
|
95
|
-
}
|
|
96
|
-
}, {
|
|
97
|
-
key: "session",
|
|
98
|
-
get: function get() {
|
|
99
|
-
return this._session;
|
|
100
|
-
},
|
|
101
|
-
set: function set(s) {
|
|
102
|
-
if (s && !s.answers) {
|
|
103
|
-
s.answers = [];
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
this._session = s;
|
|
107
|
-
|
|
108
|
-
this._render();
|
|
109
51
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
value: function onSelectChoice(data) {
|
|
113
|
-
(0, _sessionUpdater.updateSessionValue)(this._session, this._model, data);
|
|
114
|
-
this.dispatchEvent(new _piePlayerEvents.SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));
|
|
115
|
-
|
|
116
|
-
this._render();
|
|
52
|
+
if (!Array.isArray(this._session.answers)) {
|
|
53
|
+
return false;
|
|
117
54
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
Object.assign(info.style, {
|
|
124
|
-
position: 'absolute',
|
|
125
|
-
top: 0,
|
|
126
|
-
width: '100%',
|
|
127
|
-
height: '100%',
|
|
128
|
-
display: 'flex',
|
|
129
|
-
justifyContent: 'center',
|
|
130
|
-
alignItems: 'center',
|
|
131
|
-
background: 'white',
|
|
132
|
-
zIndex: '1000',
|
|
133
|
-
cursor: 'pointer'
|
|
134
|
-
});
|
|
135
|
-
var img = document.createElement('img');
|
|
136
|
-
img.src = _renderUi.EnableAudioAutoplayImage;
|
|
137
|
-
img.alt = 'Click anywhere to enable audio autoplay';
|
|
138
|
-
img.width = 500;
|
|
139
|
-
img.height = 300;
|
|
140
|
-
info.appendChild(img);
|
|
141
|
-
return info;
|
|
55
|
+
return this._session.answers.length > 0;
|
|
56
|
+
}
|
|
57
|
+
set session(s) {
|
|
58
|
+
if (s && !s.answers) {
|
|
59
|
+
s.answers = [];
|
|
142
60
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
61
|
+
this._session = s;
|
|
62
|
+
this._render();
|
|
63
|
+
}
|
|
64
|
+
get session() {
|
|
65
|
+
return this._session;
|
|
66
|
+
}
|
|
67
|
+
onSelectChoice(data) {
|
|
68
|
+
(0, _sessionUpdater.updateSessionValue)(this._session, this._model, data);
|
|
69
|
+
this.dispatchEvent(new _piePlayerEvents.SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));
|
|
70
|
+
this._render();
|
|
71
|
+
}
|
|
72
|
+
_createAudioInfoToast() {
|
|
73
|
+
const info = document.createElement('div');
|
|
74
|
+
info.id = 'play-audio-info';
|
|
75
|
+
Object.assign(info.style, {
|
|
76
|
+
position: 'absolute',
|
|
77
|
+
top: 0,
|
|
78
|
+
width: '100%',
|
|
79
|
+
height: '100%',
|
|
80
|
+
display: 'flex',
|
|
81
|
+
justifyContent: 'center',
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
background: 'white',
|
|
84
|
+
zIndex: '1000',
|
|
85
|
+
cursor: 'pointer'
|
|
86
|
+
});
|
|
87
|
+
const img = document.createElement('img');
|
|
88
|
+
img.src = _renderUi.EnableAudioAutoplayImage;
|
|
89
|
+
img.alt = 'Click anywhere to enable audio autoplay';
|
|
90
|
+
img.width = 500;
|
|
91
|
+
img.height = 300;
|
|
92
|
+
info.appendChild(img);
|
|
93
|
+
return info;
|
|
94
|
+
}
|
|
95
|
+
connectedCallback() {
|
|
96
|
+
this._render();
|
|
97
|
+
|
|
98
|
+
// Observation: audio in Chrome will have the autoplay attribute,
|
|
99
|
+
// while other browsers will not have the autoplay attribute and will need a user interaction to play the audio
|
|
100
|
+
// This workaround fixes the issue of audio being cached and played on any user interaction in Safari and Firefox
|
|
101
|
+
const observer = new MutationObserver((mutationsList, observer) => {
|
|
102
|
+
mutationsList.forEach(mutation => {
|
|
103
|
+
if (mutation.type === 'childList') {
|
|
104
|
+
if (this._audioInitialized) return;
|
|
105
|
+
const audio = this.querySelector('audio');
|
|
106
|
+
const isInsidePrompt = audio && audio.closest('#preview-prompt');
|
|
107
|
+
if (!this._model) return;
|
|
108
|
+
if (!this._model.autoplayAudioEnabled) return;
|
|
109
|
+
if (audio && !isInsidePrompt) return;
|
|
110
|
+
if (!audio) return;
|
|
111
|
+
const info = this._createAudioInfoToast();
|
|
112
|
+
const container = this.querySelector('#main-container');
|
|
113
|
+
const enableAudio = () => {
|
|
114
|
+
if (this.querySelector('#play-audio-info')) {
|
|
115
|
+
audio.play();
|
|
116
|
+
container.removeChild(info);
|
|
117
|
+
}
|
|
118
|
+
document.removeEventListener('click', enableAudio);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// if the audio is paused, it means the user has not interacted with the page yet and the audio will not play
|
|
122
|
+
// FIX FOR SAFARI: play with a slight delay to check if autoplay was blocked
|
|
123
|
+
setTimeout(() => {
|
|
124
|
+
if (audio.paused && !this.querySelector('#play-audio-info')) {
|
|
125
|
+
// add info message as a toast to enable audio playback
|
|
126
|
+
container.appendChild(info);
|
|
127
|
+
document.addEventListener('click', enableAudio);
|
|
128
|
+
} else {
|
|
176
129
|
document.removeEventListener('click', enableAudio);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
_this2.dispatchEvent(new _piePlayerEvents.SessionChangedEvent(_this2.tagName.toLowerCase(), _this2.isComplete()));
|
|
226
|
-
|
|
227
|
-
audio.removeEventListener('ended', handleEnded);
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
audio.addEventListener('ended', handleEnded); // store references to remove later
|
|
231
|
-
|
|
232
|
-
_this2._audio = audio;
|
|
233
|
-
_this2._handlePlaying = handlePlaying;
|
|
234
|
-
_this2._handleEnded = handleEnded;
|
|
235
|
-
_this2._enableAudio = enableAudio; // set to true to prevent multiple initializations
|
|
236
|
-
|
|
237
|
-
_this2._audioInitialized = true;
|
|
238
|
-
observer.disconnect();
|
|
239
|
-
}
|
|
240
|
-
});
|
|
130
|
+
}
|
|
131
|
+
}, 500);
|
|
132
|
+
|
|
133
|
+
// we need to listen for the playing event to remove the toast in case the audio plays because of re-rendering
|
|
134
|
+
const handlePlaying = () => {
|
|
135
|
+
//timestamp when auto-played audio started playing
|
|
136
|
+
(0, _sessionUpdater.updateSessionMetadata)(this._session, {
|
|
137
|
+
audioStartTime: new Date().getTime()
|
|
138
|
+
});
|
|
139
|
+
const info = this.querySelector('#play-audio-info');
|
|
140
|
+
if (info) {
|
|
141
|
+
container.removeChild(info);
|
|
142
|
+
}
|
|
143
|
+
audio.removeEventListener('playing', handlePlaying);
|
|
144
|
+
};
|
|
145
|
+
audio.addEventListener('playing', handlePlaying);
|
|
146
|
+
|
|
147
|
+
// we need to listen for the ended event to update the isComplete state
|
|
148
|
+
const handleEnded = () => {
|
|
149
|
+
//timestamp when auto-played audio completed playing
|
|
150
|
+
(0, _sessionUpdater.updateSessionMetadata)(this._session, {
|
|
151
|
+
audioEndTime: new Date().getTime()
|
|
152
|
+
});
|
|
153
|
+
let {
|
|
154
|
+
audioStartTime,
|
|
155
|
+
audioEndTime,
|
|
156
|
+
waitTime
|
|
157
|
+
} = this._session;
|
|
158
|
+
if (!waitTime && audioStartTime && audioEndTime) {
|
|
159
|
+
// waitTime is elapsed time the user waited for auto-played audio to finish
|
|
160
|
+
this._session.waitTime = audioEndTime - audioStartTime;
|
|
161
|
+
}
|
|
162
|
+
this.audioComplete = true;
|
|
163
|
+
this.dispatchEvent(new _piePlayerEvents.SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));
|
|
164
|
+
audio.removeEventListener('ended', handleEnded);
|
|
165
|
+
};
|
|
166
|
+
audio.addEventListener('ended', handleEnded);
|
|
167
|
+
|
|
168
|
+
// store references to remove later
|
|
169
|
+
this._audio = audio;
|
|
170
|
+
this._handlePlaying = handlePlaying;
|
|
171
|
+
this._handleEnded = handleEnded;
|
|
172
|
+
this._enableAudio = enableAudio;
|
|
173
|
+
// set to true to prevent multiple initializations
|
|
174
|
+
this._audioInitialized = true;
|
|
175
|
+
observer.disconnect();
|
|
176
|
+
}
|
|
241
177
|
});
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
178
|
+
});
|
|
179
|
+
observer.observe(this, {
|
|
180
|
+
childList: true,
|
|
181
|
+
subtree: true
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
_render() {
|
|
185
|
+
if (this._model && this._session) {
|
|
186
|
+
const el = /*#__PURE__*/_react.default.createElement(_hotspot.default, {
|
|
187
|
+
model: this._model,
|
|
188
|
+
session: this._session,
|
|
189
|
+
onSelectChoice: this.onSelectChoice.bind(this)
|
|
245
190
|
});
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
key: "disconnectedCallback",
|
|
249
|
-
value: function disconnectedCallback() {
|
|
250
|
-
document.removeEventListener('click', this._enableAudio);
|
|
251
|
-
|
|
252
|
-
if (this._audio) {
|
|
253
|
-
this._audio.removeEventListener('playing', this._handlePlaying);
|
|
254
|
-
|
|
255
|
-
this._audio.removeEventListener('ended', this._handleEnded);
|
|
256
|
-
|
|
257
|
-
this._audio = null;
|
|
191
|
+
if (!this._root) {
|
|
192
|
+
this._root = (0, _client.createRoot)(this);
|
|
258
193
|
}
|
|
194
|
+
this._root.render(el);
|
|
195
|
+
queueMicrotask(() => {
|
|
196
|
+
(0, _mathRendering.renderMath)(this);
|
|
197
|
+
});
|
|
259
198
|
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
model: this._model,
|
|
268
|
-
session: this._session,
|
|
269
|
-
onSelectChoice: this.onSelectChoice.bind(this)
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
_reactDom["default"].render(el, this, function () {
|
|
273
|
-
(0, _mathRendering.renderMath)(_this3);
|
|
274
|
-
});
|
|
275
|
-
}
|
|
199
|
+
}
|
|
200
|
+
disconnectedCallback() {
|
|
201
|
+
document.removeEventListener('click', this._enableAudio);
|
|
202
|
+
if (this._audio) {
|
|
203
|
+
this._audio.removeEventListener('playing', this._handlePlaying);
|
|
204
|
+
this._audio.removeEventListener('ended', this._handleEnded);
|
|
205
|
+
this._audio = null;
|
|
276
206
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
|
|
207
|
+
if (this._root) {
|
|
208
|
+
this._root.unmount();
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
exports.default = Hotspot;
|
|
282
213
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["Hotspot","_model","_session","_audioInitialized","audioComplete","m","dispatchEvent","ModelSetEvent","tagName","toLowerCase","isComplete","_render","answers","autoplayAudioEnabled","completeAudioEnabled","elementContext","audio","querySelector","isInsidePrompt","closest","Array","isArray","length","s","data","SessionChangedEvent","info","document","createElement","id","Object","assign","style","position","top","width","height","display","justifyContent","alignItems","background","zIndex","cursor","img","src","EnableAudioAutoplayImage","alt","appendChild","observer","MutationObserver","mutationsList","forEach","mutation","type","_createAudioInfoToast","container","enableAudio","play","removeChild","removeEventListener","setTimeout","paused","addEventListener","handlePlaying","audioStartTime","Date","getTime","handleEnded","audioEndTime","waitTime","_audio","_handlePlaying","_handleEnded","_enableAudio","disconnect","observe","childList","subtree","el","React","HotspotComponent","model","session","onSelectChoice","bind","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;IAEqBA,O;;;;;AACnB,qBAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,MAAL,GAAc,IAAd;AACA,UAAKC,QAAL,GAAgB,IAAhB;AACA,UAAKC,iBAAL,GAAyB,KAAzB;AACA,UAAKC,aAAL,GAAqB,KAArB;AALY;AAMb;;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKJ,MAAL,GAAcI,CAAd;AAEA,WAAKC,aAAL,CAAmB,IAAIC,8BAAJ,CAAkB,KAAKC,OAAL,CAAaC,WAAb,EAAlB,EAA8C,KAAKC,UAAL,EAA9C,EAAiE,CAAC,CAAC,KAAKT,MAAxE,CAAnB;AACA,WAAKE,iBAAL,GAAyB,KAAzB;;AACA,WAAKQ,OAAL;AACD;;;WAED,sBAAa;AACX,UAAI,CAAC,KAAKT,QAAN,IAAkB,CAAC,KAAKA,QAAL,CAAcU,OAArC,EAA8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AI,CAACM,YAAL,GAAoBjB,WAApB,CAvEiC,CAwEjC;;AACA,YAAA,MAAI,CAACrD,iBAAL,GAAyB,IAAzB;AAEA6C,YAAAA,QAAQ,CAAC0B,UAAT;AACD;AACF,SA9ED;AA+ED,OAhFgB,CAAjB;AAkFA1B,MAAAA,QAAQ,CAAC2B,OAAT,CAAiB,IAAjB,EAAuB;AAAEC,QAAAA,SAAS,EAAE,IAAb;AAAmBC,QAAAA,OAAO,EAAE;AAA5B,OAAvB;AACD;;;WAED,gCAAuB;AACrBlD,MAAAA,QAAQ,CAACgC,mBAAT,CAA6B,OAA7B,EAAsC,KAAKc,YAA3C;;AAEA,UAAI,KAAKH,MAAT,EAAiB;AACf,aAAKA,MAAL,CAAYX,mBAAZ,CAAgC,SAAhC,EAA2C,KAAKY,cAAhD;;AACA,aAAKD,MAAL,CAAYX,mBAAZ,CAAgC,OAAhC,EAAyC,KAAKa,YAA9C;;AACA,aAAKF,MAAL,GAAc,IAAd;AACD;AACF;;;WAED,mBAAU;AAAA;;AACR,UAAI,KAAKrE,MAAL,IAAe,KAAKC,QAAxB,EAAkC;AAChC,YAAM4E,EAAE,gBAAGC,kBAAMnD,aAAN,CAAoBoD,mBAApB,EAAsC;AAC/CC,UAAAA,KAAK,EAAE,KAAKhF,MADmC;AAE/CiF,UAAAA,OAAO,EAAE,KAAKhF,QAFiC;AAG/CiF,UAAAA,cAAc,EAAE,KAAKA,cAAL,CAAoBC,IAApB,CAAyB,IAAzB;AAH+B,SAAtC,CAAX;;AAMAC,6BAASC,MAAT,CAAgBR,EAAhB,EAAoB,IAApB,EAA0B,YAAM;AAC9B,yCAAW,MAAX;AACD,SAFD;AAGD;AACF;;;kDA9MkCS,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport { EnableAudioAutoplayImage } from '@pie-lib/render-ui';\nimport { SessionChangedEvent, ModelSetEvent } from '@pie-framework/pie-player-events';\n\nimport HotspotComponent from './hotspot';\nimport { updateSessionValue, updateSessionMetadata } from './session-updater';\n\nexport default class Hotspot extends HTMLElement {\n constructor() {\n super();\n this._model = null;\n this._session = null;\n this._audioInitialized = false;\n this.audioComplete = false;\n }\n\n set model(m) {\n this._model = m;\n\n this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), this.isComplete(), !!this._model));\n this._audioInitialized = false;\n this._render();\n }\n\n isComplete() {\n if (!this._session || !this._session.answers) {\n return false;\n }\n\n const { autoplayAudioEnabled, completeAudioEnabled } = this._model || {};\n const elementContext = this;\n\n // check audio completion if audio settings are enabled and audio actually exists\n if (autoplayAudioEnabled && completeAudioEnabled && !this.audioComplete) {\n if (elementContext) {\n const audio = elementContext.querySelector('audio');\n const isInsidePrompt = audio && audio.closest('#preview-prompt');\n\n // only require audio completion if audio exists and is inside the prompt\n if (audio && isInsidePrompt) {\n return false;\n }\n }\n }\n\n if (!Array.isArray(this._session.answers)) {\n return false;\n }\n\n return this._session.answers.length > 0;\n }\n\n set session(s) {\n if (s && !s.answers) {\n s.answers = [];\n }\n\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n onSelectChoice(data) {\n updateSessionValue(this._session, this._model, data);\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));\n\n this._render();\n }\n\n _createAudioInfoToast() {\n const info = document.createElement('div');\n info.id = 'play-audio-info';\n\n Object.assign(info.style, {\n position: 'absolute',\n top: 0,\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background: 'white',\n zIndex: '1000',\n cursor: 'pointer',\n });\n\n const img = document.createElement('img');\n img.src = EnableAudioAutoplayImage;\n img.alt = 'Click anywhere to enable audio autoplay';\n img.width = 500;\n img.height = 300;\n\n info.appendChild(img);\n return info;\n }\n\n connectedCallback() {\n this._render();\n\n // Observation: audio in Chrome will have the autoplay attribute,\n // while other browsers will not have the autoplay attribute and will need a user interaction to play the audio\n // This workaround fixes the issue of audio being cached and played on any user interaction in Safari and Firefox\n const observer = new MutationObserver((mutationsList, observer) => {\n mutationsList.forEach((mutation) => {\n if (mutation.type === 'childList') {\n if (this._audioInitialized) return;\n const audio = this.querySelector('audio');\n const isInsidePrompt = audio && audio.closest('#preview-prompt');\n\n if (!this._model) return;\n if (!this._model.autoplayAudioEnabled) return;\n if (audio && !isInsidePrompt) return;\n if (!audio) return;\n\n const info = this._createAudioInfoToast();\n const container = this.querySelector('#main-container');\n const enableAudio = () => {\n if (this.querySelector('#play-audio-info')) {\n audio.play();\n container.removeChild(info);\n }\n\n document.removeEventListener('click', enableAudio);\n };\n\n // if the audio is paused, it means the user has not interacted with the page yet and the audio will not play\n // FIX FOR SAFARI: play with a slight delay to check if autoplay was blocked\n setTimeout(() => {\n if (audio.paused && !this.querySelector('#play-audio-info')) {\n // add info message as a toast to enable audio playback\n container.appendChild(info);\n document.addEventListener('click', enableAudio);\n } else {\n document.removeEventListener('click', enableAudio);\n }\n }, 500);\n\n // we need to listen for the playing event to remove the toast in case the audio plays because of re-rendering\n const handlePlaying = () => {\n //timestamp when auto-played audio started playing\n updateSessionMetadata(this._session, { audioStartTime: new Date().getTime() });\n\n const info = this.querySelector('#play-audio-info');\n if (info) {\n container.removeChild(info);\n }\n\n audio.removeEventListener('playing', handlePlaying);\n };\n\n audio.addEventListener('playing', handlePlaying);\n\n // we need to listen for the ended event to update the isComplete state\n const handleEnded = () => {\n //timestamp when auto-played audio completed playing\n updateSessionMetadata(this._session, { audioEndTime: new Date().getTime() });\n\n let { audioStartTime, audioEndTime, waitTime } = this._session;\n if (!waitTime && audioStartTime && audioEndTime) {\n // waitTime is elapsed time the user waited for auto-played audio to finish\n this._session.waitTime = audioEndTime - audioStartTime;\n }\n\n this.audioComplete = true;\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));\n\n audio.removeEventListener('ended', handleEnded);\n };\n\n audio.addEventListener('ended', handleEnded);\n\n // store references to remove later\n this._audio = audio;\n this._handlePlaying = handlePlaying;\n this._handleEnded = handleEnded;\n this._enableAudio = enableAudio;\n // set to true to prevent multiple initializations\n this._audioInitialized = true;\n\n observer.disconnect();\n }\n });\n });\n\n observer.observe(this, { childList: true, subtree: true });\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this._enableAudio);\n\n if (this._audio) {\n this._audio.removeEventListener('playing', this._handlePlaying);\n this._audio.removeEventListener('ended', this._handleEnded);\n this._audio = null;\n }\n }\n\n _render() {\n if (this._model && this._session) {\n const el = React.createElement(HotspotComponent, {\n model: this._model,\n session: this._session,\n onSelectChoice: this.onSelectChoice.bind(this),\n });\n\n ReactDOM.render(el, this, () => {\n renderMath(this);\n });\n }\n }\n}\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_client","_mathRendering","_renderUi","_piePlayerEvents","_hotspot","_sessionUpdater","Hotspot","HTMLElement","constructor","_model","_session","_audioInitialized","audioComplete","_root","model","m","dispatchEvent","ModelSetEvent","tagName","toLowerCase","isComplete","_render","answers","autoplayAudioEnabled","completeAudioEnabled","elementContext","audio","querySelector","isInsidePrompt","closest","Array","isArray","length","session","s","onSelectChoice","data","updateSessionValue","SessionChangedEvent","_createAudioInfoToast","info","document","createElement","id","Object","assign","style","position","top","width","height","display","justifyContent","alignItems","background","zIndex","cursor","img","src","EnableAudioAutoplayImage","alt","appendChild","connectedCallback","observer","MutationObserver","mutationsList","forEach","mutation","type","container","enableAudio","play","removeChild","removeEventListener","setTimeout","paused","addEventListener","handlePlaying","updateSessionMetadata","audioStartTime","Date","getTime","handleEnded","audioEndTime","waitTime","_audio","_handlePlaying","_handleEnded","_enableAudio","disconnect","observe","childList","subtree","el","React","HotspotComponent","bind","createRoot","render","queueMicrotask","renderMath","disconnectedCallback","unmount","exports","default"],"sources":["../src/index.js"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport { EnableAudioAutoplayImage } from '@pie-lib/render-ui';\nimport { SessionChangedEvent, ModelSetEvent } from '@pie-framework/pie-player-events';\n\nimport HotspotComponent from './hotspot';\nimport { updateSessionValue, updateSessionMetadata } from './session-updater';\n\nexport default class Hotspot extends HTMLElement {\n constructor() {\n super();\n this._model = null;\n this._session = null;\n this._audioInitialized = false;\n this.audioComplete = false;\n this._root = null;\n }\n\n set model(m) {\n this._model = m;\n\n this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), this.isComplete(), !!this._model));\n this._audioInitialized = false;\n this._render();\n }\n\n isComplete() {\n if (!this._session || !this._session.answers) {\n return false;\n }\n\n const { autoplayAudioEnabled, completeAudioEnabled } = this._model || {};\n const elementContext = this;\n\n // check audio completion if audio settings are enabled and audio actually exists\n if (autoplayAudioEnabled && completeAudioEnabled && !this.audioComplete) {\n if (elementContext) {\n const audio = elementContext.querySelector('audio');\n const isInsidePrompt = audio && audio.closest('#preview-prompt');\n\n // only require audio completion if audio exists and is inside the prompt\n if (audio && isInsidePrompt) {\n return false;\n }\n }\n }\n\n if (!Array.isArray(this._session.answers)) {\n return false;\n }\n\n return this._session.answers.length > 0;\n }\n\n set session(s) {\n if (s && !s.answers) {\n s.answers = [];\n }\n\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n onSelectChoice(data) {\n updateSessionValue(this._session, this._model, data);\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));\n\n this._render();\n }\n\n _createAudioInfoToast() {\n const info = document.createElement('div');\n info.id = 'play-audio-info';\n\n Object.assign(info.style, {\n position: 'absolute',\n top: 0,\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background: 'white',\n zIndex: '1000',\n cursor: 'pointer',\n });\n\n const img = document.createElement('img');\n img.src = EnableAudioAutoplayImage;\n img.alt = 'Click anywhere to enable audio autoplay';\n img.width = 500;\n img.height = 300;\n\n info.appendChild(img);\n return info;\n }\n\n connectedCallback() {\n this._render();\n\n // Observation: audio in Chrome will have the autoplay attribute,\n // while other browsers will not have the autoplay attribute and will need a user interaction to play the audio\n // This workaround fixes the issue of audio being cached and played on any user interaction in Safari and Firefox\n const observer = new MutationObserver((mutationsList, observer) => {\n mutationsList.forEach((mutation) => {\n if (mutation.type === 'childList') {\n if (this._audioInitialized) return;\n const audio = this.querySelector('audio');\n const isInsidePrompt = audio && audio.closest('#preview-prompt');\n\n if (!this._model) return;\n if (!this._model.autoplayAudioEnabled) return;\n if (audio && !isInsidePrompt) return;\n if (!audio) return;\n\n const info = this._createAudioInfoToast();\n const container = this.querySelector('#main-container');\n const enableAudio = () => {\n if (this.querySelector('#play-audio-info')) {\n audio.play();\n container.removeChild(info);\n }\n\n document.removeEventListener('click', enableAudio);\n };\n\n // if the audio is paused, it means the user has not interacted with the page yet and the audio will not play\n // FIX FOR SAFARI: play with a slight delay to check if autoplay was blocked\n setTimeout(() => {\n if (audio.paused && !this.querySelector('#play-audio-info')) {\n // add info message as a toast to enable audio playback\n container.appendChild(info);\n document.addEventListener('click', enableAudio);\n } else {\n document.removeEventListener('click', enableAudio);\n }\n }, 500);\n\n // we need to listen for the playing event to remove the toast in case the audio plays because of re-rendering\n const handlePlaying = () => {\n //timestamp when auto-played audio started playing\n updateSessionMetadata(this._session, { audioStartTime: new Date().getTime() });\n\n const info = this.querySelector('#play-audio-info');\n if (info) {\n container.removeChild(info);\n }\n\n audio.removeEventListener('playing', handlePlaying);\n };\n\n audio.addEventListener('playing', handlePlaying);\n\n // we need to listen for the ended event to update the isComplete state\n const handleEnded = () => {\n //timestamp when auto-played audio completed playing\n updateSessionMetadata(this._session, { audioEndTime: new Date().getTime() });\n\n let { audioStartTime, audioEndTime, waitTime } = this._session;\n if (!waitTime && audioStartTime && audioEndTime) {\n // waitTime is elapsed time the user waited for auto-played audio to finish\n this._session.waitTime = audioEndTime - audioStartTime;\n }\n\n this.audioComplete = true;\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));\n\n audio.removeEventListener('ended', handleEnded);\n };\n\n audio.addEventListener('ended', handleEnded);\n\n // store references to remove later\n this._audio = audio;\n this._handlePlaying = handlePlaying;\n this._handleEnded = handleEnded;\n this._enableAudio = enableAudio;\n // set to true to prevent multiple initializations\n this._audioInitialized = true;\n\n observer.disconnect();\n }\n });\n });\n\n observer.observe(this, { childList: true, subtree: true });\n }\n\n _render() {\n if (this._model && this._session) {\n const el = React.createElement(HotspotComponent, {\n model: this._model,\n session: this._session,\n onSelectChoice: this.onSelectChoice.bind(this),\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n queueMicrotask(() => {\n renderMath(this);\n });\n }\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this._enableAudio);\n\n if (this._audio) {\n this._audio.removeEventListener('playing', this._handlePlaying);\n this._audio.removeEventListener('ended', this._handleEnded);\n this._audio = null;\n }\n\n if (this._root) {\n this._root.unmount();\n }\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AAEA,IAAAK,QAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AAEe,MAAMO,OAAO,SAASC,WAAW,CAAC;EAC/CC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IACP,IAAI,CAACC,MAAM,GAAG,IAAI;IAClB,IAAI,CAACC,QAAQ,GAAG,IAAI;IACpB,IAAI,CAACC,iBAAiB,GAAG,KAAK;IAC9B,IAAI,CAACC,aAAa,GAAG,KAAK;IAC1B,IAAI,CAACC,KAAK,GAAG,IAAI;EACnB;EAEA,IAAIC,KAAKA,CAACC,CAAC,EAAE;IACX,IAAI,CAACN,MAAM,GAAGM,CAAC;IAEf,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I,CAACD,MAAM,CAACZ,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAACc,YAAY,CAAC;MAC3D,IAAI,CAACF,MAAM,GAAG,IAAI;IACpB;IAEA,IAAI,IAAI,CAACxE,KAAK,EAAE;MACd,IAAI,CAACA,KAAK,CAACyF,OAAO,CAAC,CAAC;IACtB;EACF;AACF;AAACC,OAAA,CAAAC,OAAA,GAAAlG,OAAA","ignoreList":[]}
|
package/lib/session-updater.js
CHANGED
|
@@ -5,39 +5,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.updateSessionMetadata = updateSessionMetadata;
|
|
7
7
|
exports.updateSessionValue = updateSessionValue;
|
|
8
|
-
|
|
9
8
|
function updateSessionValue(session, model, data) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
const {
|
|
10
|
+
id,
|
|
11
|
+
selected
|
|
12
|
+
} = data;
|
|
13
|
+
const {
|
|
14
|
+
multipleCorrect
|
|
15
|
+
} = model || {};
|
|
16
16
|
session.answers = session.answers || [];
|
|
17
|
-
|
|
18
17
|
if (!selected) {
|
|
19
|
-
session.answers = session.answers.filter(
|
|
20
|
-
return answer.id !== id;
|
|
21
|
-
});
|
|
18
|
+
session.answers = session.answers.filter(answer => answer.id !== id);
|
|
22
19
|
} else {
|
|
23
|
-
|
|
24
|
-
id
|
|
20
|
+
const item = {
|
|
21
|
+
id
|
|
25
22
|
};
|
|
26
|
-
|
|
27
23
|
if (multipleCorrect) {
|
|
28
24
|
session.answers.push(item);
|
|
29
25
|
} else {
|
|
30
26
|
session.answers = [item];
|
|
31
|
-
}
|
|
32
|
-
|
|
27
|
+
}
|
|
33
28
|
|
|
29
|
+
//update session metadata
|
|
34
30
|
session.selector = data.selector;
|
|
35
31
|
}
|
|
36
32
|
}
|
|
37
|
-
|
|
38
33
|
function updateSessionMetadata(session, metadata) {
|
|
39
34
|
session.audioStartTime = session.audioStartTime || metadata.audioStartTime; //timestamp when auto-played audio started playing
|
|
40
|
-
|
|
41
35
|
session.audioEndTime = session.audioEndTime || metadata.audioEndTime; //timestamp when auto-played audio completed playing
|
|
42
36
|
|
|
43
37
|
if (!session.waitTime && session.audioStartTime && session.audioEndTime) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"session-updater.js","names":["updateSessionValue","session","model","data","id","selected","multipleCorrect","answers","filter","answer","item","push","selector","updateSessionMetadata","metadata","audioStartTime","audioEndTime","waitTime"],"sources":["../src/session-updater.js"],"sourcesContent":["export function updateSessionValue(session, model, data) {\n const { id, selected } = data;\n const { multipleCorrect } = model || {};\n session.answers = session.answers || [];\n\n if (!selected) {\n session.answers = session.answers.filter((answer) => answer.id !== id);\n } else {\n const item = { id };\n if (multipleCorrect) {\n session.answers.push(item);\n } else {\n session.answers = [item];\n }\n\n //update session metadata\n session.selector = data.selector;\n }\n}\n\nexport function updateSessionMetadata(session, metadata) {\n session.audioStartTime = session.audioStartTime || metadata.audioStartTime; //timestamp when auto-played audio started playing\n session.audioEndTime = session.audioEndTime || metadata.audioEndTime; //timestamp when auto-played audio completed playing\n\n if (!session.waitTime && session.audioStartTime && session.audioEndTime) {\n // waitTime is elapsed time the user waited for auto-played audio to finish\n session.waitTime = session.audioEndTime - session.audioStartTime;\n }\n}\n"],"mappings":";;;;;;;AAAO,SAASA,kBAAkBA,CAACC,OAAO,EAAEC,KAAK,EAAEC,IAAI,EAAE;EACvD,MAAM;IAAEC,EAAE;IAAEC;EAAS,CAAC,GAAGF,IAAI;EAC7B,MAAM;IAAEG;EAAgB,CAAC,GAAGJ,KAAK,IAAI,CAAC,CAAC;EACvCD,OAAO,CAACM,OAAO,GAAGN,OAAO,CAACM,OAAO,IAAI,EAAE;EAEvC,IAAI,CAACF,QAAQ,EAAE;IACbJ,OAAO,CAACM,OAAO,GAAGN,OAAO,CAACM,OAAO,CAACC,MAAM,CAAEC,MAAM,IAAKA,MAAM,CAACL,EAAE,KAAKA,EAAE,CAAC;EACxE,CAAC,MAAM;IACL,MAAMM,IAAI,GAAG;MAAEN;IAAG,CAAC;IACnB,IAAIE,eAAe,EAAE;MACnBL,OAAO,CAACM,OAAO,CAACI,IAAI,CAACD,IAAI,CAAC;IAC5B,CAAC,MAAM;MACLT,OAAO,CAACM,OAAO,GAAG,CAACG,IAAI,CAAC;IAC1B;;IAEA;IACAT,OAAO,CAACW,QAAQ,GAAGT,IAAI,CAACS,QAAQ;EAClC;AACF;AAEO,SAASC,qBAAqBA,CAACZ,OAAO,EAAEa,QAAQ,EAAE;EACvDb,OAAO,CAACc,cAAc,GAAGd,OAAO,CAACc,cAAc,IAAID,QAAQ,CAACC,cAAc,CAAC,CAAC;EAC5Ed,OAAO,CAACe,YAAY,GAAGf,OAAO,CAACe,YAAY,IAAIF,QAAQ,CAACE,YAAY,CAAC,CAAC;;EAEtE,IAAI,CAACf,OAAO,CAACgB,QAAQ,IAAIhB,OAAO,CAACc,cAAc,IAAId,OAAO,CAACe,YAAY,EAAE;IACvE;IACAf,OAAO,CAACgB,QAAQ,GAAGhB,OAAO,CAACe,YAAY,GAAGf,OAAO,CAACc,cAAc;EAClE;AACF","ignoreList":[]}
|