@pie-element/image-cloze-association 10.3.0 → 10.3.1-beta.11
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 +53 -37
- package/configure/CHANGELOG.md +54 -31
- package/configure/package.json +3 -3
- package/controller/CHANGELOG.md +74 -6
- package/controller/package.json +1 -1
- package/lib/image-container.js +3 -12
- package/lib/image-container.js.map +1 -1
- package/lib/image-drop-target.js +6 -46
- package/lib/image-drop-target.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/possible-response.js +5 -36
- package/lib/possible-response.js.map +1 -1
- package/lib/possible-responses.js +19 -39
- package/lib/possible-responses.js.map +1 -1
- package/lib/root.js +6 -120
- package/lib/root.js.map +1 -1
- package/package.json +5 -5
- package/src/__tests__/root.test.jsx +2 -261
- package/src/image-container.jsx +0 -9
- package/src/image-drop-target.jsx +1 -44
- package/src/index.js +2 -2
- package/src/possible-response.jsx +1 -45
- package/src/possible-responses.jsx +16 -37
- package/src/root.jsx +2 -117
- package/lib/keyboard-coordinates.js +0 -111
- package/lib/keyboard-coordinates.js.map +0 -1
- package/src/__tests__/image-drop-target.test.jsx +0 -169
- package/src/__tests__/keyboard-coordinates.test.js +0 -127
- package/src/__tests__/possible-response.test.jsx +0 -113
- package/src/__tests__/possible-responses.test.jsx +0 -63
- package/src/keyboard-coordinates.js +0 -115
package/CHANGELOG.md
CHANGED
|
@@ -3,84 +3,100 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## [10.3.1-beta.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.3.1-beta.10...@pie-element/image-cloze-association@10.3.1-beta.11) (2026-10-07)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## [10.3.1-beta.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.3.1-beta.9...@pie-element/image-cloze-association@10.3.1-beta.10) (2026-10-06)
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## [10.3.1-beta.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.3.1-beta.8...@pie-element/image-cloze-association@10.3.1-beta.9) (2026-10-05)
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
- read the prompt container by class, not by the id pie-lib removed PIE-927 ([aaaf6c2](https://github.com/pie-framework/pie-elements/commit/aaaf6c2f189de3b39f9de85969aeb2e50376c548))
|
|
16
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
## [10.3.1-beta.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.3.1-beta.7...@pie-element/image-cloze-association@10.3.1-beta.8) (2026-09-29)
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
22
21
|
|
|
23
|
-
## [10.1.
|
|
22
|
+
## [10.3.1-beta.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.3.1-beta.6...@pie-element/image-cloze-association@10.3.1-beta.7) (2026-09-24)
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
25
|
+
|
|
26
|
+
## [10.3.1-beta.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.3.1-beta.5...@pie-element/image-cloze-association@10.3.1-beta.6) (2026-09-24)
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
28
29
|
|
|
29
|
-
## [10.1.
|
|
30
|
+
## [10.3.1-beta.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.3.1-beta.4...@pie-element/image-cloze-association@10.3.1-beta.5) (2026-09-17)
|
|
30
31
|
|
|
31
32
|
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
32
33
|
|
|
33
|
-
## [10.1.
|
|
34
|
+
## [10.3.1-beta.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.3.1-beta.3...@pie-element/image-cloze-association@10.3.1-beta.4) (2026-09-11)
|
|
34
35
|
|
|
35
36
|
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
36
37
|
|
|
37
|
-
## [10.1.
|
|
38
|
+
## [10.3.1-beta.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.3.1-beta.2...@pie-element/image-cloze-association@10.3.1-beta.3) (2026-09-04)
|
|
38
39
|
|
|
39
40
|
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
40
41
|
|
|
41
|
-
## [10.1.
|
|
42
|
+
## [10.3.1-beta.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.7...@pie-element/image-cloze-association@10.3.1-beta.2) (2026-08-26)
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
# [10.4.0-beta.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.6...@pie-element/image-cloze-association@10.4.0-beta.7) (2026-08-20)
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
# [10.4.0-beta.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.5...@pie-element/image-cloze-association@10.4.0-beta.6) (2026-08-14)
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
- sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
|
|
52
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
# [10.4.0-beta.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.4...@pie-element/image-cloze-association@10.4.0-beta.5) (2026-08-11)
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
- handle webcomponent lifecycle on every element that misses it PIE-703 ([9d5923f](https://github.com/pie-framework/pie-elements/commit/9d5923f973f0471e1e8f69ad4309cfc63d980d93))
|
|
58
|
+
# [10.4.0-beta.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.3...@pie-element/image-cloze-association@10.4.0-beta.4) (2026-08-11)
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
# [10.4.0-beta.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.2...@pie-element/image-cloze-association@10.4.0-beta.3) (2026-08-11)
|
|
64
63
|
|
|
65
|
-
|
|
64
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
66
65
|
|
|
67
|
-
|
|
66
|
+
# [10.4.0-beta.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.1...@pie-element/image-cloze-association@10.4.0-beta.2) (2026-08-11)
|
|
68
67
|
|
|
69
|
-
|
|
68
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
70
69
|
|
|
71
|
-
|
|
70
|
+
# [10.4.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.4.0-beta.0...@pie-element/image-cloze-association@10.4.0-beta.1) (2026-08-07)
|
|
72
71
|
|
|
73
|
-
|
|
72
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
73
|
+
|
|
74
|
+
# [10.4.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.3.0-beta.0...@pie-element/image-cloze-association@10.4.0-beta.0) (2026-08-07)
|
|
75
|
+
|
|
76
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
77
|
+
|
|
78
|
+
# [10.3.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.3.0-beta.0...@pie-element/image-cloze-association@10.3.0-beta.1) (2026-08-07)
|
|
79
|
+
|
|
80
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
81
|
+
|
|
82
|
+
# [10.3.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.2.0-beta.0...@pie-element/image-cloze-association@10.3.0-beta.0) (2026-08-07)
|
|
83
|
+
|
|
84
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
85
|
+
|
|
86
|
+
# [10.2.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.0...@pie-element/image-cloze-association@10.2.0-beta.0) (2026-08-07)
|
|
74
87
|
|
|
75
88
|
### Bug Fixes
|
|
76
89
|
|
|
90
|
+
- bump libs & shared modules PIE-706, PIE-702, PIE-679, PIE-698 ([5b1a8c4](https://github.com/pie-framework/pie-elements/commit/5b1a8c4c3eba2126fc43d78fd0187e7cd11d5424))
|
|
77
91
|
- bump shared modules and libs PIE-600, PIE-602 ([ce99f6a](https://github.com/pie-framework/pie-elements/commit/ce99f6af50cb855b666a6df9340f9f5445fde4c4))
|
|
92
|
+
- bump shared modules and libs PIE-661 PIE-664 PIE-683 PIE-666 PIE-656 PIE-657 PIE-658 PIE-659 PIE-670 ([ebd6be4](https://github.com/pie-framework/pie-elements/commit/ebd6be4fd48fca41ad4c4908f606b25334731aed))
|
|
93
|
+
- bump shared modules and libs PIE-674, PIE-662, PIE-705, PIE-674, PIE-963 ([78a3f64](https://github.com/pie-framework/pie-elements/commit/78a3f64652c9581c61bd4159f3210fc1e32d8bcf))
|
|
94
|
+
- bump shared modules and libs PIE-695, PIE-697, PIE-699, PIE-680, PIE-714, PIE-665, PIE-656 ([4b76ae7](https://github.com/pie-framework/pie-elements/commit/4b76ae75d1c5ea6d55f7c6fb53f299dfcbda2b1f))
|
|
95
|
+
- bump shared modules and libsPIE-603, PIE-604, PIE-663, PIE-662, PIE-678 ([e61c7a7](https://github.com/pie-framework/pie-elements/commit/e61c7a7d23744586337dfbb17a18ebfc656c202f))
|
|
78
96
|
- dedupe @tiptap/\* and react-transition-group PIE-624 ([87f07f3](https://github.com/pie-framework/pie-elements/commit/87f07f31c38b0fe876f87229c48adc566c369bb9))
|
|
97
|
+
- handle webcomponent lifecycle on every element that misses it PIE-703 ([9d5923f](https://github.com/pie-framework/pie-elements/commit/9d5923f973f0471e1e8f69ad4309cfc63d980d93))
|
|
79
98
|
- **image-cloze-association:** preserve response areas position PIE-430 ([ae083d6](https://github.com/pie-framework/pie-elements/commit/ae083d660a56b050939deaab488ecf281ad14437))
|
|
80
|
-
|
|
81
|
-
## [10.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.0...@pie-element/image-cloze-association@10.1.1) (2026-05-21)
|
|
82
|
-
|
|
83
|
-
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
99
|
+
- sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
|
|
84
100
|
|
|
85
101
|
# [10.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@10.1.0-next.1...@pie-element/image-cloze-association@10.1.0) (2026-05-21)
|
|
86
102
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,76 +3,99 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [9.4.0-beta.17](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.16...@pie-element/image-cloze-association-configure@9.4.0-beta.17) (2026-10-07)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
9
9
|
|
|
10
|
-
# [9.
|
|
10
|
+
# [9.4.0-beta.16](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.15...@pie-element/image-cloze-association-configure@9.4.0-beta.16) (2026-10-06)
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
# [9.4.0-beta.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.14...@pie-element/image-cloze-association-configure@9.4.0-beta.15) (2026-10-05)
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
# [9.4.0-beta.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.13...@pie-element/image-cloze-association-configure@9.4.0-beta.14) (2026-09-29)
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
# [9.4.0-beta.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.12...@pie-element/image-cloze-association-configure@9.4.0-beta.13) (2026-09-24)
|
|
23
23
|
|
|
24
24
|
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
# [9.4.0-beta.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.11...@pie-element/image-cloze-association-configure@9.4.0-beta.12) (2026-09-24)
|
|
27
27
|
|
|
28
28
|
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
# [9.4.0-beta.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.10...@pie-element/image-cloze-association-configure@9.4.0-beta.11) (2026-09-17)
|
|
31
31
|
|
|
32
32
|
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
# [9.4.0-beta.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.9...@pie-element/image-cloze-association-configure@9.4.0-beta.10) (2026-09-11)
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
# [9.4.0-beta.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.8...@pie-element/image-cloze-association-configure@9.4.0-beta.9) (2026-09-04)
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
# [9.4.0-beta.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.7...@pie-element/image-cloze-association-configure@9.4.0-beta.8) (2026-08-26)
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
- sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
|
|
44
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
46
45
|
|
|
47
|
-
|
|
46
|
+
# [9.4.0-beta.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.6...@pie-element/image-cloze-association-configure@9.4.0-beta.7) (2026-08-20)
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
- handle webcomponent lifecycle on every element that misses it PIE-703 ([9d5923f](https://github.com/pie-framework/pie-elements/commit/9d5923f973f0471e1e8f69ad4309cfc63d980d93))
|
|
50
|
+
# [9.4.0-beta.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.5...@pie-element/image-cloze-association-configure@9.4.0-beta.6) (2026-08-14)
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
55
53
|
|
|
56
|
-
|
|
54
|
+
# [9.4.0-beta.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.4...@pie-element/image-cloze-association-configure@9.4.0-beta.5) (2026-08-11)
|
|
57
55
|
|
|
58
|
-
|
|
56
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
59
57
|
|
|
60
|
-
|
|
58
|
+
# [9.4.0-beta.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.3...@pie-element/image-cloze-association-configure@9.4.0-beta.4) (2026-08-11)
|
|
61
59
|
|
|
62
|
-
|
|
60
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
63
61
|
|
|
64
|
-
|
|
62
|
+
# [9.4.0-beta.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.2...@pie-element/image-cloze-association-configure@9.4.0-beta.3) (2026-08-11)
|
|
65
63
|
|
|
66
|
-
|
|
64
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
67
65
|
|
|
68
|
-
|
|
66
|
+
# [9.4.0-beta.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.1...@pie-element/image-cloze-association-configure@9.4.0-beta.2) (2026-08-11)
|
|
69
67
|
|
|
70
|
-
|
|
68
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
69
|
+
|
|
70
|
+
# [9.4.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.4.0-beta.0...@pie-element/image-cloze-association-configure@9.4.0-beta.1) (2026-08-07)
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
73
|
+
|
|
74
|
+
# [9.4.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.3.0-beta.0...@pie-element/image-cloze-association-configure@9.4.0-beta.0) (2026-08-07)
|
|
75
|
+
|
|
76
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
77
|
+
|
|
78
|
+
# [9.3.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.3.0-beta.0...@pie-element/image-cloze-association-configure@9.3.0-beta.1) (2026-08-07)
|
|
79
|
+
|
|
80
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
71
81
|
|
|
72
|
-
|
|
82
|
+
# [9.3.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.2.0-beta.0...@pie-element/image-cloze-association-configure@9.3.0-beta.0) (2026-08-07)
|
|
73
83
|
|
|
74
84
|
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
75
85
|
|
|
86
|
+
# [9.2.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.0...@pie-element/image-cloze-association-configure@9.2.0-beta.0) (2026-08-07)
|
|
87
|
+
|
|
88
|
+
### Bug Fixes
|
|
89
|
+
|
|
90
|
+
- bump libs & shared modules PIE-706, PIE-702, PIE-679, PIE-698 ([5b1a8c4](https://github.com/pie-framework/pie-elements/commit/5b1a8c4c3eba2126fc43d78fd0187e7cd11d5424))
|
|
91
|
+
- bump shared modules and libs PIE-600, PIE-602 ([ce99f6a](https://github.com/pie-framework/pie-elements/commit/ce99f6af50cb855b666a6df9340f9f5445fde4c4))
|
|
92
|
+
- bump shared modules and libs PIE-661 PIE-664 PIE-683 PIE-666 PIE-656 PIE-657 PIE-658 PIE-659 PIE-670 ([ebd6be4](https://github.com/pie-framework/pie-elements/commit/ebd6be4fd48fca41ad4c4908f606b25334731aed))
|
|
93
|
+
- bump shared modules and libs PIE-674, PIE-662, PIE-705, PIE-674, PIE-963 ([78a3f64](https://github.com/pie-framework/pie-elements/commit/78a3f64652c9581c61bd4159f3210fc1e32d8bcf))
|
|
94
|
+
- bump shared modules and libs PIE-695, PIE-697, PIE-699, PIE-680, PIE-714, PIE-665, PIE-656 ([4b76ae7](https://github.com/pie-framework/pie-elements/commit/4b76ae75d1c5ea6d55f7c6fb53f299dfcbda2b1f))
|
|
95
|
+
- bump shared modules and libsPIE-603, PIE-604, PIE-663, PIE-662, PIE-678 ([e61c7a7](https://github.com/pie-framework/pie-elements/commit/e61c7a7d23744586337dfbb17a18ebfc656c202f))
|
|
96
|
+
- handle webcomponent lifecycle on every element that misses it PIE-703 ([9d5923f](https://github.com/pie-framework/pie-elements/commit/9d5923f973f0471e1e8f69ad4309cfc63d980d93))
|
|
97
|
+
- sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
|
|
98
|
+
|
|
76
99
|
# [9.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@9.1.0-next.1...@pie-element/image-cloze-association-configure@9.1.0) (2026-05-21)
|
|
77
100
|
|
|
78
101
|
### Bug Fixes
|
package/configure/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/image-cloze-association-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "9.
|
|
4
|
+
"version": "9.4.0-beta.17",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"@mui/icons-material": "^7.3.4",
|
|
13
13
|
"@mui/material": "^7.3.4",
|
|
14
14
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
15
|
-
"@pie-lib/config-ui": "13.0.
|
|
16
|
-
"@pie-lib/editable-html-tip-tap": "2.1.
|
|
15
|
+
"@pie-lib/config-ui": "13.0.22-beta.5",
|
|
16
|
+
"@pie-lib/editable-html-tip-tap": "2.1.20-beta.5",
|
|
17
17
|
"debug": "^4.1.1",
|
|
18
18
|
"prop-types": "^15.8.1",
|
|
19
19
|
"react": "18.3.1",
|
package/controller/CHANGELOG.md
CHANGED
|
@@ -3,24 +3,92 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [8.4.0-beta.17](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.16...@pie-element/image-cloze-association-controller@8.4.0-beta.17) (2026-10-07)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
# [8.4.0-beta.16](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.15...@pie-element/image-cloze-association-controller@8.4.0-beta.16) (2026-10-06)
|
|
11
11
|
|
|
12
12
|
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
# [8.4.0-beta.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.14...@pie-element/image-cloze-association-controller@8.4.0-beta.15) (2026-10-05)
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
# [8.4.0-beta.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.13...@pie-element/image-cloze-association-controller@8.4.0-beta.14) (2026-09-29)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
21
|
+
|
|
22
|
+
# [8.4.0-beta.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.12...@pie-element/image-cloze-association-controller@8.4.0-beta.13) (2026-09-24)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
25
|
+
|
|
26
|
+
# [8.4.0-beta.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.11...@pie-element/image-cloze-association-controller@8.4.0-beta.12) (2026-09-24)
|
|
27
|
+
|
|
28
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
29
|
+
|
|
30
|
+
# [8.4.0-beta.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.10...@pie-element/image-cloze-association-controller@8.4.0-beta.11) (2026-09-17)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
19
33
|
|
|
20
|
-
|
|
34
|
+
# [8.4.0-beta.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.9...@pie-element/image-cloze-association-controller@8.4.0-beta.10) (2026-09-11)
|
|
21
35
|
|
|
22
36
|
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
23
37
|
|
|
38
|
+
# [8.4.0-beta.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.8...@pie-element/image-cloze-association-controller@8.4.0-beta.9) (2026-09-04)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
41
|
+
|
|
42
|
+
# [8.4.0-beta.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.7...@pie-element/image-cloze-association-controller@8.4.0-beta.8) (2026-08-26)
|
|
43
|
+
|
|
44
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
45
|
+
|
|
46
|
+
# [8.4.0-beta.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.6...@pie-element/image-cloze-association-controller@8.4.0-beta.7) (2026-08-20)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
49
|
+
|
|
50
|
+
# [8.4.0-beta.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.5...@pie-element/image-cloze-association-controller@8.4.0-beta.6) (2026-08-14)
|
|
51
|
+
|
|
52
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
53
|
+
|
|
54
|
+
# [8.4.0-beta.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.4...@pie-element/image-cloze-association-controller@8.4.0-beta.5) (2026-08-11)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
57
|
+
|
|
58
|
+
# [8.4.0-beta.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.3...@pie-element/image-cloze-association-controller@8.4.0-beta.4) (2026-08-11)
|
|
59
|
+
|
|
60
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
61
|
+
|
|
62
|
+
# [8.4.0-beta.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.2...@pie-element/image-cloze-association-controller@8.4.0-beta.3) (2026-08-11)
|
|
63
|
+
|
|
64
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
65
|
+
|
|
66
|
+
# [8.4.0-beta.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.1...@pie-element/image-cloze-association-controller@8.4.0-beta.2) (2026-08-11)
|
|
67
|
+
|
|
68
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
69
|
+
|
|
70
|
+
# [8.4.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.4.0-beta.0...@pie-element/image-cloze-association-controller@8.4.0-beta.1) (2026-08-07)
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
73
|
+
|
|
74
|
+
# [8.4.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.3.0-beta.0...@pie-element/image-cloze-association-controller@8.4.0-beta.0) (2026-08-07)
|
|
75
|
+
|
|
76
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
77
|
+
|
|
78
|
+
# [8.3.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.3.0-beta.0...@pie-element/image-cloze-association-controller@8.3.0-beta.1) (2026-08-07)
|
|
79
|
+
|
|
80
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
81
|
+
|
|
82
|
+
# [8.3.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.2.0-beta.0...@pie-element/image-cloze-association-controller@8.3.0-beta.0) (2026-08-07)
|
|
83
|
+
|
|
84
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-controller
|
|
85
|
+
|
|
86
|
+
# [8.2.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.1.0...@pie-element/image-cloze-association-controller@8.2.0-beta.0) (2026-08-07)
|
|
87
|
+
|
|
88
|
+
### Bug Fixes
|
|
89
|
+
|
|
90
|
+
- bump shared modules and libs PIE-695, PIE-697, PIE-699, PIE-680, PIE-714, PIE-665, PIE-656 ([4b76ae7](https://github.com/pie-framework/pie-elements/commit/4b76ae75d1c5ea6d55f7c6fb53f299dfcbda2b1f))
|
|
91
|
+
|
|
24
92
|
# [8.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-controller@8.1.0-next.1...@pie-element/image-cloze-association-controller@8.1.0) (2026-05-21)
|
|
25
93
|
|
|
26
94
|
### Bug Fixes
|
package/controller/package.json
CHANGED
package/lib/image-container.js
CHANGED
|
@@ -37,10 +37,7 @@ class ImageContainer extends _react.Component {
|
|
|
37
37
|
answerChoiceTransparency,
|
|
38
38
|
responseContainerPadding,
|
|
39
39
|
imageDropTargetPadding,
|
|
40
|
-
maxResponsePerZone
|
|
41
|
-
selectedResponse,
|
|
42
|
-
onSelectClick,
|
|
43
|
-
onPlacementClick
|
|
40
|
+
maxResponsePerZone
|
|
44
41
|
} = this.props;
|
|
45
42
|
return /*#__PURE__*/_react.default.createElement(BaseContainer, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
46
43
|
src: src,
|
|
@@ -72,10 +69,7 @@ class ImageContainer extends _react.Component {
|
|
|
72
69
|
answerChoiceTransparency: answerChoiceTransparency,
|
|
73
70
|
responseContainerPadding: responseContainerPadding,
|
|
74
71
|
imageDropTargetPadding: imageDropTargetPadding,
|
|
75
|
-
maxResponsePerZone: maxResponsePerZone
|
|
76
|
-
selectedResponse: selectedResponse,
|
|
77
|
-
onSelectClick: onSelectClick,
|
|
78
|
-
onPlacementClick: onPlacementClick
|
|
72
|
+
maxResponsePerZone: maxResponsePerZone
|
|
79
73
|
});
|
|
80
74
|
}));
|
|
81
75
|
}
|
|
@@ -94,10 +88,7 @@ ImageContainer.propTypes = {
|
|
|
94
88
|
responseAreaFill: _propTypes.default.string,
|
|
95
89
|
responseContainerPadding: _propTypes.default.string,
|
|
96
90
|
imageDropTargetPadding: _propTypes.default.string,
|
|
97
|
-
maxResponsePerZone: _propTypes.default.number
|
|
98
|
-
selectedResponse: _propTypes.default.object,
|
|
99
|
-
onSelectClick: _propTypes.default.func,
|
|
100
|
-
onPlacementClick: _propTypes.default.func
|
|
91
|
+
maxResponsePerZone: _propTypes.default.number
|
|
101
92
|
};
|
|
102
93
|
var _default = exports.default = ImageContainer;
|
|
103
94
|
//# sourceMappingURL=image-container.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-container.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_styles","_imageDropTarget","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BaseContainer","styled","theme","margin","spacing","position","width","ImageContainer","Component","render","answers","canDrag","draggingElement","image","height","src","onAnswerSelect","onDragAnswerBegin","onDragAnswerEnd","responseContainers","showDashedBorder","responseAreaFill","answerChoiceTransparency","responseContainerPadding","imageDropTargetPadding","maxResponsePerZone","
|
|
1
|
+
{"version":3,"file":"image-container.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_styles","_imageDropTarget","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BaseContainer","styled","theme","margin","spacing","position","width","ImageContainer","Component","render","answers","canDrag","draggingElement","image","height","src","onAnswerSelect","onDragAnswerBegin","onDragAnswerEnd","responseContainers","showDashedBorder","responseAreaFill","answerChoiceTransparency","responseContainerPadding","imageDropTargetPadding","maxResponsePerZone","props","createElement","map","rHeight","replace","rWidth","rLeft","x","rTop","y","answersParsed","filter","a","containerIndex","index","containerStyle","left","top","key","id","onDrop","item","propTypes","PropTypes","array","isRequired","bool","shape","object","func","string","number","_default","exports"],"sources":["../src/image-container.jsx"],"sourcesContent":["import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\n\nimport ImageDropTarget from './image-drop-target';\n\nconst BaseContainer = styled('div')(({ theme }) => ({\n margin: theme.spacing(2),\n position: 'relative',\n width: 'fit-content',\n}));\n\nclass ImageContainer extends Component {\n render() {\n const {\n answers,\n canDrag,\n draggingElement,\n image: { height, src, width } = {},\n onAnswerSelect,\n onDragAnswerBegin,\n onDragAnswerEnd,\n responseContainers,\n showDashedBorder,\n responseAreaFill,\n answerChoiceTransparency,\n responseContainerPadding,\n imageDropTargetPadding,\n maxResponsePerZone,\n } = this.props;\n\n return (\n <BaseContainer>\n <img src={src} height={height} width={width} />\n\n {(responseContainers || []).map((r, i) => {\n const rHeight = (r.height.replace('%', '') / 100) * height;\n const rWidth = (r.width.replace('%', '') / 100) * width;\n const rLeft = (r.x / 100) * width;\n const rTop = (r.y / 100) * height;\n const answersParsed = answers.filter((a) => a.containerIndex === r.index);\n\n return (\n <ImageDropTarget\n answers={answersParsed}\n canDrag={canDrag}\n containerStyle={{\n height: rHeight,\n width: rWidth,\n left: rLeft,\n top: rTop,\n }}\n key={r.id + i}\n draggingElement={draggingElement}\n index={r.index}\n onDrop={(item) => onAnswerSelect(item, r.index)}\n onDragAnswerBegin={onDragAnswerBegin}\n onDragAnswerEnd={onDragAnswerEnd}\n showDashedBorder={showDashedBorder}\n responseAreaFill={responseAreaFill}\n answerChoiceTransparency={answerChoiceTransparency}\n responseContainerPadding={responseContainerPadding}\n imageDropTargetPadding={imageDropTargetPadding}\n maxResponsePerZone={maxResponsePerZone}\n />\n );\n })}\n </BaseContainer>\n );\n }\n}\n\nImageContainer.propTypes = {\n answers: PropTypes.array.isRequired,\n canDrag: PropTypes.bool.isRequired,\n draggingElement: PropTypes.shape({}).isRequired,\n image: PropTypes.object.isRequired,\n onAnswerSelect: PropTypes.func.isRequired,\n onDragAnswerBegin: PropTypes.func.isRequired,\n onDragAnswerEnd: PropTypes.func.isRequired,\n responseContainers: PropTypes.array.isRequired,\n showDashedBorder: PropTypes.bool,\n answerChoiceTransparency: PropTypes.bool,\n responseAreaFill: PropTypes.string,\n responseContainerPadding: PropTypes.string,\n imageDropTargetPadding: PropTypes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BAAS,CAACM,IAAI,CAACJ,UAAU;EAC5CjC,eAAe,EAAE+B,kBAAS,CAACM,IAAI,CAACJ,UAAU;EAC1ChC,kBAAkB,EAAE8B,kBAAS,CAACC,KAAK,CAACC,UAAU;EAC9C/B,gBAAgB,EAAE6B,kBAAS,CAACG,IAAI;EAChC9B,wBAAwB,EAAE2B,kBAAS,CAACG,IAAI;EACxC/B,gBAAgB,EAAE4B,kBAAS,CAACO,MAAM;EAClCjC,wBAAwB,EAAE0B,kBAAS,CAACO,MAAM;EAC1ChC,sBAAsB,EAAEyB,kBAAS,CAACO,MAAM;EACxC/B,kBAAkB,EAAEwB,kBAAS,CAACQ;AAChC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAApE,OAAA,GAEagB,cAAc","ignoreList":[]}
|
package/lib/image-drop-target.js
CHANGED
|
@@ -46,12 +46,8 @@ const ImageDropTarget = ({
|
|
|
46
46
|
answerChoiceTransparency,
|
|
47
47
|
maxResponsePerZone,
|
|
48
48
|
onDrop,
|
|
49
|
-
index
|
|
50
|
-
selectedResponse,
|
|
51
|
-
onSelectClick,
|
|
52
|
-
onPlacementClick
|
|
49
|
+
index
|
|
53
50
|
}) => {
|
|
54
|
-
const [isHovered, setIsHovered] = (0, _react.useState)(false);
|
|
55
51
|
const [shouldHaveSmallPadding, setShouldHaveSmallPadding] = (0, _react.useState)(false);
|
|
56
52
|
const dropContainerRef = (0, _react.useRef)(null);
|
|
57
53
|
const dropContainerResponsesHeightRef = (0, _react.useRef)(null);
|
|
@@ -79,10 +75,8 @@ const ImageDropTarget = ({
|
|
|
79
75
|
};
|
|
80
76
|
}, []);
|
|
81
77
|
const isDraggingElement = !!draggingElement.id;
|
|
82
|
-
const hasSelection = !!selectedResponse;
|
|
83
|
-
const showsHoverEffect = isOver || hasSelection && isHovered && canDrag;
|
|
84
78
|
const containerClasses = (0, _classnames.default)({
|
|
85
|
-
'is-over':
|
|
79
|
+
'is-over': isOver,
|
|
86
80
|
dashed: showDashedBorder && !isDraggingElement,
|
|
87
81
|
active: isDraggingElement
|
|
88
82
|
});
|
|
@@ -91,29 +85,7 @@ const ImageDropTarget = ({
|
|
|
91
85
|
...containerStyle,
|
|
92
86
|
...(responseAreaFill && !isDraggingElement && {
|
|
93
87
|
backgroundColor: responseAreaFill
|
|
94
|
-
})
|
|
95
|
-
cursor: hasSelection && canDrag ? 'pointer' : undefined
|
|
96
|
-
};
|
|
97
|
-
const handleContainerClick = () => {
|
|
98
|
-
if (!canDrag) return;
|
|
99
|
-
if (selectedResponse) {
|
|
100
|
-
onPlacementClick?.(index);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Empty background clicked with nothing selected: nothing to place.
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
// Only a native Tab stop when there's nothing else in this container to carry
|
|
107
|
-
// tabbability — once it holds an answer, that answer's own tile (rendered by
|
|
108
|
-
// PossibleResponse, via dnd-kit's `useDraggable`) is already independently tabbable,
|
|
109
|
-
// and adding a second stop for the same visual container would add an extra stop to
|
|
110
|
-
// the existing Tab order (match-list's equivalent)
|
|
111
|
-
const isNativeTabStop = answers.length === 0 && canDrag;
|
|
112
|
-
const handleContainerKeyDown = e => {
|
|
113
|
-
if (e.code === 'Space' || e.code === 'Enter') {
|
|
114
|
-
e.preventDefault();
|
|
115
|
-
handleContainerClick();
|
|
116
|
-
}
|
|
88
|
+
})
|
|
117
89
|
};
|
|
118
90
|
return /*#__PURE__*/_react.default.createElement(ResponseContainer, {
|
|
119
91
|
ref: ref => {
|
|
@@ -121,13 +93,7 @@ const ImageDropTarget = ({
|
|
|
121
93
|
setNodeRef(ref);
|
|
122
94
|
},
|
|
123
95
|
className: containerClasses,
|
|
124
|
-
style: updatedContainerStyle
|
|
125
|
-
role: isNativeTabStop ? 'button' : undefined,
|
|
126
|
-
tabIndex: isNativeTabStop ? 0 : -1,
|
|
127
|
-
onClick: handleContainerClick,
|
|
128
|
-
onKeyDown: isNativeTabStop ? handleContainerKeyDown : undefined,
|
|
129
|
-
onMouseEnter: () => setIsHovered(true),
|
|
130
|
-
onMouseLeave: () => setIsHovered(false)
|
|
96
|
+
style: updatedContainerStyle
|
|
131
97
|
}, answers.length ? /*#__PURE__*/_react.default.createElement(AnswersContainer, {
|
|
132
98
|
ref: ref => {
|
|
133
99
|
dropContainerResponsesHeightRef.current = ref?.getBoundingClientRect().height;
|
|
@@ -141,10 +107,7 @@ const ImageDropTarget = ({
|
|
|
141
107
|
answerChoiceTransparency: answerChoiceTransparency,
|
|
142
108
|
containerStyle: {
|
|
143
109
|
padding: imageDropTargetPadding ? imageDropTargetPadding : shouldHaveSmallPadding ? '2px' : '6px 10px'
|
|
144
|
-
}
|
|
145
|
-
selectedResponse: selectedResponse,
|
|
146
|
-
onSelectClick: onSelectClick,
|
|
147
|
-
onPlacementClick: onPlacementClick
|
|
110
|
+
}
|
|
148
111
|
}))) : null);
|
|
149
112
|
};
|
|
150
113
|
ImageDropTarget.propTypes = {
|
|
@@ -161,10 +124,7 @@ ImageDropTarget.propTypes = {
|
|
|
161
124
|
answerChoiceTransparency: _propTypes.default.bool,
|
|
162
125
|
responseContainerPadding: _propTypes.default.string,
|
|
163
126
|
imageDropTargetPadding: _propTypes.default.string,
|
|
164
|
-
maxResponsePerZone: _propTypes.default.number
|
|
165
|
-
selectedResponse: _propTypes.default.object,
|
|
166
|
-
onSelectClick: _propTypes.default.func,
|
|
167
|
-
onPlacementClick: _propTypes.default.func
|
|
127
|
+
maxResponsePerZone: _propTypes.default.number
|
|
168
128
|
};
|
|
169
129
|
var _default = exports.default = ImageDropTarget;
|
|
170
130
|
//# sourceMappingURL=image-drop-target.js.map
|