@pie-element/extended-text-entry 13.1.0 → 13.2.1-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@13.0.0...@pie-element/extended-text-entry@13.2.0) (2025-10-10)
7
+
8
+
9
+ ### Features
10
+
11
+ * update libs PD-5208, PD-5211, PD-5199, PD-5218, PD-5217 ([da327fa](https://github.com/pie-framework/pie-elements/commit/da327fa501f6e9eff1c0b30b5ef092426a91f78b))
12
+
13
+
14
+
15
+
16
+
6
17
  # [13.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@12.0.0...@pie-element/extended-text-entry@13.1.0) (2025-10-07)
7
18
 
8
19
  **Note:** Version bump only for package @pie-element/extended-text-entry
@@ -3,6 +3,17 @@
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.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@11.0.1...@pie-element/extended-text-entry-configure@11.2.0) (2025-10-10)
7
+
8
+
9
+ ### Features
10
+
11
+ * update libs PD-5208, PD-5211, PD-5199, PD-5218, PD-5217 ([da327fa](https://github.com/pie-framework/pie-elements/commit/da327fa501f6e9eff1c0b30b5ef092426a91f78b))
12
+
13
+
14
+
15
+
16
+
6
17
  # [11.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@11.0.0...@pie-element/extended-text-entry-configure@11.1.0) (2025-10-07)
7
18
 
8
19
  **Note:** Version bump only for package @pie-element/extended-text-entry-configure
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry-configure",
3
3
  "private": true,
4
- "version": "11.1.0",
4
+ "version": "11.2.0",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -10,8 +10,8 @@
10
10
  "dependencies": {
11
11
  "@material-ui/core": "^3.9.2",
12
12
  "@pie-framework/pie-configure-events": "^1.3.0",
13
- "@pie-lib/config-ui": "^11.25.0",
14
- "@pie-lib/editable-html": "^11.17.0",
13
+ "@pie-lib/config-ui": "^11.25.1",
14
+ "@pie-lib/editable-html": "^11.17.1",
15
15
  "lodash": "^4.17.15",
16
16
  "prop-types": "^15.6.2",
17
17
  "react": "^16.8.1",
@@ -3,6 +3,17 @@
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
+ # [7.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@7.0.1...@pie-element/extended-text-entry-controller@7.2.0) (2025-10-10)
7
+
8
+
9
+ ### Features
10
+
11
+ * update libs PD-5208, PD-5211, PD-5199, PD-5218, PD-5217 ([da327fa](https://github.com/pie-framework/pie-elements/commit/da327fa501f6e9eff1c0b30b5ef092426a91f78b))
12
+
13
+
14
+
15
+
16
+
6
17
  # [7.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@7.0.0...@pie-element/extended-text-entry-controller@7.1.0) (2025-10-07)
7
18
 
8
19
  **Note:** Version bump only for package @pie-element/extended-text-entry-controller
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry-controller",
3
3
  "private": true,
4
- "version": "7.1.0",
4
+ "version": "7.2.0",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
8
8
  "dependencies": {
9
- "@pie-lib/feedback": "^0.20.0"
9
+ "@pie-lib/feedback": "^0.21.4"
10
10
  },
11
11
  "scripts": {
12
12
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -0,0 +1 @@
1
+ import{_dll_react as e,_dll_prop_types as t,_dll_material_ui__core as n,_dll_material_ui__core_styles as a,_dll_react_dom as i}from"../../../@pie-lib/shared-module@^1.14.5/module/index.js";import{_dll_pie_lib__config_ui as s}from"../../../@pie-lib/config-module@^2.19.5/module/index.js";import{_dll_pie_lib__editable_html as o}from"../../../@pie-lib/editable-html-module@^5.6.5/module/index.js";var l={};Object.defineProperty(l,"__esModule",{value:!0});class r extends CustomEvent{constructor(e,t=!1){super(r.TYPE,{bubbles:!0,detail:{update:e,reset:t}}),this.update=e,this.reset=t}}r.TYPE="model.updated";var d=l.ModelUpdatedEvent=r;class c extends CustomEvent{constructor(e,t){super(c.TYPE,{bubbles:!0,detail:{src:e,done:t}}),this.src=e,this.done=t}}c.TYPE="delete.image";var p=l.DeleteImageEvent=c;class u extends CustomEvent{constructor(e){super(u.TYPE,{bubbles:!0,detail:e}),this.handler=e}}u.TYPE="insert.image";var h=l.InsertImageEvent=u;class g extends CustomEvent{constructor(e,t){super(g.TYPE,{bubbles:!0,detail:{src:e,done:t}}),this.src=e,this.done=t}}g.TYPE="delete.sound";var b=l.DeleteSoundEvent=g;class m extends CustomEvent{constructor(e){super(m.TYPE,{bubbles:!0,detail:e}),this.handler=e}}m.TYPE="insert.sound";var E=l.InsertSoundEvent=m;const _=e,f=t,{Typography:C}=n,{withStyles:I}=a,{FeedbackSelector:v}=s,{InputContainer:S}=s,{settings:x}=s,{layout:y}=s,k=o,{ALL_PLUGINS:P}=o;function w(e){let t,n=e[0],a=1;for(;a<e.length;){const i=e[a],s=e[a+1];if(a+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=s(n)):"call"!==i&&"optionalCall"!==i||(n=s(((...e)=>n.call(t,...e))),t=void 0)}return n}const{Panel:T,toggle:M,numberFields:A,dropdown:D}=x,R={type:"default",default:"Your answer has been submitted"};class q extends _.Component{static __initStatic(){this.propTypes={onModelChanged:f.func.isRequired,onConfigurationChanged:f.func,model:f.object.isRequired,configuration:f.object.isRequired,imageSupport:f.object.isRequired,uploadSoundSupport:f.object.isRequired,classes:f.object.isRequired}}constructor(e){super(e),q.prototype.__init.call(this),q.prototype.__init2.call(this),q.prototype.__init3.call(this),this.state={setDimensions:!0}}__init(){this.onPromptChange=e=>{const{onModelChanged:t,model:n}=this.props;t({...n,prompt:e})}}__init2(){this.changeFeedback=e=>{const{model:t,onModelChanged:n}=this.props;n({...t,feedback:e})}}__init3(){this.changeTeacherInstructions=e=>{const{model:t,onModelChanged:n}=this.props;n({...t,teacherInstructions:e})}}render(){const{model:e,classes:t,configuration:n,imageSupport:a,onConfigurationChanged:i,onModelChanged:s,uploadSoundSupport:o}=this.props,{annotations:l={},contentDimensions:r={},dimensions:d={},equationEditor:c={},feedback:p={},playerSpellCheck:u={},prompt:h={},settingsPanelDisabled:g,spanishInput:b={},specialInput:m={},spellCheck:E={},studentInstructions:f={},teacherInstructions:I={},mathInput:x={},maxImageWidth:q={},maxImageHeight:Y={},multiple:j={},withRubric:O={},mathMlOptions:H={},baseInputConfiguration:N={}}=n||{},{errors:F={},extraCSSRules:G,feedbackEnabled:W,promptEnabled:L,spellCheckEnabled:z,teacherInstructionsEnabled:B,toolbarEditorPosition:U}=e||{},{prompt:J,teacherInstructions:K}=F,Q=q&&q.prompt,V=Y&&Y.prompt,X={position:"top"===U?"top":"bottom"},Z={mathInput:x.settings&&M(x.label),equationEditor:c.enabled&&e.mathInput&&D(c.label,["non-negative-integers","integers","decimals","fractions","Grade 1 - 2","Grade 3 - 5","Grade 6 - 7","Grade 8 - HS","geometry","advanced-algebra","statistics","item-authoring"]),spanishInput:b.settings&&M(b.label),specialInput:m.settings&&M(m.label),dimensions:d.settings&&A(d.label,{width:{label:"Width (px)",suffix:"px",min:100,max:1200},height:{label:"Height (px)",suffix:"px",min:100,max:500}}),"multiple.enabled":j.settings&&M(j.label,!0),promptEnabled:h.settings&&M(h.label),feedbackEnabled:p.settings&&M(p.label),annotationsEnabled:l.settings&&M(l.label),spellCheckEnabled:E.settings&&M(E.label),playerSpellCheckDisabled:u.settings&&M(u.label)},$={teacherInstructionsEnabled:I.settings&&M(I.label),studentInstructionsEnabled:f.settings&&M(f.label),rubricEnabled:w([O,"optionalAccess",e=>e.settings])&&M(w([O,"optionalAccess",e=>e.label]))},ee=e=>Object.assign({...N},e||{});return _.createElement(y.ConfigLayout,{extraCSSRules:G,dimensions:r,hideSettings:g,settings:_.createElement(T,{model:e,configuration:n,onChangeModel:e=>s(e),onChangeConfiguration:e=>i(e),groups:{Settings:Z,Properties:$}})},B&&_.createElement(S,{label:I.label,className:t.promptContainer},_.createElement(k,{className:t.prompt,markup:e.teacherInstructions||"",onChange:this.changeTeacherInstructions,imageSupport:a,nonEmpty:!1,error:K,toolbarOpts:X,spellCheck:z,maxImageWidth:q&&q.teacherInstructions||Q,maxImageHeight:Y&&Y.teacherInstructions||V,uploadSoundSupport:o,languageCharactersProps:[{language:"spanish"},{language:"special"}],mathMlOptions:H,pluginProps:ee(w([I,"optionalAccess",e=>e.inputConfiguration]))}),K&&_.createElement("div",{className:t.errorText},K)),L&&_.createElement(S,{label:h.label,className:t.promptContainer},_.createElement(k,{activePlugins:P,className:t.prompt,markup:e.prompt||"",onChange:this.onPromptChange,imageSupport:a,nonEmpty:!1,error:J,toolbarOpts:X,spellCheck:z,maxImageWidth:Q,maxImageHeight:V,uploadSoundSupport:o,languageCharactersProps:[{language:"spanish"},{language:"special"}],mathMlOptions:H,pluginProps:ee(w([h,"optionalAccess",e=>e.inputConfiguration]))}),J&&_.createElement("div",{className:t.errorText},J)),W&&_.createElement(_.Fragment,null,_.createElement(C,{className:t.header,variant:"subheading"},"Feedback"),_.createElement(v,{label:"When submitted, show",feedback:e.feedback||R,onChange:this.changeFeedback,toolbarOpts:X})))}}q.__initStatic();var Y=I((e=>({header:{paddingBottom:e.spacing.unit},promptContainer:{paddingTop:2*e.spacing.unit,marginBottom:2*e.spacing.unit,width:"100%"},errorText:{fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingTop:e.spacing.unit}})))(q),j={annotationsEnabled:!1,dimensions:{height:100,width:500},equationEditor:"Grade 8 - HS",feedbackEnabled:!1,mathInput:!1,playerSpellCheckDisabled:!0,predefinedAnnotations:[{label:"good",text:"good",type:"positive"},{label:"★",text:"★",type:"positive"},{label:":-)",text:":-)",type:"positive"},{label:"creative",text:"creative",type:"positive"},{label:"run-on",text:"run-on",type:"negative"},{label:"frag",text:"fragment",type:"negative"},{label:"tran",text:"transition",type:"negative"},{label:"supp",text:"support needed",type:"negative"},{label:"punc",text:"punctuation",type:"negative"},{label:"agr",text:"agreement wrong",type:"negative"},{label:"unclear",text:"unclear",type:"negative"},{label:"cut",text:"cut",type:"negative"},{label:"sp",text:"spelling",type:"negative"},{label:"cap",text:"capitalization",type:"negative"},{label:"inf",text:"informal",type:"negative"},{label:"awk",text:"awkward",type:"negative"}],prompt:"",promptEnabled:!0,rationale:"",rationaleEnabled:!0,spanishInput:!1,specialInput:!1,spellCheckEnabled:!0,studentInstructionsEnabled:!0,teacherInstructions:"",teacherInstructionsEnabled:!0,toolbarEditorPosition:"bottom"},O={annotations:{settings:!1,label:"Annotations"},baseInputConfiguration:{audio:{disabled:!1},video:{disabled:!1},image:{disabled:!1},h3:{disabled:!0},blockquote:{disabled:!0},textAlign:{disabled:!0},showParagraphs:{disabled:!1},separateParagraphs:{disabled:!0}},dimensions:{settings:!0,label:"Text-Entry Display Size"},spellCheck:{label:"Spellcheck",settings:!1,enabled:!0},playerSpellCheck:{label:"Disable Student Spellcheck",settings:!0,enabled:!0},equationEditor:{settings:!1,label:"Equation Editor",enabled:!0},feedback:{settings:!0,label:"Feedback"},mathInput:{settings:!0,label:"Student response can include math notation",enabled:!1},settingsPanelDisabled:!1,spanishInput:{settings:!0,label:"Students can insert Spanish",enabled:!1},specialInput:{settings:!0,label:"Students can insert Special Characters",enabled:!1},multiple:{settings:!1,label:"Multiple Parts",enabled:!1},studentInstructions:{settings:!1,label:"Student Instructions"},prompt:{settings:!0,label:"Prompt",inputConfiguration:{audio:{disabled:!1},video:{disabled:!1},image:{disabled:!1}},required:!1},teacherInstructions:{settings:!0,label:"Teacher Instructions",inputConfiguration:{audio:{disabled:!1},video:{disabled:!1},image:{disabled:!1}},required:!1},maxImageWidth:{teacherInstructions:300,prompt:300},maxImageHeight:{teacherInstructions:300,prompt:300},withRubric:{settings:!1,label:"Add Rubric"},mathMlOptions:{mmlOutput:!1,mmlEditing:!1}};const H=e,N=i;function F(e){let t,n=e[0],a=1;for(;a<e.length;){const i=e[a],s=e[a+1];if(a+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=s(n)):"call"!==i&&"optionalCall"!==i||(n=s(((...e)=>n.call(t,...e))),t=void 0)}return n}class G extends HTMLElement{static __initStatic(){this.createDefaultModel=(e={},t)=>{const n={...j,...e};return F([t,"optionalAccess",e=>e.withRubric,"optionalAccess",e=>e.forceEnabled])&&!n.rubricEnabled&&(n.rubricEnabled=!0),n}}constructor(){super(),this._configuration=O,F([this,"access",e=>e._configuration,"access",e=>e.withRubric,"optionalAccess",e=>e.forceEnabled])&&(this._configuration.withRubric.settings=!1),this._model=G.createDefaultModel({},this._configuration)}set model(e){this._model=G.createDefaultModel(e,this._configuration),this.render()}set configuration(e){this._configuration={...O,...e};const{withRubric:t={}}=e||{};F([t,"optionalAccess",e=>e.forceEnabled])&&(this._configuration.withRubric.settings=!1,this._model.rubricEnabled||(this._model.rubricEnabled=!0)),this.render()}onModelChanged(e){this._model=e,this.render(),this.dispatchEvent(new d(this._model,!1))}onConfigurationChanged(e){this._configuration={...O,...e},this._model&&this.onModelChanged(this._model),this.render()}insertImage(e){this.dispatchEvent(new h(e))}onDeleteImage(e,t){this.dispatchEvent(new p(e,t))}insertSound(e){this.dispatchEvent(new E(e))}onDeleteSound(e,t){this.dispatchEvent(new b(e,t))}render(){if(this._model){const e=H.createElement(Y,{model:this._model,configuration:this._configuration,onModelChanged:this.onModelChanged.bind(this),onConfigurationChanged:this.onConfigurationChanged.bind(this),imageSupport:{add:this.insertImage.bind(this),delete:this.onDeleteImage.bind(this)},uploadSoundSupport:{add:this.insertSound.bind(this),delete:this.onDeleteSound.bind(this)}});N.render(e,this)}}}G.__initStatic();export{G as default};
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Get the feedback from a {FeedbackConfig}
3
+ *
4
+ * @param {FeedbackConfig} feedback
5
+ * @param {string} fallback
6
+ */
7
+
8
+ const getFeedback = (feedback, fallback) => new Promise(resolve => {
9
+ if (!feedback || feedback.type === 'none') {
10
+ resolve(undefined);
11
+ return;
12
+ }
13
+
14
+ feedback = feedback || {};
15
+ const out = feedback[feedback.type] || fallback;
16
+ resolve(out);
17
+ }); // TODO: should replace getFeedbackForCorrectness
18
+
19
+ var defaults = {
20
+ annotationsEnabled: false,
21
+ dimensions: { height: 100, width: 500 },
22
+ equationEditor: 'Grade 8 - HS',
23
+ feedbackEnabled: false,
24
+ mathInput: false,
25
+ playerSpellCheckDisabled: true,
26
+ predefinedAnnotations: [
27
+ { label: 'good', text: 'good', type: 'positive' },
28
+ { label: '★', text: '★', type: 'positive' },
29
+ { label: ':-)', text: ':-)', type: 'positive' },
30
+ { label: 'creative', text: 'creative', type: 'positive' },
31
+ { label: 'run-on', text: 'run-on', type: 'negative' },
32
+ { label: 'frag', text: 'fragment', type: 'negative' },
33
+ { label: 'tran', text: 'transition', type: 'negative' },
34
+ { label: 'supp', text: 'support needed', type: 'negative' },
35
+ { label: 'punc', text: 'punctuation', type: 'negative' },
36
+ { label: 'agr', text: 'agreement wrong', type: 'negative' },
37
+ { label: 'unclear', text: 'unclear', type: 'negative' },
38
+ { label: 'cut', text: 'cut', type: 'negative' },
39
+ { label: 'sp', text: 'spelling', type: 'negative' },
40
+ { label: 'cap', text: 'capitalization', type: 'negative' },
41
+ { label: 'inf', text: 'informal', type: 'negative' },
42
+ { label: 'awk', text: 'awkward', type: 'negative' },
43
+ ],
44
+ prompt: '',
45
+ promptEnabled: true,
46
+ rationale: '',
47
+ rationaleEnabled: true,
48
+ studentInstructionsEnabled: true,
49
+ teacherInstructions: '',
50
+ teacherInstructionsEnabled: true,
51
+ toolbarEditorPosition: 'bottom',
52
+ };
53
+
54
+ async function createDefaultModel(model = {}) {
55
+
56
+ return { ...defaults, ...model };
57
+ }
58
+
59
+ const normalize = (question) => ({ ...defaults, ...question });
60
+
61
+ async function model(question, session, env) {
62
+ const normalizedQuestion = normalize(question);
63
+
64
+ const fb =
65
+ env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled
66
+ ? getFeedback(normalizedQuestion.feedback, 'Your answer has been submitted')
67
+ : Promise.resolve(undefined);
68
+
69
+ let teacherInstructions = null;
70
+ if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {
71
+ teacherInstructions = normalizedQuestion.teacherInstructionsEnabled ? normalizedQuestion.teacherInstructions : null;
72
+ } else {
73
+ teacherInstructions = null;
74
+ }
75
+
76
+ let equationEditor = normalizedQuestion.equationEditor || 'miscellaneous';
77
+
78
+ switch (normalizedQuestion.equationEditor) {
79
+ case 'Grade 1 - 2':
80
+ equationEditor = 1;
81
+ break;
82
+ case 'Grade 3 - 5':
83
+ equationEditor = 3;
84
+ break;
85
+ case 'Grade 6 - 7':
86
+ equationEditor = 6;
87
+ break;
88
+ case 'Grade 8 - HS':
89
+ equationEditor = 8;
90
+ break;
91
+ }
92
+
93
+ const annotatorMode = normalizedQuestion.annotationsEnabled && (env.role === 'instructor' || env.mode === 'evaluate');
94
+
95
+ return fb.then((feedback) => ({
96
+ prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,
97
+ dimensions: normalizedQuestion.dimensions,
98
+ customKeys: normalizedQuestion.customKeys || [],
99
+ id: normalizedQuestion.id,
100
+ disabled: env.mode !== 'gather',
101
+ feedback,
102
+ teacherInstructions,
103
+ language: normalizedQuestion.language,
104
+ mathInput: normalizedQuestion.mathInput,
105
+ spanishInput: normalizedQuestion.spanishInput,
106
+ specialInput: normalizedQuestion.specialInput,
107
+ equationEditor,
108
+ spellCheckEnabled: !normalizedQuestion.playerSpellCheckDisabled,
109
+ playersToolbarPosition: normalizedQuestion.playersToolbarPosition || 'bottom',
110
+ annotatorMode,
111
+ disabledAnnotator: normalizedQuestion.annotationsEnabled ? env.role !== 'instructor' : true,
112
+ predefinedAnnotations: normalizedQuestion.annotationsEnabled ? normalizedQuestion.predefinedAnnotations : [],
113
+ extraCSSRules: normalizedQuestion.extraCSSRules,
114
+ }));
115
+ }
116
+
117
+ async function outcome(/*question, session, env*/) {
118
+ return {
119
+ score: 0,
120
+ completed: 'n/a',
121
+ note: 'Requires manual scoring',
122
+ };
123
+ }
124
+
125
+ // remove all html tags except img, iframe and source tag for audio
126
+ const getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');
127
+
128
+ const validate = (model = {}, config = {}) => {
129
+ const errors = {};
130
+
131
+ ['teacherInstructions', 'prompt'].forEach((field) => {
132
+ if (config[field]?.required && !getContent(model[field])) {
133
+ errors[field] = 'This field is required.';
134
+ }
135
+ });
136
+
137
+ return errors;
138
+ };
139
+
140
+ export { createDefaultModel, model, normalize, outcome, validate };
package/module/demo.js ADDED
@@ -0,0 +1,38 @@
1
+ import Configure from './configure.js';
2
+ import Element from './element.js';
3
+ import * as controller from './controller.js';
4
+
5
+ var generate = {};
6
+
7
+ generate.model = (id, element) => ({
8
+ id,
9
+ element,
10
+ customKeys: ['\\square'],
11
+ feedback: { type: 'default', default: 'this is default feedback' },
12
+ prompt: 'This is the question prompt',
13
+ promptEnabled: true,
14
+ mathInput: true,
15
+ playersToolbarPosition: 'bottom',
16
+ toolbarEditorPosition: 'bottom',
17
+ spellCheckEnabled: true,
18
+ rubricEnabled: false,
19
+ annotationsEnabled: false,
20
+ });
21
+
22
+ const { model } = generate;
23
+ var config = {
24
+ elements: {
25
+ 'extended-text-entry': '../..',
26
+ },
27
+ models: [model('1', 'extended-text-entry')],
28
+ };
29
+
30
+ //Note: demo-el is a custom element loaded in the markup.
31
+ customElements.whenDefined("demo-el").then(() => {
32
+ config.models.forEach((m) => {
33
+ const de = document.createElement("demo-el");
34
+ document.body.appendChild(de);
35
+ de.def = { tagName: m.element, Element, Configure, controller };
36
+ de.model = m;
37
+ });
38
+ });