@sparkle-learning/core 0.0.36 → 0.0.39
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-feed-post.cjs.entry.js +1 -1
- 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-feed-post/sparkle-feed-post.js +30 -28
- 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 +3 -3
- 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-08d97c59.entry.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-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-7f25366a.entry.js +1 -0
- 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-39712c56.entry.js → p-fde382f0.entry.js} +1 -1
- package/dist/sparkle-core/sparkle-core.esm.js +1 -1
- package/package.json +2 -2
- 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-590266d6.entry.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
@@ -111,7 +111,7 @@ const SparkleFeedPost = class {
|
|
111
111
|
}
|
112
112
|
render() {
|
113
113
|
const userInfo = this.renderUserInfo();
|
114
|
-
return (index.h("ion-card", null, index.h("ion-item", { class: "header" }, index.h("ion-card-title", null, "
|
114
|
+
return (index.h(index.Host, null, index.h("slot", null), index.h("ion-card", null, index.h("ion-item", { class: "header" }, index.h("ion-card-title", null, "Community Wall"), userInfo), index.h("ion-card-content", null, index.h("form", null, index.h("ion-list", null, index.h("ion-item", { lines: "none" }, index.h("ion-label", null, "Public"), index.h("ion-toggle", { class: "IsPublic", slot: "end", color: "primary", name: "IsPublic" })), index.h("ion-item", { class: "padding" }, index.h("ion-textarea", { class: "PostText", required: true, placeholder: "Post Text", name: "PostText", value: this.postText })), index.h("ion-item", { class: "padding" }, index.h("ion-input", { class: "PostExternalUrl", required: true, type: "text", placeholder: "URL", name: "ExternalResourceUrl", value: this.externalResourceUrl })), this.uploadedImage ? (index.h("ion-item", { class: "padding" }, index.h("img", { class: "uploaded-image", src: this.uploadedImage }))) : (''), index.h("ion-item", { lines: "none" }, index.h("input", { type: "file", id: "fileInput", onChange: evt => this.uploadImage(evt), style: { display: 'none' }, accept: "image/*" }), this.uploadImageLoading ? index.h("ion-spinner", { color: "primary" }) : '', index.h("ion-button", { slot: "start", onClick: evt => this.selectFile() }, index.h("ion-icon", { name: "add" }), "Upload Image")), index.h("ion-item", { class: "post-footer", lines: "none" }, index.h("div", null, index.h("div", { class: "error" }, this.errorMessage), index.h("div", { class: "success" }, this.successMessage)), index.h("ion-button", { slot: "end", size: "default", onClick: evt => this.submitPost(), disabled: !this.isAuthenticated() }, "Post"))))))));
|
115
115
|
}
|
116
116
|
get el() { return index.getElement(this); }
|
117
117
|
};
|
@@ -3,11 +3,12 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-51e8292e.js');
|
6
|
-
const student_service = require('./student.service-
|
6
|
+
const student_service = require('./student.service-d48f1c99.js');
|
7
7
|
const overlays = require('./overlays-32df265a.js');
|
8
8
|
require('./httpService-7211d93b.js');
|
9
9
|
require('./auth.store-1e630a7d.js');
|
10
10
|
require('./environment-config.service-0e02b049.js');
|
11
|
+
require('./user.store-8a049c4e.js');
|
11
12
|
require('./ionic-global-2cde9d3a.js');
|
12
13
|
require('./hardware-back-button-92d97ff8.js');
|
13
14
|
require('./helpers-c2496722.js');
|
@@ -0,0 +1,19 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-51e8292e.js');
|
6
|
+
|
7
|
+
const sparkleGoalProgressCss = ":host{display:block}.progress-container{padding:4px;display:flex;align-items:center}.progress-container>.progress{padding-left:6px}#progress-bar{background:#ccc;border-radius:12px;height:10px;width:100%;padding:0px;margin:0 auto}#progress-bar:after{content:'';display:block;background:var(--ion-color-primary);width:var(--p);height:100%;border-radius:9px}.percentage{padding-left:10px}";
|
8
|
+
|
9
|
+
const SparkleGoalProgress = class {
|
10
|
+
constructor(hostRef) {
|
11
|
+
index.registerInstance(this, hostRef);
|
12
|
+
}
|
13
|
+
render() {
|
14
|
+
return (index.h(index.Host, null, index.h("div", { class: "progress-container" }, index.h("div", { id: "progress-bar", style: { "--p": this.percentage + "%" } }), index.h("strong", { class: "percentage" }, this.percentage, "%"))));
|
15
|
+
}
|
16
|
+
};
|
17
|
+
SparkleGoalProgress.style = sparkleGoalProgressCss;
|
18
|
+
|
19
|
+
exports.sparkle_goal_progress = SparkleGoalProgress;
|
@@ -0,0 +1,74 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-51e8292e.js');
|
6
|
+
const overlays = require('./overlays-32df265a.js');
|
7
|
+
const util = require('./util-d383acb8.js');
|
8
|
+
require('./ionic-global-2cde9d3a.js');
|
9
|
+
require('./hardware-back-button-92d97ff8.js');
|
10
|
+
require('./helpers-c2496722.js');
|
11
|
+
|
12
|
+
var PostVisibility;
|
13
|
+
(function (PostVisibility) {
|
14
|
+
PostVisibility[PostVisibility["Private"] = 0] = "Private";
|
15
|
+
PostVisibility[PostVisibility["Public"] = 1] = "Public";
|
16
|
+
})(PostVisibility || (PostVisibility = {}));
|
17
|
+
|
18
|
+
const sparkleGwwItemCss = ":host{display:block}.Card{background-color:var(--background);border-radius:4px;box-shadow:rgb(2 8 20 / 10%) 0px 0.175em 0.5em, rgb(2 8 20 / 8%) 0px 0.085em 0.175em;color:var(--text-color--light);display:flex;flex-direction:column;font-size:inherit;font-weight:normal;justify-content:flex-start;line-height:1.6;transition:box-shadow 150ms ease 0s, transform 150ms ease 0s, -webkit-box-shadow 150ms ease 0s, -webkit-transform 150ms ease 0s;width:100%;overflow:hidden;margin-bottom:20px;height:auto !important}.footer ion-item ion-avatar{width:30px;height:30px}.comment-overview{padding:0px 16px;text-align:right;cursor:pointer}";
|
19
|
+
|
20
|
+
const SparkleGwwItem = class {
|
21
|
+
constructor(hostRef) {
|
22
|
+
index.registerInstance(this, hostRef);
|
23
|
+
}
|
24
|
+
async presentModal(comments) {
|
25
|
+
const modal = await overlays.modalController.create({
|
26
|
+
component: "sparkle-gww-comment-list",
|
27
|
+
componentProps: { comments: comments }
|
28
|
+
});
|
29
|
+
await modal.present();
|
30
|
+
}
|
31
|
+
clearCommentField() {
|
32
|
+
this.comment = "";
|
33
|
+
}
|
34
|
+
renderMyMoodTemplate(data) {
|
35
|
+
return (index.h("div", null, index.h("b", null, "Mood:"), " ", data.Mood, index.h("br", null), index.h("b", null, "Level:"), " ", data.Level, index.h("br", null), index.h("img", { src: data.MoodImage }), "`"));
|
36
|
+
}
|
37
|
+
renderMyHealthTemplate(data) {
|
38
|
+
return (index.h("div", null, index.h("b", null, "Heart rate:"), " ", data.HeartRate, " bpm "));
|
39
|
+
}
|
40
|
+
renderMyGoalTemplate(data) {
|
41
|
+
return (index.h("div", null, index.h("b", null, "Goal: "), " ", data.GoalTitle, " ", index.h("br", null), index.h("b", null, "Update Text: "), " ", data.GoalText, " ", index.h("br", null), index.h("sparkle-goal-progress", { percentage: data.GoalProgress })));
|
42
|
+
}
|
43
|
+
renderTemplate() {
|
44
|
+
if (this.post.PostTextJSON) {
|
45
|
+
var parseData = JSON.parse(this.post.PostTextJSON);
|
46
|
+
if (this.post.MiniAppId == util.SparkleGlobal.MY_GOALS_APP_ID) {
|
47
|
+
return this.renderMyGoalTemplate(parseData);
|
48
|
+
}
|
49
|
+
else if (this.post.MiniAppId == util.SparkleGlobal.MY_HEALTH_APP_ID) {
|
50
|
+
return this.renderMyHealthTemplate(parseData);
|
51
|
+
}
|
52
|
+
else if (this.post.MiniAppId == util.SparkleGlobal.MY_MOOD_APP_ID) {
|
53
|
+
return this.renderMyMoodTemplate(parseData);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
else {
|
57
|
+
return ([
|
58
|
+
index.h("div", { innerHTML: this.post.PostText }),
|
59
|
+
this.post.ExternalResourceUrl && index.h("div", null, index.h("img", { src: this.post.ExternalResourceUrl, class: "external-src-image" }))
|
60
|
+
]);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
render() {
|
64
|
+
return (index.h(index.Host, { class: {
|
65
|
+
'Card': true,
|
66
|
+
} }, index.h("ion-item", { class: "header-item" }, index.h("ion-avatar", { class: "header-avatar", slot: "start" }, index.h("img", { src: this.post.ProfileImageUrl ? this.post.ProfileImageUrl : index.getAssetPath("/assets/img/user.png") })), index.h("div", null, index.h("strong", { class: "requester-name", "text-capitalize": true }, this.post.Name), index.h("div", null, index.h("small", null, " ", util.date(this.post.CreatedOn)))), index.h("div", { slot: "end" }, index.h("ion-icon", { color: "primary", name: this.post.PostVisibility == PostVisibility.Public ? "globe-outline" : "eye-outline" }))), index.h("div", { class: "ion-padding" }, this.renderTemplate()), index.h("div", { class: "footer" }, this.post.Comments.length > 0 &&
|
67
|
+
index.h("div", { class: "comment-overview", slot: "end" }, " ", index.h("small", { onClick: () => this.post.Comments.length > 0 && this.presentModal(this.post.Comments) }, "Comments (", this.post.Comments.length, ")")), this.post.Comments.map((item) => {
|
68
|
+
index.h("ion-item", { class: "comment-box", onClick: () => this.presentModal(this.post.Comments) }, index.h("ion-avatar", { class: "footer-avatar", slot: "start" }, index.h("img", { src: item.ProfileImageUrl ? item.ProfileImageUrl : "/assets/img/user.png" })), index.h("small", null, index.h("b", null, item.Name), " ", item.Comment), index.h("ion-icon", { slot: "end", name: "git-merge", color: "primary" }));
|
69
|
+
}), index.h("hr", null), index.h("ion-item", { class: "comment-footer" }, index.h("ion-avatar", { class: "footer-avatar", slot: "start" }, index.h("img", { src: index.getAssetPath("/assets/img/user.png") })), index.h("ion-input", { value: this.comment, onIonChange: (e) => this.comment = e.target.value, type: "text", placeholder: "Write a comment" }), index.h("ion-button", { onClick: () => this.onPostComment({ Comment: this.comment, PostId: this.post.Id }), slot: "end", size: "small", disabled: !this.comment || this.loading }, this.loading ? index.h("ion-spinner", { name: "dots" }) : "POST COMMENT")))));
|
70
|
+
}
|
71
|
+
};
|
72
|
+
SparkleGwwItem.style = sparkleGwwItemCss;
|
73
|
+
|
74
|
+
exports.sparkle_gww_item = SparkleGwwItem;
|
@@ -0,0 +1,236 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-51e8292e.js');
|
6
|
+
const icons = require('./icons-c61db785.js');
|
7
|
+
const activeRouter = require('./active-router-f9e18bd8.js');
|
8
|
+
const matchPath = require('./match-path-84c9f7ca.js');
|
9
|
+
|
10
|
+
const menuToggleCss = "sparkle-menu-toggle{background-color:rgba(0, 0, 0, var(--bg-alpha, 0));border-radius:50%;color:var(--text-color--light);cursor:pointer;height:40px;padding:8px;width:40px}@media (hover: hover){sparkle-menu-toggle:focus,sparkle-menu-toggle:hover{--bg-alpha:0.03;outline:none}sparkle-menu-toggle:active{--bg-alpha:0.06}}sparkle-menu-toggle svg{fill:currentColor}";
|
11
|
+
|
12
|
+
const SparkleMenuToggle = class {
|
13
|
+
constructor(hostRef) {
|
14
|
+
index.registerInstance(this, hostRef);
|
15
|
+
}
|
16
|
+
hostData() {
|
17
|
+
return {
|
18
|
+
'role': 'button',
|
19
|
+
'tabindex': '0',
|
20
|
+
'aria-label': 'Toggle Menu',
|
21
|
+
};
|
22
|
+
}
|
23
|
+
__stencil_render() {
|
24
|
+
return index.h(icons.Menu, null);
|
25
|
+
}
|
26
|
+
render() { return index.h(index.Host, this.hostData(), this.__stencil_render()); }
|
27
|
+
};
|
28
|
+
SparkleMenuToggle.style = menuToggleCss;
|
29
|
+
|
30
|
+
const navCss = "sparkle-nav{display:block;flex:0 0 auto;z-index:1}sparkle-nav .wrapper{position:relative}sparkle-nav .section-label{margin-bottom:0;font-size:14px;font-weight:600}sparkle-nav .module-list li,sparkle-nav .module-list ul li{list-style-type:none;margin:0;padding:0}sparkle-nav .module-list{margin-top:0;padding:0}sparkle-nav .module-list .section-label:first-of-type{margin-top:0}sparkle-nav .module-list li{font-size:14px;padding:10px 10px 0px 14px}sparkle-nav .module-list>li{margin-top:10px}sparkle-nav .module-list a{font-weight:400;color:#6c6c8b;text-decoration:none;white-space:nowrap;border:0}sparkle-nav .module-list a:not(.link-active){transition:color 0.2s}sparkle-nav .module-list a:hover{border:0}sparkle-nav .module-list .link-active{font-weight:bold;color:var(--ion-color-sparkle)}sparkle-nav .module-list .link-active a{color:var(--ion-color-sparkle)}sparkle-nav .module-list a:hover:not(.link-active){color:var(--ion-color-sparkle)}sparkle-nav .module-list ul li{padding-left:12px;transition:80ms height;display:block;overflow:hidden;text-overflow:ellipsis}sparkle-nav .module-list ul.collapsed li{height:0}sparkle-nav ul.session-list{margin:0;padding:10px 0px 0px 0px}sparkle-nav ul.session-list li a{display:flex;flex-direction:column;padding:15px 24px;position:relative}sparkle-nav ul.session-list li a:before{content:'';width:10px;height:10px;border-radius:50%;background:#dfe1e3;display:block;position:absolute;left:1px;top:50%;margin-top:-5px;z-index:5}sparkle-nav ul.session-list li a:after{content:'';background:#dfe1e3;height:100%;position:absolute;width:2px;display:block;left:5px;top:0}sparkle-nav ul.session-list li a.is-active{color:var(--ion-color-sparkle)}sparkle-nav ul.session-list li a.is-active:before{width:14px;height:14px;left:23px;margin-top:-7px;background:var(--ion-color-sparkle);box-shadow:0 0 4px var(--ion-color-sparkle)}sparkle-nav ul.session-list li a.is-active:after{background:#dfe1e3}sparkle-nav ul.session-list li stencil-route-link.is-completed a{}sparkle-nav ul.session-list li stencil-route-link.is-completed a:before{background:var(--ion-color-sparkle)}sparkle-nav ul.session-list li stencil-route-link.is-completed a:after{background:var(--ion-color-sparkle)}sparkle-nav ul.session-list li a p{color:#fff;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:.2s ease-in-out color}sparkle-nav ul.session-list li a span{display:block;line-height:12px}sparkle-nav ul li span.coming-soon{font-size:0.7rem;display:block;background:0 0;color:#f6c95b;line-height:14px;border-radius:4px;padding:1px 4px 0;box-shadow:none;border:1px solid #f6c95b;width:85px;text-align:center}sparkle-nav ul.session-list li a:hover p{color:var(--ion-color-sparkle)}sparkle-nav ul.session-list li:first-child a:after{height:50%;top:50%}sparkle-nav ul.session-list li:last-child a:after{height:50%;bottom:50%}";
|
31
|
+
|
32
|
+
const SparkleNav = class {
|
33
|
+
constructor(hostRef) {
|
34
|
+
index.registerInstance(this, hostRef);
|
35
|
+
//TODO: get this config somewhere from the config initialization
|
36
|
+
this.config = {
|
37
|
+
showRomanNumber: false,
|
38
|
+
showModuleIndex: true,
|
39
|
+
showSessionIndex: true,
|
40
|
+
};
|
41
|
+
this.toggleParent = (parentItem) => {
|
42
|
+
return (e) => {
|
43
|
+
e.preventDefault();
|
44
|
+
this.selectedParent = parentItem;
|
45
|
+
};
|
46
|
+
};
|
47
|
+
}
|
48
|
+
componentDidLoad() { }
|
49
|
+
//TODO: not working
|
50
|
+
pageDidLoadHandler($event) {
|
51
|
+
if ($event) {
|
52
|
+
//let pageInfo = $event.detail.pageInfo;
|
53
|
+
let splittedParts = window.location.pathname.split('/').filter(x => !!x && x != 'course');
|
54
|
+
this.moduleURLName = splittedParts[0];
|
55
|
+
this.sessionURLName = splittedParts[1];
|
56
|
+
if (this.toc) {
|
57
|
+
let courseModule = this.toc.courseModules.find(x => x.urlName == this.moduleURLName);
|
58
|
+
this.selectedParent = courseModule;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
toggleLeftSidebar() { }
|
63
|
+
romanize(num) {
|
64
|
+
if (isNaN(num))
|
65
|
+
return NaN;
|
66
|
+
var digits = String(+num).split(''), key = [
|
67
|
+
'',
|
68
|
+
'C',
|
69
|
+
'CC',
|
70
|
+
'CCC',
|
71
|
+
'CD',
|
72
|
+
'D',
|
73
|
+
'DC',
|
74
|
+
'DCC',
|
75
|
+
'DCCC',
|
76
|
+
'CM',
|
77
|
+
'',
|
78
|
+
'X',
|
79
|
+
'XX',
|
80
|
+
'XXX',
|
81
|
+
'XL',
|
82
|
+
'L',
|
83
|
+
'LX',
|
84
|
+
'LXX',
|
85
|
+
'LXXX',
|
86
|
+
'XC',
|
87
|
+
'',
|
88
|
+
'I',
|
89
|
+
'II',
|
90
|
+
'III',
|
91
|
+
'IV',
|
92
|
+
'V',
|
93
|
+
'VI',
|
94
|
+
'VII',
|
95
|
+
'VIII',
|
96
|
+
'IX',
|
97
|
+
], roman = '', i = 3;
|
98
|
+
while (i--)
|
99
|
+
roman = (key[+digits.pop() + i * 10] || '') + roman;
|
100
|
+
return Array(+digits.join('') + 1).join('M') + roman;
|
101
|
+
}
|
102
|
+
getModuleIndex(index, preventNumbering) {
|
103
|
+
return this.config.showModuleIndex && !preventNumbering ? (this.config.showRomanNumber ? this.romanize(index) : index) + '. ' : '';
|
104
|
+
}
|
105
|
+
getSessionIndex(index, preventNumbering) {
|
106
|
+
return this.config.showSessionIndex && !preventNumbering ? (index) + '. ' : '';
|
107
|
+
}
|
108
|
+
hostData() {
|
109
|
+
return {
|
110
|
+
role: 'navigation',
|
111
|
+
};
|
112
|
+
}
|
113
|
+
__stencil_render() {
|
114
|
+
let moduleIndex = 0;
|
115
|
+
let sessionIndex = 0;
|
116
|
+
return (index.h("ul", { class: "module-list" }, this.toc &&
|
117
|
+
this.toc.courseModules.map(module => {
|
118
|
+
sessionIndex = 0;
|
119
|
+
if (!module.preventNumbering) {
|
120
|
+
moduleIndex++;
|
121
|
+
}
|
122
|
+
return (module.sessions.length > 0 && (index.h("li", null, index.h("a", { class: { 'link-active': module.urlName == this.moduleURLName }, href: module.sessions[0].urlName || '#', onClick: this.toggleParent(module) }, index.h("span", { class: "section-label" }, this.getModuleIndex(moduleIndex, module.preventNumbering), module.name, module.comingSoon && index.h("span", { class: "coming-soon" }, " Coming soon"))), index.h("ul", { class: { 'collapsed': this.selectedParent ? module !== this.selectedParent : moduleIndex !== 0, 'session-list': true } }, module.sessions.map(session => {
|
123
|
+
if (!session.preventNumbering) {
|
124
|
+
sessionIndex++;
|
125
|
+
}
|
126
|
+
return (index.h("li", { class: {
|
127
|
+
'active': module.urlName == this.moduleURLName && session.urlName == this.sessionURLName,
|
128
|
+
} }, index.h("stencil-route-link", { class: {
|
129
|
+
'is-completed': true,
|
130
|
+
'link-active': module.urlName == this.moduleURLName && session.urlName == this.sessionURLName,
|
131
|
+
}, url: 'course/' + module.urlName + '/' + session.urlName + '/' + session.pages[0].urlName, onClick: () => this.toggleLeftSidebar() }, this.getSessionIndex(sessionIndex, session.preventNumbering), session.name, session.comingSoon && index.h("span", { class: "coming-soon" }, " Coming soon"))));
|
132
|
+
})))));
|
133
|
+
})));
|
134
|
+
}
|
135
|
+
get el() { return index.getElement(this); }
|
136
|
+
render() { return index.h(index.Host, this.hostData(), this.__stencil_render()); }
|
137
|
+
};
|
138
|
+
SparkleNav.style = navCss;
|
139
|
+
|
140
|
+
const getUniqueId = () => {
|
141
|
+
return ((Math.random() * 10e16).toString().match(/.{4}/g) || []).join('-');
|
142
|
+
};
|
143
|
+
const getMatch = (pathname, url, exact) => {
|
144
|
+
return matchPath.matchPath(pathname, {
|
145
|
+
path: url,
|
146
|
+
exact: exact,
|
147
|
+
strict: true
|
148
|
+
});
|
149
|
+
};
|
150
|
+
const isHTMLStencilRouteElement = (elm) => {
|
151
|
+
return elm.tagName === 'STENCIL-ROUTE';
|
152
|
+
};
|
153
|
+
const RouteSwitch = class {
|
154
|
+
constructor(hostRef) {
|
155
|
+
index.registerInstance(this, hostRef);
|
156
|
+
this.group = getUniqueId();
|
157
|
+
this.subscribers = [];
|
158
|
+
this.queue = index.getContext(this, "queue");
|
159
|
+
}
|
160
|
+
componentWillLoad() {
|
161
|
+
if (this.location != null) {
|
162
|
+
this.regenerateSubscribers(this.location);
|
163
|
+
}
|
164
|
+
}
|
165
|
+
async regenerateSubscribers(newLocation) {
|
166
|
+
if (newLocation == null) {
|
167
|
+
return;
|
168
|
+
}
|
169
|
+
let newActiveIndex = -1;
|
170
|
+
this.subscribers = Array.prototype.slice.call(this.el.children)
|
171
|
+
.filter(isHTMLStencilRouteElement)
|
172
|
+
.map((childElement, index) => {
|
173
|
+
const match = getMatch(newLocation.pathname, childElement.url, childElement.exact);
|
174
|
+
if (match && newActiveIndex === -1) {
|
175
|
+
newActiveIndex = index;
|
176
|
+
}
|
177
|
+
return {
|
178
|
+
el: childElement,
|
179
|
+
match: match
|
180
|
+
};
|
181
|
+
});
|
182
|
+
if (newActiveIndex === -1) {
|
183
|
+
return;
|
184
|
+
}
|
185
|
+
// Check if this actually changes which child is active
|
186
|
+
// then just pass the new match down if the active route isn't changing.
|
187
|
+
if (this.activeIndex === newActiveIndex) {
|
188
|
+
this.subscribers[newActiveIndex].el.match = this.subscribers[newActiveIndex].match;
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
this.activeIndex = newActiveIndex;
|
192
|
+
// Set all props on the new active route then wait until it says that it
|
193
|
+
// is completed
|
194
|
+
const activeChild = this.subscribers[this.activeIndex];
|
195
|
+
if (this.scrollTopOffset) {
|
196
|
+
activeChild.el.scrollTopOffset = this.scrollTopOffset;
|
197
|
+
}
|
198
|
+
activeChild.el.group = this.group;
|
199
|
+
activeChild.el.match = activeChild.match;
|
200
|
+
activeChild.el.componentUpdated = (routeViewUpdatedOptions) => {
|
201
|
+
// After the new active route has completed then update visibility of routes
|
202
|
+
this.queue.write(() => {
|
203
|
+
this.subscribers.forEach((child, index) => {
|
204
|
+
child.el.componentUpdated = undefined;
|
205
|
+
if (index === this.activeIndex) {
|
206
|
+
return child.el.style.display = '';
|
207
|
+
}
|
208
|
+
if (this.scrollTopOffset) {
|
209
|
+
child.el.scrollTopOffset = this.scrollTopOffset;
|
210
|
+
}
|
211
|
+
child.el.group = this.group;
|
212
|
+
child.el.match = null;
|
213
|
+
child.el.style.display = 'none';
|
214
|
+
});
|
215
|
+
});
|
216
|
+
if (this.routeViewsUpdated) {
|
217
|
+
this.routeViewsUpdated(Object.assign({ scrollTopOffset: this.scrollTopOffset }, routeViewUpdatedOptions));
|
218
|
+
}
|
219
|
+
};
|
220
|
+
}
|
221
|
+
render() {
|
222
|
+
return (index.h("slot", null));
|
223
|
+
}
|
224
|
+
get el() { return index.getElement(this); }
|
225
|
+
static get watchers() { return {
|
226
|
+
"location": ["regenerateSubscribers"]
|
227
|
+
}; }
|
228
|
+
};
|
229
|
+
activeRouter.ActiveRouter.injectProps(RouteSwitch, [
|
230
|
+
'location',
|
231
|
+
'routeViewsUpdated'
|
232
|
+
]);
|
233
|
+
|
234
|
+
exports.sparkle_menu_toggle = SparkleMenuToggle;
|
235
|
+
exports.sparkle_nav = SparkleNav;
|
236
|
+
exports.stencil_route_switch = RouteSwitch;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-51e8292e.js');
|
6
|
+
|
7
|
+
const sparkleValidationErrorCss = ":host{display:block}sparkle-validation-error ul{padding:10px 0px}sparkle-validation-error .alert-danger{margin-top:10px;font-size:12px}";
|
8
|
+
|
9
|
+
const SparkleValidationError = class {
|
10
|
+
constructor(hostRef) {
|
11
|
+
index.registerInstance(this, hostRef);
|
12
|
+
this.errors = [];
|
13
|
+
}
|
14
|
+
render() {
|
15
|
+
return (index.h(index.Host, null, this.errors.length > 0 &&
|
16
|
+
index.h("div", { class: "alert alert-danger", role: "alert" }, index.h("ul", null, this.errors.map(error => index.h("li", null, index.h("b", null, error.Field, ": "), error.Message))))));
|
17
|
+
}
|
18
|
+
};
|
19
|
+
SparkleValidationError.style = sparkleValidationErrorCss;
|
20
|
+
|
21
|
+
exports.sparkle_validation_error = SparkleValidationError;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-51e8292e.js');
|
6
|
+
const activeRouter = require('./active-router-f9e18bd8.js');
|
7
|
+
|
8
|
+
// Get the URL for this route link without the root from the router
|
9
|
+
const getUrl = (url, root) => {
|
10
|
+
// Don't allow double slashes
|
11
|
+
if (url.charAt(0) == '/' && root.charAt(root.length - 1) == '/') {
|
12
|
+
return root.slice(0, root.length - 1) + url;
|
13
|
+
}
|
14
|
+
return root + url;
|
15
|
+
};
|
16
|
+
const Redirect = class {
|
17
|
+
constructor(hostRef) {
|
18
|
+
index.registerInstance(this, hostRef);
|
19
|
+
}
|
20
|
+
componentWillLoad() {
|
21
|
+
if (this.history && this.root && this.url) {
|
22
|
+
return this.history.replace(getUrl(this.url, this.root));
|
23
|
+
}
|
24
|
+
}
|
25
|
+
get el() { return index.getElement(this); }
|
26
|
+
};
|
27
|
+
activeRouter.ActiveRouter.injectProps(Redirect, [
|
28
|
+
'history',
|
29
|
+
'root'
|
30
|
+
]);
|
31
|
+
|
32
|
+
exports.stencil_router_redirect = Redirect;
|
@@ -0,0 +1,61 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const httpService = require('./httpService-7211d93b.js');
|
4
|
+
const user_store = require('./user.store-8a049c4e.js');
|
5
|
+
|
6
|
+
class StudentService {
|
7
|
+
constructor() { }
|
8
|
+
static getInstance() {
|
9
|
+
if (!StudentService.instance) {
|
10
|
+
StudentService.instance = new StudentService();
|
11
|
+
}
|
12
|
+
return StudentService.instance;
|
13
|
+
}
|
14
|
+
async enrollClass(enrollInput) {
|
15
|
+
let result = await httpService.HttpService.http.post('api/v1/Student/EnrollClass', enrollInput);
|
16
|
+
if (result) {
|
17
|
+
user_store.userStore.state.enrollmentList = [
|
18
|
+
...user_store.userStore.state.enrollmentList,
|
19
|
+
result.Data
|
20
|
+
];
|
21
|
+
}
|
22
|
+
return result;
|
23
|
+
}
|
24
|
+
async leaveClass(leaveInput) {
|
25
|
+
let result = await httpService.HttpService.http.post('api/v1/Student/LeaveClass', leaveInput);
|
26
|
+
if (result) {
|
27
|
+
user_store.userStore.state.enrollmentList = user_store.userStore.state.enrollmentList.filter((item) => item.Id != result.Data);
|
28
|
+
}
|
29
|
+
return result;
|
30
|
+
}
|
31
|
+
async fetchUserConfiguration() {
|
32
|
+
let result = await httpService.HttpService.http.get('api/v1/Student/UserConfiguration');
|
33
|
+
if (result) {
|
34
|
+
user_store.userStore.state.enrollmentList = result.Data.EnrollmentList;
|
35
|
+
user_store.userStore.state.user.FirstName = result.Data.FirstName;
|
36
|
+
user_store.userStore.state.user.LastName = result.Data.LastName;
|
37
|
+
user_store.userStore.state.user.ProfileText = result.Data.ProfileText;
|
38
|
+
user_store.userStore.state.user.ProfileImage = result.Data.ProfileImage;
|
39
|
+
user_store.userStore.state.user.IsVerified = result.Data.IsVerified;
|
40
|
+
user_store.userStore.state.user.Roles = result.Data.Roles;
|
41
|
+
user_store.userStore.state.user.FacilitatorClassList = result.Data.FacilitatorClassList;
|
42
|
+
}
|
43
|
+
return result;
|
44
|
+
}
|
45
|
+
async updateProfile(updateProfileInput) {
|
46
|
+
user_store.userStore.state.updateLoading = true;
|
47
|
+
let result = await httpService.HttpService.http.post('api/Account/update-profile', updateProfileInput);
|
48
|
+
console.log('after fetch', result);
|
49
|
+
if (result) {
|
50
|
+
user_store.userStore.state.updateLoading = false;
|
51
|
+
user_store.userStore.state.user = Object.assign(Object.assign({}, user_store.userStore.state.user), { FirstName: result.Data.FirstName, LastName: result.Data.LastName, ProfileText: result.Data.ProfileText, ProfileImage: result.Data.ProfileImage });
|
52
|
+
}
|
53
|
+
return result;
|
54
|
+
}
|
55
|
+
async submitFeedback(feedbackInput) {
|
56
|
+
let result = await httpService.HttpService.http.post('api/v1/Feedback', feedbackInput);
|
57
|
+
return result;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
exports.StudentService = StudentService;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const auth_store = require('./auth.store-1e630a7d.js');
|
4
|
+
|
5
|
+
const { state, onChange, reset } = auth_store.createStore({
|
6
|
+
user: {
|
7
|
+
FirstName: '',
|
8
|
+
LastName: '',
|
9
|
+
ProfileText: '',
|
10
|
+
ProfileImage: '',
|
11
|
+
IsVerified: false,
|
12
|
+
Roles: [],
|
13
|
+
FacilitatorClassList: []
|
14
|
+
},
|
15
|
+
loaded: false,
|
16
|
+
updateLoading: false,
|
17
|
+
enrollmentList: [],
|
18
|
+
});
|
19
|
+
const userStore = { state, onChange, reset };
|
20
|
+
|
21
|
+
exports.userStore = userStore;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Component, Element, State, Prop, Method, h } from '@stencil/core';
|
1
|
+
import { Component, Element, State, Prop, Method, h, Host } from '@stencil/core';
|
2
2
|
import { EnvironmentConfigService } from '../../services';
|
3
3
|
export class SparkleFeedPost {
|
4
4
|
// @Prop({ connect: 'ion-toast-controller' })
|
@@ -108,33 +108,35 @@ export class SparkleFeedPost {
|
|
108
108
|
}
|
109
109
|
render() {
|
110
110
|
const userInfo = this.renderUserInfo();
|
111
|
-
return (h(
|
112
|
-
h("
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
h("ion-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
h("ion-
|
132
|
-
"
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
h("div",
|
137
|
-
|
111
|
+
return (h(Host, null,
|
112
|
+
h("slot", null),
|
113
|
+
h("ion-card", null,
|
114
|
+
h("ion-item", { class: "header" },
|
115
|
+
h("ion-card-title", null, "Community Wall"),
|
116
|
+
userInfo),
|
117
|
+
h("ion-card-content", null,
|
118
|
+
h("form", null,
|
119
|
+
h("ion-list", null,
|
120
|
+
h("ion-item", { lines: "none" },
|
121
|
+
h("ion-label", null, "Public"),
|
122
|
+
h("ion-toggle", { class: "IsPublic", slot: "end", color: "primary", name: "IsPublic" })),
|
123
|
+
h("ion-item", { class: "padding" },
|
124
|
+
h("ion-textarea", { class: "PostText", required: true, placeholder: "Post Text", name: "PostText", value: this.postText })),
|
125
|
+
h("ion-item", { class: "padding" },
|
126
|
+
h("ion-input", { class: "PostExternalUrl", required: true, type: "text", placeholder: "URL", name: "ExternalResourceUrl", value: this.externalResourceUrl })),
|
127
|
+
this.uploadedImage ? (h("ion-item", { class: "padding" },
|
128
|
+
h("img", { class: "uploaded-image", src: this.uploadedImage }))) : (''),
|
129
|
+
h("ion-item", { lines: "none" },
|
130
|
+
h("input", { type: "file", id: "fileInput", onChange: evt => this.uploadImage(evt), style: { display: 'none' }, accept: "image/*" }),
|
131
|
+
this.uploadImageLoading ? h("ion-spinner", { color: "primary" }) : '',
|
132
|
+
h("ion-button", { slot: "start", onClick: evt => this.selectFile() },
|
133
|
+
h("ion-icon", { name: "add" }),
|
134
|
+
"Upload Image")),
|
135
|
+
h("ion-item", { class: "post-footer", lines: "none" },
|
136
|
+
h("div", null,
|
137
|
+
h("div", { class: "error" }, this.errorMessage),
|
138
|
+
h("div", { class: "success" }, this.successMessage)),
|
139
|
+
h("ion-button", { slot: "end", size: "default", onClick: evt => this.submitPost(), disabled: !this.isAuthenticated() }, "Post"))))))));
|
138
140
|
}
|
139
141
|
static get is() { return "sparkle-feed-post"; }
|
140
142
|
static get originalStyleUrls() { return {
|
@@ -21,6 +21,7 @@ export class SparkleQuiz {
|
|
21
21
|
Array.from(this.el.querySelector("[slot='options']").querySelectorAll('option')).forEach(el => {
|
22
22
|
this.options = [...this.options, { option: el.innerText }];
|
23
23
|
});
|
24
|
+
console.log(this.questionText, this.options);
|
24
25
|
}
|
25
26
|
this.quizAnswerChanged.emit({
|
26
27
|
question: null,
|
@@ -100,7 +101,7 @@ export class SparkleQuiz {
|
|
100
101
|
incorrect: this.submitted && !this.correct,
|
101
102
|
};
|
102
103
|
return (h("div", { class: classes, ref: el => (this.containerRef = el) },
|
103
|
-
h("div",
|
104
|
+
h("div", { hidden: true },
|
104
105
|
h("slot", null)),
|
105
106
|
this.renderQuestion(),
|
106
107
|
this.submitted && this.showInstantResult && h("div", { class: "feedback-container" }, [this.showAnswerStatus(), this.getQuestionFeedback()])));
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { h } from './index-c04b9ed5.js';
|
2
|
+
import { A as AuthStore } from './auth.store-633e8414.js';
|
3
|
+
|
4
|
+
function isGranted(permissionName) {
|
5
|
+
return sparkle.auth.isGranted(permissionName);
|
6
|
+
}
|
7
|
+
|
8
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
9
|
+
var t = {};
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
11
|
+
t[p] = s[p];
|
12
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
13
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
14
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
15
|
+
t[p[i]] = s[p[i]];
|
16
|
+
}
|
17
|
+
return t;
|
18
|
+
};
|
19
|
+
const Route = (_a) => {
|
20
|
+
var { component, permission, render } = _a, props = __rest(_a, ["component", "permission", "render"]);
|
21
|
+
const Component = component;
|
22
|
+
return (h("stencil-route", Object.assign({}, props, { routeRender: (props) => {
|
23
|
+
if (!AuthStore.state.isAuthenticated)
|
24
|
+
return (h("stencil-router-redirect", { url: "/login" }));
|
25
|
+
if (permission && !isGranted(permission)) {
|
26
|
+
return (h("stencil-router-redirect", { url: "/unauthorized" }));
|
27
|
+
}
|
28
|
+
return Component ? h(Component, Object.assign({}, props, props.componentProps)) : render(props);
|
29
|
+
} })));
|
30
|
+
};
|
31
|
+
const PrivateRoute = Route;
|
32
|
+
|
33
|
+
export { PrivateRoute as P };
|