@sparkle-learning/core 0.0.36 → 0.0.37
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/cjs/PrivateRoute-4abc9d29.js +35 -0
- package/dist/cjs/{PrivateRoute-074c584e.js → auth.service-4b584cd7.js} +0 -30
- package/dist/cjs/dom-utils-b8befdd5.js +63 -0
- package/dist/cjs/header-mobile-collapse.cjs.entry.js +90 -0
- package/dist/cjs/index-70e63f5b.js +3071 -0
- package/dist/cjs/index.cjs.js +6 -5
- package/dist/cjs/injectHistory-7206bbb9.js +9 -0
- package/dist/cjs/ion-avatar.cjs.entry.js +25 -0
- package/dist/cjs/ion-button.cjs.entry.js +129 -0
- package/dist/cjs/ion-card_2.cjs.entry.js +91 -0
- package/dist/cjs/ion-checkbox_4.cjs.entry.js +360 -0
- package/dist/cjs/ion-col_3.cjs.entry.js +159 -0
- package/dist/cjs/ion-icon_13.cjs.entry.js +1505 -0
- package/dist/cjs/ion-input_2.cjs.entry.js +313 -0
- package/dist/cjs/ion-label_2.cjs.entry.js +126 -0
- package/dist/cjs/ion-spinner.cjs.entry.js +64 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/match-path-84c9f7ca.js +511 -0
- package/dist/cjs/sparkle-card_3.cjs.entry.js +91 -0
- package/dist/cjs/sparkle-core.cjs.js +1 -1
- package/dist/cjs/sparkle-course-root.cjs.entry.js +146 -0
- package/dist/cjs/sparkle-dropdown.cjs.entry.js +61 -0
- package/dist/cjs/{header-mobile-collapse_61.cjs.entry.js → sparkle-export-lessons_6.cjs.entry.js} +8864 -17750
- package/dist/cjs/sparkle-facilitator-header_19.cjs.entry.js +2130 -0
- package/dist/cjs/sparkle-feedback.cjs.entry.js +2 -1
- package/dist/cjs/sparkle-goal-progress.cjs.entry.js +19 -0
- package/dist/cjs/sparkle-gww-item.cjs.entry.js +74 -0
- package/dist/cjs/sparkle-menu-toggle_3.cjs.entry.js +236 -0
- package/dist/cjs/sparkle-validation-error.cjs.entry.js +21 -0
- package/dist/cjs/stencil-router-redirect.cjs.entry.js +32 -0
- package/dist/cjs/student.service-d48f1c99.js +61 -0
- package/dist/cjs/user.store-8a049c4e.js +21 -0
- package/dist/collection/components/sparkle-quiz/sparkle-quiz/sparkle-quiz.js +2 -1
- package/dist/esm/PrivateRoute-7b526801.js +33 -0
- package/dist/esm/{animation-12377cb3.js → animation-e0716b39.js} +1 -1
- package/dist/esm/{PrivateRoute-c5441f35.js → auth.service-9fb86455.js} +4 -33
- package/dist/esm/{auth.store-dba2c2da.js → auth.store-633e8414.js} +1 -1
- package/dist/esm/dom-utils-109a7d75.js +55 -0
- package/dist/esm/{facilitator.service-b0292f7f.js → facilitator.service-8fd435bf.js} +2 -2
- package/dist/esm/{feed.service-8fbe4ce3.js → feed.service-ace049e5.js} +3 -3
- package/dist/esm/{framework-delegate-3e634a5c.js → framework-delegate-e4f8013b.js} +1 -1
- package/dist/esm/header-mobile-collapse.entry.js +86 -0
- package/dist/esm/{helpers-bf0e23d6.js → helpers-03073fe4.js} +1 -1
- package/dist/esm/{httpService-7b75b095.js → httpService-61864992.js} +2 -2
- package/dist/esm/{icons-9b62a1ec.js → icons-90b957ab.js} +1 -1
- package/dist/esm/{index-5e8971ae.js → index-37004831.js} +1 -1
- package/dist/esm/{index-45fec1e7.js → index-a2d2941d.js} +1 -1
- package/dist/esm/{index-2b84cad2.js → index-b4b4e503.js} +3 -3
- package/dist/esm/{index-cded2d87.js → index-dedabca0.js} +2 -2
- package/dist/esm/index-f9b9ba5d.js +3067 -0
- package/dist/esm/{index.es-e0c0f891.js → index.es-283fbd2e.js} +1 -1
- package/dist/esm/index.js +6 -5
- package/dist/esm/injectHistory-968f626d.js +7 -0
- package/dist/esm/{input-shims-671d8d9f.js → input-shims-cc3720a0.js} +2 -2
- package/dist/esm/ion-accordion.entry.js +1 -1
- package/dist/esm/ion-action-sheet_4.entry.js +5 -5
- package/dist/esm/ion-app.entry.js +3 -3
- package/dist/esm/ion-avatar.entry.js +21 -0
- package/dist/esm/ion-back-button.entry.js +1 -1
- package/dist/esm/ion-breadcrumb.entry.js +1 -1
- package/dist/esm/ion-button.entry.js +125 -0
- package/dist/esm/ion-card_2.entry.js +86 -0
- package/dist/esm/ion-checkbox_4.entry.js +353 -0
- package/dist/esm/ion-col_3.entry.js +153 -0
- package/dist/esm/ion-content_2.entry.js +2 -2
- package/dist/esm/ion-datetime-button.entry.js +1 -1
- package/dist/esm/ion-datetime.entry.js +1 -1
- package/dist/esm/ion-fab-button.entry.js +1 -1
- package/dist/esm/ion-footer.entry.js +2 -2
- package/dist/esm/ion-icon_13.entry.js +1489 -0
- package/dist/esm/ion-img.entry.js +1 -1
- package/dist/esm/ion-infinite-scroll.entry.js +2 -2
- package/dist/esm/ion-input_2.entry.js +308 -0
- package/dist/esm/ion-item-options.entry.js +1 -1
- package/dist/esm/ion-item-sliding.entry.js +2 -2
- package/dist/esm/ion-label_2.entry.js +121 -0
- package/dist/esm/ion-loading.entry.js +3 -3
- package/dist/esm/ion-menu-button.entry.js +4 -4
- package/dist/esm/ion-menu-toggle.entry.js +4 -4
- package/dist/esm/ion-menu.entry.js +4 -4
- package/dist/esm/ion-modal.entry.js +6 -6
- package/dist/esm/ion-nav.entry.js +4 -4
- package/dist/esm/ion-picker-column-internal_2.entry.js +1 -1
- package/dist/esm/ion-picker-column.entry.js +1 -1
- package/dist/esm/ion-picker.entry.js +3 -3
- package/dist/esm/ion-progress-bar.entry.js +1 -1
- package/dist/esm/ion-refresher.entry.js +3 -3
- package/dist/esm/ion-reorder-group.entry.js +2 -2
- package/dist/esm/ion-router-outlet.entry.js +4 -4
- package/dist/esm/ion-router.entry.js +1 -1
- package/dist/esm/ion-searchbar.entry.js +1 -1
- package/dist/esm/ion-segment-button.entry.js +1 -1
- package/dist/esm/ion-segment.entry.js +1 -1
- package/dist/esm/ion-select_2.entry.js +2 -2
- package/dist/esm/ion-slides.entry.js +1 -1
- package/dist/esm/ion-spinner.entry.js +60 -0
- package/dist/esm/ion-tab.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +3 -3
- package/dist/esm/ion-toggle.entry.js +1 -1
- package/dist/esm/ion-virtual-scroll.entry.js +1 -1
- package/dist/esm/{ios.transition-131d64fe.js → ios.transition-3a6179bb.js} +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/match-path-36fdf5c7.js +499 -0
- package/dist/esm/{md.transition-f6126011.js → md.transition-cff16bf3.js} +3 -3
- package/dist/esm/{menu-toggle-util-bace8ae6.js → menu-toggle-util-59241733.js} +1 -1
- package/dist/esm/{overlays-3b4dca92.js → overlays-bdd9344a.js} +2 -2
- package/dist/esm/{purify-85bfcc69.js → purify-7085b248.js} +1 -1
- package/dist/esm/sparkle-animation-player.entry.js +1 -1
- package/dist/esm/sparkle-card_3.entry.js +85 -0
- package/dist/esm/sparkle-code.entry.js +1 -1
- package/dist/esm/sparkle-core.js +1 -1
- package/dist/esm/sparkle-course-root.entry.js +142 -0
- package/dist/esm/sparkle-dropdown.entry.js +57 -0
- package/dist/esm/{header-mobile-collapse_61.entry.js → sparkle-export-lessons_6.entry.js} +8859 -17690
- package/dist/esm/sparkle-facilitator-header_19.entry.js +2108 -0
- package/dist/esm/sparkle-facilitator-notes-form.entry.js +5 -5
- package/dist/esm/sparkle-feed-post.entry.js +1 -1
- package/dist/esm/sparkle-feedback.entry.js +6 -5
- package/dist/esm/sparkle-goal-form.entry.js +6 -6
- package/dist/esm/sparkle-goal-progress.entry.js +15 -0
- package/dist/esm/sparkle-gww-item.entry.js +70 -0
- package/dist/esm/sparkle-menu-collapsible.entry.js +1 -1
- package/dist/esm/sparkle-menu-toggle_3.entry.js +230 -0
- package/dist/esm/sparkle-validation-error.entry.js +17 -0
- package/dist/esm/{status-tap-dde52787.js → status-tap-463d0f87.js} +2 -2
- package/dist/esm/stencil-router-redirect.entry.js +28 -0
- package/dist/esm/{student.service-0746418b.js → student.service-e6eb1f99.js} +3 -19
- package/dist/esm/{swipe-back-7847a0c1.js → swipe-back-f8765ac9.js} +1 -1
- package/dist/esm/user.store-b8645067.js +19 -0
- package/dist/esm/{util-6ef753e9.js → util-a831d09d.js} +1 -1
- package/dist/sparkle-core/index.esm.js +1 -1
- package/dist/sparkle-core/{p-2c1ca854.entry.js → p-014b5707.entry.js} +1 -1
- package/dist/sparkle-core/p-03585916.js +1 -0
- package/dist/sparkle-core/{p-cabfbf22.entry.js → p-0bb0cf41.entry.js} +1 -1
- package/dist/sparkle-core/{p-30b810d1.entry.js → p-0c0f8acd.entry.js} +1 -1
- package/dist/sparkle-core/{p-de4deb61.entry.js → p-0ea2518d.entry.js} +1 -1
- package/dist/sparkle-core/p-1019ebc3.js +1 -0
- package/dist/sparkle-core/p-1728ead7.js +1 -0
- package/dist/sparkle-core/{p-d68092b7.js → p-17eb4633.js} +1 -1
- package/dist/sparkle-core/{p-e686d8b5.entry.js → p-1f0b3ff9.entry.js} +1 -1
- package/dist/sparkle-core/{p-a102341e.entry.js → p-25e556cc.entry.js} +1 -1
- package/dist/sparkle-core/{p-0c3f3ea6.entry.js → p-285ab4ed.entry.js} +1 -1
- package/dist/sparkle-core/{p-c60b29bd.entry.js → p-2d4a5ddf.entry.js} +2 -2
- package/dist/sparkle-core/{p-641bfc92.entry.js → p-2e035338.entry.js} +1 -1
- package/dist/sparkle-core/{p-2ff67662.js → p-2e2b813c.js} +2 -2
- package/dist/sparkle-core/{p-6ffd2420.entry.js → p-2f10208d.entry.js} +1 -1
- package/dist/sparkle-core/{p-b5f3e1bf.entry.js → p-2fba9a3a.entry.js} +1 -1
- package/dist/sparkle-core/{p-b3f375fb.entry.js → p-317037de.entry.js} +1 -1
- package/dist/sparkle-core/p-32762a44.entry.js +1 -0
- package/dist/sparkle-core/{p-2f569553.js → p-340754ed.js} +1 -1
- package/dist/sparkle-core/p-3bc68dd0.js +1 -0
- package/dist/sparkle-core/p-3c133235.entry.js +1 -0
- package/dist/sparkle-core/{p-48f72e63.js → p-3f85e1ca.js} +2 -2
- package/dist/sparkle-core/{p-2033cd86.js → p-405f7c58.js} +2 -2
- package/dist/sparkle-core/{p-9ebf0537.entry.js → p-4320dac0.entry.js} +1 -1
- package/dist/sparkle-core/{p-e863bf1d.entry.js → p-44f813b7.entry.js} +1 -1
- package/dist/sparkle-core/p-46869031.entry.js +1 -0
- package/dist/sparkle-core/p-4a5f2b2b.js +1 -0
- package/dist/sparkle-core/{p-894ff7e6.entry.js → p-4ae75caa.entry.js} +1 -1
- package/dist/sparkle-core/{p-935e7cfc.js → p-4bd4dab2.js} +1 -1
- package/dist/sparkle-core/{p-00d10dc9.js → p-539bf742.js} +2 -2
- package/dist/sparkle-core/p-53bcbd1d.js +1 -0
- package/dist/sparkle-core/p-54ada5e3.entry.js +1 -0
- package/dist/sparkle-core/{p-9289cdbc.entry.js → p-5519d283.entry.js} +1 -1
- package/dist/sparkle-core/p-554da5b8.entry.js +1 -0
- package/dist/sparkle-core/{p-e8073714.js → p-56a2e8a2.js} +1 -1
- package/dist/sparkle-core/p-5da2d95a.entry.js +1 -0
- package/dist/sparkle-core/{p-b0603d19.js → p-5fc26938.js} +1 -1
- package/dist/sparkle-core/{p-ebd4354b.entry.js → p-63f69cdc.entry.js} +1 -1
- package/dist/sparkle-core/{p-11356b03.entry.js → p-64e814b9.entry.js} +1 -1
- package/dist/sparkle-core/{p-ce4b22f7.entry.js → p-66a85393.entry.js} +1 -1
- package/dist/sparkle-core/p-6b05a1d3.entry.js +1 -0
- package/dist/sparkle-core/p-6c894fa2.entry.js +1 -0
- package/dist/sparkle-core/p-6ea246fe.js +4 -0
- package/dist/sparkle-core/p-6ed0236e.entry.js +1 -0
- package/dist/sparkle-core/{p-54dd894f.entry.js → p-6f0545b3.entry.js} +1 -1
- package/dist/sparkle-core/{p-0f1c5899.entry.js → p-727e1c28.entry.js} +1 -1
- package/dist/sparkle-core/{p-b96f3c84.entry.js → p-82ad4e7c.entry.js} +2 -2
- package/dist/sparkle-core/p-91accfc1.js +1 -0
- package/dist/sparkle-core/{p-af3cc111.entry.js → p-93e74f1b.entry.js} +1 -1
- package/dist/sparkle-core/{p-86ed13f0.js → p-a019ad0c.js} +1 -1
- package/dist/sparkle-core/p-a5c5da9a.entry.js +1 -0
- package/dist/sparkle-core/{p-1d4c7c11.js → p-a85598ad.js} +1 -1
- package/dist/sparkle-core/p-a8a77bec.entry.js +1 -0
- package/dist/sparkle-core/{p-bd80ff43.js → p-ad102371.js} +1 -1
- package/dist/sparkle-core/{p-377b04c2.entry.js → p-b236d258.entry.js} +1 -1
- package/dist/sparkle-core/{p-9abbd715.entry.js → p-b4b01fa2.entry.js} +1 -1
- package/dist/sparkle-core/{p-6faa194c.entry.js → p-b4bc8b02.entry.js} +1 -1
- package/dist/sparkle-core/{p-0fa3fd63.entry.js → p-b5ec8fb0.entry.js} +1 -1
- package/dist/sparkle-core/{p-fb757951.entry.js → p-b83444c7.entry.js} +1 -1
- package/dist/sparkle-core/{p-05c032dd.js → p-b9933822.js} +1 -1
- package/dist/sparkle-core/{p-0afa3a4d.entry.js → p-b9b1d4da.entry.js} +1 -1
- package/dist/sparkle-core/{p-3de0e00c.js → p-be28346b.js} +1 -1
- package/dist/sparkle-core/{p-0ad5c123.entry.js → p-c278db5f.entry.js} +1 -1
- package/dist/sparkle-core/{p-fb0ca75e.entry.js → p-c2bbaf55.entry.js} +1 -1
- package/dist/sparkle-core/p-c4af184b.entry.js +1 -0
- package/dist/sparkle-core/p-c71cbbf7.entry.js +1 -0
- package/dist/sparkle-core/p-c8c73fa7.js +4 -0
- package/dist/sparkle-core/{p-1e125ca5.entry.js → p-c8fe45df.entry.js} +1 -1
- package/dist/sparkle-core/{p-600cf6a3.js → p-c9cd4ff1.js} +1 -1
- package/dist/sparkle-core/{p-5cad23f1.js → p-ca4c8a10.js} +1 -1
- package/dist/sparkle-core/{p-1e4f65ee.entry.js → p-cab3da3c.entry.js} +1 -1
- package/dist/sparkle-core/p-cd832fbf.entry.js +1 -0
- package/dist/sparkle-core/{p-564e64fc.entry.js → p-ce94efdb.entry.js} +1 -1
- package/dist/sparkle-core/p-d0ac5f17.js +1 -0
- package/dist/sparkle-core/p-d1fcbfc2.js +4 -0
- package/dist/sparkle-core/p-d432d3ac.entry.js +1 -0
- package/dist/sparkle-core/{p-fbccd30c.js → p-d81a0680.js} +1 -1
- package/dist/sparkle-core/p-d969f7d0.entry.js +348 -0
- package/dist/sparkle-core/{p-0664370b.entry.js → p-dabc80c4.entry.js} +1 -1
- package/dist/sparkle-core/{p-58e4bbe5.entry.js → p-db8387eb.entry.js} +1 -1
- package/dist/sparkle-core/p-dca90a55.entry.js +4 -0
- package/dist/sparkle-core/p-dd2e7f84.js +4 -0
- package/dist/sparkle-core/p-e0429a19.entry.js +1 -0
- package/dist/sparkle-core/{p-24cb9a33.entry.js → p-e65c72cc.entry.js} +1 -1
- package/dist/sparkle-core/p-e7066c64.entry.js +1 -0
- package/dist/sparkle-core/{p-9d894ed4.js → p-e7568d4b.js} +1 -1
- package/dist/sparkle-core/p-eb40a191.entry.js +1 -0
- package/dist/sparkle-core/p-ecdea569.entry.js +1 -0
- package/dist/sparkle-core/{p-74864276.entry.js → p-ed9f48c4.entry.js} +1 -1
- package/dist/sparkle-core/p-ef6c2352.entry.js +1 -0
- package/dist/sparkle-core/{p-be64105c.entry.js → p-f0cf4a8f.entry.js} +1 -1
- package/dist/sparkle-core/{p-c0533c23.entry.js → p-f4b0b6a4.entry.js} +1 -1
- package/dist/sparkle-core/{p-ef4edc48.entry.js → p-fc965b88.entry.js} +1 -1
- package/dist/sparkle-core/{p-590266d6.entry.js → p-fd430a82.entry.js} +1 -1
- package/dist/sparkle-core/{p-39712c56.entry.js → p-fde382f0.entry.js} +1 -1
- package/dist/sparkle-core/sparkle-core.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/sparkle-quiz-feedback_5.cjs.entry.js +0 -117
- package/dist/cjs/sparkle-quiz.cjs.entry.js +0 -119
- package/dist/cjs/student.service-2e58f237.js +0 -78
- package/dist/esm/sparkle-quiz-feedback_5.entry.js +0 -109
- package/dist/esm/sparkle-quiz.entry.js +0 -115
- package/dist/sparkle-core/p-077c732b.js +0 -4
- package/dist/sparkle-core/p-12dd96d7.js +0 -4
- package/dist/sparkle-core/p-23aca7ca.js +0 -4
- package/dist/sparkle-core/p-3a965828.entry.js +0 -1
- package/dist/sparkle-core/p-462bffba.js +0 -1
- package/dist/sparkle-core/p-5efc6566.js +0 -1
- package/dist/sparkle-core/p-73721c84.js +0 -4
- package/dist/sparkle-core/p-80d6b0e6.entry.js +0 -1
- package/dist/sparkle-core/p-8492a765.entry.js +0 -1
- package/dist/sparkle-core/p-c3cadfc6.entry.js +0 -1
- package/dist/sparkle-core/p-eaf76d1d.entry.js +0 -352
@@ -1,78 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
const httpService = require('./httpService-7211d93b.js');
|
4
|
-
const auth_store = require('./auth.store-1e630a7d.js');
|
5
|
-
|
6
|
-
const { state, onChange, reset } = auth_store.createStore({
|
7
|
-
user: {
|
8
|
-
FirstName: '',
|
9
|
-
LastName: '',
|
10
|
-
ProfileText: '',
|
11
|
-
ProfileImage: '',
|
12
|
-
IsVerified: false,
|
13
|
-
Roles: [],
|
14
|
-
FacilitatorClassList: []
|
15
|
-
},
|
16
|
-
loaded: false,
|
17
|
-
updateLoading: false,
|
18
|
-
enrollmentList: [],
|
19
|
-
});
|
20
|
-
const userStore = { state, onChange, reset };
|
21
|
-
|
22
|
-
class StudentService {
|
23
|
-
constructor() { }
|
24
|
-
static getInstance() {
|
25
|
-
if (!StudentService.instance) {
|
26
|
-
StudentService.instance = new StudentService();
|
27
|
-
}
|
28
|
-
return StudentService.instance;
|
29
|
-
}
|
30
|
-
async enrollClass(enrollInput) {
|
31
|
-
let result = await httpService.HttpService.http.post('api/v1/Student/EnrollClass', enrollInput);
|
32
|
-
if (result) {
|
33
|
-
userStore.state.enrollmentList = [
|
34
|
-
...userStore.state.enrollmentList,
|
35
|
-
result.Data
|
36
|
-
];
|
37
|
-
}
|
38
|
-
return result;
|
39
|
-
}
|
40
|
-
async leaveClass(leaveInput) {
|
41
|
-
let result = await httpService.HttpService.http.post('api/v1/Student/LeaveClass', leaveInput);
|
42
|
-
if (result) {
|
43
|
-
userStore.state.enrollmentList = userStore.state.enrollmentList.filter((item) => item.Id != result.Data);
|
44
|
-
}
|
45
|
-
return result;
|
46
|
-
}
|
47
|
-
async fetchUserConfiguration() {
|
48
|
-
let result = await httpService.HttpService.http.get('api/v1/Student/UserConfiguration');
|
49
|
-
if (result) {
|
50
|
-
userStore.state.enrollmentList = result.Data.EnrollmentList;
|
51
|
-
userStore.state.user.FirstName = result.Data.FirstName;
|
52
|
-
userStore.state.user.LastName = result.Data.LastName;
|
53
|
-
userStore.state.user.ProfileText = result.Data.ProfileText;
|
54
|
-
userStore.state.user.ProfileImage = result.Data.ProfileImage;
|
55
|
-
userStore.state.user.IsVerified = result.Data.IsVerified;
|
56
|
-
userStore.state.user.Roles = result.Data.Roles;
|
57
|
-
userStore.state.user.FacilitatorClassList = result.Data.FacilitatorClassList;
|
58
|
-
}
|
59
|
-
return result;
|
60
|
-
}
|
61
|
-
async updateProfile(updateProfileInput) {
|
62
|
-
userStore.state.updateLoading = true;
|
63
|
-
let result = await httpService.HttpService.http.post('api/Account/update-profile', updateProfileInput);
|
64
|
-
console.log('after fetch', result);
|
65
|
-
if (result) {
|
66
|
-
userStore.state.updateLoading = false;
|
67
|
-
userStore.state.user = Object.assign(Object.assign({}, userStore.state.user), { FirstName: result.Data.FirstName, LastName: result.Data.LastName, ProfileText: result.Data.ProfileText, ProfileImage: result.Data.ProfileImage });
|
68
|
-
}
|
69
|
-
return result;
|
70
|
-
}
|
71
|
-
async submitFeedback(feedbackInput) {
|
72
|
-
let result = await httpService.HttpService.http.post('api/v1/Feedback', feedbackInput);
|
73
|
-
return result;
|
74
|
-
}
|
75
|
-
}
|
76
|
-
|
77
|
-
exports.StudentService = StudentService;
|
78
|
-
exports.userStore = userStore;
|
@@ -1,109 +0,0 @@
|
|
1
|
-
import { r as registerInstance, i as createEvent, h, H as Host, e as getElement } from './index-c04b9ed5.js';
|
2
|
-
|
3
|
-
function GetSelectOptionId(questionId, index) {
|
4
|
-
return "question-" + questionId + "-option-" + index;
|
5
|
-
}
|
6
|
-
|
7
|
-
const sparkleQuizFeedbackCss = ":host{display:block}";
|
8
|
-
|
9
|
-
const SparkleQuizFeedback = class {
|
10
|
-
constructor(hostRef) {
|
11
|
-
registerInstance(this, hostRef);
|
12
|
-
this.quizFeedbackChange = createEvent(this, "quizFeedbackChange", 7);
|
13
|
-
this.displayOptions = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
14
|
-
}
|
15
|
-
render() {
|
16
|
-
return (h(Host, { class: "quiz__feedback" }, h("div", { class: "question-container" }, h("div", { class: "question-text" }, this.question.questionText), h("div", null, this.displayOptions.map((option, index) => h("div", { class: "option" }, h("input", { type: "radio", id: GetSelectOptionId(this.question.questionId, index), name: "question-" + this.question.questionId, value: option, onChange: (e) => this.quizFeedbackChange.emit({ value: e.target.value, question: this.question }) }), h("label", { htmlFor: GetSelectOptionId(this.question.questionId, index) }, h("span", { class: "number" }, this.displayOptions[index]), " ", option), h("br", null)))))));
|
17
|
-
}
|
18
|
-
};
|
19
|
-
SparkleQuizFeedback.style = sparkleQuizFeedbackCss;
|
20
|
-
|
21
|
-
const sparkleQuizInputCss = ":host{display:block}";
|
22
|
-
|
23
|
-
const SparkleQuizInput = class {
|
24
|
-
constructor(hostRef) {
|
25
|
-
registerInstance(this, hostRef);
|
26
|
-
this.quizInputChange = createEvent(this, "quizInputChange", 7);
|
27
|
-
}
|
28
|
-
render() {
|
29
|
-
return (h(Host, { class: "quiz__input" }, h("div", { class: "question-container" }, h("label", { htmlFor: "question-" + this.question.questionId, class: "form-label" }, this.question.questionText), h("input", { type: "text", class: "form-control", id: "question-" + this.question.questionId, name: "question-" + this.question.questionId, onInput: (e) => this.quizInputChange.emit({ value: e.target.value, question: this.question }) }))));
|
30
|
-
}
|
31
|
-
};
|
32
|
-
SparkleQuizInput.style = sparkleQuizInputCss;
|
33
|
-
|
34
|
-
const sparkleQuizOpinionCss = "sparkle-quiz-opinion .scale{display:flex;justify-content:space-between}sparkle-quiz-opinion .scale>p{margin:0}sparkle-quiz-opinion .scale>p.selected{color:var(--ion-color-primary)}sparkle-quiz-opinion ion-icon{font-size:30px}sparkle-quiz-opinion .icon-group{min-width:70px;text-align:right;padding-right:10px}";
|
35
|
-
|
36
|
-
const SparkleQuizOpinion = class {
|
37
|
-
constructor(hostRef) {
|
38
|
-
registerInstance(this, hostRef);
|
39
|
-
this.quizOpinionChange = createEvent(this, "quizOpinionChange", 7);
|
40
|
-
this.fivePointsDisplayOptions = ['Strongly agree', 'Agree', 'Not sure', 'Disagree', 'Strongly disagree'];
|
41
|
-
this.tenPointsDisplayOptions = ["Never",
|
42
|
-
"Never",
|
43
|
-
"Sometimes",
|
44
|
-
"Sometimes",
|
45
|
-
"Half of the time",
|
46
|
-
"Half of the time",
|
47
|
-
"Most of the time",
|
48
|
-
"Most of the time",
|
49
|
-
"Always",
|
50
|
-
"Always",
|
51
|
-
"Always"];
|
52
|
-
this.tenPointsDefaultValue = 5;
|
53
|
-
}
|
54
|
-
optionChanged(index, answer) {
|
55
|
-
this.selectedIndex = index;
|
56
|
-
this.quizOpinionChange.emit({ value: answer, question: this.question });
|
57
|
-
}
|
58
|
-
renderFivePointScale() {
|
59
|
-
return (this.fivePointsDisplayOptions.map((option, index) => h("div", { class: "option" }, h("input", { id: GetSelectOptionId(this.question.questionId, index), type: "radio", name: "question-" + this.question.questionId, value: option, onChange: (e) => this.optionChanged(index, this.fivePointsDisplayOptions[index]) }), h("label", { htmlFor: GetSelectOptionId(this.question.questionId, index) }, h("span", { class: "number" }, index + 1), option), h("br", null))));
|
60
|
-
}
|
61
|
-
renderTenPointScale() {
|
62
|
-
return (h("div", null, h("ion-item", null, h("ion-range", { class: "opinion-range", onIonChange: (e) => this.optionChanged(+e.detail.value, this.tenPointsDisplayOptions[+e.detail.value]), min: 0, max: 10, value: this.tenPointsDefaultValue, step: 1, pin: true, snaps: true }, h("ion-icon", { size: "small", slot: "start", name: "star-outline" }), h("ion-icon", { slot: "end", name: "star" }))), h("div", { class: "scale" }, h("p", null, "Never"), h("p", { class: "selected" }, this.tenPointsDisplayOptions[this.selectedIndex] || this.tenPointsDisplayOptions[this.tenPointsDefaultValue]), h("p", null, "Always")), h("br", null), h("hr", null)));
|
63
|
-
}
|
64
|
-
render() {
|
65
|
-
return (h(Host, { class: "quiz__opinion" }, h("div", { class: "opinion-container" }, h("div", { class: "question-text" }, this.question.questionText), h("div", null, this.question.scale == "FIVE-POINTS" && this.renderFivePointScale(), this.question.scale == "TEN-POINTS" && this.renderTenPointScale()))));
|
66
|
-
}
|
67
|
-
get el() { return getElement(this); }
|
68
|
-
};
|
69
|
-
SparkleQuizOpinion.style = sparkleQuizOpinionCss;
|
70
|
-
|
71
|
-
const sparkleQuizPollCss = ":host{display:block}";
|
72
|
-
|
73
|
-
const SparkleQuizPoll = class {
|
74
|
-
constructor(hostRef) {
|
75
|
-
registerInstance(this, hostRef);
|
76
|
-
this.quizInputChange = createEvent(this, "quizInputChange", 7);
|
77
|
-
}
|
78
|
-
render() {
|
79
|
-
return (h(Host, { class: "quiz__input" }, h("div", { class: "question-container" }, h("label", { htmlFor: "question-" + this.question.questionId, class: "form-label" }, this.question.questionText), h("input", { type: "text", class: "form-control", id: "question-" + this.question.questionId, name: "question-" + this.question.questionId, onInput: (e) => this.quizInputChange.emit({ value: e.target.value, question: this.question }) }))));
|
80
|
-
}
|
81
|
-
};
|
82
|
-
SparkleQuizPoll.style = sparkleQuizPollCss;
|
83
|
-
|
84
|
-
const sparkleQuizSelectCss = ":host{display:block}";
|
85
|
-
|
86
|
-
const SparkleQuizSelect = class {
|
87
|
-
constructor(hostRef) {
|
88
|
-
registerInstance(this, hostRef);
|
89
|
-
this.quizSelectChange = createEvent(this, "quizSelectChange", 7);
|
90
|
-
this.allowMultiple = false;
|
91
|
-
this.values = [];
|
92
|
-
this.displayOptions = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
|
93
|
-
}
|
94
|
-
optionChanged(e) {
|
95
|
-
if (e.target.checked) {
|
96
|
-
this.values = [...this.values, e.target.value];
|
97
|
-
}
|
98
|
-
else {
|
99
|
-
this.values = this.values.filter(x => x !== e.target.value);
|
100
|
-
}
|
101
|
-
this.quizSelectChange.emit({ value: this.values, question: this.question });
|
102
|
-
}
|
103
|
-
render() {
|
104
|
-
return (h(Host, { class: "quiz__select" }, h("div", { class: "question-container" }, h("div", { class: "question-text" }, this.question.questionText), h("div", null, this.question.options.map((option, index) => h("div", { class: "option" }, h("input", { type: this.allowMultiple ? "checkbox" : "radio", id: GetSelectOptionId(this.question.questionId, index), name: "question-" + this.question.questionId, value: option.option, onChange: (e) => this.optionChanged(e) }), h("label", { htmlFor: GetSelectOptionId(this.question.questionId, index) }, h("span", { class: "number" }, this.displayOptions[index]), option.option), h("br", null)))))));
|
105
|
-
}
|
106
|
-
};
|
107
|
-
SparkleQuizSelect.style = sparkleQuizSelectCss;
|
108
|
-
|
109
|
-
export { SparkleQuizFeedback as sparkle_quiz_feedback, SparkleQuizInput as sparkle_quiz_input, SparkleQuizOpinion as sparkle_quiz_opinion, SparkleQuizPoll as sparkle_quiz_poll, SparkleQuizSelect as sparkle_quiz_select };
|
@@ -1,115 +0,0 @@
|
|
1
|
-
import { r as registerInstance, i as createEvent, h, e as getElement } from './index-c04b9ed5.js';
|
2
|
-
|
3
|
-
const sparkleQuizCss = "sparkle-quiz{display:block;font-family:var(--font-family);--sparkle-quiz-question-container-padding:10px 0px;--sparkle-quiz-question-container-margin:0px;--sparkle-quiz-question-text-padding:10px 0px;--sparkle-quiz-option-border:2px solid var(--line-rule-color);--sparkle-quiz-selected-option-border:2px solid var(--text-color--dark);--sparkle-quiz-option-border-radius:4px;--sparkle-quiz-option-padding:5px 10px;--sparkle-quiz-option-width:100%;--sparkle-quiz-error-bg-color:#fbaeae;--sparkle-quiz-success-bg-color:#fbaeae;padding:var(--sparkle-quiz-question-container-padding);margin:var(--sparkle-quiz-question-container-margin)}.question-text{padding:var(--sparkle-quiz-question-text-padding)}.option{padding:5px 0px}.number{padding:0px 14px;border:1px solid #ebebeb;border-radius:4px;margin-right:10px;font-size:14px;width:14px;display:inline-flex;justify-content:center}.feedback-container{padding:10px;border-radius:4px}.incorrect .feedback-container{background-color:var(--sparkle-quiz-error-bg-color, #fbaeae)}.correct .feedback-container{background-color:var(--sparkle-quiz-success-bg-color, #fbaeae)}";
|
4
|
-
|
5
|
-
const SparkleQuiz = class {
|
6
|
-
constructor(hostRef) {
|
7
|
-
registerInstance(this, hostRef);
|
8
|
-
this.quizAnswerChanged = createEvent(this, "quizAnswerChanged", 7);
|
9
|
-
this.type = 'TEXT';
|
10
|
-
this.scale = 'FIVE-POINTS';
|
11
|
-
this.options = [];
|
12
|
-
}
|
13
|
-
// private pageInfo: any;
|
14
|
-
// @Watch('questionId')
|
15
|
-
// async loadQuestion() {
|
16
|
-
// if (this.quizData) {
|
17
|
-
// this.question = this.quizData[+this.questionId];
|
18
|
-
// }
|
19
|
-
// }
|
20
|
-
//@State() question: SparkleQuizQuestion;
|
21
|
-
//@State() quizData: { [key: string]: SparkleQuizQuestion };
|
22
|
-
async componentWillLoad() { }
|
23
|
-
async componentDidLoad() {
|
24
|
-
this.options = [];
|
25
|
-
if (this.el.querySelector("[slot='options']")) {
|
26
|
-
Array.from(this.el.querySelector("[slot='options']").querySelectorAll('option')).forEach(el => {
|
27
|
-
this.options = [...this.options, { option: el.innerText }];
|
28
|
-
});
|
29
|
-
}
|
30
|
-
this.quizAnswerChanged.emit({
|
31
|
-
question: null,
|
32
|
-
answer: '1',
|
33
|
-
});
|
34
|
-
}
|
35
|
-
quizInputChangeHandler(event) {
|
36
|
-
this.quizAnswerChanged.emit({
|
37
|
-
question: event.detail.question,
|
38
|
-
answer: event.detail.value,
|
39
|
-
});
|
40
|
-
}
|
41
|
-
quizFeedbackChangeHandler(event) {
|
42
|
-
this.quizAnswerChanged.emit({
|
43
|
-
question: event.detail.question,
|
44
|
-
answer: event.detail.value,
|
45
|
-
});
|
46
|
-
}
|
47
|
-
quizSelectChangeHandler(event) {
|
48
|
-
this.quizAnswerChanged.emit({
|
49
|
-
question: event.detail.question,
|
50
|
-
answer: event.detail.value,
|
51
|
-
});
|
52
|
-
}
|
53
|
-
quizOpinionChangeHandler(event) {
|
54
|
-
this.quizAnswerChanged.emit({
|
55
|
-
question: event.detail.question,
|
56
|
-
answer: event.detail.value,
|
57
|
-
});
|
58
|
-
}
|
59
|
-
getQuestionFeedback() {
|
60
|
-
if (this.type == 'MULTIPLE-CHOICE') {
|
61
|
-
// const feedbacks = this.question.options.filter(x => x.correct == true).map(x => x.feedback);
|
62
|
-
// return feedbacks.length > 0 && feedbacks.map(feedback => <small>{feedback}</small>);
|
63
|
-
return h("small", null);
|
64
|
-
}
|
65
|
-
else if (this.type == 'FEEDBACK' || this.type == 'TEXT') {
|
66
|
-
return this.feedback && h("small", null, " ", this.feedback);
|
67
|
-
}
|
68
|
-
}
|
69
|
-
showAnswerStatus() {
|
70
|
-
return h("div", null, this.correct ? h("strong", null, "Good job!") : h("strong", null, "Incorrect answer, please try again."));
|
71
|
-
}
|
72
|
-
renderQuestion() {
|
73
|
-
var question = {
|
74
|
-
questionId: this.questionId,
|
75
|
-
questionText: this.questionText,
|
76
|
-
questionType: this.type,
|
77
|
-
scale: this.scale,
|
78
|
-
showOptionNumber: this.showOptionNumber,
|
79
|
-
options: this.options,
|
80
|
-
//options: Array<SparkleQuizQuestionOption>;
|
81
|
-
feedback: this.feedback,
|
82
|
-
};
|
83
|
-
if (this.type == 'MULTIPLE-CHOICE') {
|
84
|
-
return h("sparkle-quiz-select", { question: question, allowMultiple: true });
|
85
|
-
}
|
86
|
-
else if (this.type == 'FEEDBACK') {
|
87
|
-
return h("sparkle-quiz-feedback", { question: question });
|
88
|
-
}
|
89
|
-
else if (this.type == 'TEXT') {
|
90
|
-
return h("sparkle-quiz-input", { question: question });
|
91
|
-
}
|
92
|
-
else if (this.type == 'OPINION') {
|
93
|
-
return h("sparkle-quiz-opinion", { question: question });
|
94
|
-
}
|
95
|
-
else if (this.type == 'POLL') {
|
96
|
-
return h("sparkle-quiz-poll", { question: question });
|
97
|
-
}
|
98
|
-
}
|
99
|
-
render() {
|
100
|
-
if (this.questionText) {
|
101
|
-
let classes = {
|
102
|
-
correct: this.submitted && this.correct,
|
103
|
-
incorrect: this.submitted && !this.correct,
|
104
|
-
};
|
105
|
-
return (h("div", { class: classes, ref: el => (this.containerRef = el) }, h("div", null, h("slot", null)), this.renderQuestion(), this.submitted && this.showInstantResult && h("div", { class: "feedback-container" }, [this.showAnswerStatus(), this.getQuestionFeedback()])));
|
106
|
-
}
|
107
|
-
else {
|
108
|
-
return h("p", null, "No question found.");
|
109
|
-
}
|
110
|
-
}
|
111
|
-
get el() { return getElement(this); }
|
112
|
-
};
|
113
|
-
SparkleQuiz.style = sparkleQuizCss;
|
114
|
-
|
115
|
-
export { SparkleQuiz as sparkle_quiz };
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import{j as o,w as s}from"./p-ee1e0eb4.js";import{f as t,s as r}from"./p-bd80ff43.js";import{c as a}from"./p-d68092b7.js";import"./p-a208ab2d.js";
|
2
|
-
/*!
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
4
|
-
*/const e=()=>{const e=window;e.addEventListener("statusTap",(()=>{o((()=>{const o=document.elementFromPoint(e.innerWidth/2,e.innerHeight/2);if(!o)return;const n=t(o);n&&new Promise((o=>a(n,o))).then((()=>{s((async()=>{n.style.setProperty("--overflow","hidden"),await r(n,300),n.style.removeProperty("--overflow")}))}))}))}))};export{e as startStatusTap}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import{u as t,q as e}from"./p-d68092b7.js";
|
2
|
-
/*!
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
4
|
-
*/const o=o=>{let f,d,l,p=10*-u,m=0;const v=o.getBoolean("animated",!0)&&o.getBoolean("rippleEffect",!0),h=new WeakMap,w=e=>{p=t(e),x(e)},T=()=>{clearTimeout(l),l=void 0,f&&(k(!1),f=void 0)},b=t=>{f||D(i(t),t)},x=t=>{D(void 0,t)},D=(t,o)=>{if(t&&t===f)return;clearTimeout(l),l=void 0;const{x:i,y:r}=e(o);if(f){if(h.has(f))throw new Error("internal error");f.classList.contains(c)||E(f,i,r),k(!0)}if(t){const e=h.get(t);e&&(clearTimeout(e),h.delete(t));const o=n(t)?0:a;t.classList.remove(c),l=setTimeout((()=>{E(t,i,r),l=void 0}),o)}f=t},E=(t,e,o)=>{m=Date.now(),t.classList.add(c);const i=v&&r(t);i&&i.addRipple&&(j(),d=i.addRipple(e,o))},j=()=>{void 0!==d&&(d.then((t=>t())),d=void 0)},k=t=>{j();const e=f;if(!e)return;const o=s-Date.now()+m;if(t&&o>0&&!n(e)){const t=setTimeout((()=>{e.classList.remove(c),h.delete(e)}),s);h.set(e,t)}else e.classList.remove(c)},q=document;q.addEventListener("ionGestureCaptured",T),q.addEventListener("touchstart",(e=>{p=t(e),b(e)}),!0),q.addEventListener("touchcancel",w,!0),q.addEventListener("touchend",w,!0),q.addEventListener("pointercancel",T,!0),q.addEventListener("mousedown",(e=>{if(2===e.button)return;const o=t(e)-u;p<o&&b(e)}),!0),q.addEventListener("mouseup",(e=>{const o=t(e)-u;p<o&&x(e)}),!0)},i=t=>{if(!t.composedPath)return t.target.closest(".ion-activatable");{const e=t.composedPath();for(let t=0;t<e.length-2;t++){const o=e[t];if(!(o instanceof ShadowRoot)&&o.classList.contains("ion-activatable"))return o}}},n=t=>t.classList.contains("ion-activatable-instant"),r=t=>{if(t.shadowRoot){const e=t.shadowRoot.querySelector("ion-ripple-effect");if(e)return e}return t.querySelector("ion-ripple-effect")},c="ion-activated",a=200,s=200,u=2500;export{o as startTapClick}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import{c as t}from"./p-48f72e63.js";import{g as o}from"./p-00d10dc9.js";import"./p-d68092b7.js";import"./p-ee1e0eb4.js";
|
2
|
-
/*!
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
4
|
-
*/const r=(r,e)=>{const i="back"===e.direction,a=e.leavingEl,s=o(e.enteringEl),p=s.querySelector("ion-toolbar"),n=t();if(n.addElement(s).fill("both").beforeRemoveClass("ion-page-invisible"),i?n.duration(e.duration||200).easing("cubic-bezier(0.47,0,0.745,0.715)"):n.duration(e.duration||280).easing("cubic-bezier(0.36,0.66,0.04,1)").fromTo("transform","translateY(40px)","translateY(0px)").fromTo("opacity",.01,1),p){const o=t();o.addElement(p),n.addAnimation(o)}if(a&&i){n.duration(e.duration||200).easing("cubic-bezier(0.47,0,0.745,0.715)");const r=t();r.addElement(o(a)).onFinish((t=>{1===t&&r.elements.length>0&&r.elements[0].style.setProperty("display","none")})).fromTo("transform","translateY(0px)","translateY(40px)").fromTo("opacity",1,0),n.addAnimation(r)}return n};export{r as mdTransitionAnimation}
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as i,i as e,h as s,e as t}from"./p-ee1e0eb4.js";const n=class{constructor(s){i(this,s),this.quizAnswerChanged=e(this,"quizAnswerChanged",7),this.type="TEXT",this.scale="FIVE-POINTS",this.options=[]}async componentWillLoad(){}async componentDidLoad(){this.options=[],this.el.querySelector("[slot='options']")&&Array.from(this.el.querySelector("[slot='options']").querySelectorAll("option")).forEach((i=>{this.options=[...this.options,{option:i.innerText}]})),this.quizAnswerChanged.emit({question:null,answer:"1"})}quizInputChangeHandler(i){this.quizAnswerChanged.emit({question:i.detail.question,answer:i.detail.value})}quizFeedbackChangeHandler(i){this.quizAnswerChanged.emit({question:i.detail.question,answer:i.detail.value})}quizSelectChangeHandler(i){this.quizAnswerChanged.emit({question:i.detail.question,answer:i.detail.value})}quizOpinionChangeHandler(i){this.quizAnswerChanged.emit({question:i.detail.question,answer:i.detail.value})}getQuestionFeedback(){return"MULTIPLE-CHOICE"==this.type?s("small",null):"FEEDBACK"==this.type||"TEXT"==this.type?this.feedback&&s("small",null," ",this.feedback):void 0}showAnswerStatus(){return s("div",null,s("strong",null,this.correct?"Good job!":"Incorrect answer, please try again."))}renderQuestion(){var i={questionId:this.questionId,questionText:this.questionText,questionType:this.type,scale:this.scale,showOptionNumber:this.showOptionNumber,options:this.options,feedback:this.feedback};return"MULTIPLE-CHOICE"==this.type?s("sparkle-quiz-select",{question:i,allowMultiple:!0}):"FEEDBACK"==this.type?s("sparkle-quiz-feedback",{question:i}):"TEXT"==this.type?s("sparkle-quiz-input",{question:i}):"OPINION"==this.type?s("sparkle-quiz-opinion",{question:i}):"POLL"==this.type?s("sparkle-quiz-poll",{question:i}):void 0}render(){return this.questionText?s("div",{class:{correct:this.submitted&&this.correct,incorrect:this.submitted&&!this.correct},ref:i=>this.containerRef=i},s("div",null,s("slot",null)),this.renderQuestion(),this.submitted&&this.showInstantResult&&s("div",{class:"feedback-container"},[this.showAnswerStatus(),this.getQuestionFeedback()])):s("p",null,"No question found.")}get el(){return t(this)}};n.style="sparkle-quiz{display:block;font-family:var(--font-family);--sparkle-quiz-question-container-padding:10px 0px;--sparkle-quiz-question-container-margin:0px;--sparkle-quiz-question-text-padding:10px 0px;--sparkle-quiz-option-border:2px solid var(--line-rule-color);--sparkle-quiz-selected-option-border:2px solid var(--text-color--dark);--sparkle-quiz-option-border-radius:4px;--sparkle-quiz-option-padding:5px 10px;--sparkle-quiz-option-width:100%;--sparkle-quiz-error-bg-color:#fbaeae;--sparkle-quiz-success-bg-color:#fbaeae;padding:var(--sparkle-quiz-question-container-padding);margin:var(--sparkle-quiz-question-container-margin)}.question-text{padding:var(--sparkle-quiz-question-text-padding)}.option{padding:5px 0px}.number{padding:0px 14px;border:1px solid #ebebeb;border-radius:4px;margin-right:10px;font-size:14px;width:14px;display:inline-flex;justify-content:center}.feedback-container{padding:10px;border-radius:4px}.incorrect .feedback-container{background-color:var(--sparkle-quiz-error-bg-color, #fbaeae)}.correct .feedback-container{background-color:var(--sparkle-quiz-success-bg-color, #fbaeae)}";export{n as sparkle_quiz}
|
@@ -1 +0,0 @@
|
|
1
|
-
import{c as t,h as e}from"./p-ee1e0eb4.js";import{s as r,r as n,g as a}from"./p-5d409601.js";import{H as o}from"./p-1d4c7c11.js";import{A as s}from"./p-2f569553.js";const i=new class{constructor(){this.sample=t=>t[Math.floor(Math.random()*t.length)],this.keyBy=(t,e,r)=>t.reduce(((t,n)=>(t[e(n)]=r?r(n):n,t)),{}),this.debounce=(t,e)=>{let r=null;return(...n)=>{clearTimeout(r),r=setTimeout(t,e,...n)}}}loadScript(t){var e=document.createElement("script");e.type="text/javascript",e.src=t,document.body.appendChild(e)}loadScriptAsync(t){return new Promise((function(e,r){const n=document.createElement("script");let a=!1;n.type="text/javascript",n.src=t,n.async=!0,n.onerror=function(t){r(t)},n.onload=n.onreadystatechange=function(){a||this.readyState&&"complete"!=this.readyState||(a=!0,e(!0))};const o=document.getElementsByTagName("script")[0];o.parentElement.insertBefore(n,o)}))}extend(...t){let e,r,n,a,o,s,i,c=t[0]||{},l=1,u=t.length,p=!1;for("boolean"==typeof c&&(p=c,c=t[l]||{},l++),"object"!=typeof c&&"function"!=typeof c&&(c={}),l===u&&(c=this,l--);l<u;l++)if(null!==(e=t[l]))for(r in e)n=c[r],o=e[r],c!==o&&(a=Array.isArray(n)?"array":typeof n,p&&o&&((s=Array.isArray(o))||"object"==typeof o)?(s?(s=!1,i=n&&"array"===a?n:[]):i=n&&"object"===a?n:{},c[r]=this.extend(p,i,o)):void 0!==o&&(c[r]=o));return c}setLocalization(){if(!sparkle.utils.getCookieValue("Sparkle.Localization.CultureName")){let t=navigator.language;sparkle.utils.setCookieValue("Sparkle.Localization.CultureName",t,new Date((new Date).getTime()+15768e7),sparkle.appPath)}}};async function c(t){if(!window)return;const e=window,r=e.Sparkle;if(!r||!r.config||"Object"===r.config.constructor.name)return e.Sparkle=e.Sparkle||{},e.Sparkle.config=Object.assign(Object.assign({},e.Sparkle.config),t),e.Sparkle.config;console.error("Sparkle config was already initialized")}async function l(e){await i.loadScriptAsync(t("../assets/lib/sparkle.js")),await c(e)}const u="enc_auth_token";class p{constructor(){}static getInstance(){return p.instance||(p.instance=new p),p.instance}async authenticate(t){const e={"Content-Type":"application/json"};let n;s.state.loading=!0;try{if(n=await o.http.post("api/Account/Authenticate",t,{headers:e}),n){const e=n.Data,a={Id:e.Id,UserName:e.UserName,Email:e.Email,Roles:e.Roles,IsVerified:e.IsVerified,JWToken:e.JWToken,IssuedOn:e.IssuedOn,ExpiresOn:e.ExpiresOn,RefreshToken:e.RefreshToken,PhotoUrl:"",IsFacilitator:e.Roles.indexOf("Facilitator")>0},o=t.RememberClient?new Date(a.ExpiresOn):void 0;return sparkle.auth.setToken(a.JWToken,o),sparkle.utils.setCookieValue(u,a.JWToken,o,sparkle.appPath),await r("CurrentUser",a),s.state.authUser=Object.assign({},a),s.state.loading=!1,a}}catch(t){return s.state.loading=!1,t}}async signOut(){await n("CurrentUser"),sessionStorage.clear(),sparkle.auth.clearToken(),s.state.authUser=null,s.state.isAuthenticated=!1}async getLocalAuthUser(){return a("CurrentUser")}}const f=t=>{var{component:r,permission:n,render:a}=t,o=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(t);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]])}return r}(t,["component","permission","render"]);const i=r;return e("stencil-route",Object.assign({},o,{routeRender:t=>s.state.isAuthenticated?n&&!sparkle.auth.isGranted(n)?e("stencil-router-redirect",{url:"/unauthorized"}):i?e(i,Object.assign({},t,t.componentProps)):a(t):e("stencil-router-redirect",{url:"/login"})}))};export{p as A,f as P,l as i,c as s}
|
@@ -1 +0,0 @@
|
|
1
|
-
import{H as e}from"./p-1d4c7c11.js";import{d as t}from"./p-2f569553.js";const{state:a,onChange:s,reset:r}=t({user:{FirstName:"",LastName:"",ProfileText:"",ProfileImage:"",IsVerified:!1,Roles:[],FacilitatorClassList:[]},loaded:!1,updateLoading:!1,enrollmentList:[]}),n={state:a,onChange:s,reset:r};class i{constructor(){}static getInstance(){return i.instance||(i.instance=new i),i.instance}async enrollClass(t){let a=await e.http.post("api/v1/Student/EnrollClass",t);return a&&(n.state.enrollmentList=[...n.state.enrollmentList,a.Data]),a}async leaveClass(t){let a=await e.http.post("api/v1/Student/LeaveClass",t);return a&&(n.state.enrollmentList=n.state.enrollmentList.filter((e=>e.Id!=a.Data))),a}async fetchUserConfiguration(){let t=await e.http.get("api/v1/Student/UserConfiguration");return t&&(n.state.enrollmentList=t.Data.EnrollmentList,n.state.user.FirstName=t.Data.FirstName,n.state.user.LastName=t.Data.LastName,n.state.user.ProfileText=t.Data.ProfileText,n.state.user.ProfileImage=t.Data.ProfileImage,n.state.user.IsVerified=t.Data.IsVerified,n.state.user.Roles=t.Data.Roles,n.state.user.FacilitatorClassList=t.Data.FacilitatorClassList),t}async updateProfile(t){n.state.updateLoading=!0;let a=await e.http.post("api/Account/update-profile",t);return console.log("after fetch",a),a&&(n.state.updateLoading=!1,n.state.user=Object.assign(Object.assign({},n.state.user),{FirstName:a.Data.FirstName,LastName:a.Data.LastName,ProfileText:a.Data.ProfileText,ProfileImage:a.Data.ProfileImage})),a}async submitFeedback(t){return await e.http.post("api/v1/Feedback",t)}}export{i as S,n as u}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import{m as t}from"./p-d68092b7.js";import{i as o}from"./p-506221fe.js";import{createGesture as r}from"./p-e9431eeb.js";import"./p-076f0239.js";
|
2
|
-
/*!
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
4
|
-
*/const e=(e,s,n,a,p)=>{const i=e.ownerDocument.defaultView,m=o(e),c=t=>m?-t.deltaX:t.deltaX;return r({el:e,gestureName:"goback-swipe",gesturePriority:40,threshold:10,canStart:t=>(t=>{const{startX:o}=t;return m?o>=i.innerWidth-50:o<=50})(t)&&s(),onStart:n,onMove:t=>{const o=c(t);a(o/i.innerWidth)},onEnd:o=>{const r=c(o),e=i.innerWidth,s=r/e,n=(t=>m?-t.velocityX:t.velocityX)(o),a=n>=0&&(n>.2||r>e/2),f=(a?1-s:s)*e;let h=0;if(f>5){const t=f/Math.abs(n);h=Math.min(t,540)}p(a,s<=0?.01:t(0,s,.9999),h)}})};export{e as createSwipeBackGesture}
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as i,h as t,H as e,e as o}from"./p-ee1e0eb4.js";import{S as s}from"./p-5efc6566.js";import{t as l}from"./p-2ff67662.js";import"./p-1d4c7c11.js";import"./p-2f569553.js";import"./p-b226f54d.js";import"./p-871106e0.js";import"./p-add30d46.js";import"./p-d68092b7.js";const n=class{constructor(t){i(this,t),this.formControls={type:{isValid:!0,value:1,validate:i=>!!i},note:{isValid:!1,value:"",validate:i=>!!i}},this.submitted=!0}async onSubmit(i){i.preventDefault(),this.submitted=!0;let t=!0;for(let i in this.formControls){let e=this.formControls[i];e.validate(e.value),e.isValid||(t=!1)}if(t){let i=await s.getInstance().submitFeedback({Note:this.formControls.note.value,Type:this.formControls.type.value});console.log(i),i.Succeeded?((await l.create({message:"Feedback submitted successfully",duration:3e3})).present(),this.dismiss()):(await l.create({message:i.Message,duration:3e3})).present()}}dismiss(i){this.el.closest("ion-modal").dismiss({dismissed:!0})}changeFormValue(i,t){this.formControls=Object.assign(Object.assign({},this.formControls),{[i]:Object.assign(Object.assign({},this.formControls[i]),{value:t,isValid:this.formControls[i].validate(t)})})}render(){return t(e,null,t("ion-header",{translucent:!0},t("ion-toolbar",null,t("ion-title",null,"Feedback"),t("ion-buttons",{slot:"end"},t("ion-button",{onClick:()=>this.dismiss()},"Close")))),t("ion-content",{class:"ion-padding"},t("form",{onSubmit:i=>this.onSubmit(i),novalidate:!0},t("ion-list",null,t("ion-radio-group",{value:this.formControls.type.value,onChange:i=>this.changeFormValue("type",+i.target.value)},t("ion-list-header",null,t("ion-label",null,"Feedback Type")),t("ion-item",null,t("ion-label",null,"Comments"),t("ion-radio",{value:1})),t("ion-item",null,t("ion-label",null,"Suggestions"),t("ion-radio",{value:2})),t("ion-item",null,t("ion-label",null,"Questions"),t("ion-radio",{value:3}))),t("ion-item",null,t("ion-label",{position:"floating"},"Notes"),t("ion-textarea",{value:this.formControls.note.value,onChange:i=>this.changeFormValue("note",i.target.value)})),t("br",null),t("ion-button",{color:"primary",type:"submit"},"Submit")))))}get el(){return o(this)}};n.style=":host{display:block}";export{n as sparkle_feedback}
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as s,h as t,H as i}from"./p-ee1e0eb4.js";import{g as e}from"./p-871106e0.js";import{m as o}from"./p-2033cd86.js";import{u as n}from"./p-86ed13f0.js";import"./p-add30d46.js";import"./p-d68092b7.js";import"./p-48f72e63.js";const r=class{constructor(t){s(this,t),this.visible=!1,this.autoHide=!0,this.onClick=()=>o.toggle(this.menu)}connectedCallback(){this.visibilityChanged()}async visibilityChanged(){this.visible=await n(this.menu)}render(){const s=e(this),o=this.autoHide&&!this.visible;return t(i,{onClick:this.onClick,"aria-hidden":o?"true":null,class:{[s]:!0,"menu-toggle-hidden":o}},t("slot",null))}};r.style=":host(.menu-toggle-hidden){display:none}";export{r as ion_menu_toggle}
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as s,i,h as t,H as e,e as n}from"./p-ee1e0eb4.js";function o(s,i){return"question-"+s+"-option-"+i}const l=class{constructor(t){s(this,t),this.quizFeedbackChange=i(this,"quizFeedbackChange",7),this.displayOptions=[0,1,2,3,4,5,6,7,8,9,10]}render(){return t(e,{class:"quiz__feedback"},t("div",{class:"question-container"},t("div",{class:"question-text"},this.question.questionText),t("div",null,this.displayOptions.map(((s,i)=>t("div",{class:"option"},t("input",{type:"radio",id:o(this.question.questionId,i),name:"question-"+this.question.questionId,value:s,onChange:s=>this.quizFeedbackChange.emit({value:s.target.value,question:this.question})}),t("label",{htmlFor:o(this.question.questionId,i)},t("span",{class:"number"},this.displayOptions[i])," ",s),t("br",null)))))))}};l.style=":host{display:block}";const a=class{constructor(t){s(this,t),this.quizInputChange=i(this,"quizInputChange",7)}render(){return t(e,{class:"quiz__input"},t("div",{class:"question-container"},t("label",{htmlFor:"question-"+this.question.questionId,class:"form-label"},this.question.questionText),t("input",{type:"text",class:"form-control",id:"question-"+this.question.questionId,name:"question-"+this.question.questionId,onInput:s=>this.quizInputChange.emit({value:s.target.value,question:this.question})})))}};a.style=":host{display:block}";const h=class{constructor(t){s(this,t),this.quizOpinionChange=i(this,"quizOpinionChange",7),this.fivePointsDisplayOptions=["Strongly agree","Agree","Not sure","Disagree","Strongly disagree"],this.tenPointsDisplayOptions=["Never","Never","Sometimes","Sometimes","Half of the time","Half of the time","Most of the time","Most of the time","Always","Always","Always"],this.tenPointsDefaultValue=5}optionChanged(s,i){this.selectedIndex=s,this.quizOpinionChange.emit({value:i,question:this.question})}renderFivePointScale(){return this.fivePointsDisplayOptions.map(((s,i)=>t("div",{class:"option"},t("input",{id:o(this.question.questionId,i),type:"radio",name:"question-"+this.question.questionId,value:s,onChange:()=>this.optionChanged(i,this.fivePointsDisplayOptions[i])}),t("label",{htmlFor:o(this.question.questionId,i)},t("span",{class:"number"},i+1),s),t("br",null))))}renderTenPointScale(){return t("div",null,t("ion-item",null,t("ion-range",{class:"opinion-range",onIonChange:s=>this.optionChanged(+s.detail.value,this.tenPointsDisplayOptions[+s.detail.value]),min:0,max:10,value:this.tenPointsDefaultValue,step:1,pin:!0,snaps:!0},t("ion-icon",{size:"small",slot:"start",name:"star-outline"}),t("ion-icon",{slot:"end",name:"star"}))),t("div",{class:"scale"},t("p",null,"Never"),t("p",{class:"selected"},this.tenPointsDisplayOptions[this.selectedIndex]||this.tenPointsDisplayOptions[this.tenPointsDefaultValue]),t("p",null,"Always")),t("br",null),t("hr",null))}render(){return t(e,{class:"quiz__opinion"},t("div",{class:"opinion-container"},t("div",{class:"question-text"},this.question.questionText),t("div",null,"FIVE-POINTS"==this.question.scale&&this.renderFivePointScale(),"TEN-POINTS"==this.question.scale&&this.renderTenPointScale())))}get el(){return n(this)}};h.style="sparkle-quiz-opinion .scale{display:flex;justify-content:space-between}sparkle-quiz-opinion .scale>p{margin:0}sparkle-quiz-opinion .scale>p.selected{color:var(--ion-color-primary)}sparkle-quiz-opinion ion-icon{font-size:30px}sparkle-quiz-opinion .icon-group{min-width:70px;text-align:right;padding-right:10px}";const r=class{constructor(t){s(this,t),this.quizInputChange=i(this,"quizInputChange",7)}render(){return t(e,{class:"quiz__input"},t("div",{class:"question-container"},t("label",{htmlFor:"question-"+this.question.questionId,class:"form-label"},this.question.questionText),t("input",{type:"text",class:"form-control",id:"question-"+this.question.questionId,name:"question-"+this.question.questionId,onInput:s=>this.quizInputChange.emit({value:s.target.value,question:this.question})})))}};r.style=":host{display:block}";const u=class{constructor(t){s(this,t),this.quizSelectChange=i(this,"quizSelectChange",7),this.allowMultiple=!1,this.values=[],this.displayOptions=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]}optionChanged(s){this.values=s.target.checked?[...this.values,s.target.value]:this.values.filter((i=>i!==s.target.value)),this.quizSelectChange.emit({value:this.values,question:this.question})}render(){return t(e,{class:"quiz__select"},t("div",{class:"question-container"},t("div",{class:"question-text"},this.question.questionText),t("div",null,this.question.options.map(((s,i)=>t("div",{class:"option"},t("input",{type:this.allowMultiple?"checkbox":"radio",id:o(this.question.questionId,i),name:"question-"+this.question.questionId,value:s.option,onChange:s=>this.optionChanged(s)}),t("label",{htmlFor:o(this.question.questionId,i)},t("span",{class:"number"},this.displayOptions[i]),s.option),t("br",null)))))))}};u.style=":host{display:block}";export{l as sparkle_quiz_feedback,a as sparkle_quiz_input,h as sparkle_quiz_opinion,r as sparkle_quiz_poll,u as sparkle_quiz_select}
|