@pie-element/graphing 4.1.3 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/configure/CHANGELOG.md +31 -0
- package/configure/lib/configure.js +19 -4
- package/configure/lib/configure.js.map +1 -1
- package/configure/lib/correct-response.js +6 -0
- package/configure/lib/correct-response.js.map +1 -1
- package/configure/lib/defaults.js +203 -5
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/graphing-config.js +131 -35
- package/configure/lib/graphing-config.js.map +1 -1
- package/configure/package.json +4 -4
- package/controller/CHANGELOG.md +13 -0
- package/controller/lib/defaults.js +2 -0
- package/controller/lib/defaults.js.map +1 -1
- package/controller/package.json +1 -1
- package/docs/config-schema.json +632 -4
- package/docs/config-schema.json.md +412 -2
- package/docs/pie-schema.json +394 -130
- package/docs/pie-schema.json.md +259 -82
- package/lib/main.js +6 -0
- package/lib/main.js.map +1 -1
- package/package.json +5 -5
package/docs/pie-schema.json.md
CHANGED
|
@@ -217,6 +217,14 @@ Indicates teacher instructions
|
|
|
217
217
|
|
|
218
218
|
Indicates graph title
|
|
219
219
|
|
|
220
|
+
# `labelsEnabled` (boolean)
|
|
221
|
+
|
|
222
|
+
Indicates if the graph labels are displayed
|
|
223
|
+
|
|
224
|
+
# `titleEnabled` (boolean)
|
|
225
|
+
|
|
226
|
+
Indicates if the graph title is displayed
|
|
227
|
+
|
|
220
228
|
# `toolbarTools` (array)
|
|
221
229
|
|
|
222
230
|
Indicates the tools that have to be displayed in toolbar
|
|
@@ -447,9 +455,258 @@ Indicates the maximum value for the graph width and height
|
|
|
447
455
|
|
|
448
456
|
Indicates the increase/decrease value for the graph width and height
|
|
449
457
|
|
|
450
|
-
## `
|
|
458
|
+
## `GridConfigurationsProp` (object)
|
|
459
|
+
|
|
460
|
+
Properties of the `GridConfigurationsProp` object:
|
|
461
|
+
|
|
462
|
+
### `label` (string)
|
|
463
|
+
|
|
464
|
+
Indicates the label for the configuration
|
|
465
|
+
|
|
466
|
+
### `arrows` (object)
|
|
467
|
+
|
|
468
|
+
Properties of the `arrows` object:
|
|
469
|
+
|
|
470
|
+
#### `left` (boolean, required)
|
|
471
|
+
|
|
472
|
+
Indicates if left arrow is enabled
|
|
473
|
+
|
|
474
|
+
#### `right` (boolean, required)
|
|
475
|
+
|
|
476
|
+
Indicates if right arrow is enabled
|
|
477
|
+
|
|
478
|
+
#### `up` (boolean, required)
|
|
479
|
+
|
|
480
|
+
Indicates if up arrow is enabled
|
|
481
|
+
|
|
482
|
+
#### `down` (boolean, required)
|
|
483
|
+
|
|
484
|
+
Indicates if down arrow is enabled
|
|
485
|
+
|
|
486
|
+
### `domain` (object, required)
|
|
487
|
+
|
|
488
|
+
Properties of the `domain` object:
|
|
489
|
+
|
|
490
|
+
#### `min` (number, required)
|
|
491
|
+
|
|
492
|
+
Min value
|
|
493
|
+
|
|
494
|
+
#### `max` (number, required)
|
|
495
|
+
|
|
496
|
+
Max value
|
|
497
|
+
|
|
498
|
+
#### `padding` (number, required)
|
|
499
|
+
|
|
500
|
+
Padding value
|
|
501
|
+
|
|
502
|
+
#### `step` (number, required)
|
|
503
|
+
|
|
504
|
+
Step value
|
|
505
|
+
|
|
506
|
+
#### `labelStep` (number, required)
|
|
507
|
+
|
|
508
|
+
Label step value
|
|
509
|
+
|
|
510
|
+
#### `axisLabel` (string, required)
|
|
511
|
+
|
|
512
|
+
Axis Label
|
|
513
|
+
|
|
514
|
+
### `graph` (object, required)
|
|
515
|
+
|
|
516
|
+
Properties of the `graph` object:
|
|
517
|
+
|
|
518
|
+
#### `width` (number, required)
|
|
519
|
+
|
|
520
|
+
Width for graph representation
|
|
521
|
+
|
|
522
|
+
#### `height` (number, required)
|
|
523
|
+
|
|
524
|
+
Height for graph representation
|
|
525
|
+
|
|
526
|
+
### `includeAxes` (boolean)
|
|
527
|
+
|
|
528
|
+
Indicates if the graph axes and labels are enabled
|
|
529
|
+
|
|
530
|
+
### `labels` (object)
|
|
531
|
+
|
|
532
|
+
Properties of the `labels` object:
|
|
533
|
+
|
|
534
|
+
#### `top` (string, required)
|
|
535
|
+
|
|
536
|
+
Label for top side of the graph
|
|
537
|
+
|
|
538
|
+
#### `bottom` (string, required)
|
|
539
|
+
|
|
540
|
+
Label for bottom side of the graph
|
|
541
|
+
|
|
542
|
+
#### `left` (string, required)
|
|
543
|
+
|
|
544
|
+
Label for left side of the graph
|
|
545
|
+
|
|
546
|
+
#### `right` (string, required)
|
|
547
|
+
|
|
548
|
+
Label for right side of the graph
|
|
549
|
+
|
|
550
|
+
### `padding` (boolean)
|
|
451
551
|
|
|
452
|
-
|
|
552
|
+
Indicates if padding is enabled
|
|
553
|
+
|
|
554
|
+
### `range` (object, required)
|
|
555
|
+
|
|
556
|
+
Properties of the `range` object:
|
|
557
|
+
|
|
558
|
+
#### `min` (number, required)
|
|
559
|
+
|
|
560
|
+
Min value
|
|
561
|
+
|
|
562
|
+
#### `max` (number, required)
|
|
563
|
+
|
|
564
|
+
Max value
|
|
565
|
+
|
|
566
|
+
#### `padding` (number, required)
|
|
567
|
+
|
|
568
|
+
Padding value
|
|
569
|
+
|
|
570
|
+
#### `step` (number, required)
|
|
571
|
+
|
|
572
|
+
Step value
|
|
573
|
+
|
|
574
|
+
#### `labelStep` (number, required)
|
|
575
|
+
|
|
576
|
+
Label step value
|
|
577
|
+
|
|
578
|
+
#### `axisLabel` (string, required)
|
|
579
|
+
|
|
580
|
+
Axis Label
|
|
581
|
+
|
|
582
|
+
### `standardGrid` (boolean)
|
|
583
|
+
|
|
584
|
+
Indicates if some domain values will be synched to the range values
|
|
585
|
+
|
|
586
|
+
### `title` (string)
|
|
587
|
+
|
|
588
|
+
Indicates graph title
|
|
589
|
+
|
|
590
|
+
## `Arrows` (object)
|
|
591
|
+
|
|
592
|
+
Properties of the `Arrows` object:
|
|
593
|
+
|
|
594
|
+
### `left` (boolean, required)
|
|
595
|
+
|
|
596
|
+
Indicates if left arrow is enabled
|
|
597
|
+
|
|
598
|
+
### `right` (boolean, required)
|
|
599
|
+
|
|
600
|
+
Indicates if right arrow is enabled
|
|
601
|
+
|
|
602
|
+
### `up` (boolean, required)
|
|
603
|
+
|
|
604
|
+
Indicates if up arrow is enabled
|
|
605
|
+
|
|
606
|
+
### `down` (boolean, required)
|
|
607
|
+
|
|
608
|
+
Indicates if down arrow is enabled
|
|
609
|
+
|
|
610
|
+
## `GraphSettings` (object)
|
|
611
|
+
|
|
612
|
+
Properties of the `GraphSettings` object:
|
|
613
|
+
|
|
614
|
+
### `min` (number, required)
|
|
615
|
+
|
|
616
|
+
Min value
|
|
617
|
+
|
|
618
|
+
### `max` (number, required)
|
|
619
|
+
|
|
620
|
+
Max value
|
|
621
|
+
|
|
622
|
+
### `padding` (number, required)
|
|
623
|
+
|
|
624
|
+
Padding value
|
|
625
|
+
|
|
626
|
+
### `step` (number, required)
|
|
627
|
+
|
|
628
|
+
Step value
|
|
629
|
+
|
|
630
|
+
### `labelStep` (number, required)
|
|
631
|
+
|
|
632
|
+
Label step value
|
|
633
|
+
|
|
634
|
+
### `axisLabel` (string, required)
|
|
635
|
+
|
|
636
|
+
Axis Label
|
|
637
|
+
|
|
638
|
+
## `Graph` (object)
|
|
639
|
+
|
|
640
|
+
Properties of the `Graph` object:
|
|
641
|
+
|
|
642
|
+
### `width` (number, required)
|
|
643
|
+
|
|
644
|
+
Width for graph representation
|
|
645
|
+
|
|
646
|
+
### `height` (number, required)
|
|
647
|
+
|
|
648
|
+
Height for graph representation
|
|
649
|
+
|
|
650
|
+
## `Labels` (object)
|
|
651
|
+
|
|
652
|
+
Properties of the `Labels` object:
|
|
653
|
+
|
|
654
|
+
### `top` (string, required)
|
|
655
|
+
|
|
656
|
+
Label for top side of the graph
|
|
657
|
+
|
|
658
|
+
### `bottom` (string, required)
|
|
659
|
+
|
|
660
|
+
Label for bottom side of the graph
|
|
661
|
+
|
|
662
|
+
### `left` (string, required)
|
|
663
|
+
|
|
664
|
+
Label for left side of the graph
|
|
665
|
+
|
|
666
|
+
### `right` (string, required)
|
|
667
|
+
|
|
668
|
+
Label for right side of the graph
|
|
669
|
+
|
|
670
|
+
## `LabelsConfigProp` (object)
|
|
671
|
+
|
|
672
|
+
Properties of the `LabelsConfigProp` object:
|
|
673
|
+
|
|
674
|
+
### `top` (string)
|
|
675
|
+
|
|
676
|
+
Indicates the placeholder for the top label
|
|
677
|
+
|
|
678
|
+
### `right` (string)
|
|
679
|
+
|
|
680
|
+
Indicates the placeholder for the right label
|
|
681
|
+
|
|
682
|
+
### `bottom` (string)
|
|
683
|
+
|
|
684
|
+
Indicates the placeholder for the bottom label
|
|
685
|
+
|
|
686
|
+
### `left` (string)
|
|
687
|
+
|
|
688
|
+
Indicates the placeholder for the left label
|
|
689
|
+
|
|
690
|
+
### `settings` (boolean)
|
|
691
|
+
|
|
692
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
693
|
+
|
|
694
|
+
### `label` (string)
|
|
695
|
+
|
|
696
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
697
|
+
|
|
698
|
+
### `enabled` (boolean)
|
|
699
|
+
|
|
700
|
+
Indicates the value of the item if it affects config-ui
|
|
701
|
+
(eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)
|
|
702
|
+
|
|
703
|
+
## `TitleConfigProp` (object)
|
|
704
|
+
|
|
705
|
+
Properties of the `TitleConfigProp` object:
|
|
706
|
+
|
|
707
|
+
### `placeholder` (string)
|
|
708
|
+
|
|
709
|
+
Indicates the placeholder for the title label
|
|
453
710
|
|
|
454
711
|
### `settings` (boolean)
|
|
455
712
|
|
|
@@ -631,83 +888,3 @@ Indicates x coordinate
|
|
|
631
888
|
### `y` (number, required)
|
|
632
889
|
|
|
633
890
|
Indicates y coordinate
|
|
634
|
-
|
|
635
|
-
## `Arrows` (object)
|
|
636
|
-
|
|
637
|
-
Properties of the `Arrows` object:
|
|
638
|
-
|
|
639
|
-
### `left` (boolean, required)
|
|
640
|
-
|
|
641
|
-
Indicates if left arrow is enabled
|
|
642
|
-
|
|
643
|
-
### `right` (boolean, required)
|
|
644
|
-
|
|
645
|
-
Indicates if right arrow is enabled
|
|
646
|
-
|
|
647
|
-
### `up` (boolean, required)
|
|
648
|
-
|
|
649
|
-
Indicates if up arrow is enabled
|
|
650
|
-
|
|
651
|
-
### `down` (boolean, required)
|
|
652
|
-
|
|
653
|
-
Indicates if down arrow is enabled
|
|
654
|
-
|
|
655
|
-
## `GraphSettings` (object)
|
|
656
|
-
|
|
657
|
-
Properties of the `GraphSettings` object:
|
|
658
|
-
|
|
659
|
-
### `min` (number, required)
|
|
660
|
-
|
|
661
|
-
Min value
|
|
662
|
-
|
|
663
|
-
### `max` (number, required)
|
|
664
|
-
|
|
665
|
-
Max value
|
|
666
|
-
|
|
667
|
-
### `padding` (number, required)
|
|
668
|
-
|
|
669
|
-
Padding value
|
|
670
|
-
|
|
671
|
-
### `step` (number, required)
|
|
672
|
-
|
|
673
|
-
Step value
|
|
674
|
-
|
|
675
|
-
### `labelStep` (number, required)
|
|
676
|
-
|
|
677
|
-
Label step value
|
|
678
|
-
|
|
679
|
-
### `axisLabel` (string, required)
|
|
680
|
-
|
|
681
|
-
Axis Label
|
|
682
|
-
|
|
683
|
-
## `Graph` (object)
|
|
684
|
-
|
|
685
|
-
Properties of the `Graph` object:
|
|
686
|
-
|
|
687
|
-
### `width` (number, required)
|
|
688
|
-
|
|
689
|
-
Width for graph representation
|
|
690
|
-
|
|
691
|
-
### `height` (number, required)
|
|
692
|
-
|
|
693
|
-
Height for graph representation
|
|
694
|
-
|
|
695
|
-
## `Labels` (object)
|
|
696
|
-
|
|
697
|
-
Properties of the `Labels` object:
|
|
698
|
-
|
|
699
|
-
### `top` (string, required)
|
|
700
|
-
|
|
701
|
-
Label for top side of the graph
|
|
702
|
-
|
|
703
|
-
### `bottom` (string, required)
|
|
704
|
-
|
|
705
|
-
Label for bottom side of the graph
|
|
706
|
-
|
|
707
|
-
### `left` (string, required)
|
|
708
|
-
|
|
709
|
-
Label for left side of the graph
|
|
710
|
-
|
|
711
|
-
### `right` (string, required)
|
|
712
|
-
|
|
713
|
-
Label for right side of the graph
|
package/lib/main.js
CHANGED
|
@@ -90,12 +90,14 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
90
90
|
disabled = _ref2.disabled,
|
|
91
91
|
domain = _ref2.domain,
|
|
92
92
|
labels = _ref2.labels,
|
|
93
|
+
labelsEnabled = _ref2.labelsEnabled,
|
|
93
94
|
prompt = _ref2.prompt,
|
|
94
95
|
range = _ref2.range,
|
|
95
96
|
rationale = _ref2.rationale,
|
|
96
97
|
size = _ref2.size,
|
|
97
98
|
showToggle = _ref2.showToggle,
|
|
98
99
|
title = _ref2.title,
|
|
100
|
+
titleEnabled = _ref2.titleEnabled,
|
|
99
101
|
teacherInstructions = _ref2.teacherInstructions,
|
|
100
102
|
toolbarTools = _ref2.toolbarTools;
|
|
101
103
|
|
|
@@ -143,11 +145,15 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
143
145
|
coordinatesOnHover: coordinatesOnHover,
|
|
144
146
|
defaultTool: defaultTool,
|
|
145
147
|
disabled: disabled,
|
|
148
|
+
disabledLabels: true,
|
|
149
|
+
disabledTitle: true,
|
|
146
150
|
domain: domain,
|
|
147
151
|
labels: labels,
|
|
148
152
|
marks: marks,
|
|
149
153
|
onChangeMarks: onAnswersChange,
|
|
150
154
|
range: range,
|
|
155
|
+
showLabels: labelsEnabled,
|
|
156
|
+
showTitle: titleEnabled,
|
|
151
157
|
size: size,
|
|
152
158
|
title: title,
|
|
153
159
|
toolbarTools: toolbarTools
|
package/lib/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["Main","showingCorrect","setState","props","model","classes","onAnswersChange","session","state","answer","answersCorrected","arrows","backgroundMarks","coordinatesOnHover","correctResponse","defaultTool","disabled","domain","labels","prompt","range","rationale","size","showToggle","title","teacherInstructions","toolbarTools","marks","mainContainer","toggleCorrect","includeArrows","map","i","correctness","hidden","visible","React","Component","PropTypes","object","isRequired","func","styles","theme","padding","spacing","unit","color","text","backgroundColor","background"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;IAEaA,I;;;;;;;;;;;;;;;8FAYH;AAAEC,MAAAA,cAAc,EAAE;AAAlB,K;sGAEQ,UAAAA,cAAc;AAAA,aAAI,MAAKC,QAAL,CAAc;AAAED,QAAAA,cAAc,EAAdA;AAAF,OAAd,CAAJ;AAAA,K;;;;;;WAE9B,kBAAS;AACP,wBAAqD,KAAKE,KAA1D;AAAA,UAAQC,KAAR,eAAQA,KAAR;AAAA,UAAeC,OAAf,eAAeA,OAAf;AAAA,UAAwBC,eAAxB,eAAwBA,eAAxB;AAAA,UAAyCC,OAAzC,eAAyCA,OAAzC;AACA,UAAQN,cAAR,GAA2B,KAAKO,KAAhC,CAAQP,cAAR;;AACA,iBAAmBM,OAAO,IAAI,EAA9B;AAAA,UAAQE,MAAR,QAAQA,MAAR;;AACA,
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["Main","showingCorrect","setState","props","model","classes","onAnswersChange","session","state","answer","answersCorrected","arrows","backgroundMarks","coordinatesOnHover","correctResponse","defaultTool","disabled","domain","labels","labelsEnabled","prompt","range","rationale","size","showToggle","title","titleEnabled","teacherInstructions","toolbarTools","marks","mainContainer","toggleCorrect","includeArrows","map","i","correctness","hidden","visible","React","Component","PropTypes","object","isRequired","func","styles","theme","padding","spacing","unit","color","text","backgroundColor","background"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;IAEaA,I;;;;;;;;;;;;;;;8FAYH;AAAEC,MAAAA,cAAc,EAAE;AAAlB,K;sGAEQ,UAAAA,cAAc;AAAA,aAAI,MAAKC,QAAL,CAAc;AAAED,QAAAA,cAAc,EAAdA;AAAF,O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AAWR,MAAX,EAAmB5C,IAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { GraphContainer } from '@pie-lib/graphing';\nimport {color, Collapsible, hasText, PreviewPrompt} from '@pie-lib/render-ui';\nimport CorrectAnswerToggle from '@pie-lib/correct-answer-toggle';\n\nexport class Main extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n model: PropTypes.object.isRequired,\n session: PropTypes.object.isRequired,\n onAnswersChange: PropTypes.func\n };\n\n static defaultProps = {\n classes: {}\n };\n\n state = { showingCorrect: false };\n\n toggleCorrect = showingCorrect => this.setState({ showingCorrect });\n\n render() {\n const { model, classes, onAnswersChange, session } = this.props;\n const { showingCorrect } = this.state;\n const { answer } = session || {};\n const {\n answersCorrected,\n arrows,\n backgroundMarks,\n coordinatesOnHover,\n correctResponse,\n defaultTool,\n disabled,\n domain,\n labels,\n labelsEnabled,\n prompt,\n range,\n rationale,\n size,\n showToggle,\n title,\n titleEnabled,\n teacherInstructions,\n toolbarTools\n } = model || {};\n const marks = answersCorrected || answer || [];\n\n return (\n <div className={classes.mainContainer}>\n <CorrectAnswerToggle\n show={showToggle}\n toggled={showingCorrect}\n onToggle={this.toggleCorrect}\n />\n\n {(showingCorrect && showToggle) && (\n <GraphContainer\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={backgroundMarks}\n coordinatesOnHover={coordinatesOnHover}\n disabled={true}\n domain={domain}\n labels={labels}\n marks={correctResponse.map(i => ({ ...i, correctness: 'correct' }))}\n onChangeMarks={onAnswersChange}\n range={range}\n size={size}\n title={title}\n toolbarTools={toolbarTools}\n />\n )}\n\n {\n teacherInstructions && hasText(teacherInstructions) && (\n <React.Fragment>\n <Collapsible labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}>\n <PreviewPrompt prompt={teacherInstructions} />\n </Collapsible>\n <br />\n </React.Fragment>\n )\n }\n\n {prompt && (\n <React.Fragment>\n <PreviewPrompt className=\"prompt\" prompt={prompt} />\n <br />\n </React.Fragment>\n )}\n\n <GraphContainer\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={backgroundMarks}\n coordinatesOnHover={coordinatesOnHover}\n defaultTool={defaultTool}\n disabled={disabled}\n disabledLabels={true}\n disabledTitle={true}\n domain={domain}\n labels={labels}\n marks={marks}\n onChangeMarks={onAnswersChange}\n range={range}\n showLabels={labelsEnabled}\n showTitle={titleEnabled}\n size={size}\n title={title}\n toolbarTools={toolbarTools}\n />\n\n <br />\n\n {\n rationale && hasText(rationale) && (\n <Collapsible labels={{ hidden: 'Show Rationale', visible: 'Hide Rationale' }}>\n <PreviewPrompt prompt={rationale} />\n </Collapsible>\n )\n }\n </div>\n );\n }\n}\n\nconst styles = theme => ({\n mainContainer: {\n padding: theme.spacing.unit,\n color: color.text(),\n backgroundColor: color.background()\n }\n});\n\nexport default withStyles(styles)(Main);\n"],"file":"main.js"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "4.
|
|
7
|
+
"version": "4.3.0",
|
|
8
8
|
"description": "",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@material-ui/core": "^3.9.2",
|
|
15
15
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
16
|
-
"@pie-lib/correct-answer-toggle": "2.3.
|
|
17
|
-
"@pie-lib/graphing": "^2.
|
|
16
|
+
"@pie-lib/correct-answer-toggle": "2.3.43",
|
|
17
|
+
"@pie-lib/graphing": "^2.10.0",
|
|
18
18
|
"@pie-lib/math-rendering": "^2.4.5",
|
|
19
|
-
"@pie-lib/render-ui": "^4.13.
|
|
19
|
+
"@pie-lib/render-ui": "^4.13.3",
|
|
20
20
|
"classnames": "^2.2.5",
|
|
21
21
|
"debug": "^4.1.1",
|
|
22
22
|
"react": "^16.8.1",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"author": "",
|
|
26
26
|
"license": "ISC",
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "ede3dabf5cc1cb5c07cc275f2b27ac3e4e9eecae",
|
|
28
28
|
"main": "lib/index.js",
|
|
29
29
|
"module": "src/index.js"
|
|
30
30
|
}
|