@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
@@ -1,11 +1,11 @@
|
|
1
1
|
import { h, r as registerInstance, H as Host, e as getElement } from './index-c04b9ed5.js';
|
2
|
-
import { t as toastController } from './overlays-
|
3
|
-
import { F as FacilitatorService, f as facilitatorStore } from './facilitator.service-
|
2
|
+
import { t as toastController } from './overlays-bdd9344a.js';
|
3
|
+
import { F as FacilitatorService, f as facilitatorStore } from './facilitator.service-8fd435bf.js';
|
4
4
|
import './ionic-global-4903e23e.js';
|
5
5
|
import './hardware-back-button-fa04d6e9.js';
|
6
|
-
import './helpers-
|
7
|
-
import './httpService-
|
8
|
-
import './auth.store-
|
6
|
+
import './helpers-03073fe4.js';
|
7
|
+
import './httpService-61864992.js';
|
8
|
+
import './auth.store-633e8414.js';
|
9
9
|
import './environment-config.service-2b5d692b.js';
|
10
10
|
|
11
11
|
const LoadingSpinner = () => (h("div", { class: "spinner-border", role: "status" }));
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { r as registerInstance, h, e as getElement } from './index-c04b9ed5.js';
|
1
|
+
import { r as registerInstance, h, H as Host, e as getElement } from './index-c04b9ed5.js';
|
2
2
|
import { E as EnvironmentConfigService } from './environment-config.service-2b5d692b.js';
|
3
|
-
import './auth.store-
|
3
|
+
import './auth.store-633e8414.js';
|
4
4
|
|
5
5
|
const sparkleFeedPostCss = ":host{display:block}.post-footer{display:flex;justify-content:space-between}.error{color:red}.success{color:green}.uploaded-image{display:block;max-height:140px;width:auto !important}";
|
6
6
|
|
@@ -107,7 +107,7 @@ const SparkleFeedPost = class {
|
|
107
107
|
}
|
108
108
|
render() {
|
109
109
|
const userInfo = this.renderUserInfo();
|
110
|
-
return (h("ion-card", null, h("ion-item", { class: "header" }, h("ion-card-title", null, "
|
110
|
+
return (h(Host, null, h("slot", null), h("ion-card", null, h("ion-item", { class: "header" }, h("ion-card-title", null, "Community Wall"), userInfo), h("ion-card-content", null, h("form", null, h("ion-list", null, h("ion-item", { lines: "none" }, h("ion-label", null, "Public"), h("ion-toggle", { class: "IsPublic", slot: "end", color: "primary", name: "IsPublic" })), h("ion-item", { class: "padding" }, h("ion-textarea", { class: "PostText", required: true, placeholder: "Post Text", name: "PostText", value: this.postText })), h("ion-item", { class: "padding" }, h("ion-input", { class: "PostExternalUrl", required: true, type: "text", placeholder: "URL", name: "ExternalResourceUrl", value: this.externalResourceUrl })), this.uploadedImage ? (h("ion-item", { class: "padding" }, h("img", { class: "uploaded-image", src: this.uploadedImage }))) : (''), h("ion-item", { lines: "none" }, h("input", { type: "file", id: "fileInput", onChange: evt => this.uploadImage(evt), style: { display: 'none' }, accept: "image/*" }), this.uploadImageLoading ? h("ion-spinner", { color: "primary" }) : '', h("ion-button", { slot: "start", onClick: evt => this.selectFile() }, h("ion-icon", { name: "add" }), "Upload Image")), h("ion-item", { class: "post-footer", lines: "none" }, h("div", null, h("div", { class: "error" }, this.errorMessage), h("div", { class: "success" }, this.successMessage)), h("ion-button", { slot: "end", size: "default", onClick: evt => this.submitPost(), disabled: !this.isAuthenticated() }, "Post"))))))));
|
111
111
|
}
|
112
112
|
get el() { return getElement(this); }
|
113
113
|
};
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { r as registerInstance, h, H as Host, e as getElement } from './index-c04b9ed5.js';
|
2
|
-
import { S as StudentService } from './student.service-
|
3
|
-
import { t as toastController } from './overlays-
|
4
|
-
import './httpService-
|
5
|
-
import './auth.store-
|
2
|
+
import { S as StudentService } from './student.service-e6eb1f99.js';
|
3
|
+
import { t as toastController } from './overlays-bdd9344a.js';
|
4
|
+
import './httpService-61864992.js';
|
5
|
+
import './auth.store-633e8414.js';
|
6
6
|
import './environment-config.service-2b5d692b.js';
|
7
|
+
import './user.store-b8645067.js';
|
7
8
|
import './ionic-global-4903e23e.js';
|
8
9
|
import './hardware-back-button-fa04d6e9.js';
|
9
|
-
import './helpers-
|
10
|
+
import './helpers-03073fe4.js';
|
10
11
|
|
11
12
|
const sparkleFeedbackCss = ":host{display:block}";
|
12
13
|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { r as registerInstance, h, e as getElement } from './index-c04b9ed5.js';
|
2
|
-
import { S as SparkleGlobal, G as GetGoalAppData,
|
2
|
+
import { S as SparkleGlobal, G as GetGoalAppData, M as MyGoalTemplate, a as MyGoalTemplateJSON } from './util-a831d09d.js';
|
3
3
|
import { E as EnvironmentConfigService } from './environment-config.service-2b5d692b.js';
|
4
4
|
import { A as AssetsService } from './assets.service-66e848b8.js';
|
5
|
-
import { A as AppDataService, F as FeedService, g as goalStore, f as feedStore } from './feed.service-
|
6
|
-
import './httpService-
|
7
|
-
import './auth.store-
|
8
|
-
import './overlays-
|
5
|
+
import { A as AppDataService, F as FeedService, g as goalStore, f as feedStore } from './feed.service-ace049e5.js';
|
6
|
+
import './httpService-61864992.js';
|
7
|
+
import './auth.store-633e8414.js';
|
8
|
+
import './overlays-bdd9344a.js';
|
9
9
|
import './ionic-global-4903e23e.js';
|
10
10
|
import './hardware-back-button-fa04d6e9.js';
|
11
|
-
import './helpers-
|
11
|
+
import './helpers-03073fe4.js';
|
12
12
|
|
13
13
|
const sparkleGoalFormCss = ":host{display:block}";
|
14
14
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-c04b9ed5.js';
|
2
|
+
|
3
|
+
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}";
|
4
|
+
|
5
|
+
const SparkleGoalProgress = class {
|
6
|
+
constructor(hostRef) {
|
7
|
+
registerInstance(this, hostRef);
|
8
|
+
}
|
9
|
+
render() {
|
10
|
+
return (h(Host, null, h("div", { class: "progress-container" }, h("div", { id: "progress-bar", style: { "--p": this.percentage + "%" } }), h("strong", { class: "percentage" }, this.percentage, "%"))));
|
11
|
+
}
|
12
|
+
};
|
13
|
+
SparkleGoalProgress.style = sparkleGoalProgressCss;
|
14
|
+
|
15
|
+
export { SparkleGoalProgress as sparkle_goal_progress };
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import { r as registerInstance, h, c as getAssetPath, H as Host } from './index-c04b9ed5.js';
|
2
|
+
import { m as modalController } from './overlays-bdd9344a.js';
|
3
|
+
import { S as SparkleGlobal, f as date } from './util-a831d09d.js';
|
4
|
+
import './ionic-global-4903e23e.js';
|
5
|
+
import './hardware-back-button-fa04d6e9.js';
|
6
|
+
import './helpers-03073fe4.js';
|
7
|
+
|
8
|
+
var PostVisibility;
|
9
|
+
(function (PostVisibility) {
|
10
|
+
PostVisibility[PostVisibility["Private"] = 0] = "Private";
|
11
|
+
PostVisibility[PostVisibility["Public"] = 1] = "Public";
|
12
|
+
})(PostVisibility || (PostVisibility = {}));
|
13
|
+
|
14
|
+
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}";
|
15
|
+
|
16
|
+
const SparkleGwwItem = class {
|
17
|
+
constructor(hostRef) {
|
18
|
+
registerInstance(this, hostRef);
|
19
|
+
}
|
20
|
+
async presentModal(comments) {
|
21
|
+
const modal = await modalController.create({
|
22
|
+
component: "sparkle-gww-comment-list",
|
23
|
+
componentProps: { comments: comments }
|
24
|
+
});
|
25
|
+
await modal.present();
|
26
|
+
}
|
27
|
+
clearCommentField() {
|
28
|
+
this.comment = "";
|
29
|
+
}
|
30
|
+
renderMyMoodTemplate(data) {
|
31
|
+
return (h("div", null, h("b", null, "Mood:"), " ", data.Mood, h("br", null), h("b", null, "Level:"), " ", data.Level, h("br", null), h("img", { src: data.MoodImage }), "`"));
|
32
|
+
}
|
33
|
+
renderMyHealthTemplate(data) {
|
34
|
+
return (h("div", null, h("b", null, "Heart rate:"), " ", data.HeartRate, " bpm "));
|
35
|
+
}
|
36
|
+
renderMyGoalTemplate(data) {
|
37
|
+
return (h("div", null, h("b", null, "Goal: "), " ", data.GoalTitle, " ", h("br", null), h("b", null, "Update Text: "), " ", data.GoalText, " ", h("br", null), h("sparkle-goal-progress", { percentage: data.GoalProgress })));
|
38
|
+
}
|
39
|
+
renderTemplate() {
|
40
|
+
if (this.post.PostTextJSON) {
|
41
|
+
var parseData = JSON.parse(this.post.PostTextJSON);
|
42
|
+
if (this.post.MiniAppId == SparkleGlobal.MY_GOALS_APP_ID) {
|
43
|
+
return this.renderMyGoalTemplate(parseData);
|
44
|
+
}
|
45
|
+
else if (this.post.MiniAppId == SparkleGlobal.MY_HEALTH_APP_ID) {
|
46
|
+
return this.renderMyHealthTemplate(parseData);
|
47
|
+
}
|
48
|
+
else if (this.post.MiniAppId == SparkleGlobal.MY_MOOD_APP_ID) {
|
49
|
+
return this.renderMyMoodTemplate(parseData);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
else {
|
53
|
+
return ([
|
54
|
+
h("div", { innerHTML: this.post.PostText }),
|
55
|
+
this.post.ExternalResourceUrl && h("div", null, h("img", { src: this.post.ExternalResourceUrl, class: "external-src-image" }))
|
56
|
+
]);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
render() {
|
60
|
+
return (h(Host, { class: {
|
61
|
+
'Card': true,
|
62
|
+
} }, h("ion-item", { class: "header-item" }, h("ion-avatar", { class: "header-avatar", slot: "start" }, h("img", { src: this.post.ProfileImageUrl ? this.post.ProfileImageUrl : getAssetPath("/assets/img/user.png") })), h("div", null, h("strong", { class: "requester-name", "text-capitalize": true }, this.post.Name), h("div", null, h("small", null, " ", date(this.post.CreatedOn)))), h("div", { slot: "end" }, h("ion-icon", { color: "primary", name: this.post.PostVisibility == PostVisibility.Public ? "globe-outline" : "eye-outline" }))), h("div", { class: "ion-padding" }, this.renderTemplate()), h("div", { class: "footer" }, this.post.Comments.length > 0 &&
|
63
|
+
h("div", { class: "comment-overview", slot: "end" }, " ", h("small", { onClick: () => this.post.Comments.length > 0 && this.presentModal(this.post.Comments) }, "Comments (", this.post.Comments.length, ")")), this.post.Comments.map((item) => {
|
64
|
+
h("ion-item", { class: "comment-box", onClick: () => this.presentModal(this.post.Comments) }, h("ion-avatar", { class: "footer-avatar", slot: "start" }, h("img", { src: item.ProfileImageUrl ? item.ProfileImageUrl : "/assets/img/user.png" })), h("small", null, h("b", null, item.Name), " ", item.Comment), h("ion-icon", { slot: "end", name: "git-merge", color: "primary" }));
|
65
|
+
}), h("hr", null), h("ion-item", { class: "comment-footer" }, h("ion-avatar", { class: "footer-avatar", slot: "start" }, h("img", { src: getAssetPath("/assets/img/user.png") })), h("ion-input", { value: this.comment, onIonChange: (e) => this.comment = e.target.value, type: "text", placeholder: "Write a comment" }), h("ion-button", { onClick: () => this.onPostComment({ Comment: this.comment, PostId: this.post.Id }), slot: "end", size: "small", disabled: !this.comment || this.loading }, this.loading ? h("ion-spinner", { name: "dots" }) : "POST COMMENT")))));
|
66
|
+
}
|
67
|
+
};
|
68
|
+
SparkleGwwItem.style = sparkleGwwItemCss;
|
69
|
+
|
70
|
+
export { SparkleGwwItem as sparkle_gww_item };
|
@@ -0,0 +1,230 @@
|
|
1
|
+
import { r as registerInstance, h, H as Host, e as getElement, k as getContext } from './index-c04b9ed5.js';
|
2
|
+
import { M as Menu } from './icons-90b957ab.js';
|
3
|
+
import { A as ActiveRouter } from './active-router-fc9e4e06.js';
|
4
|
+
import { m as matchPath } from './match-path-36fdf5c7.js';
|
5
|
+
|
6
|
+
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}";
|
7
|
+
|
8
|
+
const SparkleMenuToggle = class {
|
9
|
+
constructor(hostRef) {
|
10
|
+
registerInstance(this, hostRef);
|
11
|
+
}
|
12
|
+
hostData() {
|
13
|
+
return {
|
14
|
+
'role': 'button',
|
15
|
+
'tabindex': '0',
|
16
|
+
'aria-label': 'Toggle Menu',
|
17
|
+
};
|
18
|
+
}
|
19
|
+
__stencil_render() {
|
20
|
+
return h(Menu, null);
|
21
|
+
}
|
22
|
+
render() { return h(Host, this.hostData(), this.__stencil_render()); }
|
23
|
+
};
|
24
|
+
SparkleMenuToggle.style = menuToggleCss;
|
25
|
+
|
26
|
+
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%}";
|
27
|
+
|
28
|
+
const SparkleNav = class {
|
29
|
+
constructor(hostRef) {
|
30
|
+
registerInstance(this, hostRef);
|
31
|
+
//TODO: get this config somewhere from the config initialization
|
32
|
+
this.config = {
|
33
|
+
showRomanNumber: false,
|
34
|
+
showModuleIndex: true,
|
35
|
+
showSessionIndex: true,
|
36
|
+
};
|
37
|
+
this.toggleParent = (parentItem) => {
|
38
|
+
return (e) => {
|
39
|
+
e.preventDefault();
|
40
|
+
this.selectedParent = parentItem;
|
41
|
+
};
|
42
|
+
};
|
43
|
+
}
|
44
|
+
componentDidLoad() { }
|
45
|
+
//TODO: not working
|
46
|
+
pageDidLoadHandler($event) {
|
47
|
+
if ($event) {
|
48
|
+
//let pageInfo = $event.detail.pageInfo;
|
49
|
+
let splittedParts = window.location.pathname.split('/').filter(x => !!x && x != 'course');
|
50
|
+
this.moduleURLName = splittedParts[0];
|
51
|
+
this.sessionURLName = splittedParts[1];
|
52
|
+
if (this.toc) {
|
53
|
+
let courseModule = this.toc.courseModules.find(x => x.urlName == this.moduleURLName);
|
54
|
+
this.selectedParent = courseModule;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
toggleLeftSidebar() { }
|
59
|
+
romanize(num) {
|
60
|
+
if (isNaN(num))
|
61
|
+
return NaN;
|
62
|
+
var digits = String(+num).split(''), key = [
|
63
|
+
'',
|
64
|
+
'C',
|
65
|
+
'CC',
|
66
|
+
'CCC',
|
67
|
+
'CD',
|
68
|
+
'D',
|
69
|
+
'DC',
|
70
|
+
'DCC',
|
71
|
+
'DCCC',
|
72
|
+
'CM',
|
73
|
+
'',
|
74
|
+
'X',
|
75
|
+
'XX',
|
76
|
+
'XXX',
|
77
|
+
'XL',
|
78
|
+
'L',
|
79
|
+
'LX',
|
80
|
+
'LXX',
|
81
|
+
'LXXX',
|
82
|
+
'XC',
|
83
|
+
'',
|
84
|
+
'I',
|
85
|
+
'II',
|
86
|
+
'III',
|
87
|
+
'IV',
|
88
|
+
'V',
|
89
|
+
'VI',
|
90
|
+
'VII',
|
91
|
+
'VIII',
|
92
|
+
'IX',
|
93
|
+
], roman = '', i = 3;
|
94
|
+
while (i--)
|
95
|
+
roman = (key[+digits.pop() + i * 10] || '') + roman;
|
96
|
+
return Array(+digits.join('') + 1).join('M') + roman;
|
97
|
+
}
|
98
|
+
getModuleIndex(index, preventNumbering) {
|
99
|
+
return this.config.showModuleIndex && !preventNumbering ? (this.config.showRomanNumber ? this.romanize(index) : index) + '. ' : '';
|
100
|
+
}
|
101
|
+
getSessionIndex(index, preventNumbering) {
|
102
|
+
return this.config.showSessionIndex && !preventNumbering ? (index) + '. ' : '';
|
103
|
+
}
|
104
|
+
hostData() {
|
105
|
+
return {
|
106
|
+
role: 'navigation',
|
107
|
+
};
|
108
|
+
}
|
109
|
+
__stencil_render() {
|
110
|
+
let moduleIndex = 0;
|
111
|
+
let sessionIndex = 0;
|
112
|
+
return (h("ul", { class: "module-list" }, this.toc &&
|
113
|
+
this.toc.courseModules.map(module => {
|
114
|
+
sessionIndex = 0;
|
115
|
+
if (!module.preventNumbering) {
|
116
|
+
moduleIndex++;
|
117
|
+
}
|
118
|
+
return (module.sessions.length > 0 && (h("li", null, h("a", { class: { 'link-active': module.urlName == this.moduleURLName }, href: module.sessions[0].urlName || '#', onClick: this.toggleParent(module) }, h("span", { class: "section-label" }, this.getModuleIndex(moduleIndex, module.preventNumbering), module.name, module.comingSoon && h("span", { class: "coming-soon" }, " Coming soon"))), h("ul", { class: { 'collapsed': this.selectedParent ? module !== this.selectedParent : moduleIndex !== 0, 'session-list': true } }, module.sessions.map(session => {
|
119
|
+
if (!session.preventNumbering) {
|
120
|
+
sessionIndex++;
|
121
|
+
}
|
122
|
+
return (h("li", { class: {
|
123
|
+
'active': module.urlName == this.moduleURLName && session.urlName == this.sessionURLName,
|
124
|
+
} }, h("stencil-route-link", { class: {
|
125
|
+
'is-completed': true,
|
126
|
+
'link-active': module.urlName == this.moduleURLName && session.urlName == this.sessionURLName,
|
127
|
+
}, url: 'course/' + module.urlName + '/' + session.urlName + '/' + session.pages[0].urlName, onClick: () => this.toggleLeftSidebar() }, this.getSessionIndex(sessionIndex, session.preventNumbering), session.name, session.comingSoon && h("span", { class: "coming-soon" }, " Coming soon"))));
|
128
|
+
})))));
|
129
|
+
})));
|
130
|
+
}
|
131
|
+
get el() { return getElement(this); }
|
132
|
+
render() { return h(Host, this.hostData(), this.__stencil_render()); }
|
133
|
+
};
|
134
|
+
SparkleNav.style = navCss;
|
135
|
+
|
136
|
+
const getUniqueId = () => {
|
137
|
+
return ((Math.random() * 10e16).toString().match(/.{4}/g) || []).join('-');
|
138
|
+
};
|
139
|
+
const getMatch = (pathname, url, exact) => {
|
140
|
+
return matchPath(pathname, {
|
141
|
+
path: url,
|
142
|
+
exact: exact,
|
143
|
+
strict: true
|
144
|
+
});
|
145
|
+
};
|
146
|
+
const isHTMLStencilRouteElement = (elm) => {
|
147
|
+
return elm.tagName === 'STENCIL-ROUTE';
|
148
|
+
};
|
149
|
+
const RouteSwitch = class {
|
150
|
+
constructor(hostRef) {
|
151
|
+
registerInstance(this, hostRef);
|
152
|
+
this.group = getUniqueId();
|
153
|
+
this.subscribers = [];
|
154
|
+
this.queue = getContext(this, "queue");
|
155
|
+
}
|
156
|
+
componentWillLoad() {
|
157
|
+
if (this.location != null) {
|
158
|
+
this.regenerateSubscribers(this.location);
|
159
|
+
}
|
160
|
+
}
|
161
|
+
async regenerateSubscribers(newLocation) {
|
162
|
+
if (newLocation == null) {
|
163
|
+
return;
|
164
|
+
}
|
165
|
+
let newActiveIndex = -1;
|
166
|
+
this.subscribers = Array.prototype.slice.call(this.el.children)
|
167
|
+
.filter(isHTMLStencilRouteElement)
|
168
|
+
.map((childElement, index) => {
|
169
|
+
const match = getMatch(newLocation.pathname, childElement.url, childElement.exact);
|
170
|
+
if (match && newActiveIndex === -1) {
|
171
|
+
newActiveIndex = index;
|
172
|
+
}
|
173
|
+
return {
|
174
|
+
el: childElement,
|
175
|
+
match: match
|
176
|
+
};
|
177
|
+
});
|
178
|
+
if (newActiveIndex === -1) {
|
179
|
+
return;
|
180
|
+
}
|
181
|
+
// Check if this actually changes which child is active
|
182
|
+
// then just pass the new match down if the active route isn't changing.
|
183
|
+
if (this.activeIndex === newActiveIndex) {
|
184
|
+
this.subscribers[newActiveIndex].el.match = this.subscribers[newActiveIndex].match;
|
185
|
+
return;
|
186
|
+
}
|
187
|
+
this.activeIndex = newActiveIndex;
|
188
|
+
// Set all props on the new active route then wait until it says that it
|
189
|
+
// is completed
|
190
|
+
const activeChild = this.subscribers[this.activeIndex];
|
191
|
+
if (this.scrollTopOffset) {
|
192
|
+
activeChild.el.scrollTopOffset = this.scrollTopOffset;
|
193
|
+
}
|
194
|
+
activeChild.el.group = this.group;
|
195
|
+
activeChild.el.match = activeChild.match;
|
196
|
+
activeChild.el.componentUpdated = (routeViewUpdatedOptions) => {
|
197
|
+
// After the new active route has completed then update visibility of routes
|
198
|
+
this.queue.write(() => {
|
199
|
+
this.subscribers.forEach((child, index) => {
|
200
|
+
child.el.componentUpdated = undefined;
|
201
|
+
if (index === this.activeIndex) {
|
202
|
+
return child.el.style.display = '';
|
203
|
+
}
|
204
|
+
if (this.scrollTopOffset) {
|
205
|
+
child.el.scrollTopOffset = this.scrollTopOffset;
|
206
|
+
}
|
207
|
+
child.el.group = this.group;
|
208
|
+
child.el.match = null;
|
209
|
+
child.el.style.display = 'none';
|
210
|
+
});
|
211
|
+
});
|
212
|
+
if (this.routeViewsUpdated) {
|
213
|
+
this.routeViewsUpdated(Object.assign({ scrollTopOffset: this.scrollTopOffset }, routeViewUpdatedOptions));
|
214
|
+
}
|
215
|
+
};
|
216
|
+
}
|
217
|
+
render() {
|
218
|
+
return (h("slot", null));
|
219
|
+
}
|
220
|
+
get el() { return getElement(this); }
|
221
|
+
static get watchers() { return {
|
222
|
+
"location": ["regenerateSubscribers"]
|
223
|
+
}; }
|
224
|
+
};
|
225
|
+
ActiveRouter.injectProps(RouteSwitch, [
|
226
|
+
'location',
|
227
|
+
'routeViewsUpdated'
|
228
|
+
]);
|
229
|
+
|
230
|
+
export { SparkleMenuToggle as sparkle_menu_toggle, SparkleNav as sparkle_nav, RouteSwitch as stencil_route_switch };
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-c04b9ed5.js';
|
2
|
+
|
3
|
+
const sparkleValidationErrorCss = ":host{display:block}sparkle-validation-error ul{padding:10px 0px}sparkle-validation-error .alert-danger{margin-top:10px;font-size:12px}";
|
4
|
+
|
5
|
+
const SparkleValidationError = class {
|
6
|
+
constructor(hostRef) {
|
7
|
+
registerInstance(this, hostRef);
|
8
|
+
this.errors = [];
|
9
|
+
}
|
10
|
+
render() {
|
11
|
+
return (h(Host, null, this.errors.length > 0 &&
|
12
|
+
h("div", { class: "alert alert-danger", role: "alert" }, h("ul", null, this.errors.map(error => h("li", null, h("b", null, error.Field, ": "), error.Message))))));
|
13
|
+
}
|
14
|
+
};
|
15
|
+
SparkleValidationError.style = sparkleValidationErrorCss;
|
16
|
+
|
17
|
+
export { SparkleValidationError as sparkle_validation_error };
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { j as readTask, w as writeTask } from './index-c04b9ed5.js';
|
2
|
-
import { f as findClosestIonContent, s as scrollToTop } from './index-
|
3
|
-
import { c as componentOnReady } from './helpers-
|
2
|
+
import { f as findClosestIonContent, s as scrollToTop } from './index-37004831.js';
|
3
|
+
import { c as componentOnReady } from './helpers-03073fe4.js';
|
4
4
|
import './index-dad75b83.js';
|
5
5
|
|
6
6
|
/*!
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { r as registerInstance, e as getElement } from './index-c04b9ed5.js';
|
2
|
+
import { A as ActiveRouter } from './active-router-fc9e4e06.js';
|
3
|
+
|
4
|
+
// Get the URL for this route link without the root from the router
|
5
|
+
const getUrl = (url, root) => {
|
6
|
+
// Don't allow double slashes
|
7
|
+
if (url.charAt(0) == '/' && root.charAt(root.length - 1) == '/') {
|
8
|
+
return root.slice(0, root.length - 1) + url;
|
9
|
+
}
|
10
|
+
return root + url;
|
11
|
+
};
|
12
|
+
const Redirect = class {
|
13
|
+
constructor(hostRef) {
|
14
|
+
registerInstance(this, hostRef);
|
15
|
+
}
|
16
|
+
componentWillLoad() {
|
17
|
+
if (this.history && this.root && this.url) {
|
18
|
+
return this.history.replace(getUrl(this.url, this.root));
|
19
|
+
}
|
20
|
+
}
|
21
|
+
get el() { return getElement(this); }
|
22
|
+
};
|
23
|
+
ActiveRouter.injectProps(Redirect, [
|
24
|
+
'history',
|
25
|
+
'root'
|
26
|
+
]);
|
27
|
+
|
28
|
+
export { Redirect as stencil_router_redirect };
|
@@ -1,21 +1,5 @@
|
|
1
|
-
import { H as HttpService } from './httpService-
|
2
|
-
import {
|
3
|
-
|
4
|
-
const { state, onChange, reset } = createStore({
|
5
|
-
user: {
|
6
|
-
FirstName: '',
|
7
|
-
LastName: '',
|
8
|
-
ProfileText: '',
|
9
|
-
ProfileImage: '',
|
10
|
-
IsVerified: false,
|
11
|
-
Roles: [],
|
12
|
-
FacilitatorClassList: []
|
13
|
-
},
|
14
|
-
loaded: false,
|
15
|
-
updateLoading: false,
|
16
|
-
enrollmentList: [],
|
17
|
-
});
|
18
|
-
const userStore = { state, onChange, reset };
|
1
|
+
import { H as HttpService } from './httpService-61864992.js';
|
2
|
+
import { u as userStore } from './user.store-b8645067.js';
|
19
3
|
|
20
4
|
class StudentService {
|
21
5
|
constructor() { }
|
@@ -72,4 +56,4 @@ class StudentService {
|
|
72
56
|
}
|
73
57
|
}
|
74
58
|
|
75
|
-
export { StudentService as S
|
59
|
+
export { StudentService as S };
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { c as createStore } from './auth.store-633e8414.js';
|
2
|
+
|
3
|
+
const { state, onChange, reset } = createStore({
|
4
|
+
user: {
|
5
|
+
FirstName: '',
|
6
|
+
LastName: '',
|
7
|
+
ProfileText: '',
|
8
|
+
ProfileImage: '',
|
9
|
+
IsVerified: false,
|
10
|
+
Roles: [],
|
11
|
+
FacilitatorClassList: []
|
12
|
+
},
|
13
|
+
loaded: false,
|
14
|
+
updateLoading: false,
|
15
|
+
enrollmentList: [],
|
16
|
+
});
|
17
|
+
const userStore = { state, onChange, reset };
|
18
|
+
|
19
|
+
export { userStore as u };
|
@@ -2448,4 +2448,4 @@ function date(date) {
|
|
2448
2448
|
return format(new Date(date), 'DD MMM YYYY');
|
2449
2449
|
}
|
2450
2450
|
|
2451
|
-
export { GetGoalAppData as G,
|
2451
|
+
export { GetGoalAppData as G, MyGoalTemplate as M, SparkleGlobal as S, MyGoalTemplateJSON as a, MyHealthTemplate as b, MyHealthTemplateJSON as c, MyMoodTemplate as d, MyMoodTemplateJSON as e, date as f, sample as s };
|
@@ -1 +1 @@
|
|
1
|
-
export{A as AuthService,
|
1
|
+
export{A as AuthService,i as initSetupEnvironmentConfig,s as setupEnvironmentConfig}from"./p-1019ebc3.js";export{E as EnvironmentConfigService}from"./p-b226f54d.js";export{A as AssetsService}from"./p-9a443f51.js";export{A as AuthStore}from"./p-340754ed.js";export{P as PrivateRoute}from"./p-91accfc1.js";import"./p-ee1e0eb4.js";import"./p-5d409601.js";import"./p-a85598ad.js";import"./p-2e2b813c.js";import"./p-871106e0.js";import"./p-add30d46.js";import"./p-17eb4633.js";
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,i as s,w as i,h as e,H as o,e as n}from"./p-ee1e0eb4.js";import{c as r,g as a}from"./p-871106e0.js";import{
|
1
|
+
import{r as t,i as s,w as i,h as e,H as o,e as n}from"./p-ee1e0eb4.js";import{c as r,g as a}from"./p-871106e0.js";import{p as h}from"./p-17eb4633.js";import{i as l}from"./p-506221fe.js";import{c,h as d}from"./p-0e4de1d0.js";const u=class{constructor(i){t(this,i),this.ionChange=s(this,"ionChange",7),this.ionSelect=s(this,"ionSelect",7),this.ionStyle=s(this,"ionStyle",7),this.didInit=!1,this.activated=!1,this.disabled=!1,this.scrollable=!1,this.swipeGesture=!0,this.selectOnFocus=!1,this.onClick=t=>{const s=t.target,i=this.checked;"ION-SEGMENT"!==s.tagName&&(this.value=s.value,!this.scrollable&&this.swipeGesture||(i?this.checkButton(i,s):this.setCheckedClasses()),this.checked=s)},this.getSegmentButton=t=>{const s=this.getButtons().filter((t=>!t.disabled)),i=s.findIndex((t=>t===document.activeElement));switch(t){case"first":return s[0];case"last":return s[s.length-1];case"next":return s[i+1]||s[0];case"previous":return s[i-1]||s[s.length-1];default:return null}}}colorChanged(t,s){(void 0===s&&void 0!==t||void 0!==s&&void 0===t)&&this.emitStyle()}swipeGestureChanged(){this.gestureChanged()}valueChanged(t,s){this.ionSelect.emit({value:t}),(""!==s||this.didInit)&&(this.activated?this.valueAfterGesture=t:this.ionChange.emit({value:t}))}disabledChanged(){this.gestureChanged();const t=this.getButtons();for(const s of t)s.disabled=this.disabled}gestureChanged(){this.gesture&&this.gesture.enable(!this.scrollable&&!this.disabled&&this.swipeGesture)}connectedCallback(){this.emitStyle()}componentWillLoad(){this.emitStyle()}async componentDidLoad(){this.setCheckedClasses(),this.ensureFocusable(),this.gesture=(await import("./p-e9431eeb.js")).createGesture({el:this.el,gestureName:"segment",gesturePriority:100,threshold:0,passive:!1,onStart:t=>this.onStart(t),onMove:t=>this.onMove(t),onEnd:t=>this.onEnd(t)}),this.gestureChanged(),this.disabled&&this.disabledChanged(),this.didInit=!0}onStart(t){this.activate(t)}onMove(t){this.setNextIndex(t)}onEnd(t){this.setActivated(!1);const s=this.setNextIndex(t,!0);t.event.stopImmediatePropagation(),s&&this.addRipple(t);const i=this.valueAfterGesture;void 0!==i&&(this.ionChange.emit({value:i}),this.valueAfterGesture=void 0)}getButtons(){return Array.from(this.el.querySelectorAll("ion-segment-button"))}addRipple(t){if(!r.getBoolean("animated",!0)||!r.getBoolean("rippleEffect",!0))return;const s=this.getButtons().find((t=>t.value===this.value)),i=(s.shadowRoot||s).querySelector("ion-ripple-effect");if(!i)return;const{x:e,y:o}=h(t.event);i.addRipple(e,o).then((t=>t()))}setActivated(t){this.getButtons().forEach((s=>{t?s.classList.add("segment-button-activated"):s.classList.remove("segment-button-activated")})),this.activated=t}activate(t){const s=t.event.target,i=this.getButtons().find((t=>t.value===this.value));"ION-SEGMENT-BUTTON"===s.tagName&&(i||(this.value=s.value,this.setCheckedClasses()),this.value===s.value&&this.setActivated(!0))}getIndicator(t){return(t.shadowRoot||t).querySelector(".segment-button-indicator")}checkButton(t,s){const e=this.getIndicator(t),o=this.getIndicator(s);if(null===e||null===o)return;const n=e.getBoundingClientRect(),r=o.getBoundingClientRect(),a=`translate3d(${n.left-r.left}px, 0, 0) scaleX(${n.width/r.width})`;i((()=>{o.classList.remove("segment-button-indicator-animated"),o.style.setProperty("transform",a),o.getBoundingClientRect(),o.classList.add("segment-button-indicator-animated"),o.style.setProperty("transform","")})),this.value=s.value,this.setCheckedClasses()}setCheckedClasses(){const t=this.getButtons(),s=t.findIndex((t=>t.value===this.value))+1;this.checked=t.find((t=>t.value===this.value));for(const s of t)s.classList.remove("segment-button-after-checked");s<t.length&&t[s].classList.add("segment-button-after-checked")}setNextIndex(t,s=!1){const i=l(this.el),e=this.activated,o=this.getButtons(),n=o.findIndex((t=>t.value===this.value)),r=o[n];let a,h;if(-1===n)return;const c=r.getBoundingClientRect(),d=c.left,u=c.width,g=t.currentX,m=c.top+c.height/2,b=this.el.getRootNode().elementFromPoint(g,m);if(e&&!s){if(i?g>d+u:g<d){const t=n-1;t>=0&&(h=t)}else if((i?g<d:g>d+u)&&e&&!s){const t=n+1;t<o.length&&(h=t)}void 0===h||o[h].disabled||(a=o[h])}if(!e&&s&&(a=b),null!=a){if("ION-SEGMENT"===a.tagName)return!1;r!==a&&this.checkButton(r,a)}return!0}emitStyle(){this.ionStyle.emit({segment:!0})}onKeyDown(t){const s=l(this.el);let i,e=this.selectOnFocus;switch(t.key){case"ArrowRight":t.preventDefault(),i=this.getSegmentButton(s?"previous":"next");break;case"ArrowLeft":t.preventDefault(),i=this.getSegmentButton(s?"next":"previous");break;case"Home":t.preventDefault(),i=this.getSegmentButton("first");break;case"End":t.preventDefault(),i=this.getSegmentButton("last");break;case" ":case"Enter":t.preventDefault(),i=document.activeElement,e=!0}i&&(e&&this.checkButton(this.checked||i,i),i.focus())}ensureFocusable(){var t;void 0===this.value&&(null===(t=this.getButtons()[0])||void 0===t||t.setAttribute("tabindex","0"))}render(){const t=a(this);return e(o,{role:"tablist",onClick:this.onClick,class:c(this.color,{[t]:!0,"in-toolbar":d("ion-toolbar",this.el),"in-toolbar-color":d("ion-toolbar[color]",this.el),"segment-activated":this.activated,"segment-disabled":this.disabled,"segment-scrollable":this.scrollable})},e("slot",null))}get el(){return n(this)}static get watchers(){return{color:["colorChanged"],swipeGesture:["swipeGestureChanged"],value:["valueChanged"],disabled:["disabledChanged"]}}};u.style={ios:":host{--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:stretch;justify-content:center;width:100%;background:var(--background);font-family:var(--ion-font-family, inherit);text-align:center;contain:paint;user-select:none}:host(.segment-scrollable){justify-content:start;width:auto;overflow-x:auto}:host(.segment-scrollable::-webkit-scrollbar){display:none}:host{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.065);border-radius:8px;overflow:hidden;z-index:0}:host(.ion-color){background:rgba(var(--ion-color-base-rgb), 0.065)}:host(.in-toolbar){margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;width:auto}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-toolbar){margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}:host(.in-toolbar:not(.ion-color)){background:var(--ion-toolbar-segment-background, var(--background))}:host(.in-toolbar-color:not(.ion-color)){background:rgba(var(--ion-color-contrast-rgb), 0.11)}",md:":host{--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:stretch;justify-content:center;width:100%;background:var(--background);font-family:var(--ion-font-family, inherit);text-align:center;contain:paint;user-select:none}:host(.segment-scrollable){justify-content:start;width:auto;overflow-x:auto}:host(.segment-scrollable::-webkit-scrollbar){display:none}:host{--background:transparent}:host(.segment-scrollable) ::slotted(ion-segment-button){min-width:auto}"};export{u as ion_segment}
|
@@ -0,0 +1 @@
|
|
1
|
+
import{H as a}from"./p-a85598ad.js";import{u as e}from"./p-4a5f2b2b.js";class t{constructor(){}static getInstance(){return t.instance||(t.instance=new t),t.instance}async enrollClass(t){let r=await a.http.post("api/v1/Student/EnrollClass",t);return r&&(e.state.enrollmentList=[...e.state.enrollmentList,r.Data]),r}async leaveClass(t){let r=await a.http.post("api/v1/Student/LeaveClass",t);return r&&(e.state.enrollmentList=e.state.enrollmentList.filter((a=>a.Id!=r.Data))),r}async fetchUserConfiguration(){let t=await a.http.get("api/v1/Student/UserConfiguration");return t&&(e.state.enrollmentList=t.Data.EnrollmentList,e.state.user.FirstName=t.Data.FirstName,e.state.user.LastName=t.Data.LastName,e.state.user.ProfileText=t.Data.ProfileText,e.state.user.ProfileImage=t.Data.ProfileImage,e.state.user.IsVerified=t.Data.IsVerified,e.state.user.Roles=t.Data.Roles,e.state.user.FacilitatorClassList=t.Data.FacilitatorClassList),t}async updateProfile(t){e.state.updateLoading=!0;let r=await a.http.post("api/Account/update-profile",t);return console.log("after fetch",r),r&&(e.state.updateLoading=!1,e.state.user=Object.assign(Object.assign({},e.state.user),{FirstName:r.Data.FirstName,LastName:r.Data.LastName,ProfileText:r.Data.ProfileText,ProfileImage:r.Data.ProfileImage})),r}async submitFeedback(e){return await a.http.post("api/v1/Feedback",e)}}export{t as S}
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as e,h as t,H as s,e as i}from"./p-ee1e0eb4.js";import{E as l}from"./p-b226f54d.js";import"./p-340754ed.js";const o=class{constructor(t){e(this,t)}componentDidLoad(){this.postText=this.textValue}setText(e){this.postText=e}isAuthenticated(){try{var e=l.getInstance().get("sparkle");if(e&&e.auth&&e.auth.getToken())return!0}catch(e){return!1}}submitPost(){this.errorMessage="",this.successMessage="",this.el.getElementsByClassName("PostExternalUrl"),this.el.getElementsByClassName("IsPublic")}uploadImage(e){}selectFile(){document.getElementById("fileInput").click()}renderUserInfo(){var e={Token:null,ProfileImageUrl:null};return null!=e&&e.Token?t("ion-avatar",{class:"header-avatar",slot:"end"},t("img",{src:"/assets/img/avatar.png"})):t("ion-button",{slot:"end",href:"/login"},"Login to Post")}render(){const e=this.renderUserInfo();return t(s,null,t("slot",null),t("ion-card",null,t("ion-item",{class:"header"},t("ion-card-title",null,"Community Wall"),e),t("ion-card-content",null,t("form",null,t("ion-list",null,t("ion-item",{lines:"none"},t("ion-label",null,"Public"),t("ion-toggle",{class:"IsPublic",slot:"end",color:"primary",name:"IsPublic"})),t("ion-item",{class:"padding"},t("ion-textarea",{class:"PostText",required:!0,placeholder:"Post Text",name:"PostText",value:this.postText})),t("ion-item",{class:"padding"},t("ion-input",{class:"PostExternalUrl",required:!0,type:"text",placeholder:"URL",name:"ExternalResourceUrl",value:this.externalResourceUrl})),this.uploadedImage?t("ion-item",{class:"padding"},t("img",{class:"uploaded-image",src:this.uploadedImage})):"",t("ion-item",{lines:"none"},t("input",{type:"file",id:"fileInput",onChange:e=>this.uploadImage(e),style:{display:"none"},accept:"image/*"}),this.uploadImageLoading?t("ion-spinner",{color:"primary"}):"",t("ion-button",{slot:"start",onClick:()=>this.selectFile()},t("ion-icon",{name:"add"}),"Upload Image")),t("ion-item",{class:"post-footer",lines:"none"},t("div",null,t("div",{class:"error"},this.errorMessage),t("div",{class:"success"},this.successMessage)),t("ion-button",{slot:"end",size:"default",onClick:()=>this.submitPost(),disabled:!this.isAuthenticated()},"Post")))))))}get el(){return i(this)}};o.style=":host{display:block}.post-footer{display:flex;justify-content:space-between}.error{color:red}.success{color:green}.uploaded-image{display:block;max-height:140px;width:auto !important}";export{o as sparkle_feed_post}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,i,h as s,e,H as h}from"./p-ee1e0eb4.js";import{g as n}from"./p-871106e0.js";import{f as o,d as a,r}from"./p-
|
1
|
+
import{r as t,i,h as s,e,H as h}from"./p-ee1e0eb4.js";import{g as n}from"./p-871106e0.js";import{f as o,d as a,r}from"./p-ad102371.js";import{l as d}from"./p-17eb4633.js";import"./p-a208ab2d.js";let l;const c=class{constructor(s){t(this,s),this.ionDrag=i(this,"ionDrag",7),this.item=null,this.openAmount=0,this.initialOpenAmount=0,this.optsWidthRightSide=0,this.optsWidthLeftSide=0,this.sides=0,this.optsDirty=!0,this.contentEl=null,this.initialContentScrollY=!0,this.state=2,this.disabled=!1}disabledChanged(){this.gesture&&this.gesture.enable(!this.disabled)}async connectedCallback(){this.item=this.el.querySelector("ion-item"),this.contentEl=o(this.el),await this.updateOptions(),this.gesture=(await import("./p-e9431eeb.js")).createGesture({el:this.el,gestureName:"item-swipe",gesturePriority:100,threshold:5,canStart:t=>this.canStart(t),onStart:()=>this.onStart(),onMove:t=>this.onMove(t),onEnd:t=>this.onEnd(t)}),this.disabledChanged()}disconnectedCallback(){this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.item=null,this.leftOptions=this.rightOptions=void 0,l===this.el&&(l=void 0)}getOpenAmount(){return Promise.resolve(this.openAmount)}getSlidingRatio(){return Promise.resolve(this.getSlidingRatioSync())}async open(t){if(null===this.item)return;const i=this.getOptions(t);i&&(void 0===t&&(t=i===this.leftOptions?"start":"end"),t=d(t)?"end":"start",this.openAmount<0&&i===this.leftOptions||this.openAmount>0&&i===this.rightOptions||(this.closeOpened(),this.state=4,requestAnimationFrame((()=>{this.calculateOptsWidth(),l=this.el,this.setOpenAmount("end"===t?this.optsWidthRightSide:-this.optsWidthLeftSide,!1),this.state="end"===t?8:16}))))}async close(){this.setOpenAmount(0,!0)}async closeOpened(){return void 0!==l&&(l.close(),l=void 0,!0)}getOptions(t){return void 0===t?this.leftOptions||this.rightOptions:"start"===t?this.leftOptions:this.rightOptions}async updateOptions(){const t=this.el.querySelectorAll("ion-item-options");let i=0;this.leftOptions=this.rightOptions=void 0;for(let s=0;s<t.length;s++){const e=t.item(s),h=void 0!==e.componentOnReady?await e.componentOnReady():e;"start"==(d(h.side)?"end":"start")?(this.leftOptions=h,i|=1):(this.rightOptions=h,i|=2)}this.optsDirty=!0,this.sides=i}canStart(t){return!("rtl"===document.dir?window.innerWidth-t.startX<15:t.startX<15)&&(l&&l!==this.el&&this.closeOpened(),!(!this.rightOptions&&!this.leftOptions))}onStart(){this.item=this.el.querySelector("ion-item");const{contentEl:t}=this;t&&(this.initialContentScrollY=a(t)),l=this.el,void 0!==this.tmr&&(clearTimeout(this.tmr),this.tmr=void 0),0===this.openAmount&&(this.optsDirty=!0,this.state=4),this.initialOpenAmount=this.openAmount,this.item&&(this.item.style.transition="none")}onMove(t){this.optsDirty&&this.calculateOptsWidth();let i,s=this.initialOpenAmount-t.deltaX;switch(this.sides){case 2:s=Math.max(0,s);break;case 1:s=Math.min(0,s);break;case 3:break;case 0:return;default:console.warn("invalid ItemSideFlags value",this.sides)}s>this.optsWidthRightSide?(i=this.optsWidthRightSide,s=i+.55*(s-i)):s<-this.optsWidthLeftSide&&(i=-this.optsWidthLeftSide,s=i+.55*(s-i)),this.setOpenAmount(s,!1)}onEnd(t){const{contentEl:i,initialContentScrollY:s}=this;i&&r(i,s);const e=t.velocityX;let h=this.openAmount>0?this.optsWidthRightSide:-this.optsWidthLeftSide;const n=this.openAmount>0==!(e<0),o=Math.abs(e)>.3,a=Math.abs(this.openAmount)<Math.abs(h/2);p(n,o,a)&&(h=0);const d=this.state;this.setOpenAmount(h,!0),0!=(32&d)&&this.rightOptions?this.rightOptions.fireSwipeEvent():0!=(64&d)&&this.leftOptions&&this.leftOptions.fireSwipeEvent()}calculateOptsWidth(){this.optsWidthRightSide=0,this.rightOptions&&(this.rightOptions.style.display="flex",this.optsWidthRightSide=this.rightOptions.offsetWidth,this.rightOptions.style.display=""),this.optsWidthLeftSide=0,this.leftOptions&&(this.leftOptions.style.display="flex",this.optsWidthLeftSide=this.leftOptions.offsetWidth,this.leftOptions.style.display=""),this.optsDirty=!1}setOpenAmount(t,i){if(void 0!==this.tmr&&(clearTimeout(this.tmr),this.tmr=void 0),!this.item)return;const s=this.item.style;if(this.openAmount=t,i&&(s.transition=""),t>0)this.state=t>=this.optsWidthRightSide+30?40:8;else{if(!(t<0))return this.gesture&&this.gesture.enable(!1),this.tmr=setTimeout((()=>{this.state=2,this.tmr=void 0,this.gesture&&this.gesture.enable(!this.disabled)}),600),l=void 0,void(s.transform="");this.state=t<=-this.optsWidthLeftSide-30?80:16}s.transform=`translate3d(${-t}px,0,0)`,this.ionDrag.emit({amount:t,ratio:this.getSlidingRatioSync()})}getSlidingRatioSync(){return this.openAmount>0?this.openAmount/this.optsWidthRightSide:this.openAmount<0?this.openAmount/this.optsWidthLeftSide:0}render(){const t=n(this);return s(h,{class:{[t]:!0,"item-sliding-active-slide":2!==this.state,"item-sliding-active-options-end":0!=(8&this.state),"item-sliding-active-options-start":0!=(16&this.state),"item-sliding-active-swipe-end":0!=(32&this.state),"item-sliding-active-swipe-start":0!=(64&this.state)}})}get el(){return e(this)}static get watchers(){return{disabled:["disabledChanged"]}}},p=(t,i,s)=>!i&&s||t&&i;c.style="ion-item-sliding{display:block;position:relative;width:100%;overflow:hidden;user-select:none}ion-item-sliding .item{user-select:none}.item-sliding-active-slide .item{position:relative;transition:transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1);opacity:1;z-index:2;pointer-events:none;will-change:transform}.item-sliding-active-swipe-end .item-options-end .item-option-expandable{padding-left:100%;order:1;transition-duration:0.6s;transition-property:padding-left}[dir=rtl] .item-sliding-active-swipe-end .item-options-end .item-option-expandable,:host-context([dir=rtl]) .item-sliding-active-swipe-end .item-options-end .item-option-expandable{order:-1}.item-sliding-active-swipe-start .item-options-start .item-option-expandable{padding-right:100%;order:-1;transition-duration:0.6s;transition-property:padding-right}[dir=rtl] .item-sliding-active-swipe-start .item-options-start .item-option-expandable,:host-context([dir=rtl]) .item-sliding-active-swipe-start .item-options-start .item-option-expandable{order:1}";export{c as ion_item_sliding}
|