@pie-element/categorize 13.2.2-beta.4 → 13.2.3

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 (41) hide show
  1. package/CHANGELOG.md +52 -32
  2. package/configure/CHANGELOG.md +49 -30
  3. package/configure/package.json +5 -5
  4. package/controller/CHANGELOG.md +17 -42
  5. package/controller/package.json +1 -1
  6. package/lib/index.js +2 -2
  7. package/lib/index.js.map +1 -1
  8. package/package.json +6 -6
  9. package/configure/lib/__tests__/main.test.js +0 -100
  10. package/configure/lib/__tests__/utils.js +0 -39
  11. package/configure/lib/design/__tests__/builder.test.js +0 -34
  12. package/configure/lib/design/__tests__/buttons.test.js +0 -36
  13. package/configure/lib/design/__tests__/header.test.js +0 -37
  14. package/configure/lib/design/__tests__/index.test.js +0 -269
  15. package/configure/lib/design/__tests__/input-header.test.js +0 -41
  16. package/configure/lib/design/categories/__tests__/alternateResponses.test.js +0 -93
  17. package/configure/lib/design/categories/__tests__/category.test.js +0 -65
  18. package/configure/lib/design/categories/__tests__/choice-preview.test.js +0 -52
  19. package/configure/lib/design/categories/__tests__/droppable-placeholder.test.js +0 -63
  20. package/configure/lib/design/categories/__tests__/index.test.js +0 -91
  21. package/configure/lib/design/choices/__tests__/choice.test.js +0 -62
  22. package/configure/lib/design/choices/__tests__/config.test.js +0 -66
  23. package/configure/lib/design/choices/__tests__/index.test.js +0 -70
  24. package/controller/lib/__tests__/index.test.js +0 -526
  25. package/docs/demo/.pie/.configure/package.json +0 -10
  26. package/docs/demo/.pie/.configure/yarn.lock +0 -2122
  27. package/docs/demo/.pie/.controllers/package.json +0 -10
  28. package/docs/demo/.pie/.controllers/yarn.lock +0 -110
  29. package/docs/demo/.pie/info.entry.js +0 -89
  30. package/docs/demo/.pie/info.webpack.config.js +0 -119
  31. package/docs/demo/.pie/package.json +0 -10
  32. package/docs/demo/.pie/yarn.lock +0 -2137
  33. package/docs/demo/pie.manifest.json +0 -11
  34. package/lib/__tests__/index.test.js +0 -197
  35. package/lib/categorize/__tests__/categories.test.js +0 -138
  36. package/lib/categorize/__tests__/category.test.js +0 -137
  37. package/lib/categorize/__tests__/choice.test.js +0 -88
  38. package/lib/categorize/__tests__/choices.test.js +0 -118
  39. package/lib/categorize/__tests__/droppable-placeholder.test.js +0 -96
  40. package/lib/categorize/__tests__/grid-content.test.js +0 -48
  41. package/lib/categorize/__tests__/index.test.js +0 -250
package/CHANGELOG.md CHANGED
@@ -3,76 +3,96 @@
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
- ## [13.2.2-beta.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.2.2-beta.3...@pie-element/categorize@13.2.2-beta.4) (2026-09-11)
6
+ ## [13.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.2.2...@pie-element/categorize@13.2.3) (2026-09-17)
7
7
 
8
8
  **Note:** Version bump only for package @pie-element/categorize
9
9
 
10
- ## [13.2.2-beta.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.2.2-beta.2...@pie-element/categorize@13.2.2-beta.3) (2026-09-04)
10
+ ## [13.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.2.1...@pie-element/categorize@13.2.2) (2026-09-04)
11
11
 
12
- **Note:** Version bump only for package @pie-element/categorize
12
+ ### Bug Fixes
13
13
 
14
- ## [13.2.2-beta.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.4.0-beta.7...@pie-element/categorize@13.2.2-beta.2) (2026-08-26)
14
+ - bump libs PIE-978, PIE-980 ([96489ba](https://github.com/pie-framework/pie-elements/commit/96489ba3c220604f21c3ce4500d79f4389266e9e))
15
+
16
+ ## [13.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.2.0...@pie-element/categorize@13.2.1) (2026-08-26)
15
17
 
16
18
  **Note:** Version bump only for package @pie-element/categorize
17
19
 
18
- # [13.4.0-beta.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.4.0-beta.6...@pie-element/categorize@13.4.0-beta.7) (2026-08-20)
20
+ # [13.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.11...@pie-element/categorize@13.2.0) (2026-08-21)
19
21
 
20
- **Note:** Version bump only for package @pie-element/categorize
22
+ ### Bug Fixes
21
23
 
22
- # [13.4.0-beta.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.4.0-beta.5...@pie-element/categorize@13.4.0-beta.6) (2026-08-14)
24
+ - move [@pie-lib](https://github.com/pie-lib) deps back to latest, off next prereleases PIE-927 ([a53e012](https://github.com/pie-framework/pie-elements/commit/a53e0127eb4ac95ece54e1e2bd669ae4974f4251))
25
+ - 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))
23
26
 
24
- **Note:** Version bump only for package @pie-element/categorize
27
+ ### Features
25
28
 
26
- # [13.4.0-beta.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.4.0-beta.4...@pie-element/categorize@13.4.0-beta.5) (2026-08-11)
29
+ - bump libs PIE-856, PIE-681, PIE-927 ([cb26d7a](https://github.com/pie-framework/pie-elements/commit/cb26d7afa6c99522533c321d5ff8ce3148a66e9e))
27
30
 
28
- **Note:** Version bump only for package @pie-element/categorize
31
+ ## [13.1.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.10...@pie-element/categorize@13.1.11) (2026-08-19)
29
32
 
30
- # [13.4.0-beta.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.4.0-beta.3...@pie-element/categorize@13.4.0-beta.4) (2026-08-11)
33
+ ### Bug Fixes
31
34
 
32
- **Note:** Version bump only for package @pie-element/categorize
35
+ - bump libs and shared modules PIE-681, PIE-708 ([08af8b5](https://github.com/pie-framework/pie-elements/commit/08af8b5802aecc8ee5454a1b6d60277d7ec94204))
33
36
 
34
- # [13.4.0-beta.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.4.0-beta.2...@pie-element/categorize@13.4.0-beta.3) (2026-08-11)
37
+ ## [13.1.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.8...@pie-element/categorize@13.1.10) (2026-08-13)
35
38
 
36
39
  **Note:** Version bump only for package @pie-element/categorize
37
40
 
38
- # [13.4.0-beta.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.4.0-beta.1...@pie-element/categorize@13.4.0-beta.2) (2026-08-11)
41
+ ## [13.1.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.7...@pie-element/categorize@13.1.9) (2026-08-11)
39
42
 
40
43
  **Note:** Version bump only for package @pie-element/categorize
41
44
 
42
- # [13.4.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.4.0-beta.0...@pie-element/categorize@13.4.0-beta.1) (2026-08-07)
45
+ ## [13.1.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.7...@pie-element/categorize@13.1.8) (2026-07-31)
43
46
 
44
47
  **Note:** Version bump only for package @pie-element/categorize
45
48
 
46
- # [13.4.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.3.0-beta.0...@pie-element/categorize@13.4.0-beta.0) (2026-08-07)
49
+ ## [13.1.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.6...@pie-element/categorize@13.1.7) (2026-07-08)
47
50
 
48
- **Note:** Version bump only for package @pie-element/categorize
51
+ ### Bug Fixes
49
52
 
50
- # [13.3.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.3.0-beta.0...@pie-element/categorize@13.3.0-beta.1) (2026-08-07)
53
+ - bump libs & shared modules PIE-706, PIE-702, PIE-679, PIE-698 ([5b1a8c4](https://github.com/pie-framework/pie-elements/commit/5b1a8c4c3eba2126fc43d78fd0187e7cd11d5424))
54
+ - **categorize:** compute allowmultiple based on response when missing, get rid of defaults value PIE, add tests PIE-723 ([3217ede](https://github.com/pie-framework/pie-elements/commit/3217edebf20e3906a8c46d775dfb2e3ee0095fd6))
55
+ - **categorize:** use single quotes lint warning PIE-723 ([4d2162a](https://github.com/pie-framework/pie-elements/commit/4d2162a6a618a7f5104a89e753a02dba75fb8c11))
51
56
 
52
- **Note:** Version bump only for package @pie-element/categorize
57
+ ## [13.1.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.5...@pie-element/categorize@13.1.6) (2026-07-02)
53
58
 
54
- # [13.3.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.2.0-beta.0...@pie-element/categorize@13.3.0-beta.0) (2026-08-07)
59
+ ### Bug Fixes
55
60
 
56
- **Note:** Version bump only for package @pie-element/categorize
61
+ - 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))
62
+ - sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
57
63
 
58
- # [13.2.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.0...@pie-element/categorize@13.2.0-beta.0) (2026-08-07)
64
+ ## [13.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.4...@pie-element/categorize@13.1.5) (2026-06-22)
59
65
 
60
66
  ### Bug Fixes
61
67
 
62
- - bump libs & shared modules PIE-706, PIE-702, PIE-679, PIE-698 ([5b1a8c4](https://github.com/pie-framework/pie-elements/commit/5b1a8c4c3eba2126fc43d78fd0187e7cd11d5424))
63
- - bump shared modules and libs PIE-600, PIE-602 ([ce99f6a](https://github.com/pie-framework/pie-elements/commit/ce99f6af50cb855b666a6df9340f9f5445fde4c4))
64
- - 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))
65
68
  - 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))
66
- - 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))
69
+ - if allowMultiplePlacements default should be false PIE-682 ([b7447f4](https://github.com/pie-framework/pie-elements/commit/b7447f4d97e9d7cc2415f54a17ffe13ed15d1ebb))
70
+ - if allowMultiplePlacements is missing default should be false PIE-682 ([3f93d0d](https://github.com/pie-framework/pie-elements/commit/3f93d0de81de3a5cbd2763184d2241f31e9dbae0))
71
+
72
+ ## [13.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.3...@pie-element/categorize@13.1.4) (2026-06-17)
73
+
74
+ ### Bug Fixes
75
+
76
+ - 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))
77
+ - clear \_root reference on disconnect PIE-686 ([0a236ce](https://github.com/pie-framework/pie-elements/commit/0a236ce1decbd64b250d97484212179f62adc049))
78
+
79
+ ## [13.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.2...@pie-element/categorize@13.1.3) (2026-06-12)
80
+
81
+ ### Bug Fixes
82
+
67
83
  - bump shared modules and libsPIE-603, PIE-604, PIE-663, PIE-662, PIE-678 ([e61c7a7](https://github.com/pie-framework/pie-elements/commit/e61c7a7d23744586337dfbb17a18ebfc656c202f))
68
- - **categorize:** compute allowmultiple based on response when missing, get rid of defaults value PIE, add tests PIE-723 ([3217ede](https://github.com/pie-framework/pie-elements/commit/3217edebf20e3906a8c46d775dfb2e3ee0095fd6))
69
84
  - **categorize:** fix lint warnings PIE-433 ([b3a61de](https://github.com/pie-framework/pie-elements/commit/b3a61de893e7aa0b3bfc119ca17a6acc769a042a))
70
85
  - **categorize:** normalize categoryCount based on allowMultiplePlacements PIE-433 ([60f8473](https://github.com/pie-framework/pie-elements/commit/60f847381b769fa3cc4add100cce821b2aa6338c))
71
- - **categorize:** use single quotes lint warning PIE-723 ([4d2162a](https://github.com/pie-framework/pie-elements/commit/4d2162a6a618a7f5104a89e753a02dba75fb8c11))
72
- - clear \_root reference on disconnect PIE-686 ([0a236ce](https://github.com/pie-framework/pie-elements/commit/0a236ce1decbd64b250d97484212179f62adc049))
73
- - if allowMultiplePlacements default should be false PIE-682 ([b7447f4](https://github.com/pie-framework/pie-elements/commit/b7447f4d97e9d7cc2415f54a17ffe13ed15d1ebb))
74
- - if allowMultiplePlacements is missing default should be false PIE-682 ([3f93d0d](https://github.com/pie-framework/pie-elements/commit/3f93d0de81de3a5cbd2763184d2241f31e9dbae0))
75
- - sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
86
+
87
+ ## [13.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.1...@pie-element/categorize@13.1.2) (2026-06-04)
88
+
89
+ ### Bug Fixes
90
+
91
+ - bump shared modules and libs PIE-600, PIE-602 ([ce99f6a](https://github.com/pie-framework/pie-elements/commit/ce99f6af50cb855b666a6df9340f9f5445fde4c4))
92
+
93
+ ## [13.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.0...@pie-element/categorize@13.1.1) (2026-05-21)
94
+
95
+ **Note:** Version bump only for package @pie-element/categorize
76
96
 
77
97
  # [13.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.1.0-next.1...@pie-element/categorize@13.1.0) (2026-05-21)
78
98
 
@@ -3,72 +3,91 @@
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
- # [11.4.0-beta.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.4.0-beta.9...@pie-element/categorize-configure@11.4.0-beta.10) (2026-09-11)
6
+ ## [11.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.2.2...@pie-element/categorize-configure@11.2.3) (2026-09-17)
7
7
 
8
8
  **Note:** Version bump only for package @pie-element/categorize-configure
9
9
 
10
- # [11.4.0-beta.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.4.0-beta.8...@pie-element/categorize-configure@11.4.0-beta.9) (2026-09-04)
10
+ ## [11.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.2.1...@pie-element/categorize-configure@11.2.2) (2026-09-04)
11
11
 
12
- **Note:** Version bump only for package @pie-element/categorize-configure
12
+ ### Bug Fixes
13
+
14
+ - bump libs PIE-978, PIE-980 ([96489ba](https://github.com/pie-framework/pie-elements/commit/96489ba3c220604f21c3ce4500d79f4389266e9e))
13
15
 
14
- # [11.4.0-beta.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.4.0-beta.7...@pie-element/categorize-configure@11.4.0-beta.8) (2026-08-26)
16
+ ## [11.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.2.0...@pie-element/categorize-configure@11.2.1) (2026-08-26)
15
17
 
16
18
  **Note:** Version bump only for package @pie-element/categorize-configure
17
19
 
18
- # [11.4.0-beta.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.4.0-beta.6...@pie-element/categorize-configure@11.4.0-beta.7) (2026-08-20)
20
+ # [11.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.11...@pie-element/categorize-configure@11.2.0) (2026-08-21)
19
21
 
20
- **Note:** Version bump only for package @pie-element/categorize-configure
22
+ ### Bug Fixes
21
23
 
22
- # [11.4.0-beta.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.4.0-beta.5...@pie-element/categorize-configure@11.4.0-beta.6) (2026-08-14)
24
+ - move [@pie-lib](https://github.com/pie-lib) deps back to latest, off next prereleases PIE-927 ([a53e012](https://github.com/pie-framework/pie-elements/commit/a53e0127eb4ac95ece54e1e2bd669ae4974f4251))
23
25
 
24
- **Note:** Version bump only for package @pie-element/categorize-configure
26
+ ### Features
25
27
 
26
- # [11.4.0-beta.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.4.0-beta.4...@pie-element/categorize-configure@11.4.0-beta.5) (2026-08-11)
28
+ - bump libs PIE-856, PIE-681, PIE-927 ([cb26d7a](https://github.com/pie-framework/pie-elements/commit/cb26d7afa6c99522533c321d5ff8ce3148a66e9e))
27
29
 
28
- **Note:** Version bump only for package @pie-element/categorize-configure
30
+ ## [11.1.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.10...@pie-element/categorize-configure@11.1.11) (2026-08-19)
29
31
 
30
- # [11.4.0-beta.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.4.0-beta.3...@pie-element/categorize-configure@11.4.0-beta.4) (2026-08-11)
32
+ ### Bug Fixes
31
33
 
32
- **Note:** Version bump only for package @pie-element/categorize-configure
34
+ - bump libs and shared modules PIE-681, PIE-708 ([08af8b5](https://github.com/pie-framework/pie-elements/commit/08af8b5802aecc8ee5454a1b6d60277d7ec94204))
33
35
 
34
- # [11.4.0-beta.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.4.0-beta.2...@pie-element/categorize-configure@11.4.0-beta.3) (2026-08-11)
36
+ ## [11.1.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.8...@pie-element/categorize-configure@11.1.10) (2026-08-13)
35
37
 
36
38
  **Note:** Version bump only for package @pie-element/categorize-configure
37
39
 
38
- # [11.4.0-beta.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.4.0-beta.1...@pie-element/categorize-configure@11.4.0-beta.2) (2026-08-11)
40
+ ## [11.1.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.7...@pie-element/categorize-configure@11.1.9) (2026-08-11)
39
41
 
40
42
  **Note:** Version bump only for package @pie-element/categorize-configure
41
43
 
42
- # [11.4.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.4.0-beta.0...@pie-element/categorize-configure@11.4.0-beta.1) (2026-08-07)
44
+ ## [11.1.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.7...@pie-element/categorize-configure@11.1.8) (2026-07-31)
43
45
 
44
46
  **Note:** Version bump only for package @pie-element/categorize-configure
45
47
 
46
- # [11.4.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.3.0-beta.0...@pie-element/categorize-configure@11.4.0-beta.0) (2026-08-07)
48
+ ## [11.1.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.6...@pie-element/categorize-configure@11.1.7) (2026-07-08)
47
49
 
48
- **Note:** Version bump only for package @pie-element/categorize-configure
50
+ ### Bug Fixes
49
51
 
50
- # [11.3.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.3.0-beta.0...@pie-element/categorize-configure@11.3.0-beta.1) (2026-08-07)
52
+ - bump libs & shared modules PIE-706, PIE-702, PIE-679, PIE-698 ([5b1a8c4](https://github.com/pie-framework/pie-elements/commit/5b1a8c4c3eba2126fc43d78fd0187e7cd11d5424))
53
+ - **categorize:** compute allowmultiple based on response when missing, get rid of defaults value PIE, add tests PIE-723 ([3217ede](https://github.com/pie-framework/pie-elements/commit/3217edebf20e3906a8c46d775dfb2e3ee0095fd6))
51
54
 
52
- **Note:** Version bump only for package @pie-element/categorize-configure
55
+ ## [11.1.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.5...@pie-element/categorize-configure@11.1.6) (2026-07-02)
53
56
 
54
- # [11.3.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.2.0-beta.0...@pie-element/categorize-configure@11.3.0-beta.0) (2026-08-07)
57
+ ### Bug Fixes
55
58
 
56
- **Note:** Version bump only for package @pie-element/categorize-configure
59
+ - 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))
60
+ - sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
57
61
 
58
- # [11.2.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.0...@pie-element/categorize-configure@11.2.0-beta.0) (2026-08-07)
62
+ ## [11.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.4...@pie-element/categorize-configure@11.1.5) (2026-06-22)
59
63
 
60
64
  ### Bug Fixes
61
65
 
62
- - bump libs & shared modules PIE-706, PIE-702, PIE-679, PIE-698 ([5b1a8c4](https://github.com/pie-framework/pie-elements/commit/5b1a8c4c3eba2126fc43d78fd0187e7cd11d5424))
63
- - bump shared modules and libs PIE-600, PIE-602 ([ce99f6a](https://github.com/pie-framework/pie-elements/commit/ce99f6af50cb855b666a6df9340f9f5445fde4c4))
64
- - 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))
65
66
  - 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))
66
- - 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))
67
- - bump shared modules and libsPIE-603, PIE-604, PIE-663, PIE-662, PIE-678 ([e61c7a7](https://github.com/pie-framework/pie-elements/commit/e61c7a7d23744586337dfbb17a18ebfc656c202f))
68
- - **categorize:** compute allowmultiple based on response when missing, get rid of defaults value PIE, add tests PIE-723 ([3217ede](https://github.com/pie-framework/pie-elements/commit/3217edebf20e3906a8c46d775dfb2e3ee0095fd6))
69
- - clear \_root reference on disconnect PIE-686 ([0a236ce](https://github.com/pie-framework/pie-elements/commit/0a236ce1decbd64b250d97484212179f62adc049))
70
67
  - if allowMultiplePlacements default should be false PIE-682 ([b7447f4](https://github.com/pie-framework/pie-elements/commit/b7447f4d97e9d7cc2415f54a17ffe13ed15d1ebb))
71
- - sync libs versions ([48b5be9](https://github.com/pie-framework/pie-elements/commit/48b5be9559eb5b5235ca05f51c5f0161032a7041))
68
+
69
+ ## [11.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.3...@pie-element/categorize-configure@11.1.4) (2026-06-17)
70
+
71
+ ### Bug Fixes
72
+
73
+ - 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))
74
+ - clear \_root reference on disconnect PIE-686 ([0a236ce](https://github.com/pie-framework/pie-elements/commit/0a236ce1decbd64b250d97484212179f62adc049))
75
+
76
+ ## [11.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.2...@pie-element/categorize-configure@11.1.3) (2026-06-12)
77
+
78
+ ### Bug Fixes
79
+
80
+ - bump shared modules and libsPIE-603, PIE-604, PIE-663, PIE-662, PIE-678 ([e61c7a7](https://github.com/pie-framework/pie-elements/commit/e61c7a7d23744586337dfbb17a18ebfc656c202f))
81
+
82
+ ## [11.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.1...@pie-element/categorize-configure@11.1.2) (2026-06-04)
83
+
84
+ ### Bug Fixes
85
+
86
+ - bump shared modules and libs PIE-600, PIE-602 ([ce99f6a](https://github.com/pie-framework/pie-elements/commit/ce99f6af50cb855b666a6df9340f9f5445fde4c4))
87
+
88
+ ## [11.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.0...@pie-element/categorize-configure@11.1.1) (2026-05-21)
89
+
90
+ **Note:** Version bump only for package @pie-element/categorize-configure
72
91
 
73
92
  # [11.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.1.0-next.1...@pie-element/categorize-configure@11.1.0) (2026-05-21)
74
93
 
@@ -3,7 +3,7 @@
3
3
  "private": true,
4
4
  "main": "lib/index.js",
5
5
  "module": "src/index.js",
6
- "version": "11.4.0-beta.10",
6
+ "version": "11.2.3",
7
7
  "description": "",
8
8
  "scripts": {},
9
9
  "author": "pie framework developers",
@@ -16,11 +16,11 @@
16
16
  "@mui/material": "^7.3.4",
17
17
  "@pie-framework/pie-configure-events": "^1.3.0",
18
18
  "@pie-lib/categorize": "2.0.2",
19
- "@pie-lib/config-ui": "13.1.0-beta.8",
20
- "@pie-lib/drag": "4.0.6",
21
- "@pie-lib/editable-html-tip-tap": "2.2.0-beta.8",
19
+ "@pie-lib/config-ui": "13.0.20",
20
+ "@pie-lib/drag": "4.1.3",
21
+ "@pie-lib/editable-html-tip-tap": "2.1.18",
22
22
  "@pie-lib/math-rendering": "5.1.0",
23
- "@pie-lib/render-ui": "6.1.3",
23
+ "@pie-lib/render-ui": "7.0.2",
24
24
  "@pie-lib/translator": "4.0.2",
25
25
  "debug": "^4.1.1",
26
26
  "lodash-es": "^4.17.23",
@@ -3,68 +3,43 @@
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
- # [10.4.0-beta.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.4.0-beta.9...@pie-element/categorize-controller@10.4.0-beta.10) (2026-09-11)
6
+ ## [10.1.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.1.5...@pie-element/categorize-controller@10.1.7) (2026-08-13)
7
7
 
8
8
  **Note:** Version bump only for package @pie-element/categorize-controller
9
9
 
10
- # [10.4.0-beta.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.4.0-beta.8...@pie-element/categorize-controller@10.4.0-beta.9) (2026-09-04)
10
+ ## [10.1.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.1.5...@pie-element/categorize-controller@10.1.6) (2026-08-11)
11
11
 
12
12
  **Note:** Version bump only for package @pie-element/categorize-controller
13
13
 
14
- # [10.4.0-beta.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.4.0-beta.7...@pie-element/categorize-controller@10.4.0-beta.8) (2026-08-26)
14
+ ## [10.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.1.4...@pie-element/categorize-controller@10.1.5) (2026-07-08)
15
15
 
16
- **Note:** Version bump only for package @pie-element/categorize-controller
17
-
18
- # [10.4.0-beta.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.4.0-beta.6...@pie-element/categorize-controller@10.4.0-beta.7) (2026-08-20)
19
-
20
- **Note:** Version bump only for package @pie-element/categorize-controller
21
-
22
- # [10.4.0-beta.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.4.0-beta.5...@pie-element/categorize-controller@10.4.0-beta.6) (2026-08-14)
23
-
24
- **Note:** Version bump only for package @pie-element/categorize-controller
25
-
26
- # [10.4.0-beta.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.4.0-beta.4...@pie-element/categorize-controller@10.4.0-beta.5) (2026-08-11)
27
-
28
- **Note:** Version bump only for package @pie-element/categorize-controller
29
-
30
- # [10.4.0-beta.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.4.0-beta.3...@pie-element/categorize-controller@10.4.0-beta.4) (2026-08-11)
31
-
32
- **Note:** Version bump only for package @pie-element/categorize-controller
33
-
34
- # [10.4.0-beta.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.4.0-beta.2...@pie-element/categorize-controller@10.4.0-beta.3) (2026-08-11)
35
-
36
- **Note:** Version bump only for package @pie-element/categorize-controller
37
-
38
- # [10.4.0-beta.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.4.0-beta.1...@pie-element/categorize-controller@10.4.0-beta.2) (2026-08-11)
39
-
40
- **Note:** Version bump only for package @pie-element/categorize-controller
41
-
42
- # [10.4.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.4.0-beta.0...@pie-element/categorize-controller@10.4.0-beta.1) (2026-08-07)
16
+ ### Bug Fixes
43
17
 
44
- **Note:** Version bump only for package @pie-element/categorize-controller
18
+ - **categorize:** compute allowmultiple based on response when missing, get rid of defaults value PIE, add tests PIE-723 ([3217ede](https://github.com/pie-framework/pie-elements/commit/3217edebf20e3906a8c46d775dfb2e3ee0095fd6))
19
+ - **categorize:** use single quotes lint warning PIE-723 ([4d2162a](https://github.com/pie-framework/pie-elements/commit/4d2162a6a618a7f5104a89e753a02dba75fb8c11))
45
20
 
46
- # [10.4.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.3.0-beta.0...@pie-element/categorize-controller@10.4.0-beta.0) (2026-08-07)
21
+ ## [10.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.1.3...@pie-element/categorize-controller@10.1.4) (2026-07-02)
47
22
 
48
- **Note:** Version bump only for package @pie-element/categorize-controller
23
+ ### Bug Fixes
49
24
 
50
- # [10.3.0-beta.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.3.0-beta.0...@pie-element/categorize-controller@10.3.0-beta.1) (2026-08-07)
25
+ - 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))
51
26
 
52
- **Note:** Version bump only for package @pie-element/categorize-controller
27
+ ## [10.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.1.2...@pie-element/categorize-controller@10.1.3) (2026-06-22)
53
28
 
54
- # [10.3.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.2.0-beta.0...@pie-element/categorize-controller@10.3.0-beta.0) (2026-08-07)
29
+ ### Bug Fixes
55
30
 
56
- **Note:** Version bump only for package @pie-element/categorize-controller
31
+ - if allowMultiplePlacements is missing default should be false PIE-682 ([3f93d0d](https://github.com/pie-framework/pie-elements/commit/3f93d0de81de3a5cbd2763184d2241f31e9dbae0))
57
32
 
58
- # [10.2.0-beta.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.1.0...@pie-element/categorize-controller@10.2.0-beta.0) (2026-08-07)
33
+ ## [10.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.1.1...@pie-element/categorize-controller@10.1.2) (2026-06-12)
59
34
 
60
35
  ### Bug Fixes
61
36
 
62
- - 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))
63
- - **categorize:** compute allowmultiple based on response when missing, get rid of defaults value PIE, add tests PIE-723 ([3217ede](https://github.com/pie-framework/pie-elements/commit/3217edebf20e3906a8c46d775dfb2e3ee0095fd6))
64
37
  - **categorize:** fix lint warnings PIE-433 ([b3a61de](https://github.com/pie-framework/pie-elements/commit/b3a61de893e7aa0b3bfc119ca17a6acc769a042a))
65
38
  - **categorize:** normalize categoryCount based on allowMultiplePlacements PIE-433 ([60f8473](https://github.com/pie-framework/pie-elements/commit/60f847381b769fa3cc4add100cce821b2aa6338c))
66
- - **categorize:** use single quotes lint warning PIE-723 ([4d2162a](https://github.com/pie-framework/pie-elements/commit/4d2162a6a618a7f5104a89e753a02dba75fb8c11))
67
- - if allowMultiplePlacements is missing default should be false PIE-682 ([3f93d0d](https://github.com/pie-framework/pie-elements/commit/3f93d0de81de3a5cbd2763184d2241f31e9dbae0))
39
+
40
+ ## [10.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.1.0...@pie-element/categorize-controller@10.1.1) (2026-05-21)
41
+
42
+ **Note:** Version bump only for package @pie-element/categorize-controller
68
43
 
69
44
  # [10.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.1.0-next.1...@pie-element/categorize-controller@10.1.0) (2026-05-21)
70
45
 
@@ -8,7 +8,7 @@
8
8
  "@pie-lib/translator": "4.0.2",
9
9
  "lodash-es": "^4.17.23"
10
10
  },
11
- "version": "10.4.0-beta.10",
11
+ "version": "10.1.7",
12
12
  "description": "",
13
13
  "scripts": {},
14
14
  "main": "lib/index.js",
package/lib/index.js CHANGED
@@ -97,7 +97,7 @@ class Categorize extends HTMLElement {
97
97
  if (autoplayAudioEnabled && completeAudioEnabled && !this.audioComplete) {
98
98
  if (elementContext) {
99
99
  const audio = elementContext.querySelector('audio');
100
- const isInsidePrompt = audio && audio.closest('#preview-prompt');
100
+ const isInsidePrompt = audio && audio.closest('.preview-prompt');
101
101
 
102
102
  // only require audio completion if audio exists and is inside the prompt
103
103
  if (audio && isInsidePrompt) {
@@ -209,7 +209,7 @@ class Categorize extends HTMLElement {
209
209
  if (mutation.type === 'childList') {
210
210
  if (this._audioInitialized) return;
211
211
  const audio = this.querySelector('audio');
212
- const isInsidePrompt = audio && audio.closest('#preview-prompt');
212
+ const isInsidePrompt = audio && audio.closest('.preview-prompt');
213
213
  if (!this._model) return;
214
214
  if (!this._model.autoplayAudioEnabled) return;
215
215
  if (audio && !isInsidePrompt) return;
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_client","_mathRendering","_renderUi","_piePlayerEvents","_categorize","Categorize","HTMLElement","constructor","_defineProperty2","default","_mathRenderPending","requestAnimationFrame","_mathObserver","_mathObserverPaused","disconnect","renderMath","setTimeout","observe","childList","subtree","characterData","_root","_initMathObserver","MutationObserver","_scheduleMathRender","_disconnectMathObserver","model","m","_model","eliminateBlindAnswersFromSession","dispatchEvent","ModelSetEvent","tagName","toLowerCase","isComplete","_audioInitialized","render","autoplayAudioEnabled","choices","completeAudioEnabled","hasUnplacedChoices","possibleResponses","responseAreasToBeFilled","elementContext","audioComplete","audio","querySelector","isInsidePrompt","closest","_session","answers","Array","isArray","filledResponseAreas","filter","answer","length","areResponseAreasFilled","duplicatesAllowed","some","choice","categoryCount","allAnswersIds","map","flat","requiredAnswersPlaced","response","every","val","includes","session","s","mappedChoices","c","id","filteredAnswers","answerChoices","changeAnswers","selector","SessionChangedEvent","onShowCorrectToggle","_createAudioInfoToast","info","document","createElement","Object","assign","style","position","top","width","height","display","justifyContent","alignItems","background","zIndex","cursor","img","src","EnableAudioAutoplayImage","alt","appendChild","connectedCallback","observer","mutationsList","forEach","mutation","type","container","enableAudio","play","removeChild","removeEventListener","paused","addEventListener","handlePlaying","audioStartTime","Date","getTime","handleEnded","audioEndTime","waitTime","_audio","_handlePlaying","_handleEnded","_enableAudio","disconnectedCallback","unmount","el","React","CategorizeComponent","onAnswersChange","bind","pauseMathObserver","resumeMathObserver","createRoot","exports"],"sources":["../src/index.js"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport { EnableAudioAutoplayImage } from '@pie-lib/render-ui';\nimport { SessionChangedEvent, ModelSetEvent } from '@pie-framework/pie-player-events';\nimport CategorizeComponent from './categorize';\n\nexport default class Categorize extends HTMLElement {\n constructor() {\n super();\n this._root = null;\n this._mathObserver = null;\n this._mathRenderPending = false;\n }\n\n _scheduleMathRender = () => {\n if (this._mathRenderPending) return;\n\n this._mathRenderPending = true;\n\n requestAnimationFrame(() => {\n if (this._mathObserver && !this._mathObserverPaused) {\n this._mathObserver.disconnect();\n }\n\n renderMath(this);\n\n this._mathRenderPending = false;\n\n setTimeout(() => {\n if (this._mathObserver && !this._mathObserverPaused) {\n this._mathObserver.observe(this, {\n childList: true,\n subtree: true,\n characterData: false,\n });\n }\n }, 50);\n });\n };\n\n _initMathObserver() {\n if (this._mathObserver) return;\n\n this._mathObserver = new MutationObserver(() => {\n this._scheduleMathRender();\n });\n\n this._mathObserver.observe(this, {\n childList: true,\n subtree: true,\n characterData: false,\n });\n }\n\n _disconnectMathObserver() {\n if (this._mathObserver) {\n this._mathObserver.disconnect();\n this._mathObserver = null;\n }\n }\n\n pauseMathObserver = () => {\n if (this._mathObserver) {\n this._mathObserver.disconnect();\n this._mathObserverPaused = true;\n }\n };\n\n resumeMathObserver = () => {\n if (this._mathObserverPaused) {\n this._mathObserverPaused = false;\n\n if (this._mathObserver) {\n this._mathObserver.observe(this, {\n childList: true,\n subtree: true,\n characterData: false,\n });\n }\n }\n };\n\n set model(m) {\n this._model = m;\n\n this.eliminateBlindAnswersFromSession();\n this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), this.isComplete(), !!this._model));\n // reset the audioInitialized to false since the model changed, and we might need to reinitialize the audio\n this._audioInitialized = false;\n\n this.render();\n }\n\n isComplete() {\n const {\n autoplayAudioEnabled,\n choices,\n completeAudioEnabled,\n hasUnplacedChoices,\n possibleResponses,\n responseAreasToBeFilled,\n } = this._model || {};\n const elementContext = this;\n\n // check audio completion if audio settings are enabled and audio actually exists\n if (autoplayAudioEnabled && completeAudioEnabled && !this.audioComplete) {\n if (elementContext) {\n const audio = elementContext.querySelector('audio');\n const isInsidePrompt = audio && audio.closest('#preview-prompt');\n\n // only require audio completion if audio exists and is inside the prompt\n if (audio && isInsidePrompt) {\n return false;\n }\n }\n }\n\n if (!this._session || !this._session.answers) {\n return false;\n }\n\n const { answers } = this._session;\n\n if (!Array.isArray(answers)) {\n return false;\n }\n\n // filter answers by category and count the ones with content\n const filledResponseAreas = answers.filter((answer) => answer.choices.length).length;\n // check if an answer choice was added to at least as many response areas\n // as the number of populated response areas in the correct answer\n const areResponseAreasFilled = filledResponseAreas >= responseAreasToBeFilled;\n // check if multiple placements are allowed\n const duplicatesAllowed = (choices || []).some((choice) => choice.categoryCount === 0);\n\n if (duplicatesAllowed) {\n // an answer choice can be used multiple times\n return areResponseAreasFilled;\n }\n\n // any correct answer have any unplaced answer choices (by the author)\n if (hasUnplacedChoices) {\n return areResponseAreasFilled;\n }\n\n const allAnswersIds = answers.map((answer) => answer.choices).flat();\n\n // check if any correct answer have any unplaced answer choices (by the student)\n const requiredAnswersPlaced = (possibleResponses || []).some((response) =>\n response.every((val) => allAnswersIds.includes(val)),\n );\n\n // true - all choices (required for a correct response) were placed into a response area\n return requiredAnswersPlaced;\n }\n\n set session(s) {\n if (s && !s.answers) {\n s.answers = [];\n }\n\n this._session = s;\n this.render();\n }\n\n get session() {\n return this._session;\n }\n\n eliminateBlindAnswersFromSession() {\n const { answers = [] } = this._session || {};\n const { choices = [] } = this._model || {};\n\n const mappedChoices = choices.map((c) => c.id) || [];\n const filteredAnswers = answers.map((answer) => {\n const answerChoices = answer?.choices || [];\n answer.choices = answerChoices.filter((c) => mappedChoices.includes(c));\n\n return answer;\n });\n\n if (filteredAnswers.length > 0) {\n this.changeAnswers(filteredAnswers);\n }\n }\n\n changeAnswers(answers) {\n this._session.answers = answers;\n this._session.selector = 'Mouse';\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));\n\n this.render();\n }\n\n onShowCorrectToggle() {\n renderMath(this);\n }\n\n _createAudioInfoToast() {\n const info = document.createElement('div');\n info.id = 'play-audio-info';\n\n Object.assign(info.style, {\n position: 'absolute',\n top: 0,\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background: 'white',\n zIndex: '1000',\n cursor: 'pointer',\n });\n\n const img = document.createElement('img');\n img.src = EnableAudioAutoplayImage;\n img.alt = 'Click anywhere to enable audio autoplay';\n img.width = 500;\n img.height = 300;\n\n info.appendChild(img);\n return info;\n }\n\n connectedCallback() {\n this._initMathObserver();\n \n // Observation: audio in Chrome will have the autoplay attribute,\n // while other browsers will not have the autoplay attribute and will need a user interaction to play the audio\n // This workaround fixes the issue of audio being cached and played on any user interaction in Safari and Firefox\n const observer = new MutationObserver((mutationsList, observer) => {\n mutationsList.forEach((mutation) => {\n if (mutation.type === 'childList') {\n if (this._audioInitialized) return;\n const audio = this.querySelector('audio');\n const isInsidePrompt = audio && audio.closest('#preview-prompt');\n\n if (!this._model) return;\n if (!this._model.autoplayAudioEnabled) return;\n if (audio && !isInsidePrompt) return;\n if (!audio) return;\n\n const info = this._createAudioInfoToast();\n const container = this.querySelector('#main-container');\n const enableAudio = () => {\n if (this.querySelector('#play-audio-info')) {\n audio.play();\n container.removeChild(info);\n }\n\n document.removeEventListener('click', enableAudio);\n };\n\n // if the audio is paused, it means the user has not interacted with the page yet and the audio will not play\n // FIX FOR SAFARI: play with a slight delay to check if autoplay was blocked\n setTimeout(() => {\n if (audio.paused && !this.querySelector('#play-audio-info')) {\n // add info message as a toast to enable audio playback\n container.appendChild(info);\n document.addEventListener('click', enableAudio);\n } else {\n document.removeEventListener('click', enableAudio);\n }\n }, 500);\n\n // we need to listen for the playing event to remove the toast in case the audio plays because of re-rendering\n const handlePlaying = () => {\n //timestamp when auto-played audio started playing\n this._session.audioStartTime = this._session.audioStartTime || new Date().getTime();\n\n const info = this.querySelector('#play-audio-info');\n if (info) {\n container.removeChild(info);\n }\n\n audio.removeEventListener('playing', handlePlaying);\n };\n\n audio.addEventListener('playing', handlePlaying);\n\n // we need to listen for the ended event to update the isComplete state\n const handleEnded = () => {\n //timestamp when auto-played audio completed playing\n this._session.audioEndTime = this._session.audioEndTime || new Date().getTime();\n\n let { audioStartTime, audioEndTime, waitTime } = this._session;\n if (!waitTime && audioStartTime && audioEndTime) {\n // waitTime is elapsed time the user waited for auto-played audio to finish\n this._session.waitTime = audioEndTime - audioStartTime;\n }\n\n this.audioComplete = true;\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));\n\n audio.removeEventListener('ended', handleEnded);\n };\n\n audio.addEventListener('ended', handleEnded);\n\n // store references to remove later\n this._audio = audio;\n this._handlePlaying = handlePlaying;\n this._handleEnded = handleEnded;\n this._enableAudio = enableAudio;\n // set to true to prevent multiple initializations\n this._audioInitialized = true;\n\n observer.disconnect();\n }\n });\n });\n\n observer.observe(this, { childList: true, subtree: true });\n }\n\n disconnectedCallback() {\n this._disconnectMathObserver();\n \n document.removeEventListener('click', this._enableAudio);\n\n if (this._audio) {\n this._audio.removeEventListener('playing', this._handlePlaying);\n this._audio.removeEventListener('ended', this._handleEnded);\n this._audio = null;\n }\n\n if (this._root) {\n this._root.unmount();\n }\n }\n\n render() {\n if (this._model && this._session) {\n const el = React.createElement(CategorizeComponent, {\n model: this._model,\n session: this._session,\n onAnswersChange: this.changeAnswers.bind(this),\n onShowCorrectToggle: this.onShowCorrectToggle.bind(this),\n pauseMathObserver: this.pauseMathObserver,\n resumeMathObserver: this.resumeMathObserver,\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n }\n }\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAA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ACA,iBAAiB;QACzCC,kBAAkB,EAAE,IAAI,CAACA;MAC3B,CAAC,CAAC;MAEF,IAAI,CAAC,IAAI,CAAClH,KAAK,EAAE;QACf,IAAI,CAACA,KAAK,GAAG,IAAAmH,kBAAU,EAAC,IAAI,CAAC;MAC/B;MACA,IAAI,CAACnH,KAAK,CAACe,MAAM,CAAC6F,EAAE,CAAC;IACvB;EACF;AACF;AAACQ,OAAA,CAAAhI,OAAA,GAAAJ,UAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_client","_mathRendering","_renderUi","_piePlayerEvents","_categorize","Categorize","HTMLElement","constructor","_defineProperty2","default","_mathRenderPending","requestAnimationFrame","_mathObserver","_mathObserverPaused","disconnect","renderMath","setTimeout","observe","childList","subtree","characterData","_root","_initMathObserver","MutationObserver","_scheduleMathRender","_disconnectMathObserver","model","m","_model","eliminateBlindAnswersFromSession","dispatchEvent","ModelSetEvent","tagName","toLowerCase","isComplete","_audioInitialized","render","autoplayAudioEnabled","choices","completeAudioEnabled","hasUnplacedChoices","possibleResponses","responseAreasToBeFilled","elementContext","audioComplete","audio","querySelector","isInsidePrompt","closest","_session","answers","Array","isArray","filledResponseAreas","filter","answer","length","areResponseAreasFilled","duplicatesAllowed","some","choice","categoryCount","allAnswersIds","map","flat","requiredAnswersPlaced","response","every","val","includes","session","s","mappedChoices","c","id","filteredAnswers","answerChoices","changeAnswers","selector","SessionChangedEvent","onShowCorrectToggle","_createAudioInfoToast","info","document","createElement","Object","assign","style","position","top","width","height","display","justifyContent","alignItems","background","zIndex","cursor","img","src","EnableAudioAutoplayImage","alt","appendChild","connectedCallback","observer","mutationsList","forEach","mutation","type","container","enableAudio","play","removeChild","removeEventListener","paused","addEventListener","handlePlaying","audioStartTime","Date","getTime","handleEnded","audioEndTime","waitTime","_audio","_handlePlaying","_handleEnded","_enableAudio","disconnectedCallback","unmount","el","React","CategorizeComponent","onAnswersChange","bind","pauseMathObserver","resumeMathObserver","createRoot","exports"],"sources":["../src/index.js"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport { EnableAudioAutoplayImage } from '@pie-lib/render-ui';\nimport { SessionChangedEvent, ModelSetEvent } from '@pie-framework/pie-player-events';\nimport CategorizeComponent from './categorize';\n\nexport default class Categorize extends HTMLElement {\n constructor() {\n super();\n this._root = null;\n this._mathObserver = null;\n this._mathRenderPending = false;\n }\n\n _scheduleMathRender = () => {\n if (this._mathRenderPending) return;\n\n this._mathRenderPending = true;\n\n requestAnimationFrame(() => {\n if (this._mathObserver && !this._mathObserverPaused) {\n this._mathObserver.disconnect();\n }\n\n renderMath(this);\n\n this._mathRenderPending = false;\n\n setTimeout(() => {\n if (this._mathObserver && !this._mathObserverPaused) {\n this._mathObserver.observe(this, {\n childList: true,\n subtree: true,\n characterData: false,\n });\n }\n }, 50);\n });\n };\n\n _initMathObserver() {\n if (this._mathObserver) return;\n\n this._mathObserver = new MutationObserver(() => {\n this._scheduleMathRender();\n });\n\n this._mathObserver.observe(this, {\n childList: true,\n subtree: true,\n characterData: false,\n });\n }\n\n _disconnectMathObserver() {\n if (this._mathObserver) {\n this._mathObserver.disconnect();\n this._mathObserver = null;\n }\n }\n\n pauseMathObserver = () => {\n if (this._mathObserver) {\n this._mathObserver.disconnect();\n this._mathObserverPaused = true;\n }\n };\n\n resumeMathObserver = () => {\n if (this._mathObserverPaused) {\n this._mathObserverPaused = false;\n\n if (this._mathObserver) {\n this._mathObserver.observe(this, {\n childList: true,\n subtree: true,\n characterData: false,\n });\n }\n }\n };\n\n set model(m) {\n this._model = m;\n\n this.eliminateBlindAnswersFromSession();\n this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), this.isComplete(), !!this._model));\n // reset the audioInitialized to false since the model changed, and we might need to reinitialize the audio\n this._audioInitialized = false;\n\n this.render();\n }\n\n isComplete() {\n const {\n autoplayAudioEnabled,\n choices,\n completeAudioEnabled,\n hasUnplacedChoices,\n possibleResponses,\n responseAreasToBeFilled,\n } = this._model || {};\n const elementContext = this;\n\n // check audio completion if audio settings are enabled and audio actually exists\n if (autoplayAudioEnabled && completeAudioEnabled && !this.audioComplete) {\n if (elementContext) {\n const audio = elementContext.querySelector('audio');\n const isInsidePrompt = audio && audio.closest('.preview-prompt');\n\n // only require audio completion if audio exists and is inside the prompt\n if (audio && isInsidePrompt) {\n return false;\n }\n }\n }\n\n if (!this._session || !this._session.answers) {\n return false;\n }\n\n const { answers } = this._session;\n\n if (!Array.isArray(answers)) {\n return false;\n }\n\n // filter answers by category and count the ones with content\n const filledResponseAreas = answers.filter((answer) => answer.choices.length).length;\n // check if an answer choice was added to at least as many response areas\n // as the number of populated response areas in the correct answer\n const areResponseAreasFilled = filledResponseAreas >= responseAreasToBeFilled;\n // check if multiple placements are allowed\n const duplicatesAllowed = (choices || []).some((choice) => choice.categoryCount === 0);\n\n if (duplicatesAllowed) {\n // an answer choice can be used multiple times\n return areResponseAreasFilled;\n }\n\n // any correct answer have any unplaced answer choices (by the author)\n if (hasUnplacedChoices) {\n return areResponseAreasFilled;\n }\n\n const allAnswersIds = answers.map((answer) => answer.choices).flat();\n\n // check if any correct answer have any unplaced answer choices (by the student)\n const requiredAnswersPlaced = (possibleResponses || []).some((response) =>\n response.every((val) => allAnswersIds.includes(val)),\n );\n\n // true - all choices (required for a correct response) were placed into a response area\n return requiredAnswersPlaced;\n }\n\n set session(s) {\n if (s && !s.answers) {\n s.answers = [];\n }\n\n this._session = s;\n this.render();\n }\n\n get session() {\n return this._session;\n }\n\n eliminateBlindAnswersFromSession() {\n const { answers = [] } = this._session || {};\n const { choices = [] } = this._model || {};\n\n const mappedChoices = choices.map((c) => c.id) || [];\n const filteredAnswers = answers.map((answer) => {\n const answerChoices = answer?.choices || [];\n answer.choices = answerChoices.filter((c) => mappedChoices.includes(c));\n\n return answer;\n });\n\n if (filteredAnswers.length > 0) {\n this.changeAnswers(filteredAnswers);\n }\n }\n\n changeAnswers(answers) {\n this._session.answers = answers;\n this._session.selector = 'Mouse';\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));\n\n this.render();\n }\n\n onShowCorrectToggle() {\n renderMath(this);\n }\n\n _createAudioInfoToast() {\n const info = document.createElement('div');\n info.id = 'play-audio-info';\n\n Object.assign(info.style, {\n position: 'absolute',\n top: 0,\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background: 'white',\n zIndex: '1000',\n cursor: 'pointer',\n });\n\n const img = document.createElement('img');\n img.src = EnableAudioAutoplayImage;\n img.alt = 'Click anywhere to enable audio autoplay';\n img.width = 500;\n img.height = 300;\n\n info.appendChild(img);\n return info;\n }\n\n connectedCallback() {\n this._initMathObserver();\n \n // Observation: audio in Chrome will have the autoplay attribute,\n // while other browsers will not have the autoplay attribute and will need a user interaction to play the audio\n // This workaround fixes the issue of audio being cached and played on any user interaction in Safari and Firefox\n const observer = new MutationObserver((mutationsList, observer) => {\n mutationsList.forEach((mutation) => {\n if (mutation.type === 'childList') {\n if (this._audioInitialized) return;\n const audio = this.querySelector('audio');\n const isInsidePrompt = audio && audio.closest('.preview-prompt');\n\n if (!this._model) return;\n if (!this._model.autoplayAudioEnabled) return;\n if (audio && !isInsidePrompt) return;\n if (!audio) return;\n\n const info = this._createAudioInfoToast();\n const container = this.querySelector('#main-container');\n const enableAudio = () => {\n if (this.querySelector('#play-audio-info')) {\n audio.play();\n container.removeChild(info);\n }\n\n document.removeEventListener('click', enableAudio);\n };\n\n // if the audio is paused, it means the user has not interacted with the page yet and the audio will not play\n // FIX FOR SAFARI: play with a slight delay to check if autoplay was blocked\n setTimeout(() => {\n if (audio.paused && !this.querySelector('#play-audio-info')) {\n // add info message as a toast to enable audio playback\n container.appendChild(info);\n document.addEventListener('click', enableAudio);\n } else {\n document.removeEventListener('click', enableAudio);\n }\n }, 500);\n\n // we need to listen for the playing event to remove the toast in case the audio plays because of re-rendering\n const handlePlaying = () => {\n //timestamp when auto-played audio started playing\n this._session.audioStartTime = this._session.audioStartTime || new Date().getTime();\n\n const info = this.querySelector('#play-audio-info');\n if (info) {\n container.removeChild(info);\n }\n\n audio.removeEventListener('playing', handlePlaying);\n };\n\n audio.addEventListener('playing', handlePlaying);\n\n // we need to listen for the ended event to update the isComplete state\n const handleEnded = () => {\n //timestamp when auto-played audio completed playing\n this._session.audioEndTime = this._session.audioEndTime || new Date().getTime();\n\n let { audioStartTime, audioEndTime, waitTime } = this._session;\n if (!waitTime && audioStartTime && audioEndTime) {\n // waitTime is elapsed time the user waited for auto-played audio to finish\n this._session.waitTime = audioEndTime - audioStartTime;\n }\n\n this.audioComplete = true;\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));\n\n audio.removeEventListener('ended', handleEnded);\n };\n\n audio.addEventListener('ended', handleEnded);\n\n // store references to remove later\n this._audio = audio;\n this._handlePlaying = handlePlaying;\n this._handleEnded = handleEnded;\n this._enableAudio = enableAudio;\n // set to true to prevent multiple initializations\n this._audioInitialized = true;\n\n observer.disconnect();\n }\n });\n });\n\n observer.observe(this, { childList: true, subtree: true });\n }\n\n disconnectedCallback() {\n this._disconnectMathObserver();\n \n document.removeEventListener('click', this._enableAudio);\n\n if (this._audio) {\n this._audio.removeEventListener('playing', this._handlePlaying);\n this._audio.removeEventListener('ended', this._handleEnded);\n this._audio = null;\n }\n\n if (this._root) {\n this._root.unmount();\n }\n }\n\n render() {\n if (this._model && this._session) {\n const el = React.createElement(CategorizeComponent, {\n model: this._model,\n session: this._session,\n onAnswersChange: this.changeAnswers.bind(this),\n onShowCorrectToggle: this.onShowCorrectToggle.bind(this),\n pauseMathObserver: this.pauseMathObserver,\n resumeMathObserver: this.resumeMathObserver,\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n }\n }\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,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D,IAAI,CAAC,IAAI,CAAC;QAC9CrD,mBAAmB,EAAE,IAAI,CAACA,mBAAmB,CAACqD,IAAI,CAAC,IAAI,CAAC;QACxDC,iBAAiB,EAAE,IAAI,CAACA,iBAAiB;QACzCC,kBAAkB,EAAE,IAAI,CAACA;MAC3B,CAAC,CAAC;MAEF,IAAI,CAAC,IAAI,CAAClH,KAAK,EAAE;QACf,IAAI,CAACA,KAAK,GAAG,IAAAmH,kBAAU,EAAC,IAAI,CAAC;MAC/B;MACA,IAAI,CAACnH,KAAK,CAACe,MAAM,CAAC6F,EAAE,CAAC;IACvB;EACF;AACF;AAACQ,OAAA,CAAAhI,OAAA,GAAAJ,UAAA","ignoreList":[]}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "13.2.2-beta.4",
7
+ "version": "13.2.3",
8
8
  "description": "",
9
9
  "author": "pie framework developers",
10
10
  "license": "ISC",
@@ -16,11 +16,11 @@
16
16
  "@mui/material": "^7.3.4",
17
17
  "@pie-framework/pie-player-events": "^0.1.0",
18
18
  "@pie-lib/categorize": "2.0.2",
19
- "@pie-lib/config-ui": "13.1.0-beta.8",
20
- "@pie-lib/correct-answer-toggle": "4.0.5",
21
- "@pie-lib/drag": "4.0.6",
19
+ "@pie-lib/config-ui": "13.0.20",
20
+ "@pie-lib/correct-answer-toggle": "4.0.8",
21
+ "@pie-lib/drag": "4.1.3",
22
22
  "@pie-lib/math-rendering": "5.1.0",
23
- "@pie-lib/render-ui": "6.1.3",
23
+ "@pie-lib/render-ui": "7.0.2",
24
24
  "@pie-lib/translator": "4.0.2",
25
25
  "debug": "^4.1.1",
26
26
  "lodash-es": "^4.17.23",
@@ -28,7 +28,7 @@
28
28
  "react": "18.3.1",
29
29
  "react-dom": "18.3.1"
30
30
  },
31
- "gitHead": "ea2044e67d20167c0cdee2d96f4914a710255e54",
31
+ "gitHead": "bd790474fe017b02ae4eaa21d4d18959fa1a0bb3",
32
32
  "scripts": {
33
33
  "postpublish": "../../scripts/postpublish"
34
34
  },