@pie-players/pie-assessment-player 0.3.23 → 0.3.25
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assessment-player-shell-element.d.ts","sourceRoot":"","sources":["../../src/components/assessment-player-shell-element.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assessment-player-shell-element.d.ts","sourceRoot":"","sources":["../../src/components/assessment-player-shell-element.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "@pie-players/pie-section-player/components/section-player-splitpane-element";
|
|
2
2
|
import "@pie-players/pie-section-player/components/section-player-vertical-element";
|
|
3
|
+
import { defineCustomElementSafely as _ } from "@pie-players/pie-players-shared";
|
|
3
4
|
function p(e, t) {
|
|
4
5
|
const s = `[${e}]`;
|
|
5
6
|
return {
|
|
@@ -30,7 +31,7 @@ function g(e) {
|
|
|
30
31
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
31
32
|
}, g(e);
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
+
function V(e, t) {
|
|
34
35
|
if (g(e) != "object" || !e) return e;
|
|
35
36
|
var s = e[Symbol.toPrimitive];
|
|
36
37
|
if (s !== void 0) {
|
|
@@ -40,12 +41,12 @@ function Y(e, t) {
|
|
|
40
41
|
}
|
|
41
42
|
return (t === "string" ? String : Number)(e);
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
-
var t =
|
|
44
|
+
function q(e) {
|
|
45
|
+
var t = V(e, "string");
|
|
45
46
|
return g(t) == "symbol" ? t : t + "";
|
|
46
47
|
}
|
|
47
48
|
function a(e, t, s) {
|
|
48
|
-
return (t =
|
|
49
|
+
return (t = q(t)) in e ? Object.defineProperty(e, t, {
|
|
49
50
|
value: s,
|
|
50
51
|
enumerable: !0,
|
|
51
52
|
configurable: !0,
|
|
@@ -58,8 +59,8 @@ typeof window < "u" && !window.pieHelpers && (window.pieHelpers = {
|
|
|
58
59
|
globalLoadQueue: Promise.resolve(),
|
|
59
60
|
activeBundleUrl: null
|
|
60
61
|
});
|
|
61
|
-
var
|
|
62
|
-
function
|
|
62
|
+
var U = "https://proxy.pie-api.com", J = `${U}/bundles/`;
|
|
63
|
+
function B(e) {
|
|
63
64
|
try {
|
|
64
65
|
const t = {
|
|
65
66
|
BASE_URL: "/",
|
|
@@ -72,7 +73,7 @@ function U(e) {
|
|
|
72
73
|
} catch {
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
|
-
var
|
|
76
|
+
var Le = typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL || B("PUBLIC_BUILDER_ORIGIN_URL") || U, K = typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL || B("PUBLIC_BUILDER_BUNDLE_URL") || J, N;
|
|
76
77
|
(function(e) {
|
|
77
78
|
e.SAVE = "save", e.MODEL = "model", e.SCORE = "score", e.MANUAL_SCORE = "manual-score";
|
|
78
79
|
})(N || (N = {}));
|
|
@@ -88,9 +89,9 @@ var x;
|
|
|
88
89
|
(function(e) {
|
|
89
90
|
e.PENDING = "pending", e.IN_PROGRESS = "in_progress", e.COMPLETED = "completed", e.FAILED = "failed";
|
|
90
91
|
})(x || (x = {}));
|
|
91
|
-
var
|
|
92
|
+
var W = class $ extends CustomEvent {
|
|
92
93
|
constructor(t, s = !1) {
|
|
93
|
-
super(
|
|
94
|
+
super($.TYPE, {
|
|
94
95
|
bubbles: !0,
|
|
95
96
|
detail: {
|
|
96
97
|
update: t,
|
|
@@ -99,10 +100,10 @@ var K = class B extends CustomEvent {
|
|
|
99
100
|
}), a(this, "update", void 0), a(this, "reset", void 0), this.update = t, this.reset = s;
|
|
100
101
|
}
|
|
101
102
|
};
|
|
102
|
-
a(
|
|
103
|
-
var
|
|
103
|
+
a(W, "TYPE", "model.updated");
|
|
104
|
+
var Q = class O extends CustomEvent {
|
|
104
105
|
constructor(t, s) {
|
|
105
|
-
super(
|
|
106
|
+
super(O.TYPE, {
|
|
106
107
|
bubbles: !0,
|
|
107
108
|
detail: {
|
|
108
109
|
src: t,
|
|
@@ -111,19 +112,19 @@ var W = class $ extends CustomEvent {
|
|
|
111
112
|
}), a(this, "src", void 0), a(this, "done", void 0), this.src = t, this.done = s;
|
|
112
113
|
}
|
|
113
114
|
};
|
|
114
|
-
a(
|
|
115
|
-
var
|
|
115
|
+
a(Q, "TYPE", "delete.image");
|
|
116
|
+
var Z = class M extends CustomEvent {
|
|
116
117
|
constructor(t) {
|
|
117
|
-
super(
|
|
118
|
+
super(M.TYPE, {
|
|
118
119
|
bubbles: !0,
|
|
119
120
|
detail: t
|
|
120
121
|
}), a(this, "handler", void 0), this.handler = t;
|
|
121
122
|
}
|
|
122
123
|
};
|
|
123
|
-
a(
|
|
124
|
-
var
|
|
124
|
+
a(Z, "TYPE", "insert.image");
|
|
125
|
+
var X = class z extends CustomEvent {
|
|
125
126
|
constructor(t, s) {
|
|
126
|
-
super(
|
|
127
|
+
super(z.TYPE, {
|
|
127
128
|
bubbles: !0,
|
|
128
129
|
detail: {
|
|
129
130
|
src: t,
|
|
@@ -132,19 +133,19 @@ var Z = class M extends CustomEvent {
|
|
|
132
133
|
}), a(this, "src", void 0), a(this, "done", void 0), this.src = t, this.done = s;
|
|
133
134
|
}
|
|
134
135
|
};
|
|
135
|
-
a(
|
|
136
|
-
var
|
|
136
|
+
a(X, "TYPE", "delete.sound");
|
|
137
|
+
var ee = class F extends CustomEvent {
|
|
137
138
|
constructor(t) {
|
|
138
|
-
super(
|
|
139
|
+
super(F.TYPE, {
|
|
139
140
|
bubbles: !0,
|
|
140
141
|
detail: t
|
|
141
142
|
}), a(this, "handler", void 0), this.handler = t;
|
|
142
143
|
}
|
|
143
144
|
};
|
|
144
|
-
a(
|
|
145
|
-
var
|
|
145
|
+
a(ee, "TYPE", "insert.sound");
|
|
146
|
+
var te = class G extends CustomEvent {
|
|
146
147
|
constructor(t, s) {
|
|
147
|
-
super(
|
|
148
|
+
super(G.TYPE, {
|
|
148
149
|
bubbles: !0,
|
|
149
150
|
composed: !0,
|
|
150
151
|
detail: {
|
|
@@ -154,32 +155,32 @@ var ee = class F extends CustomEvent {
|
|
|
154
155
|
}), a(this, "component", void 0), a(this, "complete", void 0), this.component = t, this.complete = s;
|
|
155
156
|
}
|
|
156
157
|
};
|
|
157
|
-
a(
|
|
158
|
+
a(te, "TYPE", "session-changed");
|
|
158
159
|
var R;
|
|
159
160
|
(function(e) {
|
|
160
161
|
e[e.ROOT = 0] = "ROOT", e[e.SUBJECT = 1] = "SUBJECT", e[e.LEVEL = 2] = "LEVEL", e[e.STANDARD = 3] = "STANDARD";
|
|
161
162
|
})(R || (R = {}));
|
|
162
|
-
var
|
|
163
|
-
buildServiceBase:
|
|
163
|
+
var ke = p("math-rendering", () => f()), Te = p("pie-scoring", () => f()), De = p("pie-updates", () => f()), _e = p("pie-initialization", () => f()), Ue = {
|
|
164
|
+
buildServiceBase: K,
|
|
164
165
|
bundleType: S.player,
|
|
165
166
|
env: {
|
|
166
167
|
mode: "gather",
|
|
167
168
|
role: "student"
|
|
168
169
|
}
|
|
169
170
|
};
|
|
170
|
-
function
|
|
171
|
+
function j(e) {
|
|
171
172
|
if (!e || typeof e != "object") return !1;
|
|
172
173
|
const t = e;
|
|
173
174
|
return typeof t.providerId == "string" && typeof t.providerName == "string" && typeof t.initialize == "function" && typeof t.trackError == "function" && typeof t.trackEvent == "function" && typeof t.destroy == "function" && typeof t.isReady == "function";
|
|
174
175
|
}
|
|
175
|
-
var
|
|
176
|
-
function se(e) {
|
|
177
|
-
return e && typeof e == "object" ? e : typeof e > "u" ? {} : { value: e };
|
|
178
|
-
}
|
|
176
|
+
var se = p("instrumentation-event-bridge", () => f());
|
|
179
177
|
function ne(e) {
|
|
180
|
-
|
|
178
|
+
return e && typeof e == "object" ? e : typeof e > "u" ? {} : { value: e };
|
|
181
179
|
}
|
|
182
180
|
function ie(e) {
|
|
181
|
+
se.warn(`[InstrumentationEventBridge:${e}] Ignoring invalid instrumentation provider; expected InstrumentationProvider contract`);
|
|
182
|
+
}
|
|
183
|
+
function re(e) {
|
|
183
184
|
try {
|
|
184
185
|
e.provider.trackError(e.error instanceof Error ? e.error : new Error(String(e.error ?? "Unknown instrumentation bridge error")), {
|
|
185
186
|
component: e.component,
|
|
@@ -189,13 +190,13 @@ function ie(e) {
|
|
|
189
190
|
} catch {
|
|
190
191
|
}
|
|
191
192
|
}
|
|
192
|
-
function
|
|
193
|
+
function oe(e) {
|
|
193
194
|
if (!e.host || !e.eventMap.length) return () => {
|
|
194
195
|
};
|
|
195
196
|
if (!e.instrumentationProvider) return () => {
|
|
196
197
|
};
|
|
197
|
-
if (!
|
|
198
|
-
return e.debug &&
|
|
198
|
+
if (!j(e.instrumentationProvider))
|
|
199
|
+
return e.debug && ie(e.component), () => {
|
|
199
200
|
};
|
|
200
201
|
const t = e.instrumentationProvider, s = [], n = Math.max(0, e.dedupeWindowMs ?? 0), i = /* @__PURE__ */ new Map(), c = (o, r) => {
|
|
201
202
|
const d = [
|
|
@@ -212,7 +213,7 @@ function re(e) {
|
|
|
212
213
|
const r = (d) => {
|
|
213
214
|
try {
|
|
214
215
|
if (!t.isReady() || e.shouldTrackEvent && !e.shouldTrackEvent(d)) return;
|
|
215
|
-
const l =
|
|
216
|
+
const l = ne(d.detail), h = (/* @__PURE__ */ new Date()).toISOString(), I = {
|
|
216
217
|
...l,
|
|
217
218
|
...e.staticAttributes,
|
|
218
219
|
component: e.component,
|
|
@@ -226,7 +227,7 @@ function re(e) {
|
|
|
226
227
|
}
|
|
227
228
|
t.trackEvent(o.instrumentationEventName, { ...I });
|
|
228
229
|
} catch (l) {
|
|
229
|
-
|
|
230
|
+
re({
|
|
230
231
|
provider: t,
|
|
231
232
|
component: e.component,
|
|
232
233
|
error: l,
|
|
@@ -242,7 +243,7 @@ function re(e) {
|
|
|
242
243
|
for (const o of s) o();
|
|
243
244
|
};
|
|
244
245
|
}
|
|
245
|
-
var
|
|
246
|
+
var ae = class {
|
|
246
247
|
constructor() {
|
|
247
248
|
a(this, "initialized", !1), a(this, "config", void 0);
|
|
248
249
|
}
|
|
@@ -306,7 +307,7 @@ var oe = class {
|
|
|
306
307
|
transformAttributes(e) {
|
|
307
308
|
return this.config?.attributeTransformer ? this.config.attributeTransformer(e) : e;
|
|
308
309
|
}
|
|
309
|
-
},
|
|
310
|
+
}, ce = class extends ae {
|
|
310
311
|
constructor(...e) {
|
|
311
312
|
super(...e), a(this, "providerId", "newrelic"), a(this, "providerName", "New Relic");
|
|
312
313
|
}
|
|
@@ -354,25 +355,25 @@ function D(e) {
|
|
|
354
355
|
const t = e.trackPageActions;
|
|
355
356
|
return typeof t == "boolean" ? t : void 0;
|
|
356
357
|
}
|
|
357
|
-
function
|
|
358
|
+
function de(e, t) {
|
|
358
359
|
return e.kind === "value" || e.kind === "null" ? e : t;
|
|
359
360
|
}
|
|
360
|
-
var v,
|
|
361
|
-
function
|
|
362
|
-
return v || (v = new
|
|
361
|
+
var v, le = p("instrumentation-provider-resolution", () => f());
|
|
362
|
+
function ue() {
|
|
363
|
+
return v || (v = new ce(), v.initialize()), v;
|
|
363
364
|
}
|
|
364
|
-
function
|
|
365
|
-
const t = k(e.runtimePlayer), s = k(e.player), n = D(t), i = D(s), c = n ?? i ?? !1, o =
|
|
365
|
+
function he(e) {
|
|
366
|
+
const t = k(e.runtimePlayer), s = k(e.player), n = D(t), i = D(s), c = n ?? i ?? !1, o = de(T(t), T(s));
|
|
366
367
|
if (o.kind !== "null") {
|
|
367
|
-
if (o.kind === "unset") return c ?
|
|
368
|
-
if (
|
|
368
|
+
if (o.kind === "unset") return c ? ue() : void 0;
|
|
369
|
+
if (j(o.value)) return o.value;
|
|
369
370
|
if (e.debug) {
|
|
370
371
|
const r = e.component ? `[${e.component}] ` : "";
|
|
371
|
-
|
|
372
|
+
le.warn(`${r}Ignoring invalid instrumentation provider; expected InstrumentationProvider contract`);
|
|
372
373
|
}
|
|
373
374
|
}
|
|
374
375
|
}
|
|
375
|
-
var
|
|
376
|
+
var me = [
|
|
376
377
|
{
|
|
377
378
|
sourceEventName: "assessment-controller-ready",
|
|
378
379
|
instrumentationEventName: "pie-assessment-controller-ready"
|
|
@@ -412,29 +413,29 @@ function m() {
|
|
|
412
413
|
function y(e) {
|
|
413
414
|
return e.replace(/[^a-zA-Z0-9_-]/g, "-");
|
|
414
415
|
}
|
|
415
|
-
function
|
|
416
|
+
function pe(e) {
|
|
416
417
|
if (e.attemptId) return `aas_v1_${y(e.assessmentId)}_${y(e.attemptId)}`;
|
|
417
|
-
const t =
|
|
418
|
+
const t = H(), s = t ? fe(t) : "anon";
|
|
418
419
|
return `aas_v1_${y(e.assessmentId)}_${y(s)}`;
|
|
419
420
|
}
|
|
420
|
-
function
|
|
421
|
+
function H() {
|
|
421
422
|
try {
|
|
422
423
|
return typeof window > "u" ? null : window.localStorage;
|
|
423
424
|
} catch {
|
|
424
425
|
return null;
|
|
425
426
|
}
|
|
426
427
|
}
|
|
427
|
-
function
|
|
428
|
+
function fe(e) {
|
|
428
429
|
const t = "pie:assessment-player:anonymous-device-id", s = e.getItem(t);
|
|
429
430
|
if (s) return s;
|
|
430
431
|
const n = `anon-${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`;
|
|
431
432
|
return e.setItem(t, n), n;
|
|
432
433
|
}
|
|
433
|
-
function
|
|
434
|
+
function Y() {
|
|
434
435
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
435
436
|
}
|
|
436
|
-
function
|
|
437
|
-
const t =
|
|
437
|
+
function ge(e) {
|
|
438
|
+
const t = Y(), s = e.sectionIdentifiers[0];
|
|
438
439
|
return {
|
|
439
440
|
version: 1,
|
|
440
441
|
assessmentAttemptSessionIdentifier: e.assessmentAttemptSessionIdentifier,
|
|
@@ -453,8 +454,8 @@ function fe(e) {
|
|
|
453
454
|
sectionSessions: {}
|
|
454
455
|
};
|
|
455
456
|
}
|
|
456
|
-
function
|
|
457
|
-
const s =
|
|
457
|
+
function ve(e, t) {
|
|
458
|
+
const s = Y();
|
|
458
459
|
return {
|
|
459
460
|
...e,
|
|
460
461
|
updatedAt: s,
|
|
@@ -468,7 +469,7 @@ function ge(e, t) {
|
|
|
468
469
|
}
|
|
469
470
|
};
|
|
470
471
|
}
|
|
471
|
-
function
|
|
472
|
+
function ye(e, t) {
|
|
472
473
|
const s = new Set(e.navigationState.visitedSectionIdentifiers || []);
|
|
473
474
|
return t.currentSectionIdentifier && s.add(t.currentSectionIdentifier), {
|
|
474
475
|
...e,
|
|
@@ -480,7 +481,7 @@ function ve(e, t) {
|
|
|
480
481
|
}
|
|
481
482
|
};
|
|
482
483
|
}
|
|
483
|
-
function
|
|
484
|
+
function Se(e) {
|
|
484
485
|
if (!e) return [];
|
|
485
486
|
const t = [], s = e.testParts || [];
|
|
486
487
|
return s.length > 0 ? (s.forEach((n, i) => {
|
|
@@ -503,7 +504,7 @@ function ye(e) {
|
|
|
503
504
|
});
|
|
504
505
|
}), t);
|
|
505
506
|
}
|
|
506
|
-
var
|
|
507
|
+
var Ie = class {
|
|
507
508
|
constructor(e) {
|
|
508
509
|
this.args = e, this.listeners = /* @__PURE__ */ new Set(), this.deliveryPlan = { sections: [] }, this.session = null, this.readiness = "bootstrapping", this.submitted = !1, this.storageContext = {
|
|
509
510
|
assessmentId: e.assessmentId,
|
|
@@ -523,7 +524,7 @@ var Se = class {
|
|
|
523
524
|
async getPersistenceStrategy() {
|
|
524
525
|
if (this.persistenceStrategy) return this.persistenceStrategy;
|
|
525
526
|
const e = { createDefaultPersistence: () => {
|
|
526
|
-
const t =
|
|
527
|
+
const t = H(), s = `pie:assessment-controller:v1:${this.storageContext.assessmentId}:${this.storageContext.attemptId || "default"}`;
|
|
527
528
|
return {
|
|
528
529
|
async loadSession() {
|
|
529
530
|
if (!t) return null;
|
|
@@ -546,7 +547,7 @@ var Se = class {
|
|
|
546
547
|
return this.persistenceStrategy = await this.args.hooks?.createAssessmentSessionPersistence?.(this.storageContext, e) ?? await e.createDefaultPersistence(), this.persistenceStrategy;
|
|
547
548
|
}
|
|
548
549
|
async createDeliveryPlan() {
|
|
549
|
-
const e = { createDefaultDeliveryPlan: () => ({ sections:
|
|
550
|
+
const e = { createDefaultDeliveryPlan: () => ({ sections: Se(this.args.assessment) }) }, t = {
|
|
550
551
|
assessmentId: this.args.assessmentId,
|
|
551
552
|
attemptId: this.args.attemptId,
|
|
552
553
|
assessment: this.args.assessment
|
|
@@ -556,8 +557,8 @@ var Se = class {
|
|
|
556
557
|
ensureSession() {
|
|
557
558
|
if (this.session) return this.session;
|
|
558
559
|
const e = this.deliveryPlan.sections.map((t) => t.sectionIdentifier);
|
|
559
|
-
return this.session =
|
|
560
|
-
assessmentAttemptSessionIdentifier:
|
|
560
|
+
return this.session = ge({
|
|
561
|
+
assessmentAttemptSessionIdentifier: pe({
|
|
561
562
|
assessmentId: this.args.assessmentId,
|
|
562
563
|
attemptId: this.args.attemptId
|
|
563
564
|
}),
|
|
@@ -624,7 +625,7 @@ var Se = class {
|
|
|
624
625
|
const t = this.buildNavigationSnapshot();
|
|
625
626
|
if (e < 0 || e >= t.totalSections) return !1;
|
|
626
627
|
const s = t.currentSectionId, n = this.deliveryPlan.sections[e];
|
|
627
|
-
this.session =
|
|
628
|
+
this.session = ye(this.ensureSession(), {
|
|
628
629
|
currentSectionIndex: e,
|
|
629
630
|
currentSectionIdentifier: n?.sectionIdentifier
|
|
630
631
|
});
|
|
@@ -682,7 +683,7 @@ var Se = class {
|
|
|
682
683
|
return this.ensureSession().sectionSessions[e]?.session || null;
|
|
683
684
|
}
|
|
684
685
|
updateSectionSession(e, t) {
|
|
685
|
-
this.session =
|
|
686
|
+
this.session = ve(this.ensureSession(), {
|
|
686
687
|
sectionIdentifier: e,
|
|
687
688
|
sectionSession: t
|
|
688
689
|
}), this.emit({
|
|
@@ -700,14 +701,14 @@ var Se = class {
|
|
|
700
701
|
progressChanged: "assessment-progress-changed",
|
|
701
702
|
submissionStateChanged: "assessment-submission-state-changed",
|
|
702
703
|
error: "assessment-error"
|
|
703
|
-
},
|
|
704
|
-
function
|
|
704
|
+
}, be = "pie-section-player-splitpane", Ee = "pie-section-player-vertical";
|
|
705
|
+
function Pe(e, t = !1) {
|
|
705
706
|
if (e == null) return t;
|
|
706
707
|
if (typeof e == "boolean") return e;
|
|
707
708
|
const s = e.trim().toLowerCase();
|
|
708
709
|
return s === "" || s === "true" || s === "1" || s === "yes";
|
|
709
710
|
}
|
|
710
|
-
var
|
|
711
|
+
var we = class extends HTMLElement {
|
|
711
712
|
static get observedAttributes() {
|
|
712
713
|
return [
|
|
713
714
|
"assessment-id",
|
|
@@ -766,7 +767,7 @@ var Pe = class extends HTMLElement {
|
|
|
766
767
|
return;
|
|
767
768
|
}
|
|
768
769
|
this.readiness = { phase: "bootstrapping" }, this.render();
|
|
769
|
-
const e = new
|
|
770
|
+
const e = new Ie({
|
|
770
771
|
assessmentId: this.assessmentId,
|
|
771
772
|
attemptId: this.attemptId || void 0,
|
|
772
773
|
assessment: this.assessment,
|
|
@@ -782,18 +783,18 @@ var Pe = class extends HTMLElement {
|
|
|
782
783
|
}
|
|
783
784
|
}
|
|
784
785
|
resolveInstrumentationProvider() {
|
|
785
|
-
return
|
|
786
|
+
return he({
|
|
786
787
|
runtimePlayer: this.sectionPlayerRuntime?.player,
|
|
787
788
|
player: this.sectionPlayerPlayer,
|
|
788
789
|
component: "pie-assessment-player-default"
|
|
789
790
|
});
|
|
790
791
|
}
|
|
791
792
|
attachInstrumentationBridge() {
|
|
792
|
-
this.detachInstrumentationBridge?.(), this.detachInstrumentationBridge =
|
|
793
|
+
this.detachInstrumentationBridge?.(), this.detachInstrumentationBridge = oe({
|
|
793
794
|
host: this,
|
|
794
795
|
instrumentationProvider: this.resolveInstrumentationProvider(),
|
|
795
796
|
component: "pie-assessment-player-default",
|
|
796
|
-
eventMap:
|
|
797
|
+
eventMap: me,
|
|
797
798
|
staticAttributes: {
|
|
798
799
|
instrumentationLayer: "assessment",
|
|
799
800
|
assessmentId: this.assessmentId,
|
|
@@ -807,7 +808,7 @@ var Pe = class extends HTMLElement {
|
|
|
807
808
|
t.className = "pie-assessment-player-empty", t.textContent = e, this.appendChild(t);
|
|
808
809
|
}
|
|
809
810
|
buildSectionPlayerTag() {
|
|
810
|
-
return this.sectionPlayerLayout === "vertical" ?
|
|
811
|
+
return this.sectionPlayerLayout === "vertical" ? Ee : be;
|
|
811
812
|
}
|
|
812
813
|
syncCurrentSectionSessionIntoAssessment() {
|
|
813
814
|
const e = this.controller;
|
|
@@ -879,7 +880,7 @@ var Pe = class extends HTMLElement {
|
|
|
879
880
|
}
|
|
880
881
|
`, t.appendChild(s);
|
|
881
882
|
const n = this.getSnapshot();
|
|
882
|
-
if (
|
|
883
|
+
if (Pe(this.showNavigation, !0)) {
|
|
883
884
|
const o = document.createElement("div");
|
|
884
885
|
o.className = "pie-assessment-player-navigation";
|
|
885
886
|
const r = document.createElement("div");
|
|
@@ -1001,14 +1002,14 @@ var Pe = class extends HTMLElement {
|
|
|
1001
1002
|
return Promise.race([t, s]);
|
|
1002
1003
|
}
|
|
1003
1004
|
};
|
|
1004
|
-
|
|
1005
|
-
function
|
|
1005
|
+
_("pie-assessment-player-default", we, "assessment player default tag");
|
|
1006
|
+
function Ne(e, t = !1) {
|
|
1006
1007
|
if (e == null) return t;
|
|
1007
1008
|
if (typeof e == "boolean") return e;
|
|
1008
1009
|
const s = e.trim().toLowerCase();
|
|
1009
1010
|
return s === "" || s === "true" || s === "1" || s === "yes";
|
|
1010
1011
|
}
|
|
1011
|
-
var
|
|
1012
|
+
var Ce = class extends HTMLElement {
|
|
1012
1013
|
constructor(...e) {
|
|
1013
1014
|
super(...e), this.showNavigation = !0;
|
|
1014
1015
|
}
|
|
@@ -1022,7 +1023,7 @@ var Ne = class extends HTMLElement {
|
|
|
1022
1023
|
e === "show-navigation" && (this.showNavigation = s), this.render();
|
|
1023
1024
|
}
|
|
1024
1025
|
render() {
|
|
1025
|
-
const e =
|
|
1026
|
+
const e = Ne(this.showNavigation, !0);
|
|
1026
1027
|
this.innerHTML = "";
|
|
1027
1028
|
const t = document.createElement("style");
|
|
1028
1029
|
t.textContent = `
|
|
@@ -1054,7 +1055,7 @@ var Ne = class extends HTMLElement {
|
|
|
1054
1055
|
n.appendChild(i), s.appendChild(n), this.appendChild(t), this.appendChild(s);
|
|
1055
1056
|
}
|
|
1056
1057
|
};
|
|
1057
|
-
|
|
1058
|
+
_("pie-assessment-player-shell", Ce, "assessment player shell tag");
|
|
1058
1059
|
export {
|
|
1059
1060
|
u as ASSESSMENT_PLAYER_PUBLIC_EVENTS
|
|
1060
1061
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-players/pie-assessment-player",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.25",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Assessment-level coordinator custom elements for orchestrating section-player instances",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"lint": "biome check ."
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@pie-players/pie-assessment-toolkit": "0.3.
|
|
53
|
-
"@pie-players/pie-players-shared": "0.3.
|
|
54
|
-
"@pie-players/pie-section-player": "0.3.
|
|
52
|
+
"@pie-players/pie-assessment-toolkit": "0.3.25",
|
|
53
|
+
"@pie-players/pie-players-shared": "0.3.25",
|
|
54
|
+
"@pie-players/pie-section-player": "0.3.25"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@axe-core/playwright": "^4.11.1",
|