@pie-element/ebsr 6.6.3-next.1085 → 6.6.3-next.1092
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 +77 -0
- package/configure/CHANGELOG.md +77 -0
- package/configure/package.json +3 -3
- package/controller/CHANGELOG.md +8 -0
- package/controller/package.json +1 -1
- package/package.json +3 -3
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.json +0 -1972
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.md +0 -1826
- package/configure/node_modules/@pie-element/multiple-choice/LICENSE.md +0 -5
- package/configure/node_modules/@pie-element/multiple-choice/PRINT.md +0 -35
- package/configure/node_modules/@pie-element/multiple-choice/README.md +0 -56
- package/configure/node_modules/@pie-element/multiple-choice/choice.png +0 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.json +0 -1387
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.md +0 -1367
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js +0 -116
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js +0 -198
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js +0 -615
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/package.json +0 -20
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.json +0 -527
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.md +0 -768
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js +0 -305
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js +0 -36
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/package.json +0 -15
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json +0 -431
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json.md +0 -337
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/config.js +0 -8
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/generate.js +0 -52
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/index.html +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/session.js +0 -7
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json +0 -364
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json.md +0 -294
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js +0 -298
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js +0 -157
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js +0 -174
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js +0 -151
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js +0 -97
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js +0 -254
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js +0 -129
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js +0 -35
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.json +0 -1677
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.md +0 -1695
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/LICENSE.md +0 -5
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/README.md +0 -12
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js +0 -44
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js +0 -86
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js +0 -164
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js +0 -398
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js +0 -54
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js +0 -185
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js +0 -75
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js +0 -178
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js +0 -46
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js +0 -145
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js +0 -216
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js +0 -139
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js +0 -131
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js +0 -179
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js +0 -101
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js +0 -24
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js +0 -105
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js +0 -87
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js +0 -79
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js +0 -364
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js +0 -265
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js +0 -41
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js +0 -77
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js +0 -130
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js +0 -412
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js +0 -43
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js +0 -56
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js +0 -106
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js +0 -198
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js +0 -180
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js +0 -84
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/package.json +0 -30
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/alert-dialog.jsx +0 -43
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/checkbox.jsx +0 -63
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/feedback-menu.jsx +0 -103
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/index.jsx +0 -319
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-utils.js +0 -30
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/feedback-selector.jsx +0 -116
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/group.jsx +0 -54
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/index.jsx +0 -98
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/form-section.jsx +0 -23
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/help.jsx +0 -88
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/index.js +0 -58
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/input.jsx +0 -72
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/inputs.jsx +0 -96
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/langs.jsx +0 -122
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/config-layout.jsx +0 -64
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/index.js +0 -4
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/layout-contents.jsx +0 -60
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/settings-box.jsx +0 -31
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/mui-box/index.jsx +0 -64
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field-custom.jsx +0 -276
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field.jsx +0 -196
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/radio-with-label.jsx +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/display-size.jsx +0 -52
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/index.js +0 -75
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/panel.jsx +0 -297
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/settings-radio-label.jsx +0 -20
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/toggle.jsx +0 -31
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tabs/index.jsx +0 -51
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tags-input/index.jsx +0 -121
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/two-choice.jsx +0 -94
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/with-stateful-model.jsx +0 -36
- package/configure/node_modules/@pie-element/multiple-choice/package.json +0 -34
- package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.json +0 -547
- package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.md +0 -524
- package/configure/node_modules/@pie-lib/correct-answer-toggle/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/correct-answer-toggle/README.md +0 -64
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js +0 -86
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js.map +0 -1
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js +0 -155
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js +0 -65
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js.map +0 -1
- package/configure/node_modules/@pie-lib/correct-answer-toggle/package.json +0 -36
- package/configure/node_modules/@pie-lib/correct-answer-toggle/preview.png +0 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/expander.jsx +0 -65
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/index.jsx +0 -75
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/styles.js +0 -60
- package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.json +0 -3327
- package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +0 -1676
- package/configure/node_modules/@pie-lib/editable-html/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/editable-html/README.md +0 -45
- package/configure/node_modules/@pie-lib/editable-html/deploy.sh +0 -16
- package/configure/node_modules/@pie-lib/editable-html/lib/editor.js +0 -837
- 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 -224
- 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-popover.js +0 -70
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popover.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js +0 -261
- 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 -362
- 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/image/component.js +0 -393
- 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 -78
- 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 -221
- 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 -135
- 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 -141
- 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 -204
- 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 -347
- 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 -339
- 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 -434
- 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 -99
- 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/respArea/drag-in-the-blank/choice.js +0 -251
- 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 -54
- 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 -93
- 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 -288
- 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 -70
- 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/utils.js +0 -110
- 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/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 -497
- 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 -158
- 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/toolbar/default-toolbar.js +0 -132
- 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 -50
- 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 -263
- 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 -32
- 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 -161
- 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 -346
- 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 -428
- package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js.map +0 -1
- 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/package.json +0 -51
- package/configure/node_modules/@pie-lib/editable-html/playground/image/data.js +0 -59
- package/configure/node_modules/@pie-lib/editable-html/playground/image/index.html +0 -24
- package/configure/node_modules/@pie-lib/editable-html/playground/image/index.jsx +0 -83
- package/configure/node_modules/@pie-lib/editable-html/playground/index.html +0 -27
- package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.html +0 -25
- package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.jsx +0 -151
- package/configure/node_modules/@pie-lib/editable-html/playground/package.json +0 -15
- package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.html +0 -26
- package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.jsx +0 -30
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/data.js +0 -29
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/image-plugin.jsx +0 -40
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.html +0 -23
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.jsx +0 -96
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/data.js +0 -29
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/image-plugin.jsx +0 -40
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.html +0 -24
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.jsx +0 -12
- package/configure/node_modules/@pie-lib/editable-html/playground/static.json +0 -3
- package/configure/node_modules/@pie-lib/editable-html/playground/table-examples.html +0 -67
- package/configure/node_modules/@pie-lib/editable-html/playground/webpack.config.js +0 -42
- package/configure/node_modules/@pie-lib/editable-html/src/editor.jsx +0 -724
- package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +0 -145
- 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-popover.js +0 -45
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/index.jsx +0 -237
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/utils.js +0 -444
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/component.jsx +0 -318
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +0 -32
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +0 -182
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/insert-image-handler.js +0 -93
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/index.jsx +0 -115
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +0 -175
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +0 -283
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +0 -284
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-dialog.js +0 -372
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-toolbar.jsx +0 -53
- 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/respArea/drag-in-the-blank/choice.jsx +0 -187
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/index.jsx +0 -78
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/explicit-constructed-response/index.jsx +0 -45
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/icons/index.jsx +0 -68
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx +0 -259
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/inline-dropdown/index.jsx +0 -63
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/utils.jsx +0 -77
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/icons/index.jsx +0 -59
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/index.jsx +0 -437
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/table-toolbar.jsx +0 -104
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/default-toolbar.jsx +0 -111
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/done-button.jsx +0 -36
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/editor-and-toolbar.jsx +0 -225
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/index.jsx +0 -21
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar-buttons.jsx +0 -97
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +0 -323
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/utils.js +0 -32
- package/configure/node_modules/@pie-lib/editable-html/src/serialization.jsx +0 -385
- package/configure/node_modules/@pie-lib/editable-html/src/theme.js +0 -1
- package/configure/node_modules/@pie-lib/editable-html/static.json +0 -1
- package/configure/node_modules/@pie-lib/math-input/CHANGELOG.json +0 -1547
- package/configure/node_modules/@pie-lib/math-input/CHANGELOG.md +0 -765
- package/configure/node_modules/@pie-lib/math-input/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/math-input/README.md +0 -27
- package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js +0 -129
- 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 -80
- 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 -440
- 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 -46
- 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 -16
- 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 -35
- 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 -31
- 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 -165
- 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 -69
- 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 -23
- 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 -17
- 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 -45
- 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 -130
- 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 -206
- 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/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 -24
- 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 -257
- 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 -224
- package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/package.json +0 -26
- package/configure/node_modules/@pie-lib/math-input/src/horizontal-keypad.jsx +0 -56
- package/configure/node_modules/@pie-lib/math-input/src/index.jsx +0 -27
- package/configure/node_modules/@pie-lib/math-input/src/keypad/index.jsx +0 -367
- 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/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 -27
- 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 -27
- package/configure/node_modules/@pie-lib/math-input/src/keys/fractions.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/src/keys/geometry.js +0 -140
- package/configure/node_modules/@pie-lib/math-input/src/keys/grades.js +0 -379
- 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 -60
- 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 -9
- package/configure/node_modules/@pie-lib/math-input/src/keys/statistics.js +0 -36
- 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/custom-elements.js +0 -11
- package/configure/node_modules/@pie-lib/math-input/src/mq/index.js +0 -4
- package/configure/node_modules/@pie-lib/math-input/src/mq/input.jsx +0 -163
- package/configure/node_modules/@pie-lib/math-input/src/mq/static.jsx +0 -145
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +0 -672
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +0 -457
- package/configure/node_modules/@pie-lib/math-rendering/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +0 -30
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +0 -316
- 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 -123
- 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 -103
- 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 -281
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/package.json +0 -19
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.html +0 -872
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.js +0 -108
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.html +0 -156
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.js +0 -16
- package/configure/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +0 -29
- package/configure/node_modules/@pie-lib/math-rendering/src/index.js +0 -4
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +0 -215
- 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 -235
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.json +0 -862
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.md +0 -639
- package/configure/node_modules/@pie-lib/math-toolbar/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js +0 -53
- 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 -483
- 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 -280
- 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 -173
- package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/package.json +0 -37
- package/configure/node_modules/@pie-lib/math-toolbar/src/done-button.jsx +0 -39
- package/configure/node_modules/@pie-lib/math-toolbar/src/editor-and-pad.jsx +0 -388
- package/configure/node_modules/@pie-lib/math-toolbar/src/index.jsx +0 -202
- package/configure/node_modules/@pie-lib/math-toolbar/src/math-preview.jsx +0 -107
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +0 -937
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +0 -626
- package/configure/node_modules/@pie-lib/render-ui/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/render-ui/README.md +0 -33
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +0 -146
- 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 -134
- 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 -160
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +0 -24
- 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 -102
- 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 -104
- 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 -133
- 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 -162
- 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 -160
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +0 -206
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/package.json +0 -30
- package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +0 -68
- package/configure/node_modules/@pie-lib/render-ui/src/color.js +0 -48
- package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +0 -100
- package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +0 -14
- package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +0 -40
- package/configure/node_modules/@pie-lib/render-ui/src/index.js +0 -27
- 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 -77
- package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +0 -90
- package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +0 -19
- 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/withUndoReset.jsx +0 -118
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/mui-box/index.jsx"],"names":["log","MuiBox","theme","light","palette","type","bottomLineColor","primary","muiBox","paddingTop","spacing","unit","paddingBottom","position","left","right","bottom","height","content","transition","pointerEvents","backgroundColor","transform","focused","children","classes","names","propTypes","PropTypes","oneOfType","arrayOf","node","isRequired","bool"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,GAAG,GAAG,uBAAM,gCAAN,CAAZ;AAEA,IAAMC,MAAM,GAAG,wBAAW,UAAAC,KAAK,EAAI;AACjC,MAAMC,KAAK,GAAGD,KAAK,CAACE,OAAN,CAAcC,IAAd,KAAuB,OAArC;AACA,MAAMC,eAAe,GAAGH,KAAK,GAAG,qBAAH,GAA2B,0BAAxD;AAEAH,EAAAA,GAAG,CAACE,KAAK,CAACE,OAAN,CAAcG,OAAd,CAAsBL,KAAK,CAACE,OAAN,CAAcC,IAAd,IAAsB,OAA5C,CAAD,CAAH;AAEA,SAAO;AACLG,IAAAA,MAAM,EAAE;AACNC,MAAAA,UAAU,EAAEP,KAAK,CAACQ,OAAN,CAAcC,IADpB;AAENC,MAAAA,aAAa,EAAEV,KAAK,CAACQ,OAAN,CAAcC,IAFvB;AAGNE,MAAAA,QAAQ,EAAE,UAHJ;AAIN,kBAAY;AACVC,QAAAA,IAAI,EAAE,CADI;AAEVC,QAAAA,KAAK,EAAE,CAFG;AAGVC,QAAAA,MAAM,EAAE,CAHE;AAIVC,QAAAA,MAAM,EAAE,KAJE;AAKVC,QAAAA,OAAO,EAAE,IALC;AAMVL,QAAAA,QAAQ,EAAE,UANA;AAOVM,QAAAA,UAAU,EAAE,y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,M","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport debug from 'debug';\nimport classNames from 'classnames';\n\nconst log = debug('pie-elements:config-ui:mui-box');\n\nconst MuiBox = withStyles(theme => {\n const light = theme.palette.type === 'light';\n const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n\n log(theme.palette.primary[theme.palette.type || 'light']);\n\n return {\n muiBox: {\n paddingTop: theme.spacing.unit,\n paddingBottom: theme.spacing.unit,\n position: 'relative',\n '&:before': {\n left: 0,\n right: 0,\n bottom: 0,\n height: '1px',\n content: '\"\"',\n position: 'absolute',\n transition: 'background-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',\n pointerEvents: 'none',\n backgroundColor: bottomLineColor\n },\n '&:hover:before': {\n height: '2px'\n },\n '&:after': {\n left: 0,\n right: 0,\n bottom: 0,\n height: '2px',\n content: '\"\"',\n position: 'absolute',\n transform: 'scaleX(0)',\n transition: 'transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms',\n pointerEvents: 'none',\n backgroundColor: theme.palette.primary[theme.palette.type] //'#304ffe'\n }\n },\n focused: {\n '&:after': {\n transform: 'scaleX(1)'\n }\n }\n };\n})(({ children, classes, focused }) => {\n const names = classNames(classes.muiBox, focused && classes.focused);\n\n return <div className={names}>{children}</div>;\n});\n\nMuiBox.propTypes = {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n focused: PropTypes.bool.isRequired\n};\n\nexport default MuiBox;\n"],"file":"index.js"}
|
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = exports.NumberTextFieldCustom = void 0;
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
-
|
|
16
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
|
|
18
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
-
|
|
20
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
-
|
|
22
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
-
|
|
24
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
25
|
-
|
|
26
|
-
var _react = _interopRequireDefault(require("react"));
|
|
27
|
-
|
|
28
|
-
var _TextField = _interopRequireDefault(require("@material-ui/core/TextField"));
|
|
29
|
-
|
|
30
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
31
|
-
|
|
32
|
-
var _styles = require("@material-ui/core/styles");
|
|
33
|
-
|
|
34
|
-
var _isFinite = _interopRequireDefault(require("lodash/isFinite"));
|
|
35
|
-
|
|
36
|
-
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
37
|
-
|
|
38
|
-
var _InputAdornment = _interopRequireDefault(require("@material-ui/core/InputAdornment"));
|
|
39
|
-
|
|
40
|
-
var _Remove = _interopRequireDefault(require("@material-ui/icons/Remove"));
|
|
41
|
-
|
|
42
|
-
var _Add = _interopRequireDefault(require("@material-ui/icons/Add"));
|
|
43
|
-
|
|
44
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
45
|
-
|
|
46
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
47
|
-
|
|
48
|
-
var styles = function styles(theme) {
|
|
49
|
-
return {
|
|
50
|
-
input: {
|
|
51
|
-
'& input[type=number]': {
|
|
52
|
-
'-moz-appearance': 'textfield'
|
|
53
|
-
},
|
|
54
|
-
'& input[type=number]::-webkit-outer-spin-button': {
|
|
55
|
-
'-webkit-appearance': 'none',
|
|
56
|
-
margin: 0
|
|
57
|
-
},
|
|
58
|
-
'& input[type=number]::-webkit-inner-spin-button': {
|
|
59
|
-
'-webkit-appearance': 'none',
|
|
60
|
-
margin: 0
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
iconButton: {
|
|
64
|
-
padding: '2px'
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
var fallbackNumber = function fallbackNumber(min, max) {
|
|
70
|
-
if (!(0, _isFinite["default"])(min) && !(0, _isFinite["default"])(max)) {
|
|
71
|
-
return 0;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (!(0, _isFinite["default"])(min) && (0, _isFinite["default"])(max)) {
|
|
75
|
-
return max;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if ((0, _isFinite["default"])(min)) {
|
|
79
|
-
return min;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
var NumberTextFieldCustom = /*#__PURE__*/function (_React$Component) {
|
|
84
|
-
(0, _inherits2["default"])(NumberTextFieldCustom, _React$Component);
|
|
85
|
-
|
|
86
|
-
var _super = _createSuper(NumberTextFieldCustom);
|
|
87
|
-
|
|
88
|
-
function NumberTextFieldCustom(props) {
|
|
89
|
-
var _this;
|
|
90
|
-
|
|
91
|
-
(0, _classCallCheck2["default"])(this, NumberTextFieldCustom);
|
|
92
|
-
_this = _super.call(this, props);
|
|
93
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "normalizeValueAndIndex", function (customValues, number) {
|
|
94
|
-
var value = _this.clamp(number);
|
|
95
|
-
|
|
96
|
-
var currentIndex = (customValues || []).findIndex(function (val) {
|
|
97
|
-
return val === value;
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
if ((customValues || []).length > 0 && currentIndex === -1) {
|
|
101
|
-
var closestValue = _this.getClosestValue(customValues, value);
|
|
102
|
-
|
|
103
|
-
return {
|
|
104
|
-
value: closestValue.value,
|
|
105
|
-
currentIndex: closestValue.index
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return {
|
|
110
|
-
value: value,
|
|
111
|
-
currentIndex: currentIndex
|
|
112
|
-
};
|
|
113
|
-
});
|
|
114
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getClosestValue", function (customValues, number) {
|
|
115
|
-
return customValues.reduce(function (closest, value, index) {
|
|
116
|
-
return Math.abs(value - number) < Math.abs(closest.value - number) ? {
|
|
117
|
-
value: value,
|
|
118
|
-
index: index
|
|
119
|
-
} : closest;
|
|
120
|
-
}, {
|
|
121
|
-
value: customValues[0],
|
|
122
|
-
index: 0
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onBlur", function (event) {
|
|
126
|
-
var _this$props = _this.props,
|
|
127
|
-
customValues = _this$props.customValues,
|
|
128
|
-
onlyIntegersAllowed = _this$props.onlyIntegersAllowed;
|
|
129
|
-
var value = event.target.value;
|
|
130
|
-
var rawNumber = onlyIntegersAllowed ? parseInt(value) : parseFloat(value);
|
|
131
|
-
|
|
132
|
-
var _this$normalizeValueA = _this.normalizeValueAndIndex(customValues, rawNumber),
|
|
133
|
-
number = _this$normalizeValueA.value,
|
|
134
|
-
currentIndex = _this$normalizeValueA.currentIndex;
|
|
135
|
-
|
|
136
|
-
if (number !== _this.state.value) {
|
|
137
|
-
_this.setState({
|
|
138
|
-
value: number.toString(),
|
|
139
|
-
currentIndex: currentIndex
|
|
140
|
-
}, function () {
|
|
141
|
-
return _this.props.onChange(event, number);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
var _this$normalizeValueA2 = _this.normalizeValueAndIndex(props.customValues, props.value),
|
|
147
|
-
_value = _this$normalizeValueA2.value,
|
|
148
|
-
_currentIndex = _this$normalizeValueA2.currentIndex;
|
|
149
|
-
|
|
150
|
-
_this.state = {
|
|
151
|
-
value: _value,
|
|
152
|
-
currentIndex: _currentIndex
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
if (_value !== props.value) {
|
|
156
|
-
_this.props.onChange({}, _value);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
_this.onChange = _this.onChange.bind((0, _assertThisInitialized2["default"])(_this));
|
|
160
|
-
return _this;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
(0, _createClass2["default"])(NumberTextFieldCustom, [{
|
|
164
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
165
|
-
value: function UNSAFE_componentWillReceiveProps(props) {
|
|
166
|
-
var _this$normalizeValueA3 = this.normalizeValueAndIndex(props.customValues, props.value),
|
|
167
|
-
value = _this$normalizeValueA3.value,
|
|
168
|
-
currentIndex = _this$normalizeValueA3.currentIndex;
|
|
169
|
-
|
|
170
|
-
this.setState({
|
|
171
|
-
value: value,
|
|
172
|
-
currentIndex: currentIndex
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
}, {
|
|
176
|
-
key: "clamp",
|
|
177
|
-
value: function clamp(value) {
|
|
178
|
-
var _this$props2 = this.props,
|
|
179
|
-
min = _this$props2.min,
|
|
180
|
-
max = _this$props2.max,
|
|
181
|
-
customValues = _this$props2.customValues;
|
|
182
|
-
|
|
183
|
-
if ((customValues || []).length > 0) {
|
|
184
|
-
return value;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
if (!(0, _isFinite["default"])(value)) {
|
|
188
|
-
return fallbackNumber(min, max);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if ((0, _isFinite["default"])(max)) {
|
|
192
|
-
value = Math.min(value, max);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
if ((0, _isFinite["default"])(min)) {
|
|
196
|
-
value = Math.max(value, min);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
return value;
|
|
200
|
-
}
|
|
201
|
-
}, {
|
|
202
|
-
key: "onChange",
|
|
203
|
-
value: function onChange(event) {
|
|
204
|
-
var value = event.target.value;
|
|
205
|
-
this.setState({
|
|
206
|
-
value: value
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
}, {
|
|
210
|
-
key: "changeValue",
|
|
211
|
-
value: function changeValue(event) {
|
|
212
|
-
var sign = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
213
|
-
var shouldUpdate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
214
|
-
event.preventDefault();
|
|
215
|
-
var _this$props3 = this.props,
|
|
216
|
-
customValues = _this$props3.customValues,
|
|
217
|
-
step = _this$props3.step,
|
|
218
|
-
onlyIntegersAllowed = _this$props3.onlyIntegersAllowed,
|
|
219
|
-
onChange = _this$props3.onChange;
|
|
220
|
-
var _this$state = this.state,
|
|
221
|
-
currentIndex = _this$state.currentIndex,
|
|
222
|
-
value = _this$state.value;
|
|
223
|
-
var updatedIndex = currentIndex + sign * 1;
|
|
224
|
-
var number;
|
|
225
|
-
|
|
226
|
-
if (customValues.length > 0) {
|
|
227
|
-
if (updatedIndex < 0 || updatedIndex >= customValues.length) {
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
number = customValues[updatedIndex];
|
|
232
|
-
} else {
|
|
233
|
-
var rawNumber = onlyIntegersAllowed ? parseInt(value) : parseFloat(value);
|
|
234
|
-
var updatedValue = (rawNumber * 10000 + step * sign * 10000) / 10000;
|
|
235
|
-
number = this.clamp(updatedValue);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
this.setState({
|
|
239
|
-
value: number.toString(),
|
|
240
|
-
currentIndex: updatedIndex
|
|
241
|
-
}, function () {
|
|
242
|
-
if (shouldUpdate) {
|
|
243
|
-
onChange(event, number);
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
}, {
|
|
248
|
-
key: "render",
|
|
249
|
-
value: function render() {
|
|
250
|
-
var _this2 = this;
|
|
251
|
-
|
|
252
|
-
var _this$props4 = this.props,
|
|
253
|
-
className = _this$props4.className,
|
|
254
|
-
classes = _this$props4.classes,
|
|
255
|
-
label = _this$props4.label,
|
|
256
|
-
disabled = _this$props4.disabled,
|
|
257
|
-
error = _this$props4.error,
|
|
258
|
-
min = _this$props4.min,
|
|
259
|
-
max = _this$props4.max,
|
|
260
|
-
inputClassName = _this$props4.inputClassName,
|
|
261
|
-
disableUnderline = _this$props4.disableUnderline,
|
|
262
|
-
helperText = _this$props4.helperText,
|
|
263
|
-
variant = _this$props4.variant,
|
|
264
|
-
textAlign = _this$props4.textAlign;
|
|
265
|
-
var value = this.state.value;
|
|
266
|
-
var names = (0, _classnames["default"])(className, classes.input);
|
|
267
|
-
return /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
268
|
-
variant: variant,
|
|
269
|
-
inputRef: function inputRef(ref) {
|
|
270
|
-
return _this2.inputRef = ref;
|
|
271
|
-
},
|
|
272
|
-
disabled: disabled,
|
|
273
|
-
label: label,
|
|
274
|
-
value: value,
|
|
275
|
-
error: error,
|
|
276
|
-
helperText: helperText,
|
|
277
|
-
onChange: this.onChange,
|
|
278
|
-
onBlur: this.onBlur,
|
|
279
|
-
onKeyPress: function onKeyPress(e) {
|
|
280
|
-
// once the Enter key is pressed, we force input blur
|
|
281
|
-
if (e.key === 'Enter' && _this2.inputRef) {
|
|
282
|
-
_this2.inputRef.blur();
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
onKeyDown: function onKeyDown(e) {
|
|
286
|
-
if (e.key === 'ArrowUp') {
|
|
287
|
-
_this2.changeValue(e);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
if (e.key === 'ArrowDown') {
|
|
291
|
-
_this2.changeValue(e, -1);
|
|
292
|
-
}
|
|
293
|
-
},
|
|
294
|
-
type: "number",
|
|
295
|
-
className: names,
|
|
296
|
-
InputProps: {
|
|
297
|
-
className: inputClassName,
|
|
298
|
-
disableUnderline: disableUnderline,
|
|
299
|
-
startAdornment: /*#__PURE__*/_react["default"].createElement(_InputAdornment["default"], {
|
|
300
|
-
position: "start"
|
|
301
|
-
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
302
|
-
className: classes.iconButton,
|
|
303
|
-
disabled: disabled,
|
|
304
|
-
onClick: function onClick(e) {
|
|
305
|
-
return _this2.changeValue(e, -1, true);
|
|
306
|
-
}
|
|
307
|
-
}, /*#__PURE__*/_react["default"].createElement(_Remove["default"], {
|
|
308
|
-
fontSize: "small"
|
|
309
|
-
}))),
|
|
310
|
-
endAdornment: /*#__PURE__*/_react["default"].createElement(_InputAdornment["default"], {
|
|
311
|
-
position: "end"
|
|
312
|
-
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
313
|
-
className: classes.iconButton,
|
|
314
|
-
disabled: disabled,
|
|
315
|
-
onClick: function onClick(e) {
|
|
316
|
-
return _this2.changeValue(e, 1, true);
|
|
317
|
-
}
|
|
318
|
-
}, /*#__PURE__*/_react["default"].createElement(_Add["default"], {
|
|
319
|
-
fontSize: "small"
|
|
320
|
-
})))
|
|
321
|
-
},
|
|
322
|
-
inputProps: {
|
|
323
|
-
style: {
|
|
324
|
-
textAlign: textAlign
|
|
325
|
-
},
|
|
326
|
-
min: min,
|
|
327
|
-
max: max
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
}]);
|
|
332
|
-
return NumberTextFieldCustom;
|
|
333
|
-
}(_react["default"].Component);
|
|
334
|
-
|
|
335
|
-
exports.NumberTextFieldCustom = NumberTextFieldCustom;
|
|
336
|
-
(0, _defineProperty2["default"])(NumberTextFieldCustom, "propTypes", {
|
|
337
|
-
classes: _propTypes["default"].object.isRequired,
|
|
338
|
-
className: _propTypes["default"].string,
|
|
339
|
-
customValues: _propTypes["default"].array,
|
|
340
|
-
disabled: _propTypes["default"].bool,
|
|
341
|
-
error: _propTypes["default"].bool,
|
|
342
|
-
inputClassName: _propTypes["default"].string,
|
|
343
|
-
onChange: _propTypes["default"].func.isRequired,
|
|
344
|
-
onlyIntegersAllowed: _propTypes["default"].bool,
|
|
345
|
-
value: _propTypes["default"].number,
|
|
346
|
-
min: _propTypes["default"].number,
|
|
347
|
-
max: _propTypes["default"].number,
|
|
348
|
-
step: _propTypes["default"].number,
|
|
349
|
-
label: _propTypes["default"].string,
|
|
350
|
-
disableUnderline: _propTypes["default"].bool,
|
|
351
|
-
variant: _propTypes["default"].string
|
|
352
|
-
});
|
|
353
|
-
(0, _defineProperty2["default"])(NumberTextFieldCustom, "defaultProps", {
|
|
354
|
-
step: 1,
|
|
355
|
-
customValues: [],
|
|
356
|
-
textAlign: 'center',
|
|
357
|
-
variant: 'standard',
|
|
358
|
-
onlyIntegersAllowed: false
|
|
359
|
-
});
|
|
360
|
-
|
|
361
|
-
var _default = (0, _styles.withStyles)(styles)(NumberTextFieldCustom);
|
|
362
|
-
|
|
363
|
-
exports["default"] = _default;
|
|
364
|
-
//# sourceMappingURL=number-text-field-custom.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/number-text-field-custom.jsx"],"names":["styles","theme","input","margin","iconButton","padding","fallbackNumber","min","max","NumberTextFieldCustom","props","customValues","number","value","clamp","currentIndex","findIndex","val","length","closestValue","getClosestValue","index","reduce","closest","Math","abs","event","onlyIntegersAllowed","target","rawNumber","parseInt","parseFloat","normalizeValueAndIndex","state","setState","toString","onChange","bind","sign","shouldUpdate","preventDefault","step","updatedIndex","updatedValue","className","classes","label","disabled","error","inputClassName","disableUnderline","helperText","variant","textAlign","names","ref","inputRef","onBlur","e","key","blur","changeValue","startAdornment","endAdornment","style","React","Component","PropTypes","object","isRequired","string","array","bool","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAAAC,KAAK;AAAA,SAAK;AACvBC,IAAAA,KAAK,EAAE;AACL,8BAAwB;AACtB,2BAAmB;AADG,OADnB;AAIL,yDAAmD;AACjD,8BAAsB,MAD2B;AAEjDC,QAAAA,MAAM,EAAE;AAFyC,OAJ9C;AAQL,yDAAmD;AACjD,8BAAsB,MAD2B;AAEjDA,QAAAA,MAAM,EAAE;AAFyC;AAR9C,KADgB;AAcvBC,IAAAA,UAAU,EAAE;AACVC,MAAAA,OAAO,EAAE;AADC;AAdW,GAAL;AAAA,CAApB;;AAmBA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB,CAACC,GAAD,EAAMC,GAAN,EAAc;AACnC,MAAI,CAAC,0BAASD,GAAT,CAAD,IAAkB,CAAC,0BAASC,GAAT,CAAvB,EAAsC;AACpC,WAAO,CAAP;AACD;;AAED,MAAI,CAAC,0BAASD,GAAT,CAAD,IAAkB,0BAASC,GAAT,CAAtB,EAAqC;AACnC,WAAOA,GAAP;AACD;;AAED,MAAI,0BAASD,GAAT,CAAJ,EAAmB;AACjB,WAAOA,GAAP;AACD;AACF,CAZD;;IAcaE,qB;;;;;AA2BX,iCAAY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AAIjBxB,EAAAA,QAAQ,EAAEoB,sBAAUK,IAJH;AAKjBxB,EAAAA,KAAK,EAAEmB,sBAAUK,IALA;AAMjBvB,EAAAA,cAAc,EAAEkB,sBAAUG,MANT;AAOjBlC,EAAAA,QAAQ,EAAE+B,sBAAUM,IAAV,CAAeJ,UAPR;AAQjB1C,EAAAA,mBAAmB,EAAEwC,sBAAUK,IARd;AASjB3D,EAAAA,KAAK,EAAEsD,sBAAUvD,MATA;AAUjBL,EAAAA,GAAG,EAAE4D,sBAAUvD,MAVE;AAWjBJ,EAAAA,GAAG,EAAE2D,sBAAUvD,MAXE;AAYjB6B,EAAAA,IAAI,EAAE0B,sBAAUvD,MAZC;AAajBkC,EAAAA,KAAK,EAAEqB,sBAAUG,MAbA;AAcjBpB,EAAAA,gBAAgB,EAAEiB,sBAAUK,IAdX;AAejBpB,EAAAA,OAAO,EAAEe,sBAAUG;AAfF,C;iCADR7D,qB,kBAmBW;AACpBgC,EAAAA,IAAI,EAAE,CADc;AAEpB9B,EAAAA,YAAY,EAAE,EAFM;AAGpB0C,EAAAA,SAAS,EAAE,QAHS;AAIpBD,EAAAA,OAAO,EAAE,UAJW;AAKpBzB,EAAAA,mBAAmB,EAAE;AALD,C;;eAoNT,wBAAW3B,MAAX,EAAmBS,qBAAnB,C","sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport TextField from '@material-ui/core/TextField';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport isFinite from 'lodash/isFinite';\nimport IconButton from '@material-ui/core/IconButton';\nimport InputAdornment from '@material-ui/core/InputAdornment';\nimport Remove from '@material-ui/icons/Remove';\nimport Add from '@material-ui/icons/Add';\n\nconst styles = theme => ({\n input: {\n '& input[type=number]': {\n '-moz-appearance': 'textfield'\n },\n '& input[type=number]::-webkit-outer-spin-button': {\n '-webkit-appearance': 'none',\n margin: 0\n },\n '& input[type=number]::-webkit-inner-spin-button': {\n '-webkit-appearance': 'none',\n margin: 0\n }\n },\n iconButton: {\n padding: '2px'\n }\n});\n\nconst fallbackNumber = (min, max) => {\n if (!isFinite(min) && !isFinite(max)) {\n return 0;\n }\n\n if (!isFinite(min) && isFinite(max)) {\n return max;\n }\n\n if (isFinite(min)) {\n return min;\n }\n};\n\nexport class NumberTextFieldCustom extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n customValues: PropTypes.array,\n disabled: PropTypes.bool,\n error: PropTypes.bool,\n inputClassName: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n onlyIntegersAllowed: PropTypes.bool,\n value: PropTypes.number,\n min: PropTypes.number,\n max: PropTypes.number,\n step: PropTypes.number,\n label: PropTypes.string,\n disableUnderline: PropTypes.bool,\n variant: PropTypes.string\n };\n\n static defaultProps = {\n step: 1,\n customValues: [],\n textAlign: 'center',\n variant: 'standard',\n onlyIntegersAllowed: false\n };\n\n constructor(props) {\n super(props);\n\n const { value, currentIndex } = this.normalizeValueAndIndex(props.customValues, props.value);\n\n this.state = {\n value,\n currentIndex\n };\n\n if (value !== props.value) {\n this.props.onChange({}, value);\n }\n\n this.onChange = this.onChange.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(props) {\n const { value, currentIndex } = this.normalizeValueAndIndex(props.customValues, props.value);\n\n this.setState({ value, currentIndex });\n }\n\n clamp(value) {\n const { min, max, customValues } = this.props;\n\n if ((customValues || []).length > 0) {\n return value;\n }\n\n if (!isFinite(value)) {\n return fallbackNumber(min, max);\n }\n\n if (isFinite(max)) {\n value = Math.min(value, max);\n }\n\n if (isFinite(min)) {\n value = Math.max(value, min);\n }\n\n return value;\n }\n\n normalizeValueAndIndex = (customValues, number) => {\n const value = this.clamp(number);\n const currentIndex = (customValues || []).findIndex(val => val === value);\n\n if ((customValues || []).length > 0 && currentIndex === -1) {\n const closestValue = this.getClosestValue(customValues, value);\n\n return { value: closestValue.value, currentIndex: closestValue.index };\n }\n\n return { value, currentIndex };\n };\n\n getClosestValue = (customValues, number) =>\n customValues.reduce(\n (closest, value, index) =>\n Math.abs(value - number) < Math.abs(closest.value - number) ? { value, index } : closest,\n { value: customValues[0], index: 0 }\n );\n\n onBlur = event => {\n const { customValues, onlyIntegersAllowed } = this.props;\n const { value } = event.target;\n const rawNumber = onlyIntegersAllowed ? parseInt(value) : parseFloat(value);\n\n const { value: number, currentIndex } = this.normalizeValueAndIndex(customValues, rawNumber);\n\n if (number !== this.state.value) {\n this.setState(\n {\n value: number.toString(),\n currentIndex\n },\n () => this.props.onChange(event, number)\n );\n }\n };\n\n onChange(event) {\n const { value } = event.target;\n\n this.setState({ value });\n }\n\n changeValue(event, sign = 1, shouldUpdate = false) {\n event.preventDefault();\n\n const { customValues, step, onlyIntegersAllowed, onChange } = this.props;\n const { currentIndex, value } = this.state;\n const updatedIndex = currentIndex + sign * 1;\n let number;\n\n if (customValues.length > 0) {\n if (updatedIndex < 0 || updatedIndex >= customValues.length) {\n return;\n }\n\n number = customValues[updatedIndex];\n } else {\n const rawNumber = onlyIntegersAllowed ? parseInt(value) : parseFloat(value);\n const updatedValue = (rawNumber * 10000 + step * sign * 10000) / 10000;\n number = this.clamp(updatedValue);\n }\n\n this.setState(\n {\n value: number.toString(),\n currentIndex: updatedIndex\n },\n () => {\n if (shouldUpdate) {\n onChange(event, number);\n }\n }\n );\n }\n\n render() {\n const {\n className,\n classes,\n label,\n disabled,\n error,\n min,\n max,\n inputClassName,\n disableUnderline,\n helperText,\n variant,\n textAlign\n } = this.props;\n const { value } = this.state;\n const names = classNames(className, classes.input);\n\n return (\n <TextField\n variant={variant}\n inputRef={ref => (this.inputRef = ref)}\n disabled={disabled}\n label={label}\n value={value}\n error={error}\n helperText={helperText}\n onChange={this.onChange}\n onBlur={this.onBlur}\n onKeyPress={e => {\n // once the Enter key is pressed, we force input blur\n if (e.key === 'Enter' && this.inputRef) {\n this.inputRef.blur();\n }\n }}\n onKeyDown={e => {\n if (e.key === 'ArrowUp') {\n this.changeValue(e);\n }\n\n if (e.key === 'ArrowDown') {\n this.changeValue(e, -1);\n }\n }}\n type=\"number\"\n className={names}\n InputProps={{\n className: inputClassName,\n disableUnderline: disableUnderline,\n startAdornment: (\n <InputAdornment position=\"start\">\n <IconButton\n className={classes.iconButton}\n disabled={disabled}\n onClick={e => this.changeValue(e, -1, true)}\n >\n <Remove fontSize=\"small\" />\n </IconButton>\n </InputAdornment>\n ),\n endAdornment: (\n <InputAdornment position=\"end\">\n <IconButton\n className={classes.iconButton}\n disabled={disabled}\n onClick={e => this.changeValue(e, 1, true)}\n >\n <Add fontSize=\"small\" />\n </IconButton>\n </InputAdornment>\n )\n }}\n inputProps={{\n style: { textAlign },\n min,\n max\n }}\n />\n );\n }\n}\n\nexport default withStyles(styles)(NumberTextFieldCustom);\n"],"file":"number-text-field-custom.js"}
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = exports.NumberTextField = void 0;
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
-
|
|
16
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
|
|
18
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
-
|
|
20
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
-
|
|
22
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
-
|
|
24
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
25
|
-
|
|
26
|
-
var _react = _interopRequireDefault(require("react"));
|
|
27
|
-
|
|
28
|
-
var _TextField = _interopRequireDefault(require("@material-ui/core/TextField"));
|
|
29
|
-
|
|
30
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
31
|
-
|
|
32
|
-
var _styles = require("@material-ui/core/styles");
|
|
33
|
-
|
|
34
|
-
var _debug = _interopRequireDefault(require("debug"));
|
|
35
|
-
|
|
36
|
-
var _isFinite = _interopRequireDefault(require("lodash/isFinite"));
|
|
37
|
-
|
|
38
|
-
var _InputAdornment = _interopRequireDefault(require("@material-ui/core/InputAdornment"));
|
|
39
|
-
|
|
40
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
41
|
-
|
|
42
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
43
|
-
|
|
44
|
-
var log = (0, _debug["default"])('@pie-lib:config-ui:number-text-field');
|
|
45
|
-
|
|
46
|
-
var styles = function styles(theme) {
|
|
47
|
-
return {
|
|
48
|
-
root: {
|
|
49
|
-
marginRight: theme.spacing.unit
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
var fallbackNumber = function fallbackNumber(min, max) {
|
|
55
|
-
if (!(0, _isFinite["default"])(min) && !(0, _isFinite["default"])(max)) {
|
|
56
|
-
return 0;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (!(0, _isFinite["default"])(min) && (0, _isFinite["default"])(max)) {
|
|
60
|
-
return max;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if ((0, _isFinite["default"])(min)) {
|
|
64
|
-
return min;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
var NumberTextField = /*#__PURE__*/function (_React$Component) {
|
|
69
|
-
(0, _inherits2["default"])(NumberTextField, _React$Component);
|
|
70
|
-
|
|
71
|
-
var _super = _createSuper(NumberTextField);
|
|
72
|
-
|
|
73
|
-
function NumberTextField(props) {
|
|
74
|
-
var _this;
|
|
75
|
-
|
|
76
|
-
(0, _classCallCheck2["default"])(this, NumberTextField);
|
|
77
|
-
_this = _super.call(this, props);
|
|
78
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onBlur", function (event) {
|
|
79
|
-
var value = event.target.value;
|
|
80
|
-
var rawNumber = parseFloat(value);
|
|
81
|
-
log('rawNumber: ', rawNumber);
|
|
82
|
-
|
|
83
|
-
var number = _this.clamp(rawNumber);
|
|
84
|
-
|
|
85
|
-
log('number: ', number);
|
|
86
|
-
|
|
87
|
-
if (number !== _this.state.value) {
|
|
88
|
-
log('trigger update...');
|
|
89
|
-
|
|
90
|
-
_this.setState({
|
|
91
|
-
value: number.toString()
|
|
92
|
-
}, function () {
|
|
93
|
-
_this.props.onChange(event, number);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "errorMessage", function () {
|
|
98
|
-
var _this$props = _this.props,
|
|
99
|
-
min = _this$props.min,
|
|
100
|
-
max = _this$props.max;
|
|
101
|
-
|
|
102
|
-
if (min && max) {
|
|
103
|
-
return "The value must be between ".concat(min, " and ").concat(max);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
if (min) {
|
|
107
|
-
return "The value must be greater than ".concat(min);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (max) {
|
|
111
|
-
return "The value must be less than ".concat(max);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getError", function () {
|
|
115
|
-
var value = _this.state.value;
|
|
116
|
-
|
|
117
|
-
var _float = parseFloat(value);
|
|
118
|
-
|
|
119
|
-
var clamped = _this.clamp(_float);
|
|
120
|
-
|
|
121
|
-
if (clamped !== _float) {
|
|
122
|
-
return _this.errorMessage();
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
var _value = _this.clamp(props.value);
|
|
127
|
-
|
|
128
|
-
_this.state = {
|
|
129
|
-
value: _value
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
if (_value !== props.value) {
|
|
133
|
-
_this.props.onChange({}, _value);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
_this.onChange = _this.onChange.bind((0, _assertThisInitialized2["default"])(_this));
|
|
137
|
-
return _this;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
(0, _createClass2["default"])(NumberTextField, [{
|
|
141
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
142
|
-
value: function UNSAFE_componentWillReceiveProps(props) {
|
|
143
|
-
var value = this.clamp(props.value);
|
|
144
|
-
this.setState({
|
|
145
|
-
value: value
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
}, {
|
|
149
|
-
key: "clamp",
|
|
150
|
-
value: function clamp(value) {
|
|
151
|
-
if (!(0, _isFinite["default"])(value)) {
|
|
152
|
-
return fallbackNumber(this.props.min, this.props.max);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
var _this$props2 = this.props,
|
|
156
|
-
min = _this$props2.min,
|
|
157
|
-
max = _this$props2.max;
|
|
158
|
-
|
|
159
|
-
if ((0, _isFinite["default"])(max)) {
|
|
160
|
-
value = Math.min(value, max);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
if ((0, _isFinite["default"])(min)) {
|
|
164
|
-
value = Math.max(value, min);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
return value;
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* on Blur (this can be triggered by pressing Enter, see below)
|
|
171
|
-
* we check the entered value and reset it if needed
|
|
172
|
-
*/
|
|
173
|
-
|
|
174
|
-
}, {
|
|
175
|
-
key: "onChange",
|
|
176
|
-
value: function onChange(event) {
|
|
177
|
-
var value = event.target.value;
|
|
178
|
-
this.setState({
|
|
179
|
-
value: value
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
}, {
|
|
183
|
-
key: "render",
|
|
184
|
-
value: function render() {
|
|
185
|
-
var _this2 = this;
|
|
186
|
-
|
|
187
|
-
var _this$props3 = this.props,
|
|
188
|
-
className = _this$props3.className,
|
|
189
|
-
classes = _this$props3.classes,
|
|
190
|
-
label = _this$props3.label,
|
|
191
|
-
disabled = _this$props3.disabled,
|
|
192
|
-
suffix = _this$props3.suffix,
|
|
193
|
-
min = _this$props3.min,
|
|
194
|
-
max = _this$props3.max,
|
|
195
|
-
inputClassName = _this$props3.inputClassName,
|
|
196
|
-
disableUnderline = _this$props3.disableUnderline,
|
|
197
|
-
showErrorWhenOutsideRange = _this$props3.showErrorWhenOutsideRange,
|
|
198
|
-
variant = _this$props3.variant;
|
|
199
|
-
var names = (0, _classnames["default"])(classes.root, className);
|
|
200
|
-
var error = showErrorWhenOutsideRange && this.getError();
|
|
201
|
-
return /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
202
|
-
variant: variant || 'standard',
|
|
203
|
-
inputRef: function inputRef(ref) {
|
|
204
|
-
_this2.inputRef = ref;
|
|
205
|
-
},
|
|
206
|
-
disabled: disabled,
|
|
207
|
-
label: label,
|
|
208
|
-
value: this.state.value,
|
|
209
|
-
error: !!error,
|
|
210
|
-
helperText: error,
|
|
211
|
-
onChange: this.onChange,
|
|
212
|
-
onBlur: this.onBlur,
|
|
213
|
-
onKeyPress: function onKeyPress(e) {
|
|
214
|
-
// once the Enter key is pressed, we force input blur
|
|
215
|
-
if (e.key === 'Enter' && _this2.inputRef) {
|
|
216
|
-
_this2.inputRef.blur();
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
type: "number",
|
|
220
|
-
className: names,
|
|
221
|
-
InputLabelProps: {
|
|
222
|
-
shrink: true
|
|
223
|
-
},
|
|
224
|
-
InputProps: {
|
|
225
|
-
endAdornment: suffix && /*#__PURE__*/_react["default"].createElement(_InputAdornment["default"], {
|
|
226
|
-
position: "end"
|
|
227
|
-
}, suffix),
|
|
228
|
-
className: inputClassName,
|
|
229
|
-
disableUnderline: disableUnderline
|
|
230
|
-
},
|
|
231
|
-
inputProps: {
|
|
232
|
-
min: min,
|
|
233
|
-
max: max
|
|
234
|
-
},
|
|
235
|
-
margin: "normal"
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
}]);
|
|
239
|
-
return NumberTextField;
|
|
240
|
-
}(_react["default"].Component);
|
|
241
|
-
|
|
242
|
-
exports.NumberTextField = NumberTextField;
|
|
243
|
-
(0, _defineProperty2["default"])(NumberTextField, "propTypes", {
|
|
244
|
-
disabled: _propTypes["default"].bool,
|
|
245
|
-
classes: _propTypes["default"].object.isRequired,
|
|
246
|
-
className: _propTypes["default"].string,
|
|
247
|
-
inputClassName: _propTypes["default"].string,
|
|
248
|
-
onChange: _propTypes["default"].func.isRequired,
|
|
249
|
-
value: _propTypes["default"].number,
|
|
250
|
-
min: _propTypes["default"].number,
|
|
251
|
-
max: _propTypes["default"].number,
|
|
252
|
-
label: _propTypes["default"].string,
|
|
253
|
-
suffix: _propTypes["default"].string,
|
|
254
|
-
showErrorWhenOutsideRange: _propTypes["default"].bool,
|
|
255
|
-
disableUnderline: _propTypes["default"].bool,
|
|
256
|
-
variant: _propTypes["default"].string
|
|
257
|
-
});
|
|
258
|
-
(0, _defineProperty2["default"])(NumberTextField, "defaultProps", {
|
|
259
|
-
showErrorWhenOutsideRange: false
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
var _default = (0, _styles.withStyles)(styles)(NumberTextField);
|
|
263
|
-
|
|
264
|
-
exports["default"] = _default;
|
|
265
|
-
//# sourceMappingURL=number-text-field.js.map
|