@pie-element/match 13.0.4-next.20261011174919 → 13.0.4
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/dist/author/configure.d.ts +45 -31
- package/dist/author/configure.js +37 -51
- package/dist/author/defaults.d.ts +59 -57
- package/dist/author/index.d.ts +18 -27
- package/dist/author/index.js +15 -4
- package/dist/author/utils.d.ts +33 -2
- package/dist/browser/author/index.js +24 -29
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +24 -29
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +12 -11
- package/dist/controller/index.d.ts +73 -7
- package/dist/index.d.ts +1 -0
- package/dist/schemas/configuration.schema.json +437 -0
- package/dist/schemas/model.schema.json +478 -0
- package/dist/schemas/session.schema.json +36 -0
- package/dist/types.d.ts +183 -0
- package/package.json +21 -17
|
@@ -36558,15 +36558,12 @@ var eK = class extends N.Component {
|
|
|
36558
36558
|
}), iK = (e) => typeof e == "string" ? {
|
|
36559
36559
|
label: e,
|
|
36560
36560
|
value: e
|
|
36561
|
-
} : e, aK =
|
|
36562
|
-
|
|
36563
|
-
|
|
36564
|
-
|
|
36565
|
-
|
|
36566
|
-
|
|
36567
|
-
isConfigProperty: n
|
|
36568
|
-
};
|
|
36569
|
-
}, oK = (e, t, n = !1) => ({
|
|
36561
|
+
} : e, aK = (e, t, n = !1) => ({
|
|
36562
|
+
type: "radio",
|
|
36563
|
+
label: e,
|
|
36564
|
+
choices: t && t.map((e) => iK(e)),
|
|
36565
|
+
isConfigProperty: n
|
|
36566
|
+
}), oK = (e, t, n = !1) => ({
|
|
36570
36567
|
type: "dropdown",
|
|
36571
36568
|
label: e,
|
|
36572
36569
|
choices: t,
|
|
@@ -37097,21 +37094,7 @@ var VK = (0, pc.default)("pie-elements:match:configure"), HK = D("div")(({ theme
|
|
|
37097
37094
|
color: e.palette.error.main,
|
|
37098
37095
|
paddingTop: e.spacing(1)
|
|
37099
37096
|
})), aq = class extends N.Component {
|
|
37100
|
-
|
|
37101
|
-
onModelChanged: L.default.func,
|
|
37102
|
-
onConfigurationChanged: L.default.func,
|
|
37103
|
-
model: L.default.object.isRequired,
|
|
37104
|
-
configuration: L.default.object.isRequired,
|
|
37105
|
-
imageSupport: L.default.shape({
|
|
37106
|
-
add: L.default.func.isRequired,
|
|
37107
|
-
delete: L.default.func.isRequired
|
|
37108
|
-
}),
|
|
37109
|
-
uploadSoundSupport: L.default.shape({
|
|
37110
|
-
add: L.default.func.isRequired,
|
|
37111
|
-
delete: L.default.func.isRequired
|
|
37112
|
-
})
|
|
37113
|
-
};
|
|
37114
|
-
static defaultProps = {};
|
|
37097
|
+
rowIdCounter;
|
|
37115
37098
|
constructor(e) {
|
|
37116
37099
|
super(e);
|
|
37117
37100
|
let t = 0;
|
|
@@ -37190,7 +37173,8 @@ var VK = (0, pc.default)("pie-elements:match:configure"), HK = D("div")(({ theme
|
|
|
37190
37173
|
onResponseTypeChange = (e) => {
|
|
37191
37174
|
let { model: t } = this.props, n = { ...t };
|
|
37192
37175
|
e === "radio" && n.rows.forEach((e) => {
|
|
37193
|
-
e.values.reduce((e, t) => t === !0 ? e + 1 : e)
|
|
37176
|
+
let n = e.values.reduce((e, t) => t === !0 ? Number(e) + 1 : e);
|
|
37177
|
+
Number(n) > 1 && (e.values = Array(t.layout - 1).fill(!1));
|
|
37194
37178
|
}), n.choiceMode = e, this.onChange(n);
|
|
37195
37179
|
};
|
|
37196
37180
|
onPartialScoringChange = (e) => {
|
|
@@ -37540,6 +37524,11 @@ var VK = (0, pc.default)("pie-elements:match:configure"), HK = D("div")(({ theme
|
|
|
37540
37524
|
}
|
|
37541
37525
|
}
|
|
37542
37526
|
}, fq = (0, pc.default)("pie-elements:match:configure"), pq = class e extends HTMLElement {
|
|
37527
|
+
_root;
|
|
37528
|
+
_model;
|
|
37529
|
+
_modelCopy;
|
|
37530
|
+
_configuration;
|
|
37531
|
+
hasPlayerAsParent;
|
|
37543
37532
|
static createDefaultModel = (e = {}) => ({
|
|
37544
37533
|
...dq.model,
|
|
37545
37534
|
...e
|
|
@@ -37559,10 +37548,16 @@ var VK = (0, pc.default)("pie-elements:match:configure"), HK = D("div")(({ theme
|
|
|
37559
37548
|
...dq.configuration,
|
|
37560
37549
|
...e
|
|
37561
37550
|
};
|
|
37562
|
-
this._configuration = t, this.resetModelAfterConfigurationIsSet(), t?.language?.enabled
|
|
37563
|
-
|
|
37564
|
-
|
|
37565
|
-
|
|
37551
|
+
if (this._configuration = t, this.resetModelAfterConfigurationIsSet(), t?.language?.enabled) t?.languageChoices?.options?.length && (this._model.language = t?.languageChoices.options[0].value);
|
|
37552
|
+
else if (t.language.settings && this._model.language) {
|
|
37553
|
+
t.language.enabled = !0, (!t.languageChoices.options || !t.languageChoices.options.length) && (t.languageChoices.options = []);
|
|
37554
|
+
let e = this._model.language;
|
|
37555
|
+
t.languageChoices.options.find((t) => t.value === e) || t.languageChoices.options.push({
|
|
37556
|
+
value: e,
|
|
37557
|
+
label: e
|
|
37558
|
+
});
|
|
37559
|
+
} else delete this._model.language;
|
|
37560
|
+
ft(e?.rows?.inputConfiguration) && (ot(t.rows, "inputConfiguration.image.disabled", !this._model?.enableImages), ot(t.rows, "inputConfiguration.video.disabled", !0), ot(t.rows, "inputConfiguration.audio.disabled", !0)), this._render();
|
|
37566
37561
|
}
|
|
37567
37562
|
onModelChanged(e) {
|
|
37568
37563
|
this._model = e, fq("[onModelChanged]: ", this._model), this._render(), this.dispatchEvent(new oq(this._model));
|