@pie-lib/mask-markup 1.33.3-next.2 → 1.33.4-next.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +6 -76
  2. package/lib/__tests__/drag-in-the-blank.test.js +129 -0
  3. package/lib/__tests__/index.test.js +42 -0
  4. package/lib/__tests__/mask.test.js +163 -0
  5. package/lib/__tests__/serialization.test.js +44 -0
  6. package/lib/__tests__/utils.js +14 -0
  7. package/lib/__tests__/with-mask.test.js +110 -0
  8. package/lib/choices/__tests__/index.test.js +101 -0
  9. package/lib/choices/choice.js +99 -204
  10. package/lib/choices/choice.js.map +1 -1
  11. package/lib/choices/index.js +22 -54
  12. package/lib/choices/index.js.map +1 -1
  13. package/lib/componentize.js +2 -6
  14. package/lib/componentize.js.map +1 -1
  15. package/lib/components/__tests__/blank.test.js +189 -0
  16. package/lib/components/__tests__/correct-input.test.js +132 -0
  17. package/lib/components/__tests__/dropdown.test.js +134 -0
  18. package/lib/components/__tests__/input.test.js +129 -0
  19. package/lib/components/blank.js +304 -362
  20. package/lib/components/blank.js.map +1 -1
  21. package/lib/components/correct-input.js +42 -66
  22. package/lib/components/correct-input.js.map +1 -1
  23. package/lib/components/dropdown.js +219 -258
  24. package/lib/components/dropdown.js.map +1 -1
  25. package/lib/components/input.js +11 -18
  26. package/lib/components/input.js.map +1 -1
  27. package/lib/constructed-response.js +39 -53
  28. package/lib/constructed-response.js.map +1 -1
  29. package/lib/customizable.js +6 -10
  30. package/lib/customizable.js.map +1 -1
  31. package/lib/drag-in-the-blank.js +141 -106
  32. package/lib/drag-in-the-blank.js.map +1 -1
  33. package/lib/index.js +1 -8
  34. package/lib/index.js.map +1 -1
  35. package/lib/inline-dropdown.js +5 -13
  36. package/lib/inline-dropdown.js.map +1 -1
  37. package/lib/mask.js +61 -119
  38. package/lib/mask.js.map +1 -1
  39. package/lib/serialization.js +9 -49
  40. package/lib/serialization.js.map +1 -1
  41. package/lib/with-mask.js +31 -59
  42. package/lib/with-mask.js.map +1 -1
  43. package/package.json +12 -20
  44. package/src/__tests__/drag-in-the-blank.test.js +66 -26
  45. package/src/__tests__/mask.test.js +147 -112
  46. package/src/__tests__/with-mask.test.js +44 -19
  47. package/src/choices/__tests__/index.test.js +38 -25
  48. package/src/choices/choice.jsx +86 -153
  49. package/src/choices/index.jsx +9 -3
  50. package/src/components/__tests__/blank.test.js +92 -156
  51. package/src/components/__tests__/correct-input.test.js +60 -19
  52. package/src/components/__tests__/dropdown.test.js +61 -19
  53. package/src/components/__tests__/input.test.js +72 -20
  54. package/src/components/blank.jsx +273 -272
  55. package/src/components/correct-input.jsx +33 -39
  56. package/src/components/dropdown.jsx +173 -161
  57. package/src/constructed-response.jsx +22 -18
  58. package/src/drag-in-the-blank.jsx +131 -42
  59. package/src/mask.jsx +38 -29
  60. package/src/with-mask.jsx +7 -4
  61. package/esm/index.css +0 -847
  62. package/esm/index.js +0 -195939
  63. package/esm/index.js.map +0 -1
  64. package/esm/package.json +0 -3
  65. package/src/__tests__/__snapshots__/drag-in-the-blank.test.js.snap +0 -316
  66. package/src/__tests__/__snapshots__/mask.test.js.snap +0 -55
  67. package/src/__tests__/__snapshots__/with-mask.test.js.snap +0 -62
  68. package/src/choices/__tests__/__snapshots__/index.test.js.snap +0 -209
  69. package/src/components/__tests__/__snapshots__/blank.test.js.snap +0 -111
  70. package/src/components/__tests__/__snapshots__/correct-input.test.js.snap +0 -64
  71. package/src/components/__tests__/__snapshots__/dropdown.test.js.snap +0 -136
  72. package/src/components/__tests__/__snapshots__/input.test.js.snap +0 -34
@@ -1,111 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Blank render renders correctly with default props 1`] = `
4
- <WithStyles(Chip)
5
- className="undefined"
6
- clickable={false}
7
- component="span"
8
- disabled={true}
9
- label={
10
- <React.Fragment>
11
- <span
12
- className=""
13
- >
14
-
15
- </span>
16
- </React.Fragment>
17
- }
18
- style={
19
- Object {
20
- "height": 0,
21
- "minHeight": 32,
22
- "minWidth": 90,
23
- "width": 0,
24
- }
25
- }
26
- />
27
- `;
28
-
29
- exports[`Blank render renders correctly with disabled prop as true 1`] = `
30
- <WithStyles(Chip)
31
- className="undefined"
32
- clickable={false}
33
- component="span"
34
- disabled={true}
35
- label={
36
- <React.Fragment>
37
- <span
38
- className=""
39
- >
40
-
41
- </span>
42
- </React.Fragment>
43
- }
44
- style={
45
- Object {
46
- "height": 0,
47
- "minHeight": 32,
48
- "minWidth": 90,
49
- "width": 0,
50
- }
51
- }
52
- variant="outlined"
53
- />
54
- `;
55
-
56
- exports[`Blank render renders correctly with draggedItem 1`] = `
57
- <WithStyles(Chip)
58
- className="undefined"
59
- clickable={false}
60
- component="span"
61
- disabled={true}
62
- label={
63
- <React.Fragment>
64
- <span
65
- className=""
66
- >
67
-
68
- </span>
69
- </React.Fragment>
70
- }
71
- style={
72
- Object {
73
- "height": 0,
74
- "minHeight": 32,
75
- "minWidth": 90,
76
- "width": 0,
77
- }
78
- }
79
- />
80
- `;
81
-
82
- exports[`Blank render renders correctly with draggedItem and isOver 1`] = `
83
- <WithStyles(Chip)
84
- className="undefined"
85
- clickable={false}
86
- component="span"
87
- disabled={true}
88
- label={
89
- <React.Fragment>
90
- <span
91
- className="undefined"
92
- >
93
-
94
- </span>
95
- <span
96
- className=""
97
- >
98
-
99
- </span>
100
- </React.Fragment>
101
- }
102
- style={
103
- Object {
104
- "height": 0,
105
- "minHeight": 32,
106
- "minWidth": 90,
107
- "width": 0,
108
- }
109
- }
110
- />
111
- `;
@@ -1,64 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`CorrectInput render renders correctly with correct as false 1`] = `
4
- <Component
5
- classes={
6
- Object {
7
- "box": "Component-box-5",
8
- "correct": "Component-correct-3",
9
- "crInput": "Component-crInput-2",
10
- "incorrect": "Component-incorrect-4",
11
- "input": "Component-input-1",
12
- "notchedOutline": "Component-notchedOutline-7",
13
- "outlinedInput": "Component-outlinedInput-6",
14
- }
15
- }
16
- correct={false}
17
- disabled={false}
18
- onChange={[MockFunction]}
19
- value="Cow"
20
- variant="outlined"
21
- />
22
- `;
23
-
24
- exports[`CorrectInput render renders correctly with default props 1`] = `
25
- <Component
26
- classes={
27
- Object {
28
- "box": "Component-box-5",
29
- "correct": "Component-correct-3",
30
- "crInput": "Component-crInput-2",
31
- "incorrect": "Component-incorrect-4",
32
- "input": "Component-input-1",
33
- "notchedOutline": "Component-notchedOutline-7",
34
- "outlinedInput": "Component-outlinedInput-6",
35
- }
36
- }
37
- correct={false}
38
- disabled={false}
39
- onChange={[MockFunction]}
40
- value="Cow"
41
- variant="outlined"
42
- />
43
- `;
44
-
45
- exports[`CorrectInput render renders correctly with disabled prop as true 1`] = `
46
- <Component
47
- classes={
48
- Object {
49
- "box": "Component-box-5",
50
- "correct": "Component-correct-3",
51
- "crInput": "Component-crInput-2",
52
- "incorrect": "Component-incorrect-4",
53
- "input": "Component-input-1",
54
- "notchedOutline": "Component-notchedOutline-7",
55
- "outlinedInput": "Component-outlinedInput-6",
56
- }
57
- }
58
- correct={false}
59
- disabled={true}
60
- onChange={[MockFunction]}
61
- value="Cow"
62
- variant="outlined"
63
- />
64
- `;
@@ -1,136 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Dropdown render renders correctly with correct as true 1`] = `
4
- <Dropdown
5
- choices={
6
- Array [
7
- Object {
8
- "id": undefined,
9
- "label": "Jumped",
10
- "value": "Jumped",
11
- },
12
- Object {
13
- "id": undefined,
14
- "label": "Laughed",
15
- "value": "Laughed",
16
- },
17
- Object {
18
- "id": undefined,
19
- "label": "Smiled",
20
- "value": "Smiled",
21
- },
22
- ]
23
- }
24
- classes={
25
- Object {
26
- "correctIcon": "Dropdown-correctIcon-11",
27
- "correctnessIndicatorIcon": "Dropdown-correctnessIndicatorIcon-10",
28
- "disabledCorrect": "Dropdown-disabledCorrect-2",
29
- "disabledIncorrect": "Dropdown-disabledIncorrect-3",
30
- "incorrectIcon": "Dropdown-incorrectIcon-12",
31
- "label": "Dropdown-label-7",
32
- "menuRoot": "Dropdown-menuRoot-6",
33
- "root": "Dropdown-root-1",
34
- "selectMenu": "Dropdown-selectMenu-4",
35
- "selected": "Dropdown-selected-5",
36
- "selectedIndicator": "Dropdown-selectedIndicator-8",
37
- "srOnly": "Dropdown-srOnly-9",
38
- }
39
- }
40
- correct={true}
41
- disabled={false}
42
- id="1"
43
- onChange={[MockFunction]}
44
- value="Jumped"
45
- />
46
- `;
47
-
48
- exports[`Dropdown render renders correctly with default props 1`] = `
49
- <Dropdown
50
- choices={
51
- Array [
52
- Object {
53
- "id": undefined,
54
- "label": "Jumped",
55
- "value": "Jumped",
56
- },
57
- Object {
58
- "id": undefined,
59
- "label": "Laughed",
60
- "value": "Laughed",
61
- },
62
- Object {
63
- "id": undefined,
64
- "label": "Smiled",
65
- "value": "Smiled",
66
- },
67
- ]
68
- }
69
- classes={
70
- Object {
71
- "correctIcon": "Dropdown-correctIcon-11",
72
- "correctnessIndicatorIcon": "Dropdown-correctnessIndicatorIcon-10",
73
- "disabledCorrect": "Dropdown-disabledCorrect-2",
74
- "disabledIncorrect": "Dropdown-disabledIncorrect-3",
75
- "incorrectIcon": "Dropdown-incorrectIcon-12",
76
- "label": "Dropdown-label-7",
77
- "menuRoot": "Dropdown-menuRoot-6",
78
- "root": "Dropdown-root-1",
79
- "selectMenu": "Dropdown-selectMenu-4",
80
- "selected": "Dropdown-selected-5",
81
- "selectedIndicator": "Dropdown-selectedIndicator-8",
82
- "srOnly": "Dropdown-srOnly-9",
83
- }
84
- }
85
- correct={false}
86
- disabled={false}
87
- id="1"
88
- onChange={[MockFunction]}
89
- value="Jumped"
90
- />
91
- `;
92
-
93
- exports[`Dropdown render renders correctly with disabled prop as true 1`] = `
94
- <Dropdown
95
- choices={
96
- Array [
97
- Object {
98
- "id": undefined,
99
- "label": "Jumped",
100
- "value": "Jumped",
101
- },
102
- Object {
103
- "id": undefined,
104
- "label": "Laughed",
105
- "value": "Laughed",
106
- },
107
- Object {
108
- "id": undefined,
109
- "label": "Smiled",
110
- "value": "Smiled",
111
- },
112
- ]
113
- }
114
- classes={
115
- Object {
116
- "correctIcon": "Dropdown-correctIcon-11",
117
- "correctnessIndicatorIcon": "Dropdown-correctnessIndicatorIcon-10",
118
- "disabledCorrect": "Dropdown-disabledCorrect-2",
119
- "disabledIncorrect": "Dropdown-disabledIncorrect-3",
120
- "incorrectIcon": "Dropdown-incorrectIcon-12",
121
- "label": "Dropdown-label-7",
122
- "menuRoot": "Dropdown-menuRoot-6",
123
- "root": "Dropdown-root-1",
124
- "selectMenu": "Dropdown-selectMenu-4",
125
- "selected": "Dropdown-selected-5",
126
- "selectedIndicator": "Dropdown-selectedIndicator-8",
127
- "srOnly": "Dropdown-srOnly-9",
128
- }
129
- }
130
- correct={false}
131
- disabled={true}
132
- id="1"
133
- onChange={[MockFunction]}
134
- value="Jumped"
135
- />
136
- `;
@@ -1,34 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Input render renders correctly with correct as false 1`] = `
4
- <WithStyles(Component)
5
- correct={false}
6
- disabled={false}
7
- isBox={true}
8
- onChange={[Function]}
9
- value="Cow"
10
- variant="outlined"
11
- />
12
- `;
13
-
14
- exports[`Input render renders correctly with default props 1`] = `
15
- <WithStyles(Component)
16
- correct={false}
17
- disabled={false}
18
- isBox={true}
19
- onChange={[Function]}
20
- value="Cow"
21
- variant="outlined"
22
- />
23
- `;
24
-
25
- exports[`Input render renders correctly with disabled prop as true 1`] = `
26
- <WithStyles(Component)
27
- correct={false}
28
- disabled={true}
29
- isBox={true}
30
- onChange={[Function]}
31
- value="Cow"
32
- variant="outlined"
33
- />
34
- `;