@pie-element/categorize 13.1.3 → 13.1.5

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 CHANGED
@@ -3,6 +3,21 @@
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.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)
7
+
8
+ ### Bug Fixes
9
+
10
+ - 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))
11
+ - if allowMultiplePlacements default should be false PIE-682 ([b7447f4](https://github.com/pie-framework/pie-elements/commit/b7447f4d97e9d7cc2415f54a17ffe13ed15d1ebb))
12
+ - if allowMultiplePlacements is missing default should be false PIE-682 ([3f93d0d](https://github.com/pie-framework/pie-elements/commit/3f93d0de81de3a5cbd2763184d2241f31e9dbae0))
13
+
14
+ ## [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)
15
+
16
+ ### Bug Fixes
17
+
18
+ - 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))
19
+ - clear \_root reference on disconnect PIE-686 ([0a236ce](https://github.com/pie-framework/pie-elements/commit/0a236ce1decbd64b250d97484212179f62adc049))
20
+
6
21
  ## [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)
7
22
 
8
23
  ### Bug Fixes
@@ -3,6 +3,20 @@
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.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)
7
+
8
+ ### Bug Fixes
9
+
10
+ - 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))
11
+ - if allowMultiplePlacements default should be false PIE-682 ([b7447f4](https://github.com/pie-framework/pie-elements/commit/b7447f4d97e9d7cc2415f54a17ffe13ed15d1ebb))
12
+
13
+ ## [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)
14
+
15
+ ### Bug Fixes
16
+
17
+ - 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))
18
+ - clear \_root reference on disconnect PIE-686 ([0a236ce](https://github.com/pie-framework/pie-elements/commit/0a236ce1decbd64b250d97484212179f62adc049))
19
+
6
20
  ## [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)
7
21
 
8
22
  ### Bug Fixes
@@ -9,7 +9,7 @@ var _default = exports.default = {
9
9
  model: {
10
10
  allowAlternateEnabled: true,
11
11
  allowMaxChoicesPerCategory: false,
12
- allowMultiplePlacementsEnabled: _utils.multiplePlacements.enabled,
12
+ allowMultiplePlacementsEnabled: _utils.multiplePlacements.disabled,
13
13
  alternates: [],
14
14
  categories: [],
15
15
  categoriesPerRow: 2,
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","names":["_utils","require","_default","exports","default","model","allowAlternateEnabled","allowMaxChoicesPerCategory","allowMultiplePlacementsEnabled","multiplePlacements","enabled","alternates","categories","categoriesPerRow","choices","choicesLabel","choicesPosition","correctResponse","feedbackEnabled","lockChoiceOrder","maxAnswerChoices","maxChoicesPerCategory","partialScoring","promptEnabled","rationaleEnabled","rowLabels","studentInstructionsEnabled","teacherInstructionsEnabled","toolbarEditorPosition","minRowHeight","configuration","baseInputConfiguration","h3","disabled","audio","video","image","textAlign","showParagraphs","separateParagraphs","spellCheck","label","settings","feedback","allowMultiplePlacements","maxPlacements","allowAlternate","prompt","required","inputConfiguration","rationale","scoringType","settingsPanelDisabled","studentInstructions","teacherInstructions","headers","maxImageWidth","rowLabel","categoryLabel","maxImageHeight","withRubric","minCategoriesPerRow","allowMaxAnswerChoices","mathMlOptions","mmlOutput","mmlEditing","language","languageChoices","options"],"sources":["../src/defaults.js"],"sourcesContent":["import { multiplePlacements } from './utils';\n\nexport default {\n model: {\n allowAlternateEnabled: true,\n allowMaxChoicesPerCategory: false,\n allowMultiplePlacementsEnabled: multiplePlacements.enabled,\n alternates: [],\n categories: [],\n categoriesPerRow: 2,\n choices: [],\n choicesLabel: '',\n choicesPosition: 'below',\n correctResponse: [],\n feedbackEnabled: false,\n lockChoiceOrder: true,\n maxAnswerChoices: 6,\n maxChoicesPerCategory: 0,\n partialScoring: true,\n promptEnabled: true,\n rationaleEnabled: true,\n rowLabels: [''],\n studentInstructionsEnabled: true,\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n minRowHeight: '80px',\n },\n configuration: {\n baseInputConfiguration: {\n h3: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n feedback: {\n settings: true,\n label: 'Feedback',\n enabled: true,\n },\n lockChoiceOrder: {\n settings: true,\n label: 'Lock Choice Order',\n },\n choicesPosition: {\n settings: true,\n label: 'Choices Position',\n },\n allowMultiplePlacements: {\n settings: true,\n label: 'Allow Multiple Placements',\n },\n maxPlacements: {\n settings: true,\n label: 'Max choices per category',\n },\n allowAlternate: {\n settings: true,\n label: 'Allow Alternate Correct Answers',\n },\n categoriesPerRow: {\n settings: true,\n label: 'Categories per row',\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n settingsPanelDisabled: false,\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n headers: {\n inputConfiguration: {\n audio: { disabled: true },\n video: { disabled: true },\n image: { disabled: false },\n },\n },\n rowLabels: {\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n toolbarEditorPosition: {\n settings: false,\n label: 'Toolbar Editor Position',\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n rowLabel: 200,\n categoryLabel: 260,\n choices: 240,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n rowLabel: 100,\n categoryLabel: 100,\n choices: 150,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n minCategoriesPerRow: 1,\n allowMaxAnswerChoices: {\n settings: true,\n label: 'Max answer choices',\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n language: {\n settings: false,\n label: 'Specify Language',\n enabled: false,\n },\n languageChoices: {\n label: 'Language Choices',\n options: [],\n },\n },\n};\n"],"mappings":";;;;;;AA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AClB5C,OAAO,EAAE;IACX,CAAC;IACD8C,UAAU,EAAE;MACVlB,QAAQ,EAAE,KAAK;MACfD,KAAK,EAAE;IACT,CAAC;IACDoB,mBAAmB,EAAE,CAAC;IACtBC,qBAAqB,EAAE;MACrBpB,QAAQ,EAAE,IAAI;MACdD,KAAK,EAAE;IACT,CAAC;IACDsB,aAAa,EAAE;MACbC,SAAS,EAAE,KAAK;MAChBC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRxB,QAAQ,EAAE,KAAK;MACfD,KAAK,EAAE,kBAAkB;MACzB/B,OAAO,EAAE;IACX,CAAC;IACDyD,eAAe,EAAE;MACf1B,KAAK,EAAE,kBAAkB;MACzB2B,OAAO,EAAE;IACX;EACF;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"defaults.js","names":["_utils","require","_default","exports","default","model","allowAlternateEnabled","allowMaxChoicesPerCategory","allowMultiplePlacementsEnabled","multiplePlacements","disabled","alternates","categories","categoriesPerRow","choices","choicesLabel","choicesPosition","correctResponse","feedbackEnabled","lockChoiceOrder","maxAnswerChoices","maxChoicesPerCategory","partialScoring","promptEnabled","rationaleEnabled","rowLabels","studentInstructionsEnabled","teacherInstructionsEnabled","toolbarEditorPosition","minRowHeight","configuration","baseInputConfiguration","h3","audio","video","image","textAlign","showParagraphs","separateParagraphs","spellCheck","label","settings","enabled","feedback","allowMultiplePlacements","maxPlacements","allowAlternate","prompt","required","inputConfiguration","rationale","scoringType","settingsPanelDisabled","studentInstructions","teacherInstructions","headers","maxImageWidth","rowLabel","categoryLabel","maxImageHeight","withRubric","minCategoriesPerRow","allowMaxAnswerChoices","mathMlOptions","mmlOutput","mmlEditing","language","languageChoices","options"],"sources":["../src/defaults.js"],"sourcesContent":["import { multiplePlacements } from './utils';\n\nexport default {\n model: {\n allowAlternateEnabled: true,\n allowMaxChoicesPerCategory: false,\n allowMultiplePlacementsEnabled: multiplePlacements.disabled,\n alternates: [],\n categories: [],\n categoriesPerRow: 2,\n choices: [],\n choicesLabel: '',\n choicesPosition: 'below',\n correctResponse: [],\n feedbackEnabled: false,\n lockChoiceOrder: true,\n maxAnswerChoices: 6,\n maxChoicesPerCategory: 0,\n partialScoring: true,\n promptEnabled: true,\n rationaleEnabled: true,\n rowLabels: [''],\n studentInstructionsEnabled: true,\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n minRowHeight: '80px',\n },\n configuration: {\n baseInputConfiguration: {\n h3: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n feedback: {\n settings: true,\n label: 'Feedback',\n enabled: true,\n },\n lockChoiceOrder: {\n settings: true,\n label: 'Lock Choice Order',\n },\n choicesPosition: {\n settings: true,\n label: 'Choices Position',\n },\n allowMultiplePlacements: {\n settings: true,\n label: 'Allow Multiple Placements',\n },\n maxPlacements: {\n settings: true,\n label: 'Max choices per category',\n },\n allowAlternate: {\n settings: true,\n label: 'Allow Alternate Correct Answers',\n },\n categoriesPerRow: {\n settings: true,\n label: 'Categories per row',\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n settingsPanelDisabled: false,\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n headers: {\n inputConfiguration: {\n audio: { disabled: true },\n video: { disabled: true },\n image: { disabled: false },\n },\n },\n rowLabels: {\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n toolbarEditorPosition: {\n settings: false,\n label: 'Toolbar Editor Position',\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n rowLabel: 200,\n categoryLabel: 260,\n choices: 240,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n rowLabel: 100,\n categoryLabel: 100,\n choices: 150,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n minCategoriesPerRow: 1,\n allowMaxAnswerChoices: {\n settings: true,\n label: 'Max answer choices',\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n language: {\n settings: false,\n label: 'Specify Language',\n enabled: false,\n },\n languageChoices: {\n label: 'Language Choices',\n options: [],\n },\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAA6C,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE9B;EACbC,KAAK,EAAE;IACLC,qBAAqB,EAAE,IAAI;IAC3BC,0BAA0B,EAAE,KAAK;IACjCC,8BAA8B,EAAEC,yBAAkB,CAACC,QAAQ;IAC3DC,UAAU,EAAE,EAAE;IACdC,UAAU,EAAE,EAAE;IACdC,gBAAgB,EAAE,CAAC;IACnBC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAE,OAAO;IACxBC,eAAe,EAAE,EAAE;IACnBC,eAAe,EAAE,KAAK;IACtBC,eAAe,EAAE,IAAI;IACrBC,gBAAgB,EAAE,CAAC;IACnBC,qBAAqB,EAAE,CAAC;IACxBC,cAAc,EAAE,IAAI;IACpBC,aAAa,EAAE,IAAI;IACnBC,gBAAgB,EAAE,IAAI;IACtBC,SAAS,EAAE,CAAC,EAAE,CAAC;IACfC,0BAA0B,EAAE,IAAI;IAChCC,0BAA0B,E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EAAE;QAAM;MAC3B;IACF,CAAC;IACDe,SAAS,EAAE;MACTwB,kBAAkB,EAAE;QAClBhB,KAAK,EAAE;UAAEvB,QAAQ,EAAE;QAAM,CAAC;QAC1BwB,KAAK,EAAE;UAAExB,QAAQ,EAAE;QAAM,CAAC;QAC1ByB,KAAK,EAAE;UAAEzB,QAAQ,EAAE;QAAM;MAC3B;IACF,CAAC;IACDkB,qBAAqB,EAAE;MACrBa,QAAQ,EAAE,KAAK;MACfD,KAAK,EAAE;IACT,CAAC;IACDgB,aAAa,EAAE;MACbF,mBAAmB,EAAE,GAAG;MACxBP,MAAM,EAAE,GAAG;MACXG,SAAS,EAAE,GAAG;MACdO,QAAQ,EAAE,GAAG;MACbC,aAAa,EAAE,GAAG;MAClB5C,OAAO,EAAE;IACX,CAAC;IACD6C,cAAc,EAAE;MACdL,mBAAmB,EAAE,GAAG;MACxBP,MAAM,EAAE,GAAG;MACXG,SAAS,EAAE,GAAG;MACdO,QAAQ,EAAE,GAAG;MACbC,aAAa,EAAE,GAAG;MAClB5C,OAAO,EAAE;IACX,CAAC;IACD8C,UAAU,EAAE;MACVnB,QAAQ,EAAE,KAAK;MACfD,KAAK,EAAE;IACT,CAAC;IACDqB,mBAAmB,EAAE,CAAC;IACtBC,qBAAqB,EAAE;MACrBrB,QAAQ,EAAE,IAAI;MACdD,KAAK,EAAE;IACT,CAAC;IACDuB,aAAa,EAAE;MACbC,SAAS,EAAE,KAAK;MAChBC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRzB,QAAQ,EAAE,KAAK;MACfD,KAAK,EAAE,kBAAkB;MACzBE,OAAO,EAAE;IACX,CAAC;IACDyB,eAAe,EAAE;MACf3B,KAAK,EAAE,kBAAkB;MACzB4B,OAAO,EAAE;IACX;EACF;AACF,CAAC","ignoreList":[]}
@@ -116,6 +116,7 @@ class CategorizeConfigure extends HTMLElement {
116
116
  disconnectedCallback() {
117
117
  if (this._root) {
118
118
  this._root.unmount();
119
+ this._root = null;
119
120
  }
120
121
  }
121
122
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_client","_pieConfigureEvents","_mathRendering","_main","_defaults","CategorizeConfigure","HTMLElement","constructor","_root","_model","createDefaultModel","_configuration","defaults","configuration","model","m","choices","length","maxAnswerChoices","console","warn","render","c","newConfiguration","language","enabled","languageChoices","options","value","settings","find","option","push","label","onModelChanged","dispatchEvent","ModelUpdatedEvent","onConfigurationChanged","connectedCallback","insertImage","handler","InsertImageEvent","onDeleteImage","src","done","DeleteImageEvent","insertSound","InsertSoundEvent","onDeleteSound","DeleteSoundEvent","el","React","createElement","Main","bind","imageSupport","add","delete","uploadSoundSupport","createRoot","setTimeout","renderMath","disconnectedCallback","unmount","exports","default","_defineProperty2","correctResponse","mappedCorrectResponse","map","cr","alternateResponses","response","allowAlternateEnabled"],"sources":["../src/index.js"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport {\n ModelUpdatedEvent,\n DeleteImageEvent,\n InsertImageEvent,\n InsertSoundEvent,\n DeleteSoundEvent,\n} from '@pie-framework/pie-configure-events';\nimport { renderMath } from '@pie-lib/math-rendering';\n\nimport Main from './main';\n\nimport defaults from './defaults';\n\nexport default class CategorizeConfigure extends HTMLElement {\n static createDefaultModel = (model = {}) => ({\n ...defaults.model,\n ...model,\n });\n\n // PD-2960: make sure we don't have alternates in model or possibility to add them (temporary solution)\n // this function is used in controller, too\n static disableAlternateResponses = (m) => {\n let { correctResponse } = m || {};\n correctResponse = correctResponse || [];\n const mappedCorrectResponse = correctResponse.map((cr) => {\n const { alternateResponses, ...response } = cr;\n return response;\n });\n return {\n ...m,\n correctResponse: mappedCorrectResponse,\n allowAlternateEnabled: false,\n };\n };\n\n constructor() {\n super();\n this._root = null;\n this._model = CategorizeConfigure.createDefaultModel();\n this._configuration = defaults.configuration;\n }\n\n set model(m) {\n this._model = CategorizeConfigure.createDefaultModel(m);\n\n if (m.choices && m.choices.length >= m.maxAnswerChoices) {\n this._model.maxAnswerChoices = m.choices.length;\n console.warn(\"Max Answer Choices can't be less than choices length!\");\n }\n\n this.render();\n }\n\n set configuration(c) {\n const newConfiguration = {\n ...defaults.configuration,\n ...c,\n };\n\n this._configuration = newConfiguration;\n\n // if language:enabled is true, then the corresponding default item model should include a language value;\n // if it is false, then the language field should be omitted from the item model.\n // if a default item model includes a language value (e.g., en_US) and the corresponding authoring view settings have language:settings = true,\n // then (a) language:enabled should also be true, and (b) that default language value should be represented in languageChoices[] (as a key).\n if (newConfiguration?.language?.enabled) {\n if (newConfiguration?.languageChoices?.options?.length) {\n this._model.language = newConfiguration?.languageChoices.options[0].value;\n }\n } else if (newConfiguration.language.settings && this._model.language) {\n this._configuration.language.enabled = true;\n\n if (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) {\n this._configuration.languageChoices.options = [];\n }\n\n // check if the language is already included in the languageChoices.options array\n // and if not, then add it.\n if (!this._configuration.languageChoices.options.find((option) => option.value === this._model.language)) {\n this._configuration.languageChoices.options.push({\n value: this._model.language,\n label: this._model.language,\n });\n }\n } else {\n delete this._model.language;\n }\n\n this.render();\n }\n\n onModelChanged(m) {\n this._model = m;\n\n this.render();\n this.dispatchEvent(new ModelUpdatedEvent(this._model, false));\n }\n\n onConfigurationChanged(c) {\n this._configuration = c;\n this.render();\n }\n\n connectedCallback() {\n this.render();\n }\n\n /**\n *\n * @param {done, progress, file} handler\n */\n insertImage(handler) {\n this.dispatchEvent(new InsertImageEvent(handler));\n }\n\n onDeleteImage(src, done) {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n }\n\n insertSound(handler) {\n this.dispatchEvent(new InsertSoundEvent(handler));\n }\n\n onDeleteSound(src, done) {\n this.dispatchEvent(new DeleteSoundEvent(src, done));\n }\n\n render() {\n const el = React.createElement(Main, {\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged.bind(this),\n onConfigurationChanged: this.onConfigurationChanged.bind(this),\n imageSupport: {\n add: this.insertImage.bind(this),\n delete: this.onDeleteImage.bind(this),\n },\n uploadSoundSupport: {\n add: this.insertSound.bind(this),\n delete: this.onDeleteSound.bind(this),\n },\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n\n setTimeout(() => {\n renderMath(this);\n }, 0);\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n }\n }\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAOA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AAEe,MAAMM,mBAAmB,SAASC,WAAW,CAAC;EAsB3DC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IACP,IAAI,CAACC,KAAK,GAAG,IAAI;IACjB,IAAI,CAACC,MAAM,GAAGJ,mBAAmB,CAACK,kBAAkB,CAAC,CAAC;IACtD,IAAI,CAACC,cAAc,GAAGC,iBAAQ,CAACC,aAAa;EAC9C;EAEA,IAAIC,KAAKA,CAACC,CAAC,EAAE;IACX,IAAI,CAACN,MAAM,GAAGJ,mBAAmB,CAACK,kBAAkB,CAACK,CAAC,CAAC;IAEvD,IAAIA,CAAC,CAACC,OAAO,IAAID,CAAC,CAACC,OAAO,CAACC,MAAM,IAAIF,CAAC,CAACG,gBAAgB,EAAE;MACvD,IAAI,CAACT,MAAM,CAACS,gBAAgB,GAAGH,CAAC,CAACC,OAAO,CAACC,MAAM;MAC/CE,OAAO,CAACC,IAAI,CAAC,uDAAuD,CAAC;IACvE;IAEA,IAAI,CAACC,MAAM,CAAC,CAAC;EACf;EAEA,IAAIR,aAAaA,CAACS,CAAC,EAAE;IACnB,MAAMC,gBAAgB,GAAG;MACvB,GAAGX,iBAAQ,CAACC,aA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GzD,CAAC;IACJoD,eAAe,EAAEC,qBAAqB;IACtCK,qBAAqB,EAAE;EACzB,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_client","_pieConfigureEvents","_mathRendering","_main","_defaults","CategorizeConfigure","HTMLElement","constructor","_root","_model","createDefaultModel","_configuration","defaults","configuration","model","m","choices","length","maxAnswerChoices","console","warn","render","c","newConfiguration","language","enabled","languageChoices","options","value","settings","find","option","push","label","onModelChanged","dispatchEvent","ModelUpdatedEvent","onConfigurationChanged","connectedCallback","insertImage","handler","InsertImageEvent","onDeleteImage","src","done","DeleteImageEvent","insertSound","InsertSoundEvent","onDeleteSound","DeleteSoundEvent","el","React","createElement","Main","bind","imageSupport","add","delete","uploadSoundSupport","createRoot","setTimeout","renderMath","disconnectedCallback","unmount","exports","default","_defineProperty2","correctResponse","mappedCorrectResponse","map","cr","alternateResponses","response","allowAlternateEnabled"],"sources":["../src/index.js"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport {\n ModelUpdatedEvent,\n DeleteImageEvent,\n InsertImageEvent,\n InsertSoundEvent,\n DeleteSoundEvent,\n} from '@pie-framework/pie-configure-events';\nimport { renderMath } from '@pie-lib/math-rendering';\n\nimport Main from './main';\n\nimport defaults from './defaults';\n\nexport default class CategorizeConfigure extends HTMLElement {\n static createDefaultModel = (model = {}) => ({\n ...defaults.model,\n ...model,\n });\n\n // PD-2960: make sure we don't have alternates in model or possibility to add them (temporary solution)\n // this function is used in controller, too\n static disableAlternateResponses = (m) => {\n let { correctResponse } = m || {};\n correctResponse = correctResponse || [];\n const mappedCorrectResponse = correctResponse.map((cr) => {\n const { alternateResponses, ...response } = cr;\n return response;\n });\n return {\n ...m,\n correctResponse: mappedCorrectResponse,\n allowAlternateEnabled: false,\n };\n };\n\n constructor() {\n super();\n this._root = null;\n this._model = CategorizeConfigure.createDefaultModel();\n this._configuration = defaults.configuration;\n }\n\n set model(m) {\n this._model = CategorizeConfigure.createDefaultModel(m);\n\n if (m.choices && m.choices.length >= m.maxAnswerChoices) {\n this._model.maxAnswerChoices = m.choices.length;\n console.warn(\"Max Answer Choices can't be less than choices length!\");\n }\n\n this.render();\n }\n\n set configuration(c) {\n const newConfiguration = {\n ...defaults.configuration,\n ...c,\n };\n\n this._configuration = newConfiguration;\n\n // if language:enabled is true, then the corresponding default item model should include a language value;\n // if it is false, then the language field should be omitted from the item model.\n // if a default item model includes a language value (e.g., en_US) and the corresponding authoring view settings have language:settings = true,\n // then (a) language:enabled should also be true, and (b) that default language value should be represented in languageChoices[] (as a key).\n if (newConfiguration?.language?.enabled) {\n if (newConfiguration?.languageChoices?.options?.length) {\n this._model.language = newConfiguration?.languageChoices.options[0].value;\n }\n } else if (newConfiguration.language.settings && this._model.language) {\n this._configuration.language.enabled = true;\n\n if (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) {\n this._configuration.languageChoices.options = [];\n }\n\n // check if the language is already included in the languageChoices.options array\n // and if not, then add it.\n if (!this._configuration.languageChoices.options.find((option) => option.value === this._model.language)) {\n this._configuration.languageChoices.options.push({\n value: this._model.language,\n label: this._model.language,\n });\n }\n } else {\n delete this._model.language;\n }\n\n this.render();\n }\n\n onModelChanged(m) {\n this._model = m;\n\n this.render();\n this.dispatchEvent(new ModelUpdatedEvent(this._model, false));\n }\n\n onConfigurationChanged(c) {\n this._configuration = c;\n this.render();\n }\n\n connectedCallback() {\n this.render();\n }\n\n /**\n *\n * @param {done, progress, file} handler\n */\n insertImage(handler) {\n this.dispatchEvent(new InsertImageEvent(handler));\n }\n\n onDeleteImage(src, done) {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n }\n\n insertSound(handler) {\n this.dispatchEvent(new InsertSoundEvent(handler));\n }\n\n onDeleteSound(src, done) {\n this.dispatchEvent(new DeleteSoundEvent(src, done));\n }\n\n render() {\n const el = React.createElement(Main, {\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged.bind(this),\n onConfigurationChanged: this.onConfigurationChanged.bind(this),\n imageSupport: {\n add: this.insertImage.bind(this),\n delete: this.onDeleteImage.bind(this),\n },\n uploadSoundSupport: {\n add: this.insertSound.bind(this),\n delete: this.onDeleteSound.bind(this),\n },\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n\n setTimeout(() => {\n renderMath(this);\n }, 0);\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n this._root = null;\n }\n }\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAOA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AAEe,MAAMM,mBAAmB,SAASC,WAAW,CAAC;EAsB3DC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IACP,IAAI,CAACC,KAAK,GAAG,IAAI;IACjB,IAAI,CAACC,MAAM,GAAGJ,mBAAmB,CAACK,kBAAkB,CAAC,CAAC;IACtD,IAAI,CAACC,cAAc,GAAGC,iBAAQ,CAACC,aAAa;EAC9C;EAEA,IAAIC,KAAKA,CAACC,CAAC,EAAE;IACX,IAAI,CAACN,MAAM,GAAGJ,mBAAmB,CAACK,kBAAkB,CAACK,CAAC,CAAC;IAEvD,IAAIA,CAAC,CAACC,OAAO,IAAID,CAAC,CAACC,OAAO,CAACC,MAAM,IAAIF,CAAC,CAACG,gBAAgB,EAAE;MACvD,IAAI,CAACT,MAAM,CAACS,gBAAgB,GAAGH,CAAC,CAACC,OAAO,CAACC,MAAM;MAC/CE,OAAO,CAACC,IAAI,CAAC,uDAAuD,CAAC;IACvE;IAEA,IAAI,CAACC,MAAM,CAAC,CAAC;EACf;EAEA,IAAIR,aAAaA,CAACS,CAAC,EA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B;MAAE,GAAGC;IAAS,CAAC,GAAGF,EAAE;IAC9C,OAAOE,QAAQ;EACjB,CAAC,CAAC;EACF,OAAO;IACL,GAAGzD,CAAC;IACJoD,eAAe,EAAEC,qBAAqB;IACtCK,qBAAqB,EAAE;EACzB,CAAC;AACH,CAAC","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  "private": true,
4
4
  "main": "lib/index.js",
5
5
  "module": "src/index.js",
6
- "version": "11.1.3",
6
+ "version": "11.1.5",
7
7
  "description": "",
8
8
  "scripts": {},
9
9
  "author": "pie framework developers",
@@ -16,9 +16,9 @@
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.0.7",
20
- "@pie-lib/drag": "4.0.4",
21
- "@pie-lib/editable-html-tip-tap": "2.1.5",
19
+ "@pie-lib/config-ui": "13.0.9",
20
+ "@pie-lib/drag": "4.0.5",
21
+ "@pie-lib/editable-html-tip-tap": "2.1.7",
22
22
  "@pie-lib/math-rendering": "5.0.2",
23
23
  "@pie-lib/render-ui": "6.1.2",
24
24
  "@pie-lib/translator": "4.0.2",
@@ -3,6 +3,12 @@
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.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)
7
+
8
+ ### Bug Fixes
9
+
10
+ - if allowMultiplePlacements is missing default should be false PIE-682 ([3f93d0d](https://github.com/pie-framework/pie-elements/commit/3f93d0de81de3a5cbd2763184d2241f31e9dbae0))
11
+
6
12
  ## [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)
7
13
 
8
14
  ### Bug Fixes
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _utils = require("./utils");
8
8
  var _default = exports.default = {
9
- allowMultiplePlacementsEnabled: _utils.multiplePlacements.enabled,
9
+ allowMultiplePlacementsEnabled: _utils.multiplePlacements.disabled,
10
10
  alternates: [],
11
11
  categories: [],
12
12
  categoriesPerRow: 2,
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","names":["_utils","require","_default","exports","default","allowMultiplePlacementsEnabled","multiplePlacements","enabled","alternates","categories","categoriesPerRow","choices","choicesLabel","choicesPosition","correctResponse","feedbackEnabled","lockChoiceOrder","maxAnswerChoices","maxChoicesPerCategory","partialScoring","prompt","promptEnabled","rationale","rationaleEnabled","rowLabels","studentInstructionsEnabled","teacherInstructions","teacherInstructionsEnabled","toolbarEditorPosition","minRowHeight"],"sources":["../src/defaults.js"],"sourcesContent":["import { multiplePlacements } from './utils';\n\nexport default {\n allowMultiplePlacementsEnabled: multiplePlacements.enabled,\n alternates: [],\n categories: [],\n categoriesPerRow: 2,\n choices: [],\n choicesLabel: '',\n choicesPosition: 'below',\n correctResponse: [],\n feedbackEnabled: false,\n lockChoiceOrder: true,\n maxAnswerChoices: 6,\n maxChoicesPerCategory: 0,\n partialScoring: true,\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n rowLabels: [''],\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n minRowHeight: '80px',\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAA6C,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE9B;EACbC,8BAA8B,EAAEC,yBAAkB,CAACC,OAAO;EAC1DC,UAAU,EAAE,EAAE;EACdC,UAAU,EAAE,EAAE;EACdC,gBAAgB,EAAE,CAAC;EACnBC,OAAO,EAAE,EAAE;EACXC,YAAY,EAAE,EAAE;EAChBC,eAAe,EAAE,OAAO;EACxBC,eAAe,EAAE,EAAE;EACnBC,eAAe,EAAE,KAAK;EACtBC,eAAe,EAAE,IAAI;EACrBC,gBAAgB,EAAE,CAAC;EACnBC,qBAAqB,EAAE,CAAC;EACxBC,cAAc,EAAE,IAAI;EACpBC,MAAM,EAAE,EAAE;EACVC,aAAa,EAAE,IAAI;EACnBC,SAAS,EAAE,EAAE;EACbC,gBAAgB,EAAE,IAAI;EACtBC,SAAS,EAAE,CAAC,EAAE,CAAC;EACfC,0BAA0B,EAAE,IAAI;EAChCC,mBAAmB,EAAE,EAAE;EACvBC,0BAA0B,EAAE,IAAI;EAChCC,qBAAqB,EAAE,QAAQ;EAC/BC,YAAY,EAAE;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"defaults.js","names":["_utils","require","_default","exports","default","allowMultiplePlacementsEnabled","multiplePlacements","disabled","alternates","categories","categoriesPerRow","choices","choicesLabel","choicesPosition","correctResponse","feedbackEnabled","lockChoiceOrder","maxAnswerChoices","maxChoicesPerCategory","partialScoring","prompt","promptEnabled","rationale","rationaleEnabled","rowLabels","studentInstructionsEnabled","teacherInstructions","teacherInstructionsEnabled","toolbarEditorPosition","minRowHeight"],"sources":["../src/defaults.js"],"sourcesContent":["import { multiplePlacements } from './utils';\n\nexport default {\n allowMultiplePlacementsEnabled: multiplePlacements.disabled,\n alternates: [],\n categories: [],\n categoriesPerRow: 2,\n choices: [],\n choicesLabel: '',\n choicesPosition: 'below',\n correctResponse: [],\n feedbackEnabled: false,\n lockChoiceOrder: true,\n maxAnswerChoices: 6,\n maxChoicesPerCategory: 0,\n partialScoring: true,\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n rowLabels: [''],\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n minRowHeight: '80px',\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAA6C,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE9B;EACbC,8BAA8B,EAAEC,yBAAkB,CAACC,QAAQ;EAC3DC,UAAU,EAAE,EAAE;EACdC,UAAU,EAAE,EAAE;EACdC,gBAAgB,EAAE,CAAC;EACnBC,OAAO,EAAE,EAAE;EACXC,YAAY,EAAE,EAAE;EAChBC,eAAe,EAAE,OAAO;EACxBC,eAAe,EAAE,EAAE;EACnBC,eAAe,EAAE,KAAK;EACtBC,eAAe,EAAE,IAAI;EACrBC,gBAAgB,EAAE,CAAC;EACnBC,qBAAqB,EAAE,CAAC;EACxBC,cAAc,EAAE,IAAI;EACpBC,MAAM,EAAE,EAAE;EACVC,aAAa,EAAE,IAAI;EACnBC,SAAS,EAAE,EAAE;EACbC,gBAAgB,EAAE,IAAI;EACtBC,SAAS,EAAE,CAAC,EAAE,CAAC;EACfC,0BAA0B,EAAE,IAAI;EAChCC,mBAAmB,EAAE,EAAE;EACvBC,0BAA0B,EAAE,IAAI;EAChCC,qBAAqB,EAAE,QAAQ;EAC/BC,YAAY,EAAE;AAChB,CAAC","ignoreList":[]}
@@ -8,7 +8,7 @@
8
8
  "@pie-lib/translator": "4.0.2",
9
9
  "lodash-es": "^4.17.23"
10
10
  },
11
- "version": "10.1.2",
11
+ "version": "10.1.3",
12
12
  "description": "",
13
13
  "scripts": {},
14
14
  "main": "lib/index.js",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "13.1.3",
7
+ "version": "13.1.5",
8
8
  "description": "",
9
9
  "author": "pie framework developers",
10
10
  "license": "ISC",
@@ -16,9 +16,9 @@
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.0.7",
19
+ "@pie-lib/config-ui": "13.0.9",
20
20
  "@pie-lib/correct-answer-toggle": "4.0.4",
21
- "@pie-lib/drag": "4.0.4",
21
+ "@pie-lib/drag": "4.0.5",
22
22
  "@pie-lib/math-rendering": "5.0.2",
23
23
  "@pie-lib/render-ui": "6.1.2",
24
24
  "@pie-lib/translator": "4.0.2",
@@ -28,7 +28,7 @@
28
28
  "react": "18.3.1",
29
29
  "react-dom": "18.3.1"
30
30
  },
31
- "gitHead": "213c3a293da2591ffaf2ba5c5fb50f0fe7577cfa",
31
+ "gitHead": "f898c2bf045f66d34e66e8bb201950bfd00b2f0f",
32
32
  "scripts": {
33
33
  "postpublish": "../../scripts/postpublish"
34
34
  },